The WebSocket closes immediately with code 1006 due to nginx/proxy issues. This implementation completely bypasses WebSocket for terminal output by using HTTP polling instead. Architecture: - Server buffers PTY output in memory (outputBuffer array) - Frontend polls every 100ms via GET /terminals/:id/output?since=N - Output entries have monotonically increasing index - Old output is automatically cleaned up after 5 minutes - Commands sent via HTTP POST (already implemented) Changes: - terminal-service.js: Added bufferOutput(), getTerminalOutput() - terminal.js: Added startPolling(), stopPolling(), sendTerminalResize() - server.js: Added GET /terminals/:id/output and POST /terminals/:id/resize - No WebSocket needed for output display (keeps legacy compatibility) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
55 KiB
55 KiB