[PR #2604] [MERGED] Launcher: keep test runs away from the real trash and clipboard #4465

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

📋 Pull Request Information

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

Base: main ← Head: feat/launcher-test-seams


📝 Commits (2)

  • 2ef1553 Launcher: keep test runs away from the real trash and clipboard
  • 3c257bb AGENTS.md: launcher test runs set HORIZON_LAUNCHER_TRASH and HORIZON_LAUNCHER_CLIPBOARD

📊 Changes

12 files changed (+119 additions, -27 deletions)

View changed files

📝 AGENTS.md (+2 -1)
📝 launcher/README.md (+4 -1)
📝 launcher/src/agents_page.rs (+1 -1)
➕ launcher/src/desktop_seams.rs (+80 -0)
📝 launcher/src/internet.rs (+1 -1)
📝 launcher/src/lib.rs (+1 -0)
📝 launcher/src/main.rs (+21 -4)
📝 launcher/src/packs.rs (+1 -1)
📝 launcher/src/screenshots.rs (+1 -1)
📝 launcher/src/screenshots_page.rs (+4 -1)
📝 launcher/src/servers_page.rs (+1 -1)
📝 launcher/src/worlds.rs (+2 -15)

📄 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.

Stacked on #2602. Asked by the orchestrator: launcher test runs must never touch the player's real trash or clipboard.

What

  • launcher/src/desktop_seams.rs holds the launcher's two hard-to-undo desktop effects:
    • HORIZON_LAUNCHER_TRASH=<folder>: Delete (worlds, screenshots, packs: window, CLI and MCP) moves into that folder instead, under a free name. Without it, the system's trash as before (moved here from worlds.rs).
    • HORIZON_LAUNCHER_CLIPBOARD=<file>: every Copy in the window (the six existing places: invite codes, agent config, Tailscale command, log lines, screenshots) writes into that file instead: text as UTF-8, a picture as its bytes.
  • README, and AGENTS.md's "Keep your runs away from real player data" rule: launcher test runs set both inside their scratch home.

Proof

  • New unit test: the folder takes a folder and two same-named files (shot.png, shot.png 2) and leaves nothing behind.
  • By hand, with both set into mktemp folders: Copy, then Delete → Move to trash on a screenshot. The clipboard file held the 536972-byte PNG, the screenshot was in the scratch trash folder, osascript -e 'clipboard info' was the same before and after, and ~/.Trash had the same 37 entries.
  • cargo fmt --check, cargo clippy --all-targets --locked --features gpui/runtime_shaders -- -D warnings: clean; cargo test --locked --lib 155 passed, --bin horizon-launcher 35 passed.

🤖 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/2604 **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-test-seams` --- ### 📝 Commits (2) - [`2ef1553`](https://github.com/horizon-rust/horizon/commit/2ef155348f8b22ddc030229a3c7945df95c39293) Launcher: keep test runs away from the real trash and clipboard - [`3c257bb`](https://github.com/horizon-rust/horizon/commit/3c257bb3e64f4bf9b017f410e79be98adb850b84) AGENTS.md: launcher test runs set HORIZON_LAUNCHER_TRASH and HORIZON_LAUNCHER_CLIPBOARD ### 📊 Changes **12 files changed** (+119 additions, -27 deletions) <details> <summary>View changed files</summary> 📝 `AGENTS.md` (+2 -1) 📝 `launcher/README.md` (+4 -1) 📝 `launcher/src/agents_page.rs` (+1 -1) ➕ `launcher/src/desktop_seams.rs` (+80 -0) 📝 `launcher/src/internet.rs` (+1 -1) 📝 `launcher/src/lib.rs` (+1 -0) 📝 `launcher/src/main.rs` (+21 -4) 📝 `launcher/src/packs.rs` (+1 -1) 📝 `launcher/src/screenshots.rs` (+1 -1) 📝 `launcher/src/screenshots_page.rs` (+4 -1) 📝 `launcher/src/servers_page.rs` (+1 -1) 📝 `launcher/src/worlds.rs` (+2 -15) </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. Stacked on #2602. Asked by the orchestrator: launcher test runs must never touch the player's real trash or clipboard. ## What - `launcher/src/desktop_seams.rs` holds the launcher's two hard-to-undo desktop effects: - `HORIZON_LAUNCHER_TRASH=<folder>`: Delete (worlds, screenshots, packs: window, CLI and MCP) moves into that folder instead, under a free name. Without it, the system's trash as before (moved here from `worlds.rs`). - `HORIZON_LAUNCHER_CLIPBOARD=<file>`: every Copy in the window (the six existing places: invite codes, agent config, Tailscale command, log lines, screenshots) writes into that file instead: text as UTF-8, a picture as its bytes. - README, and AGENTS.md's "Keep your runs away from real player data" rule: launcher test runs set both inside their scratch home. ## Proof - New unit test: the folder takes a folder and two same-named files (`shot.png`, `shot.png 2`) and leaves nothing behind. - By hand, with both set into mktemp folders: Copy, then Delete → Move to trash on a screenshot. The clipboard file held the 536972-byte PNG, the screenshot was in the scratch trash folder, `osascript -e 'clipboard info'` was the same before and after, and `~/.Trash` had the same 37 entries. - `cargo fmt --check`, `cargo clippy --all-targets --locked --features gpui/runtime_shaders -- -D warnings`: clean; `cargo test --locked --lib` 155 passed, `--bin horizon-launcher` 35 passed. 🤖 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:21 +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#4465
No description provided.