[GH-ISSUE #22891] issue: Action buttons appear under assistant message when switching chats immediately after sending #35365

Closed
opened 2026-04-25 09:35:10 -05:00 by GiteaMirror · 2 comments
Owner

Originally created by @ShirasawaSama on GitHub (Mar 20, 2026).
Original GitHub issue: https://github.com/open-webui/open-webui/issues/22891

Check Existing Issues

  • I have searched for any existing and/or related issues.
  • I have searched for any existing and/or related discussions.
  • I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!).
  • I am using the latest version of Open WebUI.

Installation Method

Git Clone

Open WebUI Version

v0.8.10

Ollama Version (if applicable)

No response

Operating System

MacOS 26

Browser (if applicable)

No response

Confirmation

  • I have read and followed all instructions in README.md.
  • I am using the latest version of both Open WebUI and Ollama.
  • I have included the browser console logs.
  • I have included the Docker container logs.
  • I have provided every relevant configuration, setting, and environment variable used in my setup.
  • I have clearly listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc).
  • I have documented step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation. My steps:
  • Start with the initial platform/version/OS and dependencies used,
  • Specify exact install/launch/configure commands,
  • List URLs visited, user input (incl. example values/emails/passwords if needed),
  • Describe all options and toggles enabled or changed,
  • Include any files or environmental changes,
  • Identify the expected and actual result at each stage,
  • Ensure any reasonably skilled user can follow and hit the same issue.

Expected Behavior

The action buttons under the assistant message should only appear after the assistant response is fully completed (i.e., after the message is truly marked “done”).

Actual Behavior

The action buttons appear prematurely right after switching chats, even though the assistant response has not finished.

Steps to Reproduce

  1. Open Open WebUI.
  2. In Conversation A, send a prompt to the LLM.
  3. Immediately (before the assistant finishes streaming/finishing) switch to Conversation B.
  4. Return to Conversation A (or observe the UI during/after the switch).
  5. Notice that the assistant message area in Conversation A shows the action buttons (e.g., follow-up/controls) even though the assistant response is not actually finished yet.

Logs & Screenshots

Image

Additional Information

I suspect this is caused by the chat history handling in src/lib/components/chat/Chat.svelte.

When the UI switches to a new history.currentId, the code iterates through history.messages and sets message.done = true for assistant messages (see the logic around if (history.currentId) { ... message.role === 'assistant' ... message.done = true }).

If this runs during a conversation switch while the assistant message from Conversation A is still streaming, it can incorrectly mark it as completed, which then triggers the bottom action buttons to render.

Originally created by @ShirasawaSama on GitHub (Mar 20, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/22891 ### Check Existing Issues - [x] I have searched for any existing and/or related issues. - [x] I have searched for any existing and/or related discussions. - [x] I have also searched in the CLOSED issues AND CLOSED discussions and found no related items (your issue might already be addressed on the development branch!). - [x] I am using the latest version of Open WebUI. ### Installation Method Git Clone ### Open WebUI Version v0.8.10 ### Ollama Version (if applicable) _No response_ ### Operating System MacOS 26 ### Browser (if applicable) _No response_ ### Confirmation - [x] I have read and followed all instructions in `README.md`. - [x] I am using the latest version of **both** Open WebUI and Ollama. - [x] I have included the browser console logs. - [x] I have included the Docker container logs. - [x] I have **provided every relevant configuration, setting, and environment variable used in my setup.** - [x] I have clearly **listed every relevant configuration, custom setting, environment variable, and command-line option that influences my setup** (such as Docker Compose overrides, .env values, browser settings, authentication configurations, etc). - [x] I have documented **step-by-step reproduction instructions that are precise, sequential, and leave nothing to interpretation**. My steps: - Start with the initial platform/version/OS and dependencies used, - Specify exact install/launch/configure commands, - List URLs visited, user input (incl. example values/emails/passwords if needed), - Describe all options and toggles enabled or changed, - Include any files or environmental changes, - Identify the expected and actual result at each stage, - Ensure any reasonably skilled user can follow and hit the same issue. ### Expected Behavior The action buttons under the assistant message should only appear after the assistant response is fully completed (i.e., after the message is truly marked “done”). ### Actual Behavior The action buttons appear prematurely right after switching chats, even though the assistant response has not finished. ### Steps to Reproduce 1. Open Open WebUI. 2. In Conversation A, send a prompt to the LLM. 3. Immediately (before the assistant finishes streaming/finishing) switch to Conversation B. 4. Return to Conversation A (or observe the UI during/after the switch). 5. Notice that the assistant message area in Conversation A shows the action buttons (e.g., follow-up/controls) even though the assistant response is not actually finished yet. ### Logs & Screenshots <img width="814" height="280" alt="Image" src="https://github.com/user-attachments/assets/22e57894-d5e8-4087-bf8b-37787487d497" /> ### Additional Information I suspect this is caused by the chat history handling in `src/lib/components/chat/Chat.svelte`. When the UI switches to a new `history.currentId`, the code iterates through `history.messages` and sets `message.done = true` for assistant messages (see the logic around `if (history.currentId) { ... message.role === 'assistant' ... message.done = true }`). If this runs during a conversation switch while the assistant message from Conversation A is still streaming, it can incorrectly mark it as completed, which then triggers the bottom action buttons to render.
GiteaMirror added the bug label 2026-04-25 09:35:10 -05:00
Author
Owner

@tjbck commented on GitHub (Mar 20, 2026):

This is an intended behaviour as a fallback but updated in dev.

<!-- gh-comment-id:4101125911 --> @tjbck commented on GitHub (Mar 20, 2026): This is an intended behaviour as a fallback but updated in dev.
Author
Owner

@ShirasawaSama commented on GitHub (Mar 23, 2026):

@tjbck There's a new issue: after sending a message, the <Skeleton /> tag no longer appears.

Image
<!-- gh-comment-id:4108891492 --> @ShirasawaSama commented on GitHub (Mar 23, 2026): @tjbck There's a new issue: after sending a message, the `<Skeleton />` tag no longer appears. <img width="1818" height="408" alt="Image" src="https://github.com/user-attachments/assets/1f88fece-d0cf-40fe-ade9-74485ac74a70" />
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#35365