Repository navigation
fix(ui): explain pending voice microphone access - #133353
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 30, 2026, 12:12 PM ET / 16:12 UTC. ClawSweeper reviewWhat this changesThe PR adds visible microphone-permission guidance to Browser Talk and dictation while capture is pending, then clears it as the voice connection progresses. Merge readinessKeep this active: it is a maintainer-authored repair for an open, still-unmerged Browser Talk usability bug, and the reviewed patch has no actionable correctness finding. Priority: P1 Review scores
Verification
How this fits togetherControl UI Talk startup requests browser microphone capture before its realtime transport can connect. The chat composer receives lifecycle status and renders the pending-capture state while retaining Stop as the cancellation action. flowchart LR
A[User starts voice input] --> B[Talk startup]
B --> C[Browser microphone request]
C --> D{Capture state}
D -->|Permission pending| E[Visible permission guidance]
D -->|Capture granted| F[Realtime transport setup]
E --> G[Stop cancels startup]
F --> H[Listening state]
Before merge
Agent review detailsSecurityNone. PR surfaceSource +35, Tests +190, Docs +7. Total +232 across 22 files. View PR surface stats
Review metrics
Root-cause clusterRelationship: Members:
Proposal only: this assessment does not dispatch repair, suppress jobs, mutate sibling items, close, or merge anything. Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the shared microphone lifecycle callback and the single composer status renderer as the canonical progress path, then land after exact-head checks complete. Do we have a high-confidence way to reproduce the issue? Yes—source provides a high-confidence path: leave Is this the best way to solve the issue? Yes—the patch records the fact at the shared microphone owner and routes all three transports through the existing callback and one renderer, avoiding transport-specific UI state. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 279a12cf8b89. LabelsLabel changes:
Label justifications:
EvidenceWhat I checked:
Likely related people:
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
|
|
Maintainer review complete for a1a6c73. The shared microphone owner and single composer status renderer remain the canonical progress path; the +35 production lines provide the missing visible lifecycle guidance. No extra transport-specific state or timeout is introduced. This resolves the review's stated merge-risk decision. One correction to the screenshot assessment: the images currently embedded in this PR show the actual pending state, not denied permission. The before image has the animated stop control and no visible guidance; the after image visibly says “Waiting for microphone access. Bring this tab to the foreground and allow access if prompted.” Both were inspected, and re-downloaded GitHub assets match the local inspected PNGs byte-for-byte. The complete candidate has a clean pinned Codex review. Focused owner/sibling tests and both native Chromium scenarios pass; the body includes exact commands and proof limits. Initial CI found a test-file line limit; sharing its repeated peer lookup fixed that without weakening assertions. The 27-test rerun and scoped core lint passed. Final exact-head CI is green: https://github.com/openclaw/openclaw/actions/runs/33321368909 The local shared-dependency typecheck limitation remains documented; no dependency or gate was changed. Native review artifacts validate, and the live branch rules require the now-successful CI gate, not an additional approval. Proceeding through repository-native prepare/merge. Separate Google correlation and delayed-allocation repairs remain tracked in #133351 and #133359. |
|
Merged via squash.
|
* fix(ui): explain pending voice microphone access * test(ui): share WebRTC peer lookup in lifecycle cases
Closes #133348
What Problem This Solves
Fixes an issue where users starting Browser Talk would see an animated stop control without visible guidance when microphone access remained pending. The same missing permission guidance affected dictation in chat and the new-session composer.
Why This Change Was Made
The shared microphone owner now reports when capture is being requested and when acquisition succeeds. The composer displays that existing connecting state as a neutral status callout, separating session preparation, microphone access, and provider connection. Cancellation cannot publish a late status or retain a late-granted stream. The existing error renderer remains the single owner for errors; duplicate connecting announcements and unused dictation copy are removed.
No new configuration, timeout, permission bypass, dependency, or persistence contract. The browser is allowed to leave a permission request unresolved; adding an arbitrary timeout would not fix that condition. Provenance: introducing commit unknown; #127673 handled rejected requests, not pending requests.
User Impact
Users can see what startup is waiting for and receive foreground/permission guidance while the microphone request is pending. Stop remains available. Guidance disappears when the connection is ready, while existing microphone-loss errors and cleanup remain intact.
Evidence
Two focused pre-fix regressions failed for missing microphone-phase status and missing visible composer guidance. The native Chromium scenario also failed on the baseline. The repaired run passes the pending-access flow, real Chromium capture acquisition, transition to Listening, and existing microphone-ended cleanup. Gateway/provider signaling is synthetic in that deterministic browser test; this is not a claim about physical microphone permission prompts or live provider recognition accuracy.
Focused tests cover the shared microphone lifetime, OpenAI WebRTC, Google Live, Gateway relay, session ownership, chat rendering, and new-session dictation. Before/after pictures below use inspected synthetic data only. Browser contract: https://w3c.github.io/mediacapture-main/#dom-mediadevices-getusermedia
Production UI: +88/-53 (net +35). Tests/test support: +233/-43. Docs: +7. The production growth supplies previously absent lifecycle progress and visible guidance through existing status/rendering owners; no new state machine or fallback path.
Release-note context: Browser Talk and dictation explain pending microphone access and show startup progress.
Before:
After:
Focused validation commands and outcomes
Fresh Codex autoreview against the pinned baseline found no actionable P0-P2 findings.
Known separate follow-ups: #133351 tracks Google interruption turn correlation. Long microphone waits can also expire an already-created short-lived offer; this PR makes the wait visible but does not change allocation order or extend provider deadlines.
CI correction: initial run 33320952669 found the existing WebRTC test file at 1002 counted lines. Shared the repeated peer lookup guard without changing assertions; the focused 27-test rerun and exact core lint command passed:
The full candidate received another clean pinned Codex review before the correction was pushed. Local broad changed-check verification is limited by the shared checkout dependency tree resolving pako 1.0.11 instead of the locked UI 3.0.1; the artifact-preparing lint invocation also encountered stale Telegram dependency types. No dependencies or gates were changed. The correctly scoped core lint passed, and the first clean hosted run passed its UI/type and browser lanes. Exact-head hosted CI remains required for landing. Long microphone allocation delay is tracked in #133359.