Skip to content

[FEATURE]: allow configuring session sidebar width in tui.json #52430

Closed as duplicate

Description

@anazia

Feature hasn't been suggested before.

  • I have verified this feature I'm about to request hasn't been suggested before.

Describe the enhancement you want to request

Problem Description

The right sidebar in the TUI session view is currently hardcoded to 42 columns (width={42} in packages/tui/src/routes/session/sidebar.tsx). On wider displays or when inspecting deep file paths in the "Modified Files" section, 42 columns can be too narrow, causing aggressive truncation. Conversely, on smaller terminals or split panes, a narrower sidebar may be preferred.

Proposed Solution

Expose an optional sidebar_width setting in tui.json:

  • Schema: positive integer (columns), default 42.
  • Read in packages/tui/src/routes/session/sidebar.tsx: width={tuiConfig.sidebar_width}.
  • Calculate file path truncation dynamically based on sidebar width rather than a hardcoded 36.

Activity

  1. github-actions commented on Oct 1, 2026

    @github-actions
    Contributor

    This issue might be a duplicate of existing issues. Please check:

  2. arnabwithab commented on Oct 12, 2026

    @arnabwithab

    Also want this. Two things worth adding to the proposal above:

    • The hardcoded width is SESSION_SIDEBAR_WIDTH = 42 in packages/tui/src/ui/layout.ts (used at packages/tui/src/routes/session/sidebar.tsx:24), and SESSION_SIDEBAR_MAX_WIDTH = 72 is already defined there for the sidebar.
    • The TUI already persists pane widths: verticalTabsWidth lives in the layout store (packages/tui/src/app.tsx) via createPaneResize + clampSessionTabsWidth.

    So rather than only a static config value, the sidebar could reuse that pattern: a createPaneResize on the sidebar edge, clamped with clampSessionTabsWidth(width, dimensions().width) and committed to layout. It would then be drag-resizable at runtime and remembered across restarts.

    A sidebar_width default (42, no breaking change) still makes sense for anyone who wants it fixed. 42 cols is tight for plugins rendering into sidebar.content.

  3. arnabwithab commented on Oct 12, 2026

    @arnabwithab

    @simonklee are you looking into this for v2?

  4. anazia commented on Oct 14, 2026

    @anazia
    Author

    It is indeed a duplicate. Sorry about that. But:

    1. we need it for v2
    2. and agree with @arnabwithab that it should be "mouseable"/"draggable". I believe that the left sidebar already behaves like that? Can we not just port that code over?
  5. neriousy commented on Oct 20, 2026

    @neriousy
    Member

    Thanks for the suggestion. We're tracking configurable TUI sidebar width in #35513, so I'm closing this as a duplicate. Please follow that issue for updates.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions