Repository navigation
Unify sidebar create actions into single dropdown menu - #19375
Conversation
- Combine "New workspace" and "Add project" under a unified "Create" button - Remove layout logic that split these actions based on sidebar width - Normalize "Add Project" to "Add project" (lowercase) throughout the UI
|
Caution Review failedThe pull request is closed. ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Team Run ID: 📒 Files selected for processing (9)
📝 WalkthroughWalkthroughThe sidebar now uses one Create menu for workspace and project creation in compact and wide layouts. Project labels are standardized as “Add project”. Localization entries were updated across supported languages. Shortcut formatting now supports unassigned actions. Unit and end-to-end tests use the shared menu and navigation helpers. Merge Risk: 🔵 Low · up to Localized sidebar creation labels may fall back to English or stale text. Regenerate and synchronize the localization catalogs before merging. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
Full details: Description checkExplanation The description explains the problem, solution, scope, and testing, but it omits several required template sections. It does not include a linked issue, visual proof for the UI change, ELI5, AI disclosure, review, boundary, notes, or checklist details. Resolution Add the missing template sections. Include the required linked issue, before-and-after visual proof, or the exact N/A explanation only if applicable, ELI5, AI disclosure when applicable, review notes, agent skill boundary confirmation, notes on compatibility and performance, and completed checklist items. Add tested platforms and clearly state whether lint, typecheck, test, and build passed or will be covered by CI. Full details: Docstring CoverageExplanation Docstring coverage is 7.14% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 14 functions across 16 files. (7 skipped: 7 unsupported.)
✨ Finishing Touches📝 Generate docstrings
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: e1b5d16d-5654-47f3-a9d2-1f815ff1534b
📒 Files selected for processing (23)
src/renderer/src/components/Landing.tsxsrc/renderer/src/components/new-workspace/ProjectCombobox.dialog-handoff.test.tsxsrc/renderer/src/components/new-workspace/ProjectCombobox.test.tsxsrc/renderer/src/components/new-workspace/ProjectCombobox.tsxsrc/renderer/src/components/sidebar/SidebarHeader.test.tsxsrc/renderer/src/components/sidebar/sidebar-header-actions.tsxsrc/renderer/src/i18n/en-runtime-required.jsonsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsontests/e2e/ephemeral-vm-provisioned-root.spec.tstests/e2e/github-url-smart-input-transition.spec.tstests/e2e/golden-core-flows.spec.tstests/e2e/golden-worktree-create-switch.spec.tstests/e2e/helpers/sidebar-project-dialog.tstests/e2e/linear-url-workspace-entry.spec.tstests/e2e/new-workspace-create-more.spec.tstests/e2e/new-workspace-cross-project-dialog.spec.tstests/e2e/terminal-codex-skill-preview-artifact-repro.spec.tstests/e2e/worktree.spec.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
There was a problem hiding this comment.
ℹ️ No critical issues — two minor suggestions inline. The refactor is clean and well covered by both unit and e2e tests.
Reviewed changes
- Unified sidebar create menu —
SidebarHeaderActionsdrops the width-basedSIDEBAR_HEADER_WIDE_MIN_WIDTHsplit and always renders the newSidebarCreateMenu, whose dropdown carriesNew workspace(with the primary shortcut hint) andAdd project. - Menu open/focus handling —
SidebarCreateMenuopens viaDropdownMenuand focuses the first item on open so Enter works after a mouse open, with the tour handoff moved from the button to theNew workspaceitem. - Copy standardized —
Add projectreplacesAdd a new project/Add ProjectacrossProjectCombobox,Landing, and the sidebar; newcreateMenu/addProjectkeys are added to all supported locales. - Test updates —
SidebarHeader.test.tsxnow drives the menu via a synthesizedpointerdownplus acreateMenuItemhelper, and a newopenSidebarWorkspaceComposere2e helper replaces every{ name: 'New workspace' }button click.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
Add formatOptionalPrimaryShortcutLabel that returns null when a shortcut is unassigned, enabling simpler conditional rendering in dropdown menus. Remove associated translation strings.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
- Null-based shortcut label — replaced the
'Unassigned'sentinel check with a newformatOptionalPrimaryShortcutLabelinuseShortcutLabel.tsthat returnsnullfor unbound actions, soSidebarCreateMenurenders the hint with a plain truthiness check instead of coupling to formatter copy. - Orphaned key cleanup — removed the now-unreferenced
SidebarHeaderkeys (25a95899c9,ca6f729da2,moreActions) fromen.json,en-runtime-required.json, and the partner locales, dropping them out of the boot bundle. - Test mock updated —
SidebarHeader.test.tsxdrives the newnullsentinel and asserts the shortcut hint is omitted when workspace creation is unassigned.
Both prior suggestions are addressed cleanly; the new formatOptionalPrimaryShortcutLabel mirrors the existing formatOptionalShortcutLabel pattern with a distinct 'optionalPrimary' memoization key, and formatPrimaryShortcutLabel remains in use by TerminalContextMenu.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏

Problem
The sidebar had two separate create affordances (New workspace and Add project) that behaved differently depending on viewport width. This created confusion about what actions were available and where to find them.
Solution
Consolidate both create actions under a single "Create" button that opens a dropdown menu. The menu always shows both "New workspace" (with keyboard shortcut hint) and "Add project" options, providing a consistent experience across all viewports. This removes the need for width-based conditional logic and unclear overflow menus.
Changes
SidebarCreateMenudropdown componentopenSidebarWorkspaceComposerand updatedopenSidebarProjectDialogfor menu interactionTesting
SidebarHeadermenu behavior