feat(tui): support configurable tab positions - #41575
Open
kitlangton wants to merge 2 commits into
Open
Conversation
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
Allow V2 TUI tabs to be positioned at the top, bottom, left, or right through the Tabs settings surface.
Horizontal positions retain the one-line tab strip. Side positions retain the existing 42-column vertical sidebar and fall back to the top strip when the terminal is too narrow.
How
tabs.layoutsetting with onetabs.positionenum:top,bottom,left, orright.packages/tui/src/app.tsx.top; this beta setting intentionally does not migrate the previous layout value.Scope
This changes only the V2 TUI and its client-local setting. It does not change tab persistence, tab renderer behavior, or the V1 implementation.
Testing
cd packages/tui && bun run test(611 passed, 5 skipped)cd packages/tui && bun run test test/config-v2.test.tsx test/ui/layout.test.ts(8 passed)cd packages/tui && bun typecheckcd packages/cli && bun run test test/config.test.ts(4 passed)cd packages/cli && bun typecheckbun turbo typecheck --concurrency=3(33 packages passed)Demo
The recording shows the Tabs Position setting switching from top to bottom to left to right, with each resulting layout visible before the next switch.
recording-8f8ae030-b4e4-4815-a7c5-30cdfabb45d8.mp4