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(',')