Skip to content

Make NWS alerts track the timeline#16

Merged
johncarmack1984 merged 1 commit into
mainfrom
audit/alerts-timeline
Jun 27, 2026
Merged

Make NWS alerts track the timeline#16
johncarmack1984 merged 1 commit into
mainfrom
audit/alerts-timeline

Conversation

@johncarmack1984

Copy link
Copy Markdown
Owner

From the audit (web-ts / time-model lane) — and the behavior you spotted on prod.

The alerts layer's build ignored ctx.time, so the alert polygons stayed fixed while precip/temp/wind/CAPE moved with the timeline. Now alerts are filtered to those in effect at the map-wide valid time (cityTiles.snapshotMs + time·3600s, the same basis precip uses), with a missing onset/expires treated as unbounded on that side.

  • No ingest/contract change — onset/expires already ride in AlertProps.
  • Parked at now (the default) all active alerts show; scrubbing forward expires them, and any future-onset alert in the feed appears at its onset.
  • Panel shows "N of M in effect" once the visible set is filtered.

tsc + biome clean.

Docs & attribution

  • N/A — behavior fix, no new source or doc-affecting change.

The alerts layer drew every active alert regardless of the timeline, while
every other layer moves with it. Filter alert features to those in effect at
the map-wide valid time (citytile snapshot + hour offset, the same basis precip
uses), treating a missing onset/expires as unbounded on that side. The panel
shows "N of M in effect" once the set is filtered. No ingest change — onset and
expires already ride in AlertProps.
@johncarmack1984 johncarmack1984 merged commit 9435d3e into main Jun 27, 2026
7 checks passed
@johncarmack1984 johncarmack1984 deleted the audit/alerts-timeline branch June 27, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant