prop/test/microwaveprop_web/live
Graham McIntire 0c98707091
feat: harden /map analysis breakdown + move Plausible to root layout
Two fixes cover the blank "analysis breakdown" panel the user reported:

1. Bound the point_detail fallback lookback to 24h. Previously
   factors_from_fallback_profile would happily use a week-old analysis
   profile when no current one existed — now anything older than 24h
   returns an empty factor map so the UI can surface "breakdown
   unavailable" instead of silently misattributing.

2. Move the Plausible analytics snippet from Layouts.app into
   root.html.heex. Full-bleed LiveViews (/map, /contacts/map,
   /weather, home) bypass Layouts.app, so the snippet only loaded on
   the navbar-wrapped pages. root.html.heex is loaded once per HTTP
   document so coverage is now universal.

Added ~30 tests locking both down:
  • point_detail fallback: exact-time wins, 24h boundary accepted,
    30h-stale rejected, multi-band coverage, missing-cell degrades to
    empty factors, default-valid_time path
  • analytics_test.exs: Plausible script present on 12 representative
    pages, exactly once, loaded async, surviving a login round-trip

Also fixed pre-existing credo issues per standing rule: shortened the
map_live_test ETS match_delete call, extracted a function from the
deeply-nested hrrr_point_enqueuer.enqueue_for_contacts/1 cond, and
swapped Mix.Tasks.Rust.Golden's IO.inspect for Mix.shell().info.
2026-04-21 15:56:30 -05:00
..
admin feat(admin): surface flagged contacts on the contact-edits page 2026-04-19 12:40:20 -05:00
algo_live_test.exs Show topbar loading indicator while scores are loading 2026-03-31 09:30:20 -05:00
beacon_live_test.exs feat(beacons): plot-path link seeds TX chain to match beacon EIRP 2026-04-18 10:54:38 -05:00
contact_live_test.exs feat(contacts): hide Private column when the viewer has nothing private 2026-04-19 12:36:12 -05:00
import_live_test.exs feat(import): live /imports/:id progress page + gate upload bars on submit 2026-04-17 09:31:22 -05:00
map_live_test.exs feat: harden /map analysis breakdown + move Plausible to root layout 2026-04-21 15:56:30 -05:00
path_live_test.exs PathLive: ionosphere readout panel for VHF paths 2026-04-15 14:48:47 -05:00
status_live_test.exs feat(status): show Rust prop-grid-rs work queue alongside Oban panel 2026-04-19 17:07:38 -05:00
submit_live_test.exs feat(import): live /imports/:id progress page + gate upload bars on submit 2026-04-17 09:31:22 -05:00
user_management_live_test.exs Drop gridmap.org dependency, resolve callsigns locally 2026-04-12 17:43:29 -05:00
user_profile_live_test.exs User profiles at /u/:callsign, flexible band input, assorted UX cleanup 2026-04-12 16:13:08 -05:00
weather_map_live_test.exs fix(weather-map): default timeline cursor to the hour closest to now 2026-04-17 15:57:59 -05:00