fix(antigravity): show "Not started" for unused 5-hour quota pools#761
Merged
Conversation
Antigravity's three quota pools (Gemini Pro, Gemini Flash, Claude) are rolling 5-hour windows like Claude's Session and Codex's. When a pool has no usage, the API reports used=0 with resetsAt a full period out, but the UI still rendered a misleading "Resets in 5h" countdown. The "Not started" machinery built for Claude/Codex (#719) already keys off used==0 while now < resetsAt for any widget ID in sessionWindowWidgetIDs — Antigravity just wasn't registered. It reports used=0 directly (no whole-percent floor like Codex), so no mapper change is needed: registering the three widget IDs is enough. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Antigravity's mapper applies used.rounded() to (1 - remainingFraction) * 100, so a pool under ~0.5% used rounds to 0 — not a "direct" zero like Claude. Reword the isFreshSessionWindow comment to reflect this small rounding floor. Comment-only; no behavior change. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit 96398c0. Configure here.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.

TL;DR — Antigravity's quota meters now read "Not started" while a pool's rolling 5-hour window is unused, instead of a misleading "Resets in 5h" countdown — the same treatment Claude and Codex already get.
What was happening
used: 0withresetsAtexactly one full period (5h) out.used: 0,resetsAt = fetchedAt + 5h,periodDurationMs: 18000000.What this changes
used == 0whilenow < resetsAtfor any widget ID insessionWindowWidgetIDs. Antigravity simply wasn't registered.used: 0directly (no whole-percent floor like Codex), so no mapper change is needed — registering the three widget IDs (antigravity.geminiPro,antigravity.geminiFlash,antigravity.claude) is enough.docs/providers/antigravity.md.Heads-up
Tests
swift build— clean.swift test --filter ResetDisplayTests— 10/10 pass, including the regression test extended to cover all three Antigravity IDs.Note
Low Risk
UI-only allow-list extension reusing existing session-window logic; widget IDs match
AntigravityProviderdescriptors.Overview
Antigravity’s Gemini Pro, Gemini Flash, and Claude quota meters now use the same Not started trailing label as Codex and Claude when
used == 0and the rolling 5-hour window hasn’t been consumed yet, instead of a misleading Resets in … countdown.The change registers
antigravity.geminiPro,antigravity.geminiFlash, andantigravity.claudeinsessionWindowWidgetIDsso existingisFreshSessionWindow/boundedTrailingTextbehavior applies with no mapper changes. Docs andResetDisplayTestsare updated to cover all three IDs.Reviewed by Cursor Bugbot for commit 419eb6d. Bugbot is set up for automated code reviews on this repo. Configure here.
Confidence Score: 5/5
Safe to merge — the change is a pure additive registration of three IDs to an existing set; all shared logic and its guards remain unmodified.
The addition is a one-directional widening of a constant set. The underlying isFreshSessionWindow guard already has test coverage for the Codex and Claude cases, and the PR extends that same test loop to all three Antigravity IDs with identical assertions. There are no new code paths, no changed guards, and no mapper modifications. The previous review thread's doc-comment inaccuracy was addressed in the prior commit.
No files require special attention.
Reviews (3): Last reviewed commit: "Merge branch 'main' into fix/antigravity..." | Re-trigger Greptile