Skip to content

fix(ui): explain blocked Talk microphone access - #127673

Merged
steipete merged 1 commit into
mainfrom
codex/autoqa-talk-mic
Aug 21, 2026
Merged

steipete merged 1 commit into
mainfrom
codex/autoqa-talk-mic

Conversation

@steipete

@steipete steipete commented Aug 21, 2026 •

Copy link
Copy Markdown
Contributor

What Problem This Solves

Fixes an issue where users starting Talk from Chat after blocking microphone permission would see only raw browser text such as “Permission denied,” with no guidance on how to recover.

Why This Change Was Made

The shared microphone-acquisition owner now routes non-cancellation browser media errors through its existing localized input-error description. The mapped public error intentionally omits the browser exception cause because Chat formats causes into its visible alert. Selected-device OverconstrainedError guidance and AbortError lifecycle cancellation remain unchanged; no Gateway, provider, config, permission, or session contract changes.

User Impact

When browser microphone access is blocked, Chat now shows only actionable browser-settings guidance. The failed Talk allocation still closes, and the Start voice input action becomes available again.

Evidence

  • Authentic pre-fix owner regression failed with raw denied instead of the existing localized recovery copy.
  • Real source-mode Chromium at 320×720 with a mocked Gateway reproduced the direct Chat path. The same relay allocation closes after acquisition fails, and the Start voice input action recovers.
  • Before: raw “Permission denied”
  • Final after: exact actionable guidance, no browser suffix
  • 320/320 relevant Chat/Realtime Talk unit and browser tests passed across 20 files.
  • Final owner tests passed 23/23 and the full source-Chromium Talk E2E passed 10/10, covering ordinary start/stop, camera, relay, transcript, backpressure, race cleanup, blocked microphone, and Settings discovery paths.
  • The blocked-microphone E2E now requires the rendered status text to equal the localized guidance exactly.
  • The changed gate passed formatting, policy guards, i18n, core/UI typecheck, and focused final lint.
  • Final structured Codex autoreview found no actionable issues (0.96 confidence).
  • Four fresh open issue/PR searches found no exact duplicate.

The existing canonical helper was introduced for dictation and device discovery, but the direct Talk acquisition catch still rethrew browser DOMException text. This patch completes that owner boundary with four production lines and adds one owner regression plus one user-path E2E. It also incorporates both ClawSweeper rank-up moves: remove the causal browser exception from the mapped public error and assert exact browser-visible text.

@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

🦞👀
ClawSweeper picked this up.

Pull request received. I will update this pull request when review starts.

@openclaw-barnacle openclaw-barnacle Bot added app: web-ui App: web-ui size: S maintainer Maintainer-authored PR labels Aug 21, 2026
@steipete
steipete marked this pull request as ready for review August 21, 2026 22:55
@clawsweeper clawsweeper Bot added merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action. labels Aug 21, 2026
@clawsweeper

clawsweeper Bot commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Codex review: needs changes before merge. Reviewed August 21, 2026, 7:02 PM ET / 23:02 UTC.

ClawSweeper review

What this changes

This PR maps blocked browser microphone access in Chat Talk to localized recovery guidance and adds unit and browser-flow coverage.

Regression provenance

Possible regression — probable (reproduction; reviewed change). No predecessor PR is attributed.

Merge readiness

⚠️ Ready for maintainer review - 4 items remain

Keep open: the owner-level mapping is the right boundary, but the patch still shows raw browser error text and code beneath the new recovery guidance.

Priority: P2
Reviewed head: 07b219b7ba799eb0ebba61e062a14ffef0b8b247

Review scores

Measure Result What it means
Overall readiness 🦐 gold shrimp (3/6) The patch is focused and its visual evidence is useful, but that same evidence reveals a concrete user-visible defect.
Proof confidence 🌊 off-meta tidepool Not applicable: This maintainer-authored UI PR includes inspected before-and-after browser screenshots, but contributor proof gating does not apply.
Patch quality 🦐 gold shrimp (3/6) 1 actionable review finding remain.

Verification

Check Result Evidence
Real behavior Not applicable Not applicable: This maintainer-authored UI PR includes inspected before-and-after browser screenshots, but contributor proof gating does not apply.
Evidence reviewed 6 items Current-main defect: Current main maps a selected missing microphone but otherwise rethrows the browser DOMException, so a blocked microphone reaches Chat as raw browser text.
Correct owner and sibling coverage: The existing input-error mapper already classifies NotAllowedError, and WebRTC, Google Live, and Gateway Relay all call this shared microphone owner.
Visible regression introduced by the patch: The new public Error retains the DOMException as its cause; Chat formats errors through a formatter that appends causal messages and codes, then renders that text verbatim in its alert.
Findings 1 actionable finding [P2] Do not retain the browser error in the public alert
Security None None.

Live Verification

Command: node scripts/run-vitest.mjs ui/src/e2e/browser-talk-start-stop.e2e.test.ts -t "shows actionable guidance when Talk microphone permission is blocked"

Result: FAIL (partial) — step 2 expect_output shows actionable guidance when Talk microphone permission is blocked: expected terminal output was not visible within 30 seconds: "shows actionable guidance when Talk microphone permission is blocked"

node scripts/run-vitest.mjs ui/src/e2e/browser-talk-start-stop.e2e.test.ts -t "shows actionable guidance when Talk microphone permission is blocked"
runner@runnervm76f27:/tmp/clawsweeper-live-proof-127673-ySODZ7/target$ node scripts/run-vitest.mjs ui/src/e2e/browser-talk-start-stop.e2e.test.ts -t "shows acti
onable guidance when Talk microphone permission is blocked"
[test] starting test/vitest/vitest.ui-e2e.config.ts
[test] preflight test/vitest/vitest.ui-e2e.config.ts
node scripts/run-vitest.mjs ui/src/e2e/browser-talk-start-stop.e2e.test.ts -t "shows actionable guidance when Talk microphone permission is blocked"
[ui-e2e] Using system Chromium at /usr/bin/chromium-browser.
Downloading FFmpeg (playwright ffmpeg v1011) from https://cdn.playwright.dev/dbazure/download/playwright/builds/ffmpeg/1011/ffmpeg-linux.zip
|                                                                                |   0% of 2.3 MiB
|■■■■■■■■                                                                        |  10% of 2.3 MiB
|■■■■■■■■■■■■■■■■                                                                |  20% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■                                                        |  30% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                                |  40% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                        |  50% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                                |  60% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                        |  70% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■                |  80% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■        |  90% of 2.3 MiB
|■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■■| 100% of 2.3 MiB
FFmpeg (playwright ffmpeg v1011) downloaded to /tmp/clawsweeper-live-proof-127673-ySODZ7/profile/cache/ms-playwright/ffmpeg-1011

 RUN  v4.1.10 /tmp/clawsweeper-live-proof-127673-ySODZ7/target





























Assertions:

  • FAIL expect_output: shows actionable guidance when Talk microphone permission is blocked

How this fits together

Chat creates a Talk session, then its browser transport acquires microphone media. A media-acquisition failure becomes the Chat alert and triggers Talk-session cleanup so the voice control can be used again.

flowchart LR
  A[Chat voice control] --> B[Talk session creation]
  B --> C[Browser microphone request]
  C --> D[Talk input error mapping]
  D --> E[Chat error alert]
  E --> F[Close failed Talk session]
  F --> G[Voice control available again]
Loading

Before merge

  • Do not retain the browser error in the public alert (P2) - formatUiError appends Error.cause messages and codes, so this wrapper renders the localized guidance followed by the original browser text and 0 in Chat. The supplied after screenshot shows Permission denied | 0; throw the mapped public error without that cause and make the browser assertion exact.
  • Resolve merge risk (P1) - Merging still displays browser-controlled “Permission denied | 0” under the recovery instruction, so the reported raw-error problem remains partially visible.
  • Resolve merge risk (P1) - The production delta is justified only if mapped public errors stop retaining DOMException details in this user-facing alert.
  • Complete next step (P2) - The remaining blocker is a narrow mechanical repair in the shared microphone error owner and its focused browser assertion.

Findings

  • [P2] Do not retain the browser error in the public alert — ui/src/pages/chat/realtime-talk-input.ts:242
Agent review details

Security

None.

PR surface

Source +3, Tests +49. Total +52 across 3 files.

View PR surface stats
Area Files Added Removed Net
Source 1 3 0 +3
Tests 2 49 0 +49
Docs 0 0 0 0
Config 0 0 0 0
Generated 0 0 0 0
Other 0 0 0 0
Total 3 52 0 +52

Review metrics

Metric Value Why it matters
Production vs test LOC production +3, tests +49 The small owner-path change is covered at unit and browser levels, but the browser assertion currently accepts the leaked suffix.

Mantis proof suggestion

A redacted Chat capture would directly verify that the repaired alert contains only actionable recovery guidance. A maintainer can ask Mantis to capture proof by posting this exact PR comment:

@openclaw-mantis web UI chat proof: verify that blocked microphone access shows only recovery guidance, with no raw browser error or code.

Merge-risk options

Maintainer options:

  1. Remove the leaked browser detail (recommended)
    Make the mapped microphone failure a public recovery error without a DOMException cause and require the browser alert to equal the localized guidance.
Copy recommended automerge instruction
@clawsweeper automerge

Special instructions:
Remove the DOMException cause from the mapped public microphone error and make the blocked-microphone E2E assert exact alert text while preserving AbortError and selected-device behavior.

Technical review

Best possible solution:

Throw a public mapped microphone error without the DOMException cause, preserve AbortError and selected-device behavior, and assert the exact Chat alert text in the browser E2E.

Do we have a high-confidence way to reproduce the issue?

Yes: current main’s raw rethrow is source-proven, and the supplied real-browser before image shows that exact user-visible outcome; this review did not execute the flow locally.

Is this the best way to solve the issue?

No: mapping at the shared microphone owner is correct, but retaining the DOMException cause defeats the intended user-facing replacement text.

Full review comments:

  • [P2] Do not retain the browser error in the public alert — ui/src/pages/chat/realtime-talk-input.ts:242
    formatUiError appends Error.cause messages and codes, so this wrapper renders the localized guidance followed by the original browser text and 0 in Chat. The supplied after screenshot shows Permission denied | 0; throw the mapped public error without that cause and make the browser assertion exact.
    Confidence: 0.99

Overall correctness: patch is incorrect
Overall confidence: 0.99

AGENTS.md: found and applied where relevant.

Codex review notes: model internal, reasoning high; reviewed against be0bcb395d7a.

Labels

Label changes:

  • add P2: This is a bounded recovery-feedback defect in the web Chat voice-input flow.
  • add merge-risk: 🚨 other: The merged alert would retain browser-specific error text and code despite presenting localized recovery guidance.
  • add proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. This maintainer-authored UI PR includes inspected before-and-after browser screenshots, but contributor proof gating does not apply.
  • add rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • add status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-authored UI PR includes inspected before-and-after browser screenshots, but contributor proof gating does not apply.

Label justifications:

  • P2: This is a bounded recovery-feedback defect in the web Chat voice-input flow.
  • merge-risk: 🚨 other: The merged alert would retain browser-specific error text and code despite presenting localized recovery guidance.
  • rating: 🦐 gold shrimp: Overall readiness is 🦐 gold shrimp; proof is 🌊 off-meta tidepool and patch quality is 🦐 gold shrimp.
  • status: ⏳ waiting on author: ClawSweeper has contributor-facing work open and is waiting for author action. Not applicable: This maintainer-authored UI PR includes inspected before-and-after browser screenshots, but contributor proof gating does not apply.
  • proof: 📸 screenshot: Contributor real behavior proof includes screenshot evidence. This maintainer-authored UI PR includes inspected before-and-after browser screenshots, but contributor proof gating does not apply.

Evidence

Acceptance criteria:

  • [P1] node scripts/run-vitest.mjs ui/src/pages/chat/realtime-talk-input.test.ts.
  • [P1] node scripts/run-vitest.mjs ui/src/e2e/browser-talk-start-stop.e2e.test.ts -t "shows actionable guidance when Talk microphone permission is blocked".
  • [P1] node scripts/check-changed.mjs -- ui/src/pages/chat/realtime-talk-input.ts ui/src/pages/chat/realtime-talk-input.test.ts ui/src/e2e/browser-talk-start-stop.e2e.test.ts.

What I checked:

Likely related people:

  • Peter Steinberger: Introduced the Talk microphone-selection path and later repaired permission acquisition for device pickers. (role: feature owner; confidence: high; commits: 92cfceac0924, a575b85a9a22; files: ui/src/pages/chat/realtime-talk-input.ts)
  • Vincent Koc: Authored the retained cancellation and pending-media acquisition repairs that this mapping must preserve. (role: recent lifecycle contributor; confidence: medium; commits: 5394bb1069a7, e4f5a422108c; files: ui/src/pages/chat/realtime-talk-input.ts, ui/src/pages/chat/realtime-talk-webrtc.ts)
  • Vyctor H. Brzezowski: Most recently repaired microphone picker state using the same error-classification surface. (role: recent adjacent contributor; confidence: medium; commits: 3f4564f56fb7; files: ui/src/pages/chat/realtime-talk-input.ts, ui/src/pages/chat/components/chat-composer-controls.ts)

