Skip to content

feat(tui): show session transcript scrollbar by default - #56567

Open
imthegoodboy wants to merge 1 commit into
anomalyco:devfrom
imthegoodboy:scrollbar-by-default
Open

imthegoodboy wants to merge 1 commit into
anomalyco:devfrom
imthegoodboy:scrollbar-by-default

Conversation

@imthegoodboy

@imthegoodboy imthegoodboy commented Oct 17, 2026 •

Copy link
Copy Markdown

Issue for this PR

Closes #46654 — the open feature request for exactly this default.

Type of change

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

What does this PR do?

The transcript scrollbar exists as a config option but shipped off: out of the box the CLI shows no scrollbar while scrolling the session transcript. This makes it the default — session.scrollbar now falls back to on, and the settings dialog's default marker matches it. Users who prefer it gone can still set session.scrollbar to false in cli.json, and the existing "Toggle session scrollbar" command keeps working the same way.

The sample config in the docs CLI config page is updated to the new default so the example matches what a fresh install does.

On history: #20947 deliberately kept the scrollbar opt-in, and earlier flips were closed. This PR is meant as that product decision's review with its standing user request (#46654) attached — if maintainers prefer to keep it opt-in, closing this is a perfectly fine outcome.

How did you verify your code works?

New test packages/tui/test/session-scrollbar-default.test.tsx mounts a session on the app fixture with no scrollbar config and asserts the transcript scrollbox reports its scrollbar visible; session.scrollbar=false keeps its existing behaviour. The rest of the packages/tui suite behaves identically to plain dev (same 7 pre-existing environment/timing failures in plugin-source, dialog-shell-output, app-lifecycle; zero new diffs). bun typecheck from packages/tui and the full bun run check pass.

Screenshots / recordings

Text captures from the test renderer at 120 columns. The scrollbar draws as a color-filled track with a thumb on the transcript's right edge, so it reads subtle in plain text:

Before — the previous default, scrollbar off:

  ┃  Scroll through this transcript, item 18
  ┃

  ┃
  ┃  Scroll through this transcript, item 19
  ┃

  ┃
  ┃  Scroll through this transcript, item 20
  ┃

  ┃
  ┃  Scroll through this transcript, item 21
  ┃

  ┃
  ┃  Scroll through this transcript, item 22
  ┃

  ┃
  ┃  Scroll through this transcript, item 23
  ┃

  ┃
  ┃
  ┃
  ┃
  ╹▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  /tmp/opencode/packages/tui:main                                                    shift+tab agents  ctrl+p commands

After — the new default, scrollbar on (thumb's edge cell at the right border; the thumb body is color fill):

  ┃  Scroll through this transcript, item 18
  ┃

  ┃
  ┃  Scroll through this transcript, item 19
  ┃

  ┃
  ┃  Scroll through this transcript, item 20
  ┃

  ┃
  ┃  Scroll through this transcript, item 21
  ┃

  ┃
  ┃  Scroll through this transcript, item 22
  ┃

  ┃
  ┃  Scroll through this transcript, item 23
  ┃                                                                                                                  ▄

  ┃
  ┃
  ┃
  ┃
  ╹▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀▀
  /tmp/opencode/packages/tui:main                                                    shift+tab agents  ctrl+p commands

Checklist

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

@github-actions

Copy link
Copy Markdown
Contributor

The following comment was made by an LLM, it may be inaccurate:

@opencode-agent opencode-agent Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works as described. I ran the TUI from source on the base and on this branch with a long simulated reply. The transcript scrollbar now appears by default, and setting session.scrollbar: false still hides it. The toggle command and the settings dialog stay in sync with the new ?? true fallback. The new test and bun run typecheck in packages/tui pass.

Public API: no keys are added or removed. The effective default of the session.scrollbar config key changes from false to true. Configs that set it explicitly keep their behaviour. Users who never set it will now see the scrollbar.

Things maintainers should weigh:

  • This reverses an earlier decision. Maintainer PR #20947 deliberately set this default back to hidden and kept the scrollbar opt-in, and several earlier attempts to flip it (#46650, #33412, #32195, #15282) were closed without merging. CONTRIBUTING.md also says UI features need design review before implementation. Whether to ship this is a product call for maintainers, not a code question.
  • The test is large for a one-line default change. See the inline comment.

The before/after captures in the description look swapped (the one with the thumb is labelled "Before"). The attached screenshots show the base and this branch.

Fixes #46654
Related: #55766

Before

After

@@ -0,0 +1,89 @@
import { expect, test } from "bun:test"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is 89 lines, including a hand-written stub of the session API, to check what is essentially a one-line change of the default. The opt-out case with mouse-wheel scrolling tests behaviour this PR doesn't touch. I'd keep at most the default-visible case, or drop the file so the change stays minimal.

@imthegoodboy

Copy link
Copy Markdown
Author

Thanks for the review.

This branch has not been deployed

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEATURE]:Show session scrollbar by default for long chats

1 participant