Files
riotpiao.com/tasks/4.8-frontend-terminal-wiring.md
T

850 B

4.8 — Frontend: wire terminal page to /api/exec (GREEN)

Phase: 4 — Terminal (Surface C) Stage: GREEN

Depends on: 4.4

  • app/cluster/terminal/page.tsx currently has its own inline run() command parser — replace it with a fetch('/api/exec', { method: 'POST', body: JSON.stringify({ cmd }) }) call so the terminal actually round-trips through the mock API instead of simulating client-side
  • components/InteractiveTerminal.tsx (the floating Cmd+K terminal) is a separate, older component with its own hardcoded commands map (kubectl, terraform, argocd, kafka — all backend/infra flavored) — decide whether to retire it, or reduce it to the same closed command set as the Surface C terminal and wire it to /api/exec too