Skip to content

feat(usage): Antigravity quota grouping and auto-ping scheduler - #82

Open
mahdiwafy wants to merge 4 commits into
Vanszs:mainfrom
mahdiwafy:pr/antigravity-quota-tracker
Open

feat(usage): Antigravity quota grouping and auto-ping scheduler#82
mahdiwafy wants to merge 4 commits into
Vanszs:mainfrom
mahdiwafy:pr/antigravity-quota-tracker

Conversation

@mahdiwafy

Copy link
Copy Markdown

Summary

Refactor Antigravity usage parsing to group models into quotas buckets (Gemini vs Claude/GPT) as enforced by the upstream API, and add an Auto-Ping scheduler to keep windows warm.

Changes

  1. Quota Grouping: open-sse/services/usage/google.js no longer loops through 10 repeated models. It now parses the response and outputs two specific buckets:

    • gemini_bucket: Represents the shared limits for all Gemini models.
    • claude_gpt_bucket: Represents the shared limits for Claude and GPT-OSS models.
    • This directly fixes the UI on /dashboard/usage to show 2 progress bars instead of 10 repeated/misleading rows.
  2. Auto Ping Scheduler: Added antigravity to the Auto Ping scheduler (src/shared/services/quotaAutoPing.js & config.js).

    • Dashboard users can now toggle a lightning bolt ⚡ to auto-ping their Antigravity connection when the 5-hour window resets.
    • The ping sends a tiny 1-token "hi" request using gemini-3.5-flash-low to immediately restart the quota window.

Verification

  • npm run lint:undef — clean
  • Rebuilt Docker image successfully.
  • Verified dashboard now shows exactly 2 buckets (Gemini & Claude/GPT) with correct remaining percentages.

Adds tracking-based weekly usage buckets alongside the existing 5H windows:
- New antigravityWeeklyTracker module: counts request rows in usageHistory
  for the last 7 days, grouped into Gemini / Claude+GPT buckets
- getAntigravityUsage accepts connectionId and attaches gemini_weekly +
  claude_gpt_weekly buckets with estimated totals (4000 req/week)
- parseQuotaData forwards isWeekly flag; QuotaTable shows a 'Weekly'
  badge and tilde-prefixed reset countdown for weekly rows
…tdown

- parseQuotaData skips raw_gemini/raw_claude internal payloads that were
  rendering as misleading 0/∞ rows (Gemini 3.5 Flash (High) / GPT-OSS)
- Weekly reset now starts from each bucket's first use + 7 days,
  matching Antigravity's behavior where the weekly window countdown
  begins on first request (same principle as the 5H window)
@mahdiwafy
mahdiwafy force-pushed the pr/antigravity-quota-tracker branch from b3b473a to 621afd5 Compare July 31, 2026 03:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant