Repository navigation
feat(view3d): sound on the PuzlWerk main view (A4b) - #84
Conversation
a194994 to
b1f4f2d
Compare
|
Review: FINDINGS head=b1f4f2df9f6a80f01273af5886aa6e7aa0b35dc5 patch-id=c9da95dd81d261d7887d45b2f0a886bcd88aaa84 pr=84 |
The turn sound setting, its gains and the Sound button move into turnSound.tsx and are used by the existing view and by the PuzlWerk toolbar, so both show the same button and store the same cookie. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
A finished turn (gesture, undo, scramble step) clicks and a selected wide block plays the cue, with the gains of the existing view and only while the Sound toggle is on. The e2e spec counts the sounds a Web Audio stand-in receives. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
The click sounds once for a finished scramble step and an undo, and not for a turn the player refused or one that ends after Reset, Random State or unmount. Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
b1f4f2d to
d00c2cb
Compare
|
Review: CLEAR head=d00c2cbd5f9f8b568401280f05e8c7b0b55a15ed patch-id=b779bb5452e97dab4bd92c56cb20085bb720fcfc pr=84 |
Purpose: the main view behind
?viewer=puzlwerkgets the Sound toggle and the sound of a finished turn and of a selected wide block, as in the existing view. The default view is unchanged in behavior.bounded, default-off early integration per owner decision 2026-11-19; not the M1/M2 approval.
Stacked on #83: merge that PR first; merge only with the whole stack.
Changes:
turnSound.tsx: the turn sound cookie, the click and cue gains and the Sound button, now used by the existing view and the PuzlWerk toolbar (no copy;useCubeTurns,useCubeGestures,cubeView3Dcall it).puzlwerkToolbar.tsx,puzlwerkCubeView.tsx: Sound button after Move layers.usePuzlwerkTurns.ts,usePuzlwerkHints.ts: click on a finished turn (gesture, undo, scramble step), cue when a wide block is selected.Tests (worktree, Node 22.23.4, SwiftShader Chromium):
npx vitest run: 2169 passed, 47 failed (known LFS photo files); new: turnSound 7 (button markup, gains, toggle, toolbar order), click tests in usePuzlwerkTurns (none after Reset, Random State, new source, unmount).npm run typecheck,npm run lint,npm run format:check: exit 0.main-view-sound.spec.ts: 4 passed (toggle and cookie, gesture click on/off, scramble and undo clicks, wide cue). With the A4 specs and the other main-view specs: 36 passed;cubeView3D-view,-controls: 29 passed.npm run build), A4 -> this: index 395.09 -> 395.10 kB, cubeView3D 39.66 -> 38.12 kB, puzlwerkCubeView 788.21 -> 788.43 kB. No viewer code in index or cubeView3D.Known difference: the click after a drag uses the turn-ms setting, the existing view the settle time of the drag (it only matters below 120 ms). Not verified: real GPU and real audio output (Web Audio is a stand-in in the e2e), owner look.
Blocker: none.
Refs #29
Refs wstein/cubistry#21
No session links.
🤖 Generated with Claude Code