aprs.me/lib/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
..
components.ex vendor heroicons SVGs, remove GitHub dependency 2026-03-03 13:34:23 -06:00
data_builder.ex chore(dialyzer): enable stricter flags and fix 97 resulting findings 2026-04-21 10:07:01 -05:00
display_manager.ex fix: stabilize moving station tracking 2026-03-26 18:48:43 -05:00
historical_loader.ex perf(packets): keyset-based pagination for recent-packet queries 2026-04-21 10:15:04 -05:00
index.ex chore(dialyzer): enable stricter flags and fix 97 resulting findings 2026-04-21 10:07:01 -05:00
navigation.ex refactor: pattern-match over conditionals in Navigation and InsertOptimizer 2026-04-23 13:38:24 -05:00
packet_batcher.ex types: add @type t to last two untyped GenServer structs 2026-04-21 10:18:26 -05:00
packet_processor.ex Batch RF path queries, batch marker removals, and JS callsign index 2026-02-20 09:04:22 -06:00
packet_utils.ex Remove dead PostGIS code, deduplicate utilities, and simplify module hierarchy 2026-02-20 13:39:07 -06:00
popup_component.ex integrate /:call to main page 2025-07-13 10:36:58 -05:00
rf_path.ex Batch push_events, RF path queries, and ETS tuning for hot paths 2026-02-20 08:30:54 -06:00
url_params.ex chore(dialyzer): enable stricter flags and fix 97 resulting findings 2026-04-21 10:07:01 -05:00