Skip to content

fix(quota): prioritize shortTerm 5h quota bucket for hourly quota display - #12

Open
zuluion wants to merge 1 commit into
AndyAWD:mainfrom
zuluion:fix/2026-08-07_fix_hourly_quota_bottleneck
Open

fix(quota): prioritize shortTerm 5h quota bucket for hourly quota display#12
zuluion wants to merge 1 commit into
AndyAWD:mainfrom
zuluion:fix/2026-08-07_fix_hourly_quota_bottleneck

Conversation

@zuluion

@zuluion zuluion commented Aug 7, 2026

Copy link
Copy Markdown

Summary

Fixes an issue where Hourly Available and Hourly Reset incorrectly displayed Weekly quota data in Antigravity 1.1.11+ due to server-side group bottleneck mechanism changes.

Key Changes

  • fetch-local-quota.mjs:
    • Added parseShortTermBuckets() to extract short-term (5h / 3h / hourly) buckets from RetrieveUserQuotaSummary into cache.shortTerm.
    • Enhanced Windows process search robustness (added Where-Object and WMIC fallback).
    • Fixed case-sensitivity check for script direct execution under Windows.
  • statusline-quota.mjs:
    • Updated resolveModelQuota() to prefer cache.shortTerm[pool] (5h bucket) over GetUserStatus bottleneck quota.
  • Tests:
    • Added parseShortTermBuckets test in fetch-local-quota.test.mjs.
    • Added [Test R5] in statusline-quota.test.mjs to verify shortTerm 5h priority over model bottleneck quota.

Test Coverage

  • Verified via fetch-local-quota.test.mjs (All R0 tests passed).
  • Verified via statusline-quota.test.mjs (All R1–R5 tests passed).

Closes #11

修改文件:
└── skills/antigravity-cli-statusline/scripts/
    ├── fetch-local-quota.mjs                  — 新增 parseShortTermBuckets 并增强进程查找
    ├── fetch-local-quota.test.mjs             — 新增短周期配额解析单元测试
    ├── statusline-quota.mjs                   — 优先使用 shortTerm 5h 桶渲染小时配额与重置时间
    └── statusline-quota.test.mjs              — 新增 R5 配额优先级渲染测试
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.

[Bug] Hourly quota and reset countdown incorrectly display weekly quota due to bottleneck mechanism in Antigravity 1.1.11+

1 participant