Repository navigation
fix(projects): a project move names the row it moves; a paired server's twin by its SSH target - #30794
Conversation
…'s twin by its SSH target
… and focus baseline follow the row-shaped move
598c8ec to
13a17c2
Compare
…g if its group changed mid-drag
…f written during render
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: ⚪ Minimal · up to
|
ELI5
Sometimes the same project shows up twice in the sidebar: once on this computer and once on an SSH host, or twice on one paired remote server. The two copies share an id. When you dragged one of them to reorder it, or moved one into a group on a paired server, Orca named only the id. The other copy could get moved, or the server refused the move because it couldn't tell which copy you meant. Now Orca names the exact copy you acted on.
What Changed
Follow-up to #30756 (R4-2 family a), now on main.
moveProjectToGroup(project, groupId, order)now takes the row (RepoHostTarget: id, connection, host), not an id plus an optional host. Every caller already had the row, so theirgetRepoExecutionHostId(...)plumbing is gone. The store finds the exact row withisSameRepoRow, which compares id, host and SSH connection, and updates only that row once the host replies.projectGroup.moveProjectsent only the id. A server holding twins answeredselector_ambiguous, so the move failed. After: the client also sends the row'sconnectionId. That is the server's own SSH target for the row, and the client keeps it on adopted rows. The server narrows the selector with the existingresolveRepoForConnection, the same wayworktree.teardownMissingTerminalsalready does.Why
connectionIdand nothostIdover the RPC. On the client, every row from a paired server carries the sameruntime:<env>host. The RPC's host field mapsruntime:*tolocalon the server, so a host id can't tell a server-local twin from a server-SSH twin.connectionIdcan, and the selector already accepts it, so this adds no new resolver.z.objectisn't strict), and it also behaves as before: unique ids move, twins still refuse rather than guess.hostIdargument. This matches R4-2: a write takes the row's identity, so a guessed host can't get in.Linked Issue
Follow-up to #30756 (R4-2). No standalone issue.
Visual Proof
N/A. Same drag and the same menu actions; only which row gets written changes.
Testing
project-header-drag-commit.test.ts);connectionIdand updates only that row (repos-project-group-cross-host-move.test.ts);connectionId(runtime-remove-project-host-scope.spec.ts);connectionIdthrough (repo.test.ts).Review
row.repo!assertion, and the existing one next to it.Agent skill upstream boundary
Notes
SSH and paired servers are covered above. Folder rows carry
connectionIdthe same way. No platform-specific code.Checklist