prop/lib/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
..
page_html initial 2026-03-28 11:28:47 -05:00
user_registration_html feat(design): apply NTMS design system tokens 2026-04-17 17:34:15 -05:00
user_reset_password_html feat(auth): self-service password reset 2026-04-18 08:42:35 -05:00
user_session_html feat(auth): self-service password reset 2026-04-18 08:42:35 -05:00
user_settings_html feat(accounts): auto-prefill home QTH from QRZ on register + backfill on boot 2026-04-25 17:03:01 -05:00
agent_skills_controller.ex feat(agent-discovery): Link/markdown/content-signal/api-catalog/skills 2026-04-17 12:09:05 -05:00
api_catalog_controller.ex feat(agent-discovery): Link/markdown/content-signal/api-catalog/skills 2026-04-17 12:09:05 -05:00
beacon_monitor_controller.ex Add beacon monitor registration and fix prod SMTP 2026-04-08 11:30:28 -05:00
contact_map_controller.ex Serve /contacts/map payload via HTTP endpoint, parallel hydrate 2026-04-12 13:10:51 -05:00
error_html.ex initial 2026-03-28 11:28:47 -05:00
error_json.ex initial 2026-03-28 11:28:47 -05:00
health_controller.ex fix(probes): stop DB saturation from SIGKILLing every pod 2026-04-21 16:00:04 -05:00
page_controller.ex Rename qsos to contacts throughout codebase, keep DB table name 2026-04-01 11:25:04 -05:00
page_html.ex initial 2026-03-28 11:28:47 -05:00
scores_controller.ex perf(map): /scores/cells binary endpoint, client-side fetch + band/time prefetch 2026-04-29 14:27:20 -05:00
user_registration_controller.ex Add password auth with callsign + email confirmation 2026-04-08 10:21:40 -05:00
user_registration_html.ex Add password auth with callsign + email confirmation 2026-04-08 10:21:40 -05:00
user_reset_password_controller.ex fix(dialyzer): clear 125+ warnings under strict flags 2026-04-21 10:30:06 -05:00
user_reset_password_html.ex feat(auth): self-service password reset 2026-04-18 08:42:35 -05:00
user_session_controller.ex Add password auth with callsign + email confirmation 2026-04-08 10:21:40 -05:00
user_session_html.ex Add password auth with callsign + email confirmation 2026-04-08 10:21:40 -05:00
user_settings_controller.ex feat(accounts): add Home QTH section to user settings page 2026-04-25 16:51:54 -05:00
user_settings_html.ex Add password auth with callsign + email confirmation 2026-04-08 10:21:40 -05:00
weather_tile_controller.ex chore(weather): drop tile endpoint and JSON cells back-compat 2026-04-29 13:45:43 -05:00