Desktop Material

Distinct sound-effect event mapping

Builds on the audio system to give each meaningful app event its own recognizable sound effect instead of routing everything through the shared commit / auto-commit cue. It covers the git network operations (push, fetch, pull) and every Build & Run lifecycle phase, and organizes the cues into four motif families so they read as a coherent set while staying individually distinguishable.

Everything is still fully gated by the audio system's own settings (off by default) and its throttle, quiet-hours, reduced-motion and screen-reader rules.

What changed

Architecture

The event → category → motif mapping is a pure, DOM-free module, app/src/lib/audio/sfx-event-map.ts:

Wiring:

Configuration

No new persisted setting is required — the cues reuse the existing SFX enable toggle and volume. Settings → Sound → Sound effects gains an Audition each cue grid: one accessible button per category, grouped by family, each playing its synthesized cue regardless of throttling. All labels are localized (English, Cantonese, bilingual) and a settings-search entry (sound-cue-audition) points at the section.

Cooldowns

Per-category SFX cooldowns live in audio-throttle.ts:

Narration follows the same "only meaningful events" rule as before: succeeded and failed are spoken (funny-level-scaled for succeeded; clear and constant for failed), while fetch, the progress phases and a plain cancelled are SFX-only.

Failure modes

Security considerations

Synthesis is entirely local (Web Audio oscillators); no assets are fetched and no event data leaves the renderer. The mapping is pure data with no user input.

Verification