Repository navigation
feat(rate-limits & i18n): support Antigravity live quota, provider branding, and complete UI localization - #18167
eojonathan wants to merge 16 commits into
Conversation
There was a problem hiding this comment.
Caution
This PR introduces a CI-breaking test plus two regressions in the shared rate-limit polling/service layer that need to be resolved before merge.
Reviewed changes
- Live Antigravity quota fetch — new endpoint discovery (
antigravity-local-endpoint-discovery.ts) scanningps/lsof/netstat+ process tables for the Antigravity language server, and a Connect-RPC client (antigravity-local-usage-fetcher.ts) that reads 5h/weekly buckets and switches between Gemini and 3P (Claude/GPT) windows. - Credential resolution —
gemini-cli-oauth-extractor.tsandgemini-oauth-sources.tsnow discover Antigravity binaries/paths, accept env overrides, and read a broader set of credential/project files. - Gemini fetcher wiring —
fetchGeminiRateLimitstries the local language server first, falling back to the existing OAuth paths. - Poll cadence & provider refresh — global
DEFAULT_POLL_MS/MIN_REFETCH_MStightened, andgemini/antigravityadded to the individually-refreshable provider set. - Branding & i18n — Gemini→Antigravity in settings,
AntigravityIcon, localized status-bar timestamps/countdown, and wrapped orchestration prompt examples.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Important Review skippedWe couldn't safely recover the incremental review. No full review was started, and the last reviewed checkpoint was preserved. Retry later, or explicitly request a full review by commenting You can disable this status message by setting the Use the checkbox below for a quick retry:
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:
Walkthrough
Merge Risk:
|
| Check name | Status | Explanation | Resolution |
|---|---|---|---|
| Docstring Coverage | Docstring coverage is 16.13% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 31 functions across 18 files. | Write docstrings for the functions missing them to satisfy the coverage threshold. | |
| Description check | The description explains the main changes, includes visual proof, and reports testing, but it omits required template sections, including ELI5, Why, a Linked Issue, AI Disclosure, Review, Agent skill … | Add the missing template sections. Include a valid issue reference under Linked Issue, provide the requested rationale and review details, complete the cross-platform and compatibility notes, and confirm the checklist items or explain why t… |
✅ Passed checks (3 passed)
-
Check name Status Explanation Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request. Title check ✅ Passed The title clearly identifies the main changes: Antigravity live quota support, provider branding, and UI localization.
Full details: Description check
-
Explanation
The description explains the main changes, includes visual proof, and reports testing, but it omits required template sections, including ELI5, Why, a Linked Issue, AI Disclosure, Review, Agent skill upstream boundary, Notes, and the checklist.
Resolution
Add the missing template sections. Include a valid issue reference under Linked Issue, provide the requested rationale and review details, complete the cross-platform and compatibility notes, and confirm the checklist items or explain why they do not apply.
Finishing Touches
-
Resolve merge conflicts
-
- Resolve merge conflict in branch
fix/antigravity-quota-credentials
- Resolve merge conflict in branch
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
There was a problem hiding this comment.
Actionable comments posted: 6
🧹 Nitpick comments (3)
src/main/rate-limits/gemini-usage-fetcher.test.ts (1)
30-32: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winCover the successful local-result branch.
This module-level mock always returns
null, so tests in this file bypass the new early return. Add a test that returns anoklocal result and verifies that OAuth fallback is not used. Keep a null or rejection case for fallback coverage.src/renderer/src/lib/orchestration-usage-examples.ts (1)
17-18: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winUse an intent-named interpolation placeholder.
The new prompts use
{{value0}}and{ value0: ... }. Rename this consistently to a name such as{{orchestrationCommand}}, and update the matching catalog entries and options objects.Based on learnings, new user-facing strings should use intent-named localization IDs with named interpolation placeholders.
Also applies to: 33-34, 46-47, 62-63, 78-79
Source: Learnings
src/renderer/src/components/settings/accounts-search.ts (1)
102-110: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low valueStale "experimental" search keyword.
This entry's title and description drop the "(experimental)" wording, matching the settings-panel rebrand. The keywords list on line 120 still keeps the
experimentalkeyword ('auto.components.settings.accounts.search.b7c2cee442'), while the corresponding keywords array inaccounts-pane-provider-setting-sections.tsxalready removed it. Remove the same keyword here for consistency.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 74d2bc40-759a-49f3-a853-628a965025fa
📥 Commits
Reviewing files that changed from the base of the PR and between e5a1e79 and 3b2360033f18d344872d54518e1ee3a30cb310cb.
📒 Files selected for processing (18)
src/main/rate-limits/antigravity-local-endpoint-discovery.tssrc/main/rate-limits/antigravity-local-usage-fetcher.test.tssrc/main/rate-limits/antigravity-local-usage-fetcher.tssrc/main/rate-limits/antigravity-usage-mirror.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.tssrc/main/rate-limits/gemini-usage-fetcher.tssrc/main/rate-limits/service/service-types.tssrc/renderer/src/components/settings/accounts-pane-provider-setting-sections.tsxsrc/renderer/src/components/settings/accounts-search.tssrc/renderer/src/components/status-bar/UsageRosterPanel.tsxsrc/renderer/src/components/status-bar/icons.tsxsrc/renderer/src/components/status-bar/tooltip.tsxsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/orchestration-usage-examples.tssrc/shared/global-settings-types.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
| const serverPort = Number.parseInt(serverPortStr, 10) | ||
| if (serverPort > 0 && serverPort <= 65535) { | ||
| endpoints.push({ port: serverPort, isHttps: true, csrfToken: csrf }) | ||
| endpoints.push({ port: serverPort, isHttps: false, csrfToken: csrf }) |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -e
printf '%s\n' '--- relevant repository conventions ---'
find /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4 -maxdepth 2 -type f -name '*.md' -print
printf '%s\n' '--- endpoint discovery ---'
cat -n src/main/rate-limits/antigravity-local-endpoint-discovery.ts | sed -n '1,230p'
printf '%s\n' '--- usage fetcher contract and request sink ---'
ast-grep outline src/main/rate-limits/antigravity-local-usage-fetcher.ts
cat -n src/main/rate-limits/antigravity-local-usage-fetcher.ts | sed -n '1,155p'Repository: stablyai/orca
Length of output: 17553
Sensitive Data Exposure (CWE-319): Cleartext Transmission of Sensitive Information
Reachability: Internal · Exploitability: Difficult
Do not attach the CSRF token to HTTP candidates.
requestRpcJson sends X-Codeium-Csrf-Token for both transports. Keep csrfToken only on HTTPS candidates to prevent cleartext transmission over the loopback connection.
| port, | ||
| path, | ||
| method: 'POST', | ||
| rejectUnauthorized: false, |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟠 Major | 🏗️ Heavy lift
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- repository conventions ---'
find /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4 -path '*/conventions/*' -type f -print -exec sh -c 'echo "--- $1"; cat "$1"' sh {} \;
printf '%s\n' '--- target outline ---'
ast-grep outline src/main/rate-limits/antigravity-local-usage-fetcher.ts
printf '%s\n' '--- target implementation ---'
cat -n src/main/rate-limits/antigravity-local-usage-fetcher.ts | sed -n '1,150p'
printf '%s\n' '--- endpoint discovery contract ---'
cat -n src/main/rate-limits/antigravity-local-endpoint-discovery.ts | sed -n '1,240p'Repository: stablyai/orca
Length of output: 18357
🏁 Script executed:
#!/bin/bash
set -eu
cat -n src/main/rate-limits/antigravity-local-usage-fetcher.ts | sed -n '141,245p'Repository: stablyai/orca
Length of output: 3934
Security Misconfiguration (CWE-295): Improper Certificate Validation
Exploitability: Difficult
Authenticate the local usage endpoint.
rejectUnauthorized: false disables HTTPS peer authentication, and endpoint discovery also probes the same port over plain HTTP. A local process can therefore supply forged quota data, including on a request carrying X-Codeium-Csrf-Token. Use a trusted certificate or public-key pin, and remove the HTTP fallback.
There was a problem hiding this comment.
Actionable comments posted: 3
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 65cc7825-dc7b-46c9-a00b-9ca687845a99
📥 Commits
Reviewing files that changed from the base of the PR and between 3b2360033f18d344872d54518e1ee3a30cb310cb and fa9eb0318da8c693d1a8205b32ecb297841cadc3.
📒 Files selected for processing (8)
src/main/rate-limits/antigravity-local-usage-fetcher.test.tssrc/main/rate-limits/antigravity-local-usage-fetcher.tssrc/main/rate-limits/gemini-oauth-sources.tssrc/main/rate-limits/gemini-usage-fetcher.test.tssrc/main/rate-limits/service/service-types.tssrc/renderer/src/components/settings/accounts-search.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/orchestration-usage-examples.ts
💤 Files with no reviewable changes (1)
- src/renderer/src/components/settings/accounts-search.ts
🚧 Files skipped from review as they are similar to previous changes (4)
- src/main/rate-limits/antigravity-local-usage-fetcher.test.ts
- src/renderer/src/lib/orchestration-usage-examples.ts
- src/main/rate-limits/gemini-oauth-sources.ts
- src/renderer/src/i18n/locales/en.json
Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.
| const timer = setTimeout(() => { | ||
| req.destroy() | ||
| settle({ ok: false, error: 'timeout' }) |
There was a problem hiding this comment.
🩺 Stability & Availability | 🟠 Major | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- repository conventions and learnings ---'
find /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4 -maxdepth 2 -type f -name '*.md' -print
printf '%s\n' '--- target file ---'
cat -n src/main/rate-limits/antigravity-local-usage-fetcher.ts
printf '%s\n' '--- package/runtime declarations ---'
for f in package.json .nvmrc .node-version; do
if [ -f "$f" ]; then
echo "--- $f"
cat -n "$f"
fi
doneRepository: stablyai/orca
Length of output: 38916
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- rate-limit learnings ---'
cat /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/learnings/src-main-rate-limits.md
printf '%s\n' '--- scoped conventions ---'
cat /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/conventions/repo-wide.md
printf '%s\n' '--- rate-limit files and references ---'
git ls-files 'src/main/rate-limits' '*rate-limit*' | sed -n '1,160p'
rg -n --glob '*.{ts,tsx,js,mjs}' 'requestRpcJson|antigravity-local-usage-fetcher|X-Codeium-Csrf-Token|CONNECT_RPC_TIMEOUT_MS' src testsRepository: stablyai/orca
Length of output: 11326
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- focused regression tests ---'
cat -n src/main/rate-limits/antigravity-local-usage-fetcher.test.ts
printf '%s\n' '--- Node runtime ---'
node --version
printf '%s\n' '--- Node http.request header-validation behavior ---'
node - <<'JS'
const http = require('node:http')
for (const value of ['ok', 'bad\nvalue', 'bad\r\nvalue']) {
try {
http.request({
hostname: '127.0.0.1',
port: 1,
method: 'POST',
headers: { 'X-Codeium-Csrf-Token': value }
})
console.log(JSON.stringify(value), 'did not throw synchronously')
} catch (error) {
console.log(JSON.stringify(value), 'threw synchronously:', error.code, error.message)
}
}
JSRepository: stablyai/orca
Length of output: 8584
Handle synchronous request-construction failures.
If http.request throws during header validation, the promise rejects before req is assigned. The timer remains active and later reads the uninitialized req binding, which can raise an uncaught ReferenceError. Catch the construction error, call settle, and clear the timer. Add a regression test under Node 24.
| settle({ ok: false, error: 'response too large' }) | ||
| return | ||
| } | ||
| data += chunk |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
printf '%s\n' '--- applicable repository conventions ---'
find /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4 -maxdepth 2 -type f -name '*.md' -print | sort
printf '%s\n' '--- target file outline ---'
ast-grep outline src/main/rate-limits/antigravity-local-usage-fetcher.ts
printf '%s\n' '--- target implementation ---'
sed -n '1,180p' src/main/rate-limits/antigravity-local-usage-fetcher.ts
printf '%s\n' '--- relevant IncomingMessage/encoding usage ---'
rg -n -C 3 'IncomingMessage|setEncoding|data \+= chunk|planType|antigravity-local-usage-fetcher' src/mainRepository: stablyai/orca
Length of output: 50369
🏁 Script executed:
printf '%s\n' '--- rate-limit conventions ---'
cat /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/conventions/repo-wide.md
cat /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/learnings/src-main-rate-limits.md
printf '%s\n' '--- focused tests around response handling ---'
sed -n '1,210p' src/main/rate-limits/antigravity-local-usage-fetcher.test.ts
printf '%s\n' '--- remaining target flow ---'
sed -n '100,290p' src/main/rate-limits/antigravity-local-usage-fetcher.tsRepository: stablyai/orca
Length of output: 13866
Preserve UTF-8 across response chunks.
Without res.setEncoding('utf8'), IncomingMessage emits Buffer chunks. data += chunk decodes each chunk independently, so a split multibyte character can corrupt the JSON before JSON.parse(). Set the encoding before reading, or concatenate buffers and decode once.
| @@ -68,8 +68,7 @@ export type ActiveWindowRefreshPlan = | |||
| | { kind: 'full' } | |||
| | { kind: 'providers'; providers: ActiveRateLimitProvider[] } | |||
|
|
|||
| // Why: Claude's usage endpoint has a tight budget and quota is only informational; prefer a recent snapshot over polling into 429s. | |||
| export const DEFAULT_POLL_MS = 15 * 60 * 1000 // 15 minutes | |||
| export const DEFAULT_POLL_MS = 15 * 60 * 1000 // 15 minutes — safe cadence to avoid tight cloud 429 rate limits | |||
There was a problem hiding this comment.
🚀 Performance & Scalability | 🟡 Minor | ⚡ Quick win
🔎 Supported by static analysis
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- repository knowledge scopes ---'
find /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4 -maxdepth 2 -type f -name '*.md' -print
printf '%s\n' '--- target file ---'
cat -n src/main/rate-limits/service/service-types.ts
printf '%s\n' '--- rate-limit service files ---'
find src/main/rate-limits -type f -maxdepth 5 -print
printf '%s\n' '--- related symbols and Antigravity references ---'
rg -n -S 'DEFAULT_POLL_MS|Antigravity|antigravity|poll|refresh|quota|60.?seconds|60.?000' src/main/rate-limits src/main --glob '!**/node_modules/**' | head -300Repository: stablyai/orca
Length of output: 50369
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- applicable repository convention ---'
cat /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/conventions/repo-wide.md
printf '%s\n' '--- applicable rate-limit learning ---'
cat /tmp/coderabbit-repo-knowledge/stablyai-orca-89dc44e4/learnings/src-main-rate-limits.md
printf '%s\n' '--- polling implementation ---'
cat -n src/main/rate-limits/service/service-polling.ts
printf '%s\n' '--- state and configuration ---'
cat -n src/main/rate-limits/service/service-state.ts
cat -n src/main/rate-limits/service/service-configuration.ts
printf '%s\n' '--- provider cycles and application ---'
cat -n src/main/rate-limits/service/service-provider-cycles.ts
cat -n src/main/rate-limits/service/service-full-cycle-application.ts
printf '%s\n' '--- Antigravity mirror ---'
cat -n src/main/rate-limits/antigravity-usage-mirror.tsRepository: stablyai/orca
Length of output: 41063
🏁 Script executed:
#!/bin/bash
set -eu
printf '%s\n' '--- fetchAll binding and timer setup ---'
cat -n src/main/rate-limits/service/service-fetch-queue.ts
cat -n src/main/rate-limits/service.ts
printf '%s\n' '--- polling interval callers ---'
rg -n -S 'setPollingInterval|pollInterval|start\(' src/main src --glob '*.ts' --glob '!**/*.test.ts' | head -160
printf '%s\n' '--- Gemini fetch preparation ---'
rg -n -S 'fetchGemini|geminiResult|runFetchAllCycle|fetchAll' src/main/rate-limits/service/service-full-cycle-preparation.ts src/main/rate-limits/service/service-fetch-control.ts src/main/rate-limits/service/service-fetch-queue.tsRepository: stablyai/orca
Length of output: 27382
Add a provider-specific 60-second refresh path for Antigravity. RateLimitServicePolling uses DEFAULT_POLL_MS, and RateLimitServiceFullCycleApplication derives Antigravity from the Gemini result in that cycle. No separate path exists, so quota data can remain stale for up to 15 minutes. Do not lower the global default.
There was a problem hiding this comment.
Important
One prior concern remains unresolved and blocks merge: the local Connect-RPC contract is unverified.
Reviewed changes (delta against the prior Pullfrog review)
- Fixed the CI-breaking test —
antigravity-local-usage-fetcher.test.tsnow seeds thepsdiscovery branch viarunProcessMock, sodiscoverAntigravityEndpointsreturns an endpoint on Linux/macOS (verified: 13 tests pass locally). - Reverted the shared polling regressions —
DEFAULT_POLL_MS(15m) andMIN_REFETCH_MS(5m) are back to their pre-PR values, andgemini/antigravitywere dropped fromINDIVIDUALLY_REFRESHABLE_PROVIDERS, restoringfetchAll()-based recovery for those providers. - Hardened the Connect-RPC client —
requestRpcJsongained a 5MB response cap, a single-settlement guard, explicit response/request error handlers, and a timer-based timeout, plus a comment explainingrejectUnauthorized: false. - Fixed credential persistence —
saveGeminiCredentialsnow writes tolastActiveCredsPath(previously it always renamed toOAUTH_CREDS_PATH) and merges refreshed tokens into the existinggoogle/oauth/credentialsshape instead of clobbering the file. - Completed the localization cleanup — orchestration placeholders renamed
{{value0}}→{{orchestrationCommand}}, and the staleexperimentalsearch keyword was removed.
⚠️ Local Connect-RPC contract still unconfirmed
The new commit added the requested rejectUnauthorized comment, but the substantive question from the prior review stands: the CSRF header is X-Codeium-Csrf-Token (a Codeium/Windsurf vendor name) and the RPC paths are /exa.language_server_pb.LanguageServerService/..., neither of which matches the PR description's google.internal.antigravity.v1.AntigravityService/GetUserStatus. If either is wrong, the local server rejects every request and the headline "live quota" feature silently degrades to the OAuth fallback, which the author should rule out before this ships.
Technical details
# Verify the Antigravity language-server Connect-RPC contract
## Affected sites
- src/main/rate-limits/antigravity-local-usage-fetcher.ts:85 — `X-Codeium-Csrf-Token` header
- src/main/rate-limits/antigravity-local-usage-fetcher.ts:143 — `/exa.language_server_pb.LanguageServerService/RetrieveUserQuotaSummary`
- src/main/rate-limits/antigravity-local-usage-fetcher.ts:153 — `/exa.language_server_pb.LanguageServerService/GetUserStatus`
## Required outcome
- Confirm the CSRF header name and both service paths against the actual Antigravity language-server contract, and correct them or document why the Codeium-named identifiers are in fact correct.
## Open questions for the human
- Is `exa.language_server_pb` / `X-Codeium-Csrf-Token` genuinely the Antigravity LS wire protocol, or was it lifted from a Codeium/Windsurf client?DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Thanks for the thorough review! To clarify the wire protocol question regarding \�xa.language_server_pb\ and \X-Codeium-Csrf-Token: The local Google Antigravity Language Server binary (\language_server_windows_x64.exe\ / \�gy) is built upon the Codeium/Exa Language Server architecture.
This has been validated with live Antigravity Language Server sessions, successfully retrieving real-time 5h/weekly quotas. We have also documented this in the codebase comments in commit \ |
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes (delta against the prior pullfrog review)
- Localized the sidebar section title —
SidebarHeadernow rendersProjects/Workspacesviatranslate('auto.components.sidebar.SidebarHeader.projects', 'Projects')(and.workspaces) instead of hardcoded strings, with the twoen.jsonkeys added underSidebarHeader. Non-English locales fall back to the English defaults until their translators catch up, matching the repo's incremental-localization contract.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: fd7536a2-09c7-4cad-a93b-74c2fd14555b
📥 Commits
Reviewing files that changed from the base of the PR and between 08bff116f190c2b8d06f484058afd05a7a5a153a and c586b41f333f8c553fd497efde4b0e8a4b6fdd54.
📒 Files selected for processing (2)
src/renderer/src/components/sidebar/SidebarHeader.tsxsrc/renderer/src/i18n/locales/en.json
🚧 Files skipped from review as they are similar to previous changes (1)
- src/renderer/src/i18n/locales/en.json
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
Configuration used: Repository UI
Review profile: CHILL
Plan: Team
Run ID: 94c5f0e8-4d10-43cb-b612-32b7e3801ae7
📥 Commits
Reviewing files that changed from the base of the PR and between c586b41f333f8c553fd497efde4b0e8a4b6fdd54 and a002ec5d090a97d148243ea35b29260ce502a279.
📒 Files selected for processing (1)
src/main/rate-limits/antigravity-local-endpoint-discovery.ts
Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.
There was a problem hiding this comment.
ℹ️ No critical issues — one minor suggestion inline.
Reviewed changes (delta against the prior Pullfrog review)
- Prioritized HTTPS in Antigravity endpoint discovery —
discoverAntigravityEndpointsnow returns HTTPS candidates before HTTP fallbacks (previously thenetstat/lsofbranches surfacedisHttps: falsefirst), avoiding the TLS handshake error produced when probing an HTTPS-only language server over HTTP. Discovered CSRF tokens are now also threaded onto thenetstat/lsof-derived endpoints.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes (delta against the prior Pullfrog review)
- PID-scoped CSRF matching —
parseNetstatListeningPorts/parseLsofListeningPortsnow return{port, pid}objects, anddiscoverAntigravityEndpointslooks upcsrfByPid.get(pid)per discovered port instead of applying a singlelatestCsrfto every endpoint. This resolves the priorcsrfByPid-dead-code nit and removes the "last process scanned" heuristic, so a second concurrentagy/language_serverprocess can no longer attach the wrong CSRF token to unrelated ports. - Reactive sidebar localization — the memoized
SidebarHeadernow subscribes to language changes viauseTranslation(), so itsProjects/Workspacestitles (rendered through the imperativetranslate) re-render on locale switch instead of going stale until an unrelated state update.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
083912a to
8aa0a07
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes (delta against the prior Pullfrog review)
- Rebased onto current
main— the branch was force-pushed as a pure rebase: all 13 commit subjects are unchanged from the previously-reviewed head083912a, only the SHAs changed. No PR-authored content changed. The rebase absorbed the "New agent dashboard" rewrite ofSidebarHeader(itsagentsViewActive/activityLabel/acknowledgeIntrocode now surrounds the PR'stranslate()-basedProjects/Workspacestitle) and the baseen.jsonkey churn.
Verification (no conflict markers, en.json parses with no duplicate keys, projects/workspaces/Antigravity/orchestration/tooltip keys intact, PID-scoped CSRF csrfByPid.get(pid) with no latestCsrf remnant, HTTPS-first endpoint ordering preserved).
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
|
Tested this locally on macOS arm64 (Orca 1.4.194, Antigravity 2.12.2 / agy 1.1.22). Prior to this patch, the Antigravity status bar segment was stuck on "Antigravity usage is not available" because Google deprecated individual access through the legacy Gemini CLI endpoint (returning UNSUPPORTED_CLIENT). After applying the local Connect-RPC discovery logic ( Looks solid and verified working on real hardware. Thanks for the fix! |
|
Thank you so much for taking the time to test this on macOS arm64 hardware, @hongvincent! 🙌 Really appreciate the confirmation that the Connect-RPC discovery and quota parsing seamlessly picked up the live session (5h) and weekly windows on Apple Silicon. Cheers! 🚀 |
8aa0a07 to
773fb00
Compare
There was a problem hiding this comment.
ℹ️ No critical issues — one minor suggestion inline.
Reviewed changes (delta against the prior Pullfrog review)
- Rebased onto current
main(bba68b1b) — a second pure rebase: all 13 PR commit subjects are unchanged from the prior reviewed head8aa0a077, only SHAs changed. The new rate-limit modules, the OAuth extractor/sources, the orchestration examples, and the status-bar components are byte-identical; shared files differ only bymainchurn (MiniMax endpoint/apiKey, terminal contrast floor,DebouncedSettingsTextInput). - Absorbed main's runtime-required catalog —
en-runtime-required.jsonis newly in scope, and the PR now adds its i18n keys to this boot-bundle catalog.
DeepSeek Pro (free via Pullfrog for OSS) | 𝕏
773fb00 to
4885e25
Compare
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes (delta against the prior pullfrog review)
- Pruned orphaned localization keys — removed the dead Gemini-branded
AccountsPanekeys (0c64dc2a64,0c7f915b01,96f3649526,973741a871,c2aee76420,d676c41fc6), the orphaneduseAntigravityCredentialsExp, and theaccounts.searchb7c2cee442/bada4a3218/d819755b02block fromen.jsonand thees/fr/ja/ko/zhlocales, so the boot bundle no longer carries stale "Gemini"/"(experimental)" copy. - Trimmed the runtime-required catalog — dropped the two
SidebarHeaderentries (moreActions,workspaces) whose reader was superseded by main's dashboard rewrite;en-runtime-required.jsonnow matchesmainexactly and drops out of the PR diff.
Verified on this head: the runtime-required generator reports no missing, contradicting, or superfluous entries, and the localization catalog, extraction, and coverage checks all pass.
openrouter/deepseek/deepseek-v4.1-flash (free via Pullfrog for OSS) | 𝕏
4885e25 to
a703705
Compare
f645317 to
6c8ced4
Compare
There was a problem hiding this comment.
Important
The status-bar reset label now interpolates through translate(), but the existing UsageRosterPanel test mock does not, so UsageRosterPanel.test.tsx > uses one shared clock for live reset labels across the roster fails on this head. CI runs that file, so the PR is red until the test is updated.
Reviewed changes (delta against the prior pullfrog review)
- Re-reviewed the credential-write refactor —
saveGeminiCredentialsnow selects the nested credential object with a ternary and mutates it in one block; confirmed semantics-preserving against the previously reviewed revision (same first-truthy-object pick, same merge fallback, same stringify). - Rebased onto current
main— force-pushed again; all 15 commit subjects are unchanged and the PR-authored file content matches the previously reviewed revision. The only shared files that differ (en.json+ siblings,global-settings-types.ts) differ bymainchurn only. - Ran the focused suites — the rate-limit tests pass (21 tests); the full
status-barsuite is 374/375, with the single failure flagged inline.
DeepSeek Flash (free via Pullfrog for OSS) | 𝕏
| @@ -77,7 +77,7 @@ function soonestResetLabel(sections: UsageSection[], now: number): string | null | |||
| if (resets.length === 0) { | |||
| return null | |||
| } | |||
| return formatResetCountdown(Math.min(...resets) - now) | |||
| return formatLocalizedResetCountdown(Math.min(...resets) - now) | |||
There was a problem hiding this comment.
This line breaks an existing test. Routing soonestResetLabel through formatLocalizedResetCountdown means the label is interpolated by translate(..., { value0 }), but UsageRosterPanel.test.tsx:15 mocks translate as (_key, fallback) => fallback and discards the options. The row therefore renders the literal Resets in {{value0}}, so expect(markup).toContain('Resets in 2m') (test line 131) fails. Verified: the test passes when this line uses formatResetCountdown and fails with formatLocalizedResetCountdown; the production path itself is correct.
Technical details
# Update the UsageRosterPanel translate mock to interpolate
## Affected sites
- src/renderer/src/components/status-bar/UsageRosterPanel.tsx:80 — calls `formatLocalizedResetCountdown`, which interpolates `{{value0}}` via `translate()`
- src/renderer/src/components/status-bar/UsageRosterPanel.test.tsx:14-16 — `vi.mock('@/i18n/i18n')` returns `fallback` verbatim, dropping the options argument
- src/renderer/src/components/status-bar/UsageRosterPanel.test.tsx:131 — `expect(markup).toContain('Resets in 2m')` is the failing assertion
## Required outcome
- The suite passes on this head: the test's `translate` mock must apply `{{value0}}` interpolation (or the assertion must be adjusted) so it mirrors production. The test file is not part of the PR diff, so it needs a change alongside this line.
## Suggested approach (optional)
- Replace the mock with one that substitutes `{{name}}` tokens from the options argument, e.g. `translate: (_key, fallback, options) => options ? fallback.replace(/\{\{(\w+)\}\}/g, (_m, k) => String(options[k] ?? '')) : fallback`.6c8ced4 to
5217a39
Compare
…olution # Conflicts: # src/main/rate-limits/gemini-cli-oauth-extractor.ts # src/main/rate-limits/gemini-oauth-sources.ts
…ta RPC # Conflicts: # src/main/rate-limits/gemini-usage-fetcher.test.ts # src/main/rate-limits/gemini-usage-fetcher.ts
…ng cadence # Conflicts: # src/main/rate-limits/service/service-types.ts
# Conflicts: # src/renderer/src/i18n/locales/en.json
…m Antigravity accounts
# Conflicts: # src/renderer/src/components/status-bar/tooltip.tsx # src/renderer/src/i18n/locales/en.json
…safety # Conflicts: # src/main/rate-limits/gemini-oauth-sources.ts # src/main/rate-limits/gemini-usage-fetcher.test.ts # src/main/rate-limits/service/service-types.ts
… avoid TLS handshake error
…Header and PID-scoped CSRF matching # Conflicts: # src/renderer/src/i18n/en-runtime-required.json
…nd runtime catalog # Conflicts: # src/renderer/src/i18n/en-runtime-required.json
… tooltip syntax and test mock
5217a39 to
ceb2fa3
Compare
|
Thanks for this, @eojonathan, and for keeping it rebased for so long. Main now covers what this PR adds, so I'm closing it as superseded:
If you see a quota case the agy-CLI path misses (for example IDE-only installs), please open an issue with the details. We'd be glad to look at it. |





Adds live Google Antigravity quota tracking via local Connect-RPC, updates provider settings and branding to Antigravity, and adds complete UI localization for orchestration prompts and status bar.
📸 Visual Proofs / Demonstration
Here are screenshots from the running desktop application showcasing the implementation in action:
1. Live Quota in Status Bar (Dual-bar Monitor & Provider Menu)
Real-time session (5h) and weekly quota tracking queried via local Language Server RPC, with the official Google Antigravity branding and icon:
2. Settings & Account Management
Dedicated Google Antigravity account toggle with official
AntigravityIconand status bar toggle:English Version
Key Changes
GetUserStatus) to track 5h and weekly quota usage every 60 seconds with a clean 2-bar presentation.AntigravityIconand removed the(experimental)label.translate()), status bar reset countdowns, and relative update timestamps.Testing & Verification
pnpm tcpasses across all workspace packages without type errors.pnpm test).Versão em Português
Principais Alterações
AntigravityIconoficial e remoção da etiqueta(experimental).Testes e Verificação
pnpm tcpassa sem erros em todos os projetos.pnpm test).