diff --git a/apps/web/src/components/features/terminal/terminal.tsx b/apps/web/src/components/features/terminal/terminal.tsx index 604c044..ef4821c 100644 --- a/apps/web/src/components/features/terminal/terminal.tsx +++ b/apps/web/src/components/features/terminal/terminal.tsx @@ -700,7 +700,7 @@ export const TerminalComponent = React.forwardRef( // Ignore disposal errors from partially torn-down terminal } }; - }, [instanceId, connectWebSocket]); + }, [instanceId, connectWebSocket, isMobile]); useImperativeHandle(ref, () => ({ fit: () => { diff --git a/openspec/changes/fix-mobile-terminal-scrolling/tasks.md b/openspec/changes/fix-mobile-terminal-scrolling/tasks.md index b524a8c..6c0e1de 100644 --- a/openspec/changes/fix-mobile-terminal-scrolling/tasks.md +++ b/openspec/changes/fix-mobile-terminal-scrolling/tasks.md @@ -1,6 +1,7 @@ # Restore Mobile Terminal Scrolling — Tasks - [x] Add a mobile-specific terminal scrollback limit while preserving zero scrollback on desktop. +- [x] Reinitialize the terminal when the responsive mobile classification changes so its scrollback and touch handler match the active viewport. - [x] Add focused tests for the responsive scrollback configuration. - [x] Run the full frontend test suite (89 tests passed after repairing the `ProjectsPage` test setup). - [x] Run frontend typecheck, lint, focused tests, and production build.