diff --git a/apps/web/src/components/terminal.tsx b/apps/web/src/components/terminal.tsx index fc64b1e..e1e6073 100644 --- a/apps/web/src/components/terminal.tsx +++ b/apps/web/src/components/terminal.tsx @@ -79,6 +79,13 @@ export const TerminalComponent: React.FC = ({ reconnectAttemptsRef.current = 0; lastPingRef.current = Date.now(); + // Send current terminal size immediately on connect + if (termRef.current) { + const { cols, rows } = termRef.current; + console.log(`[Terminal] Sending resize on connect: ${cols}x${rows}`); + ws.send(JSON.stringify({ type: "resize", cols, rows })); + } + // Start heartbeat check if (heartbeatCheckRef.current) { window.clearInterval(heartbeatCheckRef.current);