From f9070c81f3b9be99efea80d019dd6b17e3eecd67 Mon Sep 17 00:00:00 2001 From: Vantz Stockwell Date: Sat, 14 Mar 2026 12:11:12 -0400 Subject: [PATCH] diag(rdp): expand instruction logging to find desktop frames Log first 50 instructions, then every 200th, plus any draw operation targeting layer 0 (main display). Need to determine if RDPGFX desktop frames are arriving or if only cursor operations are being received. Co-Authored-By: Claude Opus 4.6 --- frontend/composables/useRdp.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/frontend/composables/useRdp.ts b/frontend/composables/useRdp.ts index e9514fc..74d224f 100644 --- a/frontend/composables/useRdp.ts +++ b/frontend/composables/useRdp.ts @@ -39,8 +39,11 @@ function createJsonWsTunnel(wsUrl: string, connectMsg: object) { } if (parts.length > 0) { instructionCount++ - if (instructionCount <= 30) { - const opcode = parts[0] + const opcode = parts[0] + // Log first 50 instructions, then every 200th, plus any layer-0 draw ops + const isLayer0Draw = (opcode === 'img' || opcode === 'rect' || opcode === 'cfill' || opcode === 'copy' || opcode === 'transfer') + && parts[1] !== undefined && parseInt(parts[1]) === 0 + if (instructionCount <= 50 || instructionCount % 200 === 0 || isLayer0Draw) { const argSummary = opcode === 'blob' ? `[stream=${parts[1]}, ${(parts[2] || '').length} bytes]` : parts.slice(1).join(',')