feat(billing): Add Emerge quota exceeded UI with Contact Sales CTA#106932
feat(billing): Add Emerge quota exceeded UI with Contact Sales CTA#106932
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.
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.
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.
Additional Locations (1)
…106932) Closes https://linear.app/getsentry/issue/BIL-2005/add-emerge-billing-overage-ui-with-contact-sales-cta ## Summary - Add special handling for Emerge data categories (SIZE_ANALYSIS, INSTALLABLE_BUILD) in the navigation billing status component - Show "Contact Sales" CTA (mailto:[email protected]) instead of AddEventsCTA since Emerge categories don't have PAYG available - Support three scenarios: - Only Emerge categories exceeded → Contact Sales CTA - Both Emerge and standard categories exceeded → Both sections displayed - Only standard categories exceeded → Original AddEventsCTA behavior <img width="504" height="383" alt="Screenshot 2026-01-24 at 4 16 39 PM" src="https://github.com/user-attachments/assets/1aab103e-7d33-47f1-ad98-3e2a599f93d9" /> ## Test plan - [x] Added tests for Size Analysis quota exceeded with Contact Sales CTA - [x] Added tests for Build Distribution quota exceeded with Contact Sales CTA - [x] Added tests for both Emerge categories exceeded together - [x] Added tests for mixed Emerge and standard categories exceeded - [x] All 21 tests in navBillingStatus.spec.tsx pass - [x] Manually verified UI in dev environment with mocked database changes
…106932) Closes https://linear.app/getsentry/issue/BIL-2005/add-emerge-billing-overage-ui-with-contact-sales-cta ## Summary - Add special handling for Emerge data categories (SIZE_ANALYSIS, INSTALLABLE_BUILD) in the navigation billing status component - Show "Contact Sales" CTA (mailto:[email protected]) instead of AddEventsCTA since Emerge categories don't have PAYG available - Support three scenarios: - Only Emerge categories exceeded → Contact Sales CTA - Both Emerge and standard categories exceeded → Both sections displayed - Only standard categories exceeded → Original AddEventsCTA behavior <img width="504" height="383" alt="Screenshot 2026-01-24 at 4 16 39 PM" src="https://github.com/user-attachments/assets/1aab103e-7d33-47f1-ad98-3e2a599f93d9" /> ## Test plan - [x] Added tests for Size Analysis quota exceeded with Contact Sales CTA - [x] Added tests for Build Distribution quota exceeded with Contact Sales CTA - [x] Added tests for both Emerge categories exceeded together - [x] Added tests for mixed Emerge and standard categories exceeded - [x] All 21 tests in navBillingStatus.spec.tsx pass - [x] Manually verified UI in dev environment with mocked database changes
Closes https://linear.app/getsentry/issue/BIL-2005/add-emerge-billing-overage-ui-with-contact-sales-cta
Summary
Test plan