Repository navigation
fix(hosts): show an SSH host and its managed Orca server as one host - #26076
Merged
OrcaWin merged 3 commits intoOct 7, 2026
Merged
Conversation
added 3 commits
October 6, 2026 22:13
Phase 3 registers the Orca server it deploys over SSH as its own runtime environment, so every host list built from the execution-host registry listed the machine twice under the same name. The registry now folds the pair into one row named after the SSH host. The row routes to the server, since a managed host has no relay, unless main reports the host back on its relay; the other id stays as an alias so selections and renames saved under it still resolve. A retired id that workspaces still point at keeps its own row, and servers no configured SSH host deployed (manual pairings, orphans) are untouched.
…kers Deleting the merged-away id from the registry broke every consumer that matches hosts by exact id: Add Project fell back to local after a connect, the composer lost ready projects and drafts (and could swap in an unrelated local project), and a host scope hid folder-only workspaces. The registry now keeps both entries and marks the pair (aliasHostIds on the row pickers show, mergedIntoHostId on the other). Pickers show one row per machine, and a choice of that row expands to both ids: sidebar host scope, jump palette filter, notification toggles, run-target and repository host offers. Add Project resolves a saved SSH id to its server row and blocks the actions while that server comes up instead of choosing local. The composer's resolver now fails closed when a named draft repo isn't actionable rather than picking another project.
…Add Project host - A sidebar or agents host scope saved by an older build (or before a route flip) can hold one id of a merged SSH host; a background gate widens it to both ids so exact-id filters match either owner. - The palette host filter now resolves a saved id to both owners whichever id it names. - Add Project's create and clone refuse to run while the chosen host is unresolved, and their submit buttons stay disabled, instead of falling through to this computer.
2 of 3 tasks
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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
When Orca sets up its own server on an SSH machine, the "new workspace" host picker showed that machine twice with the same name: once as the SSH host and once as the server Orca installed there. It is one machine, so it now shows once.
What Changed
Before: after connecting an SSH host (here, one named "Omarchy"), Orca automatically installs and registers a managed Orca server on it. The new-workspace host picker then listed two "Omarchy" rows, even though only one server is installed. Picking the SSH row on a managed host leads nowhere useful, because a managed host has no relay of its own and is only reached through its server.
After: the picker shows one "Omarchy" row. Picking it sends the work to the managed server. If the app reports that the host is back on its relay (an older Orca build changed the host's projects), the same single row routes over the relay instead.
Mechanism: every affected list is built by one shared function,
buildExecutionHostRegistry. The managed server is a runtime environment whoseorcadDeployment.sshTargetIdnames the SSH host it runs on. The registry keeps both entries, because workspaces, project setups and folders are owned by one id or the other and must stay reachable. It marks the pair insrc/shared/managed-orcad-execution-host.ts:aliasHostIdsand is named after the SSH host (detail "SSH"). Its id is the route serving the host now: the server, unless the host's connection state saysmanagedServer.kind === 'relay'.mergedIntoHostId. It is still a normal registry entry, so routing, ready setups, saved drafts and folder ownership keep matching by exact id.The dedupe happens only where a list is shown or a choice is saved:
Host scopes saved by an older build, or before the shown id switched routes, can hold only one of the two ids. A small background component widens the saved sidebar and agents scopes to both ids. The jump palette host filter resolves a saved id to both owners, whichever id it names. Add Project's Create and Clone steps keep their submit buttons disabled while the chosen host can't be resolved, and refuse to run, instead of falling through to this computer.
The new-workspace resolver also no longer replaces a draft repo it can't use with an unrelated ready project. It now fails closed, matching how it already handles a named setup.
Left unchanged:
Why
Keeping both ids in the registry and merging only in the display means nothing that matches by exact id can lose a host. Routing, project setups, saved drafts, folder filters and saved scopes all keep working.
An earlier revision of this PR deleted the merged-away id instead. Review showed that broke three things: Add Project after a connect, saved composer drafts, and folder-only workspaces under a host scope.
Taking the shown row's id from the route currently serving the host gives the correct target in both the managed and relay-fallback states.
Linked Issue
Fixes #
Visual Proof
Not captured. Reported from manual SSH testing against a host named "Omarchy". The before/after row lists are covered by unit tests built from the same registry the picker renders.
Testing
src/shared/managed-orcad-execution-host.test.tscovers:use-add-repo-host-selection.test.ts: a saved SSH id after Connect selects the server row; while the server is coming up, the actions are blocked and the picker never selects local.project-host-workspace-target-managed-host.test.tscovers:sidebar-host-options.test.ts: choosing the merged host keeps a folder-only workspace owned by the other id; unchecking removes both ids; a saved scope under either id is labeled with the host's name.project-host-setup-options.test.ts: one offer per machine, routed to the server.Saved-scope widening (
widenSavedExecutionHostIds): a saved scope holding one id of a merged host is widened to both.palette-filter-options.test.ts: a palette filter saved under either id matches both owners.useCreateRepo.default-checkout.test.tsanduseAddRepoCloneFlow.test.ts: nothing is created or cloned while the chosen host is unresolved.pnpm testpassed: shared registry, renderer lib, composer-state, new-workspace, sidebar, cmd-j, settings, attention, jump palette, activity (11,653 tests).pnpm tc,oxlinton changed files, andpnpm run check:code-quality:changedpassed.I manually tested these changes locally
Automated tests added/updated, or explained why not below
AI Disclosure
Review
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Notes
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)