[PR #808] [MERGED] Server titles: /title reaches the guest, and its HUD shows and clears them #2826

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

📋 Pull Request Information

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

Base: main ← Head: fix/server-titles


📝 Commits (1)

  • c12f5cf Server titles: /title reaches the guest, and its HUD shows and clears them

📊 Changes

5 files changed (+80 additions, -36 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+3 -0)
📝 crates/horizon-client/src/game/commands/text_commands.rs (+34 -9)
📝 crates/horizon-client/src/game/lan_actions.rs (+3 -0)
📝 crates/horizon-client/src/game/remote.rs (+21 -25)
📝 tools/lan_e2e.py (+19 -2)

📄 Description

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

What

/title now works for guests and for single player on its server thread: the title, subtitle and action bar show and clear as in vanilla. Another of the server-thread gaps listed in #731.

  • Server.
    • Vanilla's TitleCommand sends each target ClientboundSetTitleText, SetSubtitleText or SetActionBarText, SetTitlesAnimation (times), or ClearTitles (clear, or reset with the times reset).
    • A guest's /title only changed the server's own HUD, so nothing reached the guest. On the server thread, the window's own player is a guest too.
    • While a guest acts, the command now queues the packet. as_guest sends it to that guest once the action returns, before the command's feedback, as vanilla orders them.
  • Remote client (ClientPacketListener.setTitleText, setSubtitleText, setActionBarText, setTitlesAnimation, handleTitlesClear, ChatListener.handleOverlay):
    • Before, it drew the title and the action bar as one bare line for 3 seconds, and ignored subtitles, times and clearing.
    • These packets, and SystemChat overlays, now feed the HUD's Titles, the same state and drawing as in single player.
    • tick_remote now runs Gui.tick's part (tick_hud), so titles fade on the server's times. The held item's name shows when the hotbar slot changes, as in vanilla.

Proof

New tools/lan_e2e.py check titles. The guest runs:

  • title @s times 10 400 10;
  • title @s subtitle "Under";
  • title @s title "Over";
  • title @s actionbar "Bar".

It then reads its HUD (messages), runs title @s clear and reads it again.

build titles
main FAIL: titles shown: {'title': None, 'subtitle': None, 'actionbar': None}
this branch pass: shown {'title': 'Over', 'subtitle': 'Under', 'actionbar': 'Bar'}, cleared {'title': None, 'subtitle': None}

The guest's screenshot shows the title, subtitle and action bar in vanilla's places and fonts.

Checks

Run on an integration of this PR with #793 and the other perf-ticks-6 branches (chunk ticket levels, guest death health, server titles, ask_server suggestions, dedicated no-mesh), on main ce571f78:

  • cargo fmt --check and cargo clippy --workspace --all-targets -- -D warnings: clean.
  • cargo test -p horizon-client --lib: 851 passed.
  • tools/lan_e2e.py on the integration build: titles, hazards, feedback and commands pass. With --server-thread, titles passes. hazards fails at "no hunger from moving", and it fails the same way on plain main, so this branch did not cause it.
  • tools/parity.py --changed origin/main on the first three branches together, then based on 9b97ba09: 89 passed, 0 failed. chunk_stage and chunk_generation were run on their own as well and passed. The rebase onto ce571f78 had conflicts only in remote.rs and lan_e2e.py, where both sides were kept.

Needs Ludovic

Nothing.

🤖 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/808 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/18/2026 **Status:** ✅ Merged **Merged:** 10/18/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/server-titles` --- ### 📝 Commits (1) - [`c12f5cf`](https://github.com/horizon-rust/horizon/commit/c12f5cf41adfc96551da6715b2f086203e8d7a72) Server titles: /title reaches the guest, and its HUD shows and clears them ### 📊 Changes **5 files changed** (+80 additions, -36 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+3 -0) 📝 `crates/horizon-client/src/game/commands/text_commands.rs` (+34 -9) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+3 -0) 📝 `crates/horizon-client/src/game/remote.rs` (+21 -25) 📝 `tools/lan_e2e.py` (+19 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What `/title` now works for guests and for single player on its server thread: the title, subtitle and action bar show and clear as in vanilla. Another of the server-thread gaps listed in #731. - **Server.** - Vanilla's `TitleCommand` sends each target `ClientboundSetTitleText`, `SetSubtitleText` or `SetActionBarText`, `SetTitlesAnimation` (times), or `ClearTitles` (`clear`, or `reset` with the times reset). - A guest's `/title` only changed the server's own HUD, so nothing reached the guest. On the server thread, the window's own player is a guest too. - While a guest acts, the command now queues the packet. `as_guest` sends it to that guest once the action returns, before the command's feedback, as vanilla orders them. - **Remote client** (`ClientPacketListener.setTitleText`, `setSubtitleText`, `setActionBarText`, `setTitlesAnimation`, `handleTitlesClear`, `ChatListener.handleOverlay`): - Before, it drew the title and the action bar as one bare line for 3 seconds, and ignored subtitles, times and clearing. - These packets, and `SystemChat` overlays, now feed the HUD's `Titles`, the same state and drawing as in single player. - `tick_remote` now runs `Gui.tick`'s part (`tick_hud`), so titles fade on the server's times. The held item's name shows when the hotbar slot changes, as in vanilla. ## Proof New `tools/lan_e2e.py` check `titles`. The guest runs: - `title @s times 10 400 10`; - `title @s subtitle "Under"`; - `title @s title "Over"`; - `title @s actionbar "Bar"`. It then reads its HUD (`messages`), runs `title @s clear` and reads it again. | build | `titles` | |---|---| | main | FAIL: `titles shown: {'title': None, 'subtitle': None, 'actionbar': None}` | | this branch | pass: shown `{'title': 'Over', 'subtitle': 'Under', 'actionbar': 'Bar'}`, cleared `{'title': None, 'subtitle': None}` | The guest's screenshot shows the title, subtitle and action bar in vanilla's places and fonts. ## Checks Run on an integration of this PR with #793 and the other perf-ticks-6 branches (chunk ticket levels, guest death health, server titles, ask_server suggestions, dedicated no-mesh), on main ce571f78: - `cargo fmt --check` and `cargo clippy --workspace --all-targets -- -D warnings`: clean. - `cargo test -p horizon-client --lib`: 851 passed. - `tools/lan_e2e.py` on the integration build: `titles`, `hazards`, `feedback` and `commands` pass. With `--server-thread`, `titles` passes. `hazards` fails at "no hunger from moving", and it fails the same way on plain main, so this branch did not cause it. - `tools/parity.py --changed origin/main` on the first three branches together, then based on 9b97ba09: 89 passed, 0 failed. `chunk_stage` and `chunk_generation` were run on their own as well and passed. The rebase onto ce571f78 had conflicts only in `remote.rs` and `lan_e2e.py`, where both sides were kept. ## Needs Ludovic Nothing. 🤖 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-02 15:59: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#2826
No description provided.