Skip to content

fix(desktop): stop empty mispositioned tooltip on terminal rail hover - #63029

Merged
OutThisLife merged 1 commit into
mainfrom
bb/salvage-62022-tooltip
Jul 12, 2026
Merged

OutThisLife merged 1 commit into
mainfrom
bb/salvage-62022-tooltip

Conversation

@OutThisLife

Copy link
Copy Markdown

Summary

Hovering a terminal rail tab or the "+" button showed an empty black rectangle parked in the panel corner instead of a labeled tooltip by the cursor (#62022).

Root cause: TooltipContent wraps its label in an inline box-decoration-clone span so the chip hugs each wrapped line. A block-level label child (flex / flex-col) collapses that inline wrapper's intrinsic geometry, so Radix measures a zero-size chip and positions an empty rectangle at the origin. The terminal rail's text + hotkey labels and the preview row's two-line label both passed block children.

Fix (both layers):

  • Harden the shared wrapper with [&>*]:!inline-flex so any call site's direct child renders inline-flex — defends every current and future Tip usage.
  • Add a reusable TipHintLabel (text + optional hint) and use it in the rail, replacing the bespoke flex span.
  • Keep the preview row's label explicitly inline-flex (intent at the call site, not just the global guard).

Salvages #62139 (shared-component hardening + TipHintLabel, by @alelpoan) and #62073 (inline-flex call-site fixes + rail/preview coverage, by @zapabob) into one — the shared guard fixes the whole bug class, the call-site changes keep intent explicit, and the tests from both are consolidated.

Fixes #62022

Test plan

  • npx vitest run --environment jsdom on tooltip.test.tsx, rail.test.tsx, preview-row.test.tsx (6 passed)
  • npm run typecheck (app + electron tsconfigs)
  • eslint on all changed files (0 errors)
  • Manual: hover terminal tabs / "+" and a preview status row → labeled tooltip appears next to the trigger, no corner rectangle

A block-level label child (e.g. `flex`) collapses TooltipContent's inline
`box-decoration-clone` wrapper, so Radix measures a zero-size chip and parks
an empty black rectangle in the panel corner instead of by the trigger
(#62022). The terminal rail's hotkey labels and the preview row's two-line
label both hit this.

Harden the shared wrapper (`[&>*]:!inline-flex`) so any call site's direct
child renders inline-flex, add a reusable `TipHintLabel` for the common
text+hotkey label, and keep the preview row's label explicitly inline-flex.

Salvages #62139 (shared-component hardening + TipHintLabel) and #62073
(inline-flex call-site fixes + rail/preview coverage).

Co-authored-by: alelpoan <alelpoan@proton.me>
Co-authored-by: zapabob <1920071390@campus.ouj.ac.jp>
@alt-glitch alt-glitch added type/bug Something isn't working P3 Low — cosmetic, nice to have comp/desktop Electron desktop app (apps/desktop/*) labels Jul 12, 2026
@OutThisLife
OutThisLife merged commit 2043436 into main Jul 12, 2026
20 checks passed
@OutThisLife
OutThisLife deleted the bb/salvage-62022-tooltip branch July 12, 2026 06:59
santhreal pushed a commit to santhreal/hermes-agent that referenced this pull request Jul 13, 2026
…022-tooltip

fix(desktop): stop empty mispositioned tooltip on terminal rail hover
shelizi pushed a commit to shelizi/hermes-agent that referenced this pull request Jul 14, 2026
…022-tooltip

fix(desktop): stop empty mispositioned tooltip on terminal rail hover
Gravezzz pushed a commit to Gravezzz/hermes-agent that referenced this pull request Jul 21, 2026
…022-tooltip

fix(desktop): stop empty mispositioned tooltip on terminal rail hover
leewenjie pushed a commit to leewenjie/hermes-agent that referenced this pull request Aug 7, 2026
…022-tooltip

fix(desktop): stop empty mispositioned tooltip on terminal rail hover
randlee pushed a commit to randlee/hermes-agent that referenced this pull request Aug 11, 2026
…022-tooltip

fix(desktop): stop empty mispositioned tooltip on terminal rail hover
melon-xf added a commit to melon-xf/hermes-agent that referenced this pull request Sep 3, 2026
…022-tooltip

fix(desktop): stop empty mispositioned tooltip on terminal rail hover
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.

[Bug]: Tooltip renders as empty black rectangle in wrong position when hovering terminal rail tabs

2 participants