mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 06:20:11 +00:00
Three integrated systems for AI-assisted browser test creation:
1. comfy-test CLI (tools/test-recorder/)
- Interactive 7-step recording flow for QA testers and non-developers
- Environment checks with platform-specific install guidance
- Codegen-to-convention transform engine
- PR creation via gh CLI or manual GitHub web UI instructions
- Commands: record, transform, check, list
2. Playwright AI agents (.claude/agents/)
- Planner, generator, and healer agents patched with ComfyUI context
- Regeneration scripts for Playwright updates (scripts/update-playwright-agents.sh)
- MCP server config (.mcp.json) for agent browser interaction
- Seed test and specs directory for agent-generated tests
3. Codegen transform skill (.claude/skills/codegen-transform/)
- Transform rules: @playwright/test → comfyPageFixture, page → comfyPage,
remove goto, canvas locators, waitForTimeout → nextFrame
- Structural transforms: wrap in describe with tags, add afterEach cleanup
- Fixture API reference and before/after examples
92 lines
2.8 KiB
TypeScript
92 lines
2.8 KiB
TypeScript
import type { KnipConfig } from 'knip'
|
|
|
|
const config: KnipConfig = {
|
|
workspaces: {
|
|
'.': {
|
|
entry: [
|
|
'{build,scripts}/**/*.{js,ts}',
|
|
'src/assets/css/style.css',
|
|
'src/main.ts',
|
|
'src/scripts/ui/menu/index.ts',
|
|
'src/types/index.ts',
|
|
'src/storybook/mocks/**/*.ts'
|
|
],
|
|
project: ['**/*.{js,ts,vue}', '*.{js,ts,mts}', '!.claude/**']
|
|
},
|
|
'apps/desktop-ui': {
|
|
entry: ['src/main.ts', 'src/i18n.ts'],
|
|
project: ['src/**/*.{js,ts,vue}']
|
|
},
|
|
'packages/tailwind-utils': {
|
|
project: ['src/**/*.{js,ts}']
|
|
},
|
|
'packages/shared-frontend-utils': {
|
|
project: ['src/**/*.{js,ts}'],
|
|
entry: ['src/formatUtil.ts', 'src/networkUtil.ts']
|
|
},
|
|
'packages/registry-types': {
|
|
project: ['src/**/*.{js,ts}']
|
|
},
|
|
'tools/test-recorder': {
|
|
project: ['src/**/*.ts']
|
|
}
|
|
},
|
|
ignoreBinaries: ['python3', 'gh'],
|
|
ignoreDependencies: [
|
|
// Weird importmap things
|
|
'@iconify-json/lucide',
|
|
'@iconify/json',
|
|
'@primeuix/forms',
|
|
'@primeuix/styled',
|
|
'@primeuix/utils',
|
|
'@primevue/icons',
|
|
// Used by lucideStrokePlugin.js (CSS @plugin)
|
|
'@iconify/utils'
|
|
],
|
|
ignore: [
|
|
// Auto generated manager types
|
|
'src/workbench/extensions/manager/types/generatedManagerTypes.ts',
|
|
'packages/registry-types/src/comfyRegistryTypes.ts',
|
|
// Used by a custom node (that should move off of this)
|
|
'src/scripts/ui/components/splitButton.ts',
|
|
// Used by stacked PR (feat/glsl-live-preview)
|
|
'src/renderer/glsl/useGLSLRenderer.ts',
|
|
// Workflow files contain license names that knip misinterprets as binaries
|
|
'.github/workflows/ci-oss-assets-validation.yaml',
|
|
// Pending integration in stacked PR
|
|
'src/components/sidebar/tabs/nodeLibrary/CustomNodesPanel.vue',
|
|
// Agent review check config, not part of the build
|
|
'.agents/checks/eslint.strict.config.js',
|
|
// Loaded via @plugin directive in CSS, not detected by knip
|
|
'packages/design-system/src/css/lucideStrokePlugin.js'
|
|
],
|
|
compilers: {
|
|
// https://github.com/webpro-nl/knip/issues/1008#issuecomment-3207756199
|
|
css: (text: string) =>
|
|
[...text.replaceAll('plugin', 'import').matchAll(/(?<=@)import[^;]+/g)]
|
|
.map((match) => match[0].replace(/url\(['"]?([^'"()]+)['"]?\)/, '$1'))
|
|
.join('\n')
|
|
},
|
|
vite: {
|
|
config: ['vite?(.*).config.mts']
|
|
},
|
|
vitest: {
|
|
config: ['vitest?(.*).config.ts'],
|
|
entry: [
|
|
'**/*.{bench,test,test-d,spec}.?(c|m)[jt]s?(x)',
|
|
'**/__mocks__/**/*.[jt]s?(x)'
|
|
]
|
|
},
|
|
playwright: {
|
|
config: ['playwright?(.*).config.ts'],
|
|
entry: ['**/*.@(spec|test).?(c|m)[jt]s?(x)', 'browser_tests/**/*.ts']
|
|
},
|
|
tags: [
|
|
'-knipIgnoreUnusedButUsedByCustomNodes',
|
|
'-knipIgnoreUnusedButUsedByVueNodesBranch',
|
|
'-knipIgnoreUsedByStackedPR'
|
|
]
|
|
}
|
|
|
|
export default config
|