From ce82be999eafb96aea982fa95080001e2dff5c53 Mon Sep 17 00:00:00 2001 From: spencrmartin Date: Wed, 12 Nov 2025 14:31:24 -0500 Subject: [PATCH] Add debugging logs to WebViewer component - Add console logs for component mounting/rendering - Add console logs for visibility changes - Add console logs for showing/hiding child windows - This will help debug why child windows disappear during message sending --- ui/desktop/src/components/WebViewer.tsx | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ui/desktop/src/components/WebViewer.tsx b/ui/desktop/src/components/WebViewer.tsx index 51fb9bfacc..275c19160c 100644 --- a/ui/desktop/src/components/WebViewer.tsx +++ b/ui/desktop/src/components/WebViewer.tsx @@ -88,6 +88,8 @@ export function WebViewer({ const containerRef = useRef(null); const updateBoundsTimeoutRef = useRef(null); + console.log(`[WebViewer-${childWindowId.current}] Component mounting/rendering`); + // WebViewer context for AI prompt injection const webViewerContext = useWebViewerContextOptional(); @@ -521,9 +523,12 @@ export function WebViewer({ useEffect(() => { if (!childWindowCreated) return; + console.log(`[WebViewer-${childWindowId.current}] Visibility changed to:`, isVisible); if (isVisible) { + console.log(`[WebViewer-${childWindowId.current}] Showing child window`); window.electron.showChildWebViewer(childWindowId.current); } else { + console.log(`[WebViewer-${childWindowId.current}] Hiding child window`); window.electron.hideChildWebViewer(childWindowId.current); } }, [isVisible, childWindowCreated]);