Skip to content

[No QA] Docs updates for E/A#101027 GPS trip stopped without moving - #101628

Open
MelvinBot wants to merge 6 commits into
mainfrom
claude-docsGpsStopWithoutMoving
Open

MelvinBot wants to merge 6 commits into
mainfrom
claude-docsGpsStopWithoutMoving

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

Explanation of Change

Help site follow-up to fix: Keep the sole GPS segment when a trip is stopped after one recorded point, which changed what a member sees after tapping Stop on a GPS trip.

Two statements on the Distance Expenses help article no longer matched the product:

  1. The FAQ Can I edit a GPS trip after I stop tracking? answered a flat "Yes". The pencil Edit icon is now hidden on a trip that is too short to trim, so a member who stops without driving anywhere looks for an icon that is not there.
  2. Nothing on the help site described stopping without moving. After the linked PR, that trip stays on screen with Resume and Save, and tapping Save shows the Can't create expense message instead of creating an expense. That is a state members will hit and search for.

Changes, all in docs/articles/new-expensify/reports-and-expenses/Distance-Expenses.md:

  • Qualified the edit answer with "as long as the trip is long enough to trim", and added a sentence explaining that the pencil Edit icon does not appear on a very short trip, such as one you stop without driving anywhere, because there is nothing to trim.
  • Added a FAQ, "What happens if I start a GPS trip and tap Stop without moving?", covering the trip staying on screen with a distance of 0.00, the Resume and Save buttons, discarding with the trash icon plus its confirmation, and the Can't create expense message with Got it.
  • Closed that FAQ with the neighbouring case: stopping before the first location is recorded keeps no trip at all and returns the screen to Start. This is a distinct outcome from the zero-distance trip above it, and without it a member who sees the trip vanish has nothing to search for.
  • Added keywords for the searches this new behavior creates (stop without moving, zero distance trip, same start and stop location, no edit icon, can't create expense).

Four things the article deliberately gets narrower than the UI copy suggests:

  • No recording interval is named. Whether the pencil Edit icon renders is gated on the trip's distance, not on how many locations it has — canGpsTripBeTrimmed compares distanceInMeters against GPS_DISTANCE_INTERVAL_METERS, and that constant is 50 m on main since Improve GPS trip tracking accuracy, so any figure in the docs would go stale.
  • The save restriction is scoped to zero distance, not to a shared start and stop address. saveGpsTrip only opens the modal when distanceInMeters === 0, so a trip that loops back to where it started still saves. The modal's own prompt says "same start and stop location", which is why that phrase is kept as a search keyword — but the article states the actual rule.
  • The discarded-trip case is keyed on the location, not on the start address. The new sentence says "before Expensify finds your location" rather than "before your start address appears", because the two are decoupled: addGpsPoints writes the point synchronously and only then kicks off the un-awaited reverse geocode, whose own comment notes it "may even take a few seconds". Stopping while the address is still loading keeps the trip, because isTripStopped counts points and never reads an address.
  • The zero-distance FAQ is scoped to a trip you just started, and no waypoint value is called an "address". Two separate narrowings, both from the same review pass:
    • The heading names the feature and says "start a GPS trip and tap Stop", because the 0.00 answer only holds for a new trip. Stop without moving after Resume and the empty segment is dropped instead, returning you to the earlier trip — stopGpsTrip calls removeLastSegment whenever the last segment is empty, and only keeps it when it is the sole segment.
    • The article says "location", never "address", for any value that can come back as coordinates. Three paths store a formatted lat/long instead of a street address, so promising an address would misdescribe supported behavior: the Start and Stop rows fall back to coordinates when reverse geocoding returns nothing (index.native.ts:91) and when the lookup is skipped outright (:96), and a saved trim does the same when offline or when the lookup finds nothing (applyTrimmedTrip) — which is why the edit FAQ now says "updated end location".

No other help article needed a change. Create-an-Expense.md describes the GPS steps only up to Save and links here for the details, so its steps remain accurate.

Every UI label used here was verified against the strings the app renders:

The GPS screens are mobile only, so they cannot be opened on web to capture screenshots.

Fixed Issues

$ #100938
PROPOSAL:

Tests

// TODO: The human co-author must fill out the tests you ran before marking this PR as "ready for review"
// Please describe what tests you performed that validates your changed worked.

  • Verify that no errors appear in the JS console

Offline tests

QA Steps

[No QA] — this PR only changes help site markdown, which is not part of the app build QA runs against.

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari

@TaduJR, please review the files changed and confirm they reflect the current behavior. Then post a new comment saying @MelvinBot mark this PR as ready for review.

Co-authored-by: TaduJR <TaduJR@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team September 18, 2026 20:28
@MelvinBot MelvinBot added the HelpDot Apply this label if the issue relates to ExpensifyHelp label Sep 18, 2026
title: Distance Expenses
description: Learn how to create a Distance expense using GPS tracking, map-based routes, manual entry, or odometer readings, and how the reimbursement rate is determined in New Expensify.
keywords: [New Expensify, distance expense, mileage, mileage reimbursement, create expense, distance rate, workspace rate, map route, reimbursement rate, manual mileage, manual distance, global create, track distance, GPS, GPS tracking, start GPS, track route, track mileage, mileage tracking, calculate mileage reimbursement, mileage rate, odometer, odometer reading, odometer image, odometer mileage, odometer distance, start reading, end reading, save for later, in-progress odometer, incomplete odometer, edit distance, edit waypoints, manual edit distance, edit stop, trim trip, edit GPS trip, shorten GPS route, GPS slider, total distance]
keywords: [New Expensify, distance expense, mileage, mileage reimbursement, create expense, distance rate, workspace rate, map route, reimbursement rate, manual mileage, manual distance, global create, track distance, GPS, GPS tracking, start GPS, track route, track mileage, mileage tracking, calculate mileage reimbursement, mileage rate, odometer, odometer reading, odometer image, odometer mileage, odometer distance, start reading, end reading, save for later, in-progress odometer, incomplete odometer, edit distance, edit waypoints, manual edit distance, edit stop, trim trip, edit GPS trip, shorten GPS route, GPS slider, total distance, stop GPS trip, stop without moving, resume GPS trip, discard GPS trip, zero distance trip, same start and stop location, no edit icon]

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@MelvinBot please make these changes to Distance-Expenses.md:

  1. Replace the paragraph after the edit FAQ with: "The pencil Edit icon does not appear on a very short trip, such as one you stop without driving anywhere, because there is nothing to trim." The recording interval is 50 m on main since Improve GPS trip tracking accuracy #101431, not 100 m, and the icon depends on the trip's distance, not on how many locations it has.
  2. In "What happens if I tap Stop without moving?", change "a distance of 0" to "a distance of 0.00", and change "tap the trash icon next to the distance counter to discard the trip" to "tap the trash icon next to the distance counter and confirm to discard the trip".
  3. Replace the second paragraph of that FAQ with: "A trip with the same start and stop location can't be turned into an expense. Tapping Save shows a Can't create expense message. Tap Got it to go back to the trip, then resume or discard it."
  4. Add can't create expense to the keywords.
  5. Update the Changes list in the description to match, note that Got it comes from common.buttonConfirm, and add [No QA] to the title.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All five done and pushed as a625ee3. Every correction checked out against the code.

1. Edit icon paragraph — replaced with your sentence, and the recording interval is gone entirely. You're right on both counts: canGpsTripBeTrimmed gates the icon on distanceInMeters > GPS_DISTANCE_INTERVAL_METERS — a distance comparison, not a location count — and Improve GPS trip tracking accuracy took that constant from 100 to 50 (merged 2026-09-18). Naming any figure would just go stale again, so the article no longer names one.

2. 00.00 and trash icon confirmation — both applied. The counter runs through getRoundedDistanceInUnits, which is toFixed(DISTANCE_DECIMAL_PLACES) with DISTANCE_DECIMAL_PLACES: 2, so 0.00 it is. And the trash icon does need a confirmation — DiscardGPSTripButton opens a Discard distance tracking modal and only resets the draft on confirm. The old wording implied one tap.

3. Second paragraph — replaced verbatim with your text.

4. Keywordcan't create expense added.

5. Description and title — the Changes list now matches the article, and the title is [No QA]. I also recorded where each label comes from: Got it is common.buttonConfirm (not a GPS-specific string), passed as the modal's confirmText at GPSButtons/index.tsx:186, and Can't create expense is gps.zeroDistanceTripModal.title.

Resulting article text

The pencil Edit icon does not appear on a very short trip, such as one you stop without driving anywhere, because there is nothing to trim.

What happens if I tap Stop without moving?

The trip stays on screen with a distance of 0.00, your current address shown under both Start and Stop, and the Resume and Save buttons available. Tap Resume to keep recording from where you are, or tap the trash icon next to the distance counter and confirm to discard the trip.

A trip with the same start and stop location can't be turned into an expense. Tapping Save shows a Can't create expense message. Tap Got it to go back to the trip, then resume or discard it.

AI tests run

Markdown-only change, so the JS/TS bundle (lint, typecheck, Jest, Storybook) is out of scope. Ran the docs-relevant checks:

  • npm run spell-changed on the article — passed, 0 issues.
  • ./.github/scripts/createDocsRoutes.shpassed, routes up to date. This also confirms the frontmatter still parses: the script runs yaml.load over every article's frontmatter, so the apostrophe in the new can't create expense keyword is safe inside the unquoted flow sequence.

No browser test — the GPS screens are mobile only and nothing in the app build changed.


view run

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These five changes are already applied — pushed as a625ee3, with the details in my earlier reply. Re-verified just now against origin/claude-docsGpsStopWithoutMoving by exact byte match, so nothing to redo:

  1. Edit icon paragraph — replaced with your sentence at Distance-Expenses.md:186. The interval claim is gone entirely — 100 meters, 330 feet, and recorded location no longer appear anywhere in the file. You were right on both counts: canGpsTripBeTrimmed gates the icon on distanceInMeters > GPS_DISTANCE_INTERVAL_METERS — distance, not location count — and Improve GPS trip tracking accuracy took that constant to 50.
  2. 0.00 and the trash-icon confirmation — both at Distance-Expenses.md:190.
  3. Second paragraph — replaced verbatim at Distance-Expenses.md:192.
  4. Keywordcan't create expense is in the frontmatter at Distance-Expenses.md:4.
  5. Description and title — the Changes list matches the article, the title is [No QA] Docs updates for E/A#101027 GPS trip stopped without moving, and the description records Got it as common.buttonConfirm, passed as the modal's confirmText at GPSButtons/index.tsx:186.

If you were expecting something beyond these five, let me know what's still off and I'll take another pass.


view run

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Both changes plus the link fix are in, pushed as f4e16e0. You were right on all three.

1. Zero distance, not shared location. saveGpsTrip gates on distanceInMeters === 0 and nothing else, so a loop that returns to its start point saves fine. My wording came from the modal's prompt ("You can't create an expense with the same start and stop location"), which describes the intent rather than the actual rule — the article now states the rule.

I kept same start and stop location in the keywords, since that is the phrase a member sees on screen and would search for. It is a search term, not a claim in the prose.

2. Heading. Now ## What happens if I tap **Stop** without moving?. Three other New Expensify articles already bold a UI name in an H2 (for example ## Why don't I see **View payment history**?), so this matches what's there.

3. Description link. Fixed — L10316-L10340 was pointing at an Expensify.org school-principal block, not the GPS strings. The gps section opens at src/languages/en.ts:10390 and runs through totalDistance at L10404, which covers Start, Stop, Save, Resume, Edit, Edit stop, and Total distance. I also recorded the zero-distance gate in the description so the narrower claim has its evidence attached.

Resulting FAQ text

What happens if I tap Stop without moving?

The trip stays on screen with a distance of 0.00, your current address shown under both Start and Stop, and the Resume and Save buttons available. Tap Resume to keep recording from where you are, or tap the trash icon next to the distance counter and confirm to discard the trip.

A trip with a distance of 0.00 can't be turned into an expense. Tapping Save shows a Can't create expense message. Tap Got it to go back to the trip, then resume or discard it.

AI tests run

Markdown-only change, so the JS/TS bundle is out of scope. Ran the docs checks:

  • npm run spell-changed on the article — passed, 0 issues.
  • ./.github/scripts/createDocsRoutes.shpassed, routes up to date.

No browser test — the GPS screens are mobile only and nothing in the app build changed.


view run

- Drop the 100 m recording-interval detail; the Edit icon is gated on trip
  distance (canGpsTripBeTrimmed), and the interval is 50 m since #101431
- Show the distance as 0.00 to match DISTANCE_DECIMAL_PLACES
- Note that discarding via the trash icon requires a confirmation
- Tighten the Can't create expense paragraph
- Add the can't create expense keyword

Co-authored-by: TaduJR <TaduJR@users.noreply.github.com>
@MelvinBot MelvinBot changed the title Docs updates for E/A#101027 GPS trip stopped without moving [No QA] Docs updates for E/A#101027 GPS trip stopped without moving Sep 19, 2026
@OSBotify

This comment has been minimized.

@TaduJR

TaduJR commented Sep 19, 2026

Copy link
Copy Markdown
Contributor

@MelvinBot

Mark the PR as ready for review

@MelvinBot
MelvinBot marked this pull request as ready for review September 19, 2026 05:28
@melvin-bot

melvin-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown

Concierge reviewer checklist:

  • I have verified the accuracy of the article
    • The article is within a hub that makes sense, and the navigation is correct
    • All processes, screenshots, and examples align with current product behavior.
    • All links within the doc have been verified for correct destination and functionality.
  • I have verified the readability of the article
    • The article's language is clear, concise, and free of jargon.
    • The grammar, spelling, and punctuation are correct.
    • The article contains at least one image, or that an image is not necessary
  • I have verified the formatting of the article
    • The article has consistent formatting (headings, bullet points, etc.) with other HelpDot articles and that aligns with the HelpDot formatting standards.
    • The article has proper text spacing and breaks for readability.
  • I have verified the article has the appropriate tone and style
    • The article's tone is professional, friendly, and suitable for the target audience.
    • The article's tone, terminology, and voice are consistent throughout.
  • I have verified the overall quality of the article
    • The article is not missing any information, nor does it contain redundant information.
    • The article fully addresses user needs.
  • I have verified that all requested improvements have been addressed

For more detailed instructions on completing this checklist, see How do I review a HelpDot PR as a Concierge Team member?

cc @lschurr

@melvin-bot

melvin-bot Bot commented Sep 19, 2026

Copy link
Copy Markdown

@TaduJR @mkhutornyi @lschurr One of you needs to copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button]

