From cda44e721bb2e9b4310a1780d11c8a83fbcc332a Mon Sep 17 00:00:00 2001 From: Matt Ciaccio Date: Tue, 28 Apr 2026 05:08:01 +0200 Subject: [PATCH] fix(layout): hoist TooltipProvider to wrap full sidebar tree MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The collapsed-state user-footer renders a Tooltip that was outside the TooltipProvider — the provider only wrapped the nav. Once the sidebar toggled to collapsed, the footer Tooltip threw "Tooltip must be used within TooltipProvider", surfacing as console errors in exhaustive click-through tests. Move TooltipProvider up one level so every Tooltip in the sidebar tree (nav items + user footer) is covered. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/layout/sidebar.tsx | 102 +++++++++++++++--------------- 1 file changed, 51 insertions(+), 51 deletions(-) diff --git a/src/components/layout/sidebar.tsx b/src/components/layout/sidebar.tsx index 15ffec6..cd08190 100644 --- a/src/components/layout/sidebar.tsx +++ b/src/components/layout/sidebar.tsx @@ -199,28 +199,28 @@ function SidebarContent({ } return ( -
- {/* Logo area */} -
-
- PN -
- {!collapsed && ( -
-

Port Nimara

-

Marina CRM

+ +
+ {/* Logo area */} +
+
+ PN
- )} -
+ {!collapsed && ( +
+

Port Nimara

+

Marina CRM

+
+ )} +
- {/* Nav */} - - + {/* Nav */} + - - + - {/* User footer */} -
- {collapsed ? ( - - - + {/* User footer */} +
+ {collapsed ? ( + + + + + + U + + + + User Profile + + ) : ( +
+ - U + {(user?.name ?? 'U').slice(0, 1).toUpperCase()} - - User Profile - - ) : ( -
- - - - {(user?.name ?? 'U').slice(0, 1).toUpperCase()} - - -
-

{user?.name ?? 'User'}

- - {portRoles[0]?.role?.name ?? 'Staff'} - +
+

{user?.name ?? 'User'}

+ + {portRoles[0]?.role?.name ?? 'Staff'} + +
-
- )} + )} +
-
+
); }