Repository navigation
feat(ui): click the desktop to take control - #123096
Conversation
View-only desktop connections now escalate to control by clicking anywhere on the desktop stage (transparent overlay button, keyboard accessible, same 'Take control' accessible name). The toolbar button is removed; the connecting status overlay becomes click-through so control can still be requested mid-connect.
|
🦞👀 Pull request received. I will update this pull request when review starts. |
|
Codex review: needs maintainer review before merge. Reviewed August 13, 2026, 5:20 AM ET / 09:20 UTC. ClawSweeper reviewWhat this changesMoves the Desktop panel’s existing view-only “Take control” action from the toolbar to an accessible button overlay covering the remote desktop stage. Merge readinessKeep open for maintainer review: current main still has the toolbar control, and this maintainer-owned PR changes the active desktop interaction. Real noVNC-surface proof is still needed before merge. Priority: P3 Review scores
Verification
How this fits togetherThe Control UI opens a remote desktop through the Gateway in view-only mode, then reconnects with input control for one operator. The panel translates that state into the remote-desktop surface, connection status, and control request. flowchart LR
A[Operator opens Desktop panel] --> B[View-only desktop connection]
B --> C[Desktop-stage control overlay]
C --> D[Gateway control request]
D --> E[Input-capable remote desktop]
E --> F[Single active controller]
Decision needed
Why: The available browser test and screenshots use a fake desktop client, while the actual production surface mounts noVNC into the element beneath the new overlay. Before merge
Agent review detailsSecurityNone. PR surfaceSource +13, Tests +17, Docs 0. Total +30 across 5 files. View PR surface stats
Review metrics
Merge-risk optionsMaintainer options:
Technical reviewBest possible solution: Keep the single stage-wide control action and attach redacted proof from a real Control UI connection showing a view-only desktop click requests control without blocking recovery or input. Do we have a high-confidence way to reproduce the issue? Not applicable: this PR changes an existing interaction rather than reporting a current-main defect; the supplied E2E exercises a mocked Gateway and fake desktop client. Is this the best way to solve the issue? Unclear: relocating the existing action is a coherent owner-boundary change, but it is only the best solution once a real noVNC-backed desktop confirms the overlay and input transition work together. AGENTS.md: found and applied where relevant. Codex review notes: model internal, reasoning high; reviewed against 5ed9bc2bd296. LabelsLabel changes:
Label justifications:
EvidenceWhat 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
|
In-page RFB 3.8 fake server (security None) lets the production DesktopClient drive the real noVNC client; the overlay click must hit-test above the mounted canvas and reconnect with control.
|
Both P1 items from the ClawSweeper review are addressed on the current head. Real noVNC-surface proof. Added noVNC DOM-layering contract. Inspected directly in Also fixed on this head: the |
|
Merged via squash.
|
* feat(ui): click the desktop to take control View-only desktop connections now escalate to control by clicking anywhere on the desktop stage (transparent overlay button, keyboard accessible, same 'Take control' accessible name). The toolbar button is removed; the connecting status overlay becomes click-through so control can still be requested mid-connect. * fix(ui): use cursor-action token for desktop take-control overlay * test(ui): prove take-control click above a real noVNC surface In-page RFB 3.8 fake server (security None) lets the production DesktopClient drive the real noVNC client; the overlay click must hit-test above the mounted canvas and reconnect with control. * fix(ui): narrow fake RFB socket payload to ArrayBuffer-backed bytes
What Problem This Solves
The Control UI Desktop panel connects view-only and requires a separate "Take control" toolbar button to get an input-capable connection. That is an extra, easy-to-miss step: the natural operator instinct is to click into the desktop and start driving.
Why This Change Was Made
Clicking the desktop stage is now the take-control affordance. While a connection is view-only, a transparent overlay button covers the stage — clicking anywhere on the desktop reconnects with
control: true. The overlay is a real<button>with the same "Take control" accessible name and a:focus-visibleoutline, so keyboard and assistive-tech access are preserved. Once controlling, the overlay is gone and input flows to the remote desktop as before. The toolbar button is deleted; the toolbar keeps app launchers and Disconnect.The connecting status overlay (
.desktop-connecting) becomespointer-events: noneso it cannot swallow clicks aimed at the desktop below — this preserves the pre-change ability to request control while a view-only connection is still connecting.The control-taken recovery path is unchanged: if another operator takes control, the panel downgrades to view-only and shows the notice; clicking the desktop deliberately retakes control.
User Impact
Operators take control of a cloud-worker/host/node desktop by clicking into it, instead of finding a toolbar button. One less concept in the toolbar; the view-only default and single-controller semantics are unchanged.
Evidence
node scripts/run-vitest.mjs run --config test/vitest/vitest.ui-e2e.config.ts --configLoader runner ui/src/e2e/desktop-panel.e2e.test.ts— 12/12 pass. The existing take-control e2e now exercises the overlay (same accessible name) plus a new assertion that the overlay spans the desktop stage.Production LOC delta: net ≈ +9 (overlay button replaces toolbar button; CSS for overlay + pointer-events line; docs updated). Tests +18.