feat: enable Expensify Card for Collect workspaces and update subscription settings UI for Collect#83455
Conversation
…and update usages
|
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 |
There was a problem hiding this comment.
Pull request overview
This PR updates the Subscription Settings experience to support Collect workspaces (including showing the Expensify Code section where applicable) and aligns the client-side promo code naming with the SET_PROMO_CODE API.
Changes:
- Renames stored subscription code field from
expensifyCodetopromoCode(types, actions, UI, and tests). - Updates Subscription Settings UI for Collect (web + native), including new pricing copy and a Collect-specific layout.
- Adjusts
OptionItemrendering so selected + disabled options can still show a selection indicator, and adds new i18n strings.
Reviewed changes
Copilot reviewed 19 out of 19 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| tests/ui/ExpensifyCodePageTest.tsx | Updates tests to use promoCode in Onyx and reflect new applied-code behavior. |
| src/types/onyx/PrivateSubscription.ts | Renames stored field to promoCode. |
| src/pages/settings/Subscription/SubscriptionSettings/index.tsx | Adds Collect-specific Subscription Settings UI and uses promoCode. |
| src/pages/settings/Subscription/SubscriptionSettings/index.native.tsx | Adds Collect-specific Subscription Settings UI on native. |
| src/pages/settings/Subscription/SubscriptionPlan/SubscriptionPlanCardActionButton.tsx | Uses promoCode in the summary string and removes Team2025-specific action button logic. |
| src/pages/settings/Subscription/ExpensifyCodePage/index.tsx | Uses promoCode and avoids showing NotFound after submit while waiting for Onyx update. |
| src/libs/actions/Subscription.ts | Sends promoCode to SET_PROMO_CODE and stores it on NVP_PRIVATE_SUBSCRIPTION. |
| src/libs/API/parameters/SetPromoCodeParams.ts | Renames API parameter to promoCode. |
| src/languages/* | Adds Collect-specific Subscription Settings strings across locales. |
| src/components/OptionsPicker/OptionItem.tsx | Shows selection indicator when isSelected even if the option is disabled. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Review SummaryCritical Bug Found: German translations (
Code duplication note: The expensify code section and tax exempt menu item are duplicated identically in both the |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fd2481eeb7
ℹ️ 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".
Codecov Report✅ Changes either increased or maintained existing code coverage, great job!
|
…ify-code-on-collect-workspaces
…ify-code-on-collect-workspaces
|
@garrettmknight We've added the
Currently we get empty |
|
Bumped @nkuoch in the original issue. |
…ify-code-on-collect-workspaces
…ify-code-on-collect-workspaces
|
@eVoloshchak PR is ready for re-review. |
| upper: convertToShortDisplayString(subscriptionPrice * CONST.SUBSCRIPTION_PRICE_FACTOR, preferredCurrency), | ||
| }); | ||
| const adminsChatReportID = isActivePolicyAdmin && activePolicy?.chatReportIDAdmins ? activePolicy.chatReportIDAdmins?.toString() : undefined; | ||
| const isCollect = subscriptionPlan === CONST.POLICY.TYPE.TEAM; |
There was a problem hiding this comment.
We can use isCollectPolicy util
There was a problem hiding this comment.
@eVoloshchak This introduces a regression risk when we have Control on the Subscription plan card and click the “Subscription settings” button, it opens the Collect UI. We should keep using subscriptionPlan as the single source of truth.
Reviewer Checklist
Screenshots/VideosAndroid: HybridAppScreen.Recording.2026-03-18.at.20.16.32.movAndroid: mWeb ChromeScreen.Recording.2026-03-18.at.20.17.20.moviOS: HybridAppScreen.Recording.2026-03-18.at.20.16.03.moviOS: mWeb SafariUntitled.movMacOS: Chrome / SafariScreen.Recording.2026-03-18.at.19.40.24.mov |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 25 out of 25 changed files in this pull request and generated 2 comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
|
||
| const isExpensifyCodeApplied = !!privatePromoCode; | ||
| const shouldShowExpensifyCodeSection = !isSecretPromoCode; | ||
| const shouldShowExpensifyCodeHintText = isExpensifyCodeApplied && promoDiscountValue !== undefined; |
There was a problem hiding this comment.
Good observation but this is intended behaviour.
| discountCode: 'Discount code', | ||
| enterCode: 'Enter an Expensify code to apply to your subscription.', | ||
| discountMessage: (promoDiscount: string, validBillingCycles: string) => | ||
| `You will get a ${promoDiscount}% discount on your next ${validBillingCycles ? `${validBillingCycles} ` : ''}billing charges.`, |
There was a problem hiding this comment.
We are following the Expensify classic approch here, and this is intended bahaviour.
|
🚧 @nkuoch 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! 🧪🧪
|
|
✋ This PR was not deployed to staging yet because QA is ongoing. It will be automatically deployed to staging after the next production release. |
|
🚀 Deployed to staging by https://github.com/nkuoch in version: 9.3.42-0 🚀
Bundle Size Analysis (Sentry): |

Explanation of Change
Fixed Issues
$ #79087
PROPOSAL: #79087 (comment)
Tests
Precondition
Steps
testing_code)Offline tests
QA Steps
Same as test
// TODO: These must be filled out, or the issue title must include "[No QA]."
PR Author Checklist
### Fixed Issuessection aboveTestssectionOffline stepssectionQA stepssectiontoggleReportand 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.Native.mp4
Android: mWeb Chrome
Android.mWeb.Chrome.mp4
iOS: Native
IOS.Native.mp4
iOS: mWeb Safari
IOS.mWeb.Safari.mp4
MacOS: Chrome / Safari
macOS.Chrome.mp4