feat(storage): a Storage page, and tabs in the title bar #221
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
3 participants
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
MagicBeanDev/LongshotLauncher!221
Loading…
Reference in a new issue
No description provided.
Delete branch "dyst/LongshotLauncher:feat/storage-page"
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?
Players can't see what Longshot keeps on their disk, or let any of it go one part at a time: the only tool was Settings' Free up space, all or nothing, and the launcher quietly kept up to ~8.5 GB of older builds' work (the object and lift stores). Old versions an update left in the builds folder took ~25-40 GB each and showed nowhere but a notice on Home.
Type: feat · Risk: medium (it deletes folders; every delete goes through the launcher's existing guarded deletes) · Tested on: Windows 11 Pro (22631), .NET SDK 10.0.404, the launcher run against a real launcher home with a nightly, PR runtimes and an old version's folder · Not tested: Linux
What changed
A Storage page (the title bar's Storage tab, and Manage storage in Settings),
Core/Storage.cs,App/ViewModels/StorageViewModel.cs:Game files, one row per copy on the disk (
Disk.MeasureCopies):romfsfolders that share hard links are one copy, named by the versions using it, with what removing them frees. A copy that folders outside the launcher's also link to (a developer's base, an old builds folder) says so and how little removing its versions frees. On Windows it names those folders (FileLinks.Names,FindFirstFileNameW); Linux has no call to list a file's names, so there it only says "other folders".Installed games lists each version (removed through Home's own delete, saves brought out first) and every game folder in the builds folder that no row lists (
Leftovers.All): old versions an update left, folders the player chose to keep, a version taken off the list with its files kept. Each is measured whole, its game files counted with the copies, and deleted throughLauncherService.DeleteLeftover(a save still in it is backed up first). A folder holding the player's mods is never deleted from here.Shader caches: one row per version, plus the shared shader store from #210 as its own row, cleared on its own (
ShaderCaches.ClearStore; each version's caches see the store changed and start over).Build work is kept by default. The object and lift stores are passed to make_game, capped at 4 GB of objects and two translations. Turning off Keep the most recent build's files cleans the build work and stores after a successful build (
Storage.AfterBuild); a failed or stopped build can leave them behind. Settings' Free up space dialog is replaced by Manage storage.Navigation: the title bar has tabs, each icon with a small label: Home, Saves, NFC, Storage, Settings. The page shown is lit, and the tabs are on those pages only (a build or a transfer keeps its own way back). The pages' Back/Done buttons and Home's Manage saves and NFC cards are gone. Leaving Settings saves it and leaving NFC stops a scan (
ILeavingPage). A controller's B goes Home where a page has no back of its own.Rebased on #210 and #220
#210's Free up space store option and its texts (
ShaderCaches.ClearText,StoreHint) went with the dialog. The store is the Storage page's row instead, so nothing #210 could clear is lost.Testing
Core checks:
python -I tests/test_launcher_core.py, 2163 passed. The new checks are inStorageChecks.cs, with additions toLeftoverChecks,PadChecks,ScreenChecksandShaderCacheChecks. They cover:Run locally with
UnlistedChecksandSavesChecks.Runskipped: both fail on main on this Windows PC too. The skip is not in the commit.Build:
dotnet build LongshotLauncher.slnx -warnaserror, Debug and Release, 0 warnings.Tooling's
test_release.py: 3 failures (test_the_bump,test_the_next_stable,test_check_tag_against_the_published_releases). main atdad2200fails the same three on this PC.mise run lintnot run: gitleaks and shellcheck aren't installed here. No shell script changed.The real launcher, on a home with a nightly, two PR runtimes in the builds folder and their dev bases:
Screenshots: the
tools/screenshotsscenesstorage,storage-games,storage-copies,storage-shaders,storage-drives,storage-running,storage-deleting,storage-measuring,storage-drive-candhome. Pictures are in the first comment.🤖 Generated with Claude Code
Screenshots, from
tools/screenshots(made-up builds and paths, nothing of the game):The Storage tab: Faster updates, the bar and the groups' tabs, the labelled title-bar tabs

Installed games: the listed versions, and an old version's folder no row lists

Game files, one row per copy: a copy shared by two versions, an old version's own, and one linked from folders outside the launcher's, named

Shader caches: one row per version, and the shared shader store

Two drives: the dropdown in place of the free space

Home: no saves or NFC cards; the tabs reach them

