Fix macOS notification settings recovery

Open the current app's macOS notification settings entry and stop reporting test notification success until Electron confirms the native notification was shown.
This commit is contained in:
Neil
2026-05-20 22:39:18 -07:00
committed by GitHub
parent 80657c3e21
commit 8b77dffec2
6 changed files with 249 additions and 17 deletions
+9 -1
View File
@@ -1850,6 +1850,8 @@ export type NotificationEventSource = 'agent-task-complete' | 'terminal-bell' |
export type NotificationDispatchRequest = {
source: NotificationEventSource
/** Why: the Settings test button must not report success unless macOS actually shows it. */
requireDisplayConfirmation?: boolean
worktreeId?: string
/** Stable `${tabId}:${leafId}` terminal pane key for click-to-focus routing. */
paneKey?: string
@@ -1870,7 +1872,13 @@ export type NotificationDispatchRequest = {
export type NotificationDispatchResult = {
delivered: boolean
/** Present when delivered is false. Tells the caller why delivery was skipped. */
reason?: 'disabled' | 'source-disabled' | 'suppressed-focus' | 'cooldown' | 'not-supported'
reason?:
| 'disabled'
| 'source-disabled'
| 'suppressed-focus'
| 'cooldown'
| 'not-supported'
| 'not-displayed'
}
export type NotificationSoundResult = {