[$175] [Exploratory] Distance - Can't delete Tax RBR on distance expense after move to another Workspace
If you haven’t already, check out our contributing guidelines for onboarding. To join our Slack channel, fill out this form.
Version Number: v9.5.42-1 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/test-runs/84633038/folder/57599980/152206946/1991203578?sort=%2Bidentifier Email or phone of affected tester (no customers): [email protected] 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 User has two group workspaces, A and B, both with distance rates enabled and only one rate with different default rates Workspace A has a Tax rate set to a Default distance rate Workspace A contains a map distance expense added to a report, and Workspace B contains an empty report
- Open the New Dot app
- Navigate to Distance expense detail in Workspace A
- Click on Report - Select the empty report in Workspace B
- Navigate and click on the distance expense in Workspace B
- Click on the Tax field
Expected Result:
The Tax field should display a delete modal when clicked and can be deleted (like with Category or Tag RBR when no longer valid)
Actual Result:
Nothing happen
Workaround:
Unknown
Platforms:
- [x] Android: App
- [ ] Android: mWeb Chrome
- [x] iOS: App
- [ ] iOS: mWeb Safari
- [ ] iOS: mWeb Chrome
- [x] Windows: Chrome
- [ ] MacOS: Chrome Safari
Screenshots/Videos
https://github.com/user-attachments/assets/d5fbec3c-f0aa-445b-a445-342fd74bf481
Applause Internal Information Exported by: Julia Ponikarchuk Bug ID: 7318529
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022124889248040362197
- Upwork Job ID: 2124889248040362197
- Last Price Increase: 2026-11-23
While Applause doesn't embed attachments for this bug, here are the links for quick view: https://platform.applause.com/services/links/v1/external/f256668fc0a76daf1d0511c5e21d0236b1193e0ef084d5c731b290d086008e3d
Triggered auto assignment to Contributor-plus team member for initial proposal review - @jayeshmangwani (External)
Job added to Upwork: https://www.upwork.com/jobs/~022124889248040362197
Proposal
What is the root cause of that problem?
Confidence: Medium — supported by code; web reproduction was blocked.
The Tax field uses the same permission check for editing tax and removing invalid tax. That check excludes all distance expenses. Consequently, an invalid Tax row can display an RBR but has no click handler. The removal confirmation also contains the same restriction, so enabling the click alone would not fix deletion.
Code evidence and symptom chain
- Moving the expense can replace its distance rate with the destination workspace’s default while preserving its original tax fields: Transaction.ts:1315–1438.
- Retained tax produces
taxOutOfPolicywhen destination tax tracking is disabled or the carried tax code is unavailable/disabled: ViolationsUtils.ts:1187–1198. canEditTaxFields = canEdit && !isDistanceRequestblocks distance expenses: MoneyRequestView.tsx:447. The Tax row’s entire click handler depends on it: MoneyRequestView.tsx:1645–1686.- The removal confirmation independently rejects the same case: MoneyRequestView.tsx:912–946.
This explains the no-op even when the user otherwise has permission to edit the expense; a failed API request is not needed to explain it.
What changes do you think we should make in order to solve the problem?
Separate permission to remove invalid tax from permission to edit valid tax:
- Allow an editable distance expense to open the removal modal when its retained tax qualifies for removal.
- Update both the row interaction and confirmation guard; keep valid distance-tax fields non-editable.
- Reuse the existing removal action, clearing the tax code, value, and amount together.
- Cover confirmation, cancellation, read-only permissions, valid distance tax, and both Tax rows in regression tests.
Scope to confirm: The existing modal condition covers disabled tax tracking, not every invalid-code RBR. The issue does not specify Workspace B’s tax settings. Verify whether B has disabled distance-tax tracking or enabled tracking with an unavailable code before deciding whether that condition also needs extending.
Removal condition and regression coverage
The current removal condition is at MoneyRequestView.tsx:632–634. Existing clearing behavior is at MoneyRequestView.tsx:923–946. Extend the disabled-tax UI coverage in MoneyRequestViewTest.tsx:568–612.
Automatically recalculating tax during moves is a separate behavior change, not necessary to explain the missing removal interaction.
Web verification — blocked
🤖 Web test steps verification results: ❌ fail
The tester encountered a blank development web page. This is an environment failure, not confirmation that the reported bug reproduces.

