prop/test/microwaveprop
Graham McIntire a4cd7632eb
feat(skewt): hover crosshair + DB fallback for missing on-disk profiles
Two follow-ups to the earlier /skewt work:

1. Interactive crosshair (matches the SPC-viewer feel from the
   reference screenshot). Mousing over the diagram now drops a
   horizontal pressure cursor with a top-left readout box showing the
   pressure at the cursor's altitude (mb), the height in m and ft,
   and the linearly interpolated temperature and dewpoint at that
   level. Two coloured dots track the T and Td traces along the
   cursor so the user can read the spread visually.

   Mechanics: SkewtSvg.geometry/0 exposes the plot geometry (left,
   right, top, bottom, p_bottom, p_top, t_min, t_max, skew) as JSON;
   SkewtSvg emits an initially-hidden <g class="skewt-cursor"> layer.
   A new Skewt hook in assets/js/app.ts inverts pressure_y to recover
   pressure from the cursor's viewBox-Y, walks the (descending-pres-
   sorted) profile to interp T/Td/height, and updates the elements.
   The hook also handles mouseleave to hide the cursor and uses the
   SVG's screen-CTM so the math stays correct under any container
   aspect-ratio resize.

2. DB fallback for `available_valid_times`/`load_profile`. When the
   on-disk `ProfilesFile` has nothing for the location-and-window
   (true on dev, transient on prod between chain runs), SkewtLive
   now falls back to `HrrrProfileLookup.{list_valid_times_near,
   read_point_near}/3` against the `hrrr_profiles` Postgres table.
   The lookup uses the same ±0.07° spatial tolerance and the
   `(lat, lon, valid_time)` unique index that `Weather.find_nearest_
   hrrr/3` already relies on, so the queries are index-only.

   Returned shape matches `ProfilesFile.read_point/3` so SkewtLive
   reads from either source transparently. NaiveDateTime → UTC
   normalisation is centralised in `ensure_utc/1` so the LiveView
   sees `%DateTime{time_zone: "Etc/UTC"}` regardless of which side
   produced the value.

Tests: 6/6 new HrrrProfileLookupTest cases (list/limit/tolerance,
read nearest cell, nil for far cells, picks closest among matches),
3/3 SkewtLiveTest still green, 2,894 total Elixir tests + 221
properties green via mix test (one pre-existing flaky test in
admin/contact_edit_live re-runs clean). mix credo --strict clean.
mix assets.build clean.
2026-04-25 13:17:58 -05:00
..
accounts test: cover accounts user + user_token 2026-04-16 14:09:45 -05:00
backtest test: expand coverage and refactor to idiomatic style 2026-04-23 13:28:42 -05:00
beacons test: cover beacons/beacon schema 2026-04-16 14:09:45 -05:00
commercial test: coverage round 4 (84.39% → 84.44%) + 6 new property tests 2026-04-24 10:32:05 -05:00
ionosphere fix(ionosphere): disable TLS verify for GIRO to unbreak ionosonde fetch 2026-04-22 09:49:03 -05:00
propagation feat(scorer): retire HPBL multiplier and native-duct 1.15× boost 2026-04-25 12:42:56 -05:00
qrz test: cover qrz/client 2026-04-16 14:10:50 -05:00
radio fix: April 2026 codebase review — address 13 bugs across propagation chain 2026-04-25 10:52:51 -05:00
space_weather test: coverage round 3 (83.96% → 84.39%) + 10 new property tests 2026-04-24 10:15:37 -05:00
terrain test: coverage round 4 (84.39% → 84.44%) + 6 new property tests 2026-04-24 10:32:05 -05:00
weather feat(skewt): hover crosshair + DB fallback for missing on-disk profiles 2026-04-25 13:17:58 -05:00
workers feat(prop): adaptive HRRR cycle selection — prefer fresh, fall back if late 2026-04-24 19:44:07 -05:00
accounts_test.exs feat(auth): self-service password reset 2026-04-18 08:42:35 -05:00
application_test.exs perf(concurrency): partition Task.Supervisor to remove bottleneck on heavy async_stream paths 2026-04-21 14:20:29 -05:00
backtest_test.exs Phase 9.1: Consolidated backtest report and contest log import 2026-04-10 11:57:15 -05:00
beacon_monitors_test.exs hardening: Rust worker circuit-breaker + delete wall-clock sleep from beacon test 2026-04-21 18:02:46 -05:00
beacons_test.exs User profiles at /u/:callsign, flexible band input, assorted UX cleanup 2026-04-12 16:13:08 -05:00
cache_test.exs fix(cache): add periodic TTL sweeper to bound ETS growth 2026-04-21 13:19:53 -05:00
callsign_location_test.exs Drop gridmap.org dependency, resolve callsigns locally 2026-04-12 17:43:29 -05:00
commercial_test.exs Wire NEXRAD, native ducts, and commercial links into scoring 2026-04-13 12:08:15 -05:00
format_property_test.exs test: cover Format.number/bytes, Instrument.span, SolarClient edges 2026-04-23 14:09:13 -05:00
format_test.exs feat(format): miles-primary distance formatting sitewide 2026-04-18 15:53:40 -05:00
geo_property_test.exs test(property): add property tests for terrain + atmospheric math 2026-04-21 13:56:39 -05:00
geo_test.exs test: cover geo, qrz record, callsign client 2026-04-16 14:09:44 -05:00
geocoder_test.exs Drop gridmap.org dependency, resolve callsigns locally 2026-04-12 17:43:29 -05:00
instrument_test.exs test: cover Format.number/bytes, Instrument.span, SolarClient edges 2026-04-23 14:09:13 -05:00
logger_format_test.exs test: silence expected warnings/errors during test runs 2026-04-24 09:27:17 -05:00
markdown_test.exs Add Tier 1 test coverage: EnrichmentStatus, Markdown, health, RemoteIp, Maidenhead 2026-04-06 10:15:38 -05:00
moon_test.exs feat(eme): add /eme Earth-Moon-Earth calculator 2026-04-23 16:18:20 -05:00
oban_error_reporter_test.exs feat(observability): attach Oban exception telemetry tap 2026-04-21 14:13:53 -05:00
propagation_test.exs fix: April 2026 codebase review — address 13 bugs across propagation chain 2026-04-25 10:52:51 -05:00
qrz_test.exs Drop gridmap.org dependency, resolve callsigns locally 2026-04-12 17:43:29 -05:00
radio_refinement_test.exs CSV/ADIF import: upsert existing contacts on grid/mode refinement 2026-04-16 10:57:37 -05:00
radio_test.exs fix: April 2026 codebase review — address 13 bugs across propagation chain 2026-04-25 10:52:51 -05:00
release_test.exs test: push line coverage from 71.7% → 78.67% 2026-04-23 18:43:18 -05:00
repo_listener_test.exs test: cover repo_listener 2026-04-16 14:58:55 -05:00
terrain_test.exs Rename qsos table to contacts, qso_id to contact_id 2026-04-02 15:52:19 -05:00
weather_extra_test.exs test: coverage round 2 (82.05% → 83.96%) + 23 new property tests 2026-04-24 10:15:37 -05:00
weather_grid_test.exs fix(review): address code-reviewer findings 2026-04-21 10:09:46 -05:00
weather_test.exs fix: April 2026 codebase review — address 13 bugs across propagation chain 2026-04-25 10:52:51 -05:00