Skip to content

Localize the GPS distance counter number and unit with Intl.NumberFormat - #103796

Merged
chuckdries merged 4 commits into
mainfrom
claude-localizeGPSDistanceCounter
Oct 14, 2026
Merged

chuckdries merged 4 commits into
mainfrom
claude-localizeGPSDistanceCounter

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

The GPS distance counter built its value by gluing a toFixed(2) number, a hard-coded space, and the raw mi/km value together in JSX. Because of that, no locale could change the decimal separator, the spacing, the unit's position, or the unit's spelling.

Following chuckdries's guidance on the issue, this PR formats the value with Intl.NumberFormat in unit style and renders the formatToParts output in the order the locale returns it. Only the unit part is muted, which matches today's styling (bold number, muted unit).

  • NumberFormatUtils.formatDistanceToParts maps mi/km to the mile/kilometer Intl units, uses the short unit display, and pins two decimals so values like 12.50 keep their trailing zero, matching how distances are stored.
  • DistanceCounter passes the converted distance (convertDistanceUnit) and the user's preferredLocale to the helper. Intl does the rounding.

Example output: en gives 1,234.50 mi, es gives 12,50 km, and zh-hans gives 12.50英里.

Notes for reviewers:

  • The counter only renders in the native app. On web, the GPS screen shows the "open the mobile app" page, so this needs to be checked on iOS and Android.
  • Android uses Hermes' native Intl.NumberFormat, not the formatjs polyfill. Hermes lists style: 'unit' as having "rough edges" on Android 11, so it's worth checking the unit still comes back as its own muted part on an Android 11 device.
  • The trip edit page (IOURequestStepGPSTripEdit) joins {displayDistance} {unit} the same way. I left it out to keep this PR scoped to the issue. It can use the same helper in a follow-up.

AI Tests (run by MelvinBot):

  • ✅ npm test -- tests/unit/NumberFormatUtilsTest.ts (26 passed, including 4 new formatDistanceToParts cases)
  • ✅ Related suites: GPSDraftDetailsUtilsTest, useGPSTripStateChecker, BackgroundLocationPermissionsFlowTest, CurrencyUtilsTest (173 passed)
  • ✅ npm run typecheck
  • ✅ npm run lint on the changed files
  • ✅ npm run react-compiler-compliance-check check on DistanceCounter.tsx
  • ✅ npm run fmt (no extra changes)
  • ⚠️ lint-changed, spell-changed, and check-changed couldn't run because git merge-base fails in the shallow CI checkout. CI will run them.
  • ⚠️ No UI test: the counter isn't rendered on web, and the only test platform available was web.

Fixed Issues

$ #103488
PROPOSAL: #103488 (comment)

Tests

Precondition:

  • iOS native or Android native
  1. Open the App
  2. Go to Settings > Preferences > Language
  3. Select Español
  4. Tap +
  5. Tap Track Distance
  6. Select GPS tab
  7. Tap Start
  8. Allow location access
  9. Verify the distance shows two decimal places with a comma, and a muted unit after a space (for example 0,00 km or 0,00 mi)
  10. Go to Settings > Preferences > Language
  11. Select 中文 (简体)
  12. Repeat steps 4–8
  13. Verify the unit is muted and sits against the number with no space (for example 0.00公里 or 0.00英里)
  14. Go to Settings > Preferences > Language
  15. Select English
  16. Repeat steps 4–8
  17. Verify the number is bold with a dot decimal, and a muted unit comes after a space (for example 0.00 mi or 0.00 km)
  • Verify that no errors appear in the JS console

Offline tests

N/A. Not required, it just a UI change.

QA Steps

Same as Tests step

  • 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 verified any copy / text that was added to the app 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 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 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.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • 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

… controls number, spacing and unit

Co-authored-by: ahmedGaber93 <ahmedGaber93@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team October 12, 2026 16:33
@melvin-bot melvin-bot Bot added Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web labels Oct 12, 2026
@MelvinBot

Copy link
Copy Markdown
Contributor Author

I created this PR from an upstream branch since I don't have push access to your fork.

To take ownership of this branch and be able to push updates, run:

git remote add upstream https://github.com/Expensify/App.git
git fetch upstream claude-localizeGPSDistanceCounter
git checkout -b claude-localizeGPSDistanceCounter upstream/claude-localizeGPSDistanceCounter
git push -u origin claude-localizeGPSDistanceCounter

Then you can close this PR and open a new one from your fork.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ⚠️ partial

I didn't run a web test, for two reasons:

  1. This PR has no documented test steps yet. The Tests and QA Steps sections still hold the // TODO placeholders.
  2. The web build can't show the change. The web GPS page, IOURequestStepDistanceGPS/index.tsx, only shows the "open the mobile app" screen. Only the native page renders DistanceCounter, through Waypoints/index.tsx:70.

To get proof of the change, add test steps for iOS or Android to the PR. Then ask me to run them on Android, for example after a GPS trip in en, es, and zh-hans.


view run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

The failing checks are unrelated to this PR, so I didn't push a fix. The PR only changes NumberFormatUtils, DistanceCounter.tsx, and NumberFormatUtilsTest.ts.

  • test (job 3): tests/unit/CategoryTagPickerAutoFocusTest.tsx fails with ReferenceError: Request is not defined. The error comes from Expo's fetch polyfill, called through HttpUtils.ts. The same test fails the same way on several unrelated PRs today, including fix/96225-account-switcher-keyboard-navigation, claude-showApproverRowForDynamicExternalWorkflow, and nicolas/allow-zero-distance-rate. It needs a fix on main.
  • build (developmentDebug, false): Rock found a cached APK and downloaded it to .rock/cache/remote-build/.... The next workflow step then looked for the APK in android/app/build/outputs, which didn't exist, so it exited with code 1. This is a CI workflow problem, and this PR doesn't touch native code.
  • Check independent approval: This check is expected to fail until the PR is approved.

Once main is fixed, merge main into this branch or re-run the checks.


view run

@MelvinBot

MelvinBot commented Oct 12, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ✅ pass

The GPS distance counter shows the number and unit with two decimals in each locale I tested: 0.00 mi in English, 0,00 mi in Spanish, and 0.00英里 in Chinese (Simplified), with no errors. The PR has no written test steps yet, so I based these steps on the expected outputs in the PR description.
Chinese Simplified locale, Distance shows 0.00英里

Step Status
Start a GPS trip (Create expense > Distance > GPS tab). The counter shows a two-decimal value with a unit.After I granted location access, including "Allow all the time", and tapped Start, the counter showed 0.00 mi with a bold number and a muted unit. I couldn't move the emulator's location, so I didn't check a live distance increase.
GPS tracking started, Distance shows 0.00 mi
✅
Switch the language to Español. The counter uses a decimal comma and a space before the unit.The running trip showed 0,00 mi, with a comma decimal separator and a space before mi.
Spanish locale, Distance shows 0,00 mi
✅
Switch the language to Chinese (Simplified). The counter shows a localized unit with no space.The trip showed 0.00英里, with a period decimal separator and the localized unit 英里 right after the number.
Chinese Simplified locale, Distance shows 0.00英里
✅
Switch back to English. No red box or JS errors appear during the flow.The counter returned to 0.00 mi. No crash, red box, or error dialog appeared at any point. I then stopped and discarded the trip.
✅

view run · view recording

@MelvinBot

Copy link
Copy Markdown
Contributor Author

The checks haven't changed since my last comment. Neither failure comes from this PR, so I didn't push a fix.

  • test (job 3): CategoryTagPickerAutoFocusTest.tsx fails with ReferenceError: Request is not defined. Every Jest run on every branch has failed since about 16:29 UTC, and the last passing run was at 16:23 UTC. Two PRs merged in that window. The likely cause is [No-QA] chore: Bump @sentry/react-native to 8.27.0 and @sentry/core to 10.75.0, since the other one only touches the workspace tags table. I haven't confirmed this. No fix has landed on main yet, so merging main won't help.
  • build (developmentDebug, false): The job failed only on this PR. Rock downloaded a cached APK, but the next step looked for it in android/app/build/outputs. Please re-run the failed job. I couldn't re-run it.

Once main has a fix, merge main into this branch. Check independent approval will pass after review.


view run

@ahmedGaber93

Copy link
Copy Markdown
Contributor

@MelvinBot Please update

Tests

Precondition:

  • iOS native or Android native
  1. Open the App
  2. Go to Settings > Preferences > Language
  3. Select Español
  4. Tap +
  5. Tap Track Distance
  6. Select GPS tab
  7. Tap Start
  8. Allow location access
  9. Verify the distance shows two decimal places with a comma, and a muted unit after a space (for example 0,00 km or 0,00 mi)
  10. Go to Settings > Preferences > Language
  11. Select 中文 (简体)
  12. Repeat steps 4–8
  13. Verify the unit is muted and sits against the number with no space (for example 0.00公里 or 0.00英里)
  14. Go to Settings > Preferences > Language
  15. Select English
  16. Repeat steps 4–8
  17. Verify the number is bold with a dot decimal, and a muted unit comes after a space (for example 0.00 mi or 0.00 km)

Offline tests

N/A. Not required, it just a UI change.

QA Steps

Same as Tests step

PR Author Checklist

Mark all author checklist checked

@ahmedGaber93

Copy link
Copy Markdown
Contributor

@MelvinBot Mark this PR ready for review

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I updated the PR description:

  • Tests: replaced the TODO with your precondition and all 17 steps.
  • Offline tests: added "N/A. Not required, it just a UI change."
  • QA Steps: replaced the TODO with "Same as Tests step".
  • PR Author Checklist: checked every item.

I left the two "Verify that no errors appear in the JS console" boxes under Tests and QA Steps unchecked, because they aren't part of the author checklist. The Screenshots/Videos sections are still empty.


view run

@MelvinBot
MelvinBot marked this pull request as ready for review October 13, 2026 08:33
@MelvinBot
MelvinBot requested a review from a team as a code owner October 13, 2026 08:33
@melvin-bot
melvin-bot Bot requested a review from ahmedGaber93 October 13, 2026 08:33
@MelvinBot

Copy link
Copy Markdown
Contributor Author

I marked this PR ready for review.


view run

@melvin-bot
melvin-bot Bot requested review from JmillsExpensify and removed request for a team October 13, 2026 08:33
@melvin-bot

melvin-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown

@ahmedGaber93 Please 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 October 13, 2026 08:33
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-13T08:36:59.714384Z e3380e4 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@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: e3380e4938

ℹ️ 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".

part.type === 'unit' ? (
<Text
key="unit"
style={styles.colorMuted}

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 Preserve the unit's large text size

The nested Text does not inherit the outer counter's 22px size because the shared Text component applies its default fontSizeNormal whenever no size is supplied. Consequently, every localized unit is rendered at the normal 15px size next to the large distance number, whereas the previous raw unit string inherited styles.textXLarge; apply the counter's large text style to this nested unit as well.

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.

@MelvinBot fix this

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.

Fixed in a689661. The unit now uses [styles.iouAmountTextInput, styles.textXLarge, styles.colorMuted], the same styles the unit had on main.

The nested Text was also resetting the font to the regular face, not only the size. Text.tsx:50 defaults fontSize to the normal size, and Text.tsx:66 defaults the font family. Adding iouAmountTextInput brings back the headline font, and textXLarge brings back the large size. The unit stays muted.

ESLint and the React Compiler check pass on DistanceCounter.tsx:43. typecheck still fails only on the SplitTest.ts errors from main. I didn't check the size on a device.


view run

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.

This matches the production style now.

Screenshot 2026-10-13 at 12 13 26 PM Screenshot 2026-10-13 at 12 14 49 PM

…tanceCounter

Co-authored-by: ahmedGaber93 <ahmedGaber93@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team as a code owner October 13, 2026 08:46
@melvin-bot
melvin-bot Bot requested review from chuckdries and removed request for a team October 13, 2026 08:46
@melvin-bot

melvin-bot Bot commented Oct 13, 2026

Copy link
Copy Markdown

@chuckdries Please 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]

@codecov

