Skip to content

Remove the category visibility beta - #106674

Merged
chiragsalian merged 1 commit into
Expensify:mainfrom
nkdengineer:fix/106658
Nov 13, 2026
Merged

chiragsalian merged 1 commit into
Expensify:mainfrom
nkdengineer:fix/106658

Conversation

@nkdengineer

@nkdengineer nkdengineer commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Explanation of Change

Remove the category visibility beta

Fixed Issues

$ #106658
PROPOSAL:

Tests

  • Precondition: a Control workspace with categories enabled and about 12 enabled categories (including Meals, Travel, Fuel and Lodging), one disabled category, an admin, members E1 and E2, an approver, and 10 or more other members. Also a Collect workspace, a Control workspace with categories disabled. No account is on the categoryVisibility beta.

  • Category visibility row and category picker in member details

  1. As a Control workspace admin who was never on the beta, open a member's details and confirm the "Category visibility" row shows "All categories" below Role.
  2. Open it, uncheck all but two categories, save, and confirm it saves with no error and the row shows "2 categories".
  3. Reopen it and confirm only those two categories are checked.
  4. Check every category, save, and confirm the row shows "All categories" again.
  5. Uncheck every category, save, and confirm the "Members must have at least one category" modal shows and nothing is saved.
  6. Confirm the disabled category isn't listed in the picker, and that search filters the list.
  7. Restrict E1, open E2's details, and confirm E2 still shows "All categories".
  8. Repeat step 2 offline, and confirm the change shows as pending and saves when back online.
  9. As a Collect workspace admin, confirm the "Category visibility" row isn't shown.
  10. On a Control workspace with categories disabled, confirm the row isn't shown. Enable categories and confirm it appears.
  11. Open the category visibility link for a member as a non-admin, and confirm the not found page shows.
  • Adding, deleting and renaming categories

  1. Restrict E1 to Meals and Fuel, add a new category "Parking", and confirm E1's row shows "3 categories" and E1 can pick Parking.
  2. Delete Fuel, and confirm E1's row shows "1 category" and E1 can only pick Meals.
  3. Restrict E1 to Fuel only, delete Fuel, and confirm the delete succeeds and E1's row shows "All categories".
  4. Restrict E1 to Meals and Fuel, import new categories from a spreadsheet, and confirm E1 can pick the new categories.
  5. Rename Fuel to "Fuel & Mileage", and confirm E1 can still pick it under the new name, E1's count is unchanged and E2 is unaffected.
  6. Rename a category no member is restricted to, and confirm no member's category visibility changes.
  • Blocking disabling a member's last category

  1. Restrict E1 to one category, turn that category's Enabled toggle off on the Categories page, and confirm the "Can't disable {category}" modal lists E1 and the category stays enabled.
  2. Repeat from the category's settings page, and confirm the same modal.
  3. Select that category and another one, use the bulk Disable action, and confirm the "Can't disable these categories" modal lists E1.
  4. Restrict 4 members to the same single category, disable it, and confirm the modal lists the first members and "and N more".
  5. Restrict E1 to two categories, disable one, and confirm it's disabled with no modal.
  6. Disable a category that only unrestricted members use, and confirm it's disabled with no modal.
  7. Go offline, restrict E1 to one category, then try to disable that category, and confirm the same modal shows.
  8. Restrict E1 to one category on one device, try to disable that category as another admin who hasn't received the update yet, and confirm the same modal shows and the category goes back to enabled.
  • Removing members and downgrading the workspace

  1. Restrict E1, remove them from the workspace, invite them back, and confirm their row shows "All categories".
  2. Restrict E1, have them leave the workspace, invite them back, and confirm their row shows "All categories".
  3. Restrict E1, downgrade the workspace to Collect, and confirm the row is hidden and E1 can pick every category. Upgrade back to Control and confirm E1 shows "All categories".
  • Filtering the expense category picker

  1. Restrict E1 to Meals and Fuel. As E1, create a manual, scan and distance expense, and confirm the category picker shows only Meals and Fuel.
  2. On a wide layout, open the category dropdown on the confirmation page, and confirm it shows only Meals and Fuel.
  3. As E1, edit the category of a submitted expense, and confirm the picker shows only Meals and Fuel.
  4. As E1, split an expense, edit one split's category, and confirm the picker shows only Meals and Fuel.
  5. As E1, in Search on a wide layout, edit the Category and the Category GL code cell inline on your own expense, and confirm each picker shows only Meals and Fuel.
  6. As E1, select several of your expenses in Search, bulk edit Category, and confirm the picker shows only Meals and Fuel.
  7. As E1, edit the category of an unreported expense, and confirm the picker shows only Meals and Fuel.
  8. As E1, edit an expense already coded to Lodging, and confirm the picker shows Meals, Fuel and Lodging.
  9. As E1, search for "Lodging" in the picker, and confirm there's no option to create it.
  10. As E1, go offline, create an expense, and confirm the picker still shows only Meals and Fuel.
  11. As the admin or approver, edit E1's expense from the expense view and from the inline Search cell, and confirm the picker shows every enabled category.
  12. As the admin, bulk edit a selection of E1's and other members' expenses, and confirm the picker shows every enabled category.
  13. Restrict the admin to two categories, create an expense as the admin, and confirm the picker shows only those two.
  14. As E2, an unrestricted member, confirm the picker shows every enabled category.
  • Category not allowed violation

  1. Code E1's expense to Lodging, restrict E1 to Meals and Fuel, and confirm the expense shows a "Category not allowed" violation in the expense view, the report, and Search.
  2. As E1, recode the expense to Meals, and confirm the violation clears.
  3. Repeat step 2 offline, and confirm the violation clears before reconnecting.
  4. Code E1's expense to Lodging again, give E1 access to Lodging, and confirm the violation clears.
  5. Code E1's expense to Lodging again, set E1 back to all categories, and confirm the violation clears.
  6. Submit a report with a "Category not allowed" violation, and confirm it isn't blocked.
  7. Disable the category on an expense with a "Category not allowed" violation, and confirm the expense only shows "Category no longer valid".
  • Category visibility change logs in #admins

  1. Restrict an unrestricted member to Meals and Fuel, and confirm #admins shows "set {member} to only see the "Meals" and "Fuel" categories", and the LHN preview shows the same text.
  2. Restrict them to only Meals, and confirm the entry reads "changed {member} to only see the "Meals" category".
  3. Give the member every enabled category, and confirm the entry reads "changed {member} to see all categories".
  4. Restrict a member to 10 or more categories, and confirm the entry shows the count, and opening its thread shows every category at the top.
  5. Restrict a member to one category and delete it, and confirm the entry reads "changed {member} to see all categories, since their only category was deleted. Update their category visibility if needed."
  6. Remove a restricted member from the workspace, and confirm no category visibility entry is posted to #admins.
  7. Copy a category visibility entry to the clipboard, and confirm it matches the displayed text.
  8. Switch the language to Spanish, and confirm the entries, the modal, the violation and the row are translated.
  • Auto-categorization

  1. Restrict E1 to Meals and Travel
  2. As E1, Create an expense without category
  3. Waiting for Auto-categorization
  4. After it's complete, verify that the auto-category is one of restricted category.
  • Verify that no errors appear in the JS console

Offline tests

QA Steps

Same as test

  • Verify that no errors appear in the JS console

PR Author Checklist

  • I linked the correct issue in the ### Fixed Issues section above
  • I wrote clear testing steps that cover the changes made in this PR
    • I added steps for local testing in the Tests section
    • I added steps for the expected offline behavior in the Offline steps section
    • I added steps for Staging and/or Production testing in the QA steps section
    • I added steps to cover failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
    • I tested this PR with a High Traffic account against the staging or production API to ensure there are no regressions (e.g. long loading states that impact usability).
  • I included screenshots or videos for tests on all platforms
  • I ran the tests on all platforms & verified they passed on:
    • Android: Native
    • Android: mWeb Chrome
    • iOS: Native
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • I verified there are no console errors (if there's a console error not related to the PR, report it or open an issue for it to be fixed)
  • I followed proper code patterns (see Reviewing the code)
    • I verified that comments were added to code that is not self explanatory
    • I verified that any new or modified comments were clear, correct English, and explained "why" the code was doing something instead of only explaining "what" the code was doing.
    • I verified any copy / text that was added to the app is grammatically correct in English. It adheres to proper capitalization guidelines (note: only the first word of header/labels should be capitalized), and is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I followed the guidelines as stated in the Review Guidelines
  • I tested other components that can be impacted by my changes (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar are working as expected)
  • If a new CSS style is added I verified that:
    • A similar style doesn't already exist
    • The style can't be created with an existing StyleUtils function (i.e. StyleUtils.getBackgroundAndBorderStyle(theme.componentBG))
  • If new assets were added or existing ones were modified, I verified that:
    • The assets are optimized and compressed (for SVG files, run npm run compress-svg)
    • The assets load correctly across all supported platforms.
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • I added unit tests for any new feature or bug fix in this PR to help automatically prevent regressions in this user flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.

Screenshots/Videos

Android: Native
Android: mWeb Chrome
iOS: Native
iOS: mWeb Safari
MacOS: Chrome / Safari
Screen.Recording.2026-11-12.at.13.39.34.mov
Screen.Recording.2026-11-12.at.13.41.26.mov
Screen.Recording.2026-11-12.at.13.43.14.mov
Screen.Recording.2026-11-12.at.13.48.29.mov
Screen.Recording.2026-11-12.at.13.49.24.mov
Screen.Recording.2026-11-12.at.13.50.25.mov
Screen.Recording.2026-11-12.at.13.54.11.mov
Screen.Recording.2026-11-12.at.13.56.07.mov

@codecov

codecov Bot commented Nov 12, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ Changes either increased or maintained existing code coverage, great job!

Files with missing lines Coverage Δ
src/CONST/index.ts 96.03% <ø> (ø)
...s/workspace/members/WorkspaceMemberDetailsPage.tsx 85.66% <100.00%> (ø)
.../members/WorkspaceMemberCategoryVisibilityPage.tsx 0.00% <0.00%> (ø)
... and 9 files with indirect coverage changes

@nkdengineer
nkdengineer marked this pull request as ready for review November 12, 2026 08:49
@nkdengineer
nkdengineer requested review from a team as code owners November 12, 2026 08:49
@melvin-bot
melvin-bot Bot requested review from daledah and removed request for a team November 12, 2026 08:49
@melvin-bot

melvin-bot Bot commented Nov 12, 2026

Copy link
Copy Markdown

@daledah 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]

@melvin-bot
melvin-bot Bot requested a review from dylanexpensify November 12, 2026 08:50
@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Nov 12, 2026 •

Copy link
Copy Markdown
Codex Review Summary: ✅ Completed

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-11-12T09:03:00.681847Z 0af2609 Draft marked ready
ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@melvin-bot
melvin-bot Bot removed the request for review from a team November 12, 2026 08:50
@daledah

daledah commented Nov 12, 2026 •

Copy link
Copy Markdown
Contributor

Reviewer Checklist

  • I have verified the author checklist is complete (all boxes are checked off).
  • I verified the correct issue is linked in the ### Fixed Issues section above
  • I verified testing steps are clear and they cover the changes made in this PR
    • I verified the steps for local testing are in the Tests section
    • I verified the steps for Staging and/or Production testing are in the QA steps section
    • I verified the steps cover any possible failure scenarios (i.e. verify an input displays the correct error message if the entered data is not correct)
    • I turned off my network connection and tested it while offline to ensure it matches the expected behavior (i.e. verify the default avatar icon is displayed if app is offline)
  • I checked that screenshots or videos are included for tests on all platforms
  • I included screenshots or videos for tests on all platforms
  • I verified that the composer does not automatically focus or open the keyboard on mobile unless explicitly intended. This includes checking that returning the app from the background does not unexpectedly open the keyboard.
  • I verified tests pass on all platforms & I tested again on:
    • Android: HybridApp
    • Android: mWeb Chrome
    • iOS: HybridApp
    • iOS: mWeb Safari
    • MacOS: Chrome / Safari
  • If there are any errors in the console that are unrelated to this PR, I either fixed them (preferred) or linked to where I reported them in Slack
  • I verified any copy / text that was added to the app is either coming verbatim from figma or has been approved by marketing (in order to get marketing approval, ask the Bug Zero team member to add the Waiting for copy label to the issue)
  • If a new code pattern is added I verified it was agreed to be used by multiple Expensify engineers
  • I verified other components that can be impacted by these changes have been tested, and I retested again (i.e. if the PR modifies a shared library or component like Avatar, I verified the components using Avatar have been tested & I retested again)
  • If a new component is created I verified that:
    • A similar component doesn't exist in the codebase
    • All props are defined accurately
    • The component has a clear name that is non-ambiguous and the purpose of the component can be inferred from the name alone
    • The only data being stored in the state is data necessary for rendering and nothing else
    • The component has the minimum amount of code necessary for its purpose, and it is broken down into smaller components in order to separate concerns and functions
  • If the PR modifies code that runs when editing or sending messages, I tested and verified there is no unexpected behavior for all supported markdown - URLs, single line code, code blocks, quotes, headings, bold, strikethrough, and italic.
  • If the PR modifies a generic component, I tested and verified that those changes do not break usages of that component in the rest of the App (i.e. if a shared library or component like Avatar is modified, I verified that Avatar is working as expected in all cases)
  • If the PR modifies a component related to any of the existing Storybook stories, I tested and verified all stories for that component are still working as expected.
  • If the PR modifies a component or page that can be accessed by a direct deeplink, I verified that the code functions as expected when the deeplink is used - from a logged in and logged out account.
  • If the PR modifies the UI (e.g. new buttons, new UI components, changing the padding/spacing/sizing, moving components, etc) or modifies the form input styles:
    • I verified that all the inputs inside a form are aligned with each other.
    • I added Design label and/or tagged @Expensify/design so the design team can review the changes.
  • If the PR adds or modifies the UI:
    • I asked an AI agent to review the changes for accessibility issues and addressed its findings.
    • I tested with a screen reader (VoiceOver on macOS) and verified all new/changed elements are reachable with a logical focus order.
    • I verified all new/changed elements have meaningful accessible names and roles.
    • I verified state changes are announced (e.g. checked/unchecked, expanded/collapsed, selected).
  • For any bug fix or new feature in this PR, I verified that sufficient unit tests are included to prevent regressions in this flow.
  • If the main branch was merged into this PR after a review, I tested again and verified the outcome was still expected according to the Test steps.
  • I have checked off every checkbox in the PR reviewer checklist, including those that don't apply to this PR.

Screenshots/Videos

MacOS: Chrome / Safari
Screen.Recording.2026-11-12.at.22.18.34.mov
Screen.Recording.2026-11-12.at.22.19.18.mov
Screen.Recording.2026-11-12.at.22.21.11.mov
Screen.Recording.2026-11-12.at.22.21.45.mov
Screen.Recording.2026-11-12.at.22.23.02.mov

@daledah

daledah commented Nov 12, 2026

Copy link
Copy Markdown
Contributor

thanks @nkdengineer for the PR
LGTM, and all test cases passed except the one we’re discussing here
So I think we should hold this PR until that case is resolved.

@JmillsExpensify JmillsExpensify left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's do it!

@melvin-bot
melvin-bot Bot requested a review from chiragsalian November 13, 2026 17:04

@chiragsalian chiragsalian left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Woohoo, lets gooo 🎉

@chiragsalian
chiragsalian merged commit 0205170 into Expensify:main Nov 13, 2026
51 of 54 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🚧 chiragsalian has triggered a test Expensify/App build. You can view the workflow run here.

@OSBotify

Copy link
Copy Markdown
Contributor

✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release.

@github-actions

Copy link
Copy Markdown
Contributor

@OSBotify

Copy link
Copy Markdown
Contributor

🚀 Deployed to staging by https://github.com/chiragsalian in version: 9.5.40-0 🚀

platform result
🕸 web 🕸 success ✅
🤖 android 🤖 success ✅
🍎 iOS 🍎 success ✅

@Chandkia24

Copy link
Copy Markdown

Deploy Blocker #107057 was identified to be related to this PR.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants