Skip to content

ui-react: wire dictation (D1–D8) to the voice field components #3694

Closed

Description

@schlessera

Context

Part of #3690. Prerequisite: #3692, which supplies the VoiceField (compact shape), VoiceNotice and the D1–D8 stories, signed off. This issue is integration only: it maps the use-dictation.ts state onto those components and removes the current dictation chrome.

Dictation states D1–D8

State mapping

State Driven by Exit
D1 Ready idle tap leads to D2/D3; hold leads to Start (#3693)
D2 Waiting for access permission prompt pending granted leads to D3; denied leads to D7; Cancel leads to D1
D3 Listening capturing; level from the real input; partial and final text ✓ leads to D5
D4 Quiet capturing with no speech speech returns to D3; 30 s silence timeout (V3) leads to D6, or D1 if empty
D5 Finishing stop requested, awaiting the final text final text leads to D6
D6 Review plain editable composer text, caret at end; no uncertain-word mark or hint-line cue (later M2 ruling on #3727) Send / edit / mic
D7 Mic blocked permission denied tapping the mic retries
D8 Stopped provider or transport failure; the text so far is kept Try again / Dismiss

Acceptance criteria

Scope and exclusions

Wire the approved dictation state mapping plus the signed-off D0, Dc, Dx and destination forms below, using the existing kit components unchanged. The source driver is useDictation (packages/ui-react/src/voice/use-dictation.ts:27); kit owners are VoiceField (packages/ui-kit/src/voice/VoiceField.tsx:52) and VoiceNotice (packages/ui-kit/src/voice/VoiceNotice.tsx:32).

Out of scope: new component visuals, provider selection infrastructure, live-conversation behavior, permission/consent changes, new confidence claims, and changes to speech contracts. #3727 owns the real Composer mic slot and D6 form.

Approved behavior

V3 (maintainer, 2026-11-08): stop after 30 s of silence, go to D6 when words exist and D1 when empty. K1/K2 and all missing disclosure/connecting forms are approved in the final sign-off below. M2 on #3727 supersedes the original uncertain-word D6 mock: review is plain editable text with no honesty mark or hint-line cue; the mic is named Dictate more.

Source: final design sign-off.

Design sign-off: dictation disclosure in the voice field (final, K1 and K2 folded in)

3694-dictation-forms.png

Signed off. The brief above stands as drawn, and K1 and K2 match its recommendations. This is the consolidated spec for the integration.

ui-kit components (all reused unchanged): compact VoiceField (label.meta), VoiceNotice, VoiceControlButton. Stories: #3738 (prerequisite).

Uses the ui-kit components unchanged; no new visual design here. Any visual change goes back to #3738 and its stories.

Flow: tap mic → D0 (first take) → Dc → D2 (if prompted) → D3 → D4/D5 → D6

Form Component Copy Focus / notes
D0 first take VoiceNotice tone="you" icon="mic" live="polite" Start dictation · "Your words are sent to {destination} to be written down. The audio isn’t kept." · Cancel / Start dictation K1: focus on Start dictation. Cancel and Esc return focus to the mic. Shown before any session request or mic access. Recorded only after a successful write
Dc connecting compact VoiceField tone="idle" meter="none", label {loading, "Connecting", meta, spin} VoiceText placeholder="Not listening yet" · trailing Cancel dictation Grey, 84px. Never says "Listening" before the mic is open
D3–D5 destination label.meta "to Google Gemini" · "via Deepgram" · Chrome: "browser speech · audio goes to Google" · other browsers: "browser speech · sent by your browser" (K2) One line, 84px kept. The meta ellipsizes first. Same meta in Dc
Dx no service VoiceNotice tone="idle" icon="attention" Choose a dictation service · "Dictation needs a service. Pick one in Settings." · Cancel / Open Settings No mic, no meter
Dx service gone same Your dictation service isn’t available · "{Service} isn’t offered here any more. Choose another in Settings." · Cancel / Open Settings

Acceptance additions for this issue

  • The destination is named (D0 or the Dc meta) before any audio leaves the browser. Browser test: no getUserMedia before D0 is accepted, and none before Dc renders.
  • Storage failure on the acknowledgement shows D0 again next take.
  • The old dictation sheet is removed only once these forms are wired.

No open questions remain. This stays blocked by #3738, #3708, #3709 and #3727.

Current dependencies

No active blocker (2026-11-10).

Delivered prerequisites: #3692 through #3718, #3708 through #3717 (723280e), and #3709 through #3724 (8752570). Their source is on inspected main. The signed-off design is settled; #3738's stories and #3727's Composer support are both delivered (see below). Do not restore a design prerequisite merely because the approved kit implementation is not merged yet.

Verification

Use actual app browser tests with a local speech double for every D-state and additional form, including no session request/getUserMedia before D0 acknowledgement, no listening claim in Dc, persisted acknowledgement failure, preserved text on failure, the 30 s silence boundary, explicit Send and both themes at 320px/desktop. Retain state/focus/consent mutation receipts and required pinned-browser proof.

Contract impact

Integration uses the existing dictation contract. Any separately exposed supported API change must be assessed and documented in its owning component; no new API or ruling is inferred here.

Triage 2026-11-08 at main 8752570331ffebdbb9233196412781f6cd71f3d9: Folded the final signed-off specification and later rulings into this body, removed obsolete open questions, and reconciled actual delivered and open prerequisites. Existing ownership, draft work and release attribution are preserved.

2026-11-10 triage at main d79eeed0a: both former blockers are satisfied and moved out of the Blocked by line. #3727 is closed as completed through #3742 (squash fb999b8ba). #3738 is closed as completed after the maintainer's 2026-11-09 design sign-off; its stories and baselines are on main through #3741 (squash c3908ae7a). Merge order still follows #3693's PR #3761, as recorded in the comments; that is sequencing, not a declared blocker.

Activity

  1. added
    type: feat
    area: ui-react
    priority: p2
    needs: decision
    on Nov 8, 2026
  2. changed the title [-]ui-react: dictation states D1–D8 on the voice field[/-] [+]ui-react: wire dictation (D1–D8) to the voice field components[/+] on Nov 8, 2026
  3. added
    blocked
    agent-ready
    and removed
    needs: decision
    on Nov 8, 2026
  4. schlessera commented on Nov 8, 2026

    @schlessera
    OwnerAuthor

    Decision (maintainer, 2026-11-08): see the rulings on #3690; this issue's body now states the chosen branch. needs: decision removed. Blocked by #3692 (and, for #3698, by #3616/#3617) until its signed-off components exist.

  5. schlessera commented on Nov 8, 2026

    @schlessera
    OwnerAuthor

    Unblocked: #3692 is closed, so scripts/sync-project.ts is removing the blocked label.

  6. removed
    blocked
    on Nov 8, 2026
  7. self-assigned this
    on Nov 8, 2026
  8. schlessera commented on Nov 8, 2026

    @schlessera
    OwnerAuthor

    Claimed (token wi-3694-5b2d). Intended branch: feat/3694-dictation-voice-field, from main (#3693 is blocked by #3727 and produced no branch).

    Collision note: draft PRs #3717 and #3724 also edit use-dictation.ts, dictation-capture.ts, voice-state.ts, dictation-sheet.tsx and composer.tsx.

  9. removed
    agent-ready
    on Nov 8, 2026
  10. 20 remaining items

  11. removed
    blocked
    on Nov 9, 2026
  12. schlessera commented on Nov 9, 2026

    @schlessera
    OwnerAuthor

    Unblocked: both declared blockers are closed. #3727 merged in #3742, and #3738 was signed off and closed on 2026-11-09. Its earlier blockers #3708 and #3709 are also closed.

  13. self-assigned this
    on Nov 9, 2026
  14. schlessera commented on Nov 9, 2026

    @schlessera
    OwnerAuthor

    Claimed (token wi-3694-c41e). Branch: feat/3694-dictation-voice-field, from main fb999b8. I'll rebase onto #3693 (PR #3761) when it lands and build on its tap→dictation entry.

    Path collisions: PRs #3761, #3735 and #3758 also edit packages/ui-react/src/components/chat/composer.tsx, and #3761 also edits composer-view.tsx.

  15. added this to the 0.45.0 milestone on Nov 9, 2026
  16. schlessera commented on Nov 9, 2026

    @schlessera
    OwnerAuthor

    Status (claim wi-3694-c41e): implementation done in draft #3772; waiting on #3761 to merge.

    #3772 builds on #3761's tap-to-dictation entry, so it includes #3761's commits and can't merge first. On the maintainer's ruling, I'm not taking #3761 over or folding it in.

  17. schlessera commented on Nov 9, 2026

    @schlessera
    OwnerAuthor

    Decision (maintainer, 2026-11-09): the first-take "Start dictation" card uses per-service wording for what happens to the audio.

    • Gemini: keep the signed-off sentence, "The audio isn't kept."
    • Deepgram and browser speech: this app can't verify the provider's retention, so the card must not claim it. Say instead that the provider's own policy applies, for example "Deepgram's retention policy applies", or for browser speech, your browser's speech service policy.

    Make this change in PR #3772 before it lands. The other three choices listed in #3772's body stand: the "Dictate more · " mic name, "Review in composer" writing to the draft, and Escape cancelling a take that isn't finishing.

  18. schlessera commented on Nov 10, 2026

    @schlessera
    OwnerAuthor

    2026-11-10 triage at main d79eeed0a: the Blocked by #3738, #3727 line named two closed issues, and both outputs exist. #3727 closed through #3742 (squash fb999b8ba). #3738 closed as completed after the maintainer's 2026-11-09 sign-off, and its stories and baselines are on main through #3741 (squash c3908ae7a). I moved both into a dated historical note and updated the stale "still waits" sentence. There is no open blocker. Merging after #3761 is sequencing, not a declared blocker. Labels are unchanged.

  19. schlessera commented on Nov 10, 2026

    @schlessera
    OwnerAuthor

    Delivered in #3772, squash 96ba8a7c8636ab0a2bdac9f9427eab8d5dd02829 on main (milestone 0.45.0).

    • Dictation runs in the voice field using the signed-off kit components, unchanged: D0, Dc, D2, D3–D5, D6 as draft text, D7, D8 and both Dx forms. The 30 s silence stop (V3) is in. The old dictation sheet and review card are removed.
    • First-take wording follows the 2026-11-09 decision. Gemini keeps "The audio isn't kept." Deepgram, browser speech and other services say their own retention policy applies.
    • Proof: confirmation run 42907287546 passed on candidate head 7497c2c over base 462afad. Each state is compared with its story in the dictation suite. Mutation receipts are in the PR body.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

agent-readyarea: ui-reactpriority: p2type: feat

Projects

No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions