[GH-ISSUE #22889] issue: Artifacts sidebar does not auto-show when browser tab goes to background #35364

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

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

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

After returning to the foreground, the Artifacts side panel should automatically open (or at least populate with the generated artifacts) so the user can view and interact with the rendered content.

Actual Behavior

The Artifacts side panel does not automatically open and/or remains empty/collapsed even though the response contains artifact content. It may require manual actions such as clicking the Artifacts tab, manually toggling the sidebar, or reloading the page to show artifacts.

Steps to Reproduce

  1. Open Open-WebUI and start a new chat.
  2. Ask the assistant to generate output that should create artifacts (e.g., HTML page with scripts/stylesor生成一个hello world的html``).
  3. Immediately switch the browser tab to the background (switch to another tab / minimize the browser / lock screen).
  4. Wait until the assistant starts generating the response.
  5. After generation finishes, switch back to the Open WebUI tab.
  6. Observe the Artifacts side panel behavior.

Logs & Screenshots

Image

Additional Information

I believe this is related to requestAnimationFrame usage in src/lib/components/chat/Chat.svelte (specifically the requestAnimationFrame call and the contentsRAF logic that schedules the UI/content update for Artifacts).

When I temporarily replaced requestAnimationFrame with setTimeout, the problem stopped occurring: after returning the tab to the foreground, the Artifacts side panel reliably auto-updates/shows the generated artifacts.

However, switching to setTimeout is not an ideal fix. requestAnimationFrame is generally the correct mechanism for sync-ing UI updates with the browser’s rendering pipeline, and setTimeout may introduce less optimal timing/efficiency (and could behave differently across browsers or under heavy load). My suspicion is that requestAnimationFrame callbacks are being throttled/paused while the tab is in the background, causing the scheduled Artifacts update to never run (or to run at an unexpected time) when the response finishes generating.

Originally created by @ShirasawaSama on GitHub (Mar 20, 2026). Original GitHub issue: https://github.com/open-webui/open-webui/issues/22889 ### 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 After returning to the foreground, the Artifacts side panel should automatically open (or at least populate with the generated artifacts) so the user can view and interact with the rendered content. ### Actual Behavior The Artifacts side panel does not automatically open and/or remains empty/collapsed even though the response contains artifact content. It may require manual actions such as clicking the Artifacts tab, manually toggling the sidebar, or reloading the page to show artifacts. ### Steps to Reproduce 1. Open Open-WebUI and start a new chat. 2. Ask the assistant to generate output that should create artifacts (e.g., HTML page with scripts/styles` or `生成一个hello world的html``). 3. Immediately switch the browser tab to the background (switch to another tab / minimize the browser / lock screen). 4. Wait until the assistant starts generating the response. 5. After generation finishes, switch back to the Open WebUI tab. 6. Observe the Artifacts side panel behavior. ### Logs & Screenshots <img width="2136" height="952" alt="Image" src="https://github.com/user-attachments/assets/bdf2a43b-6c19-4612-b8ce-5beb773c2751" /> ### Additional Information I believe this is related to `requestAnimationFrame` usage in `src/lib/components/chat/Chat.svelte` (specifically the `requestAnimationFrame` call and the `contentsRAF` logic that schedules the UI/content update for Artifacts). When I temporarily replaced `requestAnimationFrame` with `setTimeout`, the problem stopped occurring: after returning the tab to the foreground, the Artifacts side panel reliably auto-updates/shows the generated artifacts. However, switching to `setTimeout` is not an ideal fix. `requestAnimationFrame` is generally the correct mechanism for sync-ing UI updates with the browser’s rendering pipeline, and `setTimeout` may introduce less optimal timing/efficiency (and could behave differently across browsers or under heavy load). My suspicion is that `requestAnimationFrame` callbacks are being throttled/paused while the tab is in the background, causing the scheduled Artifacts update to never run (or to run at an unexpected time) when the response finishes generating.
GiteaMirror added the bug label 2026-04-25 09:35:06 -05:00
Author
Owner

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

@Algorithm5838

<!-- gh-comment-id:4096900893 --> @ShirasawaSama commented on GitHub (Mar 20, 2026): @Algorithm5838
Author
Owner

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

Hopefully this https://github.com/open-webui/open-webui/pull/22910 addresses it.

<!-- gh-comment-id:4101316853 --> @Algorithm5838 commented on GitHub (Mar 20, 2026): Hopefully this https://github.com/open-webui/open-webui/pull/22910 addresses it.
Author
Owner

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

Addressed in dev.

<!-- gh-comment-id:4101499814 --> @tjbck commented on GitHub (Mar 20, 2026): Addressed in dev.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#35364