ComfyUI's web server doesn't follow symlinks for security reasons, causing 404
errors when trying to load JavaScript files. Simplified sync_web_files.py to
always copy files instead of attempting symlinks.
Changes:
- Removed dev/prod mode detection and symlink creation logic
- Always copy files from source to web/ directory
- Hash-based caching still prevents unnecessary re-syncs
- Auto-sync on ComfyUI startup keeps files current
- Updated README.md to reflect copy-only behavior
Workflow: After editing source files, run `python scripts/sync_web_files.py --force`
then restart ComfyUI to see changes.
Tested: Manual copies work, UI loads correctly, cache prevents redundant syncs
Fixed critical bugs in sync_web_files.py that caused copies instead of symlinks:
1. Mode detection now checks ALL nodes instead of just first one
- Prevents false "prod" mode when mixed symlink/submodule states exist
- Returns "dev" if ANY node is a symlink
2. Symlink creation uses absolute paths instead of relative
- Fixes "Source not found" errors during sync
- Ensures symlinks work after atomic temp-to-final move
- Eliminates code duplication in web/ directory
3. Windows console compatibility
- Replaced Unicode characters with ASCII for verbose output
Also adds auto-sync integration to __init__.py and web_src/core/ source directory.
Tested: All 3 JS files created as symlinks (0 copies), zero duplication verified