feat(billing): _admin page for viewing Contract information#109853
feat(billing): _admin page for viewing Contract information#109853brendanhsentry merged 3 commits intomasterfrom
Conversation
There was a problem hiding this comment.
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> |
There was a problem hiding this comment.
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)
Triggered by project rule: Frontend guidelines
| {isUnlimitedReserved(Number(tier.end)) ? UNLIMITED : tier.end} | ||
| </Text> |
There was a problem hiding this comment.
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.


depends on https://github.com/getsentry/getsentry/pull/19461
Creates new internal page for viewing
Contracts