Repository navigation
remove the last two report metadata Onyx fallbacks from the ReportUtils - #103434
Conversation
|
Codex usage limits have been reached for code reviews. Please check with the admins of this repo to increase the limits by adding credits. |
|
@DylanDylann 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] |
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
| }; | ||
|
|
||
| const pendingExpenseActionSelector = (reportMetadata: OnyxEntry<ReportMetadata>): OnyxEntry<ReportMetadata> => | ||
| reportMetadata ? {pendingExpenseAction: reportMetadata.pendingExpenseAction} : undefined; |
There was a problem hiding this comment.
Why do we need to put it into an object?
There was a problem hiding this comment.
I kept it as an object to limit the size of this change, switching to a scalar would mean over 100 call sites across the chain. Happy to do it in a follow-up PR if you'd prefer.
| // Passing reportMetadata as undefined is intentional, this fallback only runs when reportAttributes has not | ||
| // precomputed `requiresAttention` yet, and threading it here means a param on every shouldReportBeInOptionList caller. |
There was a problem hiding this comment.
@daledah Could you explain in more detail why we should pass undefined here?
There was a problem hiding this comment.
I looked into it again and you're right, this needs the real reportMetadata. Fixing it properly here would blow up the PR, so I'll do it in the next one.
For now I've brought back the fallback in getReasonAndReportActionThatRequiresAttention with a TODO, It'll be removed in that follow-up once every caller passes a real value.
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-10-15.at.11.14.23.mov |
|
No product review required. |
|
🚧 blimpich 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/blimpich in version: 9.5.15-1 🚀
|
|
No help site update is needed. This PR is an internal refactor that passes report metadata to |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.5.15-3 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
Fixed Issues
$ #66421
PROPOSAL:
Tests
Offline tests
Same as 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 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
MacOS: Chrome / Safari
Screen.Recording.2026-10-08.at.15.53.31.mov