Repository navigation
Dictate custom question answers - #4783
Merged
Merged
Conversation
ymichael
marked this pull request as ready for review
October 2, 2026 23:47
Replace the question form host's experimental_VoiceInput field with a top-level experimental_VoiceInputTextarea runtime component: a controlled textarea that owns its microphone controls, waveform, and transcript appending. The shared question form renders its free-text answer with it through a shimmed shared-ui module, and the registry re-exports the SDK component. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ymichael
force-pushed
the
bb/enable-voice-input-thr_cu3tsuutm9
branch
from
October 5, 2026 19:34
80cc256 to
106f101
Compare
…-thr_cu3tsuutm9 # Conflicts: # apps/app/bundle-budget.json # packages/domain/src/plugin-sdk-version.ts # packages/plugin-sdk/package.json # plugins/plugin-api-docs/src/surfaces.ts
…-thr_cu3tsuutm9 # Conflicts: # packages/domain/src/plugin-sdk-version.ts # packages/plugin-sdk/package.json
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
The custom-answer field in question forms had no microphone input. Users could dictate into the composer but had to type their own answers to agent questions.
What changed
Add bb's voice input to the free-text answer in shared question forms, with the mic inside the answer field at the bottom right. Recording, transcription, and cancellation use the existing voice capture hook and transcription service. Transcripts append to the editable text; submission stays explicit. Navigation and submission wait while voice input is active, and a closed answer field ignores late transcripts. The field reserves space below its text for the controls, including narrow touch layouts. Transcripts go through the same state update as typed text, so they persist in the question form drafts from #4781.
The answer-field microphone reuses the promptbox voice button, including right-click and Shift+F10 access to microphone preferences and capture-warning recovery. A local tooltip provider keeps the exported textarea self-contained.
Expose it to plugins as a top-level host component,
experimental_VoiceInputTextarea(@get-bb/plugin-sdk/app), next toexperimental_NewThreadComposerand the pickers:value,onValueChange(value), optionalonVoiceInputActiveChange(active). Every other textarea attribute, includingrefandclassName, reaches the inner<textarea>. The host owns the mic, waveform, cancel/stop controls, padding, and transcript appending, and renders a plain textarea when voice input is unsupported.apps/app/src/components/promptbox/VoiceInputTextarea.tsx, registered in the SDK app implementation.voice-input-textareamodule, which the shared question form renders. The plugin build shims it to the host's copy (newvoiceInputTextarearuntime slot), likequestion-form-host, so the built-in Ask User Question and pi plugins get the host component.ThreadQuestionFormHostprovides it.voice-input-textareaitem whose plugin flavor re-exports the SDK component;question-formuses it.renderSlotrenders a plain controlled textarea.docs/api_to_audit.mdentry, Plugin Guide surfaces, and plugin-authoring references. Plugin SDK bumped to 0.6.23 above main's 0.6.22.Merge current main to resolve SDK-version and Plugin Guide conflicts and adopt its thread/new-thread route bundle measurements. Preserve the voice-input API symbols and keep guide bullets within the new copy constraints. The final branch uses main's byte limits without an increase.
No CLI, daemon wire, or database changes.
How you verified
SDK version follow-up (
37125cb275): bump both version declarations to 0.6.23 after main reached 0.6.22. SDK version tests, the public-surface version check, and app/desktop lockstep check pass locally.Voice-menu follow-up (
8df04c2f42): app typecheck/lint, targetedVoiceInputButtonandQuestionFormtests, and bundle budgets pass. In the rebuilt worktree app, right-click and Shift+F10 open voice preferences; opening the menu does not start dictation or hide/inert the app root. Physical microphone capture was not tested in the headless browser.CI repair on
5784b3dc13after merging main:pnpm exec turbo run build typecheck lint --filter=@bb/app --filter=@get-bb/plugin-sdk --filter=bb-plugin-plugin-api-docspassed.node apps/app/scripts/check-bundle-budget.mjspasses within main's unchanged limits: boot 1360.7 KiB raw / 340.2 KiB brotli; thread page 1788.0 KiB raw / 516.0 KiB brotli; new-thread page 1066.9 KiB raw / 315.7 KiB brotli.pnpm exec turbo run test --filter=@bb/app --filter=@get-bb/plugin-sdk --filter=bb-plugin-plugin-api-docsalso passed after merging main. The SDK-version check passes.Before the CI repair (rebased on 95750b8):
pnpm exec turbo run typecheck lint testfor@bb/app,@get-bb/plugin-sdk,@bb/plugin-build,@bb/plugin-registry,@bb/shared-ui,bb-plugin-plugin-api-docs,bb-plugin-ask-user-question, andbb-plugin-provider-pi: typecheck passed, lint had 0 errors, and all tests passed (app 576 files, SDK 30, plugin-build 13, registry 1, Plugin Guide 13, Ask User Question 4, pi 28).plugin-authoring-docsandplugin-authoring-doc-examplestests passed..github/workflows/check-plugin-sdk-version.mjspasses.QuestionForm.test.tsxcovers appending a transcript to the latest edited answer without submitting, ignoring late transcripts after the field closes, and blocking navigation and submission while transcription is pending.The earlier browser checks (recording, transcription, cancellation, injected errors, late-result isolation, screenshots on desktop and narrow touch, real recognition with a synthesized WAV) ran on the first version of this PR, before voice input moved into the host textarea component. They have not been repeated on the current head. Physical microphone and native-device/Safari coverage are not claimed.
#4780 and #4774 change the shared voice hook; their scopes remain separate.