feat(versions): one list of installed versions per launcher, and a version to add is never an empty list #288

Merged
HumanBean merged 2 commits from HumanBean/LongshotLauncher:feat/add-version-after-clean-break into main 2026-11-26 07:08:20 +00:00
Owner

Both launchers kept their installed versions in the same builds.json, so the stable launcher (v1.3.0) listed the nightly's longshot-builder versions as installed, with Play. Players moving to the nightly also had to add a version again, but Add a version opened on an empty, disabled Stable list with nothing saying why. This gives each launcher its own list and makes adding a version obvious.

One list of installed versions per launcher

  • This launcher keeps its own list, versions.json. builds.json is the stable launcher's alone (Core/VersionLists.cs).
  • Split once, at the first start with no versions.json: the rows known to be longshot-builder's (in a version folder, marked NupInPlace, or holding its record) move; the others stay, a row whose folder is gone included. versions.json is written first, so a stop between the two saves leaves a row in both lists, never in neither. An unreadable builds.json is left as it is.
  • The stable launcher's versions are safe from this one: its folders count as listed, so they are never offered as leftovers to delete, listed again (Relist), taken for a lost update or deleted with another version. Its versions' tools and make_game.py's files are not pruned while it lists any.
  • No stable release is needed: v1.3.0 sees only its own rows once the nightly has started once.
  • A portable launcher importing the installed one reads its versions.json (and its rows still in builds.json from before the split).

