Skip to content

feat(seer): Trial and checkout UI #92389

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

Merged
merged 16 commits into from
May 30, 2025
Merged

feat(seer): Trial and checkout UI #92389

merged 16 commits into from
May 30, 2025

Conversation

roaga
Copy link
Member

@roaga roaga commented May 28, 2025

In the drawer, if the seer-billing flag is enabled, shows buttons to start trials/go to checkout. These buttons implicitly trigger the acknowledgement check as well. If billing is satisfied and missing acknowledgement, the old acknowledgement buttons will still show.

If no autofix quota in the set up check > show welcome screen > if trial available and not started, prompt to start trial, else prompt to checkout

Note: pls double check my billing logic is correct, I'm new to the code here. in yarn dev-ui I was getting a 400 when clicking "start trial" for example but I'm hoping that's just because billing hasn't released yet or because i'm testing locally.

Screenshot 2025-05-27 at 6 25 04 PM Screenshot 2025-05-27 at 7 05 36 PM Screenshot 2025-05-27 at 7 08 36 PM Screenshot 2025-05-27 at 7 21 59 PM Screenshot 2025-05-29 at 8 52 35 AM

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label May 28, 2025
Copy link

codecov bot commented May 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

✅ All tests successful. No failed tests found.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #92389      +/-   ##
==========================================
- Coverage   81.61%   81.61%   -0.01%     
==========================================
  Files       10207    10207              
  Lines      584854   584853       -1     
  Branches    22686    22686              
==========================================
- Hits       477340   477339       -1     
  Misses     107092   107092              
  Partials      422      422              

Copy link
Member

@jennmueng jennmueng left a comment

Choose a reason for hiding this comment

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

Looks good for a first pass to me as it looks like we're acknowledging at the same time the billing button is pressed

I'd suggest putting the seer icon next to the "Meet Seer" text rather than next to the button. Looks kinda weird there IMO and placing it next to "Meet Seer" would "introduce" you to the little guy lol

@roaga
Copy link
Member Author

roaga commented May 28, 2025

Looks good for a first pass to me as it looks like we're acknowledging at the same time the billing button is pressed

I'd suggest putting the seer icon next to the "Meet Seer" text rather than next to the button. Looks kinda weird there IMO and placing it next to "Meet Seer" would "introduce" you to the little guy lol

Ok, moved it
Screenshot 2025-05-28 at 6 31 53 AM

@roaga roaga marked this pull request as ready for review May 29, 2025 16:03
@roaga roaga requested review from a team as code owners May 29, 2025 16:03
Comment on lines +149 to +155
<Button
icon={<IconRefresh size="xs" />}
onClick={() => refetch()}
size="md"
priority="default"
aria-label={t('Refresh')}
borderless
Copy link
Member Author

Choose a reason for hiding this comment

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

putting this here in case the user adds budget so they can update the screen, because the modal doesn't have any callback or anything

Copy link
Member

@isabellaenriquez isabellaenriquez left a comment

Choose a reason for hiding this comment

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

just some billing thoughts!

in regards to your pr description, the product trial endpoint should be working (i tested on my local from our entry point) and it looks like you made the request correctly. is it still not working for you?

Comment on lines 40 to 43
const trial = getProductTrial(
subscription?.productTrials ?? null,
DataCategory.SEER_AUTOFIX
);
Copy link
Member

Choose a reason for hiding this comment

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

since it looks like we only need trial info for discerning whether to render the product trial upsell, you should use getPotentialProductTrial

const hasSeerButNeedsPayg =
shouldShowBilling && organization.features.includes('seer-added');

const isTouchCustomer = subscription?.type === BillingType.INVOICED;
Copy link
Member

Choose a reason for hiding this comment

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

we likely need to special case for sponsored customers too since they won't have access to seer at all

Copy link
Member Author

Choose a reason for hiding this comment

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

What's the special case for them? Do they just get free unlimited access, do we tell them to talk to someone, do we just block them from using Seer...?

Copy link
Member

Choose a reason for hiding this comment

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

It was decided sponsored orgs won't be able to use Seer but we should double check the expected behavior for them in the project channel

requestData={{
productTrial: {
category: DataCategory.SEER_AUTOFIX,
reasonCode: 1001,
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
reasonCode: 1001,
reasonCode: trial.reasonCode,

Comment on lines 139 to 141
{t(
"You've run out of pay-as-you-go budget. Please add more to keep using Seer."
)}
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
{t(
"You've run out of pay-as-you-go budget. Please add more to keep using Seer."
)}
{tct(
"You've run out of [budgetTerm] budget. Please add more to keep using Seer.",
{budgetTerm: subscription.planDetails.budgetTerm}
)}

we have different names based on the plan tier 😅

)}
</ErrorText>
<Flex>
<AddBudgetButton
Copy link
Member

Choose a reason for hiding this comment

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

would be great to add some analytics here!

@roaga
Copy link
Member Author

roaga commented May 29, 2025

in regards to your pr description, the product trial endpoint should be working (i tested on my local from our entry point) and it looks like you made the request correctly. is it still not working for you?

@isabellaenriquez it's still giving me a 400, but I am making the button available by hardcoding. My condition for canStartTrial is false by default within the sentry org. I assume that's expected?

@isabellaenriquez
Copy link
Member

@roaga ah yeah that makes sense, we'll just verify this in e2e testing next week

@@ -50,6 +50,7 @@ function AiSetupDataConsent({groupId}: AiSetupDataConsentProps) {
shouldShowBilling && organization.features.includes('seer-added');

const isTouchCustomer = subscription?.type === BillingType.INVOICED;
const isSponsoredCustomer = subscription?.type === BillingType.PARTNER;
Copy link
Member

Choose a reason for hiding this comment

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

we should check subscription.isSponsored instead since we only want to show that messaging for orgs on sponsored plans (not all partner orgs are on sponsored plans)

Copy link
Member Author

Choose a reason for hiding this comment

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

Changed

Comment on lines 116 to 117
? t('Contact your customer success manager to get access to Seer.')
: t('Seer is not available on Sponsored plans.')}
Copy link
Member

Choose a reason for hiding this comment

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

typically for touch customers, we'll include the sales contact email (sales@sentry.io)

would probably also be nice for the sponsored orgs to get the support contact email (support@sentry.io)

Copy link
Member Author

Choose a reason for hiding this comment

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

Added

@roaga roaga merged commit 34c7386 into master May 30, 2025
42 checks passed
@roaga roaga deleted the seer/billing-ui branch May 30, 2025 14:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Scope: Frontend Automatically applied to PRs that change frontend components
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants