VAPP-6: Remote desktop viewer (KVM tile stream to canvas) #33
Loading…
Reference in a new issue
No description provided.
Delete branch "feat/remote-desktop-viewer-vapp-6"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
What
Implements VAPP-6: a live remote-desktop (KVM) viewer reachable from the device detail page. Wires the previously inert "Remote desktop" header button and adds a Desktop tab alongside Terminal, both gated on the device being online.
How
The browser opens a
usage=2relay tunnel through the newopen_desktop_tunnelserver fn, connects DIRECTLY to vervain-server's relay (no hop through the apps server, per the parity-review decision), decodes the agent's JPEG tile stream onto a<canvas>via web-syscreateImageBitmap(pure Rust, no JS dependency), and feeds mouse / keyboard / wheel input back as the legacyagent-desktopbinary frames.Tunnel establishment is factored out of
open_terminal_tunnelinto a sharedopen_relay_tunnel(device_id, usage, label), so terminal (usage 1) and desktop (usage 2) share the relay-cookie minting, rendezvous id, and routing-ack error mapping.TerminalTunnelis reused as the connection-details payload for both.The wire protocol is implemented exactly from
vervain-agent::host::tunnel::run_desktop(VA-4): inboundcmd 7screen-size sizes the canvas,cmd 3tiles blit incrementally at their x/y (no full-frame clear),cmd 11displays ignored; outboundcmd 1key (Windows VK fromevent.keyCode),cmd 2mouse (move/click/scroll, coordinates scaled from canvas-local pixels to the remote screen),cmd 5quality (live slider),cmd 6refresh.Acceptance criteria
Checks
just checkequivalents all green in therust-builder-glibc:v1.0.1-rust1.94image:cargo fmt --check,cargo clippy --all-targets --features server -- -D warnings,cargo clippy --target wasm32-unknown-unknown -- -D warnings,cargo check --features server,cargo check --target wasm32-unknown-unknown, andcargo test --features server --bin vervain-app(15 passed).