fix(storage): deleting the last version offers its build files too #231

Merged
HumanBean merged 1 commit from HumanBean/LongshotLauncher:fix/build-files-after-last into main 2026-11-21 19:14:09 +00:00
Owner

Deleting the last installed version left the build files (compiled code, translations and their stores, often many GB) in the build files folder, and nothing said they were still there. A player who "uninstalls" Longshot this way expects that space back.

Fixes #147

Summary

  • Home's Delete (DeleteViewModel.DeleteNowAsync) checks what is left once no version remains. If the build files folder still holds build files, it opens a new dialog, Delete the build files too?, with their size and folder.
    • Delete them frees them through Disk.FreeWork, which takes only what make_game made (objcache, sa, exefs, probe, system_headers.txt, the object and lift stores). The folder itself stays (the player may have chosen it, and it may hold other things), and so does anything else in it. Saves and their backups are never in it. The dialog stays open until they're deleted so that no build can start on the folder in the meantime.
    • Keep them closes it. The dialog has already said they only make the next build quicker and that Storage can free them later (Faster updates).
  • Nothing is offered while another version is installed, since its next update reuses the files. Nothing is offered when the delete was started from the Storage page either, because that page lists the files itself.
  • Storage.LeftAfterLast(work, versionsLeft) in Core makes that decision, so the tests can reach it.
  • This is not the full uninstall from #200. The launcher's own uninstall is unchanged.

Screenshots

New screenshot scene build-files-left (dotnet run --project tools/screenshots -- <dir> build-files-left); the picture is in the first comment.

Testing

  • python -I tests/test_launcher_core.py: 2604 checks passed. New checks in StorageChecks:

    • the build files are offered only once no version is left, with their size
    • deleting them leaves the folder, the player's other files and a saves/ folder in it
    • Home's delete offers them through Disk.FreeWork and never deletes the folder
    • the dialog is registered in MainWindow.axaml

    The translation catalogs now lack 9 more texts, a warning only (the new dialog's English text).

  • LAUNCHER=$PWD python -I ../Tooling/tests/test_release.py: 3 failures (test_the_bump, test_the_next_stable, test_check_tag_against_the_published_releases). They fail the same way on an unchanged main checkout, are about tags and releases, and are unrelated to this change.

  • dotnet build App: 0 warnings, 0 errors.

🤖 Generated with Claude Code

Deleting the last installed version left the build files (compiled code, translations and their stores, often many GB) in the build files folder, and nothing said they were still there. A player who "uninstalls" Longshot this way expects that space back. Fixes #147 ## Summary - Home's Delete (`DeleteViewModel.DeleteNowAsync`) checks what is left once no version remains. If the build files folder still holds build files, it opens a new dialog, **Delete the build files too?**, with their size and folder. - **Delete them** frees them through `Disk.FreeWork`, which takes only what make_game made (`objcache`, `sa`, `exefs`, `probe`, `system_headers.txt`, the object and lift stores). The folder itself stays (the player may have chosen it, and it may hold other things), and so does anything else in it. Saves and their backups are never in it. The dialog stays open until they're deleted so that no build can start on the folder in the meantime. - **Keep them** closes it. The dialog has already said they only make the next build quicker and that Storage can free them later (Faster updates). - Nothing is offered while another version is installed, since its next update reuses the files. Nothing is offered when the delete was started from the Storage page either, because that page lists the files itself. - `Storage.LeftAfterLast(work, versionsLeft)` in Core makes that decision, so the tests can reach it. - This is not the full uninstall from #200. The launcher's own uninstall is unchanged. ## Screenshots New screenshot scene `build-files-left` (`dotnet run --project tools/screenshots -- <dir> build-files-left`); the picture is in the first comment. ## Testing - `python -I tests/test_launcher_core.py`: 2604 checks passed. New checks in `StorageChecks`: - the build files are offered only once no version is left, with their size - deleting them leaves the folder, the player's other files and a `saves/` folder in it - Home's delete offers them through `Disk.FreeWork` and never deletes the folder - the dialog is registered in `MainWindow.axaml` The translation catalogs now lack 9 more texts, a warning only (the new dialog's English text). - `LAUNCHER=$PWD python -I ../Tooling/tests/test_release.py`: 3 failures (`test_the_bump`, `test_the_next_stable`, `test_check_tag_against_the_published_releases`). They fail the same way on an unchanged `main` checkout, are about tags and releases, and are unrelated to this change. - `dotnet build App`: 0 warnings, 0 errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
fix(storage): deleting the last version offers its build files too
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 22s
e7d80bb161
Deleting the last installed version left the build files folder's compiled
code, translations and stores behind, often many GB, with nothing saying so.
Home's delete now measures them once no version is left and asks whether to
delete them too, with their size and folder; kept, it says Storage frees them
later. Only what make_game made goes (Disk.FreeWork), never the folder, which
the player may have chosen, nor saves or their backups.

Fixes #147

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

Screenshot of the new dialog (scene build-files-left, drawn headless with a temporary home; no game files): Delete the build files too?

Screenshot of the new dialog (scene `build-files-left`, drawn headless with a temporary home; no game files): ![Delete the build files too?](https://git.magicbean.dev/attachments/4cbc00f1-ff0b-4c12-8f35-9e0b6a968306)
HumanBean deleted branch fix/build-files-after-last 2026-11-21 19:14:10 +00:00
Sign in to join this conversation.
No reviewers
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
MagicBeanDev/LongshotLauncher!231
No description provided.