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 - Inconsistent behavior when saving distance in Map and Manual tab #90083
Version Number: 9.3.69-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:#89858 Email or phone of affected tester (no customers):isjndoijsdoosdoi@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:
Go to staging.new.expensify.com
Go to workspace chat.
Create a map distance expense.
Open the expense.
Click Distance.
Change the waypoint in Map tab. Do not save it yet.
Go to Manual tab, edit the distance too and save it.
Open Distance field.
→ Both changes in Map and Manual tab from Step 6 and 7 are saved.
Go to Manual tab and edit the distance. Do not save it yet.
Go to Map tab, change the waypoint and save it.
Open Distance field.
→ Only the changes in Map tab from Step 9 are saved.
Expected Result:
In Step 8 and 10, when both Map and Manual distance are edited, app should save both changes or save the changes on the currently opened tab.
Actual Result:
In Step 8, when both Map and Manual distance are edited and user saves on Manual tab, both changes in Map and Manual tab from Step 6 and 7 are saved.
In Step 10, when both Map and Manual distance are edited and user saves on Map tab, only the changes in Map tab in Step 9 are saved.
👋 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.
The two tabs store their edits asymmetrically. The Map tab writes waypoint changes directly into the shared Onyx transaction object immediately when the user drags/edits a waypoint (no save required). The Manual tab stores its distance value only in a local React ref (manualNumberFormRef) that is invisible to any other code path until the Manual tab's own save runs.
This causes:
Scenario 1 (Map edit → Manual save → both saved):submitManualDistancereads waypoints from Onyx, which already contains the unsaved Map edits, so it sends both the manual distance and the updated waypoints to updateMoneyRequestDistance.
Scenario 2 (Manual edit → Map save → manual changes lost):submitWaypoints calls updateMoneyRequestDistancewithout a distance parameter because it has no access to manualNumberFormRef. The manual distance is silently dropped.
What changes do you think we should make in order to solve the problem?
Make submitWaypoints also read and include the manual distance when saving, so both tabs' edits are always persisted regardless of which tab triggers the save.
In submitWaypoints, read manualNumberFormRef.current?.getNumber() and, if it differs from the current transaction distance, pass it as the distance parameter to updateMoneyRequestDistance. This mirrors what submitManualDistance already does for waypoints (checking haveWaypointsChanged at line 623).
What alternative solutions did you explore?
Persist manual distance to Onyx as a draft field — would make both save paths symmetrical, but adds complexity to the data model for a problem that can be solved locally in the component.
Reset unsaved state when switching tabs — would prevent cross-tab leaking entirely, but is a worse UX since users would lose their work when switching tabs.
Related issues
Expensify/App#90082 — "Manual tab is not updated to new distance after adding a new waypoint" (likely related state-sync issue from the same PR)
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.
Expected Result:
In Step 8 and 10, when both Map and Manual distance are edited, app should save both changes or save the changes on the currently opened tab.
@youssef-lr@aimane-chnaif What exactly is expected here? We should save changes from both tabs or save the change from only current tab? cc @trjExpensify
changed the title [-][$250] Distance - Inconsistent behavior when saving distance in Map and Manual tab[/-][+][Due for payment 2026-05-18] [$250] Distance - Inconsistent behavior when saving distance in Map and Manual tab[/+]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 - Inconsistent behavior when saving distance in Map and Manual tab[/-][+][Due for payment 2026-05-20] [Due for payment 2026-05-18] [$250] Distance - Inconsistent behavior when saving distance in Map and Manual tab[/+]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:
MelvinBot commentedon May 8, 2026
Proposal
What is the root cause of that problem?
The two tabs store their edits asymmetrically. The Map tab writes waypoint changes directly into the shared Onyx transaction object immediately when the user drags/edits a waypoint (no save required). The Manual tab stores its distance value only in a local React ref (
manualNumberFormRef) that is invisible to any other code path until the Manual tab's own save runs.This causes:
Scenario 1 (Map edit → Manual save → both saved):
submitManualDistancereadswaypointsfrom Onyx, which already contains the unsaved Map edits, so it sends both the manual distance and the updated waypoints toupdateMoneyRequestDistance.Scenario 2 (Manual edit → Map save → manual changes lost):
submitWaypointscallsupdateMoneyRequestDistancewithout adistanceparameter because it has no access tomanualNumberFormRef. The manual distance is silently dropped.What changes do you think we should make in order to solve the problem?
Make
submitWaypointsalso read and include the manual distance when saving, so both tabs' edits are always persisted regardless of which tab triggers the save.In
submitWaypoints, readmanualNumberFormRef.current?.getNumber()and, if it differs from the current transaction distance, pass it as thedistanceparameter toupdateMoneyRequestDistance. This mirrors whatsubmitManualDistancealready does for waypoints (checkinghaveWaypointsChangedat line 623).What alternative solutions did you explore?
Related issues
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.mukhrr commentedon May 10, 2026
@youssef-lr @aimane-chnaif What exactly is expected here? We should save changes from both tabs or save the change from only current tab? cc @trjExpensify
trjExpensify commentedon May 11, 2026
I think it would be best if editing the waypoints updates the mi/km in the manual distance tab. You're effectively resetting it when you do that.
So I think this is how that would play out in a few cases for example:
__
__
__
10 remaining items
melvin-bot commentedon May 11, 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.
[-][$250] Distance - Inconsistent behavior when saving distance in Map and Manual tab[/-][+][Due for payment 2026-05-18] [$250] Distance - Inconsistent behavior when saving distance in Map and Manual tab[/+]melvin-bot commentedon May 11, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".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 - Inconsistent behavior when saving distance in Map and Manual tab[/-][+][Due for payment 2026-05-20] [Due for payment 2026-05-18] [$250] Distance - Inconsistent behavior when saving distance in Map and Manual tab[/+]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]
lanitochka17 commentedon May 13, 2026
Deploy Blocker ##90558 was identified to be related to the PR ##90131 that attempted to fix this issue.