prop/assets/js
Graham McIntire 6a90d153ca
perf(map): /scores/cells binary endpoint, client-side fetch + band/time prefetch
Apply the same overlay refactor we did for /weather to the propagation
map. Score data used to flow as JSON via LiveView push_event
(update_scores + the 18-hour preload_forecast batch); switching bands
or scrubbing time meant a synchronous server roundtrip + ~MB JSON push
per change.

Now:

1. New /scores/cells endpoint returns a "PSCR" binary cell-pack —
   columnar f32 lats/lons + u8 scores, ~3-4× smaller than JSON and
   parsed via DataView + typed-array views with no JSON.parse.

2. JS hook owns score fetching. mount/moveend/band/time changes
   trigger HTTP fetches against /scores/cells. After the initial
   paint, every other forecast hour for the current band is fetched
   in parallel in the background — timeline scrubs after the prefetch
   finishes are pure cache hits with no network at all.

3. LiveView no longer pushes scores. select_band emits update_band_info
   with band_mhz so the client knows what to refetch; select_time and
   set_selected_time only update server-side state (URL, point detail
   bbox). map_bounds, propagation_updated, and advance_now_cursor all
   skip the score push — pack_scores, schedule_bounds_update,
   schedule_preload_forecast, the :flush_bounds and :preload_forecast
   handle_info clauses, and the start_async :initial_scores lifecycle
   (incl. retry_initial_scores event) are all deleted.

Net result: instant band toggles after the first paint, no LiveView
WebSocket payloads larger than the timeline metadata, and ~370 fewer
lines in MapLive.
2026-04-29 14:27:20 -05:00
..
types feat(eme): 3D WebGL Earth-Moon globe with lazy-loaded Three.js 2026-04-23 17:00:53 -05:00
app.ts feat(rover-locations): inline satellite map per location 2026-04-26 13:55:08 -05:00
beacon_map_hook.ts feat(format): miles-primary distance formatting sitewide 2026-04-18 15:53:40 -05:00
beacons_list_map_hook.ts Beacon list map, profile page polish, nav ordering fix 2026-04-12 16:23:09 -05:00
contact_map_hook.ts refactor: normalize pos1/pos2 JSONB key to 'lon' everywhere 2026-04-17 09:10:32 -05:00
contacts_map_hook.ts feat(format): miles-primary distance formatting sitewide 2026-04-18 15:53:40 -05:00
elevation_profile_hook.ts feat(canopy): add tree-canopy height layer for path obstruction analysis 2026-04-26 12:51:48 -05:00
eme_globe_hook.ts feat(eme): 3D WebGL Earth-Moon globe with lazy-loaded Three.js 2026-04-23 17:00:53 -05:00
format.ts feat(format): miles-primary distance formatting sitewide 2026-04-18 15:53:40 -05:00
horizontal_wheel_scroll_hook.ts feat(rover): make candidate strip scroll horizontally + wheel-to-h-scroll 2026-04-26 09:31:10 -05:00
locate_me_hook.ts Convert all JavaScript to TypeScript with type annotations 2026-04-11 16:59:28 -05:00
location_map_hook.ts fix(rover-locations): use circleMarker; default marker icons aren't bundled 2026-04-26 14:03:10 -05:00
maidenhead_grid.ts feat(grid): show full Maidenhead label at subsquare zoom (em13sf, not sf) 2026-04-26 09:54:08 -05:00
path_forecast_hook.ts feat(path): hover-on-dot factor breakdown + tag fallback factors 2026-04-25 15:33:19 -05:00
propagation_map_hook.ts perf(map): /scores/cells binary endpoint, client-side fetch + band/time prefetch 2026-04-29 14:27:20 -05:00
rover_map_hook.ts feat(rover): add ESRI satellite imagery as base-layer option 2026-04-26 11:52:12 -05:00
rover_slider_hook.ts feat(rover): replace max-drive-time slider with max-distance in miles 2026-04-25 17:21:57 -05:00
weather_map_hook.ts perf(weather): binary cell-pack + canvas overlay + lazy layer prefetch 2026-04-29 13:41:21 -05:00