(plan) convert original implement plan to mock api

This commit is contained in:
Story Crater Bot
2026-08-19 09:47:14 -07:00
parent c42040319f
commit 0aef2281bc
65 changed files with 307 additions and 627 deletions
+3 -2
View File
@@ -1,8 +1,9 @@
# 4.8 — Frontend: wire InteractiveTerminal to /api/exec (GREEN)
# 4.8 — Frontend: wire terminal page to /api/exec (GREEN)
Phase: 4 — Terminal (Surface C)
Stage: GREEN
Depends on: [4.4](4.4-api-exec.md)
- [ ] Frontend: reuse [components/InteractiveTerminal.tsx](../components/InteractiveTerminal.tsx), wire to `/api/exec`
- [ ] [app/cluster/terminal/page.tsx](../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](../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