feat(desktop): Settings' page list resizes the sidebar from its own edge, and never folds

Merged
DA
11d ago
+117-25

What

Dean: "In settings, the sidebar is stuck to the size it was in the main app. We should allow for resizing in settings too, just keeping in mind that we can't collapse it fully in settings."

Settings' page list now has the same right-edge resize as the plans' sidebar (#1842):

  • One width across the app. The edge drives the same useSidebarCollapse width (luke.sidebar-width). Resizing in Settings resizes the plans' sidebar too, which is how Codex and Cursor behave.
  • Same bounds and resets. Min 200, max 400, default 264 (SIDEBAR_WIDTH), the same 360px work reserve, double-click or Enter for the default, arrows step 16px, Home/End go to the bounds.
  • No collapse. The edge gets no onCollapse, so a drag far past the min holds at 200. It never folds the list, and it doesn't fold the plans' sidebar either.
  • Fixture runs draw the default width in Settings too. Nothing is kept, since this is the same staged state as #1827/#1839/#1842.

The two columns share their edge through useSidebarEdge(sidebar, onCollapse?) and SidebarResizeEdge, exported from desktop-sidebar.tsx. The plans' sidebar passes sidebar.onToggle; Settings passes nothing. CSS: .settings-pages gets position: relative so the absolutely placed edge sits on its border.

Tests

These are in desktop-shell.test.ts, over the real useSidebarCollapse under DesktopShell. All of them fail without the change:

  • the Settings edge resizes the shared width: Settings → plans → Settings, and across a relaunch
  • a drag far past the min in Settings clamps at the min, and the plans' sidebar comes back unfolded (this one also fails if Settings passes onCollapse)
  • arrows and End step the edge; double-click and Enter reset it
  • a fixture run draws the default width in Settings

Mac verification

CI could not verify the Mac UI, and ./scripts/verify.sh was not run. I built this on a Linux cloud VM, and LUKE-159 is the manual Mac pass. No screenshot is attached. Real pointer drags and the drag strip only show on a Mac.

./scripts/check.sh exits 0.

šŸ¤– Generated with Claude Code


Open workspace in Conductor


Devin Review