Repository navigation
feat(j5): one Inbox approval for worktrees with unfinished work - #762
bryantderosier merged 21 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Important
This repository does not receive automatic reviews because it has fewer than 10 stars.
|
Panel review: #762Live (Astra, stack tip):
Should fix before merge: the recheck before a forced removal misses content changes. It was proven three ways: a scratch test against this code, and two separate git experiments.
The scratch test overwrote both listed files after filing, answered, got Nit: archiving again after "Keep all" files a duplicate. 051's unique index is partial ( Nit: the answer controls use the Operate-scope Docs across the stack (Jackson reviews these, so for reference):
Review panel for the #750–#762 stack, judged as the code that lands at |
da64b27 to
2471946
Compare
2471946 to
b8a42e0
Compare
8da908a to
16cb782
Compare
|
Review panel: Claude Opus 5.5 (lead) and GPT-6.1 Sol. We reviewed the whole stack (#750 → #762) at Should-fix
Nits
Live, Sol archived a worktree Crew and got one item for the dirty worktree. Removing it from the Inbox deleted the directory and kept the branch. |
…val layer The Inbox's open count still includes worktree cleanups, which the mobile Inbox doesn't show yet; the Inbox doc says so. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…up item The cleanup item is now keyed on the archive (the Crew and its archived stamp), so the same archive run again still files nothing, while a Crew restored with its Captain and archived a second time files a new one. Bringing the Crew back withdraws an item still open for the earlier archive. An answered item stays as the record. Migration 051 is edited in place: it is only in this unmerged stack. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ffered for removal An approved removal keeps the branch, so work only counts as kept when HEAD is reachable from that branch. A seat that detached or switched branches and then committed is kept as unverified, and the recheck refuses it too. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…nged files The baseline now includes the index tree, so a file that stays modified in the same way with the same working copy, while its staged content changes, no longer matches and the removal is skipped. An index git cannot write a tree for (unmerged entries) never matches, so the worktree is kept. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Answering a cleanup is the Owner's call, but the buttons were gated on operate scope, so a Collaborator saw them enabled and was refused on press, and the Inbox counted items they could not answer. The answer now needs the settings scope an Owner's device holds, on the client and the server, the cleanup list and the open count are an Owner's alone, and the Inbox header counts cleanups as their own clause instead of as questions. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…wner-only Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…val layer Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Went through the list:
One call I made: a withdrawn item is just deleted, so nothing records it ever existed. Easy to change to a |
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…e uses are no longer exported (#749) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
…ing exported Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
|
Re-review after merge by the panel, Claude Opus 5.5 and GPT-6.1 Sol. We read your fixes on merged One note for your own machines: migrations 049 and 051 changed in place after |
Summary
After #748, archiving a Crew removes every worktree that's safe to remove and keeps the rest. The kept ones hold uncommitted changes or commits that never merged, and I have to find each one and decide by hand. This files one Inbox item per archive that lists those worktrees, and I decide once: remove all, remove the ones I pick, or keep all. Closes #749.
This is stacked on #752, so the base is
j5/752-pin-worktree-base-commit. The mockup I approved isartifacts/design/ui/09-worktree-cleanup.html(in the J5 artifacts store, linked on the issue).{ itemId, removePaths }. Remove all is every path, keep all is an empty list that clears the item and changes nothing, and a path that isn't in the item is refused. The item resolves once, and a second answer is refused. Only an Owner with the operate scope can answer, and agents get no tool for it.Docs: inbox.md (the definition and AC18–AC22), archive-flow.md and crews.md.
Evidence
At
16cb7824a1, on top of #752. Server typecheck exits 0 here:cd apps/server && vp test run src/j5/a2a), with the 11 newCrewWorktreestests running against real git: one item for many worktrees, remove all, remove some, keep all, an archive that runs again after keeping all, a recheck that skips a worktree whose already-changed files changed again, one with a nested repository, a changed worktree, a second answer refused, a removal failure, and a worktree removed elsewhere while the item is open. A migration 051 test checks one item per Crew.cd packages/client-runtime && vp test run src/j5) and 531 webj5tests, including 14 new logic tests for selection, counts, the five-row slice, outcome grouping, reasons and the refusal mapping.--report-unused-disable-directivesandvp fmtexit 0. The oneset-state-in-effectwarning atHumanInboxPage.tsx:613is in the existing person-scope reset effect, which my edits only moved.Not verified: a long list (more than five rows), a partial failure, a refused second answer, a non-Owner view and an item answered on another device (the logic is tested, but I haven't seen them rendered). I didn't run repo-wide checks.
Merge Danger
Door: one-way. Migration 051 adds a table that stays after a revert, and an approved removal deletes a worktree directory from disk, including its uncommitted changes. The branch is kept, so the commits survive, but uncommitted files are gone for good. I approve that per worktree, and the item says so before I do.
Blast Radius: every Crew archive, however it's reached: Fleet's Archive crew,
j5_archive_crewand the cascade from archiving a Captain. It adds a new item to the Inbox page and its badge.Things worth knowing:
git statusand the content hash of each changed file, so a further edit to a file that was already modified is caught. A nested repository or a status over 64 KB can't be compared, so those worktrees are always skipped and have to be removed by hand.force, because git refuses to remove a worktree with uncommitted changes and every worktree here has some. A locked worktree still fails and is reported.After merge: nothing.
UI changes
The Inbox item is new, so there's no before.
Live testing
Ran on the whole stack at
da64b2795c, before the last rebase onto j5/main, in an isolated test home fromj5-live-test. Claude Haiku 5.5.Not exercised live: a long list, a partial failure, a refused second answer, a non-Owner view, another device, and unarchive after a removal.
Upstream impact
None. Everything is under J5-owned paths.
Checklist
FORK.md(case text and file-table row) in this PR — none editeddocs/j5/product/upstream.md— no upstream behavior changesAGENTS.md) — Fleet and the Inbox ran live on Claude; the cascade,j5_archive_crewand the remaining states are covered by tests onlydocs/j5/product/and user docs rewritten where this changes themClaude Sonnet 5.5 through the Claude Code harness in J5 Code.
🤖 Generated with Claude Code