Explorer: derived radar loop windows for event replay (#140) #173
No reviewers
Labels
No labels
area:ai
area:ci-cd
area:notifications
area:observability
area:public-pages
backlog
bug
duplicate
enhancement
help wanted
invalid
question
type:decision
type:feature
type:infra
type:maintenance
type:security
v1.0.1
v1.1.0
v1.2.0
v1.3.0
v2.0.0
wontfix
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
rbrooks/WeatherBot!173
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/event-radar-loops"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Closes #140. Stacked on the event timeline (#139/PR #172, merged).
What this adds
GET /media/event-radar-loop/{event_id}.gif— a lazily-built, cached radar loop spanning an event's member window plus configurable padding (EVENT_RADAR_LOOP_PADDING_MINUTES, default 15).radar.py's SPC assembly was extracted into a sharedassemble_gif()(additive refactor); the event/DB-specific logic lives in a newevent_radar_loop.pyservice, keepingradar.pyDB-free as designed.media.py, deliberately: every other media route is unauthenticated (also served on public pages); the loop is Explorer-only, so it requires login + the event's location visibility, with the same non-leaking 404 as the event page.Cache-Control: no-storesince an active event's loop can gain frames.Review fix
One fixture bug: two byte-identical test frames assembled into a 1-frame GIF — Pillow's GIF writer merges identical consecutive frames (delta optimization). Real radar frames are never pixel-identical; fixtures now default to distinct colors per frame.
Verification
Full bulk suite on the dev server: 966 passed (12 new: window padding, endpoint 404s, real-GIF frame counts, cache hit (assembler call-count), staleness rebuild on newer frame, coverage caption, zero-frame state).
ruffclean. No migrations, no new JS.🤖 Generated with Claude Code