refactor getReportPreviewMessage and getIOUReportActionDisplayMessage to use data from useOnyx - #96906
refactor getReportPreviewMessage and getIOUReportActionDisplayMessage to use data from useOnyx#96906daledah wants to merge 16 commits into
Conversation
… to use data from useOnyx
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@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] |
JmillsExpensify
left a comment
There was a problem hiding this comment.
No product review required.
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: b2d7890e90
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
@DylanDylann i updated |
|
|
||
| if (isSentMoneyReportAction(reportAction)) { | ||
| return getIOUReportActionDisplayMessage(translate, reportAction as ReportAction, convertToDisplayString, linkedTransaction); | ||
| return getIOUReportActionDisplayMessage(translate, reportAction as ReportAction, convertToDisplayString, undefined, linkedTransaction); |
There was a problem hiding this comment.
Why do you pass undefined here?
There was a problem hiding this comment.
@DylanDylann In the old code the policy was resolved from allPolicies using report?.policyID, where report is a parameter of getIOUReportActionDisplayMessage itself - and this call site never passed it . So reportPolicy was already always undefined on this path and the last-4-digits fallback always returned ''.
|
@daledah Please avoid passing a big object when we only use part of the data. In this case, passing policy looks redundant in some cases, bcz we only use olicy?.achAccount?.accountNumber. Let's minimize them |
i updated The remaining policy param is in |
|
@daledah Please resolve conflict |
Reviewer Checklist
Screenshots/VideosScreen.Recording.2026-08-11.at.14.56.09.mov |
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 0b684cca59
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
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".
|
@MelvinBot Could you verify this comment?? I think both |
|
@DylanDylann i addressed all comments, please check again |
|
@codex review |
|
Codex Review: Didn't find any major issues. Nice work! Reviewed commit: ℹ️ 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". |
|
@daledah Failed typecheck |
Explanation of Change
Fixed Issues
$ #66415
PROPOSAL:
Tests
approvedapproved).Offline tests
Same as 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
Screen.Recording.2026-07-24.at.03.45.06.mov