Skip to content

Studio: let the Projects page import picker offer Markdown chats - #17652

Merged
danielhanchen merged 4 commits into
unslothai:mainfrom
debojyoti-dev:fix/projects-import-markdown-picker-17651
Nov 14, 2026
Merged

danielhanchen merged 4 commits into
unslothai:mainfrom
debojyoti-dev:fix/projects-import-markdown-picker-17651

Conversation

@debojyoti-dev

@debojyoti-dev debojyoti-dev commented Nov 13, 2026 •

Copy link
Copy Markdown
Contributor

Fixes #17651

What this changes

On the Projects page in the web UI, Import chats… opened a file dialog filtered to .json, .jsonl, .ndjson, .csv. Markdown chat exports were hidden there, although the importer behind that dialog reads them, and Settings > Data and the desktop picker both offer them. The page's hidden file input had its own copy of the extension list, which was not updated when Markdown import came back in #12513.

  • projects-page.tsx now takes its accept list from CHAT_IMPORT_ACCEPT (features/chat/utils/import-chats.ts), the list pickAndImportChats already uses.
  • data-tab.tsx (Settings > Data) uses the same constant in place of its own literal copy, so the three browser pickers cannot drift apart again. The constant is exported from the chat feature index next to pickAndImportChats.

The desktop app is unchanged: it uses the native picker, which already lists md and markdown.

Testing

Real Studio in Chromium (Windows 11): I ran the backend (run.py --api-only) with the vite frontend, opened Projects, chose Import chats… from the import/export menu and read the file chooser the page opened.

picker filter holiday notes.md selectable
main (d58508d) .json,.jsonl,.ndjson,.csv no
this branch .json,.jsonl,.ndjson,.csv,.md,.markdown yes

On this branch I then picked a Markdown chat (## User / ## Assistant sections), confirmed the import dialog, and the chat was saved as "holiday notes" (checked through GET /api/chat/threads). Settings > Data still shows .json,.jsonl,.ndjson,.csv,.md,.markdown on its import inputs.

The visible difference is only in the operating system's file dialog, which a headless browser cannot capture, so there are no before/after screenshots.

Tests: new tests/chat-import-picker-accept.test.ts checks that the Projects page and Settings > Data pickers use CHAT_IMPORT_ACCEPT, and that the list matches the desktop picker's CHAT_IMPORT_EXTENSIONS and covers the extensions the importer routes by name. The first test fails on main. Full frontend suite on this branch: 15884 tests, 15873 pass, 0 fail (the rest are skips). node scripts/typecheck.mjs --tests and eslint on the changed files are clean.

Before / after

Projects > import/export > Import chats... on the merge base (d58508d) and this branch (b2fb4f7), two separate Studio installs. The OS file dialog is not drawn by a headless browser, so the caption is drawn by the harness from the file chooser's accept attribute that each build opened.

Projects import picker filter, before and after

Before: .json,.jsonl,.ndjson,.csv, a .md export is not selectable. After: .json,.jsonl,.ndjson,.csv,.md,.markdown, it is.

The Projects page's hidden file input kept its own extension list
(.json, .jsonl, .ndjson, .csv), so the browser's file dialog hid the
Markdown exports that the importer, Settings > Data and the desktop
picker all take.

The Projects page and Settings > Data now read the list from
CHAT_IMPORT_ACCEPT, the one pickAndImportChats already uses.

Fixes unslothai#17651
@danielhanchen danielhanchen self-assigned this Nov 13, 2026
danielhanchen pushed a commit to danielhanchen/unsloth-staging-2 that referenced this pull request Nov 13, 2026
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 13, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-14T09:08:05.276223Z 86feb86 Manual request
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: b2fb4f7e34

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Already looking forward to the next diff.

Reviewed commit: b79c020084

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen

Copy link
Copy Markdown
Member

@codex review

1 similar comment
@danielhanchen

Copy link
Copy Markdown
Member

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. Bravo.

Reviewed commit: 86feb86fb5

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@danielhanchen
danielhanchen merged commit 0e2c235 into unslothai:main Nov 14, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Studio] Projects page "Import chats" file picker hides Markdown exports in the web UI

2 participants