feat(desktop): device-first Workspaces page — device on rows and title, creator filter, menu/typing perf

Merged
AV
2mo ago
+983-279

Summary

Reworks the v2 Workspaces page around devices and fixes the interaction lag on its header controls.

  • Device on every list row: restores the device item removed with the Host column in #6506 — laptop/monitor icon + host name before the timestamp, dimmed with a grey dot when a remote device is offline (matches the board card's vocabulary).
  • Device-first header: the page title is now the device filter dropdown (real machine name, other hosts with online dots), with a primary Create workspace button opposite; the title row doubles as the window-drag surface. Second row: bare borderless search on the left; first-class project filter (selected project's icon in the trigger) plus compact Filter / Display / List–Board controls on the right. The archived-window control moved back under Display.
  • Created-by filter: new "Created by" submenu in the Filter menu (avatars, "(you)" marker), wired through the filter store, row filtering, and the URL as ?creators=.
  • Perf, measured over CDP against the running app:
    • Filter-checkbox toggles painted in 300–515ms (all 200+ rows re-rendered synchronously behind the open menu). memo() on rows/cards + useDeferredValue on the list data + modal={false} on the header menus → checkbox paints ~143ms with the list catching up off the critical path; menus no longer scroll-lock the page.
    • Typing in search cost 76–197ms per keystroke, ~40% of it the dashboard sidebar re-rendering because the URL synced (navigate()) on every key. Debounced the URL sync (300ms) + deferred the search query into the filter hook → 5–12ms per keystroke.

Test plan

  • Typecheck (tsc --noEmit) passes
  • CDP end-to-end in the dev app: device dropdown opens/lists hosts; Created-by toggle filters rows (238→175) and round-trips the URL; project icon renders in the trigger; search focus shows no ring/background
  • Latency re-measured after each fix (menu open 41ms; checkbox paint 515→143ms; keystroke processing 197→12ms)
  • Sanity-check board view drag/menus after the memo()/non-modal changes

https://claude.ai/code/session_01MvYMxnyovLCDNBdDrLqis3


Summary by cubic

Reworks the Workspaces page around devices, adds a Created-by filter, and fixes the lag in filter menus and search typing. All new header strings are localized across all 16 locales, the sidebar pin filter is relabeled "Sidebar", and the last chosen List/Board view is remembered across sessions (filters and search still reset, and a ?view= deep link overrides).

New Features

  • List rows show the host device again: laptop icon for the local machine, monitor for remote, dimmed with a grey dot when a remote device is offline.
  • The page title is now a device filter dropdown showing the actual machine name, with a "Create workspace" button opposite it.
  • Added a "Created by" submenu to the Filter menu with avatars and a "(you)" marker, synced to the URL as ?creators=. It lists organization members rather than just visible-row creators, so teammates whose workspaces live on unreachable devices stay filterable.
  • The project filter is a first-class trigger showing the selected project's icon; the archived-window control moved back under Display.
  • Search is now a bare borderless input with no focus ring.
  • Container-query variants compact the toolbar and rows for narrow panes: Filter/Display/List/Board go icon-only, the device item shrinks to its glyph, and diff stats hide.

Bug Fixes

  • Filter checkbox toggles took 300–515ms because every row re-rendered synchronously; memoized rows/cards, deferred list updates, and non-modal menus cut checkbox paint to ~143ms.
  • Each search keystroke cost 76–197ms because URL sync re-rendered the whole app; debounced sync (300ms) and deferred search cut it to 5–12ms.
  • A creator filter with zero matches now shows "No workspaces match your filters" with a Clear filters button instead of the empty-account message.
  • isReady is deferred with the rows so a settling host query can't flash the empty state while the first rows render.
  • When the device item shrinks to its glyph, the host name stays readable to screen readers via an sr-only label; the offline dot has its own sr-only "Offline" label.
  • Board view drag and menus still need a sanity check after the memoization and non-modal changes.

Summary by CodeRabbit

  • New Features

    • Added creator-based workspace filtering with creator names and workspace counts.
    • Added prominent device and project filters, plus a “Create workspace” action.
    • Moved search to the top toolbar.
    • Workspace rows now show device details and offline status.
    • Creator filter selections sync with the URL.
  • Performance

    • Improved responsiveness during workspace filtering and searching.
  • UI Improvements

    • Updated filter counts, clearing, dropdown alignment, and view controls.
    • Improved layouts for narrower panels.
    • Added translated labels for the updated workspace controls.