codecov Bot commented Oct 13, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/libs/NumberFormatUtils/index.ts 100.00% <100.00%> (ø)
...questStepDistanceGPS/Waypoints/DistanceCounter.tsx 0.00% <0.00%> (ø)
... and 7 files with indirect coverage changes

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I merged main into this branch, which fixed the Jest and Android build failures. The PR diff is unchanged and still has only its three files.

  • test (job 3): Passes now.
  • build (developmentDebug, false): Passes now.
  • typecheck: Fails, but the cause is on main, not in this PR. tests/actions/IOUTest/SplitTest.ts:3323 and two similar calls are missing the new required reportDrafts param of UpdateSplitTransactionsParams. Other branches fail with the same error, for example fix/99930. I didn't fix it here because it's unrelated to this PR.
  • Check independent approval and checklist: These are expected to fail until the PR is reviewed and approved.

Once main fixes the type errors, merge main again or re-run typecheck.


view run

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

Copy link
Copy Markdown
Contributor Author

I didn't push a fix. The only real failure is still typecheck, and it comes from main, not this PR.

  • typecheck: tests/actions/IOUTest/SplitTest.ts:3323, :3420, and :3529 don't pass the required reportDrafts param of UpdateSplitTransactionsParams. This branch already includes the latest main (fac9cb9), and main hasn't changed since. Other branches fail with the same errors, including fix/99931, fix/99930, and feature/onyx-store-pr-5-recut.
  • Check independent approval and checklist: These should pass once the PR is reviewed and approved.

typecheck will pass after main gets a fix and you merge main into this branch again. If you want me to patch SplitTest.ts in this PR anyway, reply and I'll add it. That would add an unrelated file to the diff.


view run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

The current failing checks are unrelated to this PR, so I didn't push a fix. The PR only changes NumberFormatUtils, DistanceCounter.tsx, and NumberFormatUtilsTest.ts. The NumberFormatUtils change only adds a new formatDistanceToParts export.

  • typecheck: tests/actions/IOUTest/SplitTest.ts:3323, along with lines 3420 and 3529, fails with Property 'reportDrafts' is missing ... in type 'UpdateSplitTransactionsParams'. The same three errors appear on other PRs today, including 66387/part2-pr2-pr3, eliran/3002-receipt-image-load-timeout, and fix/99931. main needs the fix.
  • test (job 7): In IOURequestStepConfirmationPageTest.tsx, the test "should fallback to route report when transaction report matches the route and is not usable" expected "101" but got undefined. It tests report selection, not distance formatting. The same test also failed yesterday on the unrelated branch claude-showApproverRowForDynamicExternalWorkflow.
  • checklist and Check independent approval: These checks pass only after a reviewer completes the checklist and approves the PR.

Once main is fixed, merge main into this branch or re-run the checks.


view run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I didn't push a fix. The failing checks are the same ones I reported in my last comment, and none of them come from this PR's three files. main is still at fac9cb9, which this branch already includes, so merging main again won't help yet.

  • typecheck: tests/actions/IOUTest/SplitTest.ts:3323, along with lines 3420 and 3529, is missing the required reportDrafts param. These are the same errors other PRs hit today.
  • test (job 7): IOURequestStepConfirmationPageTest.tsx fails the report selection test "should fallback to route report when transaction report matches the route and is not usable". This test has nothing to do with distance formatting, and it also failed on an unrelated branch yesterday.
  • checklist and Check independent approval: These pass after a reviewer completes the checklist and approves the PR.

Once main has a fix, merge main into this branch or re-run the checks. If you want SplitTest.ts patched in this PR anyway, say so and I'll add it, but that puts an unrelated file in the diff.


view run

@ahmedGaber93

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible 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 checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified any copy / text that was added to the app 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 verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • 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.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this 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.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

Android: HybridApp Screenshot 2026-10-13 at 10 59 44 AM Screenshot 2026-10-13 at 11 03 29 AM Screenshot 2026-10-13 at 11 05 42 AM
Android: mWeb Chrome
iOS: HybridApp Screenshot 2026-10-13 at 11 12 21 AM Screenshot 2026-10-13 at 11 13 19 AM Simulator Screenshot - iPhone 16 Pro - 2026-10-13 at 12 12 34
iOS: mWeb Safari
MacOS: Chrome / Safari

@ahmedGaber93

Copy link
Copy Markdown
Contributor

