You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat(mobile): update the servers a computer reaches from Edit computer - #52332
Edit computer on the phone can now update the servers that computer reaches, not just the computer itself. There are two kinds of server:
A server that updates itself (another Orca paired to the computer) opens the same update sheet as the computer.
A server the computer installed over SSH is updated by the computer, the same way its own Settings does it. That includes the "Update anyway" question when terminals are running there.
Files
Added
Deleted
Net
Test
0
0
0
0
Prod
32
$\color{#1a7f37}{\Huge{\mathbf{+}}}$1049
$\color{#cf222e}{\Huge{\mathbf{−}}}$94
$\color{#1a7f37}{\Huge{\mathbf{+}}}$955
What Changed
Phone (Edit computer → Updates):
One row per server that has something to show: an update offered, an update running, or a result. Servers with nothing to update get no row.
Self-updating servers: tapping Update opens the existing Orca update sheet (Download → Restart → "Updated to X" → toast). It runs through a client scoped to that server, so the desktop relays updater.* to the runtime: host.
SSH-managed servers: tapping Update asks the computer to run managedServer.update.
If the computer defers because terminals are running, the phone asks "Update {server} anyway?", in the desktop's own words for counted and uncounted terminals.
Update anyway passes pastLiveTerminals, as the desktop does. The update keeps its version checks, unlike force.
The row shows Orca versions (the server's → the computer's). Only when those match does it show the server build ids.
In-workspace notice: "Update Orca on " now offers How to update, opening Edit computer, but only when a row will be there for that server. That means an SSH-managed server on a computer with managedServer.mobile.v1, or a self-updating server the phone can update through the computer.
Computer:
mobileRelay.hosts.list marks SSH-managed servers with managedOverSsh: true.
The phone allowlist adds managedServer.status and managedServer.update as paired-desktop routes. The desktop answers them, gated on a new managedServer.mobile.v1 capability.
managedServer.status takes skipTerminalCensus, so the phone's version read opens no connection to the server.
managedServer.update takes pastLiveTerminals (already in the desktop's IPC).
orcadUpdateAnywayConfirmation moved to shared code. The desktop renderer and the phone now word the confirm from the same deferral.
Store behaviour:
Each server is read once per visit. A read is retried only if it didn't answer, and never sent twice at once.
Managed servers are read only while the computer's SSH to them is up, so a visit never makes the desktop dial.
Rows wake only for their own server.
Servers the computer stops listing are forgotten. Removing a computer ends anything still running for its servers.
Why
Before this, the phone could update the computer's Orca (#51708) but had no path for its servers. The notice inside a server workspace named the server with no action. updater.* already routes to execution hosts, so a self-updating server needed only a scoped client and a row.
An SSH-managed server can't update itself: only the desktop that deployed it holds the template and the SSH access. So the phone asks that desktop to do it, the same call its Settings makes, rather than reaching for the server. The confirm reuses the desktop's deferral rule, so the phone and the desktop can't disagree about when "Update anyway" is safe.
Linked Issue
No GitHub issue. This is the server follow-up to #51708.
Visual Proof
Real run on a simulator. The setup:
A hidden dev desktop from this branch, which the phone paired to.
Studio Mac: a packaged Orca 1.4.214-local.1000 paired to the desktop as a server, with 1.4.214-local.2000 offered.
Build Box: an orcad the desktop deployed over SSH to a loopback sshd, with one terminal running and a newer template on the desktop.
There's no before capture of these rows because they didn't exist. Before, Edit computer listed only the computer's own Orca and agent CLIs.
Both kinds of server:
(screenshot removed: contained real product data)
SSH-managed (Build Box): Update → the desktop defers over the running terminal → Update anyway → updated. The terminal is still running afterwards (liveSessions: 1).
(screenshot removed: contained real product data)(screenshot removed: contained real product data)(screenshot removed: contained real product data)
Self-updating (Studio Mac): Download → Restart. ShipIt swapped the app to 1.4.214-local.2000, and the row and toast confirm it.
(screenshot removed: contained real product data)(screenshot removed: contained real product data)(screenshot removed: contained real product data)
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
macOS, real flows: the run above, on an iOS simulator against a hidden dev desktop.
Build Box went from 0.1.0+9a48a8806158 to 0.1.0+2208243ce97f through the deferral and Update anyway.
Studio Mac went from 1.4.214-local.1000 to 1.4.214-local.2000 and reconnected.
No new test: the new logic is phone store wiring and an RPC route. Both flows were proven end to end above, and a unit test here would test mocks.
Performance
None that grows. Opening Edit computer sends one status read per listed server, and only to servers that can answer: relayed servers whose relay is ready, and SSH-managed ones whose SSH is up. Each read is retried only if it failed. The server list feed is subscribed only while Edit computer is in front. With nothing changing, nothing is published. A write wakes only that server's row plus one due-set check over the listed servers. The managed status read skips the terminal census, so the server gets no extra connection.
Risk
Level: Medium
Riskiest part: "Update anyway" from the phone on an SSH-managed server. It passes the same pastLiveTerminals the desktop's Settings passes, so the desktop still refuses if the server changed (incumbent version check) or if an uncounted daemon is live.
Mixed versions:
An older desktop lacks managedServer.mobile.v1 or the relay list event, so the phone shows no server rows and the notice keeps no action.
An older phone ignores managedOverSsh (an optional field).
The new RPC params are optional, so older desktops reject nothing new.
Phone release: native screens, shipped with the next app release.
Back out: a plain revert.
AI Disclosure
Review
Agent skill upstream boundary
Not applicable, or this change copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.
Notes
Security: phones reach only managedServer.status and managedServer.update. These are the same host-admin level as the updater.* methods phones already call, and are gated by the phone allowlist.
Cross-platform: no platform-specific code.
SSH: covered by the real run above.
Folder workspaces: unaffected.
Checklist
This PR is small and focused
I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
I stated the risk: what could break, for whom, and how to back it out
Before/after screenshots or videos attached for UI changes, or N/A with reason
Self-reviewed for correctness, security, and performance
Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)
The reason will be displayed to describe this comment to others. Learn more.
Failed reads never retry
When a status request times out while the computer stays connected, this callback removes the key from pending but changes no state. Unchanged host-list replies keep the same array, so the effect does not run again. The server's update row stays missing until the user leaves and returns or another host fact changes. Schedule a bounded retry for reads that return false.
The reason will be displayed to describe this comment to others. Learn more.
Update links lead nowhere
An already-open workspace uses useRelayHosts(..., 'all'), including servers later paired directly to the phone. Edit computer uses 'listed', which removes those servers, but this notice still offers How to update for them. Users can follow the link and find no row for their server. Check that the target will be listed, or open the direct pairing that owns its update row.
Review was skipped as selected files did not have any reviewable changes.
Files ignored due to path filters: 1
src/shared/rpc-contract/rpc-params-catalog.generated.ts is excluded by !**/*.generated.*
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 590629ff-7d35-471c-a55d-3fdf32039567
Commits
Reviewing files that changed from the base of the PR and between 7767bff and f4a58de.
Files ignored due to path filters: 1
src/shared/rpc-contract/rpc-params-catalog.generated.ts is excluded by !**/*.generated.*
You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.
Use the checkbox below for a quick retry:
Trigger review
No actionable comments were generated in the recent review.
Walkthrough
The change adds mobile status reads and update requests for eligible servers, including servers managed over SSH. It extends managed-server RPC routing and adds terminal-census options and terminal-related update confirmation. Host update screens display managed and relayed server updates alongside Orca and CLI updates. Orca update state now supports keyed subscriptions and runtime-server-scoped connections.
Path filters excluded changed files. This rating applies only to the assessed changes.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "feat(mobile): update the servers a computer reaches from Edit computer" matches the main change. The PR adds update rows for servers reached through a paired computer in the mobile Edit com…
Description check
The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Agent skill upstream boundary, Note…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "feat(mobile): update the servers a computer reaches from Edit computer" matches the main change. The PR adds update rows for servers reached through a paired computer in the mobile Edit computer screen, including self-updating servers and SSH-managed servers. The title is specific and concise, and it follows a conventional commit style.
Full details: Description check
Explanation
The description follows the repository template. It includes ELI5, What Changed, Why, Linked Issue, Visual Proof, Testing, Performance, Risk, AI Disclosure, Review, Agent skill upstream boundary, Notes, and Checklist sections. It gives detailed before and after behaviour, a performance rationale, and a risk level with a backout plan. The Linked Issue section names no issue, only a follow-up to #51708. The Testing section leaves the automated-test checkbox unchecked and explains why no test was added. The AI Disclosure section is empty, but the template marks it as optional for internal contributors. Those gaps are minor and do not make the description incomplete.
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Keep the installed build from the successful reply.
When a server moves from build A to build B of the same Orca release, the desktop returns activeVersion: B. This write discards B and renders “Updated to A” from the old status. If the follow-up status read times out, the row continues to show A. Publish the confirmed build with the success state. Use the follow-up read to refresh status and discover any newer offer.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Data Integrity & Integration · Quick win
Gate the post-update status read on the desktop's SSH connection.
After an update attempt, readStatus runs with skipTerminalCensus: true and no connection check. If the desktop's SSH link drops during the update while the phone stays connected to the desktop, this read reaches managedServer.status. The desktop then calls connectionManager.connect(target) before it reaches the census branch, so the read can reconnect SSH. The skip flag does not prevent this. The PR states that status reads occur only while SSH is up, so this read breaks that stated behavior.
Apply the same connection gate that protects the initial status read before the follow-up read at line 160. If the gate reports SSH down, skip the follow-up read and leave the run state unchanged. Do not treat the missing reply as an update result.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Settle managed results that finish after the visit ends.
If the user leaves while a managed update is running, blur attempts to settle it, but the store keeps updating. If it finishes before the user returns, the next visit still shows “Updated to” even when there is no offer. Only the next blur clears that result. Settle results from earlier visits when the screen opens, without clearing a run that is still in progress.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Heavy lift
Gate the notice link on a server update row, not just update support.
A desktop can advertise managedServer.mobile.v1 while its bundled build is already installed on the server. The notice then offers “How to update,” but Edit computer receives no update offer and shows no row for that server. The self-updating branch also checks support without checking for an offer.
Use the same eligibility criteria as Edit computer, including list membership and a due update. If the notice cannot establish that a row is available, keep the existing recheck or non-link state.
Edit computer's Updates group now lists the servers the computer reaches
that have an Orca update. A server that updates itself opens the same
update sheet, through the computer's connection to it. A server the
computer runs over SSH is updated by the computer (managedServer.update),
with the desktop's Update anyway confirm over running terminals. A
server workspace's update notice opens Edit computer.
Hosts list each SSH-managed server as managedOverSsh, let phones call
managedServer.status/update on the paired-desktop route (advertised as
managedServer.mobile.v1), and take pastLiveTerminals so a phone's Update
anyway keeps Update's version checks, as the desktop's does.
A refused or held update also leaves no offer, so a lost reply counts as updated only when the
server runs another build. Pending reads span visits, finished relayed results settle on blur,
a failure the server moved past gives way to the newer offer, and Update anyway waits for a
connection.
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
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
Edit computer on the phone can now update the servers that computer reaches, not just the computer itself. There are two kinds of server:
What Changed
Phone (Edit computer → Updates):
updater.*to theruntime:host.managedServer.update.pastLiveTerminals, as the desktop does. The update keeps its version checks, unlikeforce.managedServer.mobile.v1, or a self-updating server the phone can update through the computer.Computer:
mobileRelay.hosts.listmarks SSH-managed servers withmanagedOverSsh: true.managedServer.statusandmanagedServer.updateas paired-desktop routes. The desktop answers them, gated on a newmanagedServer.mobile.v1capability.managedServer.statustakesskipTerminalCensus, so the phone's version read opens no connection to the server.managedServer.updatetakespastLiveTerminals(already in the desktop's IPC).orcadUpdateAnywayConfirmationmoved to shared code. The desktop renderer and the phone now word the confirm from the same deferral.Store behaviour:
Why
Before this, the phone could update the computer's Orca (#51708) but had no path for its servers. The notice inside a server workspace named the server with no action.
updater.*already routes to execution hosts, so a self-updating server needed only a scoped client and a row.An SSH-managed server can't update itself: only the desktop that deployed it holds the template and the SSH access. So the phone asks that desktop to do it, the same call its Settings makes, rather than reaching for the server. The confirm reuses the desktop's deferral rule, so the phone and the desktop can't disagree about when "Update anyway" is safe.
Linked Issue
No GitHub issue. This is the server follow-up to #51708.
Visual Proof
Real run on a simulator. The setup:
There's no before capture of these rows because they didn't exist. Before, Edit computer listed only the computer's own Orca and agent CLIs.
Both kinds of server:
(screenshot removed: contained real product data)
SSH-managed (Build Box): Update → the desktop defers over the running terminal → Update anyway → updated. The terminal is still running afterwards (
liveSessions: 1).(screenshot removed: contained real product data) (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Self-updating (Studio Mac): Download → Restart. ShipIt swapped the app to 1.4.214-local.2000, and the row and toast confirm it.
(screenshot removed: contained real product data) (screenshot removed: contained real product data) (screenshot removed: contained real product data)
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
macOS, real flows: the run above, on an iOS simulator against a hidden dev desktop.
0.1.0+9a48a8806158to0.1.0+2208243ce97fthrough the deferral and Update anyway.pnpm check:changedpasses (typecheck, lint, localization, ratchets, focused tests).No new test: the new logic is phone store wiring and an RPC route. Both flows were proven end to end above, and a unit test here would test mocks.
Performance
None that grows. Opening Edit computer sends one status read per listed server, and only to servers that can answer: relayed servers whose relay is ready, and SSH-managed ones whose SSH is up. Each read is retried only if it failed. The server list feed is subscribed only while Edit computer is in front. With nothing changing, nothing is published. A write wakes only that server's row plus one due-set check over the listed servers. The managed status read skips the terminal census, so the server gets no extra connection.
Risk
Level: Medium
pastLiveTerminalsthe desktop's Settings passes, so the desktop still refuses if the server changed (incumbent version check) or if an uncounted daemon is live.managedServer.mobile.v1or the relay list event, so the phone shows no server rows and the notice keeps no action.managedOverSsh(an optional field).AI Disclosure
Review
Agent skill upstream boundary
Notes
managedServer.statusandmanagedServer.update. These are the same host-admin level as theupdater.*methods phones already call, and are gated by the phone allowlist.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)