@melvin-bot
melvin-bot Bot removed the request for review from a team September 19, 2026 05:28
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Done — this PR is now ready for review, and PullerBear has assigned stephanieelliott as the reviewer.

One thing still needs you: the Tests section of the description is still the placeholder text — // TODO: **The human co-author** must fill out the tests you ran.... I can't fill that in on your behalf, so please replace it with the steps you ran to confirm the article reflects current behavior. The QA Steps section is already covered by [No QA], since this PR only touches help site markdown.

State at the time I flipped it
  • Head commit: a625ee3, which carries the five corrections from your review.
  • Checks: all green — build, check, spellcheck, verify, verifySignedCommits, validate, and CLA pass. Check independent approval fails, which is expected on a PR with no independent approval yet and resolves once a reviewer approves.
  • Reviewer: PullerBear was requested at creation and swapped itself out for stephanieelliott when the PR went ready, which is the normal hand-off.

view run

@melvin-bot
melvin-bot Bot requested a review from AndrewGable September 19, 2026 05:29

The pencil **Edit** icon does not appear on a very short trip, such as one you stop without driving anywhere, because there is nothing to trim.

## What happens if I tap Stop without moving?

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Button naming: "Stop" refers to the Stop button (it's bolded everywhere else in this article, e.g. "tap Stop"). Per HELPSITE_NAMING_CONVENTIONS.md, button names must be bolded. Consider: ## What happens if I tap **Stop** without moving?

@github-actions

Copy link
Copy Markdown
Contributor

HelpDot Documentation Review

Overall Assessment

This PR adds edge-case coverage to the GPS tracking FAQ in the Distance Expenses article. It expands the keyword list, adds a caveat to the existing "Can I edit a GPS trip after I stop tracking?" answer, and introduces a new FAQ entry covering what happens when a user taps Stop without moving (zero-distance trips and the resulting "Can't create expense" message). All changes live within the existing FAQ section and are additive and well-scoped.

Scores Summary

  • Readability: 9/10 - Clear, concise answers with good scannability. UI labels are consistently bolded and instructions are action-oriented.
  • AI Readiness: 9/10 - Keywords reflect realistic search phrases (e.g., "stop without moving", "zero distance trip", "can't create expense"), the new heading is question-based, and internalScope is present and unchanged. Content stays within the single Distance expense workflow.
  • Style Compliance: 8/10 - Strong use of exact, bolded UI labels (Stop, Resume, Save, Start, Can't create expense, Got it). Minor points below.

Key Findings

  • Positive: New content matches the FAQ question format and stays within scope. Edge cases (no edit icon on short trips, zero-distance trips) are genuinely useful and well written.
  • Positive: Keyword additions are specific and mirror real user phrasing, improving retrieval precision.
  • Minor: "tap the trash icon" references an icon without a bolded label. This is consistent with the existing "pencil Edit icon" pattern in the file, but consider giving the icon a consistent exact reference for determinism.
  • Minor: The button name Stop appears unbolded inside the heading "What happens if I tap Stop without moving?". Bolding is typically applied in body text rather than headings, so this is acceptable, but worth noting for consistency.

Recommendations

  • Optional: Standardize icon references (trash icon) to match the exact/bolded convention used elsewhere in the article.
  • No blocking issues. The changes are compliant and ready to merge.

Files Reviewed

  • docs/articles/new-expensify/reports-and-expenses/Distance-Expenses.md - Additive FAQ and keyword updates; compliant with governance.

Note: Detailed line-by-line feedback has been provided as inline comments.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: a625ee38f4

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".


The trip stays on screen with a distance of 0.00, your current address shown under both **Start** and **Stop**, and the **Resume** and **Save** buttons available. Tap **Resume** to keep recording from where you are, or tap the trash icon next to the distance counter and confirm to discard the trip.

A trip with the same start and stop location can't be turned into an expense. Tapping **Save** shows a **Can't create expense** message. Tap **Got it** to go back to the trip, then resume or discard it.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Limit the restriction to zero-distance trips

The app does not reject every trip whose displayed start and stop locations match: GPSButtons.saveGpsTrip only shows this modal when distanceInMeters === 0 (src/pages/iou/request/step/IOURequestStepDistanceGPS/GPSButtons/index.tsx:117-123). A member who drives a loop back to the starting location can therefore save the expense, so this blanket statement is misleading; describe the restriction as applying to the zero-distance trip instead.

Useful? React with 👍 / 👎.

@TaduJR

This comment was marked as resolved.

Save only shows the modal when distanceInMeters === 0, so a trip that
loops back to its start point still saves. Also bold the Stop button
name in the FAQ heading per HELPSITE_NAMING_CONVENTIONS.

Co-authored-by: TaduJR <TaduJR@users.noreply.github.com>
@TaduJR

This comment was marked as resolved.

@OSBotify

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: f4e16e023d

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".


## What happens if I tap **Stop** without moving?

The trip stays on screen with a distance of 0.00, your current address shown under both **Start** and **Stop**, and the **Resume** and **Save** buttons available. Tap **Resume** to keep recording from where you are, or tap the trash icon next to the distance counter and confirm to discard the trip.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Qualify the stopped-trip state on a recorded location

When Stop is tapped before the first background-location update arrives, gpsPoints is still [[]]; isTripStopped() remains false, so GPSButtons shows Start again and Waypoints hides the trip instead of presenting the documented address, Resume, and Save state. The new behavior applies only after at least one location has been recorded, so this paragraph should state that prerequisite or describe the immediate-stop outcome.

Useful? React with 👍 / 👎.

@TaduJR

This comment was marked as resolved.

Tapping Stop before the first GPS fix arrives leaves gpsPoints as [[]], so
isTripStopped is false, the Waypoints block unmounts, and the Start button
renders again. Worded around the location being found, not the start address
appearing, since point recording and address resolution are decoupled.

Co-authored-by: TaduJR <TaduJR@users.noreply.github.com>
@TaduJR

This comment was marked as resolved.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Added, pushed as 576c22a. The paragraph goes in verbatim at the end of "What happens if I tap Stop without moving?":

If you tap Stop right after Start, before Expensify finds your location, no trip is kept and the Start button shows again.

Your read of the mechanism checks out exactly, including the wording caveat — that one is a real trap, not a nitpick.

Why "finds your location" and not "start address appears"

The two are genuinely decoupled, so the alternative wording would describe the opposite outcome.

isTripStopped is !isTracking && getTotalGpsTripPoints(...) > 0, and getTotalGpsTripPoints is gpsPoints?.flat().length ?? 0. It counts points and never reads an address field.

On the recording side, index.native.ts:51-56 writes the point through addGpsPoints synchronously, then only conditionally fires the un-awaited updateStartAddress. Its own comment warns that reverse geocoding "may even take a few seconds" — and that gap is exactly what drives shouldShowLoadingStartAddress in Waypoints/index.tsx:50.

So a member who stops during that window has a recorded point with no address yet, isTripStopped is already true, and the trip is kept. Writing "before your start address appears" would have documented that as a discarded trip.

The rest of the trace

GPSDraftDetailsUtils.ts:189 and Waypoints/index.tsx:38 are both right. Filling in the middle:

  • Stop with gpsPoints still [[]]stopGpsTrip sets isTracking: false, then hits the isLastSegmentEmptyOrHasOnlyOnePoint branch. Because gpsPoints.length is 1, not > 1, removeLastSegment is skipped and it returns without writing gpsPoints at all. Note it never calls resetGPSDraftDetails — the draft is left as [[]], which every downstream check reads as empty and which the next Start overwrites wholesale. "No trip is kept" is accurate as behavior, just not via an explicit reset.
  • Screen stateisTripNotInitialized at Waypoints/index.tsx:38-42 is true, so the whole block returns null — distance counter, trash and pencil icons, and both address rows all unmount.
  • ButtonisTripStopped false means the Resume/Save branch (lines 133-154) is skipped for the else at 155-170, and with isTracking now false the label at line 166 resolves to gps.start. Confirmed Start, not Resume.

I also updated the description: the Changes list now mentions this case, and I recorded the location-vs-address distinction alongside the other two places where the article is deliberately narrower than the UI copy, so a future editor doesn't "simplify" it back.

AI tests run

Markdown only, so the JS/TS bundle is out of scope. Ran the docs checks:

  • npm run spell-changed on the article — passed, 0 issues.
  • ./.github/scripts/createDocsRoutes.shpassed, routes up to date.

No browser test — nothing in the app build changed, and these GPS screens are mobile only.


view run

@OSBotify

This comment has been minimized.

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 576c22af6b

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".


## What happens if I tap **Stop** without moving?

The trip stays on screen with a distance of 0.00, your current address shown under both **Start** and **Stop**, and the **Resume** and **Save** buttons available. Tap **Resume** to keep recording from where you are, or tap the trash icon next to the distance counter and confirm to discard the trip.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Describe the value as a location rather than an address

When the device is offline or reverse geocoding returns no address, updateStartAddress() deliberately stores formatted coordinates in the waypoint (src/setup/backgroundLocationTrackingTask/index.native.ts:88-96), and Waypoints renders that value under both labels. Saying the current address is always shown therefore misdescribes a supported path; use “current location” or qualify that coordinates may appear instead.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Another offline edge case

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done — pushed as 4b98872, description updated to match. Item 2 was already in from the previous round; items 1 and 3 are new. Both of your citations land exactly where you said.

1. Heading → "What happens if I start a GPS trip and tap Stop without moving?" Applied. GPSDraftDetailsUtils.ts:142-147 confirms it: when the last segment is empty, removeLastSegment drops it, guarded by gpsPoints.length > 1. So the 0.00 trip only survives when it is the sole segment — a trip you just started. Stop without moving after Resume and you land back on the earlier trip, which the old heading wrongly covered.

3. "updated end address" → "updated end location". Applied. applyTrimmedTrip only attempts addressFromGpsPoint when online, and falls through to {value: coordinatesToString(trimmedEndPoint), type: 'coordinates'} whenever that returns nothing or the device is offline — same shape as the start-point fallback you flagged last round.

While confirming item 2's rationale for the description, I checked your other two line references as well: index.native.ts:91 is the null-geocode fallback and :96 is the skip-the-lookup path. Both store coordinates, so the article now avoids the word "address" for every waypoint value a member can see.

Resulting article text

Can I edit a GPS trip after I stop tracking?

Yes, as long as the trip is long enough to trim. After you tap Stop, tap the pencil Edit icon next to the distance counter to open the Edit stop screen. Drag the slider to move the end point back to an earlier stop along your recorded route — the map route and the Total distance value update live as you drag — then tap Save. The GPS screen then shows the trimmed distance and updated end location. To restore the full trip, open Edit stop again and drag the slider all the way to the right. Tapping Resume and Stop also resets any trim and shows the full trip again.

The pencil Edit icon does not appear on a very short trip, such as one you stop without driving anywhere, because there is nothing to trim.

What happens if I start a GPS trip and tap Stop without moving?

The trip stays on screen with a distance of 0.00, your current location shown under both Start and Stop, and the Resume and Save buttons available. Tap Resume to keep recording from where you are, or tap the trash icon next to the distance counter and confirm to discard the trip.

A trip with a distance of 0.00 can't be turned into an expense. Tapping Save shows a Can't create expense message. Tap Got it to go back to the trip, then resume or discard it.

If you tap Stop right after Start, before Expensify finds your location, no trip is kept and the Start button shows again.

AI tests run

Markdown-only change, so the JS/TS bundle (lint, typecheck, Jest, Storybook) is out of scope. Ran the docs-relevant checks:

  • npm run spell-changed on the article — passed, 0 issues.
  • ./.github/scripts/createDocsRoutes.shpassed, routes up to date.

No browser test — the GPS screens are mobile only and nothing in the app build changed.


view run

@TaduJR

This comment was marked as resolved.

The start waypoint falls back to raw coordinates when offline or when the
reverse geocode returns nothing, so both rows may show coordinates rather
than an address.

Co-authored-by: TaduJR <TaduJR@users.noreply.github.com>
@MelvinBot

Copy link
Copy Markdown
Contributor Author

Done, pushed as 6d53a7b. "address" → "location" in that sentence:

The trip stays on screen with a distance of 0.00, your current location shown under both Start and Stop, and the Resume and Save buttons available.

Your reasoning holds exactly as you described it. updateStartAddress only writes type: 'address' on the one path where it is online and addressFromGpsPoint returns non-null. The other two paths both store coordinatesToString(...) with type: 'coordinates':91 when the lookup finds nothing, and :96 when offline. "Location" covers both.

One more instance of the same thing, which I left alone since you didn't ask for it. The edit FAQ two paragraphs up still says the GPS screen shows the "updated end address" after trimming. The end waypoint has the identical fallback — GPSDraftDetailsUtils.ts:158 and :178 both write type: 'coordinates', and trimming itself stores coordinates at GPSDraftDetails.ts:190. Say the word and I'll change "updated end address" to "updated end location" too.

AI tests run

Markdown-only change, so the JS/TS bundle is out of scope. Ran the docs checks:

  • npm run spell-changed on the article — passed, 0 issues.
  • ./.github/scripts/createDocsRoutes.shpassed, routes up to date.

No browser test — nothing in the app build changed, and the GPS screens are mobile only.


view run

@OSBotify

This comment has been minimized.

@TaduJR

This comment was marked as resolved.

- Name the feature in the heading and scope it to a new trip: after Resume,
  stopping without moving drops the empty segment and returns to the earlier
  trip, so the 0.00 answer only holds for a trip you just started
- Say updated end location, since a trim saved offline or with no geocode
  result stores coordinates rather than an address

Co-authored-by: TaduJR <TaduJR@users.noreply.github.com>
@TaduJR

This comment was marked as resolved.

@OSBotify

Copy link
Copy Markdown
Contributor

A preview of your ExpensifyHelp changes have been deployed to https://fd717650.helpdot.pages.dev ⚡️

Updated articles:

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 👍

Reviewed commit: 4b988728b6

ℹ️ About Codex in GitHub

Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".

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

Labels

HelpDot Apply this label if the issue relates to ExpensifyHelp

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants