Repository navigation
Conversation
… is in A project set up on several hosts renders as one section whose anchor is the first of its rows in this Orca's catalog order, and the section was placed in a Project Group by the anchor's projectGroupId only. Each Orca anchors on its own host's row, so after Move to group on one Orca, every other Orca showing the same project kept it outside the group, next to an empty group header. Resolve the section's group from its rows: the anchor's group when it is known, otherwise the first row in manual order that is in a known group. Placement, the in-group order, and the reveal path all use that row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The section's visible members miss rows whose workspaces are pinned away or that have none yet, and the Cmd+1-9 order builds rows without the empty-project placeholders the sidebar passes. Pinning the grouped host's last workspace then moved the project back to the root, and shortcut numbering disagreed with the drawn sidebar. Collect every catalog row that maps to the section's key and resolve the group from those. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…chor The anchor is the first visible row, so it still depended on pins and on the empty-project placeholders that the Cmd+1-9 order does not pass. With rows in competing groups, the drawn sidebar and shortcut numbering then put the project in different groups. Take the first catalog row in manual order that is in a known group; in the usual case that is still this Orca's own row. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…group A section drawn in a group through a member row still took its drag bucket, sibling ranks and commit target from the anchor, so it fell in the root bucket while drawn inside the group. Header rows now carry the row that placed them; drag buckets, in-group ranks and the reorder commit use it, and the commit names that row's host. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ➖ Normal Severity of issue fixed: Medium Merge Risk: ⚪ Minimal · up to
|
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, and each computer looked at its own row. So after you put the project in a group on one computer, the other computer showed an empty group and left the project outside it. Now, if any of the project's rows is in a group, the project is shown inside that group.
What Changed
Before: Orca A and Orca B are paired and both have the same Git project. On Orca A, Move to group puts the project inside the group. Orca B shows the group header empty, with the project at the top level.
After: Orca B also shows the project inside that group. If the computers' rows are in different groups, each Orca uses the group of the first row in its own manual order. That is normally its own row.
Mechanism:
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: the first member row in manual order that is in a known group. If no row is in a known group, it is the anchor, so the section stays at the root as today. Because it reads catalog rows rather than visible ones, pins and placeholders cannot move a project. The drawn sidebar and the Cmd+1–9 order also always agree.appendProjectGroupSectionsplaces sections, and orders them inside a group, by that row'sprojectGroupIdandprojectGroupOrder.build-rows.tstakes the reveal path (which group to expand to reveal a workspace) from the same row, so reveal matches where the project is drawn.projectGroupRepowhen it is not the anchor. Header drag uses it for the bucket, the sibling ranks and the commit. The commit now names the row's host (moveProjectToGroup(..., hostId)). Dragging a project inside a group therefore reorders the row that put it there, on that row's own host.Why
Root cause: the anchor is the first of the section's rows in each Orca's catalog order, which is usually its own host's row (
getManualOrderAnchorRepo). Placement read only the anchor'sprojectGroupId, and Move to group changes only one host's row. So only the Orca whose anchor is the moved row draws the project in the group. The group catalogs themselves sync correctly. A two-Electron run showed the paired client receives both the group and the moved row.Alternatives considered:
Linked Issue
Fixes #29876
Visual Proof
Two real Orca apps ran in the background, built from this branch and from its base. One is the host and one a paired client. The same Git remote was added on both, and the client lists its own row first. The project was grouped on the host. Sidebar header positions as rendered (
leftis the label's x offset, 14 = top level, 24 = nested):Drag inside the group on the paired client (this branch). The project placed through the host's row is dragged above a host-only project in the same group:
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, on its host. Existing commits now pass their host too.pnpm test src/renderer/src/components/sidebar src/renderer/src/store/slices(all pass),pnpm tc:web,oxlint,pnpm run check:code-quality:changed.Platforms: macOS (unit tests and a two-Electron background E2E). The change is renderer-only with no platform branches.
AI Disclosure
Implemented with Claude Code (Claude Opus 5.5). Independent review by GPT-6 Astra (xhigh reasoning) through Codex CLI. Its findings (pinned members; Cmd+1–9 parity, including competing groups; drag buckets) are fixed in this PR.
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platoform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)🤖 Generated with Claude Code