[PR #1429] [MERGED] Launcher: one update channel, and the menu entry is never taken over #3519

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

📋 Pull Request Information

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

Base: main ← Head: feat/launcher-single-channel


📝 Commits (1)

  • 630f521 Launcher: one update channel, and the menu entry is never taken over

📊 Changes

10 files changed (+230 additions, -289 deletions)

View changed files

📝 docs/agent-control.md (+1 -2)
📝 docs/launcher-commands.md (+0 -10)
📝 launcher/README.md (+16 -14)
📝 launcher/src/backend.rs (+59 -174)
📝 launcher/src/backend/release_loading_tests.rs (+0 -4)
📝 launcher/src/cli.rs (+2 -24)
📝 launcher/src/cli_tools.rs (+0 -1)
📝 launcher/src/desktop.rs (+138 -9)
📝 launcher/src/main.rs (+13 -50)
📝 website/docs/agents.md (+1 -1)

📄 Description

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

What

One channel (Ludovic, 2026-10-23: "Alpha becomes our new Stable"). This goes with the release PR, which publishes every game release as the release and GitHub's latest.

  • Removed the Stable/Alpha choice: the Updates row in Settings, horizon-launcher update-channel and its MCP tool (update_channel), the channel on the Versions page and in versions / versions --json (now "prerelease": bool), and · Alpha in the footer.
  • The update check follows the latest release: the newest game release that is not a pre-release (installable_updates). The pre-releases of the old Alpha channel (v0.2.1 on) stay listed and installable by hand, but are never installed as an update, so a player who has one keeps it until the next release. install latest follows the same rule.
  • An open launcher checks every 30 minutes, the one interval (backend::CHECK_EVERY).
  • The update_channel / beta_builds keys older launchers wrote are ignored and dropped on the next save; the other settings are kept (tested).

The applications-menu entry is never taken over (Linux; follows the 2026-10-23 incident where a test build took over a working entry and then left it broken):

  • At start, a release build (or a dev build with HORIZON_LAUNCHER_DESKTOP_ENTRY=1) now calls desktop::repair. It writes the entry, game entry and icons only when no entry exists, or when the entry's target no longer exists. The target is TryExec, else the first word of Exec, unquoted the way quote writes it; a bare name is looked up on PATH. An entry that starts nothing counts as broken.
  • An entry pointing at another launcher that still works is left alone, so a dev or test build never takes it over.
  • Turning the Settings switch on and horizon-launcher desktop-entry still call desktop::install, which points the entry at this launcher whatever is there.
  • HORIZON_LAUNCHER_DESKTOP_EXEC is honored on both paths (desktop::target).

Docs: launcher/README.md, docs/launcher-commands.md (regenerated), docs/agent-control.md, website/docs/agents.md.

How tested

cargo fmt --check                                                     ok
cargo clippy --locked --all-targets --features gpui/runtime_shaders -- -D warnings   ok (macOS)
cargo test --locked --features gpui/runtime_shaders                   macOS: 113 lib + 24 bin + 1 + others, all pass
cargo test --locked --lib --test desktop   (ThinkPad, NixOS)          113 lib pass, tests/desktop.rs (wrapper) 1 pass

New and rewritten tests:

  • desktop::tests::a_start_writes_the_entry_only_when_none_works: no entry, our working entry, another launcher's entry found by path and on PATH, a deleted target, an entry without Exec.
  • desktop::tests::the_target_is_try_exec_else_the_first_word_of_exec: quoting, a wrapper command, a [Desktop Action] group.
  • backend::tests::updates_follow_every_release_and_leave_the_old_alpha_ones_out
  • backend::tests::the_old_update_channel_settings_are_dropped_and_the_rest_kept
  • the 0.2 bridge test, updated.

Update path, update --check --json against the live feed (macOS builds; HORIZON_HOME, HORIZON_LAUNCHER_HOME, XDG_DATA_HOME and XDG_CONFIG_HOME are fresh mktemp -d dirs; HORIZON_LAUNCHER_NO_SELF_UPDATE=1). Right now the latest is v0.2.0 and the newest pre-release is v0.2.12:

launcher 0.17.0  {"beta_builds": true}        horizon v0.2.12  launcher 0.2.1
launcher 0.17.0  {"beta_builds": false}       horizon v0.2.0   launcher 0.2.1
launcher 0.2.0   {"update_channel": "alpha"}  horizon v0.2.12  launcher 0.2.1
launcher 0.2.0   {"update_channel": "stable"} horizon v0.2.0   launcher 0.2.1
launcher 0.2.0   {"beta_builds": true}        horizon v0.2.12  launcher 0.2.1
launcher 0.2.1   {"update_channel": "alpha"}  horizon v0.2.12  launcher null
launcher 0.2.1   {"update_channel": "stable"} horizon v0.2.0   launcher null
this branch      {} / alpha / beta_builds     horizon v0.2.0   launcher 0.2.1

Every old build takes the newest release when its switch is off, and the newest release or pre-release when it is on. Once the release PR publishes each release as a release and latest, both settings of every old launcher get it. Settings screenshot on macOS: no Updates channel row; the footer reads "Launcher 0.2.0".

Not checked: the GUI start path on a real Linux desktop (vscreen, desktop only). The decision it makes is covered by the unit tests above.

Needs Ludovic

Merge after the release PR (one channel) and #1428. Merging this before the release PR would leave launchers on "latest = v0.2.0" until the first single-channel release.

🤖 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/1429 **Author:** [@ludovic111](https://github.com/ludovic111) **Created:** 10/23/2026 **Status:** ✅ Merged **Merged:** 10/23/2026 **Merged by:** [@ludovic111](https://github.com/ludovic111) **Base:** `main` ← **Head:** `feat/launcher-single-channel` --- ### 📝 Commits (1) - [`630f521`](https://github.com/horizon-rust/horizon/commit/630f5210722059eb1d50d64f79e12fc21bac4f47) Launcher: one update channel, and the menu entry is never taken over ### 📊 Changes **10 files changed** (+230 additions, -289 deletions) <details> <summary>View changed files</summary> 📝 `docs/agent-control.md` (+1 -2) 📝 `docs/launcher-commands.md` (+0 -10) 📝 `launcher/README.md` (+16 -14) 📝 `launcher/src/backend.rs` (+59 -174) 📝 `launcher/src/backend/release_loading_tests.rs` (+0 -4) 📝 `launcher/src/cli.rs` (+2 -24) 📝 `launcher/src/cli_tools.rs` (+0 -1) 📝 `launcher/src/desktop.rs` (+138 -9) 📝 `launcher/src/main.rs` (+13 -50) 📝 `website/docs/agents.md` (+1 -1) </details> ### 📄 Description > 🤖 Opened by Ludovic's AI agent (Claude), not by Ludovic himself. ## What **One channel** (Ludovic, 2026-10-23: "Alpha becomes our new Stable"). This goes with the release PR, which publishes every game release as the release and GitHub's latest. - Removed the Stable/Alpha choice: the **Updates** row in Settings, `horizon-launcher update-channel` and its MCP tool (`update_channel`), the channel on the Versions page and in `versions` / `versions --json` (now `"prerelease": bool`), and `· Alpha` in the footer. - The update check follows the latest release: the newest game release that is not a pre-release (`installable_updates`). The pre-releases of the old Alpha channel (v0.2.1 on) stay listed and installable by hand, but are never installed as an update, so a player who has one keeps it until the next release. `install latest` follows the same rule. - An open launcher checks every 30 minutes, the one interval (`backend::CHECK_EVERY`). - The `update_channel` / `beta_builds` keys older launchers wrote are ignored and dropped on the next save; the other settings are kept (tested). **The applications-menu entry is never taken over** (Linux; follows the 2026-10-23 incident where a test build took over a working entry and then left it broken): - At start, a release build (or a dev build with `HORIZON_LAUNCHER_DESKTOP_ENTRY=1`) now calls `desktop::repair`. It writes the entry, game entry and icons only when no entry exists, or when the entry's target no longer exists. The target is `TryExec`, else the first word of `Exec`, unquoted the way `quote` writes it; a bare name is looked up on `PATH`. An entry that starts nothing counts as broken. - An entry pointing at another launcher that still works is left alone, so a dev or test build never takes it over. - Turning the Settings switch on and `horizon-launcher desktop-entry` still call `desktop::install`, which points the entry at this launcher whatever is there. - `HORIZON_LAUNCHER_DESKTOP_EXEC` is honored on both paths (`desktop::target`). Docs: launcher/README.md, docs/launcher-commands.md (regenerated), docs/agent-control.md, website/docs/agents.md. ## How tested ``` cargo fmt --check ok cargo clippy --locked --all-targets --features gpui/runtime_shaders -- -D warnings ok (macOS) cargo test --locked --features gpui/runtime_shaders macOS: 113 lib + 24 bin + 1 + others, all pass cargo test --locked --lib --test desktop (ThinkPad, NixOS) 113 lib pass, tests/desktop.rs (wrapper) 1 pass ``` New and rewritten tests: - `desktop::tests::a_start_writes_the_entry_only_when_none_works`: no entry, our working entry, another launcher's entry found by path and on `PATH`, a deleted target, an entry without `Exec`. - `desktop::tests::the_target_is_try_exec_else_the_first_word_of_exec`: quoting, a wrapper command, a `[Desktop Action]` group. - `backend::tests::updates_follow_every_release_and_leave_the_old_alpha_ones_out` - `backend::tests::the_old_update_channel_settings_are_dropped_and_the_rest_kept` - the 0.2 bridge test, updated. **Update path, `update --check --json` against the live feed** (macOS builds; HORIZON_HOME, HORIZON_LAUNCHER_HOME, XDG_DATA_HOME and XDG_CONFIG_HOME are fresh `mktemp -d` dirs; HORIZON_LAUNCHER_NO_SELF_UPDATE=1). Right now the latest is v0.2.0 and the newest pre-release is v0.2.12: ``` launcher 0.17.0 {"beta_builds": true} horizon v0.2.12 launcher 0.2.1 launcher 0.17.0 {"beta_builds": false} horizon v0.2.0 launcher 0.2.1 launcher 0.2.0 {"update_channel": "alpha"} horizon v0.2.12 launcher 0.2.1 launcher 0.2.0 {"update_channel": "stable"} horizon v0.2.0 launcher 0.2.1 launcher 0.2.0 {"beta_builds": true} horizon v0.2.12 launcher 0.2.1 launcher 0.2.1 {"update_channel": "alpha"} horizon v0.2.12 launcher null launcher 0.2.1 {"update_channel": "stable"} horizon v0.2.0 launcher null this branch {} / alpha / beta_builds horizon v0.2.0 launcher 0.2.1 ``` Every old build takes the newest release when its switch is off, and the newest release or pre-release when it is on. Once the release PR publishes each release as a release and latest, both settings of every old launcher get it. Settings screenshot on macOS: no Updates channel row; the footer reads "Launcher 0.2.0". Not checked: the GUI start path on a real Linux desktop (vscreen, desktop only). The decision it makes is covered by the unit tests above. ## Needs Ludovic Merge after the release PR (one channel) and #1428. Merging this before the release PR would leave launchers on "latest = v0.2.0" until the first single-channel release. 🤖 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:10:06 +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#3519
No description provided.