mirror of
https://github.com/open-webui/open-webui.git
synced 2026-07-16 14:39:31 -05:00
[PR #14266] [CLOSED] feat: add search bar with clear button to user chats modal #10225
Reference in New Issue
Block a user
Delete Branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/14266
Author: @silentoplayz
Created: 5/24/2025
Status: ❌ Closed
Base:
dev← Head:user-chats-modal📝 Commits (2)
54aa103feat: add search bar to user chats modale6049acfeat: Add clear button for search bar📊 Changes
1 file changed (+118 additions, -41 deletions)
View changed files
📝
src/lib/components/admin/Users/UserList/UserChatsModal.svelte(+118 -41)📄 Description
Pull Request Checklist
Before submitting, make sure you've checked the following:
devbranch.Changelog Entry
Description
This pull request introduces search functionality and improves the sorting capabilities within the User Chats modal. It also refactors the data fetching and deletion logic for better structure and error handling, and correctly implements the deletion confirmation using the
ConfirmDialogcomponent.Added
searchValuestate variable to store the current search query.searchValue.toast.error.on:cancelhandler for theConfirmDialogto reset the chat to delete.chats === null).Changed
fetchUserChatsfunction.$: if (show)) to fetch chats only once when the modal opens andchatsis null.setSortKeyto set the default order based on the key (descending for date, ascending for title).nullorundefinedvalues and uselocaleComparefor string sorting.ConfirmDialogcomponent'son:confirmevent.deleteChatHandler) to close the confirm dialog and re-fetch the chat list only if the modal is still open and the user is valid.userexistence in the modal title display.Removed
getArchivedChatList.Fixed
ConfirmDialog, ensuring the deletion happens only on confirmation and the modal state is managed correctly.Additional Information
chats = nullwhenshowwas false has been removed. Chats now remain in memory when the modal is hidden, which might be a performance consideration for users with many chats, but simplifies the fetching logic on re-opening.Screenshots or Videos
Before:



After:
Contributor License Agreement
By submitting this pull request, I confirm that I have read and fully agree to the Contributor License Agreement (CLA), and I am providing my contributions under its terms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.