Repository navigation
Hide deleted tags in merchant rule preview - #103408
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@MelvinBot review |
ReviewThe fix looks right for single-level tags, and CI passes. I found one issue with multi-level tags. It's worth fixing before merge. 1. Multi-level tags: deleting one level hides the whole tag
The rule page checks each level on its own instead ( Example with independent tag lists:
Suggested fix: check each level with 2. Minor: tag-only rule shows an empty description When a rule's only default is a deleted tag, the row shows "Update" with a blank description. The test at the end of Checked and fine
|
|
@MelvinBot your both issues (or maybe not bugs) existed in #86864 (original PR which fixed the linked issue). The root cause already exists. Can you confirm? |
|
Yes, confirmed. Both behaviors already existed in fix: System message with no tag is shown. This PR restores that logic rather than adding new problems, so neither one should block it.
Per-level handling would be a separate follow-up if you want it. |
|
@thesahindia Please copy/paste the Reviewer Checklist from here into a new comment on this PR and complete it. If you have the K2 extension, you can simply click: [this button] |
dylanexpensify
left a comment
There was a problem hiding this comment.
Looks good from a product perspective 👍
|
@situchan, the selected tag doesn't disappear if disabled. I think it should have the same behaviour as deleted? Screen.Recording.2026-10-10.at.2.56.11.AM.mov |
I believe it's expected as per rule will keep deleted values, but the FE won't display it if the value doesn't exist in the policy anymore. The disabled tag still exists in the policy so makes sense to show cc: @luacmartins |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-10-12.at.12.14.55.AM.movAndroid: mWeb ChromeScreen.Recording.2026-10-12.at.12.28.17.AM.moviOS: HybridAppScreen.Recording.2026-10-11.at.10.00.04.PM.moviOS: mWeb SafariScreen.Recording.2026-10-11.at.11.45.00.PM.movMacOS: Chrome / SafariScreen.Recording.2026-10-12.at.12.57.16.AM.mov |
thesahindia
left a comment
There was a problem hiding this comment.
Looks good and tested well
|
We did not find an internal engineer to review this PR, trying to assign a random engineer to #102229 as well as to this PR... Please reach out for help on Slack if no one gets assigned! |
|
🚧 mollfpr has triggered a test Expensify/App build. You can view the workflow run here. |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/mollfpr in version: 9.5.8-0 🚀
|
|
No help site update needed. This bug fix restores behavior that Workspace Merchant Rules already describes: "If a tag a rule applies is deleted from the workspace, the rule stops applying that tag and stops showing it." |
|
🚀 Deployed to production by https://github.com/cristipaval in version: 9.5.8-5 🚀
Bundle Size Analysis (Sentry): |
Explanation of Change
The backend keeps a deleted tag on a merchant rule so the rule applies again if the tag is recreated. The Rules table printed that tag without checking it still exists.
#98662 removed the old
isTagInPolicycheck added in #86864 along withMerchantRulesSection.The merchant rule summary now drops the tag when
isTagInPolicyreturns false, so a rule left with only a merchant rename shows as "Rename".Tags aren't hidden while policy tags are still loading.
Fixed Issues
$ #102229
PROPOSAL:
Tests
Precondition: control workspace with Rules and Tags enabled, and a tag
Tag 1.Apple, tagTag 1, descriptionTest.Update tag to "Tag 1".Tag 1.Tag 1, go back to Rules, and verify the tag shows again in the preview.Tag 1, then deleteTag 1.Offline tests
QA Steps
Same as Tests
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectionAvatar, I verified the components usingAvatarare working as expected)StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))npm run compress-svg)Avataris modified, I verified thatAvataris working as expected in all cases)Designlabel and/or tagged@Expensify/designso the design team can review the changes.mainbranch was merged into this PR after a review, I tested again and verified the outcome was still expected according to theTeststeps.Screenshots/Videos
Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
demo.mov