Repository navigation
Conversation
This was referenced Oct 28, 2026
jutaz
added a commit
to jutaz/orca
that referenced
this pull request
Oct 28, 2026
jutaz
added a commit
to jutaz/orca
that referenced
this pull request
Oct 28, 2026
…readable.dark.png
jutaz
added a commit
to jutaz/orca
that referenced
this pull request
Oct 28, 2026
…readable.light.png
7 of 9 tasks
jutaz
force-pushed
the
feat/runtime-client-relay-routing
branch
2 times, most recently
from
October 29, 2026 00:53
c9891a7 to
0690375
Compare
7 of 9 tasks
jutaz
force-pushed
the
feat/runtime-client-relay-routing
branch
from
October 29, 2026 01:03
0690375 to
7471914
Compare
7 of 9 tasks
jutaz
force-pushed
the
feat/runtime-client-relay-routing
branch
2 times, most recently
from
October 29, 2026 04:57
1d48004 to
0f356b1
Compare
Contributor
Author
|
Local CI for 0f356b1 (stacked on #35195, on
|
jutaz
force-pushed
the
feat/runtime-client-relay-routing
branch
from
October 31, 2026 15:13
0f356b1 to
28edc25
Compare
jutaz
force-pushed
the
feat/runtime-client-relay-routing
branch
2 times, most recently
from
November 7, 2026 00:51
650e6c3 to
f94b583
Compare
…ged hosts A server with relay host wiring advertises runtime.client-relay.v1 to runtime-scope sockets and relays their execution-host calls that name a runtime:<env> target, reusing the phone relay and its delegated devices. Every other runtime-client request keeps ignoring executionHost.
A desktop paired to a server that relays (runtime.client-relay.v1) now shows, read-only below the workspace list, the managed servers that server can relay to and their workspaces. The renderer reads them with mobileRelay.hosts.list/worktrees through the existing runtime call path, only while that server is in contact and advertises the capability for the current pairing. Polling pauses in hidden windows. The rows stay out of the workspace catalog, whose actions the relay would refuse.
jutaz
force-pushed
the
feat/runtime-client-relay-routing
branch
from
November 7, 2026 03:15
f94b583 to
ebf495f
Compare
This branch has not been deployed
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
If your laptop is paired with a computer or server that manages other servers (for example one VM per workspace), the laptop could not see those servers at all. Now the sidebar shows them, with their workspaces, under "On 's servers". You can look but not open them yet; that comes in later PRs. Until then, use the server itself or your phone.
What Changed
Topology: laptop (desktop Orca) → paired server A (desktop or
orca serve) → managed servers B1..Bn that A reaches asruntime:<id on A>.No new IPC channel, main handler or preload method. The renderer already holds every input the gate needs (
runtimeEnvironments,runtimeStatusByEnvironmentId). It reads A through the existing generic call path (callRuntimeRpc({ kind: 'environment' })→runtimeEnvironments.call), which also applies main's manual-disconnect, WSL move fence and account checks.src/renderer/src/runtime/relayed-runtime-hosts.ts,relayingRuntimeOwners): A counts as relaying only when its status snapshot is for the current pairing revision (pairingRevision ?? createdAt), is not refused or retired, and the last verified status advertisesruntime.client-relay.v1. WSL environments are skipped withisWslHostRuntimeEnvironment.verification === 'verified' && transport === 'ready'. A server that is down, still checking, unreachable or manually disconnected (its status owner is retired) is never called, so a poll can't wake it or restart a managed server. Its last rows stay on screen while it is out of contact, like the phone.mobileRelay.hosts.listand thenmobileRelay.hosts.worktreesper ready B, untargeted on A. They go throughcallRuntimeRpcpinned to A's pairing revision (expectedEnvironmentPairingRevision) withskipCompatibilityCheck: true, because the capability in the verified status already gates them. If A's list fails or is malformed, A shows as unavailable. If one B's rows fail, that B keeps its last rows.hostIdand rows byworktreeId, since duplicates would collide as React keys. Onlyruntime:hosts withrelay: 'ready'are kept, and archived rows are dropped.relayedRuntimeHostsslice): kept separate fromworktreesByRepoand the detected-worktree catalog. Actions on those rows would be refused through the relay, so these rows must not enter it. Owners are keyed by environment id plus pairing revision, and B rows byhostIdinside their owner. B's id stays A'sruntime:<id on A>. The rows are not anExecutionHostIdhere and nothing routes to them, so no re-qualified id is built until the routing PR needs one. Each refresh takes a generation number, and only the latest refresh may land, so a slower, older read can't overwrite a newer one. After the reads it rechecks the gate, so an unpair, a re-pair or a downgrade during a read can't bring rows back. Unchanged polls keep identity through a field-by-field compare (noJSON.stringify).relayed-runtime-hosts-polling.ts, installed fromapp-lifetime-ipc-bridge): it watches the store'sruntimeEnvironmentsandruntimeStatusByEnvironmentId, which the existing catalog-changed and status-changed events write. While some relaying A is in contact, it polls every 30s throughinstallWindowVisibilityInterval, so hidden windows don't poll. When the set of A in contact changes (pair, re-pair, reconnect, downgrade), it re-reads at once. It stops when none is in contact.RelayedRuntimeHostsSectionsits below the workspace list, next to the WSL moved-projects section, which it mirrors (border-top,scrollbar-sleek, 40% max height). Its selector shows only owners that are still relaying on the pairing their rows came from, so an unpair, re-pair or downgrade hides them before the next read. That is the same pattern asWslMovedProjectsSection, with no separate retain action. The section has an accessible name (aria-label). Each A's title ("On 's servers") is anh3. Each B uses the host-headerServerglyph, and its workspaces show a branch or folder icon, display name and branch. Rows are plain list items: not buttons, no hover state, nothing to click. The note "Opening these from this computer is coming in a later update; use the server or your phone." shows only when some host is listed. Nothing renders when no paired server relays.sidebar.relayedHosts.*English keys. Other locales fall back until localization fills them, per the catalog checker.Why
Issue #29396: desktop clients should reach a paired server's managed hosts the way phones already can. #35195 added the server side; this is the first client-side step. It reuses the listing A already serves to phones (
mobileRelay.hosts.*, permissionworkspace, which runtime-paired clients hold, answered untargeted on A). There is no new server method, so a laptop works against any A that advertises the capability.Alternatives considered:
worktree.*,files.write,projectHostSetup.*) is outside the relay route table and would be refused, so the cards would break as soon as they were clicked. A separate read-only slice keeps that out until routing lands (3b/3c).runtime:environment per B: needs envelope plumbing through call, shared-control and subscriptions, and is the subject of 3b.Mixed versions:
runtimeEnvironments.calland status snapshots for its one paired server, so the section works there tooLinked Issue
Part of #29396.
Stacked on #35195: this PR's diff includes its 3 commits until it merges. Review only the last commit,
feat(remote): list a paired server's managed hosts and their workspaces.Visual Proof
Component fixture (
sidebar/RelayedRuntimeHostsSection,pnpm fixtures:shot), dark and light. A real Electron app paired to a real relaying server and VMs was not captured.Before: no section; nothing renders when no paired server relays.
The "after" fixture shows: one A with two ready servers (git workspaces, with and without a display name, and a folder workspace), a server whose workspaces have not loaded yet, a second A whose read failed, and the read-only note.
--unreadableshows only an A whose read failed: there is no host to open, so the note is hidden.Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
mobile-relay-host-catalog.integration.test.ts(existing harness with real RPC servers over E2EE WebSockets): aruntime-scope client gets the same untargetedmobileRelay.hosts.listas the phone, andhosts.worktreesreturns the server's rows. This proves the contract is usable for laptop callers.runtime/relayed-runtime-hosts.test.ts: host and row caps, text clipping, dedupe byhostIdandworktreeId, and dropping non-ready, non-runtime:, archived and malformed entries. A malformed list is unreadable. A WSL environment is never treated as relaying, even when its status advertises the capability.store/slices/relayed-runtime-hosts.test.ts(real test store, stubbedwindow.api.runtimeEnvironments.call): no call when A is disconnected, unverified, unreachable, manually disconnected (retired), on an earlier pairing, or lacks the capability. Reads go through the generic call pinned to A's revision. Rows are kept without a call while A is out of contact. A downgrade drops A. A re-pair under the same id drops the old rows and never shows them for the new pairing. An unpair during a read doesn't restore rows. A newer read wins over an older one that answers later. Failed owner and row reads keep the last rows and their identity. An A never read shows as unavailable.hooks/ipc-events/relayed-runtime-hosts-polling.test.ts: the visibility interval starts only once a relaying A is in contact and stops when contact is lost.Mutation checks: removing the contact filter fails 5 tests, removing the generation check fails the ordering test, removing the revision check fails the earlier-pairing test, and removing the host cap and dedupe fails the parser test.
Commands (Linux):
corepack pnpm tc;corepack pnpm test --maxWorkers=2on the new suites plussrc/main/ipc/runtime-environments,src/renderer/src/hooks/ipc-events,src/preload, the host-catalog integration test and the runtime-status slice tests (125 files, 808 passed);node config/scripts/check-changed-code-quality.mjs upstream/main(0 new findings in all passes);oxlintandoxfmt --checkon changed files;oxlint --config config/oxlint-design-system.jsonon changed renderer files;pnpm run lint:react-doctor:changed;pnpm run verify:localization-catalogsandverify-localization-extraction.mjs. The fullpnpm check:changedwas not run locally; CI covers it.AI Disclosure
Written with Claude (Anthropic) via an agent harness; reviewed by the author.
Review
workspace-permission methods on A, which it could already call, through the same main call handler as every other renderer request. That handler applies the manual-disconnect, WSL move-fence and account checks. No routing to B happens, so no delegated device is minted on B (feat(remote): relay paired desktop and web clients to a server's managed hosts #35195 mints only on a relayed call). A's answer is treated as untrusted and bounded (see caps above). The rows carry no tokens; only names, branches and repo labels reach the renderer.runtimeEnvironments.calland status snapshots for its single paired server, so the same code works there without a separate path.text-2xsand category-label styling,sidebar*tokens,lucide-reacticons, no new colors. Checked in light and dark.Agent skill upstream boundary
Notes
relay: 'ready'servers are listed, and those are by definition reachable through A.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)