[PR #5190] [MERGED] horizon-server console: attach to the running server #6130

Closed
opened 2026-11-03 06:12:49 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: server-admin/console


📝 Commits (1)

  • fd091af horizon-server console: attach to the running server

📊 Changes

8 files changed (+222 additions, -5 deletions)

View changed files

📝 crates/horizon-server/src/api.rs (+34 -0)
➕ crates/horizon-server/src/console.rs (+162 -0)
📝 crates/horizon-server/src/main.rs (+4 -0)
📝 docs/api/server-reference.md (+2 -0)
📝 docs/api/server.md (+3 -2)
📝 docs/hosting.md (+1 -0)
📝 docs/server.md (+3 -2)
📝 tools/server_admin_e2e.py (+13 -1)

📄 Description

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

Roadmap server-admin, part 4: horizon-server console, the text interface docs/server.md section 5 planned. Builds on #5186 (the event stream, merged); rebased on main after #5166.

  • Attach to the running server: the last 30 log lines, then every new one as it happens (through the control API's event stream, so it works like any other client and can attach and detach freely).
  • On a terminal, line 1 is a header refreshed every second (an ANSI scroll region keeps the log under it; no TUI framework):
    Horizon server 0.1.0 · running · 20.0 TPS · 3.2 ms/tick · 2/20 players · 512 MB
  • Each line typed runs as a console command; what it says shows in the log. Ctrl-D detaches and leaves the server running. When stdout isn't a terminal: plain lines, no header.

Tests: the header line (unit); tools/server_admin_e2e.py attaches through a pipe, runs say and list, and checks their lines come back and it detaches. Passed on the Mac mini after the rebase (45 checks).

pr_ready (tools/pr_ready.py on ludovics-mac-mini, against origin/main at d55e66d65, 2 min 23 s)

Check Result
Scope ✅ 8 files, +222 −5
Cargo.lock ✅ unchanged
Public tree ✅ (1 s)
Python tests ✅ 495 passed (1 min 44 s)
rustfmt ✅ (6 s)
clippy ✅ (16 s)
tests: horizon-server ✅ 67 passed (10 s)
doc tests ➖ no library touched
content root tests ➖ content root untouched
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ✅ 1 affected, all passed already with these inputs (2 s)
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

🤖 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/5190 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/31/2026 **Status:** ✅ Merged **Merged:** 10/31/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `server-admin/console` --- ### 📝 Commits (1) - [`fd091af`](https://github.com/horizon-rust/horizon/commit/fd091af76a56d62c7eae43257934214e82401d94) horizon-server console: attach to the running server ### 📊 Changes **8 files changed** (+222 additions, -5 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-server/src/api.rs` (+34 -0) ➕ `crates/horizon-server/src/console.rs` (+162 -0) 📝 `crates/horizon-server/src/main.rs` (+4 -0) 📝 `docs/api/server-reference.md` (+2 -0) 📝 `docs/api/server.md` (+3 -2) 📝 `docs/hosting.md` (+1 -0) 📝 `docs/server.md` (+3 -2) 📝 `tools/server_admin_e2e.py` (+13 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Roadmap `server-admin`, part 4: `horizon-server console`, the text interface docs/server.md section 5 planned. Builds on #5186 (the event stream, merged); rebased on main after #5166. - Attach to the running server: the last 30 log lines, then every new one as it happens (through the control API's event stream, so it works like any other client and can attach and detach freely). - On a terminal, line 1 is a header refreshed every second (an ANSI scroll region keeps the log under it; no TUI framework): `Horizon server 0.1.0 · running · 20.0 TPS · 3.2 ms/tick · 2/20 players · 512 MB` - Each line typed runs as a console command; what it says shows in the log. Ctrl-D detaches and leaves the server running. When stdout isn't a terminal: plain lines, no header. Tests: the header line (unit); `tools/server_admin_e2e.py` attaches through a pipe, runs `say` and `list`, and checks their lines come back and it detaches. Passed on the Mac mini after the rebase (45 checks). **pr_ready** (`tools/pr_ready.py` on ludovics-mac-mini, against origin/main at d55e66d65, 2 min 23 s) | Check | Result | | --- | --- | | Scope | ✅ 8 files, +222 −5 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ (1 s) | | Python tests | ✅ 495 passed (1 min 44 s) | | rustfmt | ✅ (6 s) | | clippy | ✅ (16 s) | | tests: horizon-server | ✅ 67 passed (10 s) | | doc tests | ➖ no library touched | | content root tests | ➖ content root untouched | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ✅ 1 affected, all passed already with these inputs (2 s) | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | 🤖 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-03 06:12:49 +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#6130
No description provided.