You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Terminal doesn't scroll to the bottom when you type while scrolled up #37922
When the terminal is scrolled up into its history, typing does not scroll it back to the bottom. The prompt, your input, and the command output all stay off screen. To see what you're typing, you have to reach for the mouse and scroll down first, so a keyboard-only workflow breaks.
Steps to reproduce
Open a terminal in a thread and run something with enough output to scroll, e.g. seq 500.
Scroll up into the history.
Type a command and press Enter.
Expected: the view jumps to the bottom as soon as you type, like most terminals (xterm.js calls this scrollOnUserInput and enables it by default).
Actual: the view stays where it was. Your input and its output are hidden until you scroll down by hand.
Cause
The view only returns to the bottom on resize (ThreadTerminalDrawer.tsx) or from the context menu's "scroll to bottom" item. Key, text, composition and paste input in apps/web/src/terminal/ghostty/surface.ts call this.options.onData(...) directly and never touch the scroll position.
Suggested fix
Route user input through one helper that scrolls to the bottom first:
Use it for key, text, composition and paste input. Keep mouse reports, wheel-to-arrow data and terminal query replies on plain onData, since those shouldn't move the view.
Activity