Skip to content

gui: Fix keyboard shortcuts for closing windows#941

Merged
russellhancox merged 5 commits into
mainfrom
rah/gui-fix-cmd-esc
May 11, 2026
Merged

gui: Fix keyboard shortcuts for closing windows#941
russellhancox merged 5 commits into
mainfrom
rah/gui-fix-cmd-esc

Conversation

@russellhancox
Copy link
Copy Markdown
Member

@russellhancox russellhancox commented May 8, 2026

For notification windows, the existing Cmd+Esc doesn't work and I couldn't find a way to reliably make it work. Switch to Cmd+W instead.

For the More Info pane, switch from Cmd+Esc to just plain Esc.

Also fix the passing of EventDetailURL in SNTTestGUI.

@github-actions github-actions Bot added comp/gui Issues or PRs related to the Santa GUI lang/objc++ PRs modifying files in ObjC++ lang/swift PRs modifying files in Swift size/m Size: medium labels May 9, 2026
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 9, 2026

Review Change Stack

📝 Walkthrough

Walkthrough

This PR updates keyboard shortcuts for dismiss buttons across message window views, standardizing to cancelAction/Esc patterns or Cmd+W, and adds URL fallback logic in the Binary display test harness to prefer eventDetailURL when customURL is absent.

Changes

Dismiss Keyboard Shortcuts and URL Fallback

Layer / File(s) Summary
DismissButton Core Shortcut
Source/gui/SNTMessageView.swift
DismissButton updates keyboard shortcut from Cmd+Esc ("⌘ Esc") to Cmd+W ("⌘ W").
MoreDetailsView Dismiss Buttons
Source/gui/SNTBinaryMessageWindowView.swift, Source/gui/SNTFileAccessMessageWindowView.swift, Source/gui/SNTNetworkMountMessageWindowView.swift
Dismiss button shortcuts in MoreDetailsView across all three message window types are standardized from Cmd+Esc to .cancelAction with "Esc" help text.
Test Harness URL Fallback
Source/gui/SNTTestGUI.swift
Binary display harness computes effectiveURL that falls back to eventDetailURL when customURL is empty, then passes effectiveURL to the factory.

🎯 2 (Simple) | ⏱️ ~8 minutes

🚥 Pre-merge checks | ✅ 2
✅ Passed checks (2 passed)
Check name Status Explanation
Title check ✅ Passed The title accurately describes the main change—fixing keyboard shortcuts for closing windows—which is the primary purpose of all modifications across the four affected files.
Description check ✅ Passed The PR description accurately and specifically describes the keyboard shortcut changes across multiple files and the EventDetailURL fix, aligning with the actual changeset.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch rah/gui-fix-cmd-esc

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added the size/s Size: small label May 9, 2026
@russellhancox russellhancox marked this pull request as ready for review May 11, 2026 14:23
@russellhancox russellhancox requested a review from a team as a code owner May 11, 2026 14:23
@russellhancox russellhancox merged commit 5bee4cf into main May 11, 2026
8 checks passed
@russellhancox russellhancox deleted the rah/gui-fix-cmd-esc branch May 11, 2026 16:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/gui Issues or PRs related to the Santa GUI lang/objc++ PRs modifying files in ObjC++ lang/swift PRs modifying files in Swift size/m Size: medium size/s Size: small

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants