Skip to content

Fix #944 — one-click snooze from alert tray popup#946

Merged
erikdarlingdata merged 1 commit intodevfrom
feature/944-snooze-from-tray-popup
May 8, 2026
Merged

Fix #944 — one-click snooze from alert tray popup#946
erikdarlingdata merged 1 commit intodevfrom
feature/944-snooze-from-tray-popup

Conversation

@erikdarlingdata
Copy link
Copy Markdown
Owner

Summary

  • Replaces the non-interactive Windows toast for seven fired alerts (CPU, Blocking, Deadlocks, Poison Wait, Long-Running Query, TempDB Space, Long-Running Job) with a custom WPF balloon that has Snooze 15m / 1h / 4h + Dismiss buttons.
  • Snooze creates a temporary MuteRule scoped to ServerName + MetricName with the chosen expiration. The existing alert-fire path already honors mute rules for both email and Teams/Slack webhook delivery, so a snooze silences all three channels until it expires.
  • Status notifications (Online/Offline + 7 Cleared/Resolved) keep the standard non-interactive balloon — there's nothing to snooze on a "cleared" event.

Addresses the firefighting workflow described in #943, where deadlock alerts kept paging Teams for an hour after the underlying issue was resolved because the rolling-window count still had data points.

Files

  • Lite/Controls/SnoozeBalloon.xaml + .xaml.cs (new) — WPF UserControl. Severity icon + color match the alert level. Closes via TaskbarIcon.BalloonClosingEvent after click.
  • Lite/Services/SystemTrayService.cs — adds ShowSnoozableNotification(...) using _trayIcon.ShowCustomBalloon(...) with a 15s auto-close.
  • Lite/MainWindow.xaml.cs — swaps 7 fired-alert call sites to the new method. The 9 status notifications keep using the standard balloon.

Scope decision

Snooze creates a rule keyed only on ServerName + MetricName. Mid-incident the user wants "shut up about deadlocks on this box for an hour," not "shut up about this exact query." For narrower scoping, Settings → Manage Mute Rules still works.

Test plan

  • Trigger an alert (e.g. drop CPU threshold low enough to fire on a busy server).
  • Verify the popup shows Title / Message / Snooze 15m, 1h, 4h / Dismiss.
  • Click Snooze 1h → confirm a rule appears in Settings → Manage Mute Rules with the right server, metric, and ~1h expiration.
  • Confirm follow-up alert checks for that server+metric do not produce a tray popup, email, or Teams/Slack message until the rule expires.
  • Click Dismiss on a different alert → confirm no rule is created, popup closes.
  • Verify Cleared / Resolved notifications still appear as standard Windows toasts when the underlying condition recovers.

Follow-up (separate PR, not in this branch)

Email body and Teams/Slack webhook payload should also include a one-liner pointing at Settings → Manage Mute Rules for discoverability when the alert lands somewhere other than the desktop. Tracked under #944.

🤖 Generated with Claude Code

Replaces the standard non-interactive Windows toast for the seven fired
alerts (CPU, Blocking, Deadlocks, Poison Wait, Long-Running Query,
TempDB Space, Long-Running Job) with a custom WPF balloon that has
"Snooze 15m / 1h / 4h" + "Dismiss" buttons. Snoozing creates a temporary
mute rule scoped to ServerName + MetricName with the chosen expiration,
which the existing alert-fire path already honors for both email and
Teams/Slack webhook delivery.

Status notifications (Online/Offline + 7 Cleared/Resolved) keep using
the standard non-interactive balloon since there's nothing to snooze.

Addresses the firefighting workflow described in #943.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@erikdarlingdata erikdarlingdata merged commit 2360cdf into dev May 8, 2026
2 checks passed
@erikdarlingdata erikdarlingdata deleted the feature/944-snooze-from-tray-popup branch May 8, 2026 14:50
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