mirror of
https://github.com/jhd3197/ServerKit.git
synced 2026-11-10 05:53:05 +09:00
The "Terminal & Logs" page had no terminal. Now a Terminal tab hosts the xterm console (RemoteTerminal) against paired agent servers, behind a demo-style target rail (.term-shell: agent list with glowing status dots, offline rows disabled, first online server auto-selected). RemoteTerminal was built but never mountable - it imported a nonexistent SocketContext and listened for a terminal:<sid> event that nothing emits. Fixed the full output path: - backend sockets.py: new subscribe_terminal/unsubscribe_terminal handlers join the browser into the agent gateway stream room (server_<id>_terminal:<session>) after validating the session via TerminalService.get_session - RemoteTerminal: rewired to services/socket.js; consumes server_stream events filtered by the session channel (agent PTY -> gateway -> xterm), re-subscribes on socket reconnect, unsubscribes on unmount VALID_TABS gains terminal (appended - logs stays the default landing since the shell needs a connected agent; panel-host PTY remains a S5 gap, TerminalService rejects local). Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>