Repository navigation
fix(web): use the destination workspace default when switching machines - #43394
Conversation
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
…w rechecks Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
…nstead of a second filter Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… case Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
EvidenceReal web client, 1280×800, light theme, fresh isolated servers with Replay (dev). On both commits: open a primary draft on main, type “Plan the next change,” leave Workspace untouched, pair the destination with the same repository origin and an uncached t3.json specifying worktree, return directly to the draft, and manually switch machines. Wait for the destination branch and four further seconds.
Scenario and seed driver. scenarios:prove exited 0: failed on base at the Workspace assertion and passed on head. Not shown:
|


On the first manual machine switch, a draft could stay on Current checkout even when the destination’s t3.json specified New worktree. The composer now loads the destination’s default and preserves explicit workspace choices. It cancels the pending read when a switch is abandoned or its destination disappears, and reads from the new root if the project moves.
Reproduction on main
Commit 8bbdd33667 (main), in the running web app:
Workspace stays on Current checkout. Expected: Workspace shows New worktree.
The cause is at
apps/web/src/lib/retargetDraftWorkspace.ts:25. Ranpnpm scenarios:prove scripts/scenarios/machine-switch-reads-workspace-default.e2e.ts --target webwith the repro scenario added: it failed in 2 of 2 runs on a clean checkout, withASSERTION_FAILED: expect.toHaveText failedin the output.Evidence
Environment: The web app in Chromium on Linux x64, a fresh checkout.
Proven: the repro fails at the test commit d60e9a9e1d and passes on the head 50ab5ca433, both on main 0df79074ad.
Before the fix, recorded:
https://pub-b182a4071edc4521829926b34990540b.r2.dev/files/c6981e66-0a0f-4bc4-8182-2336307bbea2/before-recording.webm
After the fix, recorded:
https://pub-b182a4071edc4521829926b34990540b.r2.dev/files/416b90c6-3eea-4ff9-aa09-b3d44ffc5afb/after-recording.webm
Outside view: a person sees it in the running web app by following the steps under Reproduction on main.
Tests
pnpm exec vp run check:changed 0df79074ad5f21478b616fe812746c0896ec90d7passed on head.Not in this change
Who did the work
Made in T3 Code by GPT 6.2 Sol, Grok 4.7, Claude Opus 5.5 and Gemini 4 Neon