fix: reinitialize terminal on mobile viewport changes
Recreate the terminal when responsive classification changes so mobile scrollback and touch listeners are installed.\n\nOpenSpec: fix-mobile-terminal-scrolling\nQuality gates: npm run typecheck, npm run lint, npm test (89 passed), npm run build
This commit is contained in:
@@ -700,7 +700,7 @@ export const TerminalComponent = React.forwardRef<TerminalRef, TerminalProps>(
|
|||||||
// Ignore disposal errors from partially torn-down terminal
|
// Ignore disposal errors from partially torn-down terminal
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}, [instanceId, connectWebSocket]);
|
}, [instanceId, connectWebSocket, isMobile]);
|
||||||
|
|
||||||
useImperativeHandle(ref, () => ({
|
useImperativeHandle(ref, () => ({
|
||||||
fit: () => {
|
fit: () => {
|
||||||
|
|||||||
@@ -1,6 +1,7 @@
|
|||||||
# Restore Mobile Terminal Scrolling — Tasks
|
# Restore Mobile Terminal Scrolling — Tasks
|
||||||
|
|
||||||
- [x] Add a mobile-specific terminal scrollback limit while preserving zero scrollback on desktop.
|
- [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] 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 the full frontend test suite (89 tests passed after repairing the `ProjectsPage` test setup).
|
||||||
- [x] Run frontend typecheck, lint, focused tests, and production build.
|
- [x] Run frontend typecheck, lint, focused tests, and production build.
|
||||||
|
|||||||
Reference in New Issue
Block a user