Skip to content

chore: AudioMessageRecorder mount effect#35146

Merged
kodiakhq[bot] merged 5 commits intodevelopfrom
chore/audio-recorder-cleanup
Feb 7, 2025
Merged

chore: AudioMessageRecorder mount effect#35146
kodiakhq[bot] merged 5 commits intodevelopfrom
chore/audio-recorder-cleanup

Conversation

@juliajforesti
Copy link
Contributor

Proposed changes (including videos or screenshots)

On StrictMode, React@18 now runs the whole effect (effect + cleanup) on first mount.
This was causing our audio recorder component to not be rendered:

  • toolbox audio button onClick sets recordingMode to true
  • this triggers the AudioMessageRecorder component to render
  • the cleanup function was setting recordingMode to false
  • recordingMode was never "reset" to true inside the component

This PR fixes this development bug (not present in prod) by setting recordingMode to true inside the effect.

Issue(s)

Steps to test or reproduce

Further comments

@dionisio-bot
Copy link
Contributor

dionisio-bot bot commented Feb 6, 2025

Looks like this PR is ready to merge! 🎉
If you have any trouble, please check the PR guidelines

@changeset-bot
Copy link

changeset-bot bot commented Feb 6, 2025

⚠️ No Changeset found

Latest commit: eae85c4

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@codecov
Copy link

codecov bot commented Feb 6, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 59.22%. Comparing base (278a1ab) to head (eae85c4).
Report is 1 commits behind head on develop.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff            @@
##           develop   #35146   +/-   ##
========================================
  Coverage    59.22%   59.22%           
========================================
  Files         2824     2824           
  Lines        67980    67979    -1     
  Branches     15117    15116    -1     
========================================
  Hits         40259    40259           
+ Misses       24892    24891    -1     
  Partials      2829     2829           
Flag Coverage Δ
unit 75.17% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

@juliajforesti juliajforesti force-pushed the chore/audio-recorder-cleanup branch 4 times, most recently from c07155a to 0778513 Compare February 7, 2025 18:23
@juliajforesti juliajforesti force-pushed the chore/audio-recorder-cleanup branch from 0778513 to 7d39c88 Compare February 7, 2025 19:00
@juliajforesti juliajforesti marked this pull request as ready for review February 7, 2025 20:10
@juliajforesti juliajforesti requested a review from a team as a code owner February 7, 2025 20:10
@juliajforesti juliajforesti added this to the 7.4.0 milestone Feb 7, 2025
@aleksandernsilva aleksandernsilva added the stat: QA assured Means it has been tested and approved by a company insider label Feb 7, 2025
@dionisio-bot dionisio-bot bot added the stat: ready to merge PR tested and approved waiting for merge label Feb 7, 2025
@kodiakhq kodiakhq bot merged commit c3c2725 into develop Feb 7, 2025
47 of 48 checks passed
@kodiakhq kodiakhq bot deleted the chore/audio-recorder-cleanup branch February 7, 2025 22:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stat: QA assured Means it has been tested and approved by a company insider stat: ready to merge PR tested and approved waiting for merge

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants