Skip to content

feat: Dismiss Selected in context menu + View Log sidebar button#740

Merged
erikdarlingdata merged 16 commits intoerikdarlingdata:devfrom
HannahVernon:feature/dismiss-menu-and-log-viewer
Mar 27, 2026
Merged

feat: Dismiss Selected in context menu + View Log sidebar button#740
erikdarlingdata merged 16 commits intoerikdarlingdata:devfrom
HannahVernon:feature/dismiss-menu-and-log-viewer

Conversation

@HannahVernon
Copy link
Copy Markdown
Contributor

What does this PR do?

Adds two small UX improvements to both Dashboard and Lite editions:

Dismiss Selected in context menu — The right-click context menu on the Alert History DataGrid now includes a "Dismiss Selected" option (with ✗ icon), matching the toolbar button. Reuses the existing DismissSelected_Click handler — no new logic needed.

View Log button in sidebar — A new "View Log" button in the MainWindow sidebar footer opens the current day's log file via ShellExecute. If the log file doesn't exist yet, it falls back to opening the log directory. Lite's AppLogger now exposes GetCurrentLogFile() and GetLogDirectory() public methods (Dashboard's Logger already had these).

Which component(s) does this affect?

  • Full Dashboard
  • Lite Dashboard
  • Lite Tests
  • SQL collection scripts
  • CLI Installer
  • GUI Installer
  • Documentation

How was this tested?

  • Full Lite.Tests suite: 225 tests, all passing
  • Build: 0 errors, 0 new warnings (pre-existing CS8602 only)
  • Context menu item wired to existing handler — no behavioral change to dismiss logic
  • View Log uses the same Process.Start + UseShellExecute pattern already used in About dialogs

Checklist

  • I have read the contributing guide
  • My code builds with zero warnings (dotnet build -c Debug)
  • I have tested my changes against at least one SQL Server version
  • I have not introduced any hardcoded credentials or server names

HannahVernon and others added 16 commits March 10, 2026 17:08
- Parse detail_text to extract Database, Query Text, and Wait Type
  when using 'Mute This Alert' from alert history (both editions)
- Add PopulateFromDetailText() to AlertMuteContext for structured
  field extraction from the label: value format
- Add 'Default expiration for new mute rules' dropdown to Settings
  in both editions (1 hour, 24 hours, 7 days, Never; default 24h)
- MuteRuleDialog now selects the configured default expiration
  instead of always defaulting to 'Never'
- Persist setting as mute_rule_default_expiration in settings.json
  (Lite) and preferences.json (Dashboard)

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
The XML doc claimed Job Name extraction but the parser did not
implement it. Add the missing branch in both Dashboard and Lite
editions so the behavior matches the documentation.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
- Collapse newlines in Truncate/TruncateText so detail_text fields
  stay single-line in the label: value format
- Handle multi-line query values in PopulateFromDetailText by
  accumulating continuation lines until the next indented field
- Recognize variant query labels (Blocked Query, Blocking Query,
  Victim SQL) in addition to Query

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Explain that the field is a case-insensitive substring match and
suggest entering a distinctive fragment like a table or procedure name.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Context menu dismiss (both editions):
- Added 'Dismiss Selected' menu item with  icon to the right-click
  context menu in Alert History DataGrid
- Reuses existing DismissSelected_Click handler  no new code needed

View Log button (both editions):
- Added 'View Log' button to sidebar footer in MainWindow
- Opens the current day's log file via ShellExecute; falls back to
  opening the log directory if the file doesn't exist yet
- Lite: exposed GetCurrentLogFile() and GetLogDirectory() on AppLogger
- Dashboard: uses existing Logger.GetCurrentLogFile() / GetLogDirectory()

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
@HannahVernon
Copy link
Copy Markdown
Contributor Author

While there are currently no conflicts with the base branch, merging in #733 first will require a rebase of this branch with dev. Reply to this so I get a mobile notification that this needs rebasing 🚀

@erikdarlingdata erikdarlingdata merged commit 3877dea into erikdarlingdata:dev Mar 27, 2026
3 checks passed
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.

2 participants