con un clic
tabz-development
// Patterns for building and debugging TabzChrome itself. Use when working on Terminal.tsx, xterm.js integration, WebSocket I/O, resize handling, or any TabzChrome extension/backend code.
// Patterns for building and debugging TabzChrome itself. Use when working on Terminal.tsx, xterm.js integration, WebSocket I/O, resize handling, or any TabzChrome extension/backend code.
Integrate projects with TabzChrome terminals via Markdown links, HTML attributes, WebSocket, JS API, or Spawn API
Spawn and manage terminal tabs via TabzChrome REST API. Use when spawning workers, creating terminals programmatically, setting up worktrees for parallel work, or crafting prompts for Claude workers.
Browser automation via 70 tabz MCP tools. Use when taking screenshots, filling forms, debugging network requests, testing responsive design, or using text-to-speech notifications.
Spawn and manage terminal tabs via TabzChrome REST API. Use when spawning workers, creating terminals programmatically, setting up worktrees for parallel work, or crafting prompts for Claude workers.
Browser automation via 70 tabz MCP tools. Use when taking screenshots, filling forms, debugging network requests, testing responsive design, or using text-to-speech notifications.
Integrate projects with TabzChrome terminals via HTML attributes, WebSocket, JS API, or Spawn API
| name | tabz-development |
| description | Patterns for building and debugging TabzChrome itself. Use when working on Terminal.tsx, xterm.js integration, WebSocket I/O, resize handling, or any TabzChrome extension/backend code. |
Reference patterns for building TabzChrome's terminal implementation.
extension/components/Terminal.tsx → WebSocket → backend/modules/pty-handler.js
↓ ↓
xterm.js render tmux session
| File | Purpose |
|---|---|
extension/components/Terminal.tsx | xterm.js terminal + resize |
extension/hooks/useTerminalSessions.ts | Session lifecycle |
extension/background/websocket.ts | WebSocket management |
backend/modules/pty-handler.js | PTY spawning, tmux |
const term = new Terminal({ /* options */ });
const fitAddon = new FitAddon();
term.loadAddon(fitAddon);
term.open(containerRef.current);
fitAddon.fit();
// Debounce resize, sync xterm → PTY
fitAddon.fit();
ws.send(JSON.stringify({ type: 'resize', cols: term.cols, rows: term.rows }));
// Terminal → Backend
term.onData(data => ws.send(JSON.stringify({ type: 'input', data })));
// Backend → Terminal
ws.onmessage = (e) => term.write(JSON.parse(e.data).data);
See references/ for detailed patterns:
xterm-patterns.md - Terminal setup, addons, optionsresize-handling.md - Debouncing, PTY syncwebsocket-io.md - Message protocol, reconnectiontesting-checklist.md - Manual test scenarios