Skip to content

fix(stt): put the error hand-off on its own line on a phone - #34541

Merged
bolichen97 merged 1 commit into
mainfrom
fix/20721-stt-failure-row-wrap
Nov 10, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/20721-stt-failure-row-wrap

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: On a phone, a speech-to-text error row gives its sentence the full width of the row and puts Ask the agent on its own line under it.

In Settings → Voice, below the sm breakpoint (640px), the inline error rows of the speech-to-text card keep Ask the agent beside the sentence. The sentence is squeezed into a narrow column: at 375px it gets 218 of 343px, at 320px 163 of 288px, and the "speech model crashed while loading" refusal wraps to seven lines with the icon and the link floating halfway down.

Why it matters

These rows show up when voice input is broken: a model download failed, the recogniser refused to load, the status check failed, a custom model file cannot be used, the vocabulary list or a push-to-talk save failed. That is exactly when the user has to read the sentence to know what to do, and on a phone it is the hardest thing on the screen to read.

Not a goal

What changed (motivation → approach → change)

On a phone, the sentence of each of these rows now uses the whole width of the row beside its warning icon, and Ask the agent sits on the line below it. From sm up nothing moves.

The inline ErrorNotice is one row that never wraps, and the hand-off button never shrinks, so on a narrow screen the sentence is the only thing that gives way.

SttSettings.tsx gives each inline notice that carries the hand-off two class strings: the row may wrap below sm, and the message's flex basis leaves room for the icon only, so the hand-off is pushed to the next line while the icon stays beside the sentence. A plain full-width message would have moved the sentence under the icon and left the icon alone on the first line. The shared component is untouched.

Backwards compatibility

Compatible: only layout classes on seven call sites change; no prop, string, route or API changes.

Removes nothing: no field, control or text is removed; the hand-off is still rendered, only on its own line on a phone.

Tests

  • SttSettings.modelDownloadDisclosure.test.tsx — new: a failed model download renders its notice as a row that wraps below sm with the message holding the line, and Ask the agent is still inside the notice. jsdom has no layout, so the wrap is read off the classes; the screenshots below show the rendered lines. Red on the parent commit, green on this one.
  • Determinism: the file passed 10 repeated runs and one shuffled run (--sequence.shuffle --sequence.seed=11499).

Proof: not provable -- frontend test (prove.py runs Python only)

Manual verification

Built the SPA from this head and rendered Settings → Voice with stubbed gateway answers (the repository's screenshot harness, no gateway) at 320, 375 and 1180px for three states: a failed model download, the recogniser refusing to load, and a failed status check. Below sm the sentence takes the row and Ask the agent sits on the next line; at 1180px the rows are pixel-identical to main.

Screenshots / video

The recogniser refused to load, 375px (dark):

Before After
refusal row at 375px before: the sentence wraps to seven lines beside Ask the agent refusal row at 375px after: the sentence takes the row and Ask the agent sits under it

A failed model download, 320px (dark):

Before After
failed download row at 320px before failed download row at 320px after
Light theme, the status check failure, and desktop

The refusal row after the change, 375px, light theme:

refusal row at 375px after, light theme

The status check failed, 375px (dark):

Before After
status check failure at 375px before status check failure at 375px after

Desktop, 1180px, after the change (byte-identical to the shot taken on main):

refusal row at 1180px after, unchanged

Related Issues

Closes #20721

Sibling sweep

Swept: git grep -n 'variant="inline"' -- website/src/pages/settings/SttSettings.tsx website/src/components/MicTestStrip.tsx website/src/components/SpeechProviderNotice.tsx
Sibling: website/src/pages/settings/SttSettings.tsx -- changed here
Sibling: website/src/components/MicTestStrip.tsx:151 -- tracked in #34540
Sibling: website/src/components/SpeechProviderNotice.tsx:29 -- tracked in #34540

Pattern harvest

Not generalizable: whether an inline notice should wrap depends on how wide its row is, which no static rule can see; the narrow-viewport guidance already says an action cluster leaves the text row.

Checklist

  • At most two commits (one is the norm), with a Conventional Commits title (feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)
  • Existing tests pass and new tests added for new functionality
  • Self-review completed; code follows project style guidelines
  • Documentation updated (if applicable)
  • No secrets, credentials, or internal references in the diff

Contribution License Agreement

Contributions are accepted under the project's Apache-2.0 license; see the Licensing section of CONTRIBUTING.md.

Below the sm breakpoint the inline error rows of the speech-to-text
settings kept Ask the agent beside the message, so the sentence got
about 60% of a phone's width and a long refusal wrapped to seven lines.
Those rows now wrap there: the message keeps the first line with its
icon and the hand-off moves to the line under it. From sm up nothing
changes.
@bolichen97
bolichen97 requested review from a team and KiroCrewCaptain as code owners November 10, 2026 12:48
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 4c0a6081817ecbb11190b5692756fd3a5a7c94fa — why this exists and whether the shipped surface is the smallest honest version. Updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

First-Principles-Verdict: PASS

Nothing blocks. This is a layout fix to seven existing error rows, built on the messageClassName prop ErrorNotice already has. Nothing new is added.

What this change ships

Inventory (3 items) — 3 justified

Intent: let a phone user read a speech-to-text error sentence at full width when voice input breaks. This is a FIX.

  1. Below 640px, the Ask the agent button in seven Voice-settings error rows moves to its own line under the sentence. — justified
  2. Below 640px, the sentence takes the whole row width beside its warning icon. From 640px up nothing changes. — justified
  3. Two new class constants, PHONE_WRAP_ROW and PHONE_WRAP_MESSAGE, used at all 7 call sites. — justified

[FIRST-PRINCIPLES-REVIEWED] 4c0a608

Description read

[DESCRIPTION-READ] 588bee00b122d35eca57c53c88e86dbc3f93dfc557d264f2d17b9af9a5170be7

That sha256 names the PR description this verdict read. Recompute it with .github/scripts/pr-description-capture.sh; if it differs, the description changed after this verdict was formed and any finding drawn from the description is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

Design-level review of 4c0a6081817ecbb11190b5692756fd3a5a7c94fa — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: this is a local layout fix with rendered before/after evidence, and it removes nothing.

Notes

[DESIGN-REVIEWED] 4c0a608

Description read

[DESCRIPTION-READ] 132a0fc6ae09ca49f4d9a981aa8f6018ecefbbe7d6f317dae05be26bee6e1596

That sha256 names everything this verdict read: the PR description, plus the 1 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

Reviewed 4c0a6081817ecbb11190b5692756fd3a5a7c94fa — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 4c0a608

Verdict parsed from the review's SHA-scoped output markers for commit 4c0a6081817ecbb11190b5692756fd3a5a7c94fa.

False positive or not applicable? A repository writer can comment:
/ai-review override fable 4c0a6081817ecbb11190b5692756fd3a5a7c94fa false-positive: <reason, 20 to 500 characters>

@github-actions

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

UX-level review of 4c0a6081817ecbb11190b5692756fd3a5a7c94fa — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

UX-Verdict: PASS

Nothing blocks. The blind reader saw the change working: after it, Ask the agent "clearly belongs to the error message, which is easier to read than shot 1."

Notes

  • Only three of the seven changed rows have screenshots: the recogniser refusal, the failed download and the failed status check. The vocabulary-list, push-to-talk save and two custom-model rows have none, though they use the same class strings. A 375px shot of one of them would cover the rest.
  • The light-theme shot (shot-05) is not part of this layout change. There, the reader called the Ask the agent underline "very faint, so it reads less like a link", which is worth raising on the shared ErrorNotice in Voice settings: on phones, four more error notices squeeze their sentence beside Ask the agent #34540.

[UX-REVIEWED] 4c0a608

Description read

[DESCRIPTION-READ] 3cb7fc3d7c43b663b4867bb0a6bf4c61fcbba6ad4020bb985b93b954dd579ca0

That sha256 names everything this verdict read: the PR description, plus the 11 evidence file(s) the workflow collected from it and handed this review. It covers that evidence because the media strip replaces every attachment URL with the same placeholder, so an edit swapping one attachment for another would leave the description's captured text identical while what this review judged changed. Recompute it with .github/scripts/pr-description-capture.sh over the same inputs; if it differs, the description or that evidence changed after this verdict was formed and any finding drawn from either is unproven.

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 4c0a6081817ecbb11190b5692756fd3a5a7c94fa and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 4c0a608

False positive or not applicable? A repository writer can comment:
/ai-review override gpt 4c0a6081817ecbb11190b5692756fd3a5a7c94fa false-positive: <reason, 20 to 500 characters>

@bolichen97
bolichen97 enabled auto-merge (squash) November 10, 2026 13:18
@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: checking Automated validation is still running labels Nov 10, 2026

@KiroCrewCaptain KiroCrewCaptain left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Tier 1 auto-approve: fix (2 files). Criteria: no conflict, no requested changes, security path denylist clean, design-doc gate clean, security checklist all-NO, no reviewer-lane findings, readiness signal fresh for this head SHA, declared category matches the diff. Category: bug fix: the STT settings error hand-off wraps onto its own line on narrow screens; frontend class change plus a test.

@buluoray buluoray left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Approve on 4c0a608. Layout-only fix: seven inline STT error rows wrap below sm so the sentence takes the row and Ask the agent drops to its own line; desktop classes unchanged, shared ErrorNotice untouched. Decisive lines: website/src/pages/settings/SttSettings.tsx:233-234, website/src/pages/settings/SttSettings.tsx:1511-1512, website/src/components/ErrorNotice.tsx:344-350, website/src/test/SttSettings.modelDownloadDisclosure.test.tsx:135-148

@bolichen97
bolichen97 merged commit 1a4bd8d into main Nov 10, 2026
100 checks passed
@bolichen97
bolichen97 deleted the fix/20721-stt-failure-row-wrap branch November 10, 2026 14:29
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 10, 2026
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.

Speech models: on phones, put the failure row's hand-off link on its own line

3 participants