Extract SelectionToolbar from MoneyRequestReportActionsList#87659
Extract SelectionToolbar from MoneyRequestReportActionsList#87659rlinoz merged 4 commits intoExpensify:mainfrom
Conversation
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…lbar # Conflicts: # src/components/MoneyRequestReportView/MoneyRequestReportActionsList.tsx
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@youssef-lr 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a547c1e78d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
@MelvinBot can you confirm all the removed logic in |
|
All removed logic from Minor stylistic differences (all non-breaking)
Items 1-4 relate to removing manual memoization, which is consistent with the PR description stating the code is "fully React Compiler compliant — no manual memoization added." |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppandroid.movAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb Safarimsafari.movMacOS: Chrome / Safariweb.mov |
Code ReviewThe extraction is clean and correct — no bugs, no unused imports, no type mismatches. A few observations: Medium: Low: Duplicate Onyx subscriptions Low: Nits (all consistent with "no manual memoization" approach)
All rely on the React Compiler for memoization — consistent with the PR's stated approach. Overall: well-scoped refactor with good perf wins. No blocking issues. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: a547c1e78d
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
Bug: Not able to select expenses after dismiss "Enjoying New Expensify" modal on iOS Steps to reproduce:
bug.mov |
|
I think this bug was introduced by this PR. Not able to reproduce on |
Screen.Recording.2026-04-14.at.12.41.58.mp4I couldn't reproduce this (though I synced with main before that) so it's not reproducible for me on this branch @aimane-chnaif |
|
I am not able to reproduce either. Blindly fixed elsewhere between yesterday and today? Screen.Recording.2026-04-14.at.12.45.17.pm.mov |
|
🚧 @rlinoz 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/rlinoz in version: 9.3.60-0 🚀
Bundle Size Analysis (Sentry): |
|
No help site changes needed — this PR is a purely internal refactoring (extracting |
@rlinoz
Explanation of Change
Extracted
SelectionToolbarinto a standalone self-subscribing component, removing it fromMoneyRequestReportActionsList.Previously, the toolbar's ~8 Onyx subscriptions (report, policy, chatReport, session, and related collections) lived inside the parent list component. Every Pusher event that updated any of those keys caused the entire parent + FlatList tree to re-render — including all visible report action rows. Moving the toolbar into its own component means those subscriptions are scoped to
SelectionToolbaronly. The parent now receivesreportID,transactions, andreportActionsas props and is otherwise unaffected by toolbar-related state updates.Parent reduced from 985 → 746 lines. Fully React Compiler compliant — no manual memoization added.
Input
Before: 3 trial(s) —
profiling-data.04-13-2026.15-39-01.json,profiling-data.04-13-2026.15-39-13.json,profiling-data.04-13-2026.15-39-27.jsonAfter: 4 trial(s) —
profiling-data.04-13-2026.15-31-10.json,profiling-data.04-13-2026.15-31-25.json,profiling-data.04-13-2026.15-31-37.json,profiling-data.04-13-2026.15-31-49.jsonSummary
Improved
Regressed
Fixed Issues
$ #87760
PROPOSAL:
Tests
Selection toolbar appears on mobile — Open report with expenses on narrow layout, long-press expense to enter selection mode. Toolbar shows with "Selected (1)" and dropdown.
Select All / Deselect All — Enter selection mode, tap "Select all". All non-pending-delete transactions selected. Tap again, all deselected.
Bulk delete with navigation — Select all expenses, delete. Confirm modal with correct count. If all deleted, navigates back to chat report.
Cross-report selection cleanup — Select expenses in Report A, navigate to Report B. Selection clears automatically.
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