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-06-24] Distance - Rate change tooltip shows up when destination is a different workspace #93515
Version Number: 9.4.7-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:#93103 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:
Log in with Expensifail account.
Enable Distance rates.
Create the following distance rates:
Rate A: $0.67/mi, valid Jan 1 2025 - Dec 31 2025
Rate B: $0.70/mi, valid Jan 1 2026 - Dec 31 2026
Go to staging.new.expensify.com
Go to self DM.
Create a distance expense with date in 2025.
Click Submit it to someone.
Select a non-default workspace (create one if there is only one workspace).
Expected Result:
Rate change tooltip will not show up when destination is a different workspace.
Actual Result:
Rate change tooltip shows up when destination is a different workspace. The rate itself is invalid for that workspace.
👋 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.
Please re-state the problem that we are trying to solve in this issue.
When a distance expense is created in the Self DM with a 2025 date and then submitted to a different (non-default) workspace, the "We updated the rate based on your travel date" tooltip incorrectly appears on the Rate field — even though the selected rate is invalid for that workspace and no date-driven rate update happened there.
What is the root cause of that problem?
The tooltip is driven by a rateAutoUpdated flag stored on the transaction draft:
In the Self DM (track expense) flow, setting the date to 2025 auto-selects Rate A and sets rateAutoUpdated: true. When the expense is then submitted to a different workspace, the policy-change effect in DistanceRequestController.tsx runs. If the rate is invalid for the new workspace, it hits the error branch DistanceRequestController.tsx:110 (setFormError) and never clears rateAutoUpdated. The stale flag from the Self-DM context persists, so the tooltip shows alongside an invalid-rate error.
Why the other branches don't hit this
The matching-rate branch DistanceRequestController.tsx:104 calls setCustomUnitRateID(...) without the rateAutoUpdated arg, so it resets to false (default param) — no bug there.
The clear-error early-return branch DistanceRequestController.tsx:96-99 also leaves the flag untouched (stale-true is possible if the same rate ID exists across workspaces, but the primary repro is the invalid-rate path).
The date-aware auto-select effect DistanceRequestController.tsx:167-202 only runs when customUnitRateID is -1/FAKE_P2P_ID, so it doesn't recompute the flag here.
What changes do you think we should make in order to solve the problem?
Reset rateAutoUpdated to false whenever the workspace/policy changes, since the "updated based on your travel date" determination was made in a different policy's rate context and is no longer meaningful. The cleanest place is the policy-change effect in DistanceRequestController.tsx: in the clear-error and setFormError branches, clear the flag (e.g. via Onyx.merge on the transaction draft, or a small helper) so it's only ever true when this policy's rate genuinely auto-updated due to a date change.
A minimal mitigation (alone or in addition) is to also gate the tooltip on the absence of a rate error so it can never show on an invalid rate — e.g. in RateField.tsx:68 pass !!shouldShowRateAutoUpdatedTooltip && !shouldDisplayDistanceRateError. This directly covers the reported repro (rate is invalid for the new workspace) but doesn't clear the stale flag, so the policy-change reset is the more complete fix.
What alternative solutions did you explore?
Resetting the flag in the submission/participant-selection path (useParticipantSubmission.ts) — those setCustomUnitRateID calls already default rateAutoUpdated to false, so the leak is specifically in the confirmation-page policy-change effect, which is why that's the recommended target.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/93515) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
changed the title [-]Distance - Rate change tooltip shows up when destination is a different workspace[/-][+][Due for payment 2026-06-24] Distance - Rate change tooltip shows up when destination is a different workspace[/+]on Jun 17, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.9-0 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@Krishna2323 / @thelullabyy 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]. If no checklist is needed for this issue, you can click: [no checklist button]
Activity
applause-bot commentedon Jun 13, 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/3dc8d89d14617395241d6fe432fde6375ae01d17444ca970ad1a4db766335749
melvin-bot commentedon Jun 13, 2026
@rlinoz recently merged #93103, but they are OOO right now, so I'll auto-assign someone else.
melvin-bot commentedon Jun 13, 2026
Triggered auto assignment to @chiragsalian (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Jun 13, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 13, 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 Jun 13, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
When a distance expense is created in the Self DM with a 2025 date and then submitted to a different (non-default) workspace, the "We updated the rate based on your travel date" tooltip incorrectly appears on the Rate field — even though the selected rate is invalid for that workspace and no date-driven rate update happened there.
What is the root cause of that problem?
The tooltip is driven by a
rateAutoUpdatedflag stored on the transaction draft:MoneyRequestConfirmationList.tsx:259That flag is set to
truewhen the date changes and the date-aware rate selection picks a different rate, inIOURequestStepDate.tsx:138:In the Self DM (track expense) flow, setting the date to 2025 auto-selects Rate A and sets
rateAutoUpdated: true. When the expense is then submitted to a different workspace, the policy-change effect inDistanceRequestController.tsxruns. If the rate is invalid for the new workspace, it hits the error branchDistanceRequestController.tsx:110(setFormError) and never clearsrateAutoUpdated. The stale flag from the Self-DM context persists, so the tooltip shows alongside an invalid-rate error.Why the other branches don't hit this
DistanceRequestController.tsx:104callssetCustomUnitRateID(...)without therateAutoUpdatedarg, so it resets tofalse(default param) — no bug there.DistanceRequestController.tsx:96-99also leaves the flag untouched (stale-true is possible if the same rate ID exists across workspaces, but the primary repro is the invalid-rate path).DistanceRequestController.tsx:167-202only runs whencustomUnitRateIDis-1/FAKE_P2P_ID, so it doesn't recompute the flag here.What changes do you think we should make in order to solve the problem?
Reset
rateAutoUpdatedtofalsewhenever the workspace/policy changes, since the "updated based on your travel date" determination was made in a different policy's rate context and is no longer meaningful. The cleanest place is the policy-change effect inDistanceRequestController.tsx: in the clear-error andsetFormErrorbranches, clear the flag (e.g. viaOnyx.mergeon the transaction draft, or a small helper) so it's only ever true when this policy's rate genuinely auto-updated due to a date change.A minimal mitigation (alone or in addition) is to also gate the tooltip on the absence of a rate error so it can never show on an invalid rate — e.g. in
RateField.tsx:68pass!!shouldShowRateAutoUpdatedTooltip && !shouldDisplayDistanceRateError. This directly covers the reported repro (rate is invalid for the new workspace) but doesn't clear the stale flag, so the policy-change reset is the more complete fix.What alternative solutions did you explore?
Resetting the flag in the submission/participant-selection path (
useParticipantSubmission.ts) — thosesetCustomUnitRateIDcalls already defaultrateAutoUpdatedtofalse, so the leak is specifically in the confirmation-page policy-change effect, which is why that's the recommended target.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/93515)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
melvin-bot commentedon Jun 13, 2026
If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.
If a regression has occurred and you are the assigned CM follow the instructions here.
If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.
2 remaining items
rlinoz commentedon Jun 15, 2026
Behind a beta
[-]Distance - Rate change tooltip shows up when destination is a different workspace[/-][+][Due for payment 2026-06-24] Distance - Rate change tooltip shows up when destination is a different workspace[/+]melvin-bot commentedon Jun 17, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 17, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.9-0 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-06-24. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 17, 2026
@Krishna2323 / @thelullabyy 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]. If no checklist is needed for this issue, you can click: [no checklist button]
rlinoz commentedon Jun 17, 2026
This was a regression we can close this one.