Repository navigation
Conversation
Read quota windows from the active Agy LanguageServer so Orca mirrors Antigravity's five-hour and weekly usage, and retire the deprecated Gemini CLI OAuth path. Constraint: Agy quota is exposed by a host-local LanguageServer, not a supported remote account API Rejected: Keep the deprecated Gemini OAuth fallback | it preserves ambiguous and divergent quota semantics Confidence: high Scope-risk: moderate Directive: Keep Gemini agent support separate from Gemini usage-provider state Tested: 934 targeted tests; pnpm typecheck; pnpm build; changed-file oxlint and oxfmt; localization checks; live used and remaining UI validation Not-tested: Full pnpm test and pnpm lint remain blocked by pre-existing local relay environment and daemon max-lines failures
Greptile SummaryThis PR replaces the deprecated Gemini CLI OAuth usage path with a direct local Agy (
Confidence Score: 5/5Safe to merge; the new Agy discovery path is well-tested and the deprecated Gemini cleanup is complete across types, service, UI, and persistence. The change is a clean replacement of one fetch path with another. Both discovery strategies (log files and lsof) have individual error guards, deduplication correctly prefers CSRF-bearing entries, and two-level migrations (persistence + renderer UI slice) cover all persisted state. The sole resilience gap — a mid-loop file-read exception discarding already-found log endpoints — is a minor edge case with a low-impact effect on a single refresh cycle and an easy fix. Files Needing Attention: src/main/rate-limits/antigravity-usage-fetcher.ts — the sequential log-read loop in discoverLogEndpoints.
|
| Filename | Overview |
|---|---|
| src/main/rate-limits/antigravity-usage-fetcher.ts | New Agy quota fetcher: discovers LanguageServer endpoints via log files and lsof, fetches /RetrieveUserQuotaSummary, maps Gemini model group to 5h/weekly windows. One minor resilience gap in the log-read loop. |
| src/main/rate-limits/antigravity-endpoint-selection.ts | Parallel PID inspection and deduplication logic; correctly prefers CSRF-bearing entries over null-CSRF duplicates. |
| src/main/rate-limits/service.ts | Replaces the mirrored Gemini→Antigravity snapshot with a direct fetchAntigravityRateLimits call; removes Gemini state tracking, resolver, and failure-streak entry cleanly. |
| src/main/persistence.ts | Adds stripDeprecatedGeminiCliOAuthSetting applied on both load and write paths; sets loadNeedsSave to force a flush when the deprecated key is present. |
| src/renderer/src/store/slices/ui.ts | Adds DEPRECATED_STATUS_BAR_ITEMS set to strip gemini from persisted status bar lists; statusBarItemsMigrated flag correctly triggers a re-persist when items change. |
| src/renderer/src/components/status-bar/status-bar-provider-visibility.ts | Removes geminiCliOAuthEnabled dependency from Antigravity visibility; antigravityUsageConfigured alone is now the durable signal. |
| src/renderer/src/components/status-bar/tooltip.tsx | getWindowSections now conditionally appends the Weekly row only when p.weekly is non-null. |
| src/shared/rate-limit-types.ts | Removes gemini from the ProviderRateLimits provider union and RateLimitState. |
| src/main/rate-limits/antigravity-usage-fetcher.test.ts | Comprehensive tests for log parsing, lsof parsing, CSRF extraction, deduplication, quota mapping, and network fallback. |
Sequence Diagram
sequenceDiagram
participant S as RateLimitService
participant F as fetchAntigravityRateLimits
participant LD as discoverLogEndpoints
participant LO as discoverLsofEndpoints
participant DD as deduplicateAgyQuotaEndpoints
participant Net as net.fetch (127.0.0.1)
S->>F: fetchAntigravityRateLimits()
F->>LD: discoverLogEndpoints()
LD-->>F: "[{pid, port, csrfToken:null}, ...]"
F->>LO: discoverLsofEndpoints()
LO->>LO: lsof -nP -iTCP -sTCP:LISTEN -F pcn
LO->>LO: "ps -p PID -o command= (parallel, Promise.all)"
LO-->>F: "[{pid, port, csrfToken:"token"}, ...]"
F->>DD: deduplicateAgyQuotaEndpoints([log..., lsof...])
Note over DD: prefer csrfToken entry for same pid:port key
DD-->>F: unique endpoints
loop for each endpoint
F->>Net: POST /RetrieveUserQuotaSummary
Net-->>F: quota JSON or null
F->>F: "parseAgyQuotaSummary → {session, weekly}"
end
F-->>S: ProviderRateLimits (ok / error / unavailable)
Reviews (3): Last reviewed commit: "Preserve valid Antigravity quota endpoin..." | Re-trigger Greptile
|
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:
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Repository UI Review profile: CHILL Plan: Pro Plus Run ID: 📥 CommitsReviewing files that changed from the base of the PR and between 3d74f5f and 80579dae588affcfac34b4f7593697da887f7e81. 📒 Files selected for processing (73)
💤 Files with no reviewable changes (35)
🚧 Files skipped from review as they are similar to previous changes (37)
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review. 📝 WalkthroughWalkthroughRemoves Gemini rate-limit fetching, OAuth configuration, shared state, status-bar support, settings, search entries, telemetry keys, and localized UI strings. Adds Antigravity endpoint discovery, CSRF handling, quota parsing, local service requests, retry behavior, and rate-limit integration. Updates persistence migrations to remove deprecated Gemini settings and status-bar items. Extends Antigravity status-bar rendering and service tests. 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
Full details: Description checkExplanation The description is detailed, on-topic, and covers the change, rationale, linked issues, visual proof, testing, security, and compatibility notes. It does not use every template heading and omits explicit checklist, review, and AI disclosure sections, but the critical information is present. 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.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/renderer/src/i18n/locales/ja.json (1)
3144-3202: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick winRemove the unreachable Gemini-specific locale entries from the catalogs.
"d2375976eb"and"68efc0345c"are no longer referenced by renderer code andProviderRateLimits['provider']no longer includesgemini, so these orphaned status-bar tooltips remain as unused localization remnants. Keep the Gemini agent/name entries that still apply to the Gemini CLI agent path, but prune the usage-provider strings and their counterparts in the locale files.
🧹 Nitpick comments (2)
src/main/rate-limits/antigravity-usage-fetcher.ts (1)
174-203: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low valueUnconditional
lsof/psshell-out on every poll cycle for every user.
discoverLsofEndpoints(invoked everyrunFetchAllCycle) spawnslsofand, for each matched PID,ps— regardless of whether the user has Antigravity/Agy installed at all. A cheapexistsSync(AGY_LOG_DIR)(or similar) short-circuit before shelling out would avoid the recurring child-process overhead for the majority of users who never use Antigravity.Also applies to: 205-216
src/renderer/src/components/status-bar/usage-provider-settings-target.ts (1)
11-12: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueConsider documenting why
antigravityhas no Accounts section.Unlike the
kimicase just below (which explains why it returnsnull), this newantigravitycase has no rationale. A short comment (e.g., "Agy quota is host-local process discovery, not an account Orca manages") would prevent this from reading as an oversight.✏️ Proposed comment addition
case 'antigravity': + // Why: Agy quota comes from host-local LanguageServer discovery, not an + // account Orca manages, so there's no Accounts section to link to. return null
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: f5b3a7c3-527d-413a-95db-e70b3d5d1544
📥 Commits
Reviewing files that changed from the base of the PR and between 5f64284 and 890b0ddba56e450c30054ce3dcff3ac388296f92.
📒 Files selected for processing (55)
mobile/src/components/accounts-snapshot.tssrc/main/codex-accounts/runtime-home-service.test.tssrc/main/codex-accounts/service.test.tssrc/main/index.tssrc/main/persistence.test.tssrc/main/persistence.tssrc/main/rate-limits/antigravity-usage-fetcher.test.tssrc/main/rate-limits/antigravity-usage-fetcher.tssrc/main/rate-limits/gemini-bucket-formatting.test.tssrc/main/rate-limits/gemini-bucket-formatting.tssrc/main/rate-limits/gemini-cli-oauth-extractor.tssrc/main/rate-limits/gemini-oauth-sources.tssrc/main/rate-limits/gemini-usage-fetcher.fallback.test.tssrc/main/rate-limits/gemini-usage-fetcher.test-fixtures.tssrc/main/rate-limits/gemini-usage-fetcher.test.tssrc/main/rate-limits/gemini-usage-fetcher.tssrc/main/rate-limits/service.test.tssrc/main/rate-limits/service.tssrc/main/runtime/rpc/methods/client-ui-schemas.tssrc/renderer/src/components/settings/AccountsPane.test.tsxsrc/renderer/src/components/settings/AccountsPane.tsxsrc/renderer/src/components/settings/AppearanceWindowSidebarSection.tsxsrc/renderer/src/components/settings/accounts-search.tssrc/renderer/src/components/settings/appearance-status-bar-search.tssrc/renderer/src/components/stats/GrokUsagePane.test.tsxsrc/renderer/src/components/status-bar/StatusBar.tsxsrc/renderer/src/components/status-bar/StatusBarUsageEmptyCta.tsxsrc/renderer/src/components/status-bar/UsageRosterPanel.tsxsrc/renderer/src/components/status-bar/provider-segment-monthly-window.test.tsxsrc/renderer/src/components/status-bar/status-bar-agent-gating.test.tssrc/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.test.tssrc/renderer/src/components/status-bar/tooltip.tsxsrc/renderer/src/components/status-bar/usage-error-copy.test.tssrc/renderer/src/components/status-bar/usage-error-copy.tssrc/renderer/src/components/status-bar/usage-provider-settings-target.test.tssrc/renderer/src/components/status-bar/usage-provider-settings-target.tssrc/renderer/src/hooks/useSettingsNavigationMetadata.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.test.tssrc/renderer/src/store/slices/ui.tssrc/renderer/src/web/web-preload-api.tssrc/shared/constants.tssrc/shared/rate-limit-types.test.tssrc/shared/rate-limit-types.tssrc/shared/status-bar-defaults.tssrc/shared/telemetry-events.tssrc/shared/types.ts
💤 Files with no reviewable changes (27)
- src/main/rate-limits/gemini-bucket-formatting.test.ts
- src/main/rate-limits/gemini-usage-fetcher.ts
- src/main/rate-limits/gemini-cli-oauth-extractor.ts
- src/renderer/src/components/settings/AppearanceWindowSidebarSection.tsx
- src/shared/rate-limit-types.test.ts
- src/renderer/src/components/settings/AccountsPane.test.tsx
- src/main/rate-limits/gemini-bucket-formatting.ts
- src/renderer/src/components/stats/GrokUsagePane.test.tsx
- src/renderer/src/components/status-bar/usage-error-copy.ts
- src/shared/status-bar-defaults.ts
- src/main/rate-limits/gemini-usage-fetcher.fallback.test.ts
- src/renderer/src/store/slices/rate-limits.ts
- src/main/rate-limits/gemini-usage-fetcher.test-fixtures.ts
- src/renderer/src/web/web-preload-api.ts
- src/main/runtime/rpc/methods/client-ui-schemas.ts
- src/main/rate-limits/gemini-oauth-sources.ts
- src/main/codex-accounts/runtime-home-service.test.ts
- src/renderer/src/components/settings/accounts-search.ts
- src/shared/telemetry-events.ts
- src/main/rate-limits/gemini-usage-fetcher.test.ts
- src/renderer/src/components/status-bar/usage-error-copy.test.ts
- src/main/index.ts
- src/main/codex-accounts/service.test.ts
- src/renderer/src/components/status-bar/status-bar-agent-gating.test.ts
- src/renderer/src/components/settings/appearance-status-bar-search.ts
- src/shared/constants.ts
- src/shared/types.ts
Parallelize process inspection, document the host-local settings boundary, and remove unreachable Gemini usage translations raised during review. Constraint: Preserve lsof discovery when Agy is running without a usable log directory. Rejected: Skip lsof when the Agy log directory is absent | that would remove the runtime discovery fallback. Confidence: high Scope-risk: narrow Directive: Keep Antigravity discovery independent of Orca-managed account settings. Tested: targeted Vitest, typecheck, oxfmt, oxlint, and localization catalog/extraction/coverage checks. Not-tested: full repository test suite was not rerun for this review-only follow-up.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 574db7d5-9414-4669-82a7-50a3a77ba8a2
📥 Commits
Reviewing files that changed from the base of the PR and between 890b0ddba56e450c30054ce3dcff3ac388296f92 and 838f3ed822973cfdc29a80b959041f851658341a.
📒 Files selected for processing (7)
src/main/rate-limits/antigravity-usage-fetcher.tssrc/renderer/src/components/status-bar/usage-provider-settings-target.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.json
💤 Files with no reviewable changes (5)
- src/renderer/src/i18n/locales/en.json
- src/renderer/src/i18n/locales/es.json
- src/renderer/src/i18n/locales/ja.json
- src/renderer/src/i18n/locales/ko.json
- src/renderer/src/i18n/locales/zh.json
🚧 Files skipped from review as they are similar to previous changes (1)
- src/renderer/src/components/status-bar/usage-provider-settings-target.ts
Keep per-process inspection failures isolated and prefer authenticated duplicates so transient process exits or log-first discovery cannot hide a usable Agy endpoint. Constraint: Endpoint discovery must tolerate races between lsof and ps while retaining CSRF authentication. Rejected: Reverse discovery order only | it would encode preference indirectly and leave duplicate selection fragile. Confidence: high Scope-risk: narrow Directive: Select duplicate Agy endpoints by authentication quality, not discovery order. Tested: targeted Vitest, typecheck, oxfmt, oxlint, and max-lines ratchet. Not-tested: full repository test suite was not rerun for this focused review fix.
|
Related: #11457 This PR takes a broader replacement approach: it removes the deprecated Gemini CLI OAuth usage backend rather than retaining it as a fallback, and treats Antigravity as a first-class provider. It also covers persisted-state migration, status-bar visibility, and Used/Remaining rendering. Happy to align with the maintainers’ preferred direction if these should be consolidated. |
Resolve the main-branch test overlap while preserving both the newer inactive Codex probe coverage and the Antigravity bucket regression test. Constraint: Resolve PR stablyai#11536 conflicts without dropping upstream coverage Rejected: Rebase and force-push | an ordinary merge preserves the published branch history Confidence: high Scope-risk: moderate Directive: Keep Antigravity as the first-class quota provider when future Gemini usage changes land Tested: 15 affected test files, 990 tests; pnpm typecheck; targeted oxlint and oxfmt Not-tested: Full repository test suite
Resolve the latest upstream overlaps while retaining protected-secret cleanup, Kimi runtime-aware fetching, and localization improvements without restoring deprecated Gemini usage paths. Constraint: Resolve PR stablyai#11536 conflicts while preserving current main behavior outside Gemini usage removal Rejected: Rebase and force-push | an ordinary merge preserves the published review history Confidence: high Scope-risk: moderate Directive: Do not reintroduce Gemini CLI OAuth usage when updating Antigravity quota code Tested: Node 24.18.1; 15 affected test files, 978 tests; pnpm typecheck; targeted oxlint and oxfmt Not-tested: Full repository test suite
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
Resolve the latest Accounts overlap by retaining upstream settings changes while excluding the deprecated Gemini CLI OAuth section and its unused UI import. Constraint: Update PR stablyai#11536 to current main without changing its direct Agy quota contract Rejected: Restore the Gemini settings section | it contradicts the migration and revives the deprecated usage path Confidence: high Scope-risk: narrow Directive: Keep Gemini agent support separate from deprecated Gemini usage-provider settings Tested: Node 24.18.1; 15 affected test files, 978 tests; pnpm typecheck; targeted oxlint and oxfmt Not-tested: Full repository test suite
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Hi @brennanb2025, when you have a chance, could you please take a look at this PR? I’ve updated it against current main and resolved all conflicts. Thanks! |
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: c60805db-25c8-40b2-af6e-6dae2354f46f
📥 Commits
Reviewing files that changed from the base of the PR and between 550eabe and bf650626433ff5bab87ff733ec2004daf4585361.
📒 Files selected for processing (56)
mobile/src/components/accounts-snapshot.tssrc/main/codex-accounts/runtime-home-service.test.tssrc/main/codex-accounts/service.test.tssrc/main/index.tssrc/main/persistence.test.tssrc/main/persistence.tssrc/main/rate-limits/antigravity-endpoint-selection.tssrc/main/rate-limits/antigravity-usage-fetcher.test.tssrc/main/rate-limits/antigravity-usage-fetcher.tssrc/main/rate-limits/gemini-bucket-formatting.test.tssrc/main/rate-limits/gemini-bucket-formatting.tssrc/main/rate-limits/gemini-cli-oauth-extractor.tssrc/main/rate-limits/gemini-oauth-sources.tssrc/main/rate-limits/gemini-usage-fetcher.fallback.test.tssrc/main/rate-limits/gemini-usage-fetcher.test-fixtures.tssrc/main/rate-limits/gemini-usage-fetcher.test.tssrc/main/rate-limits/gemini-usage-fetcher.tssrc/main/rate-limits/service.test.tssrc/main/rate-limits/service.tssrc/main/runtime/rpc/methods/client-ui-schemas.tssrc/renderer/src/components/settings/AccountsPane.test.tsxsrc/renderer/src/components/settings/AccountsPane.tsxsrc/renderer/src/components/settings/AppearanceWindowSidebarSection.tsxsrc/renderer/src/components/settings/accounts-search.tssrc/renderer/src/components/settings/appearance-status-bar-search.tssrc/renderer/src/components/stats/GrokUsagePane.test.tsxsrc/renderer/src/components/status-bar/StatusBar.tsxsrc/renderer/src/components/status-bar/StatusBarUsageEmptyCta.tsxsrc/renderer/src/components/status-bar/UsageRosterPanel.tsxsrc/renderer/src/components/status-bar/provider-segment-monthly-window.test.tsxsrc/renderer/src/components/status-bar/status-bar-agent-gating.test.tssrc/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.test.tssrc/renderer/src/components/status-bar/tooltip.tsxsrc/renderer/src/components/status-bar/usage-error-copy.test.tssrc/renderer/src/components/status-bar/usage-error-copy.tssrc/renderer/src/components/status-bar/usage-provider-settings-target.test.tssrc/renderer/src/components/status-bar/usage-provider-settings-target.tssrc/renderer/src/hooks/useSettingsNavigationMetadata.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.test.tssrc/renderer/src/store/slices/ui.tssrc/renderer/src/web/web-preload-api.tssrc/shared/constants.tssrc/shared/rate-limit-types.test.tssrc/shared/rate-limit-types.tssrc/shared/status-bar-defaults.tssrc/shared/telemetry-events.tssrc/shared/types.ts
💤 Files with no reviewable changes (27)
- src/renderer/src/components/settings/AccountsPane.test.tsx
- src/shared/status-bar-defaults.ts
- src/renderer/src/components/status-bar/usage-error-copy.test.ts
- src/renderer/src/components/settings/appearance-status-bar-search.ts
- src/main/rate-limits/gemini-usage-fetcher.fallback.test.ts
- src/main/index.ts
- src/main/rate-limits/gemini-oauth-sources.ts
- src/renderer/src/components/settings/AppearanceWindowSidebarSection.tsx
- src/renderer/src/components/settings/accounts-search.ts
- src/shared/rate-limit-types.test.ts
- src/main/rate-limits/gemini-usage-fetcher.test.ts
- src/main/rate-limits/gemini-usage-fetcher.test-fixtures.ts
- src/shared/constants.ts
- src/main/runtime/rpc/methods/client-ui-schemas.ts
- src/main/codex-accounts/runtime-home-service.test.ts
- src/main/rate-limits/gemini-usage-fetcher.ts
- src/shared/telemetry-events.ts
- src/main/rate-limits/gemini-bucket-formatting.test.ts
- src/renderer/src/components/status-bar/usage-error-copy.ts
- src/renderer/src/web/web-preload-api.ts
- src/shared/types.ts
- src/main/codex-accounts/service.test.ts
- src/renderer/src/store/slices/rate-limits.ts
- src/renderer/src/components/stats/GrokUsagePane.test.tsx
- src/renderer/src/components/status-bar/status-bar-agent-gating.test.ts
- src/main/rate-limits/gemini-cli-oauth-extractor.ts
- src/main/rate-limits/gemini-bucket-formatting.ts
🚧 Files skipped from review as they are similar to previous changes (28)
- src/renderer/src/components/status-bar/UsageRosterPanel.tsx
- src/renderer/src/components/status-bar/StatusBarUsageEmptyCta.tsx
- src/renderer/src/components/status-bar/status-bar-agent-gating.ts
- src/main/persistence.test.ts
- src/renderer/src/store/slices/ui.ts
- src/renderer/src/components/status-bar/provider-segment-monthly-window.test.tsx
- src/main/rate-limits/antigravity-endpoint-selection.ts
- src/renderer/src/components/status-bar/tooltip.tsx
- src/renderer/src/components/status-bar/usage-provider-settings-target.test.ts
- mobile/src/components/accounts-snapshot.ts
- src/renderer/src/i18n/locales/en.json
- src/renderer/src/components/status-bar/usage-provider-settings-target.ts
- src/renderer/src/i18n/locales/es.json
- src/renderer/src/hooks/useSettingsNavigationMetadata.ts
- src/renderer/src/store/slices/ui.test.ts
- src/renderer/src/components/status-bar/StatusBar.tsx
- src/main/persistence.ts
- src/renderer/src/components/status-bar/status-bar-provider-visibility.ts
- src/main/rate-limits/antigravity-usage-fetcher.test.ts
- src/renderer/src/components/settings/AccountsPane.tsx
- src/renderer/src/components/status-bar/tooltip.test.ts
- src/renderer/src/i18n/locales/ko.json
- src/main/rate-limits/service.ts
- src/shared/rate-limit-types.ts
- src/main/rate-limits/service.test.ts
- src/renderer/src/i18n/locales/zh.json
- src/renderer/src/components/status-bar/status-bar-provider-visibility.test.ts
- src/renderer/src/i18n/locales/ja.json
|
Thanks for pushing the local Agy LanguageServer direction forward. I opened #14571 as a related implementation and linked this PR in its comparison section. The two implementations share the same core authority—the already-running host-local Antigravity service—but differ in scope:
Cross-linking them so maintainers can compare the tradeoffs in one place. Thanks for the work and live validation here. |
Merge the latest mainline test and settings refactors while retaining Antigravity as the local quota authority and exposing both Gemini and Claude/GPT quota families. Constraint: Agy exposes two independent model pools with separate five-hour and weekly limits. Rejected: Retain the deprecated Gemini CLI usage fallback | it reports the wrong product quota and requires unrelated OAuth state. Confidence: high Scope-risk: moderate Directive: Preserve all four Agy quota identities and do not reintroduce Gemini usage tracking when maintaining Gemini agent support. Tested: Node 24 typecheck; 15 affected Vitest files with 233 tests; oxlint; type-aware src audit; reliability gates; max-lines ratchet; diff check. Not-tested: Full repository lint is blocked by an upstream type-aware warning in config/scripts/pr-test-loc-summary.test.mjs; full test suite and Electron manual UI were not rerun after this merge.
Treat each selected log as an independent discovery attempt so one removed file cannot erase valid endpoints found on Windows or other log-only hosts. Constraint: Agy rotates log files between directory listing and prefix reads. Rejected: Catch the whole discovery loop | it discards already recoverable endpoints after one transient ENOENT. Confidence: high Scope-risk: narrow Directive: Keep endpoint discovery failures isolated per candidate. Tested: Antigravity fetcher 11 tests; Node 24 typecheck; targeted oxlint; diff check. Not-tested: Full repository lint remains blocked by the unrelated origin/main warning documented in the PR body.
Preserve current main's Codex skip-state gating and split persistence layout while keeping Antigravity quota discovery independent of deprecated Gemini usage. Constraint: Current main split persistence modules and changed provider refresh orchestration Rejected: Restore the deprecated Gemini usage provider | Agy supplies its own four quota buckets Confidence: high Scope-risk: moderate Directive: Keep Antigravity fetch independent when provider refresh orchestration changes Tested: 15 focused Vitest files (247 tests); pnpm lint; changed-code quality; reliability gates; max-lines ratchet Not-tested: Full repository test suite and build; typecheck is blocked by two unchanged current-main tab-search fixture errors
Update search fixtures for the current palette document contract and stop localization regression tests from requiring removed Gemini usage strings. Constraint: Full validation must run after merging current main Rejected: Mark baseline failures as passed | The fixtures can be corrected without changing product behavior Confidence: high Scope-risk: narrow Directive: Keep retired-provider localization tests aligned with catalog removal Tested: pnpm test (5,911 files; 55,565 tests); pnpm lint; pnpm typecheck; pnpm build; changed-code quality Not-tested: None
|
Full validation is now complete after syncing dependencies to the refreshed lockfile:
|
Accept current main's authoritative tab-search fixtures while preserving the Agy quota migration and deprecated Gemini usage cleanup.\n\nTested: 25 affected files / 302 tests; typecheck; lint; build; changed-code quality; full suite 6,018 files / 56,658 tests passed with three unrelated parallel-interference failures passing isolated (2 files / 32 tests).
|
Updated to current Fresh validation:
@coderabbitai review |
|
✅ Action performedReview finished.
|
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
src/renderer/src/components/status-bar/UsageRosterPanel.tsx (1)
38-45: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUpdate the comment to state the Antigravity exception.
The comment says: "Named model buckets keep their model name; fixed provider windows use their duration." This comment does not mention that Antigravity named buckets bypass their model name when
useRemainingDurationistrue. A future reader can miss this exception and break thegetTightestUsageSectionbehavior during a refactor.State the exception directly, for example: "Named model buckets keep their model name, except Antigravity buckets in remaining-duration mode, which show their reset duration instead."
Based on coding guidelines, comments must be concise, non-obvious, and brief. As per coding guidelines: "Comments must be concise, non-obvious, and brief—prefer one line; do not explain obvious behavior or walk through code."
✏️ Proposed comment update
-// Named model buckets keep their model name; fixed provider windows use their duration. +// Named model buckets keep their model name, except Antigravity buckets in +// remaining-duration mode, which show their reset duration instead of the bucket name. function shortLabel(Source: Coding guidelines
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 12eca255-a9ca-4aed-8379-f8f164f06720
📥 Commits
Reviewing files that changed from the base of the PR and between d7a23c8 and 39dd1456e7231bb600e2ab4d96b9cdc16c324e97.
📒 Files selected for processing (73)
config/scripts/wsl-git-shell-benchmark.mjsmobile/src/components/accounts-snapshot.tssrc/main/codex-accounts/runtime-home-settings-test-fixtures.tssrc/main/codex-accounts/service-reset-credit-test-fixtures.tssrc/main/codex-accounts/service-test-harness.tssrc/main/index.tssrc/main/persistence-initial-load.test.tssrc/main/persistence/applying-settings/terminal-settings-migrations.tssrc/main/persistence/loading-store/store.tssrc/main/rate-limits/antigravity-endpoint-selection.tssrc/main/rate-limits/antigravity-quota-parser.tssrc/main/rate-limits/antigravity-usage-fetcher.test.tssrc/main/rate-limits/antigravity-usage-fetcher.tssrc/main/rate-limits/gemini-bucket-formatting.test.tssrc/main/rate-limits/gemini-bucket-formatting.tssrc/main/rate-limits/gemini-cli-oauth-extractor.tssrc/main/rate-limits/gemini-oauth-sources.tssrc/main/rate-limits/gemini-usage-fetcher.fallback.test.tssrc/main/rate-limits/gemini-usage-fetcher.test-fixtures.tssrc/main/rate-limits/gemini-usage-fetcher.test.tssrc/main/rate-limits/gemini-usage-fetcher.tssrc/main/rate-limits/rate-limit-service-test-harness.tssrc/main/rate-limits/service-account-target-selection.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.tssrc/main/runtime/rpc/methods/client-ui-schemas.tssrc/renderer/src/components/WorktreeJumpPalette.test.tsxsrc/renderer/src/components/settings/AccountsPane.test.tsxsrc/renderer/src/components/settings/AccountsPane.tsxsrc/renderer/src/components/settings/AppearanceWindowSidebarSection.tsxsrc/renderer/src/components/settings/CliSkillRuntimeSetup.test.tsxsrc/renderer/src/components/settings/CliSkillRuntimeSetup.tsxsrc/renderer/src/components/settings/accounts-search.tssrc/renderer/src/components/settings/appearance-status-bar-search.tssrc/renderer/src/components/stats/GrokUsagePane.test.tsxsrc/renderer/src/components/status-bar/StatusBar.tsxsrc/renderer/src/components/status-bar/StatusBarUsageEmptyCta.tsxsrc/renderer/src/components/status-bar/UsageRosterPanel.test.tsxsrc/renderer/src/components/status-bar/UsageRosterPanel.tsxsrc/renderer/src/components/status-bar/provider-segment-monthly-window.test.tsxsrc/renderer/src/components/status-bar/status-bar-agent-gating.test.tssrc/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.test.tssrc/renderer/src/components/status-bar/tooltip.tsxsrc/renderer/src/components/status-bar/usage-error-copy.test.tssrc/renderer/src/components/status-bar/usage-error-copy.tssrc/renderer/src/components/status-bar/usage-provider-settings-target.test.tssrc/renderer/src/components/status-bar/usage-provider-settings-target.tssrc/renderer/src/hooks/useIpcEvents-rate-limit-hydration.test.tssrc/renderer/src/hooks/useSettingsNavigationMetadata.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/i18n/zh-technical-literal-mistranslations.test.tssrc/renderer/src/store/slices/rate-limits.tssrc/renderer/src/store/slices/ui-hydration-workspace-preferences.test.tssrc/renderer/src/store/slices/ui.tssrc/renderer/src/web/web-preload-api.tssrc/shared/constants.tssrc/shared/global-settings-types.tssrc/shared/rate-limit-types.test.tssrc/shared/rate-limit-types.tssrc/shared/status-bar-defaults.tssrc/shared/telemetry-events.tssrc/shared/ui-chrome-types.ts
💤 Files with no reviewable changes (31)
- src/shared/global-settings-types.ts
- src/shared/status-bar-defaults.ts
- src/shared/constants.ts
- src/shared/telemetry-events.ts
- src/shared/ui-chrome-types.ts
- src/renderer/src/components/settings/appearance-status-bar-search.ts
- src/main/codex-accounts/service-reset-credit-test-fixtures.ts
- src/renderer/src/store/slices/rate-limits.ts
- src/renderer/src/hooks/useIpcEvents-rate-limit-hydration.test.ts
- src/main/rate-limits/gemini-usage-fetcher.fallback.test.ts
- src/main/rate-limits/gemini-usage-fetcher.test-fixtures.ts
- src/main/rate-limits/gemini-usage-fetcher.test.ts
- src/shared/rate-limit-types.test.ts
- src/renderer/src/components/settings/AppearanceWindowSidebarSection.tsx
- src/renderer/src/components/settings/accounts-search.ts
- src/main/runtime/rpc/methods/client-ui-schemas.ts
- src/main/rate-limits/gemini-bucket-formatting.test.ts
- src/main/rate-limits/gemini-usage-fetcher.ts
- src/renderer/src/components/stats/GrokUsagePane.test.tsx
- src/main/codex-accounts/runtime-home-settings-test-fixtures.ts
- src/main/rate-limits/gemini-oauth-sources.ts
- src/main/codex-accounts/service-test-harness.ts
- src/main/index.ts
- src/main/rate-limits/gemini-bucket-formatting.ts
- src/main/rate-limits/gemini-cli-oauth-extractor.ts
- src/renderer/src/web/web-preload-api.ts
- src/renderer/src/components/status-bar/usage-error-copy.ts
- src/renderer/src/components/status-bar/usage-error-copy.test.ts
- src/renderer/src/components/settings/AccountsPane.test.tsx
- src/renderer/src/i18n/zh-technical-literal-mistranslations.test.ts
- src/renderer/src/components/status-bar/status-bar-agent-gating.test.ts
🚧 Files skipped from review as they are similar to previous changes (19)
- src/renderer/src/i18n/locales/en.json
- src/renderer/src/hooks/useSettingsNavigationMetadata.ts
- src/renderer/src/components/status-bar/status-bar-agent-gating.ts
- mobile/src/components/accounts-snapshot.ts
- src/renderer/src/components/status-bar/StatusBarUsageEmptyCta.tsx
- src/renderer/src/components/status-bar/usage-provider-settings-target.test.ts
- src/renderer/src/components/status-bar/usage-provider-settings-target.ts
- src/renderer/src/i18n/locales/es.json
- src/renderer/src/components/status-bar/tooltip.tsx
- src/main/rate-limits/antigravity-endpoint-selection.ts
- src/renderer/src/components/status-bar/status-bar-provider-visibility.ts
- src/main/rate-limits/antigravity-usage-fetcher.test.ts
- src/renderer/src/components/settings/AccountsPane.tsx
- src/shared/rate-limit-types.ts
- src/main/rate-limits/service.ts
- src/renderer/src/store/slices/ui.ts
- src/renderer/src/components/status-bar/StatusBar.tsx
- src/renderer/src/i18n/locales/ja.json
- src/renderer/src/components/status-bar/status-bar-provider-visibility.test.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
|
Updated to current Validation on head
@coderabbitai review |
|
✅ Action performedReview finished.
|
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
|
Hi @brennanb2025 @nwparker — could one of you please take a look when you have a chance? This PR has been kept current with If the maintainers prefer a different direction, a quick direction call would also be very helpful. Thanks! |
80579da to
5a71563
Compare
|
Independent verification of the mechanism on macOS arm64 (no Gemini CLI installed, no
|
|
Review verdict: Do not merge as-is; superseded by #21654 → #21678. This broad migration carries the older Gemini/OAuth and quota-mirror assumptions that the maintained Antigravity CLI stack deliberately removes or gates. The current stack has newer tests, configured executable handling, and live |
|
Tester offer, plus one fresh datapoint that makes this path load-bearing rather than a nice-to-have. On Orca 1.4.217 (macOS arm64) I measured the current Gemini-CLI mirror end to end:
So the mirror cannot be rescued by fixing the credential lookup alone — reading the Agy quota directly (this PR) is the only path that can work for Antigravity users. Happy to validate a build of this PR on macOS (Apple Silicon) against a real signed-in |
|
Thanks for the work on this, and for your patience. Orca now reads Antigravity quota from the agy CLI (#24073), has native Antigravity Accounts (#24691), and short pool labels in the status bar (#31007), which covers what this PR set out to do. Closing as superseded; your effort here helped shape the problem, so thank you. |
Summary
Screenshots
Antigravity in Detailed mode (Used). All four Agy buckets are visible, with the same provider also present in the status bar below.
Detailed view preserves the independent Gemini and Claude/GPT five-hour and weekly buckets. Compact view selects the most constrained bucket without losing its reset time.
Related issues
#14571 explores the same host-local quota source with a provider-preserving approach. This PR follows a migration-focused approach because the Gemini CLI usage integration is deprecated: it carries existing preferences and persisted state forward to Agy and removes the migrated Gemini usage-specific paths, while leaving Gemini agent support unchanged.
Testing
pnpm typecheckmain— 6,696 files and 62,509 tests passed; 42 files and 254 tests skipped by their existing conditionspnpm build, including desktop, web, CLI, relay, and macOS native buildspnpm lint, including reliability gates, max-lines ratchet, bundled-skill checks, and localization checksSecurity audit
runProcesswrapper with fixed commands and argument arrays, without shell interpolation.127.0.0.1and a fixed LanguageServer RPC path.Notes
lsof/psdiscovery and relies on Agy logs; paths use Node path APIs.