Fix Rules revamp regressions on Collect workspaces - #98236
Conversation
… centering Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
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.
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 84d9256b5b
ℹ️ 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".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@MelvinBot review |
ReviewOverall this is a clean, well-reasoned set of fixes for the four Collect-workspace Rules-revamp regressions, and the explanatory comments on each change are genuinely helpful. I found no blocking issues. A few notes below — mostly a latent-fragility flag and a testing-coverage gap. Verified as correct:
1. Latent fragility — the new draft-clear cleanup depends on an unenforced navigation invariant (non-blocking)The new unmount cleanup in useEffect(() => () => clearDraftRequireFieldsRule(), []);is safe as currently routed — I traced both the category-change and sub-page-navigation paths. The category picker is pushed onto the same RHP stack (base page stays mounted) and its The fragility: this safety depends entirely on the picker's 2. Two effects both drive the Rules tab — worth confirming they can't race (non-blocking)In
Since 3. Minor:
|
| }, [activeTab, policy]); | ||
|
|
||
| useEffect(() => { | ||
| // Apply once per value, so a later manual tab press isn't undone by the param still sitting in the route. |
There was a problem hiding this comment.
shouldnt later manual tab presses change the url?
There was a problem hiding this comment.
They don't, intentionally — the selected tab lives in Onyx (CONST.TAB.RULES_TAB_TYPE) so it persists after you leave and come back, and the tab param is only an entry hint for deep links and the post-upgrade back behaviour. Putting it in the URL on every press would mean two sources of truth for the same state. Tough the comment needs update, its a bit confusing.
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppiOS: mWeb SafariMacOS: Chrome / Safari97641.mov97922.mov97839.mov97840.mov |
|
Regarding #97922: Screen.Recording.2026-08-11.at.2.16.52.PM.movScreen.Recording.2026-08-11.at.2.17.29.PM.mov |
|
Bug: after upgrade and switch to the targeted tab, tab query persists in navigation route so it ends up always showing persisted tab even after refresh on another tab Screen.Recording.2026-08-11.at.2.22.29.PM.mov |
|
Looks good except above 2 |
|
@Krishna2323 please take a look at those, then we can continue on with this one |
I think this isn't supported anywhere in the app Monosnap.screencast.2026-08-12.05-48-56.mp4 |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
5f5075d
@situchan fixed: Monosnap.screencast.2026-08-12.05-53-22.mp4 |
@Krishna2323 This is still not fixed. Repro step: deep link to Screen.Recording.2026-08-12.at.9.52.54.AM.mov |
|
Maybe not bug?: Enable Category RHP is not closed when click device/browser back button Screen.Recording.2026-08-12.at.9.50.37.AM.mov |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Fixed |
Seems expected to me |
|
Yeah, that issue looks expected to me |
|
🚧 JS00001 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/JS00001 in version: 9.4.53-0 🚀
|
|
🤖 No help site changes required. I reviewed the changes in this PR against the help articles under This PR is a set of navigation/UI regression fixes for the Rules revamp on Collect workspaces — it restores intended behavior rather than introducing or changing any documented, user-facing capability:
The one relevant article — Workspace Rules — already documents Category Rules, Tag Rules, and that "Only Workspace Admins on the Control plan can enable, update, or disable workspace rules." That statement remains accurate: the plan gating and the set of documented rules are unchanged. The fixes here are internal routing/state corrections (upgrade prompt vs. Not Found, tab restoration, empty-state layout) that the help site doesn't describe and doesn't need to. Since no documented behavior changed, I did not create a draft help site PR. @Krishna2323, if you believe any of these flows are described on the help site and should be updated, let me know which article and I'll draft the change. |
Explanation of Change
Fixed Issues
$ #97641
$ #97922
$ #97840
$ #97839
PROPOSAL:
Tests
#97641 — Category rules on Collect
#97839 — Categories blocked by accounting
#97840 — Category empty state
#97922 — Rules tab after upgrading
Offline tests
QA Steps
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
web_chrome_97840.mp4
iOS: mWeb Safari
MacOS: Chrome / Safari
web_chrome_97641.mp4
web_chrome_97922.mp4
web_chrome_97839.mp4