-
-
Notifications
You must be signed in to change notification settings - Fork 4.5k
feat(usage overview): Introduce util functions and hook #104131
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
base: master
Are you sure you want to change the base?
Conversation
❌ 1 Tests Failed:
View the top 1 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
| excludeProductTrials?: boolean | ||
| ): ProductBillingMetadata { | ||
| const isAddOn = checkIsAddOn(parentProduct ?? product); | ||
| const billedCategory = getBilledCategory(subscription, product); |
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.
Bug: Inconsistent parameter usage in billing metadata hook
The getBilledCategory call uses only product while isAddOn uses parentProduct ?? product. When parentProduct is an add-on category and product is a data category, isAddOn correctly evaluates to true, but getBilledCategory receives the data category instead of the add-on category. This causes getBilledCategory to return the data category unchanged rather than determining the correct billed category for the add-on, leading to incorrect billing metadata.
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.
this is intentional as we render different things for add ons and their child categories, see #103983 for full usage
|
LGTM |
brendanhsentry
left a comment
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.
noice
Split out from #103983
Pt 1 of https://linear.app/getsentry/issue/BIL-1817/update-usage-overview-table-with-new-designs