Skip to content

feat(billing): Add admin-only product trial support for emerge categories#107294

Merged
dashed merged 12 commits intomasterfrom
billing/BIL-2021
Feb 5, 2026
Merged

feat(billing): Add admin-only product trial support for emerge categories#107294
dashed merged 12 commits intomasterfrom
billing/BIL-2021

Conversation

@dashed
Copy link
Copy Markdown
Member

@dashed dashed commented Jan 29, 2026

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

Screenshot 2026-02-03 at 6 03 05 PM Screenshot 2026-02-03 at 6 03 12 PM

Test plan

  • Unit tests pass (pnpm test static/gsAdmin/components/customers/customerOverview.spec.tsx)
  • Manual verification in admin UI at /_admin/customers/{org}/ - SIZE_ANALYSIS and INSTALLABLE_BUILD trials appear when feature flags are enabled
  • Pre-commit hooks pass

@linear
Copy link
Copy Markdown

linear bot commented Jan 29, 2026

dashed and others added 9 commits February 4, 2026 12:00
…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.
Copy link
Copy Markdown
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.
dashed and others added 2 commits February 4, 2026 13:14
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.
@dashed dashed merged commit 768c96d into master Feb 5, 2026
59 checks passed
@dashed dashed deleted the billing/BIL-2021 branch February 5, 2026 15:39
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>
@github-actions github-actions bot locked and limited conversation to collaborators Feb 21, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

Scope: Frontend Automatically applied to PRs that change frontend components

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants