Repository navigation
Conversation
|
@Stener1 is attempting to deploy a commit to the seanbrydonio's projects Team on Vercel. A member of the Team first needs to authorize it. |
6e65e87 to
a13428b
Compare
a13428b to
bd1f1f9
Compare
|
Rebased onto current |
…199) Archive… still asks, but pressing Archive closes the dialog at once. The worktree shows Archiving… and goes when its box gets to it, through the same per-box queue Remove worktree uses, now carrying the kind. The toasts are today's: Archived (branch kept), Archiving (its script is running), and a warning for uncommitted work. Bulk archive in the Worktrees table skips a worktree already on its way out, so its box never gets a second request for it. The mock takes ?slowremove=MS to make a box slow to remove a worktree, and the verify skill gains a worktree-archive scenario and feature file. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
bd1f1f9 to
a7110f0
Compare
|
Rebased onto current |
Summary
Archive… held its confirm dialog open with a spinner until the box answered. For a repo with no archive script, the box removes the worktree before it answers (
dropWorktree: stop services,git worktree remove, stop sessions), and for a monorepo checkout withnode_modulesthat takes 5 to 30 seconds or more. Archiving several finished worktrees in a row meant waiting on each one.Archive… still asks first, but pressing Archive now closes the dialog at once. The worktree shows Archiving… right away and goes when its box gets to it. It uses the same per-box queue that Remove worktree already uses, one removal at a time per box.
lib/remove-worktree.ts:queueRemovalnow takes the kind ("archive" | "remove"). For an archive it gives today's toasts:worktree.removedarrives, as before.keepsWorkis the one copy of git's "it would lose work" check. It is shared withuse-bulk.ts.lib/removing.ts:inTurn(box, job)is the per-box line, built on the existingoneAtATime. It replaces the queue's hand-rolledwaiting/drain.components/sidebar/actions.tsx:archiveWorktree'srunjust queues. The sidebar's ⋯ and right-click, zen's worktree menu and the launcher's "Archive this worktree…" all go through it.views/worktrees/use-bulk.ts: bulk Archive skips a worktree that is already on its way out, so its box never gets a second DELETE for it. Codex's adversarial review raised this.lib/mock.ts:?mock=1&slowremove=MSmakes a mock box take that long to remove a worktree with no archive script, answering once it is gone.One behaviour change: an error is now a toast instead of text inside the dialog, so the dialog no longer offers a retry. Archive… can be pressed again.
Not changed: bulk Archive N… in the Worktrees table (
archive-dialog.tsx). Its dialog stays open on purpose, showing each row's outcome, so it still waits on each box. Moving it onto the queue would be a redesign of that dialog, so it is left for a separate change.Evidence
Driven with the verify skill's new
worktree-archivescenario: the production build on the mock fixtures withslowremove=4000and the list sidebar, in Chromium. It right-clicks a row, chooses Archive…, presses Archive, and times how long the dialog takes to close.Before (origin/main app code, same slow mock): the dialog spun for 4638 ms, the full length of the box's removal.
After: the dialog closed in 149–308 ms, which is its close animation, across four archives.
pnpm db:drop)The scenario's steps:
The mock can't show a real box's teardown time. The fix is app-side and doesn't depend on it.
Checks:
pnpm typecheck:plugins,check:titles,check:type,check:grid,check:csp,check:themes,pnpm test(565 pass),npx tsc -p e2e,pnpm build, and(cd docs-site && pnpm build)all pass. In the browser,e2e/worktree-remove.spec.tspasses, including a new test: Archive withslowremove, the dialog hidden within 1 s, Archiving…, the toast, and the dirty case.e2e/publish-failed.spec.tspasses too. There is no Go change.Unit tests:
removing.test.tschecks that a box takes its removals one at a time and that another box's don't wait.The verify skill now has
features/worktree-archive.md, a row infeatures/README.md, andscripts/scenarios/worktree-archive.mjs. There is also a changelog bullet under Unreleased.Worth a separate fix: why the box is slow
Without an archive script,
dropWorktreecallsLocations.RemoveWorktree, which runsgit worktree remove. git deletes the folder itself, one file at a time, before the HTTP answer goes back, and anode_modulestree has hundreds of thousands of files. The box could instead rename the folder aside on the same filesystem, rungit worktree prune, answer and publishworktree.removed, and delete the renamed folder in the background. Removals would then be quick everywhere, the Worktrees table's bulk Archive and the CLI included.🤖 Generated with Claude Code