mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-04-20 14:30:41 +00:00
fix: use prompt_id to update correct job in execution handlers
handleExecutionCached and handleExecuted were updating activeJob, which breaks when the focused job differs from the active job. Look up the job by e.detail.prompt_id in queuedJobs instead. Addresses review feedback: https://github.com/Comfy-Org/ComfyUI_frontend/pull/9786#discussion_r2926758475
This commit is contained in:
@@ -274,9 +274,10 @@ export const useExecutionStore = defineStore('execution', () => {
|
||||
}
|
||||
|
||||
function handleExecutionCached(e: CustomEvent<ExecutionCachedWsMessage>) {
|
||||
if (!activeJob.value) return
|
||||
const job = queuedJobs.value[e.detail.prompt_id]
|
||||
if (!job) return
|
||||
for (const n of e.detail.nodes) {
|
||||
activeJob.value.nodes[n] = true
|
||||
job.nodes[n] = true
|
||||
}
|
||||
}
|
||||
|
||||
@@ -289,8 +290,9 @@ export const useExecutionStore = defineStore('execution', () => {
|
||||
}
|
||||
|
||||
function handleExecuted(e: CustomEvent<ExecutedWsMessage>) {
|
||||
if (!activeJob.value) return
|
||||
activeJob.value.nodes[e.detail.node] = true
|
||||
const job = queuedJobs.value[e.detail.prompt_id]
|
||||
if (!job) return
|
||||
job.nodes[e.detail.node] = true
|
||||
}
|
||||
|
||||
function handleExecutionSuccess(e: CustomEvent<ExecutionSuccessWsMessage>) {
|
||||
|
||||
Reference in New Issue
Block a user