t3code icon indicating copy to clipboard operation
t3code copied to clipboard

[Feature]: Show remaining Claude usage in the composer toolbar

Open boonguan opened this issue 3 months ago • 1 comments

Before submitting

  • [x] I searched existing issues and did not find a duplicate.
  • [x] I am describing a concrete problem or use case, not just a vague idea.

Area

apps/web

Problem or use case

#6582 shipped subscription usage as its own view. What is still missing is the glanceable part: the number I actually need is "how much of my 5-hour window is left", and I need it at the moment I am about to hit send — not after navigating to a separate page.

The composer already has a toolbar right under the input with the things that decide the cost of the next turn:

✳ Claude Opus 4.8 ⌄ | High ⌄ | 🔓 Full access ⌄

Model, reasoning effort, permission mode — all three are "what will this turn cost / how far will it go" controls. Remaining quota belongs in that same row. Today it is the one input to that decision that lives somewhere else, so the flow is: pick model → pick effort → leave the composer → come back → send.

Proposed solution

Add a fourth compact control to the composer toolbar, styled like the existing pickers.

Collapsed (default)

  • One chip: bucket + percent, e.g. Session 62% or a small bar + 62%
  • Shows the most-constraining bucket (usually the 5-hour session window; weekly if weekly is closer to exhaustion)
  • Colour follows the existing warning treatment as it approaches the limit

Expanded (click)

  • Popover with the buckets already modeled for the Usage page — Current session, Weekly · all models, plus model-specific rows when the plan has them
  • Progress bar, percent, reset time per row
  • Last updated … + manual refresh
  • Link to the full Usage page

Scope

  • Claude provider only for the first ship. Other providers get the same chip when they expose comparable buckets; hide it entirely when the provider reports nothing.
  • Reuse the data the Usage page already fetches — no new polling loop, no separate source of truth.

Why this matters

Quota is a per-turn decision, and the composer toolbar is where per-turn decisions are already made. A settings page answers "how am I doing this week"; a toolbar chip answers "can I send this one". Those are different questions and only the second one is blocking.

Smallest useful scope

  • Claude only.
  • One chip showing the single most-constraining bucket, percent only.
  • Click opens the existing Usage view (a popover can come later).
  • Hidden when quota is unavailable.

Alternatives considered

  • Usage page from #6582 — exists, but it is a detour mid-composition.
  • Reuse the context-window ring — that is tokens-in-thread, a different number; overloading it is how the two get confused.
  • Status bar / window chrome — further from the decision point than the toolbar the model and effort pickers already occupy.

Risks or tradeoffs

  • Toolbar space is tight; the collapsed state must be one short chip, not a row of bars.
  • Do not add refresh traffic — piggyback on whatever cadence the Usage page already uses, plus after-turn updates.
  • Bucket labels come from the provider; do not hard-code plan-specific names.
  • Stale data must look stale rather than silently showing an old percent as current.

Examples or references

  • #6582 — subscription usage in Claude Code Desktop style (shipped; this issue is the in-composer surface of the same data)
  • #5539 — remaining provider usage limits and reset times
  • Claude Code CLI /usage

boonguan avatar Aug 28 '26 10:08 boonguan

Moved to Ideas per CONTRIBUTING — feature requests belong in discussions, not issues: https://github.com/pingdotgg/t3code/discussions/8520

boonguan avatar Aug 28 '26 10:08 boonguan