Explorer: day detail view (#138) #171
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!171
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/explorer-day"
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 #138. Second Explorer view, stacked on the calendar (#137/PR #170, merged).
What this adds
GET /explorer/{YYYY-MM-DD}— one day's weather activity grouped by location, linking each event through to its detail page (/explorer/event/{id}, #139 — next PR).spc_outlook_pagesusing the same issued-at + forecast-day-offset date math the live AI-context path already uses — bounded to an ~11-day issuance window, never an unbounded scan. Fire-weather and day-4–8 extended outlooks deliberately excluded (different label scales; documented). Most-recent issuance wins on same-day reissues.event_id IN (...)members aggregation — no per-event loops.visible_location_filter).Verification
Full bulk suite on the dev server: 942 passed (15 new day-view tests: grouping/severity/member-summary/link, DST-boundary day assignment both directions, visibility incl. shared locations, archived badge, malformed/future/beyond-horizon handling, empty state, SPC chip). Template render smoke-tested across normal/empty/out-of-range branches.
ruffclean. No migrations, no new JS.🤖 Generated with Claude Code
GET /explorer/{day} renders a single day's WeatherEvents grouped by visible location (name-sorted, archived locations badged, soft-deleted history still shown per #134), each event showing local start/end times, kind icon, severity badge, a per-kind member-count summary ("2 hazards · 1 watch"), and a link to the future event-detail page (#139). A day-scale SPC convective-outlook risk band sits above the groups, resolving SPCOutlookPage's forecast-day offset to a calendar date the same way ai_context._spc_local_day already does for live outlooks, applied here to the stored issued_at (#136: SPC context stays day-scale, not folded into event members). Malformed days 404; future/beyond-horizon days render an explanatory empty state rather than a 500, mirroring the month calendar's clamp behaviour. app/services/explorer.py: day_summary() (bounded WeatherEvent + WeatherEventMember queries, Python-side local-day bucketing), spc_day_band(), parse_day_param()/prev_next_day(), and build_explorer_day_context(). app/main.py: GET /explorer/{day} route, same auth as /explorer. app/templates/explorer_day.html: new template. tests/test_explorer_day.py: helper unit tests plus integration coverage for grouping, the local-day boundary rule, visibility, archived badges, the SPC chip, and malformed/out-of-range days. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>