Repository navigation
perf: Keep Search row selection actions stable - #104739
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
…w-selection # Conflicts: # src/components/Search/index.tsx
|
@hoangzinh 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] |
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeScreen.Recording.2026-10-23.at.18.49.18.moviOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-10-23.at.18.47.28.mov |
|
🚧 rlinoz 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/rlinoz in version: 9.5.20-0 🚀
|
|
No help site update is needed. This PR is a performance refactor that stops Search rows from re-rendering, and the PR states that selection and expense carousel behavior are unchanged. |
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.5.20-5 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Every Search row re-rendered whenever a report was opened, because two callbacks the rows depend on changed identity on every Onyx update.
SearchWriteActionsProviderhanded rows a new{toggle, toggleAll}context value each time, because both functions close over whole Onyx collections that change while a report opens. The value is now built from refs that are read at press time, so it never changes and rows stop re-rendering with it.SearchrebuiltseedCarouselForOpenedExpense, and with itonSelectRowand every row, whenever the carousel sibling IDs were recomputed. Those IDs are now read from a ref when the row is pressed.Behavior is unchanged: selection and the expense carousel still get the latest data at the moment the user acts.
Fixed Issues
$ #104742
PROPOSAL:
Tests
Offline tests
QA Steps
Same as tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, 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
🤖 Generated with Claude Code