refactor(desktop): remove the new-sidebar experiment and its legacy path

Merged
KI
17d ago
+202-5231

Summary

  • The new sidebar is now the only sidebar. The "New sidebar" toggle in Settings › Experimental and the sidebar-inline-cloud-workspaces PostHog flag are gone, along with everything only the off side rendered.
  • About 5.2k lines deleted across 75 files, mostly the standalone Cloud section and the legacy workspace row.

Why / Context

The experiment is concluded. Keeping both paths meant two workspace rows, two cloud layouts and a header that changed shape depending on a local toggle.

How It Works

  • Data: useDashboardSidebarData and TagFolderWorkspacesProvider always take the inline-cloud path. useCloudWorkspaces already returns [] when cloud-workspaces is off, so without cloud the cloud layout is empty and applyCloudSidebarRows/applyCloudSidebarPinnedRows pass the rows through unchanged.
  • Filter: the local/cloud host filter is gated on cloud-workspaces directly, which is the only remaining gate.
  • Rows and header: DashboardSidebarWorkspaceItem always renders DashboardSidebarExpandedWorkspaceRow. The header drops the Cloud workspaces / Projects links that only the legacy sidebar showed.
  • Deleted:
    • stores/new-dashboard-sidebar.ts (its key new-dashboard-sidebar moves to DEAD_KEYS so the boot sweep clears it)
    • hooks/useNewDashboardSidebarEnabled and its context
    • DashboardSidebarCloudSection/**
    • DashboardSidebarLegacyExpandedWorkspaceRow
    • the EXPERIMENTAL_NEW_SIDEBAR settings entry
    • FEATURE_FLAGS.SIDEBAR_INLINE_CLOUD_WORKSPACES
  • i18n: catalogs regenerated. 18 messages are no longer used and are removed from all locales; no new strings.

Behavior changes

  • People without cloud workspaces now get the redesigned row. Before, they still had the legacy row.
  • Cloud users who had switched the toggle off lose the separate Cloud section and the sidebar's Cloud workspaces / Projects links. The /cloud-workspaces and /projects routes still exist.

Manual QA Checklist

Checked end-to-end in this branch's dev desktop app (renderer on :8325), with real mouse input over CDP:

  • Cloud flag on: the cloud workspace sits under its project (Superset). The sidebar has no Cloud section, and the header has no Cloud workspaces / Projects links. Sort menu shows "Show: All workspaces / Local / Cloud"; picking Cloud leaves only the cloud row (restored to All afterwards)
  • Cloud flag off (PostHog override cloud-workspaces: false): the "Show" section leaves the menu, the cloud row goes, and the projects and rows render normally
  • Settings › Experimental lists only Ports in top bar dropdown / Workspace agents / Wait for setup. Settings search "new sidebar" only finds the unrelated Files & Editor "Sidebar file rows"
  • Planting new-dashboard-sidebar = {enabled:false} and reloading: the key is cleared by the boot sweep, and the new sidebar still renders
  • Renderer log: no errors (only pre-existing leaderboard rate-limit warnings)

Testing

  • bunx biome check on changed files: clean
  • bun test for persisted-keys, openPullRequestLink, DashboardSidebar and settings: 329 pass
  • bun run check:i18n: passes
  • bun run typecheck (desktop): 27 errors, all better-auth typings in packages/auth / packages/trpc and auth-session call sites. The base commit 8cd20d0b8a has the same 27; none are in files this PR touches.

Follow-ups

  • Archive the sidebar-inline-cloud-workspaces flag in PostHog.
  • cloudSidebarStore group actions (createGroup, renameGroup, deleteGroup, moveToGroup, toggleGroupCollapsed, markUnread) have no callers now.
  • useNavigateAwayFromWorkspace still orders siblings with the old Cloud-section groups first, so after removing the open workspace it can pick the wrong next one. This already happened with the new sidebar on; it is left out of this PR to keep it focused.

Summary by cubic

The new-sidebar experiment is concluded: the redesigned sidebar (cloud workspaces under their projects, host filter, redesigned workspace row) is now the only sidebar. Removes the "New sidebar" toggle in Settings › Experimental, the sidebar-inline-cloud-workspaces flag, the standalone Cloud section, and the legacy workspace row, deleting ~5.2k lines across 75 files.

Behavior changes

  • People without cloud workspaces now get the redesigned row instead of the legacy one.
  • Cloud users who had the toggle off lose the separate Cloud section and the sidebar's Cloud workspaces / Projects links; the /cloud-workspaces and /projects routes still exist.
  • The new-dashboard-sidebar localStorage key moves to DEAD_KEYS so the boot sweep clears it.

Follow-ups

  • Archive the sidebar-inline-cloud-workspaces flag in PostHog.
  • cloudSidebarStore group actions no longer have callers.
  • useNavigateAwayFromWorkspace still orders old Cloud-section groups first, so it can pick the wrong next workspace after closing one.

Summary by CodeRabbit

  • Changes
    • The newer expanded workspace-row layout is now used throughout the dashboard sidebar; the legacy layout and its change statistics are no longer shown.
    • The separate cloud-workspace sidebar section, including its workspace rows, hover cards, and context menus, has been removed.
    • Cloud-workspace and project navigation links are no longer shown in the sidebar.
    • The experimental setting for the new sidebar has been removed.