Skip to content

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

Open
Jolymmiles wants to merge 1 commit into
pingdotgg:mainfrom
Jolymmiles:fix/usage-limits-11467
Open

fix(usage): correct proxy quotas and show Claude Fable first#11473
Jolymmiles wants to merge 1 commit into
pingdotgg:mainfrom
Jolymmiles:fix/usage-limits-11467

Conversation

@Jolymmiles

@Jolymmiles Jolymmiles commented Sep 12, 2026

Copy link
Copy Markdown

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.

@github-actions github-actions Bot added size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list. labels Sep 12, 2026
@macroscopeapp

macroscopeapp Bot commented Sep 12, 2026

Copy link
Copy Markdown
Contributor

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.

@coderabbitai

coderabbitai Bot commented Sep 12, 2026

Copy link
Copy Markdown

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 c0ddfb3 and 8e3615d.

📒 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 name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring 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 name Status Explanation
Title check ✅ Passed The title clearly summarizes the main changes: correcting usage quotas and prioritizing Claude Fable limits.
Description check ✅ Passed The 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 ✅ Passed Issue #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 ✅ Passed The 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

size:M 30-99 changed lines (additions + deletions). vouch:unvouched PR author is not yet trusted in the VOUCHED list.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Bug]:

1 participant