[PR #2623] [MERGED] launcher: minimise or hide the window while the game runs #4483

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/2623
Author: @ludovic111
Created: 10/27/2026
Status: ✅ Merged
Merged: 10/27/2026
Merged by: @ludovic111

Base: main ← Head: feat/launcher-hide-on-play


📝 Commits (1)

  • cde33a8 launcher: minimise or hide the window while the game runs

📊 Changes

6 files changed (+192 additions, -6 deletions)

View changed files

📝 docs/launcher-commands.md (+2 -2)
📝 launcher/README.md (+4 -2)
📝 launcher/src/backend.rs (+78 -0)
📝 launcher/src/cli.rs (+9 -2)
📝 launcher/src/main.rs (+7 -0)
➕ launcher/src/while_playing.rs (+92 -0)

📄 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 13: close or minimise the launcher when the game starts, and show it again when the game exits, as a setting. Stacked on #2622 (console).

  • Settings > Launcher > While playing: Stay (the default, as before), Minimise, or Hide (macOS only).
    • Minimise sends the window to the Dock or the taskbar.
    • Hide hides the whole app, like ⌘H.
    • Elsewhere GPUI can't hide an app, so the option isn't offered, and a stored hide minimises.
  • When the game closes, the launcher comes back to the front. Normally or after a crash, the player sees the run's play time, any crash summary and the Console without looking for the window.
    • It only comes back if it went away for this run.
    • "Close" is a hide rather than a quit: the launcher has to stay running to record play time and bring itself back.
  • settings.json key while_playing (stay/minimize/hide). An unknown value from a newer launcher falls back to Stay and keeps every other setting.
  • CLI and MCP: horizon-launcher settings while-playing stay|minimize|hide (minimise works too).
    • settings lists it.
    • The window reads the file when Play starts, so a change from the CLI counts at once.
  • launcher/README.md: the Settings bullet.

Proof

  • fmt, clippy -D warnings and the launcher tests: clean and passing (168 + 36). The new test covers the default, a known value, an unknown value that keeps the rest, the names, and Hide → Minimise off macOS.
  • Window run, scratch homes, with a fake client that runs about 15 s:
    • Minimise: after Play the window was off screen. It was back at the same place after the game exited.
    • Hide: after Play, System Events said the process wasn't visible. It was visible and in front after the game exited.
    • Clicking Minimise in Settings wrote "while_playing": "minimize".
While playing: Hide Minimise picked

🤖 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/2623 **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-hide-on-play` --- ### 📝 Commits (1) - [`cde33a8`](https://github.com/horizon-rust/horizon/commit/cde33a8e42dfb58826ec35d8c2db35fb929a1a15) launcher: minimise or hide the window while the game runs ### 📊 Changes **6 files changed** (+192 additions, -6 deletions) <details> <summary>View changed files</summary> 📝 `docs/launcher-commands.md` (+2 -2) 📝 `launcher/README.md` (+4 -2) 📝 `launcher/src/backend.rs` (+78 -0) 📝 `launcher/src/cli.rs` (+9 -2) 📝 `launcher/src/main.rs` (+7 -0) ➕ `launcher/src/while_playing.rs` (+92 -0) </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 13: close or minimise the launcher when the game starts, and show it again when the game exits, as a setting. Stacked on #2622 (console). - **Settings > Launcher > While playing**: **Stay** (the default, as before), **Minimise**, or **Hide** (macOS only). - Minimise sends the window to the Dock or the taskbar. - Hide hides the whole app, like ⌘H. - Elsewhere GPUI can't hide an app, so the option isn't offered, and a stored `hide` minimises. - When the game closes, the launcher comes back to the front. Normally or after a crash, the player sees the run's play time, any crash summary and the Console without looking for the window. - It only comes back if it went away for this run. - "Close" is a hide rather than a quit: the launcher has to stay running to record play time and bring itself back. - `settings.json` key `while_playing` (`stay`/`minimize`/`hide`). An unknown value from a newer launcher falls back to Stay and keeps every other setting. - CLI and MCP: `horizon-launcher settings while-playing stay|minimize|hide` (`minimise` works too). - `settings` lists it. - The window reads the file when Play starts, so a change from the CLI counts at once. - launcher/README.md: the Settings bullet. ## Proof - fmt, clippy `-D warnings` and the launcher tests: clean and passing (168 + 36). The new test covers the default, a known value, an unknown value that keeps the rest, the names, and Hide → Minimise off macOS. - Window run, scratch homes, with a fake client that runs about 15 s: - Minimise: after Play the window was off screen. It was back at the same place after the game exited. - Hide: after Play, System Events said the process wasn't visible. It was visible and in front after the game exited. - Clicking Minimise in Settings wrote `"while_playing": "minimize"`. | While playing: Hide | Minimise picked | |---|---| | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/while-playing/hide.png) | ![](https://raw.githubusercontent.com/ludovic111/horizon/screenshots/launcher-features/while-playing/minimise.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#4483
No description provided.