Skip to content

fix(tui): make vertical tabs responsive - #40080

Merged
kitlangton merged 1 commit into
v2from
vertical-tabs-responsive
Aug 1, 2026
Merged

fix(tui): make vertical tabs responsive#40080
kitlangton merged 1 commit into
v2from
vertical-tabs-responsive

Conversation

@kitlangton

Copy link
Copy Markdown
Contributor

What

Make the vertical session tab rail the same 42-column width as the session sidebar, and automatically switch configured vertical tabs to the horizontal top strip when the terminal is narrower than 86 columns.

Before / After

Before: the vertical rail varied between 20 and 30 columns. It remained vertical on narrow terminals, squeezing the main session view.

After: both sidebars share one 42-column width constant. Vertical tabs remain enabled when at least 44 columns are left for content; below that breakpoint the existing horizontal strip renders instead.

How

  • packages/tui/src/ui/layout.ts owns the shared sidebar width and responsive fit decision.
  • The app shell selects the effective tab orientation from terminal width.
  • The session route uses the same decision when calculating transcript and right-sidebar space.
  • The vertical tab component and session sidebar consume the shared width.

Scope

This does not add a user-configurable sidebar width. tabs.vertical remains the orientation preference, with responsive fallback applied when needed.

Testing

  • bun run test from packages/tui: 586 passed, 5 skipped
  • bun typecheck from packages/tui
  • Push hook workspace typecheck: 33 packages passed
  • Real PTY at 120x32: rendered the 42-column vertical rail
  • Resized the same PTY to 85x32: rendered the horizontal top strip after redraw

Flow

flowchart LR
  A[Vertical tabs configured] --> B{Terminal width >= 86}
  B -->|yes| C[42-column left rail]
  B -->|no| D[Horizontal top strip]
Loading

@kitlangton
kitlangton merged commit f158abd into v2 Aug 1, 2026
9 of 10 checks passed
@kitlangton
kitlangton deleted the vertical-tabs-responsive branch August 1, 2026 18:06
github-actions Bot pushed a commit to ReStranger/opencode that referenced this pull request Aug 3, 2026
* upstream/v2:
  test(core): stabilize shell integration timing (anomalyco#40084)
  fix(core): route Bedrock packages natively (anomalyco#40165)
  feat(ai): add native Bedrock Mantle support (anomalyco#40119)
  fix(tui): reserve home and end for navigation (anomalyco#40123)
  refactor(ai): align multimodal naming (anomalyco#40073)
  refactor(tui): remove redundant code (anomalyco#40081)
  fix(tui): discover plugins across config roots (anomalyco#39988)
  fix(tui): make vertical tabs responsive (anomalyco#40080)
  feat(tui): add vertical session tabs (anomalyco#40072)
  fix: preserve provider error status (anomalyco#39976)
  fix(tui): prevent sidebar scrollbar flash (anomalyco#40056)
  feat(tui): prioritize favorite model search results (anomalyco#40049)
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