aprs.me/test/aprsme_web/live
Graham McIntire ee02769d38
refactor: pattern-match in HealthCheck, EncodingUtils, and StatusLive helpers
- HealthCheck.check_health(:readiness): collapse the 3-branch cond into
  readiness_status/2 dispatched on (health_status, shutting_down?).
- HealthCheck.shutting_down?: the whereis + alive? + try/catch nest
  becomes a small pipeline of function heads (ask_shutting_down?/1 +
  ask_if_alive/2), with the catch isolated to the single place it fires.
- EncodingUtils.sanitize_string_fields and sanitize_nested_map shared a
  three-branch atom-or-string key lookup. Extract update_existing_key/3
  + first_present_key/3 + nil_aware/1 helpers; the original functions
  become two-liners.
- StatusLive.Index.format_uptime: splits the cond into
  format_uptime_parts/4 clauses with numeric guards.
- StatusLive.Index.calculate_health_score: struct-shape pattern match
  on %{connected: false} / %{uptime_seconds: s} guards replaces the cond.
- StatusLive.Index.format_time_ago: pipe the diff through
  format_seconds_ago/1 with four clauses.

Adds tests for the four public StatusLive.Index helpers
(format_uptime, format_time_ago, get_health_description, format_number).
Coverage 67.29 → 67.43%.
2026-04-23 14:02:50 -05:00
..
components test: broaden unit & property-test coverage (61.8% → 64.7%) 2026-04-23 13:32:09 -05:00
info_live Improve coordinate handling and add configurable position sensitivity 2025-07-29 12:06:56 -05:00
map_live refactor(packet_processor): split cond/if into multi-clause helpers 2026-04-23 13:51:17 -05:00
packets_live perf: reduce per-packet allocations in ingest pipeline 2026-04-19 13:33:16 -05:00
shared refactor: collapse nested if/case into pattern-matched helpers 2026-04-23 13:55:11 -05:00
status_live refactor: pattern-match in HealthCheck, EncodingUtils, and StatusLive helpers 2026-04-23 14:02:50 -05:00
bad_packets_live_test.exs Remove DaisyUI, migrate to pure Tailwind CSS with TailwindUI patterns 2026-02-19 10:07:50 -06:00
info_live_test.exs Fix duplicate ID errors and optimize mobile callsign search 2025-10-25 13:39:34 -05:00
locale_hook_test.exs refactor: pattern-match over conditionals in Navigation and InsertOptimizer 2026-04-23 13:38:24 -05:00
theme_manager_test.exs test: broaden unit & property-test coverage (61.8% → 64.7%) 2026-04-23 13:32:09 -05:00
user_registration_live_test.exs Fix callsign registration to be case-insensitive 2026-02-19 13:20:07 -06:00
user_settings_live_test.exs Fix settings page showing validation errors on initial load 2026-02-20 17:09:18 -06:00