Skip to content

Conversation

@isabellaenriquez
Copy link
Member

@isabellaenriquez isabellaenriquez commented Nov 28, 2025

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

codecov bot commented Nov 28, 2025

❌ 1 Tests Failed:

Tests completed Failed Passed Skipped
12746 1 12745 10
View the top 1 failed test(s) by shortest run time
Subscription > UsageHistory displays soft cap per-category on-demand when relevant
Stack Traces | 1.12s run time
Error: Unable to find an element with the text: Errors (On Demand). This could be because the text is broken up by multiple elements. In this case, you can provide a function for your text matcher to make your matcher more flexible.

Ignored nodes: comments, script, style
...
    at waitForWrapper (.../sentry/node_modules/.pnpm/@testing-library+dom@10.4.0/node_modules/@.../dom/dist/wait-for.js:163:27)
    at .../sentry/node_modules/.pnpm/@testing-library+dom@10.4.0/node_modules/@.../dom/dist/query-helpers.js:86:33
    at Object.findAllByText (.../views/subscriptionPage/usageHistory.spec.tsx:438:25)
    at Promise.finally.completed (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1559:28)
    at new Promise (<anonymous>)
    at callAsyncCircusFn (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1499:10)
    at _callCircusTest (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1009:40)
    at _runTest (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:949:3)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:839:13)
    at _runTestsForDescribeBlock (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:829:11)
    at run (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:757:3)
    at runAndTransformResultsToJestFormat (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/jestAdapterInit.js:1920:21)
    at jestAdapter (.../sentry/node_modules/.pnpm/jest-circus@30.0.4_babel-plugin-macros@3.1..../jest-circus/build/runner.js:101:19)
    at runTestInternal (.../sentry/node_modules/.pnpm/jest-runner@30.0..../jest-runner/build/testWorker.js:272:16)
    at runTest (.../sentry/node_modules/.pnpm/jest-runner@30.0..../jest-runner/build/testWorker.js:340:7)
    at Object.worker (.../sentry/node_modules/.pnpm/jest-runner@30.0..../jest-runner/build/testWorker.js:494:12)

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 November 28, 2025 18:49
@isabellaenriquez isabellaenriquez requested a review from a team as a code owner November 28, 2025 18:49
excludeProductTrials?: boolean
): ProductBillingMetadata {
const isAddOn = checkIsAddOn(parentProduct ?? product);
const billedCategory = getBilledCategory(subscription, product);
Copy link
Contributor

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.

Fix in Cursor Fix in Web

Copy link
Member Author

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

@vbro
Copy link
Contributor

vbro commented Dec 1, 2025

LGTM
Curious if this is by any chance inspired by https://www.notion.so/sentry/Sentry-Billing-Platform-26b8b10e4b5d80ef8716f0939c56d6d7. That's the direction the billing is going: from the concept of categories to products.

Copy link
Member

@brendanhsentry brendanhsentry left a comment

Choose a reason for hiding this comment

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

noice

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.

5 participants