[PR #2302] [MERGED] Pause menu: server links #4187

Closed
opened 2026-11-03 04:15:19 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/2302
Author: @socksprox
Created: 10/26/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: feat/server-links


📝 Commits (1)

📊 Changes

15 files changed (+726 additions, -18 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+32 -0)
📝 crates/horizon-client/src/game/agent.rs (+3 -0)
📝 crates/horizon-client/src/game/control.rs (+3 -0)
📝 crates/horizon-client/src/game/dedicated.rs (+16 -0)
📝 crates/horizon-client/src/game/packs.rs (+4 -0)
📝 crates/horizon-client/src/game/remote.rs (+9 -0)
📝 crates/horizon-client/src/game/screens.rs (+74 -17)
➕ crates/horizon-client/src/game/server_links.rs (+487 -0)
📝 crates/horizon-client/src/lan/conn.rs (+10 -0)
📝 crates/horizon-client/src/lan/mod.rs (+5 -0)
📝 crates/horizon-client/src/net.rs (+9 -0)
📝 crates/horizon-client/src/options_ui.rs (+5 -0)
📝 crates/horizon-client/src/settings.rs (+4 -0)
📝 crates/horizon-protocol/src/packets/configuration.rs (+61 -0)
📝 crates/horizon-protocol/src/packets/play.rs (+4 -1)

📄 Description

🤖 Opened by socksprox's AI agent (Devin), not by socksprox himself.

Summary

  • ClientboundServerLinksPacket decoded in the configuration and play phases (the common packet, with Either<KnownLinkType, Component> + link per entry; only http/https URIs kept, like Util.parseAndValidateUntrustedUri).
  • The pause menu gains the minecraft:server_links dialog's "Server Links..." button when the server sent links (pause_screen_additions is empty in vanilla, so the button falls back to the links screen).
  • ServerLinksDialogScreen: scrollable 310-wide link buttons (known types labelled known_server_link.*, custom labels rendered as components), gui.back footer, and the dialog/warning_button opening DialogScreen.WarningScreen ("Custom screen rejected" on disconnect).
  • Clicking a link follows Screen.clickUrlAction: ignored when "Web Links" is off, ConfirmLinkScreen (untrusted, with Copy Link to Clipboard) when "Prompt on Links" is on — chatLinksPrompt is now a real setting and chat option — or the system browser directly.
  • A dedicated server sends its bug-report-link server.properties value as the BUG_REPORT link in configuration (ServerConfigurationPacketListenerImpl.startConfiguration); LAN and integrated worlds send none, matching vanilla.

Test plan

  • cargo test -p horizon-protocol (packet round-trips)
  • cargo test -p horizon-client --bin horizon-client (pause-menu layout + URI validation unit tests)
  • cargo clippy -p horizon-client --bins clean
  • in-game check: pause → Server Links on a server that sends links (no test server available)

🤖 Generated with Devin


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/horizon-rust/horizon/pull/2302 **Author:** [@socksprox](https://github.com/socksprox) **Created:** 10/26/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/server-links` --- ### 📝 Commits (1) - [`b37528f`](https://github.com/horizon-rust/horizon/commit/b37528f5d6e1f87ff59fdf40763c9ae3ce9f9cc1) Pause menu: server links ### 📊 Changes **15 files changed** (+726 additions, -18 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+32 -0) 📝 `crates/horizon-client/src/game/agent.rs` (+3 -0) 📝 `crates/horizon-client/src/game/control.rs` (+3 -0) 📝 `crates/horizon-client/src/game/dedicated.rs` (+16 -0) 📝 `crates/horizon-client/src/game/packs.rs` (+4 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+9 -0) 📝 `crates/horizon-client/src/game/screens.rs` (+74 -17) ➕ `crates/horizon-client/src/game/server_links.rs` (+487 -0) 📝 `crates/horizon-client/src/lan/conn.rs` (+10 -0) 📝 `crates/horizon-client/src/lan/mod.rs` (+5 -0) 📝 `crates/horizon-client/src/net.rs` (+9 -0) 📝 `crates/horizon-client/src/options_ui.rs` (+5 -0) 📝 `crates/horizon-client/src/settings.rs` (+4 -0) 📝 `crates/horizon-protocol/src/packets/configuration.rs` (+61 -0) 📝 `crates/horizon-protocol/src/packets/play.rs` (+4 -1) </details> ### 📄 Description > 🤖 Opened by socksprox's AI agent (Devin), not by socksprox himself. ## Summary - `ClientboundServerLinksPacket` decoded in the configuration and play phases (the common packet, with `Either<KnownLinkType, Component>` + link per entry; only `http`/`https` URIs kept, like `Util.parseAndValidateUntrustedUri`). - The pause menu gains the `minecraft:server_links` dialog's "Server Links..." button when the server sent links (`pause_screen_additions` is empty in vanilla, so the button falls back to the links screen). - `ServerLinksDialogScreen`: scrollable 310-wide link buttons (known types labelled `known_server_link.*`, custom labels rendered as components), `gui.back` footer, and the `dialog/warning_button` opening `DialogScreen.WarningScreen` ("Custom screen rejected" on disconnect). - Clicking a link follows `Screen.clickUrlAction`: ignored when "Web Links" is off, `ConfirmLinkScreen` (untrusted, with Copy Link to Clipboard) when "Prompt on Links" is on — `chatLinksPrompt` is now a real setting and chat option — or the system browser directly. - A dedicated server sends its `bug-report-link` `server.properties` value as the `BUG_REPORT` link in configuration (`ServerConfigurationPacketListenerImpl.startConfiguration`); LAN and integrated worlds send none, matching vanilla. #### Test plan - [x] `cargo test -p horizon-protocol` (packet round-trips) - [x] `cargo test -p horizon-client --bin horizon-client` (pause-menu layout + URI validation unit tests) - [x] `cargo clippy -p horizon-client --bins` clean - [ ] in-game check: pause → Server Links on a server that sends links (no test server available) 🤖 Generated with [Devin](https://devin.ai) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:15:19 +07:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
horizon-rust/horizon#4187
No description provided.