[PR #1577] [MERGED] Fix periods swallowed by debug shortcuts in server address fields #3604

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1577
Author: @RVZO6
Created: 10/24/2026
Status: ✅ Merged
Merged: 10/24/2026
Merged by: @ludovic111

Base: main ← Head: fix/server-text-debug-shortcuts


📝 Commits (3)

  • 094d5c8 fix: let server text fields receive debug-bound characters
  • 1a4a2ec Debug keys: check the title's focused field inline
  • 42714de Merge origin/main into fix/server-text-debug-shortcuts

📊 Changes

1 file changed (+9 additions, -3 deletions)

View changed files

📝 crates/horizon-client/src/game/debug_keys.rs (+9 -3)

📄 Description

What and why

Fix typing in the title screen's server fields when a printable character is bound to the debug modifier or debug overlay. With key.debug.modifier bound to ., the debug handler consumed the period before the server address field could receive it.

  • Give focused title text fields priority over debug shortcuts, including Direct Connection, Add/Edit Server, and Join a Friend.
  • Keep key releases reaching the debug handler, so a modifier held before focus changed is cleared.
  • Add a regression test for press/repeat/release routing and periods in the fields. Unfocused title screens and in-game debug shortcuts keep their existing behavior.

Vanilla reference

Inspected the locally installed vanilla 26.3 KeyboardHandler.keyPress and charTyped bytecode with javap -p -c. Screen input is dispatched before debug handling, and text characters go to the screen's text field. This extends Horizon's existing text-field priority guard to the title screen's fields.

Self-check

Targeted regression test passed. Full client tests: 1,185 passed.

The self-check is not fully green: Rust 1.98 Clippy reports an existing clippy::boxed_local warning in the unchanged crates/horizon-client/src/streaming.rs:644 (receive_decorated). This PR does not change or suppress it. Vanilla parity harnesses were not run locally.

pr_ready (tools/pr_ready.py --quick on [redacted], against origin/main at 7fca3c2f9, 1 min 9 s)

Check Result
Scope ✅ 1 files, +60 −4
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (3 s)
clippy ❌ failed (23 s)
tests: horizon-client ✅ 1185 passed (40 s)
doc tests ✅ 0 passed (1 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

Screenshots

No layout change. This fixes keyboard-event routing; covered by the regression test. An interactive before/after capture has not been made.

🤖 Generated with OpenAI Codex


🔄 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/1577 **Author:** [@RVZO6](https://github.com/RVZO6) **Created:** 10/24/2026 **Status:** ✅ Merged **Merged:** 10/24/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/server-text-debug-shortcuts` --- ### 📝 Commits (3) - [`094d5c8`](https://github.com/horizon-rust/horizon/commit/094d5c8e16c3b3deef2f1b7bb71c7d4b4d213bf2) fix: let server text fields receive debug-bound characters - [`1a4a2ec`](https://github.com/horizon-rust/horizon/commit/1a4a2ec120232937ef6b83e71f26e63ba7097391) Debug keys: check the title's focused field inline - [`42714de`](https://github.com/horizon-rust/horizon/commit/42714deca62827843d0efac55756ab08ae0290b9) Merge origin/main into fix/server-text-debug-shortcuts ### 📊 Changes **1 file changed** (+9 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/debug_keys.rs` (+9 -3) </details> ### 📄 Description ## What and why Fix typing in the title screen's server fields when a printable character is bound to the debug modifier or debug overlay. With `key.debug.modifier` bound to `.`, the debug handler consumed the period before the server address field could receive it. - Give focused title text fields priority over debug shortcuts, including Direct Connection, Add/Edit Server, and Join a Friend. - Keep key releases reaching the debug handler, so a modifier held before focus changed is cleared. - Add a regression test for press/repeat/release routing and periods in the fields. Unfocused title screens and in-game debug shortcuts keep their existing behavior. ## Vanilla reference Inspected the locally installed vanilla 26.3 `KeyboardHandler.keyPress` and `charTyped` bytecode with `javap -p -c`. Screen input is dispatched before debug handling, and text characters go to the screen's text field. This extends Horizon's existing text-field priority guard to the title screen's fields. ## Self-check Targeted regression test passed. Full client tests: **1,185 passed**. The self-check is not fully green: Rust 1.98 Clippy reports an existing `clippy::boxed_local` warning in the unchanged `crates/horizon-client/src/streaming.rs:644` (`receive_decorated`). This PR does not change or suppress it. Vanilla parity harnesses were not run locally. **pr_ready** (`tools/pr_ready.py --quick` on [redacted], against origin/main at 7fca3c2f9, 1 min 9 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +60 −4 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (3 s) | | clippy | ❌ failed (23 s) | | tests: horizon-client | ✅ 1185 passed (40 s) | | doc tests | ✅ 0 passed (1 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | ## Screenshots No layout change. This fixes keyboard-event routing; covered by the regression test. An interactive before/after capture has not been made. 🤖 Generated with [OpenAI Codex](https://openai.com/codex/) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-03 04:10:44 +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#3604
No description provided.