Repository navigation
feat(wsl-host): a paired phone reaches the desktop's WSL host, and never starts its distro (E6) - #31490
Closed
nwparker wants to merge 1 commit into
Closed
feat(wsl-host): a paired phone reaches the desktop's WSL host, and never starts its distro (E6)#31490nwparker wants to merge 1 commit into
nwparker wants to merge 1 commit into
Conversation
…ver starts its distro (E6) Behind ORCA_INTERNAL_WSL_HOSTS. The desktop relay now lists WSL hosts to phones, marked startsOnDesktop, and every relayed call prepares the host with wslStart: 'never': a WSL host serves a phone only while it already runs. The desktop sidebar's paired-server rows keep excluding its own WSL hosts; phones read their rows on demand. Co-Authored-By: Claude <[email protected]>
7 of 9 tasks
Contributor
Author
|
Superseded by #33911, which rebases this prototype onto current main and finishes the phone copy, the sidebar feed and the never-wake checks. |
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.
Summary
A phone paired with a Windows desktop can now see and use the projects on that desktop's WSL host (the Orca server running inside a WSL distro), the same way it already uses a managed SSH host: list them, open files, run terminals and launch agents, all relayed through the desktop. A tapped push for an agent on the WSL host opens it there.
The one hard rule: a phone never starts a stopped distro. If the distro isn't running, the phone is told "The WSL host Ubuntu isn't running. Open one of its projects on your computer to start it."
Before / after
startsOnDesktop. While the distro runs, everything works through the relay. While it's stopped, the host lists as unavailable and every call is refused with the message above; nothing starts.Mechanism
resolveManagedRuntimeEnvironment, whose WSL branch connects the host when the desktop has open work for it. A phone's call could therefore boot the distro.resolve,call,watchChanges) pass{ wslStart: 'never' }. For a WSL host that runsrequireRunningWithoutStart, which serves only if the host is reachable without starting anything (it readswsl --list --running), and otherwise throwsremote_runtime_unavailablewith the message above. This holds even while the desktop itself has open work for the host.unavailable, not a staleready. The newstartsOnDesktopfield is optional; older phones ignore it and already fall back tounavailablefor anything they don't understand.Shared paths touched (why this needs owner review)
callRuntimeEnvironment/subscribeRuntimeEnvironment/resolveManagedRuntimeEnvironmentgain an optional preparation argument. Without it, behavior is identical.runtime-rpc-pairing.ts: the desktop sidebar's paired-server rows producer is attached to a filtered host view; the phone catalog's row source is a small router (WSL hosts on demand, everything else unchanged).Why this approach
The relay, delegated phone devices, rows, terminals, agent launch and push routing already work for managed SSH hosts and are the same server code. The only WSL-specific risk was waking the distro, so the change is one "never start" switch on the relay's call path, not a parallel phone path. An explicit "start it from your phone" was left out on purpose; if wanted later it should be a prompt on the desktop, never a silent start.
Testing
requireRunningWithoutStart(refuses and never calls connect, even with the desktop's open work), catalogstartsOnDesktop, the sidebar/phone row split, and the push host id for a WSL worktree. 131 tests pass in those suites.tests/e2e/wsl-host-paired-phone.spec.ts(fake WSL transport, a second Orca standing in for the distro's server): the phone lists the host, lists its project, reads a directory, creates a terminal and launches an agent there; then the distro "stops", the phone's call is refused with the message, the host lists unavailable, and the fake logs no new start. Passes locally, along with the existingwsl-host-fake-transport.spec.ts(that spec needs a non-symlinkedTMPDIRon macOS; unrelated, pre-existing).pnpm tc:node, the e2e typecheck for the touched files, andcheck:code-quality:changedpass.Not done
startsOnDesktop("Start it on your computer"); today the phone shows a generic unavailable host.