Skip to content

Show distance rate editor amounts with meaningful decimal precision - #106708

Merged
neil-marcellini merged 4 commits into
mainfrom
claude-distanceRatePrecision
Nov 13, 2026
Merged

neil-marcellini merged 4 commits into
mainfrom
claude-distanceRatePrecision

Conversation

@MelvinBot

@MelvinBot MelvinBot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Reuse the existing Classic-compatible two-to-four-decimal rate formatting without forcing four trailing decimal places in the distance Rate and Tax reclaimable editors.

  • Extract the existing fraction-digit logic into a locale-neutral helper, reused by the localized rate display, both Rate editors, and the shared Tax reclaimable helper.
  • Compare amounts at four-decimal precision in all four unchanged-value checks so different padding does not resend an unchanged amount.
  • Keep storage conversions, input precision limits, localization, and table formatting unchanged.
  • Add unit coverage for the extracted helper, both inline unchanged-value checks, and government-rate matching, following the requested refinements.

AI Tests

  • Shared equality refactor (9000466): all three relevant unit suites passed individually, 911 tests total (808 + 49 + 54), including nine new comparison cases. Changed-file lint, full typecheck, explicit spelling, explicit React Compiler checks for both details editors, Storybook smoke test, diff whitespace check, and staged coding-standards review passed. Full lint and full Jest attempts timed out; automatic changed-file discovery was blocked by shallow history. The legacy Prettier script is absent and the replacement formatter check was unavailable. No new manual UI coverage is claimed for this behavior-preserving extraction.
  • Comment-only cleanup (17e4858): changed-file lint, all 11 helper-focused unit tests, diff whitespace check, and staged coding-standards review passed. Full lint, typecheck, Jest and Storybook attempts timed out; changed-file discovery was blocked by shallow history. The legacy Prettier script is absent; replacement formatting and explicit spelling invocations were unavailable. No runtime code changed and no UI retest was performed for this cleanup.
  • Passed: three relevant unit suites individually, 902 tests total (799 + 49 + 54).
  • Passed: full lint, changed-file lint, app and Jest TypeScript projects, changed-file spelling, explicit React Compiler checks for all three modified components, Storybook smoke test, and diff whitespace checks.
  • Automated coding-standards review: no violations.
  • Limitations: the full Jest run timed out after multiple suites passed; repository-wide type checking timed out, so app/Jest projects were checked separately. The matrix's Prettier script no longer exists, and attempts to invoke the replacement formatter were denied. React Compiler check-changed could not resolve an empty CI base ref; explicit component checks passed instead.
  • Added tests are unit-level as requested. Subsequent manual web and Android details-editor checks are recorded below; expanded coverage remains incomplete and is not claimed as passing.

Fixed Issues

$ #106594
PROPOSAL: #106594 (comment)

Tests

Execution status: The following is a repeatable test plan, not a claim that all steps passed. Earlier web and Android runs verified both details editors: saving 0.1 reopens as 0.10, and 0.123 / 0.1234 retain their precision. Current web run reproduced the blocked inline Rate Edit control; remaining expanded scenarios were not exercised. See Screenshots/Videos for evidence and limitations.

  1. Sign in as an admin of a disposable paid workspace. Open Workspaces → workspace → More features, enable Distance rates and Taxes, then open Distance rates → Settings and enable Track tax. Return to Distance rates. Use a desktop-width table for inline cases; a mobile list does not establish inline coverage.
  2. Create three custom rates named Two decimals, Three decimals, and Four decimals, initially with Rate 1.00. Select Tax Rate 1 (5%) for each, or another configured nonzero tax rate. Wait for saves to finish.
  3. Inline Rate: hover the Rate cell of Two decimals and click that cell's Edit control, not the row. Enter 0.1 and commit the inline edit. Reopen it and verify 0.10, not 0.1000. Repeat with Three decimals=0.123 and Four decimals=0.1234. Verify the table simultaneously shows 0.10, 0.123, and 0.1234. If clicking opens details instead, record inline coverage as blocked rather than passing.
  4. Rate details: open each row, select Rate, enter its corresponding amount from step 3, click Save, and reopen Rate. Verify the same two-/three-/four-decimal values. For Two decimals, save 0.1 when 0.10 is displayed and confirm it returns normally without an update request. Repeat the equivalent-value submission in the inline Rate cell while monitoring request traffic.
  5. Inline Tax reclaimable: first restore all three Rate amounts to 1.00 so every test tax amount is strictly smaller than Rate. In each row's Tax reclaimable cell, use its Edit control to save 0.1, 0.123, and 0.1234 respectively. Reopen each cell and verify 0.10, 0.123, and 0.1234; verify the mixed-precision table values too.
  6. Tax reclaimable details: open each row → Tax reclaimable, save its corresponding amount from step 5, and reopen. Verify the same values. In both tax editors, submit 0.1 against saved 0.10 and confirm no unnecessary update request is issued. Clear a custom reclaimable amount and save; verify it remains cleared after reopen.
  7. Validation: with Rate 1.00, try Tax reclaimable 1.00 and 1.01 in both inline and details editors. Verify rejection with a validation message and no persisted change. Cancel, reopen, and verify the last valid value remains. Confirm neither editor accepts precision beyond four decimal places as an additional stored decimal.
  8. Government fuel-band unchanged amount: use a disposable Control workspace with GBP currency and Distance rates → Settings → automatic government-rate updates enabled. Wait for genuine UK government fuel-band rows to load; do not rename or fabricate a custom rate. Record a row's fuel-band identity, Rate, reclaimable amount, dates, and government-managed status. In its details Rate and Tax reclaimable editors, save the same numeric amounts, including alternate trailing-zero padding where allowed; repeat in the inline cells. Verify no unnecessary update requests and no loss of government-managed status or change to its dates/source after returning and reopening. If no genuine fuel-band fixture is available, mark this case blocked. In a disposable fixture, separately verify a meaningful fourth-decimal change is not treated as an unchanged submission.
  9. Comma-decimal locale: open Settings → Preferences → Language, select Español, and return to the custom rates. Repeat steps 3–6 using 0,1, 0,123, and 0,1234. Verify localized inputs/display retain 0,10, 0,123, 0,1234, currency placement remains appropriate, and saved numeric amounts do not change by a factor of 100. Repeat equivalent-value saves (0,1 versus displayed 0,10) and validation. Restore the original language afterward.
  10. Inspect the JavaScript console throughout and request traffic for the four equivalent-value cases. Record errors or unavailable visibility rather than treating an uninspected console/request stream as clean.

Not completed: inline Rate/Tax reclaimable, government fixture, comma-decimal locale, invalid-value cases, mixed-precision fixture, console inspection, and equivalent-value request suppression. The current inline Edit click was rejected as covered by the row container, even after hover. No payment method was added or blocker bypassed.

Offline tests

Planned; not executed. Network manipulation was not attempted after the inline blocker.

  1. Online, load the custom rates and both details editors once; configure Rate 1.00 and a valid reclaimable amount. Wait for pending changes to settle, then disconnect the network using browser DevTools Offline (or the device network control).
  2. In each available editor (inline Rate, inline Tax reclaimable, Rate details, Tax reclaimable details), save 0.1234 and reopen. Verify four-decimal precision is retained locally and pending/offline feedback appears rather than a false server-confirmed result. Restore Rate 1.00 before testing the reclaimable amount.
  3. Save/reopen 0.1 and 0.123 in each editor; verify 0.10 and 0.123. Submit equivalent padding without introducing an additional queued update. Confirm an invalid reclaimable amount is still rejected while offline.
  4. Reconnect, wait for pending feedback to clear, navigate away and back, and verify the same values persist with no duplicate changes or errors. Repeat in Español with comma-decimal input.
  5. For an already-loaded genuine government fuel-band row, disconnect and resubmit its unchanged amounts. Reconnect and verify its government-managed status, source and dates remain intact. If the editor is intentionally unavailable offline, record that blocking state instead of claiming a successful offline save.

QA Steps

(Neil's AI agent)

  1. As a workspace admin, go to Workspaces → [workspace] → More features and enable Distance rates and Taxes.
  2. Open Distance rates → Settings and enable Track tax.
  3. Open a distance rate and make sure it has a tax rate selected.
  4. Open Rate, enter 0.1, save, and reopen Rate. Verify it shows 0.10, not 0.1000.
  5. Repeat step 4 with 0.123 and 0.1234. Verify each reopens with the same value.
  6. Set Rate back to 1.00, then repeat steps 4–5 in Tax reclaimable.
  7. On desktop web, repeat steps 4–6 using the inline edit button in the Rate and Tax reclaimable table cells.
  8. With Rate at 1.00, enter Tax reclaimable 1.01. Verify an error is shown and the value isn't saved.

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) — Not executed; blocked run stopped before offline testing.
    • 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). — No high-traffic fixture used.
  • I included screenshots or videos for tests on all platforms — Web and Android native partial evidence only; other platforms unavailable.
  • I ran the tests on all platforms & verified they passed on: — Full matrix has not passed.
    • Android: Native — Earlier details-editor checks passed; expanded plan incomplete.
    • Android: mWeb Chrome — Not run.
    • iOS: Native — No iOS device available.
    • iOS: mWeb Safari — No iOS Safari available.
    • MacOS: Chrome / Safari — Dev web evidence is not a macOS browser run.
  • 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) — Console inspection unavailable in the testing interface.
  • 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) — Not applicable: diff adds no UI copy.
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers — Existing helper logic was extracted; multi-engineer pattern approval not independently verified.
  • 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) — Shared-helper unit coverage exists, but complete affected UI coverage is missing.
  • If new assets were added or existing ones were modified, I verified that: — Not applicable: no assets changed.
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg) — Not applicable: no assets changed.
    • The assets load correctly across all supported platforms. — Not applicable: no assets changed.
  • 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. — Not applicable: no message-editing code changed.
  • 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) — Not applicable: no generic component changed; shared-helper UI coverage remains partial.
  • 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. — Earlier smoke test passed, but all related stories were not individually verified.
  • 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. — Signed-in/signed-out deeplink matrix not exercised.
  • 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: — Amount formatting changes; comprehensive design verification not performed.
    • I verified that all the inputs inside a form are aligned with each other. — Full form-alignment review not performed.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes. — No Design label or new design-team request added to this PR.
  • If the PR adds or modifies the UI: — Full accessibility review outstanding.
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings. — Functional tester is not a complete accessibility review.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order. — No VoiceOver/macOS available.
    • I verified all new/changed elements have meaningful accessible names and roles. — Entire affected UI not audited.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected). — Screen-reader announcements not tested.
  • 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. — No post-review merge/retest established in this run.

Screenshots/Videos

Android: Native

Earlier standalone Android run: details-editor normalization and 3–4 decimal save/reopen passed; inline cells were not exposed in the mobile list. This is partial coverage, not a full-platform pass. Full results · Recording.

Android Rate details editor reopened showing 0.10 Android Tax reclaimable details editor reopened showing 0.1234
Android: mWeb Chrome

Not run; this invocation only provides desktop web. Android native evidence above does not establish Android Chrome behavior.

iOS: Native

Not run; no iOS device available.

iOS: mWeb Safari

Not run; no iOS Safari available.

MacOS: Chrome / Safari

Not run on macOS; Linux dev web evidence below must not be counted as macOS Chrome/Safari coverage.

Web: dev NewDot (Linux)

Earlier run verified Rate and Tax reclaimable details editors normalize 0.1 to 0.10 and preserve 0.123 / 0.1234 after save/reopen. Inline interaction was blocked. Full results · Recording.

Web Rate details editor reopened showing 0.1234 Web Tax reclaimable details editor reopened showing 0.1234

Current run reproduced the inline Rate Edit blocker: the click was rejected as covered by the row container even after hover. Clicking the cell opened details instead, which was not counted as inline coverage. No precision values were changed during this run; tax, government, locale, offline, validation, console and request checks remain unverified.

Web Distance rates table at blocked inline Rate editing step

Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team November 12, 2026 11:52
@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 Nov 12, 2026
@MelvinBot

Copy link
Copy Markdown
Contributor Author

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

To copy the branch to your fork and push updates yourself, run these commands from your fork's local checkout (omit the first command if upstream already exists):

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

You can then open a replacement PR from your fork and close this upstream-branch PR.

@codecov

codecov Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

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

Files with missing lines Coverage Δ
...tanceRatesTable/WorkspaceDistanceRateValueCell.tsx 100.00% <100.00%> (ø)
src/libs/PolicyDistanceRatesUtils.ts 82.52% <100.00%> (ø)
src/libs/PolicyUtils/customUnits.ts 94.79% <100.00%> (+0.28%) ⬆️
src/libs/actions/Policy/InlineEdit.ts 62.18% <100.00%> (+5.88%) ⬆️
...Rates/PolicyDistanceRateTaxReclaimableEditPage.tsx 0.00% <0.00%> (ø)
...space/distanceRates/PolicyDistanceRateEditPage.tsx 0.00% <0.00%> (ø)
... and 33 files with indirect coverage changes

@MelvinBot

MelvinBot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Android test steps verification results: ⚠️ partial

Verified on standalone Android NewDot: rate and tax reclaimable details editors reopen 0.1 as 0.10 and preserve 0.123 and 0.1234 after saving. Inline coverage, mixed-precision table coverage, console checks, and unnecessary-update detection remain blocked.

Tax reclaimable details editor reopened showing 0.1234

Step Status
No JS console errors during testingConsole output could not be inspected; a clean console is unverified.
⚠️
Rate editors show 0.1 as 0.10Details editor passed save/reopen without four-decimal padding. Inline editing was inaccessible in the Android list layout.
Rate details editor reopened showing 0.10
⚠️
Tax reclaimable editors show 0.1 as 0.10Details editor passed save/reopen. Inline editing was inaccessible.
Saved details show tax reclaimable 0.10 and rate 0.1234 per mile
⚠️
Rate editors preserve 0.123 and 0.1234Both values passed separate save/reopen checks in the details editor. Inline editing was inaccessible.
Saved rate retains four-decimal precision
⚠️
Tax reclaimable editors preserve 0.123 and 0.1234Both values passed separate save/reopen checks in the details editor; 0.123 has read-back evidence only. Inline editing was inaccessible.
Tax reclaimable details editor reopened showing 0.1234
⚠️
Equivalent padded values avoid unnecessary updatesNot verified: update requests were not observable.
⚠️
Table preserves mixed decimal precisionNot verified: Android exposed a list rather than the table; a mixed-precision fixture was not tested.
⚠️

view run · view recording

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

Copy link
Copy Markdown
Contributor Author

Pushed 44023cb to fix the Oxfmt failure—a test call needed formatting only.

  • Passed: formatting, lint, typecheck, spelling, Storybook smoke test, and all 54 targeted tests.
  • Full Jest run timed out; changed-file lint was blocked by shallow Git history.
  • Independent approval still requires human action.

New CI checks are queued.


view run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

⚠️ Something went wrong. This may be a transient issue. Try again. If it persists, check status.openai.com.

Run details

@MelvinBot

MelvinBot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ⚠️ partial

Verified details-editor normalization and precision on dev NewDot web. Inline checks were blocked by covered controls and a payment-method reminder that could not be dismissed safely; no precision regression was observed.

Reopened Tax reclaimable details editor displaying saved 0.1234 with Rate 1.00

