Add custom desktop notification sounds#1430
Conversation
|
Reviewed for perf, correctness, and React hooks usage. Pushed one follow-up commit ( 1. Per-notification 10MB IPC + disk read. Each 2. Overlapping playback on bursts. Two concurrent triggers (e.g. agent-complete + terminal-bell on the same data chunk) each created an Audio element, causing them to stack. Added a 250ms dedupe window in the preload — well under the main process's 5-second cooldown so it only catches the genuinely-overlapping case. Returns a distinct Other things I checked and consider fine:
Tests, |
Avoids re-reading the configured audio file (up to 10MB) from disk and re-transferring it over IPC on every notification. Adds a path-only resolver so repeated dispatches with an unchanged sound skip the heavy load entirely. For burst handling, follows the VS Code AccessibilitySignalService / GNOME canberra pattern: one shared HTMLAudioElement per sound, restarted from t=0 on each play, with an in-flight guard that drops new plays while the sound is still ringing. This self-dedupes by the sound's own duration without any magic time constant — distinct sounds remain free to overlap. The Test button passes force: true so an explicit user action always plays through. Co-authored-by: Orca <help@stably.ai>
442dbca to
b1680fc
Compare
|
Updated Why this is better than my previous approach:
Also rebased onto current |
Summary
Adds one configurable custom desktop notification sound that applies to all delivered Orca desktop notifications: agent complete, terminal bell, and test notifications.
Changes
Validation