From 7a6b3cb923f1fa99260b909e3729c35e6ffee323 Mon Sep 17 00:00:00 2001 From: Brooklyn Nicholson Date: Mon, 29 Jun 2026 13:44:32 -0500 Subject: [PATCH] fix(desktop): show Gateway statusbar tooltip via composed trigger Slots The Gateway item is the only statusbar entry with variant === 'menu'. Since da73223f4 wrapped every render branch in `Tip`, the menu branch nested `` (a Radix Root that renders no DOM node) inside `Tip`'s ``. With no element to attach to, Radix could never wire hover listeners, so the tooltip silently never showed. `Tip` also can't be moved inside `DropdownMenuTrigger asChild` (the shape proposed in #54859): it's a plain component, not a Slot-forwarding one, so the trigger's injected ref/handlers would land on `TooltipContent` instead of the button and break the menu's click + popper anchoring. Fix by composing both trigger Slots directly onto a single - - - {item.menuContent - ? typeof item.menuContent === 'function' - ? item.menuContent(() => setMenuOpen(false)) - : item.menuContent - : (item.menuItems ?? []) - .filter(menuItem => !menuItem.hidden) - .map(menuItem => ( - { - if (menuItem.to) { - navigate(menuItem.to) - } + // The `Tip` helper can't wrap a menu: its TooltipTrigger needs a DOM child, + // but DropdownMenu's Root renders no element, so the hover listeners never + // land on the button and the tooltip silently never shows. Compose the two + // trigger Slots directly onto the same + + ) - menuItem.onSelect?.() - }} - > - {menuItem.href ? ( - - {menuItem.icon} - {menuItem.label} - - ) : ( - <> - {menuItem.icon} - {menuItem.label} - - )} - - ))} - - - + return ( + + {item.title ? ( + + + {trigger} + {item.title} + + + ) : ( + trigger + )} + + {item.menuContent + ? typeof item.menuContent === 'function' + ? item.menuContent(() => setMenuOpen(false)) + : item.menuContent + : (item.menuItems ?? []) + .filter(menuItem => !menuItem.hidden) + .map(menuItem => ( + { + if (menuItem.to) { + navigate(menuItem.to) + } + + menuItem.onSelect?.() + }} + > + {menuItem.href ? ( + + {menuItem.icon} + {menuItem.label} + + ) : ( + <> + {menuItem.icon} + {menuItem.label} + + )} + + ))} + + ) }