Skip to content

Distance - Tax amount field shows negative amount briefly after editing amount to negative #103666

Open

Description

@applause-bot

If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.


Version Number: 9.5.7-0
Reproducible in staging?: Yes
Reproducible in production?: No
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #102175
Email or phone of affected tester (no customers): sidjosdiojsojo@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Mac 26.5 / Chrome
App Component: Money Requests

Action Performed:

Precondition:

  • Enable Taxes and Distance rates.
  • Enable Track tax in Distance rates settings.
  • Assign 5% tax rate to default distance rate and add non-zero tax reclaimable amount.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create a distance expense.
  4. Open the expense.
  5. Click Amount.
  6. Edit amount to negative and save it.

Expected Result:

Tax amount field will show negative amount after editing amount to negative.

Actual Result:

Tax amount field shows negative amount briefly and reverts to non-negative amount after editing amount to negative.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

To be added by Applause Leads

View all open jobs on GitHub

Applause Internal Information
Exported by: Mita Rachim
Bug ID: 7282548

Activity

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

    @applause-bot
    Author

    While Applause doesn't embed attachments for this bug, here are the links for quick view:
    https://platform.applause.com/services/links/v1/external/d9310eaa56a7cbfe5a14317c9790d0acdb627f3ae008a14ddd7b4785ed474c95

  3. melvin-bot commented on Oct 9, 2026

    @melvin-bot

    You have been assigned to this deploy blocker because you recently merged this PR: #102175

  4. melvin-bot commented on Oct 9, 2026

    @melvin-bot

    @grgia you have been assigned to this deploy blocker because you reviewed the offending PR: #102175

  5. melvin-bot commented on Oct 9, 2026

    @melvin-bot

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

  6. github-actions commented on Oct 9, 2026

    @github-actions
    Contributor

    👋 Friendly reminder that deploy blockers are time-sensitive ⏱ issues! Check out the open `StagingDeployCash` deploy checklist to see the list of PRs included in this release, then work quickly to do one of the following:

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

    @MelvinBot
    Contributor

    Deploy Blocker Analysis

    Causing PR: Show negative tax amount for negative expenses on the expense details page (Expensify/App#102175). Confidence: high.

    What happens: The PR removed Math.abs() from the tax amount on the expense details page (MoneyRequestView.tsx:380). The page now shows the stored sign. For distance expenses, the optimistic data holds a negative tax, but the server response stores a non-negative tax. So the negative value flashes, then reverts.

    Recommendation: Demote rather than revert. The final state matches production, which always showed a non-negative tax. The PR still fixes the sign for regular expenses. The distance tax sign returned by the server needs a separate internal follow-up. If you want a strict no-regression policy, reverting Expensify/App#102175 is clean. It touches 5 files and nothing else on the checklist depends on it.

    Investigation details
    • Expensify/App#102175 is on the current Deploy Checklist: New Expensify 2026-10-09. It is the only PR on the checklist that changes how the tax sign is displayed. Expensify/App#102511 changes distance split tax codes, not the sign.
    • On save, the app calculates tax from the new negative amount, so the tax is negative (IOUAmountSubmission.ts:675).
    • The optimistic update stores the tax with the expense-report sign (getUpdatedTransaction.ts:383-385). The display flips it back (TransactionUtils/index.ts:538-555), so the negative tax appears briefly.
    • The negative tax is sent in the request (UpdateMoneyRequest.ts:1986).
    • The success data only clears pending fields and errors (UpdateMoneyRequest.ts:2302-2310). The only client path that restores the old value is the failure data (L2313-2323), and no error was shown. So the reverted value most likely comes from the server response.
    • Not yet verified: the taxAmount sign in the UpdateMoneyRequestAmountAndCurrency response for a distance expense. Check it in the network tab to confirm.

    Next Steps: Reply with @MelvinBot revert this or @MelvinBot <your feedback> to refine this analysis.


    view run

  8. bernhardoj commented on Oct 10, 2026

    @bernhardoj
    Contributor

    @grgia This is a BE issue. Let's use an example:

    When the current distance amount is 100 and the tax amount is 10,

    (expected)
    transaction.amount is -100
    transaction.taxAmount is -10
    

    When we update the amount to a negative value, optimistically,

    (expected)
    transaction.modifiedAmount is 100
    transaction.taxAmount becomes 10
    

    The amounts sent to the API (UpdateMoneyRequestAmountAndCurrency) are negative (expected)

    Image

    But the API response returns the taxAmount as negative (not expected)

    Image
  9. grgia commented on Oct 12, 2026

    @grgia
    Contributor

    BE bug. Auth always stores distance tax negative, so the server response flips it back. End state matches prod, demoting and fixing in https://github.com/Expensify/Auth/pull/25277

  10. 15 remaining items

  11. grgia commented on Oct 29, 2026

    @grgia
    Contributor

    Not overdue, the distance fix is in https://github.com/Expensify/Auth/pull/25277 and out for review this week.

  12. melvin-bot commented on Nov 3, 2026

    @melvin-bot

    @grgia Eep! 4 days overdue now. Issues have feelings too...

  13. melvin-bot commented on Nov 4, 2026

    @melvin-bot

    @grgia Eep! 4 days overdue now. Issues have feelings too...

  14. melvin-bot commented on Nov 4, 2026

    @melvin-bot

    @grgia Huh... This is 4 days overdue. Who can take care of this?

  15. melvin-bot commented on Nov 5, 2026

    @melvin-bot

    @grgia Still overdue 6 days?! Let's take care of this!

  16. melvin-bot commented on Nov 9, 2026

    @melvin-bot

    @grgia 10 days overdue. Is anyone even seeing these? Hello?

  17. grgia commented on Nov 11, 2026

    @grgia
    Contributor

    Not overdue. The Auth fix is on production, the App re-land #104306 needs one more Auth change to the split message sign first.

  18. grgia commented on Nov 16, 2026

    @grgia
    Contributor

    Not overdue, still waiting on the Auth split message sign change before #104306 can re-land.

  19. expensify-chore-bot commented on Nov 19, 2026

    @expensify-chore-bot

    @grgia Whoops! This issue is 2 days overdue. Let's get this updated quick!

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

Metadata

Metadata

Assignees

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2EngineeringOverdue

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions