搜索

PythonReactSEOPDF
GitHub Skill

miniapp-edit-testing

Test and debug the Dashboard “Edit with AI” mini-app editor flow (start edit session, build, history, close session) and write automated tests that simulate agent-driven mini-app edits like adding dark mode.

orient-bot☆ 6 仓库 Stars0 仓库 Forks

安装与使用

请根据来源仓库和你的 AI 工具说明安装此技能。先阅读技能文件和依赖要求,再添加到工作流。

查看来源 ↗使用指南

技能说明

Mini-app editor testing (Edit with AI)

Use this when you need to validate that mini-app editing works end-to-end (or via integration tests) from the Dashboard’s “Edit with AI” action, including common changes like adding dark mode.

What to test

  • The Dashboard client calls the mini-app editor endpoints (example: POST /api/apps/:appName/edit) with the user prompt.
  • The server validates inputs (app name format, prompt length) and forwards to the edit-service.
  • The response contains sessionId, commitHash, portalUrl, and buildStatus.

Recommended test strategy (fast + deterministic)

  • Prefer route-level integration tests with a mocked edit service:
    • Mock startEditSession(appName, prompt, createNew) and continueEdit(sessionId, prompt)
    • Assert the route returns the expected JSON shape and HTTP status codes
    • Avoid requiring a real OpenCode server or real git worktrees for CI stability

Useful repo pointers

  • Dashboard frontend API client functions live in packages/dashboard/frontend/src/api.ts (look for editApp, buildApp, getHistory, closeSession).
  • The “Edit with AI” UI lives under packages/dashboard/frontend/src/components/MiniAppEditor/.
  • Mini-app edit routes may be disabled/stubbed in the Dashboard server; if editor endpoints return 404/503, check the Dashboard router wiring in packages/dashboard/src/server/routes.ts.

Debug checklist (when edits fail)

  • If you see 502 from /api/apps/:appName/edit, verify the upstream service is running and the Dashboard route is mounted.
  • If the editor modal errors immediately, check browser console + network response body for { error, message }.

使用示例

查看来源仓库中的使用示例与配置说明。

查看来源 ↗

来源历史

收录时间
2026-01-20
索引更新时间
2026-01-26
Branch
main

收录与同步日期属于本站记录。源码修改历史请查看来源仓库。

GitHub ↗

chat Comments (0)

chat_bubble_outline

No comments yet. Be the first to share your thoughts!