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-07-16] [$250] Distance - Error in Manual tab persists after entering waypoints in Map tab #90558
Version Number: 9.3.73-3 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:#90131 Email or phone of affected tester (no customers):sdsdjoijdoisnjodis@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.
Clear both waypoints.
Go to Manual tab.
Click Save.
Go to Map tab.
Enter both waypoints.
Go to Manual tab.
Expected Result:
"Please enter at least two different addresses" in Manual tab should disappear after entering both waypoints in Map tab.
Actual Result:
"Please enter at least two different addresses" in Manual tab persists after entering both waypoints in Map tab.
👋 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.
PR #90131 introduced new logic in IOURequestStepDistance.tsx to handle the manualFormError state, including setting "Please enter at least two different addresses" when waypoints are invalid on the Manual tab. However, the error is cleared only via handleManualInputChange (when the user types in the manual input field) or by submitManualDistance resetting isManuallyEditing.current. There is no effect or logic to clear manualFormError when the Map tab waypoints become valid again. As a result, after clearing waypoints (triggering the error on Manual tab), re-entering valid waypoints on the Map tab does not clear the persisted error state on the Manual tab — the error lingers.
The bug is staging-only and does not exist in production since this is a new feature per the issue report.
Assigned: @mukhrr (PR author), @aimane-chnaif and @youssef-lr (approving reviewers) Labels: DeployBlockerCash kept (App PR caused the regression). No label changes needed.
Detailed Analysis
Evidence
The melvin-bot already identified PR fix: resolve distance edit regressions #90131 as the causing PR (auto-assigned based on the regression test linked in the issue body: https://github.com/Expensify/App/pull/90131).
PR fix: resolve distance edit regressions #90131 was merged on 2026-05-12 and modifies src/pages/iou/request/step/IOURequestStepDistance.tsx — the exact file implementing the distance edit flow.
The issue is marked "Reproducible in staging? Yes" and "N/A - new feature, doesn't exist in prod", placing it squarely within this staging-only PR's changes.
The PR introduced submitManualDistance's early-return path at line 525 which calls setManualFormError(translate('iou.error.atLeastTwoDifferentWaypoints')) when atLeastTwoDifferentWaypointsError is true.
The only place manualFormError is cleared is in handleManualInputChange (triggered by typing in the manual input) and implicitly reset when submitManualDistance succeeds — neither of which fires when the user switches back to the Map tab and enters valid waypoints.
There is no useEffect watching atLeastTwoDifferentWaypointsError to clear manualFormError when the error resolves.
Root Cause
PR #90131 added validation in submitManualDistance that sets manualFormError to "Please enter at least two different addresses" when waypoints are invalid (step 525-527 in IOURequestStepDistance.tsx). However, no corresponding cleanup logic was added to clear this error when the user returns to the Map tab and enters valid waypoints. The atLeastTwoDifferentWaypointsError flag becomes false once two valid, different waypoints are entered, but manualFormError (a React useState value) is never reset in response to that change. The fix would require either a useEffect watching atLeastTwoDifferentWaypointsError to clear manualFormError when it becomes false, or clearing manualFormError when the user switches tabs. Reverting PR #90131 is the safest immediate path since the PR touches multiple interacting behaviors.
The manualFormError state in IOURequestStepDistance.tsx is only cleared when the user types in the manual distance input field (handleManualInputChange at line 631). There is no code path that clears it when waypoints become valid on the Map tab.
The existing useEffect at line 272 correctly clears shouldShowAtLeastTwoDifferentWaypointsError (Map tab error) when waypoints change, but it does not also clear manualFormError. So when the user fixes waypoints on the Map tab and returns to Manual, the stale error persists.
What changes do you think we should make in order to solve the problem?
In the useEffect at line 272-277, also clear manualFormError alongside shouldShowAtLeastTwoDifferentWaypointsError when the waypoint validation conditions are no longer met (i.e., when waypoints become valid). This ensures both error states are reset when waypoints change, regardless of which tab the user is on.
Investigation details
Error set atline 524-527: when submitting from Manual tab with invalid waypoints (introduced in PR #90131).
Only clearing path is line 631-637 (handleManualInputChange), which only fires on manual input typing.
No tab-change callback exists on the OnyxTabNavigator at line 695 to reset errors when switching tabs.
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.
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Activity
melvin-bot commentedon May 13, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #90131
melvin-bot commentedon May 13, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon May 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:
OSBotify commentedon May 13, 2026
Investigation Summary
Classification: Frontend bug
Causing PR: #90131 - "fix: resolve distance edit regressions" by @mukhrr (High confidence)
Related Issues: #90082, #90083, #90056, #90105
Recommendation: REVERT
PR #90131 introduced new logic in
IOURequestStepDistance.tsxto handle themanualFormErrorstate, including setting"Please enter at least two different addresses"when waypoints are invalid on the Manual tab. However, the error is cleared only viahandleManualInputChange(when the user types in the manual input field) or bysubmitManualDistanceresettingisManuallyEditing.current. There is no effect or logic to clearmanualFormErrorwhen the Map tab waypoints become valid again. As a result, after clearing waypoints (triggering the error on Manual tab), re-entering valid waypoints on the Map tab does not clear the persisted error state on the Manual tab — the error lingers.The bug is staging-only and does not exist in production since this is a new feature per the issue report.
Assigned: @mukhrr (PR author), @aimane-chnaif and @youssef-lr (approving reviewers)
Labels:
DeployBlockerCashkept (App PR caused the regression). No label changes needed.Detailed Analysis
Evidence
https://github.com/Expensify/App/pull/90131).src/pages/iou/request/step/IOURequestStepDistance.tsx— the exact file implementing the distance edit flow.Verification
src/pages/iou/request/step/IOURequestStepDistance.tsxgh pr view 90131 --json files).submitManualDistance's early-return path at line 525 which callssetManualFormError(translate('iou.error.atLeastTwoDifferentWaypoints'))whenatLeastTwoDifferentWaypointsErroris true.manualFormErroris cleared is inhandleManualInputChange(triggered by typing in the manual input) and implicitly reset whensubmitManualDistancesucceeds — neither of which fires when the user switches back to the Map tab and enters valid waypoints.useEffectwatchingatLeastTwoDifferentWaypointsErrorto clearmanualFormErrorwhen the error resolves.Root Cause
PR #90131 added validation in
submitManualDistancethat setsmanualFormErrorto"Please enter at least two different addresses"when waypoints are invalid (step 525-527 inIOURequestStepDistance.tsx). However, no corresponding cleanup logic was added to clear this error when the user returns to the Map tab and enters valid waypoints. TheatLeastTwoDifferentWaypointsErrorflag becomesfalseonce two valid, different waypoints are entered, butmanualFormError(a ReactuseStatevalue) is never reset in response to that change. The fix would require either auseEffectwatchingatLeastTwoDifferentWaypointsErrorto clearmanualFormErrorwhen it becomes false, or clearingmanualFormErrorwhen the user switches tabs. Reverting PR #90131 is the safest immediate path since the PR touches multiple interacting behaviors.MelvinBot commentedon May 13, 2026
Proposal
What is the root cause of that problem?
The
manualFormErrorstate inIOURequestStepDistance.tsxis only cleared when the user types in the manual distance input field (handleManualInputChangeat line 631). There is no code path that clears it when waypoints become valid on the Map tab.The existing
useEffectat line 272 correctly clearsshouldShowAtLeastTwoDifferentWaypointsError(Map tab error) when waypoints change, but it does not also clearmanualFormError. So when the user fixes waypoints on the Map tab and returns to Manual, the stale error persists.What changes do you think we should make in order to solve the problem?
In the
useEffectat line 272-277, also clearmanualFormErroralongsideshouldShowAtLeastTwoDifferentWaypointsErrorwhen the waypoint validation conditions are no longer met (i.e., when waypoints become valid). This ensures both error states are reset when waypoints change, regardless of which tab the user is on.Investigation details
Error set at line 524-527: when submitting from Manual tab with invalid waypoints (introduced in PR #90131).
Only clearing path is line 631-637 (
handleManualInputChange), which only fires on manual input typing.No tab-change callback exists on the
OnyxTabNavigatorat line 695 to reset errors when switching tabs.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.aimane-chnaif commentedon May 13, 2026
Similar issue was reported during original PR review - #89858 (comment) (reversed behavior)
47 remaining items
melvin-bot commentedon Jul 14, 2026
@aimane-chnaif Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Jul 15, 2026
Triggered auto assignment to @mallenexpensify (
Awaiting Payment)melvin-bot commentedon Jul 15, 2026
Payment Summary
Upwork Job
BugZero Checklist (@mallenexpensify)
mallenexpensify commentedon Jul 17, 2026
Payment Summary
Contributor+: @aimane-chnaif due $250 via NewDot
@aimane-chnaif plz complete the BZ checklist and tag me in a post once you have. Thx
aimane-chnaif commentedon Jul 18, 2026
BugZero Checklist:
[Contributor] The offending PR has been commented on, pointing out the bug it caused and why, so the author and reviewers can learn from the mistake.
Link to comment: [Due for payment 2026-07-16] [$250] Distance - Error in Manual tab persists after entering waypoints in Map tab #90558 (comment)
[Contributor] If the regression was CRITICAL (e.g. interrupts a core flow) A discussion in #expensify-open-source has been started about whether any other steps should be taken (e.g. updating the PR review checklist) in order to catch this type of bug sooner.
Link to discussion:
[Contributor] If it was decided to create a regression test for the bug, please propose the regression test steps using the template below to ensure the same bug will not reach production again.
[BugZero Assignee] Create a GH issue for creating/updating the regression test once above steps have been agreed upon.
Link to issue: https://github.com/Expensify/Expensify/issues/661991
Regression Test Proposal
Test:
Do we agree 👍 or 👎
cc: @mallenexpensify
Zapier Logs
Run ID: 00040eee-decb-a351-deb5-73b87e957504garrettmknight commentedon Aug 7, 2026
$250 approved for @aimane-chnaif