[PR #2622] [MERGED] launcher: live game console with search, follow, copy and share log #4481

Closed
opened 2026-11-03 04:17:29 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

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

Base: main ← Head: feat/launcher-console


📝 Commits (1)

  • 0ccf3e1 launcher: live game console with search, follow, copy and share log

📊 Changes

10 files changed (+681 additions, -2 deletions)

View changed files

📝 docs/launcher-commands.md (+20 -0)
📝 launcher/README.md (+7 -0)
📝 launcher/src/cli.rs (+45 -0)
📝 launcher/src/cli_tools.rs (+2 -0)
➕ launcher/src/console_page.rs (+320 -0)
➕ launcher/src/game_log.rs (+161 -0)
➕ launcher/src/game_log/tests.rs (+114 -0)
📝 launcher/src/lib.rs (+1 -0)
📝 launcher/src/main.rs (+6 -0)
📝 launcher/src/servers_page.rs (+5 -2)

📄 Description

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

Clean room: designed from the feature list in briefs/launcher-features-1.md; no other launcher's code, docs or assets were read.

Launcher features, item 12: a live game console with follow, search, copy and "share log". Stacked on #2621 (import by drop).

  • Home's Console appears once the game has printed something, or while it runs. It shows this run's output as it arrives:
    • a search that matches every word, in any case;
    • Follow, which keeps the newest line in view (also after the search changes);
    • Copy (the lines shown), and Open logs folder;
    • warnings and errors in the warn and danger colours.
  • Share log… asks first. It says where the log goes, who can read it, and for how long. Only Upload sends it. The result row has Copy link, Open and Delete it.
  • New horizon_launcher::game_log:
    • private() takes out the home folder (→ ~, with either slash) and the names (→ <player>, whole words, any case). The names are the accounts, horizon-player.txt and the computer's user name.
    • fit() keeps the end of a log longer than the service's 25,000 lines or 10 MiB.
    • share() / unshare().
  • CLI and MCP:
    • share-log [--instance] is open-world: only when the player asks.
    • unshare-log <id:token> is destructive: it needs confirm: true.
  • HORIZON_LAUNCHER_PASTE_URL points uploads at another server. The tests use a local stub, so nothing goes to the public service.

Why mclo.gs

  • Aternos made it for Minecraft logs, and sharing those is the reason the button exists.
  • It needs no account or API key, so nothing secret ships in the launcher.
  • A log expires after 90 days unread.
  • Every upload returns a token that deletes the paste, so the player can take it back from the launcher (Delete it, or unshare-log).
  • It has a small, documented JSON API (POST /1/log, DELETE /1/log/{id}) with known limits.
  • Nothing is uploaded without a click or a command. Before anything leaves the computer, the home path and the names are stripped.

Proof

  • fmt, clippy -D warnings and the launcher tests: clean and passing (167 + 36). The new tests:
    • search;
    • privacy (Unix and Windows paths, names as whole words);
    • long-log trimming;
    • share, delete and error answers against a one-request HTTP stub.
  • Window run (scratch homes, a fake client that prints a realistic log, a local paste stub):
    • Follow kept the newest line in view.
    • warn filtered to the one warning.
    • Upload sent the log with Steve → <player> and /Users/… → ~.
    • Delete it sent DELETE /log/Lf1Test with the bearer token.
  • CLI: share-log --instance Hardcore against the stub printed the link and the delete command. The sent text had ~ and <player> in it. unshare-log deleted it.
Following Search Confirm Shared

🤖 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/2622 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/27/2026 **Status:** ✅ Merged **Merged:** 10/27/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launcher-console` --- ### 📝 Commits (1) - [`0ccf3e1`](https://github.com/horizon-rust/horizon/commit/0ccf3e110bb5591695966075b8a6652ce1df8374) launcher: live game console with search, follow, copy and share log ### 📊 Changes **10 files changed** (+681 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `docs/launcher-commands.md` (+20 -0) 📝 `launcher/README.md` (+7 -0) 📝 `launcher/src/cli.rs` (+45 -0) 📝 `launcher/src/cli_tools.rs` (+2 -0) ➕ `launcher/src/console_page.rs` (+320 -0) ➕ `launcher/src/game_log.rs` (+161 -0) ➕ `launcher/src/game_log/tests.rs` (+114 -0) 📝 `launcher/src/lib.rs` (+1 -0) 📝 `launcher/src/main.rs` (+6 -0) 📝 `launcher/src/servers_page.rs` (+5 -2) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. Clean room: designed from the feature list in briefs/launcher-features-1.md; no other launcher's code, docs or assets were read. Launcher features, item 12: a live game console with follow, search, copy and "share log". Stacked on #2621 (import by drop). - **Home's Console** appears once the game has printed something, or while it runs. It shows this run's output as it arrives: - a search that matches every word, in any case; - **Follow**, which keeps the newest line in view (also after the search changes); - **Copy** (the lines shown), and **Open logs folder**; - warnings and errors in the warn and danger colours. - **Share log…** asks first. It says where the log goes, who can read it, and for how long. Only **Upload** sends it. The result row has **Copy link**, **Open** and **Delete it**. - New `horizon_launcher::game_log`: - `private()` takes out the home folder (→ `~`, with either slash) and the names (→ `<player>`, whole words, any case). The names are the accounts, `horizon-player.txt` and the computer's user name. - `fit()` keeps the end of a log longer than the service's 25,000 lines or 10 MiB. - `share()` / `unshare()`. - CLI and MCP: - `share-log [--instance]` is open-world: only when the player asks. - `unshare-log <id:token>` is destructive: it needs `confirm: true`. - `HORIZON_LAUNCHER_PASTE_URL` points uploads at another server. The tests use a local stub, so nothing goes to the public service. ## Why mclo.gs - Aternos made it for Minecraft logs, and sharing those is the reason the button exists. - It needs no account or API key, so nothing secret ships in the launcher. - A log expires after 90 days unread. - Every upload returns a token that deletes the paste, so the player can take it back from the launcher (**Delete it**, or `unshare-log`). - It has a small, documented JSON API (`POST /1/log`, `DELETE /1/log/{id}`) with known limits. - Nothing is uploaded without a click or a command. Before anything leaves the computer, the home path and the names are stripped. ## Proof - fmt, clippy `-D warnings` and the launcher tests: clean and passing (167 + 36). The new tests: - search; - privacy (Unix and Windows paths, names as whole words); - long-log trimming; - share, delete and error answers against a one-request HTTP stub. - Window run (scratch homes, a fake client that prints a realistic log, a local paste stub): - Follow kept the newest line in view. - `warn` filtered to the one warning. - Upload sent the log with `Steve` → `<player>` and `/Users/…` → `~`. - **Delete it** sent `DELETE /log/Lf1Test` with the bearer token. - CLI: `share-log --instance Hardcore` against the stub printed the link and the delete command. The sent text had `~` and `<player>` in it. `unshare-log` deleted it. | Following | Search | Confirm | Shared | |---|---|---|---| | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/console/following.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/console/search.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/console/confirm.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/console/shared.png) | 🤖 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 04:17:29 +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#4481
No description provided.