[PR #13066] [CLOSED] perf: Optimize data loading when hovering over sidebar chat items to improve performance. #110396

Closed
opened 2026-05-18 09:59:23 -05:00 by GiteaMirror · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/open-webui/open-webui/pull/13066
Author: @cr-zhichen
Created: 4/20/2025
Status: Closed

Base: devHead: dev


📝 Commits (2)

  • a7e12d9 fix: fix excessive bandwidth usage caused by loading full chat content on hover in Sidebar
  • d2de674 fix(sidebar): ensure only one chat is selected at a time, including inside folders

📊 Changes

4 files changed (+56 additions, -23 deletions)

View changed files

📝 src/lib/components/layout/Sidebar.svelte (+20 -4)
📝 src/lib/components/layout/Sidebar/ChatItem.svelte (+9 -19)
📝 src/lib/components/layout/Sidebar/Folders.svelte (+9 -0)
📝 src/lib/components/layout/Sidebar/RecursiveFolder.svelte (+18 -0)

📄 Description

Problem Fix

Previously, hovering the mouse over a chat item in the sidebar would automatically request and load the entire content of that chat (including all messages and base64 images). If a chat contained a large number of images, this would result in a significant amount of data being repeatedly transferred each time the hover occurred, greatly wasting bandwidth and impacting performance.

Main Changes

  • Removed the logic for automatically requesting full chat content on hover to prevent repeated large data transfers.
  • When dragging, only chat metadata (id, title) is passed, no longer the full chat object, further improving performance.
  • Maintained existing drag and drop and interaction functionalities.
  • Simplified state management, improving sidebar performance, especially beneficial for chats with numerous images.
  • Changed comments from Chinese to English for easier international collaboration.

Impact

Now, the full data is only fetched when truly needed (e.g., clicking to enter the chat or dragging), significantly improving efficiency and user experience.


Changelog Entry

Description

  • Optimized the hover behavior of sidebar chat items to avoid unnecessary data requests, improving overall performance and bandwidth utilization.

Changed

  • When dragging, only chat metadata (id, title) is passed, no longer the full chat object.
  • Changed comments from Chinese to English.

Removed

  • Removed the logic for automatically requesting full chat content on mouse hover.

Fixed

  • Fixed the issue of repeated large data transfers and wasted bandwidth caused by hovering.

🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/open-webui/open-webui/pull/13066 **Author:** [@cr-zhichen](https://github.com/cr-zhichen) **Created:** 4/20/2025 **Status:** ❌ Closed **Base:** `dev` ← **Head:** `dev` --- ### 📝 Commits (2) - [`a7e12d9`](https://github.com/open-webui/open-webui/commit/a7e12d968e7513899e10421ca5aa7f04a8831fa3) fix: fix excessive bandwidth usage caused by loading full chat content on hover in Sidebar - [`d2de674`](https://github.com/open-webui/open-webui/commit/d2de674b02b0b89ab922866b4a31f26074e877be) fix(sidebar): ensure only one chat is selected at a time, including inside folders ### 📊 Changes **4 files changed** (+56 additions, -23 deletions) <details> <summary>View changed files</summary> 📝 `src/lib/components/layout/Sidebar.svelte` (+20 -4) 📝 `src/lib/components/layout/Sidebar/ChatItem.svelte` (+9 -19) 📝 `src/lib/components/layout/Sidebar/Folders.svelte` (+9 -0) 📝 `src/lib/components/layout/Sidebar/RecursiveFolder.svelte` (+18 -0) </details> ### 📄 Description #### Problem Fix Previously, hovering the mouse over a chat item in the sidebar would automatically request and load the entire content of that chat (including all messages and base64 images). If a chat contained a large number of images, this would result in a significant amount of data being repeatedly transferred each time the hover occurred, greatly wasting bandwidth and impacting performance. #### Main Changes - Removed the logic for automatically requesting full chat content on hover to prevent repeated large data transfers. - When dragging, only chat metadata (id, title) is passed, no longer the full chat object, further improving performance. - Maintained existing drag and drop and interaction functionalities. - Simplified state management, improving sidebar performance, especially beneficial for chats with numerous images. - Changed comments from Chinese to English for easier international collaboration. #### Impact Now, the full data is only fetched when truly needed (e.g., clicking to enter the chat or dragging), significantly improving efficiency and user experience. --- ### Changelog Entry #### Description - Optimized the hover behavior of sidebar chat items to avoid unnecessary data requests, improving overall performance and bandwidth utilization. #### Changed - When dragging, only chat metadata (id, title) is passed, no longer the full chat object. - Changed comments from Chinese to English. #### Removed - Removed the logic for automatically requesting full chat content on mouse hover. #### Fixed - Fixed the issue of repeated large data transfers and wasted bandwidth caused by hovering. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
GiteaMirror added the pull-request label 2026-05-18 09:59:24 -05:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: github-starred/open-webui#110396