Repository navigation
fix: move the voice error hand-off under its sentence on a phone - #34633
Conversation
Design Review (Opus 5.5) — ✅ PASSDesign-level review of Design-Verdict: PASS Nothing blocks: the change adds one opt-in placement value inside Notes
[DESIGN-REVIEWED] be7c797 Description read[DESCRIPTION-READ] f8ec843d1e63b7d0e4839fe671b64782551f48d7edae8ab81f79a66cf60a27be 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 |
UX Review (Opus 5.5) — ✅ PASSUX-level review of UX-Verdict: PASS Nothing blocks: the change only rearranges layout below 640px, and the screenshots show all four notices before and after at both widths. The blind reader found the phone layout "easier to read". Notes
[UX-REVIEWED] be7c797 Description read[DESCRIPTION-READ] c6fe93dc46bb9d1a6468b8f4acccbf53e7141f60062d687d9f75ffa57795157d That sha256 names everything this verdict read: the PR description, plus the 9 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 |
Opus 5.5 Review — ✅ no blocking findingsReviewed Verdict parsed from the review's SHA-scoped output markers for commit False positive or not applicable? A repository writer can comment: |
First Principles Review (Opus 5.5) — ✅ PASSPremise-level review of First-Principles-Verdict: PASS The fix reaches its four notices through one opt-in prop value. The only problem is that the PR also migrates six inline rows, which its own Notes
What this change shipsInventory (7 items) — 6 justifiedIntent: on a phone, Settings → Voice error notices keep the sentence at full width with Ask the agent underneath. FIX.
[FIRST-PRINCIPLES-REVIEWED] be7c797 Description read[DESCRIPTION-READ] 6bb24ec5e26dc2fb88ed296fb52c65e0d54ba2a15cf727a92ac1184342877e97 That sha256 names the PR description this verdict read. Recompute it with |
901b530 to
f90486a
Compare
|
First Principles block (two spellings of the inline phone-wrap): fixed in f90486a. The seven I made this change because it removes a defect in code this PR adds. The "Not a goal" line about migrating those sites is frozen with the description, so I have not edited it. UX note (indent the inline hand-off past the icon): not done here. It is advisory, and the inline rows keep the shape #34541 shipped. |
GPT 6.1 Review — ✅ no blocking findingsGPT 6.1 completed its review of This comment is updated in place on each push. Review detailsNo findings. False positive or not applicable? A repository writer can comment: |
f90486a to
88a3ae9
Compare
Code change approver recommendation: A person should decideAutomated, not a person, and not a review: a maintainer still decides.
Why: the decider approves but is not confident enough to auto-approve (p_defect 0.22 > 0.12). This adds an opt-in ErrorNotice actionPlacement="below-on-phone" value. Below sm it wraps the hand-off under the message in both variants; from sm up it lays out exactly like 'beside'. The four named Voice notices use it, and the 7 call sites that used the earlier PHONE_WRAP classes in SttSettings.tsx move onto the prop with the same classes wherever a hand-off renders. Without askAgent the markup is unchanged, and tests pin the new classes, DOM order and single render. Remaining concerns: a latent dropped hand-off for a block notice that also uses messagePlacement="below" (no current caller), a stale non-goal in the description, and an unexplained Frontend Tests (4) failure. None of these blocks. If this recommendation is wrong, reply here; the replies are how the approver is evaluated. |
Below sm, four Settings -> Voice error notices kept Ask the agent (and the dismiss) beside the message, so the sentence wrapped in a narrow column. Two are shared components and two are boxed banners whose text column a call-site class cannot reach. Add actionPlacement="below-on-phone" to ErrorNotice for both variants and use it at those four sites. From sm up the notices render exactly as before. Fixes #34540
88a3ae9 to
be7c797
Compare
KiroCrewCaptain
left a comment
There was a problem hiding this comment.
Thanks for this fix. On head be7c797 we checked these points:
- Without
askAgent, the newactionPlacement="below-on-phone"value leaves the default markup byte-identical. The outerHTML test pins this. - With a hand-off on an inline row, the value emits the same classes #34541 shipped.
- On a 375px phone, the block banner keeps the close button on line one and moves the hand-off under the sentence. From
smup, the old row returns. - Three of the new tests fail on main and pass here.
- No call site changes its
askAgentbehaviour.
Good work replacing the two private PHONE_WRAP constants in SttSettings with one named ErrorNotice value. Now there is one place that spells this layout.
Optional:
- ErrorNotice.tsx:343 and :451: a block notice that sets
title,messagePlacement="below",askAgentandactionPlacement="below-on-phone"gets no Ask the agent button at any width. No caller does this today. To fix it, render the line 451 button forbesideorbelow-on-phone, keepphoneBelowonly for the phone classes, and add one test that expects exactly one button. - Tests and screenshots do not cover the call-site hunks in MicTestStrip.tsx:151 and SttSettings.tsx:1022 and :1203. One class assertion per site, like the #34541 download-failed test, would catch a revert.
- The capture harness comment says each notice is "rendered through its REAL component". In fact only SpeechProviderNotice is. The other three use bare ErrorNotice with copied props. The body says it "Removes nothing", but the diff also deletes the two SttSettings constants. You could correct both sentences.
Problem / Motivation
Goal: On a phone, the Settings → Voice error notices keep their sentence at the row's full width, with Ask the agent on its own line underneath.
Below the
smbreakpoint (640px), four error notices in Settings → Voice kept Ask the agent (and the dismiss, where there is one) beside the message, so the sentence was squeezed into a narrow column. #34541 fixed this for the inline rows insideSttSettings.tsxwith call-site classes. These four are what that fix could not reach:SpeechProviderNotice.tsx: a speech provider whose own check failed. It is shared withVoicePanelandVoiceDisabledModal.MicTestStrip.tsx: a failed microphone test.SttSettings.tsx: the speech-to-text settings could not be loaded. This is a boxed banner.SttSettings.tsx: a speech-to-text setting could not be saved. This is a boxed banner with a dismiss.A call-site class cannot move a boxed banner's hand-off, because it lives in the banner's own right-hand column.
Why it matters
On a 375px phone the sentence wrapped to four or five short lines while the hand-off took a third of the row. These are the notices a user reads when voice input does not work, which is exactly when they need to read them.
Not a goal
smup. The desktop screenshots below are pixel-identical before and after.SttSettings.tsxonto the new prop.What changed (motivation → approach → change)
Symptom: a squeezed sentence on a phone. Root cause: the boxed banner always put the hand-off in a sibling column, and the two shared components exposed no way to wrap. Change:
ErrorNoticegainsactionPlacement="below-on-phone", which works in both variants.smthe row wraps and the message takes the width, the same classes fix(stt): put the error hand-off on its own line on a phone #34541 applied by hand. Fromsmup it is one line.smthe text column leaves room only for the icon and the ✕, so both stay on the first line. The hand-off, ordered last, wraps under the text and is indented past the icon. Fromsmup the row is the existingbesideshape.The four call sites pass it. Each keeps its existing
askAgentdecision. AmessagePlacement="below"notice keeps its own shape, andwebsite/docs/frontend-conventions.mddocuments the new value.website/capture/voice-notice-phone-wrap.*renders the four notices through their real components for the screenshots.Backwards compatibility
Compatible: the value is opt-in. No other
ErrorNoticechanges, and withoutaskAgentthe shape is byte-identical (pinned by a test).Removes nothing: no prop, value or call site is removed.
Tests
website/src/test/ErrorNotice.belowOnPhone.test.tsx:smclasses.askAgentthe markup is unchanged.SpeechProviderNoticeuses the new placement.Proof: not provable -- frontend test (prove.py runs Python only)
These pass: the 22
ErrorNotice, Stt, microphone, speech and voice test files (256 tests), plustsc --noEmit, eslint and docs-lint.Manual verification
Rendered the four notices at 375px and 1024px in English and German, at the base commit and on this branch. At 375px the hand-off moves under the sentence. At 1024px the before and after PNGs are byte-identical.
Screenshots / video
375px, German. Before: the sentence is squeezed beside Agent fragen.
After: the sentence takes the row and Agent fragen moves under it.
375px, English, after:
375px English before, and 1024px (unchanged)
Related Issues
Fixes #34540
Sibling sweep
Swept: git grep -n "<ErrorNotice" -- website/src/components/SpeechProviderNotice.tsx website/src/components/MicTestStrip.tsx website/src/pages/settings/SttSettings.tsx
Sibling: website/src/components/SpeechProviderNotice.tsx -- changed here -- shared by VoicePanel and VoiceDisabledModal
Sibling: website/src/components/MicTestStrip.tsx -- changed here -- the failed microphone test
Sibling: website/src/pages/settings/SttSettings.tsx -- changed here -- the two boxed banners; its inline rows already wrap since #34541
Pattern harvest
Not generalizable: a layout gap at four named sites; the shared value now exists for any later notice that spans a card.
Checklist
feat|fix|docs|style|refactor|perf|test|chore|ci|build|revert: ...)Contribution License Agreement
Contributions are accepted under the project's Apache-2.0 license.