refactor: ReportField reads transaction via selector#92230
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
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". |
|
@ShridharGoel 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] |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeScreen.Recording.2026-06-03.at.3.13.32.AM.moviOS: HybridAppiOS: mWeb SafariScreen.Recording.2026-06-03.at.3.28.07.AM.movMacOS: Chrome / SafariScreen.Recording.2026-06-03.at.3.06.54.AM.mov |
JmillsExpensify
left a comment
There was a problem hiding this comment.
No product review required.
cristipaval
left a comment
There was a problem hiding this comment.
Thanks! On you now, @Julesssss
|
🚧 @Julesssss 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/Julesssss in version: 9.3.99-0 🚀
Bundle Size Analysis (Sentry): |
|
🤖 Help site review: no changes required. This PR is a pure internal refactor with no user-facing behavior changes, so nothing under Why no docs changes are neededThe change only alters how
This is a rendering/architecture optimization (fewer re-renders, narrower Onyx subscriptions). No UI labels, tabs, buttons, fields, or flows changed — the Report field on the expense confirmation screen behaves identically. Help articles document customer-facing features and behavior, none of which are affected here. A search of @OlimpiaZurek, please confirm you agree no help site changes are needed for this refactor. If you believe a user-facing behavior did change and docs should be updated, let me know and I'll create the draft PR. |
|
This PR failing because of the issue #92696 |
|
I don't think the linked issue is related to this PR, which was merged a few hours ago. I can reproduce this locally even though I pulled 2 days ago. |
|
🚀 Deployed to production by https://github.com/lakchote in version: 9.3.99-9 🚀
|
Explanation of Change
ReportFieldaccepted the fulltransactionas a prop drilled through 4 layers (SettingsFields→ConfirmationFieldList→ footer → caller) but only uses 3 scalars:reportID,participants[0].reportID,isFromGlobalCreate.This migrates it to self-resolve via
useTransactionSelectorwithreportFieldTransactionStateSelector(extended to exposeparticipantReportID). Drops thetransactionprop fromReportField,SettingsFields, and theConfirmationFieldList → SettingsFieldspass-down. The slice is referentially stable, soReportFieldonly re-renders when one of the three scalars changes.Fixed Issues
$ #90385
PROPOSAL:
Tests
Offline tests
QA Steps
// TODO: These must be filled out, or the issue title must include "[No QA]."
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