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
Distance expense can be created with first two empty waypoints #103262
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):sodjinosdjiojiosjio@gmail.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:
Go to staging.new.expensify.com
Go to workspace chat.
Create a distance expense.
Click + > Track distance > Map.
Without entering Start and Stop waypoint, click Add stop.
Enter waypoint and save it.
Click Add stop, enter waypoint and save it.
Click Next > Create expense.
Open the expense.
Click Distance.
Expected Result:
In Step 8, user should be blocked from creating distance expense with the first two waypoints empty.
Actual Result:
In Step 8, user can create expense with the first two waypoints empty.
In Step 10, the first two empty waypoints are populated with the waypoint in Step 6 and 7.
👋 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 shows Add stop before Start and Stop are filled, when the user has a reusable route (DistanceRequestFooter.tsx:110-119). New stops are added after the two empty waypoints. Validation only counts filled waypoints, so two filled stops pass (useWaypointValidation.ts:41). On submit, getValidWaypoints drops the empty waypoints and renumbers the filled stops as Start and Stop.
Recommendation: Roll forward with a one-line fix, not a revert. Keep Add stop visible, but disable it until Start and Stop are filled:
Deploy blocker? Yes. Production renders Add stop only when numberOfFilledWaypoints >= 2, so this is a regression rather than part of a new feature. Impact is moderate: the UX is confusing, but route, distance, and amount stay consistent.
Add stop renders when numberOfFilledWaypoints >= 2 || shouldShowReuseRoute. Production checks only the first condition (production L104-L108). shouldShowReuseRoute is true only in Track distance > Map (IOURequestStepDistanceMap.tsx:387). The account also needs at least one map distance expense from the last 90 days.
Add stop uses the waypoint key count as its index, so the new stops become waypoint2 and waypoint3.
atLeastTwoDifferentWaypointsError is validatedWaypoints.length < 2. It doesn't check where the empty waypoints are, so submitWaypoints lets the user continue (IOURequestStepDistanceMap.tsx:318-329).
Responsible commit:91a78b0504d ("Always show Add stop and fit route thumbnail") removed the numberOfFilledWaypoints >= 2 guard. Product asked for this in the PR discussion. The fix above keeps the button visible as product requested.
Activity
applause-bot commentedon Oct 6, 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/c1b488f70bb9fa1d72f4a4995005b3f8d3ce4d3e6d988c73c7b3066c786c4d1b
melvin-bot commentedon Oct 6, 2026
You have been assigned to this deploy blocker because you recently merged this PR: #102258
melvin-bot commentedon Oct 6, 2026
@Gonals @Pujan92 you have been assigned to this deploy blocker because you reviewed the offending PR: #102258
melvin-bot commentedon Oct 6, 2026
@ShridharGoel you have been assigned to this deploy blocker because you authored the offending PR: #102258
melvin-bot commentedon Oct 6, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Oct 6, 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 Oct 6, 2026
Deploy Blocker Investigation
Causing PR: Add Reuse route to the distance creation flow (high confidence). It is in the Deploy Checklist: New Expensify 2026-10-06.
Root cause: The PR shows Add stop before Start and Stop are filled, when the user has a reusable route (
DistanceRequestFooter.tsx:110-119). New stops are added after the two empty waypoints. Validation only counts filled waypoints, so two filled stops pass (useWaypointValidation.ts:41). On submit,getValidWaypointsdrops the empty waypoints and renumbers the filled stops as Start and Stop.Recommendation: Roll forward with a one-line fix, not a revert. Keep Add stop visible, but disable it until Start and Stop are filled:
Deploy blocker? Yes. Production renders Add stop only when
numberOfFilledWaypoints >= 2, so this is a regression rather than part of a new feature. Impact is moderate: the UX is confusing, but route, distance, and amount stay consistent.Investigation details
How it happens (staging SHA
079ddb5c):waypoint0andwaypoint1(MoneyRequest.ts:441-444).numberOfFilledWaypoints >= 2 || shouldShowReuseRoute. Production checks only the first condition (productionL104-L108).shouldShowReuseRouteis true only in Track distance > Map (IOURequestStepDistanceMap.tsx:387). The account also needs at least one map distance expense from the last 90 days.waypoint2andwaypoint3.atLeastTwoDifferentWaypointsErrorisvalidatedWaypoints.length < 2. It doesn't check where the empty waypoints are, sosubmitWaypointslets the user continue (IOURequestStepDistanceMap.tsx:318-329).getValidWaypoints(waypoints, true)removes the empty waypoints and renumbers the rest (TransactionUtils/index.ts:1284-1314).useDistanceSubmission.ts:178uses it. That's why the empty Start and Stop show the step 6 and 7 addresses later.Responsible commit:
91a78b0504d("Always show Add stop and fit route thumbnail") removed thenumberOfFilledWaypoints >= 2guard. Product asked for this in the PR discussion. The fix above keeps the button visible as product requested.Other staging PRs ruled out: Analyzing is incorrectly shown after creating expense and enabling auto categorizing offline and Show save filters button when the current filters is no longer the default filters touch the same files, but they don't change waypoint gating or validation.
Optional extra fix: In
useWaypointValidation, block Next when Start or the last waypoint is empty and two or more other waypoints are filled.Next Steps: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.view run
melvin-bot commentedon Oct 6, 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.
JmillsExpensify commentedon Oct 7, 2026
Worth fixing though I also don't think it needs to be a deploy blocker. There is a "start" and "stop" in this instance.
m-natarajan commentedon Oct 7, 2026
Chrome / v9.5.4-2, Passed
bandicam.2026-10-07.21-25-38-823.mp4