Skip to content

feat(stt): let the user dismiss a failed speech-model download - #34878

Merged
bolichen97 merged 1 commit into
mainfrom
fix/20719-dismiss-failed-download
Nov 11, 2026
Merged

bolichen97 merged 1 commit into
mainfrom
fix/20719-dismiss-failed-download

Conversation

@bolichen97

Copy link
Copy Markdown
Contributor

Problem / Motivation

Goal: A user can dismiss the error row a failed speech-model download leaves in Settings → Voice, and a later failure or download attempt shows it again.

When a speech-model download fails, the voice settings page shows the reason under the model picker. That row has no dismiss control, unlike the page's other error rows, so it stays on screen until the next attempt.

Why it matters

A failure the user has already read and cannot clear keeps the panel looking broken while they switch model or provider, or simply decide to try later. Every other error row on the page can be dismissed, so this one reads as stuck.

Not a goal

What changed (motivation → approach → change)

The failed-download row in website/src/pages/settings/SttSettings.tsx has the same ✕ dismiss control as the page's other error rows, so a failure the user has already read no longer stays on screen until the next attempt.

Dismissing hides that one failure for this page visit. The page keeps the dismissed status report itself; the status query hands back the same object while the gateway's answer is unchanged, so a different failure, or a failure after the transfer left failed, is a new report and shows. Pressing Download now ends the dismissal once that attempt's status read lands, because a retry can fail the same way before any poll sees it running.

Backwards compatibility

Compatible: a frontend-only addition; no API, config or stored state changes.

Removes nothing: the row still renders for every failure; only the user's own click hides it, until the next failure or attempt.

Tests

website/src/test/SttSettings.modelDownloadDisclosure.test.tsx adds lets the user dismiss a failed download until another failure or attempt. It locks in five things: the row has a Dismiss control that hides it; a re-read reporting the same failure keeps it hidden; the same failure after the transfer was seen downloading shows again; a different failure shows; and pressing Download now shows the row again even when the retry reports the identical failure. The mocked status read returns a fresh body each time, as a real fetch does, through a new statusBody() helper.

Determinism: 20 consecutive runs of the file green on this head (npx vitest run src/test/SttSettings.modelDownloadDisclosure.test.tsx, 20 times).
Shuffled order with two sibling files as co-tenants (npx vitest run <this file> src/test/SttSettings.decoder.test.tsx src/test/SttSettings.customModelGuard.test.tsx --sequence.shuffle --sequence.seed=1624): 39 passed.
Red before: with the SttSettings.tsx change reverted, the new test fails (Unable to find an accessible element with the role "button" and name /dismiss/i); with it, the test passes.

Manual verification

Ran the dashboard built from this head against a stubbed API (the repository's screenshot harness, website/scripts/lib/serve-dist.mjs with stub-dashboard-api.mjs), with the status read reporting a failed base download, in light and dark themes and at a 390 px phone width. The failed row shows a ✕; pressing it removes the row and leaves Download now offered; pressing Download now again, with the retry failing the same way, brings the row back.

Screenshots / video

Settings → Voice after a failed download: the failure row with its ✕.

Failed download row with its dismiss control, light theme

After pressing ✕: the row is gone and Download now is still offered.

Panel after dismissing the failed download, light theme

After pressing Download now again, when the retry fails the same way: the row is back.

Failed download row shown again after a retry, light theme

Dark theme

Failed download row with its dismiss control, dark theme

Panel after dismissing the failed download, dark theme

Phone width (390 px)

The ✕ sits beside Ask the agent on the line under the message.

Failed download row at phone width

Panel after dismissing the failed download at phone width

Related Issues

Closes #20719

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): not applicable, no doc describes this row
  • No secrets, credentials, or internal references in the diff

The error row a failed speech-model download leaves under the model
picker was the one error row on the voice settings page with no dismiss
control, so it stayed on screen until the next attempt.

It now has the same dismiss control as the page's other error rows.
Dismissing hides that one failure for the page visit: a different
failure, the same failure after the transfer left "failed", or pressing
Download now again shows the row again.

Closes #20719
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: Approve

Why: the decider estimates an 8% chance that this change introduces a defect, within the 12% limit for approving on its own, and every check passes.

Frontend-only change: the failed speech-model download row gets an ErrorNotice dismiss control. Hiding works by comparing the download object's identity, which holds because the sttStatus query keeps React Query's default structural sharing (nothing in website/src overrides it for this query), so an unchanged re-read returns the same object. A changed failure or an intervening downloading state produces a new object and shows the row. prepareMut.onSettled waits for the re-read, then clears the dismissal, covering a retry that fails identically. Only this component reads or writes the sttStatus cache, and the decoder and err rows are unaffected. The new test covers all five described behaviours using fresh mock objects per read.

An automated recommendation, not a review: a maintainer still decides. It approves on its own only when the estimated chance of a defect is at most 12% and the change has at most 400 changed lines. Decider v3c (217fe607) · commit 79a416fa3d · 94 changed lines. If this recommendation is wrong, reply here: replies are how the approver is evaluated.

@bolichen97
bolichen97 enabled auto-merge (squash) November 10, 2026 23:18
@github-actions github-actions Bot added the readiness: action required A blocking check or review needs attention label Nov 10, 2026
@github-actions

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of 79a416fa3d5e98692e73e0f6aeb5d62ca2a003ef — 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: one dismiss control on the failed-download row. It reuses ErrorNotice's existing onDismiss, which the page's other error row already uses at SttSettings.tsx:1208, and it closes #20719.

What this change ships

Inventory (3 items) — 3 justified

Intent: let a user clear a speech-model download failure they have already read from Settings → Voice. This is an ADDITION.

  1. The failed-download row in Settings → Voice now has a ✕ that hides it for this page visit — justified
  2. A different failure, or the same failure after a new transfer, shows the row again — justified
  3. Pressing Download now brings the row back once the retry's status read arrives, even if the retry fails the same way — justified

[FIRST-PRINCIPLES-REVIEWED] 79a416f

Description read

[DESCRIPTION-READ] 13b4cbb8dac54d7435f0d160e0df8ace7d6475cd1564a3e2231cf7fe0c3ed5c2

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 79a416fa3d5e98692e73e0f6aeb5d62ca2a003ef — updated in place on each push. A BLOCK verdict blocks PR readiness; PASS does not.

Design-Verdict: PASS

Nothing blocks: this adds a small dismiss control on the frontend only, it can be reverted cleanly, and there is screenshot evidence for this revision.

Notes

  • The dismissal only works because React Query keeps an unchanged status answer as the same object. If download is ever rebuilt on each render (for example by a memo or a spread), the row would come back after every poll. The new test that re-reads the same failure catches that, so keep it.

[DESIGN-REVIEWED] 79a416f

Description read

[DESCRIPTION-READ] 3bdb216d71897fc61489f52827fe7850153125ff450f33d205518d335308aeb3

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

UX Review (Opus 5.5) — ✅ PASS

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

UX-Verdict: PASS

Nothing blocks. The ✕ reuses the ErrorNotice dismiss control that the page's other error rows already have. The screenshots show all three states: failed, dismissed, and shown again after a retry. The blind reader read the ✕ correctly, though only as "a guess".

Notes

  • At 390 px (shot-06) the ✕ drops onto its own line beside Ask the agent, and the blind reader said it "looks like it might remove 'Ask the agent' rather than the error". Keep the ✕ at the end of the message line, at the row's top-right, so it reads as closing the whole row.

[UX-REVIEWED] 79a416f

Description read

[DESCRIPTION-READ] 16b654cbde97e64d831d19f62cec45f4cccf692a6ac08996a291f259d4bf3177

That sha256 names everything this verdict read: the PR description, plus the 10 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 79a416fa3d5e98692e73e0f6aeb5d62ca2a003ef — this comment is updated in place on each push.

Review details

No findings.

[OPUS-REVIEWED] 79a416f

Verdict parsed from the review's SHA-scoped output markers for commit 79a416fa3d5e98692e73e0f6aeb5d62ca2a003ef.

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

@github-actions

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

GPT 6.1 completed its review of 79a416fa3d5e98692e73e0f6aeb5d62ca2a003ef and found no blocking issues.

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] 79a416f

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

@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 79a416f. Adds the same ✕ dismiss to the failed speech-model download row as the page's other error rows. The dismissal is keyed on the status query's download object identity, and Download now clears it after the status re-read lands. Frontend only. Both guards are mutation-verified. Decisive lines: website/src/pages/settings/SttSettings.tsx:1516, website/src/pages/settings/SttSettings.tsx:990-993, website/src/pages/settings/SttSettings.tsx:839

@github-actions github-actions Bot added readiness: passed Eligible automated validation passed for the current revision and removed readiness: action required A blocking check or review needs attention labels Nov 11, 2026
@bolichen97
bolichen97 merged commit d666602 into main Nov 11, 2026
131 of 144 checks passed
@bolichen97
bolichen97 deleted the fix/20719-dismiss-failed-download branch November 11, 2026 04:37
@github-actions github-actions Bot removed the readiness: passed Eligible automated validation passed for the current revision label Nov 11, 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: let the user dismiss a failed-download row

3 participants