Repository navigation
Conversation
…run starts When a queued message started while it was being edited, the edit moved into the thread composer without its thread mentions and other context, even though the toast said it was kept. The context stayed behind in an orphaned queued-edit draft. The move now carries all context the prompt still references. A mention the user typed over stays out, and so do chips with no record. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
ApprovabilityVerdict: Approved at Macroscope's review found this PR approvable — Queued-message edits now retain their referenced context when recovered into an empty composer. The change remains within draft recovery, preserves attachment safeguards, and does not automatically submit the recovered content. You can add or adjust custom eligibility rules. Learn more. |
|
No actionable comments were generated in the recent review. Walkthrough
Merge Risk:
|
Problem
If a queued message starts while you are editing it, because the turn ended or another client started it, T3 Code moves your unsaved edit into the composer and says "Your unsaved edit was kept in the composer."
On web and desktop, that move carried only the prompt, images and files. Thread mentions and other context stayed behind in an orphaned
queued-edit:draft, and their chips were stripped from the text. If you then sent the message, the agent never got that context. Expected: the whole edit is kept, as on mobile, whereexitQueuedRunEditalready moves context.Steps: hold a turn on an approval, queue a message, click Edit queued message, add an
@threadmention, then approve so the queued message starts mid-edit.Change
moveComposerPromptAndImagesbecomesmoveComposerContent(recoverQueuedMessageEditis its only caller). It now moves every context type the prompt still references, and clears them from the source, so the edit draft goes away.referencedThreadContextson the send path.Scope and approval
No prior issue or discussion. This is a small, focused fix for an obvious bug: the toast says the edit was kept while part of it is dropped, and mobile already keeps it. It solves that one problem in one web store action, with no contract, server or settings changes.
Related open PRs, which I left out of this one:
Verification
Real app with the Replay provider, using the steps above. Both builds show the "kept" toast; only the fixed one still has the mention.
mainthreadContexts: 0threadContexts: 1queued-edit:draftthreadContexts: 1Two cases in
queuedMessageEdit.test.ts, both failed before their fix:With the fix:
queuedMessageEdit.test.tsandcomposerDraftStore.test.ts: 83 passeduseQueuedRunEdit.browser.test.tsx: 7 passedvp run check:changed: all steps passNot checked: the real run used
@threadonly, so the other context types go through the same code but were not each run in the app. Mobile is unchanged and was not run.Model: Claude Opus 5.5, harness: Claude Code in wisp.
🤖 Generated with Claude Code