Conversation
…atchingItemsState
|
@codex review |
|
@MelvinBot review this PR |
|
Codex Review: Didn't find any major issues. Keep it up! ℹ️ 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". |
ReviewClean perf optimization — hoisting the 1. Trailing whitespace (line 960) There's a trailing space on this line (after the closing brace inside the reduce). May or may not trip the linter, but worth cleaning up. 2. Subtle behavior change in the early return The guard changed from |
There was a problem hiding this comment.
Pull request overview
This PR refactors the “select all” counting logic in the Search component to avoid recalculating the total number of selectable items inside updateSelectAllMatchingItemsState, aiming to reduce repeated work during selection updates.
Changes:
- Hoists
areItemsGroupedto a shared constant and computestotalSelectableItemsCountviauseMemo. - Updates
updateSelectAllMatchingItemsStateto use the memoized count and simplifies its dependency list. - Reuses
areItemsGroupedinsidetoggleAllTransactionsand adjusts hook dependencies accordingly.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
2b3cfa7 to
8ae6f9d
Compare
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari |
|
@codex review |
|
Codex Review: Didn't find any major issues. Chef's kiss. ℹ️ 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". |
Updated ReviewThe trailing whitespace issue from my previous review has been fixed. All CI checks pass. The change looks good — no further issues found. LGTM. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppScreen.Recording.2026-05-21.at.14.07.44.moviOS: mWeb SafariScreen.Recording.2026-05-21.at.14.06.48.movMacOS: Chrome / SafariScreen.Recording.2026-05-21.at.14.05.53.mov |
abzokhattab
left a comment
There was a problem hiding this comment.
The change is clean .. nice refactor .. didnt find any issues
|
Oh I was reviewing this as I was assigned as reviewer. Melvin unassigned me for some reason. |
|
🚧 @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.3.79-1 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes are required for this PR. This is a purely internal performance optimization — it hoists the |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.3.79-4 🚀
|
Explanation of Change
Previously,
updateSelectAllMatchingItemsStaterecomputedtotalSelectableItemsCounton every invocation by walking the entirefilteredDataarray (and reducing across every transaction inside each group) inline. Because the count only depends onfilteredDataand whether items are grouped, this work was redundant — it ran on every toggle, even when the underlying list hadn't changed.Fixed Issues
$ #91286
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-05-21.at.09.32.52.mov