Skip to content

macOS notifications for new messages and approval requests (inline approval UI exists but has no system notification) #34

Description

@cicav

Problem

Hermes Desktop currently provides no macOS system notifications, making it difficult to use when the app is in the background.

The approval UI does exist as an inline chat component (orange "Approval needed" box with Once/Session/Always/Deny options), but:

  • No macOS notification banner is shown when an approval is requested
  • No system sound plays
  • No Dock icon bounce
  • The app never called UNUserNotificationCenter.requestAuthorization

Similarly, when new assistant messages arrive, there is no notification — the user must keep watching the chat window.

Root cause of "never saw the approval dialog"

During testing, the first rm command triggered the approval inline dialog, but with no notification the user missed it. After the 60-second approvals.timeout, the agent auto-denied it. All subsequent similar commands were cached as "BLOCKED: User denied. Do NOT retry" and never reached the approval UI again. Only a completely different command (a later rm of temp files during unrelated auth setup) triggered a fresh approval dialog — confirming the inline UI works, but the notification layer is missing.

Expected behavior

  1. New message notifications: When a new assistant message arrives while the app is in background, show a macOS notification banner with agent reply preview.
  2. Approval request notifications: When a tool requires approval, fire a macOS notification AND call NSApp.requestUserAttention(.criticalRequest) for Dock bounce, so the user knows to return to the app.
  3. Configurable: Allow users to toggle notification types in app preferences.

Suggested implementation

  • SwiftUI native: UNUserNotificationCenter for banners
  • NSApp.requestUserAttention(.informationalRequest) for new messages
  • NSApp.requestUserAttention(.criticalRequest) for approval requests
  • @AppStorage settings to toggle each notification type

Environment

  • Hermes Desktop v0.8.1 (build 103)
  • macOS 14+ (Apple Silicon)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions