Skip to content

[Due for payment 2026-08-29] Expense - After editing tax, tax list shows outdated rate, tax field shows new rate #99138

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: 9.4.58-0
Reproducible in staging?: Yes
Reproducible in production?: N/A - new feature, doesn't exist in prod
If this was caught during regression testing, add the test name, ID and link from BrowserStack: #94434
Email or phone of affected tester (no customers): sdsiodjnosdjiodsj@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.
  1. Go to staging.new.expensify.com
  2. Go to workspace chat.
  3. Create an expense.
  4. Go to workspace settings > Taxes.
  5. Open the tax from Step 3.
  6. Edit the tax amount.
  7. Open the expense in Step 3.
  8. Click More > Split.
  9. Click on any split.
    → Tax field shows the edited rate.
  10. Click Tax field.

Expected Result:

Tax list will show the same selected rate as tax field in Step 9.

Actual Result:

Tax list shows the outdated rate as selected, but tax field shows new rate.

Workaround:

Unknown

Platforms:

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

Screenshots/Videos

Bug7238829_1787276542429.7.mp4

View all open jobs on GitHub

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

Issue OwnerCurrent Issue Owner: @hoangzinh

Activity

  1. applause-bot commented on Aug 21, 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/13e0aff98bfc894bd21a1f8b37bdaa036f0e912840fe2c9c55fdc61cb7509c75

  2. added
    DeployBlockerCashThis issue or pull request should block deployment
    BugSomething is broken. Auto assigns a BugZero manager.
    on Aug 21, 2026
  3. melvin-bot commented on Aug 21, 2026

    @melvin-bot

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

  4. melvin-bot commented on Aug 21, 2026

    @melvin-bot

    @luacmartins @hoangzinh you have been assigned to this deploy blocker because you reviewed the offending PR: #94434

  5. melvin-bot commented on Aug 21, 2026

    @melvin-bot

    @truph01 you have been assigned to this deploy blocker because you authored the offending PR: #94434

  6. github-actions commented on Aug 21, 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. melvin-bot commented on Aug 21, 2026

    @melvin-bot

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

  8. MelvinBot commented on Aug 21, 2026

    @MelvinBot
    Contributor

    Deploy Blocker Analysis

    Causing PR: Expensify/App#94434 (Split Expense tax/reimbursable/billable rows) — confirmed, high confidence. melvin-bot's automatic assignment was correct.

    Root Cause: The split-edit tax field and the tax picker list derive their displayed rate through two different helpers with divergent fallback behavior, so they disagree once a tax rate's value is edited in workspace settings:

    The split draft's taxValue is seeded from the parent transaction's historical value at SplitExpenseItems.ts:271 and never recomputed from the live policy — which is exactly what makes the two helpers diverge after an edit.

    Recommendation: Roll forward (targeted fix), not revert. This is a one-line display inconsistency inside a brand-new feature that doesn't exist in production. A revert would remove the entire feature (9 files); the fix is a one-line change. Align the field to the picker by having SplitExpenseEditPage.tsx:210 use getTaxRateTitle (matching the picker), or pass the same shouldFallbackToValue flag consistently on both sides. truph01 should confirm whether the intended UX is "show live rate" or "show stored historical rate" before landing.

    Reproduction mechanism (step-by-step)
    1. The expense stores taxValue = "10%" (old percentage) and a taxCode.
    2. User edits that tax code's rate in workspace settings → policy taxRate.value/modifiedName becomes "15%".
    3. The split draft still carries the stale taxValue = "10%" (seeded at split init).
    4. Field → getTaxName (no fallback) resolves by taxCode → returns current modifiedName → shows new rate "15%".
    5. List → getTaxRateTitle → getTaxName(..., true); since taxRate.value ("15%") !== transaction.taxValue ("10%"), it falls back to the stored taxValue → picker highlights old rate "10%".

    This matches the report exactly: field shows the edited rate, list shows the outdated rate as selected.

    Verification
    • PR feat: Add Tax, Billable, and Reimbursable selectors in the Split details page #94434 introduced both surfaces (the split-edit tax field block and the split routing in the picker are net-new in this PR).
    • Merge date (2026-08-20) and version (9.4.58-0) align with this deploy blocker; PR is in the open StagingDeployCash.
    • Staging-only / not in prod is consistent with a new feature.
    • Line references confirmed against 1465a4285a1f17e20fb7655fdb0008b48b4d8304.

    view run

  9. 3 remaining items

  10. MelvinBot commented on Aug 21, 2026

    @MelvinBot
    Contributor

    Good call — MoneyRequestView confirms the intended convention is fall back to the transaction's taxValue when it diverges from the resolved rate, and the split field is the only surface not doing that.

    How MoneyRequestView does it: the tax MenuItem title is taxRateValue, which shows the raw taxValue when the value has changed — MoneyRequestView.tsx:963. That's the same net behavior as getTaxName(..., shouldFallbackToValue = true). The tax picker already matches this: getTaxRateTitle reduces to getTaxName(policy, tx, true) on the non-moving edit path. So field and picker stay consistent everywhere except the split edit page.

    The split field is the outlier: SplitExpenseEditPage.tsx:210 calls getTaxName without the fallback flag (defaults to false), so it shows the current rate name while the picker it opens shows the stale taxValue.

    Recommended one-line fix — align it to the MoneyRequestView/picker convention:

    - const taxRateTitle = getTaxName(effectivePolicy, splitExpenseDraftTransaction);
    + const taxRateTitle = getTaxName(effectivePolicy, splitExpenseDraftTransaction, true);

    This makes the split field produce the identical string the picker computes via getTaxRateTitle, so both surfaces show the same rate.

    Reply with @MelvinBot implement this and I'll open a draft PR.


    view run

  11. truph01 commented on Aug 21, 2026

    @truph01
    Contributor

    @MelvinBot implement this

  12. MelvinBot commented on Aug 21, 2026

    @MelvinBot
    Contributor

    🤖 Draft PR created: #99153 — please mark it Ready for review when you're happy with it.

    What it does: Aligns the Split Expense edit page's tax field with the tax picker so they resolve the same rate. The field used getTaxName(...) (no fallback → live policy rate) while the picker uses getTaxRateTitle(...) (falls back to the transaction's stored taxValue). After a workspace tax-rate edit those disagreed — field showed the new rate, list highlighted the old one. The fix swaps the field to getTaxRateTitle(effectivePolicy, splitExpenseDraftTransaction, false).

    AI tests run locally
    • npm run lint-changed → ✅ pass
    • npm run typecheck-tsgo → ✅ pass (CI still gates on tsc)
    • getTaxRateTitle unit tests (npm test -- tests/unit/TransactionUtilsTest.ts -t getTaxRateTitle) → ✅ 6 passed
    • oxfmt (formatting) and react-compiler-compliance-check could not run in this sandbox (blocked commands). The change is a one-line swap of one scalar-returning helper for another inside an existing const — no new hooks, components, or JSX — so it's memoization-neutral and formatting-clean per the passing ESLint run. CI will confirm both.

    The human co-author needs to fill in the Tests/QA sections and attach platform screenshots/videos before marking the PR ready.


    view run

  13. melvin-bot commented on Aug 21, 2026

    @melvin-bot

    ⚠️ Looks like this issue was linked to a Deploy Blocker here

    If you are the assigned CME please investigate whether the linked PR caused a regression and leave a comment with the results.

    If a regression has occurred and you are the assigned CM follow the instructions here.

    If this regression could have been avoided please consider also proposing a recommendation to the PR checklist so that we can avoid it in the future.

  14. m-natarajan commented on Aug 21, 2026

    @m-natarajan

    Not repro, Win11/Chrome, v9.4.58-4

    Recording.3410.mp4
  15. Beamanator commented on Aug 22, 2026

    @Beamanator
    Contributor

    Great! Closing!

  16. changed the title [-]Expense - After editing tax, tax list shows outdated rate, tax field shows new rate[/-] [+][Due for payment 2026-08-29] Expense - After editing tax, tax list shows outdated rate, tax field shows new rate[/+] on Aug 22, 2026
  17. melvin-bot commented on Aug 22, 2026

    @melvin-bot

    @hoangzinh / @truph01

    The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.58-4 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:

    If no regressions arise, payment will be issued on 2026-08-29. 🎊

    The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the Contributor+ Checklist from here into a new comment on this GH and complete it. If you have the K2 extension, you can simply click: [this button]. If no checklist is needed for this issue, you can click: [no checklist button]

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

Metadata

Metadata

Labels

BugSomething is broken. Auto assigns a BugZero manager.DailyKSv2Engineering

Type

No type

Projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions