Skip to content

Conversation

@christian-byrne
Copy link
Contributor

@christian-byrne christian-byrne commented Aug 7, 2025

Adds the ability to test frontend PRs directly from comfy-cli by automatically building and using frontend pull requests. This enables developers to quickly test frontend changes without manual setup, with intelligent caching for fast PR switching.

test-frontend-pr-comfy-cli.mp4

…ests

- Add --frontend-pr option to launch command for temporary PR testing
- Implement PR cache system with automatic expiration (7 days) and limits (10 PRs)
- Add Node.js/npm verification and frontend build process with vite
- Include pr-cache management commands (list, clean)
- Cache built frontends for instant switching between PRs
- Add comprehensive tests with 80% coverage for new modules
- Update README with usage examples and cache management docs
@dosubot dosubot bot added size:XXL This PR changes 1000+ lines, ignoring generated files. enhancement New feature or request labels Aug 7, 2025
@christian-byrne
Copy link
Contributor Author

These tests are failing

@codecov
Copy link

codecov bot commented Aug 9, 2025

Codecov Report

❌ Patch coverage is 74.29467% with 82 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
comfy_cli/pr_cache.py 79.72% 29 Missing ⚠️
comfy_cli/command/install.py 81.30% 20 Missing ⚠️
comfy_cli/command/pr_command.py 63.26% 18 Missing ⚠️
comfy_cli/command/launch.py 17.64% 14 Missing ⚠️
comfy_cli/cmdline.py 66.66% 1 Missing ⚠️
@@            Coverage Diff             @@
##             main     #309      +/-   ##
==========================================
+ Coverage   47.91%   50.45%   +2.54%     
==========================================
  Files          30       32       +2     
  Lines        3068     3381     +313     
==========================================
+ Hits         1470     1706     +236     
- Misses       1598     1675      +77     
Files with missing lines Coverage Δ
comfy_cli/cmdline.py 47.67% <66.66%> (+0.20%) ⬆️
comfy_cli/command/launch.py 16.54% <17.64%> (-0.92%) ⬇️
comfy_cli/command/pr_command.py 63.26% <63.26%> (ø)
comfy_cli/command/install.py 57.17% <81.30%> (+9.36%) ⬆️
comfy_cli/pr_cache.py 79.72% <79.72%> (ø)
🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@dosubot dosubot bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Aug 9, 2025
@robinjhuang robinjhuang requested a review from bigcat88 August 9, 2025 23:13
Copy link
Contributor

@bigcat88 bigcat88 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For testing, I checked out a PR from the community:

comfy launch --frontend-pr "#4641"

It was checked out successfully, and ComfyUI started nicely from it:

ComfyUI version: 0.3.48
[Prompt Server] web root: /home/shurik/.config/comfy-cli/pr-cache/frontend/Jackpkn-4641-fix_selection-overlay-performance/repo/dist
### Loading: ComfyUI-Manager (V3.35)

Without --frontend-pr, the original ComfyUI was started:

ComfyUI frontend version: 1.23.4
[Prompt Server] web root: /home/shurik/Comfy/comfy-cli-work/venv/lib/python3.12/site-packages/comfyui_frontend_package/static
### Loading: ComfyUI-Manager (V3.35)

After switching back to #4641, nothing was rebuilt, and the startup was very fast thanks to the cache.

The comfy pr-cache list command displays the cached version perfectly. I also tested the comfy pr-cache clean command, and it works as expected.

PR works just great.


Do I need to push a commit that will remove "# noqa: UP035" and "noqa: UP006" lines - with just replacing List with list and Dict with dict ?

@dosubot dosubot bot added the lgtm This PR has been approved by a maintainer label Aug 10, 2025
…ture__ annotations

- Remove unnecessary # noqa comments
- Replace List[T] with list[T] and Dict[K,V] with dict[K,V]
- Replace Optional[T] with T  < /dev/null |  None
- Add 'from __future__ import annotations' to pr_cache.py
- Remove unused typing imports
@christian-byrne
Copy link
Contributor Author

Thanks for the review and test.

Do I need to push a commit that will remove "# noqa: UP035" and "noqa: UP006" lines - with just replacing List with list and Dict with dict ?

Just fixed it.

@christian-byrne christian-byrne merged commit dae6795 into main Aug 11, 2025
13 checks passed
@christian-byrne christian-byrne deleted the feat/frontend-pr-support branch August 11, 2025 16:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request lgtm This PR has been approved by a maintainer size:XL This PR changes 500-999 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants