Skip to content

feat(sidebar): show full label in tooltip when truncated#1783

Draft
posthog[bot] wants to merge 1 commit intomainfrom
posthog-code/sidebar-label-tooltip
Draft

feat(sidebar): show full label in tooltip when truncated#1783
posthog[bot] wants to merge 1 commit intomainfrom
posthog-code/sidebar-label-tooltip

Conversation

@posthog
Copy link
Copy Markdown
Contributor

@posthog posthog Bot commented Apr 21, 2026

Summary

When a Task name (or any other sidebar item label) is long enough to be truncated with an ellipsis in the left sidebar, hovering the label now reveals the full name in a tooltip. The tooltip only appears when the label is actually overflowing — it stays out of the way when the full name is already visible.

The implementation lives in apps/code/src/renderer/features/sidebar/components/SidebarItem.tsx and follows the existing pattern used in Combobox.tsx (compare scrollWidth vs clientWidth on mouseenter, drive a controlled Radix Tooltip).

Because all sidebar items pass through SidebarItem, this also benefits long skill names, command center entries, etc.

Test plan

  • In the left sidebar, create or open a task with a very long name and confirm the full name appears in a tooltip on hover.
  • Confirm that short (non-truncated) task names do not trigger a tooltip.
  • Resize the sidebar narrower/wider and confirm the tooltip behavior tracks truncation state.
  • Confirm clicking a task still selects it and right-click still opens the context menu.

Created with PostHog Code

Sidebar items (including task names) truncate long labels with an ellipsis.
Show the full label in a tooltip on hover when, and only when, the label
is actually overflowing. Follows the existing pattern used in
Combobox.tsx.

Generated-By: PostHog Code
Task-Id: 6339d494-8d63-4b68-927e-e97318d257e6
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.

0 participants