prop/lib/microwaveprop_web
Graham McIntire b37692592b
fix(weather): default selected time to current hour, not clock-closest
Past minute 30 of the wall clock the next forecast hour is closer to
utc_now() than the current hour, so the picker would land on (e.g.)
19:00Z when the user is at 18:43Z. HRRR has 19:00Z, but the HRDPS
chain only seeds the *current* hour (18:00Z), so the dual-source map
showed an empty Canadian half whenever we crossed the half-hour mark.

Switch to "most-recent valid_time <= now", with a fallback to the
closest future when nothing on disk is yet at-or-before now (cold
start). Hoist the picker into a public function so it can be unit-
tested deterministically — anchoring the integration test on
DateTime.utc_now() truncated to the hour would have only verified the
new behavior past minute 30.

/weather-ca delegates to the same picker so the two maps agree on
"current."
2026-04-30 13:50:33 -05:00
..
components chore(layout): move deploy stamp from navbar to footer 2026-04-25 15:20:55 -05:00
controllers feat(weather): /weather-ca endpoint shows HRDPS-only Canadian data 2026-04-30 12:08:48 -05:00
live fix(weather): default selected time to current hour, not clock-closest 2026-04-30 13:50:33 -05:00
plugs fix(remote_ip): log IPv6 in canonical hex via :inet.ntoa 2026-04-25 18:05:46 -05:00
endpoint.ex fix(web): suppress HEAD request logs 2026-04-22 16:50:58 -05:00
live_helpers.ex refactor: deduplicate helpers and simplify Scorer 2026-04-28 14:14:34 -05:00
live_table_footer.ex Show windowed page list in live_table footer 2026-04-13 10:02:19 -05:00
live_table_resource.ex fix(dialyzer): actually fix LiveTable warnings instead of hiding them 2026-04-21 12:58:10 -05:00
location_resolver.ex refactor: deduplicate helpers and simplify Scorer 2026-04-28 14:14:34 -05:00
metrics_plug.ex fix(metrics): serve scrape body via PromEx.get_metrics 2026-04-18 16:50:37 -05:00
router.ex feat(weather): /weather-ca endpoint shows HRDPS-only Canadian data 2026-04-30 12:08:48 -05:00
skew_t.ex Rename ERA5 → NARR across the codebase 2026-04-16 09:22:23 -05:00
telemetry.ex perf(telemetry): cut hot-path overhead on scores_at cache hits 2026-04-20 16:12:01 -05:00
user_auth.ex fix(dialyzer): clear 125+ warnings under strict flags 2026-04-21 10:30:06 -05:00