Skip to content

Conversation

@isabellaenriquez
Copy link
Member

@isabellaenriquez isabellaenriquez commented Dec 1, 2025

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.
Screenshot 2025-12-01 at 12 18 46 PM

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

codecov bot commented Dec 1, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
12757 1 12756 10
View the top 3 failed test(s) by shortest run time
UsageOverview renders columns for non-billing users
Stack Traces | 0.109s run time
Error: expect(received).toHaveLength(expected)

Expected length: 3
Received length: 6
Received array:  [<th><span class="css-1kc4ptp-Text e1cz2wip0">Feature</span></th>, <th><span class="css-1kc4ptp-Text e1cz2wip0">Usage</span></th>, <th><span class="css-1orknf9-Text-rc e1cz2wip0">Additional spend</span></th>, <th><div class="css-1r3o8wo-TextOverflow-overflowEllipsis e1lyrgnz0">Errors</div></th>, <th><div class="css-1r3o8wo-TextOverflow-overflowEllipsis e1lyrgnz0">Quantity</div></th>, <th><div class="css-1r3o8wo-TextOverflow-overflowEllipsis e1lyrgnz0">% of Errors</div></th>]
    at Object.toHaveLength (.../usageOverview/components/table.spec.tsx:62:49)
UsageOverview does not render spend columns for non-self-serve without PAYG support
Stack Traces | 0.113s run time
Error: expect(received).toHaveLength(expected)

Expected length: 2
Received length: 5
Received array:  [<th><span class="css-1kc4ptp-Text e1cz2wip0">Feature</span></th>, <th><span class="css-1kc4ptp-Text e1cz2wip0">Usage</span></th>, <th><div class="css-1r3o8wo-TextOverflow-overflowEllipsis e1lyrgnz0">Errors</div></th>, <th><div class="css-1r3o8wo-TextOverflow-overflowEllipsis e1lyrgnz0">Quantity</div></th>, <th><div class="css-1r3o8wo-TextOverflow-overflowEllipsis e1lyrgnz0">% of Errors</div></th>]
    at Object.toHaveLength (.../usageOverview/components/table.spec.tsx:117:49)
UsageOverview renders columns for non-self-serve with PAYG support
Stack Traces | 0.122s run time
Error: expect(received).toHaveLength(expected)

Expected length: 3
Received length: 6
Received array:  [<th><span class="css-1kc4ptp-Text e1cz2wip0">Feature</span></th>, <th><span class="css-1kc4ptp-Text e1cz2wip0">Usage</span></th>, <th><span class="css-1orknf9-Text-rc e1cz2wip0">Additional spend</span></th>, <th><div class="css-1r3o8wo-TextOverflow-overflowEllipsis e1lyrgnz0">Errors</div></th>, <th><div class="css-1r3o8wo-TextOverflow-overflowEllipsis e1lyrgnz0">Quantity</div></th>, <th><div class="css-1r3o8wo-TextOverflow-overflowEllipsis e1lyrgnz0">% of Errors</div></th>]
    at Object.toHaveLength (.../usageOverview/components/table.spec.tsx:91:49)
UsageOverview renders columns and buttons for billing users
Stack Traces | 0.218s run time
Error: expect(received).toHaveLength(expected)

Expected length: 3
Received length: 6
Received array:  [<th><span class="css-1kc4ptp-Text e1cz2wip0">Feature</span></th>, <th><span class="css-1kc4ptp-Text e1cz2wip0">Usage</span></th>, <th><span class="css-1orknf9-Text-rc e1cz2wip0">Additional spend</span></th>, <th><div class="css-1r3o8wo-TextOverflow-overflowEllipsis e1lyrgnz0">Errors</div></th>, <th><div class="css-1r3o8wo-TextOverflow-overflowEllipsis e1lyrgnz0">Quantity</div></th>, <th><div class="css-1r3o8wo-TextOverflow-overflowEllipsis e1lyrgnz0">% of Errors</div></th>]
    at Object.toHaveLength (.../usageOverview/components/table.spec.tsx:39:49)
    at runNextTicks (node:internal/process/task_queues:65:5)
    at processTimers (node:internal/timers:520:9)

To view more test analytics, go to the Test Analytics Dashboard
📋 Got 3 mins? Take this short survey to help us improve Test Analytics.

@isabellaenriquez isabellaenriquez marked this pull request as ready for review December 1, 2025 17:19
@isabellaenriquez isabellaenriquez requested a review from a team as a code owner December 1, 2025 17:19
Base automatically changed from isabella/uo-v2-pt-5 to master December 2, 2025 19:51
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);
Copy link
Contributor

Choose a reason for hiding this comment

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

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.

Fix in Cursor Fix in Web

@isabellaenriquez isabellaenriquez merged commit e8af143 into master Dec 2, 2025
48 checks passed
@isabellaenriquez isabellaenriquez deleted the isabella/uo-v2-pt-6 branch December 2, 2025 21:15
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.

4 participants