Repository navigation
Description
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.1-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: #100389
Email or phone of affected tester (no customers): ibellicotest+3215@gmail.com
Issue reported by: Applause Internal Team
Bug source: Pull Request QA execution
Device used: Motorola MotoG60 / Android 12 (Hybrid app) - Windows 11 / Chrome
App Component: Workspace Settings
Action Performed:
Prerequisite: User is owner of a "Control" workspace with "Rules" enabled.
- Open the staging.new.expensify.com website.
- Navigate to "Workspaces" > Workspace > "Rules" > "Expense Defaults"
- Turn off internet connection.
- Click on "Add Rule" > "Apply expense defaults" > "Category"
- Select any category and any tax and save the rule.
- Note that rule is created, but is not displayed grayed out, despite being created offline.
- Turn on internet connection.
- Note that rule remains.
- Turn off internet connection again.
- Select and delete the rule.
- Note that rule disappears automatically instead of being grayed out.
Expected Result:
Rule created offline should be displayed grayed out. Same behavior with a strikethrough should be experienced when deleting it offline.
Actual Result:
Category tax rule created offline is not displayed grayed out and it disappears automatically when deleted offline.
Workaround:
Unknown
Platforms:
- Android: App
- Android: mWeb Chrome
- iOS: App
- iOS: mWeb Safari
- iOS: mWeb Chrome
- Windows: Chrome
- MacOS: Chrome Safari
Screenshots/Videos
Bug7274866_1790905644926.Rule_off.1.mp4
Applause Internal Information
Exported by: Julia Ponikarchuk
Bug ID: 7274866
Upwork Automation - Do Not Edit
- Upwork Job URL: https://www.upwork.com/jobs/~022105983619827816635
- Upwork Job ID: 2105983619827816635
- Last Price Increase: 2026-10-02
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsNo status
Activity
applause-bot commentedon Oct 2, 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/17ba54cf58a51c2d5888b23c4da658521d8a6bea3a4467fa0a4eb5152f06e255
MelvinBot commentedon Oct 2, 2026
Proposal
What is the root cause of that problem?
This isn't a regression from Add rules engine types and merchant rule AST helpers, and it already happens in production. It was a deliberate choice made in Add category tax defaults to Expense defaults.
Category tax rules live in a plain array (
policy.rules.expenseRules), so a single rule has nowhere to store apendingAction:setPolicyCategoryTaxeswrites the new rule with no pending flag, so the row is never grayed out.deletePolicyCategoryTaxesremoves the rule from the array right away, so there is nothing left to strike through.CategoryTaxRulesUtils.ts:156-171only shows a pending state when the rule's category or tax rate is being deleted.The reviewer reported both bugs on PR #99420. The author called them a "known tradeoff": clearing a flag inside the array needs
successDatathat rewrites the whole array, and queued writes can then replay stale arrays over each other.JS00001agreed to keep it "for now until we migrate to the new rules format".What changes do you think we should make in order to solve the problem?
Put this issue on hold, or close it as a known limitation, until category tax defaults move into the keyed
rules_collection. Merchant rules already use that collection, and they gray out and strike through correctly through per-keypendingAction(seeRules.ts:259-283). Category rules get the same behavior once they move.What alternative solutions did you explore? (Optional)
Here is a possible App-only stopgap, which I haven't tested:
pendingCategoryTaxRules: {[categoryName]: {pendingAction, taxID}}.pendingAction. Set it back tonullin bothsuccessDataandfailureData. Because each write touches only one key, this avoids the stale-array replay problem.getCategoryTaxRulesTableData, read the pending state from that object. While offline, keep rendering rows that are pending deletion.This is more work than the planned migration covers, so it needs an internal decision first.
Investigation details
WorkspaceExpenseDefaultsTableRow.tsx:113passesitem.pendingActiontoofflineWithFeedbackwithshouldHideOnDelete: false. It just never gets a value for category rows.ExpenseRuletype has nopendingActionorerrorsfield (Policy.ts:3256-3271). An earlier commit in PR Add category tax defaults to Expense defaults #99420 added these fields, and commitdc9c34f9a97removed them before merge. The comment abovedeletePolicyCategoryTaxesexplains why.Category.tsorCategoryTaxRulesUtils.ts. It's linked only because QA found the bug while testing it.Next Steps for Contributor+ team:
To accept:
@MelvinBot implement [this](https://github.com/Expensify/App/issues/102878)to create a draft PR.To refine:
@MelvinBot <your feedback>To reject: Explain why you are rejecting Melvin's proposal.
view run
melvin-bot commentedon Oct 2, 2026
Triggered auto assignment to Contributor-plus team member for initial proposal review - @aimane-chnaif (
External)[-]Rules - Category tax rule created offline is not grayed out.[/-][+][$175] Rules - Category tax rule created offline is not grayed out.[/+]melvin-bot commentedon Oct 2, 2026
Job added to Upwork: https://www.upwork.com/jobs/~022105983619827816635
ProjectsNexus commentedon Oct 2, 2026
Hi there! We saw the issue with the offline category tax rule not being grayed out and disappearing on delete. Our React Native experts can fix this behavior quickly and ensure it works across Android and web. Could we discuss the scope and timeline via the Upwork job link you shared?
melvin-bot commentedon Oct 2, 2026
📣 @ProjectsNexus! 📣
Hey, it seems we don’t have your contributor details yet! You'll only have to do this once, and this is how we'll hire you on Upwork.
Please follow these steps:
Format:
camesenin commentedon Oct 2, 2026
camesenin commentedon Oct 2, 2026
melvin-bot commentedon Oct 2, 2026
✅ Contributor details stored successfully. Thank you for contributing to Expensify!
15 remaining items
melvin-bot commentedon Oct 28, 2026
@aimane-chnaif, @situchan Uh oh! This issue is overdue by 2 days. Don't forget to update your issues!
melvin-bot commentedon Oct 30, 2026
@aimane-chnaif @situchan this issue is now 4 weeks old, please consider:
Thanks!
melvin-bot commentedon Oct 30, 2026
@aimane-chnaif, @situchan Huh... This is 4 days overdue. Who can take care of this?
melvin-bot commentedon Nov 3, 2026
@aimane-chnaif, @situchan 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
melvin-bot commentedon Nov 4, 2026
@aimane-chnaif, @situchan Now this issue is 8 days overdue. Are you sure this should be a Daily? Feel free to change it!
melvin-bot commentedon Nov 4, 2026
@aimane-chnaif, @situchan 8 days overdue is a lot. Should this be a Weekly issue? If so, feel free to change it!
melvin-bot commentedon Nov 5, 2026
@aimane-chnaif, @situchan 10 days overdue. I'm getting more depressed than Marvin.
jeffrey-graham commentedon Nov 7, 2026
melvin-bot commentedon Nov 7, 2026
melvin-bot commentedon Nov 10, 2026
This issue has not been updated in over 14 days. @aimane-chnaif, @situchan eroding to Weekly issue.