diff --git a/apps/web/src/components/features/terminal/terminal.tsx b/apps/web/src/components/features/terminal/terminal.tsx index cb763a9..0e9cec2 100644 --- a/apps/web/src/components/features/terminal/terminal.tsx +++ b/apps/web/src/components/features/terminal/terminal.tsx @@ -276,10 +276,17 @@ export const TerminalComponent = React.forwardRef( lineHeight: 1.2, letterSpacing: 0, allowTransparency: false, - scrollback: 10000, + // This terminal only ever hosts full-screen TUI tools (pi-agent, + // opencode), which repaint in place in the normal buffer and do not + // use the alternate screen or mouse tracking. With scrollback, every + // repaint accumulates as history → a viewport scrollbar appears and + // the mouse-wheel scrolls through stale frames instead of the app. + // scrollback:0 keeps only the live viewport: no bar, no stale-frame + // wheel jank. (Scrollbar is also hidden via CSS for belt-and-suspenders.) + scrollback: 0, ignoreBracketedPasteMode: false, - fastScrollSensitivity: 5, - scrollSensitivity: 1, + fastScrollSensitivity: 0, + scrollSensitivity: 0, smoothScrollDuration: 0, theme: { background: "#1e1e1e", diff --git a/apps/web/src/styles/utilities.css b/apps/web/src/styles/utilities.css index c7c23a2..82670fb 100644 --- a/apps/web/src/styles/utilities.css +++ b/apps/web/src/styles/utilities.css @@ -938,6 +938,14 @@ a.nav-item, overscroll-behavior: auto; max-height: 100% !important; width: 100% !important; + /* Full-screen TUI tools repaint in place; scrollback is 0 (see terminal.tsx). + Hide the viewport scrollbar so it never appears or captures input. */ + scrollbar-width: none; + -ms-overflow-style: none; +} + +.terminal-container .xterm-viewport::-webkit-scrollbar { + display: none; } /* On mobile the custom touch handler scrolls the buffer; disable native