Skip to content

feat(tui): wipe in first generated titles - #41903

Open
kitlangton wants to merge 1 commit into
tab-placeholdersfrom
title-wipe
Open

feat(tui): wipe in first generated titles#41903
kitlangton wants to merge 1 commit into
tab-placeholdersfrom
title-wipe

Conversation

@kitlangton

@kitlangton kitlangton commented Aug 12, 2026

Copy link
Copy Markdown
Contributor

What

The left-to-right title wipe removed in #40318 returns, gated and feathered: when a session's first real title arrives, it wipes in over the placeholder instead of popping.

Stacked on #41921 (dim placeholders), which supplies the placeholder predicate the gate uses.

Before / After

Before: the generated title replaces "Untitled session"/"New session" in a single frame. (And in the original pre-#40318 wipe: a hard splice — full-brightness new characters cut against full-brightness old ones, firing on every title change.)

After: the wipe fires only on the placeholder → real transition — the background generated-title moment. The outgoing title dims toward the background the moment the wipe starts, the new title reveals left-to-right behind a 3-cell feathered edge (freshly revealed characters brighten as the front passes), and the front decelerates on an ease-out cubic over 450 ms. Every other title change — user renames, persisted-title sync corrections, real → real updates — jumps immediately, which is what #40318 was fixing.

How

packages/tui/src/component/session-tabs.tsxcreateTitleWipe, shared by both orientations:

  • Keeps the outgoing title and tweens a front cut 0 → 1 (tween with ease-out cubic, 0.45 s). The gate lives in its effect: any transition that is not placeholder → real jumps to front: 1 with no outgoing title retained.
  • parts splices incoming graphemes over outgoing ones per cell (padded with spaces where lengths differ, so a shorter incoming title erases the tail as the front passes).
  • mix(index) returns a per-cell tint toward the background: the outgoing block sits at ~50% dim (deepening slightly as the wipe advances, with a fast ramp-in so the start doesn't flash), and the WIPE_FEATHER cells behind the front ramp freshly revealed characters from dim to full.
  • Both layouts feed their existing visible-parts memos through the helper; characterColor/titleColor apply mix after the existing glow and fade treatments, and the per-character render path is forced while a wipe is active.

Flow

flowchart LR
    change["tab.title changes"] --> gate{"previous title was\na placeholder?"}
    gate -->|no| jump["jump: render new title immediately"]
    gate -->|yes| wipe["wipe: outgoing dims,\nfront reveals with feathered edge"]
    wipe --> settle["450ms ease-out → settled title"]
Loading

Scope

  • No change to when titles update — only how the one placeholder → real transition renders.
  • The tab strip cannot distinguish a user rename from a generated title (session.renamed carries no source), so the gate is prior-state based; a user manually titling an untitled session also wipes, which reads fine.

Testing

  • bun typecheck (packages/tui) clean.
  • bun run test (packages/tui): 647 tests, 0 fail.
  • Verified live in a real PTY via terminal-control in both orientations: captured mid-wipe frames show the bright incoming prefix, the feathered edge, and the uniformly dimmed outgoing remainder ("Queitled session"); a failed first run keeps the placeholder without firing the wipe.

Demo

Storybook (OPENCODE_STORY=session-tabs), vertical rail: two tabs open untitled (dim, italic — from #41921) and earn their titles on their first completed run, each wiping in with the dimmed-outgoing, feathered-edge treatment.

feather-demo-final.mp4

@kitlangton kitlangton changed the title feat(tui): wipe in first titles and dim placeholders feat(tui): wipe in first generated titles Aug 12, 2026
@kitlangton
kitlangton changed the base branch from tui-tab-plus to tab-placeholders August 12, 2026 02:13
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