Skip to content

Add a configurable Zeron sound signature - #320

Merged
wingleeio merged 6 commits into
zeronsh:mainfrom
gaelcado:codex/rounded-notification-sounds
Sep 13, 2026
Merged

Add a configurable Zeron sound signature#320
wingleeio merged 6 commits into
zeronsh:mainfrom
gaelcado:codex/rounded-notification-sounds

Conversation

@gaelcado

@gaelcado gaelcado commented Sep 11, 2026

Copy link
Copy Markdown
Contributor

Summary

  • replace the existing completion and input-request chimes with a quiet, rounded sound pair
  • add a restrained attention cue for run failures and durable connectivity outages
  • add a master Session sounds switch plus independent completion, input, and attention preferences
  • preserve each choice in device-local settings while keeping ZERON_DISABLE_SOUND as the global override
  • give every Notifications switch a 40×40 target, keyboard focus/activation when enabled, and persistent accessible role/name/state while subordinate choices are unavailable
  • send desktop banners for genuine durable connectivity outages, respecting the background-only preference
  • keep the selected sounds and ten additional auditions reproducible from standard-library-only synthesis scripts with no external samples

Listen

These immutable CDN links open in a browser’s native audio player without forcing a download:

All four are stereo, 48 kHz, 16-bit PCM WAV files at deliberately quiet peaks. The complete audition set is documented under docs/sound-design/auditions/.

Behavior

  • session baselines seed silently, so boot and replay do not chime
  • connectivity alerts arm only after the engine startup grace, suppressing both warm and cold boot-time outages
  • completion follows a new explicit completion marker; interrupts, stale activity, and pending-send handoffs do not create false completion sounds
  • input required follows the transition into AwaitingInput
  • run failure plays attention once on the transition into Errored
  • connectivity attention and desktop banners fire once per genuine durable outage; the engine already applies a four-second degradation grace before exposing Offline or Reconnecting
  • attention requests are coalesced across independent session and connectivity watch callbacks, including multiple simultaneous run failures
  • frequent actions such as send, queue, upload, microphone changes, reconnect, and undo remain silent

Playback uses exclusive temporary-file creation, avoids PowerShell path interpolation, and retains Zeron dependency-free platform path: afplay on macOS, Media.SoundPlayer on Windows, and the first available supported system player on Linux.

Dependency

Depends on #216 and should land after it. That PR owns the Appshot cue, capture trigger, preloaded macOS playback, and independent Capture sound preference.

After #216 merges, this branch should be rebased onto the updated main and the expected crates/ui/src/sound.rs overlap resolved by retaining the Appshot playback path while adding Sound::Attention. A dry merge-tree review currently finds no other content conflicts.

Verification

  • cargo test --locked -p zeron-ui — 811 passed, 0 failed
  • rustfmt --edition 2024 --check crates/ui/src/settings/notifications.rs crates/ui/src/shell.rs crates/ui/src/sound.rs crates/ui/src/state.rs
  • git diff --check origin/main...HEAD
  • both synthesis generators rerun deterministically; runtime attention is byte-identical to audition 06
  • all three runtime assets validate as RIFF/WAVE stereo 48 kHz 16-bit PCM

cargo fmt --all -- --check still reports unrelated formatting drift already present on origin/main; every Rust file changed by this branch passes the targeted check above.

Integration order

This draft should land after #216.

  1. Merge Add Appshots capture, queue integration, and iOS presentation #216 first.
  2. Rebase this branch onto the resulting main.
  3. Resolve the expected overlap in crates/ui/src/sound.rs by retaining the Appshot cue alongside the Done, Request, and Attention notification sounds.
  4. Verify the rewritten patch series and run fresh CI before marking this PR ready.
  5. Merge Add a guided first-run onboarding journey #322 only after this PR; onboarding must then be rebased onto the updated main.

A local merge simulation of the current PR heads confirms that merging #216 followed by this head conflicts in sound.rs; this is an expected integration step, not a stacked-branch dependency.


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.

@gaelcado

Copy link
Copy Markdown
Contributor Author

CI diagnosis

The failing macos-frame-recovery job on head 770b5d2 stopped at the existing browser-fixture assertion dismissed menu retained native blur.

This PR does not modify the browser fixture, browser implementation, appearance system, or backdrop code; its UI change is confined to sound notification state/settings. I built and ran the exact macOS browser fixture from the unchanged PR head locally. Two consecutive full runs passed, including the assertion that failed in Actions and all subsequent blur validation. That makes this an intermittent fixture/CI failure rather than a regression introduced by this PR.

Provenance: the assertion was introduced in 4d03fa2 by Wing as part of #283. This is therefore existing repository test reliability debt (maintainer/CI ownership), not an issue in the sound patch; the provenance is included to route follow-up, not to assign personal blame.

I attempted to rerun the failed GitHub job, but GitHub rejected it with Must have admin rights to Repository; no rerun occurred. A maintainer can rerun the failed job, or fresh CI can run after the documented rebase onto #216.

@gaelcado
gaelcado marked this pull request as ready for review September 11, 2026 14:57
@avarayr

avarayr commented Sep 11, 2026

Copy link
Copy Markdown

@gaelcado where do these sounds come from? Were they programmatically generated, or sourced from somewhere? If they're sourced, we need an attribution

@gaelcado

gaelcado commented Sep 11, 2026

Copy link
Copy Markdown
Contributor Author

@gaelcado where do these sounds come from? Were they programmatically generated, or sourced from somewhere? If they're sourced, we need an attribution

They're custom made for Zeron @avarayr

@wingleeio wingleeio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks good. The per-event preferences preserve the master mute, notification baselines consume suppressed events, and attention requests are coalesced. Verified all 861 UI tests pass with current main, targeted formatting passes, and the synthesis scripts reproduce the committed audio exactly. The failed macOS browser check has been rerun. The documented integration with #216 still needs to preserve its Appshot playback path.

@wingleeio wingleeio left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Rechecked after #216 merged. The sound overlap is resolved, preserving native Appshot playback and its independent preference alongside completion, input and attention sounds. The published tree matches the integration tested locally: all 901 UI tests passed, and targeted formatting is clean. The original failed macOS check also passed on rerun; fresh CI is running for this integrated revision.

@wingleeio
wingleeio merged commit 52cc9ab into zeronsh:main Sep 13, 2026
10 of 11 checks passed
@gaelcado
gaelcado deleted the codex/rounded-notification-sounds branch September 13, 2026 10:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants