[PR #1676] [MERGED] horizon-ctl screenshot: paths with spaces #3682

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

📋 Pull Request Information

Original PR: https://github.com/horizon-rust/horizon/pull/1676
Author: @sdraeger
Created: 10/24/2026
Status: ✅ Merged
Merged: 10/25/2026
Merged by: @ludovic111

Base: main ← Head: fix/ctl-screenshot-spaces


📝 Commits (1)

  • 72f88be Allow spaces in horizon-ctl screenshot paths

📊 Changes

1 file changed (+4 additions, -1 deletions)

View changed files

📝 crates/horizon-client/src/game/control.rs (+4 -1)

📄 Description

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

What and why

Fixes #1604. The game read the screenshot path as the first whitespace word, so …/Application Support/x.png was written to …/Application. Now it takes the rest of the line, as the chat command already does.

 "screenshot" =>
-  renderer.screenshot = arg(1)
+  arg(1)?                                  # still errors when missing
+  renderer.screenshot = rest of line after "screenshot", trimmed

Evidence

horizon-ctl screenshot "/tmp/has space.XXXX/shot one.png":

  • Before: screenshot ".../Library/Application Support/.../shot.png" replied ok, wrote nothing there, and created ~/Library/Application (a 2560x1440 PNG).
  • After: screenshot "/tmp/has space.XXXX/shot one.png" replied ok and wrote shot one.png in that folder.

Vanilla reference

None (tooling).

Self-check

pr_ready (tools/pr_ready.py --quick --base upstream/main on Simons-MacBook-Pro, against upstream/main at fe128948b, 1 min 6 s)

Check Result
Scope ✅ 1 files, +4 −1
Cargo.lock ✅ unchanged
Public tree ✅
Python tests ➖ no Python change
rustfmt ✅ (3 s)
clippy ✅ (18 s)
tests: horizon-client ✅ 1199 passed (44 s)
doc tests ✅ 0 passed (1 s)
tokens.css up to date ➖ theme untouched
launcher rustfmt ➖ launcher untouched
launcher clippy ➖ launcher untouched
launcher tests ➖ launcher untouched
Parity ➖ not run (--quick): CI's parity job picks the affected harnesses
Label player-facing: feature if players get something new, no label for a fix (release-now if urgent)

python3 tools/agent_control_e2e.py --out "/tmp/agent e2e" (an output folder with a space): every screenshot is written there. options and manage fail in both modes ("the GUI scale did not apply", "no minecraft:bucket in the inventory"); they fail the same way on upstream/main at fe12894 with --mode cli --scenario options|manage, so they're unrelated.

Merge danger

Door: two-way. Blast radius: horizon-ctl screenshot and the MCP screenshot tool. A path with trailing spaces is now trimmed.

🤖 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/1676 **Author:** [@sdraeger](https://github.com/sdraeger) **Created:** 10/24/2026 **Status:** ✅ Merged **Merged:** 10/25/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `fix/ctl-screenshot-spaces` --- ### 📝 Commits (1) - [`72f88be`](https://github.com/horizon-rust/horizon/commit/72f88befb804421c88c9584b02f0974c33508d0c) Allow spaces in horizon-ctl screenshot paths ### 📊 Changes **1 file changed** (+4 additions, -1 deletions) <details> <summary>View changed files</summary> 📝 `crates/horizon-client/src/game/control.rs` (+4 -1) </details> ### 📄 Description > 🤖 Opened by Simon's AI agent (Claude Code), not by Simon himself. ## What and why Fixes #1604. The game read the screenshot path as the first whitespace word, so `…/Application Support/x.png` was written to `…/Application`. Now it takes the rest of the line, as the `chat` command already does. ```diff "screenshot" => - renderer.screenshot = arg(1) + arg(1)? # still errors when missing + renderer.screenshot = rest of line after "screenshot", trimmed ``` ## Evidence `horizon-ctl screenshot "/tmp/has space.XXXX/shot one.png"`: - **Before:** `screenshot ".../Library/Application Support/.../shot.png"` replied `ok`, wrote nothing there, and created `~/Library/Application` (a 2560x1440 PNG). - **After:** `screenshot "/tmp/has space.XXXX/shot one.png"` replied `ok` and wrote `shot one.png` in that folder. ## Vanilla reference None (tooling). ## Self-check **pr_ready** (`tools/pr_ready.py --quick --base upstream/main` on Simons-MacBook-Pro, against upstream/main at fe128948b, 1 min 6 s) | Check | Result | | --- | --- | | Scope | ✅ 1 files, +4 −1 | | Cargo.lock | ✅ unchanged | | Public tree | ✅ | | Python tests | ➖ no Python change | | rustfmt | ✅ (3 s) | | clippy | ✅ (18 s) | | tests: horizon-client | ✅ 1199 passed (44 s) | | doc tests | ✅ 0 passed (1 s) | | tokens.css up to date | ➖ theme untouched | | launcher rustfmt | ➖ launcher untouched | | launcher clippy | ➖ launcher untouched | | launcher tests | ➖ launcher untouched | | Parity | ➖ not run (--quick): CI's parity job picks the affected harnesses | | Label | player-facing: `feature` if players get something new, no label for a fix (`release-now` if urgent) | `python3 tools/agent_control_e2e.py --out "/tmp/agent e2e"` (an output folder with a space): every screenshot is written there. `options` and `manage` fail in both modes ("the GUI scale did not apply", "no minecraft:bucket in the inventory"); they fail the same way on upstream/main at fe12894 with `--mode cli --scenario options|manage`, so they're unrelated. ## Merge danger **Door:** two-way. **Blast radius:** `horizon-ctl screenshot` and the MCP `screenshot` tool. A path with trailing spaces is now trimmed. 🤖 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:11:23 +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#3682
No description provided.