From efe0be3224775783a6066682ac96827d58d5d6f2 Mon Sep 17 00:00:00 2001 From: Ethanfel Date: Sat, 28 Feb 2026 23:48:59 +0100 Subject: [PATCH] Add diagnostic logging to onConfigure for debugging output name persistence Temporary instrumentation to trace data flow during workflow reload. Co-Authored-By: Claude Opus 4.6 --- web/json_dynamic.js | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/web/json_dynamic.js b/web/json_dynamic.js index be9bdfb..0540a22 100644 --- a/web/json_dynamic.js +++ b/web/json_dynamic.js @@ -127,6 +127,19 @@ app.registerExtension({ origOnConfigure?.apply(this, arguments); this._configured = true; + // === DIAGNOSTIC LOGGING (remove after debugging) === + console.log("[JDL-DEBUG] onConfigure called"); + console.log("[JDL-DEBUG] info.outputs:", JSON.stringify(info.outputs?.map(o => ({name: o.name, type: o.type})))); + console.log("[JDL-DEBUG] info.widgets_values:", JSON.stringify(info.widgets_values)); + console.log("[JDL-DEBUG] this.outputs BEFORE:", JSON.stringify(this.outputs?.map(o => ({name: o.name, type: o.type})))); + const _okw = this.widgets?.find(w => w.name === "output_keys"); + const _otw = this.widgets?.find(w => w.name === "output_types"); + console.log("[JDL-DEBUG] okWidget.value BEFORE hide:", JSON.stringify(_okw?.value)); + console.log("[JDL-DEBUG] otWidget.value BEFORE hide:", JSON.stringify(_otw?.value)); + console.log("[JDL-DEBUG] okWidget.type:", _okw?.type); + console.log("[JDL-DEBUG] all widgets:", JSON.stringify(this.widgets?.map(w => ({name: w.name, type: w.type, value: w.value})))); + // === END DIAGNOSTIC === + // Hide internal widgets for (const name of ["output_keys", "output_types"]) { const w = this.widgets?.find(w => w.name === name); @@ -161,6 +174,12 @@ app.registerExtension({ } } + // === DIAGNOSTIC (remove after debugging) === + console.log("[JDL-DEBUG] resolved keys:", JSON.stringify(keys)); + console.log("[JDL-DEBUG] resolved types:", JSON.stringify(types)); + console.log("[JDL-DEBUG] this.outputs AFTER resolve:", JSON.stringify(this.outputs?.map(o => ({name: o.name, type: o.type})))); + // === END DIAGNOSTIC === + // Update hidden widgets so the Python backend has keys for execution if (keys.length > 0) { if (okWidget) okWidget.value = keys.join(",");