LCOV - code coverage report
Current view: top level - src/composables - useWorkflowStatusDismissal.ts Coverage Total Hit
Test: ComfyUI E2E Coverage Lines: 100.0 % 8 8
Test Date: 2026-11-17 04:17:53

            Line data    Source code
       1              : import { watch } from 'vue'
       2              : 
       3              : import { useWorkflowStore } from '@/platform/workflow/management/stores/workflowStore'
       4              : import { useExecutionStore } from '@/stores/executionStore'
       5              : 
       6         2020 : export function useWorkflowStatusDismissal() {
       7         2020 :   const workflowStore = useWorkflowStore()
       8         2020 :   const executionStore = useExecutionStore()
       9              : 
      10         2020 :   watch(
      11              :     () => {
      12         5447 :       const workflow = workflowStore.activeWorkflow
      13         5447 :       return [workflow, executionStore.getWorkflowStatus(workflow)] as const
      14              :     },
      15              :     ([workflow, status]) => {
      16         5447 :       if (workflow && status !== undefined && status !== 'running') {
      17           81 :         executionStore.clearWorkflowStatus(workflow)
      18              :       }
      19              :     },
      20              :     { immediate: true }
      21              :   )
      22              : }
        

Generated by: LCOV version 2.0-1