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:
|
| subtitle={translate('workspace.rules.categoriesDisabledEmptyState.subtitle')} | ||
| /> | ||
| </ScrollView> | ||
| <FixedFooter style={[styles.pt5]}> |
There was a problem hiding this comment.
Not needed anymore. The content is now inside a ScrollView whose contentContainerStyle has flexGrow1
| }, [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 |
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