Dings: sender-instrument earcons per motif, stock sounds when no manifest #36

Closed
void wants to merge 3 commits from void/dings-hook into main
Member

Follow-up ratatoskr:follow_up:dings-hook. Design is the Agreements in docs/gamecult/ratatoskr-target.md.

  • src/app/features/dings/dings.ts: manifest parse (defensive, paths stay inside dings/), pickDing (sender clip, else neutral, else silence), motifFor (invite > mention > dm > message), volumes (mention/dm loud, message quiet), createDingPlayer (silent until the first pointerdown/keydown/touchend, refused plays dropped).
  • useDings.ts: reads public/dings/manifest.json once at runtime; returns false when there is none so the stock sounds stay.
  • ClientNonUIFeatures.tsx: MessageNotifications (mention from highlight count, DM from m.direct) and InviteNotifications (neutral invite ding) ask it first.
  • vite.config.js, public/dings/README.md: the folder ships; no manifest or clips committed (Aqua renders them).

Tests: dings.test.ts 10 tests, written first (failed on the missing module); full suite 155 passing. eslint clean on the new files; tsc has the matrix-js-sdk typing noise on untouched lines only, none in new files.

Built: the decision, hook, wiring. Not built: the clips and manifest (Aqua), the per-Mind instrument as typed state on the Mind side (design advice, not wired), a mute-per-room check beyond the existing one. Not merged: waits on Soul, then Meta for main.

🤖 Generated with Claude Code

Follow-up `ratatoskr:follow_up:dings-hook`. Design is the Agreements in docs/gamecult/ratatoskr-target.md. - `src/app/features/dings/dings.ts`: manifest parse (defensive, paths stay inside dings/), `pickDing` (sender clip, else neutral, else silence), `motifFor` (invite > mention > dm > message), volumes (mention/dm loud, message quiet), `createDingPlayer` (silent until the first pointerdown/keydown/touchend, refused plays dropped). - `useDings.ts`: reads `public/dings/manifest.json` once at runtime; returns false when there is none so the stock sounds stay. - `ClientNonUIFeatures.tsx`: MessageNotifications (mention from highlight count, DM from m.direct) and InviteNotifications (neutral invite ding) ask it first. - `vite.config.js`, `public/dings/README.md`: the folder ships; no manifest or clips committed (Aqua renders them). Tests: `dings.test.ts` 10 tests, written first (failed on the missing module); full suite 155 passing. eslint clean on the new files; `tsc` has the matrix-js-sdk typing noise on untouched lines only, none in new files. Built: the decision, hook, wiring. Not built: the clips and manifest (Aqua), the per-Mind instrument as typed state on the Mind side (design advice, not wired), a mute-per-room check beyond the existing one. Not merged: waits on Soul, then Meta for main. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
Sender picks the instrument, event picks the motif: own clip, else neutral, else
silence; mentions and DMs loud, messages quiet; manifest read defensively; no audio
before the first user gesture. The test was written first and failed on the missing
module.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
dings: play them for messages and invites, stock sound when no manifest
Some checks failed
Build pull request / Build pull request (pull_request) Failing after 3m11s
8368c6e5c3
MessageNotifications and InviteNotifications ask useDings; with no dings/manifest.json
the stock notification sounds are untouched. public/dings is copied into the build.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
dings tests: pin the path guard, prototype names, pick volume, array senders
Some checks failed
Build pull request / Build pull request (pull_request) Failing after 3m43s
b3eb9d018b
Soul's surviving mutants: dropped dot-segment guard, hasOwnProperty dropped in readClips,
pickDing volume constant, isRecord without the array check. The `in` + `{}` pair is
equivalent (a prototype name resolves to a non-clip, so neutral applies either way).

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Author
Member

Closing: superseded by #69 (void/dings-v3), which carries this hook ported onto dev behind the dings.enabled client-config switch plus a manifest test. This branch is based on old main and conflicts with dev (vite.config.js).

Closing: superseded by #69 (void/dings-v3), which carries this hook ported onto dev behind the dings.enabled client-config switch plus a manifest test. This branch is based on old main and conflicts with dev (vite.config.js).
void closed this pull request 2026-11-10 17:19:04 +00:00
Some checks failed
Build pull request / Build pull request (pull_request) Failing after 3m43s

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set

Reference
GameCult/Ratatoskr!36
No description provided.