fix(apps): instrument desktop render path to localize blank-screen (VAPP-47) #58
Loading…
Reference in a new issue
No description provided.
Delete branch "fix/VAPP-47-desktop-render-diagnostics"
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
The Desktop tab renders nothing even though the WS inspector confirms JPEG tiles arriving (2053 messages / 1.43 MB). I verified the whole pipeline is correct on inspection: the agent (
run_desktop) emits cmd 7 (screen size) -> displays -> cmd 3 tiles; the relay forwards transparently andpump_socketeats only the first protocol-byte frame per side (so cmd 7 survives); tile X/Y are pixel coordinates; the browserprocess_frames/draw_tileparse, decode (createImageBitmap), and blit correctly, copying the JPEG (Uint8Array::from) so there is no wasm-memory aliasing.That leaves a runtime condition that was being silently swallowed: either a missing/garbled screen-size frame (canvas stays at the default 300x150, so tiles draw off-canvas and it looks blank), or a JPEG the browser's
createImageBitmaprejects.What this PR does
Surfaces those instead of hiding them (NEVER HIDE ERRORS, per VAPP-42):
process_frames: one-shot logs the first relay payload's length + leadingcmd/size; warns once on a malformed/truncated frame (relay/framing desync); logs when cmd 7 sizes the canvas (WxH); warns once if a tile arrives before any cmd 7.draw_tile: logs the first fewcreateImageBitmap/draw failures (bounded so it cannot flood at frame rate) instead of dropping them silently.Diagnostics only - no behavior change to a working stream. This is the localize-first step in VAPP-47; it does not yet fix the root cause (which the logs will pinpoint).
Next step (needs a redeploy + one test)
Open the Desktop tab with the browser console open and report which line fires:
screen size WxH; canvas sizedthen nothing visible -> decode/draw issue (look fortile ... failed).tile received before any screen-size (cmd 7) frame-> cmd 7 missing/misparsed.malformed frame at off=...-> relay/framing desync.tile JPEG decode (createImageBitmap rejected)-> the agent's JPEG is not browser-decodable.I'll land the targeted fix once we know which.
Part of VAPP-47. Relates to VAPP-42.
🤖 Generated with Claude Code