Skip to content

feat(tui): support configurable tab positions - #41575

Open
kitlangton wants to merge 2 commits into
v2from
tab-positions
Open

feat(tui): support configurable tab positions#41575
kitlangton wants to merge 2 commits into
v2from
tab-positions

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

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

  • Replace the beta tabs.layout setting with one tabs.position enum: top, bottom, left, or right.
  • Compose the existing horizontal and vertical tab renderers at the selected edge in packages/tui/src/app.tsx.
  • Share effective side-position and reserved-width calculations with the session route so transcript and sidebar sizing remain aligned.
  • Default to 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 typecheck
  • cd packages/cli && bun run test test/config.test.ts (4 passed)
  • cd packages/cli && bun typecheck
  • Push hook: workspace bun turbo typecheck --concurrency=3 (33 packages passed)
  • OpenCode Drive scripted run at 120x36 switched through the settings UI and asserted the visible geometry for all four positions; four screenshots and a recording were produced.

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

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