From 394295ec766a369faf5f271054ed1c75761418d0 Mon Sep 17 00:00:00 2001 From: Classic298 <27028174+Classic298@users.noreply.github.com> Date: Sat, 3 Oct 2026 15:04:29 +0200 Subject: [PATCH] fix: older responses keep a loading cursor forever after opening a chat (#31895) Opening a chat only cleared the loading cursor on the newest response that never finished, so an older one (from a cancelled generation, or a turn an earlier Open WebUI version left unfinished) kept spinning and never showed its copy and regenerate buttons. Now, when no generation is running in the chat, every unfinished response shows as finished on load, except one waiting for the user to answer a tool's question. While a generation is running nothing changes, because another model's response to the same message may still be streaming in. Fixes #14806 --- src/lib/components/chat/Chat.svelte | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/src/lib/components/chat/Chat.svelte b/src/lib/components/chat/Chat.svelte index 6ede5f90a4..ba8c2ccb7e 100644 --- a/src/lib/components/chat/Chat.svelte +++ b/src/lib/components/chat/Chat.svelte @@ -2470,12 +2470,16 @@ } else { taskIds = null; // No active tasks and message incomplete → generation was interrupted - if ( - currentMessage?.role === 'assistant' && - !currentMessage.done && - !messageHasPendingAskUser(currentMessage) - ) { - currentMessage.done = true; + if (pendingTaskIds.length === 0) { + for (const message of Object.values(history.messages)) { + if ( + message?.role === 'assistant' && + !message.done && + !messageHasPendingAskUser(message) + ) { + message.done = true; + } + } } }