GeezerVison is showing github.com — feat(web): show usage limits as used or left by abhaymettu · Pull Request #26284 · pingdotgg/t3code
Conversation
abhaymettu
commented
Oct 28, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
Problem
Subscription limits always show the share left, such as "62% left". Some people track what they have spent instead,
as in "I've used 38% of my week", and they have to subtract every number in their head. Time format already offers a
12-hour or 24-hour choice. Usage limits have no equivalent.
Change
- Settings > Threads > Usage limits gets Show usage as, with the options Left and Used. Left is the
default and keeps the current readout.
- The new client setting
usageDisplay: "remaining" | "used" decodes to "remaining" when it is missing.
- One pure function,
usageReadout(display, remainingPercent, windowLeftPercent), feeds every readout: the percent,
its label and word, the bar fill, the even-pace mark, and the mark's text. It takes the numbers that the shared
helpers already compute. With Left, the output matches main. With Used, it is the exact complement.
- The composer limits banner, the Usage page pool cards, the per-account bars and legend, and the segment popover all
read it.
- Bars fill from the start in both modes. With Used, the pace mark moves to the share of the window that has passed,
so a fill past the mark still means ahead of pace. The pace wording does not change.
- Refill hatching sits on the empty end of the bar with Left, and on the tail of the fill with Used (
refillSpan). On
the fill, the stripes draw in the background colour so they stay visible. The restore amount reads "+19%" with Left
and "−19%" with Used.
- The row is searchable, has its own reset button, and is part of the restore-defaults list.
Scope and approval
There is no prior discussion. I think this fits the route for a focused configuration option for an established
capability.
- The capability that exists. Subscription limit readouts in the composer banner and on the Usage page.
- What the option controls. Whether those readouts show the share left or the share used. The data, the polling,
the pace calculation and the layout do not change.
- Why it stays inside that capability. The default is Left, and with Left every readout is unchanged. The
setting is client-only, like timestampFormat. Web and desktop share the code. The mobile app has its own readouts
and does not read client settings, so it is unchanged. The server is not involved.
Out of scope: layout changes to the pooled bars, such as account labels above the bar. That is a separate problem.
Verification
- Focused tests pass.
apps/web usageReadout.test.ts (7 tests) checks literal strings and positions for both
modes, a window with no clock, and refill spans. packages/contracts src/settings.test.ts (25 tests) covers the
default decode, a patch decode, and the rejection of an unknown value.
- The web unit suite passes (314 files, 4264 tests).
tsc --noEmit is clean for contracts, web and desktop, and
vp lint is clean on the touched paths.
- Manual check on
vp run dev --home-dir <tmp> --no-seed. The limits came from a local stand-in for a CLIProxyAPI
hub, added as a usage limit source in server settings, which returned two Claude accounts on example.com. With
Left, the Usage page matched main pixel for pixel, apart from the reset countdowns, which had moved by a minute.
A segment's accessible label read "62% left, ..., 45% of the window left" on both. With Used, it read "38% used,
..., 55% of the window elapsed", the pool cards read "25% used" and "44% used", and the popover rows read "Used",
"55% used by now" and "−19% of pool".
- Not checked: a packaged desktop build, and Codex or Cursor limits. Every provider goes through the same readout
code.
Usage page, Limits, two Claude accounts. Before is main:
|
Before |
After, Left (default) |
After, Used |
| Dark |
 |
 |
 |
| Light |
 |
 |
 |
The segment popover with Used, and the settings row:
| Popover, Used |
Setting, dark |
Setting, light |
 |
 |
 |
Claude Opus 5.5 via Claude Code in T3 Code.
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
mshll, zmm2025, and wellsdan reacted with thumbs up emoji
usageDisplay decodes to "remaining" when missing, so existing settings
files keep today's readout.
Settings > Threads > Usage limits gets a "Show usage as" choice. Every
limits readout now goes through usageReadout: the percent, its label,
the bar fill, the even-pace mark and its text, the refill hatching and
the restore amount all flip together. Used is the complement of left,
and the bar fills from the start in both modes. The mark moves to the
share of the window elapsed when showing used, so a fill past the mark
means ahead of pace there, and under pace when showing left. Refill
hatching sits on the tail of the fill when showing used, so it draws in
the background colour there.
Codex Review Summary
This comment shows the latest Codex review activity on this pull request.
| Review |
Status |
Commit |
Review trigger |
| 📝 Code Review |
⚠️ Failed 2026-10-28T03:53:22.530529Z We couldn’t complete this review. Comment @codex review to try again. |
cf11115 |
PR opened |
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review" or "@codex security review".
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Approvability
Verdict: Approved at cf11115
Macroscope's review found this PR approvable — Adds a setting to show subscription limits as used or left, with matching bars and pace indicators. Existing default presentation and actual quota enforcement remain unchanged.
You can add or adjust custom eligibility rules. Learn more.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
coderabbitai
Bot
commented
Oct 28, 2026
•
edited
Loading
Uh oh!
There was an error while loading. Please reload this page.
|

