next: workspace groups as categories above All

Closed
TE
1mo ago
+2594-1012

Summary

Your workspace groups now sit above the Projects header as top-level categories. While any group exists, the header over the loose rows reads "All". Without groups it still reads "Projects".

  • SidebarLayoutOptions.groupsAsCategories: for the only machine's section, groups draw first, then the header, then the loose workspaces. Collapsing the header hides only the loose rows.
  • Rows keep their model sibling indices, so drag-and-drop resolution (index-based) and keyboard order are unchanged. Keyboard order follows the drawn order.
  • SidebarRow.titlesAll drives the "All" title. New string sidebar.section.all is in all 21 locales; non-English values are marked needs_review.

Stacked on #18120 and #18124 (the diff includes them until they land). This is PR 3 of the sidebar categories job.

Testing

  • Failing test first: d9a3e7de056 (SidebarGroupsAsCategoriesTests). The fix is in f6fede1895e.
  • Local: package conventions lint, god-file, concurrency, crash-safety and l10n checks all pass.
  • Fleet build 4bd9ec5f656bbd09da7ef6eb of d186c530f93: a new group draws above the list, which is titled All.

Captures

Same seed on each build: three workspaces, one in a new group. Before is the #18124 build; after is this PR's fleet build. Light is Rose Pine Dawn, dark is Rose Pine.

BeforeAfter
Light
Dark

Changelog

Changed: Workspace groups appear above the project list as categories, and the list is titled "All" while groups exist.

🤖 Generated with Claude Code


View with [code]smith Autofix with [code]smith
Need help on this PR? Tag @codesmith-bot with what you need. Autofix is disabled.


Summary by cubic

Workspace groups now render as top-level categories above the Projects header. When a group exists, the header reads “All” for loose workspaces; otherwise it remains “Projects,” while workspace indices stay unchanged for drag-and-drop.

  • Projects can be hidden from the sidebar menu or Settings via sidebar.showProjects; Chats can be hidden from its header via sidebar.showChats.
  • Hidden Projects can be restored with Show Hidden Sections, while Chats remains opt-in through Settings.
  • Collapsed layout sections persist across relaunches in UserDefaults.
  • Adds localized strings, action-surface exports, and tests for group ordering, visibility settings, menus, and persistence.

[!NOTE]
Medium Risk
Touches sidebar layout, persisted view state, and cmux.json-backed visibility settings; mistakes could hide workspaces or break drag/keyboard ordering, but changes are localized to sidebar UX.

Overview
Workspace groups on the sole machine section now render above the built-in header as top-level categories; when any group exists that header labels the loose workspaces "All" instead of "Projects", while row indices stay model-based so drag-and-drop and keyboard order still match resolution logic.

Hide / show sidebar bands adds GUI actions to turn off Projects (sidebar.showProjects) or Chats/Recents (sidebar.showChats), restore Projects via Show Hidden Sections or Settings, and wire section-header context menus so only Recents gets Hide Section. Collapsed layout sections (e.g. Chats) persist per Mac in UserDefaults through SidebarCollapsedSections.

Supporting work includes a Show Projects settings toggle, layout skipping when Projects is hidden (hidesWorkspaces), and localized strings for the new actions and "All" header title.

Reviewed by Cursor Bugbot for commit 195d73045724333f3abad5f75b5e062320f62f72. Bugbot is set up for automated code reviews on this repo. Configure here.