prop/lib/microwaveprop_web/live
Graham McIntire a14f14485e
perf(weather): serve /weather from chunked scalar artifacts
Move the /weather render path off raw HRRR profile decoding + per-cell
SoundingParams + WeatherLayers derivation. The dominant cost was
re-deriving the same scalar fields on every viewport pan and timeline
scrub.

Server side:

- New Microwaveprop.Weather.ScalarFile persists pre-derived scalar
  rows on NFS, bucketed into 5°×5° chunk files under
  <base>/weather_scalars/<iso>/<lat_band>_<lon_band>.etf.gz. Viewport
  reads only decode the chunks that overlap the requested bounds;
  point-detail clicks read exactly one chunk.
- weather_grid_at/2 and weather_point_detail/3 prefer ScalarFile;
  ProfilesFile is now the cold-start fallback only.
- warm_grid_cache_and_broadcast/1 and warm_grid_cache_from_latest_profile/0
  also persist the scalar artifact, and the cold-derive path kicks
  off a per-valid_time-locked async materialization so the next
  reader gets the cheap path.
- NotifyListener.handle_propagation_ready/1 fires
  Weather.materialize_scalar_file/1 in a detached Task on the Rust
  pipeline's NOTIFY propagation_ready, so steady-state forecast hours
  arrive with their scalar artifact already on disk.
- available_weather_valid_times/0 unions ScalarFile + ProfilesFile so
  the timeline survives an aggressive retention sweep on either side.

Browser side (finding #8):

- Mount the legend Leaflet control once and patch its inner content
  on layer changes instead of remove + re-add on every renderLayer.
- renderTimeline now keys off the rendered button set: selection-only
  updates take an applyTimelineSelection patch path that restyles
  existing buttons in place. Full innerHTML rebuild only fires when
  timelineData itself changes.

Also fixes a credo nesting-depth flag in tile_renderer.ex by extracting
interpolate_pair/2 from the inner anonymous function.
2026-04-28 17:15:36 -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 refactor: deduplicate helpers and simplify Scorer 2026-04-28 14:14:34 -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 perf(weather): serve /weather from chunked scalar artifacts 2026-04-28 17:15:36 -05:00