next: sidebar Group by None or Folder
Summary
The sidebar's menu gets Group ▸ Group by None / Group by Folder, the last piece of the sidebar categories job. Grouping by folder puts the loose workspaces under a header per folder.
- New setting
sidebar.groupBy(noneby default, orfolder). It appears in Settings as Group Projects By, in the schema and in the MDM docs. Both menu actions write it, and the current choice is disabled. - A row's folder is its front tab's cwd, abbreviated (
~/src/app), or any tab's cwd when the front tab reports none. There is no repo-root data on tabs today, so this groups by cwd. - Folders appear in first-seen order, with No Folder last. Each header shows the folder's last path component, with the full path as its tooltip. Your own groups stay above the folders, under the Projects header.
- Drag and keyboard reorder are off while grouped by folder, as they are while filtering, because the drawn order is not the model order. Folder headers are labels only and stay out of the rows the Rust drop resolver reads, so tab drops still work.
Stacked on #18124 (the diff includes it until it lands). Groups on top (#18127) is dropped: Lawrence's numbering rule (SIDEBAR-NUMBERING-AND-STEPPING) keeps a group in its place between loose rows, so with Group by None the list draws in model order, as on base. This PR keeps only Group by.
This changes settings (sidebar.groupBy in the schema and MDM), so like #18124 it lands with a SETTINGS slot token, with the settings export, MDM schema and action exports regenerated in the PR first.
Testing
- Failing tests first: 8aeeea65b10 (
SidebarGroupByFolderTests,SidebarGroupBySettingsTests, and the mapping testtheRowFolderIsTheFrontTabCwd). The fix is in 39e268c41ec. - f3688ca14ce drops groups on top.
SidebarGroupByFolderTestsnow expects the Projects header first, then your groups, then the folders; with None, the model order. - Local: god-file and l10n checks pass on f3688ca14ce.
- Not run locally: action contract regeneration (needs
swift test). CI's generated-files job covers it. - Fleet build cfdbefcc2cebd5fbe99c8444 of 36206c10005, live on a capture host: Group by Folder from the palette wrote
"groupBy": "folder"to cmux.json and the list regrouped at once, in light and dark.
Captures
Seeded with four workspaces: terminals in ~/src/app (two) and ~/src/site, and one New Tab with no cwd. Light is Rose Pine Dawn, dark is Rose Pine. No user groups exist on this host, so the header reads Projects rather than All.
| Group by None | Group by Folder | |
|---|---|---|
| Light | ![]() | ![]() |
| Dark | ![]() | ![]() |
The palette lists the action and the Group Projects By setting:
Changelog
Added: Group the sidebar's Projects list by folder from the sidebar menu's Group submenu or Settings.
🤖 Generated with Claude Code
[!NOTE]
Low Risk
UI and appearance settings only; reorder is intentionally locked when folder grouping is on, with no auth or data-handling changes.
Overview
Adds Group by None / Group by Folder for the sidebar Projects list, controlled by the new persisted setting sidebar.groupBy (Settings, palette, sidebar Group submenu, MDM/schema).
With Folder enabled, loose workspaces render under non-interactive folder headers (bucket from the front tab’s abbreviated cwd, first-seen order, “No Folder” last); user-defined groups stay above those folders. Workspace rows gain a folder field from bridge mapping; drag/keyboard reorder is disabled while grouped (like filtering), and folder headers are omitted from Rust drop resolution so tab drops still work.
Includes action handlers (SidebarGroupByActions), FolderHeaderRowView, localization, and tests for settings parsing and layout behavior.
Reviewed by Cursor Bugbot for commit b6a2766fdcc7e9ff69061bc9a8002f56bc00cfe8. Bugbot is set up for automated code reviews on this repo. Configure here.
Showcase




