Repository navigation
Conversation
|
This comment has been minimized.
This comment has been minimized.
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (3)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review. 📝 WalkthroughWalkthroughThe change adds Antigravity quota fetching through the Priority: ➖ Normal Merge Risk: ⚪ Minimal · up to Antigravity quota support has no established merge-blocking issue in the available evidence. The settings expansion tests cover the intended behavior; normal checks remain appropriate before merging. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The new quota read uses a fixed command and keeps sign-in under the CLI’s control. Cancellation, bounded output, and fallback behavior limit failures. No security regression was established, but CLI compatibility and shutdown behavior are not fully verified. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
Hardening Proposals
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 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.
Actionable comments posted: 2
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 9948c2a5-0bc8-442e-b0da-042ce61d3b65
📒 Files selected for processing (34)
docs/site/content/docs/agents/usage-tracking.mdxsrc/main/rate-limits/antigravity-quota-fetcher.test.tssrc/main/rate-limits/antigravity-quota-fetcher.tssrc/main/rate-limits/antigravity-quota-parser.test.tssrc/main/rate-limits/antigravity-quota-parser.tssrc/main/rate-limits/antigravity-usage-mirror.test.tssrc/main/rate-limits/antigravity-usage-mirror.tssrc/main/rate-limits/rate-limit-service-test-harness.tssrc/main/rate-limits/service-account-target-selection.test.tssrc/main/rate-limits/service-antigravity-usage.test.tssrc/main/rate-limits/service-cursor-usage.test.tssrc/main/rate-limits/service-inactive-account-previews.test.tssrc/main/rate-limits/service-live-claude-usage.test.tssrc/main/rate-limits/service-minimax-usage.test.tssrc/main/rate-limits/service-refresh-orchestration.test.tssrc/main/rate-limits/service-window-activation.test.tssrc/main/rate-limits/service/service-full-cycle-application.tssrc/main/rate-limits/service/service-full-cycle-preparation.tssrc/renderer/src/components/settings/AccountsPane.test.tsxsrc/renderer/src/components/settings/AccountsPane.tsxsrc/renderer/src/components/settings/AntigravityAccountsSection.tsxsrc/renderer/src/components/settings/accounts-pane-provider-setting-sections.tsxsrc/renderer/src/components/settings/accounts-search.tssrc/renderer/src/components/status-bar/UsageRosterPanel.test.tsxsrc/renderer/src/components/status-bar/UsageRosterPanel.tsxsrc/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/usage-provider-settings-target.tssrc/renderer/src/components/status-bar/use-status-bar-controller.tssrc/renderer/src/i18n/en-runtime-required.jsonsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/shared/node-cli-command-resolution.tssrc/shared/rate-limit-types.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
Important
Swapping the Gemini accounts section for the Antigravity one also removes the only control that writes geminiCliOAuthEnabled, which leaves the standalone Gemini usage provider unenablable for anyone who has not already opted in. See the inline note on AccountsPane.tsx; this needs a scope decision before merge.
Reviewed changes
- Antigravity quota reader:
fetchAntigravityRateLimitsrunsagy --print /quotathroughrunProcess(20s timeout, bounded output, abort-aware), andparseAntigravityQuotaRowsmaps the tab-separated CLI rows into used-percent windows. - Provider precedence:
resolveAntigravityRateLimitsprefers the CLI read and keeps a successful Gemini snapshot as fallback; the full-cycle fetch adds Antigravity to the mainPromise.allSettledtuple. - Settings: the experimental Gemini OAuth switch is replaced by a "Gemini (Antigravity)" section with
agysign-in copy and a refresh button; search keywords and the en/es catalogs are updated. - Status bar: a checked Antigravity item is now a durable visibility signal independent of Gemini OAuth, and the verbose roster narrows Antigravity to its Gemini family windows while the detail panel keeps every bucket.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| matchesSettingsSearch(searchQuery, getAccountsGeminiSearchEntries()) ? ( | ||
| <AntigravityAccountsSection key="antigravity" /> | ||
| ) : null, |
There was a problem hiding this comment.
This swap drops renderGeminiAccountsSection, which held the only Switch bound to settings.geminiCliOAuthEnabled — a repo-wide search finds no other writer of that setting. The standalone gemini provider, its status-bar item, and the usage-tracking docs all still exist, and fetchGeminiRateLimits returns unavailable while the flag is false, so new users have no way to turn Gemini usage on. If retiring the Gemini provider is intended, its fetch/status-bar/docs should go too; otherwise keep its toggle.
Technical details
# Removed the only `geminiCliOAuthEnabled` control
## Affected sites
- `src/renderer/src/components/settings/AccountsPane.tsx:382-384` — Gemini section replaced by `AntigravityAccountsSection`; the deleted `renderGeminiAccountsSection` carried the `settings.geminiCliOAuthEnabled` switch.
- `src/main/rate-limits/gemini-usage-fetcher.ts:206` — returns `unavailable`/`'Gemini CLI OAuth is disabled in settings'` whenever the flag is false.
- `src/renderer/src/components/status-bar/status-bar-provider-visibility.ts:105-106` — `hasUsageProviderSettingsForProvider('gemini')` still keys on the flag.
## Required outcome
- Either restore a user-reachable control for `geminiCliOAuthEnabled`, or fully retire the `gemini` provider (fetch, visibility, status-bar item, docs) so no feature depends on a setting nothing can set.
## Open questions for the human
- Is the standalone Gemini usage provider intentionally deprecated in favor of the Antigravity CLI read, or is the Gemini status-bar item meant to stay configurable?There was a problem hiding this comment.
Addressed in e3e5a35: the Gemini CLI OAuth switch is restored inside the Antigravity section (expandable, searchable).
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| p.provider === 'antigravity' | ||
| ? allSections.filter( | ||
| (section) => | ||
| section.label === 'Gemini Models · 5h' || section.label === 'Gemini Models · Weekly' |
There was a problem hiding this comment.
These two literal labels duplicate PRIMARY_FAMILY and shortWindowLabel from antigravity-quota-parser.ts across the main/renderer boundary. If the CLI's family text or the label formatting changes, this filter silently empties and the verbose roster falls back to showing the Claude/GPT rows it is meant to hide. Selecting by window.windowMinutes plus a shared family constant would keep the summary stable.
There was a problem hiding this comment.
Addressed in e3e5a35: the roster now derives labels from the shared getAntigravitySummaryBuckets helper instead of duplicating the family/label strings.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| result = await runProcess({ | ||
| program: command, | ||
| args: ANTIGRAVITY_QUOTA_ARGS, | ||
| cwd: resolveHiddenRateLimitPtyCwd(), |
There was a problem hiding this comment.
resolveHiddenRateLimitPtyCwd() throws when the resolved directory is root-like, and it is called outside the try block, so the fetch can reject instead of returning a ProviderRateLimits. Promise.allSettled in the service absorbs that, but the function's direct-call contract (and its unit tests) assume it always resolves — moving this call inside the try keeps it total.
There was a problem hiding this comment.
Addressed in e3e5a35: resolveHiddenRateLimitPtyCwd() is now evaluated inside the try, with a regression test covering the throw.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
ℹ️ No critical issues — the new commit cleanly addresses the prior review findings; one stale test comment inline.
Reviewed changes
This incremental re-review covered commit e3e5a35 ("fix: address Antigravity quota review findings"), the delta on top of the initial ac0a3dd. All three prior inline findings and CodeRabbit's ENOENT note are addressed.
- Restored the Gemini CLI OAuth control: the switch that writes
geminiCliOAuthEnabledis back, now a searchable, collapsible<details>inside the Antigravity section, covered by a new component test and an AccountsPane search test. - Shared the summary-bucket logic: extracted
getAntigravitySummaryBucketsplus the family/window constants intosrc/shared/antigravity-usage-windows.ts, consumed by both the parser andUsageRosterPanel, removing the duplicated literal labels. - Made the Antigravity CLI read total:
resolveHiddenRateLimitPtyCwd()now runs inside thetry, and a structurederror.code === 'ENOENT'replaces themessage.includes('ENOENT')check — both backed by new fetcher tests. - Published Antigravity independently: its fetch is lifted out of the main
Promise.allSettledtuple intoantigravityResultPromiseand applied in a deferredupdateState, with a regression test asserting other providers publish while the CLI read is pending. - Reworked Antigravity visibility:
antigravityUsageConfiguredno longer counts toward the globalhasUsageProviderSettings, andgetVisibleUsageProviderhides anunavailableAntigravity so the setup CTA returns after a not-installed result. - Session fallback:
sessionnow falls back to the tightest available bucket when the Gemini family is absent.
Local focused runs: main-side fetcher/parser/mirror/service tests (31) and renderer roster/section/visibility/AccountsPane tests (57) all pass.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| // Why: a checked Antigravity item plus a detected CLI is a configured | ||
| // provider; its `/quota` read does not need the Gemini OAuth opt-in. |
There was a problem hiding this comment.
This rationale describes hasUsageProviderSettingsForProvider, but it now sits above hasUsageProviderSettings, which intentionally returns false for an Antigravity-only configuration. Reword it to match the assertion so a future maintainer doesn't "fix" it to true.
There was a problem hiding this comment.
Fixed in 161570c. The comment now explains that CLI detection does not prove a signed-in account and configuration depends on the quota snapshot, matching the false assertion.
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes
This incremental re-review covered commit 161570c ("fix: preserve Gemini panel state across settings search"), the delta on top of the prior pullfrog review at e3e5a35.
- Fixed the legacy Gemini credential panel's expansion state: the
<details>no longer usesonToggle; it is fully controlled byopen={legacySettingsExpanded || Boolean(model.searchQuery)}with a<summary>onClickthat callsevent.preventDefault()and toggles local state only when not searching, so a search-forced open no longer overwrites what the user chose. - Added regression coverage: a new test round-trips the panel through a search query (with and without a prior manual expand) and asserts the pre-search state is restored after the query clears.
- Corrected a stale test comment: the rationale above
hasUsageProviderSettings({ antigravityUsageConfigured: true }) === falseinstatus-bar-provider-visibility.test.tsnow describes the correct function.
The new behavior is covered by passing focused tests (pnpm test src/renderer/src/components/settings/AntigravityAccountsSection.test.tsx, 4/4).
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏

ELI5
Orca can show an Antigravity quota that differs from the CLI, including missing its weekly limit. Read the CLI's own quota so users can see the Gemini 5-hour and weekly limits before starting work, with Claude/GPT limits available in the detail panel.
What Changed
agy --print /quotathrough the existing process runner, with cancellation, a 20-second timeout and bounded output. Parse model-family windows, remaining percentages and reset times.agysign-in instructions and refresh. Preserve the existing experimental Gemini CLI opt-in in an expandable, searchable control. Antigravity usage does not require that opt-in.Why
The old per-model Gemini read does not represent Antigravity's own quota windows. Calling its non-interactive quota command reuses the CLI's existing sign-in and avoids implementing OAuth/token extraction in Orca. The existing renderer bucket model can display these results without a new wire format.
Linked Issue
Partially addresses #22511: fixes the missing weekly/group-window display and uses the CLI as the quota source. The issue remains open for AI-credit balances; this PR does not claim to complete that requirement.
Related: #19587. This adds sign-in guidance and usage refresh, not an account identity/email inspector. AI-credit balances are outside this change.
Visual Proof
The original comparison uses the same four illustrative quota buckets to isolate the presentation change. These are actual Orca components rendered in a hidden Electron window over Playwright CDP; the before settings/roster components come from the base commit. The before sample is not a claim that the old Gemini fetch returned these four buckets.
Latest review revision (expanded compatibility control, detailed and compact summaries, with deliberately higher Claude/GPT usage to verify Gemini remains the summary):
Testing
On macOS arm64 with Node 24:
pnpm typecheck, the changed-code quality gate, localization catalogs, extraction and coverage pass.agy --print /quotareturned Gemini and Claude/GPT 5-hour and weekly rows; the app owner checked the running dev UI.pnpm lintwas attempted. After fixing this change's localization findings, it stops on existing import cycles in unchanged mobile transport/terminal files once mobile dependencies are installed. The focused quality gate passes.pnpm buildcompiles desktop/web/mobile assets, then fails in the unchanged macOS native helper packaging:lipo: no eligible inputs foundfor the expected arm64/x86_64 helper paths.pnpm testcompleted in 614s: 96,836 passed, 17 failed, 831 skipped, 1 expected failure, plus 1 unhandled error (10,095 files passed, 17 files failed, 103 skipped). Failures are in unchanged orchestration/mail, repo-icon, hook refresh, SSH Node-header and cross-version fixtures; the cross-version harness reports the missing localv1.4.190tag. No affected Antigravity/settings/roster tests failed. These broad-suite failures have not been independently reproduced on the base commit.To reproduce: sign in by running
agyon the machine running Orca, open Providers → Gemini (Antigravity), refresh usage, and enable Antigravity Usage in Appearance → Status Bar. Check that the detailed roster has the two Gemini windows and its detail panel also shows the Claude/GPT windows.AI Disclosure
Implemented and reviewed with OpenAI Codex (GPT-6). The contributor directed and manually checked the local UI.
Review
runProcess, command discovery and runtime-PATH helpers; no shell command interpolation. Windows and Linux runtime checks remain for CI/maintainer testing.Agent skill upstream boundary
docs/reference/agent-skill-sharing-upstream-boundary.mdand copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.Author
GitHub: @elashera. X/Twitter handle: not provided.
Notes
Review triage: the hidden working-directory resolver was already inside the fetcher try/catch; a regression test now verifies that boundary. No blanket docstring expansion was added because the repository asks for concise, non-obvious comments only.
The legacy successful-Gemini fallback remains; if the Antigravity CLI fails while Gemini succeeds, the displayed fallback can still differ from Antigravity. Parsing currently targets the installed CLI's tab-separated
/quotaoutput. No version bump or release changes.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)