Repository navigation
Expense-Receipt shows 2 duplicate stop points when expense is created with only 1 stop point. #103352
Description
Activity
- addedDeployBlockerCashThis issue or pull request should block deploymentThis issue or pull request should block deployment
on Oct 7, 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/d84e3c71e22993f6551df949af5da412a3585b933b34921b8c2c2be2364ac75e- addedBugSomething is broken. Auto assigns a BugZero manager.Something is broken. Auto assigns a BugZero manager.
on Oct 7, 2026 You have been assigned to this deploy blocker because you recently merged this PR: #102258
@ShridharGoel you have been assigned to this deploy blocker because you authored the offending PR: #102258
💬 A slack conversation has been started in #expensify-open-source
👋 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.
- Find someone who can quickly fix the issue.
- Fix the issue yourself.
Deploy Blocker Analysis
Causing PR: [Payment due @Pujan92] Add Reuse route to the distance creation flow (
Expensify/App#102258). It merged 2026-10-06 and ships in Deploy Checklist: New Expensify 2026-10-06. The auto-assignment is correct.Root cause: The PR shows "Add stop" before the start and stop have addresses. A new stop then lands in the wrong waypoint slot and leaves an empty gap. The receipt later shows that gap as a duplicate stop.
Recommendation: Roll forward with a one-line fix. Show "Add stop" only when
numberOfFilledWaypoints >= 2, and show "Reuse route" on its own condition. Revert only if a fix can't land quickly. A revert would also remove the whole Reuse route feature (42 files).Confidence: Medium-high. The code confirms how the gap forms. I didn't trace the exact step that copies the stop into the receipt.
Investigation details
- "Add stop" now appears with empty waypoints. The PR changed the condition from
numberOfFilledWaypoints >= 2to(numberOfFilledWaypoints >= 2 || shouldShowReuseRoute).shouldShowReuseRouteis true when the user has any recent map distance expense, which repro step 2 creates. See DistanceRequestFooter.tsx:110-118. - The new stop goes into the wrong slot. "Add stop" opens the editor at index
Object.keys(waypoints).length. A new draft already has emptywaypoint0andwaypoint1(MoneyRequest.ts:441-444). So the stop is saved towaypoint2, the user fillswaypoint0, andwaypoint1stays empty. That matches step 5, "middle stop point is empty". - The gap appears as a duplicate. The receipt lists every key in
transaction.comment.waypoints(DistanceEReceiptPanel.tsx:49-98). The result {A, B, B} fits the renumbered {A, B} being merged over the gapped {A, empty, B} without clearingwaypoint2. The create path renumbers valid waypoints (TransactionUtils/index.ts:1284-1338). Route fetching still sends the gapped set, so older gap handling may be involved. Removing the gap fixes the bug either way.
This also explains "Unable to validate in Prod". Production doesn't show "Add stop" at step 3, so testers can't follow the steps there.
Ruled out: Split useExpenseSubmission hook still sends cleaned waypoints. Show save filters button when the current filters is no longer the default filters only renames a style. No other PR in the checklist touches waypoint code.
Alternative fix: Open the waypoint editor at the first empty slot instead of
keys.length.
Next Steps: Reply with
@MelvinBot implement thisto create a draft PR, or@MelvinBot <your feedback>to refine this analysis.
- "Add stop" now appears with empty waypoints. The PR changed the condition from
- addedDailyKSv2KSv2and removedDeployBlockerCashThis issue or pull request should block deploymentThis issue or pull request should block deploymentHourlyKSv2KSv2
on Oct 7, 2026 Minor issue. Not blocking on it
Chrome, iPhone 13/iOS 26.6.2, v9.5.7-0
No Add stop option when Start and Stop fields are emptybandicam.2026-10-10.21-43-57-745.mp4
ScreenRecording_10-10-2026.16-33-40_1.mp4
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.
Version Number: V9.5.4-0
Reproducible in staging?: Yes
Reproducible in production?: Unable to validate in Prod - Provide reasoning.
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): dreamnitethedragon+vegst@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Redmi note 10s android 13
App Component: Money Requests
Action Performed:
Expected Result:
One start and stop point must be shown in receipt.
Actual Result:
One start and 2 duplicate stop point is shown in receipt when expense is created with only 1 stop point.
Workaround:
Unknown
Platforms:
Screenshots/Videos
Bug7279916_1791369996933.Screenrecorder-2026-10-07-16-07-53-716.mp4
View all open jobs on GitHub