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
Report - Default rate still visible for some time after creating expense with different rate #98239
Version Number: 9.4.52-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:#97517 Email or phone of affected tester (no customers):ibellicotest+2766@gmail.com Issue reported by: Applause Internal Team Bug source: Exploratory - Significant User Experience Deterioration Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome App Component: Money Requests
Action Performed:
Prerequisite: Account has at least one workspace.
Prerequisite 2: At least one distance rate created apart from "Default"
Open the staging.new.expensify.com website.
Open any workspace chat.
Create a map distance expense with a rate different from default.
Once expense is created, open report quickly.
Note that while expense is still loading, "Default rate" is still visible on "Rate" field.
Note that after some time, rate changes to the selected one.
Expected Result:
Distance expense report should automatically display the selected rate.
Actual Result:
"Default Rate" is still visible on report for some time, after creating a map distance expense with a different 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 (App-side optimistic/loading-state display; self-corrects once the server response arrives) Causing PR: None confidently identified. The auto-assigned #97517 — "Optimistically add message for distance rate changes" by @Gonals — is exonerated (Low confidence it is the cause; see below). Related Issues: none
Recommendation: NEEDS INVESTIGATION
Reverting the auto-assigned PR #97517 would not fix this bug — it only touches the distance-rate edit flow, while this bug is in the map-distance creation/loading flow. The symptom is a transient, self-correcting display gap during the MapBox route-computation window, so if a fix is pursued it should be a targeted roll-forward in the create-time rate resolution, not a revert. Keeping DeployBlockerCash because this is a frontend bug and, per policy, the issue is not reproducible on production.
Assigned: none added — no causing PR reaches medium confidence, so no new contributors are assigned (the existing melvin auto-assignees remain). Labels: No changes. DeployBlockerCash kept (frontend bug, staging-only repro, must not be removed). No DeployBlocker (web) label is present.
Optimistically add message for distance rate changes #97517 modifies only four files, all in the edit path: src/libs/TransactionUtils/index.ts (getUpdatedTransaction + new hasLocallyKnownDistance) and src/libs/actions/IOU/UpdateMoneyRequest.ts (getUpdateMoneyRequestParams / getUpdateTrackExpenseParams), plus two test files.
Its behavior change: when a user edits the rate of an already-existing distance expense while waypoints are still pending, and the route distance is already known locally, it now builds an optimistic MODIFIED_EXPENSE message. This is the "change rate on an existing expense" flow.
The reported bug is the creation flow: "Create a map distance expense with a rate different from default … open report quickly … Default rate is visible while loading." Optimistically add message for distance rate changes #97517 touches neither MoneyRequestView (the Rate field renderer) nor the create-time optimistic transaction builder, so it cannot explain a wrong rate shown right after creation.
The bug reproduces on staging but not production, i.e. a regression in the 9.4.52 deploy, but the two distance PRs in that checklist — Optimistically add message for distance rate changes #97517 (edit flow) and Fix offline self-DM distance rate resolution #96903 "Fix offline self-DM distance rate resolution" (guarded by action === CONST.IOU.ACTION.SUBMIT, i.e. the self-DM move flow, and it adds rate propagation rather than removing it) — neither cleanly matches the "create a map distance expense in a workspace chat" repro path. Hence Low confidence in any specific causing PR.
Verification
Rate field is rendered by src/components/ReportActionItem/MoneyRequestView.tsx, which calls DistanceRequestUtils.getRate(...):
During the map-distance creation window the optimistic transaction has pendingFields.waypoints = ADD, amount = 0, and the route is still being computed by MapBox. getRate resolves the rate as:
When the selected rate cannot be resolved from the transaction/policy at that instant (customUnitRateID from getRateID(transaction) not yet populated on comment.customUnit.customUnitRateID, or the rate not yet present in the derived mileageRates), this expression falls back to defaultMileageRate, so the Rate field shows "Default rate". Once the server response finalizes the transaction (rate ID + route), getRate returns the selected rate and the field self-corrects. This is a transient optimistic-data gap in the create/loading window, not corrupted saved data — the persisted expense ends up with the correct rate.
Note for BugZero
Because the wrong value is shown only briefly during the route-loading window and auto-corrects (no data loss, correct rate is saved), this may be a DEMOTE candidate. Flagging rather than acting on it, since the label decision here is conservative: DeployBlockerCash stays until an owner confirms severity and the true optimistic-data gap.
changed the title [-]Report - Default rate still visible for some time after creating expense with different rate[/-][+][HOLD for #98194] Report - Default rate still visible for some time after creating expense with different rate[/+]on Aug 24, 2026
Title: prefixed with [HOLD for #98194] → now [HOLD for #98194] Report - Default rate still visible for some time after creating expense with different rate
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
changed the title [-][HOLD for #98194] Report - Default rate still visible for some time after creating expense with different rate[/-][+]Report - Default rate still visible for some time after creating expense with different rate[/+]on Sep 26, 2026
Title: removed the [HOLD for #98194] prefix. The title is now Report - Default rate still visible for some time after creating expense with different rate.
Activity
applause-bot commentedon Aug 11, 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/9cf6d69867c128e783e6208059524509e59d24bce52095bf13490a5a86924c35
melvin-bot commentedon Aug 11, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #97517
melvin-bot commentedon Aug 11, 2026
@Valforte @abdulrahuman5196 you have been assigned to this deploy blocker because you reviewed the offending PR: #97517
melvin-bot commentedon Aug 11, 2026
@Gonals you have been assigned to this deploy blocker because you authored the offending PR: #97517
melvin-bot commentedon Aug 11, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Aug 11, 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:
MelvinBot commentedon Aug 11, 2026
🔍 Investigation Summary
Classification: Frontend bug (App-side optimistic/loading-state display; self-corrects once the server response arrives)
Causing PR: None confidently identified. The auto-assigned #97517 — "Optimistically add message for distance rate changes" by @Gonals — is exonerated (Low confidence it is the cause; see below).
Related Issues: none
Recommendation: NEEDS INVESTIGATION
Reverting the auto-assigned PR #97517 would not fix this bug — it only touches the distance-rate edit flow, while this bug is in the map-distance creation/loading flow. The symptom is a transient, self-correcting display gap during the MapBox route-computation window, so if a fix is pursued it should be a targeted roll-forward in the create-time rate resolution, not a revert. Keeping
DeployBlockerCashbecause this is a frontend bug and, per policy, the issue is not reproducible on production.Assigned: none added — no causing PR reaches medium confidence, so no new contributors are assigned (the existing melvin auto-assignees remain).
Labels: No changes.
DeployBlockerCashkept (frontend bug, staging-only repro, must not be removed). NoDeployBlocker(web) label is present.📋 Detailed Analysis
Evidence — why #97517 is NOT the cause
src/libs/TransactionUtils/index.ts(getUpdatedTransaction+ newhasLocallyKnownDistance) andsrc/libs/actions/IOU/UpdateMoneyRequest.ts(getUpdateMoneyRequestParams/getUpdateTrackExpenseParams), plus two test files.MODIFIED_EXPENSEmessage. This is the "change rate on an existing expense" flow.MoneyRequestView(the Rate field renderer) nor the create-time optimistic transaction builder, so it cannot explain a wrong rate shown right after creation.action === CONST.IOU.ACTION.SUBMIT, i.e. the self-DM move flow, and it adds rate propagation rather than removing it) — neither cleanly matches the "create a map distance expense in a workspace chat" repro path. Hence Low confidence in any specific causing PR.Verification
src/components/ReportActionItem/MoneyRequestView.tsx, which callsDistanceRequestUtils.getRate(...):App/src/components/ReportActionItem/MoneyRequestView.tsx
Lines 587 to 601 in edc4aad
getRateinsrc/libs/DistanceRequestUtils.ts:App/src/libs/DistanceRequestUtils.ts
Lines 711 to 715 in edc4aad
TransactionUtils/index.tsgetUpdatedTransaction/hasLocallyKnownDistance,UpdateMoneyRequest.ts) are in the update path and are not on this render path.Root Cause
During the map-distance creation window the optimistic transaction has
pendingFields.waypoints = ADD,amount = 0, and the route is still being computed by MapBox.getRateresolves the rate as:(
App/src/libs/DistanceRequestUtils.ts
Lines 711 to 715 in edc4aad
When the selected rate cannot be resolved from the transaction/policy at that instant (
customUnitRateIDfromgetRateID(transaction)not yet populated oncomment.customUnit.customUnitRateID, or the rate not yet present in the derivedmileageRates), this expression falls back todefaultMileageRate, so the Rate field shows "Default rate". Once the server response finalizes the transaction (rate ID + route),getRatereturns the selected rate and the field self-corrects. This is a transient optimistic-data gap in the create/loading window, not corrupted saved data — the persisted expense ends up with the correct rate.Note for BugZero
Because the wrong value is shown only briefly during the route-loading window and auto-corrects (no data loss, correct rate is saved), this may be a DEMOTE candidate. Flagging rather than acting on it, since the label decision here is conservative:
DeployBlockerCashstays until an owner confirms severity and the true optimistic-data gap.20 remaining items
[-]Report - Default rate still visible for some time after creating expense with different rate[/-][+][HOLD for #98194] Report - Default rate still visible for some time after creating expense with different rate[/+]MelvinBot commentedon Aug 24, 2026
Done ✅
[HOLD for #98194]→ now[HOLD for #98194] Report - Default rate still visible for some time after creating expense with different rateDaily, addedWeeklyview run
melvin-bot commentedon Sep 16, 2026
This issue has not been updated in over 15 days. @Valforte, @Gonals, @abdulrahuman5196 eroding to Monthly issue.
P.S. Is everyone reading this sure this is really a near-term priority? Be brave: if you disagree, go ahead and close it out. If someone disagrees, they'll reopen it, and if they don't: one less thing to do!
abdulrahuman5196 commentedon Sep 26, 2026
@MelvinBot Remove the hold, the hold PR is merged
[-][HOLD for #98194] Report - Default rate still visible for some time after creating expense with different rate[/-][+]Report - Default rate still visible for some time after creating expense with different rate[/+]MelvinBot commentedon Sep 26, 2026
Done ✅ I removed the hold.
[HOLD for #98194]prefix. The title is nowReport - Default rate still visible for some time after creating expense with different rate.Monthlyand addedDaily.The fix for Distance - Rate is not selected when distance expense is created offline merged in Keep the selected distance rate on offline-created distance expenses on 2026-09-14. You can now retest this issue on staging to see if that PR fixed it too.
abdulrahuman5196 commentedon Sep 26, 2026
This is not repro anymore, we can close this issue
Screen.Recording.2026-09-26.at.12.03.47.PM.mov