feat(settings): Free up space says what it deletes, and can clear shader caches #178

Merged
HumanBean merged 1 commit from dyst/LongshotLauncher:feat/free-space-details into main 2026-11-17 20:36:07 +00:00
Member

Free up space deleted gigabytes without saying what, and players having trouble had no way to clear their shader caches. Now it asks first: it lists what it deletes, how big each part is and what it was kept for, and it can clear the shader caches too.

What changed

  • Free up space asks first. A confirmation lists each part of the build files folder that holds something, in plain words, with its size and what it was kept for (Disk.WorkGroups):

    • compiled game code
    • the game's code translated to C
    • the unpacked program
    • what checking a dump unpacked
    • the object store
    • the lift store

    Then it gives the total and what the next build costs (it makes them again, up to as long as a first build).

  • Clearing shader caches, unticked by default. The dialog shows their total size and how many versions they belong to (ShaderCaches.Clear):

    • Only each build's cache/ files the game reads back, plus .part leftovers from an interrupted copy. Nothing else in cache/ or the game folder is touched (saves, settings, mods).
    • Never longshot_pipelines.bin: it holds the pipeline list the build shipped, and only a build writes it again.
    • Never while Longshot runs. The option is greyed out with the reason, and Clear refuses too.
    • Each version then prepares its shaders again at its next start; the dialog says so.
  • Settings say what's kept and why, with the shader caches' size beside the build files'.

  • Disk.WorkBytes is split into a size per part (GroupBytes). ShaderCaches.Keep reuses the new running check.

  • README's Free up space note describes all of this.

Screenshots

New free-space scene in tools/screenshots, and the updated launcher-settings scene: attached in the first comment. Before and after, against main: #178 (comment)

Tested

  • python -I tests/test_launcher_core.py: 1541 checks passed.
    • New checks: every WorkParts entry is in exactly one group, and each group's size (the object store less what is hard-linked with objcache).
    • New checks for clearing caches: what goes, what stays (notes, other files, saves), refusal while Longshot runs, and a linked cache/ not followed (needs symlinks: always on Linux).
  • python -I tests/test_release.py: 37 tests OK.
  • dotnet build App -c Release: 0 warnings, 0 errors.
  • The dialog was drawn with the screenshot tool, not clicked through in a running launcher.

Not done

  • Translations: the new texts are English only. The catalogs already lack about 30 texts each on main, and the check only lists them; they need translators.
  • mise run ci:smoke: mise isn't installed on this PC.
  • Related: issue #147 (Uninstall leaves compilation files behind) is close to this, but not fixed here. PR #150 touches Disk.BuildBytes, which this doesn't change.

The completely cold build is the next PR, stacked on this one.

