mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #12422] [CLOSED] refac: Revamp "Archived Chats" modal #22909
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/12422
Author: @silentoplayz
Created: 4/3/2025
Status: ❌ Closed
Base:
dev← Head:revamp-archived-chats-modal📝 Commits (2)
a49bb7frefac: revamp archived chats modalfcdd1d0fix: {sortedChats.length}📊 Changes
1 file changed (+231 additions, -132 deletions)
View changed files
📝
src/lib/components/layout/Sidebar/ArchivedChatsModal.svelte(+231 -132)📄 Description
Pull Request Checklist
devbranch.Changelog Entry
Description
This pull request refactors and enhances the Archived Chats modal component, introducing sorting, improved UI/UX, better error handling, and accessibility enhancements.
Added
unarchiveAllHandlerfunction, including per-chat error catching and toasts.aria-labelattributes to individual chat action buttons (Unarchive, Delete) for improved accessibility, including the chat title in the label.dispatch('change')todeleteChatHandlerto notify parent components of changes.ChevronUpandChevronDownicon components for sorting indicators.Changed
#eachblock into a derived reactive variable (sortedChats) for improved performance and code clarity.thead) is now sticky (position: sticky) for better usability with scrolling lists.max-h-[50vh]).titleprop.md:flextomd:table-cellfor the "Created At" column for better semantic table structure.unarchiveAllHandlernow iterates over a copy of thechatsarray to prevent issues if the list is modified during asynchronous operations.(chat.id)to the#each chatloop for potentially better Svelte reactivity performance.exportChatsHandlerfromchatstochatsToExportto avoid shadowing the component-level state variable.Fixed
dispatch('change')is called indeleteChatHandler.Additional Information
aria-labelon interactive elements.Screenshots
Before:After:🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.