fix(ui): keep provider names readable

This commit is contained in:
Tam Nhu Tran
2026-03-17 14:43:46 -04:00
parent ea15e5eb50
commit 3954e445f3
2 changed files with 9 additions and 3 deletions
@@ -725,12 +725,17 @@ function CompactPresetCard({
</div>
<div className="min-w-0 flex-1 space-y-1">
<div className="flex items-start justify-between gap-2">
<div className="truncate text-sm font-semibold leading-tight">{preset.name}</div>
<div className="space-y-1">
<div
className="text-sm font-semibold leading-tight"
style={{ ...CARD_META_CLAMP_STYLE, WebkitLineClamp: 2 }}
>
{preset.name}
</div>
{preset.badge && (
<Badge
variant="secondary"
className="shrink-0 bg-muted px-1.5 py-0 text-[10px] text-muted-foreground"
className="inline-flex bg-muted px-1.5 py-0 text-[10px] text-muted-foreground"
>
{preset.badge}
</Badge>
@@ -34,6 +34,7 @@ describe('ProfileCreateDialog', () => {
);
expect(screen.getByText('Featured Providers')).toBeInTheDocument();
expect(screen.getByText('Alibaba Coding Plan')).not.toHaveClass('truncate');
const morePresetsToggle = screen.getByRole('button', { name: /More Presets/i });
expect(morePresetsToggle).toHaveAttribute('aria-expanded', 'false');
expect(document.body.querySelectorAll('.overflow-x-auto')).toHaveLength(1);