Skip to content

fix(tui): keep exact-fit tab titles stationary - #42073

Merged
kitlangton merged 1 commit into
v2from
exact-fit-marquee
Aug 12, 2026
Merged

fix(tui): keep exact-fit tab titles stationary#42073
kitlangton merged 1 commit into
v2from
exact-fit-marquee

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Keep exact-fit session tab titles stationary and free of overflow fades when hover reveals the close button.

Before / After

Before

A title that exactly filled its resting tab width became one or two cells too wide only because hover reserved space for ×. That activated the marquee and its leading-edge fade, producing a dark mass at the front of an otherwise stationary-looking title.

After

Overflow is classified against the tab's resting title width. Exact-fit titles remain stationary and unfaded on hover; titles that already overflowed continue to marquee within the narrower hovered viewport.

How

  • Add a strict display-cell overflow predicate in packages/tui/src/util/marquee.ts.
  • Separate resting title width from the temporary hovered viewport in horizontal and vertical session tabs.
  • Use resting width for marquee eligibility and overflow fades while retaining the hovered width for clipping and close-button layout.

Testing

  • bun run test test/util/marquee.test.ts from packages/tui
  • bun typecheck from packages/tui
  • Pre-push bun turbo typecheck --concurrency=3

@kitlangton
kitlangton enabled auto-merge (squash) August 12, 2026 16:03
@kitlangton
kitlangton merged commit b24b1b3 into v2 Aug 12, 2026
12 of 14 checks passed
@kitlangton
kitlangton deleted the exact-fit-marquee branch August 12, 2026 16:17
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