You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
fix(widgets): tolerate un-keyable widget ids in widget value store (#13773)
## Summary
Custom-node widgets with empty/placeholder names no longer throw and
blank the entire node's widget grid on 1.47+ (regression from the
store-backed widget-state refactor #12617).
## Changes
- **What**: `parseWidgetId` rejects ids whose name segment is empty by
throwing. Custom nodes register client-side widgets with
empty/placeholder names (spacer/header/preview/button), producing such
ids. The throw aborted `BaseWidget.setNodeId` seeding (legacy renderer)
and tripped the Vue `NodeWidgets` error boundary — blanking the node's
whole widget grid (e.g. rgthree Power Lora Loader rendered no widgets;
VHS Load Video / Video Combine lost their injected widgets). Guard
`registerWidget`/`getWidget`/`deleteWidget` with `isWidgetId` so the
store declines an un-keyable id instead of throwing. `registerWidget`
now returns `undefined` for such ids, and `BaseWidget` keeps its correct
local `_state` so the widget still functions. One un-storable widget no
longer blanks its siblings.
- **Breaking**: `useWidgetValueStore().registerWidget` return type is
now `WidgetState | undefined` (only `BaseWidget` consumes the return;
handled).
## Review Focus
- @DrJKL@AustinMroz — this is in the #12617 widget-store path. Confirms
the design that a widget which can't be keyed (`graphId:nodeId:` with
empty name) is simply not store-backed and keeps its local value.
- **Scope**: this fixes only the *missing-widget* facet (widgets that
don't render). The *blank-value* facet (pythongosssss Show Text, Impact
populated_text) is the separate idempotent-`registerWidget` collision
(same root cause, #13073 class) and will follow in a second PR.
- **Confirmation**: the empty-name trigger was identified from code +
custom-node patterns; still needs a live rgthree/VHS repro on 1.47 to
confirm end-to-end. Kept as draft pending that. Unit-level behavior is
covered by new regression tests.
QA source: staging 1.47 custom-node findings (rgthree / VHS /
pythongosssss / Impact), all working on 1.45.21.
---------
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Austin Mroz <austin@comfy.org>
0 commit comments