Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
7be97b3
[feat] Add Storybook setup and NodePreview story
snomiao Aug 9, 2025
308b3cd
[feat] Improve Storybook configuration and setup
snomiao Aug 10, 2025
6244caf
[docs] Add comprehensive Storybook documentation
snomiao Aug 10, 2025
2b86f41
[refactor] Remove ts-expect-error comment from Storybook preview
snomiao Aug 11, 2025
88baf87
[bugfix] Fix TypeScript errors in Load3D components and GLTF test
snomiao Aug 12, 2025
799b760
[feat] Add Chromatic GitHub Action for Storybook visual testing
snomiao Aug 12, 2025
1411481
[docs] Add Chromatic documentation to Storybook README
snomiao Aug 12, 2025
1e93567
chore(chromatic.yaml): restrict push branches to main only for better…
snomiao Aug 12, 2025
ac37a5e
[feat] Rebase branch onto main and update Storybook configuration
snomiao Aug 13, 2025
cd787c5
[bugfix] Fix TypeScript errors in SubgraphNode type checking
snomiao Aug 13, 2025
cf4ab95
fix(vite.config.mts): correct path alias for src directory to ensure …
snomiao Aug 13, 2025
ceec83b
[feat] Remove bun.lock as it's now ignored
snomiao Aug 14, 2025
b2a97ee
[bugfix] Fix Storybook builder require() error by converting main.ts …
snomiao Aug 14, 2025
62747ec
chore(storybook): replace main.mjs with main.ts for improved type saf…
snomiao Aug 15, 2025
205f455
[feat] Optimize Chromatic workflow with automated PR status comments
snomiao Aug 15, 2025
a89b9e8
chore(chromatic.yaml): move permissions section inside the chromatic-…
snomiao Aug 15, 2025
74a83fa
[fix] Resolve Vite CJS deprecation warning in Storybook config
snomiao Aug 15, 2025
171d096
fix(chromatic.yaml): change edit-mode from replace to append to prese…
snomiao Aug 15, 2025
c877223
[fix] Replace __dirname with process.cwd() in Storybook config
snomiao Aug 16, 2025
26dbbb1
feature: storybook-setting (#5088)
viva-jinyi Aug 19, 2025
945e8e9
[feat] Add Storybook configuration and settings panel stories
snomiao Aug 16, 2025
de0130d
[bugfix] Fix TypeScript error in Rectangle.ts - remove invalid generi…
snomiao Aug 16, 2025
8167021
[bugfix] Fix TypeScript error in Rectangle subarray method
snomiao Aug 16, 2025
84ce478
Revert "[bugfix] Fix TypeScript error in Rectangle subarray method"
snomiao Aug 16, 2025
4947da3
Revert "[bugfix] Fix TypeScript error in Rectangle.ts - remove invali…
snomiao Aug 16, 2025
f989b05
[auto-fix] Fix TypeScript error in Rectangle.ts - remove generic type…
snomiao Aug 16, 2025
2cc7ae2
[revert] Remove litegraph infrastructure changes unrelated to PR
snomiao Aug 16, 2025
13a6a20
restore rectangle.ts
snomiao Aug 17, 2025
b9e0186
[merge] Merge origin/main
snomiao Aug 19, 2025
2c9a1f1
Merge remote-tracking branch 'origin/main' into sno-storybook--settin…
snomiao Aug 19, 2025
b388bcc
[feat] Improve Storybook configuration and fix store coupling
snomiao Aug 21, 2025
0f06f75
Merge remote-tracking branch 'origin/main' into sno-storybook--settin…
snomiao Aug 22, 2025
257ca95
Merge remote-tracking branch 'origin/main' into sno-storybook--settin…
snomiao Aug 23, 2025
3b95dac
Merge remote-tracking branch 'origin/main' into sno-storybook--settin…
snomiao Aug 26, 2025
24ce3fa
[fix] Add missing @iconify/tailwind dependency for tests
snomiao Aug 26, 2025
2e2e1aa
Merge origin/main into sno-storybook--settings-panel
snomiao Aug 29, 2025
b5e106e
[fix] Replace non-existent toBeOneOf test assertions with standard to…
snomiao Aug 29, 2025
6acb1b2
Merge branch 'main' into sno-storybook--settings-panel
snomiao Sep 7, 2025
3aec59a
Merge branch 'main' into sno-storybook--settings-panel
snomiao Sep 16, 2025
e930184
Merge branch 'main' into sno-storybook--settings-panel
snomiao Sep 30, 2025
a249d20
fix: Update import path for useSettingStore in Storybook preview
snomiao Sep 30, 2025
d08c408
chore: Remove incomplete story files causing import errors
snomiao Sep 30, 2025
dc5ab71
Merge branch 'main' into sno-storybook--settings-panel
snomiao Oct 1, 2025
6b08839
Merge branch 'main' into sno-storybook--settings-panel
snomiao Oct 2, 2025
af20722
Merge origin/main into sno-storybook--settings-panel
snomiao Oct 9, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge origin/main into sno-storybook--settings-panel
  • Loading branch information
snomiao committed Aug 29, 2025
commit 2e2e1aab0c755de18517d55fda107a4b39aacd4c
95 changes: 72 additions & 23 deletions .claude/commands/create-frontend-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,25 @@ echo "Last stable release: $LAST_STABLE"

### Step 4: Analyze Dependency Updates

1. **Check significant dependency updates:**
1. **Use pnpm's built-in dependency analysis:**
```bash
# Get outdated dependencies with pnpm
pnpm outdated --format table > outdated-deps-${NEW_VERSION}.txt

# Check for license compliance
pnpm licenses ls --json > licenses-${NEW_VERSION}.json

# Analyze why specific dependencies exist
echo "Dependency analysis:" > dep-analysis-${NEW_VERSION}.md
MAJOR_DEPS=("vue" "vite" "@vitejs/plugin-vue" "typescript" "pinia")
for dep in "${MAJOR_DEPS[@]}"; do
echo -e "\n## $dep\n\`\`\`" >> dep-analysis-${NEW_VERSION}.md
pnpm why "$dep" >> dep-analysis-${NEW_VERSION}.md || echo "Not found" >> dep-analysis-${NEW_VERSION}.md
echo "\`\`\`" >> dep-analysis-${NEW_VERSION}.md
done
```

2. **Check for significant dependency updates:**
```bash
# Extract all dependency changes for major version bumps
OTHER_DEP_CHANGES=""
Expand Down Expand Up @@ -200,22 +218,48 @@ echo "Last stable release: $LAST_STABLE"
PR data: [contents of prs-${NEW_VERSION}.json]
```

3. **Generate GTM notification:**
3. **Generate GTM notification using this EXACT Slack-compatible format:**
```bash
# Save to gtm-summary-${NEW_VERSION}.md based on analysis
# If GTM-worthy features exist, include them with testing instructions
# If not, note that this is a maintenance/bug fix release

# Check if notification is needed
if grep -q "No marketing-worthy features" gtm-summary-${NEW_VERSION}.md; then
echo "✅ No GTM notification needed for this release"
echo "📄 Summary saved to: gtm-summary-${NEW_VERSION}.md"
else
# Only create file if GTM-worthy features exist:
if [ "$GTM_FEATURES_FOUND" = "true" ]; then
cat > gtm-summary-${NEW_VERSION}.md << 'EOF'
*GTM Summary: ComfyUI Frontend v${NEW_VERSION}*

_Disclaimer: the below is AI-generated_

1. *[Feature Title]* (#[PR_NUMBER])
* *Author:* @[username]
* *Demo:* [Media Link or "No demo available"]
* *Why users should care:* [One compelling sentence]
* *Key Features:*
* [Feature detail 1]
* [Feature detail 2]

2. *[Feature Title]* (#[PR_NUMBER])
* *Author:* @[username]
* *Demo:* [Media Link]
* *Why users should care:* [One compelling sentence]
* *Key Features:*
* [Feature detail 1]
* [Feature detail 2]
EOF
echo "📋 GTM summary saved to: gtm-summary-${NEW_VERSION}.md"
echo "📤 Share this file in #gtm channel to notify the team"
else
echo "✅ No GTM notification needed for this release"
echo "📄 No gtm-summary file created - no marketing-worthy features"
fi
```

**CRITICAL Formatting Requirements:**
- Use single asterisk (*) for emphasis, NOT double (**)
- Use underscore (_) for italics
- Use 4 spaces for indentation (not tabs)
- Convert author names to @username format (e.g., "John Smith" → "@john")
- No section headers (#), no code language specifications
- Always include "Disclaimer: the below is AI-generated"
- Keep content minimal - no testing instructions, additional sections, etc.

### Step 6: Version Preview

**Version Preview:**
Expand All @@ -228,37 +272,42 @@ echo "Last stable release: $LAST_STABLE"

### Step 7: Security and Dependency Audit

1. Run security audit:
1. Run pnpm security audit:
```bash
npm audit --audit-level moderate
pnpm audit --audit-level moderate
pnpm licenses ls --summary
```
2. Check for known vulnerabilities in dependencies
3. Scan for hardcoded secrets or credentials:
3. Run comprehensive dependency health check:
```bash
pnpm doctor
```
4. Scan for hardcoded secrets or credentials:
```bash
git log -p ${BASE_TAG}..HEAD | grep -iE "(password|key|secret|token)" || echo "No sensitive data found"
```
4. Verify no sensitive data in recent commits
5. **SECURITY REVIEW**: Address any critical findings before proceeding?
5. Verify no sensitive data in recent commits
6. **SECURITY REVIEW**: Address any critical findings before proceeding?

### Step 8: Pre-Release Testing

1. Run complete test suite:
```bash
npm run test:unit
npm run test:component
pnpm test:unit
pnpm test:component
```
2. Run type checking:
```bash
npm run typecheck
pnpm typecheck
```
3. Run linting (may have issues with missing packages):
```bash
npm run lint || echo "Lint issues - verify if critical"
pnpm lint || echo "Lint issues - verify if critical"
```
4. Test build process:
```bash
npm run build
npm run build:types
pnpm build
pnpm build:types
```
5. **QUALITY GATE**: All tests and builds passing?

Expand Down Expand Up @@ -488,7 +537,7 @@ echo "Workflow triggered. Waiting for PR creation..."
```bash
# Check npm availability
for i in {1..10}; do
if npm view @comfyorg/comfyui-frontend-types@${NEW_VERSION} version >/dev/null 2>&1; then
if pnpm view @comfyorg/comfyui-frontend-types@${NEW_VERSION} version >/dev/null 2>&1; then
echo "✅ npm package available"
break
fi
Expand Down
6 changes: 3 additions & 3 deletions .claude/commands/create-hotfix-release.md
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ For each commit:
- **CONFIRMATION REQUIRED**: Conflicts resolved correctly?
3. After successful cherry-pick:
- Show the changes: `git show HEAD`
- Run validation: `npm run typecheck && npm run lint`
- Run validation: `pnpm typecheck && pnpm lint`
4. **CONFIRMATION REQUIRED**: Cherry-pick successful and valid?

### Step 6: Create PR to Core Branch
Expand Down Expand Up @@ -197,7 +197,7 @@ For each commit:
5. Track progress:
- GitHub release draft/publication
- PyPI upload
- npm types publication
- pnpm types publication
### Step 12: Post-Release Verification
Expand All @@ -211,7 +211,7 @@ For each commit:
```
3. Verify npm package:
```bash
npm view @comfyorg/[email protected]
pnpm view @comfyorg/[email protected]
```
4. Generate release summary with:
- Version released
Expand Down
158 changes: 158 additions & 0 deletions .claude/commands/setup_repo.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,158 @@
# Setup Repository

Bootstrap the ComfyUI Frontend monorepo with all necessary dependencies and verification checks.

## Overview

This command will:
1. Install pnpm package manager (if not present)
2. Install all project dependencies
3. Verify the project builds successfully
4. Run unit tests to ensure functionality
5. Start development server to verify frontend boots correctly

## Prerequisites Check

First, let's verify the environment:

```bash
# Check Node.js version (should be >= 24)
node --version

# Check if we're in a git repository
git status
```

## Step 1: Install pnpm

```bash
# Check if pnpm is already installed
pnpm --version 2>/dev/null || {
echo "Installing pnpm..."
npm install -g pnpm
}

# Verify pnpm installation
pnpm --version
```

## Step 2: Install Dependencies

```bash
# Install all dependencies using pnpm
echo "Installing project dependencies..."
pnpm install

# Verify node_modules exists and has packages
ls -la node_modules | head -5
```

## Step 3: Verify Build

```bash
# Run TypeScript type checking
echo "Running TypeScript checks..."
pnpm typecheck

# Build the project
echo "Building project..."
pnpm build

# Verify dist folder was created
ls -la dist/
```

## Step 4: Run Unit Tests

```bash
# Run unit tests
echo "Running unit tests..."
pnpm test:unit

# If tests fail, show the output and stop
if [ $? -ne 0 ]; then
echo "❌ Unit tests failed. Please fix failing tests before continuing."
exit 1
fi

echo "✅ Unit tests passed successfully"
```

## Step 5: Verify Development Server

```bash
# Start development server in background
echo "Starting development server..."
pnpm dev &
SERVER_PID=$!

# Wait for server to start (check for port 5173 or similar)
echo "Waiting for server to start..."
sleep 10

# Check if server is running
if curl -s http://localhost:5173 > /dev/null 2>&1; then
echo "✅ Development server started successfully at http://localhost:5173"

# Kill the background server
kill $SERVER_PID
wait $SERVER_PID 2>/dev/null
else
echo "❌ Development server failed to start or is not accessible"
kill $SERVER_PID 2>/dev/null
wait $SERVER_PID 2>/dev/null
exit 1
fi
```

## Step 6: Final Verification

```bash
# Run linting to ensure code quality
echo "Running linter..."
pnpm lint

# Show project status
echo ""
echo "🎉 Repository setup complete!"
echo ""
echo "Available commands:"
echo " pnpm dev - Start development server"
echo " pnpm build - Build for production"
echo " pnpm test:unit - Run unit tests"
echo " pnpm test:component - Run component tests"
echo " pnpm typecheck - Run TypeScript checks"
echo " pnpm lint - Run ESLint"
echo " pnpm format - Format code with Prettier"
echo ""
echo "Next steps:"
echo "1. Run 'pnpm dev' to start developing"
echo "2. Open http://localhost:5173 in your browser"
echo "3. Check README.md for additional setup instructions"
```

## Troubleshooting

If any step fails:

1. **pnpm installation fails**: Try using `curl -fsSL https://get.pnpm.io/install.sh | sh -`
2. **Dependencies fail to install**: Try clearing cache with `pnpm store prune` and retry
3. **Build fails**: Check for TypeScript errors and fix them first
4. **Tests fail**: Review test output and fix failing tests
5. **Dev server fails**: Check if port 5173 is already in use

## Manual Verification Steps

After running the setup, manually verify:

1. **Dependencies installed**: `ls node_modules | wc -l` should show many packages
2. **Build artifacts**: `ls dist/` should show built files
3. **Server accessible**: Open http://localhost:5173 in browser
4. **Hot reload works**: Edit a file and see changes reflect

## Environment Requirements

- Node.js >= 24
- Git repository
- Internet connection for package downloads
- Available ports (typically 5173 for dev server)
2 changes: 1 addition & 1 deletion .claude/commands/verify-visually.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ Follow these steps systematically to verify our changes:

1. **Server Setup**
- Check if the dev server is running on port 5173 using browser navigation or port checking
- If not running, start it with `npm run dev` from the root directory
- If not running, start it with `pnpm dev` from the root directory
- If the server fails to start, provide detailed troubleshooting steps by reading package.json and README.md for accurate instructions
- Wait for the server to be fully ready before proceeding

Expand Down
22 changes: 20 additions & 2 deletions .github/workflows/chromatic.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,11 +21,16 @@ jobs:
with:
fetch-depth: 0 # Required for Chromatic baseline

- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 10

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
cache: 'npm'
cache: 'pnpm'

- name: Get current time
id: current-time
Expand All @@ -51,8 +56,21 @@ jobs:
---
*This comment will be updated when the build completes*

- name: Cache tool outputs
uses: actions/cache@v4
with:
path: |
.cache
storybook-static
tsconfig.tsbuildinfo
key: storybook-cache-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('src/**/*.{ts,vue,js}', '*.config.*', '.storybook/**/*') }}
restore-keys: |
storybook-cache-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}-
storybook-cache-${{ runner.os }}-
storybook-tools-cache-${{ runner.os }}-

- name: Install dependencies
run: npm ci
run: pnpm install --frozen-lockfile

- name: Build Storybook and run Chromatic
id: chromatic
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.