Skip to content

TT-7104 Refactor recording state management in PassageDetailItem#208

Merged
sarahentzel merged 1 commit intodevelopfrom
feature/TT-7104-disabled-pbt-pause
Feb 13, 2026
Merged

TT-7104 Refactor recording state management in PassageDetailItem#208
sarahentzel merged 1 commit intodevelopfrom
feature/TT-7104-disabled-pbt-pause

Conversation

@gtryus
Copy link
Contributor

@gtryus gtryus commented Feb 12, 2026

  • Simplified the isRecording function to only check for recorderRecordingRef.
  • Updated the updateRecorderBusy function to set recording based on both isRecording and recorderPlayingRef.current.

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Refactors how PassageDetailItem determines and propagates “recording/busy” state to the shared Passage Detail context during MediaRecord recording vs playback.

Changes:

  • Simplifies isRecording() to only reflect the recorder’s active recording ref (recorderRecordingRef).
  • Updates updateRecorderBusy() to drive the shared setRecording(...) state based on both recorder recording and recorder playback refs.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gtryus gtryus marked this pull request as draft February 12, 2026 17:24
@gtryus gtryus force-pushed the feature/TT-7104-disabled-pbt-pause branch from af35e85 to 5b601d7 Compare February 12, 2026 21:23
@gtryus gtryus requested a review from Copilot February 12, 2026 21:24
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gtryus gtryus marked this pull request as ready for review February 12, 2026 21:30
@gtryus gtryus requested a review from sarahentzel February 12, 2026 21:49
aria-label={isRecorderPlaying ? 'Pause' : 'Play'}
onClick={() => recorderControlsRef.current?.togglePlay()}
disabled={recorderDuration === 0 || isRecording()}
onClick={() => {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

pull this duplicated code out into a function

…cks in PassageDetailItem

- Added a debounce mechanism to prevent rapid successive clicks on play and record buttons.
- Introduced a new constant DEBOUNCE_CLICK_MS to define the debounce duration.
- Updated button click handlers to utilize the debounce logic, enhancing user experience by avoiding unintended multiple actions.
@gtryus gtryus force-pushed the feature/TT-7104-disabled-pbt-pause branch from 5b601d7 to 600cc11 Compare February 12, 2026 22:30
@gtryus gtryus requested a review from Copilot February 12, 2026 22:32
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@sarahentzel sarahentzel merged commit d6af1b0 into develop Feb 13, 2026
8 checks passed
@sarahentzel sarahentzel deleted the feature/TT-7104-disabled-pbt-pause branch February 13, 2026 18:37
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.

2 participants