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
Let Antigravity Chat Change account start a fresh sign-in - #37998
Antigravity Chat’s Change account button can reuse the saved login immediately, so users never get a chance to choose an account. Change account now starts fresh Google authentication in a separate home, verifies the saved replacement in a second process, and replaces the working credential only after both processes have exited. Cancelling or failing keeps the old login and conversation history.
Settings > Accounts now shows the two Antigravity sign-ins as two cards, each with its own title outside the card, following the existing settings card pattern. "Antigravity Chat" holds the browser sign-in for Chat: Sign in with, Account (with Change account) and Runtime. "agy in the terminal" holds the saved agy logins, a hint for adding another account, and Refresh accounts, which only refreshes that list. Card descriptions replace the old info tooltips.
Ordinary Sign in retains its saved-login behavior. Personal and Gemini Enterprise credentials remain separate. Retry follows the operation accepted by the host, including after Settings reopens or a connection rejoins. A capability check preserves the request shape accepted by older hosts.
The current main branch has been merged once. Its saved-credential verification and launched-runtime identity remain intact. The review repair requires observed process exit, rather than treating kill delivery as exit, and reports credential-validation or credential-saving failures with actionable wording.
Tracked in STA-13466 and STA-11235. Supersedes the account-replacement work in #37439; thanks to @darkspock for the original investigation and implementation. The commits retain Co-authored-by: darkspock <extjmv@gmail.com>.
Validation: the code went through four review passes by independent Claude and Codex reviewers. The last pass reviewed the settings regrouping and found no correctness or performance issue; its localization and search findings are fixed in 2da564d. Current main is merged. Its new main-process blocking-helper ratchet flagged the old synchronous credential rename, so promotion is now an async rename. While the token moves, no other phase change (cancel, expiry or a failed callback forward) can relabel the flow, and success publishes the moment the rename lands; a fifth, focused Codex review caught and confirmed that race. remote-check passes 39 of 39 on the final commit. A new renderer test checks that Change account on a signed-in host requests an account replacement. The host tests already cover the rest: promotion happens only after the replacement is verified, for both auth methods, and the working login is kept on cancel, on an unusable credential and on a missing credential. Real native Antigravity QA on the earlier head passed:
saved sign-in and a fresh, isolated replacement waiting flow
cancellation with the token unchanged
Settings reopen and renderer reload
retry and cancel
separate Enterprise forms
the old chat continuing after a graceful restart
The common provider-settings pattern reruns authentication in the same home for Change account, so a cached credential can satisfy it. That is the bug this PR fixes, which is why the isolated replacement home stays. Accepted gap: no real end-to-end replacement with a second Google account (no second account available); the tests above cover that path instead.
Screenshot of the new layout (component fixture with stubbed host state): two cards, Antigravity Chat above agy in the terminal.
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
No actionable comments were generated in the recent review.
Walkthrough
The sign-in flow now carries a signIn or changeAccount intent through RPC requests and published state. Account replacement uses a staged home and validates and commits the replacement token before publishing signed-in status. The renderer tracks start receipts and runtime IDs when reconciling host state. The settings UI separates Chat and terminal account groups, with updated labels and terminal account guidance.
Merge Risk: Low · previous review a2ebe
The account-replacement flow keeps the old credential until the new one is verified, and error messages for a missing credential are now specific. One narrow renderer race remains: if the host is unknown when sign-in starts and the runtime changes, a late response can briefly show a stale sign-in status and retry action. The risk is low and can be fixed in follow-up.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title names the main behavior change: Change account for Antigravity Chat now starts a fresh sign-in instead of reusing the saved login. The changeset implements this through the changeAccount int…
Description check
The description follows the template's main sections. It explains the change, the before and after behavior, the mechanism (isolated home, second-process verification, promotion after both processes e…
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 names the main behavior change: Change account for Antigravity Chat now starts a fresh sign-in instead of reusing the saved login. The changeset implements this through the changeAccount intent, a separate isolated home, and deferred credential promotion, so the title matches the main change.
Full details: Description check
Explanation
The description follows the template's main sections. It explains the change, the before and after behavior, the mechanism (isolated home, second-process verification, promotion after both processes exit), and the testing done, including native QA on an earlier head. It also states the accepted gap (no real second-account replacement). Several template sections are missing or incomplete: the ELI5 section, the 'Fixes #' issue link (it cites STA-13466 and STA-11235 instead of a linked issue), the Visual Proof section (only a fixture description, with no BEFORE/AFTER media), the Risk level, and the checklist items. The Review, Agent skill boundary, and AI Disclosure sections are also not filled in. Most of the required content is present, so the check passes, but these gaps should be closed before merge.
Resolution
Add an ELI5 summary. Replace the tracker references with a linked issue in the 'Fixes #' line if the project requires one. Attach BEFORE and AFTER visuals for the Settings regrouping and the Change account flow, or explain why they are not possible. Set the Risk level (the change touches credential promotion, so Medium or High is likely) and state how to back it out. Complete the Review and Agent skill boundary checkboxes, and tick the checklist items that apply.
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.
Files skipped from review as they are similar to previous changes: 1
src/renderer/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 4 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 0 remain after this review.
Carry the requested action through host sign-in and Retry, retaining staged replacement only for Change account.
Co-authored-by: darkspock <extjmv@gmail.com>
Preserve saved-login verification and both authentication methods while promoting only a verified replacement credential. Tracked in STA-13466 and STA-11235.
Co-authored-by: darkspock <extjmv@gmail.com>
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 2 remain after this review.
…r them in Chat (#44965)
* feat(antigravity): detect a host's API key and gcloud login, and offer them in Chat
Antigravity chats now find a Gemini API key, gcloud ADC and a saved Google
sign-in on the chat's host, rank them in the signed-out strip as one-click
switches, offer them when sign-in or a turn fails for want of a subscription
or with 401/403/quota, and show the method in use as a footer chip.
A saved Google token now reads as signed in after a restart (STA-15489).
* fix(antigravity): address review of Chat sign-in detection
Re-read detection before a switch so the restart confirm sees chats that
started since mount, refresh it on every sign-in revision, report each Google
method's saved sign-in, keep a saved project and location across switches,
start only Google sign-in when the method is unknown, and match only Google's
auth words for the refused offer.
* fix(antigravity): confirm before sign-in stops chats, and keep detection cheap
Google sign-in from the chooser goes through the same live-chat confirm as a
switch, and a failed detection read keeps the last answer and asks instead of
applying. Detection re-reads once per sign-in revision and reads the cached
shell environment, never a new login shell. The saved-sign-in seed waits for a
running flow.
* fix(antigravity): confirm when the re-read fails, and name the project gcloud keeps
A failed forced re-read can't rule out chats started since mount, so the
switch asks. A one-click gcloud switch keeps a saved project (never
Enterprise's), and detection names that same project. Detection reads the
same shell capture chats launch from, so a profile-exported key is seen
right after start.
* fix(antigravity): start Chat's Google sign-in with the sign-in intent
Main now requires a sign-in intent (#37998); the chooser and a switch to
Google sign-in start a plain sign-in.
* chore(antigravity): keep the transcript notice row under the line limit
The usage-limit row renders Antigravity's sign-in offer itself, and the
notice row passes only its block.
* fix(antigravity): show Chat's sign-in choices once a model listing finds it signed out
The listing session is often the first to reach a signed-out managed server,
but only a chat's own connection answered the host's sign-in state, so the
chooser waited for a failed send. The listing now answers it too.
* fix(native-chat): show one Sign in while Antigravity's sign-in strip is up
The strip already offers Google sign-in, so the failed message's row reads
plain instead of adding a second Sign in button.
* fix(antigravity): don't offer a Gemini key again after it was rejected
Once a chat moved off the API key that Google rejected, that failure row kept
offering to switch back to the same key. A rejected-key failure is now history
on any other method, as Google-only failures already were.
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.
Antigravity Chat’s Change account button can reuse the saved login immediately, so users never get a chance to choose an account. Change account now starts fresh Google authentication in a separate home, verifies the saved replacement in a second process, and replaces the working credential only after both processes have exited. Cancelling or failing keeps the old login and conversation history.
Settings > Accounts now shows the two Antigravity sign-ins as two cards, each with its own title outside the card, following the existing settings card pattern. "Antigravity Chat" holds the browser sign-in for Chat: Sign in with, Account (with Change account) and Runtime. "agy in the terminal" holds the saved agy logins, a hint for adding another account, and Refresh accounts, which only refreshes that list. Card descriptions replace the old info tooltips.
Ordinary Sign in retains its saved-login behavior. Personal and Gemini Enterprise credentials remain separate. Retry follows the operation accepted by the host, including after Settings reopens or a connection rejoins. A capability check preserves the request shape accepted by older hosts.
The current main branch has been merged once. Its saved-credential verification and launched-runtime identity remain intact. The review repair requires observed process exit, rather than treating kill delivery as exit, and reports credential-validation or credential-saving failures with actionable wording.
Tracked in STA-13466 and STA-11235. Supersedes the account-replacement work in #37439; thanks to @darkspock for the original investigation and implementation. The commits retain
Co-authored-by: darkspock <extjmv@gmail.com>.Validation: the code went through four review passes by independent Claude and Codex reviewers. The last pass reviewed the settings regrouping and found no correctness or performance issue; its localization and search findings are fixed in 2da564d. Current main is merged. Its new main-process blocking-helper ratchet flagged the old synchronous credential rename, so promotion is now an async rename. While the token moves, no other phase change (cancel, expiry or a failed callback forward) can relabel the flow, and success publishes the moment the rename lands; a fifth, focused Codex review caught and confirmed that race.
remote-checkpasses 39 of 39 on the final commit. A new renderer test checks that Change account on a signed-in host requests an account replacement. The host tests already cover the rest: promotion happens only after the replacement is verified, for both auth methods, and the working login is kept on cancel, on an unusable credential and on a missing credential. Real native Antigravity QA on the earlier head passed:The common provider-settings pattern reruns authentication in the same home for Change account, so a cached credential can satisfy it. That is the bug this PR fixes, which is why the isolated replacement home stays. Accepted gap: no real end-to-end replacement with a second Google account (no second account available); the tests above cover that path instead.
Screenshot of the new layout (component fixture with stubbed host state): two cards, Antigravity Chat above agy in the terminal.