Repository navigation
feat(site/src): redesign the workspace filter menu with flyouts and inline options - #29426
Conversation
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.
| const CATEGORY_HOVER_DELAY_MS = 300; | ||
| const MOBILE_SEARCH_TOP = 80; |
There was a problem hiding this comment.
An agent needs to attack this harder.. this is ugly and JS should not be defining animations in this way 🙁
There was a problem hiding this comment.
Removed in 50134d0. The scrollBy + requestAnimationFrame/setTimeout retries and the visualViewport listeners are gone. While the menu is open on mobile the input group gets fixed inset-x-6 top-20 (below the 72px navbar) and the root reserves the field's height, so the dropdown always has the viewport below the field; Radix keeps anchoring the popper to the fixed field. No JS positioning remains.
Caveat: verified in Chrome device emulation, not on a physical phone with a software keyboard.
Posted by Coder Agents on behalf of @tracyjohnsonux.
…ate and drop mobile scroll timers Inline categories such as Status and Workspace attributes no longer enter category mode when their prefix is typed; the prefix narrows the inline group in place, so no duplicate flyout renders. The pointer flyout now follows the cmdk highlight, closing or switching when keyboard navigation moves on. The browsing and category main panels share one renderer. On mobile the open field pins below the navbar with CSS instead of timer-driven scrolling.
|
Addressed the review findings in 50134d0:
Posted by Coder Agents on behalf of @tracyjohnsonux. |
…er flyout and hand off only a load row's highlight
|
/coder-agents-review |
There was a problem hiding this comment.
This PR redesigns the workspace filter menu with pointer flyouts, inline Status and Workspace attribute options, and a mobile drill-in. This round finds 2 P3, 4 P4, and 1 Nit in 7fb6d30.
7fb6d30 fixes the five open findings: the flyout search resets per flyout and never reaches another flyout's loader, the highlight handoff reads the previous value instead of a copy, whether a flyout is shown has one source, the flyout's empty result is announced, and the two DOM-presence assertions are gone. Both P3 findings are in the new flyout search code: the debounce compares object identity, and the empty announcement fires while the search is still running.
Out of scope (needs a ticket or explicit acceptance by a human):
site/src/components/Filter/FilterCombobox/useFilterCombobox.ts:208: the category view announces "No matches" for a category with no options and no search while its panel shows "No options" (same at base 08ac54f), so a screen reader user hears that a search found nothing when none was typed.
🤖 This review was automatically generated with Coder Agents.
…s by text and announce them consistently
|
/coder-agents-review |
There was a problem hiding this comment.
This PR redesigns the workspace filter menu with pointer flyouts, inline Status and Workspace attribute options, and a mobile drill-in. This round finds 1 P2 and 6 P4.
9959e75 fixes the seven open findings: the flyout search debounces a trimmed string, a pending flyout search is announced as loading, both panels share one loading, failed, empty order with periods and a no-options text, the menu clears a load-row highlight where it closes, and the doc, helper, and test-time requests are done. The new tests fail against 7fb6d30's code and pass here. The category view's empty announcement noted as out of scope last round is fixed too.
The P2 is in code from earlier commits of this PR, not 9959e75.
Out of scope (needs a ticket or explicit acceptance by a human):
site/src/components/Filter/FilterCombobox/useFilterCombobox.ts:433: the category view keys its search on the untrimmed input (same code at base 08ac54f), so a trailing space afterzedrestarts the search, announces "Loading Owner options." for 300 ms, and then shows a spinner in place of thezedrow while it sends a secondgetOptions("zed "). The flyout trims since 9959e75.
🤖 This review was automatically generated with Coder Agents.
…ptions out while a search is pending Category rows, loading, empty text, and Enter now derive from the same shown options, so a previous query's option is never applied. The flyout returns its own status message and both panels share the empty wording.
|
/coder-agents-review |
There was a problem hiding this comment.
This PR redesigns the workspace filter menu with pointer flyouts, inline Status and Workspace attribute options, and a mobile drill-in. This round finds 1 P3, 5 P4, and 1 Nit.
a46a961 fixes the seven open findings: the category view no longer shows or applies the previous search's rows during the debounce, the flyout returns its own status message, both panels share optionsEmptyText, the optionsStatusMessage doc is corrected, the searched cases have tests, the trailing-space assertion now fails on the regression, and the loader-call assertion runs on a manual clock. The new Enter test fails against 9959e75's code. The category search text is also trimmed now, which fixes last round's out-of-scope item.
The P3 comes from this commit: at 9959e75 a pending search still blocked Enter after a failed one.
Out of scope (needs a ticket or explicit acceptance by a human):
site/src/components/Filter/FilterCombobox/useFilterCombobox.ts:1104: in the category view, Enter on typed text such ascarolwhile its search is pending and no loaded option matches does nothing, so the user has to press Enter again after the results arrive; base 08ac54f had the same!activeOptionsLoadingguard.
🤖 This review was automatically generated with Coder Agents.
…ch failure only for the settled text A failed search no longer blocks or skews Enter after the text is edited. shownOptions takes the failure and only current results, so the flyout, category view, and typeahead share one rule, and the hook returns the category view's empty text.
|
/coder-agents-review |
There was a problem hiding this comment.
This PR redesigns the workspace filter menu with pointer flyouts, inline Status and Workspace attribute options, and a mobile drill-in. This round finds 6 P4 and 2 Nit.
772c11c fixes the seven open findings: a failed category search no longer counts while the next search is pending (the new Enter test fails on a46a961's code), shownOptions takes failed and only current results, the category view gets its empty text from the hook, the typeahead rows come from shownOptions, the activeOptionsError comment matches the Enter behavior, the flyout's searchSettled and the category trim each fail a test when removed, and the two getByText assertions are gone.
🤖 This review was automatically generated with Coder Agents.
… hide rows for a failed load Also covers both empty texts with stories, moves the category loading check to a manual-clock test, and shares the manual-clock flyout opening.
|
/coder-agents-review |
There was a problem hiding this comment.
This PR redesigns the workspace filter menu with pointer flyouts, inline Status and Workspace attribute options, and a mobile drill-in. This round finds 4 P4.
1e9641c fixes seven of the eight open findings: shownOptions now hides rows for a failed load for all three callers, the story no longer asserts and a manual-clock test checks the category view's loading announcement, the shownOptions doc and flyout comment match the code, the manual-clock flyout opening is shared, the typeahead failed-search test fails when the rule is removed, and HoverFlyoutEmpty shows the flyout's "No options". The new CategorySearchNoMatches story does not reach the category view's searched empty text; see the inline comment.
🤖 This review was automatically generated with Coder Agents.
…ries reach their text and group timer helpers
|
/coder-agents-review |
There was a problem hiding this comment.
This PR redesigns the workspace filter menu with pointer flyouts, inline Status and Workspace attribute options, and a mobile drill-in. This round finds nothing new.
bd10913 fixes the four open findings: SearchableHoverFlyout's loader filters by its query, so CategorySearchNoMatches and SearchableHoverFlyoutNoMatches settle on "No matching options"; HoverFlyoutEmpty spreads CategoryEmptyState; flushTimers sits beside settleTypedText with a comment that matches it, and the clock rule is on the fakeTimers option. No findings from this review remain open.
Twelve out-of-scope items listed in earlier review bodies have no linked ticket; each needs a ticket or explicit acceptance by a human.
🤖 This review was automatically generated with Coder Agents.
…box-remove-workspace-previews # Conflicts: # site/src/components/Filter/FilterCombobox/FilterCombobox.tsx # site/src/components/Filter/FilterCombobox/types.ts # site/src/pages/WorkspacesPage/filter/WorkspacesFilter.tsx
…workspace-previews' into fix/filter-combobox-mouse-interactions # Conflicts: # site/src/components/Filter/FilterCombobox/FilterCombobox.tsx # site/src/components/Filter/FilterCombobox/primitives.tsx # site/src/components/Filter/FilterCombobox/useFilterCombobox.ts
…box (#29874) ## Summary Removes the "Jump to workspace" previews from the Workspaces filter. Typing free text no longer lists up to five matching workspaces in the dropdown that you can click to open. Typed text still searches workspaces by name: it is committed to the filter query and narrows the workspace table as before. The dropdown now only offers filters (categories and matching values), so it stays about filtering rather than mixing in navigation. It still opens on focus and while typing. For a name that matches no filter, the dropdown now shows "No filters found." in place of workspace rows, and the table is still filtered by the name. Removes the generic search-result support from `FilterCombobox` as well, since Workspaces was its only caller: the `getSearchResults`, `onSearchResultSelect`, and `searchResultsLabel` props, the `SearchResult` type, the search-results query with its loading and error handling, and the related stories. Category row previews (`categoryPreviews`) are unchanged here. Split out of #29426 so this product change can be reviewed on its own. Why remove rather than keep: the workspace rows added noise to a dropdown that should be about filters, and the component has only been dogfooded internally and has not shipped in a release, so no users lose a feature they rely on. --- Generated with Coder Agents on behalf of @tracyjohnsonux.
…ouse-interactions # Conflicts: # site/src/components/Filter/FilterCombobox/FilterCombobox.stories.tsx # site/src/components/Filter/FilterCombobox/FilterCombobox.tsx # site/src/components/Filter/FilterCombobox/queries.ts # site/src/components/Filter/FilterCombobox/types.ts # site/src/components/Filter/FilterCombobox/useFilterCombobox.ts
…ptions as buttons



Summary
Improves mouse and touch interactions for the workspace FilterCombobox while preserving its keyboard navigation.
The filter control (icon only) now opens a compact main menu with inline status and workspace-state options, pointer flyouts for Owner, User, Template, and Organizations, and a single-panel mobile flow. Applied chips always render lowercase. Selected workspace attributes remain single-select to match the existing workspace filtering UI.
Stacked on #29874 (removes the workspace result previews). Follows #29111, which has merged. Split out and stacked on this PR: #29875 (hide single-option categories), #29876 (Clear all), and #29872 (Owner shared workspaces toggle).
Implementation notes
key:prefix, the category view, and the all-filters list keep the first match highlighted.FilterComboboxRoothandler.status:prefix narrows the inline group in place and is withheld from the workspace search query. A failed inline load shows its error and Retry under the category heading, since inline categories have no flyout.fixed), with no JS scroll positioning. Verified in Chrome device emulation, not yet on a physical device with a software keyboard.status:prefix. Typed text that could still match a filter (a category name, a loaded option, or an option the category's search returns) is held back from the workspace search, so results do not empty out mid-word. It is applied when no lookup finds a match (a failed lookup counts as no match, and the wait stops after 1s), on Enter, or when the menu is dismissed or switched to all filters. The menu shows no separate cue for held-back text; the author (@tracyjohnsonux) decided this, and also rejected aSearch workspaces for "..."row. That is why Enter-search is built by suppressing cmdk's automatic first-row highlight (userNavigatingRefand the""/" "reset inFilterComboboxRoot) rather than by rendering a search row. Chip tokens in the typed text become chips when it is applied.status:starting.FilterCategory.chipLabelOnlymarks categories whose chips show only the option label (Workspace attributes). Inline options load up front so those chips are labelled before the menu is first opened.OptionsPanelshell (search header, list, empty state).Generated by Coder Agents.