GeezerVison is showing github.com — feat(site/src): use the search filter on the AI Gateway sessions list by tracyjohnsonux · Pull Request #31040 · coder/coder
Conversation
Replaces the AI Gateway sessions list filter (search box plus User, Provider, Client, and Model dropdowns) with the FilterCombobox search filter used on the Workspaces page.
- Each former dropdown is now a filter category:
initiator (User), provider_name, client, model. Option loaders live in ListSessionsPage/categoryOptions.tsx and go through new React Query definitions in api/queries/aiBridge.ts. The User category reuses the Workspaces getUserFilterOptions (sessions are admin-only, so all users are listed).
- The date range keeps its own
DateTimeRangePicker, now to the right of the search input. started_after/started_before are stripped from the combobox value and merged back on change (withoutTimeRange, queryWithSearch, queryWithTimeRange in timeRange.ts). A bound typed in the search overrides only that bound.
- Organization category (shown when the deployment shows organizations), defaulting to the default organization via
fallbackFilter. Faked for now: the sessions search API has no organization key and sessions carry no org, so withoutUnsupportedFilters drops the token from the request (TODO in timeRange.ts). Picking an org changes the chip only, not the results.
- Non-validation errors render as an
ErrorAlert above the filter, matching WorkspacesPageView. Validation errors show under the search input.
- The old
ProviderFilter/ClientFilter/ModelFilter components stay because the Spend page still uses them.
Known limitation (accepted for now): the sessions search backend has no default key, so typed free text returns no search key specified, shown under the input.
Decision log
- Date range stays a separate control; its tokens never appear in the search input.
- Free text: keep the backend validation error for now (no backend change, no
FilterCombobox change).
- Option loaders: plain async functions per category, as on the Workspaces page.
- User category lists all users without the
viewDeploymentConfig gate, since only admins can view sessions.
- Page view shows
ErrorAlert for non-validation errors.
- Bedrock model IDs with colons (
...-v2:0) are quoted; covered by ListSessionsFilter.test.tsx.
- Organization filter added with a default org; faked on the frontend until the backend supports it.
- Every former dropdown becomes a category;
provider (type) and session_id are not added as categories.
Frontend review: frontend-review (FE1 to FE10) and frontend-deep-review pass after fixes. One DF6 finding (category array identity) was dropped because src/pages/AIBridgePage/ is compiled by React Compiler, which memoizes it.
Generated by Coder Agents on behalf of @tracyjohnsonux.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Replace the sessions list search box and User, Provider, Client, and
Model dropdowns with the FilterCombobox search filter used on the
Workspaces page. Each former dropdown becomes a filter category. The
date range keeps its own picker; its bounds are kept out of the search
input and merged back into the query on change.
tracyjohnsonux
added a commit
that referenced
this pull request
Oct 20, 2026
Places the Columns menu beside the new search filter and updates the
view test for the filter's new props and auth requirement.
linear-code
Bot
commented
Oct 21, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
…lter
# Conflicts:
# site/src/api/queries/aiBridge.ts
…sessions list
The sessions search API does not filter by organization yet, so the
token defaults to the default organization, shows as a chip, and is left
out of the request.
This branch has not been deployed
No deployments
Uh oh!
There was an error while loading. Please reload this page.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
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.
|