prop/test/microwaveprop_web/controllers
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
..
agent_skills_controller_test.exs feat(agent-discovery): Link/markdown/content-signal/api-catalog/skills 2026-04-17 12:09:05 -05:00
api_catalog_controller_test.exs feat(agent-discovery): Link/markdown/content-signal/api-catalog/skills 2026-04-17 12:09:05 -05:00
beacon_monitor_controller_test.exs Add beacon monitor registration and fix prod SMTP 2026-04-08 11:30:28 -05:00
contact_map_controller_test.exs test: push line coverage from 71.7% → 78.67% 2026-04-23 18:43:18 -05:00
error_html_test.exs initial 2026-03-28 11:28:47 -05:00
error_json_test.exs initial 2026-03-28 11:28:47 -05:00
health_controller_test.exs fix(probes): stop DB saturation from SIGKILLing every pod 2026-04-21 16:00:04 -05:00
page_controller_test.exs test: add /qsos→/contacts redirect + scorer conversion properties 2026-04-23 14:03:02 -05:00
scores_controller_test.exs perf(map): /scores/cells binary endpoint, client-side fetch + band/time prefetch 2026-04-29 14:27:20 -05:00
user_registration_controller_test.exs Add password auth with callsign + email confirmation 2026-04-08 10:21:40 -05:00
user_reset_password_controller_test.exs feat(auth): self-service password reset 2026-04-18 08:42:35 -05:00
user_session_controller_test.exs feat(auth): self-service password reset 2026-04-18 08:42:35 -05:00
user_settings_controller_test.exs feat(accounts): add Home QTH section to user settings page 2026-04-25 16:51:54 -05:00
weather_tile_controller_test.exs chore(weather): drop tile endpoint and JSON cells back-compat 2026-04-29 13:45:43 -05:00