[PR #880] [MERGED] Remote client: feed its chat lines to the agent's event log #2883

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

📋 Pull Request Information

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

Base: main ← Head: fix/remote-chat-events


📝 Commits (1)

  • 164f1df Feed a remote client's chat lines to the agent's event log

📊 Changes

3 files changed (+37 additions, -5 deletions)

View changed files

📝 crates/horizon-client/src/game/events.rs (+18 -3)
📝 crates/horizon-client/src/game/remote.rs (+4 -0)
📝 tools/lan_e2e.py (+15 -2)

📄 Description

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

Part of #731 (making the server thread the default): "remote chat lines feed the agent's event log (wait-for chat)".

What was wrong

A remote client keeps the server's chat lines in its own list (Remote::chat). That covers a guest, and on the server thread the host window too. The control socket's event log only counted the local chat's lines (ui.chat.received), so wait-for chat TEXT timed out on every remote client.

Fix

  • Remote counts the lines it receives (chat_received).
  • While connected, the event snapshot reads that count and takes the new lines from the remote list, newest first, as diff expects.
  • The count difference saturates, because joining or leaving starts another count.

Checks

Check Without the fix With the fix
By hand on the server thread: chat hello from the owner, then wait-for chat hello from the owner --since 0 timed out after 10 s ok in 0.01 s
New lan_e2e chat check, --server-thread not run PASS (guest and host)
New lan_e2e chat check, in-frame not run PASS (guest)
  • lan_e2e titles also PASS on the server thread.
  • The event unit tests pass.
  • Workspace clippy -D warnings and fmt are clean.

Per the coordinator, I skipped parity.py --changed; CI parity covers the other harnesses.

🤖 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/880 **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/remote-chat-events` --- ### 📝 Commits (1) - [`164f1df`](https://github.com/horizon-rust/horizon/commit/164f1dfd524deaa35cd9698bcf8adde60dd95f1c) Feed a remote client's chat lines to the agent's event log ### 📊 Changes **3 files changed** (+37 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/events.rs` (+18 -3) 📝 `crates/horizon-client/src/game/remote.rs` (+4 -0) 📝 `tools/lan_e2e.py` (+15 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Part of #731 (making the server thread the default): "remote chat lines feed the agent's event log (`wait-for chat`)". ## What was wrong A remote client keeps the server's chat lines in its own list (`Remote::chat`). That covers a guest, and on the server thread the host window too. The control socket's event log only counted the local chat's lines (`ui.chat.received`), so `wait-for chat TEXT` timed out on every remote client. ## Fix - `Remote` counts the lines it receives (`chat_received`). - While connected, the event snapshot reads that count and takes the new lines from the remote list, newest first, as `diff` expects. - The count difference saturates, because joining or leaving starts another count. ## Checks | Check | Without the fix | With the fix | | --- | --- | --- | | By hand on the server thread: `chat hello from the owner`, then `wait-for chat hello from the owner --since 0` | timed out after 10 s | `ok` in 0.01 s | | New lan_e2e `chat` check, `--server-thread` | not run | PASS (guest and host) | | New lan_e2e `chat` check, in-frame | not run | PASS (guest) | - lan_e2e `titles` also PASS on the server thread. - The event unit tests pass. - Workspace clippy `-D warnings` and fmt are clean. Per the coordinator, I skipped `parity.py --changed`; CI parity covers the other harnesses. 🤖 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:50 +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#2883
No description provided.