From 958ad367348f7030d0b4592f4d6d644ff3d0b8d0 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sat, 10 Oct 2026 17:56:02 +0200 Subject: [PATCH] fix: reply in a new chat sometimes stays blank until reload (#32181) In a new chat the reply sometimes stayed blank and looked like it was still generating, with the loading animation and the Stop button, even though the answer was complete on the server. Reloading the page showed it. It happened when the chat's new title arrived while the reply was still coming in: refreshing the chat list with the new title replaced the finished answer with a blank one. A title or tag update no longer overwrites the reply, so the finished answer shows as soon as it is done. Fixes #32091 --- src/lib/components/chat/Chat.svelte | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 34a037fb6a..546a5a178a 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -1549,9 +1549,11 @@ await onEmbeddedChatTitle?.($chatId, data); } await refreshChatList(localStorage.token); + return; // The message copy is stale after the await; skip the trailing write-back. } else if (type === 'chat:tags') { chat = await getChatById(localStorage.token, $chatId); allTags.set(await getAllTags(localStorage.token)); + return; } else if (type === 'source' || type === 'citation') { if (data?.type === 'code_execution') { // Code execution; update existing code execution by ID, or add new one.