Skip to content

fix(tui): disclose truncated tab titles - #42344

Closed
kitlangton wants to merge 1 commit into
v2from
tab-title-tooltip
Closed

fix(tui): disclose truncated tab titles#42344
kitlangton wants to merge 1 commit into
v2from
tab-title-tooltip

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Keep truncated session tab titles stationary and disclose the full title in a delayed hover tooltip instead of scrolling it as a marquee.

The tooltip appears only when the title exceeds its available cells, stays within the terminal bounds, and works in both the vertical session rail and horizontal tab strip.

Before / After

Before: Hovering a truncated tab for 600 ms started a continuously looping marquee. The tab label changed beneath the pointer and could keep moving independently of the user scanning the tab strip.

After: The truncated title remains a stable, softly faded landmark. A deliberate 600 ms hover opens the full title beside or below the tab, and leaving, pressing, dragging, switching layout, or removing the tab dismisses it immediately.

How

  • packages/tui/src/component/session-tabs.tsx replaces the marquee timer and offset state with overflow-only delayed disclosure state.
  • Tooltip placement opens into available space for the vertical rail and anchors to the hovered tab in the horizontal strip, with terminal-bound fallback alignment.
  • The retired marquee utility and its tests are removed; focused disclosure tests cover delay, overflow gating, and immediate dismissal.

Scope

This changes only pointer-hover disclosure for truncated TUI session tab titles. Tab sizing, keyboard navigation, close controls, drag ordering, and the web titlebar are unchanged.

Testing

  • bun run test test/component/session-tabs-title-disclosure.test.ts test/context/session-tabs-model.test.ts from packages/tui (33 passing)
  • bun typecheck from packages/tui
  • Push hook: repository-wide bun turbo typecheck --concurrency=3 (34 successful tasks)
  • OpenCode Drive storybook run in a real PTY at 100x40, verifying delayed hover disclosure and immediate dismissal in both orientations

Demo

Isolated OpenCode Drive session-tabs story using the production SessionTabs component. The pointer hovers a truncated title in the vertical rail, then repeats the interaction in the horizontal strip.

tab-title-tooltip.mp4

@kitlangton kitlangton closed this Aug 13, 2026
@kitlangton
kitlangton deleted the tab-title-tooltip branch August 13, 2026 15:23
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant