Fix Collect Rules regressions in More features, Require fields, and the upgrade paths - #97751
Open
Krishna2323 wants to merge 1 commit into
Conversation
…he upgrade paths Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Krishna2323
marked this pull request as ready for review
August 4, 2026 03:19
melvin-bot
Bot
requested review from
situchan and
trjExpensify
and removed request for
a team
August 4, 2026 03:19
Codecov Report❌ Looks like you've decreased code coverage for some files. Please write tests to increase, or at least maintain, the existing level of code coverage. See our documentation here for how to interpret this table.
|
This was referenced Aug 4, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Explanation of Change
This PR fixes four follow-ups from Rules for Collect.
1. Rules toggle on Submit workspaces
With the Rules revamp beta enabled, the Rules toggle on a Submit workspace appeared to do nothing.
The upgrade redirect was gated only on the beta, so every non-Control workspace went down the enable path. However,
arePolicyRulesEnabledonly recognizes Collect and Control, so the flag was written but always read back as disabled.Submit workspaces now continue to go through the upgrade flow, matching the existing behavior when the beta is off.
2. Tags bypassed the accounting integration guard
Require fields for all expenses → Tags could enable Tags even when they were managed by an accounting integration, bypassing the "Not so fast" modal shown elsewhere.
Tags now follow the same behavior as Categories:
3. Agents promo banner on Collect
The Agents promo banner switched directly to the Agents tab. On Collect workspaces, the page immediately switched back to General because of the existing redirect effect.
The CTA now goes through the normal tab handler, which routes Collect workspaces to the Control upgrade page.
4. Return to the correct page after upgrading
Upgrading from a row in General returned users to the Rules page instead of the row they originally opened.
Rows now carry their route instead of a navigation callback, and that route is passed as the upgrade
backTo, matching the GL settings flow for tag settings.Tabs continue to return to Rules → General since the selected tab is stored in Onyx rather than the route. Supporting that will require a separate change.
Fixed Issues
$ #97640
$ #97639
$ #97638
$ #97625
PROPOSAL:
Tests
#97640 Rules - Nothing happens after clicking on Rules toggle for Submit workspace
#97639 Rules- Tags can be enabled in Require fields for all expenses RHP when accounting is connected
#97638 Rules - App returns to Rules > General after clicking Try it out on agent banner
#97625 Rules - RHP does not open after workspace upgrade
Offline tests
QA Steps
Same as tests
Verify that no errors appear in the JS console
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectioncanBeMissingparam foruseOnyxtoggleReportand notonIconClick)src/languages/*files and using the translation methodSTYLE.md) were followedAvatar, 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.ScrollViewcomponent to make it scrollable when more elements are added to the page.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
web_chrome.mp4
web_chrome_2.mp4