fix(notifications): fix macOS desktop notifications#163
fix(notifications): fix macOS desktop notifications#163schulzf wants to merge 1 commit into21st-dev:mainfrom
Conversation
…en-focused option Main process: - import Notification statically instead of using require at runtime - add Notification.isSupported() guard before creating notifications - skip custom icon on macOS (app icon is used automatically) - register click handler before calling show() to avoid race condition Notifications hook: - add notifyWhenFocused preference to control notifications when app is focused - apply focus check to notifyAgentComplete, notifyAgentNeedsInput, and notifyPlanReady Active chat: - move notifyAgentComplete call outside the sound-enabled block so notifications fire independently of sound preference - skip notification when agent was manually aborted Settings UI: - add "Notify When Focused" toggle to agents preferences tab, disabled when desktop notifications are off Atoms: - add notifyWhenFocusedAtom persisted to localStorage (default: false)
|
@1code review this pr |
|
Task completed. Here's my review of PR #163: PR Review: fix(notifications): fix macOS desktop notificationsSummaryThis PR fixes macOS desktop notifications and adds a "Notify When Focused" preference. The changes are well-scoped and address real issues. Positive Changes
Issues / Suggestions1. Icon path is likely wrong (bug) const iconPath = join(__dirname, "../../build", ext)The original path was 2. Duplicated code block in The same notification logic appears twice (around lines 6105 and 6304 in the diff). This is pre-existing duplication, not introduced by this PR, but worth noting — the two blocks are identical and could diverge over time. 3. The name 4. The focus check uses 5. Spread conditional for icon ...(icon && { icon }),This works but VerdictThe core fixes (static import, Powered by 1Code |
Main process:
Notifications hook:
Active chat:
Settings UI:
Atoms: