mirror of
https://github.com/open-webui/open-webui.git
synced 2026-05-06 19:08:59 -05:00
[PR #12410] [CLOSED] feat: Chats page overhaul + Add Import/Export Chats (.zip) #9703
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/12410
Author: @silentoplayz
Created: 4/3/2025
Status: ❌ Closed
Base:
dev← Head:export-chats-as-zip📝 Commits (6)
37bea93pushb056e67chore: format693f2efrefac: huge refactor (hopefully for the better)e8d6898chore: remove commentsdebbe91chore: format again98ebeafheaders added📊 Changes
5 files changed (+740 additions, -175 deletions)
View changed files
📝
package-lock.json(+45 -12)📝
package.json(+1 -0)📝
pyproject.toml(+1 -0)📝
src/lib/components/chat/Settings/Chats.svelte(+674 -163)📝
src/lib/components/layout/Sidebar.svelte(+19 -0)📄 Description
Pull Request Checklist
devbranch.Changelog Entry
Description
I WILL FILL THIS OUT BETTER SOON!
Added
jszip==10.8.2, for .zip file handling.Changes
Changelog for
Sidebar.svelte:Added validation and type-checking for
itemsparameter:itemsis not null or undefined.itemsis iterable.itemsis a single object instead of an array, converting it to an array.itemsis not iterable after the previous transformations.Refactored
importChatHandlerfunction:itemsbefore processing.items..chat).The
importChatHandlerfunction now ensures thatitemsis valid and iterable before processing, and it handles both arrays of items and single item objects.Deprecated
Removed
Fixed
Security
Breaking Changes
Additional Information
Screenshots or Videos
Before:After:The toast notifications have mostly been streamlined/standardized with an overhaul in the major refac commit of this PR!
Import Chats (.json):Successful import of a single .json chat file that came from an exported .zip file (after the fact that the .zip file has been extracted and you are importing a chat from the

Chatsfolder contained within the .zip):Successful import of a .json file export of all chats:

after waiting for it to finish:

Failed attempt of importing an already exported .zip file for chats without using the

Import Chats (.zip)option and instead having tried to useImport Chats (.json)option:Import Chats (.zip):Successful import of a .zip file of chats from an exported .zip file:

after waiting for it to finish:

Failed attempt at importing a .json file export of all chats without using the

Import Chats (.json)option, but theImport Chats as .zipoption instead:Export Chats (.json):Export Chats (.zip):Bonus Notifications Added
Both
Export Chats (.json)andExport Chats (.zip)options will fail with a toast notification displayed if there are no chats present to be exported:The same logic also applies for trying to archive/delete chats when none exist.
You're now displayed a toast notification upon successfully archiving and deleting chats and their count.
Dynamic messages for import options
Chat options gray out if exporting chats
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.