Snapshot-first NVR: events UI, snapshot DB, tiered retention #103

Merged
coding-agent-marvin8 merged 0 commits from refs/pull/103/head into main 2026-07-09 05:10:39 +00:00
coding-agent-marvin8 commented 2026-07-09 00:04:02 +00:00 (Migrated from codeberg.org)

Summary

  • Adds snapshots DB table (migration v3) and ingests all camera JPGs on every scan
  • Groups consecutive motion ([M]) snapshots into events using a 60-second gap threshold
  • Redesigns day view: events grid is primary, video clips are demoted to a collapsible secondary section
  • Adds tiered retention cleanup: motion snapshots 30 days (configurable), background snapshots 14 days, video clips 7 days
  • Fixes long-standing bug where JPGs were never deleted from incoming/
  • Removes development-paused notice from README

Test plan

  • uv run tryke test passes with no failures
  • Start cang against real camera data; verify snapshot counts appear in /days list
  • Open a day with motion; verify events grid shows event thumbnails
  • Click an event; verify slideshow shows only that event's frames
  • Click 'Browse all snapshots'; verify full-day slideshow plays
  • Verify old snapshot files are removed after retention period elapses

Closes #102

## Summary - Adds `snapshots` DB table (migration v3) and ingests all camera JPGs on every scan - Groups consecutive motion ([M]) snapshots into events using a 60-second gap threshold - Redesigns day view: events grid is primary, video clips are demoted to a collapsible secondary section - Adds tiered retention cleanup: motion snapshots 30 days (configurable), background snapshots 14 days, video clips 7 days - Fixes long-standing bug where JPGs were never deleted from incoming/ - Removes development-paused notice from README ## Test plan - [x] `uv run tryke test` passes with no failures - [ ] Start cang against real camera data; verify snapshot counts appear in /days list - [ ] Open a day with motion; verify events grid shows event thumbnails - [ ] Click an event; verify slideshow shows only that event's frames - [ ] Click 'Browse all snapshots'; verify full-day slideshow plays - [ ] Verify old snapshot files are removed after retention period elapses Closes #102
forgejo-actions commented 2026-07-09 00:04:37 +00:00 (Migrated from codeberg.org)

This PR is too large to review automatically (2567 lines; limit is 2000). Please consider splitting it into smaller PRs.

This PR is too large to review automatically (2567 lines; limit is 2000). Please consider splitting it into smaller PRs.
forgejo-actions commented 2026-07-09 00:09:37 +00:00 (Migrated from codeberg.org)

This PR is too large to review automatically (2591 lines; limit is 2000). Please consider splitting it into smaller PRs.

This PR is too large to review automatically (2591 lines; limit is 2000). Please consider splitting it into smaller PRs.
forgejo-actions commented 2026-07-09 01:48:06 +00:00 (Migrated from codeberg.org)

This PR is too large to review automatically (2602 lines; limit is 2000). Please consider splitting it into smaller PRs.

This PR is too large to review automatically (2602 lines; limit is 2000). Please consider splitting it into smaller PRs.
forgejo-actions commented 2026-07-09 01:57:40 +00:00 (Migrated from codeberg.org)

This PR is too large to review automatically (2604 lines; limit is 2000). Please consider splitting it into smaller PRs.

This PR is too large to review automatically (2604 lines; limit is 2000). Please consider splitting it into smaller PRs.
forgejo-actions commented 2026-07-09 02:05:38 +00:00 (Migrated from codeberg.org)

This PR is too large to review automatically (2619 lines; limit is 2000). Please consider splitting it into smaller PRs.

This PR is too large to review automatically (2619 lines; limit is 2000). Please consider splitting it into smaller PRs.
forgejo-actions commented 2026-07-09 02:09:39 +00:00 (Migrated from codeberg.org)

This PR is too large to review automatically (2955 lines; limit is 2000). Please consider splitting it into smaller PRs.

This PR is too large to review automatically (2955 lines; limit is 2000). Please consider splitting it into smaller PRs.
forgejo-actions commented 2026-07-09 02:24:37 +00:00 (Migrated from codeberg.org)

This PR is too large to review automatically (3009 lines; limit is 2000). Please consider splitting it into smaller PRs.

This PR is too large to review automatically (3009 lines; limit is 2000). Please consider splitting it into smaller PRs.
forgejo-actions commented 2026-07-09 03:30:06 +00:00 (Migrated from codeberg.org)

This PR is too large to review automatically (3031 lines; limit is 2000). Please consider splitting it into smaller PRs.

This PR is too large to review automatically (3031 lines; limit is 2000). Please consider splitting it into smaller PRs.
forgejo-actions commented 2026-07-09 04:08:11 +00:00 (Migrated from codeberg.org)

This PR is too large to review automatically (3050 lines; limit is 2000). Please consider splitting it into smaller PRs.

This PR is too large to review automatically (3050 lines; limit is 2000). Please consider splitting it into smaller PRs.
forgejo-actions commented 2026-07-09 04:28:07 +00:00 (Migrated from codeberg.org)

This PR is too large to review automatically (3058 lines; limit is 2000). Please consider splitting it into smaller PRs.

This PR is too large to review automatically (3058 lines; limit is 2000). Please consider splitting it into smaller PRs.
forgejo-actions commented 2026-07-09 04:55:07 +00:00 (Migrated from codeberg.org)

This PR is too large to review automatically (3121 lines; limit is 2000). Please consider splitting it into smaller PRs.

This PR is too large to review automatically (3121 lines; limit is 2000). Please consider splitting it into smaller PRs.
Sign in to join this conversation.
No reviewers
No labels
No milestone
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
marvin8/cang!103
No description provided.