Skip to content

Commit 6a18a94

Browse files
authored
Merge branch 'main' into main
2 parents 372b7f1 + e789227 commit 6a18a94

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+2228
-883
lines changed

.github/ISSUE_TEMPLATE/bug-report.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
name: Bug Report
22
description: 'Report something that is not working correctly'
3-
title: '[Bug]: '
3+
title: ''
44
labels: ['Potential Bug']
55
type: Bug
66

.github/ISSUE_TEMPLATE/feature-request.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
name: Feature Request
22
description: Report a problem or limitation you're experiencing
3-
title: '[Feature]: '
4-
labels: ['enhancement']
3+
title: ''
4+
labels: []
55
type: Feature
66

77
body:

.github/workflows/test-ui.yaml

Lines changed: 32 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -162,6 +162,9 @@ jobs:
162162
run: npx playwright install chromium --with-deps
163163
working-directory: ComfyUI_frontend
164164

165+
- name: Install Wrangler
166+
run: npm install -g wrangler
167+
165168
- name: Run Playwright tests (${{ matrix.browser }})
166169
id: playwright
167170
run: npx playwright test --project=${{ matrix.browser }} --reporter=html
@@ -177,11 +180,35 @@ jobs:
177180
- name: Deploy to Cloudflare Pages (${{ matrix.browser }})
178181
id: cloudflare-deploy
179182
if: always()
180-
uses: cloudflare/wrangler-action@v3
181-
with:
182-
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
183-
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
184-
command: pages deploy ComfyUI_frontend/playwright-report --project-name=${{ steps.project-name.outputs.name }} --branch=${{ steps.project-name.outputs.branch }}
183+
run: |
184+
# Retry logic for wrangler deploy (3 attempts)
185+
RETRY_COUNT=0
186+
MAX_RETRIES=3
187+
SUCCESS=false
188+
189+
while [ $RETRY_COUNT -lt $MAX_RETRIES ] && [ $SUCCESS = false ]; do
190+
RETRY_COUNT=$((RETRY_COUNT + 1))
191+
echo "Deployment attempt $RETRY_COUNT of $MAX_RETRIES..."
192+
193+
if npx wrangler pages deploy ComfyUI_frontend/playwright-report --project-name=${{ steps.project-name.outputs.name }} --branch=${{ steps.project-name.outputs.branch }}; then
194+
SUCCESS=true
195+
echo "Deployment successful on attempt $RETRY_COUNT"
196+
else
197+
echo "Deployment failed on attempt $RETRY_COUNT"
198+
if [ $RETRY_COUNT -lt $MAX_RETRIES ]; then
199+
echo "Retrying in 10 seconds..."
200+
sleep 10
201+
fi
202+
fi
203+
done
204+
205+
if [ $SUCCESS = false ]; then
206+
echo "All deployment attempts failed"
207+
exit 1
208+
fi
209+
env:
210+
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
211+
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
185212

186213
- name: Save deployment info for summary
187214
if: always()

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,15 +13,17 @@ bun.lockb
1313
pnpm-lock.yaml
1414
yarn.lock
1515

16-
# ESLint cache
16+
# Cache files
1717
.eslintcache
18+
.prettiercache
1819

