Repository navigation
Conversation
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review.
|
6e6ee8d to
1768531
Compare
[Medium impact] The PR appears safe to merge; the previous local-group move failure is fixed. SummaryThe PR places a shared project's header using a member row whose own host holds its group, preferring this computer's row.
Reviews (2) · Last reviewed commit: "fix(sidebar): move the project row that ..." · Reviewed by Greptile |
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
39ad4e10-f575-497f-8e39-acd8fe256b41
Files selected for processing: 3-
src/renderer/src/components/sidebar/worktree-list-groups-cross-host-project-menu.test.tsxsrc/renderer/src/components/sidebar/worktree-list/rows/repo-header-project-actions.tsxsrc/renderer/src/store/slices/project-group-owner-routing.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
-
4f4d877 to
b3c721a
Compare
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
bef3b8cb-b7dd-4b12-adac-62fe7957f8e6
Files selected for processing: 6-
src/renderer/src/components/sidebar/project-header-drop.tssrc/renderer/src/components/sidebar/worktree-list-groups-cross-host-project-menu.test.tsxsrc/renderer/src/components/sidebar/worktree-list/rows/SectionHeader.tsxsrc/renderer/src/components/sidebar/worktree-list/rows/repo-header-project-actions.tsxsrc/shared/sidebar-list/group-sections.tssrc/shared/sidebar-list/row-types.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
… is in A project set up on several hosts is one sidebar section anchored on each Orca's own row, and placement read only the anchor's projectGroupId. Move to group changes one host's row, so only the Orca anchored on that row drew the project inside the group; the others showed the group empty. - getProjectSectionMemberRepoIds maps every catalog row to its section, including rows whose workspaces are pinned away or absent. - getProjectSectionGroupRepo picks the first member in manual order that is in a known group, else the anchor. Placement, in-group rank and the reveal path read that row. - Header rows carry it as projectGroupRepo; header drag buckets, ranks and commits use it, and the commit names that row's host. Ported onto src/shared/sidebar-list after stablyai#29906. Fixes stablyai#29876 Co-Authored-By: Claude Opus 5.5 <[email protected]>
…aced it in the group A header drawn inside a paired host's group, while this Orca's own row is ungrouped, hid Remove from group and moved the local row. Move to group, its current-group check and Remove from group now use the header's projectGroupRepo; the other project actions keep the anchor row. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… the hosts' groups differ When a project's rows sit in different hosts' groups, the row that ranked first in this Orca's order placed the project, and that can be another host's row. The project was then drawn in that host's group while this Orca's own row was in its own group, and no move from this Orca could change it. Prefer a grouped row from this Orca's own catalog (local or direct SSH), then fall back to the first grouped row. Co-Authored-By: Claude Opus 5.5 <[email protected]>
… group holds The window copies an earlier copy's group id onto a fetched row that names no group (applyInheritedProjectGroups), so a row can carry another host's group. Choosing such a row to place the project made the header's group actions act on a row the group does not hold: Remove from group changed nothing. Count a row as grouped only when a copy of its group lives in the row's own host's catalog; same-id group copies can sit on several hosts (stablyai#30045). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…m the header menu The header's Move to group moved the row that places the project. When that row is another host's, choosing one of this Orca's groups sent that row to a group on another host, and the store refused it; main moved this Orca's anchor row there. Pick the placing row or the anchor, whichever the store guard lets join the chosen group. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…d its group With host sections shown, each host's copy of a cross-host project header names that host's registration as its repo. The header's group actions fell back to that repo, so a copy drawn in this Orca's group acted on the paired row: Remove from group removed the paired row from its own group, and the group the copy is drawn in was not marked current. Group actions now fall back to the merged header's anchor, which is the row that placed it. Co-Authored-By: Claude Opus 5.5 <[email protected]>
The drag buckets list each header under its anchor's id, but the map of rows that placed headers in a group keyed a host's copy by that host's own registration. A localized copy then ranked its siblings by the anchor's own projectGroupOrder. Key the map by getHeaderDragRepo(row), built next to the bucket lists. Co-Authored-By: Claude Opus 5.5 <[email protected]>
2c98f79 to
810fb85
Compare
ELI5
When the same project is added on two paired computers, the sidebar shows it once, with a row for each computer. It picked the project's group by looking at only one of those rows, usually the one listed first. So after you put the project in a group on one computer, the other computer could show an empty group and leave the project outside it. And when each computer had put the project in its own group, another computer's group could win, and nothing you did on this computer could move it. Now the project is shown in this computer's group if its row here is in one, otherwise in the group of the first row that is.
What Changed
Before:
After:
Mechanism:
src/shared/sidebar-list/project-group-sections.ts: newgetProjectSectionMemberRepoIds(repoMap, projectIndex)maps every catalog row to its section key, once per row build. It covers rows whose workspaces are pinned away and rows that have no workspaces yet.getProjectSectionGroupRepo(section, memberRepoIds, …)returns the row that places a section:runtime:Xwith X; local and direct SSH with this Orca's). The window copies an earlier copy's group id onto a fetched row that names none (applyInheritedProjectGroups), so a row can carry another host's group that does not hold it.appendProjectGroupSectionsplaces sections, and orders them inside a group, by that row'sprojectGroupIdandprojectGroupOrder.sidebar-row-plan.ts(planSidebarRows) takes the reveal path (which group to expand to reveal a workspace) from the same row, so reveal matches where the project is drawn. Every caller ofplanSidebarRowsreads the same placement: the window's list, the Cmd+1–9 order, reveal, and the sidebar feed.projectGroupRepowhen it is not the anchor. Header drag passes it into the drag session next to the header's own row. The drag takes its bucket from it, sibling ranks read it, and the commit moves that row (moveProjectToGroup(row, …)). The header's own id still marks its place in the list. Dragging a project inside a group therefore reorders the row that put it there, on that row's own host.…menu takes the same row (RepoHeaderProjectActionsMenu'sprojectGroupRepo). The "current group" check and Remove from group act on it, so they match where the project is drawn. Move to group moves whichever of that row and the anchor can join the chosen group (getProjectGroupJoinableRow, the store guard'sisProjectGroupJoinableFromCatalog), because a group lives on one host. Project settings, icon, worktree visibility, New group from project and Remove Project keep the anchor row.repo(fix(sidebar): draw a cross-host project's header in each host section #36012). The menu falls back to the merged header's anchor (getHeaderProjectGroupRepo), so every copy acts on the row that placed the project in the group it is drawn under. Header drag keys that row by the anchor's id, which is what the drag buckets list (getProjectHeaderDragRepoById), so a host's copy ranks among its siblings by that row too.Why
Root cause:
state.reposorder (getManualOrderAnchorRepo). That order follows when each row reached this Orca's list, so it can be any host's row.projectGroupId, and Move to group changes only one host's row. So only an Orca whose anchor is the moved row drew the project in the group, unless the window had copied that group onto its anchor (see Visual Proof).Alternatives considered:
getSettingsFocusedExecutionHostId) changes with focus, so the project would move between groups as focus moves.Linked Issue
Fixes #29876
I first opened this as #29877 and closed it on 2026-10-23. It is reopened here on current main, because the bug still reproduces there and a user asked for a follow-up on #29877.
Visual Proof
Paired Orca apps ran in the background on main
b18dc951caand on this branch: an Electron client (Orca A) and one or two headless hosts it is paired with (Orca B, Orca C). Each Orca added its own clone nameddemo-testwith the sameorigin. "Group A" lives on Orca A, "Group B" on Orca B, "Group C" on Orca C. The screenshots are Orca A's window (CDP screenshots of the hidden window).Three Orcas, three groups
Orca A adds its clone first, so its own row is listed first.
b18dc951carepo.listreturns that row with noprojectGroupIdfield. That isapplyInheritedProjectGroupscopying Orca B's group onto it; main does the same.projectGroupIdand took Group B the same way, so main drew the project inside Group B. In the step 2 run above, Orca A's row kept no group, and main left the project at the root. With this change the placement comes from the row Group B holds, so it does not depend on the copy.Another host's row listed first, each row in its own host's group
Orca B adds its clone first, so Orca A lists Orca B's row first. Then Orca B's row goes into Group B (on Orca B), and Orca A's row into Group A (on Orca A).
b18dc951cademo-testunder Group B. The card menu of Orca A's own workspace marks Group A as current (disabled) and offers Group B, which Orca A's row cannot join. Remove from group clears only Orca A's row, which does not place the project. No action from Orca A moves it.data-repo-header-bucket):Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
New
worktree-list-groups-cross-host-project-group.test.ts:project-header-drag-commit.test.ts: a header placed by another host's row reorders that row.project-header-drag-start.test.ts: the drag takes that row's bucket.project-header-drop.test.ts: a host's copy of such a header ranks by that row under its anchor's id.New
worktree-list-groups-cross-host-project-menu.test.tsx: the planned header, with this Orca's ungrouped row as anchor, renders the menu with the propsSectionHeaderpasses. Remove from group shows and removes the paired host's row. Move to group marks that group current and moves that row, and moving into one of this Orca's groups moves the local row. Project Settings and Remove Project stay on the local row. A paired host section's copy of a header drawn in this Orca's group marks that group current and removes this Orca's row. The two-host fixture is shared throughworktree-list-groups-cross-host-project-group.test-fixture.ts.With main
b18dc951ca's source files and these tests, 14 of the 32 cases in the five changed test files fail; with this change all 32 pass.Rebased onto main
46237aa148after fix(sidebar): draw a cross-host project's header in each host section #36012.pnpm check:changed --maxWorkers=2(format, lint, typecheck, affected tests, ratchets: 27 checks) passes on2c98f794f85.Platforms: macOS (unit tests and the background E2Es above). The change is renderer and shared-list code with no platform branches.
AI Disclosure
Implemented with Claude Code (Claude Opus 5.5). It was reviewed by GPT-6 Astra (xhigh reasoning) through Codex CLI in #29877. That review found pinned members, Cmd+1–9 parity including competing groups, and drag buckets; all are fixed here. This version was reviewed again by GPT-6.1 Sol before opening. The own-group and inherited-id changes were reviewed by GPT-6.1 Sol (xhigh reasoning) in two passes; the last pass found nothing blocking.
runtime:<env>(withRuntimeRepoOwner), so it has no rows of its own and keeps the first-grouped-row rule.item-row.tsx, and the phone feed'sinFolderScanGroup) still reads the card's own row. A card under a project placed through another host's folder-scan group gets the regular indent.Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
planSidebarRowsthrough the sidebar feed, so it places the project the same way with no phone code change. Its catalog (buildSidebarProjectCatalog) stamps paired servers' rows and groups with their host, as the window does.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)🤖 Generated with Claude Code