Skip to content

Desktop notifications: global toggle in Settings and per-thread mute - #114

Merged
currentbits merged 1 commit into
mainfrom
coder/desktop-notification-preference-global-t-3930c6
Aug 16, 2026
Merged

currentbits merged 1 commit into
mainfrom
coder/desktop-notification-preference-global-t-3930c6

Conversation

@currentbits

Copy link
Copy Markdown
Owner

Closes #87.

notifyThreadComplete fired for every settling thread whenever the window was unfocused, with no way to quiet it — so an orchestration fanning out to N workers pinged the user N times.

What changed

Global toggle — settings.notifications, with a checkbox in Settings ▸ Threads. Only an explicit false on disk turns notifications off, so existing installs keep notifying after the upgrade. Validated as a boolean in setSettings, healed in normalizeSettings.

Per-thread mute — thread.muted, toggled from the sidebar row's existing snooze menu (threads:setMuted → services.setMuted). It is notification-only: it does not hide the thread, pause it, or change settle classification, and it never bumps updatedAt. The menu label follows the thread's own flag, so a muted thread always offers the way back out.

Both checks live at the single notifyThreadComplete call site in electron/main.js, deliberately placed after shouldNotify: that branch runs on every stream chunk and getSettings() re-normalizes the whole settings blob, so the cheap transition check gates the expensive one.

Reused the snooze menu rather than adding a context menu or another row icon — mute is the same "quiet this thread" gesture and the popup was already there.

Checks

  • electron/test/notify-mute.test.js — normalize defaults (junk on disk must not silence the app), setSettings validation, setMuted round-trip through a store reload, unknown-thread rejection.
  • test/pinSnooze.test.tsx — menu item round-trips through useCoder + fakeCoder and its label flips.
  • Renderer suite 687/687, tsc --noEmit clean. Electron suite 616 pass / 142 fail against a 613/145 baseline on this branch point — same pre-existing failures (provider CLIs unavailable in this environment), plus the three new tests.

Not included

Auto-muting orchestration workers at spawn time. A noisy fan-out still needs the global toggle or one mute per worker; worth a follow-up if that turns out to be the common case.

  • PR created by the Claude Code agent

notifyThreadComplete fired for every settling thread with no way to
quiet it, so a fan-out pinged once per worker.

Two switches, checked at the single notify call site in main.js (after
shouldNotify, so the settings re-normalize stays off the per-chunk path):

- settings.notifications — global, Settings ▸ Threads. Only an explicit
  false on disk turns it off, so upgrades keep notifying.
- thread.muted — per thread, from the sidebar's snooze menu. Notification
  only: no visibility, run-state or settle effect, never bumps updatedAt.

Co-Authored-By: Claude Opus 5 <[email protected]>
@chatgpt-codex-connector

Copy link
Copy Markdown

You have reached your Codex usage limits for code reviews. You can see your limits in the Codex usage dashboard.

@currentbits
currentbits merged commit 5c5455a into main Aug 16, 2026
1 check failed
@currentbits
currentbits deleted the coder/desktop-notification-preference-global-t-3930c6 branch October 3, 2026 16:07
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.

Desktop-notification preference: global toggle and per-thread mute

1 participant