Add Public receipt visibility toggle to Rules for Control workspaces - #96012
Add Public receipt visibility toggle to Rules for Control workspaces#96012Krishna2323 wants to merge 10 commits into
Conversation
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
Hey, I noticed you changed If you want to automatically generate translations for other locales, an Expensify employee will have to:
Alternatively, if you are an external contributor, you can run the translation script locally with your own OpenAI API key. To learn more, try running: npx ts-node ./scripts/generateTranslations.ts --helpTypically, you'd want to translate only what you changed by running |
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.
|
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@codex review |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 6219983f7f
ℹ️ 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".
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: c435511c25
ℹ️ 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".
| subtitleStyle={styles.pt1} | ||
| isActive={isReceiptVisibilityPublicEnabled} | ||
| disabled={!canWriteRules || isPublicReceiptVisibilityUnavailable} | ||
| disabledAction={withReadOnlyFallback( |
There was a problem hiding this comment.
Surface the upgrade before blocking non-Control Rules
When this row is used for a Collect/Team workspace, the new disabled action is intended to send admins to the public-receipt-visibility upgrade flow, but non-Control users never reach this component: both Rules pages wrap their content with featureName={ARE_RULES_ENABLED} and arePolicyRulesEnabled() returns false for any non-Control policy. As a result, Collect admins hit the Rules not-found/More Features redirect before this locked row can render, so the new upgrade entry point is effectively unreachable; expose it from an accessible page or relax the Rules gate for this case.
Useful? React with 👍 / 👎.
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
BE PR open @Krishna2323 |
trjExpensify
left a comment
There was a problem hiding this comment.
Product change we're adding on request in #migrate 👍
|
This is still on hold for BE PR? |
|
No, looks like this was deployed |
|
Please merge main |
|
🤖 Reviewed the diff. The structure is clean — the shared 🔴 Blocker — missing Spanish translations (will fail CI typecheck)
None of these appear in 🟠 Question — upgrade path vs. Test step 8The new component adds an upgrade flow that the sibling toggles ( const isUnavailable = !isControlPolicy(policy);
const upgradeDisabledAction = isUnavailable ? navigateToUpgrade : undefined;Combined with the Which is intended?
Please confirm the product intent so the extra code and the test steps agree. 🔵 Nits
What I verified
|
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 513e81b68e
ℹ️ 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".
|
@Expensify/design please confirm the layout is correct (switch toggle button, description text positions, vertical padding, etc) Screen.Recording.2026-07-27.at.9.10.07.PM.movWhen beta not enabled (production behavior): Screen.Recording.2026-07-27.at.9.11.22.PM.mov |
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
This comment was marked as resolved.
This comment was marked as resolved.
Signed-off-by: krishna2323 <belivethatkg@gmail.com>
|
@situchan could you please review again? |
It is, but the way I designed it was meant to be more like a push input. Fine with just using the above but the spacing becomes real odd |
|
I see! Feel free to ignore me then and carry on! |
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppAndroid: mWeb ChromeiOS: HybridAppios.moviOS: mWeb SafariMacOS: Chrome / Safaribeta-off.movbeta-on.mov |
Btw this question was raised because of height change (single line <-> multi line) whenever switch toggles: Screen.Recording.2026-07-29.at.10.15.48.PM.mov |
|
I think collect policy case can be tested only after #95310 is merged |
situchan
left a comment
There was a problem hiding this comment.
Control policy case looks good
|
🤖 Reviewed the changes. Overall this is a clean, well-structured PR — the shared Things I verified
Suggestions (non-blocking)
One thing I can't verify from the App repo: that the backend |
|
Codex Review: Didn't find any major issues. 🚀 Reviewed commit: ℹ️ About Codex in GitHubCodex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
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". |
Ah I see. I'd say make the change I outlined here and let's see how it feels. |


Explanation of Change
Fixed Issues
$ #93214
PROPOSAL:
Tests
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_hybrid.mp4
Android: mWeb Chrome
android_mWeb.mp4
iOS: Native
ios_hybrid.mp4
iOS: mWeb Safari
ios_mWeb.mp4
MacOS: Chrome / Safari
web_chrome.mp4