fix: keep voice names fully readable in the Generate voice selector - #522
fix: keep voice names fully readable in the Generate voice selector#522gianpaj wants to merge 1 commit into
Conversation
Long descriptions squeezed the truncated voice name in the dropdown list (e.g. "Zag..."). Let the name/description row wrap so the name always renders in full, and allow the trigger button to grow instead of clipping the selected voice name. Refs #521 Co-authored-by: Gianfranco P <899175+gianpaj@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Claude finished @gianpaj's task in 4m 6s —— View job Code review: PR #522
Verdict: the fix targets the right root cause and looks correct. A few polish/edge-case notes below, nothing blocking. What's right
Notes1. The trigger can get noticeably taller on mobile ( Removing Issue #521 is about the name, so you can keep the fix and keep the height stable by clamping only the meta line: -<span className="flex flex-wrap items-center gap-1.5 text-muted-foreground text-xs">
+<span className="flex w-full min-w-0 items-center gap-1.5 text-muted-foreground text-xs">
{selectedModel && <ModelDot model={selectedModel} />}
- <span className="break-words">
+ <span className="truncate">
{selectedModel} · {selected.description ?? ''}
</span>
</span>The name still wraps in full; the secondary metadata is the thing that ellipses. Your call — deliberately letting it wrap is also defensible, it just isn't described in the PR body ("desktop rendering is unchanged" is true; mobile trigger height does change). Fix this → 2.
Only curated 3. No row gap when the row wraps (
4. Icon alignment on the wrapped trigger (
5. Pre-existing, on a line you touched (
VerificationI could not run |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 856257ba3c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| to their own line and the voice name stays readable | ||
| on narrow screens. */} | ||
| <span className="flex flex-wrap items-baseline gap-x-2"> | ||
| <span className="break-words font-medium text-sm"> |
There was a problem hiding this comment.
Let unbroken voice names shrink within list rows
When a public voice has a single unbroken name wider than the available mobile row, this span remains a flex item with the default automatic minimum width. break-words does not reduce that min-content width, so the item cannot shrink and wrap; it instead overflows the popover and can run beneath the selection icon. The database stores names as unconstrained text, so add a shrinking constraint such as min-w-0 max-w-full or use an overflow-wrap mode that affects intrinsic sizing.
Useful? React with 👍 / 👎.
|
The latest updates on your projects. Learn more about Argos notifications ↗︎
|
There was a problem hiding this comment.
✅ No new issues found.
Reviewed changes — a CSS-class-only fix to apps/web/components/voice-select.tsx that stops the voice name from being ellipsed in the Generate voice picker on narrow screens (issue #521). No logic, text content, or i18n keys change.
- List rows stop truncating — the name/description row becomes
flex flex-wrap items-baseline gap-x-2and the name swapstruncateforbreak-words, so a long description moves to its own line instead of squeezing the name. This is the change that actually fixes the screenshot in the issue. - Trigger button grows instead of clipping —
h-12 … whitespace-nowrapbecomesh-auto min-h-12 … whitespace-normal py-2 text-left, so the selected voice name and description wrap. Worth noting the meta line previously overflowed the button's rounded border rather than being clipped, since thecvabasewhitespace-nowrapapplied and nothing hid the overflow — this quietly fixes that too. - Class resolution verified —
Buttonis acvaset whose base carrieswhitespace-nowrap items-center justify-centerand default sizeh-10 px-4 py-2. BecausecvaappendsclassNamelast andcn()istailwind-merge, every override (h-10→h-auto,px-4→px-3,justify-center→justify-between,whitespace-nowrap→whitespace-normal) resolves the intended way.VoiceSelect's only call site (components/voice-selector.tsx:104) passes noclassName, so there is no override to conflict with. break-wordsplacement — load-bearing on the trigger name, which sits in a column-direction flex container underitems-startwhere its width is clamped to the available space.
ℹ️ The trigger is a few pixels taller than before, so Argos will flag a visual diff
The PR description says desktop rendering is unchanged, which is very nearly true but not exactly. min-h-12 is a floor, not a fixed height: the trigger's content is text-sm leading-tight (17.5px) stacked on text-xs (16px) = 33.5px, which is taller than the size-7 icon, and adding py-2 plus the 1px border pushes the total just past the old fixed 48px. Cosmetically negligible, but apps/web/e2e/generate-dashboard.spec.ts takes an argosScreenshot right after asserting the voice selector is visible, so the collapsed trigger is in the Argos baseline for every Playwright project and the check will report a diff that needs manual approval. Nothing to change — just don't read that red check as a regression.
Technical details
# Argos baseline shift on the Generate dashboard
## Affected sites
- `apps/web/e2e/generate-dashboard.spec.ts:57` — `argosScreenshot(page, \`generate-dashboard-${testInfo.project.name}\`)` runs after `expect(generatePage.voiceSelector).toBeVisible()`, so the collapsed `VoiceSelect` trigger is inside the snapshot.
- `apps/web/e2e/pages/generate.page.ts:37` — `voiceSelector = page.getByRole('combobox').first()` resolves to the changed `Button`.
- `apps/web/components/voice-select.tsx:247` — `h-auto min-h-12 … py-2 text-left` replaces the fixed `h-12`.
## Required outcome
- The Argos diff on `generate-dashboard-*` is reviewed and accepted as the intended baseline rather than investigated as a regression. No code change is required.
## Open questions for the human
- Is the mobile Playwright project's screenshot the evidence you wanted for "still readable on desktop too" from issue #521? If so, the accepted Argos baseline doubles as the verification the issue asked for.@v0 or keep the SHA fresh with Dependabot | View workflow run | Using Claude Opus | 𝕏

What changed
The voice name in the Generate voice selector was ellipsed on mobile (e.g.
Zag...) because the name carriedtruncateand was the flex item that shrank when a long description shared the row.flex flex-wrap items-baseline) and the name usesbreak-wordsinstead oftruncate, so a long description moves to its own line and the name is always fully readable.h-12+whitespace-nowrap+truncatereplaced withh-auto min-h-12 py-2 whitespace-normal text-left, so the selected voice name wraps and grows the button instead of being clipped.Desktop
min-h-12preserves the current trigger height and rows only wrap when content does not fit, so desktop rendering is unchanged.Tests
CSS-class only change (no logic, no text-content change).
pnpm fixall,pnpm type-checkandpnpm testcould not be run in the agent environment (no pnpm/node_modules) - relying on CI.Fixes #521
Generated with Claude Code