cmux-next sidebar: hide Projects or Recents, show them again

Merged
TE
1mo ago
+2619-1225

Summary

Second sidebar-categories PR. Projects and Chats can be hidden and brought back:

  • The Chats header's menu has Hide Section. It turns base's sidebar.showChats off, which takes the Chats band out of the sidebar. Other layout sections keep Remove Section; Hide shows only on Chats.
  • The Projects header (the sidebar's menu) has Hide Projects: the workspace list draws no rows.
  • The sidebar's menu has Show Hidden Sections, available while Projects is hidden.
  • sidebar.showProjects (default on) is a new setting, so Settings > Sidebar shows a Show Projects toggle and the choice lives in cmux.json. Chats already had its setting on base.

All three actions are in the palette too. Scripts set the settings directly (cmux settings), so the actions are GUI-only on the CLI.

No default changes: sidebar.showProjects defaults to on, which is today's behavior.

Testing

  • Failing tests first (b66185ff71a, then d03d041b54d after base replaced Recents with Chats): SidebarHiddenSectionsSettingsTests, SidebarHiddenSectionsTests (no list rows when Projects is hidden, the model reads the setting, Chats draws in the band below the list only while sidebar.showChats is on), SidebarHideSectionMenuTests (menus offer Hide and Show; Hide Section only on Chats). Fix in 0f1ca0c7655.
  • Exports regenerated on the merged tip 5fc888305a0 (6d1b5a4293d): the settings export and MDM schema gain sidebar.showProjects; the action exports gain the three section actions (875 to 878).
  • Local: god files and l10n checks pass; the settings page strings are current.
  • Localization audit: the new keys (the Show Projects title, three action titles, refusal messages) have values in all 21 catalog locales, non-English marked needs_review as machine translations.

What visibly changes

Native UI, no capture: the Chats and Projects header menus gain Hide Section / Hide Projects, and the sidebar's menu gains Show Hidden Sections; hiding Projects leaves the sidebar without workspace rows until it is shown again.

Changelog

  • Added: Hide Projects or Chats from their header menus in the sidebar, and show Projects again from the sidebar's menu or Settings.

šŸ¤– Generated with Claude Code


[!NOTE]
Low Risk
UI and appearance settings only; defaults preserve current behavior and changes are reversible via Settings or Show Hidden Sections.

Overview
Adds sidebar section hiding for the workspace list (Projects) and the Chats band, persisted in cmux.json and exposed in Settings.

Hide Projects (sidebar background menu) sets sidebar.showProjects off so the workspace list lays out with no rows; Show Hidden Sections turns Projects back on. Hide Section on the Chats/Recents header sets sidebar.showChats off (Chats still returns via Settings). Section header context menus are filtered so Hide Section appears only on Chats and custom sections still use Remove instead.

Registers three GUI-only actions (SidebarHiddenSections), a new showProjects preference (default on), settings/schema/MDM exports, and tests for menus, config parsing, and layout behavior.

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