mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-19 22:09:37 +00:00
fix: clear/rehydrate _executingNodeProgress on workflow tab switch
Addresses review feedback: https://github.com/Comfy-Org/ComfyUI_frontend/pull/10689#discussion_r3007061637
This commit is contained in:
@@ -633,6 +633,7 @@ export const useExecutionStore = defineStore('execution', () => {
|
||||
watch(
|
||||
() => workflowStore.activeWorkflow?.path,
|
||||
(newPath) => {
|
||||
_executingNodeProgress.value = null
|
||||
if (!newPath) {
|
||||
nodeProgressStates.value = {}
|
||||
return
|
||||
@@ -643,6 +644,17 @@ export const useExecutionStore = defineStore('execution', () => {
|
||||
const [jobId, states] = jobEntries[i]
|
||||
if (jobIdToSessionWorkflowPath.value.get(jobId) === newPath) {
|
||||
nodeProgressStates.value = states
|
||||
const firstRunning = Object.values(states).find(
|
||||
(state) => state.state === 'running'
|
||||
)
|
||||
if (firstRunning) {
|
||||
_executingNodeProgress.value = {
|
||||
value: firstRunning.value,
|
||||
max: firstRunning.max,
|
||||
prompt_id: firstRunning.prompt_id,
|
||||
node: firstRunning.display_node_id || firstRunning.node_id
|
||||
}
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user