From da73223f4aba9beee9c020a5fee02f243414a3d7 Mon Sep 17 00:00:00 2001 From: David Metcalfe Date: Sun, 21 Jun 2026 10:27:16 -0700 Subject: [PATCH] fix(desktop): show statusbar item tooltips on hover MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Statusbar items declared a 'title' string (e.g. YOLO, gateway health, agents, cron, version, context usage) that was populated by use-statusbar-items.tsx but never forwarded to the rendered DOM in StatusbarControls — so every statusbar button/menu/text/link had no hover hint. Wrap the four render branches (menu trigger, text, link, action) in the existing 'Tip' component from components/ui/tooltip.tsx. Tip is self-contained (carries its own Provider), instant (delayDuration=0), themed (bg-foreground/text-background, auto-inverts per theme), and already in use elsewhere in the desktop shell. Renders the child untouched when label is falsy, so items without a title stay zero-cost. --- .../src/app/shell/statusbar-controls.tsx | 153 +++++++++--------- 1 file changed, 81 insertions(+), 72 deletions(-) diff --git a/apps/desktop/src/app/shell/statusbar-controls.tsx b/apps/desktop/src/app/shell/statusbar-controls.tsx index dc3a4d77382..20f2f52e514 100644 --- a/apps/desktop/src/app/shell/statusbar-controls.tsx +++ b/apps/desktop/src/app/shell/statusbar-controls.tsx @@ -2,6 +2,7 @@ import type { ComponentProps, ReactNode } from 'react' import { useNavigate } from 'react-router-dom' import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '@/components/ui/dropdown-menu' +import { Tip } from '@/components/ui/tooltip' import { cn } from '@/lib/utils' // Shared chrome styling for interactive statusbar items (button / link / menu @@ -97,93 +98,101 @@ function StatusbarItemView({ item, navigate }: { item: StatusbarItem; navigate: if (item.variant === 'menu' && (item.menuContent || (item.menuItems && item.menuItems.length > 0))) { return ( - - - - - - {item.menuContent - ? item.menuContent - : (item.menuItems ?? []) - .filter(menuItem => !menuItem.hidden) - .map(menuItem => ( - { - if (menuItem.to) { - navigate(menuItem.to) - } + + + + + + + {item.menuContent + ? 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} - - )} - - ))} - - + menuItem.onSelect?.() + }} + > + {menuItem.href ? ( + + {menuItem.icon} + {menuItem.label} + + ) : ( + <> + {menuItem.icon} + {menuItem.label} + + )} + + ))} + + + ) } if (item.variant === 'text' && !item.onSelect && !item.to && !item.href) { return ( -
- {content} -
+ +
+ {content} +
+
) } if (item.href || item.variant === 'link') { return ( - - {content} - + + + {content} + + ) } return ( - + item.onSelect?.({ shiftKey: event.shiftKey }) + }} + type="button" + > + {content} + + ) }