Repository navigation
feat(settings): remove a downloaded agent runtime from its Settings row - #29140
Conversation
5d27b4b to
3f15180
Compare
95372ef to
aec9de8
Compare
3f15180 to
ecae7f8
Compare
aec9de8 to
bc38930
Compare
|
QA (dev build of #28705 head ae28388, which includes this PR, on macOS): Remove downloaded runtime — PASS
Non-blocking: (1) while "Removing…" is showing, the Sign in button below still renders enabled for that ~1s. (2) After removing during a live turn, the chat shows "Antigravity couldn't start. Send your message to try again." even though the composer has been replaced by the install row. |
ecae7f8 to
de2e98f
Compare
bc38930 to
339c58a
Compare
de2e98f to
2865676
Compare
339c58a to
13f91a4
Compare
2865676 to
37d2337
Compare
13f91a4 to
e82466e
Compare
37d2337 to
94b7101
Compare
e82466e to
217e01e
Compare
94b7101 to
3762271
Compare
217e01e to
28c2b42
Compare
3762271 to
093a177
Compare
28c2b42 to
24acd09
Compare
093a177 to
330a3b4
Compare
24acd09 to
9e9c277
Compare
330a3b4 to
830b802
Compare
9e9c277 to
d91fe6b
Compare
830b802 to
0fbe608
Compare
08ee20a to
3a64a91
Compare
0358165 to
9f88aab
Compare
9b1535a to
de34102
Compare
c5d444f to
f0efd4b
Compare
de34102 to
9316310
Compare
f0efd4b to
84f074f
Compare
9316310 to
ef64556
Compare
84f074f to
72372e5
Compare
ef64556 to
0f84153
Compare
72372e5 to
70fb991
Compare
0f84153 to
0584cc0
Compare
70fb991 to
f36427b
Compare
38152d9 to
b045b47
Compare
f36427b to
63eed88
Compare
b045b47 to
c2265b1
Compare
When the host offers managed-runtime.remove.v1 and an Orca-installed copy is
there with nothing running, the Settings install row shows a trash button
("Remove downloaded runtime") that asks first: "Remove {agent} from this
host? Running {agent} chats stop. Chat history is kept." While the host removes
it the row says "Removing…"; a refused removal shows the host's reason and keeps
the button. Chats never show it.
…t the downloaded runtime leaves
The row offers Remove whenever the host says Orca's copy is there (canRemove), damaged included;
an older host without it keeps today's rule. The confirmation now reads "Remove the downloaded
{agent} runtime from {host}? Running {agent} chats there stop. Chat history is kept.", naming the
paired host, or this computer.
63eed88 to
0017412
Compare
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info
📝 Walkthrough
Priority: ⬇️ Low Merge Risk: 🔵 Low · up to
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
eb68ff2d-caa3-4be2-ad3f-6d3c3f2025a2
📒 Files selected for processing: 13
src/renderer/src/components/managed-runtime/ManagedRuntimeInstallRow.tsxsrc/renderer/src/components/managed-runtime/ManagedRuntimeRemoveButton.tsxsrc/renderer/src/components/managed-runtime/managed-runtime-install-view.test.tssrc/renderer/src/components/managed-runtime/managed-runtime-install-view.tssrc/renderer/src/components/native-chat/NativeChatStructuredSession.launch-lifecycle.test.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/runtime/managed-runtime-install-status.tssrc/renderer/src/runtime/use-managed-runtime-install.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 5 remain after this review.
…vider's status line The Antigravity row in Settings > Chat > Providers drew its install state as a bordered box nested inside the row. It now reads like the other rows: one grey status line under the name, with its actions as inline links joined by ' · ' (Installed · Remove, Not installed · Install · size, a thin progress bar with Cancel while downloading, Reinstall · Remove for a damaged copy, Try again after a failure). A healthy install no longer offers Reinstall. The Remove confirmation now says running chats stop and their history is kept.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
c578b16d-dc8f-4b8e-9714-11d5e088927e
📒 Files selected for processing: 12
src/renderer/src/components/managed-runtime/ManagedRuntimeInstallRow.tsxsrc/renderer/src/components/managed-runtime/ManagedRuntimeLinkButton.tsxsrc/renderer/src/components/managed-runtime/ManagedRuntimeRemoveButton.tsxsrc/renderer/src/components/managed-runtime/managed-runtime-install-view.test.tssrc/renderer/src/components/managed-runtime/managed-runtime-install-view.tssrc/renderer/src/components/settings/NativeChatProvidersSetting.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.json
🚧 Files skipped from review as they are similar to previous changes: 3
- src/renderer/src/i18n/locales/es.json
- src/renderer/src/i18n/locales/ja.json
- src/renderer/src/i18n/locales/ko.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
| <ManagedRuntimeLinkButton | ||
| disabled={disabled} | ||
| aria-label={translate('components.managed-runtime.remove', 'Remove downloaded runtime')} | ||
| onClick={() => setConfirming(true)} | ||
| > | ||
| {translate('components.managed-runtime.removeConfirm', 'Remove')} | ||
| </ManagedRuntimeLinkButton> |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
set -eu
printf '%s\n' '--- component ---'
nl -ba src/renderer/src/components/managed-runtime/ManagedRuntimeRemoveButton.tsx
printf '%s\n' '--- dialog-related imports and definitions ---'
rg -n -F --glob '*.{ts,tsx}' -e 'ManagedRuntimeRemoveButton' -e 'DialogContent' -e 'DialogTrigger' -e 'DialogPrimitive' -e 'function Dialog' -e 'const Dialog' src/renderer/src | head -200
printf '%s\n' '--- candidate dialog files ---'
rg --files src/renderer/src | rg '(^|/)(dialog|modal|Dialog)[^/]*\.(ts|tsx)$|components/.*/(dialog|modal|Dialog)[^/]*\.(ts|tsx)$' | head -100Repository: stablyai/orca
Length of output: 25332
🏁 Script executed:
set -eu
printf '%s\n' '--- dialog wrapper ---'
nl -ba src/renderer/src/components/ui/dialog.tsx
printf '%s\n' '--- Radix dialog declaration ---'
rg -n -F --glob 'package.json' -e '@radix-ui/react-dialog' -e 'radix-ui' .Repository: stablyai/orca
Length of output: 9175
🌐 Web query:
Radix UI dialog v1.6.7 DialogContent onCloseAutoFocus behavior when Dialog has no DialogTrigger controlled dialog
💡 Result:
Assuming you mean **`radix-ui@1.6.7`** (the umbrella package), not `@radix-ui/react-dialog@1.6.7`: the dialog package has a different version number. The available source for the current Dialog implementation is newer, so I can’t confirm that it exactly matches the implementation bundled in `radix-ui@1.6.7`. ([central.sonatype.com](https://central.sonatype.com/artifact/org.mvnpm/radix-ui/1.6.7?utm_source=openai))
For a **modal** dialog (the default), closing invokes `onCloseAutoFocus`; Radix’s internal handler prevents the browser’s default autofocus and then tries to focus `context.triggerRef.current`. Without a `DialogTrigger`, that ref is `null`, so Radix has no trigger to return focus to. **Inference:** focus restoration is therefore effectively skipped unless you handle it yourself. ([github.com](https://github.com/radix-ui/primitives/blob/main/packages/react/dialog/src/dialog.tsx))
If you need focus restored to the element that opened a controlled dialog, capture that element when opening and focus it in `DialogContent`’s `onCloseAutoFocus`. If you only want to suppress Radix’s default close-focus behavior, call `event.preventDefault()` in your handler. The exact v1.6.7 behavior remains unverified by the sources found.
Citations:
- 1: https://central.sonatype.com/artifact/org.mvnpm/radix-ui/1.6.7?utm_source=openai
- 2: https://github.com/radix-ui/primitives/blob/main/packages/react/dialog/src/dialog.tsx
🏁 Script executed:
set -eu
printf '%s\n' '--- lockfiles ---'
rg --files -g 'pnpm-lock.yaml' -g 'package-lock.json' -g 'yarn.lock' -g 'bun.lockb' -g 'bun.lock' .
printf '%s\n' '--- radix lock entries ---'
rg -n -F --glob 'pnpm-lock.yaml' -e 'radix-ui@' -e 'radix-ui:' -e '@radix-ui/react-dialog' . || trueRepository: stablyai/orca
Length of output: 2312
🌐 Web query:
@radix-ui/react-dialog 1.1.23 dialog.tsx onCloseAutoFocus triggerRef
💡 Result:
In `@radix-ui/react-dialog` **1.1.23**, `Dialog` creates a `triggerRef`, and `Dialog.Trigger` composes its forwarded ref with that internal ref. When modal content closes, Radix’s default `onCloseAutoFocus` prevents FocusScope’s default and focuses `triggerRef.current`. (GitHub discussion 3319 in radix-ui/primitives (link omitted to avoid creating a cross-reference))
Your `Dialog.Content` `onCloseAutoFocus` runs before that default handler. If yours calls `event.preventDefault()`, the composed handler won’t run, so Radix won’t restore focus to the trigger. The published package is version 1.1.23; the source view available here is the repository’s current `main` branch, not a version-pinned 1.1.23 source file, so exact source-level equivalence to that release is not independently established. ([app.unpkg.com](https://app.unpkg.com/%40radix-ui/react-dialog%401.1.23?utm_source=openai))
Citations:
- 1: GitHub discussion 3319 in radix-ui/primitives (link omitted to avoid creating a cross-reference)
- 2: https://app.unpkg.com/%40radix-ui/react-dialog%401.1.23?utm_source=openai
Restore focus to the Remove control when the dialog closes.
This controlled Radix dialog has no DialogTrigger, and the project wrapper does not add an onCloseAutoFocus handler. Radix therefore has no trigger element to focus when the dialog closes. Wrap the control in DialogTrigger asChild, or restore focus explicitly with onCloseAutoFocus.
Source: Learnings
…de the switch Not installed now shows a high-contrast Install button at the row's right end in Settings > Chat > Providers and Settings > AI Provider Accounts > Antigravity; the status line keeps the sentences (Not installed · 112 MB download.). Every other action stays a link in the line.







ELI5
Antigravity chats need Google's separate Antigravity chat server. An earlier version of this stack downloaded it silently the first time a chat started: about 18 seconds of "Working for Ns" with no progress and no Cancel, and every extra chat opened started another download. Now nothing downloads until the person clicks Install, which shows the size, progress and Cancel in Settings and in the new chat.
This PR adds the way back out: a "Remove" link in Antigravity's status line in Settings deletes the server Orca downloaded. It asks first, because removing it stops running Antigravity chats. It also stops showing Antigravity's install state as a separate outlined box inside its provider row: the state is now the row's grey status line, like every other agent's "Installed".
What Changed
This revision: the install state moved out of the outlined box into the provider row's status line, with its actions as text links, and the dialog wording was tightened ("there" read oddly). Remove's reply goes through the same subscription-aware store as Install (#29048), and every client sees the outcome through the host's pushed status.
managed-runtime.remove.v1). Whether a copy is there comes from the host'scanRemovealone. New strings are translated into all six languages.managedRuntime.remove(feat(runtime): remove an agent's downloaded runtime only once nothing on the host can still run it #29139) and applies the returned status to the shared per-host install status store when it belongs to the current subscription, as Install does; every row for that host, and that host's chat Install card, then follow the host's pushed status to the outcome.Why
Removal is rare and destructive, so it is a quiet link in Settings behind a confirmation. Showing the state as the row's own status line, with the same inline links the other agents use, removes the nested outlined box and keeps every provider row the same shape. All the safety lives on the host (#29139). The row just asks, and shows what the host reports.
Linked Issue
N/A (maintainer; part of the Antigravity Chat UI stack).
Visual Proof
Screenshots from QA round 7 on macOS, dark theme, at this PR's head
95b3e264425(hidden dev build, throwaway profile).Not installed, Install button (round 8)
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
The row's label table gains the removal cases: "Removing…" with no buttons, a refused removal that keeps Remove beside the host's reason, a damaged copy that offers Reinstall and Remove, a healthy install with no Reinstall, and no Remove in a chat.
Lint, typecheck and the full test suite run in this PR's CI.
Review
Agent skill upstream boundary
QA, round 2 (M4Air, 10-16, older build
2efa3308959with the outlined box and the old dialog wording; Grok drove the hidden window over the Chrome DevTools Protocol only)Notes
managed-runtime.remove.v1shows no Remove link.Differences from the common pattern
Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)