debug: add visible SFTP diagnostic banner + WS error/close handlers

This commit is contained in:
Vantz Stockwell 2026-03-14 03:02:49 -04:00
parent f124d4b7d2
commit fd9e30b3bf
2 changed files with 12 additions and 0 deletions

View File

@ -103,6 +103,10 @@ const breadcrumbs = computed(() => {
<template>
<div class="flex h-full" :style="{ width: width + 'px' }">
<div class="flex flex-col h-full bg-gray-900 border-r border-gray-800 overflow-hidden flex-1">
<!-- Debug banner remove once SFTP is working -->
<div class="px-2 py-1 bg-yellow-900/50 text-yellow-300 text-xs border-b border-yellow-800">
SFTP: {{ entries.length }} entries | path: {{ currentPath }} | sid: {{ sessionId?.substring(0, 8) }}
</div>
<!-- Toolbar -->
<div class="px-2 py-1.5 border-b border-gray-800 shrink-0">
<!-- Breadcrumbs -->

View File

@ -59,6 +59,14 @@ export function useSftp(sessionId: Ref<string | null>) {
}
}
ws.onerror = (event) => {
console.error('[SFTP] WS error event:', event)
}
ws.onclose = (event) => {
console.log('[SFTP] WS closed, code:', event.code, 'reason:', event.reason, 'wasClean:', event.wasClean)
}
return ws
}