Repository navigation
feat(site): adopt the workspaces-style filter combobox - #29274
Conversation
PR #27330 removed the admin Spend page together with the native per-message cost tracking it displayed. This restores the page at /ai/settings/spend on top of the AI Gateway spend endpoints, gated the same way as AI Sessions: the aibridge entitlement plus permission to read any AI Gateway interception. The page defaults to the last 30 days. A filter row with provider, client, and model dropdowns and the date range picker applies to the user table and deployment summary alike, while user search leaves the deployment totals unchanged. All eight user-table columns are sortable. The user drill-in shows the same filter row, preserves filtering and sorting on Back, and links to that user's AI sessions with the same filters and applied period. Unentitled deployments see the AI Governance paywall, and entitled deployments with the gateway disabled see the setup alert. The spend management and cost controls docs point to the page. Also adds the shared API mocks (inbox notifications, template version presets) and the date-time range picker dropdown-close wait that the pre-push checks uncovered in existing tests. > Xum acted on Mike's behalf.
4e0f1a1 to
eb7d257
Compare
…AI navbar entry Show the cached drill-in profile with an inline error and Retry when a refetch fails, matching the users and summary views. Add a Vitest that a spend-only viewer reaches AI settings from the Admin settings menu.
7b905e6 to
716b497
Compare
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 716b4977f1
ℹ️ 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".
| /> | ||
| </div> | ||
| <div className="flex flex-wrap items-start gap-2"> | ||
| <FilterCombobox |
There was a problem hiding this comment.
Update the SpendPage tests for the combobox controls
The existing SpendPage.test.tsx still queries the removed textbox named Search spend by name or username and buttons named Select provider in four tests, while this replacement exposes a combobox named Search and filter spend… and a Toggle filters button. Those tests will fail before reaching their assertions, leaving the frontend test suite red and the new page-level search/filter behavior uncovered; update their interactions and debounce expectations to use the new combobox.
AGENTS.md reference: site/AGENTS.md:L7-L7
Useful? React with 👍 / 👎.
…-style filter combobox
716b497 to
9c351dd
Compare
d929af4 to
8ef8a7e
Compare
d0c4760 to
de5bf43
Compare
DanielleMaywood
left a comment
There was a problem hiding this comment.
7k lines is a bit much
Preserve the current organization-scoped spend page and port only the filter combobox. Drop obsolete stacked changes already superseded on main.
Replace the User spend page's provider, client, and model dropdowns with the Workspaces-style
FilterCombobox. Keep discrete URL parameters canonical, reset pagination when dimensions change, and preserve the current organization selector, permission gates, retention bounds, and date/time picker.Originally stacked on #28964. That work has landed with a redesigned organization-scoped spend API, so this branch now merges
mainand contains only the combobox changes, not the obsolete stack. The current API has no user-name search: unsupported free text stays local with an explicit validation message and does not change report requests or pagination.Implementation plan and conflict-resolution decisions
mainas the baseline; discard obsolete stacked backend, generated API, documentation, and drill-in changes.