[CP Staging] Show rate name on merge confirmation page for distance expenses#84247
[CP Staging] Show rate name on merge confirmation page for distance expenses#84247Beamanator merged 1 commit intomainfrom
Conversation
…istance expenses When merging workspace distance expenses, the merge confirmation page was unconditionally overriding the rate display with the rate value parsed from the merchant string. This happened because a pre-existing workaround (from PR #71675) assumed that policy rate data was not available in the merge flow. Since the merge flow now properly preserves customUnit data (including customUnitRateID), getRate() can resolve the rate name from the policy. The override is now conditional, only falling back to getRateFromMerchant() when rateName is unavailable (P2P expenses). Co-authored-by: Mohammad Luthfi Fathur Rahman <mollfpr@users.noreply.github.com>
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
🚧 @mollfpr has triggered a test Expensify/App build. You can view the workflow run here. |
This comment has been minimized.
This comment has been minimized.
|
Test looks good! |
|
@mjasikowski 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 ChromeiOS: HybridAppiOS: mWeb Safari |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: aed7d38430
ℹ️ 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".
|
🚧 @Beamanator 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. |
…isplay [CP Staging] Show rate name on merge confirmation page for distance expenses (cherry picked from commit 8e54216) (cherry-picked to staging by blimpich)
|
🚀 Cherry-picked to staging by https://github.com/blimpich in version: 9.3.31-11 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/blimpich in version: 9.3.31-12 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.31-12 🚀
|
|
🚀 Cherry-picked to staging by https://github.com/blimpich in version: 9.3.32-0 🚀
|
|
🚀 Deployed to production by https://github.com/blimpich in version: 9.3.32-3 🚀
|


Explanation of Change
When merging workspace distance expenses, the merge confirmation page was showing the rate value (e.g., "$0.67 / mi") instead of the rate name (e.g., "Default Rate"). This happened because in
MoneyRequestView.tsx, an unconditional override (from PR #71675) was discarding the correctly computed rate name and replacing it with the rate value parsed from the merchant string.The fix makes this override conditional: it now only falls back to
getRateFromMerchant()whenrateNameis unavailable (i.e., for P2P expenses that don't have rate names). For workspace expenses wheregetRate()successfully resolves the rate name from the policy, the correctly computed value fromgetRateForExpenseDisplay()is preserved.Fixed Issues
$ #84181
PROPOSAL: #84181 (comment)
Tests
Offline tests
N/A — this is a display-only change that uses data already available locally. The merge confirmation page renders from local Onyx data.
QA Steps
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
Screen.Recording.Mar.5.2026.mp4