Skip to content

feat(settings): sign Antigravity chats in from Accounts - #28705

Merged
brennanb2025 merged 20 commits into
mainfrom
brennanb2025/agy-chat-5b2-accounts-signin
Oct 19, 2026
Merged

brennanb2025 merged 20 commits into
mainfrom
brennanb2025/agy-chat-5b2-accounts-signin

Conversation

@brennanb2025

@brennanb2025 brennanb2025 commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 5 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​208 $\color{#cf222e}{\Huge{\mathbf{−}}}$​19 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​189
Prod 28 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1373 $\color{#cf222e}{\Huge{\mathbf{−}}}$​373 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1000

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.

Once installed, Antigravity chats use their own Google sign-in, separate from the agy terminal account. Until this PR, a chat that needed sign-in ended as "not signed in" with no way to fix it in Orca. This PR adds an "Antigravity chats" sign-in row right below the Antigravity install row, in Settings > Chat > Providers and in the Antigravity section of Accounts, when experimental Chat UI is on.

What Changed

Latest revision (10-18): rebased onto main after the sign-in service (#28650), Remove (#29139, #29140) and the provider-row restyle merged. The "Antigravity chats" sign-in row now matches the install row above it: no bordered box. It shows a title, the grey description and a grey status line ("Not signed in on this device."), with the action on the right: a primary Sign in button, Cancel while a sign-in runs, Retry sign-in after a cancel or timeout, and Change account when signed in. The field for pasting Google's last page sits under the line, also without a box.

This revision (moving to the common pattern; each item is problem, then what changes):

  • Remote hosts had no sign-in row, so a remote host could install Antigravity but its chats could never run. The row now shows for every host. While a sign-in waits, it shows a field under the link, "If the last page after signing in doesn't load, copy its full address from your browser and paste it here.", with Continue (disabled while empty or sending). The host checks the address and passes it on (feat(antigravity): sign Antigravity chats in with the server's own Google sign-in #28650); a refused address shows its reason under the field, and the row reads "Finishing sign-in…" while the host completes it. The field shows on every sign-in, local too, as the common pattern does.

  • The sign-in row polled the host, in a loop of waits of up to 25 seconds, through its own copy of the install store's loop. Both rows now share one subscription store: a snapshot when a row is shown, then one frame per newer revision, resubscribing with backoff when the connection is lost, and ending when the last row hides. The sign-in row subscribes to accounts.antigravityChatSignInSubscribe (feat(antigravity): sign Antigravity chats in with the server's own Google sign-in #28650), the install row to managedRuntime.subscribe (feat(acp): hosts install a managed runtime over RPC, and mark agents whose program Orca provides #29024).

  • Install, Update and Remove stayed clickable while a sign-in ran, so the person could confirm "Running Antigravity chats there stop." and then get a refusal. They are now disabled while this host's sign-in runs (Cancel installation stays), in both places, as the common pattern does. Sign in was already disabled during Remove.

  • The row flipped while loading. Before the host's first answer it showed "Sign in on {host}." with an enabled Sign in, then switched to "Sign-in saved on {host}." with Change account. Sign in now stays disabled and the status line stays empty (its space kept) until the host answers.

  • A failed status read said "Sign in on {host}.", claiming signed out when the state was unknown. It now says "Could not check the sign-in on {host}." and keeps retrying.

  • A double click sent two Starts, and the host replaced the first sign-in with the second. Sign in and Cancel now send one request at a time.

  • Where: directly below the install row in both places. Providers says "Chats use their own Antigravity sign-in, separate from your agy terminal account. Sign in once on this device." Accounts says "Chats use their own Antigravity sign-in, separate from your agy account above. Sign in once on this device."

  • Status line: "Sign in on {host}." or "Sign-in saved on {host}." when idle. "Sign-in saved" means a sign-in file exists, never that it still works. While signing in: "Starting sign-in…", then "Finish signing in in your browser.", or "Copy the link and open it in your browser." if the browser couldn't open. Afterwards: "Signed in.", "Sign-in cancelled.", "Sign-in timed out. Try again.", or the host's reason (else "Sign-in failed. Try again.").

  • Button: Sign in. It reads Change account when a sign-in is saved or just finished, and Retry sign-in when the last attempt failed, was cancelled or timed out. It is never hidden. It is disabled until the host's sign-in status is known, while Antigravity isn't installed on this machine, while the install status is still unknown, while Remove runs, and while its own Start or Cancel is out. The install row right above already says why, so there is no second message. An Update or Reinstall keeps it usable, because the installed copy keeps running until the new one is in place.

  • Flow: Sign in starts the host's Google sign-in (feat(antigravity): sign Antigravity chats in with the server's own Google sign-in #28650) and opens its page once, and only for a sign-in started from a visible row. While waiting, the row offers a Copy sign-in link icon and Cancel.

  • One sign-in per host: both rows show the same sign-in, so starting it in one shows it in the other. An open row also picks up a sign-in started, cancelled or finished from another device, and a row shown while a sign-in is already running on the host (for example, after leaving Settings and coming back) shows "Finish signing in in your browser." with Cancel and Copy link.

  • Errors: if the subscription is lost, the row keeps showing the host's last answer and resubscribes with the install row's backoff (1 s, doubling to 30 s), so a sign-in still running there stays visible with Cancel and a lasting error can't spin. If the first read fails, the row says "Could not check the sign-in on {host}."

  • While a sign-in runs: the install row above disables Install, Update and Remove; Cancel installation stays available.

  • Sign-in stops this machine's running Antigravity chats before changing their shared sign-in; they start again on the next message. New chat starts are refused while it runs.

  • Every host shows the sign-in row, remote hosts included. Google's last page returns to 127.0.0.1 on the host, so from another computer the person pastes that page's address into the field.

  • Settings search finds the section by "login" too. New strings are translated into all six languages.

  • Mechanism: the install status store's subscription logic is now one generic module (revisioned-host-state-store.ts), and both the install row and the sign-in row use it. While a row is shown, one subscription per host carries the host's sign-in state, idle included, so the flow and "saved" stay current. Every subscription is a new generation, so a restarted host's state replaces the old one and a late frame from an earlier subscription is dropped. The sign-in store keeps only what is this client's own: the link it opens once for a sign-in it started, and the error from its last request.

Why

Sign-in runs the installed server, so it belongs right under the row that installs it. Disabling it there, instead of hiding it, keeps one explanation in one place. The row reuses the existing Accounts section, the host-owned sign-in service, the browser-opening path and clipboard feedback, and the host stays responsible for the sign-in and the flow. One store per host, rather than state in each row, is what keeps the two rows from cancelling each other.

Linked Issue

N/A (maintainer; part of the Antigravity Chat UI stack).

Visual Proof

Round 10 QA at 9b0de605507 (macOS arm64, hidden dev app, dark theme, throwaway profile never signed in to Google, real pinned Antigravity runtime installed and removed through the UI).

Providers, not installed: Not installed · 112 MB download. with Install

Providers, installed and signed out: Installed, the more-actions button, and the sign-in area

Providers, more-actions menu open: Reinstall Antigravity, Remove downloaded runtime

Signed-out Antigravity chat notice

Sign-in waiting: spinner, Copy sign-in link, Cancel, paste field in the panel

Pasted "not a url": Orca's own reason

Settings > AI Provider Accounts > Antigravity: Installed with the more-actions button, sign-in row unchanged

After Remove: Not installed · 112 MB download., no sign-in area

Testing

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

  • Row tests against a fake host that pushes sign-in snapshots over a subscription: the link opens once across repeated waiting frames and the row ends signed in; a Start answered after the row unmounts opens nothing; an idle row shows a sign-in another device starts and can cancel it.

  • Required GitHub CI checks pass on this PR.

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.

QA, round 2 (M4Air, 10-16, build of 2efa3308959 before this revision's last fixes; Grok drove the hidden window over the Chrome DevTools Protocol only)

  • Sign in disabled until installed, and no flip while loading. Starting a sign-in showed "Finish signing in in your browser.", the paste field and Continue (disabled while empty); Reinstall and Remove were disabled while it waited. A wrong address was refused under the field with "That address isn't the last page of this sign-in. Copy the full address from your browser's address bar and try again." and the sign-in kept waiting. Cancel showed "Sign-in cancelled." and re-enabled Reinstall and Remove within 4 ms. No Google sign-in was completed, by rule.

Sign-in waiting with paste field Refused paste Sign-in cancelled

Notes

  • Security: the host validates the Google link before the app sees it. The row opens it once and never logs it.
  • SSH and remote hosts: the same row works for every host; the paste field finishes a sign-in whose last page can't reach the host. The calls are capability-checked, so a host without them is never asked.
  • PR author: @BrennanKB5

Differences from the common pattern

  • Temporary: the sign-in row doesn't resubscribe the moment a paired host comes back (the install row does); it catches up on its next retry, at most 30 seconds later. Follow-up: give both rows the same wake on host contact, and drop the install store's second restart check, which the sign-in store shows is not needed.
  • Intended: the sign-in state is kept per host, shared by the Settings > Chat > Providers row and the Accounts row, where the common pattern keys it per provider instance; Orca keeps one Antigravity sign-in folder per host and has no per-provider instances, and one store per host is what keeps the two rows from cancelling each other.
  • Intended: a refused pasted address shows its reason under the field and clears when the person types, instead of on the row's error line, which would outlive the sign-in and turn the button into Retry sign-in.
  • Temporary: there is no Sign out yet (follow-up: a Sign out with a confirmation that it stops running chats; the server's own /logout stays withheld in chats until then, feat(acp): Antigravity in the Chat UI over its ACP server #28595).
  • Intended: "Sign-in saved" reflects the saved sign-in file and never claims the sign-in still works, because checking would start the server; the common pattern's row reads signed out after every restart until a chat starts.
  • Intended: the browser opens automatically for the person who pressed Sign in, with Copy link as the fallback, instead of a separate "Open browser" button; the common pattern's extra click serves a consent step and web pop-up blocking that Orca's flow doesn't have.
  • Intended: after Cancel the row says "Sign-in cancelled." beside Retry sign-in only until the host answers whether it is signed in (normally about a second), then the host's answer ("Not signed in on this device."); the common pattern shows only the button. The short line is feedback for the person's own click and for a cancel from another device.
  • Intended: only Google account sign-in is offered; other sign-in methods would be a new feature.

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)
  • 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)

@brennanb2025

Copy link
Copy Markdown
Contributor Author

Antigravity chats need their own Google sign-in, but Accounts previously only managed terminal agy accounts. This PR adds local chat Sign in, one browser open per attempt, Copy link, Cancel, and saved-file status.

Review fixed late replies that could open a browser after leaving Accounts or follow an older cancelled attempt, and removed the dependency on terminal-account loading. Late browser/Cancel errors now stay with their attempt. The row stays hidden on unsupported hosts, remote targets and WSL. Minor terminal/chat grouping copy polish is deferred.

Two review rounds, final readiness and a separate performance pass found no remaining substantive issue. Ten targeted tests, the scoped web typecheck and all required GitHub CI checks passed at 797b55a7100. The local pre-push gate passed 21/22; its sole failure was the known Bun 1.3.14 compiler mismatch.

Hidden M4Air checks used isolated data, a fake ACP server and intercepted URL opening: main/base omit the row; waiting/copy/cancel, synthetic completion, saved-on-reopen and replacement passed. Real app Sign in stopped an existing fake chat process; another real request reached the host's refusal while sign-in waited and spawned no chat process. No Google login was performed. Default-tab/setup behavior and non-Mac platforms were reviewed in code rather than exercised live; the unsafe-file List-error attempt did not establish an actual failed List response, so that availability fix has source evidence only. No merge or rebase was performed.

Before, on the stack base:

Accounts before the chat sign-in row

Waiting for browser completion:

Chat sign-in waiting with Copy link and Cancel

After cancellation:

Cancelled chat sign-in with retry available

Saved status after reopening Accounts (the existing rating prompt is also visible):

Chat sign-in saved after reopening Accounts

@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1b-signin-service branch from 460f09b to 7bbc3dc Compare October 14, 2026 18:29
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b2-accounts-signin branch from 797b55a to 99416ac Compare October 14, 2026 18:29
@brennanb2025
brennanb2025 marked this pull request as ready for review October 14, 2026 18:52
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b1b-signin-service branch from 7bbc3dc to 2a71622 Compare October 15, 2026 10:52
@brennanb2025
brennanb2025 marked this pull request as draft October 15, 2026 11:04
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b2-accounts-signin branch from 99416ac to 12f4d3d Compare October 15, 2026 11:05
@brennanb2025
brennanb2025 changed the base branch from brennanb2025/agy-chat-5b1b-signin-service to brennanb2025/agy-chat-R2-runtime-remove-ui October 15, 2026 11:05
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-R2-runtime-remove-ui branch from 95372ef to aec9de8 Compare October 15, 2026 11:07
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b2-accounts-signin branch from 12f4d3d to 34a77ab Compare October 15, 2026 11:07
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-R2-runtime-remove-ui branch from aec9de8 to bc38930 Compare October 15, 2026 11:23
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b2-accounts-signin branch from 34a77ab to ae28388 Compare October 15, 2026 11:23
@OrcaWin

OrcaWin commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

QA (dev build at ae28388 on macOS): Antigravity chat sign-in placement — PASS

  • In Settings > Chat > Providers and Settings > AI Provider Accounts > Antigravity, the "Antigravity chats" sign-in row sits directly below the install row.
  • While the runtime isn't installed, Sign in is disabled and there's no second "not installed" explanation. Providers copy: "Chats use their own Antigravity sign-in, separate from your agy terminal account. Sign in once on this device." Accounts says "…separate from your agy account above…".
  • After install, Sign in is enabled and reads "Sign in" (not clicked during QA). After a remove, it goes back to disabled.

Providers, not installed
Accounts, not installed
Installing
Providers, installed
Accounts, installed

@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-R2-runtime-remove-ui branch from bc38930 to 339c58a Compare October 15, 2026 13:34
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-R2-runtime-remove-ui branch 3 times, most recently from e82466e to 217e01e Compare October 15, 2026 14:25
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b2-accounts-signin branch from ae28388 to 597b695 Compare October 15, 2026 14:25
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-R2-runtime-remove-ui branch from 217e01e to 28c2b42 Compare October 15, 2026 14:49
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b2-accounts-signin branch from 597b695 to 0cdf7e0 Compare October 15, 2026 14:49
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-R2-runtime-remove-ui branch from 28c2b42 to 24acd09 Compare October 15, 2026 14:51
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b2-accounts-signin branch from 0cdf7e0 to 08bf0ad Compare October 15, 2026 14:51
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-R2-runtime-remove-ui branch from 24acd09 to 9e9c277 Compare October 15, 2026 15:08
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b2-accounts-signin branch from 08bf0ad to b757319 Compare October 15, 2026 15:08
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-R2-runtime-remove-ui branch from 9e9c277 to d91fe6b Compare October 15, 2026 16:04
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b2-accounts-signin branch from b757319 to 23d746c Compare October 15, 2026 16:04
@OrcaWin

OrcaWin commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator

QA round 3 (fix round 1 checks), tested at b757319223 on macOS arm64. The app ran hidden with a throwaway profile, and it was never signed in to Google.

Step Result
Failed download text PASS: "Couldn't download Antigravity. Check your network connection or proxy, then try again." and Retry installation. No raw net:: code is shown.
Sign in during install PASS: Sign in is disabled while the download runs (it reads disabled=true during "Checking the download.")
Providers and Accounts sign-in state PASS: both show "Sign in on this device." with the same enabled state
Damaged copy after a restart FAIL as briefed. After a restart the damaged copy is gone, so no "This copy of Antigravity is damaged." appears. The startup reclaim() in managed-runtime-installation.ts deletes a release that isn't whole. Damaging the copy while the app runs: PASS (damaged text, trash button and Install in Settings, Accounts and the chat; Remove works). Repair from the chat: PASS.
Remove with a chat PASS: the dialog names "this computer", and the chat shows the install row with no "Send your message to try again." Not verified: the chat could not stay live without signing in, so "Removing…" never appeared.

Failed download
Providers during install
Accounts sign-in row
After restart, damaged copy already reclaimed
Damaged while running: Settings
Damaged while running: chat
Remove dialog
Chat after Remove

@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-R2-runtime-remove-ui branch from d91fe6b to 08ee20a Compare October 15, 2026 16:31
… Chat > Providers and Accounts

The chats' sign-in row now sits directly below the Antigravity install row,
in Settings > Chat > Providers and under the agy section of Accounts, with copy
that says it is separate from the agy account. Its button reads Sign in, Change
account or Retry sign-in by state, and stays visible but disabled while the host
has no runnable server; the install row above says why.
…er host and pick up one already running

Settings shows the sign-in row under Chat > Providers and under Accounts at once; each kept its own
flow, so starting one silently cancelled the other and a sign-in nobody watched could not be seen or
cancelled. One entry per host now holds the flow and the saved sign-in for every row, follows the
host's Link poll while a row shows it, and on mount adopts the running flow the host names. Sign in
also waits while an install or Remove runs, read from the same install status.
…ign-in stays cancellable, and only a Remove (not an Update) holds Sign in
…ugh the same loop as install, so an idle page sees another device's sign-in
…tore; Install and Remove wait for a running sign-in, and Sign in waits for the host's answer

Both stores now follow the host through one generic subscription store
(snapshot, then a frame per newer revision, resubscribe with backoff on loss),
replacing the sign-in store's long-poll of a method the host no longer has.
While a sign-in runs, Install, Update and Remove are disabled (Cancel stays).
The sign-in row keeps Sign in disabled until the host answers, says when the
status could not be read instead of showing signed out, and sends one start or
cancel at a time.
…tigravity chat sign-in

While a chat sign-in waits on the browser, its row shows a field for the address of the last page after signing in, for when that page doesn't load because the browser is on another computer than the host. Continue sends it to the host, which passes it on to Antigravity; the host's refusal shows under the field. With that, remote hosts offer chat sign-in on the Accounts page too, and the row reads "Finishing sign-in…" while the host completes it.
…he new subscription export

The sign-in row tests shared one fake host across every owner, so the first test's finished sign-in made the next row show "Change account" instead of "Sign in", and rows left mounted after that failure doubled the later tests' matches. Each owner now has its own fake host behind the subscription, and every test cleans up its render. The Antigravity accounts section test's client mock also lacked the sign-in exports the status store now reads at import.
…ign-in answer

The host no longer reports whether a sign-in file exists; it reports what the
server last answered (signed in, signed out, or not known yet), and a running
sign-in started by another client arrives without its id.

The row now reads that answer:
- "Signed in on {host}." or "Not signed in on {host}."; no line until the server
  has answered, with Sign in still enabled. Change account shows only when the
  server said signed in.
- A sign-in another client is running reads "Sign-in is in progress in another
  client.", with Sign in disabled and no Cancel, copy link or paste field, since
  only the client that started it can act on it.
- "Finishing sign-in..." also follows a browser sign-in while the host checks it.
- Cancel and paste send only this client's own sign-in; the host's refusals
  show under the row.
…gs, not what the agent printed

The notice read "Sign in to Antigravity. The agent asked to sign in in a
browser": the second sentence was Orca's own log text for the sign-in prompt the
agent printed, shown as if it were the agent's words, and the notice never said
where to sign in.

The connection now closes with a sign-in prompt error whose message stays in the
logs, so the chat shows only Orca's sign-in sentence. Antigravity gets its own
sentence, in the shape Claude's already has: "Antigravity isn't signed in. Sign
in under Settings → Accounts → Antigravity." Other agents' sign-in words, and
the agent's own words in a sign-in answer, are unchanged.
…he signed-out notice

A signed-out Antigravity chat still read "... The agent asked to sign in in a
browser". The connection closes with a sign-in prompt error whose message is
Orca's log text, but the request wrapper and session setup re-typed every
sign-in answer by copying its message into a new error. The copy lost the
sign-in prompt type, so its message was quoted as the agent's own words.

Re-typing now keeps a sign-in prompt close as it is, at both the request
wrapper and session setup, so the notice says only where to sign in.
…ce a sign-in is cancelled or timed out

After a cancelled or timed-out sign-in the row kept reading "Sign-in
cancelled." even when the host had answered that this computer is not signed
in. A finished sign-in now only stands in until the host answers; then the row
reads "Not signed in on <host>." or "Signed in on <host>.". A running sign-in
still shows its step.
…t the browser's URL bubble

The paste field is a URL input, so the browser's own "Please enter a URL."
check ran before Orca could explain what was wrong with the address. The form
now skips the browser's check and shows the host's refusal sentence.
…w like the install row

The sign-in row sat in its own bordered box, the same bright outline the install
row lost when it became a single grey status line. It now has no box: a
medium-weight "Antigravity chats" title, the description and the grey status
line under it (errors inline in the destructive colour), and its action at the
row's right end. Sign in and Retry are primary buttons, so they stand out like
Install; Change account stays outline and Cancel stays ghost. The paste-the-
address form sits under the row without a box. Copy, keys and behaviour are
unchanged.
@brennanb2025
brennanb2025 force-pushed the brennanb2025/agy-chat-5b2-accounts-signin branch from c7fc895 to 7a12669 Compare October 18, 2026 17:47
@brennanb2025
brennanb2025 changed the base branch from brennanb2025/agy-chat-R2-runtime-remove-ui to main October 18, 2026 17:47
@coderabbitai

coderabbitai Bot commented Oct 18, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

📝 Walkthrough

The changes add distinct handling for ACP sign-in prompts and omit their internal wording from turn-failure detail. They add host-backed Antigravity chat sign-in actions and status tracking, with controls in account and provider settings. Managed-runtime install and removal actions are gated while sign-in runs. Antigravity-specific not-signed-in guidance and sign-in flow translations are added.

Priority: ➖ Normal

Merge Risk: 🔵 Low · up to 9b0de

Removing a runtime during sign-in can show a failed operation, though the runtime remains intact. This bounded issue can be fixed before merge or accepted for follow-up.

Pre-merge checks: Passed 4 · Failed 1

Failed Failed checks: 1 warning

Check name Status Explanation Resolution
Docstring Coverage Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 42 functions across 25 files. (6 skipped:… Write docstrings for the functions missing them to satisfy the coverage threshold.
Passed Passed checks: 4 passed
Check name Status Explanation
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Title check Passed The title clearly and concisely describes the primary change: adding Antigravity chat sign-in from the Accounts settings.
Description check Passed The description is complete and closely follows the repository template. It explains the user impact, implementation, rationale, maintainer issue exception, visual proof, testing, review notes, compat…
Full details: Description check

Explanation

The description is complete and closely follows the repository template. It explains the user impact, implementation, rationale, maintainer issue exception, visual proof, testing, review notes, compatibility considerations, and checklist status.

Full details: Docstring Coverage

Explanation

Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 42 functions across 25 files. (6 skipped: 6 unsupported.)

Resolution

Write docstrings for the functions missing them to satisfy the coverage threshold.

  • Fix all pre-merge checks with AI
✨ Finishing Touches: 💡 1
📝 Generate docstrings: 💡
  • Commit to this branch
  • Create a new PR
  • 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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: e9d15406-a904-4e9c-9f0d-2d705ce09228
📥 Commits

Reviewing files that changed from the base of the PR and between 37a9eaa and 93f9795.

📒 Files selected for processing: 27
  • src/main/acp/acp-agent-connection.ts
  • src/main/acp/acp-errors.ts
  • src/main/acp/acp-response-settlement.ts
  • src/main/acp/acp-session-setup.ts
  • src/main/acp/acp-structured-sign-in.test.ts
  • src/main/acp/acp-turn-failures.ts
  • src/renderer/src/components/managed-runtime/ManagedRuntimeInstallRow.tsx
  • src/renderer/src/components/native-chat/agent-session-availability-words-text.ts
  • src/renderer/src/components/settings/AntigravityAccountsSection.test.tsx
  • src/renderer/src/components/settings/AntigravityAccountsSection.tsx
  • src/renderer/src/components/settings/AntigravityChatSignInRow.test.tsx
  • src/renderer/src/components/settings/AntigravityChatSignInRow.tsx
  • src/renderer/src/components/settings/NativeChatProvidersSetting.tsx
  • src/renderer/src/i18n/en-runtime-required.json
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
  • src/renderer/src/runtime/antigravity-chat-sign-in-status.ts
  • src/renderer/src/runtime/managed-runtime-install-status.ts
  • src/renderer/src/runtime/revisioned-host-state-store.ts
  • src/renderer/src/runtime/runtime-antigravity-accounts-client.ts
  • src/shared/agent-session-availability.test.ts
  • src/shared/agent-session-availability.ts
  • src/shared/agent-session-failure-copy.ts

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 6 remain after this review.

Comment on lines +122 to +148
/** Only the client that started a flow is told its id, so only it can cancel or complete it. */
const ownFlowId = (owner: RuntimeClientTarget): string | null => flowOf(owner)?.flowId ?? null

export async function cancelAntigravityChatSignIn(owner: RuntimeClientTarget): Promise<void> {
const flowId = ownFlowId(owner)
if (flowId) {
await callAntigravityChatSignIn(owner, 'Cancel', { flowId }).catch(
(cause: unknown) => note(localFor(owner), { error: message(cause) })
)
}
}

/** Sends the address the browser ended on to the host, for a browser on another computer.
* Resolves to the host's refusal, empty when it gave no reason, or null once it took it. */
export async function completeAntigravityChatSignIn(
owner: RuntimeClientTarget,
callbackUrl: string
): Promise<string | null> {
const flowId = ownFlowId(owner)
if (!flowId) {
return ''
}
return callAntigravityChatSignIn(owner, 'Complete', { flowId, callbackUrl }).then(
() => null,
message
)
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '1,190p' src/renderer/src/runtime/antigravity-chat-sign-in-status.ts
sed -n '200,315p' src/renderer/src/components/settings/AntigravityChatSignInRow.tsx

Repository: stablyai/orca

Length of output: 10998


Fence cancellation errors to the flow that started the request.

cancelAntigravityChatSignIn records every rejected Cancel RPC in the host-local notes. If flow A is replaced by flow B before the rejection arrives, the error remains in the shared notes and the row displays it for flow B. Check that the flow is still current before recording the error.

Suggested fix
-    await callAntigravityChatSignIn(owner, 'Cancel', { flowId }).catch(
-      (cause: unknown) =&gt; note(localFor(owner), { error: message(cause) })
-    )
+    await callAntigravityChatSignIn(owner, 'Cancel', { flowId }).catch((cause: unknown) =&gt; {
+      if (flowOf(owner)?.flowId === flowId) {
+        note(localFor(owner), { error: message(cause) })
+      }
+    })

…gn-in area

The Providers row's status line now says only the install state. Update,
Reinstall and Remove move into a ⋯ menu beside the switch, shown for a copy
on disk; Remove keeps its confirmation. Sign-in moves into a quiet inset
area under the row, shown once a copy runs, with one sentence and one
action per state. Accounts keeps its sign-in row; its install row gets the
same menu.
A damaged copy's repair is the next step, so it sits where Install does instead of inside the ⋯ menu, which then offers only Remove.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1


ℹ️ Review info
⚙️ Run configuration
  • Configuration used: Repository UI
  • Review profile: CHILL
  • Plan: Advanced
  • Run ID: 5b21c7ef-9658-4b06-9ecc-211ed176ac94
📥 Commits

Reviewing files that changed from the base of the PR and between 93f9795 and 9b0de60.

📒 Files selected for processing: 16
  • src/renderer/src/components/managed-runtime/ManagedRuntimeActionsMenu.tsx
  • src/renderer/src/components/managed-runtime/ManagedRuntimeInstallRow.tsx
  • src/renderer/src/components/managed-runtime/ManagedRuntimeRemoveButton.tsx
  • src/renderer/src/components/managed-runtime/ManagedRuntimeRemoveDialog.tsx
  • src/renderer/src/components/managed-runtime/managed-runtime-install-view.test.ts
  • src/renderer/src/components/managed-runtime/managed-runtime-install-view.ts
  • src/renderer/src/components/settings/AntigravityAccountsSection.tsx
  • src/renderer/src/components/settings/AntigravityChatSignInRow.tsx
  • src/renderer/src/components/settings/AntigravityProviderSignInArea.tsx
  • src/renderer/src/components/settings/NativeChatProvidersSetting.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/zh.json
💤 Files with no reviewable changes: 1
  • src/renderer/src/components/managed-runtime/ManagedRuntimeRemoveButton.tsx
🚧 Files skipped from review as they are similar to previous changes: 7
  • src/renderer/src/components/settings/AntigravityAccountsSection.tsx
  • src/renderer/src/i18n/locales/en.json
  • src/renderer/src/i18n/locales/ko.json
  • src/renderer/src/i18n/locales/es.json
  • src/renderer/src/i18n/locales/ja.json
  • src/renderer/src/i18n/locales/fr.json
  • src/renderer/src/i18n/locales/zh.json

Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.

Comment on lines +59 to +67
{onRemove === null ? null : (
<ManagedRuntimeRemoveDialog
agentLabel={agentLabel}
host={props.host}
open={confirming}
onOpenChange={setConfirming}
onRemove={onRemove}
/>
)}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win

🔎 Supported by static analysis

🏁 Script executed:

sed -n '1,180p' src/renderer/src/components/managed-runtime/ManagedRuntimeActionsMenu.tsx
sed -n '1,130p' src/renderer/src/components/managed-runtime/ManagedRuntimeRemoveDialog.tsx
sed -n '50,175p' src/renderer/src/components/managed-runtime/ManagedRuntimeInstallRow.tsx
rg -n 'signInRunning|onRemove|removeManagedRuntime|remove.*sign.in|sign.in.*remov' src/renderer/src/components/managed-runtime src/renderer/src/runtime src/main

Repository: stablyai/orca

Length of output: 16505


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- sign-in and removal symbols ---'
rg -n -F --glob '*.{ts,tsx}' \
  -e 'signInRunning' \
  -e 'removeManagedRuntime' \
  -e 'removeRuntime' \
  -e 'ManagedRuntimeInstallRow' \
  -e 'Install and Remove wait' \
  src/renderer/src src/main shared || test "$?" -eq 1
printf '%s\n' '--- managed runtime status ---'
sed -n '1,180p' src/renderer/src/runtime/managed-runtime-install-status.ts
printf '%s\n' '--- launch/host receiver candidates ---'
sed -n '1,240p' src/main/acp/acp-launch-specs.ts
rg -n -F --glob '*.{ts,tsx}' \
  -e 'installing' \
  -e 'sign-in' \
  -e 'signIn' \
  -e 'removeManagedRuntime' \
  -e 'removeRuntime' \
  src/main src/renderer/src shared | head -n 240

Repository: stablyai/orca

Length of output: 41247


🏁 Script executed:

rg -n -F --glob '*.{ts,tsx}' -e 'signInRunning' -e 'removeManagedRuntime' -e 'removeRuntime' -e 'Install and Remove wait' src/renderer/src src/main shared || test "$?" -eq 1
sed -n '1,180p' src/renderer/src/runtime/managed-runtime-install-status.ts
sed -n '1,240p' src/main/acp/acp-launch-specs.ts
rg -n -F --glob '*.{ts,tsx}' -e 'installing' -e 'sign-in' -e 'signIn' -e 'removeManagedRuntime' -e 'removeRuntime' src/main src/renderer/src shared | head -n 240

Repository: stablyai/orca

Length of output: 41045


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- exact managed runtime RPC bindings ---'
rg -n -F --glob '*.ts' -e 'managedRuntime.remove' -e 'managedRuntime.install' -e 'managedRuntime.subscribe' -e 'managedRuntime.cancel' src || test "$?" -eq 1
printf '%s\n' '--- managed runtime declarations and receivers ---'
rg -n -F --glob '*.ts' -e 'ManagedRuntimeInstallState' -e 'managed-runtime-install' -e 'managedRuntime' src/main src/shared src/renderer/src || test "$?" -eq 1
printf '%s\n' '--- likely host runtime files ---'
find src/main -maxdepth 4 -type f \( -iname '*managed*runtime*' -o -iname '*runtime*install*' -o -iname '*runtime*handler*' \) -print

Repository: stablyai/orca

Length of output: 18759


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- managed runtime RPC receiver ---'
sed -n '1,190p' src/main/runtime/rpc/methods/managed-runtime-install.ts
printf '%s\n' '--- launch gate declarations and implementation ---'
rg -n -F --glob '*.ts' -e 'export type AcpLaunchGate' -e 'class' -e 'run(' -e 'ANTIGRAVITY_LAUNCH_GATE' src/main/acp src/main/antigravity | head -n 220
printf '%s\n' '--- gate and antigravity account source ---'
sed -n '1,220p' src/main/acp/acp-launch-gate.ts
rg -n -F --glob '*.ts' -e 'ANTIGRAVITY_LAUNCH_GATE' -e 'launchGate' src/main/antigravity src/main/acp
printf '%s\n' '--- managed runtime tests around removal ---'
sed -n '1,230p' src/main/runtime/rpc/methods/managed-runtime-install.test.ts

Repository: stablyai/orca

Length of output: 22201


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- managed runtime RPC receiver ---'
sed -n '1,190p' src/main/runtime/rpc/methods/managed-runtime-install.ts
printf '%s\n' '--- launch gate declarations and implementation ---'
rg -n -F --glob '*.ts' -e 'export type AcpLaunchGate' -e 'ANTIGRAVITY_LAUNCH_GATE' -e 'launchGate' src/main/acp src/main/antigravity
printf '%s\n' '--- gate implementation ---'
sed -n '1,220p' src/main/acp/acp-launch-gate.ts
printf '%s\n' '--- managed runtime tests around removal ---'
sed -n '1,230p' src/main/runtime/rpc/methods/managed-runtime-install.test.ts

Repository: stablyai/orca

Length of output: 17099


🏁 Script executed:

set -o pipefail
printf '%s\n' '--- managed runtime installation removal flow ---'
sed -n '1,280p' src/main/node-runtime/managed-runtime-installation.ts
printf '%s\n' '--- removal status rendering ---'
rg -n -F --glob '*.ts' -e 'removeFailed' -e 'Removal failed' -e 'remove' src/renderer/src/components/managed-runtime src/shared/managed-runtime-install.ts
sed -n '1,230p' src/renderer/src/components/managed-runtime/managed-runtime-install-view.ts

Repository: stablyai/orca

Length of output: 17251


Keep Remove disabled while sign-in runs.

The dialog can remain open when disabled changes. Its Remove button then starts a removal operation. The Antigravity host gate rejects that operation while sign-in owns the gate, so the runtime is kept but the operation is recorded as failed instead of waiting as documented.

🐛 Suggested fix
         <ManagedRuntimeRemoveDialog
           agentLabel={agentLabel}
           host={props.host}
           open={confirming}
+          disabled={disabled}
           onOpenChange={setConfirming}
           onRemove={onRemove}
         />

In ManagedRuntimeRemoveDialog.tsx:

   onRemove: () => void
+  disabled?: boolean
 }): React.JSX.Element {
...
           <Button
             variant="destructive"
+            disabled={props.disabled}
             onClick={() => {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants