fix(agent): stop silent black X11 capture fallback on Wayland (VA-80) #84
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/VA-80-wayland-capture"
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
VA-80 root cause: on a Wayland session the agent's capture paths tried the Wayland backend and, on
NotAvailable, silently fell back to X11 root capture. Under XWayland the X11 root has no composited content, so it returns all-black frames - the remote desktop rendered solid black with no error (the browser was correctly decoding/blitting black tiles, confirmed via a canvas pixel probe).This PR (capture-behaviour half of VA-80)
Refuse the X11 fallback on a Wayland session and surface the real reason instead, via a shared
wayland::unavailable_no_x11_fallbackhelper, at all three sites:stream::capture_raw_frame,capture::capture_primary,capture::capture_display. The error names the fix (build with thewayland-portalfeature + grant the screencast portal). X11 sessions are unaffected (the fallback only applied underis_wayland_session()).Turns the silent black screen into a clear, actionable error (NEVER HIDE ERRORS).
Held for a decision (not in this PR)
Enabling the
wayland-portalcapture path in the released build is the half that actually makes Wayland capture work. It is held because it makes the universal agent binary hard-linklibpipewire-0.3(thepipewirecrate is a -sys binding; the release Dockerfile exports a scratch image with only the binary, which then needslibpipewire-0.3.so.0+libspa-0.2at runtime). That would break the agent on headless hosts lacking PipeWire (the binary won't exec), even for terminal/files/MCP. The build approach is a deployment decision tracked on VA-80.Testing
just pre-commitgreen (Docker; default build without the feature, which is the config these call sites must compile under).Part of VA-80.
🤖 Generated with Claude Code