Repository navigation
feat(ui): listen to managed desktop audio in the panel - #157724
Conversation
|
🦞👀 Pull request received. I will update this pull request when review starts. ClawSweeper review completeClawSweeper finished reviewing this revision. The review result is being finalized. |
|
Codex review: blocked before merge. Reviewed September 25, 2026, 11:08 AM ET / 15:08 UTC (Revision 10). ClawSweeper reviewWhat this changesThe branch adds muted-by-default application audio playback, controls, failure guidance, and tests to the managed Linux desktop panel. Merge readiness⛔ Blocked before merge - 4 items remain Keep open. Current main does not provide panel audio playback, and the desktop authorization owner has not yet confirmed whether view-only screen access includes application audio. Priority: P2 Review scores
Verification
How this fits togetherThe Gateway authenticates a desktop screen observation and supplies an optional audio stream. The Control UI panel opens that stream and plays its samples through the browser after the viewer clicks Unmute. flowchart LR
A[Managed Linux desktop] --> B[Gateway screen observation]
B --> C[Audio grant]
C --> D[Panel Unmute control]
D --> E[Audio stream and playback]
E --> F[Browser speakers]
Decision needed
Why: The code binds audio to screen authority, but whether read-only observation includes sound is a permission policy choice. Before merge
Findings
Agent review detailsSecurityNeeds attention: The implementation uses current screen authority, but view-only access to application sound needs an explicit policy decision. PR surfaceSource +531, Tests +644, Docs +38. Total +1213 across 11 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 Gateway as the live audio-grant owner, require an explicit listening click, stop playback on authority loss, and document the approved view-only entitlement. Do we have a high-confidence way to reproduce the issue? Not applicable: this adds a capability; current main's panel has no application-audio playback path. Is this the best way to solve the issue? Unclear until the view-only entitlement is approved. The implementation otherwise uses the existing Gateway observation and panel lifecycle rather than adding another authorization owner. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 53a0b854769d. LabelsLabel changes: No label changes. Label justifications:
EvidenceSecurity concerns:
What I checked:
Likely related people:
Rank-up movesOptional improvements that raise the rating; they are not merge blockers.
Rating scale
Overall follows the weaker of proof and patch quality. Workflow
HistoryReview history (9 earlier review cycles; latest 8 shown)
|
d0a1653 to
29eeb3b
Compare
8ca8449 to
fe6655b
Compare
29eeb3b to
ac26db6
Compare
fe6655b to
575e036
Compare
|
The viewer now explains managed audio setup failures while leaving the screen connected. These are production-panel UI captures through a deterministic mock RPC/desktop-client fixture, not a native/full-Gateway playback claim. The same images were reproduced byte-for-byte after the lifecycle cleanup. Before After |
575e036 to
965812c
Compare
ac26db6 to
35524b4
Compare
965812c to
dc300c0
Compare
35524b4 to
aee06c3
Compare
dc300c0 to
f305c08
Compare
aee06c3 to
d0d8020
Compare
f305c08 to
de3c4eb
Compare
d0d8020 to
44684d6
Compare
de3c4eb to
62b4fd5
Compare
Co-authored-by: vincentkoc <[email protected]>
Co-authored-by: vincentkoc <[email protected]>
44684d6 to
f94a19a
Compare
62b4fd5 to
9d536e6
Compare
|
Merged via squash.
|
* commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (194 commits) feat(ui): listen to managed desktop audio in the panel (#157724) fix(ci): resume partially published preparation receipts (#158174) feat(release): one approval per release via an attested parent approval receipt (#157911) feat(desktop): advertise current managed desktop audio (#157723) fix(ui): retain delayed progress scroll gestures (#158153) refactor(ui): share sidebar mutation error feedback (#158173) test: await database verifier process lifecycle events (#158171) perf(update): avoid repeated retained-copy parent creation feat(desktop): bind audio streaming to screen authorization (#157722) refactor(gateway): split companion prompts and metadata fixtures (#158050) feat(desktop): isolate managed Linux application audio (#157720) fix(test): prepare catalog fixture modules before startup (#158157) fix: keep model pickers usable during provider sign-in (#158132) refactor(test): remove unused prompt scenario metadata (#158151) fix(ci): unblock Control UI targeted Crabbox gates (#158149) refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020) fix: bound stalled browser stream startup (#156323) fix(onnx): prevent worker fixture hangs after release (#158146) fix(models): preserve scoped provider discovery outcomes (#158139) fix(agents): report offline trash failures after agent delete (#158052) ...
* commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (175 commits) feat(ui): listen to managed desktop audio in the panel (#157724) fix(ci): resume partially published preparation receipts (#158174) feat(release): one approval per release via an attested parent approval receipt (#157911) feat(desktop): advertise current managed desktop audio (#157723) fix(ui): retain delayed progress scroll gestures (#158153) refactor(ui): share sidebar mutation error feedback (#158173) test: await database verifier process lifecycle events (#158171) perf(update): avoid repeated retained-copy parent creation feat(desktop): bind audio streaming to screen authorization (#157722) refactor(gateway): split companion prompts and metadata fixtures (#158050) feat(desktop): isolate managed Linux application audio (#157720) fix(test): prepare catalog fixture modules before startup (#158157) fix: keep model pickers usable during provider sign-in (#158132) refactor(test): remove unused prompt scenario metadata (#158151) fix(ci): unblock Control UI targeted Crabbox gates (#158149) refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020) fix: bound stalled browser stream startup (#156323) fix(onnx): prevent worker fixture hangs after release (#158146) fix(models): preserve scoped provider discovery outcomes (#158139) fix(agents): report offline trash failures after agent delete (#158052) ...
* fix(qa-lab): retain tab focus and scroll during polling * chore(qa-lab): merge main for tab navigation validation * fix(qa-lab): keep focused tabs visible after layout changes * fix(qa-lab): reconcile navigation retention with current app * chore: refresh main for QA Lab navigation validation * commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (194 commits) feat(ui): listen to managed desktop audio in the panel (#157724) fix(ci): resume partially published preparation receipts (#158174) feat(release): one approval per release via an attested parent approval receipt (#157911) feat(desktop): advertise current managed desktop audio (#157723) fix(ui): retain delayed progress scroll gestures (#158153) refactor(ui): share sidebar mutation error feedback (#158173) test: await database verifier process lifecycle events (#158171) perf(update): avoid repeated retained-copy parent creation feat(desktop): bind audio streaming to screen authorization (#157722) refactor(gateway): split companion prompts and metadata fixtures (#158050) feat(desktop): isolate managed Linux application audio (#157720) fix(test): prepare catalog fixture modules before startup (#158157) fix: keep model pickers usable during provider sign-in (#158132) refactor(test): remove unused prompt scenario metadata (#158151) fix(ci): unblock Control UI targeted Crabbox gates (#158149) refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020) fix: bound stalled browser stream startup (#156323) fix(onnx): prevent worker fixture hangs after release (#158146) fix(models): preserve scoped provider discovery outcomes (#158139) fix(agents): report offline trash failures after agent delete (#158052) ... Co-authored-by: Vincent Koc <[email protected]>
* feat(desktop): advertise current managed desktop audio Co-authored-by: vincentkoc <[email protected]> * feat(ui): listen to managed desktop audio in the panel Co-authored-by: vincentkoc <[email protected]> --------- Co-authored-by: vincentkoc <[email protected]>
) * fix(qa-lab): retain tab focus and scroll during polling * chore(qa-lab): merge main for tab navigation validation * fix(qa-lab): keep focused tabs visible after layout changes * fix(qa-lab): reconcile navigation retention with current app * chore: refresh main for QA Lab navigation validation * commit '0001f441f53712e44b2ca6edf2a6752b8abd6d1d': (194 commits) feat(ui): listen to managed desktop audio in the panel (openclaw#157724) fix(ci): resume partially published preparation receipts (openclaw#158174) feat(release): one approval per release via an attested parent approval receipt (openclaw#157911) feat(desktop): advertise current managed desktop audio (openclaw#157723) fix(ui): retain delayed progress scroll gestures (openclaw#158153) refactor(ui): share sidebar mutation error feedback (openclaw#158173) test: await database verifier process lifecycle events (openclaw#158171) perf(update): avoid repeated retained-copy parent creation feat(desktop): bind audio streaming to screen authorization (openclaw#157722) refactor(gateway): split companion prompts and metadata fixtures (openclaw#158050) feat(desktop): isolate managed Linux application audio (openclaw#157720) fix(test): prepare catalog fixture modules before startup (openclaw#158157) fix: keep model pickers usable during provider sign-in (openclaw#158132) refactor(test): remove unused prompt scenario metadata (openclaw#158151) fix(ci): unblock Control UI targeted Crabbox gates (openclaw#158149) refactor(agents): deslop subagents, sessions, worktrees, commands and auth (openclaw#158020) fix: bound stalled browser stream startup (openclaw#156323) fix(onnx): prevent worker fixture hangs after release (openclaw#158146) fix(models): preserve scoped provider discovery outcomes (openclaw#158139) fix(agents): report offline trash failures after agent delete (openclaw#158052) ... Co-authored-by: Vincent Koc <[email protected]>
* fix(ui): release failed avatar response bodies * test(ui): cover avatar response cancellation in Chromium * test(ui): assert retained image after avatar failure * test(ui): preserve window global type in avatar proof * test(ui): avoid shadowed avatar proof bindings * chore: refresh main for avatar lifecycle validation * commit '54b5f23b006ae917c8bb7903f5ee7dad6108ec25': (175 commits) feat(ui): listen to managed desktop audio in the panel (#157724) fix(ci): resume partially published preparation receipts (#158174) feat(release): one approval per release via an attested parent approval receipt (#157911) feat(desktop): advertise current managed desktop audio (#157723) fix(ui): retain delayed progress scroll gestures (#158153) refactor(ui): share sidebar mutation error feedback (#158173) test: await database verifier process lifecycle events (#158171) perf(update): avoid repeated retained-copy parent creation feat(desktop): bind audio streaming to screen authorization (#157722) refactor(gateway): split companion prompts and metadata fixtures (#158050) feat(desktop): isolate managed Linux application audio (#157720) fix(test): prepare catalog fixture modules before startup (#158157) fix: keep model pickers usable during provider sign-in (#158132) refactor(test): remove unused prompt scenario metadata (#158151) fix(ci): unblock Control UI targeted Crabbox gates (#158149) refactor(agents): deslop subagents, sessions, worktrees, commands and auth (#158020) fix: bound stalled browser stream startup (#156323) fix(onnx): prevent worker fixture hangs after release (#158146) fix(models): preserve scoped provider discovery outcomes (#158139) fix(agents): report offline trash failures after agent delete (#158052) ... * test(ui): wait for settled avatar fallback * test(ui): wait for control UI before avatar handoff * fix(ui): preserve avatar cleanup across retry lifecycle updates Integrate current main while preserving retry exhaustion, auth restoration, and deferred response cleanup. Keep the real-stream test on real timers and drain loader cleanup before restoring shared test state. * fix(ui): integrate avatar response cleanup with current main * test(ui): align avatar cleanup proof with current harness * test(ui): qualify avatar cleanup harness types and formatting Co-authored-by: Vincent Koc <[email protected]>
* fix(ui): release failed avatar response bodies * test(ui): cover avatar response cancellation in Chromium * test(ui): assert retained image after avatar failure * test(ui): preserve window global type in avatar proof * test(ui): avoid shadowed avatar proof bindings * chore: refresh main for avatar lifecycle validation * commit '0001f441f53712e44b2ca6edf2a6752b8abd6d1d': (175 commits) feat(ui): listen to managed desktop audio in the panel (openclaw#157724) fix(ci): resume partially published preparation receipts (openclaw#158174) feat(release): one approval per release via an attested parent approval receipt (openclaw#157911) feat(desktop): advertise current managed desktop audio (openclaw#157723) fix(ui): retain delayed progress scroll gestures (openclaw#158153) refactor(ui): share sidebar mutation error feedback (openclaw#158173) test: await database verifier process lifecycle events (openclaw#158171) perf(update): avoid repeated retained-copy parent creation feat(desktop): bind audio streaming to screen authorization (openclaw#157722) refactor(gateway): split companion prompts and metadata fixtures (openclaw#158050) feat(desktop): isolate managed Linux application audio (openclaw#157720) fix(test): prepare catalog fixture modules before startup (openclaw#158157) fix: keep model pickers usable during provider sign-in (openclaw#158132) refactor(test): remove unused prompt scenario metadata (openclaw#158151) fix(ci): unblock Control UI targeted Crabbox gates (openclaw#158149) refactor(agents): deslop subagents, sessions, worktrees, commands and auth (openclaw#158020) fix: bound stalled browser stream startup (openclaw#156323) fix(onnx): prevent worker fixture hangs after release (openclaw#158146) fix(models): preserve scoped provider discovery outcomes (openclaw#158139) fix(agents): report offline trash failures after agent delete (openclaw#158052) ... * test(ui): wait for settled avatar fallback * test(ui): wait for control UI before avatar handoff * fix(ui): preserve avatar cleanup across retry lifecycle updates Integrate current main while preserving retry exhaustion, auth restoration, and deferred response cleanup. Keep the real-stream test on real timers and drain loader cleanup before restoring shared test state. * fix(ui): integrate avatar response cleanup with current main * test(ui): align avatar cleanup proof with current harness * test(ui): qualify avatar cleanup harness types and formatting Co-authored-by: Vincent Koc <[email protected]>


Related: #157667
Desktop audio stack 5/7. Depends on #157723. Review against the immediate base branch; do not land out of order.
What Problem This Solves
Operators cannot hear remote application sound from the desktop panel.
User Impact
Adds explicit Unmute/Mute to the embedded/docked desktop panel. Starts muted, stops on hide/disconnect/replacement, and shows unavailable or actionable failure states. No microphone forwarding.
Why This Change Was Made
Wire the bounded PCM player and ordered audio connection owner into the real panel lifecycle. Keep user activation, start acknowledgments, stale frames, late resumes and retained-screen recovery under one playback owner. Standalone document controls are deliberately added in the final layer.
Evidence
Final recovery boundary repair: optional audio has its own three-retries/five-minutes budget. Exhaustion or unrecoverable audio disables capture with guidance while healthy desktop processes, applications and leases stay alive; actual desktop failures retain their independent budget. Cached observations during incomplete generation startup reject with retry guidance before minting grants. Final proof: 91 tests, core/Gateway test types, lint/format and fresh P0–P2 review passed. Four real owned-daemon SIGKILLs preserved all original desktop/application PIDs and lease; first recovery restored 440.413Hz PCM in 291ms. Three regressions fail on the prior producer.
Landing correction: the two intermediate-head test-support imports are now combined in this PR, not deferred to the following extraction. Exact layer-5 lint passed with zero errors and all 26 audio/panel tests passed. Playback behavior is unchanged.
Final local validation
Final architecture correction: the unchanged audio-state type now lives with its rendering contract, removing the type-only back-edge. Canonical architecture proof passed all eight subchecks in 304.429 s (runtime cycles 0, Madge cycles 0), UI types in 61.487 s, two-file type-aware lint with zero errors, and 32/32 focused UI tests. Current-head hosted CI remains separate and is running.
Final frozen-source proof: 82 backend/protocol tests + 127 UI tests passed; all 30 topic TypeScript files have zero lint errors/warnings. Core/UI and relevant test type graphs, formatter and scoped P0–P2 autoreview passed. Canonical generation, keyless i18n and docs proof passed in the preceding repair run.
The final changes carry live viewer authority into native recorder admission and startup settlement, preserve inherited application routing when private setup fails, expose only a sanitized setup code, and clean up socket/PCM listeners through their existing owners. The same seven PR boundaries are retained; final assembled tree hashes match the tested source. Historical per-layer/build/native results below are not claims of current-head hosted CI. Hosted CI has resumed; current-head check results and review remain separate gates.
node scripts/run-vitest.mjs ui/src/components/desktop/desktop-audio.test.ts ui/src/components/desktop/desktop-panel-audio.test.ts --maxWorkers=1Additional setup-failure before/after UI proof. The viewer now gives operator setup/restart guidance without exposing native stderr or host paths.
Panel visual proof
Same remote Linux application, viewport and theme. Before uses exact base UI source bytes; After uses the production candidate panel through the isolated demo adapter.
Before
After
Receiver-side audio sample below uses a static viewer frame with the actual captured audio, not a continuous A/V recording.
received-audio-static-frame.mp4
The assembled candidate passed the packaged build and an isolated token-authenticated Gateway smoke test: readiness HTTP 200; ticketless desktop/audio upgrades HTTP 401; clean shutdown. Native playback proof uses actual production capture/transport/panel through a minimal demo RPC adapter—not an authorized end-to-end playback test through the built Gateway.
Scope: managed Linux Gateway desktops only; no cloud-worker, paired-node, external VNC, macOS or Windows capture. Uncompressed stereo costs about 1.5 Mbit/s while listening; no A/V synchronization or microphone uplink. Actual Safari/iOS and tarball installation remain unverified. No deployment or merge is included.
Requested by @vincentkoc.
Work sessions