Skip to content

Persist dismissed alerts across restarts (#44)#51

Merged
erikdarlingdata merged 1 commit intodevfrom
feature/44-alert-persistence
Feb 15, 2026
Merged

Persist dismissed alerts across restarts (#44)#51
erikdarlingdata merged 1 commit intodevfrom
feature/44-alert-persistence

Conversation

@erikdarlingdata
Copy link
Owner

Summary

  • Rewrote Lite AlertStateService with JSON persistence (alert_state.json) so silenced/acknowledged alerts survive app restarts
  • Changed from count-based to timestamp-based acknowledgement clearing — switching time ranges (e.g., 4h → 24h) no longer re-triggers dismissed alerts
  • Only genuinely new events (collected after the ack timestamp) clear the acknowledgement
  • Removed _previousAlertCounts from MainWindow.xaml.cs — count tracking replaced by timestamp comparison in the service
  • Dashboard already had proper persistence via UserPreferencesService and baseline-based acks — no changes needed

Test plan

  • Open server with blocking/deadlock alerts, acknowledge badge
  • Switch time range (4h → 24h → 4h) — badge stays dismissed
  • Close and reopen Lite — badge stays dismissed
  • New events after ack time would re-trigger badge
  • Build succeeds with 0 warnings, 0 errors

Closes #44

🤖 Generated with Claude Code

AlertStateService rewritten with JSON persistence (alert_state.json)
for silenced servers and acknowledged alerts. Acknowledgement now uses
timestamps instead of count comparison — switching time ranges no longer
re-triggers dismissed alerts. Only genuinely new events (collected after
the ack time) clear the acknowledgement.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit e4b94f4 into dev Feb 15, 2026
1 check passed
@erikdarlingdata erikdarlingdata deleted the feature/44-alert-persistence branch February 20, 2026 13:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant