Skip to content

feat(app): ship redesigned notification sounds (phase 1 of #923)#924

Merged
Astro-Han merged 2 commits into
devfrom
claude/sound-redesign
May 26, 2026
Merged

feat(app): ship redesigned notification sounds (phase 1 of #923)#924
Astro-Han merged 2 commits into
devfrom
claude/sound-redesign

Conversation

@Astro-Han

Copy link
Copy Markdown
Owner

Summary

Phase 1 of the notification-sound redesign: replace the 45 inherited OpenCode .aac effects with two bundled PawWork sounds (notify.aac, error.aac) and point the agent / permission / error sound defaults at them. Notification behavior is intentionally unchanged here.

  • utils/sound.ts: SOUND_OPTIONS reduced from 45 to notify / error
  • context/settings.tsx: new defaults (agent + permissions → notify, errors → error) and a withSoundFallback that maps any stale persisted id back to the default
  • i18n en/zh: drop the 45 option labels, add notify / error
  • assets: delete the 45 OpenCode .aac, add notify.aac + error.aac, record source/license in packages/ui/src/assets/audio/CREDITS.md
  • snap: add a settings-sounds target; update the stale agent-sound e2e assertion

Why

The 45 sounds were inherited from OpenCode and don't fit PawWork's tone. This ships PawWork's own sounds now, with low risk, while the larger behavior refactor (single three-state control, OS-notification silencing, unified "only when unfocused" gating) is tracked as phase 2 in #923.

Related Issue

#923 (this is phase 1; phase 2 plan is in the issue's first comment).

Human Review Status

Pending

Review Focus

  • withSoundFallback in context/settings.tsx: existing users have persisted ids like staplebops-01; confirm they fall back to the new default instead of resolving to a now-missing file (silent sound).
  • The agent/permission/error defaults map to the intended new sounds.

Risk Notes

  • Existing users: stale persisted sound ids fall back to the current default via withSoundFallback, so no one ends up with a silent, unresolvable sound.
  • Interim UI: the three existing sound dropdowns each now offer the same two options (Notification / Error) + None. The single three-state control that replaces them is phase 2 (Redesign notification sounds: two warm sounds + single three-state control #923), intentionally not in this PR.
  • Deletion / assets: 45 bundled .aac removed; 2 added with provenance recorded in CREDITS.md.
  • macOS/Windows checklist item left unticked: no platform/packaging/IPC surface was touched — this is a renderer-only asset + settings-data change. OS-notification silencing and background-playback verification are phase 2.

How To Verify

typecheck (bun run typecheck): exit 0
unit tests (bun run test:unit): 1616 passed, 0 failed
lint (bun run lint): clean
snap settings-sounds: passed; grid reviewed — Sound effects section shows
  Agent=Notification, Permissions=Notification, Errors=Error, and the agent
  dropdown opens to [None, Notification, Error]

Screenshots or Recordings

Visual check via the new settings-sounds snap target (grid reviewed locally: defaults render correctly and the reduced option set shows None / Notification / Error).

Checklist

  • Type label — this PR carries exactly one of bug, enhancement, task, documentation.
  • Routing labels — this PR carries at least one of app, ui, platform, harness, ci.
  • Priority label — this PR carries exactly one of P0, P1, P2, P3.
  • Human Review Status above is set to Pending, Approved by @<reviewer>, or Not required: <reason>.
  • I linked the related issue, or stated in Summary why there is no issue.
  • I described the review focus and any meaningful risks.
  • I replaced the example block in How To Verify with the real verification steps and the key result for each.
  • I did not introduce unrelated refactors, dependencies, generated files, or file changes beyond the stated scope.
  • (conditional) I manually checked visible UI or copy changes when needed, with screenshots or recordings.
  • (conditional) I considered macOS and Windows impact for platform, packaging, updater, signing, paths, shell, or permissions changes. Leave unticked only if no platform/packaging surface was touched.
  • (conditional) I called out docs, release notes, dependencies, permissions, credentials, deletion behavior, generated content, or local file changes when relevant.
  • I reviewed the final diff for unrelated changes and suspicious dependency changes.
  • I am targeting dev, and my PR title and commit messages use Conventional Commits in English.

Replace the 45 inherited OpenCode sound effects with two bundled sounds and
point the agent / permission / error defaults at them. This ships PawWork's
own sounds without touching notification behavior, which is deferred to the
phase 2 refactor tracked in #923 (single three-state control, OS-notification
silencing, unified "only when unfocused" gating).

- utils/sound.ts: SOUND_OPTIONS reduced from 45 to notify/error
- context/settings.tsx: new defaults (agent/permissions -> notify, errors ->
  error) and withSoundFallback so stale persisted ids fall back to the default
  instead of going silent for existing users
- i18n en/zh: drop the 45 option labels, add notify/error
- assets: delete the 45 OpenCode .aac, add notify.aac + error.aac, and record
  source/license in packages/ui/src/assets/audio/CREDITS.md
- snap: add settings-sounds target; update the stale agent-sound e2e assertion

Verified: typecheck, 1616 unit tests, lint, and the settings-sounds snap.
@Astro-Han Astro-Han added enhancement New feature or request P2 Medium priority app Application behavior and product flows ui Design system and user interface labels May 26, 2026
@coderabbitai

coderabbitai Bot commented May 26, 2026

Copy link
Copy Markdown
Contributor

Warning

Review limit reached

@Astro-Han, we couldn't start this review because you've reached your PR review rate limit.

More reviews will be available in 47 minutes and 10 seconds. Learn how PR review limits work.

Your organization has run out of usage credits. Purchase more in the billing tab.

⌛ How to resolve this issue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

🚦 How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans include higher PR review limits than trial, open-source, and free plans. In all cases, reviews become available again over time. During sustained high-volume PR review activity, CodeRabbit may temporarily slow when the next review becomes available.

Please see our Fair Usage Limits Policy for further information.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro Plus

Run ID: 734f2530-c4e9-4c6c-8f42-865cf4fb9ae5

📥 Commits

Reviewing files that changed from the base of the PR and between f8a27e6 and e9a007f.

📒 Files selected for processing (54)
  • packages/app/e2e/settings/settings.spec.ts
  • packages/app/e2e/snap/settings-sounds.snap.ts
  • packages/app/src/context/settings.tsx
  • packages/app/src/i18n/en.ts
  • packages/app/src/i18n/zh.ts
  • packages/app/src/utils/sound.ts
  • packages/ui/src/assets/audio/CREDITS.md
  • packages/ui/src/assets/audio/alert-01.aac
  • packages/ui/src/assets/audio/alert-02.aac
  • packages/ui/src/assets/audio/alert-03.aac
  • packages/ui/src/assets/audio/alert-04.aac
  • packages/ui/src/assets/audio/alert-05.aac
  • packages/ui/src/assets/audio/alert-06.aac
  • packages/ui/src/assets/audio/alert-07.aac
  • packages/ui/src/assets/audio/alert-08.aac
  • packages/ui/src/assets/audio/alert-09.aac
  • packages/ui/src/assets/audio/alert-10.aac
  • packages/ui/src/assets/audio/bip-bop-01.aac
  • packages/ui/src/assets/audio/bip-bop-02.aac
  • packages/ui/src/assets/audio/bip-bop-03.aac
  • packages/ui/src/assets/audio/bip-bop-04.aac
  • packages/ui/src/assets/audio/bip-bop-05.aac
  • packages/ui/src/assets/audio/bip-bop-06.aac
  • packages/ui/src/assets/audio/bip-bop-07.aac
  • packages/ui/src/assets/audio/bip-bop-08.aac
  • packages/ui/src/assets/audio/bip-bop-09.aac
  • packages/ui/src/assets/audio/bip-bop-10.aac
  • packages/ui/src/assets/audio/error.aac
  • packages/ui/src/assets/audio/nope-01.aac
  • packages/ui/src/assets/audio/nope-02.aac
  • packages/ui/src/assets/audio/nope-03.aac
  • packages/ui/src/assets/audio/nope-04.aac
  • packages/ui/src/assets/audio/nope-05.aac
  • packages/ui/src/assets/audio/nope-06.aac
  • packages/ui/src/assets/audio/nope-07.aac
  • packages/ui/src/assets/audio/nope-08.aac
  • packages/ui/src/assets/audio/nope-09.aac
  • packages/ui/src/assets/audio/nope-10.aac
  • packages/ui/src/assets/audio/nope-11.aac
  • packages/ui/src/assets/audio/nope-12.aac
  • packages/ui/src/assets/audio/notify.aac
  • packages/ui/src/assets/audio/staplebops-01.aac
  • packages/ui/src/assets/audio/staplebops-02.aac
  • packages/ui/src/assets/audio/staplebops-03.aac
  • packages/ui/src/assets/audio/staplebops-04.aac
  • packages/ui/src/assets/audio/staplebops-05.aac
  • packages/ui/src/assets/audio/staplebops-06.aac
  • packages/ui/src/assets/audio/staplebops-07.aac
  • packages/ui/src/assets/audio/yup-01.aac
  • packages/ui/src/assets/audio/yup-02.aac
  • packages/ui/src/assets/audio/yup-03.aac
  • packages/ui/src/assets/audio/yup-04.aac
  • packages/ui/src/assets/audio/yup-05.aac
  • packages/ui/src/assets/audio/yup-06.aac
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch claude/sound-redesign

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 left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested priority: P2 (includes user-path files (packages/app/src/context/settings.tsx, packages/app/src/i18n/en.ts, packages/app/src/i18n/zh.ts, packages/app/src/utils/sound.ts)).

P1/P0 are reserved for maintainer confirmation. Please relabel manually if this is a release blocker, security issue, data-loss risk, or updater/runtime failure.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Code Review

This pull request simplifies the application's notification sounds by reducing the available options to just "notify" and "error". It updates the default settings, localization dictionaries, and sound utilities accordingly, while adding a fallback mechanism to map legacy sound IDs to the new defaults. Additionally, E2E tests and a credits file for the audio assets have been added. One improvement opportunity was identified in the E2E test to make an assertion more precise and robust.

Comment thread packages/app/e2e/settings/settings.spec.ts Outdated
@github-actions

github-actions Bot commented May 26, 2026

Copy link
Copy Markdown

Perf delta summary

Comparator: pass

Profile / Scenario interaction median interaction worst long task max tbt frame gap p95 frame gap max jank count cls status
default / homepage-cold 24 -> 32 (+8) 32 -> 40 (+8) 65 -> 76 (+11) 15 -> 26 (+11) 33.4 -> 16.8 (-16.6) 133.4 -> 166.7 (+33.3) 4 -> 4 (0) 0 -> 0 (0) pass
default / long-session-input-lag 48 -> 48 (0) 48 -> 48 (0) 0 -> 0 (0) 0 -> 0 (0) 16.7 -> 16.8 (+0.1) 16.7 -> 16.8 (+0.1) 0 -> 0 (0) 0 -> 0 (0) pass
default / session-streaming-long 48 -> 48 (0) 64 -> 72 (+8) 0 -> 0 (0) 0 -> 0 (0) 16.8 -> 16.8 (0) 33.3 -> 33.3 (0) 0 -> 0 (0) 0 -> 0 (0) pass
default / tool-call-expand 40 -> 40 (0) 40 -> 40 (0) 0 -> 0 (0) 0 -> 0 (0) 16.7 -> 16.7 (0) 16.7 -> 16.7 (0) 0 -> 0 (0) 0 -> 0 (0) pass
default / tool-default-open-heavy-bash 16 -> 16 (0) 16 -> 16 (0) 107 -> 79 (-28) 75 -> 47 (-28) 49.9 -> 50.1 (+0.2) 150 -> 100.1 (-49.9) 3 -> 4 (+1) 0.004 -> 0.004 (0) pass
default / terminal-side-panel-open 40 -> 48 (+8) 48 -> 48 (0) 0 -> 0 (0) 0 -> 0 (0) 33.4 -> 33.3 (-0.1) 33.4 -> 33.3 (-0.1) 0 -> 0 (0) 0 -> 0 (0) pass
default / session-scroll-reading 16 -> 16 (0) 16 -> 16 (0) 0 -> 0 (0) 0 -> 0 (0) 16.7 -> 16.7 (0) 16.7 -> 16.7 (0) 0 -> 0 (0) 0 -> 0 (0) pass

defaultSettings was handed to createStore by reference, so reconciling a
stale persisted sound id (e.g. the old OpenCode "staplebops-01") mutated
defaultSettings.sounds.* in place. withSoundFallback reads those defaults
as its fallback, so it ended up "falling back" to the very invalid id it
was meant to replace, leaving upgrading users with a silent, unresolvable
sound. Clone defaultSettings so it stays a stable source of truth.

Tighten the agent-selection assertion to the exact persisted id and add
E2E coverage that seeds legacy ids and asserts the dropdowns resolve to
the bundled defaults.
@Astro-Han Astro-Han merged commit e7ef534 into dev May 26, 2026
27 of 28 checks passed
@Astro-Han Astro-Han deleted the claude/sound-redesign branch May 26, 2026 06:35
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app Application behavior and product flows enhancement New feature or request P2 Medium priority ui Design system and user interface

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant