Task: Terminal Mode Interface
Description
Build a full-screen terminal-style interface overlay that reuses existing request/response logic but presents it with CLI aesthetics. Include syntax highlighting, command history navigation, and VI/Emacs keybindings (configurable).
Acceptance Criteria
Technical Details
Implementation Approach
- Install syntax highlighter (
prism-react-renderer or shiki)
- Create
src/components/TerminalMode/ directory:
TerminalMode/
├── index.tsx # Main terminal component (lazy)
├── TerminalInput.tsx # Command input with autocomplete
├── TerminalOutput.tsx # Response display
├── CommandParser.tsx # Parse CLI commands to API requests
└── useTerminalHistory.tsx # Arrow key navigation
- Implement command syntax:
GET https://api.example.com/users
POST https://api.example.com/users --data '{"name":"John"}'
PUT https://api.example.com/users/1 --data '{"name":"Jane"}'
DELETE https://api.example.com/users/1
- Reuse existing
apiService.ts for actual requests
- Add URL state management (
?terminal=true)
- Lazy load with React.lazy() to reduce initial bundle
Key Considerations
- Terminal should feel authentic (green text on dark bg, monospace font)
- Command history stored in localStorage (same as GUI history)
- Syntax errors shown in terminal style
- Response streaming animation (character by character)
- Performance: lazy load the entire terminal component
- Cursor blink animation
- Support ANSI color codes in responses (if applicable)
Files Affected
package.json (add prism-react-renderer or shiki)
src/components/TerminalMode/ (new directory)
src/app/[locale]/page.tsx (add terminal toggle)
src/services/apiService.ts (potentially extend for CLI)
messages/en.json (add terminal prompts)
messages/pt.json (add terminal prompts)
Dependencies
Effort Estimate
- Size: L (Large)
- Hours: 20-24 hours
- Parallel: false (depends on Tasks 001, 002, 003)
Definition of Done
Task: Terminal Mode Interface
Description
Build a full-screen terminal-style interface overlay that reuses existing request/response logic but presents it with CLI aesthetics. Include syntax highlighting, command history navigation, and VI/Emacs keybindings (configurable).
Acceptance Criteria
?terminal=true)Technical Details
Implementation Approach
prism-react-rendererorshiki)src/components/TerminalMode/directory:apiService.tsfor actual requests?terminal=true)Key Considerations
Files Affected
package.json(add prism-react-renderer or shiki)src/components/TerminalMode/(new directory)src/app/[locale]/page.tsx(add terminal toggle)src/services/apiService.ts(potentially extend for CLI)messages/en.json(add terminal prompts)messages/pt.json(add terminal prompts)Dependencies
Effort Estimate
Definition of Done