towerops/test/towerops_web
Graham McIntire 3f08fd42b6 fix: handle alert_changed message in DashboardLive (#189)
Fixes FunctionClauseError when DashboardLive receives {:alert_changed, org_id}
message broadcast by user_auth hooks.

The user_auth module subscribes all LiveViews to the
"organization:#{org_id}:alerts" topic and broadcasts {:alert_changed, org_id}
messages when alerts are created or resolved. DashboardLive was missing a
handle_info/2 clause to handle this message format, causing crashes in
production.

Solution:
- Added handle_info/2 clause for {:alert_changed, _org_id} message
- Uses existing debounced reload pattern to update dashboard
- Added test to verify message is handled without crashing
- Updated both technical and user-facing changelogs

All tests pass. The fix follows the same pattern used in AlertLive.Index
and DeviceLive.Show.

Reviewed-on: graham/towerops-web#189
2026-03-27 13:26:39 -05:00
..
channels update more (#146) 2026-03-24 16:32:09 -05:00
components Fix footer positioning + add layout tests 2026-03-13 13:57:55 -05:00
controllers reliability-audit-fixes (#181) 2026-03-26 14:10:36 -05:00
graphql improve agent status display and fix two pre-existing test failures (#83) 2026-03-19 11:43:42 -05:00
helpers feat: add 12/24-hour time format setting with consistent timezone display 2026-02-13 15:16:29 -06:00
integration Merge remote-tracking branch 'origin/main' into feature/preseem-integration 2026-02-13 09:11:45 -06:00
live fix: handle alert_changed message in DashboardLive (#189) 2026-03-27 13:26:39 -05:00
plugs fix failing tests: ping check config and whitelist cache race (#55) 2026-03-17 08:11:36 -05:00
gleam_changelog_parser_test.exs Rewrite polling_offset, changelog_parser, and user_agent_parser in Gleam (#103) 2026-03-21 10:11:06 -05:00
graphql_socket_test.exs add mobile token auth to GraphQL endpoint (#48) 2026-03-16 15:23:07 -05:00
permissions_test.exs fix snmp v3 test 2026-02-06 10:21:54 -06:00
plug_exceptions_test.exs handle exceptions gracefully on api endpoints 2026-02-04 12:18:14 -06:00
remote_ip_test.exs perf: disable Req retry for faster error tests 2026-03-10 16:19:31 -05:00
telemetry_filter_test.exs Add GeoIP import HTTP tests 2026-03-10 16:02:49 -05:00
user_auth_test.exs perf(tests): remove/reduce Process.sleep calls for faster tests 2026-03-06 07:57:30 -06:00