TT 7640 fix: disable red drag-region on guided phrase recorder waveform - #540
Open
nabalone wants to merge 2 commits into
Open
TT 7640 fix: disable red drag-region on guided phrase recorder waveform#540nabalone wants to merge 2 commits into
nabalone wants to merge 2 commits into
Conversation
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
marked this pull request as ready for review
August 26, 2026 00:31
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
disableDragSelectionprop threaded throughMediaRecord → WSAudioPlayer → useWaveSurfer → useWaveSurferRegions, gating theenableDragSelectioncall. It defaults to off everywhere; it is enabled only on theCarefulSpeechControlsrecorder, so no other recorder's behavior changes.Changes
useWaveSurferRegions: newdisableDragSelectionparam + ref;enableDragSelectionnow also requires!disableDragSelectionRef.current.useWaveSurfer,WSAudioPlayer,MediaRecord: forward the new optional prop.CarefulSpeechControls: passdisableDragSelection={true}to the guided recorder.Test plan
🤖 Generated with Claude Code