Skip to content

feat(billing): _admin page for viewing Contract information#109853

Merged
brendanhsentry merged 3 commits intomasterfrom
customer-contract-details
Mar 4, 2026
Merged

feat(billing): _admin page for viewing Contract information#109853
brendanhsentry merged 3 commits intomasterfrom
customer-contract-details

Conversation

@brendanhsentry
Copy link
Member

depends on https://github.com/getsentry/getsentry/pull/19461

Creates new internal page for viewing Contracts

@github-actions github-actions bot added the Scope: Frontend Automatically applied to PRs that change frontend components label Mar 4, 2026
@brendanhsentry brendanhsentry marked this pull request as ready for review March 4, 2026 00:46
@brendanhsentry brendanhsentry requested a review from a team March 4, 2026 00:46
Copy link
Contributor

@cursor cursor bot left a comment

Choose a reason for hiding this comment

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

Cursor Bugbot has reviewed your changes and found 1 potential issue.

Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.


return (
<SKUPricingSection key={skuConfig.sku ?? idx}>
<h6>{formatEnumLabel(skuConfig.sku, 'SKU_')}</h6>
Copy link
Contributor

Choose a reason for hiding this comment

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

Raw h6 elements violate typography guidelines

Low Severity

New code uses raw <h6> intrinsic elements instead of the Heading component from @sentry/scraps/text. The static/AGENTS.md explicitly states: "Do not use or style h1, h2, h3, h4, h5, h6 intrinsic elements. Prefer using <Heading as='h1...h6'> component instead." The Heading component supports as="h6" and is already used elsewhere in gsAdmin (e.g., changeBalanceAction.tsx).

Additional Locations (1)

Fix in Cursor Fix in Web

Triggered by project rule: Frontend guidelines

Comment on lines +177 to +178
{isUnlimitedReserved(Number(tier.end)) ? UNLIMITED : tier.end}
</Text>
Copy link
Contributor

Choose a reason for hiding this comment

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

Bug: The code lacks a fallback for tier.end, which can be undefined. This may cause the literal string "undefined" to be rendered in the UI for PAYG tiers.
Severity: MEDIUM

Suggested Fix

Add a fallback for tier.end to handle cases where it is undefined, similar to how tier.start is handled. For example, change {isUnlimitedReserved(Number(tier.end)) ? UNLIMITED : tier.end} to {isUnlimitedReserved(Number(tier.end)) ? UNLIMITED : tier.end ?? 'N/A'} or another appropriate default value.

Prompt for AI Agent
Review the code at the location below. A potential bug has been identified by an AI
agent.
Verify if this is a real issue. If it is, propose a fix; if not, explain why it's not
valid.

Location: static/gsAdmin/views/customerContractDetails.tsx#L177-L178

Potential issue: The `tier.end` property, typed as `string | undefined`, is rendered
directly when it is not an "unlimited" value. If the API provides a tier where
`tier.end` is `undefined`, the expression `isUnlimitedReserved(Number(tier.end))`
evaluates to `false`, causing the `undefined` value of `tier.end` to be rendered. React
will display this as the literal string "undefined" in the UI. This is inconsistent with
the handling of `tier.start`, which includes a `?? '0'` fallback. Test data suggests
tiers can be missing `start` and `end` values, making this a likely scenario.

Did we get this right? 👍 / 👎 to inform future reviews.

@brendanhsentry brendanhsentry merged commit c02eef4 into master Mar 4, 2026
60 checks passed
@brendanhsentry brendanhsentry deleted the customer-contract-details branch March 4, 2026 21:02
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.

2 participants