mirror of
https://github.com/open-webui/open-webui.git
synced 2026-09-17 23:52:29 +00:00
When navigating from a chat to a non-chat route (e.g. the admin panel), the previously-viewed chat stayed selected in the sidebar and deleting/archiving it wrongly redirected back to the new-chat page. Cloning a chat also left the source chat highlighted alongside the new clone, so two chats appeared selected at once. Two independent sources kept the stale selection: - The chatId store was never cleared when the Chat component unmounted, so $chatId still pointed at the last-viewed chat (this drove the delete/archive redirect). Clear chatId/chatTitle in Chat's onDestroy. - The sidebar's optimistic selectedChatId highlight, set on click, was only cleared on window blur (hence it appeared to fix itself after a tab switch) and never followed programmatic navigation. Bind it to the chatId store so it tracks the active chat for leave, delete and clone. |
||
|---|---|---|
| .. | ||
| Navbar | ||
| Overlay | ||
| Sidebar | ||
| ChatsModal.svelte | ||
| FilesModal.svelte | ||
| SearchModal.svelte | ||
| SharedChatsModal.svelte | ||
| Sidebar.svelte | ||
| UpdateInfoToast.svelte | ||