Skip to content

feat(web): add browser notifications for thread lifecycle events - #1657

Closed
AashishSinghal wants to merge 1 commit into
pingdotgg:mainfrom
AashishSinghal:feat/thread-notifications
Closed

AashishSinghal wants to merge 1 commit into
pingdotgg:mainfrom
AashishSinghal:feat/thread-notifications

Conversation

@AashishSinghal

@AashishSinghal AashishSinghal commented Apr 1, 2026 •

Copy link
Copy Markdown

Closes #780

What Changed

  • Added a notificationsEnabled client setting (boolean, default off) to ClientSettingsSchema
  • Created threadNotifications.ts with pure snapshot-diffing logic that detects when a thread transitions to completed, pending-approval, or pending-input
  • Created useThreadNotifications hook that subscribes to the Zustand store, diffs thread state snapshots, and fires browser Notification API calls when the app is backgrounded
  • Mounted a ThreadNotificationWatcher component in RootRouteView alongside EventRouter
  • Added a Notifications toggle row in Settings → General with permission request on enable and a blocked-permission warning
  • Notification body shows project name and thread title (e.g. my-app / Fix login bug has finished working.)
  • Clicking a notification focuses the app and navigates to the thread (handles both browser history and Electron hash history)
  • Batches 4+ simultaneous notifications into a single summary to prevent flood on reconnect

Why

Issue #780: when a task finishes or needs approval/input while the user is in another app or tab, there is no signal. Users have to keep checking back manually. This adds opt-in browser notifications so users get alerted without polling.

UI Changes

Settings toggle (off):

settings-notifications-off

Settings toggle (on):

settings-notifications-on

Notification demo:

notification-demo

Checklist

  • This PR is small and focused
  • I explained what changed and why
  • I included before/after screenshots for any UI changes
  • I included a video for animation/interaction changes

Note

Medium Risk
Adds new client settings and a background watcher that triggers the browser Notification API and deep-links on click; mistakes could cause notification spam or unexpected navigation/permission UX, but changes are isolated and default-off.

Overview
Adds opt-in browser notifications for thread lifecycle events (completed, needs approval, needs input) when the app is backgrounded.

Introduces a new notificationsEnabled client setting (default off) surfaced as a Settings toggle with permission request + blocked/unsupported warnings, mounts a root-level watcher (useThreadNotifications) to diff thread/project snapshots and fire notifications, and includes batching/summary notifications to avoid floods plus click-to-focus and navigate behavior (web history vs Electron hash routing).

Written by Cursor Bugbot for commit fa1adaf. This will update automatically on new commits. Configure here.

Note

Add browser notifications for thread lifecycle events

  • Adds a notificationsEnabled setting (default false) to ClientSettingsSchema and a toggle in the General settings panel that requests browser permission on enable.
  • Introduces useThreadNotifications, which diffs per-thread snapshots on each update and fires browser notifications for completions, pending approvals, and input requests when the app is backgrounded.
  • Clicking a notification focuses the window and navigates to the relevant thread (hash navigation in Electron, history push on web); batches of >3 events are consolidated into a single summary notification.
  • Adds threadNotifications.ts with snapshot collection, diffing, text helpers, and consolidation logic, covered by a Vitest suite.
  • Mounts a ThreadNotificationWatcher at the app root in __root.tsx to wire the hook to user settings globally.

Macroscope summarized fa1adaf.

Add an opt-in notifications toggle in Settings that fires browser
notifications when the app is backgrounded. Covers task completions,
approval requests, and user input requests with project name and
thread title in the notification body. Clicking navigates to the
thread. Batches 4+ simultaneous notifications into a summary.

Closes pingdotgg#780
@coderabbitai

coderabbitai Bot commented Apr 1, 2026

Copy link
Copy Markdown

Important

Review skipped

Auto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Repository UI

Review profile: CHILL

Plan: Pro

Run ID: e06902fd-98d8-4896-b501-4da1955cd00f

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions github-actions Bot added size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Apr 1, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:L 100-499 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add notifications for completed tasks and approval-required turns.

1 participant