fix: resolve distance expense creation error in DM after clearing cache#92755
Conversation
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 525e93d89c
ℹ️ 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".
| reimbursable, | ||
| transactionThreadReportID, | ||
| createdReportActionIDForThread, | ||
| payerAccountID, |
There was a problem hiding this comment.
Preserve the participant ID before sending payerAccountID
In the DM distance flow immediately after clearing cache, the distance pages pass the raw PERSONAL_DETAILS_LIST value into getMoneyRequestParticipantOptions; while that key is still undefined, getParticipantsOption() returns accountID: detail?.accountID even though the report participant had an ID. getMoneyRequestInformation() then computes Number(participant.accountID), so this new field is sent as NaN instead of the DM participant's account ID, leaving the backend without a usable account-based payer lookup in the cache-clear case this change is meant to fix.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
I don’t think this applies to the reported repro. After cache clear, OpenApp rehydrates the other DM participant with accountID; only login is missing.
Example:
{
"21129493": {
"accountID": 21129493,
"displayName": "+102"
}
}I also verified on staging that payerEmail is empty, payerAccountID is present, and the distance expense is created successfully.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-07-08.at.5.23.23.PM.movAndroid: mWeb ChromeScreen.Recording.2026-07-08.at.5.20.16.PM.moviOS: HybridAppScreen.Recording.2026-07-08.at.5.16.55.PM.movMacOS: Chrome / SafariScreen.Recording.2026-07-08.at.5.14.36.PM.mov |
|
@eh2077, Gentle bump. thanks. |
|
@eh2077, Friendly bump. thanks. |
|
🚧 JS00001 has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/JS00001 in version: 9.4.32-0 🚀
|
|
🤖 Help site review: no changes required. This PR is an internal resilience fix. It adds a There is no user-facing change here:
The help-site articles under @nabi-ebrahimi, if you believe this change does alter documented user-facing behavior, let me know and I'll draft the help-site update. |
|
🚀 Deployed to production by https://github.com/grgia in version: 9.4.32-3 🚀
Bundle Size Analysis (Sentry): |

Explanation of Change
This change lets distance requests carry the payer’s account ID alongside the payer’s email, so the backend can identify the correct payer even when email-based lookup is unavailable or unreliable. In practice, that makes distance request creation more resilient and helps ensure the request is attributed to the right person in more cases.
The front-end updates simply pass that additional identifier through the request payload, and the backend can then fall back to account-based lookup when email is not present.
Fixed Issues
$ #88235
PROPOSAL: #88235 (comment)
Tests
Offline tests
N/A
QA Steps
Same as Tests.
// TODO: These must be filled out, or the issue title must include "[No QA]."
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
Screen.Recording.2026-06-29.at.10.24.21.PM.mp4
Android: mWeb Chrome
Screen.Recording.2026-06-29.at.10.30.39.PM.mp4
iOS: Native
Screen.Recording.2026-06-29.at.9.56.28.PM.mp4
iOS: mWeb Safari
Screen.Recording.2026-06-29.at.9.32.59.PM.mp4
MacOS: Chrome / Safari
Screen.Recording.2026-06-29.at.9.29.47.PM.mov