Skip to content

feat(providers): add Grok Bot weekly quota adapter and fix bar/balance display - #101

Closed
DotRedstone wants to merge 3 commits into
bernardopg:mainfrom
DotRedstone:feat/grokbot-and-quota-fixes
Closed

DotRedstone wants to merge 3 commits into
bernardopg:mainfrom
DotRedstone:feat/grokbot-and-quota-fixes

Conversation

@DotRedstone

Copy link
Copy Markdown
Contributor

Summary

  • Grok Bot (grokbot / grok-bot) provider: Reads weekly Grok Bot Plan usage and reset timestamps from the signed-in Grok Bot desktop session (sand-secrets.json) via GetSandUsageStatus Connect-RPC (keeping credentials off argv via curl --config), with fallback to the local sand-client-persistence snapshot (preserving original readAtMs fetch timestamps and clamping expired windows) when offline. Includes monochrome silhouette SVG logo, 5-locale translations, health checks, provider documentation, and offline fixture tests (tests/test-grokbot.sh).
  • Exhausted multi-window promotion: Surfaces exhausted (>=100% used) secondary or tertiary quota windows on the bar pill and card header when no explicit barWindowOverrides slot is configured, preventing rate-limited accounts (e.g. Codex or Claude with an exhausted 7-day window and an idle 0% 5-hour window) from displaying 100% left in green.
  • Prepaid balance pill & header formatting: Renders formatted currency balances directly in the bar pill and card header for prepaid balance windows (such as DeepSeek, Kimi API, and Vercel AI Gateway) instead of synthetic percentages, while keeping non-balance informational strings out of compact bar pills.
  • Antigravity local Connect-RPC fast path: Queries the running local language_server Connect-RPC endpoint when available so live multi-group pools (including Gemini 4 Argon) and per-window reset countdowns stay synchronized with the IDE.

Related issues

None.

Type of change

  • New provider
  • Bug fix
  • Enhancement
  • Documentation / i18n
  • CI / tooling

Checklist

  • plugin.json .version and CHANGELOG.md are consistent (only if this is a release-bearing change; both version pills read the manifest at runtime)
  • New/changed provider scripts are executable and emit valid JSON
  • i18n/en.json keys have translations in every locale (or the strings are user-neutral)
  • Every commit is signed off (git commit -s) under the DCO
  • CI is green

Promote exhausted (>=100% used) secondary or tertiary quota windows on the bar pill and card header when no explicit barWindowOverrides slot is configured, preventing rate-limited multi-window accounts from showing 100% left after their 5-hour window decays.

Also render currency balances directly on the bar pill and card header for prepaid balance windows instead of synthetic percentages.

Signed-off-by: dotredstone <[email protected]>
…er RPC

Query the running local Antigravity language_server Connect-RPC endpoint when available so multi-group pools (including Gemini 4 Argon) and their reset countdowns stay synchronized with the IDE.

Signed-off-by: dotredstone <[email protected]>
Add the grokbot (alias grok-bot) desktop provider reading weekly Grok Bot Plan usage and reset timestamps from the signed-in session via GetSandUsageStatus, with local persistence snapshot fallback when offline.

Signed-off-by: dotredstone <[email protected]>
@bernardopg

Copy link
Copy Markdown
Owner

Thank you @DotRedstone, there is a lot of good work here: a whole new provider, a real fix for weekly-blocked accounts, and the discovery that the running Antigravity app reports pools the cloud endpoint leaves out.

Because the four parts touch different areas and carry different risks, I split them into separate PRs. Your commits are kept with you as their author where they apply cleanly, and you are credited as co-author where I reshaped the change:

Part New PR What changed in review
Exhausted window promotion #106 (co-author) primaryUsageWindow() also drives sorting, the hero, the fleet rollup and history, so changing it would silently switch the history series. The promotion now lives in BarWindows.headlineWindow() and applies only to the bar pill and the card header. The settings gain an Automatic default, and Primary stays available as an explicit choice.
Prepaid balance pill #107 (co-author) Rather than guessing from English resetDescription text, adapters mark real balances with isBalance. Rather than a currency table in QML, DeepSeek formats ¥9.34 at the source like the other balance adapters.
Antigravity local language server #108 (your commit + a follow-up) The fast path ran per account, so every IDE/CLI account showed the running app's quota under its own email. The local answer is now matched by the GetUserStatus email. The server is found by its executable (pgrep -f also matched a shell here), and only loopback listeners are tried. A bucket with an omitted fraction reads as used up, and the dashboard keeps the server's own description.
Grok Bot provider #109 (your commit + a follow-up) On desktops with a Secret Service, Electron stores the session key in the keyring (safeStorage v11), which the fixed v10 key can't decrypt, while readiness still said Ready. A v11 session now serves the app's saved reading or says to start Grok Bot with --password-store=basic, and readiness reports it. GROKBOT_CONFIG_DIR/GROKBOT_API_URL are documented.

I verified the Antigravity change live with two signed-in accounts; I have no Grok Bot install here, so that one is covered by your fixtures plus the new v11 cases. The CHANGELOG ### Thanks section credits you, and you'll show up in the README contributor grid once these land. I'll close this PR once #106–#109 are merged. Thanks again!

@bernardopg

Copy link
Copy Markdown
Owner

All four parts are now merged: #106, #107, #108 and #109, with your commits and authorship intact (co-author on #106 and #107). Thank you again @DotRedstone!

@bernardopg bernardopg closed this Nov 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

area:assets Logos and static assets (assets/) area:ci CI, workflows, tooling area:i18n Translations (i18n/) area:providers Provider adapters (providers/) area:qml QML UI code documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants