[Payment due @ZhenjaHorbach] [No QA] Avoid building archived reports ID set in Search getSections pipeline - #94182
Conversation
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2026-06-22.16.36.35.movAndroid: mWeb Chrome2026-06-22.16.38.24.moviOS: HybridApp2026-06-22.16.36.35.moviOS: mWeb Safari2026-06-22.16.38.24.movMacOS: Chrome / Safari2026-06-22.16.33.14.mov |
|
🎯 @ZhenjaHorbach, thanks for reviewing and testing this PR! 🎉 A payment issue will be created for your review once this PR is deployed to production. If payment is not needed (e.g., regression PR review fix etc), react with 👎 to this comment to prevent the payment issue from being created. |
|
@sobitneupane 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!
|
|
🚧 @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.4.17-0 🚀
Bundle Size Analysis (Sentry): |
Help site review — no changes required ✅I reviewed the changes in this PR against Expensify's help site articles under Conclusion: No documentation updates are needed, so I did not create a draft PR. Why: This is a purely internal performance refactor of the Search There is no change to any user-facing behavior, feature name, tab, settings label, button, or workflow, and the PR is marked If a reviewer believes a specific user-facing behavior did change and should be documented, reply with |
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.4.17-3 🚀
|
|
🤖 Payment issue created: #94375 |
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.4.17-3 🚀
|
Explanation of Change
Removes
useArchivedReportsIDSet()from the SearchgetSectionspipeline (Search/index.tsxanduseSearchSections.ts).That hook subscribed to the entire
REPORT_NAME_VALUE_PAIRScollection and rebuilt aSetvia an O(n)Object.entriesscan over every RNVP on every collection change — for every search type — even thoughgetSectionsonly needs a single report's archived status, and only for task searches.Now the components pass the raw
reportNameValuePairscollection intogetSections/getTaskSections, which callsisArchivedReport(reportNameValuePairs?.[key])directly (O(1) lookup) where needed. Same data source and coverage as before; the eager Set construction is eliminated.Out of scope:
SearchWriteActionsProvider/canEditFieldOfMoneyRequeststill use the set (untouched).Fixed Issues
$ #94193
PROPOSAL:
Tests
Offline tests
N/A
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand notonIconClick)Avatar, 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