feat(KB-057): add interactive terminal to dashboard

- Add backend terminal API with SSE streaming for real-time output
- Create useTerminal hook with command history and navigation
- Refactor TerminalModal into interactive shell component
- Update App and Header for standalone terminal button
- Add CSS styles for terminal UI (prompts, output, spinner, welcome screen)
- Update tests for new terminal behavior
This commit is contained in:
gsxdsm
2026-03-29 21:09:57 -07:00
parent 5b575923b5
commit bfd3343be4
11 changed files with 763 additions and 1599 deletions

View File

@@ -2,14 +2,16 @@
"@dustinbyrne/kb": minor
---
Add interactive terminal to dashboard
Add interactive terminal to dashboard for executing shell commands directly in the project directory
The dashboard now includes a fully interactive shell terminal where users can execute commands directly in the project's working directory. Features include:
The dashboard now includes a fully functional shell terminal accessible via the terminal icon in the header. Features include:
- Real-time command execution with output streaming via SSE
- Real-time command output streaming via Server-Sent Events (SSE)
- Command history with Up/Down arrow navigation
- Support for common commands: git, npm/pnpm/yarn, ls, cat, cd, clear, etc.
- Command validation to block dangerous operations (rm -rf /, etc.)
- Process kill support (Ctrl+C)
- Clear screen (Ctrl+L)
- Terminal accessible regardless of task state
- Keyboard shortcuts: Ctrl+C to kill process, Ctrl+L to clear screen
- Security validation with allowlist/blocklist for commands
- 30-second timeout for commands with automatic cleanup
- Monospace font styling with color-coded output (stdout/stderr/exit codes)
- Mobile-responsive design with safe area insets
The terminal is always available regardless of task state, making it convenient for quick git operations, package management, or debugging without leaving the dashboard.