feat(usage overview): Introduce new table#104164
Conversation
❌ 1 Tests Failed:
View the top 3 failed test(s) by shortest run time
To view more test analytics, go to the Test Analytics Dashboard |
static/gsApp/views/subscriptionPage/usageOverview/components/productTrialRibbon.tsx
Outdated
Show resolved
Hide resolved
| events: reserved ?? 0, // buckets use the converted unit reserved amount (ie. in GB for byte categories) | ||
| buckets: subscription.planDetails.planCategories[billedCategory], | ||
| }); | ||
| const recurringReservedSpend = isChildProduct ? 0 : (bucket.price ?? 0); |
There was a problem hiding this comment.
Bug: getBucket may throw for add-on data categories
The getBucket function is called with planCategories[billedCategory] for all products including add-ons, but planCategories is typed as Partial<Record<DataCategory, EventBucket[]>> and may not contain entries for add-on data categories like seerAutofix or seerScanner. When the category doesn't exist, getBucket throws "Invalid data category for plan". This is inconsistent with how getBilledCategory in billing.tsx uses optional chaining when accessing planCategories, acknowledging entries may be missing. For add-ons, recurringReservedSpend would be set to 0 via isChildProduct ? 0 : ... anyway for child products, but parent add-on rows would still trigger the error.
Split out from #103983
Pt 6 of https://linear.app/getsentry/issue/BIL-1817/update-usage-overview-table-with-new-designs
Introduces the new table designs. Final PR will actually "GA" everything and remove the dead code.
