From dd25a8d54e9fdc43188d55e7f55aa6a39f8f9dac Mon Sep 17 00:00:00 2001 From: Dylan Martin Date: Wed, 29 Jul 2026 12:50:27 -0700 Subject: [PATCH] fix(spaces): hold sidebar peek open while space Filter menu is open The space sidebar's "Recent" Filter dropdown didn't hold the sidebar's hover-peek open while it was open, unlike every other sidebar-spawned menu (TasksHeader, ProjectSwitcher) which do via useHoldSidebarPeek(). When the sidebar is only hover-peeked (not pinned), moving the pointer toward the opened Filter menu let the panel collapse and stranded the dropdown's portal anchor, so filter conditions couldn't be picked. Wire the same peek-hold as the other menus. Generated-By: PostHog Code Task-Id: e2e30680-93e8-4ff2-8747-9f6a3bed2b68 --- .../ui/src/features/canvas/components/ChannelSidebar.tsx | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/packages/ui/src/features/canvas/components/ChannelSidebar.tsx b/packages/ui/src/features/canvas/components/ChannelSidebar.tsx index c069e1ac7d..2026d422ea 100644 --- a/packages/ui/src/features/canvas/components/ChannelSidebar.tsx +++ b/packages/ui/src/features/canvas/components/ChannelSidebar.tsx @@ -39,6 +39,7 @@ import { useChannelItems } from "@posthog/ui/features/canvas/hooks/useChannelIte import { useCommandCenterStore } from "@posthog/ui/features/command-center/commandCenterStore"; import { useFeatureFlag } from "@posthog/ui/features/feature-flags/useFeatureFlag"; import { SidebarItem } from "@posthog/ui/features/sidebar/components/SidebarItem"; +import { useHoldSidebarPeek } from "@posthog/ui/features/sidebar/useHoldSidebarPeek"; import { useTaskContextMenu } from "@posthog/ui/features/tasks/useTaskContextMenu"; import { useRenameTask } from "@posthog/ui/features/tasks/useTaskMutations"; import { useTasks } from "@posthog/ui/features/tasks/useTasks"; @@ -84,6 +85,10 @@ function RecentSectionHeader({ onStatusChange: (value: TaskRunStatus | null) => void; filtersActive: boolean; }) { + // Hold the sidebar's hover-peek open while the Filter menu is open, so a + // pointer moving toward the menu can't collapse the peeked panel and strand + // the dropdown's portal anchor (matches TasksHeader/ProjectSwitcher). + const handleFilterOpenChange = useHoldSidebarPeek(); return ( <>
@@ -99,7 +104,7 @@ function RecentSectionHeader({ > - +