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 computer's Orca from Edit computer - #51708
Your phone can now update Orca on your computer. Edit computer shows the new version with an Update button. One sheet downloads it, tells you what a restart would stop, restarts Orca only after you confirm, and tells you when the computer is back.
Files
Added
Deleted
Net
Test
0
0
0
0
Prod
18
$\color{#1a7f37}{\Huge{\mathbf{+}}}$1301
$\color{#cf222e}{\Huge{\mathbf{−}}}$213
$\color{#1a7f37}{\Huge{\mathbf{+}}}$1088
What Changed
Before: Edit computer showed the computer's Orca version and nothing to act on. A server got a one-line footer ("Update Orca on the server, then restart it").
After:
Orca row: when the computer's updater offers a version, the row reads installed → latest with Update (only when the computer can update itself from a phone). On open the phone reads updater.getStatus and never starts a check, since a check would also start one on the computer's screen. A computer that has to be updated by hand keeps its steps under the row. With nothing to update it's today's row, plus "Up to date" when the updater says so.
Update sheet:
Download: follows a download the computer already started, and skips straight to the confirm if it's already downloaded.
Will restart: read fresh from updater.restartImpact right before the confirm. Restart stays off until that read lands. With nothing to stop, the list is gone; a host that doesn't say shows a line instead of an empty list.
Restart Orca: the restart only happens on this tap.
Restarting: Hide keeps the wait going in the background.
Back online: "Updated to X", then a toast.
Couldn't update: the computer's reason, Details, Try again.
Hasn't come back: Check again waits for the same restart without asking for a second one; Try again starts over if the computer came back on its old version.
Host screen: while a restart the phone asked for is underway, a line above the page says "Updating to X…", so the reconnect doesn't read as a failure.
Host: phones may call updater.getStatus/check/download/install/restartImpact (execution-host routes), advertised as updater.mobile.v1. An install still needs updater.remote-control.v1 and remoteUpdateSupport.automatic.
Shared coordinator:
runRemoteServerUpdate is split into downloadRemoteServerUpdate (stops at downloaded, resumes from the updater's current state) and installRemoteServerUpdate (install, then wait for the replacement process, or only wait again for an accepted install). Desktop's run composes both and behaves as before.
A stalled download no longer republishes the same percent every tick.
The restart wait takes one last look after its deadline, so a phone whose timers were paused (locked) doesn't call a computer that's already back "lost".
Splitting the coordinator instead of a "pause before install" callback: a confirm can be minutes later, after the sheet was hidden or the screen left, so holding a paused promise, transport and queue slot open was the wrong shape. Two stages each finish.
Status read on open, not a check: a check is user-initiated on the computer and shows there.
A store per computer that holds the connection while a stage runs: leaving Edit computer, or hiding the sheet, never drops an update. Removing the computer ends its stage at the next tick.
Linked Issue
No GitHub issue; part of the phone parity work. Builds on #51245 and #51246 (merged).
Visual Proof
A real update between two packaged macOS builds of this branch (A 1.4.214-local.1000… → B …local.2000…, test bundle id, isolated HOME and profile), driven from an iOS 27 simulator. ShipIt swapped the app and relaunched it, and the phone reconnected by itself. The local-build versions are long, so they wrap. A daemon terminal survived, so nothing was listed under "Will restart".
Before
Orca row
Download
Downloading
(screenshot removed: contained real product data)
(screenshot removed: contained real product data)
(screenshot removed: contained real product data)
(screenshot removed: contained real product data)
Confirm
Restarting
Host screen meanwhile
Back online
(screenshot removed: contained real product data)
(screenshot removed: contained real product data)
(screenshot removed: contained real product data)
(screenshot removed: contained real product data)
Toast
Light
(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 Squirrel/ShipIt update from the phone, run twice: Edit computer → Update → Download → Restart Orca. The app on disk went A → B, the relaunched process reported B, and the phone came back connected and showed "Updated to B".
Dev serve (unpackaged): no Update on the row; the support reason's footer shows. Old hosts without updater.mobile.v1 keep today's row.
Desktop Settings' server updates still use runRemoteServerUpdate; pnpm tc:web passes and the composed stages make the same calls in the same order.
No automated test: the behaviour is a real updater and restart, which the run above exercised.
Not run: Windows and Linux desktops (their support.automatic comes from the host as before), and Android.
Performance
None while idle, because nothing runs until the user taps Update: opening Edit computer reads updater.getStatus once and an unchanged answer writes nothing. While a download or restart the user started is underway, the phone polls once a second (10-minute download cap, 3-minute restart cap) with one status read per tick, and publishes only when the percent changes. Removing the computer ends that polling at the next tick.
Mixed versions: additive. Old hosts don't advertise updater.mobile.v1 and keep today's screen; old phones never call these methods.
Phone release: Edit computer is native, so phones get this with the next app release. No native modules change.
Back out: a plain revert. Nothing is persisted.
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
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
Servers a phone reaches through its computer, and SSH-managed orcad (managedServer.update on the managing desktop), aren't updated from the phone yet; their notices name the server without an action (next PR).
Download size isn't shown: the host reports percent only.
Cancel during a download closes the sheet; the computer keeps downloading (there's no cancel), and no restart happens without the confirm.
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 changes add mobile controls for agent CLI and Orca updates, including update status, download and restart flows, failure details, and restart-impact information. They add shared agent CLI update utilities used by the main process and renderer. They also split remote server updates into download and install stages and update the coordinator to use them.
Merge Risk: Low · up to 9abf9
Phone-driven Orca and agent CLI updates work in the reported flows. In rare timing cases an Edit computer row can briefly show a stale Update action, or show "Updated" without a version. A later check corrects it. Fix these before merge or accept them as minor.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "feat(mobile): update the computer's Orca from Edit computer" matches the main change: the phone can update Orca on a host from the Edit computer screen, with download, confirm, restart, and…
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.
Description check
The description is mostly complete. It has a clear ELI5, a detailed What Changed section with before and after behavior, a Why section that explains the split between download and install and the stat…
Full details: Title check
Explanation
The title "feat(mobile): update the computer's Orca from Edit computer" matches the main change: the phone can update Orca on a host from the Edit computer screen, with download, confirm, restart, and reconnect flow. It is specific and follows a conventional commit style. The title does not mention the agent CLI updates or the shared coordinator split, but those are secondary to the main change.
Full details: Description check
Explanation
The description is mostly complete. It has a clear ELI5, a detailed What Changed section with before and after behavior, a Why section that explains the split between download and install and the status-read-on-open choice, and a Risk section that names the riskiest part and the back-out path. It also has Visual Proof with before and after images, a Testing section with manual macOS steps and an explicit note that no automated tests were added, and a Performance section. Gaps: the Linked Issue section says there is no GitHub issue, which the template says should always exist for outside contributors. The author says this is internal phone-parity work, so the gap may not apply, but the author should confirm. The Testing checklist leaves the anti-pattern test item unchecked, and the lint/typecheck/test/build checklist item is unchecked. The Risk level is set to High, and the AI Disclosure section is empty. The author should confirm whether the AI Disclosure is required for this contributor.
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; 5 remain after this review.
Files skipped from review as they are similar to previous changes: 1
src/renderer/src/i18n/en-runtime-required.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Reject snapshot replies that an newer snapshot has superseded.
readHostOrcaUpdate and the download stage's preliminary status read both publish snapshot for the same host owner. Neither checks request order. If an older status request resolves after a newer one has published, the older reply overwrites the newer snapshot. The owner guard does not prevent this, because both requests share the owner. The sameSnapshot check only skips identical values.
The stale snapshot stays in the store until a later read publishes. While it stays, the row can show an outdated installed or offered version. A download started from it also uses that stale version as its target.
Give each snapshot request an order, as refreshHostOrcaRestartImpact already does with impactReads. Publish a result only when its request is newer than the last published snapshot for that host. Keep reads that do not overlap unchanged.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 3 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Minor · Functional Correctness · Quick win
Keep the run's target version separate from current offers.
If a check returns after installation finishes but before the successful run reply arrives, it can correctly replace host.updates with []. This line then records done[agent] = '', so the “Updated to” record loses the installed version.
Preserve the target version when the run starts, or return the installed version from the run operation. Do not derive it from the current offers when the reply arrives.
Edit computer's Orca row shows installed -> latest and Update when the
computer can update itself. One sheet downloads the update, names what a
restart stops (updater.restartImpact), restarts Orca only after that
confirm, and waits for the computer to come back on the new version.
Hide keeps the wait going, and a host that hasn't come back can be
checked again without asking for a second restart.
The shared coordinator now has separate download and install stages, so
a client can stop between them; desktop's runRemoteServerUpdate composes
both as before. Hosts let phones call updater.* (updater.mobile.v1).
…test read
Only the newest restart-impact read sets the confirm's list, and a
download that finished as its computer was removed no longer brings that
computer back. Closing the sheet on a finished update leaves it for the
toast that says so.
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
Your phone can now update Orca on your computer. Edit computer shows the new version with an Update button. One sheet downloads it, tells you what a restart would stop, restarts Orca only after you confirm, and tells you when the computer is back.
What Changed
installed → latestwith Update (only when the computer can update itself from a phone). On open the phone readsupdater.getStatusand never starts a check, since a check would also start one on the computer's screen. A computer that has to be updated by hand keeps its steps under the row. With nothing to update it's today's row, plus "Up to date" when the updater says so.updater.restartImpactright before the confirm. Restart stays off until that read lands. With nothing to stop, the list is gone; a host that doesn't say shows a line instead of an empty list.updater.getStatus/check/download/install/restartImpact(execution-host routes), advertised asupdater.mobile.v1. An install still needsupdater.remote-control.v1andremoteUpdateSupport.automatic.runRemoteServerUpdateis split intodownloadRemoteServerUpdate(stops atdownloaded, resumes from the updater's current state) andinstallRemoteServerUpdate(install, then wait for the replacement process, or only wait again for an accepted install). Desktop's run composes both and behaves as before.Why
Linked Issue
No GitHub issue; part of the phone parity work. Builds on #51245 and #51246 (merged).
Visual Proof
A real update between two packaged macOS builds of this branch (A
1.4.214-local.1000…→ B…local.2000…, test bundle id, isolated HOME and profile), driven from an iOS 27 simulator. ShipIt swapped the app and relaunched it, and the phone reconnected by itself. The local-build versions are long, so they wrap. A daemon terminal survived, so nothing was listed under "Will restart".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 Squirrel/ShipIt update from the phone, run twice: Edit computer → Update → Download → Restart Orca. The app on disk went A → B, the relaunched process reported B, and the phone came back connected and showed "Updated to B".
Dev serve (unpackaged): no Update on the row; the support reason's footer shows. Old hosts without
updater.mobile.v1keep today's row.Desktop Settings' server updates still use
runRemoteServerUpdate;pnpm tc:webpasses and the composed stages make the same calls in the same order.No automated test: the behaviour is a real updater and restart, which the run above exercised.
Not run: Windows and Linux desktops (their
support.automaticcomes from the host as before), and Android.Performance
None while idle, because nothing runs until the user taps Update: opening Edit computer reads
updater.getStatusonce and an unchanged answer writes nothing. While a download or restart the user started is underway, the phone polls once a second (10-minute download cap, 3-minute restart cap) with one status read per tick, and publishes only when the percent changes. Removing the computer ends that polling at the next tick.Risk
Level: High
updater.installpath desktop's own remote updates use (which backs up unsaved editors first, fix(updater): back up unsaved editors before a remote-triggered desktop update #51245).updater.mobile.v1and keep today's screen; old phones never call these methods.AI Disclosure
Review
Agent skill upstream boundary
Notes
Ensure no issues in: Security, Cross-platform support (Linux, Windows, Mac), Remote SSH, Mobile, general backwards compatibility, performance
managedServer.updateon the managing desktop), aren't updated from the phone yet; their notices name the server without an action (next PR).Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)