Repository navigation
perf: Keep WideRHP actions stable on row press - #104735
Conversation
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.
|
|
@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. |
|
@codex review |
|
Codex Review: Didn't find any major issues. Delightful! Reviewed commit: ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
If Codex has suggestions, it will comment; otherwise it will react with 👍. Codex can also answer questions or update the PR. Try commenting "@codex address that feedback". |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-10-23.at.21.57.09.movAndroid: mWeb ChromeScreen.Recording.2026-10-23.at.21.59.31.moviOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-10-23.at.21.55.47.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 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! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.5.21-0 🚀
|
|
No help site update needed. This PR is an internal performance refactor of how the side panel width is chosen. It adds no feature, renames nothing, and makes no sentence in |
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.5.23-0 🚀
|
|
No help site update needed. This PR is an internal performance refactor of how the side panel width is chosen, so it adds no feature and makes no sentence in |
|
🚀 Deployed to production by https://github.com/jasperhuangg in version: 9.5.23-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Pressing a report row in Search (or a report preview, a transaction-thread link, etc.) calls
markReportRHPWidthbefore navigating. The width hints lived inuseStateinsideWideRHPContextProvider, so every mark created newmarkReportRHPWidth/getReportRHPWidthHint/unmarkReportRHPWidthfunctions, and everyuseWideRHPActions()consumer re-rendered on each row press. Every list row is one of those consumers.This PR:
useRHPWidtheffects, and every caller marks the hint before navigating, so the target screen reads it when it mounts. The actions object now stays stable across row presses.report_collection (expenseReportSelector). It was only there to skip the'wide'hint for invoices and tasks.useRHPWidth, which now reads only the open report'stypethrough a newgetReportTypeselector. If the report hasn't loaded yet, the RHP corrects to narrow once its type arrives. Before, it stayed wide.Fixed Issues
$ #104742
PROPOSAL: N/A
Tests
main.Offline tests
Same as tests, while offline. Width hints are client-only, so no network is involved.
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