[PR #1720] [MERGED] Server dialogs: the packets and the dialog model #3714

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

📋 Pull Request Information

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

Base: main ← Head: feat/server-dialogs


📝 Commits (3)

  • 1d90d72 Server dialogs: the packets and the dialog model
  • 49dd31d Merge origin/main into feat/server-dialogs
  • b222dd9 Merge origin/main into feat/server-dialogs

📊 Changes

4 files changed (+907 additions, -3 deletions)

View changed files

➕ crates/horizon-client/src/dialog.rs (+794 -0)
📝 crates/horizon-client/src/lib.rs (+1 -0)
📝 crates/horizon-protocol/src/packets/configuration.rs (+52 -0)
📝 crates/horizon-protocol/src/packets/play.rs (+60 -3)

📄 Description

🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself.

First of three stacked PRs that bring servers' dialogs to Horizon. AuthMe's register and login dialogs are what make it urgent: today players see nothing, and AuthMe kicks them after 30 s ("Login timeout exceeded").

  1. This PR: the packets and the dialog model. Nothing is drawn yet.
  2. feat/server-dialog-screen: the dialog screen, its buttons and their actions, plus a new tools/server_e2e.py harness (vanilla 26.3 dedicated server and one Horizon client).
  3. feat/server-dialog-inputs: text and boolean inputs. With it, AuthMe works.

Vanilla

  • Packets. Configuration has show_dialog (direct NBT) and clear_dialog. Play has show_dialog (a Holder<Dialog>: varint 0 then the dialog's NBT, or registry id + 1) and clear_dialog. Both states have the serverbound custom_click_action: an identifier, then a length-prefixed (≤ 65536) optional tag, with End meaning none.
  • Dialogs. The Dialog codecs, from CommonDialogData: title, external_title, can_close_with_escape, pause, after_action, the body (plain messages, items) and the inputs.
    • Kinds: notice, confirmation, multi_action, server_links, dialog_list.
    • Inputs: text, boolean, single_option, number_range.
    • Actions: static click events; dynamic/run_command (a $(key) template filled with each input's escaped substitution); dynamic/custom (an id, and a payload of the additions plus each input's tag).

Change

  • horizon-protocol: the packets above, with round-trip tests, plus a byte test of the click payload's prefix.
  • horizon-client/src/dialog.rs: Dialog::parse, button lists per kind, Action::click (templates, payloads, number formatting as Java's), and a JSON summary for horizon-ctl, with unit tests.

Self-check

pr_ready (tools/pr_ready.py on the Mac mini, against origin/main at 4bb7f96f8, 73 min)

Check Result
Scope ⚠️ 4 files, +905 −2. Over 500, but most of it is the model of every vanilla dialog kind, input and action, plus its tests. The screen comes in the next PR
Cargo.lock ✅ unchanged
Public tree ✅
rustfmt / clippy ✅
tests: horizon-client, horizon-protocol ✅ 1291 passed
Parity ✅ 108 affected, 108 passed

Label skip-release: players see no change until the screen lands.

🤖 Generated with Claude Code


🔄 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/1720 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/25/2026 **Status:** ✅ Merged **Merged:** 10/26/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/server-dialogs` --- ### 📝 Commits (3) - [`1d90d72`](https://github.com/horizon-rust/horizon/commit/1d90d72a64418071f943e404166fa39b09f50981) Server dialogs: the packets and the dialog model - [`49dd31d`](https://github.com/horizon-rust/horizon/commit/49dd31d36fd43c50a8a9804eeed09264abfaa7c6) Merge origin/main into feat/server-dialogs - [`b222dd9`](https://github.com/horizon-rust/horizon/commit/b222dd91947c136c11252ba7c69187b445bf5f8a) Merge origin/main into feat/server-dialogs ### 📊 Changes **4 files changed** (+907 additions, -3 deletions) <details> <summary>View changed files</summary> ➕ `crates/horizon-client/src/dialog.rs` (+794 -0) 📝 `crates/horizon-client/src/lib.rs` (+1 -0) 📝 `crates/horizon-protocol/src/packets/configuration.rs` (+52 -0) 📝 `crates/horizon-protocol/src/packets/play.rs` (+60 -3) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. First of three stacked PRs that bring servers' dialogs to Horizon. AuthMe's register and login dialogs are what make it urgent: today players see nothing, and AuthMe kicks them after 30 s ("Login timeout exceeded"). 1. **This PR**: the packets and the dialog model. Nothing is drawn yet. 2. `feat/server-dialog-screen`: the dialog screen, its buttons and their actions, plus a new `tools/server_e2e.py` harness (vanilla 26.3 dedicated server and one Horizon client). 3. `feat/server-dialog-inputs`: text and boolean inputs. With it, AuthMe works. ## Vanilla - **Packets.** Configuration has `show_dialog` (direct NBT) and `clear_dialog`. Play has `show_dialog` (a `Holder<Dialog>`: varint 0 then the dialog's NBT, or registry id + 1) and `clear_dialog`. Both states have the serverbound `custom_click_action`: an identifier, then a length-prefixed (≤ 65536) optional tag, with `End` meaning none. - **Dialogs.** The `Dialog` codecs, from `CommonDialogData`: `title`, `external_title`, `can_close_with_escape`, `pause`, `after_action`, the `body` (plain messages, items) and the `inputs`. - Kinds: notice, confirmation, multi_action, server_links, dialog_list. - Inputs: `text`, `boolean`, `single_option`, `number_range`. - Actions: static click events; `dynamic/run_command` (a `$(key)` template filled with each input's escaped substitution); `dynamic/custom` (an id, and a payload of the additions plus each input's tag). ## Change - `horizon-protocol`: the packets above, with round-trip tests, plus a byte test of the click payload's prefix. - `horizon-client/src/dialog.rs`: `Dialog::parse`, button lists per kind, `Action::click` (templates, payloads, number formatting as Java's), and a JSON summary for horizon-ctl, with unit tests. ## Self-check **pr_ready** (`tools/pr_ready.py` on the Mac mini, against origin/main at 4bb7f96f8, 73 min) | Check | Result | | --- | --- | | Scope | ⚠️ 4 files, +905 −2. Over 500, but most of it is the model of every vanilla dialog kind, input and action, plus its tests. The screen comes in the next PR | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | rustfmt / clippy | ✅ | | tests: horizon-client, horizon-protocol | ✅ 1291 passed | | Parity | ✅ 108 affected, 108 passed | Label `skip-release`: players see no change until the screen lands. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:11:37 +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#3714
No description provided.