fix(antigravity): retain unknown usage across CLI quota lanes - #3489
Conversation
The Antigravity quota-summary probe reports one lane per quota bucket
("Gemini 5-hour", "Gemini weekly", "Claude/GPT 5-hour") in
extraRateWindows and synthesizes worst-of-family representatives into
primary/secondary for legacy consumers. The menu bar, the widget, and the
web dashboard render the per-bucket lanes. The CLI text and cards paths
did not: Antigravity sets no extraRateWindowSelector, so the renderer
dropped every bucket and printed only the collapsed "Gemini Models" and
"Claude and GPT" rows.
Detect quota-summary lane IDs in the CLI renderer and render those lanes
in place of the synthetic primary/secondary. Apply the same hide-idle
rule the other surfaces use, so a family at known zero usage drops out.
The legacy modelQuotas path and every other provider are unchanged, and
`codexbar usage --format json` still serializes every lane because it
encodes the snapshot rather than this text.
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: needs maintainer review before merge. Reviewed September 8, 2026, 1:45 AM ET / 05:45 UTC. ClawSweeper reviewWhat this changesRender Antigravity quota buckets individually in CLI text and cards, preserve unknown usage and reset context, and share the text-rendering path. Merge readiness✅ Ready for maintainer review This PR remains useful: current main and v0.56.8 still use collapsed CLI quota rows. The earlier unavailable-usage finding is resolved, the supplied runtime proof supports the changed behavior, and no blocking defect remains. Priority: P2 Review scores
Verification
How this fits togetherCodexBar turns Antigravity quota responses into usage snapshots containing individual buckets and legacy family summaries. CLI renderers project those snapshots into text and cards, while JSON exposes the underlying snapshot. flowchart TD
A[Antigravity quota response] --> B[Usage snapshot]
B --> C[CLI display projection]
C --> D[Shared idle-family rule]
D --> E[Known percentage or unavailable]
E --> F[Usage text and cards]
B --> G[Raw JSON with all buckets]
Before mergeNone. Agent review detailsSecurityNone. Review metrics
Technical reviewBest possible solution: Keep quota availability explicit through every CLI display while reusing family visibility rules and preserving the complete raw snapshot. Do we have a high-confidence way to reproduce the issue? Yes: current-main source shows quota-summary buckets bypassed by the CLI's descriptor-selected rendering, and supplied baseline output demonstrates the omission. This review did not execute the application. Is this the best way to solve the issue? Yes: the CLI-specific projection reuses existing family filtering, carries availability without duplicate state, and leaves shared provider selection and raw JSON intact. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning medium; reviewed against 0cb8c425e2ea. LabelsLabel justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
History |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: bfb3062ce3
ℹ️ About Codex in GitHub
Codex has been enabled to automatically review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
When you sign up for Codex through ChatGPT, Codex can also answer questions or update the PR, like "@codex address that feedback".
Integrate current main and render each quota-summary bucket once in text and cards. Carry availability through full and brief card projections so missing or disabled quota is not presented as an available percentage. Preserve reset context, shared idle-family visibility, and raw JSON. Co-authored-by: Peter Urda <peter.urda@gmail.com>
|
Taking this through maintainer validation. The CLI omission is confirmed, and I have preserved the per-bucket change while fixing unknown usage in text, full cards, and brief cards. Shared rendering removes the duplicated blocks, bringing the production diff below zero lines. Focused suites, the full suite, and isolated executable usage/cards/brief/JSON runs are passing. The runtime checks use the existing ANTIGRAVITY_CLI_PATH override with a synthetic localhost HTTPS backend; no real account data is included in the proof. I am finishing the before/after captures and landing checks. |
Co-authored-by: Peter Urda <peter.urda@gmail.com>
|
Integrating 56d3023 and its parser-level missing/disabled-bucket coverage with the shared-renderer cleanup. I am retaining the nil-based card metric representation, which gives the same unavailable behavior with less duplicated state, and preserving the updated provider documentation. The combined result will keep this branch history fast-forward and include the executable VM proof. |
Antigravity's CLI collapsed quota-summary responses into synthetic family representatives and omitted the individual buckets. Render the visible quota buckets once in usage text and cards, including the separate 5-hour and weekly limits. Keep this projection in the CLI so shared descriptor selection and app menus are unaffected.
Preserve unknown usage through an optional card percentage: missing or disabled quotas display Unavailable without an invented percentage or bar, and brief cards retain an unavailable first quota with its reset context. Existing idle-family rules apply only to display; raw JSON retains every bucket and the legacy family representatives. Legacy Antigravity responses and other providers' known-usage output keep their existing behavior.
Share the duplicated text/card-body rendering and map ordered windows through one metric builder. The final production diff removes 30 lines. Includes the contributor's parser-level missing/disabled-bucket tests, additional full/brief/compact coverage, and updated changelog and provider/CLI documentation. Thanks @urda!
Runtime proof used Developer ID-signed main/candidate CLI builds on macOS 15.4.1 (24E263), with an isolated synthetic HTTPS backend selected through the existing ANTIGRAVITY_CLI_PATH override. The real commands launched the managed backend, discovered its listening port, fetched quota JSON over localhost HTTPS, and rendered the results. No production command, fetching, authentication, or JSON-encoding code was modified. No real account data is included.
The final eight-case matrix passed with exit code 0: baseline/candidate usage, cards, and JSON; an unknown-first brief card; and disabled usage. JSON retained all four lane identities, availability flags, values, periods and reset metadata. Terminal captures show additional successful before/after usage invocations.
Before:

After:

Commands exercised:
Validation: provider/CLI focused suites and output goldens passed; full make test passed all 1,034 selections across 87 groups on the first pass, without retries or timeouts. The subsequently integrated parser cases and architecture gate passed focused validation; production code did not change. make check and independent P0–P2 review passed. All checks passed for head 70ea110, including both macOS test shards and Linux builds: https://github.com/steipete/CodexBar/actions/runs/34191572281.