Skip to content

Commit 5f334b6

Browse files
fix(web): tidy Voice settings layout and copy
Dictionary inputs start at one line with the Add button aligned and room below; Textarea now honors `rows`. Hardware and model unloading move into the Transcription section's Advanced fold. Model rows keep the description alone and put languages and size in the stats row, and their pills explain themselves in tooltips. The recording pill matches the toolbar's button height so dictation no longer resizes the composer, and settings search targets no longer leak their title as a native tooltip. Copy is shorter and matches mobile. Co-Authored-By: Claude Opus 5.5 <[email protected]>
1 parent 62fabf3 commit 5f334b6

7 files changed

Lines changed: 143 additions & 93 deletions

File tree

‎apps/web/src/components/chat/VoiceInputPill.tsx‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,8 @@ export const VoiceWaveform = memo(function VoiceWaveform(props: { level: number
4343

4444
export function VoiceInputPill({ children }: { children: ReactNode }) {
4545
return (
46-
<div className="flex h-10 w-48 min-w-0 shrink-0 items-center gap-2 rounded-full border border-border/50 bg-background/80 p-1 sm:h-9 sm:w-64">
46+
// Same height as the toolbar's icon buttons, so starting a recording never resizes the composer.
47+
<div className="flex h-8 w-48 min-w-0 shrink-0 items-center gap-2 sm:h-7 sm:w-64">
4748
{children}
4849
</div>
4950
);

‎apps/web/src/components/settings/SpeechModelComparison.tsx‎

Lines changed: 26 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -73,21 +73,25 @@ export function LanguageRow({
7373
export function ModelBenchmarks({
7474
model,
7575
languages,
76+
facts,
7677
}: {
7778
model: EnvironmentSpeechModel;
7879
languages: readonly string[];
80+
/** Plain facts, such as language count and size, shown after the scores. */
81+
facts: readonly string[];
7982
}) {
8083
const data = model.benchmark;
81-
if (!data) return null;
82-
const visible = languages.length
83-
? languages
84-
: [model.languages.find((code) => data.accuracy[code]) ?? model.languages[0]].filter(
85-
(code): code is string => code !== undefined,
86-
);
84+
const visible = !data
85+
? []
86+
: languages.length
87+
? languages
88+
: [model.languages.find((code) => data.accuracy[code]) ?? model.languages[0]].filter(
89+
(code): code is string => code !== undefined,
90+
);
8791
return (
8892
<div className="mt-1 flex flex-wrap gap-x-3 gap-y-1 text-xs text-muted-foreground tabular-nums">
8993
{visible.map((code) => {
90-
const score = data.accuracy[code];
94+
const score = data?.accuracy[code];
9195
return (
9296
<span key={code}>
9397
{languageLabel(code)}:{" "}
@@ -102,16 +106,21 @@ export function ModelBenchmarks({
102106
</span>
103107
);
104108
})}
105-
<span>
106-
Speed:{" "}
107-
{data.secondsPer30s === null ? (
108-
"not benchmarked"
109-
) : (
110-
<>
111-
<strong className="font-medium text-foreground">{data.secondsPer30s} s</strong> / 30 s
112-
</>
113-
)}
114-
</span>
109+
{data ? (
110+
<span>
111+
Speed:{" "}
112+
{data.secondsPer30s === null ? (
113+
"not benchmarked"
114+
) : (
115+
<>
116+
<strong className="font-medium text-foreground">{data.secondsPer30s} s</strong> / 30 s
117+
</>
118+
)}
119+
</span>
120+
) : null}
121+
{facts.map((fact) => (
122+
<span key={fact}>{fact}</span>
123+
))}
115124
</div>
116125
);
117126
}

‎apps/web/src/components/settings/VoiceSettingsPanel.browser.test.tsx‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,7 +136,7 @@ it("preserves the model test transcript when its model is filtered out", async (
136136

137137
const search = screen.getByRole("textbox", { name: "Search transcription models" });
138138
await userEvent.fill(search, "no matching model");
139-
await expect.element(screen.getByText("No matching models.")).toBeVisible();
139+
await expect.element(screen.getByText("No models match.")).toBeVisible();
140140
await userEvent.clear(search);
141141
await userEvent.fill(screen.getByRole("textbox", { name: "Search languages" }), "fr");
142142
const french = screen.getByRole("button", { name: "French", exact: true });
@@ -273,7 +273,7 @@ it("keeps a missing destination selected without claiming it cannot transcribe",
273273
await expect
274274
.element(screen.getByRole("combobox", { name: "Send microphone audio to" }))
275275
.toHaveTextContent("Chosen environment (unavailable)");
276-
await expect.element(screen.getByText(/cannot transcribe audio/)).not.toBeInTheDocument();
276+
await expect.element(screen.getByText(/can’t transcribe audio/)).not.toBeInTheDocument();
277277
});
278278

279279
it("shows the model's effective language and restores the saved preference when supported again", async () => {

0 commit comments

Comments
 (0)