Skip to content

fix(routing): prevent long model names from overflowing tier cards#1600

Merged
SebConejo merged 1 commit intomainfrom
fix/routing-card-model-name-overflow
Apr 17, 2026
Merged

fix(routing): prevent long model names from overflowing tier cards#1600
SebConejo merged 1 commit intomainfrom
fix/routing-card-model-name-overflow

Conversation

@SebConejo
Copy link
Copy Markdown
Member

@SebConejo SebConejo commented Apr 17, 2026

Summary

  • Long model names (e.g. custom:869cda85-2957-4209-bace-263bbfb61f0b/MiniMax-M2.7) were pushing tier cards beyond their grid column, breaking the 4-column layout
  • Add min-width: 0 on .routing-card__model-chip and .routing-card__chip-main so the existing text-overflow: ellipsis actually kicks in
  • Add overflow: hidden on .routing-card as a safety net
  • Fix provider icon vertical alignment in the model chip (flex-startcenter)

Test plan

  • Frontend tests pass (2178/2178)
  • Verify long model names show ellipsis instead of overflowing
  • Verify all 4 tier cards remain equal width
  • Verify provider icons are vertically centered with model name text

Summary by cubic

Fixes tier cards overflowing their grid when model names are long by enabling proper ellipsis and clamping overflow. Also centers the provider icon in the model chip.

  • Bug Fixes
    • Add min-width: 0 to model chip containers so ellipsis applies.
    • Add overflow: hidden to the card to prevent layout spill.
    • Center provider icon by switching align-items to center.

Written for commit a1ebb2b. Summary will update on new commits.

Long model names (e.g. custom provider UUIDs) were pushing tier cards
beyond their grid column, breaking the 4-column layout. Add min-width: 0
on the chip containers so flex children can shrink and the existing
text-overflow: ellipsis on .routing-card__main takes effect. Also fix
provider icon vertical alignment (flex-start → center).
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 17, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.01%. Comparing base (2493d97) to head (a1ebb2b).
⚠️ Report is 3 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@           Coverage Diff           @@
##             main    #1600   +/-   ##
=======================================
  Coverage   98.01%   98.01%           
=======================================
  Files         119      119           
  Lines        8967     8967           
  Branches     3372     3372           
=======================================
  Hits         8789     8789           
  Misses        176      176           
  Partials        2        2           
Flag Coverage Δ
frontend 98.00% <ø> (ø)
shared 100.00% <ø> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1 issue found across 1 file

Prompt for AI agents (unresolved issues)

Check if these issues are valid — if so, understand the root cause of each and fix them. If appropriate, use sub-agents to investigate and fix each issue separately.


<file name="packages/frontend/src/styles/routing.css">

<violation number="1" location="packages/frontend/src/styles/routing.css:142">
P2: `overflow: hidden` on `.routing-card` can clip chip tooltips that are absolutely positioned outside their trigger.</violation>
</file>

Reply with feedback, questions, or to request a fix. Tag @cubic-dev-ai to re-run a review.

border: 1px solid hsl(var(--border));
border-radius: var(--radius);
min-height: 0;
overflow: hidden;
Copy link
Copy Markdown

@cubic-dev-ai cubic-dev-ai bot Apr 17, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2: overflow: hidden on .routing-card can clip chip tooltips that are absolutely positioned outside their trigger.

Prompt for AI agents
Check if this issue is valid — if so, understand the root cause and fix it. At packages/frontend/src/styles/routing.css, line 142:

<comment>`overflow: hidden` on `.routing-card` can clip chip tooltips that are absolutely positioned outside their trigger.</comment>

<file context>
@@ -139,6 +139,7 @@
   border: 1px solid hsl(var(--border));
   border-radius: var(--radius);
   min-height: 0;
+  overflow: hidden;
 }
 
</file context>
Suggested change
overflow: hidden;
overflow: visible;
Fix with Cubic

@SebConejo SebConejo merged commit bc7653a into main Apr 17, 2026
14 checks passed
@SebConejo SebConejo deleted the fix/routing-card-model-name-overflow branch April 17, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant