From 65209b0235569985e42bc682735669f78ae844c8 Mon Sep 17 00:00:00 2001 From: G30 <50341825+silentoplayz@users.noreply.github.com> Date: Sun, 26 Jul 2026 17:26:49 -0400 Subject: [PATCH] fix: enforce a single open chat hover preview across sidebar chat items (#27549) --- .../components/layout/Sidebar/ChatItem.svelte | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/src/lib/components/layout/Sidebar/ChatItem.svelte b/src/lib/components/layout/Sidebar/ChatItem.svelte index 65569af1c6..d640e0efd3 100644 --- a/src/lib/components/layout/Sidebar/ChatItem.svelte +++ b/src/lib/components/layout/Sidebar/ChatItem.svelte @@ -3,6 +3,15 @@ const invisibleDragImage = new Image(); invisibleDragImage.src = 'data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAAEAAAABCAQAAAC1HAwCAAAAC0lEQVR42mNkYAAAAAYAAjCB0C8AAAAASUVORK5CYII='; + + /** + * At most one chat hover preview may be open across all ChatItem instances. + * bits-ui's safe-polygon close only re-evaluates on pointermove, so a + * preview can be left open when the pointer stops on a neighboring row + * while still inside the previous row's grace area; opening a preview + * therefore force-closes whichever one is still up. + */ + let closeActiveHoverPreview: (() => void) | null = null;