Skip to content

feat(frontend): map display modes — Classic / Radar Scope / Satellite (2001 imagery)#199

Merged
robbiebyrd merged 9 commits into
mainfrom
feat/map-display-modes
Jul 13, 2026
Merged

feat(frontend): map display modes — Classic / Radar Scope / Satellite (2001 imagery)#199
robbiebyrd merged 9 commits into
mainfrom
feat/map-display-modes

Conversation

@robbiebyrd

Copy link
Copy Markdown
Collaborator

Summary

User-selectable basemap display modes for the Flight Tracker and Weather apps, orthogonal to the existing Dark Map toggle:

  • Classic — the original paper/slate vector look (zero visual change for existing users; stays the default)
  • Radar Scope — CRT phosphor-green ATC look (inherently dark; ignores the Dark Map toggle)
  • Satellite — period-correct NASA imagery: Blue Marble (MODIS 2001 data) by day, Earth's City Lights (DMSP-OLS, released 2000) with Dark Map on

How it works

  • New shared module src/lib/basemap/basemapStyles.ts builds a superset style (vector basemap + two raster PMTiles sources); switching styles flips paint colors + layer visibility live (setPaintProperty/setLayoutProperty) — never map.setStyle(), so flight pins/trails/ghosts and weather stations/radar survive every switch. Exactly one ground renders per (style, darkMap) pair; satellite tile data only downloads when the mode is selected.
  • effectiveTone(mapStyle, darkMap) drives the pin-color crayon buckets and per-style trail colors (radar forces dark tone — mutation-checked regression test included).
  • Flight Tracker: three check-marked View-menu items + a Map Style radio group in Settings. Weather: same menu group (menu-only; also gains its own persisted Dark Map), and drops its copy-pasted palette code for the shared module (weatherLoopSettings.tsweatherSettings.ts).
  • Tiles: built once from public-domain NASA sources (scripts/build-satellite-basemap.md runbook), uploaded to Wasabi maps/ (2.0 MB day / 1.4 MB night, z2–6, NA bbox), both serving 206 via files.911realtime.org — no infra change needed. The app reads raster maxzoom from the archives' TileJSON.

Testing

  • 624/624 vitest, tsc -b and eslint clean
  • Runtime-verified in the browser against the uploaded prod tiles: all modes in both apps, lazy tile loading per mode, overlay survival across switches, Settings radio round-trip
  • Multi-agent reviewed per task + whole-branch final review (clean; accepted minors noted in the spec's ledger)

Follow-ups (pre-existing, not this branch): NEXRAD radar frame PNGs have an opaque black background that darkens the Weather map under the 0.65-opacity overlay; Flight Tracker radio input DOM ids could be namespaced.

Spec: docs/superpowers/specs/2026-07-13-map-display-modes-design.md (local, gitignored by repo convention)

🤖 Generated with Claude Code

@robbiebyrd robbiebyrd enabled auto-merge July 13, 2026 18:21
@github-actions

Copy link
Copy Markdown

Playwright E2E — 1 passed · 0 failed · 0 flaky · 0 skipped

Full report

@robbiebyrd robbiebyrd merged commit b6bec4a into main Jul 13, 2026
6 checks passed
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