feat(desktop): pin-visibility filter on the workspaces page

Merged
KI
3mo ago
+429-397

What

  1. Adds a sidebar-pin visibility filter to the v2 Workspaces page: All workspaces / Pinned / Unpinned.
  2. Consolidates the header's seven inline dropdowns into two menus so the toolbar stops sprawling:
    • Filter (funnel icon, active-count badge): Project, PR state, Agent, Pinned, and Device as submenus, plus a scoped "Clear filters".
    • Display: sort mode and the archived window as radio groups.
    • Search and the list/board toggle stay standalone (toggle segments now labeled List / Board).
  3. Standardizes the toolbar on the Tasks / Pull Requests layout: same @container shell (px-4 py-2, no page heading), Filter + Display menus leading on the left with divider pips, drag leaf in the middle, layout toggle and the shared WorkItemsSearch closing out the right — search picks up the focus hotkey and Escape-to-clear for free.

How

  • v2WorkspacesFilterStore: new pinFilter state (all | pinned | unpinned, default all) with labels, setter, and inclusion in reset().
  • useAccessibleV2Workspaces: filters rows on isInSidebar — the same flag the row/context-menu Pin to Sidebar / Unpin from Sidebar actions toggle, so the filter always agrees with those affordances.
  • V2WorkspacesHeader: rewritten around DropdownMenu submenus (checkbox items for multi-selects keep the menu open across toggles; radio groups for single-selects). Submenu triggers show a muted summary of the current selection. Deletes the now-unused MultiSelectFilter and DeviceFilterTriggerLabel components.
  • page.tsx: URL sync as ?pin=pinned|unpinned (omitted for all), with the same deep-link hydration as the other filters.
  • V2WorkspacesList: a non-default pin filter counts as an active filter, so an empty result offers "clear filters" instead of the empty-account state.

Notes

  • Archived tombstones read as unpinned, so the Pinned view naturally hides most archived rows.
  • Verified with tsc --noEmit and biome check (both clean).

Summary by CodeRabbit

  • New Features
    • Added pin filtering to the Workspaces view with All, Pinned, and Unpinned options.
    • Preserved active pin filters in the page URL and restored them when revisiting.
    • Grouped workspace, device, status, archive, and sorting controls into streamlined menus.
    • Added active-filter counts, submenu summaries, and a clear-filters action.
    • Added integrated work-item search and updated the layout toggle presentation.
    • Empty-state messaging and filter reset behavior now account for pin selections.
    • Updated archived-workspace filter labels for improved clarity.