Commit Graph
44 Commits
Author SHA1 Message Date
t3-code[bot]andExotic e1c94f703f fix(web): refresh usage limit countdowns without switching tabs (#11187)
Co-authored-by: Exotic <[email protected]>
2026-09-11 13:21:27 -07:00
Julius MarmingeandClaude Code 05d4042100 feat(web): open Usage on the Limits tab by default (#11261)
Co-authored-by: Claude Code <[email protected]>
2026-09-11 10:09:48 -07:00
mariaandClaude Opus 5 48654c1182 fix(usage): flag unpriced model activity instead of showing $0.00 (#11021)
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
2026-09-10 23:39:21 -03:00
Julius Marminge 1f14d6d10a fix(usage): keep account columns aligned across limit rows (#10690) 2026-09-08 00:40:35 -07:00
Julius Marminge 0a89364f15 fix(usage): read and redeem hub reset credits through CLIProxyAPI (#10395) 2026-09-06 16:30:10 -07:00
Julius Marminge 00d6109cbb chore(web): remove usage limits demo fixtures (#10330) 2026-09-06 00:07:04 -07:00
Julius Marminge b273d1cfe9 feat(usage): pool subscription limits per provider across accounts and environments (#10300) 2026-09-06 00:02:37 -07:00
Exoticandshivam add8c3a55a fix(web): remember usage page selection (#10189)
Co-authored-by: shivam <[email protected]>
2026-09-06 09:24:18 +05:30
Wout StiensandJulius Marminge f12d39359f fix(ui): unify loading and refresh feedback across clients (#9561)
Co-authored-by: Julius Marminge <[email protected]>
2026-09-05 16:26:02 -07:00
Chris DeemingandJulius Marminge be53bbd850 feat(usage): show remaining quota instead of used (#9889)
Co-authored-by: Julius Marminge <[email protected]>
2026-09-05 16:22:15 -07:00
Chris Deeming 183c343309 feat: show provider usage limits with /usage-limits (#9875) 2026-09-05 16:17:36 -07:00
Julius Marminge 487d1766ca refactor(web): test the live usage column builder (#9993) 2026-09-05 00:19:33 -07:00
Julius Marminge 84b99f3fb7 feat(web): edit usage prices across selected environments (#9861) 2026-09-04 19:45:14 -07:00
Julius Marminge 7ee52b0773 fix(web): render and filter usage as environments respond (#9860) 2026-09-04 19:45:13 -07:00
maria 98a29cbaa1 fix: address usage limits and merge settlement regressions (#9784) 2026-09-04 17:46:12 -04:00
Julius Marminge 394e8470c8 feat(usage): support custom model prices (#9774) 2026-09-04 14:22:21 -07:00
Julius Marminge f1e90e388b refactor(web): move usage provider controls to settings (#9599) 2026-09-03 23:56:23 -07:00
Julius Marminge b34ff8f564 fix(usage): deduplicate CLI proxy subscription accounts (#9584) 2026-09-03 21:38:45 -07:00
1641b4aba5 feat(usage): redeem Codex reset credits from the Limits tab (#9534)
Follow-up to #9507, carrying over the reset-credit redemption from #9421.

Codex grants a reset credit when it has rate-limited an account unfairly (`"Thanks for using Codex! You've been granted one free rate limit reset."`). Redeeming one clears the current 5h/weekly windows. The Limits tab now shows how many are banked and when the next expires, with a confirmed **Use a reset credit** action.

## How it works

- `ServerProviderUsageLimits.resetCredits` carries the count and soonest expiry; the Codex probe reads it from the same `account/rateLimits/read` it already makes.
- `ProviderInstance.consumeResetCredit` is a new optional hook — account-level, so it sits beside `refreshModels` rather than on the thread-routed adapter. The Codex driver implements it over a short-lived app-server (via `withCodexAppServerClient`, factored out of the status and skills probes which duplicated the setup), then re-probes.
- Single-flight per instance with one idempotency key kept until Codex reports an outcome, so a retry after a timeout does not open a second attempt.
- New `provider.consumeResetCredit` RPC under the operate scope; the outcome (`reset` / `nothingToReset` / `noCredit` / `alreadyRedeemed`) is shown inline.

Only Codex reports credits today. A provider without the hook gets a clear "does not bank reset credits" error; one without credits shows nothing.

## Screenshots

The local Codex row with one banked credit (the same account via the CLIProxyAPI hub above it shows no credit, as expected — the hub does not relay them):

![Limits tab with the Codex row showing "1 reset credit banked · next expires in 16d 22h" and a "Use a reset credit" button](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/2897db5e357f12b3/credits-tab.png)

Close-up of the row:

![Codex row: Weekly 25% used bar, then "1 reset credit banked · next expires in 16d 22h" with the "Use a reset credit" button](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/0e80f9114cab8f36/credits-row.png)

Clicking it opens the confirmation; nothing is sent until **Use credit**:

![Confirm dialog: "Use a reset credit? This redeems one credit on your account and clears the current rate-limit windows. It cannot be undone." with Cancel and Use credit](https://gh-file-drop-api-prod-mi5fy3sowv63ufte.pinglabs.workers.dev/f/dc728580889ef1fe/credits-confirm.png)

## Verification

- Mapper tests for the credit summary; provider, contract, and Usage page suites pass; typecheck clean.
- Verified against a real Codex Pro account holding one credit: summary and expiry render, the confirm dialog opens. **Not redeemed** — that would spend the credit.

Written by Claude Fable 5 via Claude Code; design and single-flight approach from @StiensWout's #9421.

<!-- CURSOR_SUMMARY -->
---

> [!NOTE]
> **Medium Risk**
> Redemption spends real account credits over a new RPC; correctness depends on per-account locking and idempotency, though disabled instances and non-Codex providers are rejected explicitly.
> 
> **Overview**
> Adds **end-to-end redemption of banked Codex rate-limit reset credits** from the Limits UI on web and mobile, backed by a new operate-scoped `provider.consumeResetCredit` RPC.
> 
> **Contracts and server:** `ServerProviderUsageLimits` can include `resetCredits` (count + next expiry). Codex probes attach that from `account/rateLimits/read`. Optional `ProviderInstance.consumeResetCredit` is implemented for Codex via a scoped app-server call to `account/rateLimitResetCredit/consume`, then a limits refresh. `CodexResetCreditCoordinator` serializes redemptions per Codex account directory, reuses one idempotency key until Codex returns an outcome, and times out hung requests. `withCodexAppServerClient` is extracted so status, skills, and redemption share the same short-lived app-server setup.
> 
> **Clients:** Limits rows show banked credits and a confirmed **Use a reset credit** action that calls `serverEnvironment.consumeResetCredit` and surfaces outcomes (`reset`, `nothingToReset`, etc.) or errors.
> 
> **Web usage sources (same PR):** Adding/removing CLIProxyAPI hubs and the add dialog target a **selected connected environment** (with picker when several are connected), gated by operate access—not only the primary environment.
> 
> <sup>Reviewed by [Cursor Bugbot](https://cursor.com/bugbot) for commit 98f32e60852dca1d38c94335b3ed7aac8c4b895e. Bugbot is set up for automated code reviews on this repo. Configure [here](https://www.cursor.com/dashboard/bugbot).</sup>
<!-- /CURSOR_SUMMARY -->


Co-authored-by: Wout Stiens <[email protected]>
Co-authored-by: Claude Code <[email protected]>
2026-09-03 19:14:29 -07:00
19d8ab2ae9 feat(usage): show Codex and Claude subscription limits on a Limits tab (#9507)
Users on Codex or Claude Code subscriptions could not see how much quota was left or when it resets without leaving T3 Code. A user whose CLIs route through a CLIProxyAPI hub could not see it at all.

Each driver now returns `usageLimits` on its own snapshot (Codex from `account/rateLimits/read`, Claude from the SDK's `get_usage`), adapters normalise turn-driven rate-limit events at the boundary, and a driver-blind ingestion layer folds them onto the owning instance. The Usage page gains a Limits tab (mobile a card) with a bar per window, elapsed marker, pace, and reset countdown. CLIProxyAPI hubs can be added as read-only usage-limit sources; their accounts show badged "via CLIProxyAPI" with emails blurred.

Distilled from #1732 (server model, provider rows) and #9421 (Limits tab, window bars, pace maths). Closes #228.

Co-authored-by: Aditya Mer <[email protected]>
Co-authored-by: Wout Stiens <[email protected]>
Co-authored-by: Claude Code <[email protected]>
2026-09-03 17:47:54 -07:00
mariaandmaria-rcks 21b9dda5af fix(web): unify skeleton loading animations on one pulse (#9448)
Co-authored-by: maria-rcks <[email protected]>
2026-09-03 13:30:07 -04:00
ead4ce52a1 fix(grok): improve skills, plans, usage, and turn reliability (#8358)
Co-authored-by: Dara Adedeji <[email protected]>
Co-authored-by: Ahmed Besic <[email protected]>
Co-authored-by: Michael Brown <[email protected]>
Co-authored-by: Lars Nieuwenhuis <[email protected]>
Co-authored-by: Guilherme Barros <[email protected]>
Co-authored-by: PC <pc@localhost>
Co-authored-by: 1xpixi <[email protected]>
2026-08-26 23:57:46 -07:00
Rakshith Bhat a1379db818 fix(web): sort usage models by token count (#8108) 2026-08-24 17:51:32 -04:00
Tristan Knight 8287f2c3a7 fix(web): align usage page skeleton layout (#8111) 2026-08-24 17:32:28 -04:00
Tristan Knight 17dbe8dda3 fix(web): show only providers with usage in usage views (#7563) 2026-08-23 23:03:02 -04:00
t3-code[bot]andmaria 6e9c57f7ba feat(web): add appearance contrast control (#7906)
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <[email protected]>
2026-08-22 18:00:21 -04:00
t3-code[bot]andmaria aa17ec6e7d revert(web): restore sparse hourly usage breakdown (#7718)
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
Co-authored-by: maria <[email protected]>
2026-08-20 16:18:36 -04:00
Luis Gustavo Couto Wacker 62654d279f fix(web): usage hourly breakdown lists every hour chronologically (#7595) 2026-08-19 18:26:35 -04:00
maria 8c85b4933f feat(web): redesign usage insights (#7147) 2026-08-19 16:10:47 -04:00
Tristan Knight a4cc1367b0 fix(web): show all usage breakdown periods (#7219) 2026-08-17 14:45:13 -04:00
Wout Stiens f0ebc628c6 fix(web): improve Codex usage graph contrast (#6669) 2026-08-15 04:42:35 -04:00
maria 804cba4305 revert: refresh workspace layouts and tool activity (#6657) 2026-08-15 02:00:02 +00:00
maria d7abd7f3bb feat(web): refresh workspace layouts and tool activity 2026-08-14 21:54:04 -04:00
9885a845c9 refactor(web): simplify global styling (#6381)
Co-authored-by: Julius Marminge <[email protected]>
Co-authored-by: Julius Marminge <[email protected]>
2026-08-14 23:30:13 +02:00
Julius Marminge c842c6f5b9 Add hourly past-24-hour usage view (#6170) 2026-08-11 16:47:13 +02:00
Julius Marminge 96906805f1 Add settings and usage breadcrumbs (#5929) 2026-08-10 02:12:19 +00:00
t3-code[bot] 9a1472d955 fix(web): match usage titlebar text styling (#5897)
Co-authored-by: t3-code[bot] <269035359+t3-code[bot]@users.noreply.github.com>
2026-08-09 20:14:15 -04:00
t3-code[bot] bd18d8d6d1 fix(web): unify usage page chrome (#5823) 2026-08-09 23:26:26 +02:00
Julius Marminge 1a003e383a Add cross-platform mobile usage dashboard (#5743) 2026-08-09 12:10:27 +02:00
Theo BrowneandClaude Fable 5 886195ec1e fix(web): usage totals no longer jump while devices report in (#5772)
Co-authored-by: Claude Fable 5 <[email protected]>
2026-08-08 19:05:16 -07:00
Theo BrowneandClaude Fable 5 70c423a5e4 fix(web): usage page loses the cost quality panel, gains a back button (#5756)
Co-authored-by: Claude Fable 5 <[email protected]>
2026-08-08 21:31:20 -04:00
naMqe be01b287b9 fix(web): add missing cursor-pointer styling to dropdowns and interactive buttons (#5716) 2026-08-08 20:02:57 -04:00
Theo BrowneandClaude Opus 5 a20923ce46 fix(web): usage chart no longer makes Claude look like the bigger spender (#5697)
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
2026-08-08 05:43:03 -07:00
Theo BrowneandClaude Opus 5 8101cd0449 feat(usage): usage page reading provider transcripts across environments (#5684)
Co-authored-by: Claude Opus 5 (1M context) <[email protected]>
2026-08-08 03:59:04 -07:00