Repository navigation
Conversation
|
Verification update:
Scoped verdict: Approve for macOS native detection and the explicit-save UI, stacked on #21797. Windows/Linux native backends and remote account scopes remain unverified. |
There was a problem hiding this comment.
ℹ️ Minor suggestions only — one design question inline, plus a test nit.
Reviewed changes
- New
detectedAccountfield —AntigravityAccountStatenow carries the live native credential's{ id, email, subject, authMethod }when that blob is not saved in the vault. - Inline active match in
listAccounts— the service reads the credential directly and returnsdetectedAccountwhencurrent && !active, replacing theknownActiveAccountcall;activeAccountIdsemantics are unchanged. - Renderer detected row — a read-only dashed row shows the detected identity and explains that adding is required to enable switching.
- Web stub, i18n, tests — web preload returns
detectedAccount: null; theantigravityDetectedcopy is added; new service and renderer tests cover the detected row.
I re-ran the changed tests plus tc:node, tc:web, and the four localization gates at 89c02f7 — all pass.
ℹ️ Nitpicks
src/main/antigravity/native-account-service.test.ts:46—toMatchObject({ authMethod: 'consumer' })would also pass with a wrongid/email/subject; asserting the full detected object (or at leastemail/subject) pins the shape. The renderer test also has no case asserting the row is absent whendetectedAccountisnull.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| detectedAccount: | ||
| current && !active | ||
| ? { | ||
| id: accountId(current.contents), | ||
| email: current.identity?.email ?? null, | ||
| subject: current.identity?.subject ?? null, | ||
| authMethod: current.authMethod | ||
| } | ||
| : null |
There was a problem hiding this comment.
detectedAccount is decided only by accountId(current.contents) failing to match a saved account, and accountId hashes the whole credential blob. That blob holds time-limited OAuth material (token.access_token, id_token), so if agy rewrites it on refresh, an account already saved in the vault will appear here as a second "detected" row and activeAccountId will reset to null. Is the keychain blob byte-stable across refreshes? If not, basing the "already saved" decision on the stable identity.subject/email (and/or deduping in addCurrentAccount) would avoid the duplicate.
Technical details
# Content-hash identity can misreport a saved account as detected
## Affected sites
- `src/main/antigravity/native-account-service.ts:63-65` — `active` matched by `account.id === accountId(current.contents)`.
- `src/main/antigravity/native-account-service.ts:70-78` — `detectedAccount` derived from `!active`.
- `src/main/antigravity/native-account-service.ts:99` — `addCurrentAccount` dedupes by content hash, so a changed blob appends a second record instead of updating the existing one.
## Required outcome
- A saved account whose native blob has changed should not be presented as both a vault row and a "detected" row.
## Suggested approach (optional)
- Base the "already saved" check on the identity the codec already extracts (`identity.subject`, falling back to `identity.email`), keeping the content hash for exact-credential switching/verification.
- Or confirm agy never rewrites the keychain blob after the initial sign-in and note that assumption next to `accountId`.
## Open questions for the human (optional)
- Does agy rewrite the `gemini`/`antigravity` keychain item when it refreshes the access/id token? All repo credential fixtures are synthetic, so this is not verifiable here.|
Independent verification (2026-09-20):
Verdict: approve scoped to macOS native detection/UI. Explicit save remains required; Windows/Linux/remote account scopes remain unverified. No merge performed. |
|
ELI5: when agy is already signed in on macOS, Orca can show which account it found instead of making the user guess. The identity is redacted in proof, and saving/switching remains explicit. This verdict covers native macOS detection/UI only. |
21ed602
into
nwparker/agy-account-removal-guard

What changed
When agy is already signed in on this computer, Orca now shows the detected account in AI Provider Accounts before it is saved to Orca's account vault. The row is read-only and explains that clicking Add current agy account is required to enable switching and persistence.
The native service reports this identity without writing credentials. Saving it still requires the user's explicit action. The web preload stub and renderer types now carry the new field, and a renderer test covers the detected row.
Why this approach
The agy credential is already present in the native credential store, so Orca can identify the current account safely. Displaying it immediately removes the confusing empty state while keeping vault persistence opt-in.
Verification
AntigravityAccountsSection.test.tsxpassed.pnpm tc:nodepassed.pnpm tc:webpassed.pnpm run check:code-quality:changed origin/mainpassed with 0 new findings.Orca: nwparker/agy-detected-account-row;window.api.antigravityAccounts.list()returned a redacted detected identity and the settings surface rendered successfully. No credentials or raw blobs were recorded.Stacked on #21797.