Skip to content

Commit 842e05d

Browse files
only21milclaude
andcommitted
fix(web): keep the failure toast until dismissed when the failed message was not restored
Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 9e41fc6 commit 842e05d

1 file changed

Lines changed: 3 additions & 4 deletions

File tree

‎apps/web/src/components/chat/useComposerSend.ts‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1533,10 +1533,9 @@ export function useComposerSend(input: ComposerSendInput) {
15331533
void navigate({ to: "/draft/$draftId", params: { draftId } });
15341534
},
15351535
},
1536-
// The toast is then the only copy of the failed text, so it stays until dismissed.
1537-
...(copyFailedMessage
1538-
? { timeout: 0, data: { secondaryActionProps: copyFailedMessage } }
1539-
: {}),
1536+
// An unrestored message has no other trace, so the toast stays until dismissed.
1537+
...(!restoresDraft ? { timeout: 0 } : {}),
1538+
...(copyFailedMessage ? { data: { secondaryActionProps: copyFailedMessage } } : {}),
15401539
}),
15411540
);
15421541
failureToastShown = true;

0 commit comments

Comments
 (0)