| Step | Status |
|---|---|
1. Open app with required preconditionsBlank page; snapshots returned zero nodes after retry.![]() |
❌ |
2. Open Workspace A expenseBlocked; not executed. |
❌ |
3. Move expense to Workspace B reportBlocked; not executed. |
❌ |
4. Inspect moved expense’s Tax RBRBlocked; not executed. |
❌ |
5. Click Tax and inspect removal modalBlocked; not executed. |
❌ |
Possibly related: Default tax rate of different workspace shown in the other workspace expense also concerns carried tax across workspaces, but is not a confirmed duplicate.
Next Steps for Contributor+ team:
To accept: @MelvinBot implement [this](https://github.com/Expensify/App/issues/107360) 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
⚠️ Invalid email. Please make sure to create an Expensify account with this email first here.
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
Proposal
Please re-state the problem that we are trying to solve in this issue.
After moving a distance expense that carries a tax rate from Workspace A to an empty report in Workspace B, the moved distance expense displays a Tax no longer valid (taxOutOfPolicy) RBR on the Tax field (alongside the carried-over tax amount), but clicking the Tax field does nothing — no delete confirmation modal opens, so the user cannot remove the invalid tax and clear the RBR.
What is the root cause of that problem?
In src/components/ReportActionItem/MoneyRequestView.tsx, permission to delete an invalid/disabled tax is coupled to canEditTaxFields, which unconditionally excludes distance expenses, and the removal alert condition only covers disabled tax tracking (!isTaxEnabled) rather than all out-of-policy distance tax cases:
canEditTaxFieldsblocks every distance expense (MoneyRequestView.tsx:447):const canEditTaxFields = canEdit && !isDistanceRequest;is used to gate:- The
onPresshandler on both theTaxrow (lines 1656-1675) andTax amountrow (lines 1702-1721), making both rows completely non-interactive on distance expenses. <MenuItem.Chevron />and<MenuItem.Copy />on both rows (lines 1684-1685, 1729-1730).- The confirmation guard inside
showTaxDisabledAlert(line 921:if (action !== ModalActions.CONFIRM || !canEditTaxFields) { return; }), which would still abort deletion even if the modal were opened.
- The
- Incomplete removal condition for moved distance expenses (
MoneyRequestView.tsx:632-634vsViolationsUtils.ts:1192-1193):ViolationsUtils.ts:1192-1193emitsCONST.VIOLATIONS.TAX_OUT_OF_POLICYboth when distance tax tracking is disabled on Workspace B (!isPolicyTrackTaxEnabled && hasTransactionTaxData) and when Workspace B has distance tax tracking enabled (isPolicyTrackTaxEnabled) but Workspace A's carried-overtaxCodeis missing or disabled in Workspace B (!!updatedTransaction.taxCode && !isTaxRateValid).MoneyRequestView.tsx:633only setsshouldShowTaxDisabledAlert = !isTaxEnabled && !!transaction?.taxCode && !isTimeRequest && !isPerDiemRequest. For a distance expense moved to Workspace B where distance tax tracking is enabled (isTaxEnabled === true) but Workspace A's tax code does not exist in Workspace B,shouldShowTaxDisabledAlertisfalseeven though the expense has ataxOutOfPolicyRBR and cannot openMONEY_REQUEST_STEP_TAX_RATE(since distance tax is derived from the distance rate, not manually editable). Checking onlyshouldShowTaxDisabledAlertwould leave that case unremovable, and checking only!!transaction?.taxCodealso misses residualtaxValue/taxAmountdata thatViolationsUtils.ts:1192flags.
What changes do you think we should make in order to solve the problem?
In src/components/ReportActionItem/MoneyRequestView.tsx:
- Decouple invalid-tax removal from general tax editing:
- Compute
hasTransactionTaxData = !!transaction?.taxCode || !!transaction?.taxValue || !!transaction?.taxAmount(matchingViolationsUtils.ts:1192) andhasTaxOutOfPolicyViolation = transactionViolations.some((violation) => violation.name === CONST.VIOLATIONS.TAX_OUT_OF_POLICY). - Update
shouldShowTaxDisabledAlert = !isTaxEnabled && hasTransactionTaxData && !isTimeRequest && !isPerDiemRequest. - Define
shouldShowTaxRemovalAlert = shouldShowTaxDisabledAlert || (isDistanceRequest && hasTransactionTaxData && hasTaxOutOfPolicyViolation)andcanRemoveTax = canEdit && shouldShowTaxRemovalAlert. - Define
canPressTaxFields = canEditTaxFields || canRemoveTax.
- Compute
- Wire
canPressTaxFields/canRemoveTaxacross both Tax rows and the confirmation callback:- In
showTaxDisabledAlert(line 921), replace!canEditTaxFieldswith!canPressTaxFields(or!canEdit || !shouldShowTaxRemovalAlert) so confirming clearstaxCode: '',taxValue: '', andtaxAmount: 0viaupdateMoneyRequestTaxRate— which also clearstaxOutOfPolicyviaViolationsUtils.getViolationsOnyxData. - On both the
Taxrow (lines 1656-1686) andTax amountrow (lines 1702-1731):- Gate
onPress,<MenuItem.Chevron />, and<MenuItem.Copy />oncanPressTaxFieldsinstead ofcanEditTaxFields. - Inside
onPress, checkif (shouldShowTaxRemovalAlert) { showTaxDisabledAlert(); return; }before navigating toMONEY_REQUEST_STEP_TAX_RATE/MONEY_REQUEST_STEP_TAX_AMOUNT(and keepif (!canEditTaxFields) { return; }as an explicit safeguard so distance expenses never navigate to manual tax-editing screens).
- Gate
- Valid distance expenses (where
shouldShowTaxRemovalAlertisfalse) and read-only distance expenses (canEdit === false) retaincanPressTaxFields === false, keeping their tax rows non-editable with the Copy icon.
- In
- Add unit/UI regression tests in
tests/ui/MoneyRequestViewTest.tsx:- Distance expense moved to a workspace with distance tax disabled (
taxOutOfPolicy+!isTaxEnabled): bothTaxandTax amountshow a chevron, pressing either opens the delete confirmation modal, confirming callsupdateMoneyRequestTaxRatewith empty tax code/value and0tax amount, and cancelling leaves tax untouched. - Distance expense moved to a workspace with distance tax enabled but an out-of-policy carried-over
taxCode(taxOutOfPolicy+isTaxEnabled): pressingTaxopens the delete confirmation modal rather than doing nothing or opening the manual tax picker. - Distance expense with a valid tax rate on the destination workspace, and read-only distance expense (
canEdit === false): bothTaxandTax amountremain non-clickable with no chevron.
- Distance expense moved to a workspace with distance tax disabled (
What alternative solutions did you explore? (Optional)
- Extending only
shouldShowTaxDisabledAlertwithout handlingisDistanceRequest && hasTaxOutOfPolicyViolation: Would fix the case where Workspace B has tax tracking disabled, but would still leave a distance expense stuck with an unclickableTax no longer validRBR whenever Workspace B has distance tax tracking enabled and Workspace A'staxCodedoesn't exist on Workspace B. - Allowing distance expenses to navigate to
MONEY_REQUEST_STEP_TAX_RATE(canEditTaxFields = canEdit): Incorrect because distance expense tax rates are governed by the workspace's distance rate configuration rather than arbitrary manual selection. - Silently wiping or recalculating tax inside
changeTransactionsReport(Transaction.ts:1325-1438): Would change cross-workspace move semantics (tracked separately in #103305) rather than matching the expected Category/Tag RBR delete-modal UX requested here, and would not help already-moved expenses that currently carry an invalid tax.
@jayeshmangwani Whoops! This issue is 2 days overdue. Let's get this updated quick!