Repository navigation
fix(composer): preserve newer drafts after command completion - #934
Merged
vastsa merged 3 commits intoSep 23, 2026
Merged
Conversation
Only clear a completed command draft when its text and attachments still match the submitted snapshot. This keeps a new message typed during compaction available, including after the user switches sessions.
vastsa
added a commit
that referenced
this pull request
Sep 26, 2026
Refresh the plugin UI slot branch before continuing the slot work so the composer changes build on the draft-revision guard from #934 and the rest of main instead of a stale base.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Running
/compactand writing the next message while it finishes currently erases the new draft. Command completion now clears only the submitted text and attachments; edits made while waiting survive, including after switching sessions. An unchanged command draft still clears normally.Before/after recording (1920 × 1440, real desktop app; local model with controlled response timing):
compact-draft-before-after-hd.mp4
The fix is confined to two composer hooks, with regression coverage and matching English/Chinese specs. The regression fails on the original code and passes with the fix for new text, added images, session switching, and unchanged drafts.
Validation: composer interaction suite, 22 focused tests, JS build, desktop typecheck, lint, and docs checks passed. The real macOS desktop reproduction uses isolated data and a local model with a controlled response delay.
Candidate validation
Base:
454715877750(0.15.6). Candidate:559c01b4d.pnpm test:e2e:composer-pastepassed on the committed candidate. The desktop recording uses the real renderer, preload, Electron main, Host and agent runtime; only the model service is a local fixture.