[PR #1735] [MERGED] Server dialogs: text and boolean inputs (AuthMe's register and login work) #3728

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

📋 Pull Request Information

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

Base: main ← Head: feat/server-dialog-inputs


📝 Commits (9)

  • 1d90d72 Server dialogs: the packets and the dialog model
  • a7f8650 Server dialogs: the dialog screen, its buttons and their actions
  • 36f68ab Server dialogs: text and boolean inputs
  • 49dd31d Merge origin/main into feat/server-dialogs
  • 330a520 Merge feat/server-dialogs into feat/server-dialog-screen
  • ec2f1b2 Merge feat/server-dialog-screen into feat/server-dialog-inputs
  • b222dd9 Merge origin/main into feat/server-dialogs
  • a1ffa1a Merge feat/server-dialogs into feat/server-dialog-screen
  • 0c73bb3 Merge feat/server-dialog-screen into feat/server-dialog-inputs

📊 Changes

12 files changed (+2184 additions, -6 deletions)

View changed files

➕ crates/horizon-client/src/dialog.rs (+794 -0)
➕ crates/horizon-client/src/dialog_screen.rs (+382 -0)
📝 crates/horizon-client/src/game.rs (+24 -2)
📝 crates/horizon-client/src/game/agent.rs (+4 -0)
📝 crates/horizon-client/src/game/control.rs (+12 -1)
➕ crates/horizon-client/src/game/dialogs.rs (+611 -0)
📝 crates/horizon-client/src/game/remote.rs (+8 -0)
📝 crates/horizon-client/src/lib.rs (+2 -0)
📝 crates/horizon-client/src/net.rs (+30 -0)
📝 crates/horizon-protocol/src/packets/configuration.rs (+52 -0)
📝 crates/horizon-protocol/src/packets/play.rs (+60 -3)
➕ tools/server_e2e.py (+205 -0)

📄 Description

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

Stacked on #1734 (dialog screen), which is stacked on #1720. Its base is feat/server-dialog-screen. Third of three.

What players see

A server's dialog shows its text and boolean inputs, and what the player types or ticks goes back to the server. AuthMe's register and login dialogs now work: the player types the password into both fields, clicks Register (or Login), and joins. Before, Horizon showed nothing and AuthMe kicked the player after 30 s.

Vanilla

  • A text input is an EditBox with the dialog's width, max length and initial value. With label_visible, it goes under its label, 4 apart, both left-aligned (CommonLayouts.labeledElement).
  • A boolean input is a Checkbox: a 17 px box, its label 4 to the right.
  • A click focuses a box or toggles a checkbox. Tab and Shift+Tab move between the text inputs, and keys, edit shortcuts and typed text go to the focused one.
  • Their values fill dynamic/run_command templates and dynamic/custom payloads (#1720's model).

single_option and number_range inputs, item bodies and multiline text are still missing. They are left out of the layout.

Change

  • dialog_screen.rs: the input parts of the layout.
  • game/dialogs.rs: edit boxes, focus, Tab, typing, checkboxes, and the values the actions read.
  • horizon-ctl: type types into the focused input (the first one if none is focused), in configuration too.
  • tools/server_e2e.py, check dialog: the dialog now has a number text input and an agree boolean.
    • The check types 4, ticks the box and clicks the template button: trigger answer set $(number)$(agree), so the server must report 41.
    • The custom action's payload must hold agree:1b, number:"4" and tag:"x".

Evidence

  • python3 tools/server_e2e.py --check dialog:
    • before (#1734's head): FAIL, type 4: type needs the chat screen … (no input to type into)
    • after: PASS (trigger: 41, custom: {agree:1b,number:"4",tag:"x"})
  • AuthMe 6.0.1 on Paper 26.3 behind Velocity 4.3.0, offline mode, plugin defaults with its pre-join dialogs:
    • a new player registers through the dialog ([AuthMe] Fin1967 registered, logged in) and is still playing after the 30 s timeout;
    • a returning player logs in through the one-field Login dialog.

Self-check

pr_ready (tools/pr_ready.py --base origin/feat/server-dialog-screen on the Mac mini, 56 min, run on this commit before a rebase onto #1734's final head)

Check Result
Scope ✅ 4 files, +265 −15
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ❌ errors=2. The same 2 fail on main on macOS: OracleReuseTests.test_reuses_until_an_input_or_output_changes (fake java exits 127) and ParityRunnerTests.test_report_rejects_sources_changed_during_a_run (/private/var vs /var)
rustfmt / clippy ✅
tests: horizon-client ✅ 1207 passed
Parity ✅ 27 affected, 27 passed

After the rebase (dialog_key takes a key code, so horizon-ctl's key reaches the inputs): clippy -D warnings is clean, and server_e2e --check dialog and the AuthMe run above pass on the new head.

Label feature.

🤖 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/1735 **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-dialog-inputs` --- ### 📝 Commits (9) - [`1d90d72`](https://github.com/horizon-rust/horizon/commit/1d90d72a64418071f943e404166fa39b09f50981) Server dialogs: the packets and the dialog model - [`a7f8650`](https://github.com/horizon-rust/horizon/commit/a7f8650c6b78f140fc0ea8f01bf4f0ecf9387690) Server dialogs: the dialog screen, its buttons and their actions - [`36f68ab`](https://github.com/horizon-rust/horizon/commit/36f68ab8388a615ade371796231fa2ddc9573afc) Server dialogs: text and boolean inputs - [`49dd31d`](https://github.com/horizon-rust/horizon/commit/49dd31d36fd43c50a8a9804eeed09264abfaa7c6) Merge origin/main into feat/server-dialogs - [`330a520`](https://github.com/horizon-rust/horizon/commit/330a5205aeebe66bea95fe28b3f77d9dd6af47e4) Merge feat/server-dialogs into feat/server-dialog-screen - [`ec2f1b2`](https://github.com/horizon-rust/horizon/commit/ec2f1b2a0cff16a2f4cc69c781686831041c0181) Merge feat/server-dialog-screen into feat/server-dialog-inputs - [`b222dd9`](https://github.com/horizon-rust/horizon/commit/b222dd91947c136c11252ba7c69187b445bf5f8a) Merge origin/main into feat/server-dialogs - [`a1ffa1a`](https://github.com/horizon-rust/horizon/commit/a1ffa1ac11042074271c2ea9e12f9293ae313aa7) Merge feat/server-dialogs into feat/server-dialog-screen - [`0c73bb3`](https://github.com/horizon-rust/horizon/commit/0c73bb3c90e21b3fd857c774272fd3269b9eeba3) Merge feat/server-dialog-screen into feat/server-dialog-inputs ### 📊 Changes **12 files changed** (+2184 additions, -6 deletions) <details> <summary>View changed files</summary> ➕ `crates/horizon-client/src/dialog.rs` (+794 -0) ➕ `crates/horizon-client/src/dialog_screen.rs` (+382 -0) 📝 `crates/horizon-client/src/game.rs` (+24 -2) 📝 `crates/horizon-client/src/game/agent.rs` (+4 -0) 📝 `crates/horizon-client/src/game/control.rs` (+12 -1) ➕ `crates/horizon-client/src/game/dialogs.rs` (+611 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+8 -0) 📝 `crates/horizon-client/src/lib.rs` (+2 -0) 📝 `crates/horizon-client/src/net.rs` (+30 -0) 📝 `crates/horizon-protocol/src/packets/configuration.rs` (+52 -0) 📝 `crates/horizon-protocol/src/packets/play.rs` (+60 -3) ➕ `tools/server_e2e.py` (+205 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. **Stacked on #1734** (dialog screen), which is stacked on #1720. Its base is `feat/server-dialog-screen`. Third of three. ## What players see A server's dialog shows its text and boolean inputs, and what the player types or ticks goes back to the server. **AuthMe's register and login dialogs now work**: the player types the password into both fields, clicks Register (or Login), and joins. Before, Horizon showed nothing and AuthMe kicked the player after 30 s. ## Vanilla - A `text` input is an `EditBox` with the dialog's width, max length and initial value. With `label_visible`, it goes under its label, 4 apart, both left-aligned (`CommonLayouts.labeledElement`). - A `boolean` input is a `Checkbox`: a 17 px box, its label 4 to the right. - A click focuses a box or toggles a checkbox. Tab and Shift+Tab move between the text inputs, and keys, edit shortcuts and typed text go to the focused one. - Their values fill `dynamic/run_command` templates and `dynamic/custom` payloads (#1720's model). `single_option` and `number_range` inputs, item bodies and multiline text are still missing. They are left out of the layout. ## Change - `dialog_screen.rs`: the input parts of the layout. - `game/dialogs.rs`: edit boxes, focus, Tab, typing, checkboxes, and the values the actions read. - horizon-ctl: `type` types into the focused input (the first one if none is focused), in configuration too. - `tools/server_e2e.py`, check `dialog`: the dialog now has a `number` text input and an `agree` boolean. - The check types `4`, ticks the box and clicks the template button: `trigger answer set $(number)$(agree)`, so the server must report 41. - The custom action's payload must hold `agree:1b`, `number:"4"` and `tag:"x"`. ## Evidence - `python3 tools/server_e2e.py --check dialog`: - before (#1734's head): FAIL, `type 4: type needs the chat screen …` (no input to type into) - after: PASS (`trigger: 41`, `custom: {agree:1b,number:"4",tag:"x"}`) - AuthMe 6.0.1 on Paper 26.3 behind Velocity 4.3.0, offline mode, plugin defaults with its pre-join dialogs: - a new player registers through the dialog (`[AuthMe] Fin1967 registered`, `logged in`) and is still playing after the 30 s timeout; - a returning player logs in through the one-field Login dialog. ## Self-check **pr_ready** (`tools/pr_ready.py --base origin/feat/server-dialog-screen` on the Mac mini, 56 min, run on this commit before a rebase onto #1734's final head) | Check | Result | | --- | --- | | Scope | ✅ 4 files, +265 −15 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ❌ errors=2. The same 2 fail on `main` on macOS: `OracleReuseTests.test_reuses_until_an_input_or_output_changes` (fake `java` exits 127) and `ParityRunnerTests.test_report_rejects_sources_changed_during_a_run` (`/private/var` vs `/var`) | | rustfmt / clippy | ✅ | | tests: horizon-client | ✅ 1207 passed | | Parity | ✅ 27 affected, 27 passed | After the rebase (`dialog_key` takes a key code, so horizon-ctl's `key` reaches the inputs): clippy `-D warnings` is clean, and `server_e2e --check dialog` and the AuthMe run above pass on the new head. Label `feature`. 🤖 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:46 +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#3728
No description provided.