Skip to content

armgit / alook

Public Imported from GitHub
0

Multi-Agent Collaboration for Team and Friends

fix: suppress sidebar hover popover during drag-and-drop (#145)

Generff943576e228
diff --git a/src/web/src/components/app-sidebar.tsx b/src/web/src/components/app-sidebar.tsx
index 8dd160c35..69f80daea 100644
--- a/src/web/src/components/app-sidebar.tsx
+++ b/src/web/src/components/app-sidebar.tsx
@@ -309,6 +309,7 @@ export function AppSidebar({ onNavigate }: { onNavigate?: () => void } = {}) {
onPin={() => handlePinWithFolderCleanup(agent.id)}
onUnpin={() => handleUnpinAgent(agent.id)}
extraContextMenuItems={extraContextMenuItems}
+ isDragActive={!!dragActiveId}
/>
</div>
);
diff --git a/src/web/src/components/sidebar/agent-sidebar-button.tsx b/src/web/src/components/sidebar/agent-sidebar-button.tsx
index f1d4d594c..f8cebd4e7 100644
--- a/src/web/src/components/sidebar/agent-sidebar-button.tsx
+++ b/src/web/src/components/sidebar/agent-sidebar-button.tsx
@@ -26,6 +26,7 @@ export function AgentSidebarButton({
onUnpin,
extraContextMenuItems,
hidePin,
+ isDragActive,
}: {
agent: Agent;
isActive: boolean;
@@ -37,6 +38,7 @@ export function AgentSidebarButton({
onUnpin: () => void;
extraContextMenuItems?: React.ReactNode;
hidePin?: boolean;
+ isDragActive?: boolean;
}) {
const [previewOpen, setPreviewOpen] = useState(false);
return (
@@ -49,8 +51,8 @@ export function AgentSidebarButton({
>
<ContextMenu>
<PopoverTrigger
- openOnHover
- delay={10}
+ openOnHover={!isDragActive}
+ delay={200}
render={
<ContextMenuTrigger
render={