Rank-up moves

Optional improvements that raise the rating; they are not merge blockers.

  • Remove the causal DOMException from the mapped public error.
  • Change the blocked-microphone browser E2E to assert the exact alert text and rerun it.

Rating scale

Score Internal tier Crab rank Meaning
6/6 S 🦀 challenger crab Exceptional readiness
5/6 A 🦞 diamond lobster Very strong readiness
4/6 B 🐚 platinum hermit Good normal PR; ordinary maintainer review
3/6 C 🦐 gold shrimp Useful, but confidence is limited
2/6 D 🦪 silver shellfish Proof or implementation needs work
1/6 F 🧂 unranked krab Not merge-ready
N/A NA 🌊 off-meta tidepool Rating does not apply

Overall follows the weaker of proof and patch quality.
Shiny media proof means a screenshot, video, or linked artifact directly shows the changed behavior. Runtime, network, CSP, and security claims still need visible diagnostics.

Workflow

  • ClawSweeper keeps one durable marker-backed review comment per issue or PR.
  • Re-runs edit this comment so the latest verdict, findings, and automation markers stay together instead of adding duplicate bot comments.
  • A fresh review can be triggered by eligible @clawsweeper re-review comments, exact-item GitHub events, scheduled/background review runs, or manual workflow dispatch.
  • PR/issue authors and users with repository write access can comment @clawsweeper re-review or @clawsweeper re-run on an open PR or issue to request a fresh review only.
  • Maintainers can also comment @clawsweeper review to request a fresh review only.
  • Fresh-review commands do not start repair, autofix, rebase, CI repair, or automerge.
  • Maintainer-only repair and merge flows require explicit commands such as @clawsweeper autofix, @clawsweeper automerge, @clawsweeper fix ci, or @clawsweeper address review.
  • Maintainers can comment @clawsweeper explain to ask for more context, or @clawsweeper stop to stop active automation.

@steipete
steipete force-pushed the codex/autoqa-talk-mic branch from 07b219b to 0e2392b Compare August 21, 2026 23:34

Copy link
Copy Markdown
Contributor Author

Addressed every ClawSweeper finding and rank-up move on 0e2392b3db8:

  • Removed the causal DOMException from the mapped public microphone error. The inline lint disposition documents why the browser-controlled detail must not cross into Chat's cause-formatting path.
  • Tightened the source-Chromium regression to require the rendered Talk status text to equal the localized guidance exactly, rather than accepting a browser suffix.
  • Re-captured and inspected the 320×720 flow: the alert now contains only recovery guidance, the failed relay closes, and Start voice input recovers.

Final local proof: owner tests 23/23; full Talk source-Chromium E2E 10/10; changed-gate formatting, guards, i18n, core/UI typecheck passed; focused final lint passed with 0 warnings/errors; fresh structured autoreview is clean at 0.96 confidence. AbortError, selected-device OverconstrainedError, non-DOM failures, and success behavior remain unchanged.

@steipete
steipete force-pushed the codex/autoqa-talk-mic branch from 0e2392b to 9579123 Compare August 21, 2026 23:44

Copy link
Copy Markdown
Contributor Author

Land-ready on exact head 9579123765d011fd084fd20e9c63e7cf43900ad3.

All ClawSweeper findings and rank-up moves are addressed. The follow-up CI failure was diagnosed as the repository's no-new-production-suppression ratchet; the final owner now carries an explicit closed stream-or-sanitized-failure outcome, creates the public Error after the catch, and adds no suppression or baseline exception.

Verification:

Production +19/-9 (net +10); tests +47/-0. The production growth is the closed outcome needed to satisfy both the public-error boundary and no-new-suppression policy while preserving AbortError, selected-device OverconstrainedError, non-DOM failures, success, and cleanup.

@steipete
steipete merged commit b765944 into main Aug 21, 2026
146 checks passed
@steipete
steipete deleted the codex/autoqa-talk-mic branch August 21, 2026 23:52

Copy link
Copy Markdown
Contributor Author

Merged via squash.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

app: web-ui App: web-ui maintainer Maintainer-authored PR merge-risk: 🚨 other 🚨 Merging this PR has meaningful risk outside the owned taxonomy. P2 Normal backlog priority with limited blast radius. proof: 📸 screenshot Contributor real behavior proof includes screenshot evidence. rating: 🦐 gold shrimp Decent PR readiness signal, but merge confidence is limited. size: S status: ⏳ waiting on author ClawSweeper has contributor-facing work open and is waiting for author action.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants