Add pty support #27
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "development_tty"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
#26
Complete web-based TTY support with xterm.js integration: Server-side: - WebSocket PTY attach handler in /api/services/{name}/pty (already implemented) - Binary frame forwarding for PTY data - Text frame handling for resize commands (JSON: {resize:{cols,rows}}) - Proper async/blocking task coordination UI updates: - Added xterm.js 5.0 from CDN (terminal emulator) - New "Terminal" tab with interactive terminal widget (500px height) - Terminal service dropdown selector - Attach/Detach buttons for connecting to TTY services - TTY checkbox in service creation form - Terminal resize handler synced to PTY JavaScript implementation: - Initialize xterm.js with dark theme matching dashboard - WebSocket connection to /api/services/{service}/pty - Binary message handling (UTF-8 PTY data) - Text message handling (resize commands) - Automatic service dropdown population - Graceful connection/disconnection lifecycle - Window resize listener for terminal fit Features: - Real-time interactive terminal in browser - ANSI color and formatting support via xterm.js - Terminal resize broadcasts to PTY master - Connection status feedback - All 287+ tests still passing Browser support: Modern browsers with WebSocket and xterm.js support Works with any TTY-enabled service (tty: true in config) Next steps: - Test with interactive shell service - Handle keyboard input (ctrl+c, etc) - Add session recording (optional) Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>- Replace stub PTY proxy endpoint that returned JSON with full bidirectional WebSocket proxy - Proxy forwards binary/text frames between browser and server PTY endpoint - Add proper error handling and connection lifecycle management - Test confirms WebSocket connection and message forwarding working correctly The proxy enables browser-based terminal access by: 1. Accepting WebSocket upgrade from browser at /api/services/{name}/pty 2. Connecting to server's PTY endpoint at localhost:9090 3. Forwarding binary frames (PTY output) and text frames (resize commands) 4. Handling connection close/error events properly This completes Phase 3 UI implementation with full end-to-end TTY support. Co-Authored-By: Claude Haiku 4.5 <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.