feat(home): offer to delete the old versions' folders updates left on the disk #121
No reviewers
Labels
No labels
area/build
area/install
area/saves
area/tooling
area/ui
area/updates
ci: approved
good first issue
gpu/amd
gpu/intel
gpu/nvidia
help wanted
kind
bug
kind
chore
kind
docs
kind
feature
kind
performance
kind
question
platform/linux
platform/steam-deck
platform/windows
priority
critical
priority
high
priority
low
risk
high
risk
low
risk
medium
status
blocked
status
confirmed
status
duplicate
status
invalid
status
needs-info
status
wontfix
ci: approved
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!121
Loading…
Reference in a new issue
No description provided.
Delete branch "madebyjordan/LongshotLauncher:feat/leftover-folders"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Before #104 each update built the new version in a new folder and left the old one on the disk, a whole game (~40 GB) with no row in the list. The README says "nothing deletes them yet", and #104 lists deleting them as a follow-up. This adds that: when the home opens, it offers to delete those folders once nothing of the player's is left in them.
What changed
The offer (
HomeView.axaml,HomeViewModel): an Old versions left on the disk card, the same kind as the Hookshot and NX2navi offers. It names the versions and the folder, says nothing of the player's is in them (their saves are in the shared folder), and gives what deleting frees once measured. It has two buttons:KeptFoldersin settings.json), so the card doesn't come back.NewFoldermay hand a new build an unlisted game folder.Which folders (
Core/Leftovers.cs,Leftovers.Find): the game folders directly in the builds folder that no build lists. It looks once, when the home opens, afterSaves.Gatherhas taken their saves in on Windows. Never offered:user/save(a gather that hasn't run, or couldn't)user/oruser/saveis a link (the player's own arrangement)mods/: an update to a new folder left the player's mods in the old oneOnly
user/saveis looked at: Gather leaves the saves it took in assave.moved-*beside it, and its backup inoot-save-backups/gather-*keeps them. A finished folder keeps make_game.py's.longshot_exefs/.longshot_romfs, so those are no sign of a stopped build (a first build that stopped has no stamp, so it isn't a game folder).Deleting is
BuildRegistry.DeleteFolder, as a row's Delete is: game folders only, links not followed, never one holding a build's folder or the home.BuildRegistry.Holdsis nowinternalsoLeftoverscan use it. What it frees isDisk.Measureover the leftovers, so a game file still hard-linked into a build isn't counted.README ("A new build's folder is named after its channel"): what the home offers. docs/saves.md (Saves from before): the folder goes with its
save.moved-*, and the gather's backup keeps the save.Every new text is in every catalog, after "Delete" rather than at the end, where other PRs append.
tools/screenshots:
home-leftovers,home-leftover.HomeViewModel.ShowLeftoversis the scenes' stand-in for the disk.Screenshots
From
tools/screenshots, Windows (960x600), in the comment below: the offer for two old versions, and for one.Testing
Windows 11, .NET SDK 10.0.404, on main @
d79e1e4.tests/launcher_core/LeftoverChecks.cs(new), on a scratch builds folder:save.moved-*,.longshot_romfskept), and one with an emptymods/user/save, one with a mod, a stopped first build (no stamp), a folder that isn't a game's, a loose file, a kept folder, one that holds a build's folder, and one that holds the homeuser/a link, and a builds folder entry that is a linkpython -I tests/test_launcher_core.py: on Windows the run stops atShellLinkChecks, the same on main (the shell's shortcut on the test's Unicode scratch path). SoLeftoverChecks,RegistryChecksandSettingsCheckswere also run right afterReleaseNotesChecks, locally, and passed. The link cases need links, so on Windows without Developer Mode they say they were skipped. The full run is CI's, on Linux.Games\Longshot\nightly-130-0caf0618, from an update before #104, meets every rule. It hasuser\save.moved-20261115-121040, nouser\save, nomods, a stamp, and make_game.py's.longshot_*folders. Its save is inoot-save-backups\gather-20261115-121040\nightly-130-0caf0618. Nothing was deleted.dotnet build App/LongshotLauncher.csprojandtools/screenshots: 0 errors.dotnet format --verify-no-changeson the changed files: nothing on the lines changed here.scripts/translations.py: every catalog lacks the same 25 texts as on main.Not tested: pressing Delete in the window on a real leftover. It runs a row's Delete (
BuildRegistry.DeleteFolder), which the checks above run on the foldersFindgives.🤖 Generated with Claude Code
Screenshots (tools/screenshots, Windows, 960x600): the offer for two old versions, and for one.
WIP: feat(home): offer to delete the old versions' folders updates left on the diskto feat(home): offer to delete the old versions' folders updates left on the disk