Free up space deleted gigabytes without saying what, and players having trouble had no way to clear their shader caches. Now it asks first: it lists what it deletes, how big each part is and what it was kept for, and it can clear the shader caches too. ## What changed - **Free up space asks first.** A confirmation lists each part of the build files folder that holds something, in plain words, with its size and what it was kept for (`Disk.WorkGroups`): - compiled game code - the game's code translated to C - the unpacked program - what checking a dump unpacked - the object store - the lift store Then it gives the total and what the next build costs (it makes them again, up to as long as a first build). - **Clearing shader caches, unticked by default.** The dialog shows their total size and how many versions they belong to (`ShaderCaches.Clear`): - Only each build's `cache/` files the game reads back, plus `.part` leftovers from an interrupted copy. Nothing else in `cache/` or the game folder is touched (saves, settings, mods). - Never `longshot_pipelines.bin`: it holds the pipeline list the build shipped, and only a build writes it again. - Never while Longshot runs. The option is greyed out with the reason, and `Clear` refuses too. - Each version then prepares its shaders again at its next start; the dialog says so. - **Settings say what's kept and why**, with the shader caches' size beside the build files'. - `Disk.WorkBytes` is split into a size per part (`GroupBytes`). `ShaderCaches.Keep` reuses the new running check. - README's Free up space note describes all of this. ## Screenshots New `free-space` scene in `tools/screenshots`, and the updated `launcher-settings` scene: attached in the first comment. Before and after, against `main`: https://git.magicbean.dev/MagicBeanDev/LongshotLauncher/pulls/178#issuecomment-43538 ## Tested - `python -I tests/test_launcher_core.py`: 1541 checks passed. - New checks: every `WorkParts` entry is in exactly one group, and each group's size (the object store less what is hard-linked with objcache). - New checks for clearing caches: what goes, what stays (notes, other files, saves), refusal while Longshot runs, and a linked `cache/` not followed (needs symlinks: always on Linux). - `python -I tests/test_release.py`: 37 tests OK. - `dotnet build App -c Release`: 0 warnings, 0 errors. - The dialog was drawn with the screenshot tool, not clicked through in a running launcher. ## Not done - **Translations:** the new texts are English only. The catalogs already lack about 30 texts each on `main`, and the check only lists them; they need translators. - **`mise run ci:smoke`:** mise isn't installed on this PC. - **Related:** issue #147 (Uninstall leaves compilation files behind) is close to this, but not fixed here. PR #150 touches `Disk.BuildBytes`, which this doesn't change. The completely cold build is the next PR, stacked on this one.
feat(settings): Free up space says what it deletes, and can clear shader caches
All checks were successful
CI / Compile and test (pull_request) Has been skipped
CI / Conventional Commit title (pull_request) Successful in 5s
6e38c4136c
Free up space now asks first: each part of the build files folder in plain
words, with its size and what it was kept for, and what the next build costs.
An unticked option also clears every version's shader caches (never the
shipped pipeline list, never while Longshot runs). The settings say what is
kept and why.

Assisted-by: Claude Code
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Author
Member

Screenshots (tools/screenshots: free-space, launcher-settings): the confirmation, and the settings' new line about what is kept and why.

free-space.png

launcher-settings.png

Screenshots (tools/screenshots: free-space, launcher-settings): the confirmation, and the settings' new line about what is kept and why. ![free-space.png](https://git.magicbean.dev/attachments/ec677b71-975e-49b9-916b-fdd49382f731) ![launcher-settings.png](https://git.magicbean.dev/attachments/19594f52-35dd-4946-926b-fa7bf7de4dd8)
Author
Member

Screenshots: before and after

Drawn with tools/screenshots (headless, the same scene and window on both sides): before from main @ 321a9e1, after from this branch.

Settings: the build files line and Free up space

Before

before: launcher-settings, main

After

after: launcher-settings, this PR

The Free up space confirmation

New: no before. On main, Free up space deletes at once, without a confirmation.

After

after: free-space, this PR

## Screenshots: before and after Drawn with `tools/screenshots` (headless, the same scene and window on both sides): before from `main` @ 321a9e1, after from this branch. ### Settings: the build files line and Free up space **Before** ![before: launcher-settings, main](https://git.magicbean.dev/attachments/86bc3063-87d5-4e49-8a72-483913e66be6) **After** ![after: launcher-settings, this PR](https://git.magicbean.dev/attachments/19594f52-35dd-4946-926b-fa7bf7de4dd8) ### The Free up space confirmation New: no before. On `main`, Free up space deletes at once, without a confirmation. **After** ![after: free-space, this PR](https://git.magicbean.dev/attachments/ec677b71-975e-49b9-916b-fdd49382f731)
Author
Member

Before and after screenshots added.

Before and after screenshots added.
dyst changed title from WIP: feat(settings): Free up space says what it deletes, and can clear shader caches to feat(settings): Free up space says what it deletes, and can clear shader caches 2026-11-17 19:08:07 +00:00
HumanBean deleted branch feat/free-space-details 2026-11-17 20:36:08 +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!178
No description provided.