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
Orca 1.4.280 removed the Antigravity usage provider from source, so release daemons could only publish an empty compatibility field and the Usage popover had no Antigravity card. This restores the provider and card when the execution host has a supported, signed-in agy CLI.
What Changed
Restored the agy -p /usage --output-format json --print-timeout 20s provider, response/error parsing, quota groups, retry/stale behavior, and proxy handling.
Reconnected Antigravity to the rate-limit service for local hosts, selected running WSL distros, SSH/remote orcad hosts, mobile snapshots, and foreground/manual refreshes.
Restored the status-bar item, grouped model-pool display, visibility controls, and saved-account attribution without switching accounts to probe inactive logins.
Kept the provider lazy-loaded and removed the obsolete fallback to an Orca-managed agy; current Orca intentionally uses the user's installed CLI.
Added focused regression coverage for the parser/process boundary, status-bar restoration, non-prompting account reads, account-switch attribution, and WSL owner routing.
Why
The release bundle was not dropping a source module during packaging. PR #50137 intentionally deleted the provider and left antigravityAccounts: [] for older clients. On current agy 1.5.18, the documented print-mode usage command returns a structured SUCCESS envelope, so this restores the previously working source path and ports it across the newer lazy-loading and Antigravity account-restore architecture.
Before: #52121 documents the missing card in 1.4.280 and 1.4.281.
After: pnpm fixtures:shot status-bar/usage/AntigravityUsageMenu:savedAccounts --theme both rendered the Antigravity details menu in dark and light themes with live 5h/weekly bars and three saved-account states. The PNGs are fixture output and are not committed.
Testing
I manually tested these changes locally
Automated tests added/updated, or explained why not below
Every added test fails without this change and avoids the test anti-patterns
Validated on macOS arm64:
pnpm check:changed: all 47 checks passed.
Targeted Antigravity and WSL owner tests: 31 passed.
Targeted node/web typechecks and oxlint passed while iterating.
Built the actual arm64 orcad-server.js; it contains the /usage implementation and no antigravityAccounts:[] placeholder.
Started that emitted daemon with its bundled Node under ORCA_BACKGROUND_LAUNCH=1; it became ready on loopback, started the terminal daemon, passed the PTY-spawn self-test, and shut down cleanly.
The all-target template wrapper proceeded through the arm64 daemon build, then correctly stopped because an arm64 machine has no verified darwin-x64 node-pty prebuild. CI owns the cross-runner target matrix.
The regression tests are limited to costly silent failures allowed by the repository rules: parser/process boundaries, migration state, credential attribution, and cross-platform runtime routing. They call real production code with minimal boundary injection and hardcoded expectations.
Performance
Antigravity polling again starts agy on a full usage refresh (normally every 15 minutes while usage is watched, plus explicit refresh). The provider is lazy-loaded, runs in its own promise so it does not delay sibling providers, disables CLI auto-update, and is skipped when the meter is hidden.
Risk
The main risk is the same policy concern that motivated #50137: this resumes headless agy /usage calls outside ACP. Users would see CLI errors or an unavailable card if Google/agy stops supporting the command. Runtime/account changes are generation-guarded so a reading cannot be attributed across a switch. A plain revert removes the provider; cached quota readings are non-secret and disposable.
Level: Medium
AI Disclosure
OpenAI Codex was used to investigate, implement, and validate the change.
Review
Please focus on the decision to restore print-mode usage after #50137, the account-attribution port in native-account-service-with-usage.ts, and host/WSL/remote target behavior.
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.
Notes
No tokens, OAuth codes, account subjects, or account identifiers are logged or included. The provider uses @orca/process-host locally and the existing WSL process wrapper; remote hosts execute the same orcad source path on the owner machine. Older clients keep receiving the restored state shape, and mobile again accepts/displays Antigravity windows.
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)
I stated the risk: what could break, for whom, and how to back it out
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)
[Medium impact] The PR appears safe to merge; no new actionable issue was established.
Summary
Restores Antigravity usage from the execution host’s installed agy CLI.
Orca reads Antigravity quota from the installed agy CLI.
Antigravity readings stay linked to the account that was signed in.
The status bar shows Antigravity quota and saved-account details.
WSL workspaces and mobile screens can show Antigravity quota pools.
Tests and visual capture were not run because this checkout has no installed dependencies.
Diagram
%%{init: {'theme': 'neutral'}}%%
flowchart LR
A[Usage refresh] --> B[Read account without prompting]
B --> C[Run installed agy on selected host]
C --> D[Parse quota]
D --> E[Recheck account and generation]
E -->|Still current| F[Save account reading]
F --> G[Publish desktop and mobile usage]
E -->|Changed| H[Discard and queue another read]
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.
The change adds Antigravity quota fetching from the host or WSL agy CLI and parses usage buckets and failures. It stores verified readings by account and runtime target, attributes fetch results to the active account, and adds Antigravity to rate-limit state and refresh cycles. The status bar gains Antigravity settings, provider and account menus, and grouped usage-pool labels across desktop and mobile usage displays.
Merge Risk: Low · previous review 1b855
Antigravity usage reporting is restored. A few minor edge cases remain: a stale saved-account snapshot after an account switch mid-read, a briefly cleared meter after an agy token refresh, and two small display issues in the usage panel. None is likely to break the main flow.
Pre-merge checks: 4
Check name
Status
Explanation
Title check
The title "fix(antigravity): restore usage statistics" matches the main change: the PR restores the Antigravity usage provider, its parsing, the status-bar card, and account attribution that were remo…
Linked Issues check
Directly linked issue #52121 requires that a valid agy /usage quota response on the selected host publish and display an Antigravity usage card for local and remote hosts. The whole-PR summary (merg…
Out of Scope Changes check
Each changed area supports restoring the Antigravity usage provider and card under #52121. The issue names the removed fetcher, local and WSL target wiring, account attribution, and card as the remove…
Description check
The description follows the repository template closely and covers the ELI5, What Changed, Why, Linked Issue (Fixes #52121), Visual Proof, Testing, Performance, Risk (Level: Medium), AI Disclosure, Re…
Full details: Title check
Explanation
The title "fix(antigravity): restore usage statistics" matches the main change: the PR restores the Antigravity usage provider, its parsing, the status-bar card, and account attribution that were removed in PR #50137. It uses a conventional-commit scope and is short and specific.
Full details: Linked Issues check
Explanation
Directly linked issue #52121 requires that a valid agy /usage quota response on the selected host publish and display an Antigravity usage card for local and remote hosts. The whole-PR summary (merge base c2c8151 to head 1b855d7) covers each step of that path:
Fetch: antigravity-usage-fetcher.ts runs print-mode /usage with --output-format json --print-timeout 20s and auto-update disabled (antigravity-usage-command.ts). It checks the CLI version and parses SUCCESS envelopes into weekly and 5h buckets, including Gemini and Claude/GPT groups (antigravity-usage-response.ts).
Target: provider-account-services.ts, account-runtime-target-sync.ts, and RateLimitService.setAntigravityFetchTarget set the fetch target for the local, WSL, or remote host. Target changes trigger a refresh and reset Antigravity state. owner-usage-rate-limits.ts and wsl-owner-rate-limits.ts carry Antigravity usage to remote and WSL owner views.
Publish: service-full-cycle-preparation.ts, service-full-cycle-application.ts, and service-antigravity-accounts.ts publish results. Generation guards prevent stale publication.
Display: StatusBarUsageArea.tsx, AntigravityUsageMenu.tsx, usage-grouped-pools.tsx, and the visibility and gating files render the card. Mobile files accept and display Antigravity windows.
Test: antigravity-usage-fetcher.test.ts checks the command, the disabled auto-update environment, and the weekly pool mapping.
Residual uncertainty: the summary does not show automated tests for WSL or remote orcad target wiring. The issue does not name such a test as a requirement. The remote path relies on the shared source path, which the summary describes but does not show by test. Changes since the previous review (account attribution, native credential listener, usage store) are consistent with the requirement and do not remove the publication path. This does not establish a missing requirement.
Full details: Out of Scope Changes check
Explanation
Each changed area supports restoring the Antigravity usage provider and card under #52121. The issue names the removed fetcher, local and WSL target wiring, account attribution, and card as the removed pieces.
src/main/rate-limits/providers/antigravity/*: fetch, parse, error, host-program, and snapshot code.
src/main/rate-limits/service/*: publication, generation guards, polling gate, Retry-After handling, and state types.
src/main/antigravity/*: saved-account attribution, usage store, native credential change listener, and runtime-target account services. These back the restored account attribution.
Renderer status-bar, visibility, gating, search, i18n, and grouped-pool files: card display and its settings.
Shared types, status-bar item enum, defaults, and the _antigravityStatusBarUsageRestored migration flag: required for the restored status-bar item to be valid and retained.
Mobile snapshot and selector changes: mobile display of Antigravity windows.
config/main-blocking-helper-baseline.txt: records the synchronous helper reference in the restored fetcher.
Notes: (1) The PR description names one regression test, but the summary lists several additional test files. These cover the restored account, store, defaults, and WSL display paths, so they support the change. (2) service-full-cycle-application.ts publishes Muse results asynchronously in parallel with Antigravity. The change supports keeping Antigravity from delaying sibling providers. It is not a demonstrated unrelated change. The verdict uses the file-level summary; hunk-level review was not performed.
Full details: Description check
Explanation
The description follows the repository template closely and covers the ELI5, What Changed, Why, Linked Issue (Fixes #52121), Visual Proof, Testing, Performance, Risk (Level: Medium), AI Disclosure, Review, upstream boundary, Notes, and Checklist sections. It explains the restored provider, the reason for the change, and the validation performed. Gaps remain: the Visual Proof section points to fixture output that is not attached, and the 'Before' screenshot is only a reference to an issue. The UI-change checklist box is unchecked, and the Risk section does not give a plain revert procedure for the account-attribution behavior.
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.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 9
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (2)
Minor · Count buckets as usage data in the panel's error guard. · provider-usage-panel.tsx:284-286
src/renderer/src/components/status-bar/usage/provider-usage-panel.tsx:284-286 Minor · Functional Correctness · Quick win
Count buckets as usage data in the panel's error guard.
When an Antigravity reading has buckets but no scalar windows, a later failed refresh can keep those buckets as stale data. The error guard in ProviderPanel ignores p.buckets, so it renders only the error message and hides the cached buckets. The service and the status bar already treat buckets as usage data. Add the same check to this guard.
Minor · Key window sections by bucket identity, not by display label. · provider-usage-panel.tsx:358
src/renderer/src/components/status-bar/usage/provider-usage-panel.tsx:358 Minor · Functional Correctness · Quick win
Key window sections by bucket identity, not by display label.
Two Antigravity buckets in one group can produce the same section label. parseGroups keeps every enabled bucket in a group, and parseBucket keeps each bucket's name and windowName. formatPoolLabel builds the label from the group and the window duration when windowMinutes > 0, so the bucket name does not affect it. Two enabled buckets in the same group with the same duration, such as two weekly buckets, therefore produce the same label, such as Gemini · Weekly.
ProviderPanel uses that label as the React key at provider-usage-panel.tsx:358. UsageRosterPanel.tsx:233 uses the same pattern. Duplicate keys cause React warnings and can misplace rows during later updates. Users also see two rows they cannot tell apart.
Carry each bucket's identity through getWindowSections, and use that identity as the key in both components. The display label can remain unchanged.
Source: Learnings
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: fd537a62-b652-4d51-8b77-1a376a90455e
Commits
Reviewing files that changed from the base of the PR and between a42c042 and 8022f36.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to GitHub limitations.
⚠️ Outside diff range comments (1)
Minor · Include buckets in the cached-data check. · provider-usage-panel.tsx:391
src/renderer/src/components/status-bar/usage/provider-usage-panel.tsx:391 Minor · Functional Correctness · Quick win
Include buckets in the cached-data check.
When a refresh fails with retained buckets but no scalar windows, the changed error guard now keeps those buckets visible. This expression still passes stale=false, so ErrorMessage omits “showing cached data”. Include nonempty p.buckets in this predicate. Keep empty buckets on the no-data fallback.
Review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Repository UI
Review profile: CHILL
Plan: Advanced
Run ID: 2cfbe4f7-1b2d-44b2-89ae-4c6b4ed6ed7d
Commits
Reviewing files that changed from the base of the PR and between db40c82 and 5f09938.
Files skipped from review as they are similar to previous changes: 2
src/renderer/src/i18n/en-runtime-required.json
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; 9 remain after this review.
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 7 remain after this review.
Closing this. It restored the agy -p /usage background read that #50137 removed on purpose, because Google supports third-party clients only through ACP and ACP doesn't expose plan quota (tracked upstream in google-antigravity/antigravity-cli#1045). We'll pursue the policy-compliant route from #50402 instead: read the quota from agy's documented status-line payload in the user's own interactive agy terminals, as an opt-in, with no background agy runs and no extra requests to Google. Issue #52121 stays open for that work.
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.
ELI5
Orca 1.4.280 removed the Antigravity usage provider from source, so release daemons could only publish an empty compatibility field and the Usage popover had no Antigravity card. This restores the provider and card when the execution host has a supported, signed-in
agyCLI.What Changed
agy -p /usage --output-format json --print-timeout 20sprovider, response/error parsing, quota groups, retry/stale behavior, and proxy handling.orcadhosts, mobile snapshots, and foreground/manual refreshes.agy; current Orca intentionally uses the user's installed CLI.Why
The release bundle was not dropping a source module during packaging. PR #50137 intentionally deleted the provider and left
antigravityAccounts: []for older clients. On currentagy1.5.18, the documented print-mode usage command returns a structuredSUCCESSenvelope, so this restores the previously working source path and ports it across the newer lazy-loading and Antigravity account-restore architecture.Linked Issue
Fixes #52121
Visual Proof
Before: #52121 documents the missing card in 1.4.280 and 1.4.281.
After:
pnpm fixtures:shot status-bar/usage/AntigravityUsageMenu:savedAccounts --theme bothrendered the Antigravity details menu in dark and light themes with live 5h/weekly bars and three saved-account states. The PNGs are fixture output and are not committed.Testing
Validated on macOS arm64:
pnpm check:changed: all 47 checks passed.orcad-server.js; it contains the/usageimplementation and noantigravityAccounts:[]placeholder.ORCA_BACKGROUND_LAUNCH=1; it became ready on loopback, started the terminal daemon, passed the PTY-spawn self-test, and shut down cleanly.node-ptyprebuild. CI owns the cross-runner target matrix.The regression tests are limited to costly silent failures allowed by the repository rules: parser/process boundaries, migration state, credential attribution, and cross-platform runtime routing. They call real production code with minimal boundary injection and hardcoded expectations.
Performance
Antigravity polling again starts
agyon a full usage refresh (normally every 15 minutes while usage is watched, plus explicit refresh). The provider is lazy-loaded, runs in its own promise so it does not delay sibling providers, disables CLI auto-update, and is skipped when the meter is hidden.Risk
The main risk is the same policy concern that motivated #50137: this resumes headless
agy /usagecalls outside ACP. Users would see CLI errors or an unavailable card if Google/agy stops supporting the command. Runtime/account changes are generation-guarded so a reading cannot be attributed across a switch. A plain revert removes the provider; cached quota readings are non-secret and disposable.Level: Medium
AI Disclosure
OpenAI Codex was used to investigate, implement, and validate the change.
Review
Please focus on the decision to restore print-mode usage after #50137, the account-attribution port in
native-account-service-with-usage.ts, and host/WSL/remote target behavior.Agent skill upstream boundary
Notes
No tokens, OAuth codes, account subjects, or account identifiers are logged or included. The provider uses
@orca/process-hostlocally and the existing WSL process wrapper; remote hosts execute the sameorcadsource path on the owner machine. Older clients keep receiving the restored state shape, and mobile again accepts/displays Antigravity windows.Checklist
N/Awith reasonpnpm lint,pnpm typecheck,pnpm test, andpnpm buildpass (or CI will cover; local preferred)