perf: skip WideRHPReceiptPanel hooks on non-SEARCH_REPORT routes#88905
Conversation
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
|
@gijoe0295 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: HybridAppandroid.movAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb Safariios.movMacOS: Chrome / Safariweb.mov |
This comment was marked as resolved.
This comment was marked as resolved.
|
Are you able to reproduce this weird bug on native? Seems more liks FlashList issue. ios.movios-bug.movios-bug2.mov |
|
🤖 PR Review Overall: This looks good. The split into outer guard + inner gate is a clean way to avoid running expensive Onyx subscriptions and I verified that One minor nit (non-blocking): |
|
Codex Review: Didn't find any major issues. Already looking forward to the next diff. ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback". |
|
🚧 @mountiny 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/mountiny in version: 9.3.62-5 🚀
Bundle Size Analysis (Sentry): |
|
🤖 No help site changes required. This PR is an internal performance optimization only — it restructures |
|
This bug is now reported as deploy blocker |
|
🚀 Deployed to staging by https://github.com/mountiny in version: 9.3.64-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 No help site changes required. This PR is a purely internal performance optimization — it splits |
Explanation of Change
WideRHPReceiptPanelpreviously ranusePaginatedReportActions,useReportTransactionsCollection, threeuseOnyxcalls, anduseShowWideRHPVersionon everyReportScreenmount, then early-returnednullfor any route other thanSCREENS.RIGHT_MODAL.SEARCH_REPORT. That meant every Inbox /SCREENS.REPORTmount paid for collection subscriptions it never used — firing right aftershouldDeferNonEssentialsflipped and contributing to the ManualOpenReport Sentry metric tail.Split into an outer guard + inner gate:
WideRHPReceiptPanelchecksroute.name !== SCREENS.RIGHT_MODAL.SEARCH_REPORTand returnsnullbefore any hooks run.WideRHPReceiptPanelGateholds the existing implementation. The now-redundantroute.name === SCREENS.RIGHT_MODAL.SEARCH_REPORTclause is removed fromshouldShowWideRHPsince the outer guard guarantees it.Reliable before/after numbers are hard to get for this change — none of the accounts available for local profiling have report-action collections large enough for the saved subscriptions to dominate the post-defer commit. On accounts with smaller report histories the noise floor swallows the win.
Fixed Issues
$ #88912
PROPOSAL:
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari