revert(desktop): remove sidebar project filter and sort pending rework (#5956)
Why
Reverts #5956 (sidebar project filter + sort). Two reasons:
- Crash: sorting by "Last updated" calls
.getTime()on workspaceupdatedAt, but workspaces served from the Electricv2_workspacesfallback (unreachable host with no snapshot) carry ISO-string timestamps at runtime despite theDatetype — Electric's shape parser doesn't handletimestamptz. Result:TypeError: workspace.updatedAt.getTime is not a functionthrown during render, taking down the whole dashboard. Because the sort mode persists, affected users crash on every boot. - Wrong sort signal:
v2_workspaces.updatedAtonly 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.tswas 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-crashfor the rework. Recommend cherry-picking itsmergeHostWorkspacesdate normalization separately — the string-date landmine remains for any consumer trusting theDatetype.
https://claude.ai/code/session_01SSUQYFamkYAjs5sDQC5RLS
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 stringupdatedAt; the sidebar boots reliably. - Dropped
sidebarProjectSortModefromv2UserPreferences; stale values are ignored safely. - Automation failures now use clearer reds: status dots
bg-red-500; texttext-red-600 dark:text-red-400. - Made project/workspace/section drag overlays transparent.
- Removed Projects filter/sort and the “Last updated” mode to stop a crash from calling
-
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.