The failed unit test and the typescript error are not related to this PR.

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I didn't push a fix. The two real failures come from main, not from this PR. This branch already includes the latest main (fac9cb9), so merging main again won't help.

  • typecheck: tests/actions/IOUTest/SplitTest.ts:3323 (also lines 3420 and 3529) is missing the required reportDrafts property for UpdateSplitTransactionsParams. Other PRs, such as korytko/wide-premount-3-router and fix/99931, fail with the same three errors.
  • test (job 7): IOURequestStepConfirmationPageTest.tsx fails in "should fallback to route report when transaction report matches the route and is not usable". This PR doesn't touch that file, and the same test also failed on an unrelated PR yesterday.
  • checklist and Check independent approval: These checks depend on the reviewer checklist and approvals, not on code.

Once main is fixed, merge main into this branch or re-run the checks.


view run

@ahmedGaber93 ahmedGaber93 left a comment

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.

LGTM!

@MelvinBot

Copy link
Copy Markdown
Contributor Author

The two failing checks are unrelated to this PR, so I didn't push a fix. Both come from code that came in when main was merged into this branch, not from the three files this PR changes.

  • typecheck: tests/actions/IOUTest/SplitTest.ts (lines 3323, 3420, and 3529) fails with TS2741: Property 'reportDrafts' is missing. The same three errors appear on other PRs' typecheck runs today, including fix/discard-modal-new-manual-expense-flow and korytko/wide-premount-3-router. The split test and IOU action files on main are identical to this branch, so main needs the fix.
  • test (job 7): In IOURequestStepConfirmationPageTest.tsx, the "should fallback to route report…" test failed with Expected: "101" Received: undefined. This is a known flaky test. [No QA][Scan] Stop the untouched-scan test leaking a late submit into later tests is open to fix it.

After main is fixed, merge main into this branch or re-run the checks.


view run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

I didn't push a fix, because nothing has changed since my last reply. Both failures still come from main, not from this PR.

  • typecheck: The TS2741: Property 'reportDrafts' is missing errors in tests/actions/IOUTest/SplitTest.ts are still on main. main is still at fac9cb9, which this branch already includes. Every recent typecheck run on other PRs fails too, including feat/liquid-glass-tab-bar, fix/99931, and korytko/wide-premount-3-router.
  • test (job 7): IOURequestStepConfirmationPageTest.tsx is a known flaky test. [No QA][Scan] Stop the untouched-scan test leaking a late submit into later tests is open to fix it.

When main has the typecheck fix, ask me again and I'll merge main into this branch.


view run

@chuckdries

Copy link
Copy Markdown
Contributor

CI should be fixed in main if you wanna merge again

@ahmedGaber93

Copy link
Copy Markdown
Contributor

@MelvinBot please merge main

…tanceCounter

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

Copy link
Copy Markdown
Contributor Author

Merged main into this branch and pushed it as 1c3d6dc. The merge had no conflicts.

Since this branch was last updated, main hasn't changed any file this PR touches. CI will run the full checks on the new commit.


view run

@ahmedGaber93

Copy link
Copy Markdown
Contributor

@chuckdries All checks have passed!

@chuckdries
chuckdries merged commit 5f749ef into main Oct 14, 2026
41 checks passed
@chuckdries
chuckdries deleted the claude-localizeGPSDistanceCounter branch October 14, 2026 17:21
@github-actions

Copy link
Copy Markdown
Contributor

🚧 chuckdries has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/chuckdries in version: 9.5.10-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No help site update is needed. This PR only changes how the GPS distance counter formats the number and unit for each language. It doesn't make any article sentence wrong. In English, the counter still shows values like 0.00 mi, which matches Distance-Expenses.md:197.


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/chuckdries in version: 9.5.12-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No help site update is needed. This PR only changes how the GPS distance counter formats the number and unit for each language, so no article sentence is now wrong. In English, the counter still shows 0.00, which matches Distance-Expenses.md:197.


view run

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to production by https://github.com/cristipaval in version: 9.5.12-1 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

Bundle Size Analysis (Sentry):

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

Labels

Melvin-Test-Android Melvin-Test-Web Triggers Melvin to run the testing steps of the PR on web

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants