Repository navigation
Fix Collect Rules regressions in More features, Require fields, and the upgrade paths - #97751
Conversation
…he upgrade paths Signed-off-by: krishna2323 <belivethatkg@gmail.com>
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.
|
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari97625.mov97625-mobile.mov97638.mov97638-mobile.mov97639.mov97640.mov |
trjExpensify
left a comment
There was a problem hiding this comment.
Bug fixes for the rules rollout 👍
|
After upgrade, should open "Agents" tab automatically? 97638-mobile.mov |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Right now it doesn't—you land on Rules → General after upgrading. The blocker is that the active Rules tab ( If we want to preserve the selected tab after upgrading, I'd prefer to handle that in a follow-up. @JS00001 @JmillsExpensify, thoughts? |
|
Agree to fix separately as it's not trivial. |
Beamanator
left a comment
There was a problem hiding this comment.
Looks good to me, i'll leave up to the other reviewers!
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 chuckdries has triggered a test Expensify/App build. You can view the workflow run here. |
|
🧪🧪 Use the links below to test this adhoc build on Android, iOS, and Web. Happy testing! 🧪🧪
|
|
🚀 Deployed to staging by https://github.com/chuckdries in version: 9.4.51-0 🚀
|
|
🤖 Help site review: no changes required. All four fixes in this PR are behavior/navigation regression fixes for the Rules Revamp beta, not changes to any documented, user-facing feature, label, or workflow:
I checked the relevant help articles — Since these are internal gating/navigation corrections that don't alter any published help content, I'm not opening a docs PR. @Krishna2323, if you believe any of these fixes changes documented, user-facing behavior that the help site should cover, reply with the specifics and I'll draft the docs update. |
|
Deploy Blocker #97922 was identified to be related to this PR. |
|
🚀 Deployed to production by https://github.com/roryabraham in version: 9.4.51-1 🚀
Bundle Size Analysis (Sentry): |
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