youwee icon indicating copy to clipboard operation
youwee copied to clipboard

Retrying existing failed queue item does not pick up newly assigned plugin workflow

Open anhtahaylove opened this issue 5 months ago • 1 comments

Problem

After installing a plugin and assigning it to download.failed, retrying an existing failed queue item may not run the newly assigned plugin workflow.

This is confusing because Settings > Plugins shows the workflow as assigned and enabled, but the retried item still uses the workflow snapshot captured when it was originally queued.

Observed case

Youwee version: 0.17.2

A failed Facebook Reel queue item was created before installing a download.failed plugin. After installing and assigning the plugin, the registry contained:

"triggerWorkflows": {
  "download.failed": {
    "steps": [
      { "pluginId": "local.without-cookie-fallback", "failurePolicy": "continue" }
    ]
  }
}

The existing queue item still had a stale snapshot:

"pluginWorkflowSnapshots": {
  "download.queued": [],
  "download.beforeStart": [],
  "download.completed": [],
  "download.failed": []
}

Retrying that item produced only the original yt-dlp failure logs. No post-processing workflow logs appeared.

Source behavior

workflow_steps_for_trigger in src-tauri/src/commands/download.rs falls back to the current registry only when a trigger key is missing:

workflow_snapshots
    .get(trigger)
    .cloned()
    .unwrap_or_else(|| resolve_download_workflow_snapshot(app, trigger, None, &[]))

If the queued item snapshot contains "download.failed": [], the fallback registry lookup is skipped.

The frontend captures workflow snapshots into item settings when adding items, and retryFailedDownload restarts the existing item without refreshing those snapshots.

Expected behavior

When retrying an existing failed item, Youwee should either:

  1. refresh plugin workflow snapshots from the current registry before restart, or
  2. treat an empty snapshot as stale when the registry now has steps, or
  3. clearly indicate that plugin workflow changes apply only to newly queued items.

Workaround

Remove the old failed item and add the URL again after assigning the plugin workflow.

anhtahaylove avatar Jun 25 '26 11:06 anhtahaylove

Released in v0.18.0 and SDK v2.3.0

vanloctech avatar Jun 28 '26 18:06 vanloctech