Skip to content
Source
Sign inSign up
pingdotgg/t3code

fix(usage): correct proxy quotas and show Claude Fable first #11473

ClosedJolymmiles(GitHub profile, opens in a new tab)wants to merge 1 commit intomain fromrefs/pull/11473/headopened View on GitHub

Fixes #11467.

Codex using a custom provider such as CLIProxy can report no OpenAI account while still returning cached ChatGPT limits. Those limits were displayed as extra native accounts beside the real CLIProxy accounts and distorted the pooled percentage. Mark that case unsupported without hiding genuine exhausted ChatGPT subscriptions.

Show Claude's Fable window first, with the other windows behind a disclosure below it. Keep the existing account segments and show all available windows when Fable is not reported. Preserve CLIProxy provenance when native and hub accounts merge, and surface partial hub read failures once instead of silently dropping them.

Validation:

  • Regression cases failed before the fixes; all 60 focused server/shared tests pass.
  • Server, shared, and web typechecks; targeted lint/format checks; production web build pass.
  • Chromium checks pass at 1440px and 390px, including mouse/keyboard disclosure, no-Fable and Fable-only fallbacks, failed sources, and horizontal overflow.

Before: issue screenshot

After, using demonstration accounts:

Usage limits after the fix

Visual evidence on GitHub: download usage-limits-proof.html and open it locally for desktop/mobile captures and the browser interaction recording. No customer account data is included.

Authored with OpenAI Codex (GPT-6).

Summary by CodeRabbit

  • New Features

    • Usage limits now distinguish between where an account is signed in and how it is accessed.
    • Claude Agent limits can be expanded to show additional time windows.
    • A CLIProxy label identifies limits reported through a proxy or hub.
  • Bug Fixes

    • Unsupported usage-limit states are now reported correctly for accounts without OpenAI access.
    • Exhausted native ChatGPT limits remain visible even when account details are incomplete.
    • Duplicate hub-related limit notices are consolidated.
    1. github-actions[bot](GitHub profile, opens in a new tab) added labelsvouch:unvouched

    2. Approvability

      Verdict: Not approved

      Macroscope's review found this PR not approvable — This PR changes production usage-limit reporting and pooling, while also changing the default Usage Limits presentation by prioritizing Claude's Fable window and hiding other windows behind a disclosure. The cross-cutting runtime and default UI changes warrant focused human review despite targeted regression tests.

      You can add or adjust custom eligibility rules. [Learn more](https://docs.macroscope.com/approvability#example-custom-eligibility-rules).
    3. Review Change StackReview Change Stack

      No actionable comments were generated in the recent review. 🎉

      ℹ️ Recent review info
      ⚙️ Run configuration

      Configuration used: Path: .coderabbit.yaml

      Review profile: CHILL

      Plan: Advanced

      Run ID: 0e4ae44d-40de-4e1f-be3d-e90127d1a151

      📥 Commits

      Reviewing files that changed from the base of the PR and between c0ddfb3a81abe553fea1e43c79cb723118959449 and 8e3615d6d5f8f728594e8af05a0d4e48ba579a5e.

      📒 Files selected for processing (5)
      • apps/server/src/provider/Layers/CodexProvider.test.ts
      • apps/server/src/provider/Layers/CodexProvider.ts
      • apps/web/src/components/usage/UsageLimitsPooled.tsx
      • packages/shared/src/usageLimits.test.ts
      • packages/shared/src/usageLimits.ts

      Included review availability: Your plan provides up to 10 included reviews per hour; 8 remain after this review.


      📝 Walkthrough

      Walkthrough

      The changes update Codex status classification, preserve hub provenance during usage-limit merging, deduplicate failed hub notices, and refine pooled usage-limit rendering with separate provenance rows and collapsible secondary Claude limits.

      Changes

      Usage limits behavior

      Layer / File(s)Summary
      Usage-limit provenance and notices
      packages/shared/src/usageLimits.ts, packages/shared/src/usageLimits.test.ts
      Merged accounts retain sourceLabel. Hub notices now include failed account messages once per unique message. Tests cover provenance retention and notice deduplication.
      Codex status probing behavior
      apps/server/src/provider/Layers/CodexProvider.ts, apps/server/src/provider/Layers/CodexProvider.test.ts
      Unauthenticated proxy snapshots report unsupported usage limits. Exhausted native ChatGPT limits remain available when the account has no email.
      Pooled usage-limit presentation
      apps/web/src/components/usage/UsageLimitsPooled.tsx
      Account details show separate “Signed in” and “Via” rows. CLIProxy accounts receive a badge. Secondary Claude windows appear in a collapsible section.

      Priority: ⬇️ Low

      Estimated code review effort: 3 (Moderate) | ~25 minutes

      Change: Bug fix · Severity of issue fixed: Low

      Suggested reviewers: juliusmarminge

      Merge Risk: ⚪ Minimal · up to 8e361

      The quota handling and usage-display changes are covered by targeted tests and validation; no current merge-blocking risk was identified.

      🚥 Pre-merge checks | ✅ 4 | ❌ 1

      ❌ Failed checks (1 warning)

      Check nameStatusExplanationResolution
      Docstring Coverage⚠️ WarningDocstring coverage is 66.67% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 6 functions across 5 files.Write docstrings for the functions missing them to satisfy the coverage threshold.
      ✅ Passed checks (4 passed)
      Check nameStatusExplanation
      Title check✅ PassedThe title clearly summarizes the main changes: correcting usage quotas and prioritizing Claude Fable limits.
      Description check✅ PassedThe description explains what changed, why it changed, UI behavior, validation results, and visual evidence. It covers the required template sections and includes screenshots and interaction evidence …
      Linked Issues check✅ PassedIssue #11467 requests a cosmetic usage-display correction in apps/web. The PR updates UsageLimitsPooled.tsx to show Claude seven_day_fable first, disclose other windows, preserve signed-in and h…
      Out of Scope Changes check✅ PassedThe server, shared-library, and test changes support the usage display required by issue #11467. They correct the quota data, account provenance, and notices that the apps/web view renders. No unrel…
      • Fix all pre-merge checks with AI
      ✨ Finishing Touches
      🧪 Generate unit tests (beta)
      • Create PR with unit tests

      Comment `@coderabbitai help` to get the list of available commands.
    4. Thanks for the PR. We're not taking changes to the orchestration and provider layers right now: that part of the server is being rewritten for V2, and merging into the current code would either conflict with or be thrown away by that work.

      Closing for now. If this is still an issue once V2 lands, please reopen (or open a fresh PR against the new code) and we'll take a proper look.

    5. juliusmarminge closed this

Sign in to join this conversation.