Repository navigation
feat(ssh): hide auto-imported hosts instead of only deleting them - #9
Merged
Merged
Conversation
A host Orca finds in ~/.ssh/config came back on the next sync, so the only way to get it out of the pickers -- the trashcan -- could not stick. Give discovered hosts a reversible Hide and keep the trashcan for hosts the user added. Hidden hosts stay in Settings under a collapsed "Hidden (n)" section and are dropped from every host picker: add-repo, the composer and task-page target lists, the automation destination picker, and the skill-install machine pickers. The status bar keeps a hidden host's row while it is connected or connecting, so a live session stays visible and a reconnect does not blink the host out of the list. The flag rides on the target row rather than filtering the target list at the IPC boundary. That call also feeds the label and connection-state mirror, whose readers treat a missing entry as proof the host was removed, so dropping rows would have made a hidden host's live workspaces look orphaned. Labels, connection state, and startup reconnect for those workspaces are unchanged.
nplez1
force-pushed
the
nplez1/Hide-hosts
branch
from
September 19, 2026 11:29
9dbf9ee to
d005473
Compare
nplez1
added a commit
that referenced
this pull request
Oct 11, 2026
Upstream @ cc5c85f (386 commits) onto the release line from cce8024 (merge base 1cda323). 102 conflicted paths: both-rewrote 49, modify/delete 20, union 17, duplicate-tail 6, add/add 6, rename-replay 4. The decisions this sync settled are recorded in LOCAL-PATCHES.md § Sync log and local/sync/convergence-ledger.md. Conflict resolutions - The SSH relay removal stands. Upstream deleted src/relay/** and serves SSH hosts from orcad, and the fork's three relay commits did not justify becoming sole maintainer of 467 abandoned files: 36 relay paths resolved to deletion, plus src/shared/ssh-ai-vault-relay.ts and the fork's six src/wsl-guest/ additions (ledger: "SSH relay removal"). - Repo detection takes upstream's generator shape (probeGitRepo and the *Commands helpers), retiring the fork's parallel async copy of repo-detection.ts and repo-git-marker-scan.ts. The four filesystem steps upstream still runs synchronously are recorded as an Open item. - Owner routing moved to runtimeTargetForOwnerEnvironment. Upstream deleted getActiveRuntimeTarget and settingsForRuntimeOwner and added a lint ratchet; RuntimeFileOperationArgs now carries a `target` and RowLessSource no longer admits GlobalSettings, so the fork's remaining callers were migrated. The fork's Jira/Linear files that still read the Active Server setting are registered in config/focus-setting-read-baseline.txt with an Open item. - The fork's repo-catalog connection fence converged onto upstream's host-catalog fence: upstream 63b3f15 (stablyai#27116) is upstream's own fix for the fork's stablyai#20811, replacing claimRepoCatalogGeneration and captureRuntimeRepoCatalogConnectionFence. repo-catalog-fencing.ts, repo-catalog-actions.ts and all-host-repo-catalog-actions.ts are now byte-identical to upstream. The upstream-bound branch fix/repo-catalog-connection-fence is superseded. - The fork's hidden-SSH-host UI (PR #9) is re-homed, not dropped. SshPane.tsx and SshTargetCard.tsx take upstream's post-relay inline shape, with onSetHidden, the hidden badge and SshTargetVisibilityToggle on top, and the "Hidden (N)" section in the fork-only SshTargetList.tsx. SshTargetCardActions.tsx and the duplicate SshTargetServerList.tsx are gone (ledger: "SSH settings pane"). Verification - pnpm tc:node / tc:cli / tc:web exit 0. - pnpm lint: every check passes except audit:code-quality:native, whose five mobile import(no-cycle) warnings reproduce identically at cce8024 and are carried as documented debt in LOCAL-PATCHES.md. - pnpm test --project node-runtime: 11 failed files / 35 failed tests, all in the documented upstream-red agent-session / agent-launch / structured-agent-session class. Ten of them reproduce identically at cce8024 (34 tests). The eleventh, tests/e2e/cross-version-wire/cross-version-agent-session-wire.unit.test.ts, loads its "release-shaped checkout" from git ref HEAD and so compares HEAD against the uncommitted worktree; it is expected to pass once this commit moves HEAD.
nplez1
pushed a commit
that referenced
this pull request
Oct 21, 2026
…win projections stay on their host (review-5 #2 #9 #11) (stablyai#30890) * fix(renderer): host writes route only through the strict owner, and twin projections stay on their host (review-5 #2 #9 #11) A selected ssh: host that two paired servers proxy now resolves ambiguous at the one selected-host resolver, so no caller can fall back to this app's own SSH connection. File Explorer and SSH mutation expectations derive the full {endpoint, place} pair from resolveOwner, so a server folder's nested SSH target stays the write's host. A local lineage write projects onto its own host's rows only. The id-only store-write ratchet now also covers persistence repo-row lookups by id alone (review-5 #10's shape). * fix(ratchet): the id-only lookup scan also sees optional chaining and destructured ids * fix(renderer): an unstamped folder keeps reading its host from its repos; editor focus fallback left for a follow-up * docs(renderer): the File Explorer owner comment names its folder fallback
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
Orca adds SSH hosts to itself by reading your
~/.ssh/config. If you don't want to use one ofthose hosts, the only option was the trashcan — but Orca re-reads the config and adds the host
back. There was no way to say "not on this machine's Orca" and have it stick.
Now you can hide such a host. It disappears from every list where you pick a host, and stays
visible in Settings so you can unhide it.
What Changed
Before: Settings → SSH hosts was one flat list where every host — hand-added or discovered —
carried the same trashcan. Deleting a discovered host recorded a suppression tombstone so the next
~/.ssh/configsync wouldn't resurrect it. The host was gone, there was nowhere to see what hadbeen suppressed, and the only undo was re-adding it by hand.
After: Settings → SSH hosts splits into the hosts you can use, and a collapsed Hidden (n)
section. A host Orca discovered gets an eye toggle (Hide / Unhide) and a
Hiddenbadge; a hostyou added keeps the trashcan. That division is the rule, not a style choice: a discovered host
comes back on every sync, so deleting it never sticks, while a host you added has no such source
and is removed.
A hidden host is dropped from every place you choose where work runs: the Add-repo host list, the
composer / new-workspace target picker, the task page host list, the automation destination picker,
and all three skill-install machine pickers. It is also dropped from the status-bar SSH segment —
except while it is connected or still working on a connection, so a live session stays visible and
a reconnect doesn't blink the host in and out.
Mechanism.
hiddenis a flag on the target row, persisted with it, set through a newssh:setTargetHiddenchannel, and mirrored into the renderer store ashiddenSshTargetIds.Pickers filter on that set.
Why
Two things drove the shape of this.
The flag rides on the row; nothing filters at the
listTargetsboundary. The obviousimplementation — make
ssh:listTargetsreturn only visible hosts and let every existing call sitebecome correct for free — is wrong here. That call also feeds the label and connection-state mirror
that several readers use as evidence a host was removed (
workspace-terminal-reconnect.ts,runtime-environment-ssh-selectors.ts). Under a filtered list, "hidden" would have beenindistinguishable from "deleted", and a hidden host's live workspaces would have rendered as
orphans. So hidden hosts stay in the mirror, and each picker opts in explicitly.
For paired clients, publish the flag rather than dropping rows.
ssh.listTargetSummariesgains an optional
hiddenfield (safe underdocs/reference/remote-wire-compatibility.mdRule 1).Dropping the rows instead would be a Rule 3 change: the phone resolves workspace labels and
session state through that list, so an older client would lose the identity of a hidden host its
workspaces still run on. An older client ignores the field and keeps showing the host; that is the
correct degradation.
Deliberately not filtered, because each describes an existing binding rather than offering a
new one: sidebar host sections and the host-scope picker, the sidebar host menu, the dashboard, the
browser-egress routing override list, the browser session-host picker, and every label lookup for a
worktree or terminal that already points at the host. A hidden host a repo already lives on also
stays in the task page's run-target list for the same reason — its existing workspaces must keep a
reachable host.
SshPane.tsxwas at 399 of its 400-line budget, and the repo's ratchet may only shrink, so thelist moved into
SshTargetList.tsx, the toggle intoSshTargetVisibilityToggle.tsx, and theoutcome reporting into
ssh-target-visibility.ts.Linked Issue
Fixes #
Visual Proof
Before: one flat list of every imported host, each with a trashcan.
After: the usable hosts, then a collapsed "Hidden (n)" disclosure containing the hidden ones
with a
Hiddenbadge and an eye toggle.N/Afor attachments: the$electronskill thatAGENTS.mdnames for rendered Orca UI checks isnot installed in this worktree (not in the repo's
skills/, not in the agent's skills directory),so no live screenshot or video was captured. Structure and behavior are covered by happy-dom tests;
the new section's visual layout has not been seen rendered and would benefit from a reviewer's eye.
Testing
Verification run locally and green:
pnpm tcpnpm run check:code-quality:changed— 0 new findings across all 46 filespnpm run check:max-lines-ratchet— no new bypassespnpm run verify:localization-extraction,verify:localization-catalog,verify:rpc-params-catalogcomponents,store/slices,main/ssh,main/runtime/rpc,main/persistence-ssh, andshared(status bar alone: 419 passing)Not run locally: full
pnpm lint, fullpnpm test,pnpm build— left to CI.Five pre-existing failures in
AccountsPane.copilot-credentials.test.tsx(
window.api.codexAccounts.onPendingLoginUrlChanged is not a function) also fail on basecbe6a74ad2with these changes stashed. They are unrelated to this PR.New tests:
ssh_target_not_hideable; a legacy target with nosourceis recognised as discoveredhiddensurvives flush, reload, and a config sync that rewrites the endpointswallowed by the memo guard
buildExecutionHostRegistrydrops a hidden host from the configured run targets but keeps one arepo already lives on
SshTargetList— empty state, hidden section collapsed by default with its count, expands toreveal the rows
SshTargetCard— trashcan for a user-added host, eye for a discovered one,Hiddenbadge plusUnhide for a hidden one, and unhiding needs no confirmation
still resolves
with "already in Orca"
reconnecting
Review
Three decisions worth a reviewer's attention.
include-references) while the composer'sconfigured-onlypicker drops it. Intentional: anexisting repo is an existing binding, and removing its only run target would strand it.
~/.ssh/configpicker still lists a hidden host, as a disabled"In Orca" row. It is never selectable. Typing the alias into the manual form instead now says
"That SSH host is hidden in Settings → SSH hosts. Unhide it there rather than adding a second
copy." — because a hidden host still owns its alias and a second copy would be refused anyway.
~/.ssh/configlingers in the Hiddensection with no Settings trashcan, which follows from "discovered hosts are only hidden". It can
still be removed from the sidebar's host menu, because
ssh:removeTargetin main isintentionally unrestricted — restricting it would break the sidebar's removal of a host that has
workspaces.
Known limitations:
Importand "Add all" never unhide. Hiding is an explicit user choice, so a re-import respectsit; unhiding is one click in Settings.
partialtoconnectedfor a user whose disconnected hostsare all hidden. That is a more accurate reading of the hosts they actually use.
Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanicallytranslates no upstream skill-installer source, tests, fixtures, registry entries, path tables,
comments, or documentation.
Notes
hiddenis a non-secret boolean on an existing row; thepaired-client summary excludes SSH addresses, jump chains and credentials exactly as before.
SshConnectionStore.listTargets()is unchanged (still the full list) so execution-host identitylookups, startup reconnect, and relay lifetime are unaffected by hiding.
filterable changed there. An older mobile build ignores
hiddenand still shows such a host.hiddenis optional and absent means visible. Persisted targetsneed no migration —
normalizeSshTargetspreads the row. The legacy shape check that decides"discovered vs added" is the same one
importFromSshConfigalready used, hoisted intoshared/ssh-types.tsso the UI and the store cannot disagree.on any hot path; the mirror gains one
Setcomparison per metadata write.Checklist
N/Awith reasonpnpm typecheckand the changed-code gates pass; fullpnpm lint/pnpm test/pnpm buildleft to CI