Document dashcam browser completion

Co-authored-by: Copilot <[email protected]>
This commit is contained in:
Mathieu Moran
2026-08-09 18:19:37 -04:00
co-authored by Copilot
parent 5a520bf022
commit 80d9c150fe
2 changed files with 26 additions and 6 deletions
+20 -1
View File
@@ -809,7 +809,7 @@ needs to be redone in Phase 22.
overflow; injected sample rows confirmed ascending sort, `aria-sort`, empty-state switching,
and cancellation of a destructive handler.
### Phase 16: Dashcam USB file browser (list + delete) — 🚧 PLANNED
### Phase 16: Dashcam USB file browser (list + delete) — ✅ DONE
Replace the current all-or-nothing "Import videos" flow's blind spot (no visibility into what's
actually on the camera) with a real file browser for the mounted USB dashcam device, built on the
Phase 15 shared list component:
@@ -829,6 +829,25 @@ Phase 15 shared list component:
select-mode/data-communication toggle behavior - the user replugs power manually to return the
camera to recording mode, as they already do.
**Implemented 2026-08-09**:
- Added list, single-delete, and delete-all backend operations using the existing USB-only storage
detection. Each list/import/delete operation shares one lock so mount and file operations cannot
race; listings include relative path, byte size, modified timestamp, count, and total size.
- Deletes accept only recognized video extensions, resolve and re-check every target beneath the
selected mount, and reject absolute paths, traversal, missing files, and symlink escapes.
- Delete operations mount or remount the dashcam read-write only for the operation, then unmount
or restore it read-only. If unmount fails, the cleanup path immediately attempts a read-only
remount and reports a cleanup failure if neither safety action succeeds.
- Added `/api/dash/files` and `/api/dash/file` routes plus a `/dash` browser built on Phase 15's
shared component: file/size/time sorting, totals, refresh, per-row confirmed delete, confirmed
delete-all, empty/no-device states, and error feedback.
- Verified metadata, traversal rejection, one/all deletion, non-video preservation, import
regression behavior, and cleanup-failure reporting against temporary filesystem fixtures.
Deployed to the Pi; the live API correctly returned no storage devices while ignoring the
attached PL2303 OBD adapter, and the responsive browser UI passed no-device and mocked populated
list/sort/confirmation/delete tests. Actual deletion from the physical dashcam remains a
hardware verification item for the next time it is connected in USB storage mode.
### Phase 17: Local imported-video browser + player — 🚧 PLANNED
Same file-browser treatment for videos already imported to the Pi's own disk
(`dash/videos/`, populated by `import_dashcam()`), built on the Phase 15 shared list component: