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

- 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>
This commit is contained in:
2026-02-25 20:53:43 -06:00
parent 8128eb7fbe
commit 66d9b5230e
9 changed files with 1694 additions and 100 deletions

View File

@@ -33,6 +33,9 @@
"@tiptap/react": "^3.20.0",
"@tiptap/starter-kit": "^3.20.0",
"@types/dompurify": "^3.2.0",
"@xterm/addon-fit": "^0.11.0",
"@xterm/addon-web-links": "^0.12.0",
"@xterm/xterm": "^6.0.0",
"@xyflow/react": "^12.5.3",
"better-auth": "^1.4.17",
"date-fns": "^4.1.0",