Skip to content

fix: move the voice error hand-off under its sentence on a phone - #34633

Merged
KiroCrewCaptain merged 1 commit into
mainfrom
crew/conductor/voice-notice-phone-wrap
Nov 10, 2026
Merged

KiroCrewCaptain merged 1 commit into
mainfrom
crew/conductor/voice-notice-phone-wrap

Conversation

@RohanK6

@RohanK6 RohanK6 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor

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 sm breakpoint (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 inside SttSettings.tsx with call-site classes. These four are what that fix could not reach:

  • SpeechProviderNotice.tsx: a speech provider whose own check failed. It is shared with VoicePanel and VoiceDisabledModal.
  • 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

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: ErrorNotice gains actionPlacement="below-on-phone", which works in both variants.

  • Inline variant: below sm the 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. From sm up it is one line.
  • Block variant: below sm the 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. From sm up the row is the existing beside shape.

The four call sites pass it. Each keeps its existing askAgent decision. A messagePlacement="below" notice keeps its own shape, and website/docs/frontend-conventions.md documents 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 ErrorNotice changes, and without askAgent the 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:
    • The inline and block variants carry the phone-wrap and sm classes.
    • The block hand-off sits outside the text column, ordered last, and renders exactly once.
    • Without askAgent the markup is unchanged.
    • A failed SpeechProviderNotice uses the new placement.
    • Three of these fail on main.

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

These pass: the 22 ErrorNotice, Stt, microphone, speech and voice test files (256 tests), plus tsc --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.

before 375 de

After: the sentence takes the row and Agent fragen moves under it.

after 375 de

375px, English, after:

after 375 en

375px English before, and 1024px (unchanged)

before 375 en

after 1024 en

after 1024 de

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

  • 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.

@RohanK6
RohanK6 requested review from a team and KiroCrewCaptain as code owners November 10, 2026 15:57
@RohanK6
RohanK6 requested a review from buluoray November 10, 2026 15:57
@github-actions github-actions Bot added the readiness: checking Automated validation is still running label Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Design Review (Opus 5.5) — ✅ PASS

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

Design-Verdict: PASS

Nothing blocks: the change adds one opt-in placement value inside ErrorNotice, that is the right layer for it, and screenshots of this revision are attached.

Notes

  • The description and the diff disagree. ## Not a goal says "Migrating fix(stt): put the error hand-off on its own line on a phone #34541's call-site classes in SttSettings.tsx onto the new prop", but the diff does that migration: it deletes PHONE_WRAP_ROW and PHONE_WRAP_MESSAGE and moves six inline call sites onto actionPlacement="below-on-phone". The goal is frozen, so state the migration under ## What changed rather than editing ## Not a goal. Also point to evidence for those six rows; the screenshots cover only the four new sites.
  • After the migration, the phone-wrap classes apply only when askAgent is on. Before, the call-site classes applied whether or not it was on. With no hand-off there is nothing to wrap, so this should not change what users see. Say so explicitly, because askAgent={awsDraftsSaved} and askAgent={askAgent} turn the hand-off off at runtime.

[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 .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

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

UX Review (Opus 5.5) — ✅ PASS

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

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

  • The capture page mixes languages. In German it shows "Agent fragen" next to three English sentences (shots 01, 02 and 06), and the blind reader flagged this. Pass the German strings to the fixtures so a reviewer sees one language per screen.

[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 .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

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

Opus 5.5 Review — ✅ no blocking findings

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

Review details

No findings.

[OPUS-REVIEWED] be7c797

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

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

@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

First Principles Review (Opus 5.5) — ✅ PASS

Premise-level review of be7c7970e37b0a36eb7b21d155cb938edde345af — 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

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 ## Not a goal excludes.

Notes

  • Item 6 — undeclared: ## Not a goal says "Migrating fix(stt): put the error hand-off on its own line on a phone #34541's call-site classes in SttSettings.tsx onto the new prop", but the diff deletes PHONE_WRAP_ROW/PHONE_WRAP_MESSAGE and moves 6 call sites onto actionPlacement="below-on-phone". The migration is itself a subtraction: it removes a second spelling of the same classes. What it contradicts is the description, not the code. Subtraction: none needed in code. The frozen line misstates the diff, and only a human can amend it.

What this change ships

Inventory (7 items) — 6 justified

Intent: on a phone, Settings → Voice error notices keep the sentence at full width with Ask the agent underneath. FIX.

  1. Failed speech-provider notice (Voice panel, modal, settings): hand-off moves under the sentence below sm. — justified
  2. Failed microphone test: hand-off moves under the sentence below sm. — justified
  3. STT "could not load" banner: hand-off wraps under the text on a phone. — justified
  4. STT "could not save" banner with ✕: hand-off wraps under the text, ✕ stays on line one. — justified
  5. New ErrorNotice actionPlacement value below-on-phone (12 non-test call sites). — justified
  6. Six existing SttSettings inline rows move from local class constants to the new prop. — undeclared; contradicts Not a goal
  7. Screenshot harness website/capture/voice-notice-phone-wrap.* (follows 653 existing capture files) and a conventions-doc line. — justified

[FIRST-PRINCIPLES-REVIEWED] be7c797

Description read

[DESCRIPTION-READ] 6bb24ec5e26dc2fb88ed296fb52c65e0d54ba2a15cf727a92ac1184342877e97

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 github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 10, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/voice-notice-phone-wrap branch from 901b530 to f90486a Compare November 10, 2026 17:08
@RohanK6

RohanK6 commented Nov 10, 2026

Copy link
Copy Markdown
Contributor Author

First Principles block (two spellings of the inline phone-wrap): fixed in f90486a.

The seven SttSettings.tsx call sites that used PHONE_WRAP_ROW / PHONE_WRAP_MESSAGE now pass actionPlacement="below-on-phone", and both constants and their comment are deleted. ErrorNotice's inline branch is now the only place that spelling lives (git grep PHONE_WRAP -- website/src is empty). Every one of those sites is inline with askAgent, and none passes messagePlacement, so each renders the same classes as before. The 22 ErrorNotice, Stt, mic, speech and voice test files still pass (256 tests).

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.

@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 10, 2026
@github-actions

github-actions Bot commented Nov 10, 2026 •

Copy link
Copy Markdown
Contributor

GPT 6.1 Review — ✅ no blocking findings

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

This comment is updated in place on each push.

Review details

No findings.
[GPT-REVIEWED] be7c797

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

@github-actions github-actions Bot added readiness: action required A blocking check or review needs attention and removed readiness: checking Automated validation is still running labels Nov 10, 2026
@RohanK6
RohanK6 force-pushed the crew/conductor/voice-notice-phone-wrap branch from f90486a to 88a3ae9 Compare November 10, 2026 19:12
@github-actions github-actions Bot added readiness: checking Automated validation is still running and removed readiness: action required A blocking check or review needs attention labels Nov 10, 2026
@KiroCrewCaptain

Copy link
Copy Markdown
Collaborator

Code change approver recommendation: A person should decide

Automated, not a person, and not a review: a maintainer still decides.

decider-v3c@217fe607 · p_defect 0.22 · router R0 (approves only when p_defect <= 0.12, on changes of at most 400 changed lines) · head 88a3ae93c5 · 250 changed lines

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
@RohanK6
RohanK6 force-pushed the crew/conductor/voice-notice-phone-wrap branch from 88a3ae9 to be7c797 Compare November 10, 2026 20:06
@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 enabled auto-merge (squash) November 10, 2026 21:56

@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.

Thanks for this fix. On head be7c797 we checked these points:

  • Without askAgent, the new actionPlacement="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 sm up, the old row returns.
  • Three of the new tests fail on main and pass here.
  • No call site changes its askAgent behaviour.

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", askAgent and actionPlacement="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 for beside or below-on-phone, keep phoneBelow only 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.

@KiroCrewCaptain
KiroCrewCaptain merged commit 1afae07 into main Nov 10, 2026
97 of 98 checks passed
@KiroCrewCaptain
KiroCrewCaptain deleted the crew/conductor/voice-notice-phone-wrap branch November 10, 2026 21:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

readiness: passed Eligible automated validation passed for the current revision

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Voice settings: on phones, four more error notices squeeze their sentence beside Ask the agent

2 participants