[PR #459] [MERGED] Keep chat arrow keys from turning the camera #2582

Closed
opened 2026-11-02 15:57:22 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/459
Author: @LookImEcho-Rick
Created: 10/16/2026
Status: ✅ Merged
Merged: 10/16/2026
Merged by: @ludovic111

Base: main ← Head: codex/chat-arrow-history


📝 Commits (1)

  • f2bbd6e Keep arrow-key camera controls out of chat and menus

📊 Changes

2 files changed (+45 additions, -8 deletions)

View changed files

📝 crates/horizon-client/src/chat_tests.rs (+29 -0)
📝 crates/horizon-client/src/game.rs (+16 -8)

📄 Description

What and why

Fixes #458.

With singleplayer chat open, holding Up/Down also rotated the camera because the redraw handler read the same held keys used by chat history. Limit arrow-key camera rotation to gameplay with no title, sign editor, book or remote chat open. Chat's existing history and command-suggestion handlers retain their behavior.

Add a regression test for navigating older/newer messages, clamping at history boundaries, and restoring an unfinished draft.

Vanilla reference

ChatScreen.keyPressed / moveInHistory: Up/Down navigate sent history, or command suggestions when active. The existing tools/test_chat_screen_parity.py and VanillaChatScreenOracle cover that input behavior. The arrow-key camera control is a Horizon accessibility/testing feature; this change limits when it runs.

The repository-local pinned client jar is absent, so tools/rea_vanilla.py method net.minecraft.client.gui.screens.ChatScreen keyPressed could not run. No vanilla bytecode inspection or parity run is claimed.

Self-check

Passed on Windows:

  • Reporter tested the compiled fix in an isolated singleplayer ChatArrowTest world and confirmed it works.
  • cargo test -p horizon-client --lib history_arrows_recall_messages_and_restore_the_draft --locked (1 passed).
  • cargo build -p horizon-client --bin horizon-client --locked; the built game launched successfully.
  • cargo clippy -p horizon-client --lib --bin horizon-client --locked -- -D warnings.
  • cargo fmt --all -- --check.
  • git diff --check.
  • python tools/check_public_tree.py.

python tools/pr_ready.py --base origin/main failed before producing its summary block:

AttributeError: module 'os' has no attribute 'uname'
  tools/parity.py:64

Full workspace tests and the vanilla parity harness remain unverified. No screenshots were captured; this is keyboard/camera behavior verified by the reporter in game.


🔄 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/459 **Author:** [@LookImEcho-Rick](https://github.com/LookImEcho-Rick) **Created:** 10/16/2026 **Status:** ✅ Merged **Merged:** 10/16/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `codex/chat-arrow-history` --- ### 📝 Commits (1) - [`f2bbd6e`](https://github.com/horizon-rust/horizon/commit/f2bbd6e3dcf99226e19292cf249973163aea1caa) Keep arrow-key camera controls out of chat and menus ### 📊 Changes **2 files changed** (+45 additions, -8 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/chat_tests.rs` (+29 -0) 📝 `crates/horizon-client/src/game.rs` (+16 -8) </details> ### 📄 Description ## What and why Fixes #458. With singleplayer chat open, holding Up/Down also rotated the camera because the redraw handler read the same held keys used by chat history. Limit arrow-key camera rotation to gameplay with no title, sign editor, book or remote chat open. Chat's existing history and command-suggestion handlers retain their behavior. Add a regression test for navigating older/newer messages, clamping at history boundaries, and restoring an unfinished draft. ## Vanilla reference `ChatScreen.keyPressed` / `moveInHistory`: Up/Down navigate sent history, or command suggestions when active. The existing `tools/test_chat_screen_parity.py` and `VanillaChatScreenOracle` cover that input behavior. The arrow-key camera control is a Horizon accessibility/testing feature; this change limits when it runs. The repository-local pinned client jar is absent, so `tools/rea_vanilla.py method net.minecraft.client.gui.screens.ChatScreen keyPressed` could not run. No vanilla bytecode inspection or parity run is claimed. ## Self-check Passed on Windows: - Reporter tested the compiled fix in an isolated singleplayer `ChatArrowTest` world and confirmed it works. - `cargo test -p horizon-client --lib history_arrows_recall_messages_and_restore_the_draft --locked` (1 passed). - `cargo build -p horizon-client --bin horizon-client --locked`; the built game launched successfully. - `cargo clippy -p horizon-client --lib --bin horizon-client --locked -- -D warnings`. - `cargo fmt --all -- --check`. - `git diff --check`. - `python tools/check_public_tree.py`. `python tools/pr_ready.py --base origin/main` failed before producing its summary block: ```text AttributeError: module 'os' has no attribute 'uname' tools/parity.py:64 ``` Full workspace tests and the vanilla parity harness remain unverified. No screenshots were captured; this is keyboard/camera behavior verified by the reporter in game. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-11-02 15:57:22 +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#2582
No description provided.