🌐 US-Proxy
class="logged-out env-production page-responsive" style="word-wrap: break-word;" >
Skip to content

feat(site/src/pages/AISettingsPage/SpendPage): announce cost controls move to AI Governance - #27543

Merged
ibetitsmike merged 1 commit into
mainfrom
mike/spend-banner
Jul 28, 2026
Merged

feat(site/src/pages/AISettingsPage/SpendPage): announce cost controls move to AI Governance#27543
ibetitsmike merged 1 commit into
mainfrom
mike/spend-banner

Conversation

@ibetitsmike

@ibetitsmike ibetitsmike commented Jul 27, 2026

Copy link
Copy Markdown
Collaborator

Adds an informational banner to the AI settings Spend tab announcing that cost controls features move to AI Governance in v2.37, with a link to the AI Gateway cost controls docs.

Banner copy:

Cost controls features will move to AI Governance in v2.37. Read more here

The link uses the existing docs() helper from #/utils/docs, so it resolves the deployment's configured docs-url meta tag and otherwise falls back to a version-pinned coder.com/docs/@<version> URL. This matches how sibling AI settings pages link out (for example GatewayKeysPageView and ProvidersPageView).

It points at /ai-coder/ai-gateway/cost-controls, the AI Gateway Cost Controls page added in #27570. That page is present on main and the URL resolves, so the banner links to live documentation.

The banner renders on the main Spend tab. It is intentionally not shown in the per-user spend drill-in sub-view, which returns early from a separate component.

Validation

  • Extended the existing SpendWithLimitsAndUsers story to assert the banner copy and the resolved docs href. Both assertions were verified to fail when the banner is removed and when the link points somewhere else.
  • Storybook story tests for SpendPageView.stories.tsx pass (12 tests), plus tsc -p ., biome check, and lint:compiler clean.
  • make pre-commit passed through the git hooks.

Mux opened this PR on Mike's behalf.

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector

Copy link
Copy Markdown

Codex Review: Didn't find any major issues. 🎉

Reviewed commit: 9aa533d30f

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

@ibetitsmike
ibetitsmike marked this pull request as ready for review July 27, 2026 22:26
@coder-tasks

coder-tasks Bot commented Jul 27, 2026

Copy link
Copy Markdown
Contributor

Documentation Check

Updated for 0422abf (banner link repointed from /ai-coder/agents/platform-controls/usage-insights to /ai-coder/ai-gateway/cost-controls).

Updates Needed

  • Link target exists. docs/ai-coder/ai-gateway/cost-controls.md is on main (added by docs(docs): add AI Gateway cost controls placeholder page #27570) with a docs/manifest.json entry and "state": ["ai governance add-on"], so the banner link no longer 404s. The PR description still says "That page is added by a separate docs PR, so the link 404s until that PR merges" - worth updating.

    ⚠️ The page exists but is a placeholder: an add-on [!NOTE] plus <!-- TODO(AIGOV-476): Document AI Gateway cost controls. -->. There is no cost controls content and no mention of the v2.37 move.

  • docs/ai-coder/ai-gateway/cost-controls.md - The banner tells users to "Read more here" and lands them on a page with no content. Either land the AIGOV-476 content before/with this banner, or add an interim section covering what the banner announces: what moves to AI Governance, that it happens in v2.37, and what an admin must do.
  • docs/ai-coder/agents/platform-controls/usage-insights.md - Still the current-version doc for spend limits and cost tracking (Agents > Settings > Manage Agents > Spend) and still has no mention of the move. Add a short notice near the H1 cross-linking to Cost Controls, following the existing pattern in docs/ai-coder/ai-gateway/monitoring.md and the docs/ai-coder/tasks*.md pages. docs/ai-coder/agents/platform-controls/index.md (L117-124, "Spend management") can keep deferring to that page.
  • docs/ai-coder/agents/platform-controls/usage-insights.md must host the migration note because the banner links there (superseded in 0422abf: the banner now points at Cost Controls, so that page should own the note and Spend Management only needs a pointer)

Notes for whoever writes this:

  • Per docs/.style/content-guidelines.md, pure feature announcements route to the blog, but breaking changes and migration steps are in scope for docs. Keep it factual: what moves, when, and what the user must do.
  • Cost Controls is gated behind the AI Governance add-on, so keep the state signaling on the page and its manifest entry consistent.
  • Watch the emdash rule (make lint/emdash) when adding prose.

No docs changes are needed for SpendPageView.tsx / SpendPageView.stories.tsx themselves; the diff adds no new flags, endpoints, or configuration.


Automated review via Coder Agents

@ssncferreira ssncferreira left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

LGTM 👍

@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 0422abf224

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread site/src/pages/AISettingsPage/SpendPage/SpendPageView.tsx
… move to AI Governance

Add an informational banner to the Spend tab pointing at the AI Gateway
cost controls docs, so admins know the cost controls features move to AI
Governance in v2.37.
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 061678c84d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread site/src/pages/AISettingsPage/SpendPage/SpendPageView.tsx
@ibetitsmike

Copy link
Copy Markdown
Collaborator Author

@codex review

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 061678c84d

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

<AlertDescription>
Cost controls features will move to AI Governance in v2.37.{" "}
<Link
href={docs("/ai-coder/ai-gateway/cost-controls")}

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 →

@ibetitsmike
ibetitsmike merged commit e83f018 into main Jul 28, 2026
30 checks passed
@ibetitsmike
ibetitsmike deleted the mike/spend-banner branch July 28, 2026 10:32
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 28, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants