weather/frontend/src
jtricerolph 4b535a34f4 Per-tier Met Office fallback + use the new Forecast key for hourly/3-hourly
Was: one Promise.all across all 3 Met Office endpoints, any single failure
threw and discarded ALL of it, falling back to Open-Meteo entirely -- even
though only the daily endpoint has ever been confirmed to work (only Spot
key configured; hourly/three-hourly may need the separate Forecast
subscription settings just gained a field for). So the display was very
possibly running on Open-Meteo for everything despite a working Met Office
key, silently.

Now: hourly, three-hourly and daily are fetched independently
(Promise.allSettled). hourly/three-hourly try met_office's new
forecast_api_key first (falling back to api_key if no separate Forecast
key is set); daily keeps using api_key (Spot), matching what's actually
confirmed live. Only the tiers that fail fall back to Open-Meteo -- and
Open-Meteo itself is now fetched lazily, once, only if at least one tier
actually needs it.

status.last_provider is now {hourly, threeHourly, daily} instead of one
flat string, so the admin page shows exactly which source served which
tier. Admin.tsx / types.ts updated to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-25 13:37:24 +00:00
..
components Tap a Coming up card -> hourly-detail modal, 20s idle auto-close 2026-08-25 13:26:57 +00:00
hooks Scaffold weather app: reception forecast display + shared internal API 2026-08-25 12:22:53 +00:00
lib Tap a Coming up card -> hourly-detail modal, 20s idle auto-close 2026-08-25 13:26:57 +00:00
pages Per-tier Met Office fallback + use the new Forecast key for hourly/3-hourly 2026-08-25 13:37:24 +00:00
api.ts Tap a Coming up card -> hourly-detail modal, 20s idle auto-close 2026-08-25 13:26:57 +00:00
App.tsx Scaffold weather app: reception forecast display + shared internal API 2026-08-25 12:22:53 +00:00
index.css Tap a Coming up card -> hourly-detail modal, 20s idle auto-close 2026-08-25 13:26:57 +00:00
main.tsx Scaffold weather app: reception forecast display + shared internal API 2026-08-25 12:22:53 +00:00
sw.js Scaffold weather app: reception forecast display + shared internal API 2026-08-25 12:22:53 +00:00
types.ts Per-tier Met Office fallback + use the new Forecast key for hourly/3-hourly 2026-08-25 13:37:24 +00:00
vite-env.d.ts Scaffold weather app: reception forecast display + shared internal API 2026-08-25 12:22:53 +00:00