Recommendation: Request changes. The Storage page gives players useful control over disk space, but its deletion paths can overlap a build, remove mods added after measurement, and cross a selected drive boundary. Disabling the build stores also removes reuse for returning to an older build without measuring the added build time.
Adds a Storage page with per-item cleanup, moves navigation into title-bar tabs, and replaces the build-store policy with retention of the most recent build. The Windows walkthrough shows parts of the UI working. Deletion needs launcher-wide coordination, and the size estimates and deletion targets need to come from the same set of files.
Does it help: Unproven for the build-cache tradeoff. The description cites up to about 8.5 GB retained under the old policy and about 1.6 GB of translation data per store write. It provides no repeated base-versus-HEAD runs on matching hardware, builds and settings. Measure stable-to-nightly-to-stable, a return to an already-built PR, and a routine forward update, recording elapsed time, peak disk use and retained bytes.
Other systems: The cleanup paths share files with builds, prefetch, Home's deletion actions, save backups and the shared shader store. Home also uses Disk.Measure, so its measurements take the modified path. Linux and Steam Deck drive filtering and deletion were untested. Clearing shader caches or the shared store can delay the next launch across GPU vendors. The PR supplies no cross-vendor shader rebuild timings. No direct change to gameplay rendering, audio or input was found. Controller navigation changes in the launcher.
Switches: KeepBuildFiles defaults to true and retains the latest build's work. With it off, cleanup must finish before another operation can use that work directory. LONGSHOT_OBJ_STORE and LONGSHOT_LIFT_STORE change from launcher-selected paths to unset in make_game. LONGSHOT_OBJ_STORE_GB changes from 4 to unset, and LONGSHOT_LIFT_STORE_KEEP from 2 to unset. This also strips user-supplied values. The README describes the policy, but the universal default lacks build-time evidence.
Reviewed:
0b1c6f990aagainstdad2200360: Read base AGENTS.md, CONTRIBUTING.md and docs/pull-requests.md. No review checklist or Forgejo PR template was present. Read the application and core diff, the new Storage code and view, and relevant callers for build completion, navigation, prefetch, shader caches, deletion and saves. Reviewed changed portions of the larger existing files. Skimmed the translation removals, screenshot scenes and author-reported runs. The committed screenshot was not visually inspected, and the supplied comments contained no screenshots or tester runs.; nothing run (a code review).Checked and fine:
Blocking (to change before merge)
Waiting on the author (a run, a measurement or a decision; no edit does it)
Suggestions (the author may take or leave)
Testing: Static review only. The author reports 2,163 core checks with UnlistedChecks and SavesChecks skipped locally, clean Windows Debug and Release builds, and a Windows walkthrough. Three Tooling release checks reportedly fail on both base and HEAD on that PC. No lint result or Linux run was supplied. The local author report does not establish a full-suite or ci:smoke pass. Add regression coverage for re-entering Storage mid-delete, a refresh racing deletion, mods added after measurement, and nested mount boundaries.
Overlaps and merge order: #210's shared shader store and #220's shader-cache transfer behavior are part of the base this change builds on. No separate merge prerequisite was identified in the supplied checkout.
Automated code review by BeanBot (gpt-6.2-sol), on the pull request's opening. Nothing was run; a maintainer decides.
@ -614,0 +615,4 @@// keeping off; an earlier launcher's object and lift stores go. Off the window's thread: thousands of files)var work = service.Work;var keep = s.KeepBuildFiles;_ = Task.Run(() => Storage.AfterBuild(work, keep));With retention off, this can still delete objcache or sa when the next build starts. Await it before Ready or keep the build's exclusive work guard until it finishes.
@ -0,0 +56,4 @@places = PlacesOf(main);CancelCommand = new Command(() => { confirming = null; confirmingAll = false; RaiseItems(); });AskAllCommand = new Command(() => { confirmingAll = true; confirming = null; RaiseItems(); }, () => CanClearAll);RemoveAllCommand = new Command(() => _ = RemoveAsync(Clearable().ToList()), () => !removing);Freeze the confirmed target list. A download finishing during confirmation can otherwise add staging files to the operation.
@ -0,0 +404,4 @@var show = refusal != Storage.Refusal.NotRemovable && i.Bytes > 0 && confirming != i&& (i.Kind != Storage.Kind.Programs || version != null);return new Row(name, about, Durations.Size(i.Bytes), tag, tagInk, tagFill,show, show && refusal == Storage.Refusal.None && !removing,Refresh sets IsBusy, so checking only removing leaves old rows actionable during a scan. Use one busy guard for measurement and deletion.
@ -0,0 +406,4 @@return new Row(name, about, Durations.Size(i.Bytes), tag, tagInk, tagFill,show, show && refusal == Storage.Refusal.None && !removing,removing ? Tr.T("Wait until what is being removed is gone.") : WhyNot(i.Kind, refusal), confirming == i, confirm,version != null ? new Command(() => Main.Home.AskDelete(version, d => Deleted(d, version.Entry.Id), () => Deleting(version)))This allows Storage to delete a listed version with mods. Apply the promised mod guard here and recheck it before the folder goes.
@ -0,0 +539,4 @@// (a game folder no row lists: the launcher's delete, as Home's offer does it, its save backed up first)void DeleteFolder(Storage.Game g){if (service.DeleteLeftover(new Leftover(g.Folder, null)) is { } backup) backups.Add(backup);A mod added after measurement can be deleted here. Recheck mods and custom links at the point of deletion.
@ -0,0 +547,4 @@{foreach (var i in parts){var r = Storage.Remove(i, places, running, downloading, own, deleteFolder: DeleteFolder);Tabs let this worker outlive the page while Home starts a build. The prefetch check can also go stale before staging deletion. Coordinate removal with the launcher operations that use these files.
@ -0,0 +548,4 @@foreach (var i in parts){var r = Storage.Remove(i, places, running, downloading, own, deleteFolder: DeleteFolder);if (r == Storage.Refusal.None) freed += i.Frees;This credits estimated bytes even for skipped files, including the active launcher log. Report completed removal separately from the estimate.
@ -101,0 +91,4 @@// translation ~1.6 GB a version), which only going back to one of them used, and saved each new translation's// lifted C whole during the build. Null: one set on the PC is not passed on either. What an earlier launcher's stores// left goes after the next build (Storage.AfterBuild), or from the Storage page)["LONGSHOT_OBJ_STORE"] = null,Measure the time lost when revisiting a previously built stable or PR, as well as forward-update time and disk savings, before disabling both stores by default.
@ -0,0 +161,4 @@var measured = Disk.MeasureCopies(parts.Select(x => x.Path).ToList(), (i, name) =>parts[i].Program ? NotProgram.Contains(name): parts[i].Kind == Kind.Unlisted ? name is Romfs or Exefs: parts[i].Kind == Kind.ShaderStore ? !ShaderCaches.StoreNames.Any(n => name == n || name.StartsWith(n + ".", StringComparison.Ordinal))The walker includes matching directories and can walk a linked root. Use the same direct-file allowlist as ClearStore and reject linked roots.
@ -0,0 +190,4 @@var caches = ShaderCaches.ClearableBytes(path);var notes = Math.Max(0, Disk.FolderBytes(cache) - caches);Add(Kind.Programs, game, drive, s.Counted + notes, s.Frees + notes);Add(Kind.ShaderCache, game, drive, caches, caches);Hard-linked caches are counted in full for each game and each removal claims the full bytes. Include them in identity-based accounting.
@ -0,0 +299,4 @@foreach (var g in p.Games.Where(g => !g.Unlisted && On(g.Folder))) DeleteFiles(Path.Combine(g.Folder, GameLogs), null);break;default:if (On(p.Work)) Disk.FreeWork(p.Work, WorkPartsOf(item.Kind));A mount under work can be on another drive. Check the actual work parts and keep recursive removal inside the selected mount.
Pushed
c105e1e: during the first measure the bar is hidden, so the progress notice sits where the bar goes instead of below an empty space. Measuring again keeps the bar (it has the last sizes) with the notice below it, as before. Core checks: 2163 passed. Scene: storage-first-measure.WIP: feat(storage): a Storage page, and tabs in the title barto feat(storage): a Storage page, and tabs in the title bar@fix
I changed this pull request where an edit could (the rest needs runs, measurements or decisions): the new head is
1c8f7ca003.Changed
Changed in part (the rest is for the author)
Left for the author
Nothing was built or run: check the change. Its review follows.
Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
Recommendation: Request changes. Storage gives players useful control over disk use, but removal can still overlap Play or a build and can delete files on an unselected filesystem. A Stop accepted just before the build’s success callback can also leave cleanup running after Home has reopened.
Adds title-bar tabs and a Storage page that shows where disk space went and lets players remove individual categories. The latest fixes preserve the capped build stores by default, recheck for mods after save backup, and serialize staging cleanup with installs. The remaining cost is coordination across navigation, deletion, builds, and inventory refresh.
@fixwill do (14)App/ViewModels/StorageViewModel.cs:554: Capturing Places leaves the deletion lifetime page-local and the callback still reads Registry.Builds on the worker. Start a large removal, switch to Home, then start a build or return to a new Storage page. Hold a launcher-wide operation guard through completion and shutdown, snapshot registry inputs under that guard, and test paused deletion across navigation.App/ViewModels/BuildStepViewModel.cs:579: Finalizing starts in Complete, after the worker posts Exited. If the player confirms Stop after make_game has returned successfully but before the dispatcher handles Exited, Stop opens Home and the queued callback still registers the build, deletes its work with retention off, and can replace a newer page with Ready. Keep ownership through the exit handoff and settle Stop versus success once before either path navigates or deletes. Test with the success callback held in the queue.Core/Storage.cs:273: Drive scoping checks only the selected tree's top-level path. On Linux, mount another filesystem inside a game's folder and Remove from the parent drive will recurse into it. On Windows,Disk.DriveNamealso treats a volume mounted in a directory as the path's drive letter. Use filesystem identities for inventory and deletion, and refuse whole-folder removals that would cross the selected filesystem.App/ViewModels/StorageViewModel.cs:153: The generation only tracks scan starts and explicit snapshot clears. A scan of listed files can publish after Home deletes them from disk and keeps the same row, and a new Storage page can scan while cleanup is active. Invalidate around every storage mutation and publish scans only outside an active mutation.App/ViewModels/StorageViewModel.cs:580: The new wording qualifies the bytes but still reports completion when files were skipped. If Windows holds a previous log open, DeleteFiles swallows the IOException and the toast gives no indication that the log stayed. Return removed, skipped and failed outcomes and use them in the completion notice.Core/Storage.cs:189: Per-version caches bypass the identity census. If two versions hard-link a shader cache, each row counts the full file and says it frees the full size. Store measurement also walks matching directories such asspirv.pack.backup/, whichClearStoredeliberately leaves alone. Feed the exact cache and store file sets into the same identity-aware census used for other categories.App/ViewModels/StorageViewModel.cs:500: Bulk removal adds estimates for deleting each folder alone. Two unlisted versions that are the only holders of a shared 25 GB romfs can free it together, but the confirmation excludes it. Use the union of the confirmed targets for the estimate and freeze that set when opening the confirmation so a newly eligible item cannot join it.Core/Storage.cs:135: The Your Data inventory misses the shared user settings and classifies older per-game settings at the game root as program files. For example,SaveEnvironment.LongshotUsercan holdmods.jsonandlongshot_options.inibesidesave, but Storage only supplies the shared save subtree. Inventory the known settings locations and keep the categories disjoint.App/ViewModels/StorageViewModel.cs:159: A first-scan exception says the last successful sizes are shown even when none exist. A permission error swallowed by Disk.Walk can instead publish a partial scan with a fresh timestamp. Distinguish failed and partial scans, keep the prior successful timestamp, and clear busy state in a finally path.App/ViewModels/StorageViewModel.cs:108: Opening Storage synchronously discovers games and checks unlisted mod trees on the UI thread, then repeats discovery for the initial measurement. A sleeping build drive or a large mod tree can stall navigation before the spinner appears. Snapshot registry entries on the UI thread, then discover folders and measure them on the worker.tests/launcher_core/PadChecks.cs:106: The new assertion checks the Home tab's XAML marker and passes if the fallback inPadInput.Backis deleted. Exercise B on a tab page with no local Back, in a modal, and in a wizard so the check covers dispatch and priority.README.md: The PR still promises default removal of both stores, but default builds use and retain them. (more on the line)Core/ToolsPrefetch.cs:141: Staging cleanup now waits for a fetch that starts after the button’s last busy refresh. (more on the line)Core/BuildRegistry.cs:456: The tests do not exercise the new post-backup guard. (more on the line)More: does it help, other systems, switches, what was read
Does it help: Unproven on 7ba82b1. The earlier Windows run showed the inventory, drive picker, and unlisted-folder removal working. The PR estimates 25–40 GB per old game folder, but gives no before-and-after disk measurement for the latest head. Default cache retention matches the base, and the claimed default disk saving no longer applies.
Other systems: Windows names external hard-link holders. Linux and Steam Deck use the same inventory and deletion paths, with mount scoping still open. Clearing the shared shader store makes versions prepare shaders again across GPU vendors. Build cleanup shares work paths with later builds, and staging cleanup shares the prefetch installer’s semaphore. Home and Storage share the unlisted-folder delete and surface its backup path.
Switches:
KeepBuildFilesis new and defaults to on, preserving base behavior after successful builds. Turning it off requests removal of the work files and both stores after a successful build.LONGSHOT_OBJ_STOREandLONGSHOT_LIFT_STOREstill point inside the work folder, withLONGSHOT_OBJ_STORE_GB=4andLONGSHOT_LIFT_STORE_KEEP=2, as on the base. The on default preserves existing build reuse. The PR description still describes the superseded defaults.Reviewed:
1c8f7ca003againstdad2200360: The checkout was at 7ba82b1eef38, despite the PR header namingc105e1e. Read AGENTS.md, CONTRIBUTING.md, the commits, and the full d53d7c4-to-HEAD diff. Read the Storage view model, Storage core, Leftovers, ToolsPrefetch, and the window close handler in context. Read the relevant sections of BuildStepViewModel, BuildRegistry, Disk, FileLinks, the save backup code, launcher services, navigation, and core tests. Earlier UI and documentation changes, translations, and screenshot fixtures were skimmed within the re-check scope. Remote images were unavailable.; nothing run (a code review).Checked and fine:
Testing: Read-only review. The author reported 2,163 core checks and a Windows launcher run on earlier revisions, with two checks skipped locally that also fail on the base. Three Tooling failures were reported on both branches. The latest fix report records no test run, supplied CI lists no failures or pending checks, and Linux and Steam Deck behavior remains unverified.
Overlaps and merge order: #210 and #220 are already incorporated in the review base. No other overlap was identified from the checkout and supplied discussion.
Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.
@ -0,0 +394,4 @@}if (selected == Storage.Group.FasterUpdates){var kept = KeepBuildFiles && i.Kind is Storage.Kind.RecentCode or Storage.Kind.RecentTranslation or Storage.Kind.OlderCode or Storage.Kind.OlderTranslations;L28 (minor): With KeepBuildFiles on, the restored object and lift stores still get a Goes after the next build badge. They survive that build, and the checkbox's size omits them. Show both stores as kept while the setting is on and make the label and size cover the full retained set.
@ -454,1 +454,3 @@try { Toolchains.DeleteTree(full); }try{if (guard != null && !guard()) throw new IOException("The folder holds mods or links; move them out before removing it.");L31 (minor): The tests do not exercise the new post-backup guard. Use the existing save backup test hook to add a mod after the initial check, then assert that the game folder and mod survive and FolderNotDeleted carries the verified backup path. The check should fail if the guard moves above the backup.
@ -138,0 +138,4 @@/// Run staging cleanup under the same exclusion as an install.public void CleanStaging(Action cleanup){one.Wait();L30 (minor): Staging cleanup now waits for a fetch that starts after the button’s last busy refresh. If the update check starts a download while the confirmation is open, clicking Remove can leave Storage showing removal progress for the duration of the fetch. Try to acquire the same semaphore immediately and return Downloading if it is held. Cover the case with a paused fetch.
@ -484,3 +475,1 @@pipeline notes (`longshot_pipelines.bin`), which hold the list the build shipped and only a build writes again. Eachversion then prepares its shaders again at its next start. The settings say what is kept and why, with the shadercaches' size beside the build files'.- **Build work is kept.** The build files folder keeps the last build's compiled objectsL29 (minor): The README and PR description still say the stores are disabled and old data goes after the next build. With the default on, players can still have both stores afterward. Update the README, the PR-build guide and the description to explain the restored caps and what opting out removes.
@ -1125,3 +1126,3 @@&& l.Environment["LONGSHOT_SYSROOT"] == Path.Combine(lin.LibRoot, "sysroot") && l.Environment["EMSDK"] == Path.Combine(lin.LibRoot, "emsdk")&& l.Environment["LONGSHOT_FFX_SDK"] == null, "Linux environment (DLSS builds its own Vulkan back end).");Require(l.Environment["LONGSHOT_OBJ_STORE"] == Path.Combine("/w", "obj-store") && l.Environment["LONGSHOT_LIFT_STORE"] == Path.Combine("/w", "lift-store")Require(l.Environment["LONGSHOT_OBJ_STORE"] == Path.Combine("/w", Disk.ObjectStore)L27: The Linux assertion references stores after the same commit removed its declaration. The core test project fails to compile on either host OS. Assert the restored store paths under /w and the 4 GB and two-translation caps, as the Windows check does for its work folder.
@fix
I changed this pull request where an edit could (the rest needs runs, measurements or decisions): the new head is
e92dd57d3f.Changed
Changed in part (the rest is for the author)
Left for the author
Nothing was built or run: check the change. Its review follows.
Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
Recommendation: Request changes. The new storage test declares the same local twice and prevents the core suite from compiling. Removal can still race a build or cross into an unselected filesystem, and changing the builds folder can leave Storage offering to delete folders from the previous location.
Storage gives players a breakdown of disk use, lets them remove individual categories, and replaces the all-or-nothing cleanup dialog. Title-bar tabs make Storage, Saves, NFC and Settings easier to reach. The latest fix improves hard-link accounting, protects unlisted games with mods under user/mods, and moves game discovery to the worker. The remaining cost is coordinating deletion, measurement and build completion across pages.
@fixwill do (13)App/ViewModels/StorageViewModel.cs:554: Capturing Places leaves the deletion lifetime page-local and the callback still reads Registry.Builds on the worker. Start a large removal, switch to Home, then start a build or return to a new Storage page. Hold a launcher-wide operation guard through completion and shutdown, snapshot registry inputs under that guard, and test paused deletion across navigation.App/ViewModels/BuildStepViewModel.cs:579: Finalizing starts in Complete, after the worker posts Exited. If the player confirms Stop after make_game has returned successfully but before the dispatcher handles Exited, Stop opens Home and the queued callback still registers the build, deletes its work with retention off, and can replace a newer page with Ready. Keep ownership through the exit handoff and settle Stop versus success once before either path navigates or deletes. Test with the success callback held in the queue.Core/Storage.cs:273: Drive scoping checks only the selected tree's top-level path. On Linux, mount another filesystem inside a game's folder and Remove from the parent drive will recurse into it. On Windows,Disk.DriveNamealso treats a volume mounted in a directory as the path's drive letter. Use filesystem identities for inventory and deletion, and refuse whole-folder removals that would cross the selected filesystem.App/ViewModels/StorageViewModel.cs:153: The generation only tracks scan starts and explicit snapshot clears. A scan of listed files can publish after Home deletes them from disk and keeps the same row, and a new Storage page can scan while cleanup is active. Invalidate around every storage mutation and publish scans only outside an active mutation.App/ViewModels/StorageViewModel.cs:597: The notice now reports skipped and failed logs, but other removals can still report success after skipping files. If the shader-store directory becomes unreadable after measurement, StoreFiles returns an empty list, ClearStore returns zero, and Storage reports completion using the old estimate. Carry deletion outcomes through the shader and other removal paths and cover both a locked log and an unreadable store.App/ViewModels/StorageViewModel.cs:500: Bulk removal adds estimates for deleting each folder alone. Two unlisted versions that are the only holders of a shared 25 GB romfs can free it together, but the confirmation excludes it. Use the union of the confirmed targets for the estimate and freeze that set when opening the confirmation so a newly eligible item cannot join it.App/ViewModels/StorageViewModel.cs:137: A failed refresh now leaves the last sizes and timestamp on screen but replaces their discovered paths with an unfiltered registry snapshot. A later log removal can therefore act on a different set of games than the displayed total. Publish paths, sizes and timestamp together on success, distinguish first-scan failure and partial scans, and clear busy state in finally.App/ViewModels/StorageViewModel.cs:60: Game and mod discovery now run on the worker, but opening Storage still calls RunningNow synchronously. On Linux that reads cmdline and comm under /proc before the spinner can paint. PlacesOf also probes for the shared user directory. Move these probes to the initial worker pass and keep affected actions disabled until it finishes.tests/launcher_core/PadChecks.cs:106: The new assertion checks the Home tab's XAML marker and passes if the fallback inPadInput.Backis deleted. Exercise B on a tab page with no local Back, in a modal, and in a wizard so the check covers dispatch and priority.README.md: The PR description still promises that make_game no longer receives the object and lift stores. Update it to say both are kept by default, capped at 4 GB of objects and two translations, and that opting out cleans them after a successful build. A failed or stopped build can leave them behind.tests/launcher_core/StorageChecks.cs:95: The new store fixture declares shaderStore in the same method scope as the existing declaration at line 277. (more on the line)App/ViewModels/StorageViewModel.cs:124: The snapshot key now uses listed rows and omits the builds folder used for unlisted discovery. (more on the line)App/ViewModels/StorageViewModel.cs:423: The new census can assign zero counted bytes to a version that still has a removable cache. (more on the line)Since the last review (on
1c8f7ca003)Resolved: L15 (Per-version caches bypass the identity census. If two versions hard-link a shader cache, e…); L19 (The settings list omits mouse_sens.txt and present.txt, which Saves.PlayerFiles already id…); L30 (Staging cleanup now waits for a fetch that starts after the button’s last busy refresh. If…); L31 (The late-mod case creates a verified delete backup in windows.BackupRoot. The subsequent d…)
Still open: L3 (Capturing Places leaves the deletion lifetime page-local and the callback still reads Regi…); L5 (Finalizing starts in Complete, after the worker posts Exited. If the player confirms Stop…); L7 (Drive scoping checks only the selected tree's top-level path. On Linux, mount another file…); L11 (The generation only tracks scan starts and explicit snapshot clears. A scan of listed file…); L13 (The notice now reports skipped and failed logs, but other removals can still report succes…); L16 (Bulk removal adds estimates for deleting each folder alone. Two unlisted versions that are…); L20 (A failed refresh now leaves the last sizes and timestamp on screen but replaces their disc…); L22 (Game and mod discovery now run on the worker, but opening Storage still calls RunningNow s…); L24 (The new assertion checks the Home tab's XAML marker and passes if the fallback in `PadInpu…); L29 (The PR description still promises that make_game no longer receives the object and lift st…)
New: L32 (Scanning user/mods directly bypasses Disk.Walk's link check on user. If a version's user d…); L33 (The unlisted-game guard checks only the root mods directory. An unlisted folder with a reg…); L34 (The new store fixture declares shaderStore in the same method scope as the existing declar…); L35 (The snapshot key now uses listed rows and omits the builds folder used for unlisted discov…); L36 (The new census can assign zero counted bytes to a version that still has a removable cache…)
More: does it help, other systems, switches, what was read
Does it help: Unproven at b73bfc2. Earlier Windows testing reports 2,163 core checks with two suites skipped, clean Debug and Release builds, and a manual Storage walkthrough. There is no Linux run or matched before-and-after timing for opening Storage or rebuilding with retention off. The latest core fixture has a compile error.
Other systems: Windows and Linux share the Storage and build paths but differ in process discovery, hard-link enumeration and mount handling. Home, Play, build completion and download staging can touch paths Storage displays or removes. Unlisted deletion backs up saves and checks both mod locations. Shared shader-store removal affects shader preparation across versions. Linux and Steam Deck behavior remain unverified.
Switches: KeepBuildFiles is new and defaults to on, preserving the recent build's work and the capped stores. Off clears them after a successful build. The existing LONGSHOT_OBJ_STORE and LONGSHOT_LIFT_STORE paths and their limits of 4 GB and two translations remain in effect during the build. README and the PR-build guide describe the current default and cleanup timing.
Reviewed:
e92dd57d3fagainstdad2200360: Read AGENTS.md, CONTRIBUTING.md, the commit log and the six files changed since 63faa36 in full. Read the ledger-related sections of build, navigation, Home deletion, filesystem, shader, save and download code. Skimmed the remaining base diff, translations, screenshot fixtures and reported runs. No review checklist or PR template was present. The checkout is b73bfc2, matching the supplied range-diff.; nothing run (a code review).Checked and fine:
Testing: Read-only review. No builds or tests executed. The supplied CI record lists no failing or running checks. The reported Windows results predate b73bfc2, and the fix report records no test run for the latest changes.
Overlaps and merge order: #210 and #220 are already in the base. No pending merge-order dependency is shown.
Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.
@ -0,0 +121,4 @@public sealed record Snapshot(string Key, IReadOnlyList<Storage.Item> Items, DateTimeOffset At, Storage.Places Places);/// The places as one text: another version, a folder moved, and a kept measure is not theirsstatic string KeyOf(Storage.Places p) => string.Join("\n",L35: The snapshot key now uses listed rows and omits the builds folder used for unlisted discovery. Measure Storage, change only the builds folder in Settings, then reopen Storage. It restores the old unlisted rows and their Remove actions, and DeleteLeftover can still delete a folder under the old root. Include the discovery root in the key and revalidate unlisted targets against the current root before deletion.
@ -0,0 +420,4 @@: Tr.T(info.About);if (version != null && View.FirstOrDefault(c => c.Kind == Storage.Kind.ShaderCache && c.Game?.Id == i.Game!.Id) is { Bytes: > 0 } cache)about = Tr.F("Its program and shader list. Removing it also deletes its {0} of shader caches", Durations.Size(cache.Bytes));var show = refusal != Storage.Refusal.NotRemovable && i.Bytes > 0 && confirming != iL36 (minor): The new census can assign zero counted bytes to a version that still has a removable cache. With the two hard-linked caches in StorageChecks, the second version loses its Remove button and is excluded from Remove all at line 486. Use the presence of clearable files for eligibility and keep counted bytes for the usage total.
@ -167,3 +200,1 @@var mods = Path.Combine(dir, "mods");if (IsLink(mods) || Directory.Exists(mods) && Directory.EnumerateFileSystemEntries(mods, "*", SearchOption.AllDirectories).Any(e => File.Exists(e))) return false;return EmptyMods(Path.Combine(dir, "mods")) && EmptyMods(Path.Combine(dir, "user", "mods"));L33: The unlisted-game guard checks only the root mods directory. An unlisted folder with a regular user/mods/pack file and no root mods passes the guard and Remove deletes the pack. Storage now inventories user/mods for listed games. Use the same mod locations in discovery and the final deletion guard, and cover an unlisted folder with mods under user.
@ -0,0 +139,4 @@parts.Add((g.Folder, Kind.ModsAndSettings, g, false));parts.Add((Path.Combine(g.Folder, User), Kind.Saves, g, false));parts.Add((Path.Combine(g.Folder, User), Kind.ModsAndSettings, g, false));var user = new DirectoryInfo(Path.Combine(g.Folder, User));L32 (minor): Scanning user/mods directly bypasses Disk.Walk's link check on user. If a version's user directory links to the shared user directory, a regular file in shared user/mods can be counted through both paths on Linux. Check the user directory for a link before scanning its children and cover a linked parent in StorageChecks.
@ -0,0 +92,4 @@"Hard-linked caches count once and neither version frees the shared file alone.");File.Delete(linkedCache);Touch(linkedCache, new string('s', 1000));var shaderStore = Path.Combine(root, "shader-store");L34: The new store fixture declares shaderStore in the same method scope as the existing declaration at line 277. C# rejects the duplicate local. Give the new fixture its own variable and directory.
@fix
I didn't fix this pull request: it failed (the Codex runner answered 409: busy). Nothing was pushed.
Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@fix
@fix
@fix
I changed this pull request where an edit could (the rest needs runs, measurements or decisions): the new head is
c9eb512415.Changed
Changed in part (the rest is for the author)
Left for the author
Still for the author (no edit does these)
App/ViewModels/StorageViewModel.cs:554: Capturing Places leaves the deletion lifetime page-local and the callback still reads Registry.Builds on the worker. Start a large removal, switch to Home, then start a build or return to a new Storage page. Hold a launcher-wide operation guard through completion and shutdown, snapshot registry inputs under that guard, and test paused deletion across navigation.Core/Storage.cs:273: Drive scoping checks only the selected tree's top-level path. On Linux, mount another filesystem inside a game's folder and Remove from the parent drive will recurse into it. On Windows,Disk.DriveNamealso treats a volume mounted in a directory as the path's drive letter. Use filesystem identities for inventory and deletion, and refuse whole-folder removals that would cross the selected filesystem.App/ViewModels/StorageViewModel.cs:153: The generation only tracks scan starts and explicit snapshot clears. A scan of listed files can publish after Home deletes them from disk and keeps the same row, and a new Storage page can scan while cleanup is active. Invalidate around every storage mutation and publish scans only outside an active mutation.App/ViewModels/StorageViewModel.cs:500: Bulk removal adds estimates for deleting each folder alone. Two unlisted versions that are the only holders of a shared 25 GB romfs can free it together, but the confirmation excludes it. Use the union of the confirmed targets for the estimate and freeze that set when opening the confirmation so a newly eligible item cannot join it.tests/launcher_core/PadChecks.cs:106: The new assertion checks the Home tab's XAML marker and passes if the fallback inPadInput.Backis deleted. Exercise B on a tab page with no local Back, in a modal, and in a wizard so the check covers dispatch and priority.Nothing was built or run: check the change. Its review follows.
Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
Recommendation: Request changes. Storage removal can outlive its page and race a build or Play. Drive-scoped removal can also delete files on an unselected filesystem, and stopping a build can release Home before rollback finishes.
Storage gives players a per-category view of disk use and lets them remove individual items. Title-bar tabs make those tools easier to reach. The latest fix moves the initial user-folder and process probes off the UI thread and improves error reporting, but the deletion and build handoffs still need shared ownership.
@fixwill do (5)App/ViewModels/BuildStepViewModel.cs:404: After Stop wins against a queued successful exit, the callback now avoids registering the build but starts rollback after Home has opened. A retry of the same update can race the old rollback moving the folder back, and closing can interrupt rollback. Keep build ownership until rollback finishes before opening Home or allowing shutdown. Add the held-callback test.App/ViewModels/StorageViewModel.cs:600: Staging access errors now surface and the two requested checks exist. Work and SDK removal can still skip an inaccessible or vanished target and return success. Carry skipped and failed outcomes through those paths and use them in the completion notice.Core/Disk.cs:294: An unreadable subtree can still be omitted from a scan that publishes a new total and measurement time. Carry partial-discovery status through the walker and inventory, then label partial results separately from a complete refresh.README.md: The PR description still promises that make_game no longer receives the object and lift stores. Update it to say both are kept by default, capped at 4 GB of objects and two translations, and that opting out cleans them after a successful build. A failed or stopped build can leave them behind.Core/Storage.cs:358: The new attribute probe accepts a regular file where a log directory is expected. (more on the line)For the author (5) (a run, a measurement or a decision)
App/ViewModels/StorageViewModel.cs:554: Capturing Places leaves the deletion lifetime page-local and the callback still reads Registry.Builds on the worker. Start a large removal, switch to Home, then start a build or return to a new Storage page. Hold a launcher-wide operation guard through completion and shutdown, snapshot registry inputs under that guard, and test paused deletion across navigation. (@fixcouldn't: Still requires a launcher-wide guard through deletion and shutdown, a guarded registry snapshot, and a paused-deletion navigation test.)Core/Storage.cs:273: Drive scoping checks only the selected tree's top-level path. On Linux, mount another filesystem inside a game's folder and Remove from the parent drive will recurse into it. On Windows,Disk.DriveNamealso treats a volume mounted in a directory as the path's drive letter. Use filesystem identities for inventory and deletion, and refuse whole-folder removals that would cross the selected filesystem. (@fixcouldn't: Still requires filesystem identities for inventory and deletion, including Windows mounted volumes, and refusal of removals crossing a nested filesystem.)App/ViewModels/StorageViewModel.cs:153: The generation only tracks scan starts and explicit snapshot clears. A scan of listed files can publish after Home deletes them from disk and keeps the same row, and a new Storage page can scan while cleanup is active. Invalidate around every storage mutation and publish scans only outside an active mutation. (@fixcouldn't: Still requires invalidation around every storage mutation and preventing scan publication during an active mutation.)App/ViewModels/StorageViewModel.cs:500: Bulk removal adds estimates for deleting each folder alone. Two unlisted versions that are the only holders of a shared 25 GB romfs can free it together, but the confirmation excludes it. Use the union of the confirmed targets for the estimate and freeze that set when opening the confirmation so a newly eligible item cannot join it. (@fixcouldn't: Still requires estimating the union of confirmed targets and freezing the target set when confirmation opens.)tests/launcher_core/PadChecks.cs:106: The new assertion checks the Home tab's XAML marker and passes if the fallback inPadInput.Backis deleted. Exercise B on a tab page with no local Back, in a modal, and in a wizard so the check covers dispatch and priority. (@fixcouldn't: Still requires tests that exercise B dispatch and priority on a tab page, in a modal, and in a wizard.)Since the last review (on
e92dd57d3f)Resolved: L22 (Game and mod discovery now run on the worker, but opening Storage still calls RunningNow s…); L34 (The new store fixture declares shaderStore in the same method scope as the existing declar…); L35 (The snapshot key now uses listed rows and omits the builds folder used for unlisted discov…); L36 (The new census can assign zero counted bytes to a version that still has a removable cache…)
Still open: L3 (Capturing Places leaves the deletion lifetime page-local and the callback still reads Regi…); L5 (After Stop wins against a queued successful exit, the callback now avoids registering the…); L7 (Drive scoping checks only the selected tree's top-level path. On Linux, mount another file…); L11 (The generation only tracks scan starts and explicit snapshot clears. A scan of listed file…); L13 (Staging access errors now surface and the two requested checks exist. Work and SDK removal…); L16 (Bulk removal adds estimates for deleting each folder alone. Two unlisted versions that are…); L20 (An unreadable subtree can still be omitted from a scan that publishes a new total and meas…); L24 (The new assertion checks the Home tab's XAML marker and passes if the fallback in `PadInpu…); L29 (The PR description still promises that make_game no longer receives the object and lift st…)
New: L37 (The new attribute probe accepts a regular file where a log directory is expected. If an im…)
More: does it help, other systems, switches, what was read
Does it help: Yes for the feature. The author reports using storage measurement, unlisted-game removal, the drive picker and tabs on Windows 11. Build-time and disk-use tradeoffs are unproven. The PR gives size estimates but no matched base-versus-head runs.
Other systems: Storage shares paths and registry state with Home, Play, builds, tool downloads and save backups. Staging cleanup shares the install semaphore. Windows has an earlier manual run. Linux and Steam Deck behavior, including mounted filesystems and process discovery, have no reported runs.
Switches: KeepBuildFiles is new and defaults to on. That preserves warm builds and their disk use. Turning it off cleans up work and both stores after a successful build. The builder still receives LONGSHOT_OBJ_STORE and LONGSHOT_LIFT_STORE under the work folder, with LONGSHOT_OBJ_STORE_GB=4 and LONGSHOT_LIFT_STORE_KEEP=2. Those defaults match the base.
Reviewed:
c9eb512415againstdad2200360: The checkout is 75ff09e, the head listed in the range-diff. Read AGENTS.md, CONTRIBUTING.md, the commit list and the full diff since 324d77f. Read BuildStepViewModel.cs, StorageViewModel.cs, Storage.cs and StorageChecks.cs in full, plus the relevant navigation, shutdown, registry, deletion, disk, cache and controller callers. Skimmed the broader PR file list, description, test reports and screenshot captions. The rest of the unchanged PR code and the screenshot images were outside this re-check.; nothing run (a code review).Checked and fine:
Testing: Read-only review. The author reports 2,163 core checks with two suites skipped because they also fail on base, clean Debug and Release builds, and three Tooling release-test failures shared with base. Lint was skipped. Those runs predate the latest fix. The supplied CI summary lists no head-only failures or pending checks.
Overlaps and merge order: #210 and #220 are in the supplied base. Local main also contains merged #222, which overlaps the BuildStepViewModel constructor and changes screen tests and translations. Integrate current main before merging #221 and preserve #222’s GPU diagnostics alongside the build cancellation guard.
Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.
@ -0,0 +355,4 @@/// The files right in folder, never a link's target nor a folder inside; keep: one not to delete (the log this run writes)static (int Removed, int Skipped, int Failed) DeleteFiles(string folder, string? keep, Func<string, bool> matches){try { File.GetAttributes(folder); }L37 (minor): The new attribute probe accepts a regular file where a log directory is expected. If an imported game's folder contains a file named logs, EnumerateFiles throws and cleanup stops before reaching the game's loose logs or later versions. Check the Directory attribute before enumerating and preserve access-error reporting for actual directories.
@fix
I changed this pull request where an edit could (the rest needs runs, measurements or decisions): the new head is
c2589f041c. I edited the pull request's description too (1 edit).Changed
Changed in part (the rest is for the author)
Still for the author (no edit does these)
App/ViewModels/StorageViewModel.cs:554: Capturing Places leaves the deletion lifetime page-local and the callback still reads Registry.Builds on the worker. Start a large removal, switch to Home, then start a build or return to a new Storage page. Hold a launcher-wide operation guard through completion and shutdown, snapshot registry inputs under that guard, and test paused deletion across navigation.Core/Storage.cs:273: Drive scoping checks only the selected tree's top-level path. On Linux, mount another filesystem inside a game's folder and Remove from the parent drive will recurse into it. On Windows,Disk.DriveNamealso treats a volume mounted in a directory as the path's drive letter. Use filesystem identities for inventory and deletion, and refuse whole-folder removals that would cross the selected filesystem.App/ViewModels/StorageViewModel.cs:153: The generation only tracks scan starts and explicit snapshot clears. A scan of listed files can publish after Home deletes them from disk and keeps the same row, and a new Storage page can scan while cleanup is active. Invalidate around every storage mutation and publish scans only outside an active mutation.App/ViewModels/StorageViewModel.cs:500: Bulk removal adds estimates for deleting each folder alone. Two unlisted versions that are the only holders of a shared 25 GB romfs can free it together, but the confirmation excludes it. Use the union of the confirmed targets for the estimate and freeze that set when opening the confirmation so a newly eligible item cannot join it.tests/launcher_core/PadChecks.cs:106: The new assertion checks the Home tab's XAML marker and passes if the fallback inPadInput.Backis deleted. Exercise B on a tab page with no local Back, in a modal, and in a wizard so the check covers dispatch and priority.Nothing was built or run: check the change. Its review follows.
Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
Recommendation: Request changes. Storage removal can still race a build or launcher shutdown, and removal scoped to one drive can delete files on an unselected filesystem. Storage can also publish a snapshot while files are being removed.
Players can see and selectively remove what Longshot keeps, and reach the main pages from the title bar. This revision improves SDK cleanup reporting and flags inaccessible game folders as a partial measurement. Recursive deletion still needs launcher-wide coordination and filesystem boundary checks.
@fixwill do (1)App/ViewModels/BuildStepViewModel.cs:750: SIGTERM starts sending the opted-in build summary and discards the task. When cancellation and rollback finish before an HTTP connection is ready, shutdown can end the process before the summary reaches the server. Preserve the previous bounded send window without blocking the UI, alongside the rollback wait.For the author (5) (a run, a measurement or a decision)
App/ViewModels/StorageViewModel.cs:554: Capturing Places leaves the deletion lifetime page-local and the callback still reads Registry.Builds on the worker. Start a large removal, switch to Home, then start a build or return to a new Storage page. Hold a launcher-wide operation guard through completion and shutdown, snapshot registry inputs under that guard, and test paused deletion across navigation. (@fixcouldn't: StorageViewModel.cs:563–591 still uses page-local removal state. LauncherService.cs:541 enumerates the live registry on the worker. The launcher-wide guard through shutdown, protected registry snapsho)Core/Storage.cs:273: Drive scoping checks only the selected tree's top-level path. On Linux, mount another filesystem inside a game's folder and Remove from the parent drive will recurse into it. On Windows,Disk.DriveNamealso treats a volume mounted in a directory as the path's drive letter. Use filesystem identities for inventory and deletion, and refuse whole-folder removals that would cross the selected filesystem. (@fixcouldn't: Storage.cs:223 and 306 still attribute and filter by the root path's drive label. Disk.cs:406 still uses the Windows drive letter. Filesystem identities and refusal to delete across nested filesystem )App/ViewModels/StorageViewModel.cs:153: The generation only tracks scan starts and explicit snapshot clears. A scan of listed files can publish after Home deletes them from disk and keeps the same row, and a new Storage page can scan while cleanup is active. Invalidate around every storage mutation and publish scans only outside an active mutation. (@fixcouldn't: StorageViewModel.cs:176 still checks only the scan generation before publishing. Home's deletion flow can change the disk without bumping that generation, and a new Storage page can scan and publish d)App/ViewModels/StorageViewModel.cs:500: Bulk removal adds estimates for deleting each folder alone. Two unlisted versions that are the only holders of a shared 25 GB romfs can free it together, but the confirmation excludes it. Use the union of the confirmed targets for the estimate and freeze that set when opening the confirmation so a newly eligible item cannot join it. (@fixcouldn't: StorageViewModel.cs:523–528 still sums individual estimates, and line 60 recomputes eligibility when Remove is pressed. The confirmation still needs a frozen set and the estimate for removing that set)tests/launcher_core/PadChecks.cs:106: The new assertion checks the Home tab's XAML marker and passes if the fallback inPadInput.Backis deleted. Exercise B on a tab page with no local Back, in a modal, and in a wizard so the check covers dispatch and priority. (@fixcouldn't: PadChecks.cs:105–107 still checks the Home button's XAML marker. It would pass with the fallback removed from PadInput.Back and still does not exercise dispatch on a tab, in a modal, or in a wizard.)Since the last review (on
c9eb512415)Resolved: L13 (The attribute probe can succeed and the deletion helper can still return without deleting.…); L20 (If the scan can list a game's parent but lacks access to probe the game's stamp and execut…); L29 (The PR description still promises that make_game no longer receives the object and lift st…); L37 (The new attribute probe accepts a regular file where a log directory is expected. If an im…)
Still open: L3 (Capturing Places leaves the deletion lifetime page-local and the callback still reads Regi…); L5 (SIGTERM starts sending the opted-in build summary and discards the task. When cancellation…); L7 (Drive scoping checks only the selected tree's top-level path. On Linux, mount another file…); L11 (The generation only tracks scan starts and explicit snapshot clears. A scan of listed file…); L16 (Bulk removal adds estimates for deleting each folder alone. Two unlisted versions that are…); L24 (The new assertion checks the Home tab's XAML marker and passes if the fallback in `PadInpu…)
New: L38 (Removing graphics libraries reports a skipped target even on a successful cleanup when opt…)
More: does it help, other systems, switches, what was read
Does it help: Unproven at HEAD. Earlier Windows testing reported 2,163 core checks passing with two groups skipped, clean Debug and Release builds, and manual Storage coverage. Those reports predate 39fd7ea. No Linux run or matched before-and-after performance measurements were supplied.
Other systems: The rollback guard affects Linux SIGTERM and window close. Filesystem scoping affects Linux nested mounts and Windows directory-mounted volumes. Storage removal shares paths and registry state with Home, Play, the build wizard, and tool downloads. SDK cleanup affects the next build that needs DLSS, FSR or XeSS. The Windows report covers basic Storage use. Linux, Steam Deck, and mounted-volume behavior remain unverified.
Switches: KeepBuildFiles is new and defaults to on. It preserves existing build reuse, including the existing 4 GB object cap and two-translation lift cap. Turning it off cleans the work and stores after a successful build. No environment switch changed in this revision.
Reviewed:
c2589f041cagainstdad2200360: Reviewed actual HEAD 39fd7ea. Read AGENTS.md and CONTRIBUTING.md in full. No review checklist or PR template was present. Read the complete delta since c22af0a, the affected methods at HEAD, and the callers and tests needed for the ledger. Read the supplied PR description, comments, CI state, and fix report. Reviewed selected base-to-HEAD hunks. Skimmed translation removals and screenshot descriptions. Other unchanged portions of the PR and the screenshot attachments were outside this re-check.; nothing run (a code review).Checked and fine:
Testing: Read-only review. The author reported 2,163 passing core checks on Windows with two groups skipped, zero build warnings in Debug and Release, and three release-tool failures reproduced on the base. The final fix report says its tests were not run. The supplied CI record lists no failures or pending checks.
Overlaps and merge order: LongshotLauncher #222 is already on local main at
8a75fe1and overlaps the build-step settings and cancellation code. Reconcile #221 with that commit before merging and preserve both the GPU-selection reporting and the rollback guard.Automated code review by BeanBot (gpt-6.2-sol), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.
@ -0,0 +315,4 @@break;case Kind.ShaderCache when item.Game is { } g:// (its own look at whether Longshot runs as well: running only ever refuses, never lets a clear past that)return ShaderCaches.Clear(g.Folder, notes: false, running: running ? () => true : cachesHeld) == null ? Refusal.Running : Refusal.None;L38 (minor): Removing graphics libraries reports a skipped target even on a successful cleanup when optional SDKs were never installed. With only DLSS installed, deleting its SDK counts the absent FSR and XeSS folders as skips, and the toast excludes the DLSS estimate. Carry the measured SDK targets into removal. Update the test at StorageChecks.cs:211 to distinguish an SDK that vanished after measurement from one that was absent throughout.
@fix
I didn't fix this pull request: it failed (Codex didn't finish with an answer (exit 1)). Nothing was pushed.
Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@fix
The ChatGPT usage limit is reached (it resets Nov 25th, 2026 1:04 AM), so this fix is paused. It runs by itself once the limit lifts (tried again every 30 minutes); nothing needs asking again.
Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
@fix
I changed this pull request where an edit could (the rest needs runs, measurements or decisions): the new head is
8650304818.Changed in part (the rest is for the author)
Still for the author (no edit does these)
App/ViewModels/StorageViewModel.cs:554: Capturing Places leaves the deletion lifetime page-local and the callback still reads Registry.Builds on the worker. Start a large removal, switch to Home, then start a build or return to a new Storage page. Hold a launcher-wide operation guard through completion and shutdown, snapshot registry inputs under that guard, and test paused deletion across navigation.Core/Storage.cs:273: Drive scoping checks only the selected tree's top-level path. On Linux, mount another filesystem inside a game's folder and Remove from the parent drive will recurse into it. On Windows,Disk.DriveNamealso treats a volume mounted in a directory as the path's drive letter. Use filesystem identities for inventory and deletion, and refuse whole-folder removals that would cross the selected filesystem.App/ViewModels/StorageViewModel.cs:153: The generation only tracks scan starts and explicit snapshot clears. A scan of listed files can publish after Home deletes them from disk and keeps the same row, and a new Storage page can scan while cleanup is active. Invalidate around every storage mutation and publish scans only outside an active mutation.App/ViewModels/StorageViewModel.cs:500: Bulk removal adds estimates for deleting each folder alone. Two unlisted versions that are the only holders of a shared 25 GB romfs can free it together, but the confirmation excludes it. Use the union of the confirmed targets for the estimate and freeze that set when opening the confirmation so a newly eligible item cannot join it.tests/launcher_core/PadChecks.cs:106: The new assertion checks the Home tab's XAML marker and passes if the fallback inPadInput.Backis deleted. Exercise B on a tab page with no local Back, in a modal, and in a wizard so the check covers dispatch and priority.Nothing was built or run: check the change. Its review follows.
Automated fix by BeanBot (gpt-6.1-terra), asked for by HumanBean. Nothing was run; a maintainer decides.
Recommendation: Request changes. Storage removal can overlap builds or other disk operations, and drive-scoped deletion can cross into an unselected filesystem. The shutdown regression test still does not exercise the build’s actual rollback and retry path.
The launcher gains a Storage page for inspecting and removing retained files, plus title-bar navigation. It makes disk use more visible, but deletion coordination and filesystem boundaries need correction before merge.
@fixwill do (1)tests/launcher_core/BuildReportChecks.cs:105: The new coordinator test holds a simulated callback and checks source wiring, but does not exercise the actual build rollback and retry path. Add a regression test that drives that path and verifies shutdown waits for rollback and the bounded sends across retry.For the author (5) (a run, a measurement or a decision)
App/ViewModels/StorageViewModel.cs:554: Capturing Places leaves the deletion lifetime page-local and the callback still reads Registry.Builds on the worker. Start a large removal, switch to Home, then start a build or return to a new Storage page. Hold a launcher-wide operation guard through completion and shutdown, snapshot registry inputs under that guard, and test paused deletion across navigation. (@fixcouldn't: Removal remains page-local in StorageViewModel.RemoveAsync, and DeleteLeftover still enumerates Registry.Builds on the worker. The launcher-wide guard through completion and shutdown, protected snapsh)Core/Storage.cs:273: Drive scoping checks only the selected tree's top-level path. On Linux, mount another filesystem inside a game's folder and Remove from the parent drive will recurse into it. On Windows,Disk.DriveNamealso treats a volume mounted in a directory as the path's drive letter. Use filesystem identities for inventory and deletion, and refuse whole-folder removals that would cross the selected filesystem. (@fixcouldn't: Storage.Remove still filters top-level paths using Disk.DriveName, which uses the drive letter on Windows. Filesystem identity accounting and refusal of whole-folder deletion across nested filesystems)App/ViewModels/StorageViewModel.cs:153: The generation only tracks scan starts and explicit snapshot clears. A scan of listed files can publish after Home deletes them from disk and keeps the same row, and a new Storage page can scan while cleanup is active. Invalidate around every storage mutation and publish scans only outside an active mutation. (@fixcouldn't: Scan publication still checks StorageGeneration alone; Home deletion does not invalidate it around mutation, and a new Storage page can scan during removal.)App/ViewModels/StorageViewModel.cs:500: Bulk removal adds estimates for deleting each folder alone. Two unlisted versions that are the only holders of a shared 25 GB romfs can free it together, but the confirmation excludes it. Use the union of the confirmed targets for the estimate and freeze that set when opening the confirmation so a newly eligible item cannot join it. (@fixcouldn't: The confirmation still sums individual Frees estimates and the command recomputes Clearable. The union estimate and frozen confirmed target set are missing.)tests/launcher_core/PadChecks.cs:106: The new assertion checks the Home tab's XAML marker and passes if the fallback inPadInput.Backis deleted. Exercise B on a tab page with no local Back, in a modal, and in a wizard so the check covers dispatch and priority. (@fixcouldn't: PadChecks still checks the Home tab’s XAML marker rather than exercising B dispatch and priority on a tab page, in a modal and in a wizard.)Since the last review (on
c2589f041c)Still open: L3 (Capturing Places leaves the deletion lifetime page-local and the callback still reads Regi…); L5 (The new coordinator test holds a simulated callback and checks source wiring, but does not…); L7 (Drive scoping checks only the selected tree's top-level path. On Linux, mount another file…); L11 (The generation only tracks scan starts and explicit snapshot clears. A scan of listed file…); L16 (Bulk removal adds estimates for deleting each folder alone. Two unlisted versions that are…); L24 (The new assertion checks the Home tab's XAML marker and passes if the fallback in `PadInpu…)
More: does it help, other systems, switches, what was read
Does it help: Unproven as a complete feature: the author reports a real Windows launcher run and 2,163 core checks, but Linux was not tested and the deletion defects remain. No build-speed measurements are supplied for retaining build work.
Other systems: The deletion and scan races affect launcher navigation, builds and game files on both Windows and Linux. Nested mounts affect Linux and Windows mounted volumes. Build-summary shutdown also depends on rollback, retries and the telemetry service; the new coordinator has isolated checks but its actual build path lacks the requested regression test.
Switches: KeepBuildFiles is added, defaults to true, and retains build work for faster updates. Its disk cost is described, but the speed benefit and suitability of the default are not measured. No switch changed in the latest fix.
Reviewed:
8650304818againstdad2200360: Read the repository rules, the diff since the ledger head, and relevant portions of storage removal, measurement, drive identification, build finalization and controller checks. The large combined file output was truncated; the full pull request and all changed files were not read in full. Translations, screenshots and generated assets were not independently inspected.; nothing run (a code review).Checked and fine:
Testing: No commands that run project code or tests were executed. The author reports Windows core checks and Debug and Release builds; Linux was not tested. CI reports no failing or running checks.
Overlaps and merge order: #210 and #220 are described as already incorporated by the rebase; no independent overlap search was possible with the network closed.
Automated code review by BeanBot (gpt-6.1-terra), asked for by BeanBot, after its fix. Nothing was run; a maintainer decides.
Recommendation: Request changes, now as follow-ups (this merged as
e2220601while the review ran). The Storage page is a real gain and its deletes are guarded well. But the merged head was never built or tested: the author's runs coverc105e1e, and five later automated commits (about 700 changed lines) changed how a build stops, closes and handles SIGTERM. The description doesn't mention that change.Players can now see what Longshot keeps on their disk, grouped by what it is for. They can let go of one part at a time, including old versions' folders an update left behind (25-40 GB each), which only a notice on Home showed before. The title-bar tabs replace Home's Saves and NFC cards and the pages' Done buttons. On net it makes the launcher better. The open question is whether the head behaves the way the tested commit did.
Does it help: not a perf change. The feature is shown working on Windows 11 at
c105e1e: the author ran the launcher against a real home, ran 2163 core checks and built Debug and Release with no warnings, and posted screenshots in the comments. Nothing has been run at8650304, and twice in this PR an untested fixer commit broke the core tests' compile (L27, L34).Other systems: Linux and the Steam Deck take the same measure and delete paths, and nothing was run there. Linux has no
FileLinks.Names, so it says "other folders" by design. The build page's Stop now stays on the page until make_game is killed and the caches and folder are put back, where before it went Home at once. Closing during that wait waits too. SIGTERM now goes through the window thread on every Linux run, with or without a build, and waits up to 2 s for summaries beforedesktop.Shutdown(). Before, with no build, the launcher ended the default way. Clearing the shared shader store makes every version prepare shaders again on any GPU, and the page says so before it goes. The build's environment is the same as on main: both stores are passed, with the 4 GB and two-translation caps.Switches:
KeepBuildFiles(a Storage page checkbox, on by default). On is main's behaviour, so the default is right, and the opt-out serves players short of disk space (a Deck). With it off, the work parts and both stores go after each successful build only (Storage.AfterBuild).Reviewed:
8650304818againstdad2200360(the PR's base; main has since gained #222, and the squashe2220601is this head plus #222, no other change). I read in full: Core/Storage.cs, StorageViewModel.cs, StorageView.axaml, ShareRow.cs, and the changed parts of Disk.cs, Leftovers.cs, BuildRegistry.cs, ShaderCaches.cs, Toolchains.cs, ToolsPrefetch.cs, FileLinks.cs, GameFolder.cs, InstanceFolders.cs, MakeGameCommand.cs, LauncherService.cs, BuildReports.cs, BuildStepViewModel.cs (with Run, Exited, Stop, Fail, Complete and PutBack in full), Program.cs, MainWindow.axaml(.cs), PadInput.cs, MainViewModel.cs, HomeViewModel.cs, SettingsViewModel.cs, NfcViewModel.cs, SavesViewModel.cs and App.axaml. I skimmed the tests (StorageChecks, LeftoverChecks, BuildReportChecks, PadChecks), the docs, the screenshot scenes and the catalog removals. Nothing was run (a code review).Fixed in this review: nothing pushed (it merged first). The two comment nits below are a 14-line follow-up patch, ready if wanted.
Checked and fine:
Disk.FreeWorktakes onlyWorkParts. Shader caches and the store keep their allowlists (Clearable,StoreFiles), and pipeline notes stay. Logs skip the one this run writes.mods/anduser/mods/) right before the delete, and again after its save backup (Leftovers.Delete, theguardinDeleteGameFolder).FolderNotDeleted.Backupreaches Home's notice. With builds.json unreadable, every unlisted row is read-only and the delete throws.CleanStaging) and reports a running download.StoppedIfRequested, including the cold-clear, seed, cancelled-run, start-failure and queued-exit paths. AStopthat wins against a queued successful exit rolls back instead of registering the build and opening Ready over Home, which was a real bug on main's shape.SetRunning(false)comes before everyCloseAfterFinalizing, soOnClosinglets the window go.Blocking (now follow-ups)
8650304(now main) with-warnaserrorand run the core checks. Then run the launcher on Windows, and on Linux if you can: Stop during a build (on an update, so caches are put back), close the window during a build and during Removing…, a Storage removal from each group, and the Settings → Manage storage path. Post the results here. CI doesn't run tests on pull requests, so the PR's own results are the only ones.App/ViewModels/BuildStepViewModel.cs:565,App/Program.cs:121). It is beyond what the PR says it does. It belongs in the release notes, or in a PR of its own if it needs changing.Suggestions
Core/Storage.cs:356: the work kinds check the drive ofp.Work, not of the part they delete. Ifobjcacheor a store is a mount on another drive (Linux), removing on one drive can delete the other's, or report a removal that deleted nothing. CheckOn(Path.Combine(p.Work, part))per part. These files can be rebuilt, so this is low.App/ViewModels/StorageViewModel.cs:563: a removal outlives its page. Start one, go Home and start an update, and make_game runs whileobjcacheis still being deleted. Settings' old Free up space had the same race, so it isn't a regression. A launcher-wide "storage removing" flag thatCanStartBuildand Play read would close it.App/ViewModels/StorageViewModel.cs:614: only IO errors are caught. Anything else leavesremovingand the pinned progress on until the page is opened again. Afinallythat callsMeasure()would avoid that.translations.py --missing <code>).Nits (inline): the MakeGameCommand stores comment lost its reasons (the 14 days, 4 GB vs Longshot's 8, two translations), and the
KeepBuildFilescomment says ~1.1 GB and leaves out the stores.Testing: the author ran the launcher on Windows 11 at
c105e1e, with 2163 core checks, Debug and Release builds, and screenshots. Two suites were skipped, both of which also fail on main on that PC. Nothing has been run since: BeanBot's five commits say so themselves. Linux and the Deck were never run. CI ran only the title check (Compile and test was skipped).Overlaps and merge order: #202 (Jordan's redesign, already not mergeable) keeps Free up space, the pages'
DoneCommands, the cog and Home's Saves and NFC entry points, all of which this PR removed. It has to be reworked onto the tabs and the Storage page, or the maintainers have to choose one navigation. #183 (Saves:SavesViewModelandSavesView, the Done button), #55 (MainWindow, Program.cs, BuildStepViewModel, HomeView/HomeViewModel, Saves), #151 (Program.cs, BuildStepViewModel), #130 (BuildStepViewModel), #50 (BuildStepViewModel, LauncherSettings, MakeGameCommand) and #59 (HomeView/HomeViewModel, Toolchains) now need rebasing onto it.