Skip to content

Better use of horizontal space in the session view on wide terminals #32995

Closed as not planned

Description

@7nicetoseeu

Type: Feature request / discussion

Summary

On wide / fullscreen terminals, the session message area doesn't make good use of the available width. The effective content reads as a narrow band with large empty margins on the sides, so a lot of screen real estate is wasted.

What I found in the source

While looking at packages/tui/src/routes/session/index.tsx:

  • layout ("auto" | "stretch") in the main config is @deprecated and now always uses stretch (see https://opencode.ai/config.json), so the column should already stretch to full width.
  • The sidebar auto-shows when dimensions().width > 120 and consumes 42 columns (index.tsx:265, index.tsx:273):
    const wide = createMemo(() => dimensions().width > 120)
    const contentWidth = createMemo(() => dimensions().width - (sidebarVisible() ? 42 : 0) - 4)
  • The message container is flexGrow={1} with paddingLeft/Right={2} (index.tsx:1168-1169), and individual messages have no maxWidth — they fill the available column.

So on a wide terminal the main levers left are the hardcoded 120 sidebar threshold and the 42-col sidebar width. Hiding the sidebar (session.sidebar.toggle) reclaims width, but the threshold itself isn't configurable, and on ultra-wide terminals full-width raw text is hard to read, so some users actually want an opt-in centered column.

Proposals (open for discussion)

  1. Make the wide threshold (120) configurable via the TUI config (e.g. session.sidebar_width / session.wide_threshold), so users on smaller-but-wide terminals can keep messages wide.
  2. Add an optional session.content_max_width (similar to the existing prompt.max_width on Home, config/index.tsx:48) so ultra-wide users can center a readable column, while narrow users keep full stretch.
  3. Auto-hide the sidebar when showing it would push contentWidth below a minimum ratio.

Environment

  • opencode: latest dev (cloned for source reading)
  • Terminal: wide/fullscreen (please confirm your exact width + whether sidebar is visible when you see this)

Willing to contribute

Happy to open a PR once a direction is agreed. The change for proposal 1 is small (a couple of lines); proposal 2 is a bit more involved but still contained to routes/session.

Activity

  1. github-actions commented on Jun 19, 2026

    @github-actions
    Contributor

    This issue doesn't fully meet our contributing guidelines.

    What needs to be fixed:

    • Feature request titles must start with [FEATURE]: (e.g. [FEATURE]: Better use of horizontal space in the session view on wide terminals)

    Please edit this issue to address the above within 2 hours, or it will be automatically closed.


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

    If you believe this was flagged incorrectly, please let a maintainer know.

  2. 7nicetoseeu commented on Jun 19, 2026

    @7nicetoseeu
    Author

    Closing this as a duplicate — apologies, I should have searched before opening.

    After the bot pointed them out, I see the same asks are already tracked (and two are assigned to @kitlangton):

    My proposal 1 maps to #6087, proposal 2 maps to #25142, and the padding concern to #20230. Rather than fragment the discussion, I'll move over to #25142 and share the source-level findings there, and I'm happy to help with a PR on any of these.

  3. 7nicetoseeu commented on Jun 19, 2026

    @7nicetoseeu
    Author

    Closing as duplicate of #25142, #6087, and #20230. See comment above.

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

Metadata

Metadata

Assignees

Labels

needs:complianceThis means the issue will auto-close after 2 hours.

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions