towerops/lib/towerops_web/live
Graham McIntire f41f5fa1aa feat(insights): AP frequency-change recommendation rule
When a wireless AP has a strong same-channel neighbor (RSSI >= -75 dBm)
and a measurably cleaner alternative channel exists in the same band,
the system now emits an ap_frequency_change insight with a specific
recommended channel and the top interfering BSSIDs as evidence.

- New schema wireless_neighbor_scans (append-only) storing observed
  neighboring APs per device: bssid, ssid, channel, frequency_mhz,
  channel_width_mhz, rssi_dbm, is_own_fleet, seen_at
- New columns on snmp_devices: current_channel, current_frequency_mhz,
  current_channel_width_mhz, last_radio_seen_at — populated by vendor
  SNMP profiles for APs that expose wireless OIDs
- Towerops.Recommendations.Rules.FrequencyChange — pure rule that scores
  each candidate channel using sum-of-linear-power over the last 24h of
  neighbor scans, recommends the cleanest if it beats the current by at
  least 6 dB. Critical urgency when current score >= 100.
- Towerops.Workers.RecommendationsRunWorker — hourly Oban cron, iterates
  organizations and runs all rules, uses insert_insight_if_new/1 for
  idempotent upsert
- LiveView /insights renders a purple frequency-change card with current
  vs recommended channel, dB-cleaner badge, and a top-offender list
  (BSSID, SSID, RSSI, own-fleet flag)
- LLM enrichment automatically applies to the new insight type

Also fixes two pre-existing flaky tests that surfaced in CI:

- test/towerops_web/live/agent_live_test.exs:567 — now sets an explicit
  Req.Test transport_error stub for ReleaseChecker and uses Req.Test.allow
  so the LiveView process inherits it. Previously relied on absence of a
  stub, which leaked across tests and produced different behavior under
  full-suite parallel runs.
- test/towerops_web/telemetry_test.exs:140 — relaxes the "no log" check
  to refute the specific messages the function under test would emit,
  rather than asserting an empty capture_log/1 buffer (which catches
  stray logs from concurrent tests, e.g. Postgrex sandbox disconnects).
2026-05-09 16:56:19 -05:00
..
account_live Fix dark mode inconsistencies across all pages 2026-02-16 10:31:52 -06:00
admin test: refactor LiveView tests to use HTML-aware element/form helpers 2026-04-29 11:14:20 -05:00
agent_live chore: migrate agent repo references from GitHub to Codeberg 2026-05-07 07:44:48 -05:00
alert_live perf+refactor: codebase-wide query and antipattern audit 2026-04-28 16:58:51 -05:00
check_live tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
components logging fix and some other codex fixes 2026-03-10 15:04:28 -05:00
coverage_live chore(coverage,types): clean dialyzer + new tests + ETH canopy provider 2026-05-07 09:11:17 -05:00
device_live test: refactor LiveView tests to use HTML-aware element/form helpers 2026-04-29 11:14:20 -05:00
escalation_policy_live feat(on_call): drag-drop reorder + restrictions editor + new-schedule polish 2026-04-28 14:27:38 -05:00
graph_live tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
help_live chore: migrate agent repo references from GitHub to Codeberg 2026-05-07 07:44:48 -05:00
helpers refactor/dry-improvements (#202) 2026-03-28 10:56:34 -05:00
insights_live feat(insights): AP frequency-change recommendation rule 2026-05-09 16:56:19 -05:00
maintenance_live tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
map_live fix: vendor Leaflet 1.9.4 locally instead of fetching from unpkg 2026-05-01 17:06:54 -05:00
mikrotik_backup_live tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
org feat(insights): LLM-powered insight enrichment 2026-05-09 16:41:48 -05:00
org_live fix: org switching now correctly updates session 2026-03-04 17:04:49 -06:00
schedule_live perf+refactor: codebase-wide query and antipattern audit 2026-04-28 16:58:51 -05:00
site_live tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
trace_live tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
user_settings_live dialyzer: fix all unmatched_return warnings (154 → 0) 2026-04-21 10:03:55 -05:00
activity_feed_live.ex tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
activity_feed_live.html.heex tweaks (#85) 2026-03-19 13:51:02 -05:00
changelog_live.ex fix: add navigation and footer to changelog page 2026-03-09 15:59:13 -05:00
config_timeline_live.ex tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
dashboard_live.ex fix: deduplicate active issues count when device is down 2026-05-04 12:11:54 -05:00
dashboard_live.html.heex fix: deduplicate active issues count when device is down 2026-05-04 12:11:54 -05:00
mobile_qr_live.ex dialyzer: fix all unmatched_return warnings (154 → 0) 2026-04-21 10:03:55 -05:00
network_map_live.ex feat: WISP-tuned network map enhancements (TOW-16) 2026-03-15 14:06:06 -05:00
network_map_live.html.heex test: refactor LiveView tests to use HTML-aware element/form helpers 2026-04-29 11:14:20 -05:00
onboarding_live.ex tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
onboarding_live.html.heex chore: migrate agent repo references from GitHub to Codeberg 2026-05-07 07:44:48 -05:00
reports_live.ex tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
reports_live.html.heex fix: make sidebar sticky with header and resolve all credo issues (#32) 2026-03-15 18:19:09 -05:00
rf_link_health_live.ex tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
rf_link_health_live.html.heex fix: make sidebar sticky with header and resolve all credo issues (#32) 2026-03-15 18:19:09 -05:00
status_page_live.ex tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
status_page_live.html.heex fix: make sidebar sticky with header and resolve all credo issues (#32) 2026-03-15 18:19:09 -05:00
user_registration_live.ex tests: raise coverage to 70% via helper promotion + new unit/property tests 2026-04-24 09:49:06 -05:00
user_reset_password_live.ex fix: status emoji accumulating in page title and add missing page titles 2026-03-11 09:54:18 -05:00
user_settings_live.ex dialyzer: fix all unmatched_return warnings (154 → 0) 2026-04-21 10:03:55 -05:00
user_settings_live.html.heex test: refactor LiveView tests to use HTML-aware element/form helpers 2026-04-29 11:14:20 -05:00
weathermap_live.ex dialyzer: fix all unmatched_return warnings (154 → 0) 2026-04-21 10:03:55 -05:00
weathermap_live.html.heex reliability-audit-fixes (#181) 2026-03-26 14:10:36 -05:00