Skip to content

Add system notifications + sounds#1131

Closed
ThallesP wants to merge 3 commits intopingdotgg:mainfrom
ThallesP:feature/web/agent-completion-notifications
Closed

Add system notifications + sounds#1131
ThallesP wants to merge 3 commits intopingdotgg:mainfrom
ThallesP:feature/web/agent-completion-notifications

Conversation

@ThallesP
Copy link

@ThallesP ThallesP commented Mar 16, 2026

as the title suggests, it adds notifications when agents terminates to run. it also does push notifications (no idea on what those are called on the desktop side).

the sound is a copyright free one (new notification - 3 from https://pixabay.com/sound-effects/search/notification/).

Note

Add system notifications and completion sounds for agent turn settlement

  • Adds a notification pipeline in __root.tsx that detects newly settled agent turns (success/error/interrupted), deduplicates across snapshot syncs, and dispatches system notifications and/or audio when the app is backgrounded.
  • Adds notification and sound settings to the Settings page (_chat.settings.tsx): toggle system notifications (with permission request), choose Off/Default/Custom completion sound, upload/validate custom audio, test playback, and restore defaults.
  • Stores custom notification sounds in IndexedDB via notificationSoundStorage.ts, with object URL caching and cleanup.
  • Extends AppSettingsSchema with five new notification fields (enableSystemNotifications, enableCompletionSound, notificationSoundSelection, etc.), with backward-compatible defaults so existing persisted settings are unaffected.
  • Behavioral Change: notifications and sounds only fire while the app is backgrounded (document hidden or window unfocused); historical turns at load time are seeded into the dedupe state and suppressed.

Macroscope summarized d49ae01.

- add browser notifications for settled agent turns (success, error, interrupted)
- add completion sound playback with default/custom sound support and storage
- add settings UI, schema defaults/hydration, and coverage in unit/browser tests
@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

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: 38eb08b8-1412-426b-9794-83a71ab32fe8

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
  • Post copyable unit tests in a comment
📝 Coding Plan
  • Generate coding plan for human review comments

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:XXL 1,000+ changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Mar 16, 2026
@ThallesP ThallesP changed the title [codex] Add agent completion notifications with configurable sound settings Add system notifications + sounds Mar 16, 2026
@ThallesP ThallesP marked this pull request as ready for review March 16, 2026 05:50

if (file.size > MAX_CUSTOM_NOTIFICATION_SOUND_BYTES) {
setSoundSelectionError(
`Custom sounds must be ${Math.floor(MAX_CUSTOM_NOTIFICATION_SOUND_BYTES / (1024 * 1024))}MB or smaller.`,
Copy link
Author

@ThallesP ThallesP Mar 16, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

no idea if a limit is necessary, dont want to blow up user's IndexedDB (even if he really wants to). Life would be so much easier if I could just read a path at runtime but unfortunately browsers thinks thats a security nightmare (wdym I can't read a .env path on your local file system??!?)

- treat only `src: null` as an explicit no-play signal
- add test to ensure disabled playback does not trigger default audio
@ThallesP ThallesP force-pushed the feature/web/agent-completion-notifications branch from 2d4a60a to 5eb0951 Compare March 16, 2026 05:54
@ThallesP
Copy link
Author

@coderabbitai review

@coderabbitai
Copy link

coderabbitai bot commented Mar 16, 2026

✅ Actions performed

Review triggered.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@UtkarshUsername
Copy link
Contributor

#976 is being worked on with comments from Julius

@ThallesP
Copy link
Author

thanks missed that somehow

@ThallesP ThallesP closed this Mar 16, 2026
@ThallesP
Copy link
Author

ThallesP commented Mar 16, 2026

#976 is being worked on with comments from Julius

@UtkarshUsername I see no sound notification though, maybe I can focus on sound only after that's merged? Is that something desired?

@UtkarshUsername
Copy link
Contributor

@UtkarshUsername I see no sound notification though, maybe I can focus on sound only after that's merged? Is that something desired?

I am not sure if that's something the maintainers want, but you can try and see after that one is merged

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:XXL 1,000+ 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.

2 participants