From 589f222771e957a7e2969eb48e4a7dab52856b91 Mon Sep 17 00:00:00 2001 From: Peter Jausovec Date: Fri, 12 Jun 2026 19:24:17 -0700 Subject: [PATCH] =?UTF-8?q?[BUG]=200.9.7=20UI:=20new=20chat=20hangs=20on?= =?UTF-8?q?=20"Thinking=E2=80=A6"=20Fixes=20#2009?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Signed-off-by: Peter Jausovec --- ui/src/components/chat/ChatInterface.tsx | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/ui/src/components/chat/ChatInterface.tsx b/ui/src/components/chat/ChatInterface.tsx index 6c055ae14..9b944bbb0 100644 --- a/ui/src/components/chat/ChatInterface.tsx +++ b/ui/src/components/chat/ChatInterface.tsx @@ -274,6 +274,12 @@ export default function ChatInterface({ selectedAgentName, selectedNamespace, se try { let currentSessionId = session?.id || sessionId; + // Track whether we just created a session in this invocation. If so, the + // rename block below must be skipped: the title was already set at creation + // time, and session React state hasn't yet re-rendered (so session?.name + // is still null, which would make isPlaceholderSessionTitle return true + // incorrectly and queue a redundant — potentially hanging — POST /sessions). + let justCreatedSession = false; // If there's no session, create one if (!currentSessionId) { @@ -311,6 +317,7 @@ export default function ChatInterface({ selectedAgentName, selectedNamespace, se } }); window.dispatchEvent(newSessionEvent); + justCreatedSession = true; } catch (error) { console.error("Error creating session:", error); toast.error("Error creating session"); @@ -322,6 +329,7 @@ export default function ChatInterface({ selectedAgentName, selectedNamespace, se } if ( + !justCreatedSession && currentSessionId && storedMessages.length === 0 && isPlaceholderSessionTitle(session?.name)