Skip to content

feat: sidebar hover tooltips (v7.5.3) - #234

Merged
vakovalskii merged 1 commit into
mainfrom
feat/sidebar-tooltips
Jul 19, 2026
Merged

vakovalskii merged 1 commit into
mainfrom
feat/sidebar-tooltips

Conversation

@vakovalskii

Copy link
Copy Markdown
Owner

What

Every sidebar item now shows a concise "what it is & why" tooltip on hover — so it's obvious what each view and agent filter does without clicking around.

![behaviour](tooltip works: hover any nav item → themed tooltip appears to the right after ~350ms)

How

  • New NAV_HELP map + navHelpFor() in sidebar-config.js, keyed by data-key (fallback data-view). Kept there so it's unit-tested.
  • applyNavTooltips() in app.js wires each .sidebar-item: sets data-tooltip, an aria-label, and hover handlers.
  • Rendering: the sidebar has overflow-x: hidden, so a pure-CSS ::after tooltip would be clipped. Instead a single shared element is appended to <body> and positioned fixed on hover (same technique as the agent-picker popover), clamped to the viewport.
  • Themed via existing hex tokens (--bg-card, --border, --text-primary) → works in dark / light / monokai (avoids the --c-* rgb triplets that monokai lacks).
  • ~350ms show delay so it doesn't flicker while moving the mouse.

Accessibility

Tooltip text is also set as aria-label on each item.

Testing

  • node --test test/*.test.js → 158 pass, 2 skipped (win32), 0 fail (3 new tests: every KNOWN_ITEM_KEY + settings has help; navHelpFor safe against unknown/prototype keys).
  • Verified live in a browser (dark + light themes): tooltip shows on hover with correct text/position (left = item.right + 10, escaping the sidebar overflow), hides on mouseleave, aria-hidden toggles.

Version

Patch bump 7.5.2 → 7.5.3 + changelog entry.

🤖 Generated with Claude Code

Every sidebar item now shows a one-line "what it is & why" tooltip on
hover, keyed by data-key/data-view via a new NAV_HELP map in
sidebar-config.js.

The sidebar has overflow-x:hidden, so a pure-CSS ::after tooltip would
be clipped. Instead we render a single shared element appended to
<body> and position it fixed on hover (same approach as the agent-picker
popover), themed via existing hex tokens so it works in dark/light/
monokai. Tooltip text doubles as an aria-label for accessibility.

Added tests asserting every KNOWN_ITEM_KEY (+ settings) has NAV_HELP and
that navHelpFor is safe against unknown / prototype keys.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vakovalskii
vakovalskii merged commit 0de25b7 into main Jul 19, 2026
6 checks passed
@vakovalskii
vakovalskii deleted the feat/sidebar-tooltips branch July 19, 2026 07:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant