[CP Staging] Fix comment being cleared after typing another comment before debounce#74817
Conversation
|
@bernhardoj Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@bernhardoj This a follow-up PR for a regression introduced by #67720 so you can ignore this. cc @chiragsalian Please assign for review. |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Fix makes sense from a product perspective 👍
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp74817-android-hybrid.mp4Android: mWeb Chrome74817-android-chrome.mp4iOS: HybridApp74817-ios-hybrid.mp4iOS: mWeb Safari74817-ios-safari.mp4MacOS: Chrome / Safari74803-web.mp4MacOS: Desktop74817-desktop.mp4 |
|
@LorenzoBloedow The issue is still happening on desktop. Screen.Recording.2025-11-11.at.17.45.45.mp4 |
|
@LorenzoBloedow could you outline how this issue arose now? The code that you've changed here was added months ago so how is it that it is causing an issue on staging now? |
|
@MariaHCD This was tricky but I'm pretty sure It's because of a race condition. For the composer to correctly work, all Screen.Recording.2025-11-11.at.2.42.11.PM.movFor option 1, this would have to be debounced like it was being done before: Something like: onChangeText={(comment) => updateComment(comment, true)} |
Fix comment being cleared after typing another comment before debounce (cherry picked from commit 3b73279) (cherry-picked to staging by chiragsalian)
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Cherry-picked to staging by https://github.com/chiragsalian in version: 9.2.52-1 🚀
|
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.2.54-1 🚀
|
Explanation of Change
After clearing a message, the empty string used to clear was being sent with a debounce, thus, if you were to write another comment before the debounce time, it would get cleared. This issue arose because in the PR with the regression we broke a race condition between all
updateCommentcalls.Explanation of Change
Fixed Issues
Fixed Issues
$ #74803
Tests
Offline tests
Same as tests.
QA Steps
Same as tests.
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.ScrollViewcomponent to make it scrollable when more elements are added to the page.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Screen.Recording.2025-11-11.at.12.47.17.PM.mov
Android: mWeb Chrome
Screen.Recording.2025-11-11.at.12.52.36.PM.mov
iOS: Native
Screen.Recording.2025-11-11.at.12.39.00.PM.mov
iOS: mWeb Safari
Screen.Recording.2025-11-11.at.12.42.25.PM.mov
MacOS: Chrome / Safari
Screen.Recording.2025-11-11.at.12.35.38.PM.mov
MacOS: Desktop
Screen.Recording.2025-11-11.at.12.46.02.PM.mov