🤖 feat: tooltip with full workspace name on truncated sidebar titles#3378
Open
Neppkun wants to merge 1 commit into
Open
🤖 feat: tooltip with full workspace name on truncated sidebar titles#3378Neppkun wants to merge 1 commit into
Neppkun wants to merge 1 commit into
Conversation
Wrap the workspace title span in AgentListItem with TooltipIfPresent so hovering a row reveals the full name when the title is clipped by the existing 'truncate' utility. A ResizeObserver tracks scrollWidth vs clientWidth on the span and only attaches the tooltip while overflow is present, so non-truncated rows stay tooltip-free. The trigger lives on the title element only, leaving the rest of the row (group label, badges, terminal-count tooltip) untouched. Uses displayTitle so variants/best-of-n group labels (e.g. 'A · …') are included, matching the row's aria-labels.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Show a tooltip with the full workspace name when hovering a sidebar row whose title is clipped by the existing
truncateutility. Today the only ways to read a clipped name are to expand the sidebar or click the row; this restores quick scanability when the sidebar is resized narrow.Background
AgentListItemrenders the workspace title in a<span>with Tailwind'struncate(overflow: hidden; text-overflow: ellipsis; white-space: nowrap). Inside a narrowmin-w-0grid column, long titles collapse to ellipses with no nativetitleattribute fallback, so users have to widen the sidebar or click the row to see the full name.Implementation
Single-file change in
src/browser/components/AgentListItem/AgentListItem.tsx:<span>inTooltipIfPresent(the same helper used for truncated labels inFileTree).TooltipProvideris already mounted globally inApp.tsx, so no extra wiring is required.ResizeObserveron the span:scrollWidth > clientWidthdrives anisTitleTruncatedflag. The tooltip is only attached while overflow is present; non-truncated rows have no trigger at all.displayTitle(notworkspaceTitle) so variants/best-of-n group labels appear asA · fix login, matching the row's existingaria-labels.side="right"so it floats into the main content area instead of covering neighboring sidebar rows.Validation
make typecheck— clean.bunx eslinton the touched file — clean.ResizeObserver).Risks
Low. Presentational, additive wrap around an existing element; no state-management changes. The trigger is fully unmounted when
isTitleTruncatedis false, so the common case (fitting titles) is byte-identical to before. TheResizeObserveris per-row and only observes the title span, matching the lifetime of the row itself.Generated with
mux• Model:anthropic:claude-opus-4-7• Thinking:high• Cost:$2.13