fix: AI governance into AI Governance (#23553)

This commit is contained in:
Jake Howell
2026-03-25 20:06:48 +11:00
committed by GitHub
parent 98143e1b70
commit 0cea4de69e
14 changed files with 25 additions and 25 deletions
@@ -6,7 +6,7 @@ const meta: Meta<typeof AIGovernanceAddOnCard> = {
"pages/DeploymentSettingsPage/LicensesSettingsPage/AIGovernanceAddOnCard",
component: AIGovernanceAddOnCard,
args: {
title: "AI governance",
title: "AI Governance",
unit: "Seats",
actual: 750,
limit: 1000,
@@ -41,7 +41,7 @@ export const AIGovernanceAddOnCard: FC<AIGovernanceAddOnCardProps> = ({
<TooltipTrigger asChild>
<button
type="button"
aria-label="AI governance seat information"
aria-label="AI Governance seat information"
className="m-0 inline-flex appearance-none border-0 bg-transparent p-0 text-content-secondary"
>
<InfoIcon className="size-3" />
@@ -76,7 +76,7 @@ function aiGovernanceLimitFromLicenses(
}
/**
* Resolves the displayed AI governance user limit for summary charts.
* Resolves the displayed AI Governance user limit for summary charts.
*
* When the feature is not entitled yet, JWT claims can still carry the
* purchased add-on seat limit while entitlements may report limit 0.
@@ -120,7 +120,7 @@ export const UsageBarFromLicenseClaims: Story = {
const canvas = within(canvasElement);
await expect(canvas.getByText("750")).toBeInTheDocument();
await expect(
canvas.getByRole("heading", { name: "AI governance add-on usage" }),
canvas.getByRole("heading", { name: "AI Governance add-on usage" }),
).toBeInTheDocument();
},
};
@@ -34,7 +34,7 @@ export const AIGovernanceUsersConsumption: FC<
<div className="flex items-center justify-center rounded-lg border border-solid p-4">
<div className="flex flex-col items-center justify-center">
<div className="flex flex-col items-center justify-center">
<span className="text-base">AI governance add-on usage</span>
<span className="text-base">AI Governance add-on usage</span>
<span className="text-content-secondary text-center max-w-[464px] mt-2">
AI Governance is not included in your current license. Contact{" "}
<Link href="mailto:sales@coder.com">sales</Link> to upgrade your
@@ -48,7 +48,7 @@ export const AIGovernanceUsersConsumption: FC<
return (
<SeatUsageBarCard
title="AI governance add-on usage"
title="AI Governance add-on usage"
actual={aiGovernanceUserFeature?.actual}
limit={effectiveLimit}
/>
@@ -124,7 +124,7 @@ export const PremiumWithoutAIGovernanceAddOn: Story = {
play: async ({ canvasElement }) => {
const canvas = within(canvasElement);
await expect(canvas.queryByText("Add-ons")).not.toBeInTheDocument();
await expect(canvas.queryByText("AI governance")).not.toBeInTheDocument();
await expect(canvas.queryByText("AI Governance")).not.toBeInTheDocument();
},
};
@@ -71,7 +71,7 @@ export const LicenseCard: FC<LicenseCardProps> = ({
license,
aiGovernanceUserFeature,
);
// A license "wins" when its AI governance limit matches the merged limit.
// A license "wins" when its AI Governance limit matches the merged limit.
const isWinningAiGovernanceLicense =
aiGovernanceMergedLimit !== undefined &&
aiGovernanceLimit > 0 &&
@@ -227,7 +227,7 @@ export const LicenseCard: FC<LicenseCardProps> = ({
</div>
<div className="mt-3 flex flex-wrap gap-3">
<AIGovernanceAddOnCard
title="AI governance"
title="AI Governance"
unit="Seats"
actual={aiGovernanceDisplayActual}
limit={aiGovernanceLimit}
@@ -43,7 +43,7 @@ export const Empty: Story = {
},
};
/** Premium + AI governance usage bars; AI governance shows `SeatUsageBarCard` (not the not-entitled placeholder). */
/** Premium + AI Governance usage bars; AI Governance shows `SeatUsageBarCard` (not the not-entitled placeholder). */
export const ActiveAIGovernanceAddOnUsage: Story = {
args: {
userLimitActual: 1923,
@@ -67,7 +67,7 @@ export const ActiveAIGovernanceAddOnUsage: Story = {
await expect(canvas.getByText("1,923")).toBeInTheDocument();
await expect(canvas.getByText("2,500")).toBeInTheDocument();
await expect(
canvas.getByRole("heading", { name: "AI governance add-on usage" }),
canvas.getByRole("heading", { name: "AI Governance add-on usage" }),
).toBeInTheDocument();
await expect(canvas.getByText("512")).toBeInTheDocument();
await expect(canvas.getByText("1,000")).toBeInTheDocument();