Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions site/src/pages/AISettingsPage/SpendPage/SpendPageView.stories.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down
16 changes: 16 additions & 0 deletions site/src/pages/AISettingsPage/SpendPage/SpendPageView.tsx
Original file line number Diff line number Diff line change
@@ -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,
Expand All @@ -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,
Expand Down Expand Up @@ -232,6 +235,19 @@ export const SpendPageView: FC<SpendPageViewProps> = ({
>
{(userCtrl) => (
<div className="flex max-w-[1100px] flex-col gap-8">
<Alert severity="info">
<AlertDescription>
Cost controls features will move to AI Governance in v2.37.{" "}
<Link
href={docs("/ai-coder/ai-gateway/cost-controls")}
Comment thread
ibetitsmike marked this conversation as resolved.
Comment thread
ibetitsmike marked this conversation as resolved.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Point the CTA at actual migration guidance

Every user who follows this new “Read more here” CTA reaches docs/ai-coder/ai-gateway/cost-controls.md, but that page currently contains only an AI Governance add-on note and a TODO placeholder, with no explanation of the v2.37 migration or cost controls. The banner therefore promises information that its destination does not provide; complete that documentation or link to an existing page containing the migration guidance before publishing the notice.

Useful? React with 👍 / 👎.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flagging this as a deliberate open decision rather than resolving it a third time.

This is the same finding as the thread above, and it is factually correct: docs/ai-coder/ai-gateway/cost-controls.md is currently 8 lines (title, AI Governance licensing note, <!-- TODO(AIGOV-476) -->).

The link target was chosen explicitly by the PR author, who directed the banner at this canonical path knowing the page was still in flight. What was not known at that time is that the page merged (#27570) as a placeholder rather than with content.

Leaving this thread unresolved on purpose, so a human adjudicates rather than having an automated loop close the same objection repeatedly. The options are: ship now and let AIGOV-476 fill the page before v2.37, hold this PR until that content lands, or point the CTA at /ai-coder/ai-gateway in the interim.

No further @codex review requests will be sent for this finding, since it cannot be resolved from within this frontend-only diff.

Mux posted this reply on Mike's behalf.

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Summary

  • No code changes were made. The trigger explicitly leaves the link-target decision open for human adjudication rather than requesting another automated resolution.
  • Confirmed that the banner links to the canonical AI Gateway cost-controls route. site/src/pages/AISettingsPage/SpendPage/SpendPageView.tsxL238-L247
  • Confirmed that the destination remains an eight-line placeholder whose substantive content is tracked by AIGOV-476. docs/ai-coder/ai-gateway/cost-controls.mdL1-L8
  • Because the working tree is clean, there was nothing to commit and, per the PR workflow, no new pull request was created.

Testing

  • git diff --check
  • git status --porcelain (clean working tree)
  • git rev-parse HEAD (confirmed checkout at PR head 061678c84db743397f23c3820eb5096bf8dd73bd)

View task →

target="_blank"
rel="noreferrer"
>
Read more here
</Link>
</AlertDescription>
</Alert>

<SettingsHeader>
<SettingsHeaderTitle>
Spend limits and usage
Expand Down
Loading