Note
Reviews paused
It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.
- Last reviewed commit: c0df4f4ee46128c34976a228f7e53022e8a1702a
- Latest commit, not reviewed: bfd4ae85604e8ee8ab15f18c55b07fa2a6cf4479
Use the following commands to manage reviews:
@coderabbitai resumeto resume automatic reviews.@coderabbitai reviewto trigger a single review.
Use the checkboxes below for quick actions:
- ▶️ Resume reviews
- 🔍 Trigger review
Walkthrough
Thread details now use limits from the selected provider instance or, when those limits have a notice, from one eligible usage-hub account. Limit rows identify the source in a tooltip when available.
Changes: Thread usage limits
Layer / File(s) Summary Resolve provider and hub limits
apps/web/src/components/chat/ThreadDetailsUsage.logic.ts,apps/web/src/components/chat/ThreadDetailsUsage.logic.test.ts,packages/shared/src/usageLimits.tsThe resolver prefers limits without a notice from the selected instance. Otherwise, it uses limits from one eligible hub account. It matches accounts by driver and compatible email and workspace, deduplicates accounts, and selects the freshest snapshot. Tests cover matching, ambiguity, and fallback behavior. environmentAccountKeyResolveris exported and used bycollectProviderUsageLimits.Use resolved limits in thread details
apps/web/src/components/chat/ThreadDetailsUsage.tsx,docs/user/usage.mdThe component uses resolved limits and displays the source label in tooltips when present. The usage guide describes the hub fallback conditions and behavior. Estimated code review effort: 3 (Moderate) | ~20 minutes
Change: Bug fix · Severity of issue fixed: Medium
Sequence Diagram(s)
mermaid1 sequenceDiagram 2 participant ThreadDetailsUsage 3 participant resolveThreadDetailsLimits 4 participant UsageLimitSources 5 ThreadDetailsUsage->>resolveThreadDetailsLimits: selected instance and provider snapshots 6 resolveThreadDetailsLimits->>UsageLimitSources: check matching hub account snapshots 7 UsageLimitSources-->>resolveThreadDetailsLimits: account limits and source 8 resolveThreadDetailsLimits-->>ThreadDetailsUsage: resolved limits and source label Possibly related issues
- pingdotgg/t3code#26909: Reports unavailable limits for an instance routed through a CLIProxyAPI hub. This change uses limits from one matching hub account when the instance has no usable limits.
Suggested reviewers:
t3dotgg,maria-rcks,macroscopeapp,juliusmarminge
Merge Risk: External image Low · previous review c0df4
The thread card can show another workspace’s limits. The change is mergeable with awareness of this display risk.
Pre-merge checks: Passed 3 · Failed 1
Failed Failed checks: 1 warning
Check name Status Explanation Resolution Description check Warning The description includes the required Problem, Change, Scope and approval, and Verification sections. It provides reproduction details, implementation scope, test results, screenshots, and limitations… Obtain explicit maintainer approval in the linked discussion and add the approval comment to the Scope and approval section. If the change qualifies as an exemption, explain why it is a focused obvious fix or established-capability configur… Passed Passed checks: 3 passed
Check name Status Explanation Title check Passed The title clearly and concisely describes the main change: showing a proxied instance's usage limits from its usage hub in the thread details card. Linked Issues check Passed Check skipped because no linked issues were found for this pull request. Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.
Full details: Description check
Explanation
The description includes the required Problem, Change, Scope and approval, and Verification sections. It provides reproduction details, implementation scope, test results, screenshots, and limitations. However, the Scope and approval section explicitly states that maintainer approval is not yet available, although the template requires explicit approval or a valid exemption.
Resolution
Obtain explicit maintainer approval in the linked discussion and add the approval comment to the Scope and approval section. If the change qualifies as an exemption, explain why it is a focused obvious fix or established-capability configuration and document that rationale instead.
Finishing Touches
-
Fix failing CI checks
- Commit to this branch
- Create a new PR
🧪 Generate unit tests (beta)
- Create a new PR
- Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
External image Recent review info
-
External image Run configuration
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: bf270e7
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
791020df-17d7-4406-a4d2-3d32a4af03b4
External image Commits
Reviewing files that changed from the base of the PR and between 6c9850faec2003c59e574b16205f90c67909d86f and c0df4f4ee46128c34976a228f7e53022e8a1702a.
External image Files selected for processing: 4
apps/web/src/components/chat/ThreadDetailsUsage.logic.test.tsapps/web/src/components/chat/ThreadDetailsUsage.logic.tsdocs/user/usage.mdpackages/shared/src/usageLimits.ts
External image Files skipped from review as they are similar to previous changes: 1
- docs/user/usage.md
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
External image Recent review info
-
External image Run configuration
- Source mode: Auto
- Repository: pingdotgg/t3code
- Branch: main
- File: .coderabbit.config.ts
- Commit: bf270e7
- Layers: Repository TS config
- Review profile: CHILL
- Plan: Advanced
- Run ID:
791020df-17d7-4406-a4d2-3d32a4af03b4
External image Commits
Reviewing files that changed from the base of the PR and between 6c9850faec2003c59e574b16205f90c67909d86f and c0df4f4ee46128c34976a228f7e53022e8a1702a.
External image Files selected for processing: 4
apps/web/src/components/chat/ThreadDetailsUsage.logic.test.tsapps/web/src/components/chat/ThreadDetailsUsage.logic.tsdocs/user/usage.mdpackages/shared/src/usageLimits.ts
External image Files skipped from review as they are similar to previous changes: 1
- docs/user/usage.md
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.