From 909fd5a571949bb25d65ba26e1b313b16cf1d4a7 Mon Sep 17 00:00:00 2001 From: Julius Marminge Date: Sun, 29 Mar 2026 18:03:30 -0700 Subject: [PATCH] Reset send start state after all send paths - Clear `sendStartedAtRef` unconditionally when send work finishes - Prevent stale send-phase state after success or failure --- apps/web/src/components/ChatView.tsx | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/apps/web/src/components/ChatView.tsx b/apps/web/src/components/ChatView.tsx index e21642adb9..5e5b3fb708 100644 --- a/apps/web/src/components/ChatView.tsx +++ b/apps/web/src/components/ChatView.tsx @@ -2757,9 +2757,7 @@ export default function ChatView({ threadId }: ChatViewProps) { ); } sendInFlightRef.current = false; - if (!turnStartSucceeded) { - sendStartedAtRef.current = null; - } + sendStartedAtRef.current = null; }); }; @@ -3027,9 +3025,9 @@ export default function ChatView({ threadId }: ChatViewProps) { threadIdForSend, err instanceof Error ? err.message : "Failed to send plan follow-up.", ); - sendStartedAtRef.current = null; } sendInFlightRef.current = false; + sendStartedAtRef.current = null; }); }, [ @@ -3146,9 +3144,9 @@ export default function ChatView({ threadId }: ChatViewProps) { description: err instanceof Error ? err.message : "An error occurred while creating the new thread.", }); - sendStartedAtRef.current = null; } sendInFlightRef.current = false; + sendStartedAtRef.current = null; }); }, [ activeProject,