mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-01 22:09:55 +00:00
## Summary - Fixed issue where enabling a disabled pack incorrectly triggered installation instead of using the dedicated enable endpoint - Added proper `enablePack` method in the manager service layer - Updated store and component to use the correct API call ## Problem When users toggled a disabled pack to enable it via `PackEnableToggle` component, the system was incorrectly calling the install endpoint with full installation parameters instead of the simpler enable endpoint that only requires the pack ID. ## Solution 1. **Added dedicated `enablePack` method in `comfyManagerService.ts`**: - Uses the `'enable'` task kind with `EnablePackParams` - Only requires `cnr_id` parameter (simpler than install) 2. **Updated `comfyManagerStore.ts`**: - Created proper `enablePack` function that queues an enable task - Removed the incorrect aliasing where `enablePack` was pointing to `installPack` 3. **Simplified `PackEnableToggle.vue`**: - Now calls `enablePack` with only required parameters (id, version) - Removed unnecessary installation-specific parameters ## Test plan - [x] Enable a disabled pack and verify it uses the enable endpoint (not install) - [x] Confirm the pack is properly enabled after the operation - [x] Check that the task queue shows "Enabling" message (not "Installing") - [x] Verify existing install/uninstall functionality still works Fixes #6154 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-6157-bugfix-Fix-enable-pack-functionality-to-use-proper-API-endpoint-2926d73d3650819fa4caf1b848f99735) by [Unito](https://www.unito.io) --------- Co-authored-by: Claude <noreply@anthropic.com>