From 65da46dd2bb3b41aff063ddbca57dd7363479eb3 Mon Sep 17 00:00:00 2001 From: Thomas Petersen Date: Wed, 6 May 2026 15:38:51 -0400 Subject: [PATCH] Prevent profile popover from reopening on panel click Use the popover as a hover anchor so clicking an avatar opens the profile panel without toggling the hover card back open. Co-authored-by: Cursor --- desktop/src/features/profile/ui/UserProfilePopover.tsx | 6 +++--- desktop/tests/e2e/mentions.spec.ts | 6 ++++-- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/desktop/src/features/profile/ui/UserProfilePopover.tsx b/desktop/src/features/profile/ui/UserProfilePopover.tsx index 632d94fbcd..30bcf36723 100644 --- a/desktop/src/features/profile/ui/UserProfilePopover.tsx +++ b/desktop/src/features/profile/ui/UserProfilePopover.tsx @@ -13,7 +13,7 @@ import { rewriteRelayUrl } from "@/shared/lib/mediaUrl"; import { useAgentSession } from "@/shared/context/AgentSessionContext"; import { useProfilePanel } from "@/shared/context/ProfilePanelContext"; -import { Popover, PopoverContent, PopoverTrigger } from "@/shared/ui/popover"; +import { Popover, PopoverAnchor, PopoverContent } from "@/shared/ui/popover"; import { BotIdenticon } from "@/features/messages/ui/BotIdenticon"; type UserProfilePopoverProps = { @@ -135,7 +135,7 @@ export function UserProfilePopover({ return ( - + {/* biome-ignore lint/a11y/useSemanticElements: wrapper div for hover/click behavior */}
{children}
-
+