Repository navigation
feat(site): use the unified filter combobox on the AI sessions page - #29120
Closed
tracyjohnsonux wants to merge 44 commits into
Closed
tracyjohnsonux wants to merge 44 commits into
tracyjohnsonux wants to merge 44 commits into
Conversation
… timestamp column
Design review fixes for the unified workspace search and filter: - Show a dotted filter icon on the toggle while any chip is applied. - Render chips as a muted `key:` prefix with a prominent value. - Present Attributes chips as `attribute:<key>` and rename the category key to `attribute` (with `attributes` as an alias) so chips, the draft prefix, and typed prefixes all use the same pattern. - Dropdown rows: 34px tall, 8px horizontal padding, 24px icon slot with 18px lucide icons and 24px avatars, 13px regular text, group headers with 16px above (8px list padding only for the first header). - Use `BuildingIcon` for Organization and `TagIcon` for Attributes. - Result rows inherit the row colour so text and icons highlight together; drop the workspace result subtitle. - Size the chip-row input to its content so an empty input never forces a second row, and match its height to a chip so the box does not change height when the first chip is added. - Prefix the pagination summary with "Filtered:" while a query is set and use "No workspaces match your search." for empty filtered results, with a "Clear all" button in the empty state.
Owner, Status, Attributes, Template, Organization.
Keep Building2Icon for Organization to match the rest of the app, and render the dotted active filter icon at 20px so it reads the same size as the plain 18px icon.
…er/coder into fix/filter-combobox-feedback
Each category row in the filter dropdown now ends with either the labels of its applied chips plus a check mark, or a short sample of its options (templates and organizations are pulled from the deployment). Categories can provide a hint shown while options load.
Clicking the filter toggle, or pressing Backspace on an empty input, while a category is open returns to the category list instead of closing the menu.
Replaces the four SelectFilter dropdowns (user, provider, client, model) on the AI Gateway sessions page with the unified FilterCombobox, keeping the date/time range picker as a separate control beside it. The picker's started_after / started_before keys are split out of the combobox value and merged back on every change so they never surface as chips.
…sions-filter-combobox Brings in the sessions table changes from #28614 (drop the Last Prompt At column, prompt icon and providers tooltips, firewall tooltip copy). The readable time-range text formatting is left out: the combobox never shows the started_after/started_before tokens, so it has nothing to format.
…nd grow it to fit chips
aqandrew
added a commit
that referenced
this pull request
Nov 9, 2026
…9809) Replaces the users page filter with the unified `FilterCombobox` search (merged in #29426), with a separate date picker for last seen. - **Search:** Status (Active, Dormant, Suspended), Role, and User type (a single Service account option; unselected matches everyone). Free text still searches name, username, and email. - **Last seen:** a separate `DateTimeRangePicker` with All time (default, so every user is listed), last 24 hours, last 7 days, over 30 days, and over 90 days, plus a custom range. The "Over" presets send a range from the Unix epoch to N days ago, so users who have never signed in (zero last seen time) are excluded. Presets are stored in `filter` as relative values (for example `last_seen_after:-7d`), so reloads keep the label and shared links stay relative. The query key keeps the relative values and each fetch resolves them to timestamps, since the API only accepts RFC 3339. Custom ranges are stored as timestamps. The trigger shows "Last seen" as secondary placeholder text until a timeframe is picked, and its accessible name keeps that context afterwards ("Last seen: Last 7 days"). - The range shares the `filter` query string with the search but is split out and merged back on every change, so neither the range nor the free-text search is dropped when the other changes. This follows the pattern from #29120. - `DateTimeRangePicker` gains optional `placeholder` (preset, shown in `content-secondary` while no range is applied) and `label` props. Existing callers are unchanged. - `useStatusFilterMenu` is removed from the shared `UsersFilter`; the users page was its only consumer. Groups and organization members pages still use `UsersFilter` unchanged. Frontend only. The existing users search already supports `status`, `role`, `service_account`, `last_seen_after`, and `last_seen_before`. <details> <summary>Decision log</summary> - **Last seen, not created:** confirmed as the timestamp the picker represents. - **All time as a preset:** the picker has no empty state, so All time is a preset whose range is display-only; picking it removes both `last_seen_*` keys instead of sending a range. - **User type chips are label only:** the category uses `chipLabelOnly`, so the applied chip reads `service account`. - **One User type option:** only "Service account" is offered; unselected means all users. A separate "Users" option was dropped for simplicity. - **Relative values in `filter`, not a separate `last_seen` param:** keeps `paginatedUsers` unchanged and the URL `filter` as the single source of the users query (review feedback from @jeremyruppel and @DanielleMaywood). Resolving in `queryFn` rather than `queryPayload` keeps the query key stable without a `now` anchor. - **Backend check:** verified `searchquery.Users` parses a combined query with quoted RFC3339 `last_seen_*` values, status, and free text. </details> **Verification:** `pnpm lint:types`, `pnpm check`, `pnpm lint`; Vitest for the users, groups, organization members, and AI Gateway pages and the date picker; Storybook tests for the users page, date picker, and AI sessions list (new `FilteredByStatusRoleAndType` and `LastSeenRange` stories). --- _Generated by Coder Agents on behalf of @tracyjohnsonux._ --------- Co-authored-by: Jake Howell <jacob@coder.com> Co-authored-by: Jake Howell <jake@hwll.me> Co-authored-by: Andrew Aquino <dawneraq@gmail.com>
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.
Replaces the four dropdown menus on the AI Gateway sessions page (User, Provider, Client, Model) with the unified
FilterCombobox, keeping theDateTimeRangePickeras a separate control beside it.Stacked on #29111 (base is
fix/filter-combobox-feedback); rebase ontomainonce that merges.ListSessionsFilterrendersFilterCombobox+DateTimeRangePicker. Categories:initiator(User, aliasuser),provider_name(Provider, aliasprovider),client,model, with option loaders infilters/categoryOptions.tsx.started_after,started_before) share the samefilterquery string; they are stripped from the combobox value and merged back on every change so they never appear as chips or free text.ListSessionsPagedrops the fouruse*FilterMenuhooks; the oldClientFilter,ModelFilter,ProviderFiltermodules are deleted (no other importers).categoryOptionshas unit tests.Behaviour differences from the old menus
initiator:me(applied labelme) instead ofinitiator:<username>; the backend accepts both.filterquery.APIdirectly because noapi/queriesmodule exists for those endpoints.This PR was generated by Coder Agents on behalf of @tracyjohnsonux.