You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fix(sidebar): Show single-workspace projects as one row - #45518
A project with one workspace takes up one row inside its group. The card still opens the workspace and gives you the project controls.
What Changed
In Group by → Project, render a project's only workspace directly inside its named group. Projects with multiple workspaces keep their collapsible headings.
Put Create Workspace and the project menu, including Project Settings, on the single workspace card. Keep the card's existing workspace actions.
Use project membership before visibility filters to count workspaces. Use the same grouping rule in desktop and mobile sidebar projections and update reveal and drag ordering to account for the missing heading.
Why
Named groups can hold many projects. Removing a redundant heading makes single-workspace projects easier to scan, while multi-workspace projects retain a collapse control.
Same synthetic projects, 1280 × 800 macOS Electron viewport, 380px sidebar. The single project is hovered in each view to show its controls.
Before
After
Testing
The owner tried the layout in an installed Apple Silicon build.
All 40 checks in pnpm check:changed --base=orca-upstream/main --maxWorkers=2 passed on the rebased branch, including affected tests, TypeScript, lint, and design-system checks.
pnpm --dir mobile run typecheck passed.
A focused hidden Electron run on the rebased branch verified single-row rendering, multi-workspace expand and collapse, workspace opening, the workspace context menu, Create Workspace, and keyboard access to Project Settings.
Existing tests and a local Electron scenario provided coverage. The branch adds no persistent tests.
To verify, put a folder project and a Git project with at least two workspaces in the same named group. Select Group by → Project, open the sole workspace, check its context menu and project buttons, then collapse and expand the multi-workspace project.
Risk
Level: Medium. The shared sidebar model changes row placement and reveal paths. A regression could affect keyboard navigation, drag targeting, or reveal within a project group. This change adds no persisted fields or wire protocol changes. A standard revert restores the previous rows.
AI Disclosure
OpenAI Codex implemented, rebased, and validated the change and drafted this description. The owner reviewed the installed layout.
Review
UI: The single card keeps workspace click and context actions. Project actions use the existing controls and remain reachable by keyboard.
Platforms and hosts: Desktop and mobile use the common project membership rule. No platform APIs or host routing changed. Rendered interaction checks ran on macOS. Windows, Linux, live SSH, and a paired mobile device remain untested.
Compatibility and security: No provider, credential, session protocol, or persistent state changes.
Performance: Counting uses the existing project ownership index. The additional catalog pass runs when a separate unfiltered workspace list is supplied.
Agent skill upstream boundary
Not applicable. The change copies no upstream skill-installer code or assets.
Notes
The visual proof was captured with disposable profiles. Full CI is tracked on this PR.
Checklist
One user-facing change with rationale and risk documented
Before and after screenshots attached
Local validation and platform limits documented
Scoped checks, mobile typecheck, and macOS interaction checks passed
Project grouping now supports showing a single-workspace project as an inline row, with its project name and project actions. Row planning uses full worktree data to calculate project ownership and reveal paths. Sidebar and host views support hidden section headers and inline project labels. Drag grouping and row navigation recognize these rows. The context-menu click handler now suppresses pointer events only for clicks inside the menu element.
Severity of issue fixed: Low
Merge Risk: Low · up to 238ac
Single-workspace projects now render as one row. On mobile, a long workspace name can hide the project name, and a project that also has a workspace in the Bots section may lose its heading. Both are small presentation issues that are easy to fix, and neither blocks merging.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title uses the conventional fix(sidebar) prefix and states the main change: a single-workspace project now renders as one row in the sidebar. The changeset matches this, since the summaries show s…
Description check
The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue (Fixes #45515), Visual Proof with before and after images, Testing with checked items, Risk with a le…
Linked Issues check
Issue #45515 is the only directly linked, active issue. Its coding requirements are covered by the reviewed summary: (1) Single-workspace rendering: isSingleWorkspaceProject in src/shared/sidebar-list…
Out of Scope Changes check
Most changes support the single-row feature: shared row-type fields (inlineProjectName, hideHeader), reveal-path and drag-group updates needed because the heading no longer exists, ProjectHeaderAction…
Full details: Title check
Explanation
The title uses the conventional fix(sidebar) prefix and states the main change: a single-workspace project now renders as one row in the sidebar. The changeset matches this, since the summaries show single-workspace project detection, hidden section headers, and inline project names on rows. The title is specific and concise, so it passes.
Full details: Description check
Explanation
The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue (Fixes #45515), Visual Proof with before and after images, Testing with checked items, Risk with a level, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist. The content is specific and matches the changeset. The Risk section names the shared sidebar model as the riskiest part and gives a revert path. The Level is set to Medium. Minor gaps: the Testing section lists no automated tests and says the branch adds none, though the template asks for an explanation of why not, and the Visual Proof section links images only. These gaps are non-critical, so the check passes.
Full details: Linked Issues check
Explanation
Issue #45515 is the only directly linked, active issue. Its coding requirements are covered by the reviewed summary: (1) Single-workspace rendering: isSingleWorkspaceProject in src/shared/sidebar-list/sections/project-section-grouping.ts returns true only when workspaceCount is 1 and exactly one item is displayed. group-sections.ts then omits the group header and passes the project label to appendWorktreeRows as inlineProjectName. (2) Project name visibility: WorktreeCardRepoChip and WorktreeCardMetaRepoBadge accept a name that falls back to repo.displayName, and build-workspace-card-facts.ts uses card.inlineProjectName. (3) Card actions: ProjectActions is added to the card header through default-workspace-card.json, and item-row.tsx renders RepoProjectActionButtons (Create Workspace and project menu with Project Settings). (4) Workspace actions: the card keeps its existing click and context-menu behavior. (5) Multi-workspace projects: they keep the collapsible heading because workspaceCount is greater than 1. Workspace counts use allItems (project membership before visibility filters), so a project with hidden workspaces is not misclassified. Automated tests were not added on this branch. The author reports the focused Electron run and the 40 scoped checks passed, but I did not execute them. Those reports are supporting evidence only, not verified here.
Full details: Out of Scope Changes check
Explanation
Most changes support the single-row feature: shared row-type fields (inlineProjectName, hideHeader), reveal-path and drag-group updates needed because the heading no longer exists, ProjectHeaderActions inline mode, the repo-header action refactor, and rendered-row key and reveal changes. Mobile changes (host-sidebar-feed-sections.ts, host-workspace-list.tsx, project-group-tree-sections.ts, WorktreeListRow.tsx, use-workspace-sections.ts) apply the same project-membership rule through the shared projection. The issue text targets the Workspaces sidebar. The PR description states that mobile uses the same rule, so these changes are consistent with the stated PR scope. WorktreeContextMenuView.tsx changes click-capture suppression so it applies only to clicks inside the element. This supports the nested project action controls. No change was found that is unrelated to the linked issue. Mobile and the context-menu change were not checked at runtime beyond the author's report.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
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.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Keep the inline project name visible.
If the workspace name fills the one-line title, truncation removes the appended project name. The hidden heading no longer provides that name. Reserve space for a separate project label so users can distinguish the project from its workspace.
allItems covers only displayWorktrees, so a workspace listed in the Bots section is excluded from the project count. A project with one displayed workspace and one Bots-listed workspace gets workspaceCount 1. isSingleWorkspaceProject then returns true, and the project header is hidden. The project has two workspaces, so its heading should remain.
Pass the host's non-archived, non-folder rows from allHostRows into the planner for the allItems count. Keep the displayed rows for the visible items. Keep the catalog filtering as it is.
Thanks for this, @jtalborough. My setup is exactly this case: a few plain folder projects sorted into project groups, so every one of them shows its name twice, first as the header and then as its only workspace. This PR fixes that.
The branch had fallen behind main and now conflicts, so I opened jtalborough#2 against it. It merges main in, fixes the two CodeRabbit findings on the phone, and keeps the project name off the card when it matches the title, which still repeated for folder projects. It also notes two edge cases I found in project drag-reorder and in the numbered shortcuts. Checks pass, and there's a screenshot in that PR.
@nwparker@AmoabaKelvin, sorry for the direct ping. Could one of you take a look, or approve the CI run for this fork? The change is focused, and it makes grouped sidebars a lot easier to read.
This branch has not been deployed
No deployments
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
ELI5
A project with one workspace takes up one row inside its group. The card still opens the workspace and gives you the project controls.
What Changed
Why
Named groups can hold many projects. Removing a redundant heading makes single-workspace projects easier to scan, while multi-workspace projects retain a collapse control.
Linked Issue
Fixes #45515
Visual Proof
Same synthetic projects, 1280 × 800 macOS Electron viewport, 380px sidebar. The single project is hovered in each view to show its controls.
Testing
pnpm check:changed --base=orca-upstream/main --maxWorkers=2passed on the rebased branch, including affected tests, TypeScript, lint, and design-system checks.pnpm --dir mobile run typecheckpassed.To verify, put a folder project and a Git project with at least two workspaces in the same named group. Select Group by → Project, open the sole workspace, check its context menu and project buttons, then collapse and expand the multi-workspace project.
Risk
Level: Medium. The shared sidebar model changes row placement and reveal paths. A regression could affect keyboard navigation, drag targeting, or reveal within a project group. This change adds no persisted fields or wire protocol changes. A standard revert restores the previous rows.
AI Disclosure
OpenAI Codex implemented, rebased, and validated the change and drafted this description. The owner reviewed the installed layout.
Review
Agent skill upstream boundary
Notes
The visual proof was captured with disposable profiles. Full CI is tracked on this PR.
Checklist