You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(notifications): per-event notification preferences for thread alerts and action confirmations
#12976
Web and desktop expose one global notification mode (Off, Sound only, Notifications only, Notifications with sound) plus one global in-app toast switch, and thread-action confirmations always appear. A user who wants completion, failure, input, or approval alerts but not the archive confirmation has to turn notifications off entirely. This request adds per-event control so each agent alert category and the thread-action confirmations can be enabled or disabled independently.
Problem to solve
Archiving a thread shows a five-second "Archived N threads, ⌘Z to undo" notice in the sidebar. It is a notification in the product's own vocabulary (docs/user/thread-sidebar.md calls it "a notification with Undo for five seconds"), but no setting controls it: notificationMode and inAppNotificationsEnabled only gate the completion, failure, input, and approval alerts emitted by ThreadNotificationCoordinator. The confirmation banner appears whether notifications are on or off.
The result is all-or-nothing. Someone running many parallel threads wants to keep "thread completed" and "approval needed" alerts, but the archive confirmation adds noise on every cleanup action, and the only way to silence it is to disable every notification on that device.
A second gap is granularity inside the agent alerts themselves: notificationMode is a single value for all four event kinds, so a user cannot keep completion alerts while dropping input or approval alerts.
Proposed behavior
Keep the existing notificationMode select as the master switch and channel choice (Off, Sound only, Notifications only, Notifications with sound), and keep inAppNotificationsEnabled as the in-app toast master switch, so current behavior stays available.
Add per-event toggles for the four local alert kinds that ThreadNotificationCoordinator already computes: completion, failure, input needed, and approval needed. A disabled kind produces no sound, no system notification, and no in-app toast on this device, while the master switches keep working as they do today.
Add an independent toggle for thread-action confirmation notices (unpin, settle, snooze, archive) so a user can hide the confirmation banner while keeping every agent alert. Undo stays reachable through the existing thread.undo command and shortcut, so hiding the banner does not remove the ability to undo.
Defaults preserve today's behavior for existing devices: all four alert kinds enabled and thread-action confirmations enabled.
Acceptance criteria
With notifications enabled, turning off the thread-action confirmation toggle stops the archive confirmation (and the settle, snooze, and unpin confirmations) while completion, failure, input, and approval alerts keep firing.
Each of completion, failure, input needed, and approval needed can be enabled or disabled independently, and a disabled kind produces no sound, no system notification, and no in-app toast.
Defaults for an existing device match current behavior: all alert kinds enabled and thread-action confirmations enabled.
The new controls appear in Settings search next to "Thread notifications" and "In-app notifications", persist per device, and survive a restart.
Disabling every alert kind and the confirmation toggle changes nothing else: unrelated UI stays visible and mod+z undo still works.
Affected area
apps/web (settings UI, ThreadNotificationCoordinator, sidebar undo notice) and packages/contracts (client settings schema). The desktop app inherits the same web settings surface.
Non-goals
Changing mobile push behavior or the relay's per-device preferences; mobile already exposes per-event preferences through RelayAgentAwarenessPreferences.
Changing the five-second window, grouping, or restore semantics of thread actions.
Adding server-side notification routing or a per-event delivery policy.
Alternatives considered
Add only an archive toggle: narrowest fix for the reported annoyance, but it leaves the same all-or-nothing gap for the other event kinds.
Replace the master mode with per-event settings only: removes the useful single "Off" switch and complicates the sound-versus-notification channel choice.
Reuse the relay's notifyOn* preferences for local alerts: those are relay push preferences for registered mobile devices, not client-local web and desktop settings.
Supporting context
Current local settings: notificationMode ("off" | "notifications" | "sound" | "notifications-and-sound") and inAppNotificationsEnabled in packages/contracts/src/settings.ts; labels in apps/web/src/threadNotifications.ts; UI in apps/web/src/components/settings/NotificationSettings.tsx and apps/web/src/components/settings/SettingsPanels.tsx.
Alert derivation and delivery: apps/web/src/components/ThreadNotificationCoordinator.tsx classifies each thread transition as completion, input, approval, or failure and plays a sound, shows an in-app toast, and raises a system notification.
Thread-action confirmations: apps/web/src/hooks/showThreadUndoNotice.ts and apps/web/src/components/sidebar/SidebarThreadUndoNotice.tsx, documented in docs/user/thread-sidebar.md.
Existing precedent for per-event granularity on mobile: RelayAgentAwarenessPreferences (notifyOnApproval, notifyOnInput, notifyOnCompletion, notifyOnFailure) in packages/contracts/src/relay.ts, applied in infra/relay/src/agentActivity/agentActivityAlerts.ts.
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
Uh oh!
There was an error while loading. Please reload this page.
Summary
Web and desktop expose one global notification mode (Off, Sound only, Notifications only, Notifications with sound) plus one global in-app toast switch, and thread-action confirmations always appear. A user who wants completion, failure, input, or approval alerts but not the archive confirmation has to turn notifications off entirely. This request adds per-event control so each agent alert category and the thread-action confirmations can be enabled or disabled independently.
Problem to solve
Archiving a thread shows a five-second "Archived N threads, ⌘Z to undo" notice in the sidebar. It is a notification in the product's own vocabulary (
docs/user/thread-sidebar.mdcalls it "a notification with Undo for five seconds"), but no setting controls it:notificationModeandinAppNotificationsEnabledonly gate the completion, failure, input, and approval alerts emitted byThreadNotificationCoordinator. The confirmation banner appears whether notifications are on or off.The result is all-or-nothing. Someone running many parallel threads wants to keep "thread completed" and "approval needed" alerts, but the archive confirmation adds noise on every cleanup action, and the only way to silence it is to disable every notification on that device.
A second gap is granularity inside the agent alerts themselves:
notificationModeis a single value for all four event kinds, so a user cannot keep completion alerts while dropping input or approval alerts.Proposed behavior
Keep the existing
notificationModeselect as the master switch and channel choice (Off, Sound only, Notifications only, Notifications with sound), and keepinAppNotificationsEnabledas the in-app toast master switch, so current behavior stays available.Add per-event toggles for the four local alert kinds that
ThreadNotificationCoordinatoralready computes: completion, failure, input needed, and approval needed. A disabled kind produces no sound, no system notification, and no in-app toast on this device, while the master switches keep working as they do today.Add an independent toggle for thread-action confirmation notices (unpin, settle, snooze, archive) so a user can hide the confirmation banner while keeping every agent alert. Undo stays reachable through the existing
thread.undocommand and shortcut, so hiding the banner does not remove the ability to undo.Defaults preserve today's behavior for existing devices: all four alert kinds enabled and thread-action confirmations enabled.
Acceptance criteria
mod+zundo still works.Affected area
apps/web (settings UI,
ThreadNotificationCoordinator, sidebar undo notice) and packages/contracts (client settings schema). The desktop app inherits the same web settings surface.Non-goals
RelayAgentAwarenessPreferences.Alternatives considered
notifyOn*preferences for local alerts: those are relay push preferences for registered mobile devices, not client-local web and desktop settings.Supporting context
notificationMode("off" | "notifications" | "sound" | "notifications-and-sound") andinAppNotificationsEnabledinpackages/contracts/src/settings.ts; labels inapps/web/src/threadNotifications.ts; UI inapps/web/src/components/settings/NotificationSettings.tsxandapps/web/src/components/settings/SettingsPanels.tsx.apps/web/src/components/ThreadNotificationCoordinator.tsxclassifies each thread transition as completion, input, approval, or failure and plays a sound, shows an in-app toast, and raises a system notification.apps/web/src/hooks/showThreadUndoNotice.tsandapps/web/src/components/sidebar/SidebarThreadUndoNotice.tsx, documented indocs/user/thread-sidebar.md.RelayAgentAwarenessPreferences(notifyOnApproval, notifyOnInput, notifyOnCompletion, notifyOnFailure) inpackages/contracts/src/relay.ts, applied ininfra/relay/src/agentActivity/agentActivityAlerts.ts.All reactions