feat(web): integrate xterm.js with WebSocket terminal backend #518

Merged
jason.woltje merged 1 commits from feat/ms19-xterm-integration into main 2026-02-26 02:55:54 +00:00
Owner

Summary

  • Replace mock TerminalPanel with real xterm.js terminal connected to backend PTY via WebSocket
  • Create useTerminal hook for /terminal Socket.IO namespace with session lifecycle management
  • Create XTerminal component with FitAddon auto-resize, WebLinksAddon clickable URLs
  • CSS variable theme integration supporting all 5 themes
  • Terminal exit handling with reconnect UI
  • 40 new unit tests (useTerminal, XTerminal, TerminalPanel)

Test plan

  • 17 useTerminal hook tests
  • 8 XTerminal component tests
  • 15 TerminalPanel integration tests
  • 1240 total web tests pass
  • TypeScript typecheck clean
  • Lint clean

Relates to #509

## Summary - Replace mock TerminalPanel with real xterm.js terminal connected to backend PTY via WebSocket - Create useTerminal hook for /terminal Socket.IO namespace with session lifecycle management - Create XTerminal component with FitAddon auto-resize, WebLinksAddon clickable URLs - CSS variable theme integration supporting all 5 themes - Terminal exit handling with reconnect UI - 40 new unit tests (useTerminal, XTerminal, TerminalPanel) ## Test plan - [x] 17 useTerminal hook tests - [x] 8 XTerminal component tests - [x] 15 TerminalPanel integration tests - [x] 1240 total web tests pass - [x] TypeScript typecheck clean - [x] Lint clean Relates to #509
jason.woltje added the web label 2026-02-26 02:55:44 +00:00
jason.woltje added 1 commit 2026-02-26 02:55:45 +00:00
feat(web): integrate xterm.js with WebSocket terminal backend
All checks were successful
ci/woodpecker/push/orchestrator Pipeline was successful
ci/woodpecker/push/web Pipeline was successful
ci/woodpecker/push/api Pipeline was successful
66d9b5230e
- Install @xterm/xterm, @xterm/addon-fit, @xterm/addon-web-links
- Create useTerminal hook connecting to /terminal Socket.IO namespace
  with full session lifecycle management (create, input, resize, close)
- Create XTerminal component with FitAddon auto-resize, WebLinksAddon,
  theme support via CSS variables, and terminal:exit reconnect UI
- Replace mock TerminalPanel with real XTerminal component, preserving
  the tab bar and close button layout structure
- Export XTerminal and XTerminalProps from the terminal barrel index
- Write 40 unit tests covering useTerminal hook and both components

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
jason.woltje merged commit 417c6ab49c into main 2026-02-26 02:55:54 +00:00
jason.woltje deleted branch feat/ms19-xterm-integration 2026-02-26 02:55:54 +00:00
Sign in to join this conversation.