Repository navigation
fix(web): worktree setup progress clears after reconnecting once setup has ended - #47540
Conversation
… none Co-authored-by: Claude Opus 5.5 <[email protected]>
…p has ended Co-authored-by: Claude Opus 5.5 <[email protected]>
Distinguish a pending setup query from the server reporting no setup, and forget the held running snapshot on the latter so a retried setup shows. Co-authored-by: Claude Opus 5.5 <[email protected]>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Web and mobile clear stale running setup progress after reconnecting when the server reports that setup has ended. The change is confined to client-side state handling and preserves completed setup snapshots. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
The held snapshot is already reconciled during render, so filtering it again in resolveWorktreeSetupProgress was redundant; drop that and its test. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Dismissing prior approval to re-evaluate a3b4867
Mobile kept its own copy of the held-snapshot resolver, which treated a confirmed-empty server answer like no answer and so kept a stale running setup forever after a reconnect. Move resolveHeldWorktreeSetup to client-runtime and use it from both hooks. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Dismissing prior approval to re-evaluate cdf438a
Main replaced the held-snapshot resolvers with holdWorktreeSetupSnapshot in client-runtime. Take main's shape and apply the fix there: a confirmed-empty answer drops a held running snapshot, and both hooks pass undefined until their query has succeeded. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Dismissing prior approval to re-evaluate 60c7215
EvidenceReal web app, Chromium on Linux, dark theme, 1440×1080, fresh synthetic project/database on each commit. Start Replay in a worktree with checkout held at 50%; make only T3's socket silent; release checkout while offline; wait 65 seconds and confirm the host returns no setup snapshot; reconnect the same tab without reload. Scroll to the beginning and verify scrollTop=0 and the first user message is inside the viewport before capturing. Scenario: Expired setup clears after a silent socket reconnectProven: the scenario fails on base ab091dfedd and passes on head 60c7215671.
Before recording · After recording · Scenario source Both recordings end with the first “hello” message visible. Base still shows running checkout at 50% alongside “Done”; head shows the completed conversation with the setup card cleared. Supplemental real-app checks passed on both commits. Head captures below show a pending query retaining progress (one real setup reply held), a terminal failure retained after the host snapshot expired, and a retry restarting at 25% and completing. Incidental local paths in the failure text are redacted.
Native iOS supplemental check on head: the host returned no setup snapshot while the offline client retained 50%; after reconnect, the first user message and completed reply are visible and the setup card is gone. These are head-state captures, not a matched native before/after proof.
Native scenario · Pairing helper Native limitation: the base post-reconnect still clips the first message and checkout percentage, and stopping native recording timed out. The complete matched before/after proof is the web pair above. Not shown:
|












If the browser lost its connection during a worktree checkout and reconnected after the server had dropped the finished setup, the chat kept showing the checkout as running even though the agent had already replied. The client now tells a pending setup query apart from the server confirming there is no setup. On confirmation it forgets the held running snapshot, so the progress clears and a later retry, whose sequence starts over, shows its own progress. Finished and failed setups stay visible as before.
Related: #46341, #32591, #41059, #46321, #44460, #30897
Reproduction on main
Commit 7dda56fd5f (main). The completed turn appears, but the checkout still shows as running. Expected: The completed turn appears and the checkout progress clears.
The cause is at
apps/web/src/components/ChatView.logic.ts:322. Ranpnpm scenarios:prove scripts/scenarios/expired-worktree-setup-after-reconnect.e2e.ts --target webwith the repro scenario added: it failed in 2 of 2 runs on a clean boat.dev VM, withexpect.toBeHidden failedin the output.Evidence
Environment: Linux x64 on a boat.dev VM reset before each run, the repository's own tests.
Proven: the replacement test
apps/web/src/components/ChatView.logic.test.tsfails at the test commit 0f5e2dc5f5 and passes on the head 71b46eacae, both on main 0353e276be.The completed turn appears, but the checkout still shows as running.
The completed turn appears and the checkout progress clears.
Tests
pnpm exec vp run check:changed 0353e276be35d8ab1a84d0d009db8c5bb7388cddpassed on head.Not in this change
Who did the work
Made in T3 Code by GPT 6.2 Sol and Claude Opus 5.5