Skip to content

[Exploratory] Expense - Tax rate changes to 0% without system message on report when category change #99935

Closed

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: v9.4.64-0
Reproducible in staging?: Yes
Reproducible in production?: Yes
If this was caught during regression testing, add the test name, ID and link from BrowserStack: https://test-management.browserstack.com/projects/2219752/folder/53774853/test-cases/41237277?sort=%2Bidentifier
Email or phone of affected tester (no customers): leungbratt6asdadasd@gmail.com
Issue reported by: Applause Internal Team
Bug source: Exploratory - Significant User Experience Deterioration
Device used: Windows 10/Chrome
App Component: Chat Report View

Action Performed:

Preconditions: New user signs up with Taxes enabled in Workspace

  1. Open the New Dot app
  2. Navigate to Workspace chat
  3. Create an expense with merchant "Walmart", set tax rate to non-zero
  4. Wait until Concierge suggests the categories pill - select any
  5. Create an expense with merchant "Walmart", set tax rate to non-zero again
  6. Click on the expense to open details

Expected Result:

Concierge changes the tax rate; the user will be notified with a system message. If they don't recheck, they won't know the tax rate has changed on step 5

Actual Result:

After Concierge applies a new Category, the tax rate changes to 0% without a system message notice for the user

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7247039_1788150185112.category_taxes.mp4

View all open jobs on GitHub

Applause Internal Information
Exported by: Svetlana Lazutkina
Bug ID: 7247039

Issue OwnerCurrent Issue Owner: @mollfpr

Activity

  1. applause-bot commented on Aug 31, 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/3f77ced581ea0edbca33d2be8fa233cbcc27bfa3d7ad4acb5d31e5297d480210

  2. added
    Bug
    on Sep 5, 2026
  3. MelvinBot commented on Sep 5, 2026

    @MelvinBot
    Contributor

    Proposal

    Note: the root cause is on the backend, not in Expensify/App. This needs an internal engineer — see below.

    What is the root cause of that problem?

    When you tap a Concierge category pill, the App does not update the transaction. It posts the chosen category back to Concierge as a plain chat comment and locally hides the pills — nothing else:

    Code evidence for the pill path

    So both halves of the bug happen server-side: the backend applies the category, resets the tax rate, and does not emit a MODIFIED_EXPENSE report action describing the tax change. The App can already render exactly that message — ModifiedExpenseMessage.ts:454-476 handles tax rate and tax amount changes, and ModifiedExpenseMessage.ts:389-419 even appends "based on past activity" for AI-sourced changes. It simply never receives the tax fields.

    One rendering detail worth checking during the fix: the tax fragments require both keys of a pair (oldTaxRate + taxRate, or oldTaxAmount + taxAmount). If the backend sends only one, the fragment is silently dropped and the message degrades to the generic "changed the expense".

    What changes do you think we should make in order to solve the problem?

    This can't be fixed in Expensify/App — please escalate to an internal engineer with backend access. The backend needs to emit a MODIFIED_EXPENSE report action that includes the tax rate/amount change (both old and new values) whenever it changes tax as a side effect of applying a category.

    Related App-side gap (separate path, same shape)

    A manual category edit has the same missing-message problem, and this half is in App:

    • TransactionUtils/index.ts:1019-1027 rewrites taxCode/taxAmount/taxValue from the category's tax rule when the category changes.
    • CategoryUtils.ts:99-110 falls back to the workspace default rate when the picked category has no rule of its own — which is how a manually chosen rate silently becomes 0%.
    • But ReportUtils.ts:6429-6453 gates the tax fragments on taxCode/taxAmount being in transactionChanges, and a category edit passes {category} only — so the optimistic action records the category and nothing else. UpdateMoneyRequestTest.ts:190-220 locks this in today, so any fix must update that test.

    Note the suppression there is deliberate (the comments say tax messages are skipped when tax changes as a side effect of a currency change). Extending it to cover category-driven tax changes is a product decision, not just a bug fix, and it would need to stay in sync with the backend's version of the same message.

    What alternative solutions did you explore?

    • The App zeroes the tax optimistically on the pill path — ruled out: the pill path writes nothing to the transaction at all.
    • The App receives the message but filters it out — possible but unlikely; worth confirming from the report action payload for the repro transaction (does its originalMessage contain any taxRate/oldTaxRate keys, or only category/oldCategory + source: agentZero?). If it contains exactly one key of a pair, the fix flips to App-side.

    Confidence and what I couldn't verify

    Medium. The App-side evidence is direct and complete. I could not read the backend code, and my attempt to reproduce this in a live web session was blocked by test infrastructure (the browser session came up blank), so the backend behavior is inferred from the App evidence rather than observed.

    Possibly related issues


    Next Steps for Contributor+ team:
    To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/99935) to create a draft PR.
    To refine: @MelvinBot <your feedback>
    To reject: Explain why you are rejecting Melvin's proposal.


    view run · no recording available

  4. added
    Daily
    and removed on Sep 5, 2026
  5. added
    External
    on Sep 5, 2026
  6. melvin-bot commented on Sep 5, 2026

    @melvin-bot

    Triggered auto assignment to Contributor-plus team member for initial proposal review - @getusha (External)

  7. melvin-bot commented on Sep 5, 2026

    @melvin-bot

    Unable to auto-create job on Upwork. The BZ team member should create it manually for this issue.

  8. melvin-bot commented on Sep 9, 2026

    @melvin-bot

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

  9. 29 remaining items

  10. melvin-bot commented on Oct 8, 2026

    @melvin-bot

    Triggered auto assignment to @mollfpr, see https://stackoverflow.com/c/expensify/questions/7972 for more details.

  11. melvin-bot commented on Oct 13, 2026

    @melvin-bot

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

  12. mollfpr commented on Oct 14, 2026

    @mollfpr
    Contributor

    Yup, I agree Melvin proposal looks right to me.

    I will check the MODIFIED_EXPENSE payload for the repro transaction to confirm. If it has no tax keys, I will make the backend fix.

  13. mollfpr commented on Oct 19, 2026

    @mollfpr
    Contributor

    Requested retest.

  14. IuliiaHerets commented on Oct 19, 2026

    @IuliiaHerets

    Reproduced on Windows 10/Chrome/Prod build v9.5.12-1

    2026-10-19.12-39-12.mp4
  15. melvin-bot commented on Oct 22, 2026

    @melvin-bot

    @mollfpr Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!

  16. mollfpr commented on Oct 26, 2026

    @mollfpr
    Contributor

    I checked the retest video. The tax rate still changes to 0%, but now Concierge adds a system message in the expense thread: "changed the tax rate to 0% (previously 5%)". This is the expected result for this issue. Closing as completed.

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

Metadata

Metadata

Labels

BugDailyExternalNot a priority

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions