Repository navigation
fix(ui): show snapshot warning after forced worktree removal - #124605
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 16, 2026, 9:42 AM ET / 13:42 UTC. ClawSweeper reviewWhat this changesThis PR displays the Gateway’s snapshot-creation warning after a forced managed-worktree removal in the Worktrees page and session-deletion cleanup flow. Regression provenancePossible regression — suspected (reviewed change). No predecessor PR is attributed. Merge readinessKeep open. The patch correctly exposes an existing Gateway snapshot warning through both Control UI removal flows; it is a maintainer-authored, protected-label PR awaiting normal exact-head CI completion. Priority: P2 Review scores
Verification
How this fits togetherThe Control UI asks the Gateway to remove managed worktrees and presents outcomes to operators. The Gateway can complete a forced removal without a recovery snapshot, and this change routes that warning to the existing scoped UI error surfaces. flowchart LR
A[Operator confirms removal] --> B[Control UI]
B --> C[Gateway worktree removal]
C --> D[Removal result]
D --> E{Snapshot warning present?}
E -->|Yes| F[Scoped visible warning]
E -->|No| G[Successful removal]
F --> H[Operator can act with context]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +12, Tests +31. Total +43 across 4 files. View PR surface stats
Review metrics
Stored data modelPersistent data-model change detected: Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the existing Gateway result contract and land this narrow propagation once exact-head CI is green, so every forced-removal UI path explains when recovery is unavailable. Do we have a high-confidence way to reproduce the issue? Yes, from source: current main discards successful forced-removal results despite the Gateway contract allowing snapshotError; the branch’s focused tests exercise both affected consumers. Is this the best way to solve the issue? Yes. Reusing the existing typed Gateway result and each consumer’s scoped error owner is narrower and safer than adding a parallel warning channel or changing worktree-service behavior. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 85ac51990020. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Land-ready proof for exact head a68a08a:
Known proof gaps: none for this UI-only contract. No Gateway, protocol, service, persistence, configuration, release, or deployment change is included. |
|
Merged via squash.
|
…w#124605) * fix(ui): surface forced worktree snapshot failures * chore: remove normal-PR changelog entry
What Problem This Solves
Fixes an issue where operators forcing removal of a managed worktree after snapshot creation failed would see an unqualified success, even though no recovery snapshot existed. The same silent outcome affected preserved-worktree cleanup after deleting a session.
Why This Change Was Made
The Gateway already returns the typed
WorktreesRemoveResultwithremoved: trueandsnapshotErrorfor this explicit-force outcome. Both Control UI consumers now retain that result and routesnapshotErrorthrough their existing visible, scope-fenced error owners. No Gateway, protocol, or worktree-service behavior changes.User Impact
Operators still get the requested forced removal, but now also see why the recovery snapshot was not created instead of being told only that the removal succeeded.
Evidence
git diff --checkall pass.index-CkH47Swx.json localorigin/maintoindex-D-CN21K_.json this branch.{id}then{id, force: true}requests and a visiblenested gitlinkwarning after the worktree disappears.config-safe-write.e2e.test.tstimeout in shard 8/12; the targeted rerun and aggregateopenclaw/ci-gateare green at the unchanged head.Visual proof
forced-removal-warning.webm
AI-assisted: yes. The implementation and proof were directly reviewed and independently revalidated.