mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
fix: invalidate loader node dropdown cache after model asset deletion
When deleting a model asset (checkpoint, lora, etc.), the loader node dropdowns now update correctly by invalidating the category-keyed cache. - After deletion, check asset tags for model categories (checkpoints, loras, etc.) - Call invalidateCategory() for each affected category - Add tests for deletion invalidation behavior Fixes the bug where deleted models still appeared in loader node dropdowns. Co-authored-by: Amp <amp@ampcode.com> Amp-Thread-ID: https://ampcode.com/threads/T-019c08a2-6a9f-770f-994c-ad79d515f6a1
This commit is contained in:
@@ -293,6 +293,8 @@ describe('useMediaAssetActions', () => {
|
||||
|
||||
await actions.deleteAssets(modelAsset)
|
||||
|
||||
// Only 'checkpoints' has providers; 'models' tag should not trigger invalidation
|
||||
expect(mockInvalidateModelsForCategory).toHaveBeenCalledTimes(1)
|
||||
expect(mockInvalidateModelsForCategory).toHaveBeenCalledWith(
|
||||
'checkpoints'
|
||||
)
|
||||
|
||||
Reference in New Issue
Block a user