Skip to content

fix(tui): smooth new session tab handoff - #39745

Merged
kitlangton merged 1 commit into
v2from
new-session-tab
Jul 30, 2026
Merged

fix(tui): smooth new session tab handoff#39745
kitlangton merged 1 commit into
v2from
new-session-tab

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Remove the visual jitter when a temporary New session tab becomes the created session tab.

Before / After

Before

The Home route stopped exposing the temporary tab as soon as navigation changed to the new session. The persisted tab store only added the real session after its locked file write completed, producing an intermediate layout without the active tab. The real tab could then render as Untitled session and run the generic title wipe, producing mixed title frames before the session title arrived.

After

The temporary tab remains active until the persisted collection contains the created session. Its initial real-tab title stays New session, and the one-time handoff renames directly instead of replaying the normal retitle wipe. Tab count, position, and widths remain stable throughout.

How

  • Carry the derived temporary-tab state across a Home-to-session route change until the real session appears in the persisted tab collection.
  • Seed the real tab with the shared New session title during that handoff.
  • Skip the generic title wipe only when transitioning away from the temporary title; normal session retitles keep their existing animation.
  • Extend the provider regression to assert that the temporary tab remains present synchronously and that the persisted replacement inherits its title.

Scope

This only changes the temporary-to-real tab handoff introduced by #39735. Session creation, persistence, and normal tab title animation are unchanged.

Testing

  • bun run test test/context/session-tabs.test.tsx test/context/session-tabs-model.test.ts in packages/tui: 26 passed
  • bun typecheck in packages/tui
  • Full repository typecheck through the pre-push hook: 33 tasks passed
  • Frame-by-frame Terminal Control replay against a hermetic V2 server; verified a direct New session to created-session title change with stable widths and no intermediate tab state

Demo

new-session-handoff.mp4

@kitlangton
kitlangton enabled auto-merge (squash) July 30, 2026 20:14
@kitlangton
kitlangton merged commit 16b247f into v2 Jul 30, 2026
8 of 9 checks passed
@kitlangton
kitlangton deleted the new-session-tab branch July 30, 2026 20: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