From c5225039ab885b3ba397b4ea69e4dbe10f5633be Mon Sep 17 00:00:00 2001 From: Timothy Jaeryang Baek Date: Wed, 25 Feb 2026 17:23:22 -0600 Subject: [PATCH] refac --- src/lib/components/chat/ChatControls.svelte | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/src/lib/components/chat/ChatControls.svelte b/src/lib/components/chat/ChatControls.svelte index a8e1041818..410483dc2a 100644 --- a/src/lib/components/chat/ChatControls.svelte +++ b/src/lib/components/chat/ChatControls.svelte @@ -173,8 +173,6 @@ document.addEventListener('mousedown', onMouseDown); document.addEventListener('mouseup', onMouseUp); - // Delay enabling onCollapse so the Pane's initial collapsed state - // (defaultSize=0) doesn't reset showControls setTimeout(() => { paneReady = true; }, 0); // If controls were persisted as open, set the pane to the saved size @@ -202,7 +200,7 @@ if ($showCallOverlay) showCallOverlay.set(false); }; - $: if (!chatId) closeHandler(); + $: if (paneReady && !chatId) closeHandler(); // Helper: is a "special" full-screen panel active? $: specialPanel = $showCallOverlay || $showArtifacts || $showEmbeds;