diff --git a/site/src/pages/AISettingsPage/SpendPage/SpendPageView.stories.tsx b/site/src/pages/AISettingsPage/SpendPage/SpendPageView.stories.tsx index 47dd6ffa611..64d6b102d64 100644 --- a/site/src/pages/AISettingsPage/SpendPage/SpendPageView.stories.tsx +++ b/site/src/pages/AISettingsPage/SpendPage/SpendPageView.stories.tsx @@ -300,6 +300,17 @@ export const SpendWithLimitsAndUsers: Story = { const canvas = within(canvasElement); await canvas.findByText("Spend limits and usage"); + await expect( + canvas.getByText( + /Cost controls features will move to AI Governance in v2\.37\./, + ), + ).toBeInTheDocument(); + await expect( + canvas.getByRole("link", { name: /Read more here/ }), + ).toHaveAttribute( + "href", + expect.stringContaining("/ai-coder/ai-gateway/cost-controls"), + ); await expect( canvas.getByRole("switch", { name: "Spend limit" }), ).toBeInTheDocument(); diff --git a/site/src/pages/AISettingsPage/SpendPage/SpendPageView.tsx b/site/src/pages/AISettingsPage/SpendPage/SpendPageView.tsx index eb044738786..2514f8c13a4 100644 --- a/site/src/pages/AISettingsPage/SpendPage/SpendPageView.tsx +++ b/site/src/pages/AISettingsPage/SpendPage/SpendPageView.tsx @@ -1,9 +1,11 @@ import type { FC } from "react"; import { getErrorMessage } from "#/api/errors"; import type * as TypesGen from "#/api/typesGenerated"; +import { Alert, AlertDescription } from "#/components/Alert/Alert"; import { ErrorAlert } from "#/components/Alert/ErrorAlert"; import { Button } from "#/components/Button/Button"; import type { DateRangeValue } from "#/components/DateRangePicker/DateRangePicker"; +import { Link } from "#/components/Link/Link"; import type { PaginationResult } from "#/components/PaginationWidget/PaginationContainer"; import { SettingsHeader, @@ -22,6 +24,7 @@ import { useTemporarySavedState, } from "#/components/TemporarySavedState/TemporarySavedState"; import { dollarsToMicros, microsToDollars } from "#/utils/currency"; +import { docs } from "#/utils/docs"; import { DefaultLimitController, type DefaultLimitFormValues, @@ -232,6 +235,19 @@ export const SpendPageView: FC = ({ > {(userCtrl) => (
+ + + Cost controls features will move to AI Governance in v2.37.{" "} + + Read more here + + + + Spend limits and usage