diff --git a/FEATURES.md b/FEATURES.md index 667748d..29436b7 100644 --- a/FEATURES.md +++ b/FEATURES.md @@ -8,7 +8,7 @@ Features are grouped by priority. Check off items as they are implemented. - [x] **Cut / Mute sections** — select a time range and choose to cut (remove entirely) or mute (silence audio while video continues). Cut sections show as red overlays, mute sections as transparent blue overlays on the timeline over the transcript text and audio waveform. Backend: `ffmpeg -af volume=0` for mute, time-based cutting for removal. -- [ ] **Silence / pause trimmer (in progress)** — detect pauses using min duration (ms) + amplitude threshold (dB), then apply detected pauses as cut ranges. Initial endpoint: `/audio/detect-silence`; UI includes filter controls and an "Apply As Cuts" action. +- [x] **Silence / pause trimmer** — detect pauses using min duration (ms) + amplitude threshold (dB), then apply detected pauses as cut ranges. Initial endpoint: `/audio/detect-silence`; UI includes filter controls and an "Apply As Cuts" action. - [ ] **Operation-level undo for batch actions** — explicit undo entry for actions like "Apply Silence Trim" so one shortcut/click reverts the whole operation, while still allowing normal fine-grained undo/redo steps. diff --git a/frontend/src/App.tsx b/frontend/src/App.tsx index 6db2115..5caa377 100644 --- a/frontend/src/App.tsx +++ b/frontend/src/App.tsx @@ -343,8 +343,8 @@ export default function App() { active={muteMode} /> PA} - label="Pause Trim" + icon={ST} + label="Silence Trim" active={activePanel === 'silence'} onClick={() => togglePanel('silence')} disabled={!videoPath} diff --git a/open b/open index 7fbdb53..cea4854 100755 --- a/open +++ b/open @@ -6,6 +6,7 @@ PROJECT_DIR="$PWD" export BACKEND_PORT="${BACKEND_PORT:-8000}" export VITE_BACKEND_PORT="${VITE_BACKEND_PORT:-$BACKEND_PORT}" BACKEND_URL="http://127.0.0.1:${BACKEND_PORT}/health" +FRONTEND_URL="http://127.0.0.1:5173" # Check if backend is already running if curl -sf "$BACKEND_URL" > /dev/null 2>&1; then @@ -48,4 +49,11 @@ else done fi +# Check if frontend is already running +if curl -sf "$FRONTEND_URL" > /dev/null 2>&1; then + echo "Frontend already running on port 5173." +else + echo "Frontend not running — Tauri will start it automatically." +fi + npx tauri dev diff --git a/src-tauri/tauri.conf.json b/src-tauri/tauri.conf.json index f92a49d..8c61725 100644 --- a/src-tauri/tauri.conf.json +++ b/src-tauri/tauri.conf.json @@ -6,7 +6,7 @@ "build": { "frontendDist": "../frontend/dist", "devUrl": "http://localhost:5173", - "beforeDevCommand": "cd frontend && npm run dev", + "beforeDevCommand": "cd frontend && (lsof -i :5173 >/dev/null 2>&1 && echo 'Frontend dev server already running on port 5173' || npm run dev)", "beforeBuildCommand": "cd frontend && npm run build" }, "app": { @@ -23,7 +23,7 @@ } ], "security": { - "csp": "default-src 'self'; connect-src 'self' http://127.0.0.1:* http://localhost:*; media-src 'self' http://127.0.0.1:* http://localhost:*; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob:" + "csp": "default-src 'self'; connect-src 'self' http://127.0.0.1:* http://localhost:* ws://127.0.0.1:* ws://localhost:*; media-src 'self' http://127.0.0.1:* http://localhost:* file: blob:; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' data: https://fonts.gstatic.com; img-src 'self' data: blob:" } }, "bundle": {