Skip to content

Commit 4186b1a

Browse files
committed
fix(composer): only stay silent when the images really said it first
Suppressing the busy toast for any drop that contained an image assumed the image path had already reported the same refusal. It only does for pending plan questions — the one guard addComposerImages shares with insertComposerTextAtEnd. While connecting, awaiting approval, or with no project selected, a mixed drop would attach the images and drop the paths without a word, which is the silent failure this branch exists to avoid. The suppression now requires that shared condition to actually hold.
1 parent 82f2be0 commit 4186b1a

1 file changed

Lines changed: 7 additions & 3 deletions

File tree

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

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2592,9 +2592,13 @@ export const ChatComposer = memo(function ChatComposer(props: ChatComposerProps)
25922592
return false;
25932593
}
25942594
if (!insertComposerTextAtEnd(text, { ensureLeadingBoundary: true })) {
2595-
// This refusal comes from the same composer state that already rejected
2596-
// the images, so one drop never says it twice.
2597-
if (!hadImages) {
2595+
// Pending plan questions is the ONLY refusal `addComposerImages` shares
2596+
// with the insert, so that is the only case a mixed drop has already been
2597+
// told about. Staying silent for the others — connecting, approval,
2598+
// project selection — would attach the images and drop the paths without
2599+
// a word, which is the failure this whole branch exists to avoid.
2600+
const alreadyReported = hadImages && pendingUserInputs.length > 0;
2601+
if (!alreadyReported) {
25982602
reportFailure("The composer is busy; try again once it is ready.");
25992603
}
26002604
return false;

0 commit comments

Comments
 (0)