Adding a version after the clean break

  • Add a version opens on a channel that has a version for this launcher: the one new builds start on, else the other (Nightly, until longshot-builder's first stable). A channel asked for explicitly is still the one opened.
  • An empty channel says why: "No version for this launcher is out on Stable yet." (or that it waits for git.magicbean.dev), a "No version yet" placeholder in the list, and Pick Nightly instead.
  • An installed old-builder version is not one of a channel's versions there: it used to fill Stable's list as "It is on this PC already: play it from Home", which it isn't here.
  • Home, when none of the versions plays here: a card, "Add a version to play here", counting the old builder's versions (this list's and the stable launcher's), with Add a version…, Stable launcher… and Not now (until the next start).
  • New texts in all 12 catalogs (scripts/translations.py: all complete).

Tests

  • tests/launcher_core/VersionListChecks.cs (new): what moves and what stays (ids, folders, marks, the default, a gone folder), the split runs once (even with a row put back), nothing written with no builds.json, builds.json byte-identical with none of ours, an unreadable one left as it is; in the source, the split before the list loads and the stable launcher's folders in every keep list.
  • Updated, not weakened: OtherLauncherChecks writes the other launcher's list as versions.json; OldVersionChecks now also requires the stable launcher's list to hold back the pruning.
  • tests/launcher_app: AfterTheCleanBreak — Add a version on Nightly / empty Stable / Pick Nightly / an asked channel kept / waiting for the server / an old stable not listed; the home card from this list's old versions and from the stable launcher's list, and Not now.
  • python -I tests/test_launcher_core.py: 2854 checks passed. LAUNCHER=$PWD python -I ../Tooling/tests/test_release.py: OK.
  • Not run against a real data folder or in the game; screenshots in the first comment.

🤖 Generated with Claude Code

Both launchers kept their installed versions in the same `builds.json`, so the stable launcher (v1.3.0) listed the nightly's longshot-builder versions as installed, with Play. Players moving to the nightly also had to add a version again, but Add a version opened on an empty, disabled Stable list with nothing saying why. This gives each launcher its own list and makes adding a version obvious. ## One list of installed versions per launcher - **This launcher keeps its own list, `versions.json`.** `builds.json` is the stable launcher's alone (`Core/VersionLists.cs`). - **Split once, at the first start with no `versions.json`:** the rows known to be longshot-builder's (in a version folder, marked `NupInPlace`, or holding its record) move; the others stay, a row whose folder is gone included. `versions.json` is written first, so a stop between the two saves leaves a row in both lists, never in neither. An unreadable `builds.json` is left as it is. - **The stable launcher's versions are safe from this one:** its folders count as listed, so they are never offered as leftovers to delete, listed again (`Relist`), taken for a lost update or deleted with another version. Its versions' tools and make_game.py's files are not pruned while it lists any. - **No stable release is needed:** v1.3.0 sees only its own rows once the nightly has started once. - A portable launcher importing the installed one reads its `versions.json` (and its rows still in `builds.json` from before the split). ## Adding a version after the clean break - **Add a version opens on a channel that has a version for this launcher**: the one new builds start on, else the other (Nightly, until longshot-builder's first stable). A channel asked for explicitly is still the one opened. - **An empty channel says why**: "No version for this launcher is out on Stable yet." (or that it waits for git.magicbean.dev), a "No version yet" placeholder in the list, and **Pick Nightly instead**. - **An installed old-builder version is not one of a channel's versions there**: it used to fill Stable's list as "It is on this PC already: play it from Home", which it isn't here. - **Home, when none of the versions plays here**: a card, "Add a version to play here", counting the old builder's versions (this list's and the stable launcher's), with **Add a version…**, **Stable launcher…** and Not now (until the next start). - New texts in all 12 catalogs (`scripts/translations.py`: all complete). ## Tests - `tests/launcher_core/VersionListChecks.cs` (new): what moves and what stays (ids, folders, marks, the default, a gone folder), the split runs once (even with a row put back), nothing written with no `builds.json`, `builds.json` byte-identical with none of ours, an unreadable one left as it is; in the source, the split before the list loads and the stable launcher's folders in every keep list. - Updated, not weakened: `OtherLauncherChecks` writes the other launcher's list as `versions.json`; `OldVersionChecks` now also requires the stable launcher's list to hold back the pruning. - `tests/launcher_app`: `AfterTheCleanBreak` — Add a version on Nightly / empty Stable / Pick Nightly / an asked channel kept / waiting for the server / an old stable not listed; the home card from this list's old versions and from the stable launcher's list, and Not now. - `python -I tests/test_launcher_core.py`: 2854 checks passed. `LAUNCHER=$PWD python -I ../Tooling/tests/test_release.py`: OK. - Not run against a real data folder or in the game; screenshots in the first comment. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
feat(versions): after the clean break, a version to add is never an empty list
Some checks failed
CI / What the change needs (pull_request) Successful in 6s
PR title / Conventional Commit title (pull_request) Successful in 6s
CI / Package (setup, portable zip, AppImage; Wine self-check) (pull_request) Has been skipped
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 11s
CI / Compile and test (pull_request) Failing after 1m2s
0395245e98
Add a version opens on a channel that has a version for this launcher (Nightly, while no stable of longshot-builder's kind is
out), an empty channel says why and offers the other, and an installed version of the old builder is not listed there as
"on this PC already". With every version an old one, Home says a version has to be added again, with Add a version… and
the stable launcher.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Owner

Screenshots (tools/screenshots): Home with only old-builder versions, and Add a version on Stable before longshot-builder's first stable.

home-old-only.png

versions-add-stable-empty.png

Screenshots (tools/screenshots): Home with only old-builder versions, and Add a version on Stable before longshot-builder's first stable. ![home-old-only.png](https://git.magicbean.dev/attachments/1a12cee0-6739-40c1-9e68-05a5206da53e) ![versions-add-stable-empty.png](https://git.magicbean.dev/attachments/7fd900cd-d35e-4d43-b58c-341881376eb1)
Member

Possibly related, for context:

  • issue #237 Launcher: Build another version unavailable when Stable and Nightly both show Not found — Unusable version selection when no release is found; related empty-channel flow
Possibly related, for context: - issue #237 Launcher: Build another version unavailable when Stable and Nightly both show Not found — Unusable version selection when no release is found; related empty-channel flow
feat(versions): one list of installed versions per launcher: versions.json here, builds.json the stable launcher's
Some checks failed
CI / What the change needs (pull_request) Successful in 9s
CI / Package (setup, portable zip, AppImage; Wine self-check) (pull_request) Has been skipped
CI / Lint (actionlint, ShellCheck, gitleaks) (pull_request) Successful in 15s
PR title / Conventional Commit title (pull_request) Successful in 7s
CI / Compile and test (pull_request) Failing after 1m30s
f0c8aa4ef5
Both launchers kept their versions in the same builds.json, so the stable launcher listed the nightly's longshot-builder
versions as installed, with Play. This launcher now keeps its own list, versions.json; at its first start without one, its
rows (in a version folder, marked NupInPlace, or holding longshot-builder's record) move out of builds.json, and the stable
launcher's stay. builds.json is read here only so its folders are never offered as leftovers, listed again or deleted, its
versions' tools and make_game.py's files are not pruned, and Home's card counts its versions.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
HumanBean changed title from feat(versions): after the clean break, a version to add is never an empty list to feat(versions): one list of installed versions per launcher, and a version to add is never an empty list 2026-11-26 07:02:47 +00:00
HumanBean deleted branch feat/add-version-after-clean-break 2026-11-26 07:08:21 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
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
MagicBeanDev/LongshotLauncher!288
No description provided.