mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-02-28 18:54:09 +00:00
## Summary Eliminates code duplication by replacing local `cancellableStates` arrays with the centralized `isActiveJobState` utility function. ## Changes - Remove duplicated `cancellableStates: JobState[] = ['pending', 'initialization', 'running']` from: - `src/composables/queue/useJobActions.ts` - `src/storybook/mocks/useJobActions.ts` - Import and use `isActiveJobState` from `src/utils/queueUtil.ts` instead ## Testing - Typecheck passes - Lint passes - Related queue tests pass Fixes #7947 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8572-refactor-use-isActiveJobState-instead-of-duplicated-cancellableStates-2fc6d73d365081f89decfc869fa952a0) by [Unito](https://www.unito.io) <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit * **Refactor** * Internal code improvements to simplify job state management logic. <!-- end of auto-generated comment: release notes by coderabbit.ai -->