Decompose ReportScreen core subcomponents#83560
Conversation
ReportFooter is the only consumer of isComposerFullSize. By owning the subscription internally, we remove two parent-level Onyx subscriptions (ReportScreen + MoneyRequestReportView), avoiding unnecessary re-renders of those heavy components when the composer size changes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
a63150d to
0c7fb17
Compare
Internalize policy, reportMetadata, and pendingAction into ReportFooter via useOnyx selectors and derivation from report, removing 3 props from the public interface. Remove manual memo() wrappers from ReportFooter, ReportScreen, and HeaderView — the React Compiler handles memoization. Also remove manual useCallback wrappers that the compiler auto-memoizes. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Replace grandParentReportActions full-collection subscription with useParentReportAction hook, add selector for account (guideDetails only), and add selector for reportMetadata (pendingChatMembers only). Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…e-renders The useLoadingBarVisibility hook subscribes to PERSISTED_REQUESTS without a selector, causing HeaderView to re-render on every queue mutation. By extracting LoadingBar into a dedicated child component and adding boolean selectors to the hook, queue processing no longer triggers re-renders of HeaderView's ~50 local variables and deeply nested JSX. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
… isolate queue re-renders Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
…der with selector Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
@shubham1206agra 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] |
|
Fixing the failing unit test suite |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@codex review |
|
Codex Review: Didn't find any major issues. 🚀 ℹ️ 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". |
|
Seeing some janky behaviour when closing an expense details page (timestamp 0:12 onwards). Screen.Recording.2026-02-27.at.3.08.51.AM.mov |
|
@ShridharGoel are you sure the same is not reproducible on |
|
Just tried, able to repro this on main as well |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-02-27.at.8.13.47.PM.movAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / SafariScreen.Recording.2026-02-27.at.8.07.49.PM.mov |
|
oki, I'm adding the tests as @mountiny asked for and we're good here |
|
Can you add the missing import in HeaderLoadingBar ? |
Move accountGuideDetailsSelector to Account.ts and reportMetadataSelector (renamed to pendingChatMembersSelector) to ReportMetaData.ts. Add unit tests for all new selectors including Network selectors. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
|
ah yes my bad, thanks for spotting this one! Adding now |
|
🚧 @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.3.28-0 🚀
|
|
🚀 Deployed to staging by https://github.com/rlinoz in version: 9.3.30-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.30-3 🚀
|

@mountiny @rlinoz
Explanation of Change
Removed all idle state renders on report headers (all variants). This happens every time the sequential queue runs.

Allowed the compiler to kick in, no passive effects and way less work (-150ms with ~15 more commits):

Fixed Issues
$ #77173
$ #84150
PROPOSAL:
Tests
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