Skip to content

Track distance -GPS -Stop GPS tracking and Resume not displayed if tap on Stop GPS tracking #94406

Closed

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding and email contributors@expensify.com to request to join our Slack channel!


Version Number: 9.4.17-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/folder/39523254/test-cases/86236110
Email or phone of affected tester (no customers): applausetester+062226f@applause.expensifail.com
Issue reported by: Applause Internal Team
Bug source: Regression TC Execution
Device used: iOS
App Component: Money Requests

Action Performed:

  1. Launch the app and login with expensifail account
  2. Tap the Global + > Track distance
  3. Select GPS
  4. Tap Start > Immediately tap Stop before moving

Expected Result:

Verify Stop GPS tracking modal displayed with Stop GPS tracking and Resume tracking buttons

Actual Result:

Stop GPS tracking and Resume tracking buttons doesn't displayed.

Workaround:

Unknown

Platforms:

  • Android: App
  • Android: mWeb Chrome
  • iOS: App
  • iOS: mWeb Safari
  • iOS: mWeb Chrome
  • Windows: Chrome
  • MacOS: Chrome Safari

Screenshots/Videos

Bug7188156_1782178861566.ScreenRecording_06-22-2026_21-39-12_1.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Rizky Gunawan
Bug ID: 7188156

Activity

  1. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Jun 24, 2026
  2. applause-bot commented on Jun 24, 2026

    @applause-bot
    Author

    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

  3. melvin-bot commented on Jun 24, 2026

    @melvin-bot

    Triggered auto assignment to @rlinoz (DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.

  4. melvin-bot commented on Jun 24, 2026

    @melvin-bot

    💬 A slack conversation has been started in #expensify-open-source

  5. github-actions commented on Jun 24, 2026

    @github-actions
    Contributor

    👋 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:

    1. Identify the pull request that introduced this issue and revert it.
    2. Find someone who can quickly fix the issue.
    3. Fix the issue yourself.
  6. MelvinBot commented on Jun 24, 2026

    @MelvinBot
    Contributor

    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:

    return !gpsDraftDetails?.isTracking && getTotalGpsTripPoints(gpsDraftDetails) > 0;

    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)

    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:

    function isTripStopped(gpsDraftDetails: GpsDraftDetails | undefined): boolean {
        return !!gpsDraftDetails && !gpsDraftDetails.isTracking;
    }

    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.

  7. GCyganek commented on Jun 24, 2026

    @GCyganek
    Contributor

    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.

  8. removed
    DeployBlockerCashThis issue or pull request should block deployment
    on Jun 24, 2026
  9. rlinoz commented on Jun 24, 2026

    @rlinoz
    Contributor

    That is fair, closing as expected behavior.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.EngineeringHourlyKSv2

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions