From 13e4edc1e2537d944d6f5669d668d18a7de140b1 Mon Sep 17 00:00:00 2001 From: Anso Date: Fri, 15 May 2026 09:00:56 -0400 Subject: [PATCH] fix(ui): close user dropdown after clicking menu actions (#1058) Clicking Settings, Billing, Documentation, Feedback, or Log Out now dismisses the popover, matching standard menu UX. The Appearance theme toggle stays open so users can preview themes without reopening the menu. --- .../src/components/UserProfileDropdown.tsx | 23 ++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/frontend/src/components/UserProfileDropdown.tsx b/frontend/src/components/UserProfileDropdown.tsx index 03a8c62e..c7203153 100644 --- a/frontend/src/components/UserProfileDropdown.tsx +++ b/frontend/src/components/UserProfileDropdown.tsx @@ -52,6 +52,19 @@ export function UserProfileDropdown({ theme, setTheme, onOpenSettings }: UserPro const { logout, user, isAdmin } = useAuth(); const { license } = useLicense(); const [billingLoading, setBillingLoading] = useState(false); + const [open, setOpen] = useState(false); + + const closeMenu = () => setOpen(false); + + const handleOpenSettings = () => { + closeMenu(); + onOpenSettings(); + }; + + const handleLogout = () => { + closeMenu(); + logout(); + }; const openBillingPortal = async () => { setBillingLoading(true); @@ -67,6 +80,7 @@ export function UserProfileDropdown({ theme, setTheme, onOpenSettings }: UserPro toast.error('Failed to open billing portal.'); } finally { setBillingLoading(false); + closeMenu(); } }; @@ -75,7 +89,7 @@ export function UserProfileDropdown({ theme, setTheme, onOpenSettings }: UserPro const roleLabel = user?.role; return ( - +