Repository navigation
[No QA] Avoid building archived reports ID set in room/task selector pages - #94283
Conversation
…rchived-set-in-selector-pages
|
@ZhenjaHorbach 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❌ 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.
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridApp2026-06-23.15.04.14.movAndroid: mWeb Chrome2026-06-23.15.03.30.moviOS: HybridApp2026-06-23.15.04.14.moviOS: mWeb Safari2026-06-23.15.03.30.movMacOS: Chrome / Safari2026-06-23.14.57.24.mov |
|
🚧 @mountiny 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/mountiny in version: 9.4.18-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 No help site changes required. I reviewed the changes in this PR and no updates are needed to Expensify's help site files under Why: This is a purely internal performance refactor. It replaces the There are no user-facing changes — no new or renamed features, tabs, settings, labels, or buttons, and no change to how archived rooms/tasks are surfaced to users. The help site documents user-facing product behavior, which this PR does not alter, so no draft PR was created. |
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.4.18-2 🚀
|
Explanation of Change
useArchivedReportsIDSet()builds a fullSet<string>by iterating every entry in theREPORT_NAME_VALUE_PAIRScollection just to answer "is this one report archived?" for a handful of items in a selector/filter page. Two pages used this pattern:WorkspaceRoomsPage— filters the room list viapolicyChatRoomsSelectorTaskShareDestinationSelectorModal— filters candidate destinations viareportFilterBoth pages now subscribe directly to the
REPORT_NAME_VALUE_PAIRSOnyx collection and callisArchivedReport(reportNameValuePairs?.[reportID])per-report instead of building the intermediate set.policyChatRoomsSelectorinsrc/selectors/Report.tswas updated to acceptOnyxCollection<ReportNameValuePairs>to match.The behavior is identical:
set.has(key)andisArchivedReport(collection[key])read from the same underlying data. This follows the same pattern introduced in PR #94185 forcanEditFieldOfMoneyRequest.Fixed Issues
$ #94291
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