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 <noreply@anthropic.com>
This commit is contained in:
parent
1bf225ae27
commit
6ddd343234
@ -17,6 +17,7 @@ function createJsonWsTunnel(wsUrl: string, connectMsg: object) {
|
|||||||
let onDisconnected: ((reason: string) => void) | null = null
|
let onDisconnected: ((reason: string) => void) | null = null
|
||||||
let onGatewayError: ((message: string) => void) | null = null
|
let onGatewayError: ((message: string) => void) | null = null
|
||||||
|
|
||||||
|
let instructionCount = 0
|
||||||
function dispatchInstructions(raw: string) {
|
function dispatchInstructions(raw: string) {
|
||||||
if (!tunnel.oninstruction) return
|
if (!tunnel.oninstruction) return
|
||||||
let remaining = raw
|
let remaining = raw
|
||||||
@ -37,6 +38,14 @@ function createJsonWsTunnel(wsUrl: string, connectMsg: object) {
|
|||||||
pos = dotIdx + 1 + len + 1
|
pos = dotIdx + 1 + len + 1
|
||||||
}
|
}
|
||||||
if (parts.length > 0) {
|
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))
|
tunnel.oninstruction(parts[0], parts.slice(1))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -190,6 +199,12 @@ export function useRdp() {
|
|||||||
console.log(`[RDP] State: ${states[state] || state}`)
|
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
|
// Attach Guacamole display element to container
|
||||||
const displayEl = client.getDisplay().getElement()
|
const displayEl = client.getDisplay().getElement()
|
||||||
container.appendChild(displayEl)
|
container.appendChild(displayEl)
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user