From 9e28ec8a757baed81cc84a675b6a22c39ffaca10 Mon Sep 17 00:00:00 2001 From: "devin-ai-integration[bot]" <158243242+devin-ai-integration[bot]@users.noreply.github.com> Date: Thu, 6 Aug 2026 19:58:13 +0000 Subject: [PATCH] Add testing-tck-app skill Co-authored-by: Raghuram1234 --- .agents/skills/testing-tck-app/SKILL.md | 60 +++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 .agents/skills/testing-tck-app/SKILL.md diff --git a/.agents/skills/testing-tck-app/SKILL.md b/.agents/skills/testing-tck-app/SKILL.md new file mode 100644 index 0000000..9b0db56 --- /dev/null +++ b/.agents/skills/testing-tck-app/SKILL.md @@ -0,0 +1,60 @@ +--- +name: testing-tck-app +description: How to build, run and end-to-end test the T.C.K TypeScript SPA + Hono server (landing page, PTY terminal, AI chat proxy, settings modal, theme toggle). Use when testing or manually verifying anything in this repo's `src/ui` or `src/server` code. +--- + +# Testing T.C.K locally + +Note: `CLAUDE.md` / `AGENTS.md` still describe the older Rust/Dioxus (`cargo`, `trunk`) stack. The +runnable app is now the root TypeScript project (`index.html` → `src/ui/main.ts`, server +`src/server/main.ts`). Ignore the Rust instructions unless working under `crates/`. + +## Run it + +```bash +npm install # node 20 works; engine warnings are safe to ignore +npm run build && npm start # Hono server on http://localhost:3000 serving dist/ +# or: npm run dev:server (tsx watch, :3000) + npm run dev (Vite :8080, proxies /api and /ws) +``` + +Gotchas: +- Port 3000 is often already occupied by a previous run: `ss -ltnp | grep 3000` then kill the PID. +- Prefer the built `npm start` path for testing — it exercises the same static bundle users get. Remember to re-run `npm run build` after UI edits, otherwise you are testing a stale `dist/`. +- Useful smoke checks before opening a browser: + `curl -s -o /dev/null -w '%{http_code}' localhost:3000/`, + `curl -s -XPOST localhost:3000/api/instances -H 'Content-Type: application/json' -d '{"kind":"terminal","label":"Terminal"}'`, + `curl -s -XPOST localhost:3000/api/ai/generate -H 'Content-Type: application/json' -d '{"provider":"claude","model":"claude-sonnet-4-5","prompt":"hi"}'`. + +## UI paths (no login/auth of any kind) + +- `/` shows the landing page (SPA routes on `location.hash`); the "Launch T.C.K" CTA and the nav "Launch App →" link both go to `#app`. +- `#app` renders titlebar + sidebar + editor + terminal + AI chat. +- Theme: the small ☀/☾ icon button immediately left of "Settings" in the titlebar toggles `documentElement.dataset.theme`. Editor and terminal panes are hardcoded dark hexes in `index.html`, so they intentionally stay dark in light mode — do not report that as a bug. +- Settings: "Settings" button in the titlebar. Fields: "Claude API key", "Ollama host". Save persists to `localStorage['tck.settings']`; Cancel / X / backdrop-click close without saving. Theme choice is NOT persisted. +- Terminal: header should read "Terminal — connected"; type into the `$` input and press Enter. Output is appended verbatim, so raw ANSI/OSC-633 escape sequences show up as literal text — a known cosmetic issue, and it may reappear after refactors. +- Chat: textarea + Send, Enter sends (Shift+Enter newlines). Bubbles are built with `textContent`, so HTML/`