Repository navigation
Conversation
Users in more than one organization can pick an organization in the avatar menu to see their AI spend and budget there. The avatar badge follows the selected organization, and users over their limit see a "Limit exceeded" header with the date AI requests resume. Refs AIGOV-766 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…indings - Show a $0 budget as exceeded in the user menu, since AI Gateway blocks requests once spend reaches the limit. - Give the organization items a typeahead value, so the avatar initials no longer prefix the text Radix matches against. - Cover picking an organization with the keyboard, including focus returning to the organization button. - Make the organization_id fallback fixture match what the server returns. Refs AIGOV-766 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
SasSwart
temporarily deployed
to
docs-preview
November 14, 2026 12:51 — with
GitHub Actions
Inactive
Contributor
Docs previewLinks open this pull request's preview at https://pr-32204.docs.cdr-preview.dev, which updates with each push. Check off each page once it's been reviewed. If a page changes in a later push, its checkbox clears automatically so it gets a fresh look. Pages not yet wired into the docs navigation aren't listed here. Preview sites for each built commit (1)Every built commit keeps its own preview, newest first. Previews aren't indexed by search engines and are deleted when this pull request is merged or closed. |
This branch was previously deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Users in more than one organization can now pick an organization in the avatar menu and see their AI spend and budget there. Before, the menu showed one figure from a site-wide effective group, so these users had no way to see their spend in their other organizations.
DropdownMenuRadioGroupinside the existing menu, so the menu stays open while the user switches. Each organization in the list shows a warning or exceeded badge with a screen reader label, in API order, and typeahead matches the organization name. The selection lives in local component state. It starts on the entry that matchesorganization_id, or the first entry if none matches. If a refetch drops the selected organization, it falls back the same way.getSeverityhelper is unchanged, so other views still show $0 of $0 as normal. Below the bar, the line "AI requests are paused until {period end}" appears. The normal and warning states look the same as before.organizations, see the top-level fields as before.meAISpendrefetches every 60 seconds. When a refetch fails, the menu now keeps the last spend and adds "Couldn't refresh AI spend:" followed by the server's error message. Before, it hid the section, which would close an open selector while the user was choosing.UsageIndicatorstill hides spend on error.The rule for which spend to show lives in a pure helper,
getViewedSpendinviewedSpend.ts. The severity map moved intoseverityIndicators.tsx, next to a sharedSeverityBadge. The cost controls page now describes the selector and the exceeded state.Open questions
A $0 budget blocks every AI Gateway request, but the shared
getSeverityhelper insite/src/utils/budget.tsstill shows $0 of $0 as normal. This PR only changes the user menu. Two other screens use the shared helper:UsageIndicator) shows users their own spend. Should a $0 budget show as exceeded there too, to match the menu?AIBudgetAmount) show admins each group's budget. Should a group with a $0 budget, where AI is deliberately off, show as exceeded or stay neutral?Out of scope, tracked in AIGOV-738: organization search, the count badge on the collapsed row, sorting organizations by severity, the workspace quota row, and a shared app-wide current organization.
UserDropdown.test.tsxchecks the exceeded text because the ticket asks for it. A Pixel story also covers that state. The failed-poll state has a Vitest test but no story. The Storybook query client cannot hold cached data and an error at once without a test-only hook.Screenshots
Multiple organizations
Organization picker with severity badges
Selected organization over its limit
AI spend unavailable for the selected organization
🤖 Generated with Claude Code