Skip to content

feat(tui): add configurable sidebar width - #34830

Closed
kqw8 wants to merge 1 commit into
anomalyco:devfrom
kqw8:sidebar-width
Closed

kqw8 wants to merge 1 commit into
anomalyco:devfrom
kqw8:sidebar-width

Conversation

@kqw8

@kqw8 kqw8 commented Jul 2, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #6087

Type of change

  • Bug fix
  • New feature
  • Refactor / code improvement
  • Documentation

What does this PR do?

Adds a TUI config option for the session sidebar width:

{
  "sidebar": {
    "width": 50
  }
}

The default remains 42 columns. The session layout and sidebar component now use the same resolved width, and the value is clamped against the terminal width so a large configured value does not consume the full main area.

This also updates legacy TUI config migration so tui.sidebar.width from opencode.json is preserved when moved into tui.json, and documents the option in English and Chinese config docs.

How did you verify your code works?

  • cd packages/tui && bun run typecheck
  • cd packages/opencode && bun run typecheck
  • cd packages/opencode && bun test test/config/tui.test.ts --timeout 30000
  • bunx prettier --check packages/opencode/src/config/tui-migrate.ts packages/opencode/test/config/tui.test.ts packages/tui/src/config/index.tsx packages/tui/src/routes/session/index.tsx packages/tui/src/routes/session/sidebar.tsx packages/web/src/content/docs/config.mdx packages/web/src/content/docs/zh-cn/config.mdx
  • push hook ran bun turbo typecheck: 29 packages successful

Screenshots / recordings

Not included. This is a config-driven layout change; no visible behavior changes unless sidebar.width is configured.

Checklist

  • I have tested my changes locally
  • I have not included unrelated changes in this PR

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Hey! Your PR title Add configurable TUI sidebar width doesn't follow conventional commit format.

Please update it to start with one of:

  • feat: or feat(scope): new feature
  • fix: or fix(scope): bug fix
  • docs: or docs(scope): documentation changes
  • chore: or chore(scope): maintenance tasks
  • refactor: or refactor(scope): code refactoring
  • test: or test(scope): adding or updating tests

Where scope is the package name (e.g., app, desktop, opencode).

See CONTRIBUTING.md for details.

@github-actions github-actions Bot added needs:title needs:compliance This means the issue will auto-close after 2 hours. labels Jul 2, 2026
@kqw8 kqw8 changed the title Add configurable TUI sidebar width feat(tui): add configurable sidebar width Jul 2, 2026
@github-actions github-actions Bot removed needs:title needs:compliance This means the issue will auto-close after 2 hours. labels Jul 2, 2026
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Thanks for updating your PR! It now meets our contributing guidelines. 👍

@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

Automated PR Cleanup

Thank you for contributing to opencode.

Due to the high volume of PRs from users and AI agents, we periodically close older PRs using automated criteria so maintainers can focus review time on the most active and community-supported contributions.

This PR was closed because it matched the following cleanup criteria:

  • The PR was created more than 1 month ago
  • The PR had fewer than 2 positive reactions
  • Positive reactions are counted as thumbs-up, heart, celebration, or rocket reactions on the PR

PRs created within the last month are not affected by this cleanup.

If you believe this PR was closed incorrectly, or if you are still actively working on it, please leave a comment explaining why it should be reopened. A maintainer can review and reopen it if appropriate.

Thanks again for taking the time to contribute.

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.

Is it possible to make the width of the sidebar configurable?

1 participant