[PR #2599] [MERGED] Launcher: screenshots gallery per instance #4460

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

📋 Pull Request Information

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

Base: main ← Head: feat/launcher-screenshots


📝 Commits (1)

  • 0d5ed81 Launcher: screenshots gallery per instance

📊 Changes

9 files changed (+546 additions, -3 deletions)

View changed files

📝 docs/launcher-commands.md (+21 -0)
📝 launcher/README.md (+7 -0)
📝 launcher/src/cli.rs (+70 -0)
📝 launcher/src/cli_tools.rs (+1 -0)
📝 launcher/src/lib.rs (+1 -0)
📝 launcher/src/main.rs (+15 -0)
➕ launcher/src/screenshots.rs (+103 -0)
➕ launcher/src/screenshots_page.rs (+322 -0)
📝 launcher/src/worlds.rs (+6 -3)

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

Item 6 of the launcher features. Stacked on #2597 (play time).

What

  • Home → Screenshots: the selected instance's newest 8 screenshots (what F2 saves in screenshots/ of its game folder), Show all N for the rest, Open folder. The section only appears once the instance has some.
  • Clicking one opens it over the window: date and file name, ← Newer / Older → (and the arrow keys), Copy (the picture itself to the clipboard), Open (the system's viewer), Show in folder, Delete (to the system's trash after a confirmation), Close (and Escape).
  • screenshots.rs: PNG/JPEG files of the folder, newest first; the game's same-second names (_2, _3) sort after the first. worlds::to_trash is now shared by worlds and screenshots.
  • CLI: horizon-launcher screenshots [list|delete] [--instance <name>] (--json gives name, path, taken_ms, size). MCP: generated from the CLI; screenshots delete needs confirm: true. docs/launcher-commands.md regenerated.

Screenshots

The pictures are real Horizon screenshots (horizon-ctl screenshot, offscreen, a fresh world), copied to 15 files.

Home:
home

The viewer:
viewer

Older →, Copy, then Delete asks first (the clipboard then held the 263889-byte PNG of that file: checked with osascript -e 'clipboard info'):
confirm

After Move to trash: the next one is shown, and the file is in the Trash:
deleted

Show all:
all

Proof

  • cargo fmt --check, cargo clippy --all-targets --locked --features gpui/runtime_shaders -- -D warnings: clean.
  • cargo test --locked --lib: 151 passed (new: pictures only, newest first, same-second order, find by name with or without extension). --bin horizon-launcher: 35 passed.
  • CLI by hand: screenshots, --json screenshots list.

🤖 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/2599 **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-screenshots` --- ### 📝 Commits (1) - [`0d5ed81`](https://github.com/horizon-rust/horizon/commit/0d5ed8122ed97b85d49c065a85e478239ceeb2c7) Launcher: screenshots gallery per instance ### 📊 Changes **9 files changed** (+546 additions, -3 deletions) <details> <summary>View changed files</summary> 📝 `docs/launcher-commands.md` (+21 -0) 📝 `launcher/README.md` (+7 -0) 📝 `launcher/src/cli.rs` (+70 -0) 📝 `launcher/src/cli_tools.rs` (+1 -0) 📝 `launcher/src/lib.rs` (+1 -0) 📝 `launcher/src/main.rs` (+15 -0) ➕ `launcher/src/screenshots.rs` (+103 -0) ➕ `launcher/src/screenshots_page.rs` (+322 -0) 📝 `launcher/src/worlds.rs` (+6 -3) </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. Item 6 of the launcher features. Stacked on #2597 (play time). ## What - Home → **Screenshots**: the selected instance's newest 8 screenshots (what F2 saves in `screenshots/` of its game folder), **Show all N** for the rest, **Open folder**. The section only appears once the instance has some. - Clicking one opens it over the window: date and file name, **← Newer** / **Older →** (and the arrow keys), **Copy** (the picture itself to the clipboard), **Open** (the system's viewer), **Show in folder**, **Delete** (to the system's trash after a confirmation), **Close** (and Escape). - `screenshots.rs`: PNG/JPEG files of the folder, newest first; the game's same-second names (`_2`, `_3`) sort after the first. `worlds::to_trash` is now shared by worlds and screenshots. - CLI: `horizon-launcher screenshots [list|delete] [--instance <name>]` (`--json` gives name, path, taken_ms, size). MCP: generated from the CLI; `screenshots delete` needs `confirm: true`. `docs/launcher-commands.md` regenerated. ## Screenshots The pictures are real Horizon screenshots (`horizon-ctl screenshot`, offscreen, a fresh world), copied to 15 files. Home: ![home](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/item-06-screenshots/ss_home.png) The viewer: ![viewer](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/item-06-screenshots/ss_view.png) Older →, Copy, then Delete asks first (the clipboard then held the 263889-byte PNG of that file: checked with `osascript -e 'clipboard info'`): ![confirm](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/item-06-screenshots/ss_confirm.png) After Move to trash: the next one is shown, and the file is in the Trash: ![deleted](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/item-06-screenshots/ss_deleted.png) Show all: ![all](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/item-06-screenshots/ss_all.png) ## Proof - `cargo fmt --check`, `cargo clippy --all-targets --locked --features gpui/runtime_shaders -- -D warnings`: clean. - `cargo test --locked --lib`: 151 passed (new: pictures only, newest first, same-second order, find by name with or without extension). `--bin horizon-launcher`: 35 passed. - CLI by hand: `screenshots`, `--json screenshots list`. 🤖 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:19 +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#4460
No description provided.