From 6ddd343234328faee4924bfc940bf4760d84cd42 Mon Sep 17 00:00:00 2001 From: Vantz Stockwell Date: Sat, 14 Mar 2026 12:04:25 -0400 Subject: [PATCH] diag(rdp): add instruction + display dimension logging Temporary diagnostics to debug blank screen after successful RDP connection. Logs first 30 instruction opcodes and display dimensions on ready. Co-Authored-By: Claude Opus 4.6 --- frontend/composables/useRdp.ts | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/frontend/composables/useRdp.ts b/frontend/composables/useRdp.ts index e697656..e9514fc 100644 --- a/frontend/composables/useRdp.ts +++ b/frontend/composables/useRdp.ts @@ -17,6 +17,7 @@ function createJsonWsTunnel(wsUrl: string, connectMsg: object) { let onDisconnected: ((reason: string) => void) | null = null let onGatewayError: ((message: string) => void) | null = null + let instructionCount = 0 function dispatchInstructions(raw: string) { if (!tunnel.oninstruction) return let remaining = raw @@ -37,6 +38,14 @@ function createJsonWsTunnel(wsUrl: string, connectMsg: object) { pos = dotIdx + 1 + len + 1 } if (parts.length > 0) { + instructionCount++ + if (instructionCount <= 30) { + const opcode = parts[0] + const argSummary = opcode === 'blob' + ? `[stream=${parts[1]}, ${(parts[2] || '').length} bytes]` + : parts.slice(1).join(',') + console.log(`[RDP] Instruction #${instructionCount}: ${opcode}(${argSummary})`) + } tunnel.oninstruction(parts[0], parts.slice(1)) } } @@ -190,6 +199,12 @@ export function useRdp() { console.log(`[RDP] State: ${states[state] || state}`) } + // Log when display is ready + client.onready = () => { + const display = client.getDisplay() + console.log(`[RDP] Ready! Display: ${display.getWidth()}x${display.getHeight()}, element: ${displayEl.offsetWidth}x${displayEl.offsetHeight}, container: ${container.offsetWidth}x${container.offsetHeight}`) + } + // Attach Guacamole display element to container const displayEl = client.getDisplay().getElement() container.appendChild(displayEl)