Repository navigation
feat(rate-limits): real Antigravity quota + multi-account switcher - #7952
andrecristodev wants to merge 1 commit into
Conversation
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughThis change adds Antigravity across main-process rate-limit fetching, account storage, IPC, shared types, renderer state, status-bar UI, settings search entries, and localized copy. It introduces Antigravity credential reading and writing plus quota retrieval with fallback and retry behavior, adds Antigravity account management, and updates status-bar visibility and rendering to show the new provider. Tests were added and updated for keyring parsing, account storage, fetch behavior, and visibility logic. 🚥 Pre-merge checks | ✅ 3 | ❌ 2❌ Failed checks (2 warnings)
✅ Passed checks (3 passed)
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. Comment |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/src/components/settings/appearance-status-bar-search-entries.ts (1)
200-233: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winAntigravity i18n keys deviate from the SHA1 auto-key convention used by every sibling entry.
All other entries in this catalog use SHA1-hash keys (e.g.
9dc15020d7,51b0ccd6a2) generated by the localization sync tooling, but the new antigravity entries use hand-written keys (antigravityTitle,antigravityDescription,antigravityKeyword,antigravityGoogleKeyword). This could confusepnpm run sync:localization-catalog(e.g. failing to detect that "google" already has key51b0ccd6a2, resulting in a duplicate string with a different key).Consider running the sync tool to auto-key these entries like the rest of the catalog, and reuse the existing
51b0ccd6a2("google") key instead of introducingantigravityGoogleKeyword.Source: Learnings
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: ea1b2fed-cb1d-47a1-b56b-068b6fc200a8
📥 Commits
Reviewing files that changed from the base of the PR and between 8adfef4 and f1b7ec10dc13244307cc6754e2f4612b4ab59c95.
📒 Files selected for processing (27)
src/main/rate-limits/antigravity-fetcher.test.tssrc/main/rate-limits/antigravity-fetcher.tssrc/main/rate-limits/antigravity-keyring.test.tssrc/main/rate-limits/antigravity-keyring.tssrc/main/rate-limits/service.tssrc/main/runtime/rpc/methods/client-ui.tssrc/renderer/src/components/settings/appearance-status-bar-search-entries.tssrc/renderer/src/components/settings/appearance-status-bar-search.tssrc/renderer/src/components/settings/appearance-status-bar-system-entries.tssrc/renderer/src/components/status-bar/StatusBar.tsxsrc/renderer/src/components/status-bar/status-bar-agent-gating.tssrc/renderer/src/components/status-bar/status-bar-provider-visibility.test.tssrc/renderer/src/components/status-bar/status-bar-provider-visibility.tssrc/renderer/src/components/status-bar/tooltip.tsxsrc/renderer/src/components/status-bar/usage-error-copy.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/store/slices/rate-limits.tssrc/renderer/src/store/slices/ui.tssrc/renderer/src/web/web-preload-api.tssrc/shared/rate-limit-types.test.tssrc/shared/rate-limit-types.tssrc/shared/status-bar-defaults.tssrc/shared/types.ts
097f6d7 to
2f4a497
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🧹 Nitpick comments (1)
src/main/rate-limits/service.ts (1)
1310-1349: 🚀 Performance & Scalability | 🔵 Trivial | 🏗️ Heavy liftGate Antigravity account seeding behind CLI detection
refreshAntigravityAccounts()runs on every poll and still reads~/.gemini/oauth_creds.json, calls Google userinfo, and rewritesantigravity-accountseven when Antigravity is hidden becauseagyisn’t on PATH. Plumb the same detection state into the service and skip this refresh unless Antigravity is actually available.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
Run ID: f1751ee2-d229-4b18-a117-b3e537998b02
📒 Files selected for processing (19)
src/main/ipc/rate-limits.tssrc/main/rate-limits/antigravity-account-store.test.tssrc/main/rate-limits/antigravity-account-store.tssrc/main/rate-limits/antigravity-fetcher.test.tssrc/main/rate-limits/antigravity-fetcher.tssrc/main/rate-limits/antigravity-keyring.tssrc/main/rate-limits/service.tssrc/preload/api-types.tssrc/preload/index.tssrc/renderer/src/components/status-bar/StatusBar.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/store/slices/rate-limits.tssrc/renderer/src/web/web-preload-api.tssrc/shared/rate-limit-types.test.tssrc/shared/rate-limit-types.ts
✅ Files skipped from review due to trivial changes (1)
- src/renderer/src/i18n/locales/zh.json
🚧 Files skipped from review as they are similar to previous changes (5)
- src/renderer/src/store/slices/rate-limits.ts
- src/renderer/src/i18n/locales/ko.json
- src/renderer/src/i18n/locales/en.json
- src/renderer/src/i18n/locales/es.json
- src/renderer/src/i18n/locales/ja.json
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Replace the Gemini-mirrored Antigravity snapshot (stablyai#7996) with a real Code Assist ANTIGRAVITY fetch, OS keyring credential reads (agy), encrypted multi-account store, and a status-bar account switcher. Why: stablyai#7996 landed the status-bar slot but mirrored Gemini OAuth usage, which does not match Antigravity quota and requires Gemini CLI login. This upgrade reads agy/keyring credentials, groups family limits like the Antigravity app, and lets users switch Google accounts from Orca.
ec8460d to
8633aac
Compare
|
Rebased onto current
Ready for human review. If Actions are still pending for this fork PR, please approve the workflow runs. |
|
Reviewed current head P1 — account storage silently falls back to plaintext credentials when OS encryption is unavailable. I compiled the exact account-store module, supplied a temporary user-data directory and ELI5: on a machine without the required secret-storage service, adding an account silently saves reusable login credentials as readable text. File mode 0600 restricts readers but does not provide the claimed encryption. Account import should refuse persistence with an actionable error when secure storage is unavailable, rather than silently changing its storage guarantee; cover that path in tests. There is also a migration scope gap: I have not adopted the credential store or switcher. Native |
Summary
Follow-up to #7996 (Antigravity status-bar slot). That PR mirrored Gemini OAuth usage under
provider: 'antigravity'. This PR upgrades it to real Antigravity Code Assist quota, agy keyring credentials, and a multi-account switcher.Why this is still needed after #7996
ideType: ANTIGRAVITY~/.geminior OS keyring (gemini:antigravityfromagy)User-visible behavior
agyis on PATH and credentials exist, the Antigravity meter shows real remaining quota + reset window.agykeyring entry so the CLI follows).agyuntil the user signs out there.Security
safeStorage(0600store file).Testing
mainafter feat(status-bar): Antigravity usage status #7996typescript-apifixture errors remain elsewhere)Notes for reviewers
--bar; real data → show meter.X handle: andrecristodev
ELI5
Antigravity usage in the status bar uses real Code Assist quota and keyring credentials instead of only mirroring Gemini. You also get a multi-account switcher so Antigravity accounts are managed like other providers.