From 24569efe2097bb9518e5e47c99e2c71e8c26cb83 Mon Sep 17 00:00:00 2001 From: jonathan Date: Thu, 2 Jul 2026 00:00:51 +0200 Subject: [PATCH] fix: clip queue resolves row index by filename, not stored _idx MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit clipQueue entries snapshotted fileIdx (= _idx) when the queue was armed, but _idx is reassigned positionally on every load(), and pollStatus() reloads the list whenever a recording starts, stops, or rolls over to a new split file. With the newest-first sort a rollover shifts every index by one, so an armed queue then pre-filled the wrong row's cut fields and "Open in file" (O) opened the wrong row while streaming the clip's file into it — during exactly the workflow of reviewing yesterday while today's recording runs. Store only the filename in queue entries and resolve the row index at use time (fileIdxByName); if the file left the listing, Open in file does nothing instead of acting on a wrong row. Also drop seekToSection's sectionIdx parameter: the only remaining caller passed null, leaving the announce branch dead since chips moved to clip playback. Co-Authored-By: Claude Fable 5 --- CLAUDE.md | 2 +- webui.html | 24 ++++++++++++++---------- 2 files changed, 15 insertions(+), 11 deletions(-) diff --git a/CLAUDE.md b/CLAUDE.md index 765601d..e544b99 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -38,7 +38,7 @@ Dependencies: `requests` (streams), `numpy` + `soundfile` (FLAC output and FLAC - Serving: `_stream()` (Range support), `_copy_to_response()`, `_safe_path()` (path traversal guard). `webui.html` (one `