Agent Skills › NangoHQ/nango › ui-visual-debugging

ui-visual-debugging

GitHub

用于Nango前端UI的视觉调试,涵盖Dashboard和Connect UI。支持Playwright截图、Headless交互及Peekaboo辅助,提供本地启动指南与排查流程,确保UI变更后的视觉一致性验证。

.agents/skills/ui-visual-debugging/SKILL.md NangoHQ/nango

Trigger Scenarios

修改或调试Nango前端UI界面 进行视觉回归测试或截图对比 检查浏览器交互或无障碍树结构

Install

npx skills add NangoHQ/nango --skill ui-visual-debugging -g -y
More Options

Non-standard path

npx skills add https://github.com/NangoHQ/nango/tree/master/.agents/skills/ui-visual-debugging -g -y

Use without installing

npx skills use NangoHQ/nango@ui-visual-debugging

指定 Agent (Claude Code)

npx skills add NangoHQ/nango --skill ui-visual-debugging -a claude-code -g -y

安装 repo 全部 skill

npx skills add NangoHQ/nango --all -g -y

预览 repo 内 skill

npx skills add NangoHQ/nango --list

SKILL.md

Frontmatter
{
    "name": "ui-visual-debugging",
    "description": "Use when modifying or visually debugging Nango frontend UI, including packages\/webapp, packages\/connect-ui, browser interactions, screenshots, and visual regressions. Prefer browser-controlled or headless Playwright checks; use Peekaboo only for native macOS, visible-browser, or Accessibility tree inspection."
}

UI Visual Debugging

Core Rules

  • Use a browser-controlled or headless context for routine web UI checks. Do not open tabs in the user's existing browser unless explicitly asked.
  • Save screenshots, traces, and throwaway Playwright scripts under .context/; do not commit them.
  • Use Peekaboo only when the task needs the real macOS desktop, native windows, a visible browser session, or Accessibility tree inspection.
  • For local startup details, use running-and-testing-locally as the source of truth.

Nango Targets

Surface URL Common command
Dashboard webapp http://localhost:3000 npm run dev:watch:web
API server http://localhost:3003 npm run server:dev:watch
Connect UI http://localhost:3009 npm run dev:watch:web or npm run connect-ui:dev:watch

For most frontend work, run:

npm run dev:docker
npm run dev:watch
npm run dev:watch:web

npm run dev:watch and npm run dev:watch:web are long-running commands. Keep them in separate sessions and wait for the initial TypeScript build before browser testing.

Standard Screenshot Workflow

  1. Start or reuse the relevant local services.

  2. Capture a desktop baseline with a browser-controlled tool. If a Playwright MCP/browser tool is available, use it. Otherwise use headless Playwright without modifying repo dependencies:

    npx playwright screenshot --browser=chromium --viewport-size=1512,862 http://localhost:3000 .context/nango-webapp-desktop.png
    

    For Connect UI:

    npx playwright screenshot --browser=chromium --viewport-size=1512,862 http://localhost:3009 .context/nango-connect-desktop.png
    

    If Playwright reports that the Chromium executable is missing, install the browser cache without adding repo dependencies:

    npx playwright install chromium
    
  3. Inspect screenshots with view_image, then edit the smallest relevant files.

  4. Verify after edits:

    npm run ts-build
    

    For webapp-only visual work, cd packages/webapp && npm run build is also useful. For Connect UI, run npm run connect-ui:build.

  5. Capture fresh desktop screenshots and compare them before finishing.

Headless Interaction

For clicks, form filling, authentication flows, or multi-step checks, create a temporary Playwright script in .context/, run it, and save screenshots there.

Use stable selectors and visible text where possible. Avoid relying on the user's browser state.

Common flows:

  • Dashboard sign-in/sign-up at http://localhost:3000.
  • Dashboard pages after authentication: Integrations, Connections, Logs, Metrics, and Environment settings.
  • Connect UI at http://localhost:3009.

When auth is needed, follow the local credentials and verification-log workflow in running-and-testing-locally.

Startup Troubleshooting

If server startup fails with a Knex error like The migration directory is corrupt, the following files are missing, the local database has migrations from another branch (see Migration mismatch in running-and-testing-locally to tell a branch behind master from an unmerged one). Do not reset the user's database without confirmation. For visual validation only, use a temporary database:

docker exec nango-db psql -U nango -d postgres -c "DROP DATABASE IF EXISTS nango_ui_skill_validation WITH (FORCE)"
docker exec nango-db psql -U nango -d postgres -c "CREATE DATABASE nango_ui_skill_validation"
NANGO_DB_NAME=nango_ui_skill_validation npm run dev:watch:web

After stopping the dev server, clean up the temporary database:

docker exec nango-db psql -U nango -d postgres -c "DROP DATABASE IF EXISTS nango_ui_skill_validation WITH (FORCE)"

Peekaboo Workflow

Use Peekaboo only after checking permissions:

peekaboo permissions status

Required:

Screen Recording (Required): Granted
Accessibility (Required): Granted

Prefer targeted captures by window id. Capturing by app name can hang.

peekaboo list windows --app "Google Chrome" --json
peekaboo image --mode window --window-id <window_id> --retina --path .context/nango-window.png --json-output
peekaboo see --app "Google Chrome" --json-output

Avoid peekaboo open http://... --app "Google Chrome" for routine checks because it creates tabs in the user's existing browser.

Review Checklist

  • Baseline screenshot captured before UI edits when layout risk is meaningful.
  • Desktop screenshots captured after edits.
  • Screenshots, traces, and throwaway scripts stay under .context/.
  • Browser automation does not depend on the user's existing browser state.
  • npm run ts-build or the relevant package build was run after frontend changes.

Version History

  • 34dbf0f Current 2026-09-23 00:40

    新增本地开发环境常见问题文档:说明Knex迁移目录损坏报错的处理方法(区分分支落后与未合并情况)及本地功能标志(如NANGO_CLOUD=true)的影响。

  • b75293e 2026-08-28 21:54

Same Skill Collection

.agents/skills/adding-audit-events/SKILL.md
.agents/skills/agent-builder-skill/SKILL.md
.agents/skills/building-and-verifying/SKILL.md
.agents/skills/creating-database-migrations/SKILL.md
.agents/skills/creating-integration-docs/SKILL.md
.agents/skills/creating-skills-skill/SKILL.md
.agents/skills/managing-analytics-events/SKILL.md
.agents/skills/running-and-testing-locally/SKILL.md
.agents/skills/running-tests/SKILL.md

Metadata

Files
0
Version
c934467
Hash
4462ba80
Indexed
2026-08-28 21:54

홈 - 위키
Copyright © 2011-2026 iteam. Current version is 2.155.2. UTC+08:00, 2026-10-20 22:31
浙ICP备14020137号-1