Step Status
No JS console errors during testingConsole inspection was unavailable; a clean console is unverified.
⚠️
Both Rate editors display saved 0.1 as 0.10Details editor passed: saved 0.1 reopened as 0.10, not 0.1000. Inline editor remains blocked.
⚠️
Both Tax reclaimable editors display saved 0.1 as 0.10Details editor passed: with Rate 1.00, saved tax amount 0.1 reopened as 0.10. Inline editor remains blocked.
⚠️
Both Rate editors preserve 0.123 and 0.1234 after save/reopenDetails editor passed both checks with exact read-back values. Inline editor remains blocked.
Reopened details Rate editor displaying saved 0.1234
⚠️
Both Tax reclaimable editors preserve 0.123 and 0.1234 after save/reopenDetails editor passed both checks with Rate 1.00. Inline controls were covered, and a payment-method reminder subsequently blocked interaction.
Reopened Tax reclaimable details editor displaying saved 0.1234 with Rate 1.00
⚠️
Equivalent-value submissions avoid unnecessary updates in all four editorsNot verified: update-request behavior was not observable.
⚠️
Table preserves mixed two-, three-, and four-decimal amountsTwo- and four-decimal values were observed, but a simultaneous mixed-precision fixture was not completed.
⚠️

view run · view recording

@Krishna2323 Krishna2323 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.

@MelvinBot please do the following on this PR:

  1. Complete the PR description: fill in Tests, Offline tests, and QA Steps with exact steps covering the inline table cells (Rate and Tax reclaimable), both details editors, a government fuel-band rate saved with the same amount, and a comma-decimal locale. Add screenshots/videos for every platform you can run.
  2. Tick every Author Checklist item you have actually verified, and leave the ones you could not verify unticked with a short note why.
  3. Mark the PR ready for review.

Comment thread src/libs/PolicyUtils/customUnits.ts Outdated
function getRateValueWithDecimals(value: number): string {
const numValue = parseFloat(value.toFixed(CONST.MAX_TAX_RATE_DECIMAL_PLACES));
const decimalPart = numValue.toString().split('.').at(1) ?? '';
// Set the fraction digits to be between 2 and 4 (OD Behavior)

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 remove the // Set the fraction digits to be between 2 and 4 (OD Behavior) comment in getRateValueWithDecimals (src/libs/PolicyUtils/customUnits.ts). It restates the code, and the JSDoc above already explains the intent.

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.

Removed the redundant comment and pushed 17e4858. JSDoc and behavior are unchanged.

Changed-file lint and all 11 helper tests passed. Broader check limitations are documented in the PR.


view run

@MelvinBot
MelvinBot marked this pull request as ready for review November 12, 2026 14:39
@MelvinBot
MelvinBot requested a review from a team as a code owner November 12, 2026 14:39
@melvin-bot
melvin-bot Bot requested review from Krishna2323 and removed request for a team November 12, 2026 14:39
@melvin-bot

melvin-bot Bot commented Nov 12, 2026

Copy link
Copy Markdown

@Krishna2323 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 requested review from joekaufmanexpensify and removed request for a team November 12, 2026 14:39
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

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

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T14:42:22.005961Z 44023cb 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.

@MelvinBot

MelvinBot commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor Author

🤖 Web test steps verification results: ⚠️ partial

Updated the PR description with detailed Tests, Offline tests, QA Steps, existing web/Android evidence, and checklist notes; marked it ready for review. Current web verification stopped at the covered inline Rate Edit control, leaving expanded scenarios unverified.

Web Distance rates table at blocked inline Rate editing step

Step Status
Inline table Rate editorEdit remained covered after hover. Clicking the cell opened details instead, which was not counted as inline coverage.
Web Distance rates table at blocked inline Rate editing step
⚠️
Four-editor precision, validation, government unchanged save, comma-decimal locale, and offline persistenceNot exercised in this run. Exact procedures are documented as planned—not passed. Earlier details-editor evidence is included separately.
⚠️
Console errors and unnecessary update requestsNot verified: console visibility was unavailable and no equivalent-value save occurred.
⚠️

view run · view recording

Co-authored-by: Krishna <Krishna2323@users.noreply.github.com>
@MelvinBot
MelvinBot requested a review from a team as a code owner November 12, 2026 14:49
@melvin-bot
melvin-bot Bot requested review from neil-marcellini and removed request for a team November 12, 2026 14:49
@melvin-bot

melvin-bot Bot commented Nov 12, 2026

Copy link
Copy Markdown

@neil-marcellini 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]

