feat(cameras): ‹ › through older/newer snapshots in the large view

On the Snapshot side the large view steps through that camera's snapshots (‹ older,
› newer, also ← →), muted at either end; the caption carries the date and always names
the picture on screen (the previous one stays while the next loads; a pruned still says
"unavailable"). The tile stays on the newest; closing resets. New read-only route
GET /api/cameras/:deviceId/snapshots/:snapshotId/neighbors (session:read), ordered by
(capturedAt, id) like latest-snapshot, bounded to seek the device/time index.

Also carries the user's own label edits in en.ts / sq.ts.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01RZgP5oMncSaVmKRKk1UvN4
This commit is contained in:
2026-11-17 17:31:58 +01:00
parent bccef3875b
commit cb43ad78ca
8 changed files with 267 additions and 43 deletions
+9
View File
@@ -29,6 +29,15 @@ verified end to end against the two park-lab cameras through the real server and
is active (the same stream carries on, no reconnect), else on the Snapshot. The choice then
holds while the view is open — a car leaving does not drop it to the snapshot, a car arriving
does not switch it to live.
- (2026-11-17, fourth round) On the Snapshot side the large view has **‹ ›** (and ← →) to step
through that camera's older / newer snapshots; a chevron is muted at either end. The caption
carries the date ("Dje 17:22:47"). The tile itself stays on the newest; closing the large view
drops the browse position, so it reopens on the newest. On Live there are no chevrons.
Server: `GET /api/cameras/:deviceId/snapshots/:snapshotId/neighbors` → `{ older, newer }`
(`session:read`; 404 for another camera's snapshot), ordered by (capturedAt, id) like
`latest-snapshot`, so equal timestamps neither skip nor loop. The caption always names the picture on screen:
while a stepped-to still loads, the previous picture and its date stay; if its bytes are gone
(retention), the view says *Snapshot unavailable* rather than show another still.
### When the stream stops
+9
View File
@@ -3722,3 +3722,12 @@ adds nothing measurable, browser 1–2 ms; the 10 fps cap cut `.6` to 7 fps and
was **removed** (`CAMERA_LIVE_MAX_FPS` unset = no cap). A viewer on a ~300 KB/s link runs 13–14 s
behind (TCP buffering) — user judged the delay a non-issue; fix recorded on the page. Updated
[[camera-live-view]], [[passage-confirmation]] (rig table), [[lpr-camera]], index.
## [2026-11-17] query | Booth camera large view — ‹ › through older snapshots
User asked for chevrons in the large view to step back and forth through snapshots, muted at
either end. Built: a neighbours route per camera snapshot (`{ older, newer }`, `session:read`,
(capturedAt, id) order shared with `latest-snapshot`) and ‹ › / ← → on the Snapshot side with
the date in the caption; the tile stays on the newest. Verified in headless Firefox with four
snapshots on one camera, including a slow load (caption keeps the shown picture's date) and a
missing still ("unavailable"). Updated [[camera-live-view]].