fix: show model budget count in provider card header summary - #5704
Conversation
📝 WalkthroughSummary by CodeRabbit
Walkthrough
ChangesProvider budget summary
Estimated code review effort: 2 (Simple) | ~5 minutes Suggested reviewers: 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@ui/components/ui/providerConfigCard.tsx`:
- Line 229: Update the headerSummary span in the provider configuration card to
be a shrinkable flex item that truncates overflowing text on narrow screens.
Adjust its flex sizing and add the appropriate overflow, whitespace, and
text-overflow behavior while preserving the existing styling and summary
content.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: b96b8ca2-7e1f-4af3-ba0d-c6d49bf87730
📒 Files selected for processing (1)
ui/components/ui/providerConfigCard.tsx
3d4c5f5 to
bb71488
Compare
5df51ac to
891b851
Compare
891b851 to
713ae53
Compare
bb71488 to
4eb1124
Compare
713ae53 to
df968cf
Compare
4eb1124 to
aa5e5ee
Compare
df968cf to
c2c9cf6
Compare
aa5e5ee to
2ddf2ba
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
2ddf2ba to
e1f1b8b
Compare
c2c9cf6 to
c50fa1a
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
c50fa1a to
a7a631b
Compare
e1f1b8b to
3ef24fc
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
a7a631b to
3fdc968
Compare
3ef24fc to
40c75ff
Compare
|
Note GitHub couldn't provide a complete incremental comparison for this pull request, so CodeRabbit is performing a full review instead. This review may take a little longer. |
3fdc968 to
e95ca27
Compare
40c75ff to
b2209df
Compare
e95ca27 to
1e1f23a
Compare
b2209df to
ad9a9ea
Compare
Merge activity
|
The base branch was changed.
…#5704) ## Summary Fixes a misleading "No budget" label shown in the provider config card header when a provider has model-level budgets configured but no provider-level cap. The header summary now reflects the actual budget state by combining the provider cap and model budget count. ## Changes - Computes a `headerSummary` that joins the provider-level cap label and a model budget count (e.g. "3 model budgets") with a `·` separator, falling back to "No budget" only when neither is present - Replaces the spacer `<span>` and separate `capLabel` span with a single truncating, right-aligned span that displays `headerSummary` with a `title` tooltip for overflow cases ## Type of change - [x] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test 1. Open a provider config card that has model budgets set but no provider-level cap. 2. Verify the header now shows e.g. "2 model budgets" instead of "No budget". 3. Open a provider config card with both a provider cap and model budgets set. 4. Verify the header shows both joined by `·`, e.g. "$100/mo · 2 model budgets". 5. Open a provider config card with no budgets at all and verify it still shows "No budget". ```sh cd ui pnpm i || npm i pnpm build || npm run build ``` ## Screenshots/Recordings Before: A provider with only model budgets displayed "No budget" in the card header. After: The header correctly reflects the model budget count (and provider cap when present). ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
…#5704) ## Summary Fixes a misleading "No budget" label shown in the provider config card header when a provider has model-level budgets configured but no provider-level cap. The header summary now reflects the actual budget state by combining the provider cap and model budget count. ## Changes - Computes a `headerSummary` that joins the provider-level cap label and a model budget count (e.g. "3 model budgets") with a `·` separator, falling back to "No budget" only when neither is present - Replaces the spacer `<span>` and separate `capLabel` span with a single truncating, right-aligned span that displays `headerSummary` with a `title` tooltip for overflow cases ## Type of change - [x] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test 1. Open a provider config card that has model budgets set but no provider-level cap. 2. Verify the header now shows e.g. "2 model budgets" instead of "No budget". 3. Open a provider config card with both a provider cap and model budgets set. 4. Verify the header shows both joined by `·`, e.g. "$100/mo · 2 model budgets". 5. Open a provider config card with no budgets at all and verify it still shows "No budget". ```sh cd ui pnpm i || npm i pnpm build || npm run build ``` ## Screenshots/Recordings Before: A provider with only model budgets displayed "No budget" in the card header. After: The header correctly reflects the model budget count (and provider cap when present). ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable
…#5704) ## Summary Fixes a misleading "No budget" label shown in the provider config card header when a provider has model-level budgets configured but no provider-level cap. The header summary now reflects the actual budget state by combining the provider cap and model budget count. ## Changes - Computes a `headerSummary` that joins the provider-level cap label and a model budget count (e.g. "3 model budgets") with a `·` separator, falling back to "No budget" only when neither is present - Replaces the spacer `<span>` and separate `capLabel` span with a single truncating, right-aligned span that displays `headerSummary` with a `title` tooltip for overflow cases ## Type of change - [x] Bug fix - [ ] Feature - [ ] Refactor - [ ] Documentation - [ ] Chore/CI ## Affected areas - [ ] Core (Go) - [ ] Transports (HTTP) - [ ] Providers/Integrations - [ ] Plugins - [x] UI (React) - [ ] Docs ## How to test 1. Open a provider config card that has model budgets set but no provider-level cap. 2. Verify the header now shows e.g. "2 model budgets" instead of "No budget". 3. Open a provider config card with both a provider cap and model budgets set. 4. Verify the header shows both joined by `·`, e.g. "$100/mo · 2 model budgets". 5. Open a provider config card with no budgets at all and verify it still shows "No budget". ```sh cd ui pnpm i || npm i pnpm build || npm run build ``` ## Screenshots/Recordings Before: A provider with only model budgets displayed "No budget" in the card header. After: The header correctly reflects the model budget count (and provider cap when present). ## Breaking changes - [ ] Yes - [x] No ## Related issues ## Security considerations None. ## Checklist - [ ] I read `docs/contributing/README.md` and followed the guidelines - [ ] I added/updated tests where appropriate - [ ] I updated documentation where needed - [ ] I verified builds succeed (Go and UI) - [ ] I verified the CI pipeline passes locally if applicable

Summary
Fixes a misleading "No budget" label shown in the provider config card header when a provider has model-level budgets configured but no provider-level cap. The header summary now reflects the actual budget state by combining the provider cap and model budget count.
Changes
headerSummarythat joins the provider-level cap label and a model budget count (e.g. "3 model budgets") with a·separator, falling back to "No budget" only when neither is present<span>and separatecapLabelspan with a single truncating, right-aligned span that displaysheaderSummarywith atitletooltip for overflow casesType of change
Affected areas
How to test
·, e.g. "$100/mo · 2 model budgets".Screenshots/Recordings
Before: A provider with only model budgets displayed "No budget" in the card header.
After: The header correctly reflects the model budget count (and provider cap when present).
Breaking changes
Related issues
Security considerations
None.
Checklist
docs/contributing/README.mdand followed the guidelines