Repository navigation
Studio: let the Projects page import picker offer Markdown chats - #17652
danielhanchen merged 4 commits into
Conversation
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
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
# Conflicts: # studio/frontend/src/features/settings/tabs/data-tab.tsx [skip ci]
|
@codex review |
1 similar comment
|
@codex review |
|
Codex Review: Didn't find any major issues. Bravo. Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
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". |
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.tsxnow takes itsacceptlist fromCHAT_IMPORT_ACCEPT(features/chat/utils/import-chats.ts), the listpickAndImportChatsalready 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 topickAndImportChats.The desktop app is unchanged: it uses the native picker, which already lists
mdandmarkdown.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.holiday notes.mdselectable.json,.jsonl,.ndjson,.csv.json,.jsonl,.ndjson,.csv,.md,.markdownOn this branch I then picked a Markdown chat (
## User/## Assistantsections), confirmed the import dialog, and the chat was saved as "holiday notes" (checked throughGET /api/chat/threads). Settings > Data still shows.json,.jsonl,.ndjson,.csv,.md,.markdownon 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.tschecks that the Projects page and Settings > Data pickers useCHAT_IMPORT_ACCEPT, and that the list matches the desktop picker'sCHAT_IMPORT_EXTENSIONSand 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 --testsand 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
acceptattribute that each build opened.Before:
.json,.jsonl,.ndjson,.csv, a.mdexport is not selectable. After:.json,.jsonl,.ndjson,.csv,.md,.markdown, it is.