Skip to content

feat(grok): one Grok tab for the one shared limit, with the split by product - #16

Merged
DLANSAMA merged 3 commits into
mainfrom
claude/project-thread-b504is
Nov 7, 2026
Merged

DLANSAMA merged 3 commits into
mainfrom
claude/project-thread-b504is

Conversation

@DLANSAMA

@DLANSAMA DLANSAMA commented Nov 7, 2026 •

Copy link
Copy Markdown
Owner

What changes

All Grok products (Grok, Grok Build, Grok Bot) share one weekly limit, so the separate Grok Bot tab could show a different number for the same pool. This merges them into one Grok tab.

  • Bar: stays xAI's billing figure (creditUsagePercent), or its log fallback. Grok Bot's own percent never overrides it (it read 53.76 against the pool's 53.0 in a live run).
  • Split by product: productUsage from the same billing reply is shown under the bar the way Claude's surface split is, e.g. "Grok Bot 53%". It is dropped when an ended period rolls to 0%.
  • Grok Bot detail: on-demand row, prepaid line and a plan name (only if Grok has none) fold in when the Grok Bot app is signed in. A failed Grok Bot read never touches a Grok reading. With no grok CLI reading, its weekly bar stands in, and a failure with a remedy (locked wallet, expired sign-in) is shown on the Grok tab.
  • Settings: a saved Grok Bot tab setting keeps Grok on; the grokbot provider is gone from the snapshot, the tab list and the settings chips.
  • Render baselines: make render-baselines also renders the Grok tab; the Claude and Antigravity baselines are regenerated for the five-tab strip.
  • Docs: README, CHANGELOG, CLAUDE.md, translation template.

Verification

  • Full suite: 967 passed with the QML render tests running (Qt machine); flake8, mypy and CI (lint-and-test) clean. The backend runs end to end in an empty home and prints valid JSON.
  • Rendered from the mock fixture on a KDE machine: the Grok tab shows the split line under the bar with nothing clipped and no scrollbar; the tab strip has five tabs; the error state (KWallet locked) shows its message with no leftover bar.
  • Unverified: whether several productUsage entries add up to the pool (the live reply has one entry), and whether the CLI log's billing event carries productUsage.

@DLANSAMA DLANSAMA self-assigned this Nov 7, 2026
…product

All Grok products share a single weekly limit, so the separate Grok Bot tab could
show a different number for the same pool. The Grok tab now keeps xAI's billing
bar and shows the week's split by product (productUsage) under it. Grok Bot's plan
name, on-demand spend and prepaid line fold in when its app is signed in; its
weekly bar stands in only when the grok CLI has no reading. A saved Grok Bot tab
setting keeps Grok enabled.
make render-baselines now also renders the Grok tab from the mock fixture, and the
render test compares it, so the split line under the bar can't silently vanish.
The PNGs themselves are generated on a machine with Qt and committed next.
@DLANSAMA
DLANSAMA force-pushed the claude/project-thread-b504is branch from 7ec38c0 to 205ae89 Compare November 7, 2026 20:58
@DLANSAMA
DLANSAMA marked this pull request as ready for review November 7, 2026 21:30
@DLANSAMA
DLANSAMA merged commit ac1f78e into main Nov 7, 2026
1 check passed
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