fix(nodes): linked text review round for #343

- A legacy frontend Primitive linked to an editor's text or the Pair's
  negative now runs with its value: the graphToPrompt wrapper and the queue
  hook fill it in (through virtual reroutes), in new and pre-#343 workflows.
- Moving a linked text and releasing it on the editor keeps it on `text`:
  a link being moved counts as free, as the frontend counts it.
- A link dropped on a prompt box (or its link note) fills that box's input,
  so the Pair's Negative prompt box takes `negative_text` (Classic through
  getInputOnPos, Nodes 2.0 through the box's slot key).
- Only exact STRING links are steered; wildcards keep the frontend choice.
- A linked Classic text box gives its row back and gets it back on
  disconnect; the PromptManagerText note uses the theme colour.
- The metadata parsers map positional widget values through the widget
  table when an editor's widget-bound inputs do not line up with it.
- Real-host cases for the legacy Primitive (new and saved workflows, a real
  Run), the moved link, the Negative box, paste/clone/undo and Split.
This commit is contained in:
Vito Sansevero
2026-10-25 15:08:28 -07:00
parent d5d7f5e33d
commit 2fadd765f6
15 changed files with 924 additions and 36 deletions
+8 -2
View File
@@ -762,9 +762,15 @@ def _widget_names(node):
and _truthy(_get(item, "widget"))
and _truthy(_get(_get(item, "widget"), "name"))
]
if from_inputs:
return from_inputs
node_type = _get(node, "type")
if from_inputs:
# A known node's widget-bound inputs must line up with its widget order.
# Sockets that are not widget inputs (#343: the editors' text) would shift
# every positional value onto the wrong name; use the table then.
known = WIDGET_POSITIONS.get(node_type) if isinstance(node_type, str) else None
if known is not None and list(known[: len(from_inputs)]) != from_inputs:
return list(known)
return from_inputs
key = _js_string(node_type)
if key in _OBJECT_PROTOTYPE_KEYS:
raise GenerationParamsError(f"widget positions of {key!r} are not iterable")