1920
node_modules
2021
dist
2122
dist-ssr
2223
*.local
2324
# Claude configuration
2425
.claude/*.local.json
26+
.claude/settings.json
2527

2628
# Editor directories and files
2729
.vscode/*

.prettierignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
src/types/comfyRegistryTypes.ts
2+
src/types/generatedManagerTypes.ts

.storybook/README.md

Lines changed: 40 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,44 @@ export const WithVariant: Story = {
9393

9494
## Development Tips
9595

96+
## ComfyUI Storybook Guidelines
97+
98+
### Scope – When to Create Stories
99+
- **PrimeVue components**:
100+
No need to create stories. Just refer to the official PrimeVue documentation.
101+
- **Custom shared components (design system components)**:
102+
Always create stories. These components are built in collaboration with designers, and Storybook serves as both documentation and a communication tool.
103+
- **Container components (logic-heavy)**:
104+
Do not create stories. Only the underlying pure UI components should be included in Storybook.
105+
106+
### Maintenance Philosophy
107+
- Stories are lightweight and generally stable.
108+
Once created, they rarely need updates unless:
109+
- The design changes
110+
- New props (e.g. size, color variants) are introduced
111+
- For existing usage patterns, simply copy real code examples into Storybook to create stories.
112+
113+
### File Placement
114+
- Keep `*.stories.ts` files at the **same level as the component** (similar to test files).
115+
- This makes it easier to check usage examples without navigating to another directory.
116+
117+
### Developer/Designer Workflow
118+
- **UI vs Container**: Separate pure UI components from container components.
119+
Only UI components should live in Storybook.
120+
- **Communication Tool**: Storybook is not just about code quality—it enables designers and developers to see:
121+
- Which props exist
122+
- What cases are covered
123+
- How variants (e.g. size, colors) look in isolation
124+
- **Example**:
125+
`PackActionButton.vue` wraps a PrimeVue button with additional logic.
126+
→ Only create a story for the base UI button, not for the wrapper.
127+
128+
### Suggested Workflow
129+
1. Use PrimeVue docs for standard components
130+
2. Use Storybook for **shared/custom components** that define our design system
131+
3. Keep story files alongside components
132+
4. When in doubt, focus on components reused across the app or those that need to be showcased to designers
133+
96134
### Best Practices
97135

98136
1. **Keep Stories Simple**: Each story should demonstrate one specific use case
@@ -135,6 +173,7 @@ export const WithLongText: Story = {
135173
- **`main.ts`**: Core Storybook configuration and Vite integration
136174
- **`preview.ts`**: Global decorators, parameters, and Vue app setup
137175
- **`manager.ts`**: Storybook UI customization (if needed)
176+
- **`preview-head.html`**: Injects custom HTML into the `<head>` of every Storybook iframe (used for global styles, fonts, or fixes for iframe-specific issues)
138177

139178
## Chromatic Visual Testing
140179

@@ -170,4 +209,4 @@ This Storybook setup includes:
170209
- PrimeVue component library integration
171210
- Proper alias resolution for `@/` imports
172211

173-
For component-specific examples, see the NodePreview stories in `src/components/node/`.
212+
For component-specific examples, see the NodePreview stories in `src/components/node/`.

browser_tests/README.md

Lines changed: 8 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -392,16 +392,6 @@ Option 2 - Generate local baselines for comparison:
392392
npx playwright test --update-snapshots
393393
```
394394

395-
### Getting Test Artifacts from GitHub Actions
396-
397-
When tests fail in CI, you can download screenshots and traces:
398-
399-
1. Go to the failed workflow run in GitHub Actions
400-
2. Scroll to "Artifacts" section at the bottom
401-
3. Download `playwright-report` or `test-results`
402-
4. Extract and open the HTML report locally
403-
5. View actual vs expected screenshots and execution traces
404-
405395
### Creating New Screenshot Baselines
406396

407397
For PRs from `Comfy-Org/ComfyUI_frontend` branches:
@@ -412,17 +402,19 @@ For PRs from `Comfy-Org/ComfyUI_frontend` branches:
412402

413403
> **Note:** Fork PRs cannot auto-commit screenshots. A maintainer will need to commit the screenshots manually for you (don't worry, they'll do it).
414404
415-
## CI/CD Integration
405+
## Viewing Test Reports
416406

417407
### Automated Test Deployment
418408

419-
The project automatically deploys Playwright test reports to Cloudflare Pages for every PR and push to main branches. This provides:
409+
The project automatically deploys Playwright test reports to Cloudflare Pages for every PR and push to main branches.
410+
411+
### Accessing Test Reports
420412

421-
- **Live test reports** with interactive HTML views
422-
- **Cross-browser testing** across chromium, mobile-chrome, and different viewport sizes
423-
- **Real-time PR comments** with test status and links to detailed reports
413+
- **From PR comments**: Click the "View Report" links for each browser
414+
- **Direct URLs**: Reports are available at `https://[branch].comfyui-playwright-[browser].pages.dev` (branch-specific deployments)
415+
- **From GitHub Actions**: Download artifacts from failed runs
424416

425-
#### How it works:
417+
### How It Works
426418

427419
1. **Test execution**: All browser tests run in parallel across multiple browsers
428420
2. **Report generation**: HTML reports are generated for each browser configuration
@@ -437,21 +429,6 @@ The project automatically deploys Playwright test reports to Cloudflare Pages fo
437429
- Direct links to interactive test reports
438430
- Real-time progress updates as tests complete
439431

440-
#### Accessing test reports:
441-
442-
- **From PR comments**: Click the "View Report" links for each browser
443-
- **From GitHub Actions**: Download artifacts from failed runs
444-
- **Direct URLs**: Reports are available at `https://[branch].comfyui-playwright-[browser].pages.dev` (branch-specific deployments)
445-
446-
#### Report features:
447-
448-
- **Interactive HTML reports** with test results, screenshots, and traces
449-
- **Detailed failure analysis** with before/after screenshots
450-
- **Test execution videos** for failed tests
451-
- **Network logs** and console output for debugging
452-
453-
This integration ensures that test results are easily accessible to reviewers and maintainers, making it simple to verify that changes don't break existing functionality across different browsers and viewport sizes.
454-
455432
## Resources
456433

457434
- [Playwright UI Mode](https://playwright.dev/docs/test-ui-mode) - Interactive test debugging

package.json

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,10 @@
1414
"build:types": "vite build --config vite.types.config.mts && node scripts/prepare-types.js",
1515
"zipdist": "node scripts/zipdist.js",
1616
"typecheck": "vue-tsc --noEmit",
17-
"format": "prettier --write './**/*.{js,ts,tsx,vue,mts}'",
18-
"format:check": "prettier --check './**/*.{js,ts,tsx,vue,mts}'",
17+
"format": "prettier --write './**/*.{js,ts,tsx,vue,mts}' --cache",
18+
"format:check": "prettier --check './**/*.{js,ts,tsx,vue,mts}' --cache",
19+
"format:no-cache": "prettier --write './**/*.{js,ts,tsx,vue,mts}'",
20+
"format:check:no-cache": "prettier --check './**/*.{js,ts,tsx,vue,mts}'",
1921
"test:browser": "npx playwright test",
2022
"test:unit": "vitest run tests-ui/tests",
2123
"test:component": "vitest run src/components/",
@@ -25,7 +27,8 @@
2527
"lint:fix": "eslint src --cache --fix",
2628
"lint:no-cache": "eslint src",
2729
"lint:fix:no-cache": "eslint src --fix",
28-
"knip": "knip",
30+
"knip": "knip --cache",
31+
"knip:no-cache": "knip",
2932
"locale": "lobe-i18n locale",
3033
"collect-i18n": "playwright test --config=playwright.i18n.config.ts",
3134
"json-schema": "tsx scripts/generate-json-schema.ts",
Lines changed: 2 additions & 6 deletions
Loading

src/components/graph/SelectionToolbox.vue

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@
1212
<ColorPickerButton />
1313
<BypassButton />
1414
<PinButton />
15-
<EditModelButton />
1615
<Load3DViewerButton />
1716
<MaskEditorButton />
1817
<ConvertToSubgraphButton />
@@ -35,7 +34,6 @@ import BypassButton from '@/components/graph/selectionToolbox/BypassButton.vue'
3534
import ColorPickerButton from '@/components/graph/selectionToolbox/ColorPickerButton.vue'
3635
import ConvertToSubgraphButton from '@/components/graph/selectionToolbox/ConvertToSubgraphButton.vue'
3736
import DeleteButton from '@/components/graph/selectionToolbox/DeleteButton.vue'
38-
import EditModelButton from '@/components/graph/selectionToolbox/EditModelButton.vue'
3937
import ExecuteButton from '@/components/graph/selectionToolbox/ExecuteButton.vue'
4038
import ExtensionCommandButton from '@/components/graph/selectionToolbox/ExtensionCommandButton.vue'
4139
import HelpButton from '@/components/graph/selectionToolbox/HelpButton.vue'

0 commit comments

Comments
 (0)