diff --git a/apps/web/src/components/terminal.tsx b/apps/web/src/components/terminal.tsx index 2cb4fcd..a6eddf1 100644 --- a/apps/web/src/components/terminal.tsx +++ b/apps/web/src/components/terminal.tsx @@ -227,14 +227,6 @@ export const TerminalComponent: React.FC = ({ window.addEventListener("resize", handleResize); - // Use ResizeObserver to detect container size changes - const resizeObserver = new ResizeObserver(() => { - handleResize(); - }); - if (terminalRef.current) { - resizeObserver.observe(terminalRef.current); - } - // Notify parent about terminal readiness if (onTerminalReadyRef.current) { const sendData = (data: string) => { @@ -263,7 +255,6 @@ export const TerminalComponent: React.FC = ({ return () => { clearTimeout(resizeTimeout); window.removeEventListener("resize", handleResize); - resizeObserver.disconnect(); document.removeEventListener("visibilitychange", handleVisibilityChange); ws.close(); term.dispose(); diff --git a/apps/web/src/styles.css b/apps/web/src/styles.css index 5caf2ad..957804f 100644 --- a/apps/web/src/styles.css +++ b/apps/web/src/styles.css @@ -2592,24 +2592,19 @@ a.nav-item, flex: 1; min-height: 0; padding: var(--space-2); + display: flex; + flex-direction: column; } .terminal-container .xterm { - height: 100%; - width: 100%; + flex: 1; + min-height: 0; } .terminal-container .xterm-viewport { - height: 100% !important; - width: 100% !important; background: #1e1e1e !important; } -.terminal-container .xterm-screen { - height: 100% !important; - width: 100% !important; -} - .terminal-container canvas { display: block; }