Keep the background expense receipt visible when a wide RHP opens - #96142
Conversation
The receipt was hidden on every MoneyRequestView whenever any wide RHP was open, so a report hyperlink opening a wide RHP over a central-pane expense view (since Expensify#95131) dropped the background receipt and shifted content up. Scope the check to the view's own route key so only the MoneyRequestView inside the wide RHP hides its inline receipt.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@cretadn22 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-07-19.at.01.47.22.movAndroid: mWeb ChromeScreen.Recording.2026-07-19.at.01.41.50.moviOS: HybridAppScreen.Recording.2026-07-19.at.01.45.21.moviOS: mWeb SafariScreen.Recording.2026-07-19.at.01.41.05.movMacOS: Chrome / SafariScreen.Recording.2026-07-19.at.01.39.11.mov |
joekaufmanexpensify
left a comment
There was a problem hiding this comment.
Good for product
|
🚧 Valforte has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/Valforte in version: 9.4.42-0 🚀
|
|
🤖 No help site changes required. I reviewed the changes in this PR against the help site articles under This is a render-only UI bug fix in The only receipt-related help articles ( No draft docs PR was created. @KJ21-ENG, since no help site changes were required, there is no linked help site PR to review. If you believe this fix does change documented behavior, let me know and I'll draft the corresponding docs update. |
|
🚀 Deployed to production by https://github.com/yuwenmemon in version: 9.4.42-1 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
MoneyRequestViewhides its inline receipt while a wide RHP is open so the receipt is not duplicated next to the wide RHP's left receipt panel. That condition checkedwideRHPRouteKeys.length === 0, which is global: once any wide RHP registers, every mountedMoneyRequestViewhides its receipt — including instances on screens behind the RHP. After #95131, report hyperlinks can open a wide RHP over a central-pane expense view, so the background expense view loses its receipt box and its content shifts up (the regression from #95131 reported in the linked issue).This PR scopes the condition to the view's own screen: the receipt is hidden only when the view's
route.keyis registered inwideRHPRouteKeys(!wideRHPRouteKeys.includes(route.key)instead ofwideRHPRouteKeys.length === 0). TheMoneyRequestViewinside the wide RHP keeps hiding its inline receipt (the wide RHP's left panel shows it), while instances mounted on other screens — such as the central report pane behind the RHP — keep their inline receipt. The small-screen, review-duplicates, and merge-transaction short-circuits are unchanged.A unit test (
tests/ui/MoneyRequestViewReceiptTest.tsx) locks the behavior: it asserts the inline receipt stays visible on a background report screen while another screen owns the wide RHP (this assertion fails against the pre-fix global check), and that the view owning the wide RHP still hides its inline receipt.cc @blimpich
Fixed Issues
$ #96118
PROPOSAL: #96118 (comment)
Tests
Offline tests
This is a render-only condition fix in
MoneyRequestView; it does not alter optimistic data, queued requests, or API behavior. Offline check: with the network off, create/scan an expense so its transaction carries a pending receipt, then open a wide RHP over an unrelated report showing that pending receipt on a background screen. Verify the pending receipt stays visible on the background view with the correct grayed offline styling, and going back online settles without the receipt flashing or disappearing.QA Steps
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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.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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-07-15.at.1.19.39.PM-compressed.mp4