feat: Auto-convert on load, markdown-first layout, and persistent folder navigation - #9
feat: Auto-convert on load, markdown-first layout, and persistent folder navigation#9bhellema wants to merge 1 commit into
Conversation
…der navigation Description: Summary This issue tracks a set of UX improvements focused on reducing friction and making the markdown output the primary interface. Changes Auto-conversion - JSONL files are now automatically converted to markdown when uploaded or selected from the sidebar — no manual trigger required. Markdown-first layout - The JSONL source panel is collapsed by default. The markdown output fills the full content area. - The JSONL source is still accessible via a collapsible toggle for editing/inspection. - Removed the "Convert to Markdown" and "Convert All" buttons as they are no longer needed. Folder navigation - Added a Folders section at the top of the sidebar. - Users can add a local folder via the browser's native directory picker (showDirectoryPicker). All .jsonl/.json files in the folder are loaded and auto-converted. - Folders are persisted across sessions: folder names are stored in localStorage, directory handles in IndexedDB. - Clicking a folder in the list reloads its files instantly. The browser will re-prompt for filesystem permission if needed. - Folders can be removed individually via a hover-reveal delete button. Motivation Users are primarily interested in reading the converted markdown, not editing raw JSONL. Folder support removes the need to repeatedly browse and re-upload files from the same working directory.
|
Someone is attempting to deploy a commit to the Linda Fitriani's projects Team on Vercel. A member of the Team first needs to authorize it. |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: de7a80b56f
ℹ️ 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".
| if (selectedFolderId === id) { | ||
| setSelectedFolderId(null) | ||
| setFiles([]) | ||
| setSelectedFileId(null) |
There was a problem hiding this comment.
Avoid wiping unrelated files when removing a folder
In handleRemoveFolder, removing the currently selected folder also calls setFiles([]) and setSelectedFileId(null). Because this patch keeps manual uploads in the same files array and handleFilesUpload never clears selectedFolderId, a user who loads a folder, adds extra files, and then deletes that folder entry will lose the uploaded files too. That makes the new “remove folder” action destructive to in-memory work that is not actually owned by the folder.
Useful? React with 👍 / 👎.
| return | ||
| } | ||
| } | ||
| await loadFilesFromFolderHandle(handle) |
There was a problem hiding this comment.
Guard folder loads against out-of-order completion
handleSelectFolder updates selectedFolderId and then awaits loadFilesFromFolderHandle(handle) without checking whether the same folder is still selected when the async read finishes. If a user clicks folder A and then folder B before A's files finish loading (for example with a large directory or a permission prompt), A can resolve last and overwrite files, leaving folder B highlighted while A's contents are displayed/exported.
Useful? React with 👍 / 👎.
| const newContent = e.target.value | ||
| setFiles(prev => prev.map(f => | ||
| f.id === currentFile.id | ||
| ? { ...f, content: newContent, converted: false } | ||
| : f |
There was a problem hiding this comment.
Clear or refresh markdown when the source changes
In the new markdown-first flow, editing the JSONL source only flips converted to false; it does not recompute or clear markdown. Since this patch also removed the visible convert button, the rendered panel, copy action, and download/export paths can keep serving stale markdown after any edit until the user discovers they must re-click the file in the sidebar.
Useful? React with 👍 / 👎.
Description:
Summary
This issue tracks a set of UX improvements focused on reducing friction and making the markdown output the primary interface.
Changes
Auto-conversion
Markdown-first layout
Folder navigation
Motivation
Users are primarily interested in reading the converted markdown, not editing raw JSONL. Folder support removes the need to repeatedly browse and re-upload files from the same working directory.