Comfy-Org / Comfy-Org/ComfyUI_frontend
Regression: edits to a promoted STRING widget on a subgraph host node are not written back into the subgraph; value reverts on disconnect/reconnect
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
### Prerequisites
- [x] I am running the latest version of ComfyUI (v0.29.x)
- [ ] I have custom nodes enabled (only rgthree-style helpers, not involved in the bug)
### What happened?
**Regression after upgrading the frontend from v1.45.19** (to the frontend bundled with ComfyUI v0.29). On frontend v1.45.19 this worked. After upgrading, edits made to a **promoted STRING widget on a subgraph host node** are no longer persisted back into the subgraph's internal node storage.
Concretely:
1. Inside a subgraph there is a `PrimitiveString` node (titled e.g. `ProjectVar`), and its `value` widget is promoted to the subgraph host node (wired through the subgraph's input pin).
2. On the parent canvas, I change the promoted widget's value, e.g. from `A` to `B`.
3. Enter the subgraph, disconnect the internal input link and reconnect it.
4. The value **reverts to the pre-edit value `A`** — the edit made on the host node was never written into the subgraph.
The exported/saved workflow confirms the desync: the **host node**'s `widgets_values` holds the NEW value (`B`), while the **internal subgraph node**'s `widgets_values` still holds the OLD value (`A`). Both values coexist in the same JSON:
```jsonc
// host subgraph node on the parent canvas
{ "id": 100, "widgets_values": [/* ... */ "B" /* promoted ProjectVar */] }
// subgraph definition (definitions.subgraphs[0].nodes)
{ "id": 10, "title": "ProjectVar", "type": "PrimitiveString", "widgets_values": ["A"] }
```
Note: writing then reloading the workflow round-trips **consistently** (what I save is what I load). The problem is purely that the **inner (subgraph) and outer (host) copies of the same value are out of sync**.
### Steps to Reproduce
1. Create a subgraph containing a `PrimitiveString` node and promote its `value` widget to the subgraph host node (so it appears as an editable input on the host).
2. On the parent canvas, edit that promoted widget (e.g. `A` -> `B`).
3. Double-click into the subgraph, disconnect the promoted widget's internal input link, reconnect it.
4. The value shows the old value `A`.
### Expected Behavior
Editing a promoted widget on the subgraph host node should be written back to the internal node, so inner and outer always agree (this worked on frontend v1.45.19).
### Additional symptom
Because the token system reads the **internal** node's value, filename tokens in `SaveImage` are affected:
- `SaveImage` `filename_prefix` = `%ProjectVar.value%/%date:yyyyMMdd_hhmmss%`
- Executed API prompt shows the filename resolved from the **old** value (`A`), while the same executed prompt's flattened subgraph primitives carry the **new** value (`B`).
So output files land in the wrong folder based on a stale value, while the actual generation parameters are correct.
### ComfyUI Version
- ComfyUI v0.29.x (frontend bundled with 0.29)
- Last working version: **frontend v1.45.19** — the regression appeared after upgrading past it.
### Additional Context
Related existing issues (same family, but each has a different trigger/mechanism):
- #11297 — promoted COMBO widget changed via ContextMenu not synced back (UI shows new, storage stale)
- #13601 — side-panel edit of a promoted widget freezes the host widget display (opposite direction: display pinned, execution uses new value)
This report is the plain **STRING promoted input** case reproduced by disconnect/reconnect, which neither of the above covers exactly. #14239 (serialize/configure round-trip asymmetry) is **not** the cause here — save/reload round-trips consistently.
Contributor guide
Research direction
Reproduce the STRING promoted-widget case described in the issue, then trace the frontend path that updates the host widget and the subgraph's internal node storage. Add or update a regression test for editing, disconnecting, and reconnecting the promoted input; done means the inner and outer values remain synchronized and the stale token value is no longer observed.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- frontend
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Active
- Clarity
- Mostly clear
- Newbie friendliness
- 68/100