Skip to content

Commit 88a9671

Browse files
authored
improvement(usage): drop the segmented allowance meter from the usage summary (#7202)
The pills answered a question the line above them had already answered. "511,488 credits of 2,000,000" is the proportion, stated exactly; a 24-segment bar restates it approximately, and directly under a chart of the same data in the same colour it reads as a third series rather than as a summary. The seat meter keeps `SegmentedMeter`, where it belongs: seats are countable, so a pill per seat is legible in a way a pill per ~83,000 credits is not. The overage signal the meter also carried is unaffected — the "Over limit" badge beside the figure already states it, and states it in words.
1 parent 56abc6c commit 88a9671

1 file changed

Lines changed: 0 additions & 17 deletions

File tree

apps/sim/ee/organization-usage/components/usage-summary.tsx

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,11 @@ import { Badge } from '@sim/emcn'
55
import { BarChart } from '@/components/charts'
66
import type { OrganizationUsageSummary } from '@/lib/api/contracts/organization-usage'
77
import { formatCreditsLabel } from '@/lib/billing/credits/conversion'
8-
import { SegmentedMeter } from '@/app/workspace/[workspaceId]/settings/components/segmented-meter'
98
import { SettingsEmptyState } from '@/app/workspace/[workspaceId]/settings/components/settings-empty-state'
109

1110
/** Consumption, matching the seat meter's indicator rather than an outcome colour. */
1211
const USAGE_SERIES_COLOR = 'var(--indicator-seat-filled)'
1312

14-
/**
15-
* A credit allowance runs to the millions, so the meter cannot be countable the way
16-
* the seat meter is — a fixed count reads as a percentage instead. Matches the seat
17-
* overview's own fallback.
18-
*/
19-
const ALLOWANCE_SEGMENTS = 24
20-
2113
interface UsageSummaryProps {
2214
summary?: OrganizationUsageSummary
2315
/** Pooled allowance in credits, from the organization's billing data. `null` when uncapped. */
@@ -95,15 +87,6 @@ export function UsageSummary({ summary, limitCredits, isLoading, isError }: Usag
9587
)}
9688
</div>
9789

98-
{/*
99-
The shared allowance meter, not a second bar drawn from the same token.
100-
`SegmentedMeter` already owns the overage tone, and it is the affordance the
101-
seat overview uses for exactly this question.
102-
*/}
103-
{hasLimit && (
104-
<SegmentedMeter used={used} total={limitCredits} segments={ALLOWANCE_SEGMENTS} />
105-
)}
106-
10790
<BarChart data={series} label='' color={USAGE_SERIES_COLOR} unit='credits' height={160} />
10891
</div>
10992
)

0 commit comments

Comments
 (0)