Skip to content

fix(site): apply design feedback to the workspace filter combobox - #29111

Merged
tracyjohnsonux merged 23 commits into
mainfrom
fix/filter-combobox-feedback
Sep 24, 2026
Merged

tracyjohnsonux merged 23 commits into
mainfrom
fix/filter-combobox-feedback

Conversation

@tracyjohnsonux

@tracyjohnsonux tracyjohnsonux commented Sep 8, 2026 •

Copy link
Copy Markdown
Collaborator

Design review follow-ups for the unified workspace search and filter (FilterCombobox) on /workspaces, continuing #29080.

Search box

  • Filter toggle shows a dotted ListFilterActiveIcon while at least one chip is applied; it renders 2px larger than the plain icon so both read as the same size.
  • Chips render the key: prefix in content-secondary and the value in content-primary, at 14px with 8px left padding.
  • Attributes chips display as attribute:outdated (etc.) instead of outdated:true; the category key is now attribute with attributes kept as a typed alias. The emitted query is unchanged.
  • The trailing text input sizes to its content (field-sizing: content) and matches chip height, so an empty input no longer forces a second row and the box no longer changes height when the first chip is added.

Dropdown

  • Categories are ordered Owner, Status, Attributes, Template, Organization.
  • Each category row ends with either the labels of its applied chips plus a check mark, or a sample of its options (templates and organizations come from the deployment; Owner shows a fixed me). Applied values are content-secondary, the sample is muted; both 12px.
  • Rows are 34px with 8px horizontal padding, a 24px icon slot (18px lucide icons, 24px avatars), 14px regular text. List padding is 8px; group headers get 16px above except the first.
  • Attributes uses TagIcon; Organization keeps Building2Icon.
  • Result rows inherit the row colour so label and icon highlight together; the workspace result subtitle (and the unused SearchResult.subtitle field) is removed.

Table

  • Pagination summary is prefixed with Filtered: while a query is set; with zero filtered results it reads No workspaces match your search.
  • Filtered empty state uses the same sentence and adds an outline Clear all button that resets the query.

Stories cover the new states (active icon, wrapped chips, attribute chips, category previews and applied values, filtered summary, empty state, Clear all). chipDisplay and categoryPreview have unit tests.

Decision log
  • "Filter active" for the toggle icon means at least one committed chip; free text alone does not switch it.
  • The supplied SVG for the active icon was redrawn on lucide's 24px grid with currentColor and stroke 2 so it matches ListFilterIcon in weight and theming; its shortened top line carries less visual mass, hence the 20px render.
  • Row spec asked for 34px rows and 8px padding with a 24px icon slot; 24 + 2*8 = 40, so rows use 8px horizontal / 5px vertical padding to hit 34px.
  • Chips use text-sm with leading-4 so they stay 28px tall and the box height and first-row icon alignment are unchanged.
  • Chips are now two spans, so story assertions use a chip(token) matcher on the chip element's full text instead of getByText("owner:me").
  • The field-sizing input relies on browser support that is now in Chrome, Safari, and Firefox 152; size={1} keeps the fallback intrinsic width small elsewhere.
  • Category previews reuse the empty-query option lookup (filterComboboxOptions(key, getOptions, "")), so entering a category hits the react-query cache. FilterCategory.hint is a fixed override of the sample; FilterOption.appliedLabel lets owner:me read as me rather than admin (you).
  • The helper text uses text-content-disabled because the theme defines no content-tertiary token (the 18 existing text-content-tertiary usages under AgentsPage generate no CSS).
  • Free text is still emitted live (debounced) while browsing the dropdown; the backend treats bare terms as workspace-name substrings, so typing admin does not match owner admin. Left unchanged here; a backend change would be a separate PR.

This PR was generated by Coder Agents on behalf of @tracyjohnsonux.

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.
@coder coder deleted a comment Sep 9, 2026
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.
@jakehwll

Copy link
Copy Markdown
Collaborator

Theres still no way to currently filter to a non-dormant workspace. Previously we could use formant:false, this can be seen with /workspaces?filter=dormant:false however that renders as the following in the filter.

image

Despite the fact that we're looking for workspaces that aren't dormant.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

I do wonder, can we lean harder into the Lucide types here?

@jakehwll jakehwll left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Still not convinced the excluded would work but keen to see in a later part of this stack 🙂

…eedback

# Conflicts:
#	site/src/pages/WorkspacesPage/filter/WorkspacesFilter.stories.tsx
#	site/src/pages/WorkspacesPage/filter/WorkspacesFilter.tsx
@tracyjohnsonux
tracyjohnsonux marked this pull request as ready for review September 24, 2026 22:41
@tracyjohnsonux
tracyjohnsonux enabled auto-merge (squash) September 24, 2026 22:42
@tracyjohnsonux
tracyjohnsonux merged commit c931c1a into main Sep 24, 2026
27 checks passed
@tracyjohnsonux
tracyjohnsonux deleted the fix/filter-combobox-feedback branch September 24, 2026 22:49
@github-actions github-actions Bot locked and limited conversation to collaborators Sep 24, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants