You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Due for payment 2026-06-17] [Due for payment 2026-06-16] Expense - Tax amount error field persists when tax amount does not exceed limit #92820
Version Number: 9.4.0-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:#92059 Email or phone of affected tester (no customers):jsodinjosdjsoinjsiojs@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:
Run Onyx.merge('betas', ['newManualExpenseFlow']); in console.
Enable Taxes in workspace settings.
Create 5% and 10% tax rate.
Set 5% tax rate as Workspace currency default.
Set 10% tax rate as Foreign currency default.
Go to staging.new.expensify.com
Go to workspace chat.
Click + > Create expense > Manual.
Enter amount 10.
Enter tax amount 0.90.
Enter merchant.
Click Create expense.
Change amount currency to foreign currency.
Expected Result:
Tax amount error field should dismiss because the current entered field is 0.90 which is below 0.91 limit.
Actual Result:
Tax amount error field persists when tax amount does not exceed limit.
👋 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:
Identify the pull request that introduced this issue and revert it.
Please re-state the problem that we are trying to solve in this issue.
In the new manual expense flow (newManualExpenseFlow beta), the inline tax amount error (Tax amount cannot be more than X) persists after the user changes the expense currency, even though the new currency raises the tax limit enough to make the entered tax amount valid. The error should clear once the tax amount no longer exceeds the limit.
What is the root cause of that problem?
The tax limit is computed from both the expense amount and the currency (via getCalculatedTaxAmount, which also picks up the currency's default tax rate). But the iou.error.invalidTaxAmount form error is stale state that is only cleared when the tax amount field itself is edited — never when the currency or expense amount changes.
The error display is driven purely by the form-error string, not by current validity:
AmountField.tsx:262 (handleAmountChange) clears only common.error.invalidAmount / common.error.fieldRequired
So after the currency change, the tax limit recalculates and getCalculatedTaxAmount now permits the entered amount, but nothing re-runs validation or clears the stale error. Validation (which would clear it) only re-runs on submit — useConfirmationValidation.ts:254-261.
What changes do you think we should make in order to solve the problem?
Clear the stale tax error whenever an input that feeds the tax limit changes. In AmountField.tsx, add 'iou.error.invalidTaxAmount' to the clearFormErrors calls in bothupdateCurrency and handleAmountChange:
// in updateCurrency (currently clears nothing)clearFormErrors(['iou.error.invalidTaxAmount']);// in handleAmountChangeclearFormErrors(['common.error.invalidAmount','common.error.fieldRequired','iou.error.invalidTaxAmount']);
This mirrors the existing pattern (TaxFields.handleTaxAmountChange already clears it on tax edit) — the tax amount is re-validated on submit, so optimistically clearing the stale error when its limit changes is safe and consistent.
What alternative solutions did you explore?
Instead of imperatively clearing on each handler, derive the error live: add a useEffect in TaxFields that re-runs isTaxAmountInvalid and clears iou.error.invalidTaxAmount whenever effectiveCurrency/maxTaxAmount/tax amount change. This is more robust against future inputs that affect the limit, but heavier than the targeted handler change above.
Next Steps for Contributor+ team: To accept:@MelvinBot implement [this](https://github.com/Expensify/App/issues/92820) to create a draft PR. To refine:@MelvinBot <your feedback> To reject: Explain why you are rejecting Melvin's proposal.
godzillaxbox19982014-lgtm commented on Jun 6, 2026
The local evidence matches this recurring failure shape: optimistic transaction/report data is written to one Onyx key but the visible list reads another derived key. Here, src/libs/ReportUtils.ts:11511 and src/libs/actions/IOU/types/TrackedExpenseParams.ts:65 do not agree on the same selected currency, workspace name, expense report value, so the user-visible path can show a missing or stale state even though nearby data already has the needed context.
What changes do you think we should make in order to solve the problem?
Update src/libs/ReportUtils.ts:11511 to derive selected currency, workspace name, expense report from the report/transaction source that owns this flow before the value is consumed.
Carry the same normalized value through src/libs/actions/IOU/types/TrackedExpenseParams.ts:65; that follows the safer family move to align optimistic/success/failure data with the selector consumed by the screen, so the write/optimistic/read paths agree instead of only changing the visible component.
Keep the change inside the Reports, Expenses, IOU, Transactions surface and avoid changing payment actions, personal/deleted policies.
What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
Add or update a regression in tests/unit/ReportUtils*.ts for the exact issue flow: Expense - Tax amount error field persists when tax amount does not exceed limit.
Cover the counter-case near src/libs/ReportUtils.ts:11511 so valid existing selected currency, workspace name, expense report behavior still works.
Manually repeat the issue steps after the patch and confirm the visible state/action is no longer stale.
What alternative solutions did you explore? (Optional)
I would not add a broad new condition outside these referenced paths; the safer fix is to keep selected currency, workspace name, expense report consistent at the first read/write boundary shown above.
changed the title [-]Expense - Tax amount error field persists when tax amount does not exceed limit[/-][+][Due for payment 2026-06-16] Expense - Tax amount error field persists when tax amount does not exceed limit[/+]on Jun 9, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.0-7 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@dukenv0307 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]
changed the title [-][Due for payment 2026-06-16] Expense - Tax amount error field persists when tax amount does not exceed limit[/-][+][Due for payment 2026-06-17] [Due for payment 2026-06-16] Expense - Tax amount error field persists when tax amount does not exceed limit[/+]on Jun 10, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.1-6 and is now subject to a 7-day regression period 📆. Here is the list of pull requests that resolve this issue:
@dukenv0307 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]
Activity
applause-bot commentedon Jun 5, 2026
While Applause doesn't embed attachments for this bug, here are the links for quick view:
https://platform.applause.com/services/links/v1/external/edd29950cf9194c58c9339144942d44d6b16180a76fd29ba85b728c376c573e4
melvin-bot commentedon Jun 5, 2026
@JS00001 recently merged #92059, but they are OOO right now, so I'll auto-assign someone else.
melvin-bot commentedon Jun 5, 2026
Triggered auto assignment to @lakchote (
DeployBlockerCash), see https://stackoverflowteams.com/c/expensify/questions/9980/ for more details.melvin-bot commentedon Jun 5, 2026
💬 A slack conversation has been started in #expensify-open-source
github-actions commentedon Jun 5, 2026
👋 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:
MelvinBot commentedon Jun 5, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
In the new manual expense flow (
newManualExpenseFlowbeta), the inline tax amount error (Tax amount cannot be more than X) persists after the user changes the expense currency, even though the new currency raises the tax limit enough to make the entered tax amount valid. The error should clear once the tax amount no longer exceeds the limit.What is the root cause of that problem?
The tax limit is computed from both the expense amount and the currency (via
getCalculatedTaxAmount, which also picks up the currency's default tax rate). But theiou.error.invalidTaxAmountform error is stale state that is only cleared when the tax amount field itself is edited — never when the currency or expense amount changes.The error display is driven purely by the form-error string, not by current validity:
TaxFields.tsx:68—shouldDisplayTaxAmountError = formError === 'iou.error.invalidTaxAmount'TaxFields.tsx:78The currency change handler updates the amount/currency but only clears amount errors, not the tax error:
AmountField.tsx:230-242(updateCurrency) clears nothingAmountField.tsx:262(handleAmountChange) clears onlycommon.error.invalidAmount/common.error.fieldRequiredSo after the currency change, the tax limit recalculates and
getCalculatedTaxAmountnow permits the entered amount, but nothing re-runs validation or clears the stale error. Validation (which would clear it) only re-runs on submit —useConfirmationValidation.ts:254-261.What changes do you think we should make in order to solve the problem?
Clear the stale tax error whenever an input that feeds the tax limit changes. In
AmountField.tsx, add'iou.error.invalidTaxAmount'to theclearFormErrorscalls in bothupdateCurrencyandhandleAmountChange:This mirrors the existing pattern (
TaxFields.handleTaxAmountChangealready clears it on tax edit) — the tax amount is re-validated on submit, so optimistically clearing the stale error when its limit changes is safe and consistent.What alternative solutions did you explore?
Instead of imperatively clearing on each handler, derive the error live: add a
useEffectinTaxFieldsthat re-runsisTaxAmountInvalidand clearsiou.error.invalidTaxAmountwhenevereffectiveCurrency/maxTaxAmount/tax amount change. This is more robust against future inputs that affect the limit, but heavier than the targeted handler change above.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/92820)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
godzillaxbox19982014-lgtm commentedon Jun 6, 2026
Proposal
Please re-state the problem that we are trying to solve in this issue.
Expense - Tax amount error field persists when tax amount does not exceed limit
What is the root cause of that problem?
I traced this to the path that handles
selected currency, workspace name, expense report:createDraftWorkspaceAndNavigateToConfirmationScreen):return createDraftWorkspaceAndNavigateToConfirmationScreen(introSelected, transactionID, actionName, '', currentUserAccountID, currentUserEmail, currentUserLocalCurrency);matching code path):createdWorkspaceParams?: CreateWorkspaceParams;matching code path):CreateWorkspaceParams,src/libs/ReportUtils.ts:11511andsrc/libs/actions/IOU/types/TrackedExpenseParams.ts:65do not agree on the sameselected currency, workspace name, expense reportvalue, so the user-visible path can show a missing or stale state even though nearby data already has the needed context.What changes do you think we should make in order to solve the problem?
src/libs/ReportUtils.ts:11511to deriveselected currency, workspace name, expense reportfrom the report/transaction source that owns this flow before the value is consumed.src/libs/actions/IOU/types/TrackedExpenseParams.ts:65; that follows the safer family move to align optimistic/success/failure data with the selector consumed by the screen, so the write/optimistic/read paths agree instead of only changing the visible component.What specific scenarios should we cover in automated tests to prevent reintroducing this issue in the future?
tests/unit/ReportUtils*.tsfor the exact issue flow: Expense - Tax amount error field persists when tax amount does not exceed limit.src/libs/ReportUtils.ts:11511so valid existingselected currency, workspace name, expense reportbehavior still works.What alternative solutions did you explore? (Optional)
selected currency, workspace name, expense reportconsistent at the first read/write boundary shown above.lakchote commentedon Jun 8, 2026
Not overdue - deploy blocker triage is active and the tax validation path is under investigation.
5 remaining items
m-natarajan commentedon Jun 9, 2026
issue not reproducible using Staging v9.4.0-5.
after step 7 , violation appear under tax field
Screen.Recording.2026-06-09.at.7.38.43.AM.mov
Julesssss commentedon Jun 9, 2026
Resolved blocker as main issue fixed and it's a new feature.
[-]Expense - Tax amount error field persists when tax amount does not exceed limit[/-][+][Due for payment 2026-06-16] Expense - Tax amount error field persists when tax amount does not exceed limit[/+]melvin-bot commentedon Jun 9, 2026
Reviewinglabel has been removed, please complete the "BugZero Checklist".melvin-bot commentedon Jun 9, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.0-7 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-06-16. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 9, 2026
@dukenv0307 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]
[-][Due for payment 2026-06-16] Expense - Tax amount error field persists when tax amount does not exceed limit[/-][+][Due for payment 2026-06-17] [Due for payment 2026-06-16] Expense - Tax amount error field persists when tax amount does not exceed limit[/+]melvin-bot commentedon Jun 10, 2026
The solution for this issue has been 🚀 deployed to production 🚀 in version 9.4.1-6 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-06-17. 🎊
For reference, here are some details about the assignees on this issue:
melvin-bot commentedon Jun 10, 2026
@dukenv0307 The PR fixing this issue has been merged! The following checklist (instructions) will need to be completed before the issue can be closed. Please copy/paste the BugZero 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]