Documentation: No user-facing docs needed (existing import flow, no new behavior)
Dependencies: None
Testing: Manually verified the logic against the reported scenario
Agentic AI Code: Reviewed and manually tested
Code review: Self-reviewed
Design & Architecture: No new settings or architectural changes
Git Hygiene: Single atomic commit on dev
Title Prefix:fix:
Changelog Entry
Description
ChatGPT recently started including folder and project metadata entries in conversations.json exports. These entries lack a mapping key. When a folder entry appeared first in the array, getImportOrigin() checked only _chats[0], misidentified the file as webui format, and convertOpenAIChats() was never called — resulting in "Imported 0 Chats".
Fixed
getImportOrigin(): check if any item has a mapping key (via .some()), not just _chats[0]
convertOpenAIChats(): skip entries without mapping before attempting conversion, so folder/project metadata doesn't cause failures
Before
Importing a ChatGPT export that starts with a folder entry:
Imported 0 Chats (green success toast, but nothing imported)
After
Same file imports correctly — folder/project entries are skipped, all conversations are imported.
The root cause is that ChatGPT exports now contain entries like { "id": "...", "title": "My Folder", "type": "folder", ... } alongside conversation entries. These lack the mapping key that conversations have.
Two prior PRs (#23524, #23525) identified the same root cause but were closed due to targeting main instead of dev and missing CLA.
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.
## 📋 Pull Request Information
**Original PR:** https://github.com/open-webui/open-webui/pull/23531
**Author:** [@lawrence3699](https://github.com/lawrence3699)
**Created:** 4/9/2026
**Status:** 🔄 Open
**Base:** `dev` ← **Head:** `fix/chatgpt-import-folder-entries`
---
### 📝 Commits (1)
- [`d260500`](https://github.com/open-webui/open-webui/commit/d26050081c6b11782c242d5f838e595d9c6cd2f0) fix: handle ChatGPT exports containing folder/project metadata entries
### 📊 Changes
**1 file changed** (+8 additions, -1 deletions)
<details>
<summary>View changed files</summary>
📝 `src/lib/utils/index.ts` (+8 -1)
</details>
### 📄 Description
# Pull Request Checklist
- [x] **Target branch:** `dev`
- [x] **Description:** See below
- [x] **Changelog:** Included
- [ ] **Documentation:** No user-facing docs needed (existing import flow, no new behavior)
- [x] **Dependencies:** None
- [x] **Testing:** Manually verified the logic against the reported scenario
- [x] **Agentic AI Code:** Reviewed and manually tested
- [x] **Code review:** Self-reviewed
- [x] **Design & Architecture:** No new settings or architectural changes
- [x] **Git Hygiene:** Single atomic commit on `dev`
- [x] **Title Prefix:** `fix:`
# Changelog Entry
### Description
ChatGPT recently started including folder and project metadata entries in `conversations.json` exports. These entries lack a `mapping` key. When a folder entry appeared first in the array, `getImportOrigin()` checked only `_chats[0]`, misidentified the file as `webui` format, and `convertOpenAIChats()` was never called — resulting in "Imported 0 Chats".
### Fixed
- `getImportOrigin()`: check if *any* item has a `mapping` key (via `.some()`), not just `_chats[0]`
- `convertOpenAIChats()`: skip entries without `mapping` before attempting conversion, so folder/project metadata doesn't cause failures
### Before
Importing a ChatGPT export that starts with a folder entry:
```
Imported 0 Chats (green success toast, but nothing imported)
```
### After
Same file imports correctly — folder/project entries are skipped, all conversations are imported.
---
### Additional Information
- Fixes #23505
- The root cause is that ChatGPT exports now contain entries like `{ "id": "...", "title": "My Folder", "type": "folder", ... }` alongside conversation entries. These lack the `mapping` key that conversations have.
- Two prior PRs (#23524, #23525) identified the same root cause but were closed due to targeting `main` instead of `dev` and missing CLA.
### Contributor License Agreement
- [x] By submitting this pull request, I confirm that I have read and fully agree to the [Contributor License Agreement (CLA)](https://github.com/open-webui/open-webui/blob/main/CONTRIBUTOR_LICENSE_AGREEMENT), and I am providing my contributions under its terms.
---
<sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
📋 Pull Request Information
Original PR: https://github.com/open-webui/open-webui/pull/23531
Author: @lawrence3699
Created: 4/9/2026
Status: 🔄 Open
Base:
dev← Head:fix/chatgpt-import-folder-entries📝 Commits (1)
d260500fix: handle ChatGPT exports containing folder/project metadata entries📊 Changes
1 file changed (+8 additions, -1 deletions)
View changed files
📝
src/lib/utils/index.ts(+8 -1)📄 Description
Pull Request Checklist
devdevfix:Changelog Entry
Description
ChatGPT recently started including folder and project metadata entries in
conversations.jsonexports. These entries lack amappingkey. When a folder entry appeared first in the array,getImportOrigin()checked only_chats[0], misidentified the file aswebuiformat, andconvertOpenAIChats()was never called — resulting in "Imported 0 Chats".Fixed
getImportOrigin(): check if any item has amappingkey (via.some()), not just_chats[0]convertOpenAIChats(): skip entries withoutmappingbefore attempting conversion, so folder/project metadata doesn't cause failuresBefore
Importing a ChatGPT export that starts with a folder entry:
After
Same file imports correctly — folder/project entries are skipped, all conversations are imported.
Additional Information
{ "id": "...", "title": "My Folder", "type": "folder", ... }alongside conversation entries. These lack themappingkey that conversations have.maininstead ofdevand missing CLA.Contributor License Agreement
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.