6 Commits

Author SHA1 Message Date
897f49ae22 Add installable PWA (manifest, service worker, icons) + per-type notification toggles
All checks were successful
Test, Build & Deploy / test-and-build (push) Successful in 1m1s
Test, Build & Deploy / deploy (push) Successful in 22s
- manifest.webmanifest + apple/maskable PNG icons; relative paths so the
  app works both at dev root and under /weather
- plain-JS service worker (sw.js) with notificationclick/push handlers and
  an SW-mediated showNotification() path for native Android notifications
- src/lib/pwa.js bootstraps registration and routes alerts to the SW
- Every alert kind (storm/precip/heat/cold/uv/wind) is now a per-type
  preference toggle in Settings; removed the old alertThresholds.thunderstorm
  boolean in favor of notificationTypes.storm
- Store dedups native notifications per forecast day and fires best-effort
  native notifications for newly-appeared alerts
- inline-assets keeps manifest/sw/icons in dist; deploy.yml uploads + verifies
  all PWA files via WebDAV
2026-09-08 00:59:19 +00:00
ff73e58d31 Add toggleable lightning strike layer to the radar map
- Lightning layer on PrecipitationRadar: toggleable  button (persisted via
  showLightning setting). When on, fetches recent strikes from the planned CORS
  relay and renders them as markers that pan/zoom with the slippy map.
- New src/lib/api/lightning.js: fetchLightningStrikes() reads
  https://cors.thecookiejar.me/lightning?lat&lon&radiusKm&limit (relay NOT
  deployed yet) with an 8s abort timeout and graceful failure - never blocks or
  crashes the map, shows an unavailable banner instead. Exports pure
  projectStrikeToLayer() for Mercator tile-layer marker projection.
- showLightning setting added to DEFAULT_SETTINGS + app store; toggle persists.
- Tests: fetch URL/parsing/error handling + layer projection. 71 total pass.
2026-08-27 00:30:25 +00:00
d870a8e668 Add configurable auto-refresh interval (default 30m, option to disable); remove manual refresh button 2026-08-18 17:32:25 +00:00
c0ec45f170 Backfill NWS's missing pressure & UV from Open-Meteo (with source tooltip)
NWS doesn't publish pressure (its pressure series is empty) or a UV index.
When the selected source is NWS, merge current.pressure_msl, current.uv_index
and daily.uv_index_max from Open-Meteo and tag them via data._fallback so the
Current + Details views show a tooltip noting the value came from the
non-selected source (Open-Meteo) instead of showing 0 hPa / --.
2026-08-16 21:05:07 +00:00
32f749444e Add NWS (National Weather Service) as a selectable data source preference
- New Settings > Data source toggle (Open-Meteo global / NWS US); NWS
  falls back to Open-Meteo when unavailable or outside its coverage.
- src/lib/api/nws.js: /points -> forecast/hourly/grid normalizer producing
  the app's shared shape, with realistic air highs (NWS reports 104 for the
  day Open-Meteo over-forecasts at 116); heat-index/feels-like falls back to
  air temp since NWS returns apparentTemperature as null here.
- NWS requires a User-Agent contact; email is a build-time Vite env
  (VITE_NWS_EMAIL), read from gitignored .env.local, never committed.
- Details view now shows which provider served the data.
- Fixes the identical UTC date-parse shift for NWS naive local times.
- Tests (8) + recorded live fixtures for Rogers County, OK.
2026-08-16 20:14:07 +00:00
4ffb44e107 First pass 2026-07-24 01:53:36 +00:00