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-10-28] Amount&Distance field not load after change workspace&reselect route when exclusion is enabled #103293
Version Number: 9.5.4-0 Reproducible in staging?: Yes Reproducible in production?: N/A - new feature, doesn't exist in prod If this was caught during regression testing, add the test name, ID and link from BrowserStack:#102258 Email or phone of affected tester (no customers):applausetester+ssndjois2jd1@applause.expensifail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Mac 26.5 / Chrome App Component: Money Requests
Action Performed:
Precondition:
Enable commuterExclusions beta.
Home address - East 45th Street, Los Angeles, CA, 90012, US
Create two workspaces - A and B.
For workspace A only,
Company address - 123 South Figueroa Street, Los Angeles, CA 90012
👋 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.
Root cause: The PR added a blanket !transaction?.isReusedRoute && guard to the route fetch condition in src/hooks/useFetchRoute.ts:44-48. That guard also blocks the refetch that gets the commute-exclusion result after you switch workspaces. Without that result, the confirmation page treats the route as pending forever, so Amount and Distance stay blank.
constisReusedRoute=!!transaction?.isReusedRoute;// A reused route has the server distance but no map geometry, so count its quantity as a route.consthasRoute=hasRouteTransactionUtils(transaction,isReusedRoute);
...
constshouldFetchRoute=isMapDistanceRequest&&// A reused route already has its distance; only the commute result for the current workspace may be missing.(isReusedRoute ? isCommuterExclusionPreviewStale : isRouteAbsentWithoutErrors||haveValidatedWaypointsChanged||isCommuterExclusionPreviewStale)&&!isLoadingRoute&&Object.keys(validatedWaypoints).length>1;
Investigation details
Picking a reused route clears the exclusion result.selectReusableRoute calls updateWaypoints, which clears routes and commuterExclusionPreview (Transaction.ts:488-495). It then sets isReusedRoute: true and the distance, but saved routes have no exclusion result.
No fetch can fix it.isCommuterExclusionPreviewStale exists for the "member has since switched workspace" case (useFetchRoute.ts:36-43). The new guard blocks it. It also needs hasRoute, and line 28 only checks map geometry, which is now cleared. That's why the fix passes isReusedRoute to hasRoute, which then counts the saved distance as a route.
Why the first selection loads (likely, not confirmed):selectReusableRoute writes in two steps. In between, isReusedRoute is false and routes is empty, so the map screen still mounted underneath can fire a fetch. If that fetch matches the confirmation workspace, the page loads. After switching "To" to workspace B and back, the workspaces no longer match, and the guard blocks recovery.
Before merging the fix:
Confirm whether the route response overwrites comment.customUnit.quantity. If it does, the reused distance is replaced with a freshly computed one for the same waypoints, which is probably fine.
Consider making selectReusableRoute a single Onyx merge to remove the in-between state.
Add a unit test: a draft with isReusedRoute: true, a quantity, no routes, a home-and-office workspace, and no matching result calls getRoute once with that workspace ID. With a matching result, it does not call getRoute.
Scope: The bug only affects workspaces with "Exclude usual commutes" enabled, which needs the commuterExclusions beta. The beta gate in the follow-up PR would limit exposure further.
Next Steps: Reply with @MelvinBot implement this to create a draft PR, or @MelvinBot <your feedback> to refine this analysis.
changed the title [-]Amount&Distance field not load after change workspace&reselect route when exclusion is enabled[/-][+][Due for payment 2026-10-28] Amount&Distance field not load after change workspace&reselect route when exclusion is enabled[/+]on Oct 21, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.15-3 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-10-28. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
applause-bot commentedon Oct 7, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/8e70a0edef4bbe7d1263cfa095aba1a14c0a2765c4024dabe9ff0166f4391852
melvin-bot commentedon Oct 7, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #102258
github-actions commentedon Oct 7, 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:
melvin-bot commentedon Oct 7, 2026
@Gonals @Pujan92 you have been assigned to this deploy blocker because you reviewed the offending PR: #102258
melvin-bot commentedon Oct 7, 2026
@ShridharGoel you have been assigned to this deploy blocker because you authored the offending PR: #102258
melvin-bot commentedon Oct 7, 2026
💬 A slack conversation has been started in #expensify-open-source
MelvinBot commentedon Oct 7, 2026
Deploy Blocker Analysis
Causing PR: [Payment due @Pujan92] Add Reuse route to the distance creation flow (medium-high confidence, from reading the code; not reproduced).
Root cause: The PR added a blanket
!transaction?.isReusedRoute &&guard to the route fetch condition insrc/hooks/useFetchRoute.ts:44-48. That guard also blocks the refetch that gets the commute-exclusion result after you switch workspaces. Without that result, the confirmation page treats the route as pending forever, so Amount and Distance stay blank.Recommendation: Roll forward with a small fix in
useFetchRoute.ts. Revert only if the fix can't be cherry-picked in time. The PR touches 39 files, and Fix map interaction, empty waypoint compaction and add reuse routes beta gate already builds on it.Investigation details
selectReusableRoutecallsupdateWaypoints, which clearsroutesandcommuterExclusionPreview(Transaction.ts:488-495). It then setsisReusedRoute: trueand the distance, but saved routes have no exclusion result.useDistanceRequestState.ts:119-127marks the route pending. Pending blanks the amount (useConfirmationAmount.ts:89-90) and hides the distance (DistanceConfirmationList.tsx:54).isCommuterExclusionPreviewStaleexists for the "member has since switched workspace" case (useFetchRoute.ts:36-43). The new guard blocks it. It also needshasRoute, and line 28 only checks map geometry, which is now cleared. That's why the fix passesisReusedRoutetohasRoute, which then counts the saved distance as a route.Why the first selection loads (likely, not confirmed):
selectReusableRoutewrites in two steps. In between,isReusedRouteis false androutesis empty, so the map screen still mounted underneath can fire a fetch. If that fetch matches the confirmation workspace, the page loads. After switching "To" to workspace B and back, the workspaces no longer match, and the guard blocks recovery.Before merging the fix:
comment.customUnit.quantity. If it does, the reused distance is replaced with a freshly computed one for the same waypoints, which is probably fine.selectReusableRoutea single Onyx merge to remove the in-between state.isReusedRoute: true, a quantity, no routes, a home-and-office workspace, and no matching result callsgetRouteonce with that workspace ID. With a matching result, it does not callgetRoute.Scope: The bug only affects workspaces with "Exclude usual commutes" enabled, which needs the
commuterExclusionsbeta. The beta gate in the follow-up PR would limit exposure further.Next Steps: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.view run
2 remaining items
melvin-bot commentedon Oct 12, 2026
@Pujan92, @Gonals, @ShridharGoel Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Oct 14, 2026
@Pujan92, @Gonals, @ShridharGoel 6 days overdue. This is scarier than being forced to listen to Vogon poetry!
Gonals commentedon Oct 15, 2026
@ShridharGoel, are you working on this?
ShridharGoel commentedon Oct 15, 2026
Yes this should be fixed by #103654
m-natarajan commentedon Oct 21, 2026
Not repro web Chrome v9.5.15-2
20261021_213157.mp4
[-]Amount&Distance field not load after change workspace&reselect route when exclusion is enabled[/-][+][Due for payment 2026-10-28] Amount&Distance field not load after change workspace&reselect route when exclusion is enabled[/+]melvin-bot commentedon Oct 21, 2026
@Pujan92
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.5.15-3 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-10-28. 🎊
The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ 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]. If no checklist is needed for this issue, you can click: [no checklist button]