-
-
Notifications
You must be signed in to change notification settings - Fork 4.6k
feat(billing): Add Emerge quota exceeded UI with Contact Sales CTA #106932
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
08860e3 to
5e9dbbe
Compare
35f84e1 to
ecdda9b
Compare
ecdda9b to
6d8073a
Compare
Add special handling for Emerge data categories (SIZE_ANALYSIS, INSTALLABLE_BUILD) in the billing status alert: - Show Emerge-specific copy explaining quota exceeded status - Display "Contact Sales" CTA instead of standard AddEventsCTA (since Emerge has no PAYG/on-demand option) - Use dynamic quota value from subscription.categories instead of hardcoded value - Handle mixed scenarios (Emerge + other categories exceeded) BIL-2005
…sage Address PR review feedback to remove the hard-coded quota value (100) from the Size Analysis quota exceeded message. The message now says "full quota of Size Analysis builds" instead of including a specific number, consistent with other category messages.
Address PR review feedback to use behavior-based naming instead of product-specific naming. The term "Emerge" refers to a specific product acquisition, but the behavior is about PAYG ineligibility which could apply to any category. Renames: - EMERGE_CATEGORIES → PAYG_INELIGIBLE_CATEGORIES - isEmergeCategory → isPaygIneligibleCategory - getEmergeSubheader → getPaygIneligibleSubheader - getEmergeBodyCopy → getPaygIneligibleBodyCopy - emergeCategories → paygIneligibleCategories - emergeEventTypes → paygIneligibleEventTypes
Refactor getPaygIneligibleSubheader and getPaygIneligibleBodyCopy to use the existing listDisplayNames utility instead of hardcoding category display names. This ensures consistency with other category displays and follows the DRY principle. Addresses review feedback from PR #106932.
6d8073a to
dc4dd9b
Compare
The functions getPaygIneligibleSubheader and getPaygIneligibleBodyCopy use tct() which returns React.ReactNode, not string.
The onDismiss function was ignoring the eventTypes parameter and snoozing all prompts. This caused a bug where acting on the PAYG-eligible CTA would incorrectly dismiss the "Contact Sales" prompt for PAYG-ineligible categories. Now only prompts matching the passed eventTypes are snoozed.
c473739 to
4229c01
Compare
There was a problem hiding this 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.
| } | ||
| )} | ||
| </Description> | ||
| )} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Duplicated JSX blocks for category descriptions
Low Severity
The usageCategories and seatCategories description blocks are identical between the "mixed" scenario (lines 231-252) and the "standard" scenario (lines 304-325). The same tct() calls with identical strings like 'You have used up your quota for [usageCategoryList]...' and '[prefix] reached your quota for [seatCategoryList]...' appear in both locations. If the copy needs updating, changes must be made in two places, increasing maintenance burden and risk of inconsistency.
Closes https://linear.app/getsentry/issue/BIL-2005/add-emerge-billing-overage-ui-with-contact-sales-cta
Summary
Test plan