testing-frontend
How to run and visually test the cool-ai-harness React/Vite frontend on this Windows box — dev server, backend-down error-state testing, mobile viewport emulation, CDP screenshots.
- License 许可
- MIT
- 最近更新
- 2026-11-03
- Stars
- ★ 0
- Forks
- 0
01 前言 Front Matter
- name
- testing-frontend
- description
- How to run and visually test the cool-ai-harness React/Vite frontend on this Windows box — dev server, backend-down error-state testing, mobile viewport emulation, CDP screenshots.
03 SKILL.md 正文
Testing the cool-ai-harness frontend
Dev server
- Repo:
C:\Users\Administrator\repos\cool-ai-harness, frontend infrontend/. - Windows: use PowerShell (bash env is broken). npm must be invoked as
npm.cmd, e.g.npm.cmd run devinfrontend/. Node/npm live on PATH viaC:\hostedtoolcache\node\20.19.0\x64. - Vite binds
127.0.0.1:5173explicitly (seevite.config.ts— IPv6-only default fails curl on this Windows setup) and proxies/api→http://127.0.0.1:8000(cool serve). - To test error/empty states, just run the dev server with the Rust backend down — every React Query call fails fast (client
retry: 1) and each page showsQueryErrorState.
Browser / CDP
- Chrome runs with remote debugging at
http://localhost:29229(/jsonlists page targets;webSocketDebuggerUrlper page). - File-backed screenshots: connect to the page target via
System.Net.WebSockets.ClientWebSocketin PowerShell and sendPage.captureScreenshot(a working script pattern is atC:\Users\Administrator\ui-audit\cdp-shot.ps1if still present — recreate from that recipe otherwise).
Mobile viewport (<768px flips to mobile layout)
- Chrome's minimum window width on this box is ~516px — resize the window via P/Invoke
MoveWindowto ~420px; it clamps to ~516 but that's still under themax-width: 767pxbreakpoint, so the real mobile layout activates (MobileAppBar on non-chat routes, hamburger → MobileDrawer). - Alternative: CDP
Emulation.setDeviceMetricsOverridefor a true 390px viewport. - Maximize/restore via
ShowWindowAsync(hwnd, 3)— no wmctrl/xdotool on Windows.
App facts useful for audits
- Routes in
src/App.tsx;/mobile-previewrenders outsideAppLayout(no sidebar). Wildcard*redirects to/. /settings?setup=providerauto-opens the provider create dialog; closing it navigates to/.- Dark mode:
.darkclass is toggled only bylib/telegramWebApp.ts(TelegramcolorScheme) — there is no theme toggle in the UI by design. - The Telegram SDK script loads unconditionally; in a plain browser its WebView shim still fires
postEventconsole logs (web_app_ready,web_app_request_theme, …) on every navigation — expected noise, not a bug.
Console noise vs real errors
- Expected noise:
[vite] connecting/connected, React DevTools info,Telegram.WebView postEvent …logs, and failed/apiproxy fetches (net::ERR_CONNECTION_REFUSED) when backend is down. - Real problems to look for: React render errors, key warnings, unhandled rejections.
Devin Secrets Needed
- none
04 同仓库更多 Skills
translate
Translate text between languages while preserving meaning, tone, and formatting
summarize-document
Summarize documents, articles, or long text into concise structured summaries
skill-creation
Create new skills based on user requests - generates properly formatted SKILL.md files with metadata and instructions
long-running-task
Drive a long-running task through workspace progress files (.cool/task/progress.md + features.json) that survive context compaction and new runs
deep-research
Conduct thorough multi-source research on a topic, synthesizing findings into a comprehensive report
code-task
Execute a structured coding task with best practices - read, plan, implement, test, commit