refactor: improve Vue widget type safety and runtime prop handling

- Add proper type guards for all widget input specs (Color, TreeSelect, MultiSelect, FileUpload, Galleria)
- Enhance schemas with missing properties (format, placeholder, accept, extensions, tooltip)
- Fix widgets to honor runtime props like disabled while accessing spec metadata
- Eliminate all 'as any' usage in widget components with proper TypeScript types
- Clean separation: widget.spec.options for metadata, widget.options for runtime state
- Refactor devtools into modular structure with vue_widgets showcase nodes
This commit is contained in:
bymyself
2025-11-06 13:31:27 -07:00
parent e0e3612588
commit 7cfa213fc8
12 changed files with 699 additions and 41 deletions

View File

@@ -6,11 +6,13 @@ This directory contains development tools and test utilities for ComfyUI, previo
- `__init__.py` - Server endpoints for development tools (`/api/devtools/*`)
- `dev_nodes.py` - Development and testing nodes for ComfyUI
- `nodes/vue_widgets.py` - Widget showcase nodes used to exercise new Vue-based widgets
- `fake_model.safetensors` - Test fixture for model loading tests
## Purpose
These tools provide:
- Test endpoints for browser automation
- Development nodes for testing various UI features
- Mock data for consistent testing environments
@@ -25,4 +27,4 @@ cp -r tools/devtools/* /path/to/your/ComfyUI/custom_nodes/ComfyUI_devtools/
## Migration
This directory was created as part of issue #4683 to merge the ComfyUI_devtools repository into the main frontend repository, eliminating the need for separate versioning and simplifying the development workflow.
This directory was created as part of issue #4683 to merge the ComfyUI_devtools repository into the main frontend repository, eliminating the need for separate versioning and simplifying the development workflow.