Repository navigation
fix(web): keep prompts unsent when pull request checkout fails - #43855
StiensWout wants to merge 4 commits into
Conversation
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
Co-authored-by: GPT 6.2 Sol <codex@openai.com>
… a draft checkout prepareDraftCheckout already returns false when its checkout is no longer current. 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:
|
Prompts submitted during a pull request checkout stay in the composer if checkout fails. A waiting prompt sends only after checkout is applied to the draft. If a newer checkout takes over the same draft, the superseded handoff clears its loading state without adding its task or reporting success.
Related: #27578, #40350, #40397, #36775, #42828, #43381, #21479
Reproduction on main
Commit 314f59d1e7 (main), in the running web app:
An error says the pull request checkout could not be prepared. The composer is cleared, the prompt shows up as a sent message, and the agent starts working in the project's current folder on the branch that was already checked out there. Expected: The prompt stays in the composer after the checkout error, so you can retry the checkout or choose where to send it. The agent does not start in the project's current folder.
The cause is at
apps/web/src/components/chat/useComposerSend.ts:1841. Ranpnpm scenarios:prove scripts/scenarios/failed-pr-checkout-keeps-unsent-prompt.e2e.ts --target webwith the repro scenario added: it failed in 2 of 2 runs on a clean checkout, withASSERTION_FAILED: expect.toContainText failedin the output.Evidence
Environment: The web app in Chromium on Linux x64, a fresh checkout.
Proven: the repro fails at the test commit c14f707b87 and passes on the head 5988462787, both on main 9f96e0d9cb.
Before the fix, recorded:
https://pub-b182a4071edc4521829926b34990540b.r2.dev/files/c19ee124-bbbc-4681-a3d9-67e766bce2b1/before-recording.webm
After the fix, recorded:
https://pub-b182a4071edc4521829926b34990540b.r2.dev/files/b8421539-82ea-4aec-9d40-3263d3251b1b/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 9f96e0d9cb52e5c0e1f408c43d81e7a35a80c15fpassed on head.Not in this change
Who did the work
Made in T3 Code by GPT 6.2 Sol, Claude Opus 5.5, Grok 4.7 and Gemini 4 Neon