[PR #779] [MERGED] The console's and players' command feedback reaches the operators #2804

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

📋 Pull Request Information

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

Base: main ← Head: fix/broadcast-console-to-ops


📝 Commits (1)

  • 209b898 The console's and players' command feedback reaches the operators

📊 Changes

9 files changed (+313 additions, -29 deletions)

View changed files

📝 crates/horizon-client/src/game.rs (+5 -0)
📝 crates/horizon-client/src/game/commands.rs (+47 -15)
📝 crates/horizon-client/src/game/dedicated.rs (+51 -4)
📝 crates/horizon-client/src/game/lan.rs (+4 -0)
📝 crates/horizon-client/src/game/lan_actions.rs (+14 -5)
📝 crates/horizon-client/src/text.rs (+12 -0)
📝 mods/horizon/src/test/java/dev/horizonlab/parity/LocatorBarClient.java (+11 -3)
📝 tools/lan_e2e.py (+7 -2)
➕ tools/test_server_ops_feedback_parity.py (+162 -0)

📄 Description

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

What

Covers CommandSourceStack.broadcastToAdmins beyond a guest on a dedicated server (#734):

  • broadcast-console-to-ops: the dedicated server's console tells every operator what its commands did, as [Server: ...] (gray, italic), while the setting is on (DedicatedServer.shouldInformAdmins). This covers:

    • the game's commands;
    • the dedicated-only replies vanilla sends with broadcast: op, deop, ban, ban-ip, pardon, pardon-ip, kick, whitelist add/remove/on/off/reload, save-all's success, save-on/off and stop.

    Queries and lists stay with the console. With the setting off, the operators hear nothing.

  • LAN:

    • The host is an operator when its world or the LAN allows commands (PlayerList.isOp). It now hears of its guests' commands as [Guest: ...].
    • Operator guests hear of the host's commands.
  • A player's name in the line is now their display name, as Player.getDisplayName gives it: the /tell suggestion, the entity hover and the insertion. Before, it was plain text.

Why

server-host-5, item 3. Server owners rely on the console's feedback reaching their ops (vanilla's default), and a LAN host should see what its guests do with commands.

How tested

  • New harness tools/test_server_ops_feedback_parity.py:
    • A vanilla dedicated server and Horizon's serve the same world, with Alice and Bob as operators. LocatorBarClient (now able to record system chat) joins them both and records each one's system chat, step by step, while:
      • the console sets the time and asks the difficulty (a query: nobody is told);
      • the console whitelists Alice, deops Bob (he stops hearing) and ops him again;
      • Alice runs a command with Bob deopped, then with Bob an operator;
      • send_command_feedback goes off and back on, and the console runs save-all.
    • The same again with broadcast-console-to-ops=false.
    • Result: server ops feedback: 17 chat lines identical.
    • Before: Horizon sent the operators none of the console's lines, and Alice's name came without its click, hover and insertion.
  • tools/lan_e2e.py --check feedback now also asserts that the host's chat shows [Guest: Teleported Guest to …]. PASS.
cargo fmt --all --check                                         ok
cargo clippy -p horizon-client --all-targets -- -D warnings     ok
tools/test_server_ops_feedback_parity.py                        17 chat lines identical
tools/lan_e2e.py --check feedback                               PASS
tools/parity.py --changed origin/main                           running; results follow in a comment

Not covered

The host's own name in its broadcasts to guests is plain text, without the hover and insertion.

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/779 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/17/2026 **Status:** ✅ Merged **Merged:** 10/18/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/broadcast-console-to-ops` --- ### 📝 Commits (1) - [`209b898`](https://github.com/horizon-rust/horizon/commit/209b898c029a9161f232392c2d9dd775d0cd5069) The console's and players' command feedback reaches the operators ### 📊 Changes **9 files changed** (+313 additions, -29 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game.rs` (+5 -0) 📝 `crates/horizon-client/src/game/commands.rs` (+47 -15) 📝 `crates/horizon-client/src/game/dedicated.rs` (+51 -4) 📝 `crates/horizon-client/src/game/lan.rs` (+4 -0) 📝 `crates/horizon-client/src/game/lan_actions.rs` (+14 -5) 📝 `crates/horizon-client/src/text.rs` (+12 -0) 📝 `mods/horizon/src/test/java/dev/horizonlab/parity/LocatorBarClient.java` (+11 -3) 📝 `tools/lan_e2e.py` (+7 -2) ➕ `tools/test_server_ops_feedback_parity.py` (+162 -0) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What Covers `CommandSourceStack.broadcastToAdmins` beyond a guest on a dedicated server (#734): - **`broadcast-console-to-ops`:** the dedicated server's console tells every operator what its commands did, as `[Server: ...]` (gray, italic), while the setting is on (`DedicatedServer.shouldInformAdmins`). This covers: - the game's commands; - the dedicated-only replies vanilla sends with `broadcast`: op, deop, ban, ban-ip, pardon, pardon-ip, kick, whitelist add/remove/on/off/reload, save-all's success, save-on/off and stop. Queries and lists stay with the console. With the setting off, the operators hear nothing. - **LAN:** - The host is an operator when its world or the LAN allows commands (`PlayerList.isOp`). It now hears of its guests' commands as `[Guest: ...]`. - Operator guests hear of the host's commands. - **A player's name** in the line is now their display name, as `Player.getDisplayName` gives it: the `/tell` suggestion, the entity hover and the insertion. Before, it was plain text. ## Why server-host-5, item 3. Server owners rely on the console's feedback reaching their ops (vanilla's default), and a LAN host should see what its guests do with commands. ## How tested - New harness `tools/test_server_ops_feedback_parity.py`: - A vanilla dedicated server and Horizon's serve the same world, with Alice and Bob as operators. `LocatorBarClient` (now able to record system chat) joins them both and records each one's system chat, step by step, while: - the console sets the time and asks the difficulty (a query: nobody is told); - the console whitelists Alice, deops Bob (he stops hearing) and ops him again; - Alice runs a command with Bob deopped, then with Bob an operator; - `send_command_feedback` goes off and back on, and the console runs `save-all`. - The same again with `broadcast-console-to-ops=false`. - **Result: `server ops feedback: 17 chat lines identical`.** - Before: Horizon sent the operators none of the console's lines, and Alice's name came without its click, hover and insertion. - `tools/lan_e2e.py --check feedback` now also asserts that the host's chat shows `[Guest: Teleported Guest to …]`. **PASS.** ``` cargo fmt --all --check ok cargo clippy -p horizon-client --all-targets -- -D warnings ok tools/test_server_ops_feedback_parity.py 17 chat lines identical tools/lan_e2e.py --check feedback PASS tools/parity.py --changed origin/main running; results follow in a comment ``` ## Not covered The host's own name in its broadcasts to guests is plain text, without the hover and insertion. ## 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:11 +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#2804
No description provided.