revert(desktop): remove sidebar project filter and sort pending rework (#5956)

Merged
AV
3mo ago
+23-737

Why

Reverts #5956 (sidebar project filter + sort). Two reasons:

  1. Crash: sorting by "Last updated" calls .getTime() on workspace updatedAt, but workspaces served from the Electric v2_workspaces fallback (unreachable host with no snapshot) carry ISO-string timestamps at runtime despite the Date type — Electric's shape parser doesn't handle timestamptz. Result: TypeError: workspace.updatedAt.getTime is not a function thrown during render, taking down the whole dashboard. Because the sort mode persists, affected users crash on every boot.
  2. Wrong sort signal: v2_workspaces.updatedAt only moves on record patches (rename, branch change) — agent messages and terminal activity never bump it, so "Last updated" doesn't reflect what users expect. The feature needs a rework on a real activity signal before re-landing.

The revert unwedges crashed users immediately: the stale persisted sort preference is dropped harmlessly by the schema (verified live).

Also includes a small independent fix surfaced while testing the revert: the sidebar drag overlays (project/workspace/section) painted an opaque bg-background slab under the dragged row, which clashes with the vibrancy-driven sidebar surface. They're transparent now — sortable siblings make room during a drag, so the floating row sits over empty sidebar.

Notes

  • One revert conflict: testProjectFixtures.ts was touched by #5963 after #5956 added it; nothing imports it post-revert, so it's deleted.
  • Validation: desktop typecheck clean, 26 remaining sidebar tests pass, Biome lint clean, live smoke over CDP (sort/filter UI gone, manual order restored, drag-to-reorder works, stale preference harmless).
  • The crash-fix + workspace-level sorting work is parked on fix-sidebar-sort-crash for the rework. Recommend cherry-picking its mergeHostWorkspaces date normalization separately — the string-date landmine remains for any consumer trusting the Date type.

https://claude.ai/code/session_01SSUQYFamkYAjs5sDQC5RLS


Open in Stage

Summary by cubic

Reverts the dashboard sidebar project filter and sort to stop a boot crash and restore manual project ordering. Also updates automation failure colors and keeps drag overlays transparent for the sidebar’s vibrancy.

  • Bug Fixes

    • Removed Projects filter/sort and the “Last updated” mode to stop a crash from calling .getTime() on string updatedAt; the sidebar boots reliably.
    • Dropped sidebarProjectSortMode from v2UserPreferences; stale values are ignored safely.
    • Automation failures now use clearer reds: status dots bg-red-500; text text-red-600 dark:text-red-400.
    • Made project/workspace/section drag overlays transparent.
  • Refactors

    • Deleted filter/sort UI, utils, and tests; removed unused test fixtures.
    • Simplified DnD by always enabling sensors and removing disabled/filtered drag paths.
    • Streamlined the sidebar header to just “Projects” and the actions menu; removed search and sort controls.

Summary by CodeRabbit

  • New Features

    • Sidebar projects can now be reordered directly through drag and drop.
    • Removed project sorting and filtering controls from the Workspaces sidebar.
  • Bug Fixes

    • Improved failed automation run styling with clearer red status indicators.
    • Updated drag overlays to better preserve the sidebar’s visual appearance during dragging.