Repository navigation
Settings > Storage: disk use per machine, worktrees with their threads, delete a worktree - #59
Merged
Merged
Conversation
…eletion Adds storage.getOverview and storage.removeWorktree RPCs (own module in server/storageOverview), the storageOverview capability, and a Settings > Storage page at /settings/disk. Upstream files are touched at registration seams only; CUSTOM.md lists them. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… wrong depth and cache races Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s shows in the menu Every machine runs the fork, so hiding the item for old servers is not worth three rewritten lines in an upstream file that changes weekly. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…sion test; dialog copy and refresh after a refusal A new folder of untracked files counted as one line, so the delete dialog undercounted what a forced delete loses and the stale-count refusal missed files added inside it. Both counts now use one --untracked-files=all list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ng the cached list Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
New Settings > Storage page, one block per machine in scope:
Delete asks first. When files would be lost, it says how many ("2 uncommitted files will be lost."). Threads and branches are kept: like storage cleanup, a thread rebuilds its folder when you message it.
Fork seams (all listed in
CUSTOM.md): 6 own files. 15 upstream files get only added registration lines, except one rewritten line: the nav list insettingsSearch.ts.sync-upstream.sh footprintgoes from 161 files, +8085 −2322 to 166 files, +8167 −2323.Evidence
After: I ran it live on a dev server with a throwaway T3 home holding two demo worktrees (180 MB, and 40 MB with uncommitted files):
git worktree listno longer showed it, and brancht3/5e6f7a8bwas kept.StorageOverview.test.ts, 6 tests, plus a permission test inRpcAuthorization.test.ts(25/25 across both files):status.showUntrackedFiles=normalwith "expected 1 to be 3", passes now)storage.removeWorktreeis refused before the handler without settings-write permissiontscis clean (contracts, client-runtime, server, web). Lint, fmt and knip are clean. Settings search tests pass 22/22.0b701470a: the terminal check, the lease key, the depth limit, the stale count, the cache race, and the dialog copy for orphans.1ea289e6f; the narrow re-check found 0 new blockers. Also fixed: dialog copy for worktrees with no branch, and a fresh measurement after a refused delete.How I proved it: a live dev server on a throwaway T3 home (list, warn, delete, branch kept, phone width), real-git server tests including one that fails on the old code, and
tscand lint clean.Merge Danger
Door: two-way for the code; one-way for each delete a user confirms.
Reverting the PR removes the page. A worktree deleted through it loses only uncommitted and ignored files (like
.env), and the dialog counts the uncommitted ones. Commits stay on the branch.Blast Radius: contained
The page reads only; nothing runs until someone opens it. Measuring a machine with many large worktrees can take minutes of disk reads (capped at 30 s per worktree). Older servers without the
storageOverviewcapability show an empty page. The menu item always shows.🤖 Generated with Claude Code