Add comfy_api_key server config field to enable cloud API nodes
(Kling, Sora, Nano Banana, etc.) when calling ComfyUI via API.
The key is passed through extra_data.api_key_comfy_org in the
/prompt request, following ComfyUI's official API key integration.
Closes#78
Co-authored-by: Kelin <kelin@KelindeMacBook-Air.local>
Add POST /api/servers/{server_id}/workflows/batch-delete to allow
deleting multiple workflows in a single request. Refactor
WorkflowOrderModel into a shared WorkflowIdsModel base class.
Also disable the list-level history entry point (has_history=False).
Add optional auth field to server config. All HTTP requests to
ComfyUI (prompt, history, view, health check) now pass the
Authorization header when configured.
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Motivation:
The previous data structure for workflows and schemas lacked cohesion and was difficult to maintain manually. Additionally, a more robust and flexible migration system was needed to transfer skill configurations across different environments.
Implementation:
1. Unified the data hierarchy into a directory-based structure: 'data/<server>/<workflow>/'.
2. Enhanced 'transfer_manager.py' and 'transfer_bundle.py' for environmental-aware configuration migration.
3. Updated frontend JS/CSS and Flask routes to support the new directory-centric asset management.
4. Revamped English and Chinese READMEs to prioritize safe installation and clear configuration workflows.
Motivation:
Allows users to easily migrate or back up their skill configurations, server settings, and workflow mappings across different environments, improving setup mobility.
Implementation:
Developed a bundle system in scripts/shared/transfer_bundle.py and scripts/transfer_manager.py for state serialization. Integrated this into the Flask backend and frontend UI, adding components for export/import actions with pre-check validation. Refactored README files to document the migration path and refined the installation guide.
Motivation:
As the number of workflows increases, it becomes difficult for users to quickly locate or prioritize frequently used workflows. The current list lacks flexible display order and intuitive custom management experience.
Implementation:
1. Introduced global state `workflowSortOrder` in config.js to track the currently applied sorting mode.
2. Updated core rendering logic in app.js, adding algorithms to sort by status, name, and custom order; implemented `bindWorkflowDragEvents` and `bindWorkflowSortEvents` to handle drag-and-drop and sorting interactions.
3. Modified DOM renderer in workflow-list.js to inject drag handles into cards when in custom sorting mode.
4. Added responsive `.workflow-toolbar` in styles.css to accommodate search and sorting controls, and added comprehensive visual feedback for list drag-and-drop interactions (e.g., .is-dragging, .is-drop-target).
Motivation:
To resolve 422 Unprocessable Content errors caused by null values from the frontend and to improve ID generation for non-English server names.
Implementation:
- Added 'before' validators to handle None values for id, name, url, and output_dir.
- Updated _slugify_server_id to use Unicode-aware regex, ensuring non-Latin characters generate valid IDs instead of defaulting to 'server'.
Motivation:
Requiring users to manually create unique URL-safe IDs for servers was a point of friction. Additionally, the system needed stronger validation to prevent invalid characters in identifiers.
Implementation:
- Introduced CreateServerModel with Pydantic validators for name, url, and optional id.
- Implemented slug-based auto-generation logic for server IDs in UIStorageService.
- Updated the API to return the fully normalized server object, including the generated ID, upon creation.
Motivation:
The backend previously assumed a single global ComfyUI server, making it impossible to switch between environments or add remote nodes.
Implementation:
Refactored UIStorageService and scripts to organize workflows into server-specific subdirectories. Introduced ServerModel and runtime configuration loader to handle multi-server routing.