Lightning overlay on the dashboard radar map (#87 Phase A) #119
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!119
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/lightning-overlay"
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?
First half of #87, now that a data source exists — a Weather Pulse (AllisonHouse) ENTLN lightning placefile. Authenticated dashboard only.
LIGHTNING_PLACEFILE_URL(env) — it appears nowhere in the repo; tests use a fake URL,.env.examplehas the empty key + a secret comment. Already set in the dev.env.services/lightning.py:parse_placefile()reads the GRLevelXTimeRange+Iconcluster pairs (ignoring the header and theLine:/End:range ring; handles quoted hovertext with embedded commas/newlines).fetch_lightning(lat, lon)appends the required?version=&lat=&lon=params (the feed 500s without them), caches ~60s per rounded coord, and is fully fail-soft (any error → None).GET /api/lightning/strikes?lat=&lon=(require_user):{"enabled":false}when unconfigured, the parsed clusters on success,{"available":false}on failure.≤5/≤15/older) LeafletcircleMarkers, refreshing on pan + every 60s while active. The toggle is rendered disabled when no feed is configured, so the commercial feed is never fetched unsolicited. Our own markers — not AllisonHouse icon sheets.LIGHTNING_ON_PUBLIC_PAGESexists (default false, documented) but Phase A does not render lightning on public pages.Testing (dev server)
ruff clean; 19 lightning tests; bulk suite 765 passed. Live check against the real feed: the parser returned all 55 clusters the feed contained (raw
Icon:count == parsed strike count).Part of #87 — Phase A (overlay). Proximity alerts (poll job + per-location radius) are Phase B.
🤖 Generated with Claude Code
Sourced from a Weather Pulse (AllisonHouse) ENTLN placefile. Auth-gated; the feed URL is a secret (subscriber token) supplied only via LIGHTNING_PLACEFILE_URL env — never committed. - app/services/lightning.py: parse_placefile() reads the GRLevelX placefile's TimeRange+Icon cluster pairs (ignoring the header and the Line:/End: range ring), handling quoted hovertext with embedded commas/newlines; fetch_lightning(lat, lon) appends the required ?version=&lat=&lon= params, is cached ~60s per rounded coord, and is fully fail-soft (any error -> None, never raises). - GET /api/lightning/strikes?lat=&lon= (require_user): {"enabled":false} when no feed configured, else the parsed clusters, or {"available":false} on failure. - Dashboard radar modal: a ⚡ Lightning toggle (rendered disabled when no feed is configured, so the commercial feed is never fetched unsolicited) plots clusters as age-colored Leaflet circleMarkers, refreshing on pan and every 60s while active. Our own markers — not AllisonHouse icon sheets. - Config: LIGHTNING_PLACEFILE_URL (secret), LIGHTNING_ON_PUBLIC_PAGES (default false, reserved for a later public-page opt-in — Phase A is authenticated-only). Verified on the dev server against the real feed: parser returned all 55 clusters the feed contained. ruff clean; 19 lightning tests; bulk 765 passed. Part of #87 (Phase A — overlay). Proximity alerts are Phase B. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>