Repository navigation
Keep terminal scroll position on input - #30889
Conversation
Typing or pasting in a scrolled-up pane can keep the current viewport. Settings > Terminal Interaction now has Scroll to Bottom on Input, on by default, mapped to xterm's scrollOnUserInput.
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
No actionable comments were generated in the recent review. Walkthrough
Severity of issue fixed: Low Merge Risk:
|
There was a problem hiding this comment.
Actionable comments posted: 1
ℹ️ Review info
⚙️ Run configuration
- Configuration used: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
7ffe7035-431e-410f-9bef-4e782b687297
📒 Files selected for processing: 16
src/renderer/src/components/dashboard-popout/preview-terminal-options.test.tssrc/renderer/src/components/dashboard-popout/preview-terminal-options.tssrc/renderer/src/components/settings/TerminalInteractionSection.test.tsxsrc/renderer/src/components/settings/TerminalInteractionSection.tsxsrc/renderer/src/components/settings/setting-labels.tssrc/renderer/src/components/settings/terminal-pane-appearance-search.tssrc/renderer/src/components/settings/terminal-search.test.tssrc/renderer/src/components/terminal-pane/terminal-appearance.test.tssrc/renderer/src/components/terminal-pane/terminal-appearance.tssrc/renderer/src/components/terminal-pane/terminal-pane-manager-options.tssrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/lib/pane-manager/pane-lifecycle.test.tssrc/renderer/src/lib/pane-manager/pane-terminal-options.tssrc/renderer/src/lib/pane-manager/xterm-user-scrolling-contract.test.tssrc/shared/default-global-settings.tssrc/shared/global-settings-types.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
Accept the removal of terminal-search.test.ts from main, which dropped that file as low-value search coverage.
Add the label, description and search keywords to every locale catalog so the setting does not fall back to English.
The field took global-settings-types.ts past the 300 line lint limit. Keep it in a small settings type composed into GlobalSettingsBase, as the other feature settings are.
There was a problem hiding this comment.
Actionable comments posted: 1

Review info
-
Run configuration-
- Source mode: Auto
- Repository: Unavailable
- Branch: Unavailable
- File: No configuration file from this repository applied
- Commit: Unavailable
- Layers: Repository UI
- Review profile: CHILL
- Plan: Advanced
- Run ID:
68a69ffa-10c7-4b50-b300-aa8ba2bdfcf2
Files selected for processing: 21-
src/renderer/src/components/settings/TerminalInteractionSection.tsxsrc/renderer/src/components/terminal-pane/terminal-appearance.test.tssrc/renderer/src/components/terminal-pane/terminal-appearance.tssrc/renderer/src/components/terminal-pane/terminal-pane-manager-options.tssrc/renderer/src/i18n/locales/de.jsonsrc/renderer/src/i18n/locales/en.jsonsrc/renderer/src/i18n/locales/es.jsonsrc/renderer/src/i18n/locales/fr.jsonsrc/renderer/src/i18n/locales/ja.jsonsrc/renderer/src/i18n/locales/ko.jsonsrc/renderer/src/i18n/locales/pt.jsonsrc/renderer/src/i18n/locales/ru.jsonsrc/renderer/src/i18n/locales/tr.jsonsrc/renderer/src/i18n/locales/zh-Hant.jsonsrc/renderer/src/i18n/locales/zh.jsonsrc/renderer/src/lib/pane-manager/pane-lifecycle.test.tssrc/renderer/src/lib/pane-manager/pane-terminal-options.tssrc/renderer/src/lib/pane-manager/xterm-user-scrolling-contract.test.tssrc/shared/default-global-settings.tssrc/shared/global-settings-base.tssrc/shared/terminal-scroll-settings.ts
Files skipped from review as they are similar to previous changes: 1-
- src/renderer/src/i18n/locales/en.json
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 9 remain after this review.
-
The row passed English keywords to SearchableSetting, so a translated query such as "einrasten" found the terminal pane but hid the row. Move the entry to its own catalog getter and pass it to the row, so both use the same localized keywords.
Main removed preview-terminal-options.test.ts, so keep that deletion and drop this branch's preview assertions with it.
The changed-code quality gate rejects the type assertion.
Resolve the pane-lifecycle.test.ts conflict: main dropped the buildDefaultTerminalOptions suite, so keep the scroll-on-input check as its own small describe block.
|
Hi @brennanb2025 @nwparker, could one of you take a look at this PR and merge it if it's good to go? I'm running into this every day. I use inline TUI agents in Orca (omp, which renders into native scrollback). When I scroll up to read earlier output and start typing a follow-up, the pane jumps back to the bottom, because xterm's Where it stands:
Could someone approve the workflow runs and review it? Thanks! |
|
@nwparker Yes, tested it locally on the PR head ( Setting on (default): the first keystroke snaps the pane to the bottom, same as Orca today.
Setting off: I typed "Which word is on line 42?" and the text reached omp's prompt, but the view stayed on lines 37–88. I pressed Enter while still scrolled up, omp replied, and the view still didn't move.
Turning the setting off applied to the pane that was already open, with no restart needed. I didn't test paste, Windows/Linux, or the dashboard preview. Thanks @mvanhorn, this fixes my daily annoyance with inline TUI agents. |
|
@nwparker thanks for taking a look. I don't have screenshots to add beyond what @junppyo posted above, which covers the hands-on side better than I can. On my end the coverage is the unit tests in the PR: the settings section, the terminal settings search, pane lifecycle, and an xterm contract test that checks the setting reaches The CI runs are still waiting on workflow approval, so those would need a maintainer click before merge. |
Shorten the Scroll to Bottom on Input description so it fits on one line, widen the Terminal Interaction subtitle to cover scrolling, and add a component fixture for the section.
|
Thanks @nwparker for recording the e2e run. It's good to see the viewport check in both directions. |
|
Appreciate the merge, @nwparker. Being able to read back through scrolled-up output while typing, without the pane jumping to the bottom, should help a lot. |









ELI5
A terminal pane that is scrolled up no longer has to jump to the latest output when you type. There is a setting to keep that jump, or turn it off.
What Changed
Before, typing or pasting in a scrolled-up terminal always snapped the viewport to the bottom.
After, Settings > Terminal > Terminal Interaction has Scroll to Bottom on Input. It is on by default. Turn it off and the pane stays where you scrolled while you type or paste.
The switch maps to xterm's
scrollOnUserInputon live panes, new panes, the dashboard preview terminal, and the plain SSH terminal view. Changes apply to open panes without a restart.Why
Reading earlier output and then typing a follow-up is common. Jumping away on every keystroke makes that harder. A single setting keeps the current default for everyone else.
Linked Issue
Closes #30492
Testing
TerminalInteractionSection(switch + localized search), terminal appearance live-apply, pane lifecycle default, and an xterm contract test that keeps a scrolled-up viewport with the option off (fails if the option is flipped back on)settings/terminal/TerminalInteractionSection(default on / off)pnpm run check:code-quality:changedpassed againstupstream/mainpnpm tc:webpassedHow to use
Demo