Skip to content

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

Merged
AviPeltz merged 1 commit into
mainfrom
revert-sidebar-sort-filter
Jul 27, 2026
Merged

AviPeltz merged 1 commit into
mainfrom
revert-sidebar-sort-filter

Conversation

@AviPeltz

@AviPeltz AviPeltz commented Jul 27, 2026 •

Copy link
Copy Markdown
Collaborator

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 feat(desktop): add workspace pinning to the v2 dashboard sidebar #5963 after feat(desktop): filter and sort projects in the dashboard sidebar #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.

Written for commit 397da8c. Summary will update on new commits.

Review in cubic

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.

@coderabbitai

coderabbitai Bot commented Jul 27, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

The sidebar project sort and filter preference features are removed. Sidebar rendering now uses local project order with always-enabled drag interactions, while the header and drag overlays are simplified. Automation failed-run indicators use explicit red styling.

Changes

Sidebar behavior changes

Layer / File(s) Summary
Remove project sort preference
apps/desktop/src/renderer/routes/_authenticated/providers/CollectionsProvider/dashboardSidebarLocal/schema.ts, apps/desktop/src/renderer/hooks/useV2UserPreferences/useV2UserPreferences.ts
Removes sidebarProjectSortMode from preferences storage, defaults, schema types, and the hook API.
Simplify sidebar ordering and drag flow
apps/desktop/src/renderer/routes/_authenticated/_dashboard/components/DashboardSidebar/*, .../DashboardSidebarProjectSection/*, .../hooks/useSidebarDnd/*, .../utils/filterDashboardSidebarProjects/*
Removes sort/filter state and utilities, derives displayed projects from projectOrder, and removes drag-disable gating.
Update sidebar header and drag overlay
.../DashboardSidebarWorkspacesHeader/*, .../SidebarDragOverlay/*
Removes sort/filter controls and uses transparent drag overlay containers.

Automation status colors

Layer / File(s) Summary
Use explicit failed-state colors
apps/desktop/src/renderer/routes/_authenticated/_dashboard/automations/$automationId/components/PreviousRunsList/PreviousRunsList.tsx, .../automations/components/AutomationRow/AutomationRow.tsx
Failed and offline run indicators use explicit red background and theme-aware text classes.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Sequence Diagram(s)

sequenceDiagram
  participant DashboardSidebar
  participant SortableContext
  participant useSidebarDnd
  DashboardSidebar->>SortableContext: Render projectOrder
  SortableContext->>useSidebarDnd: Start project drag
  useSidebarDnd->>DashboardSidebar: Set activeId and snapshot flatItems
  DashboardSidebar->>DashboardSidebar: Apply reordered project list
Loading

Possibly related PRs

Suggested reviewers: saddlepaddle

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Title check ✅ Passed The title accurately summarizes the revert of sidebar project filtering/sorting and the pending rework context.
Description check ✅ Passed The description explains what changed, why it changed, and includes validation notes, so it is mostly complete.
✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch revert-sidebar-sort-filter

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@ghost

ghost commented Jul 27, 2026 •

Copy link
Copy Markdown

Ready to review this PR? Stage has broken it down into 7 individual chapters for you:

Title
1 Remove sidebar sort preference from schema
2 Clean up user preference hooks
3 Delete project filter and sort utilities
4 Remove filter and sort UI components
5 Restore manual ordering in sidebar
6 Simplify drag-and-drop logic
7 Fix automation error colors
Open in Stage

Chapters generated by Stage for commit 397da8c on Jul 27, 2026 8:55pm UTC.

@AviPeltz
AviPeltz force-pushed the revert-sidebar-sort-filter branch from 45cbe3f to 397da8c Compare July 27, 2026 20:55
@AviPeltz
AviPeltz merged commit 45c4376 into main Jul 27, 2026
11 checks passed
@github-actions

Copy link
Copy Markdown
Contributor

🧹 Preview Cleanup Complete

The following preview resources have been cleaned up:

  • ⚠️ Neon database branch

Thank you for your contribution! 🎉

AviPeltz added a commit that referenced this pull request Jul 27, 2026
#6000)

The add-repository dropdown lives inside the PROJECTS header row, which
toggles the list's collapse on click. The dropdown content portals to
body, but React synthetic events still bubble up the component tree, so
selecting any menu item collapsed the projects list. Restores the
stopPropagation guard that #5956 introduced and its revert (#5996)
removed.

Claude-Session: https://claude.ai/code/session_01SSUQYFamkYAjs5sDQC5RLS
AviPeltz added a commit that referenced this pull request Jul 27, 2026
Failed run dots and labels used tailwind red-500/red-600, which reads
harsh against the ember theme. Use the semantic destructive token (muted
brick red in dark) instead. Restores the styling that #5956 introduced
and its revert (#5996) removed — it was independent of the sort feature.

Claude-Session: https://claude.ai/code/session_01SSUQYFamkYAjs5sDQC5RLS
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant