Skip to content

Improve microphone input feedback - #4782

Merged
ymichael merged 3 commits into
mainfrom
bb/check-if-the-microphone-is-usable-thr_zx2taiuun4
Oct 5, 2026
Merged

ymichael merged 3 commits into
mainfrom
bb/check-if-the-microphone-is-usable-thr_zx2taiuun4

Conversation

@ymichael

@ymichael ymichael commented Oct 2, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

The composer exposed no direct microphone preferences, and a missing selected microphone only fell back to the system default when capture started. A microphone can remain enumerated while providing silence, so device presence alone could not establish usable input.

What changed

Add a microphone context popover on desktop and persistent drawer on mobile, with automatic local waveform preview and directly selectable inputs. Capture failures show a decorative badge on the idle mic; the full warning button opens preferences. Keep healthy click-to-record behavior. No composer chevron, header icon, recording-row mic control, new mobile gesture, or background audio monitoring. Visiting Settings changes the saved input without opening capture. Failed previews report Unavailable rather than retaining a Connecting label.

Try the saved input, system default, then other inputs for missing/unreadable devices; preserve the saved preference and keep a stable recorder through active-input disconnect recovery. Release preview capture on close/navigation, including late permission results. Near-silence warns in the preview; recording silence is accessible status only after removal of the recording-row control. Healthy mobile idle discovery and a visible recording-silence affordance remain product decisions.

No public SDK, CLI, database, or server/daemon wire changes. Browser-local selection remains documented. Overlaps with #4774 (transcription retry) and #4780 (voice send after navigation) in useVoiceInput/usePromptVoice; neither PR is incorporated here.

How you verified

  • 192 relevant app tests passed through Turbo, plus app typecheck and lint (0 errors).
  • Browser checks of picker selection, simulated device disconnect recovery, near-silence, and preview release. Synthetic input/audio is explicitly labelled; no physical microphone or laptop-lid behavior is claimed.
  • Built base and final head with pnpm start:worktree in separate disposable stores. Matched real-app light-mode screenshots show the missing base picker/badge and new behavior; checked dark and Chromium touch emulation too.
  • After the Settings privacy fix, 8 affected component tests passed; typecheck and lint passed. Final one-line error-label behavior was rechecked in-browser and typechecked.
  • Real Codex transcription of synthetic spoken audio inserted text into the draft; preview-only capture never transcribes.
  • iOS Simulator Safari: deferred drawer rendering and non-inert root verified via DOM-click fallback. WebDriver tap did not activate the control and synthetic AudioContext remained gesture-blocked; real Safari touch/audio are not claimed.
  • Isolated review instance is configured and left running; canonical thread HANDOFF.md includes precise provenance, matched inline images, final CI matrix, reset/stop instructions, and outstanding discoverability choices.

AGENT GENERATED

@ymichael
ymichael merged commit e4fcbed into main Oct 5, 2026
34 checks passed
@ymichael
ymichael deleted the bb/check-if-the-microphone-is-usable-thr_zx2taiuun4 branch October 5, 2026 19:07
ymichael added a commit that referenced this pull request Oct 5, 2026
## Human comments

## What was wrong

Main's CI has been red since #4782 (e4fcbed). The SplitWorkspaceRoute
static closure measures 1062.5 KiB against a 1062.4 KiB raw limit, about
100 bytes over. Brotli, boot, and split guards all pass.

#4782 adds about 12 KiB to the closure because `VoiceInputButton`
statically imports `MicrophonePreferences`. Its PR CI last ran on Oct 2,
while the temporary 5% raise from #4906 was still in effect. #4907 then
restored the lower limits on Oct 5, and the two merges collided.

## What changed

Temporarily raise both SplitWorkspaceRoute byte limits by 5%, using the
same values as #4906: raw 1,087,864 → 1,142,257 bytes and Brotli 317,278
→ 333,142 bytes. The reason is recorded in `bundle-budget.json`. A
follow-up will lazy-load the microphone preferences and ratchet the
limits back down. Boot budgets and dependency/split guards are
unchanged.

## How you verified

CI on 95750b8 measured 1062.5 KiB raw / 308.6 KiB Brotli for the
closure. Both numbers are well under the new limits.
`bundle-budget.json` parses as JSON.

> AGENT GENERATED

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
ymichael added a commit that referenced this pull request Oct 7, 2026
## Human comments

## What was wrong

PR #4782 was squash-merged from pushed head `6df2deeffa`, leaving four
subsequent local commits (`fdbbd8aea0`, `3f2def60ed`, `15648844c8`, and
`5b8191baf8`) unpublished. Settings therefore lacked the intended Voice
Input controls, and the microphone preview and warning feedback missed
the follow-up improvements.

## What changed

- Apply all four follow-ups onto current main (`452376e59e`): restore
Voice Input settings, open the shared preview from Settings, put warning
and hint on separate tooltip lines, show the active microphone in the
preview header, and shorten status messages to keep the popover steady.
- Resolve conflicts with #4955 by moving
`MicrophonePreferencesSplit.tsx` alongside the preview and retaining its
intent-based loading from both entry points. Keep the shared popover
shell separate from the heavy preview implementation.
- Preserve the microphone capture, reconnect, and late permission
cleanup tests at the preview's new location. Add a bundle boundary guard
for the implementation.
- Update configuration docs, CLI guide, and bb-cli reference for the
Settings entry point. No server/daemon wire, public SDK, or CLI command
changes; the device preference remains browser-local.

## How you verified

- `pnpm exec turbo run typecheck lint test --filter=@bb/app`: passed;
586 test files and 5,471 tests passed, with 2 files / 6 tests skipped.
Lint reported existing warnings and no errors.
- Focused preview, composer-button, and Settings tests after retaining
lifecycle coverage: 3 files / 11 tests passed. Final Turbo lint and
typecheck passed.
- `pnpm exec turbo run build --filter=@bb/app` and `node
apps/app/scripts/check-bundle-budget.mjs`: passed. Temporarily importing
the preview eagerly made the new boundary guard fail for
`MicrophonePreferences.tsx`; restoring the split and rebuilding passed.
- Isolated source app, connected local daemon, and Chromium
desktop/390px smoke checks: Settings opens the preview, device label
appears in the header, selection persists, capture tracks stop on close,
permission denial shows the compact hint, and the compact view uses the
shared drawer without hiding the app root. MediaDevices capture/device
scenarios used a browser-only synthetic audio stream; physical
microphone recording/transcription and iOS Simulator Safari were not
tested.
- `git diff --check`: passed. The verification inventory check reports
unrelated pre-existing drift: unmapped `browser` CLI family.

> AGENT GENERATED

---------

Co-authored-by: Claude Opus 5.5 <[email protected]>
bborn added a commit to bborn/bb that referenced this pull request Oct 12, 2026
…rk-only)

Upstream added microphoneWarning and send to PromptVoiceConfig (get-bb#4551, get-bb#4782).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
bborn added a commit to bborn/bb that referenced this pull request Oct 12, 2026
…rk-only)

Upstream added microphoneWarning and send to PromptVoiceConfig (get-bb#4551, get-bb#4782).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
bborn added a commit to bborn/bb that referenced this pull request Oct 13, 2026
…rk-only)

Upstream added microphoneWarning and send to PromptVoiceConfig (get-bb#4551, get-bb#4782).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
bborn added a commit to bborn/bb that referenced this pull request Oct 14, 2026
…rk-only)

Upstream added microphoneWarning and send to PromptVoiceConfig (get-bb#4551, get-bb#4782).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
bborn added a commit to bborn/bb that referenced this pull request Oct 22, 2026
…rk-only)

Upstream added microphoneWarning and send to PromptVoiceConfig (get-bb#4551, get-bb#4782).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.

1 participant