Skip to content

Commit c2e53ba

Browse files
authored
Merge branch 'main' into 5207-test-failures-are-unrelated-to-this-pr-still-updat
2 parents 04bc5c4 + b5d3cfd commit c2e53ba

Some content is hidden

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

54 files changed

+14928
-20065
lines changed

.claude/commands/create-frontend-release.md

Lines changed: 72 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,25 @@ echo "Last stable release: $LAST_STABLE"
128128

129129
### Step 4: Analyze Dependency Updates
130130

131-
1. **Check significant dependency updates:**
131+
1. **Use pnpm's built-in dependency analysis:**
132+
```bash
133+
# Get outdated dependencies with pnpm
134+
pnpm outdated --format table > outdated-deps-${NEW_VERSION}.txt
135+
136+
# Check for license compliance
137+
pnpm licenses ls --json > licenses-${NEW_VERSION}.json
138+
139+
# Analyze why specific dependencies exist
140+
echo "Dependency analysis:" > dep-analysis-${NEW_VERSION}.md
141+
MAJOR_DEPS=("vue" "vite" "@vitejs/plugin-vue" "typescript" "pinia")
142+
for dep in "${MAJOR_DEPS[@]}"; do
143+
echo -e "\n## $dep\n\`\`\`" >> dep-analysis-${NEW_VERSION}.md
144+
pnpm why "$dep" >> dep-analysis-${NEW_VERSION}.md || echo "Not found" >> dep-analysis-${NEW_VERSION}.md
145+
echo "\`\`\`" >> dep-analysis-${NEW_VERSION}.md
146+
done
147+
```
148+
149+
2. **Check for significant dependency updates:**
132150
```bash
133151
# Extract all dependency changes for major version bumps
134152
OTHER_DEP_CHANGES=""
@@ -200,22 +218,48 @@ echo "Last stable release: $LAST_STABLE"
200218
PR data: [contents of prs-${NEW_VERSION}.json]
201219
```
202220

