Skip to content

Commit 0fba108

Browse files
Toni Angererclaude
authored andcommitted
fix(web): Enter waits for pending draft work before resuming
An empty draft can still have context importing into it. Run the resume branch after the existing pending-work guards so Enter shows the same "still bringing attached context" notice instead of resuming early. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent fbd6fd1 commit 0fba108

1 file changed

Lines changed: 6 additions & 6 deletions

File tree

‎apps/web/src/components/chat/ChatComposer.tsx‎

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2053,12 +2053,6 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
20532053
event?.preventDefault();
20542054
return;
20552055
}
2056-
// An empty draft has nothing to send; Enter does what the Resume thread button does.
2057-
if (showResumeAction && !activePendingProgress) {
2058-
event?.preventDefault();
2059-
if (!isSendBusy && environmentUnavailable === null) onResume();
2060-
return;
2061-
}
20622056
// A send while a pasted image is still compressing would strand that image:
20632057
// the turn snapshot wouldn't include it, and it would surface in the *next*
20642058
// draft instead.
@@ -2080,6 +2074,12 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
20802074
});
20812075
return;
20822076
}
2077+
// An empty draft has nothing to send; Enter does what the Resume thread button does.
2078+
if (showResumeAction && !activePendingProgress) {
2079+
event?.preventDefault();
2080+
if (!isSendBusy && environmentUnavailable === null) onResume();
2081+
return;
2082+
}
20832083
const submission = submitComposerDraft({
20842084
prompt: promptRef.current,
20852085
submissionTarget: activePendingProgress ? "pending-user-input" : "provider-turn",

0 commit comments

Comments
 (0)