Replace hacky SSE polling with real-time WebSocket for bidirectional terminal communication. This is a proper interactive terminal - type directly, like tmux attach in the browser. Architecture: - WebSocket server on port 3001 alongside Next.js - Uses tmux pipe-pane for real-time output streaming - Sends input character-by-character via tmux send-keys - Handles terminal resize events - Connection status indicator Implementation: - packages/web/src/server/terminal-websocket.ts: WebSocket server - Terminal component now fully interactive (not read-only) - Runs both servers via concurrently in dev mode - Green dot = connected, red dot = disconnected - Proper cursor, no more clunky input box Benefits: - Real-time streaming (not 2-second polling) - Type directly into terminal - Proper terminal control sequences - Handles resize - Like native tmux attach Dependencies added: - ws (WebSocket server) - @types/ws - concurrently (run multiple servers) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| cli | ||
| core | ||
| integration-tests | ||
| plugins | ||
| web | ||