mirror of
https://github.com/block/goose.git
synced 2026-07-17 12:56:20 +02:00
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
This commit is contained in:
@@ -88,6 +88,8 @@ export function WebViewer({
|
||||
const containerRef = useRef<HTMLDivElement>(null);
|
||||
const updateBoundsTimeoutRef = useRef<NodeJS.Timeout | null>(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]);
|
||||
|
||||
Reference in New Issue
Block a user