feat(tui): add plus button to session tab bar - #41887
Merged
Merged
Conversation
This was referenced Aug 12, 2026
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.
What
Adds a plus affordance to the session tab bar so a new tab can be opened with the mouse, matching browser tab strips. Previously the only way to open a new tab was the
session.newcommand or navigating home via keybinds.The plus and the temporary new-session tab are one control with two states: a subdued
+affordance that promotes in place into the active new-session slot when clicked, then demotes back (or becomes a real numbered tab once a prompt is submitted). There is never a separate pseudo tab plus a redundant+at the same time.+sits at the end of the strip (hover lifts it like a tab). Clicking it grows the slot into the active tab — bold+ New sessionon the selected background, with the+glyph where the number would be, and a close×on hover. While promoted, the trailing plus is hidden. On submit, the slot becomes a real numbered tab and a fresh+reappears after it.+ New sessionrow renders below the tab list. Same promotion in place: bold, blue+, selected background, hover close×. Real tabs never share the rail with a "New session" pseudo tab anymore.session.newcommand.How
packages/tui/src/context/session-tabs.tsx— newadd()action on the session-tabs context: navigates home with the current session's location, falling back tolocation.ref. Same semantics as thesession.newcommand inapp.tsx.packages/tui/src/component/session-tabs.tsx— optionaladdonSessionTabsController.NEW_SESSION_TABstill joins the adaptive layout as the active tab (so the existing width-growth animation carries the+stretching into the tab), but renders+in the number cell;showPlus()hides the trailing affordance while promoted and drops itsADD_TAB_WIDTH(3) reservation.newTab()), and the rail scrolls its bottom into view while promoted.packages/tui/src/feature-plugins/system/storybook/session-tabs.tsx— storybook controller wiresaddto the existing fixture add-tab logic (shared with thetkeybind).Flow
flowchart LR idle["subdued + affordance"] -->|click| promoted["slot promotes in place:\nbold + New session, selected bg"] promoted -->|submit prompt| real["real numbered tab"] real --> idle2["fresh + appears after it"] promoted -->|close × / switch away| idleScope
session.newalready covers keyboard access; this is mouse parity for the tab strip.Testing
bun typecheck(packages/tui) clean.bun run test(packages/tui): 642 pass, 0 fail.add opens the new session tab carrying the current session's locationintest/context/session-tabs.test.tsx.+anywhere.Demo
OpenCode Drive recording (simulated LLM): a session starts from the promoted new-session slot, the
+is clicked and promotes into the active tab, a second session starts there, and clicking tab 1 switches back — the slot demotes to the subdued+.tab-plus-demo-v2.mp4