Fix RBR in report preview doesn't disappear immediately after the report is paid - #75993
Conversation
|
@allroundexperts 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!
|
trjExpensify
left a comment
There was a problem hiding this comment.
To confirm...
When the report is paid:
- The RBR/error message should be removed from the expense preview in the report preview component, the expense row in the multi-expense report view
- The error is still visible in-line the field in error on the transaction form
That's where we landed for violations in the paid state, right @JmillsExpensify @puneetlath @cead22?
|
@bernhardoj The RBR still appears in preview if approval workflow is off. Screen.Recording.2025-12-01.at.2.02.54.AM.mov |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2025-12-01.at.2.30.43.AM.movAndroid: mWeb ChromeScreen.Recording.2025-12-01.at.2.24.42.AM.moviOS: HybridAppScreen.Recording.2025-12-01.at.2.22.46.AM.moviOS: mWeb SafariScreen.Recording.2025-12-01.at.2.18.18.AM.movMacOS: Chrome / SafariScreen.Recording.2025-12-01.at.2.09.52.AM.mov |
…rom-report-preview
|
@allroundexperts it's not in the paid state, so the violation still shows. |
|
@bernhardoj Can you please resolve the conflicts and fix tests? |
…rom-report-preview
|
@allroundexperts done |
|
@allroundexperts bump |
|
@trjExpensify are we good here to merge? |
|
@trjExpensify I think we are waiting for your approval here |
…rom-report-preview
|
@bernhardoj did you look at this comment #75993 (review)? Seems like the second bullet is not accounted for when looking at the video in the OP. |
|
Oh weird, why does it disappear and then come back? |
|
We optimistically clear all transaction violations when paying the report. App/src/libs/actions/IOU/index.ts Lines 9602 to 9609 in 4fbf1b9 Is there some violations that we shouldn't clear or we shouldn't clear any violation at all? |
|
^^ @cead22 @puneetlath any idea on that? I'm not sure why we optimistically clear them only to bring them back. |
|
I have no idea either. |
|
So shall we not do that? 🤔 |
|
No idea either though do we really want to keep showing them after it is paid? The admin decided paid despite the violation so there is not much value afterwards |
|
That's true. I also thought that we don't show violations after payment. |
|
I think we do at the "line level" on Classic, because it's relevant for things like re-exporting if coding is later invalid etc. |
|
So, can we merge this one and create another issue for that violation thing? |
…rom-report-preview
|
Yeah, I think so. We can address the "bouncing" of the violation in-line separately. |
|
Great! @youssef-lr ready to merge. |
|
🚧 @youssef-lr has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/youssef-lr in version: 9.3.13-1 🚀
|
|
🚀 Deployed to staging by https://github.com/youssef-lr in version: 9.3.15-0 🚀
|
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.15-10 🚀
|

Explanation of Change
The settled status is not updated immediately because it's memoized and only changes when the reportID changes. This PR make sure it changes when the report status changes.
Fixed Issues
$ #74757
PROPOSAL: #74757 (comment)
Tests
Same as QA Steps
Offline tests
Same as QA Steps
QA Steps
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
android.mp4
Android: mWeb Chrome
android.mweb.mp4
iOS: Native
ios.mp4
iOS: mWeb Safari
ios.mweb.mp4
MacOS: Chrome / Safari
web.mp4