Repository navigation
feat(web): add browser notifications for thread lifecycle events - #1657
Closed
AashishSinghal wants to merge 1 commit into
Closed
AashishSinghal wants to merge 1 commit into
AashishSinghal wants to merge 1 commit into
Conversation
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
|
Important Review skippedAuto reviews are disabled on this repository. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #780
What Changed
notificationsEnabledclient setting (boolean, default off) toClientSettingsSchemathreadNotifications.tswith pure snapshot-diffing logic that detects when a thread transitions to completed, pending-approval, or pending-inputuseThreadNotificationshook that subscribes to the Zustand store, diffs thread state snapshots, and fires browser Notification API calls when the app is backgroundedThreadNotificationWatchercomponent inRootRouteViewalongsideEventRoutermy-app / Fix login bug has finished working.)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 toggle (on):
Notification demo:
Checklist
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
notificationsEnabledclient 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
notificationsEnabledsetting (defaultfalse) toClientSettingsSchemaand a toggle in the General settings panel that requests browser permission on enable.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.threadNotifications.tswith snapshot collection, diffing, text helpers, and consolidation logic, covered by a Vitest suite.ThreadNotificationWatcherat the app root in__root.tsxto wire the hook to user settings globally.Macroscope summarized fa1adaf.