Commit Graph

57 Commits

Author SHA1 Message Date
Christian Byrne
ca312fd1ea [refactor] Improve workflow domain organization (#5584)
* [refactor] move workflow domain to its own folder

* [refactor] Fix workflow platform architecture organization

- Move workflow rendering functionality to renderer/thumbnail domain
- Rename ui folder to management for better semantic clarity
- Update all import paths to reflect proper domain boundaries
- Fix test imports to use new structure

Architecture improvements:
- rendering → renderer/thumbnail (belongs with other rendering logic)
- ui → management (better name for state management and UI integration)

This ensures proper separation of concerns and domain boundaries.

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

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

* [fix] Resolve circular dependency between nodeDefStore and subgraphStore

* [fix] Update browser test imports to use new workflow platform paths

---------

Co-authored-by: Claude <noreply@anthropic.com>
2025-09-15 02:22:37 -07:00
snomiao
48d01745cd feat: add test count display to Playwright PR comments (#5458)
* feat: add test count display to Playwright PR comments

- Add extract-playwright-counts.mjs script to parse test results from Playwright reports
- Update pr-playwright-deploy-and-comment.sh to extract and display test counts
- Show overall summary with passed/failed/flaky/skipped counts
- Display per-browser test counts inline with report links
- Use dynamic status icons based on test results (//⚠️)

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

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

* feat: include skipped test count in per-browser display

- Add skipped test extraction for individual browser reports
- Update per-browser display format to show all four counts:
  ( passed /  failed / ⚠️ flaky / ⏭️ skipped)
- Provides complete test result visibility at a glance

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

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

* fix: improve test count extraction reliability in CI

- Use absolute paths for script and report directories
- Add debug logging to help diagnose extraction issues
- Move counts display after View Report link as requested
- Format: [View Report](url) •  passed /  failed / ⚠️ flaky / ⏭️ skipped

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

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

* fix: generate JSON reports alongside HTML for test count extraction

- Add JSON reporter to Playwright test runs
- Generate report.json alongside HTML reports
- Store JSON report in playwright-report directory
- This enables accurate test count extraction from CI artifacts

The HTML reports alone don't contain easily extractable test statistics
as they use a React app with dynamically loaded data. JSON reports
provide direct access to test counts.

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

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

* fix: correct JSON reporter syntax for Playwright tests

- Use proper syntax for JSON reporter with outputFile option
- Run separate commands for HTML and JSON report merging
- Specify output path directly in reporter configuration
- Ensures report.json is created in playwright-report directory

This fixes the "No such file or directory" error when trying to move
report.json file, as it wasn't being created in the first place.

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

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

* Revert "fix: correct JSON reporter syntax for Playwright tests"

This reverts commit 605d7cc1e2.

* fix: use correct Playwright reporter syntax with comma-separated list

- Use --reporter=html,json syntax (comma-separated, not space)
- Move test-results.json to playwright-report/report.json after generation
- Remove incorrect PLAYWRIGHT_JSON_OUTPUT_NAME env variable
- Add || true to prevent failure if JSON file doesn't exist

The JSON reporter outputs to test-results.json by default when using
the comma-separated reporter list syntax.

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

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

* fix: improve test count extraction reliability in CI

- Use separate --reporter flags for list, html, and json
- Set PLAYWRIGHT_JSON_OUTPUT_NAME env var to specify JSON output path
- Run HTML and JSON report generation separately for merged reports
- Ensures report.json is created in playwright-report directory

The combined reporter syntax wasn't creating the JSON file properly.
Using separate reporter flags with env var ensures JSON is generated.

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

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

* Update scripts/cicd/pr-playwright-deploy-and-comment.sh

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

* refactor: convert extraction script to TypeScript and use tsx

- Convert extract-playwright-counts.mjs to TypeScript (.ts)
- Add proper TypeScript types for better type safety
- Use tsx for execution instead of node
- Auto-install tsx in CI if not available
- Better alignment with the TypeScript codebase

This provides better type safety and consistency with the rest of
the codebase while maintaining the same functionality.

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

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

* chore(pr-playwright-deploy-and-comment.sh): move tsx installation check to the beginning of the script for better organization and efficiency

* [auto-fix] Apply ESLint and Prettier fixes

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Alexander Brown <drjkl@comfy.org>
Co-authored-by: GitHub Action <action@github.com>
2025-09-13 01:18:18 -07:00
snomiao
6fbd692370 fix: Split PR deployment workflow for forked vs non-forked repos (#5425)
* [fix] Consolidate Playwright workflow jobs to fix missing deployment links

The issue in PR #5298 was caused by missing deployment-info artifact
creation. The deploy-reports job was deploying to Cloudflare but wasn't
creating the deployment-info-* artifacts that comment-tests-completed
job expected to download.

This change consolidates the deployment and commenting into a single job,
eliminating the artifact dependency and ensuring links are always available.

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

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

* refactor: Split PR deployment workflow for forked vs non-forked repos

- Extract deployment logic to reusable script (scripts/cicd/pr-playwright-deploy-and-comment.sh)
- Non-forked PRs: Use direct pull_request event in test-ui.yaml (faster)
- Forked PRs: Use workflow_run in pr-playwright-deploy.yaml (handles permissions)
- Add starting comment for both forked and non-forked PRs
- Make Cloudflare tokens optional for starting status comments

* refactor: Simplify PR deployment workflow and script

- Consolidate workflow into single job with clearer structure
- Reduce script from 200+ to ~140 lines
- Simplify deployment retry logic and comment generation
- Remove redundant checks and unnecessary complexity

* fix: Add debugging and wrangler installation to deployment script

- Add debug output to identify missing reports
- Install wrangler if not available
- Show deployment attempts and failures
- Log available reports before deployment

* chore: Trigger CI to test deployment workflow

* fix: Fix browser artifact name mismatch in deployment script

- Use dot notation (0.5x) for artifact names as Playwright creates them
- Convert to dash notation (0-5x) for Cloudflare project names
- Properly handle browser name display in comments

* refactor: Convert deployment script to POSIX sh for better compatibility

- Replace bash arrays with space-separated strings
- Use while loops instead of bash-specific for syntax
- Remove bash-specific string manipulation features
- Replace local variables (not required in functions)
- Ensure compatibility with standard /bin/sh

* fix: Fix deployment script output to properly capture URLs

- Redirect debug messages to stderr
- Only output URL to stdout for proper capture
- This fixes the missing deployment links in PR comments

* fix: Add input validation to prevent command injection

- Validate PR number is numeric only
- Sanitize branch name at script start
- Validate status parameter values
- Use pre-sanitized branch throughout script
- Addresses high-severity security issue from PR review

* fix: Add null checks and logging to workflow condition

- Add explicit null checks for head_repository and repository
- Add debug logging to help diagnose workflow trigger issues
- Prevents potential failures from undefined repository objects
- Addresses medium-severity issue from PR review

* fix: Pin wrangler to major version 4 with error handling

- Pin wrangler to major version 4 (^4.0.0) for stability
- Add error handling if wrangler installation fails
- Return 'failed' status if installation fails
- Addresses dependency management issue from PR review

* perf: Implement parallel deployments to reduce CI time

- Deploy all browser reports in parallel using background processes
- Use temporary directory to collect deployment results
- Wait for all deployments to complete before generating comment
- Maintains result order for consistent output
- Significantly reduces deployment time from sequential to parallel execution

* fix: Use specific comment ID for updates instead of edit-last

- Use GitHub API to find exact comment ID
- Update specific comment by ID to avoid editing wrong comment
- Prevents race conditions if user posts between finding and editing
- More reliable comment updates

* fix(workflows/test-ui.yaml): change condition to always run deploy job for pull requests to ensure deployment consistency

* fix(workflows/test-ui.yaml): change condition to always run deploy job for pull requests to ensure deployment consistency

* fix(pr-playwright-deploy-and-comment.sh): remove npx prefix from wrangler command for consistency and simplicity

* fix(pr-playwright-deploy-and-comment.sh): remove npx prefix from wrangler command for consistency and simplicity

* Update scripts/cicd/pr-playwright-deploy-and-comment.sh

Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>

* fix(pr-playwright-deploy-and-comment.sh): improve regex for URL extraction to include valid characters and ensure correct URL format

* chore(pr-playwright-deploy-and-comment.sh): move wrangler installation to the beginning of the script to avoid redundancy and improve efficiency

---------

Co-authored-by: Claude <noreply@anthropic.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
2025-09-08 23:11:26 -07:00
Benjamin Lu
7f849e9a44 Update remaining @comfyorg/litegraph references 2025-08-04 10:16:24 -04:00
Christian Byrne
eb63b5c536 [feat] Add Traditional Chinese language support (#4410)
Co-authored-by: github-actions <github-actions@github.com>
2025-07-10 01:52:47 -07:00
Christian Byrne
22c70d5d1b [fix] use getter functions for sidebar tab command labels to resolve i18n collection issues (#4370)
Co-authored-by: github-actions <github-actions@github.com>
2025-07-08 23:50:49 -07:00
Christian Byrne
7befec5b17 Add unused i18n keys detection to pre-commit hook (#4328) 2025-07-03 10:53:56 -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
Christian Byrne
2daa51421c Remove fetch-templates script (#3500) 2025-04-18 20:34:03 -04:00
Chenlei Hu
bde518fa13 [CI] Update i18n-node-defs GH action (#3047) 2025-03-14 12:08:08 -04:00
Chenlei Hu
680268bb29 Generate json schema for node def (#2862) 2025-03-04 17:40:26 -05:00
Chenlei Hu
30c750f787 [i18n] Ignore devtools nodes for i18n (#2835) 2025-03-03 16:57:52 -05:00
Chenlei Hu
b30aac6f98 [CI] Use gh action to update electron types (#2811) 2025-03-02 17:15:16 -05:00
Chenlei Hu
fd4263065b [CI] Use gh action to bump version (#2810) 2025-03-02 17:10:30 -05:00
Chenlei Hu
5b2b3cdacf [CI] Use gh action to update litegraph (#2808) 2025-03-02 16:57:30 -05:00
Chenlei Hu
e6a583e11b [Cleanup] Remove deploy script (#2806) 2025-03-02 15:36:54 -05:00
Chenlei Hu
9431c955a6 [CI] Include workflow templates at build time (#2775) 2025-03-02 15:22:18 -05:00
bymyself
76818b54e6 Fix widget label extraction (#2737) 2025-02-26 13:44:05 -05:00
bymyself
e7420fe2e3 Translate runtime-generated widget labels (#2688) 2025-02-23 10:16:25 -05:00
bymyself
365fd1e047 Fix error translating legacy setting options (#2648) 2025-02-20 10:12:46 -05:00
Chenlei Hu
150b4341b2 Update litegraph 0.8.77 (#2530) 2025-02-12 11:11:05 -05:00
Chenlei Hu
d7a0ee8703 Update litegraph 0.8.76 (#2496)
Co-authored-by: github-actions <github-actions@github.com>
2025-02-10 15:30:46 -05:00
filtered
78f43b1e06 [Desktop] Add electron types update script (#2290) 2025-01-19 14:16:27 -05:00
Chenlei Hu
1d02cd3c47 [Docs] Extract comfy workflow zod schema as json schema (#2206) 2025-01-09 11:30:47 -05:00
Chenlei Hu
549a2fdc92 Remove main_repo_release.py (#2147) 2025-01-06 17:01:41 -05:00
Chenlei Hu
e82d795ff9 Trigger node def locale update manually (#2170) 2025-01-06 10:54:59 -05:00
Chenlei Hu
d8f074fea0 [Lint] Sort imports (#2104) 2024-12-30 17:26:37 -05:00
Chenlei Hu
f1eee96ebc Ignore hidden settings for translation (#2050)
Co-authored-by: github-actions <github-actions@github.com>
2024-12-25 21:26:52 -05:00
Chenlei Hu
569a131624 [i18n] Add gihtub action to translate custom nodes (#1987) 2024-12-18 17:04:35 -08:00
Chenlei Hu
b1d02c6a7b [i18n] Split settings locale to separate json files (#1986)
Co-authored-by: github-actions <github-actions@github.com>
2024-12-18 14:57:05 -08:00
Chenlei Hu
4997d13219 [i18n] Add commands label translation (#1890)
* [i18n] Add commands label translation

* Use translation
2024-12-12 09:28:47 -08:00
Chenlei Hu
c60645d9f4 [i18n] Translate node input label (#1880) 2024-12-11 14:57:49 -08:00
Chenlei Hu
a39c04d56e [i18n] Split nodeDefs translations to a separate json file (#1878)
* [i18n] Split nodeDefs translations to a separate json file

* build locale
2024-12-11 11:51:54 -08:00
Chenlei Hu
0c511d08e6 [i18n] Use folder mode for locale (#1876)
* [i18n] Use folder mode for locale

* try pipe
2024-12-11 11:29:52 -08:00
Chenlei Hu
ac6130a556 [i18n] Translate node input/output label and tooltip (#1860)
* [i18n] Translate node input/output labels

* nit

* Impl actual translation

* Remove outputs where name is the type

* Pick outputs key

* Translate outputs

* Properly persist label

* Translate input tooltips

* Translate single node

* Translate first node

* Translate 10 nodes

* Exclude input name translation

* Update test expectations [skip ci]

* nit

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-12-10 17:08:45 -08:00
Chenlei Hu
86797d2492 [i18n] Collect node data types (#1859)
* [i18n] Collect node data types

* nit

* Update locales [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-12-10 11:29:54 -08:00
Chenlei Hu
112a693f3d [i18n] Translate setting options (#1858)
* Collect options

* Translate setting options

* Update locales [skip ci]

* Normalize key

* Revert change of logic

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-12-10 09:31:13 -08:00
Chenlei Hu
a76159e9a0 [i18n] Translate node categories (#1842)
* [i18n] Translate node categories

* nit

* Update locales [skip ci]

* Fix some translations

* Do translate

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-12-07 21:25:40 -05:00
Chenlei Hu
517ae56763 Translate node title and description (#1822)
* Collect node def i18n

* Add collected en locale

* Sort by node id

* Add translations

* Show translated node def

* Update locales [skip ci]

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-12-06 16:56:54 -05:00
Chenlei Hu
dac2a2ec86 [Electron] Translate server config panel (#1817)
* Update i18 collection to include server config items

* Use translation

* Update locales [skip ci]

* nit

---------

Co-authored-by: github-actions <github-actions@github.com>
2024-12-05 19:56:51 -05:00
Chenlei Hu
5206939c78 Translate setting categories (#1797)
* Add i18n for setting categories

* Update locales

* Translate about

* nit

* nit
2024-12-04 16:32:28 -05:00
Chenlei Hu
d04cc4e272 Translate dynamically added settings (#1794)
* Collect settings i18n at runtime

* Translation

* Remove unused file
2024-12-04 13:51:37 -05:00
Chenlei Hu
7986aebf27 Translate command label on top command dropdown menu (#1792)
* collect i18n with playwright

* Add command label translation

* Normalize i18n object key
2024-12-04 13:19:53 -05:00
Chenlei Hu
1856479de9 Translate topbar command menu (#1784)
* Rename script

* Translate menu labels

* Update translations

* Display translated menu items
2024-12-03 22:51:15 -05:00
Chenlei Hu
d953b8fa46 Merge core settings with existing translations (#1782) 2024-12-03 22:04:19 -05:00
Chenlei Hu
a56462fc7c Translate core setting name & tooltip (#1765)
* lazy eval default value

* Add setting translation

* Adjust hooks

* Add all translations

* nit

* Normalized setting id

* Update locales

* Fallback

* Locale => Language

* Locale => Language

* Update translations
2024-12-02 17:34:21 -05:00
Chenlei Hu
05fab91bda Build comfyui-frontend-types library (#1725)
* Install vite-plugin-dts

* Explicitly type workflowStore

* Working rollup

* Hide diff type

* Inline primevue toast mesage types

* Add prepare-types script to generate package.json for type package

* Add global declaration

* Add publish types Github action

* Update litegraph

* Add @comfyorg to package name
2024-11-28 11:21:19 -05:00
Chenlei Hu
69f0da06f8 Add update-litegraph script (#1495)
* Add update script

* nit
2024-11-10 10:15:46 -05:00
Chenlei Hu
09d5e29f01 Create new branch in release script (#1423) 2024-11-04 09:02:33 -05:00