Skip to content

TT 7640 fix: disable red drag-region on guided phrase recorder waveform - #540

Open
nabalone wants to merge 2 commits into
developfrom
disable-recorder-drag-region
Open

TT 7640 fix: disable red drag-region on guided phrase recorder waveform#540
nabalone wants to merge 2 commits into
developfrom
disable-recorder-drag-region

Conversation

@nabalone

Copy link
Copy Markdown
Collaborator

Summary

In the Phrase Back Translate (and Careful Speech) step, users could click-and-drag on the bottom recording waveform, creating a red loop region. This region has no purpose in the guided single-take recorder flow.

This adds an optional disableDragSelection prop threaded through MediaRecord → WSAudioPlayer → useWaveSurfer → useWaveSurferRegions, gating the enableDragSelection call. It defaults to off everywhere; it is enabled only on the CarefulSpeechControls recorder, so no other recorder's behavior changes.

Changes

  • useWaveSurferRegions: new disableDragSelection param + ref; enableDragSelection now also requires !disableDragSelectionRef.current.
  • useWaveSurfer, WSAudioPlayer, MediaRecord: forward the new optional prop.
  • CarefulSpeechControls: pass disableDragSelection={true} to the guided recorder.

Test plan

  • Open a Phrase Back Translate step → try to click-drag on the bottom recording waveform → no red region appears.
  • Verify recording, playback, and segment navigation still work in Phrase Back Translate and Careful Speech.
  • Verify other recorders (e.g. general record steps) still support drag-to-select as before.

🤖 Generated with Claude Code

nabalone and others added 2 commits August 25, 2026 17:01
The Phrase Back Translate / Careful Speech recorder let users click-drag
on the recording waveform, creating a red loop region that serves no
purpose in this guided single-take flow. Add an optional
disableDragSelection prop threaded MediaRecord -> WSAudioPlayer ->
useWaveSurfer -> useWaveSurferRegions that gates enableDragSelection.
Default off everywhere; enabled only on the CarefulSpeechControls
recorder, so no other recorder's behavior changes.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the dedicated sync useEffect with a render-time ref cache write,
matching the render-time ref pattern used elsewhere. The value is
effectively constant and only read from the once-registered setupRegions
'ready' handler, so no effect is needed.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@nabalone
nabalone marked this pull request as ready for review August 26, 2026 00:31
@nabalone nabalone changed the title fix: disable red drag-region on guided phrase recorder waveform TT 7640 fix: disable red drag-region on guided phrase recorder waveform Aug 26, 2026
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.

1 participant