Skip to content

fix(antigravity): show "Not started" for unused 5-hour quota pools#761

Merged
robinebers merged 3 commits into
mainfrom
fix/antigravity-not-started
Jun 27, 2026
Merged

fix(antigravity): show "Not started" for unused 5-hour quota pools#761
robinebers merged 3 commits into
mainfrom
fix/antigravity-not-started

Conversation

@robinebers

@robinebers robinebers commented Jun 27, 2026

Copy link
Copy Markdown
Owner

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

  • Antigravity's three quota pools (Gemini Pro, Gemini Flash, Claude) are rolling 5-hour windows, just like Claude's Session and Codex's session/weekly meters.
  • When a pool has no usage yet, the API reports used: 0 with resetsAt exactly one full period (5h) out.
  • The UI rendered this as "Resets in 5h", implying the window was already counting down when nothing had been spent. Verified against the live API on a machine running Antigravity: all three pools showed used: 0, resetsAt = fetchedAt + 5h, periodDurationMs: 18000000.

What this changes

  • The "Not started" machinery built for Claude/Codex in feat(pacing): show "Not started" for unused Codex/Claude sessions #719 already keys off used == 0 while now < resetsAt for any widget ID in sessionWindowWidgetIDs. Antigravity simply wasn't registered.
  • Antigravity reports used: 0 directly (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.
  • Unused pools now show "Not started" on the trailing label, a calm level bar with no pace tick, and the shared hover copy ("Sessions start after you send your first message."). Once a model is used, that pool's row returns to its normal reset countdown.
  • Updated the two doc-comments that said "Codex and Claude only" and documented the behavior in docs/providers/antigravity.md.

Heads-up

  • Each pool is evaluated independently, so a used pool still shows its live countdown while unused pools read "Not started" — which is correct.
  • The shared tooltip says "Sessions start after your first message"; generically fine for Antigravity's per-pool windows, but a pool-specific copy tweak could follow later if desired.

Tests

  • swift build — clean.
  • swift test --filter ResetDisplayTests — 10/10 pass, including the regression test extended to cover all three Antigravity IDs.
  • Built and launched the dev app against live Antigravity data to confirm the rows flip to "Not started".

Note

Low Risk
UI-only allow-list extension reusing existing session-window logic; widget IDs match AntigravityProvider descriptors.

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 == 0 and the rolling 5-hour window hasn’t been consumed yet, instead of a misleading Resets in … countdown.

The change registers antigravity.geminiPro, antigravity.geminiFlash, and antigravity.claude in sessionWindowWidgetIDs so existing isFreshSessionWindow / boundedTrailingText behavior applies with no mapper changes. Docs and ResetDisplayTests are 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

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>
Comment thread Sources/OpenUsage/Models/WidgetData.swift Outdated
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>

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Cursor Bugbot has reviewed your changes using default effort and found 1 potential issue.

Fix All in Cursor

❌ 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.

Comment thread Sources/OpenUsage/Models/WidgetData.swift
@robinebers robinebers merged commit 7530469 into main Jun 27, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant