Skip to content

fix(desktop): show Gateway statusbar tooltip via composed trigger Slots - #55086

Merged
OutThisLife merged 1 commit into
mainfrom
fix/gateway-statusbar-tooltip
Jun 29, 2026
Merged

fix(desktop): show Gateway statusbar tooltip via composed trigger Slots#55086
OutThisLife merged 1 commit into
mainfrom
fix/gateway-statusbar-tooltip

Conversation

@OutThisLife

Copy link
Copy Markdown
Collaborator

Summary

  • The Gateway item is the only statusbar entry with variant === 'menu'. Since da73223 wrapped every render branch in Tip, the menu branch nested <DropdownMenu> (a Radix Root that renders no DOM node) inside Tip's <TooltipTrigger asChild>, so Radix had nothing to attach hover listeners to and the tooltip silently never showed.
  • Fixed by composing both trigger Slots directly onto a single <button> (TooltipTrigger asChild over DropdownMenuTrigger asChild) — the pattern already used in apps/desktop/src/app/chat/sidebar/profile-switcher.tsx — and skipping the tooltip wrapper entirely when an item has no title.
  • Supersedes fix(desktop): show tooltip on Gateway statusbar button #54859. That PR correctly diagnosed the bug but moved <Tip> inside <DropdownMenuTrigger asChild>; because Tip is a plain component (not Slot-forwarding), the trigger's injected ref/handlers would land on TooltipContent instead of the button, breaking the menu's open-on-click and popper anchoring. Original author credited via Co-authored-by.

Test plan

  • npx tsc --noEmit (apps/desktop) — clean
  • npx eslint src/app/shell/statusbar-controls.tsx — clean
  • prettier formatted
  • Manual: hover the Gateway statusbar button → styled dark tooltip appears; click → dropdown still opens and is anchored correctly

The Gateway item is the only statusbar entry with variant === 'menu'.
Since da73223 wrapped every render branch in `Tip`, the menu branch
nested `<DropdownMenu>` (a Radix Root that renders no DOM node) inside
`Tip`'s `<TooltipTrigger asChild>`. 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 <button>
(`TooltipTrigger asChild` over `DropdownMenuTrigger asChild`), the pattern
already used in profile-switcher.tsx, and skip the tooltip wrapper entirely
when the item has no title.

Supersedes #54859.

Co-authored-by: wnuuee1 <wnuuee1@users.noreply.github.com>
@OutThisLife
OutThisLife enabled auto-merge June 29, 2026 18:50
@OutThisLife
OutThisLife merged commit ccc92c5 into main Jun 29, 2026
20 checks passed
@OutThisLife
OutThisLife deleted the fix/gateway-statusbar-tooltip branch June 29, 2026 18:50
@alt-glitch alt-glitch added type/bug Something isn't working comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have labels Jun 29, 2026
waefrebeorn pushed a commit to waefrebeorn/slermes that referenced this pull request Jul 2, 2026
…tatusbar-tooltip

fix(desktop): show Gateway statusbar tooltip via composed trigger Slots
habarmc1223-sudo pushed a commit to habarmc1223-sudo/hermes-agent-fluxmem that referenced this pull request Jul 8, 2026
…tatusbar-tooltip

fix(desktop): show Gateway statusbar tooltip via composed trigger Slots
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…tatusbar-tooltip

fix(desktop): show Gateway statusbar tooltip via composed trigger Slots
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…tatusbar-tooltip

fix(desktop): show Gateway statusbar tooltip via composed trigger Slots
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…tatusbar-tooltip

fix(desktop): show Gateway statusbar tooltip via composed trigger Slots
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

comp/desktop Electron desktop app (apps/desktop/*) P3 Low — cosmetic, nice to have type/bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants