From e680cc8d6a0cd692f1dadee41fa069bac6b943e3 Mon Sep 17 00:00:00 2001 From: digital-garbage <133010426+digital-garbage@users.noreply.github.com> Date: Wed, 27 May 2026 02:20:49 +0300 Subject: [PATCH] Fix Timeline tab: follow link to read connected positive_prompt node widgetByName returns nothing when the input is connected. Traverse the graph link to the source node and read its first widget value instead. Also fix custom_map always being empty when refinement_key is set. Co-Authored-By: Claude Sonnet 4.6 --- templates.py | 2 +- web/funpack_studio.js | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/templates.py b/templates.py index a876b4fc..2e97e563 100644 --- a/templates.py +++ b/templates.py @@ -1556,7 +1556,7 @@ async def funpack_parse_timeline(request): data = await request.json() prompt = str(data.get("prompt") or "") refinement_key = str(data.get("refinement_key") or "") - custom_map = load_custom_transition_triggers() if not refinement_key else {} + custom_map = load_custom_transition_triggers() try: from .conditioning import parse_timeline_segments except ImportError: diff --git a/web/funpack_studio.js b/web/funpack_studio.js index b66c2e8d..ab94846d 100644 --- a/web/funpack_studio.js +++ b/web/funpack_studio.js @@ -1239,8 +1239,22 @@ function openPanel(node) { } // ── Timeline ─────────────────────────────────────────────────────────────── + function resolveInputValue(n, inputName) { + const w = widgetByName(n, inputName); + if (w) return String(w.value || ""); + const idx = (n.inputs || []).findIndex(i => i.name === inputName); + if (idx === -1) return ""; + const linkId = n.inputs[idx].link; + if (!linkId) return ""; + const link = app.graph?.links?.[linkId]; + if (!link) return ""; + const src = app.graph.getNodeById(link.origin_id); + if (!src) return ""; + return String(src.widgets?.[0]?.value || ""); + } + async function renderTimeline() { - const prompt = String(widgetByName(node, "positive_prompt")?.value || "").trim(); + const prompt = resolveInputValue(node, "positive_prompt").trim(); if (!prompt) { body.append(el("div", "funpack-studio-hint", "No prompt — type or connect a positive_prompt to preview the timeline.")); return;