prop/lib/microwaveprop_web/live
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
..
admin docs/tests: moduledocs on 18 LiveViews, MapLive event coverage, Rust pipeline roundtrip 2026-04-21 17:16:12 -05:00
beacon_live docs/tests: moduledocs on 18 LiveViews, MapLive event coverage, Rust pipeline roundtrip 2026-04-21 17:16:12 -05:00
contact_live feat(contact): link grid squares to gridmap.org 2026-04-27 09:32:01 -05:00
user_management_live docs/tests: moduledocs on 18 LiveViews, MapLive event coverage, Rust pipeline roundtrip 2026-04-21 17:16:12 -05:00
about_live.ex docs/tests: moduledocs on 18 LiveViews, MapLive event coverage, Rust pipeline roundtrip 2026-04-21 17:16:12 -05:00
algo_live.ex docs/tests: moduledocs on 18 LiveViews, MapLive event coverage, Rust pipeline roundtrip 2026-04-21 17:16:12 -05:00
contact_map_live.ex docs/tests: moduledocs on 18 LiveViews, MapLive event coverage, Rust pipeline roundtrip 2026-04-21 17:16:12 -05:00
eme_live.ex refactor: deduplicate helpers and simplify Scorer 2026-04-28 14:14:34 -05:00
import_live.ex fix(dialyzer): clear 125+ warnings under strict flags 2026-04-21 10:30:06 -05:00
live_stash_guard.ex feat(nav): add EME menu item to map + weather sidebars 2026-04-25 09:49:06 -05:00
map_live.ex perf(map): /scores/cells binary endpoint, client-side fetch + band/time prefetch 2026-04-29 14:27:20 -05:00
path_live.ex refactor: deduplicate helpers and simplify Scorer 2026-04-28 14:14:34 -05:00
privacy_live.ex docs/tests: moduledocs on 18 LiveViews, MapLive event coverage, Rust pipeline roundtrip 2026-04-21 17:16:12 -05:00
rover_live.ex refactor: deduplicate helpers and simplify Scorer 2026-04-28 14:14:34 -05:00
rover_locations_live.ex feat(rover-locations): inline satellite map per location 2026-04-26 13:55:08 -05:00
skewt_live.ex feat(skewt): fetch full 25-level profile and drop valid_time URL param 2026-04-25 15:19:34 -05:00
skewt_location_resolver.ex feat(skewt): add /skewt LiveView with HRRR-backed Skew-T-Log-P plot 2026-04-25 12:13:46 -05:00
skewt_svg.ex fix(path): handle ProfilesFile cell shape correctly + log async exits 2026-04-25 15:57:20 -05:00
status_live.ex fix(status): mobile layout — tables no longer truncate column headers 2026-04-24 15:45:01 -05:00
submit_live.ex fix(submit): allowlist switch_tab values instead of trusting client input 2026-04-25 10:10:42 -05:00
user_profile_live.ex docs/tests: moduledocs on 18 LiveViews, MapLive event coverage, Rust pipeline roundtrip 2026-04-21 17:16:12 -05:00
weather_map_live.ex fix(weather): drop valid_times older than one hour from the timeline 2026-04-29 14:03:55 -05:00