Commit 3488996
fix(widgets): reconcile widget store entry when widget type changes
registerWidget returned the existing store entry unconditionally, so when a
subgraph convert reused a graphId:nodeId:name key for a different widget, the
stale entry won and the widget rendered with the wrong type (a multiline text
widget showed as an int widget until a page reload rehydrated the store).
Keep the idempotent return only when the existing entry's type matches; on a
type mismatch the id now belongs to a different widget, so overwrite with the
live type and value. Same-type re-registration still preserves edited values.
Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent cec0554 commit 3488996
2 files changed
Lines changed: 18 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
112 | 112 | | |
113 | 113 | | |
114 | 114 | | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
115 | 130 | | |
116 | 131 | | |
117 | 132 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
35 | 37 | | |
36 | 38 | | |
37 | 39 | | |
| |||
0 commit comments