feat(billing): Add admin-only product trial support for emerge categories#107294
Merged
feat(billing): Add admin-only product trial support for emerge categories#107294
Conversation
ecd0b22 to
3342efb
Compare
brendanhsentry
approved these changes
Feb 3, 2026
…Info Add a new optional field to the BilledDataCategoryInfo type that allows categories to specify a feature flag required for admin-only product trials. When set, product trials for that category will only be shown in the admin UI if the organization has the specified feature flag enabled. This enables gating certain product trials (like emerge categories) behind feature flags so they're only visible to admins for specific organizations.
Enable admin-only product trials for SIZE_ANALYSIS and INSTALLABLE_BUILD categories in the admin customer overview page. These trials are gated behind the feature flags: - expose-category-size-analysis - expose-category-installable-build When an organization has the appropriate feature flag enabled, admins will see the product trial options for these emerge categories alongside the standard product trial options.
The "Allow Trial" button tooltip incorrectly said "Allow customer to start a new trial" for admin-only product trials, where customers can never start trials themselves. Now shows "Reset trial eligibility" for admin-only trials (SIZE_ANALYSIS, INSTALLABLE_BUILD).
Verifies that categories with adminOnlyProductTrialFeature (like SIZE_ANALYSIS) only appear in the Product Trials section when the organization has the corresponding feature flag enabled.
Fix pre-existing eslint error for unused type parameter T in React.DOMAttributes declaration merge.
…alFeature Change type from `string | null` to `string | boolean | null` to support graduated feature flags where `true` means the flag has been graduated and no feature flag check is needed.
When adminOnlyProductTrialFeature is `true` (graduated), include the category without checking organization feature flags. This aligns with the backend pattern from PR #19235.
Verify that categories with adminOnlyProductTrialFeature: true are shown in the admin UI without requiring organization feature flags.
2c491a0 to
566a26c
Compare
Contributor
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
Bugbot Autofix is OFF. To automatically fix reported issues with Cloud Agents, enable Autofix in the Cursor dashboard.
Wrap test body in try/finally to guarantee Object.defineProperty restoration runs regardless of assertion outcomes. Prevents test pollution that could affect subsequent tests.
The previous fix renamed DOMAttributes<T> to DOMAttributes<_T> to fix the eslint unused variable warning. However, this broke TypeScript's declaration merging with React's DOMAttributes interface, causing children props to not be recognized across the codebase. Fix by reverting to the original type parameter name and using an eslint-disable comment instead.
jaydgoss
pushed a commit
that referenced
this pull request
Feb 12, 2026
…ries (#107294) Closes https://linear.app/getsentry/issue/BIL-2021/add-product-trials-for-emerge-categories-in-admin ## Summary - Add `adminOnlyProductTrialFeature` field to `BilledDataCategoryInfo` type for gating product trials behind feature flags - Configure SIZE_ANALYSIS and INSTALLABLE_BUILD categories with their respective feature flags (`expose-category-size-analysis`, `expose-category-installable-build`) - Update admin customer overview to show product trial options for these categories when the organization has the feature flag enabled - Fix pre-existing eslint issue with unused type parameter in DOMAttributes Screenshots <img width="1006" height="136" alt="Screenshot 2026-02-03 at 6 03 05 PM" src="https://github.com/user-attachments/assets/5e5213c6-6aea-4a29-9327-aac9001ee0bd" /> <img width="1012" height="792" alt="Screenshot 2026-02-03 at 6 03 12 PM" src="https://github.com/user-attachments/assets/497a612d-1177-42b5-a089-44d6f0cfc985" /> ## Test plan - [x] Unit tests pass (`pnpm test static/gsAdmin/components/customers/customerOverview.spec.tsx`) - [x] Manual verification in admin UI at `/_admin/customers/{org}/` - SIZE_ANALYSIS and INSTALLABLE_BUILD trials appear when feature flags are enabled - [x] Pre-commit hooks pass --------- Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
dcramer
pushed a commit
that referenced
this pull request
Feb 17, 2026
…ries (#107294) Closes https://linear.app/getsentry/issue/BIL-2021/add-product-trials-for-emerge-categories-in-admin ## Summary - Add `adminOnlyProductTrialFeature` field to `BilledDataCategoryInfo` type for gating product trials behind feature flags - Configure SIZE_ANALYSIS and INSTALLABLE_BUILD categories with their respective feature flags (`expose-category-size-analysis`, `expose-category-installable-build`) - Update admin customer overview to show product trial options for these categories when the organization has the feature flag enabled - Fix pre-existing eslint issue with unused type parameter in DOMAttributes Screenshots <img width="1006" height="136" alt="Screenshot 2026-02-03 at 6 03 05 PM" src="https://github.com/user-attachments/assets/5e5213c6-6aea-4a29-9327-aac9001ee0bd" /> <img width="1012" height="792" alt="Screenshot 2026-02-03 at 6 03 12 PM" src="https://github.com/user-attachments/assets/497a612d-1177-42b5-a089-44d6f0cfc985" /> ## Test plan - [x] Unit tests pass (`pnpm test static/gsAdmin/components/customers/customerOverview.spec.tsx`) - [x] Manual verification in admin UI at `/_admin/customers/{org}/` - SIZE_ANALYSIS and INSTALLABLE_BUILD trials appear when feature flags are enabled - [x] Pre-commit hooks pass --------- Co-authored-by: getsantry[bot] <66042841+getsantry[bot]@users.noreply.github.com>
This was referenced Feb 17, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes https://linear.app/getsentry/issue/BIL-2021/add-product-trials-for-emerge-categories-in-admin
Summary
adminOnlyProductTrialFeaturefield toBilledDataCategoryInfotype for gating product trials behind feature flagsexpose-category-size-analysis,expose-category-installable-build)Screenshots
Test plan
pnpm test static/gsAdmin/components/customers/customerOverview.spec.tsx)/_admin/customers/{org}/- SIZE_ANALYSIS and INSTALLABLE_BUILD trials appear when feature flags are enabled