Comfy-Org / Comfy-Org/ComfyUI_frontend
Eagerly register promoted-widget scoped state
- Dominant language
- TypeScript
- Stars
- 2k
- Forks
- 699
- Avg merge
- 1d 7h
- Merged PRs (30d)
- 490
Description
Follow-up from #11559 and DrJKL's review.
Current state:
- `src/composables/graph/useGraphNodeManager.ts:51` keeps `SafeWidgetData.value` as a render fallback when no scoped store entry exists yet.
- `src/core/graph/subgraph/promotedWidgetView.ts:386` resolves value through scoped store, host source widget, then legacy state.
- `src/core/graph/subgraph/promotedWidgetView.ts:455` registers scoped state lazily on write.
Goal:
- Register promoted-widget scoped state eagerly when a `PromotedWidgetView` is created or bound.
- Seed that scoped state from the current source widget value.
- Remove `SafeWidgetData.value` and render-side fallback branches once scoped state is guaranteed to exist.
Why:
- This restores the widget store as the single source of truth for promoted-widget render state and avoids spreading fallback semantics across consumers.
┆Issue is synchronized with this [Notion page](https://app.notion.com/p/Issue-11739-Eagerly-register-promoted-widget-scoped-state-3516d73d365081ba8ecde77f0d8dbaa8) by [Unito](https://www.unito.io)
Contributor guide
Assessment
This issue has not been assessed yet.