You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-05-20] [Due for payment 2026-05-18] [$250] Distance - Map receipt preview changes to placeholder after changing distance rate #90057
Version Number: 9.3.69-0 Reproducible in staging?: Yes Reproducible in production?: No If this was caught during regression testing, add the test name, ID and link from BrowserStack:#89858 Email or phone of affected tester (no customers):josdjnosdjionjsdonjisod@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.2 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Enable Distance rates in workspace settings.
Have at least two distance rates.
Go to staging.new.expensify.com
Go to workspace chat.
Create a distance expense.
Open the expense.
Click Rate.
Select another rate.
Expected Result:
New map receipt will be generated after changing distance rate.
Actual Result:
Map receipt preview changes to placeholder after changing distance rate.
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
Identify the pull request that introduced this issue and revert it.
Classification: Frontend bug Causing PR: #89858 - "fixed manual distance tab blockers" by @mukhrr (High confidence) Related Issues: #83781 (original issue PR #89858 was fixing)
Recommendation: REVERT
PR #89858 introduced a regression where changing a distance rate clears the route coordinates and then renders ConfirmedRoute with requireRouteToDisplayMap={true}, causing the map to fall back to PendingMapView (the placeholder) instead of showing the map receipt.
Assigned: @mukhrr (PR author), @aimane-chnaif (approving reviewer), @youssef-lr (approving reviewer) from PR #89858 Labels: DeployBlockerCash kept (frontend App PR caused the bug), DeployBlocker kept (both labels were already present — not removing either until root cause is fully confirmed on both sides)
The bug is staging-only (not reproducible in production), matching the fact that PR fixed manual distance tab blockers #89858 is in the staging deploy but not yet in production
PR fixed manual distance tab blockers #89858 directly modifies src/libs/actions/IOU/UpdateMoneyRequest.ts and src/components/ReportActionItem/ReportActionItemImage.tsx, which are the exact files involved in the rate-change receipt flow
Verification
Affected files: src/libs/actions/IOU/UpdateMoneyRequest.ts and src/components/ReportActionItem/ReportActionItemImage.tsx
PR #89858 introduced two changes that combine to produce the placeholder:
Route clearing on rate change (UpdateMoneyRequest.ts): The PR added shouldClearRoutes = (hasWaypointAddressesChanged || hasModifiedDistanceRate) && !hasValidOptimisticRoute. When the user selects a new distance rate, hasModifiedDistanceRate = true and hasValidOptimisticRoute = false (no new route was calculated — only the rate changed). As a result, on API success, routes: null is written to Onyx, clearing the route coordinates.
Forced ConfirmedRoute rendering while coordinates are gone (ReportActionItemImage.tsx): The PR added hasPendingReceiptRegeneration which checks pendingFields.merchant or pendingFields.customUnitRateID. When a rate change is pending, showMapAsImage = true, which renders ConfirmedRoute with requireRouteToDisplayMap={true}. However, because step 1 already cleared routes: null, ConfirmedRoute has no coordinates (hasCoordinates = false), so shouldDisplayMap = false and it falls through to PendingMapView — the placeholder.
The combination means: rate change → clears route → pending flag shows ConfirmedRoute → no coordinates → placeholder shown, persisting until the Pusher push delivers a fresh receipt (which may be delayed or missed).
A targeted fix would be to not clear routes on a pure rate change (since the route geometry does not change when only the rate changes — only the amount changes). Alternatively, shouldClearRoutes should exclude hasModifiedDistanceRate from triggering route clearing, since rate-only changes do not require a new map to be generated.
Once pendingFields are cleared, hasPendingReceiptRegeneration becomes false, so the component stops rendering ConfirmedRoute (the live map) and falls through to the static receipt.source URL. But the server has already invalidated the old receipt URL (it now 404s) and the new URL hasn't arrived via Pusher yet — so a placeholder is shown.
This was introduced in PR #89858 which added hasModifiedDistanceRate to the shouldClearRoutes condition.
What changes do you think we should make in order to solve the problem?
When only the rate changes, the route geometry (waypoints, path coordinates) is unchanged — only the receipt image needs server-side regeneration. Clearing routes is unnecessary for rate-only changes and creates the gap where neither the map component nor the receipt image can display. The Pusher push will deliver the updated receipt.source when ready, at which point pendingFields are already clear and the static image path renders correctly.
What alternative solutions did you explore? (Optional)
An alternative is to keep pendingFields.merchant set through the success callback (not clearing it until the Pusher push arrives with the new receipt URL). This would keep hasPendingReceiptRegeneration true and ConfirmedRoute rendering. However, this is riskier — if the Pusher push is missed or delayed, the pending flag would persist indefinitely, leaving the receipt stuck on the live map view instead of switching to the static image. The current approach of clearing merchant in successData (line 1004-1005) is the safer fallback pattern. The simpler fix of just not clearing routes for rate changes avoids this tradeoff entirely.
Next Steps for Contributor+ team: Reply with @MelvinBot implement this to create a draft PR, @MelvinBot <your feedback> to refine this analysis, or explain why you are rejecting Melvin's proposal.
changed the title [-][$250] Distance - Map receipt preview changes to placeholder after changing distance rate[/-][+][Due for payment 2026-05-18] [$250] Distance - Map receipt preview changes to placeholder after changing distance rate[/+]on May 11, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.69-18 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@aimane-chnaif The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
changed the title [-][Due for payment 2026-05-18] [$250] Distance - Map receipt preview changes to placeholder after changing distance rate[/-][+][Due for payment 2026-05-20] [Due for payment 2026-05-18] [$250] Distance - Map receipt preview changes to placeholder after changing distance rate[/+]on May 13, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.72-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@aimane-chnaif The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
Activity
melvin-bot commentedon May 8, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #89858
melvin-bot commentedon May 8, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 8, 2026
👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:
OSBotify commentedon May 8, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #89858 - "fixed manual distance tab blockers" by @mukhrr (High confidence)
Related Issues: #83781 (original issue PR #89858 was fixing)
Recommendation: REVERT
PR #89858 introduced a regression where changing a distance rate clears the route coordinates and then renders
ConfirmedRoutewithrequireRouteToDisplayMap={true}, causing the map to fall back toPendingMapView(the placeholder) instead of showing the map receipt.Assigned: @mukhrr (PR author), @aimane-chnaif (approving reviewer), @youssef-lr (approving reviewer) from PR #89858
Labels:
DeployBlockerCashkept (frontend App PR caused the bug),DeployBlockerkept (both labels were already present — not removing either until root cause is fully confirmed on both sides)Detailed Analysis
Evidence
src/libs/actions/IOU/UpdateMoneyRequest.tsandsrc/components/ReportActionItem/ReportActionItemImage.tsx, which are the exact files involved in the rate-change receipt flowVerification
src/libs/actions/IOU/UpdateMoneyRequest.tsandsrc/components/ReportActionItem/ReportActionItemImage.tsxRoot Cause
PR #89858 introduced two changes that combine to produce the placeholder:
Route clearing on rate change (
UpdateMoneyRequest.ts): The PR addedshouldClearRoutes = (hasWaypointAddressesChanged || hasModifiedDistanceRate) && !hasValidOptimisticRoute. When the user selects a new distance rate,hasModifiedDistanceRate = trueandhasValidOptimisticRoute = false(no new route was calculated — only the rate changed). As a result, on API success,routes: nullis written to Onyx, clearing the route coordinates.Forced ConfirmedRoute rendering while coordinates are gone (
ReportActionItemImage.tsx): The PR addedhasPendingReceiptRegenerationwhich checkspendingFields.merchantorpendingFields.customUnitRateID. When a rate change is pending,showMapAsImage = true, which rendersConfirmedRoutewithrequireRouteToDisplayMap={true}. However, because step 1 already clearedroutes: null,ConfirmedRoutehas no coordinates (hasCoordinates = false), soshouldDisplayMap = falseand it falls through toPendingMapView— the placeholder.The combination means: rate change → clears route → pending flag shows ConfirmedRoute → no coordinates → placeholder shown, persisting until the Pusher push delivers a fresh receipt (which may be delayed or missed).
A targeted fix would be to not clear routes on a pure rate change (since the route geometry does not change when only the rate changes — only the amount changes). Alternatively,
shouldClearRoutesshould excludehasModifiedDistanceRatefrom triggering route clearing, since rate-only changes do not require a new map to be generated.MelvinBot commentedon May 8, 2026
Proposal
What is the root cause of that problem?
When a distance rate is changed, the
successDatahandler simultaneously clearspendingFieldsand setsroutestonull:Once
pendingFieldsare cleared,hasPendingReceiptRegenerationbecomesfalse, so the component stops renderingConfirmedRoute(the live map) and falls through to the staticreceipt.sourceURL. But the server has already invalidated the old receipt URL (it now 404s) and the new URL hasn't arrived via Pusher yet — so a placeholder is shown.This was introduced in PR #89858 which added
hasModifiedDistanceRateto theshouldClearRoutescondition.What changes do you think we should make in order to solve the problem?
Remove
hasModifiedDistanceRatefrom theshouldClearRoutescondition atUpdateMoneyRequest.ts:1316:When only the rate changes, the route geometry (waypoints, path coordinates) is unchanged — only the receipt image needs server-side regeneration. Clearing routes is unnecessary for rate-only changes and creates the gap where neither the map component nor the receipt image can display. The Pusher push will deliver the updated
receipt.sourcewhen ready, at which pointpendingFieldsare already clear and the static image path renders correctly.What alternative solutions did you explore? (Optional)
An alternative is to keep
pendingFields.merchantset through the success callback (not clearing it until the Pusher push arrives with the new receipt URL). This would keephasPendingReceiptRegenerationtrue andConfirmedRouterendering. However, this is riskier — if the Pusher push is missed or delayed, the pending flag would persist indefinitely, leaving the receipt stuck on the live map view instead of switching to the static image. The current approach of clearingmerchantinsuccessData(line 1004-1005) is the safer fallback pattern. The simpler fix of just not clearing routes for rate changes avoids this tradeoff entirely.Next Steps for Contributor+ team: Reply with
@MelvinBot implement thisto create a draft PR,@MelvinBot <your feedback>to refine this analysis, or explain why you are rejecting Melvin's proposal.6 remaining items
melvin-bot commentedon May 11, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022053963800901760991
Beamanator commentedon May 11, 2026
PR merged, working on a CP
Beamanator commentedon May 11, 2026
Looks like this is working well in latest staging!
Screen.Recording.2026-05-11.at.5.21.27.PM.mov
[-][$250] Distance - Map receipt preview changes to placeholder after changing distance rate[/-][+][Due for payment 2026-05-18] [$250] Distance - Map receipt preview changes to placeholder after changing distance rate[/+]melvin-bot commentedon May 11, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.69-18 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-05-18. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 11, 2026
@aimane-chnaif The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]
[-][Due for payment 2026-05-18] [$250] Distance - Map receipt preview changes to placeholder after changing distance rate[/-][+][Due for payment 2026-05-20] [Due for payment 2026-05-18] [$250] Distance - Map receipt preview changes to placeholder after changing distance rate[/+]melvin-bot commentedon May 13, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.3.72-1 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
If no regressions arise, payment will be issued on 2026-05-20. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon May 13, 2026
@aimane-chnaif The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]