aprs.me/test/aprsme_web/live/map_live
Graham McIntire c5a82b77c1
refactor: pattern-match over conditionals in Navigation and InsertOptimizer
Swaps `if`/`cond` branches for multi-clause function heads or head-pattern
matching, making the control flow visible in the function signatures:

- Navigation.determine_map_location: resolve_location/4 now dispatches on
  the shape of the geolocation input and whether URL params are explicit.
- Navigation.handle_callsign_tracking: per-case clauses for empty callsign
  and explicit-URL-params short-circuits, plus a final clause that does the
  DB lookup and rescues once.
- Navigation.handle_callsign_search: dispatch_callsign_search/3 separates
  the valid/invalid callsign branches.
- InsertOptimizer.optimize_based_on_performance: pattern-match on
  [_, _, _ | _] to require ≥3 samples without calling length/1.
- InsertOptimizer.calculate_insert_options and throughput helpers split
  into guarded clauses instead of inline `if`.
- maybe_emit_optimization uses same-var pattern matching to skip the
  telemetry hit when nothing changed.

Adds unit tests covering every branch of both modules plus SignalHandler,
LocaleHook, and the InsertOptimizer's :noproc fallback path. Coverage
64.69% → 65.72%.
2026-04-23 13:38:24 -05:00
..
callsign_view_test.exs Fix duplicate ID errors and optimize mobile callsign search 2025-10-25 13:39:34 -05:00
data_builder_test.exs Fix object/item packets showing sender callsign instead of object name 2026-03-22 13:02:24 -05:00
display_manager_test.exs fix: stabilize moving station tracking 2026-03-26 18:48:43 -05:00
historical_loading_test.exs perf: optimize slow tests - 40% reduction in top 10 slowest tests 2026-03-03 10:47:40 -06:00
index_test.exs Fix duplicate ID errors and optimize mobile callsign search 2025-10-25 13:39:34 -05:00
movement_test.exs perf: optimize slow tests - 40% reduction in top 10 slowest tests 2026-03-03 10:47:40 -06:00
navigation_test.exs refactor: pattern-match over conditionals in Navigation and InsertOptimizer 2026-04-23 13:38:24 -05:00
overlay_rendering_test.exs fix: Resolve majority of dialyzer type errors 2025-07-30 13:30:21 -05:00
packet_batcher_test.exs Fix code review findings batch 2: dead code, encoding, correctness 2026-02-20 07:29:27 -06:00
packet_processor_test.exs fix: stabilize moving station tracking 2026-03-26 18:48:43 -05:00
packet_utils_test.exs test: broaden unit & property-test coverage (61.8% → 64.7%) 2026-04-23 13:32:09 -05:00
performance_test.exs Fix duplicate ID errors and optimize mobile callsign search 2025-10-25 13:39:34 -05:00
rf_path_test.exs Fix duplicate ID errors and optimize mobile callsign search 2025-10-25 13:39:34 -05:00
rf_path_unit_test.exs Fix RF path visualization for hovering over track points 2026-02-19 15:41:32 -06:00
tracked_callsign_old_packet_test.exs Fix duplicate ID errors and optimize mobile callsign search 2025-10-25 13:39:34 -05:00
url_params_test.exs test: broaden unit & property-test coverage (61.8% → 64.7%) 2026-04-23 13:32:09 -05:00