Skip to content

feat: add native OS notifications with configurable trigger modes#34

Open
BennettSchwartz wants to merge 1 commit intolcoutodemos:mainfrom
BennettSchwartz:feat/native-notifications
Open

feat: add native OS notifications with configurable trigger modes#34
BennettSchwartz wants to merge 1 commit intolcoutodemos:mainfrom
BennettSchwartz:feat/native-notifications

Conversation

@BennettSchwartz
Copy link
Copy Markdown

Summary

  • Adds native OS notifications when tasks complete or fail while the user isn't actively watching
  • Clicking a notification shows the window and switches to the relevant tab (expanded)
  • Three configurable modes via the settings popover dropdown:
    • Always -- notify on every completion
    • Tab hidden -- notify when the completed tab isn't the one being viewed
    • Window hidden -- notify only when the entire window is hidden (default)
  • Notification mode is persisted in localStorage alongside existing settings

Test plan

  • Set mode to "Window hidden", send a prompt, hide the window, verify notification appears on completion
  • Click the notification, verify window shows and focuses the correct tab
  • Set mode to "Tab hidden", open two tabs, send a prompt on tab 2, switch to tab 1, verify notification fires for tab 2
  • Set mode to "Always", verify notification fires even when actively viewing the tab
  • Verify setting persists across app restarts
  • Verify no notifications fire for the actively viewed tab in "Tab hidden" mode

Show native notifications when tasks complete or fail, with click-to-focus
support that switches to the relevant tab and expands it.

Three notification modes (configurable in the settings popover):
- Always: notify on every completion, even when viewing the app
- Tab hidden: notify when the completed tab is not actively visible
- Window hidden: notify only when the entire window is hidden (default)

Changes:
- Main process: notification dispatch with Electron Notification API,
  prompt tracking per tab, shouldNotify() gating by mode
- Preload: onFocusTab, setNotificationMode, setActiveTab bridges
- Renderer: useClaudeEvents wires focus-tab handler and syncs
  notification mode + active tab to main process
- Theme store: persisted notificationMode setting
- SettingsPopover: notification mode dropdown
- Types: FOCUS_TAB, SET_NOTIFICATION_MODE, SET_ACTIVE_TAB IPC channels
@BennettSchwartz BennettSchwartz changed the title Add native OS notifications with configurable trigger modes feat: add native OS notifications with configurable trigger modes Mar 20, 2026
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