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
Track distance -GPS -Stop GPS tracking and Resume not displayed if tap on Stop GPS tracking #94406
👋 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.
On the GPS distance tracking screen, tapping Start and then immediately tapping Stop before any movement leaves the user back on the initial Start button instead of showing the stopped-trip UI (Resume tracking + Next/Save buttons).
What is the root cause of that problem?
The buttons that render are driven by isTripStopped(), which requires the trip to have at least one captured GPS point:
When you tap Stop before the device records any location fix, the trip has zero points, so this returns false. The component then falls into the non-stopped branch in GPSButtons/index.tsx:125 and, because isTracking is now false, renders the Start button again — never the Resume/Save buttons.
Why the trip has zero points (data flow)
initGpsDraft starts the draft with gpsPoints: [[]], isTracking: true (GPSDraftDetails.ts:77-81).
Final state: isTracking: false, total points 0 → isTripStopped is false.
This is a brand-new feature (not yet in production, hence "not reproducible in production"); the empty-trip edge case simply wasn't handled. The DeployBlockerCash makes this time-sensitive.
What changes do you think we should make in order to solve the problem?
A stopped trip should be recognized as "stopped" as soon as tracking ends and a draft exists, independent of how many points were captured. Update isTripStopped in GPSDraftDetailsUtils.ts:163:
This keeps the initial state (no draft → Start) and the active state (isTracking: true → Stop) unchanged, while correctly showing Resume tracking + Next after a zero-point stop. Tapping Next on a zero-distance trip already surfaces the zero-distance modal, so no other branch needs to change.
The author should verify no other consumer of isTripStopped depends on the > 0 points guard, and confirm on a physical iOS/Android device (the GPS flow can't be exercised in CI). Given this is a deploy blocker, reverting the feature PR is also a valid fast path if a targeted fix can't be verified quickly.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/94406) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
It's not a bug, we've been doing that from the start. When user starts and stops gps trip very quickly, so that no GPS point has been saved, we go back to the view with the Start button instead of Resume and Save, as there is no trip to be resumed or saved.
Activity
applause-bot commentedon Jun 24, 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/dbcc2fb500b35f5f51c6eccfb0f57e28812a059c03aa3c20c8434ec6244570b2
melvin-bot commentedon Jun 24, 2026
Triggered auto assignment to @rlinoz (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Jun 24, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 24, 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 24, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
On the GPS distance tracking screen, tapping Start and then immediately tapping Stop before any movement leaves the user back on the initial Start button instead of showing the stopped-trip UI (Resume tracking + Next/Save buttons).
What is the root cause of that problem?
The buttons that render are driven by
isTripStopped(), which requires the trip to have at least one captured GPS point:When you tap Stop before the device records any location fix, the trip has zero points, so this returns
false. The component then falls into the non-stopped branch inGPSButtons/index.tsx:125and, becauseisTrackingis nowfalse, renders the Start button again — never the Resume/Save buttons.Why the trip has zero points (data flow)
initGpsDraftstarts the draft withgpsPoints: [[]],isTracking: true(GPSDraftDetails.ts:77-81).stopGpsTrip, where the last segment is still empty, soisLastSegmentEmptyOrHasOnlyOnePointis true andremoveLastSegmentis called, leavinggpsPoints: [[]].isTracking: false, total points0→isTripStoppedisfalse.This is a brand-new feature (not yet in production, hence "not reproducible in production"); the empty-trip edge case simply wasn't handled. The DeployBlockerCash makes this time-sensitive.
What changes do you think we should make in order to solve the problem?
A stopped trip should be recognized as "stopped" as soon as tracking ends and a draft exists, independent of how many points were captured. Update
isTripStoppedinGPSDraftDetailsUtils.ts:163:This keeps the initial state (no draft →
Start) and the active state (isTracking: true→Stop) unchanged, while correctly showing Resume tracking + Next after a zero-point stop. Tapping Next on a zero-distance trip already surfaces the zero-distance modal, so no other branch needs to change.The author should verify no other consumer of
isTripStoppeddepends on the> 0points guard, and confirm on a physical iOS/Android device (the GPS flow can't be exercised in CI). Given this is a deploy blocker, reverting the feature PR is also a valid fast path if a targeted fix can't be verified quickly.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/94406)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
GCyganek commentedon Jun 24, 2026
It's not a bug, we've been doing that from the start. When user starts and stops gps trip very quickly, so that no GPS point has been saved, we go back to the view with the Start button instead of Resume and Save, as there is no trip to be resumed or saved.
rlinoz commentedon Jun 24, 2026
That is fair, closing as expected behavior.