No actionable comments were generated in the recent review.
Recent review info
-
Run configuration
-
Commits
-
Reviewing files that changed from the base of the PR and between 49a9e80 and cf11115.
Files selected for processing: 9
-
apps/desktop/src/settings/DesktopClientSettings.test.ts
apps/web/src/components/settings/SettingsPanels.tsx
apps/web/src/components/settings/settingsSearch.ts
apps/web/src/components/usage/UsageLimits.tsx
apps/web/src/components/usage/UsageLimitsPooled.tsx
apps/web/src/components/usage/usageReadout.test.ts
apps/web/src/components/usage/usageReadout.ts
packages/contracts/src/settings.test.ts
packages/contracts/src/settings.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
Walkthrough
-
The change adds a client setting to display subscription usage as either remaining or used. The Threads settings panel exposes the preference, and usage-limit components apply it to percentages, labels, pace indicators, and refill displays.
Changes: Usage display preference
| Layer / File(s) |
Summary |
Usage display setting contract packages/contracts/src/settings.ts, packages/contracts/src/settings.test.ts |
The client settings schema accepts “remaining” and “used,” defaults missing values to “remaining,” and includes the preference in patches. Tests cover the default and accepted and rejected values. |
Threads preference controls apps/web/src/components/settings/SettingsPanels.tsx, apps/web/src/components/settings/settingsSearch.ts, apps/desktop/src/settings/DesktopClientSettings.test.ts |
The Threads panel offers “Left” and “Used,” supports restoring the default, and includes the setting in restore-defaults change detection. Settings search links to the Threads panel. The desktop test fixture sets the preference to “used.” |
Usage readouts and displays apps/web/src/components/usage/usageReadout.ts, apps/web/src/components/usage/usageReadout.test.ts, apps/web/src/components/usage/UsageLimits.tsx, apps/web/src/components/usage/UsageLimitsPooled.tsx |
Shared helpers calculate display-aware readouts, restoration text, and refill spans. Usage components use them for percentages, labels, pace indicators, tooltips, and refill bars. Tests cover both display modes and cases without a refill or pace value. |
Priority: Normal
Estimated code review effort: 3 (Moderate) | ~20 minutes
Sequence Diagram(s)
sequenceDiagram
participant Settings as ThreadsSettingsPanel
participant Limits as UsageLimits
participant Pooled as UsageLimitsPooled
participant Readout as usageReadout
Settings->>Limits: Configure usage display preference
Limits->>Readout: Pass display and usage percentages
Readout-->>Limits: Return display-aware readout
Pooled->>Readout: Pass display and usage percentages
Readout-->>Pooled: Return display-aware readout
Loading
Possibly related PRs
- pingdotgg/t3code#25651: Adds the Threads settings page and places usage-limit controls there; this change adds the display preference to that same settings surface.
Suggested reviewers: juliusmarminge, maria-rcks
Merge Risk: Minimal · up to cf111
-
No merge-blocking issue was established.
Pre-merge checks: 4
-
| Check name |
Status |
Explanation |
| Title check |
 |
The title "feat(web): show usage limits as used or left" matches the main change: a new Settings > Threads option, "Show usage as", that switches subscription limit readouts between Left and Used. It … |
| Linked Issues check |
 |
Check skipped because no linked issues were found for this pull request. |
| Out of Scope Changes check |
 |
Check skipped because no linked issues were found for this pull request. |
| Description check |
 |
The description follows the template well. It has Problem, Change, Scope and approval, and Verification sections, with specific tests, manual checks, and before/after screenshots. The Scope and approv… |
Full details: Title check
-
Explanation
The title "feat(web): show usage limits as used or left" matches the main change: a new Settings > Threads option, "Show usage as", that switches subscription limit readouts between Left and Used. It follows the conventional commit format the template asks for. It is specific and does not use vague terms.
Full details: Description check
-
Explanation
The description follows the template well. It has Problem, Change, Scope and approval, and Verification sections, with specific tests, manual checks, and before/after screenshots. The Scope and approval section lacks a linked issue or maintainer approval. It argues the change is a focused configuration option of an established capability, which the template allows. The template asks for a triaged issue or explicit approval, or for the author to explain why the exemption applies. The author explained the exemption, so the section is mostly complete. The description also names the model used, as the template requests. Remaining gaps: the author gives no maintainer approval, and the packaged desktop build and Codex/Cursor limits are not checked.
Finishing Touches
-
🧪 Generate unit tests (beta)
-
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Comment @coderabbitai help to get the list of available commands.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
This was referenced Oct 28, 2026
|
Thanks, @abhaymettu, for the earlier work on used-versus-left usage limits. Closing this as a duplicate of #27363 by @davisonio, which implements the same choice across web and mobile and has a more recent update. This PR has been inactive for over a week while main changed the affected files.
|
Sorry, something went wrong.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Assignees
No one assigned
Labels
size:L
100-499 changed lines (additions + deletions).
vouch:unvouched
Author is not yet trusted in the VOUCHED list.
Milestone
No milestone
Development
Successfully merging this pull request may close these issues.
Uh oh!
There was an error while loading. Please reload this page.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
|