Let clips move between folders, save busy jobs, and fail dropped Comfy runs.

Held jobs restore the form after a 3-minute wait, hidden stills stay blurred in the picker, and reloading Comfy no longer leaves xaigen spinning.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Towsty
2026-08-25 21:46:24 -05:00
co-authored by Cursor
parent ba7a483aac
commit a7a810a7b3
22 changed files with 775 additions and 97 deletions
+20 -1
View File
@@ -19,6 +19,7 @@ export interface PendingJob {
seed: number
startedAt: number
imageName?: string
imageSubfolder?: string
}
function pendingRoot() {
@@ -84,7 +85,7 @@ export async function completePendingIfReady(pending: PendingJob) {
thumb: null,
comfyFilename: video.filename
})
await purgeComfyArtifacts({ video, imageName: pending.imageName, promptId: pending.promptId })
await purgeComfyArtifacts({ video, imageName: pending.imageName, imageSubfolder: pending.imageSubfolder, promptId: pending.promptId })
deletePendingJob(pending.jobId)
return {
type: 'complete' as const,
@@ -100,3 +101,21 @@ export async function completePendingIfReady(pending: PendingJob) {
folderLocked: pending.folderLocked
}
}
export async function resolvePendingJob(pending: PendingJob) {
const done = await completePendingIfReady(pending)
if (done) return done
if (await isComfyPromptDropped(pending.promptId)) {
deletePendingJob(pending.jobId)
const message = 'ComfyUI dropped this job. Reloading the Comfy interface clears the queue. Generate again.'
return {
type: 'error' as const,
status: 'error' as const,
jobId: pending.jobId,
error: message,
message,
progress: 0
}
}
return null
}