fix: The Expense Policy RHP auto-closes unexpectedly#81313
fix: The Expense Policy RHP auto-closes unexpectedly#81313MarioExpensify merged 1 commit intoExpensify:mainfrom
Conversation
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
|
@QichenZhu 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] |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: da1c8e11fb
ℹ️ About Codex in GitHub
Codex has been enabled to automatically 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 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
| <AccessOrNotFoundWrapper | ||
| policyID={policyID} | ||
| accessVariants={[CONST.POLICY.ACCESS_VARIANTS.ADMIN, CONST.POLICY.ACCESS_VARIANTS.PAID]} | ||
| featureName={CONST.POLICY.MORE_FEATURES.ARE_RULES_ENABLED} | ||
| shouldBeBlocked={!isBetaEnabled(CONST.BETAS.CUSTOM_RULES)} |
There was a problem hiding this comment.
Keep rules feature gating for custom rules page
This removes featureName={CONST.POLICY.MORE_FEATURES.ARE_RULES_ENABLED} and only blocks on the user beta flag. That means a workspace with areRulesEnabled=false (rules feature disabled in More Features) but a user in the CUSTOM_RULES beta can still access this page and submit updateCustomRules, while all other rules pages still require the rules feature gate (e.g., PolicyRulesPage and RulesMaxExpenseAmountPage). If rules are disabled for the policy, this bypass lets admins edit custom rules that the feature toggle is supposed to block and won’t redirect them back to More Features, which is inconsistent with the rest of the rules section.
Useful? React with 👍 / 👎.
There was a problem hiding this comment.
@JmillsExpensify, what do you think from a product perspective?
There was a problem hiding this comment.
Hmm, I'm not sure I understand what the custom rules beta is. @JS00001 is this something we're using at the moment?
There was a problem hiding this comment.
I'm not sure what the custom rules beta is. Its not related to merchant or personal rules
There was a problem hiding this comment.
Thanks, not sure what I'm being ask for an opinion on then. Qichen Zhu, mind explaining a bit more?
There was a problem hiding this comment.
@JmillsExpensify @JS00001, the beta flag controls whether the Expense policy section shows on the Workspace Overview page. However, it does not function correctly when Rules is disabled in More features.
Should Expense policy work regardless of whether the Rules feature is enabled?
There was a problem hiding this comment.
Yes, it should. I don't see how it's related to the Rules feature.
JmillsExpensify
left a comment
There was a problem hiding this comment.
Good product polish
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-02-23.at.11.41.17.AM.movAndroid: mWeb ChromeScreen.Recording.2026-02-23.at.11.44.55.AM.moviOS: HybridAppSimulator.Screen.Recording.-.iPhone.17.-.2026-02-23.at.11.44.08.moviOS: mWeb SafariSimulator.Screen.Recording.-.iPhone.17.-.2026-02-23.at.11.43.06.movMacOS: Chrome / SafariScreen.Recording.2026-02-23.at.11.39.35.AM.mov |
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚧 @MarioExpensify 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/MarioExpensify in version: 9.3.26-0 🚀
|
|
🚀 Deployed to production by https://github.com/puneetlath in version: 9.3.26-8 🚀
|
Explanation of Change
Fixed Issues
$#80457
PROPOSAL:#80457 (comment)
Tests
Precondition:
Offline tests
QA Steps
Precondition:
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.mov
Android: mWeb Chrome
android_chorme.mov
iOS: Native
ios.mov
iOS: mWeb Safari
ios_sfr.mov
MacOS: Chrome / Safari
chorme.mov