Skip to content

Commit 26228bd

Browse files
committed
fix(webapp): tidy Usage page credits display
Label the Usage page credits panel "Credits" instead of "Promo credits", so it reads correctly for any credit source (not just promo-code redemptions). Stop showing the "Included usage" allowance for Enterprise organizations: Enterprise inherits the Pro plan's includedUsage, but enterprise orgs bill against prepaid credits rather than a per-month included-usage tier, so the marker was misleading.
1 parent 6e943f2 commit 26228bd

2 files changed

Lines changed: 13 additions & 2 deletions

File tree

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
area: webapp
3+
type: fix
4+
---
5+
6+
The Usage page credits panel is now labelled "Credits" (previously "Promo credits"), and the "Included usage" allowance is no longer shown for Enterprise organizations, which bill against prepaid credits rather than a per-month included-usage tier.

apps/webapp/app/routes/_app.orgs.$organizationSlug.settings.usage/route.tsx

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,9 @@ export default function Page() {
114114
const currentPlan = useCurrentPlan();
115115
const billingLimit = useBillingLimit();
116116
const planLimitCents = currentPlan?.v3Subscription?.plan?.limits.includedUsage ?? 0;
117+
// Enterprise bills against prepaid credits, not a per-month included-usage tier,
118+
// so the "Included usage" marker doesn't apply.
119+
const isEnterprise = currentPlan?.v3Subscription?.plan?.type === "enterprise";
117120
const billingLimitDollars = isCurrentMonth
118121
? getUsageBarBillingLimitDollars(billingLimit, planLimitCents)
119122
: undefined;
@@ -157,7 +160,7 @@ export default function Page() {
157160
<div className="flex flex-col gap-1 border-t border-grid-dimmed p-3">
158161
<div className="flex items-end gap-8">
159162
<div className="flex flex-col gap-1">
160-
<Header2 className="whitespace-nowrap">Promo credits</Header2>
163+
<Header2 className="whitespace-nowrap">Credits</Header2>
161164
<p className="whitespace-nowrap text-3xl font-medium text-text-bright">
162165
{formatCurrency(promoCredits.remainingCents / 100, false)}
163166
</p>
@@ -215,7 +218,9 @@ export default function Page() {
215218
<UsageBar
216219
current={usage.overall.current}
217220
isPaying={currentPlan?.v3Subscription?.isPaying ?? false}
218-
tierLimit={isCurrentMonth ? planLimitCents / 100 : undefined}
221+
tierLimit={
222+
isCurrentMonth && !isEnterprise ? planLimitCents / 100 : undefined
223+
}
219224
billingLimit={billingLimitDollars}
220225
/>
221226
</div>

0 commit comments

Comments
 (0)