Commit Graph

131 Commits

Author SHA1 Message Date
Benjamin Lu
e731f3b833 feat: Add Playwright browser caching to CI workflows (#5272)
Improves CI performance by caching Playwright browsers between runs.
This reduces the time spent downloading browsers on each workflow execution.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-31 13:42:22 -04:00
Benjamin Lu
b99e451f91 [fix] Improve Storybook comment workflow status handling (#5273)
- Add condition to only run on version-bump branches
- Handle additional build statuses (skipped, cancelled) with appropriate icons and messages
- Improve readability by breaking long conditionals across multiple lines

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-31 13:42:09 -04:00
Christian Byrne
186b1888a3 [feat] Re-add ComfyUI loading GIF to workflow status comments (#5277)
Restore the ComfyUI animated favicon loading indicator to PR status
comments that was removed in PR #5209 when workflow architecture was
restructured. The loading GIF now appears in:

- Playwright test status comments (pr-playwright-comment.yaml)
- Storybook build status comments (pr-storybook-comment.yaml)

This provides visual continuity and branding consistency during
CI operations, replacing generic hourglass emoji with ComfyUI's
animated logo.
2025-08-31 03:24:18 +00:00
Christian Byrne
843ea39954 [fix] Update i18n workflow for PNPM/Nx compatibility (#5266)
Remove explicit file arguments from collect-i18n command as the new Nx e2e setup
uses playwright config with testMatch pattern to automatically find test files.

The command 'pnpm collect-i18n -- scripts/collect-i18n-general.ts' was failing
because Nx e2e doesn't accept file arguments in the same way.

Fixes workflow failure in release PR #5263
2025-08-30 14:05:32 -07:00
snomiao
c3c2681819 [feat] Implement pull_request_target deployment for forked PRs - solves secret access issue (#5209)
* [feat] Fix CI workflow issues for forked PRs and improve test diagnostics

This commit addresses two critical blockers in the CI workflow:

1. **Cloudflare Token Access Issue**:
   - Added conditional deployment that skips Cloudflare Pages for forked PRs
   - Forked PRs now get artifact-based report access instead of live URLs
   - Maintains security by preventing secret access from external repos

2. **Test Startup Issues**:
   - Enhanced ComfyUI server startup with better diagnostics
   - Added server PID tracking and process status verification
   - Improved error messages and timeout handling

Additional improvements:
- Updated PR comment logic to handle both deployment scenarios
- Added FORK_TESTING.md documentation for contributors
- Enhanced deployment info handling for summary generation

Fixes #5207

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [feat] Implement pull_request_target deployment for forked PRs

Add secure deployment solution for Playwright reports from forked PRs using pull_request_target event.

Key Changes:
- Add deploy-playwright-reports.yaml workflow using pull_request_target
- Update test-ui.yaml to work with new deployment approach
- Add comprehensive security documentation

Security Features:
- No untrusted code execution (artifacts only)
- Follows GitHub security best practices
- Maintains full secret access for deployment
- Clear audit trail and logging

Fixes #5207

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [feat] Implement cost-optimized deployment with webhook triggers

Replace expensive polling mechanism with repository_dispatch webhooks to reduce GitHub Actions costs by 85%.

Key improvements:
- Remove 30-minute polling wait in deploy-playwright-reports.yaml
- Add repository_dispatch trigger for instant deployment activation
- Implement concurrency controls to prevent redundant deployments
- Add webhook trigger from test completion in test-ui.yaml
- Maintain security and forked PR support

Cost benefits:
- Eliminates 4 Ubuntu runners waiting up to 30min each
- Reduces API calls from 240+ to 1 per PR
- Event-driven architecture for better reliability
- No timeout risks or polling overhead

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [cleanup] Simplify PR testing approach per review feedback

- Revert enhanced ComfyUI server startup logging
- Remove complex fork handling and webhook triggers
- Simplify Cloudflare deployment to original approach
- Remove FORK_TESTING.md and PULL_REQUEST_TARGET_DEPLOYMENT.md files
- Remove deploy-playwright-reports.yaml workflow
- Documentation moved to PR comments for better visibility

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [feat] Implement workflow_run architecture for CI comment/deploy separation

Restructures CI workflows to use workflow_run triggers, improving forked PR support and simplifying core testing workflows.

- pr-playwright-comment.yaml - Comments Playwright test results after Tests CI completion
- pr-storybook-comment.yaml - Comments Storybook build status after Chromatic completion
- pr-playwright-deploy.yaml - Deploys Playwright reports with secret access after Tests CI completion

- chromatic.yaml - Removed all commenting logic, focused on Chromatic testing only
- test-ui.yaml - Removed deployment, commenting, and comment-summary job; focused on Playwright testing only

-  Better forked PR support - workflow_run has access to secrets for deployment
-  Cleaner separation of concerns - testing vs commenting/deployment
-  Reduced complexity in core testing workflows
-  Improved reliability for external contributors

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [feat] Implement workflow_run for both start and completion events

- Updated pr-playwright-comment.yaml to trigger on both 'requested' and 'completed' events
- Updated pr-storybook-comment.yaml to trigger on both 'requested' and 'completed' events
- Added conditional logic to post different messages for workflow start vs completion
- Added "Tests are starting..." message when workflows begin
- Added "Build is starting..." message for Storybook builds
- Maintained existing completion logic with full test results and reports

This allows users to see immediate feedback when their workflows start running,
improving the user experience by providing real-time status updates.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [cleanup] Remove continue-on-error from comment workflows

Comment workflow failures should be visible rather than silently ignored.
This allows better debugging when PR comments fail to post.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [feat] Add logging when no PR found in comment workflows

- Add explicit logging step when steps.pr.outputs.result == 'null'
- Shows branch name, workflow run ID, repository, and event details
- Improves debugging when workflow_run triggers but finds no open PR
- Helps identify issues with branch name matching or PR state

Previously these workflows would silently skip all steps when no PR was found,
making it difficult to debug why comments weren't being posted.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update workflow formatting

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [security] Implement security hardening for workflow_run workflows

- Add URL sanitization for deployment report links to prevent malicious URL injection
- Pin third-party GitHub Actions to commit hashes for supply chain security
- Add repository validation checks to prevent workflow misconfiguration
- Validate deployment URLs against pages.dev pattern before using in comments

Following security recommendations from code review to implement defense-in-depth.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [security] Pin only third-party actions to commit hashes

Keep official GitHub actions (actions/github-script, actions/download-artifact) pinned to version tags as they are trusted first-party actions, while only pinning third-party edumserrano/find-create-or-update-comment to commit hash for supply chain security.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-30 11:04:01 -07:00
Christian Byrne
1bdc190154 [feat] Replace Claude loading GIF with ComfyUI logo in test workflow (#5229)
Update the GitHub workflow to use ComfyUI's animated favicon progress
frames instead of the Claude logo for PR test status comments.
2025-08-27 16:38:19 +00:00
snomiao
810f027b5d Move i18n workflow from single-PRs to release PRs (#5225)
* [feat] Move i18n workflow to release-only pattern

- Modify i18n.yaml to only run on version-bump-* branches and manual dispatch
- Follow chromatic.yaml pattern for release-only workflows
- Update CONTRIBUTING.md to document new translation process
- Reduces PR conflicts and improves development velocity

Fixes #5224

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [feat] Optimize i18n workflow trigger conditions

Move logic from job-level 'if' to more restrictive trigger configuration:
- Limit pull_request trigger to main/master branches only
- Add explicit types to reduce unnecessary workflow runs
- Simplify job-level condition while maintaining same behavior
- Only run on version-bump-* branches or manual dispatch

* Apply suggestion from @DrJKL

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* [feat] Optimize i18n workflow trigger conditions

- Simplify trigger section with cleaner organization
- Move workflow_dispatch to top for better readability
- Remove unnecessary path-ignore filters
- Add clearer comments for branch detection logic
- Maintain same functional behavior while improving structure

Addresses request to move branch detection logic from job-level 'if'
to trigger-level 'on' where possible within GitHub Actions limitations.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
2025-08-27 21:24:23 +08:00
Alexander Brown
1b83d6b5a6 Migration: pnpm (#5215)
* migration: npm to pnpm
Step 1, package and lockfile

* migration: npm to pnpm
Step 2: docs / LLM instructions

* migration: npm to pnpm
Step 3: More documentation updates

* migration: npm to pnpm
Step 4: Even more documentation

* migration: npm to pnpm
Step 5: GitHub Actions

* migration: npm to pnpm
Step 6: PNPM installation in actions. This merge is going to be painful.

* migration: npm to pnpm
Unignore and add pnpm lockfile.

* migration: npm to pnpm
package-lock.json -> pnpm-lock.yaml

* migration: explicit @primeuix/styled, move glob to prod deps

* migration: more explicit deps required by the importmap plugin and vite

* fix: missed merge artifact

* fix: Make sure pnpm is available to install wrangler

* migration: pnpm for dev-release.yaml

* migration: new setup action version
Won't work until that is updated and a new release is cut.

* migration: Playwright needs uuid

* migration: Add explicit deps for lobehub

* chore(version-bump.yaml): change cache from npm to pnpm to optimize package management and improve build performance

* migration: install pnpm in version-bump action

---------

Co-authored-by: snomiao <snomiao@gmail.com>
2025-08-27 06:10:15 -07:00
snomiao
62e06f4358 [ci] Enhance CI/CD caching across all workflows (#5117)
* [ci] Enhance CI/CD caching across all workflows

- Add tool cache steps for node_modules/.cache, .cache, and .eslintcache
- Enable npm caching for Node.js setup actions where missing
- Add cache configurations for ESLint, Prettier, Knip, and other build tools
- Improve build performance by caching tool outputs between runs
- Use unique cache keys per workflow to avoid conflicts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [ci] Enhance CI/CD caching with comprehensive improvements

Extends caching strategy beyond PR #5107 with additional optimizations:

- **i18n.yaml**: Add tool cache for locale generation workflow
- **update-electron-types.yaml**: Add tool cache for type updates
- **test-ui.yaml**: Add Playwright browser cache and Python pip cache
- **vitest.yaml**: Add coverage directory caching
- **chromatic.yaml**: Add Storybook static build cache
- **All build workflows**: Add TypeScript incremental build cache
- **Type generation workflows**: Add repository caching for external repos
- **lint-and-format.yaml**: Improve cache key granularity with source hash

Performance improvements:
- Playwright browser downloads cached across runs
- Python pip dependencies cached
- TSC incremental compilation cache preserved
- Storybook static builds cached
- External repository clones cached
- More granular cache invalidation based on source changes

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [ci] Optimize CI/CD caching for better performance

- Enhance cache keys with more specific file patterns for better cache hit rates
- Add missing cache directories (.prettierCache, .knip-cache, .vitest-cache, tsconfig.tsbuildinfo)
- Improve cache key naming for clarity (lint-format, vitest, storybook, playwright)
- Add better fallback cache restore keys
- Include browser-specific caching for Playwright tests
- Add TypeScript build info caching across workflows

Expected improvements:
- 20-40% faster builds on cache hits
- More granular cache invalidation
- Better cache utilization across tools

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Apply suggestion from @DrJKL

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* Apply suggestion from @DrJKL

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* Apply suggestion from @DrJKL

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* Apply suggestion from @DrJKL

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* Apply suggestion from @DrJKL

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* Apply suggestion from @DrJKL

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* [ci] Remove redundant node_modules/.cache from workflow caches

setup-node already handles node_modules caching when cache: 'npm' is enabled.
Removed conflicting node_modules/.cache entries from:
- .github/workflows/lint-and-format.yaml
- .github/workflows/vitest.yaml
- .github/workflows/test-ui.yaml

This prevents cache conflicts and follows best practices for npm caching.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Update .github/workflows/chromatic.yaml

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* Update .github/workflows/update-electron-types.yaml

Co-authored-by: Alexander Brown <drjkl@comfy.org>

* fix: address reviewer feedback on cache optimization PR (#5200)

* fix: remove duplicate cache entries and fix YAML formatting

- Remove duplicate path entries in dev-release.yaml
- Remove redundant node_modules/.cache entries since setup-node handles npm caching
- Fix YAML indentation issues across workflow files

Addresses reviewer feedback on PR #5117 about duplication and maintenance

* fix: add cache-dependency-path for setup-node in test-ui workflow

The test-ui workflow runs at repo root but package-lock.json is in ComfyUI_frontend/
subdirectory, causing setup-node cache to fail. Added cache-dependency-path to fix this.

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
2025-08-26 12:26:17 -07:00
snomiao
8646ca4162 [ci] Complete implementation of safe-to-fail CI steps (#5210)
* [ci] Make Playwright deploy step safe to fail

Add continue-on-error: true to Deploy to Cloudflare Pages step to prevent
Cloudflare API issues from blocking essential testing processes.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [ci] Make lint-and-format comment steps safe to fail

Add continue-on-error: true to PR comment steps in lint workflow:
- Comment on PR about auto-fix (line 63)
- Comment on PR about manual fix needed (line 76)

This prevents GitHub API permission errors from blocking
essential linting processes while maintaining comment functionality.

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-26 09:25:35 -07:00
snomiao
5cc916bf9f [ci] Restrict chromatic workflow to version-bump-* PRs and manual triggers (#5167)
- Remove automatic trigger on push to main
- Add workflow_dispatch for manual triggering
- Add conditional to only run for PRs from version-bump-* branches
- Reduces unnecessary Chromatic builds on regular PRs

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-24 02:23:27 +08:00
snomiao
c75255327a [ci] Make Chromatic and Playwright comment steps safe to fail (#5156)
Add continue-on-error: true to all PR comment steps in both chromatic.yaml and test-ui.yaml workflows to prevent GitHub API permission errors (403) from blocking essential CI processes.

Changes:
- chromatic.yaml: Added continue-on-error to 2 comment steps
- test-ui.yaml: Added continue-on-error to 4 comment steps

This ensures that visual testing (Chromatic) and browser testing (Playwright) continue to run even when PR commenting fails due to token permissions.

Fixes #5149

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-23 13:28:55 +08:00
snomiao
337fb2100a [ci] Add retry logic to wrangler page deploy step (#5118)
- Implement 3-attempt retry mechanism for Cloudflare Pages deployment
- Add 10-second delay between retry attempts
- Install wrangler globally to ensure CLI availability
- Maintain existing functionality while improving stability

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-20 09:50:38 -07:00
snomiao
2240645a7d [feat] Add Cloudflare Pages deployment for Playwright test reports (#5045)
* [feat] Add Cloudflare Pages deployment for Playwright test reports

- Deploy test reports to separate Cloudflare projects per browser
- Add real-time PR comments with progressive test status updates
- Use wrangler-action for unified Cloudflare tooling
- Support cross-browser testing with individual report links
- Document CI/CD integration in browser_tests/README.md

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix Cloudflare project name for chromium-0.5x browser

* Extract project name transformation to variable for consistent URL formatting

* chore(ci): update branch filters for push and pull_request events in test-ui workflow to refine CI triggers

* [feat] Improve test-ui deployment with branch isolation and building page

- Use Cloudflare Pages --branch flag for proper branch isolation instead of modifying project names
- Add auto-refresh building page that shows test progress in real-time
- Deploy building page immediately when tests start for instant feedback
- Update URL generation to use branch-based Cloudflare Pages URLs format
- Maintain clean project names while isolating branches properly

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore(test-ui.yaml): increase sleep duration from 5 to 10 seconds for cache propagation and restore cached setup steps for improved workflow efficiency

* [refactor] Remove building-page to reduce complexity

- Remove auto-refresh building page and related deployment steps
- Simplify PR comments to show basic test status without progress page
- Keep branch-based deployment for proper isolation while reducing complexity
- Maintain clean workflow focused on core functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore(test-ui.yaml): add a separator in the workflow file for better readability and organization of the test status section

* [feat] Add Cloudflare Pages deployment for Playwright test reports

- Deploy test reports to separate Cloudflare projects per browser
- Add real-time PR comments with progressive test status updates
- Use wrangler-action for unified Cloudflare tooling
- Support cross-browser testing with individual report links
- Document CI/CD integration in browser_tests/README.md

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* Fix Cloudflare project name for chromium-0.5x browser

* Extract project name transformation to variable for consistent URL formatting

* chore(ci): update branch filters for push and pull_request events in test-ui workflow to refine CI triggers

* [feat] Improve test-ui deployment with branch isolation and building page

- Use Cloudflare Pages --branch flag for proper branch isolation instead of modifying project names
- Add auto-refresh building page that shows test progress in real-time
- Deploy building page immediately when tests start for instant feedback
- Update URL generation to use branch-based Cloudflare Pages URLs format
- Maintain clean project names while isolating branches properly

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore(test-ui.yaml): increase sleep duration from 5 to 10 seconds for cache propagation and restore cached setup steps for improved workflow efficiency

* [refactor] Remove building-page to reduce complexity

- Remove auto-refresh building page and related deployment steps
- Simplify PR comments to show basic test status without progress page
- Keep branch-based deployment for proper isolation while reducing complexity
- Maintain clean workflow focused on core functionality

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore(test-ui.yaml): add a separator in the workflow file for better readability and organization of the test status section

* [fix] Address PR review feedback - improve workflow architecture and security

- [HIGH] Fix continue-on-error masking by adding final test result check that fails CI on test failures
- [MEDIUM] Move branch sanitization to setup job to reduce performance overhead
- [MEDIUM] Add compatibility-date to Cloudflare deployment for stability
- [LOW] Extract date format to environment variable to follow DRY principle
- [LOW] Quote shell variables properly to prevent word splitting
- [LOW] Update documentation to use dynamic branch-specific URLs

Addresses all security, performance, and code quality issues raised in automated PR review.
Maintains test report deployment while ensuring CI integrity.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore(test-ui.yaml): replace loading emoji with an image for better visual consistency in test logs
style(test-ui.yaml): clean up whitespace in the workflow file for improved readability

* style(test-ui.yaml): format message to combine two lines into one for better readability

* chore(test-ui.yaml): add a blank line for better readability in the workflow file

* style(test-ui.yaml): update loading image alt text and format messages for better readability in GitHub Actions workflow

* [architecture] Separate test execution from deployment - clean CI design

BREAKING: Remove continue-on-error from test execution for proper CI integrity

**Clean Architecture Changes:**
- Remove `continue-on-error: true` from Playwright test execution
- Create separate `deploy-reports` job that always runs for debugging
- Test jobs now properly fail when tests fail (maintains CI integrity)
- Reports still deploy for debugging via dedicated deployment job
- Capture and pass actual exit codes between jobs via artifacts

**Benefits:**
-  CI fails when tests fail (no longer masked)
-  Reports still deploy for debugging regardless of test outcome
-  Clean separation of concerns (test vs deploy responsibilities)
-  Proper job dependencies and error handling
-  Individual browser test results preserved

**Job Flow:**
1. `setup` - Cache and prepare environment
2. `playwright-tests` - Run tests, fail if tests fail, upload artifacts
3. `deploy-reports` - Always deploy reports using artifacts (parallel)
4. `comment-summary` - Generate summary and fail workflow if needed

This addresses the high-priority architecture concern about continue-on-error
masking test failures while maintaining report deployment functionality.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [refactor] Simplify deployment architecture - remove over-engineering

**Reverted to clean, simple approach based on feedback:**

1.  **Faster deployment** - Deploy immediately after each test (no waiting for matrix completion)
2.  **Remove unnecessary GITHUB_OUTPUT** - Don't save exit codes, use step.conclusion instead
3.  **Single job approach** - Use `if: always()` instead of separate deploy-reports job

**Key Changes:**
- Removed separate `deploy-reports` job (86 lines deleted!)
- Deploy in same job with `if: always()` - much faster
- Use `steps.playwright.conclusion` instead of captured exit codes
- Cleaner, simpler architecture with same functionality

**Benefits:**
- 🚀 **Much faster** - Reports deploy immediately per browser, not waiting for all tests
- 🧹 **Simpler** - One job handles test + deploy, easier to understand
-  **Still maintains CI integrity** - Tests fail properly when they should
- 📊 **Reports always deploy** - Available for debugging regardless of test outcome

The previous approach was over-engineered. This is much cleaner and faster.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(workflow): reorder condition in PR comment step for clarity and consistency

* chore(test-ui.yaml): update deployment command to remove compatibility date for better maintainability
docs(test-ui.yaml): add note to always() condition for clarity on artifact upload behavior

* [performance] Remove redundant branch sanitization - 75% processing reduction

**Issue**: Complex bash string operations running 4 times per build in matrix jobs
**Solution**: Remove duplicate branch sanitization, use pre-computed value from setup job

**Before**: Branch sanitization ran in both setup job AND each matrix job (5 total times)
**After**: Branch sanitization runs only once in setup job, reused via outputs

**Performance Impact**:
- 4 redundant tr/sed operations eliminated (matrix chromium, chromium-2x, chromium-0.5x, mobile-chrome)
- 75% reduction in branch name processing overhead
- Cleaner, more maintainable code

**Implementation**:
- Setup job: Computes `sanitized-branch` output once
- Matrix jobs: Use `${{ needs.setup.outputs.sanitized-branch }}` directly
- No duplicate string processing logic

Addresses PR review comment: [performance] medium Priority - Complex bash string operations in GitHub Actions matrix

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-19 10:22:45 -07:00
Benjamin Lu
cf9847a11e Remove PR checks workflows (#5099)
🤖 Generated with [Claude Code](https://claude.ai/code)

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-19 09:52:22 -07:00
snomiao
451ef24ea6 [feat] Add Storybook setup and NodePreview story (#4861)
* [feat] Add Storybook setup and NodePreview story

- Install and configure Storybook v9.1.1 for Vue 3
- Set up Storybook configuration with Vite integration
- Add Pinia store support for Storybook environment
- Create comprehensive NodePreview.stories.ts with multiple node examples:
  - KSampler node (complex node with multiple inputs/outputs)
  - CLIP Text Encode node (simple text input node)
  - VAE Decode node (image processing node)
  - Example with long markdown description
- Configure project paths and aliases for Storybook
- Stories demonstrate various ComfyUI node types with realistic mock data
- Update tsconfig.eslint.json to include Storybook files
- Fix ESLint issues with imports and number precision
- Add Storybook ESLint plugin configuration

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [feat] Improve Storybook configuration and setup

- Add comprehensive PrimeVue theme setup with ComfyUI preset
- Configure proper Vue app setup with Pinia stores, i18n, and services
- Remove unused onboarding addon from Storybook dependencies
- Improve Vite configuration with better chunking and alias resolution
- Add proper CSS imports and styling for ComfyUI components

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [docs] Add comprehensive Storybook documentation

- Add README.md explaining Storybook usage, benefits, and comparison with other tools
- Add CLAUDE.md with development guidelines for working with Storybook
- Include best practices, troubleshooting tips, and integration notes
- Address PR review feedback for better developer onboarding

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [refactor] Remove ts-expect-error comment from Storybook preview

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [bugfix] Fix TypeScript errors in Load3D components and GLTF test

- Fix type mismatches in Load3DScene eventConfig by casting string values to proper enum types (MaterialMode, CameraType, UpDirection)
- Fix Uint8Array vs ArrayBuffer type issues in GLTF test by using .buffer property
- Remove unused @ts-expect-error comment in Rectangle.ts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [feat] Add Chromatic GitHub Action for Storybook visual testing

- Add automated visual regression testing for Storybook components
- Configure workflow to run on main branch and PRs
- Auto-accept changes on main branch for baseline updates
- Uses build-storybook script for optimized builds

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [docs] Add Chromatic documentation to Storybook README

- Document Chromatic visual testing integration
- Add information about automated testing workflow
- Include best practices for visual regression testing
- Explain how to view and manage test results

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore(chromatic.yaml): restrict push branches to main only for better workflow management

* [feat] Rebase branch onto main and update Storybook configuration

- Rebase sno-storybook branch onto origin/main with latest changes
- Update .storybook/main.ts with additional plugins and component configuration
- Add icons and component resolvers for Storybook support
- Update .gitignore with new entries
- Regenerate package-lock.json after rebase conflicts

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* [bugfix] Fix TypeScript errors in SubgraphNode type checking

Add proper type validation for subgraph node selection before calling
SubgraphNode-specific methods. This prevents undefined values from being
passed to functions expecting SubgraphNode parameters.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(vite.config.mts): correct path alias for src directory to ensure proper resolution in the project
refactor(vite.config.mts): adjust templates proxy configuration for better readability and maintainability

* [feat] Remove bun.lock as it's now ignored

* [bugfix] Fix Storybook builder require() error by converting main.ts to main.mjs

- Convert .storybook/main.ts to main.mjs to resolve ES module compatibility
- Use dynamic imports instead of static imports to avoid require() errors
- Add .storybook directory to tsconfig.json includes
- Storybook build and dev server now work correctly

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* chore(storybook): replace main.mjs with main.ts for improved type safety and maintainability
fix(storybook): remove unused import map plugins in Storybook configuration to prevent potential issues
fix(storybook): update color palette store initialization to streamline code and improve readability

* [feat] Optimize Chromatic workflow with automated PR status comments

- Replace complex GitHub Script actions with edumserrano/find-create-or-update-comment@v3
- Add comprehensive PR comments showing Storybook build progress and results
- Include build metrics: components, stories, visual changes, and errors
- Add direct links to Chromatic builds and Storybook previews
- Reduce workflow complexity by ~60 lines while maintaining functionality
- Use native GitHub Actions expressions for cleaner maintainability

🤖 Generated with Claude Code

Co-Authored-By: Claude <noreply@anthropic.com>

* chore(chromatic.yaml): move permissions section inside the chromatic-deployment job for better organization and clarity

* [fix] Resolve Vite CJS deprecation warning in Storybook config

- Use dynamic import for mergeConfig to avoid CJS build warning
- Replace static import with dynamic import in viteFinal function
- Maintain type safety with separate type import
- Fixes "The CJS build of Vite's Node API is deprecated" warning

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* fix(chromatic.yaml): change edit-mode from replace to append to preserve existing comments in pull request

* [fix] Replace __dirname with process.cwd() in Storybook config

__dirname is not available in all environments. Using process.cwd()
provides better compatibility and resolves path issues in Storybook.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>

* feature: storybook-setting (#5088)

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Jin Yi <jin12cc@gmail.com>
2025-08-18 20:05:28 -07:00
Christian Byrne
17d7ba8bcb [ci] Add lint:fix:no-cache script for consistency (#4948)
Co-authored-by: github-actions <github-actions@github.com>
2025-08-12 13:25:22 -07:00
Christian Byrne
1cf8087be0 [ci] Optimize ESLint performance with caching and generated file excl… (#4926)
Co-authored-by: Qwen-Coder <qwen-coder@alibabacloud.com>
2025-08-12 13:31:54 -04:00
Chenlei Hu
c7baf3c340 [feat] Add knip for unused code detection (#4890) 2025-08-11 19:23:08 -07:00
Christian Byrne
b1117b9838 [ci] Add chromium-0.5x to test matrix (#4880)
Co-authored-by: Claude <noreply@anthropic.com>
2025-08-09 14:15:08 -07:00
filtered
2d11fb1f90 [CI] Pin third party GH actions to specific SHAs (#4878) 2025-08-09 13:18:43 -07:00
Christian Byrne
8bf60777e7 [CI] Exclude vue-nodes-migration branch from playwright tests (#4844) 2025-08-08 16:52:25 -07:00
Vivek Chavan
5d71d6f9cf fix: correct branch protection status contexts for RC branches (#4829) 2025-08-07 19:06:41 -07:00
Christian Byrne
1b9bacaeef [fix] Handle fork PRs in lint-and-format workflow (#4819) 2025-08-07 13:51:02 -07:00
snomiao
65cc06771c [ci] Merge ESLint and Prettier workflows with auto-fix for faster iteration (#4638) 2025-08-07 11:58:34 -07:00
Christian Byrne
37099c498b [feat] Add automatic backport workflow (#4778) 2025-08-06 01:19:14 -07:00
Christian Byrne
3e2d62efb4 [CI] Auto-create release candidate branches for minor/major versions (#4777) 2025-08-05 23:50:53 -07:00
Jin Yi
aaaa0cdcb9 fix: use selected target_branch for PR base in update-manager-types workflow (#4776) 2025-08-05 23:35:14 -07:00
Benjamin Lu
5c7ac51d22 [chore] Remove obsolete update-litegraph workflow
This workflow updated the @comfyorg/litegraph npm dependency.
No longer needed since litegraph is now a git subtree.

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <noreply@anthropic.com>
2025-08-04 05:12:04 -04:00
Christian Byrne
5c71854a96 [ci] Enable CI tests for all feature branch PRs (#4591) 2025-07-30 01:27:02 -07:00
Christian Byrne
7d8c56c5e6 [feat] Add comprehensive Claude PR review with inline comments (#4453)
Co-authored-by: github-actions <github-actions@github.com>
2025-07-29 01:16:30 -07:00
filtered
db70bd61d5 [CI] Fix PR check workflow (#4482) 2025-07-20 18:45:11 +10:00
Benjamin Lu
927773f553 Fix Danger.js Security Issues (#4462) 2025-07-16 12:15:05 -07:00
Christian Byrne
be7edab141 [feat] Add GitHub Action for automated Claude PR reviews (#4452) 2025-07-14 16:44:51 -07:00
filtered
f3168aac89 Revert "[fix] Fix Danger CI permissions for PRs from forks" (#4450) 2025-07-15 04:52:01 +10:00
Benjamin Lu
2f3c762e85 [fix] Fix Danger CI permissions for PRs from forks (#4449)
It's good to have working and in ASAP, although better approaches are being researched and investigated
2025-07-14 14:08:44 -04:00
Benjamin Lu
8b8caa4b29 Add Danger PR Review (#4442) 2025-07-13 21:21:29 -07:00
filtered
d68391a80a [CI] Fix prerelease version tag not set (#4322) 2025-07-01 15:06:08 -07:00
filtered
df710945c9 [CI] Skip i18n in unrelated PRs (#4320) 2025-07-01 14:53:48 -07:00
filtered
8d6360074d Use prerelease flag for draft releases (#4319) 2025-07-01 14:51:24 -07:00
filtered
26c106c3e4 Allow prerelease using version bump action (#4318) 2025-07-01 14:29:55 -07:00
filtered
ebedf1074d [CI] Fix intermittent actions/cache errors (#4220) 2025-06-18 03:55:05 -07:00
filtered
0832347f47 [CI] Fix intermittent failure when using actions/cache (#4219) 2025-06-18 01:24:42 -07:00
filtered
e8236e1a85 [chore] Pin third-party GitHub Actions to commit SHAs (#4076) 2025-06-07 21:06:34 -07:00
Christian Byrne
841e3f743a [feat] Add workflow to generate ComfyUI-Manager types from OpenAPI (#4072) 2025-06-04 04:31:26 -07:00
filtered
a5729c9e06 Revert "[fix] Automatically fix malformed node def translations" (#4045) 2025-06-02 05:37:30 +10:00
Christian Byrne
ec4ced26e7 [fix] Automatically fix malformed node def translations (#4042) 2025-06-01 06:45:40 -07:00
filtered
94fde504d0 [CI] Add dev release GH Action (#3910) 2025-05-17 12:43:01 +10:00
Christian Byrne
4cc6a15fde Fix refresh combos command fails on nodes using V2 spec (#3848) 2025-05-10 16:06:25 -04:00
filtered
5d4be8dc63 Fix electron type workflow (#3633) 2025-04-26 07:43:35 +10:00