All on feat/3-waveform-crop. Pure code with tests first, phase-2 touch
points second, components last. Each task ends in a commit referencing
[rb-waveform-crop] with npm test and npm run lint green.
The branch carries more than these eight commits: two refactors landed during
implementation (peaks drawn in the effect, range helpers extracted), a hit-test
fix, a README line, and three commits from the code-review round. Scope a
review from git log main..feat/3-waveform-crop, not from this list.
src/waveform/selection.ts: Selection, constants, defaultSelection,
setStart, setEnd, moveBy (design §2.1).test/selection.test.ts (design §4).feat(waveform): selection model with 1-10 s window [rb-waveform-crop]src/waveform/peaks.ts: computePeaks (design §2.2).test/peaks.test.ts.feat(waveform): min/max peaks per column [rb-waveform-crop]src/waveform/slice.ts: sliceClip, assertMinLength.src/audio/types.ts: 'too-short' code and message.src/audio/load.ts: assertMinLength after decode; src/audio/record.ts:
pass any InputError through unchanged.test/slice.test.ts.feat(waveform): sliceClip; reject clips under 1 s at load [rb-waveform-crop]src/audio/player.ts: play(startS, endS), absolute position().feat(audio): play a window of the clip [rb-waveform-crop]src/state/useAudioInput.ts: selection, setSelection, windowClip,
reset on new clip, windowed togglePlay, stop on selection change.feat(state): selection and window clip in useAudioInput [rb-waveform-crop]src/ui/WaveformCanvas.tsx: layers, sizing, pointer handling (design §3.1)..wave wrapper, touch-action: none, heights.feat(ui): waveform canvas with draggable crop window [rb-waveform-crop]src/ui/WaveformBlock.tsx: single vs overview+detail by LONG_CLIP_S,
detailRange, readout.src/ui/InputScreen.tsx: mount the block between StatusLine and Player.feat(ui): waveform block with overview for long clips [rb-waveform-crop]Run by Claude through Playwright with synthetic pointer events. Everything here is mouse/upload only; nothing below is evidence about touch.
ffmpeg -stream_loop 7 -i "audio/before cold clutch.aac" -c copy long.m4a
into the scratch dir.README.md status.Carried into review.md section B; the feature is not done until these pass.
Then: code review (maintainer triggers), fixes on the branch, review.md, merge.