@MelvinBot

Copy link
Copy Markdown
Contributor Author

The current failures are unrelated to this PR, so I haven’t pushed unrelated changes:

  • Oxlint: the base branch’s Search test has 25 deprecated references against an allowance of 21. This PR changes neither that test nor the allowance.
  • Jest job 4: an unchanged workspace-role test expects one “New” badge, but the base branch renders two.
  • Checklist and independent approval: require human completion.

The previous formatting fix is passing. The two base-branch failures need separate fixes before rerunning these checks.


view run

@MelvinBot

Copy link
Copy Markdown
Contributor Author

Rechecked the latest results: the same unrelated failures remain, so no new commit was pushed.

  • Oxlint: base-branch Search tests contain 25 deprecated references; the allowance is 21.
  • Jest job 4: the unchanged role test expects one “New” badge, while two are rendered. The other seven Jest shards passed.
  • Checklist and independent approval: still require human completion.

Neither failing code path is changed by this PR. These need separate base-branch fixes, not changes to the distance-rate implementation. Formatting, typecheck, and React Compiler checks are passing.


view run

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

Copy link
Copy Markdown
Contributor Author

⚠️ Something went wrong. This may be a transient issue. Try again. If it persists, check status.openai.com.

Run details

@joekaufmanexpensify joekaufmanexpensify 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.

Good for product

@neil-marcellini neil-marcellini 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.

Good to go. I'm simplifying the QA steps for you.

@Krishna2323

Copy link
Copy Markdown
Contributor

@neil-marcellini I still need to complete the reviewer checklist. I'll take care of that very shortly.

@Krishna2323

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 proper code patterns were followed (see Reviewing the code)
    • I verified that any callback methods that were added or modified are named for what the method does and never what callback they handle (i.e. toggleReport and not onIconClick).
    • 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 verified that this PR follows the guidelines as stated in the Review Guidelines
  • 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 and each prop has a /** comment above it */
    • The file is named correctly
    • 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
    • For Class Components, any internal methods passed to components event handlers are bound to this properly so there are no scoping issues (i.e. for onClick={this.submit} the method this.submit should be bound to this in the constructor)
    • Any internal methods bound to this are necessary to be bound (i.e. avoid this.submit = this.submit.bind(this); if this.submit is never passed to a component event handler like onClick)
    • All JSX used for rendering exists in the render method
    • 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 any new file was added I verified that:
    • The file has a description of what it does and/or why is needed at the top of the file if the code is not self explanatory
  • 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 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.
  • 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
android_hybrid.mp4
Android: mWeb Chrome
android_mWeb.mp4
iOS: HybridApp
ios_hybrid.mp4
iOS: mWeb Safari
ios_mWeb.mp4
MacOS: Chrome / Safari
web_chrome.mp4

@Krishna2323 Krishna2323 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!

@melvin-bot
melvin-bot Bot requested a review from neil-marcellini November 13, 2026 17:47
@Krishna2323

Copy link
Copy Markdown
Contributor

@neil-marcellini ready for review!

@neil-marcellini
neil-marcellini merged commit 38f2b98 into main Nov 13, 2026
48 of 51 checks passed
@neil-marcellini
neil-marcellini deleted the claude-distanceRatePrecision branch November 13, 2026 18:11
@github-actions

Copy link
Copy Markdown
Contributor

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

@github-actions

Copy link
Copy Markdown
Contributor

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/neil-marcellini in version: 9.5.40-0 🚀

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

@MelvinBot

Copy link
Copy Markdown
Contributor Author

No help site update needed — this fixes unnecessary trailing zeros in existing distance-rate editors without adding a workflow or making any existing article sentence incorrect.


view run

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.

5 participants