203-
3. **Generate GTM notification:**
221+
3. **Generate GTM notification using this EXACT Slack-compatible format:**
204222
```bash
205-
# Save to gtm-summary-${NEW_VERSION}.md based on analysis
206-
# If GTM-worthy features exist, include them with testing instructions
207-
# If not, note that this is a maintenance/bug fix release
208-
209-
# Check if notification is needed
210-
if grep -q "No marketing-worthy features" gtm-summary-${NEW_VERSION}.md; then
211-
echo "✅ No GTM notification needed for this release"
212-
echo "📄 Summary saved to: gtm-summary-${NEW_VERSION}.md"
213-
else
223+
# Only create file if GTM-worthy features exist:
224+
if [ "$GTM_FEATURES_FOUND" = "true" ]; then
225+
cat > gtm-summary-${NEW_VERSION}.md << 'EOF'
226+
*GTM Summary: ComfyUI Frontend v${NEW_VERSION}*
227+
228+
_Disclaimer: the below is AI-generated_
229+
230+
1. *[Feature Title]* (#[PR_NUMBER])
231+
* *Author:* @[username]
232+
* *Demo:* [Media Link or "No demo available"]
233+
* *Why users should care:* [One compelling sentence]
234+
* *Key Features:*
235+
* [Feature detail 1]
236+
* [Feature detail 2]
237+
238+
2. *[Feature Title]* (#[PR_NUMBER])
239+
* *Author:* @[username]
240+
* *Demo:* [Media Link]
241+
* *Why users should care:* [One compelling sentence]
242+
* *Key Features:*
243+
* [Feature detail 1]
244+
* [Feature detail 2]
245+
EOF
214246
echo "📋 GTM summary saved to: gtm-summary-${NEW_VERSION}.md"
215247
echo "📤 Share this file in #gtm channel to notify the team"
248+
else
249+
echo "✅ No GTM notification needed for this release"
250+
echo "📄 No gtm-summary file created - no marketing-worthy features"
216251
fi
217252
```
218253
254+
**CRITICAL Formatting Requirements:**
255+
- Use single asterisk (*) for emphasis, NOT double (**)
256+
- Use underscore (_) for italics
257+
- Use 4 spaces for indentation (not tabs)
258+
- Convert author names to @username format (e.g., "John Smith" → "@john")
259+
- No section headers (#), no code language specifications
260+
- Always include "Disclaimer: the below is AI-generated"
261+
- Keep content minimal - no testing instructions, additional sections, etc.
262+
219263
### Step 6: Version Preview
220264
221265
**Version Preview:**
@@ -228,37 +272,42 @@ echo "Last stable release: $LAST_STABLE"
228272
229273
### Step 7: Security and Dependency Audit
230274
231-
1. Run security audit:
275+
1. Run pnpm security audit:
232276
```bash
233-
npm audit --audit-level moderate
277+
pnpm audit --audit-level moderate
278+
pnpm licenses ls --summary
234279
```
235280
2. Check for known vulnerabilities in dependencies
236-
3. Scan for hardcoded secrets or credentials:
281+
3. Run comprehensive dependency health check:
282+
```bash
283+
pnpm doctor
284+
```
285+
4. Scan for hardcoded secrets or credentials:
237286
```bash
238287
git log -p ${BASE_TAG}..HEAD | grep -iE "(password|key|secret|token)" || echo "No sensitive data found"
239288
```
240-
4. Verify no sensitive data in recent commits
241-
5. **SECURITY REVIEW**: Address any critical findings before proceeding?
289+
5. Verify no sensitive data in recent commits
290+
6. **SECURITY REVIEW**: Address any critical findings before proceeding?
242291
243292
### Step 8: Pre-Release Testing
244293
245294
1. Run complete test suite:
246295
```bash
247-
npm run test:unit
248-
npm run test:component
296+
pnpm test:unit
297+
pnpm test:component
249298
```
250299
2. Run type checking:
251300
```bash
252-
npm run typecheck
301+
pnpm typecheck
253302
```
254303
3. Run linting (may have issues with missing packages):
255304
```bash
256-
npm run lint || echo "Lint issues - verify if critical"
305+
pnpm lint || echo "Lint issues - verify if critical"
257306
```
258307
4. Test build process:
259308
```bash
260-
npm run build
261-
npm run build:types
309+
pnpm build
310+
pnpm build:types
262311
```
263312
5. **QUALITY GATE**: All tests and builds passing?
264313
@@ -488,7 +537,7 @@ echo "Workflow triggered. Waiting for PR creation..."
488537
```bash
489538
# Check npm availability
490539
for i in {1..10}; do
491-
if npm view @comfyorg/comfyui-frontend-types@${NEW_VERSION} version >/dev/null 2>&1; then
540+
if pnpm view @comfyorg/comfyui-frontend-types@${NEW_VERSION} version >/dev/null 2>&1; then
492541
echo "✅ npm package available"
493542
break
494543
fi

.claude/commands/create-hotfix-release.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ For each commit:
8080
- **CONFIRMATION REQUIRED**: Conflicts resolved correctly?
8181
3. After successful cherry-pick:
8282
- Show the changes: `git show HEAD`
83-
- Run validation: `npm run typecheck && npm run lint`
83+
- Run validation: `pnpm typecheck && pnpm lint`
8484
4. **CONFIRMATION REQUIRED**: Cherry-pick successful and valid?
8585

8686
### Step 6: Create PR to Core Branch
@@ -197,7 +197,7 @@ For each commit:
197197
5. Track progress:
198198
- GitHub release draft/publication
199199
- PyPI upload
200-
- npm types publication
200+
- pnpm types publication
201201
202202
### Step 12: Post-Release Verification
203203
@@ -211,7 +211,7 @@ For each commit:
211211
```
212212
3. Verify npm package:
213213
```bash
214-
npm view @comfyorg/[email protected]
214+
pnpm view @comfyorg/[email protected]
215215
```
216216
4. Generate release summary with:
217217
- Version released

.claude/commands/setup_repo.md

Lines changed: 158 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,158 @@
1+
# Setup Repository
2+
3+
Bootstrap the ComfyUI Frontend monorepo with all necessary dependencies and verification checks.
4+
5+
## Overview
6+
7+
This command will:
8+
1. Install pnpm package manager (if not present)
9+
2. Install all project dependencies
10+
3. Verify the project builds successfully
11+
4. Run unit tests to ensure functionality
12+
5. Start development server to verify frontend boots correctly
13+
14+
## Prerequisites Check
15+
16+
First, let's verify the environment:
17+
18+
```bash
19+
# Check Node.js version (should be >= 24)
20+
node --version
21+
22+
# Check if we're in a git repository
23+
git status
24+
```
25+
26+
## Step 1: Install pnpm
27+
28+
```bash
29+
# Check if pnpm is already installed
30+
pnpm --version 2>/dev/null || {
31+
echo "Installing pnpm..."
32+
npm install -g pnpm
33+
}
34+
35+
# Verify pnpm installation
36+
pnpm --version
37+
```
38+
39+
## Step 2: Install Dependencies
40+
41+
```bash
42+
# Install all dependencies using pnpm
43+
echo "Installing project dependencies..."
44+
pnpm install
45+
46+
# Verify node_modules exists and has packages
47+
ls -la node_modules | head -5
48+
```
49+
50+
## Step 3: Verify Build
51+
52+
```bash
53+
# Run TypeScript type checking
54+
echo "Running TypeScript checks..."
55+
pnpm typecheck
56+
57+
# Build the project
58+
echo "Building project..."
59+
pnpm build
60+
61+
# Verify dist folder was created
62+
ls -la dist/
63+
```
64+
65+
## Step 4: Run Unit Tests
66+
67+
```bash
68+
# Run unit tests
69+
echo "Running unit tests..."
70+
pnpm test:unit
71+
72+
# If tests fail, show the output and stop
73+
if [ $? -ne 0 ]; then
74+
echo "❌ Unit tests failed. Please fix failing tests before continuing."
75+
exit 1
76+
fi
77+
78+
echo "✅ Unit tests passed successfully"
79+
```
80+
81+
## Step 5: Verify Development Server
82+
83+
```bash
84+
# Start development server in background
85+
echo "Starting development server..."
86+
pnpm dev &
87+
SERVER_PID=$!
88+
89+
# Wait for server to start (check for port 5173 or similar)
90+
echo "Waiting for server to start..."
91+
sleep 10
92+
93+
# Check if server is running
94+
if curl -s http://localhost:5173 > /dev/null 2>&1; then
95+
echo "✅ Development server started successfully at http://localhost:5173"
96+
97+
# Kill the background server
98+
kill $SERVER_PID
99+
wait $SERVER_PID 2>/dev/null
100+
else
101+
echo "❌ Development server failed to start or is not accessible"
102+
kill $SERVER_PID 2>/dev/null
103+
wait $SERVER_PID 2>/dev/null
104+
exit 1
105+
fi
106+
```
107+
108+
## Step 6: Final Verification
109+
110+
```bash
111+
# Run linting to ensure code quality
112+
echo "Running linter..."
113+
pnpm lint
114+
115+
# Show project status
116+
echo ""
117+
echo "🎉 Repository setup complete!"
118+
echo ""
119+
echo "Available commands:"
120+
echo " pnpm dev - Start development server"
121+
echo " pnpm build - Build for production"
122+
echo " pnpm test:unit - Run unit tests"
123+
echo " pnpm test:component - Run component tests"
124+
echo " pnpm typecheck - Run TypeScript checks"
125+
echo " pnpm lint - Run ESLint"
126+
echo " pnpm format - Format code with Prettier"
127+
echo ""
128+
echo "Next steps:"
129+
echo "1. Run 'pnpm dev' to start developing"
130+
echo "2. Open http://localhost:5173 in your browser"
131+
echo "3. Check README.md for additional setup instructions"
132+
```
133+
134+
## Troubleshooting
135+
136+
If any step fails:
137+
138+
1. **pnpm installation fails**: Try using `curl -fsSL https://get.pnpm.io/install.sh | sh -`
139+
2. **Dependencies fail to install**: Try clearing cache with `pnpm store prune` and retry
140+
3. **Build fails**: Check for TypeScript errors and fix them first
141+
4. **Tests fail**: Review test output and fix failing tests
142+
5. **Dev server fails**: Check if port 5173 is already in use
143+
144+
## Manual Verification Steps
145+
146+
After running the setup, manually verify:
147+
148+
1. **Dependencies installed**: `ls node_modules | wc -l` should show many packages
149+
2. **Build artifacts**: `ls dist/` should show built files
150+
3. **Server accessible**: Open http://localhost:5173 in browser
151+
4. **Hot reload works**: Edit a file and see changes reflect
152+
153+
## Environment Requirements
154+
155+
- Node.js >= 24
156+
- Git repository
157+
- Internet connection for package downloads
158+
- Available ports (typically 5173 for dev server)

.claude/commands/verify-visually.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ Follow these steps systematically to verify our changes:
55

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

.github/workflows/chromatic.yaml

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,16 @@ jobs:
2121
with:
2222
fetch-depth: 0 # Required for Chromatic baseline
2323

24+
- name: Install pnpm
25+
uses: pnpm/action-setup@v4
26+
with:
27+
version: 10
28+
2429
- name: Setup Node.js
2530
uses: actions/setup-node@v4
2631
with:
2732
node-version: '20'
28-
cache: 'npm'
33+
cache: 'pnpm'
2934

3035
- name: Get current time
3136
id: current-time
@@ -58,14 +63,14 @@ jobs:
5863
.cache
5964
storybook-static
6065
tsconfig.tsbuildinfo
61-
key: storybook-cache-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}-${{ hashFiles('src/**/*.{ts,vue,js}', '*.config.*', '.storybook/**/*') }}
66+
key: storybook-cache-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}-${{ hashFiles('src/**/*.{ts,vue,js}', '*.config.*', '.storybook/**/*') }}
6267
restore-keys: |
63-
storybook-cache-${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}-
68+
storybook-cache-${{ runner.os }}-${{ hashFiles('**/pnpm-lock.yaml') }}-
6469
storybook-cache-${{ runner.os }}-
6570
storybook-tools-cache-${{ runner.os }}-
6671
6772
- name: Install dependencies
68-
run: npm ci
73+
run: pnpm install --frozen-lockfile
6974

7075
- name: Build Storybook and run Chromatic
7176
id: chromatic

0 commit comments

Comments
 (0)