Repository navigation
Prevent duplicate chat submissions during asynchronous sends - #747
Merged
Merged
Conversation
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.
Merge decision: ready — repeated activation of an unchanged chat draft no longer creates duplicate active/queued work.
User outcome
Fixes native task
#V#task_agent_837061ae33f7f4abdfb9c1539e833aa4. Concurrent sends could both await conversation creation, while image sends retained their caption and allowed a repeated click/Enter to enqueue it again.Material changes
Claim the composer draft synchronously before asynchronous preparation, scoped to conversation and organisation generation. Keep the claim through an unchanged attachment draft; release it on draft edits/clearing and on completion or failure. Check it before interpreting a repeated composer event as steering. Explicit queue execution and server observation retain their existing paths.
Evidence
9ac3d6681and pass with the fix: concurrent session creation and repeated attachment sends, including edited/retyped follow-ups.git diff --checkpass.tests/browser/chatDuplicateSubmission.cjs; task-local logs/screenshots:.run/duplicate-send/.Ship boundary
Minimum criteria are prevention of both reproduced duplicates and preservation of deliberate follow-ups and failed-send recovery. A candidate-caused lost draft, blocked retry or duplicate admission would stop shipment; none was observed. Existing baseline test failures are non-blocking. No backend policy, allowed-model UI, live state mutation or deployment is included.