feat: browser-mode file operations with native file picker#8
Open
randroid88 wants to merge 4 commits into
Open
feat: browser-mode file operations with native file picker#8randroid88 wants to merge 4 commits into
randroid88 wants to merge 4 commits into
Conversation
Add a live backend connection status indicator (green/red/yellow dot) to the toolbar with adaptive health polling (1s retry when offline, 5s when online). Include restart/start controls in both Electron (IPC-based) and browser mode (Vite dev middleware). - New BackendStatusDot component with color-coded status - Extract IS_ELECTRON and startBackend() to shared utils/env.ts - Add BackendStatus type to project types - Backend section in Settings panel with status + restart button - Vite plugin to spawn backend in browser dev mode - Electron IPC handler for backend:restart
Add bulk transcript editing: copy the transcript, edit it externally, and paste it back to apply all deletions at once. Workflow: 1. Click "Copy" in the transcript toolbar to copy all non-deleted words 2. Edit the text in any external editor (delete unwanted words) 3. Click "Paste edits" to open a diff preview dialog 4. Review the preview (word count, cut count, warnings) and click "Apply" The diff algorithm uses Longest Common Subsequence (LCS) to detect only deletions — modified words are ignored. Uses Uint32Array for the DP table to support transcripts beyond 65k words. The diff computation is debounced to 300ms to avoid running on every keystroke. Also extracts buildDeletedSet() utility to eliminate duplicate set- building loops across components.
Replace the manual path input in browser mode with the File System Access API for both opening and saving files: - New POST /upload endpoint accepts file uploads for browser-mode transcription - Browser file open uses showOpenFilePicker() with upload progress - Browser export uses showSaveFilePicker() and streams the response directly to disk via FileResponse - AI clip exports now intersect keep-segments with clip time range, honoring word-level cuts and auto-selecting re-encode mode when needed - Inline "Saved!" / error feedback replaces alert() calls - Export loading spinner deferred until after user confirms save picker - Fix TOCTOU race condition in export (replace os.path.exists() guard with try/except)
5 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
POST /uploadendpoint for browser-mode file uploads with progress trackingshowSaveFilePicker()and streams response directly to diskalert()calls throughoutBefore
In browser mode, users had to manually type the full path to their video file. Exports used
alert()dialogs for feedback.After
Implementation
Backend
POST /upload: Accepts multipart file upload, saves to temp path, returns the path for transcriptionPOST /export: Whenoutput_pathis empty (browser mode), writes to a temp file and returns aFileResponsewith background cleanupFrontend
exportToFile.ts: Shared utility handling both Electron (saveFiledialog) and browser (showSaveFilePicker+ stream) export pathsApp.tsx:handleBrowserOpenFile()usesshowOpenFilePicker()+ XHR upload with progressExportDialog.tsx: UsesexportToFile, shows "Saved!" inline feedbackAIPanel.tsx: Clips intersect global keep-segments with clip time range; auto-selects re-encode when cuts existFiles changed
backend/main.pyPOST /uploadendpointbackend/routers/export.pyfrontend/src/utils/exportToFile.tsfrontend/src/App.tsxfrontend/src/vite-env.d.tsfrontend/src/components/ExportDialog.tsxexportToFile, inline feedbackfrontend/src/components/AIPanel.tsxTest plan