Skip to content

chore: merge main into drjkl/node-data-store - #14108

Closed
DrJKL wants to merge 61 commits into
feature/ecs-migrationfrom
drjkl/node-data-store-merge-main
Closed

DrJKL wants to merge 61 commits into
feature/ecs-migrationfrom
drjkl/node-data-store-merge-main

Conversation

@DrJKL

@DrJKL DrJKL commented Jul 26, 2026

Copy link
Copy Markdown
Contributor

Summary

Merges main into drjkl/node-data-store (186 commits behind) on a child branch so the conflict resolutions can be reviewed apart from #13963.

Changes

  • What: Resolves 23 conflicts, favouring ADR 0008 (store-owned entity state) and the simpler of the two shapes where the sides disagreed.

Kept this branch's deletions: useGraphNodeManager.test.ts, usePriceBadge.ts.

Took main's version where it was better structured: the useMinimapGraph hooksMap/entry.live rewrite (with node lifecycle re-expressed as graph events rather than contending for callback slots), SectionWidgets.vue without the TransitionGroup, and the 6 updated PNG snapshots.

Combined both sides in widgetValueStore (main's isWidgetId and type guards + this branch's renderState and appendNodeWidgetOrder), BaseWidget (main's registration-refusal check + this branch's derived render state), and useGLSLUniforms (main's hostWidgetIdForSource + this branch's getInputLink).

Four fixes the merge forced, all consequences of store-owned state:

  • collections.test.ts needs an active pinia now that LGraph.add registers node state
  • useErrorGroups.test.ts builds its fake SubgraphNode with _state instead of a bare id
  • nodeSizeReflow.test.ts seeds layoutStore directly instead of through the deleted node manager
  • useFreeTierQuota reads the root graph from app rather than canvasStore, which platform/ may not import — main got that for free through the composable this branch deleted

Unrelated but blocking: tools/devtools/web/runtimeReflow.js (from #14025) fails the pre-commit hook with an unresolved import and an undefined Image. pnpm lint only covers src, so this is invisible to the repo's lint script and only fires when the file is staged. Fixed with the same disable comment its neighbour legacyWidget.js already carries.

Review Focus

graphCreditsBadges reactivity. Main's useCreditsBadgesInGraph got its reactivity from a void vueNodeData.size dependency, and the merge deletes it. I first replaced it with an equivalent nodeDataStore membership dependency, then checked whether it was load-bearing — it isn't. Reactive node shell state already invalidates the badge walk on add and remove, including for a subscribed reader, so the replacement is gone (73f95fb). What survives is a watchEffect test, because every pre-existing test read that computed without a subscriber — the path where Vue's globalVersion fallback recomputes an untracked computed regardless of its dependencies, and so could never have caught a lost one.

Dropped tests. Main's 28 useProcessedWidgets.test.ts cases import getWidgetIdentity, hasWidgetError and isWidgetVisible, none of which this branch still exports. The one worth porting later is "calls widget.callback even when widgetState is undefined", which now maps to registerWidget returning undefined.

Gates. typecheck, typecheck:browser, typecheck:website, lint, knip clean. Unit 13683 passing; onboardingCloudRoutes.test.ts "lazily resolves the /oauth layout and consent view components" times out at 5s and passes at 5.6s — a transform-cost flake from main, nothing in this diff touches that import graph.

DrJKL and others added 10 commits July 9, 2026 10:42
## Summary

Move Vue widget render-only metadata out of the graph node manager and
into dedicated widget render state alongside widget values.

## Changes

- **What**: Adds `WidgetRenderState` in `widgetValueStore`, removes
`SafeWidgetData` from `useGraphNodeManager`, and has Vue widget
rendering compose from raw LiteGraph widgets plus store-backed
value/render state.
- **What**: Updates promoted widget, app mode, parameter panel, preview,
tooltip, and widget tests for the new render-state boundary.
- **What**: Hardens related browser tests against branded id typing and
brittle default workflow node ids.

## Review Focus

Please look closely at the ownership boundary between raw LiteGraph
widgets, `WidgetState`, and `WidgetRenderState`, especially promoted
widget metadata and linked-widget rendering.

## Validation

- `pnpm typecheck`
- `pnpm typecheck:browser`
- focused widget/node unit tests
- focused Playwright check for `Should display added widgets`

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: AustinMroz <austin@comfy.org>
## Summary

Make a Pinia store (`useLinkStore`) the single source of truth for graph
link topology (ADR-0008 / ECS), mirroring `widgetValueStore`. `LLink`
topology fields become accessors over one `_state` object registered
into the store **by reference** — one copy, no mirror, no sync bridge.

## Changes

- **What**:
- New `useLinkStore` (`src/stores/linkStore.ts`) — **keyed by target
input slot**. At most one live link can target a given input slot
(litegraph disconnects the previous link before connecting a new one),
and every consumer queries by target, so the dominant query ("is this
input connected, and by what?") is one map lookup. Public surface is 6
actions (`registerLink`, `updateEndpoint`, `deleteLink`,
`isInputSlotConnected`, `getInputSlotLink`, `clearGraph`).
- Links without a unique target live in a per-graph side collection:
floating links (either endpoint unassigned; several can share an input
slot) and links into `SUBGRAPH_OUTPUT_ID` (a constant shared by every
subgraph in a root bucket). Neither is queried by target. Floating links
never answer `isInputSlotConnected`, matching `input.link` semantics.
- `LLink` topology backed by a single `_state: LinkTopology`; endpoint
setters delegate to `updateEndpoint` (displace → patch → re-place) when
registered. `updateEndpoint`/`deleteLink` take the topology by reference
and are identity-checked; `LLink._graphId` is set only while the link
actually holds a registration.
- `LGraph._addLink` / `_removeLink` chokepoints: every `_links` map
add/remove funnels through them (both `configure` loops, subgraph
reconnect, duplicate-link purge, `linkFixer`), keeping link-store and
layout entries in sync. Subgraph-definition removal and
non-root/unconfigured `clear()` unregister their links.
- Topology registered at every litegraph create site (`connectSlots`,
both `configure` loops, `addFloatingLink`, subgraph connect) and cleaned
up on `disconnect` / `removeFloatingLink` / `clear` / node-delete
cascade.
- Deleted the `layoutStore.ylinks` connectivity mirror +
`layoutMutations.createLink`/`deleteLink` +
`Create/DeleteLinkOperation`; node removal disconnects links before
`onNodeRemoved` fires, so layout cleanup needs no connectivity mirror or
layout→link cross-store call.
- Migrated the widget-disabled hot path (`WidgetItem.isLinked`,
`AppModeWidgetList`, `buildSlotMetadata`) to O(1) `isInputSlotConnected`
/ `getInputSlotLink`; removed the now-redundant `node:slot-links:changed
→ refreshNodeInputs` re-projection.
- Serialization round-trip goldens (plain / reroute-chain / floating /
subgraph). Because the store no longer keys by link id, subgraph link-id
collisions are irrelevant to it and **workflows load without any link-id
rewriting** (the node-id dedup for widget-store keys is pre-existing and
unchanged).
- **Breaking**: `LLink` topology fields (`origin_id`, `origin_slot`,
`target_id`, `target_slot`, `type`, `parentId`) are now accessors over
`_state`; `parentId` moves from own-property to prototype accessor
(`hasOwnProperty('parentId')` now returns `false`). `asSerialisable()`
output is byte-identical (guarded by goldens).

## Review Focus

- **Register-by-reference**: `LLink._state` is the exact object the
store holds — no second copy, no sync function. Verify no path writes
topology to two places.
- **Target-keying invariant**: one live link per input slot is enforced
by litegraph (`connectSlots` disconnects first); the store's side
collection covers exactly the links that violate or escape it (floating,
subgraph-output-node targets).
- Endpoint setters must delegate fully to `updateEndpoint` when
registered and mutate `_state` directly only when unregistered.
- Lifecycle completeness: every create path registers, every destroy
path unregisters — `_addLink`/`_removeLink` are the chokepoints.
- **Reroutes explicitly deferred.** Remaining `input.link` connectedness
*reads* (`nodeDataUtils`, `useNodePricing`, GLSL preview) are strangler
residue for a follow-up — not in scope here.

Stacked on #13322 — base is `drjkl/safe-widget-cleanup`.

## Migration note (extension authors)

`LLink` topology fields (`id`, `origin_id`, `origin_slot`, `target_id`,
`target_slot`, `type`, `parentId`) are now accessors over an internal
`_state` object, so they are non-enumerable on live instances.
`Object.keys(link)`, `JSON.stringify(link)`, `{...link}`, and
`structuredClone(link)` no longer expose them. To copy or serialize a
link, use `link.asSerialisable()` — direct field reads
(`link.origin_id`) are unchanged. Persisted workflow JSON is unaffected
(byte-identical, covered by goldens).

## Screenshots

Manual render-parity checklist (run against a ~200-node workflow): links
render; connect/disconnect updates live; undo/redo; subgraph nav. E2E
`nodeSelection.spec.ts` passes 13/13 including "a linked widget is
disabled". Note: 8 `linkInteraction.spec.ts` screenshot diffs (~0.01
ratio) observed — no commit in this branch touches link
geometry/coordinates/draw order, so these are
pre-existing/environmental; confirm against base before un-drafting.

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: AustinMroz <austin@comfy.org>
## Summary

Extracts reroute connectivity into a dedicated `rerouteStore` per ADR
0008: chain state (`parentId`, floating marker) is stored by reference,
and link membership (`linkIds`/`floatingLinkIds`) is derived from the
links' `parentId` chains instead of being hand-maintained at ~10 write
sites.

Stacked on #13436 (link topology store); design record in
`docs/architecture/reroute-chain-store.md`.

## Changes

- **What**:
- `LLink._state` now holds the link store's reactive proxy (BaseWidget
pattern), so `link.parentId` writes are tracked by Vue
- New `rerouteStore`: root-scoped buckets keyed by `RerouteId`,
`RerouteChain {id, parentId?, floating?}` registered by reference;
`Reroute` class reads/writes through the store proxy
- Membership derived via a per-graph computed reverse index over link
topologies + chain states; `Reroute.linkIds`/`floatingLinkIds` become
readonly derived accessors
- Deleted: all manual membership mutation sites,
`Reroute.validateLinks`, `Reroute.removeLink`, `Reroute.update`'s
linkIds param
- `LGraph._addReroute`/`_removeReroute` chokepoints mirror
`_addLink`/`_removeLink`
- Load-time reroute-id dedup across sibling subgraph definitions
(mirrors node-id dedup; reroute ids must now be per-root-unique)
- Serialization emits `linkIds` in ascending link-id order; goldens
added for byte-identical round-trip
- **Breaking**: `Reroute.linkIds`/`floatingLinkIds` are now
`ReadonlySet` accessors — external mutation of these sets no longer
affects membership (the chain is the single source of truth).
`Reroute.validateLinks`/`removeLink` removed.

## Review Focus

- `LLink.disconnect` now unregisters the link before pruning empty
reroutes, so derived counts exclude it
- `dropOnReroute` resolves the drop target's source output once before
connecting moved links — re-anchoring the first link's chain changes
derived membership immediately (`LinkConnector.ts`)
- Workflows whose stored `linkIds` contradict their chains are repaired
rather than preserved (design decision 5; no shim)

---------

Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: github-actions <github-actions@github.com>
## Summary

Follow-up cleanups from the reroute chain store work (#13449): deletes
the `slot._floatingLinks` mirror in favor of endpoint derivation, fixes
two position/endpoint integrity gaps the mirror had masked, and
restructures the subgraph-unpack chain stitching.

Stacked on #13449.

## Changes

- **What**:
- `slot._floatingLinks` Sets deleted — a floating link's attachment is
fully encoded in its own endpoints, so `slotFloatingLinks(network, side,
nodeId, slot)` derives it; ~25 write sites across
`addFloatingLink`/`removeFloatingLink`, `setFloatingLinkOrigin`, and
every `FloatingRenderLink` connect method are gone
- `moveInputLink`/`moveOutputLink` gain the `node` param their
`dragNewFrom*` siblings already take
- `FloatingRenderLink.connectToSubgraphOutput` now writes the link's
**target** end (it wrote `origin_id = SUBGRAPH_OUTPUT_ID`,
clobbering/skewing endpoints — masked by the mirror)
- `removeInput`/`removeOutput` renumber floating-link slot indices
alongside real links (stale indices previously persisted into serialized
floating links)
- `Reroute.snapToGrid` mirrors into the layout store like `move()` does
(Vue hit-testing read a stale spatial index after snapped drags)
- Subgraph-unpack reroute chain stitching rewritten as
collect-then-stitch (two segment walks + one generic pointer pass,
replacing three interleaved walk-and-write loops)

## Review Focus

- Scoped out with written assessments: `input.link`/`output.links`
mirror removal (roadmap-scale `SlotConnection` extraction, ~530
accesses) and reroute position ownership inversion (layout store only
seeds the active graph, no writeback)
- Corrupt-data error paths in unpack stitching are normalized to
per-link skip (the old code broke the whole loop on some
internal-segment failures)

---------

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
## Summary

Migrates the `inputs[].link` mirror-based reactivity tracking to
`linkStore` queries and deletes the slot-link reprojection machinery in
`useGraphNodeManager`.

## Changes

- **What**: `NodeSlots.linkedWidgetedInputs`, `usePartitionedBadges`'
pricing pokes, and `trackNodePrice` now query
`linkStore.isInputSlotConnected` (root graph id + unfiltered slot
index). Deletes the `node:slot-links:changed` handler and its
load-bearing comment, the emitter-less `node:slot-errors:changed`
handler, `refreshNodeInputs`, and the node-removal refresh-all loop.
Adds unified-mode NodeSlots tests (none existed) and a `trackNodePrice`
reactivity test. Drafts `docs/architecture/node-data-store.md` for the
next phase.
- **Not removed**: the `node:slot-links:changed` emitters and trigger
type entries, the `input.link` mirror itself, the computation-path
`inp.link` reads in `useNodePricing.buildJsonataContext` (migrated in
#13498 alongside the mirror deletion), and the `node:slot-label:changed`
handler — those belong to the Slot extraction / nodeDataStore phases.

## Review Focus

- The node-removal refresh-all loop deletion (own commit) — originally
shipped as a regression fix; gated locally on the vue-nodes legacy
widget e2e spec plus the full vueNodes suite (126 passed).
- Pricing badges previously only re-evaluated for widgeted inputs (the
trigger's gate); linkStore queries now also cover non-widgeted pricing
inputs — a correctness improvement, not parity.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
## Summary

Extracts node badges into a dedicated store per ADR 0008 — slice A of
`docs/architecture/node-badge-store.md`: store, plain `BadgeData` rows,
reactive badge system, and LGraph chokepoint registration. Stacked on
#13455.

## Changes

- **What**:
- `src/types/badgeData.ts` — plain `BadgeData { kind, text, fgColor?,
bgColor?, iconKey? }` rows (decision 1).
- `src/stores/nodeBadgeStore.ts` — root-scoped buckets keyed by
`NodeId`, kind-ordered reads, identity-checked row deletes,
`registerNode`/`unregisterNode`/`clearGraph` registration trio; row
writes refused for unregistered nodes (decision 2).
- `src/systems/badgeSystem.ts` — pure `computeBadges(sources)` +
effect-scope-per-node shell watching `registeredNodeIds`; writes core
and credits rows from
nodeDef/settings/palette/pricing/widget-value/link-connectivity sources
(decisions 3–4).
- `LGraph.add`/`remove`/`clear` + subgraph-definition GC maintain the
store registration (linkStore/rerouteStore convention).
  - Design record updated with implementation notes.
- **Breaking**: none yet — `node.badges`/`useNodeBadge` closures
untouched; nothing starts the system in production until slice B's
consumer cutover.

## Review Focus

- Registration is bucket-key presence; the system discovers nodes by
watching `registeredNodeIds`, so litegraph never imports pricing/nodeDef
modules (no import cycle via the litegraph barrel).
- Core rows are fine-grained (lifecycle, id, source) under one
visibility rule — unification notes in the design record (Vue gains
HideBuiltIn on id badges; legacy join/truncation becomes slice-B
draw-cache presentation).
- Subgraph credits aggregation, the legacy `node.badges` surface, and
`badgePosition` are open decisions in the design record and deliberately
not in this PR.
- Slice A+B together would exceed the ~300-line guideline, hence the
split; store row APIs (`registerBadge`/`deleteBadge`) land now because
the slice-B shim consumes them.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
## Summary

Prototype: badge rows are derived presentation, not entity state, so
this replaces the materialized `nodeBadgeStore` (and its
registration/watcher/scope machinery, which amounted to cache
invalidation) with a per-node memoized derivation.

## Changes

- **What**: `nodeBadges(node)` — one lazy `computed` per node instance
in a `WeakMap`; entries die with their nodes, so registration, teardown,
and the stale-bucket bug class do not exist. A single
`graphStructureRevision` (litegraph leaf, bumped at
`add`/`remove`/`clear` chokepoints and structure events) replaces bucket
membership, `subgraphCreditsRevision`, and the
`resolveGraphId`/`resolveNode` seams. Litegraph consumes rows through a
one-function `setBadgeRowsProvider` seam, keeping its import graph
acyclic. `computeBadges` stays pure/plain-data; the identity-keyed draw
cache is unchanged. Net −456 lines.
- **Breaking**: none beyond the parent PR; `node.badges` and settings
behavior unchanged.

## Review Focus

- ECS-goal compliance despite deleting the store: authoritative truth
stays in the source stores + graph; badges were a projection, and the
design-doc amendment in `docs/architecture/node-badge-store.md`
("Prototype: derive-on-read") records the reasoning and trade-offs.
- Coarse invalidation: any structural change invalidates every badge
computed (flag only; recompute is lazy per read). Stress case is
large-workflow drag/paste.
- Legacy-canvas redraw on async price resolution still rides the
`pricingRevision` watch in `useNodeBadge`, same as the parent branch.

Child of #13460 — compare against `drjkl/and-then-there-were-none`, not
`feature/ecs-migration`.

---------

Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
)

## Summary

Make right-side-panel promoted subgraph-input widget rows host-scoped,
removing runtime graph traversal, per ADR0009.

## Changes

- **What**: `SectionWidgets.vue` and `WidgetActions.vue` no longer walk
live links back to the interior source to identify promoted widgets. A
promoted widget is host-scoped (`widget.widgetId =
graphId:hostNodeId:inputName`, also carried on the host input slot), so
reuse that:
  - `isLinked` → `inputForWidget(node, widget)?.widgetId != null`
  - `isWidgetShownOnParents` → match parent inputs by `widget.widgetId`
- `handleHideInput` → drop the unreachable source-resolution branch
(with the `String(node.id)===String(parent.id)` swap), keep
`demoteWidget`
  - remove the now-unused `widgetPromotedSource` export
- favorites keep their `(nodeLocatorId, widgetName)` key; added a
`TODO(ADR0009)` to move to a pure `WidgetId` key (deferred — needs a
persisted-format migration)
- **Breaking**: none. `resolvePromotedWidgetSource` in
`clearWidgetErrors` is left intact (ADR0009 permits source lookup for
diagnostics).

## Review Focus

Behavior equivalence of the three replaced predicates. The removed
`handleHideInput` branch was unreachable: reaching it requires
`!isLinked`, but whenever the old source resolved, `isLinked` was
already true. The only divergences are broken/unresolvable interior
links, which are strictly safer under the new logic. Net -55 lines, no
new APIs.

Validated: `pnpm typecheck`, `pnpm lint`, `pnpm knip` clean; 127
subgraph/parameter unit tests pass.


## Addendum: widget-value type consolidation

`f48153d` fixes null handling and starts collapsing the redundant value
types. Current state and the path to one canonical type:

**The problem.** Five spellings of the same union, each able to skew
independently:

| Type | Was | Now |
|---|---|---|
| `WidgetValue` (simplifiedWidget.ts) |
`string\|number\|boolean\|object\|undefined\|null\|void\|File[]` |
canonical: `string\|number\|boolean\|object\|undefined\|null` |
| `TWidgetValue` (litegraph widgets.ts) | `IWidget['value']` (rejected
null) | `= WidgetValue` alias |
| `WidgetState['value']` (widgetState.ts) | `unknown` | defaults to
`WidgetValue` |
| `NodeProperty` (LGraphNode.ts) | no null (runtime stored null anyway)
| `\|null` added |
| `IBaseWidget.callback` value param | `unknown` | `WidgetValue` |

The old `unknown` in the store forced `isWidgetValue(x) ? x : undefined`
laundering at 6 call sites; 4 are now deleted. The guard survives only
where it does real work: untrusted workflow JSON
(`proxyWidgetMigration.pickHostValue`) and the serialize path
(`SubgraphNode.serialize`).

**Remaining steps (follow-up PRs):**

1. Codemod `TWidgetValue` -> `WidgetValue` (~20 imports incl.
`serialisation.ts`, `litegraph-augmentation.d.ts`, panel callbacks),
delete the alias. Zero behavior change.
2. `NodeProperty = Exclude<WidgetValue, undefined>` - derives the one
legitimate variant (properties use `undefined` as "absent") instead of a
parallel hand-written union that can drift.
3. Move `WidgetValue` to a leaf module (litegraph currently imports it
from app-layer `@/types/simplifiedWidget` - inverted layering).
4. Rename the shadowing generic `migrateWidgetsValues<TWidgetValue>` in
`litegraphUtil.ts` to `<T>`.
5. (Riskier, last) Narrow the bare `object` members -
`IChartWidget.value: object`, `ICustomWidget.value: string\|object` - to
`Record<string, unknown>`. This is the only change that makes the union
meaningfully narrower than "anything non-callable"; needs an ecosystem
deprecation window since `custom` is the extension escape hatch.

**Invariant to keep:** `null` and `undefined` are distinct on purpose.
`undefined` = hole/absent in `widgets_values` arrays and
property-presence checks; `null` = a real stored value. Regression tests
in `promotionUtils.test.ts` and `LGraphNode.test.ts` pin this.

---------

Co-authored-by: Amp <amp@ampcode.com>
…ingle source (#13479)

## Summary

Deletes the `output.links[]` runtime mirror: the linkStore is now the
single source for output-side connectivity, read through the pure
`node/slotLinks.ts` helpers, with a deprecation-telemetry getter for
extensions.

## Changes

- **What**: Output connectivity queries (`isOutputSlotConnected` /
`getOutputSlotLinks`, now returning `LinkTopology` sets and excluding
floating links); all app and litegraph-internal readers migrated off the
mirror; the `NodeOutputSlot.links` field and its nine write sites
deleted; serialization derives `outputs[].links` from the store (sorted
ascending, `null` when empty — wire format unchanged);
`SlotConnectionDot` connected state wired via `NodeSlots`.
- **Breaking**: Extensions writing `output.links` now throw (no setter);
reads still work via a read-only prototype getter that fires
`warnDeprecated`. Migration: read via `node.isOutputConnected(slot)` /
`node.getOutputNodes(slot)`, mutate via `node.connect()` /
`node.disconnectOutput()`. `PrimitiveNode.onLastDisconnect` now fires on
disconnect-all (stale-mirror suppression removed); `disconnectInput`
passes the correct origin slot to `onConnectionsChange`.

## Review Focus

- `docs/architecture/output-slot-connectivity.md` (Decision 6) records
the design, the accepted behavior changes, and the extension migration
map.
- Serialization ordering: ascending-id equals push order for organically
built graphs; move-history order was the only divergence.
- Two latent bugs surfaced by the migration: `createTestSubgraphNode`
minted duplicate node ids, and promoted widget labels did not inherit
the source slot label.

🤖 Generated with [Claude Code](https://claude.com/claude-code)
## Summary

Applies the `output.links[]` deletion recipe (#13479) to `input.link`:
the linkStore is now the single source for slot connectivity in both
directions.

## Changes

- **What**: All app and litegraph readers of `input.link` migrated to
`node.isInputConnected` / `node.getInputLink` or the `slotLinks` input
helpers; the `NodeInputSlot.link` field and every runtime write site
deleted; serialization derives `inputs[].link` from the store (wire
format unchanged). Store re-keying is authoritative: moving a registered
link evicts any incumbent under the new key (first-wins remains only for
load-time registration, which dedup depends on), so slot permutations
cannot silently drop links. The mirror-carried association machinery is
replaced, not mirrored: dynamicWidgets rebuilds capture one at-rest
slot→link snapshot and reconcile once at the end,
`reorderSubgraphInputs` captures outer links by pre-reorder index,
load-time slot repair moved from a post-`onConfigure` JSON walk
(`fixLinkInputSlots`, deleted — it read pre-clone data for subgraph
workflows) into `LGraph.configure` as `realignInputLinkSlots` over the
effective node data, and link dedup selects survivors from the store
registration (`repairInputLinks` deleted). `disconnectOutput`'s
duplicated branches collapsed into one per-link loop that removes the
store entry before firing `onConnectionsChange`, so callbacks observe
disconnected state.
- **Breaking**: `input.link` is a deprecation-telemetry accessor. Reads
return the store-derived id and warn; writes warn naming the replacement
APIs and are ignored (no throw — legacy writers degrade gracefully). The
key is non-enumerable: `{ ...slot }` / `Object.keys` don't carry it;
`JSON.stringify` does via `toJSON`. `addInput` / `addOutput` drop stale
`link` / `links` keys from `extra_info`. Duck-typed slots are upgraded
in place by `_setConcreteSlots`, so plain-object slots read store-backed
connectivity after any configure/draw. Migration: read via
`node.isInputConnected(slot)` / `node.getInputLink(slot)`, mutate via
`node.connect()` / `node.disconnectInput()`.
- First-party code no longer touches either deprecated mirror (a
regression test asserts a connect-draw-serialize cycle fires zero
deprecation warnings), so the telemetry now measures extensions only.
The `'link' in slot` direction discriminators are deleted in favor of
direction threading (`slotIsConnected`, `widgetInputConnected`,
`isINodeInputSlot`, `IGenericLinkOrLinks` removed).

## Review Focus

- The store re-key semantics split (`registerLink` first-wins vs
`updateEndpoint` authoritative) in `src/stores/linkStore.ts` — pinned by
swap/permutation tests at the store, LLink, and
`reorderSubgraphInputsByName` layers.
- The two association replacements: dynamicWidgets snapshot/reconcile
(`captureInputLinks` / `reconcileInputLinks`) and
`realignInputLinkSlots` consuming `nodeDataMap` (the deduplicated-clone
data nodes actually configure from).
- Several test fixtures previously passed only because a module-scoped
Pinia let zero-UUID root buckets leak state across tests, or because
they hand-wrote mirror ids; they now drive real connections.

Stacked on #13479. Design record:
`docs/architecture/output-slot-connectivity.md` Decision 6.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Co-authored-by: github-actions <github-actions@github.com>
@coderabbitai

coderabbitai Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

Important

Review skipped

Auto reviews are disabled on base/target branches other than the default branch.

Please check the settings in the CodeRabbit UI or the .coderabbit.yaml file in this repository. To trigger a single review, invoke the @coderabbitai review command.

⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: d4de0472-ce28-40c8-8047-d7ead71575c0

You can disable this status message by setting the reviews.review_status to false in the CodeRabbit configuration file.

Use the checkbox below for a quick retry:

  • 🔍 Trigger review
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch drjkl/node-data-store-merge-main

Comment @coderabbitai help to get the list of available commands.

@github-actions

github-actions Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

🌐 Website E2E

Tip

All tests passed.

Status ✅ Passed
Report View Report

🔗 Website Preview

Website Preview: https://comfy-website-preview-pr-14108.vercel.app

This commit: https://website-frontend-dy8x5sn39-comfyui.vercel.app

Last updated: 2026-07-29T00:10:21Z for 885f14b

@github-actions

github-actions Bot commented Jul 26, 2026 •

Copy link
Copy Markdown
Contributor

🎭 Playwright: ✅ 1622 passed, 0 failed · 2 flaky

📊 Browser Reports
  • chromium: View Report (✅ 1601 / ❌ 0 / ⚠️ 2 / ⏭️ 5)
  • chromium-2x: View Report (✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • chromium-0.5x: View Report (✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0)
  • mobile-chrome: View Report (✅ 18 / ❌ 0 / ⚠️ 0 / ⏭️ 0)

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 07/29/2026, 12:10:50 AM UTC

Links

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 44.0 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 52.0 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 72.8 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 55.6 MB heap
large-graph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.5 MB heap
large-graph-pan: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 63.9 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 73.2 MB heap
minimap-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 70.9 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 55.0 MB heap
subgraph-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 56.4 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 45.4 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 152ms TBT · 91.1 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 79.4 MB heap
vue-large-graph-idle: · 53.7 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 173.5 MB heap
vue-large-graph-pan: · 55.4 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 648ms TBT · 164.6 MB heap
workflow-execution: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 58.2 MB heap

ℹ️ No baseline found — significance unavailable.

Absolute values
Metric Value
canvas-idle: avg frame time 17ms
canvas-idle: p95 frame time 17ms
canvas-idle: layout duration 0ms
canvas-idle: style recalc duration 7ms
canvas-idle: layout count 0
canvas-idle: style recalc count 9
canvas-idle: task duration 538ms
canvas-idle: script duration 21ms
canvas-idle: TBT 0ms
canvas-idle: heap used 44.0 MB
canvas-idle: DOM nodes -264
canvas-idle: event listeners -136
canvas-mouse-sweep: avg frame time 17ms
canvas-mouse-sweep: p95 frame time 17ms
canvas-mouse-sweep: layout duration 3ms
canvas-mouse-sweep: style recalc duration 38ms
canvas-mouse-sweep: layout count 12
canvas-mouse-sweep: style recalc count 76
canvas-mouse-sweep: task duration 925ms
canvas-mouse-sweep: script duration 171ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 52.0 MB
canvas-mouse-sweep: DOM nodes -264
canvas-mouse-sweep: event listeners -137
canvas-zoom-sweep: avg frame time 17ms
canvas-zoom-sweep: p95 frame time 17ms
canvas-zoom-sweep: layout duration 1ms
canvas-zoom-sweep: style recalc duration 17ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 32
canvas-zoom-sweep: task duration 393ms
canvas-zoom-sweep: script duration 25ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 72.8 MB
canvas-zoom-sweep: DOM nodes 78
canvas-zoom-sweep: event listeners 19
dom-widget-clipping: avg frame time 17ms
dom-widget-clipping: p95 frame time 17ms
dom-widget-clipping: layout duration 0ms
dom-widget-clipping: style recalc duration 10ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 12
dom-widget-clipping: task duration 424ms
dom-widget-clipping: script duration 89ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 55.6 MB
dom-widget-clipping: DOM nodes 19
dom-widget-clipping: event listeners 2
large-graph-idle: avg frame time 17ms
large-graph-idle: p95 frame time 17ms
large-graph-idle: layout duration 0ms
large-graph-idle: style recalc duration 7ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 8
large-graph-idle: task duration 812ms
large-graph-idle: script duration 244ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 67.5 MB
large-graph-idle: DOM nodes -266
large-graph-idle: event listeners -131
large-graph-pan: avg frame time 17ms
large-graph-pan: p95 frame time 17ms
large-graph-pan: layout duration 0ms
large-graph-pan: style recalc duration 13ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 69
large-graph-pan: task duration 1835ms
large-graph-pan: script duration 994ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 63.9 MB
large-graph-pan: DOM nodes -269
large-graph-pan: event listeners -131
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 7ms
large-graph-zoom: style recalc duration 12ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 64
large-graph-zoom: task duration 2021ms
large-graph-zoom: script duration 1081ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 73.2 MB
large-graph-zoom: DOM nodes -133
large-graph-zoom: event listeners -63
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 6ms
minimap-idle: layout count 0
minimap-idle: style recalc count 7
minimap-idle: task duration 822ms
minimap-idle: script duration 245ms
minimap-idle: TBT 0ms
minimap-idle: heap used 70.9 MB
minimap-idle: DOM nodes -268
minimap-idle: event listeners -133
subgraph-dom-widget-clipping: avg frame time 17ms
subgraph-dom-widget-clipping: p95 frame time 17ms
subgraph-dom-widget-clipping: layout duration 0ms
subgraph-dom-widget-clipping: style recalc duration 10ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 46
subgraph-dom-widget-clipping: task duration 425ms
subgraph-dom-widget-clipping: script duration 137ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 55.0 MB
subgraph-dom-widget-clipping: DOM nodes 17
subgraph-dom-widget-clipping: event listeners 8
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 9ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 10
subgraph-idle: task duration 469ms
subgraph-idle: script duration 15ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 56.4 MB
subgraph-idle: DOM nodes 20
subgraph-idle: event listeners 4
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 5ms
subgraph-mouse-sweep: style recalc duration 37ms
subgraph-mouse-sweep: layout count 16
subgraph-mouse-sweep: style recalc count 76
subgraph-mouse-sweep: task duration 822ms
subgraph-mouse-sweep: script duration 111ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 45.4 MB
subgraph-mouse-sweep: DOM nodes -266
subgraph-mouse-sweep: event listeners -137
subgraph-transition-enter: avg frame time 17ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 11ms
subgraph-transition-enter: style recalc duration 25ms
subgraph-transition-enter: layout count 4
subgraph-transition-enter: style recalc count 7
subgraph-transition-enter: task duration 912ms
subgraph-transition-enter: script duration 44ms
subgraph-transition-enter: TBT 152ms
subgraph-transition-enter: heap used 91.1 MB
subgraph-transition-enter: DOM nodes 13671
subgraph-transition-enter: event listeners 2383
viewport-pan-sweep: avg frame time 17ms
viewport-pan-sweep: p95 frame time 17ms
viewport-pan-sweep: layout duration 0ms
viewport-pan-sweep: style recalc duration 37ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 249
viewport-pan-sweep: task duration 6588ms
viewport-pan-sweep: script duration 3395ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 79.4 MB
viewport-pan-sweep: DOM nodes -268
viewport-pan-sweep: event listeners -115
vue-large-graph-idle: avg frame time 19ms
vue-large-graph-idle: p95 frame time 17ms
vue-large-graph-idle: layout duration 0ms
vue-large-graph-idle: style recalc duration 0ms
vue-large-graph-idle: layout count 0
vue-large-graph-idle: style recalc count 0
vue-large-graph-idle: task duration 18017ms
vue-large-graph-idle: script duration 1100ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 173.5 MB
vue-large-graph-idle: DOM nodes -6547
vue-large-graph-idle: event listeners -7466
vue-large-graph-pan: avg frame time 18ms
vue-large-graph-pan: p95 frame time 17ms
vue-large-graph-pan: layout duration 0ms
vue-large-graph-pan: style recalc duration 22ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 162
vue-large-graph-pan: task duration 22074ms
vue-large-graph-pan: script duration 1609ms
vue-large-graph-pan: TBT 648ms
vue-large-graph-pan: heap used 164.6 MB
vue-large-graph-pan: DOM nodes -6547
vue-large-graph-pan: event listeners -7459
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 19ms
workflow-execution: layout count 3
workflow-execution: style recalc count 11
workflow-execution: task duration 99ms
workflow-execution: script duration 9ms
workflow-execution: TBT 0ms
workflow-execution: heap used 58.2 MB
workflow-execution: DOM nodes 119
workflow-execution: event listeners 49
Raw data
{
  "timestamp": "2026-07-29T00:21:28.589Z",
  "gitSha": "c109c6083e1986a853617d27bc748e0a48c87542",
  "branch": "drjkl/node-data-store-merge-main",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2082.353000000012,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 6.875000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 573.3190000000001,
      "heapDeltaBytes": -22754804,
      "heapUsedBytes": 45775764,
      "domNodes": -263,
      "jsHeapTotalBytes": 19927040,
      "scriptDurationMs": 21.406000000000002,
      "eventListeners": -135,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-idle",
      "durationMs": 2018.2839999999942,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 7.188999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 502.5470000000001,
      "heapDeltaBytes": -22060660,
      "heapUsedBytes": 46491792,
      "domNodes": -265,
      "jsHeapTotalBytes": 19140608,
      "scriptDurationMs": 20.029999999999994,
      "eventListeners": -137,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1856.9380000000137,
      "styleRecalcs": 74,
      "styleRecalcDurationMs": 36.400999999999996,
      "layouts": 12,
      "layoutDurationMs": 3.1989999999999994,
      "taskDurationMs": 905.091,
      "heapDeltaBytes": -15801068,
      "heapUsedBytes": 52661200,
      "domNodes": -264,
      "jsHeapTotalBytes": 19664896,
      "scriptDurationMs": 166.05800000000002,
      "eventListeners": -137,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1892.1930000000202,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 39.04,
      "layouts": 12,
      "layoutDurationMs": 3.642,
      "taskDurationMs": 945.258,
      "heapDeltaBytes": -12220996,
      "heapUsedBytes": 56350844,
      "domNodes": -264,
      "jsHeapTotalBytes": 19402752,
      "scriptDurationMs": 175.677,
      "eventListeners": -137,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1680.3390000000036,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 14.996999999999998,
      "layouts": 6,
      "layoutDurationMs": 0.6069999999999999,
      "taskDurationMs": 367.819,
      "heapDeltaBytes": 7838136,
      "heapUsedBytes": 76307184,
      "domNodes": 77,
      "jsHeapTotalBytes": 20062208,
      "scriptDurationMs": 22.115000000000002,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1744.782999999984,
      "styleRecalcs": 32,
      "styleRecalcDurationMs": 19.276999999999997,
      "layouts": 6,
      "layoutDurationMs": 0.6250000000000001,
      "taskDurationMs": 419.13800000000003,
      "heapDeltaBytes": 7842400,
      "heapUsedBytes": 76443348,
      "domNodes": 79,
      "jsHeapTotalBytes": 19275776,
      "scriptDurationMs": 28.062,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 692.0910000000049,
      "styleRecalcs": 12,
      "styleRecalcDurationMs": 11.358,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 450.269,
      "heapDeltaBytes": -9823508,
      "heapUsedBytes": 58750928,
      "domNodes": 20,
      "jsHeapTotalBytes": 19800064,
      "scriptDurationMs": 94.01100000000001,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 591.3319999999658,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 7.970999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 398.15599999999995,
      "heapDeltaBytes": -10521880,
      "heapUsedBytes": 57905100,
      "domNodes": 18,
      "jsHeapTotalBytes": 20586496,
      "scriptDurationMs": 83.669,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2026.6500000000178,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 7.167,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 807.566,
      "heapDeltaBytes": 1592152,
      "heapUsedBytes": 71623332,
      "domNodes": -266,
      "jsHeapTotalBytes": 3514368,
      "scriptDurationMs": 240.949,
      "eventListeners": -131,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2055.75900000008,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 6.565000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 816.701,
      "heapDeltaBytes": -130040,
      "heapUsedBytes": 70029024,
      "domNodes": -266,
      "jsHeapTotalBytes": 3252224,
      "scriptDurationMs": 246.49900000000002,
      "eventListeners": -131,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2622.3550000000273,
      "styleRecalcs": 69,
      "styleRecalcDurationMs": 13.808999999999997,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1848.876,
      "heapDeltaBytes": -2008004,
      "heapUsedBytes": 69535372,
      "domNodes": -269,
      "jsHeapTotalBytes": 4243456,
      "scriptDurationMs": 1007.414,
      "eventListeners": -131,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2475.663999999938,
      "styleRecalcs": 68,
      "styleRecalcDurationMs": 12.979000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1821.893,
      "heapDeltaBytes": -7563968,
      "heapUsedBytes": 64443576,
      "domNodes": -269,
      "jsHeapTotalBytes": 4243456,
      "scriptDurationMs": 981.4599999999999,
      "eventListeners": -131,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3785.934999999995,
      "styleRecalcs": 64,
      "styleRecalcDurationMs": 12.729000000000001,
      "layouts": 60,
      "layoutDurationMs": 7.209,
      "taskDurationMs": 1984.1989999999998,
      "heapDeltaBytes": 4671528,
      "heapUsedBytes": 77670084,
      "domNodes": 10,
      "jsHeapTotalBytes": 9756672,
      "scriptDurationMs": 1074.905,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666696,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3784.8520000000008,
      "styleRecalcs": 63,
      "styleRecalcDurationMs": 11.986,
      "layouts": 60,
      "layoutDurationMs": 7.223999999999999,
      "taskDurationMs": 2057.456,
      "heapDeltaBytes": 1774004,
      "heapUsedBytes": 75866244,
      "domNodes": -275,
      "jsHeapTotalBytes": 6135808,
      "scriptDurationMs": 1086.729,
      "eventListeners": -135,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "minimap-idle",
      "durationMs": 2029.5150000000035,
      "styleRecalcs": 6,
      "styleRecalcDurationMs": 5.381999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 808.6499999999999,
      "heapDeltaBytes": 718156,
      "heapUsedBytes": 73104380,
      "domNodes": -267,
      "jsHeapTotalBytes": 2990080,
      "scriptDurationMs": 244.20200000000003,
      "eventListeners": -135,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "minimap-idle",
      "durationMs": 2040.95499999994,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 6.192000000000003,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 836.2850000000001,
      "heapDeltaBytes": 3180784,
      "heapUsedBytes": 75605468,
      "domNodes": -269,
      "jsHeapTotalBytes": 3514368,
      "scriptDurationMs": 246.28399999999996,
      "eventListeners": -131,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 607.1530000000394,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 10.283999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 415.957,
      "heapDeltaBytes": -10779952,
      "heapUsedBytes": 57667728,
      "domNodes": 20,
      "jsHeapTotalBytes": 20848640,
      "scriptDurationMs": 134.579,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 646.9700000000103,
      "styleRecalcs": 44,
      "styleRecalcDurationMs": 8.759999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 434.3739999999999,
      "heapDeltaBytes": -10701836,
      "heapUsedBytes": 57630196,
      "domNodes": 14,
      "jsHeapTotalBytes": 21897216,
      "scriptDurationMs": 140.345,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2006.3769999999863,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 9.005999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 453.04699999999997,
      "heapDeltaBytes": 3766844,
      "heapUsedBytes": 72380764,
      "domNodes": 20,
      "jsHeapTotalBytes": 19800064,
      "scriptDurationMs": 14.705,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2016.4690000000292,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 8.906,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 484.14399999999995,
      "heapDeltaBytes": -22683684,
      "heapUsedBytes": 45794532,
      "domNodes": 20,
      "jsHeapTotalBytes": 19140608,
      "scriptDurationMs": 15.24,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1739.1830000000255,
      "styleRecalcs": 75,
      "styleRecalcDurationMs": 35.11599999999999,
      "layouts": 16,
      "layoutDurationMs": 4.680999999999999,
      "taskDurationMs": 820.097,
      "heapDeltaBytes": -20146260,
      "heapUsedBytes": 48434176,
      "domNodes": -267,
      "jsHeapTotalBytes": 20189184,
      "scriptDurationMs": 109.305,
      "eventListeners": -137,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1742.3570000000836,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 38.669000000000004,
      "layouts": 16,
      "layoutDurationMs": 4.674,
      "taskDurationMs": 824.423,
      "heapDeltaBytes": -21728828,
      "heapUsedBytes": 46755048,
      "domNodes": -265,
      "jsHeapTotalBytes": 20189184,
      "scriptDurationMs": 111.955,
      "eventListeners": -137,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 1366.7609999999968,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 25.34700000000001,
      "layouts": 4,
      "layoutDurationMs": 10.683000000000002,
      "taskDurationMs": 911.8150000000003,
      "heapDeltaBytes": 26892892,
      "heapUsedBytes": 95567700,
      "domNodes": 13671,
      "jsHeapTotalBytes": 15728640,
      "scriptDurationMs": 44.452000000000005,
      "eventListeners": 2383,
      "totalBlockingTimeMs": 152,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 9015.79099999998,
      "styleRecalcs": 248,
      "styleRecalcDurationMs": 35.487,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 6437.844,
      "heapDeltaBytes": 14478360,
      "heapUsedBytes": 85350236,
      "domNodes": -269,
      "jsHeapTotalBytes": 7098368,
      "scriptDurationMs": 3355.098,
      "eventListeners": -115,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 9417.039000000044,
      "styleRecalcs": 250,
      "styleRecalcDurationMs": 37.91,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 6739.154,
      "heapDeltaBytes": 10535840,
      "heapUsedBytes": 81134948,
      "domNodes": -266,
      "jsHeapTotalBytes": 4739072,
      "scriptDurationMs": 3435.562,
      "eventListeners": -115,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 17766.122999999992,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 17749.888,
      "heapDeltaBytes": -11262752,
      "heapUsedBytes": 182279836,
      "domNodes": -6547,
      "jsHeapTotalBytes": 876544,
      "scriptDurationMs": 1101.2569999999998,
      "eventListeners": -7466,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 18302.48199999994,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 18283.547000000002,
      "heapDeltaBytes": -9749248,
      "heapUsedBytes": 181641908,
      "domNodes": -6547,
      "jsHeapTotalBytes": 2682880,
      "scriptDurationMs": 1099.176,
      "eventListeners": -7466,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 19.44333333333343,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 22024.940000000017,
      "styleRecalcs": 162,
      "styleRecalcDurationMs": 22.206999999999976,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 22006.255,
      "heapDeltaBytes": -34780816,
      "heapUsedBytes": 173924640,
      "domNodes": -6547,
      "jsHeapTotalBytes": 4169728,
      "scriptDurationMs": 1623.8709999999999,
      "eventListeners": -7460,
      "totalBlockingTimeMs": 665,
      "frameDurationMs": 18.329999999999927,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 22168.856000000007,
      "styleRecalcs": 161,
      "styleRecalcDurationMs": 22.432999999999982,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 22142.273,
      "heapDeltaBytes": -21384344,
      "heapUsedBytes": 171315604,
      "domNodes": -6547,
      "jsHeapTotalBytes": 2859008,
      "scriptDurationMs": 1593.8750000000002,
      "eventListeners": -7458,
      "totalBlockingTimeMs": 631,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "workflow-execution",
      "durationMs": 111.88099999992573,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 14.496,
      "layouts": 2,
      "layoutDurationMs": 0.3699999999999999,
      "taskDurationMs": 79.33199999999998,
      "heapDeltaBytes": 3301168,
      "heapUsedBytes": 70655336,
      "domNodes": 120,
      "jsHeapTotalBytes": 2883584,
      "scriptDurationMs": 7.367999999999999,
      "eventListeners": 33,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "workflow-execution",
      "durationMs": 456.3150000000178,
      "styleRecalcs": 13,
      "styleRecalcDurationMs": 22.556,
      "layouts": 3,
      "layoutDurationMs": 1.138,
      "taskDurationMs": 118.61200000000001,
      "heapDeltaBytes": -16089776,
      "heapUsedBytes": 51342828,
      "domNodes": 117,
      "jsHeapTotalBytes": 7479296,
      "scriptDurationMs": 10.386,
      "eventListeners": 65,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    }
  ]
}

@socket-security

socket-security Bot commented Jul 26, 2026 •

Copy link
Copy Markdown

@socket-security

socket-security Bot commented Jul 26, 2026 •

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm @emnapi/runtime is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yaml → npm/vue-router@5.2.0 → npm/@emnapi/runtime@1.11.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/@emnapi/runtime@1.11.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

Warn High
Obfuscated code: npm yargs is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: pnpm-lock.yaml → npm/@astrojs/check@0.9.9 → npm/yargs@17.7.3

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/yargs@17.7.3. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@codecov

codecov Bot commented Jul 26, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                    Coverage Diff                    @@
##           drjkl/node-data-store   #14108      +/-   ##
=========================================================
+ Coverage                  66.26%   68.61%   +2.35%     
=========================================================
  Files                       1568     1619      +51     
  Lines                      79862    83255    +3393     
  Branches                   20813    23725    +2912     
=========================================================
+ Hits                       52920    57125    +4205     
+ Misses                     26603    26026     -577     
+ Partials                     339      104     -235     
Flag Coverage Δ
unit 68.61% <ø> (+2.35%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.
see 579 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@DrJKL DrJKL added the New Browser Test Expectations New browser test screenshot should be set by github action label Jul 26, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Updating Playwright Expectations

@github-actions github-actions Bot removed the New Browser Test Expectations New browser test screenshot should be set by github action label Jul 26, 2026
@DrJKL DrJKL added the refactor label Jul 27, 2026
DrJKL and others added 10 commits July 27, 2026 16:33
…vation, GC) (#13528)

## Summary

Fixes the Critical/High findings from the full-stack audit of the ECS PR
series (#13322 → #13498) that are live at the tip; each fix notes the
parent PR where the defect was introduced so it can be evaluated for
sinking down the stack.

## Changes

- **What**: Nine audit fixes, one commit each:
- `refactor: delete unused nodeBadgeStore extension-row API` —
`registerBadge`/`deleteBadge`/`'extension'` kind had zero production
callers; #13460's renderer cutover resolved extension badges as staying
on raw `node.badges`, leaving the API with no future consumer.
*Introduced in #13458, made permanently dead by #13460.*
- `fix: stop first-party reads of the deprecated output.links shim` —
`LGraph.remove()` and the PrimitiveNode proxy-widget migration consumed
the warn-once telemetry budget on every node deletion / workflow load,
so third-party reads could never be observed; also migrates two test
assertions off the input mirror and pins node removal in the
zero-warnings regression test. *Shim and reads introduced in #13479
(`LGraph.remove` read survived #13498's reader migration).*
- `fix: isolate insertWorkflow's scratch graph from live store buckets`
— the throwaway graph adopted the file's serialized id and registered
every node into the root-scoped stores; inserting a workflow with the
open workflow's id bound scratch widgets first-wins to live state and
silently reverted unsaved widget edits; differing ids leaked buckets.
*Store registration paths from #13322 (widgets) and #13458 (badges); the
insert path predates the stack.*
- `fix: preserve null promoted widget values through save, reload, and
reorder` — `isWidgetValue(null)` was false, so promoted nulls were
dropped from `widgets_values` (deleting the key entirely when all values
were null → reload restored interior defaults), read back as
`undefined`, skipped on reorder, and lost through quarantine
fall-through. *Guard and projections from #13322/#13434; completes the
null-preservation work started by `b71340970e`.*
- `fix: make subgraph-definition GC reference-aware for nested
definitions` — removing the last instance of a subgraph stripped badge
registrations and fired removal lifecycle for nested definitions still
instanced elsewhere, while definitions referenced only inside the
removed subtree leaked link topologies, reroute chains, and registry
entries. *Link cleanup from #13436, reroute cleanup from #13449, badge
cleanup from #13458; all shared the non-recursive
`hasRemainingReferences` scope.*
- `fix: convert-to-subgraph registers clone state into vacant store
keys` — `multiClone` keeps node ids, so configuring the new subgraph
while originals were still registered detached every interior link from
linkStore (inputs read disconnected until save+reload), hijacked reroute
chains, and unregistered badge rows. Reproduced at this branch's base.
*Root cause interacts with stores introduced in #13436 (links), #13449
(reroutes), #13458 (badges).*
- `fix: reroute ids can no longer hijack live chain registrations` —
Ctrl+C on a subgraph node configured a live clone whose
identically-numbered reroutes shadowed the live chains; pasting a
subgraph node skipped reroute-id dedup, conflating chains across graphs
and serializing corrupted `parentId` links; `registerReroute` now warns
and refuses foreign overwrites. *`registerReroute` last-wins from
#13449; clipboard/paste paths predate the stack but became destructive
with the store.*
- `fix: dedup keeps the link referenced by serialized input data` —
duplicate-link survivor selection consulted the link store, whose
load-time registration is first-wins by link map order; when a stale
duplicate preceded the referenced link, the referenced link was purged,
and under input slot drift the survivor stayed keyed to the stale slot
so the input read as unconnected (issue #10291 regressed — caught by the
`graph.spec.ts` slot-drift E2E). The serialized node data is now the
survivor authority. *Introduced in #13498 (`selectSurvivorLink`
replacing `fixLinkInputSlots`).*
- `test: assert bypass error-restore on an unlinked interior widget` —
the errors-tab bypass E2E asserted restoration of a missing-model error
on an interior node whose only error-bearing widget was promoted (linked
from the subgraph input); a promoted widget is inert, so the error is
not the interior node's to restore. The test passed pre-#13498 only
because serialized promotion links never populated the `input.link`
mirror, letting the interior scan run against an inert widget by
accident. The asset now carries a second interior loader with an
unlinked missing-model widget, making the restore deterministic in every
environment. *Behavioral change surfaced by #13498 (store-truth
connectivity replacing the mirror).*
- **Breaking**: none — behavior changes are bug fixes; `registerReroute`
refusals warn instead of silently corrupting.

## Review Focus

- `_convertToSubgraphImpl` reordering (boundary disconnects, interior
link/reroute removal now precede `subgraph.configure`; node removal
stays after because `hasRemainingReferences` must see the clone) —
regression probes cover link/reroute/badge registration and widget-value
survival.
- `findReleasableSubgraphs` computes the releasable definition set by
excluding the removed instance from the live-reference walk; lifecycle
fires before unregistration.
- Widget values still survive conversion by first-wins adoption of the
originals' store records (pinned by a probe); an explicit carry-over is
deliberately not added here.
- Every fix landed red-first; suites touched: 143 files / 2,282 tests
green, `pnpm typecheck` clean.

Audit context: findings whose root causes live in parent PRs are
candidates for cherry-picking down the stack instead of landing here —
the audit's sink-down map covers `34a71e80c2`/`7697348c2f` (→ #13436)
and `5d7032cb76`/output half of `2526d1cd58` (→ #13479); those are
already fixed at this tip and intentionally not duplicated in this PR.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Amp <amp@ampcode.com>
Introduce a dedicated node shell-state store (nodeDataStore) holding one
plain NodeState per node in root-graph-scoped buckets, and make LGraphNode
adopt the store's reactive proxy as _state via the LLink/Reroute trio
pattern. id/type/title/mode/flags/color/bgcolor/shape/resizable/showAdvanced
become accessors over _state; LGraph add/remove/clear and subgraph teardown
register/unregister/clear the store. LGraphNodeProperties instrumentation is
redirected to write through _state instead of shadowing closures.

Scalar getters read through a toRaw view (_stateRaw) so hot litegraph and
legacy-canvas paths skip the reactive proxy trap; flags keeps the reactive
proxy for nested-mutation tracking.

Foundation only; the VueNodeData mirror and useGraphNodeManager sync logic
are removed in a follow-up commit.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Replace the VueNodeData snapshot map and its node:property:changed sync
handlers with direct consumption of the NodeState store proxy. GraphCanvas
now sources nodes from nodeDataStore.getGraphNodesFor(rootGraphId, graphId);
the prop-drilled components retype from VueNodeData to NodeState.

Fields the store excludes migrate to their owners: hasErrors -> live
node.has_errors, inputs/outputs -> live node (with the shallowReactive slot
graft relocated into the slimmed useGraphNodeManager), subgraphId derived
from graphId via subgraphIdFromGraphId. useGraphNodeManager keeps only the
layout seeding, slot graft, and slot-label reprojection; extractVueNodeData,
the vueNodeData map, syncWithGraph, and the property-sync handlers are gone.

Node replacement registers/unregisters node state by hand since it bypasses
graph.add. NodeSlots gains inputs/outputs override props for synthetic
preview nodes with no live graph node.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Drop the _stateRaw raw-view mirror so LGraphNode scalar getters read the
reactive _state proxy directly - node.title/mode/color/etc now track in
Vue effects, matching NodeState (computeExecutionOrder hoists id locally
for its tight loop).

Make node type read-only across all node classes now that _state backs
it: configure special-cases type like id, createNode and the missing-node
placeholder write _state.type, redundant SubgraphNode assignment removed.

Consolidate the duplicated { id, subgraphId } locator shape into
nodeLocatorFromState. Escalate the node-data-store registration-collision
log to console.error. Document the enumerability change and type
immutability for extension authors.
Object.create(SubgraphNode.prototype) skips the constructor, so the node has
no _state; assigning id then hit the store-backed accessor on undefined. Seed
_state/_stateRaw on the mock and read id through them.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@DrJKL
DrJKL force-pushed the drjkl/node-data-store-merge-main branch from a842338 to 64d12b6 Compare July 27, 2026 23:52
@DrJKL DrJKL added the New Browser Test Expectations New browser test screenshot should be set by github action label Jul 28, 2026
@github-actions github-actions Bot removed the New Browser Test Expectations New browser test screenshot should be set by github action label Jul 28, 2026
DrJKL and others added 22 commits July 28, 2026 00:08
Applies review feedback to the node-data store.

- Slots move onto NodeState. The parallel graphNodeSlots map was keyed
  identically to graphNodeStates and written, deleted and cleared at the
  same three chokepoints; node.inputs and the store now read one array.
- The store keys membership by state identity rather than node id, so a
  renumbered node cannot strand its entry. That retires the collision
  refusal, its ownership guard, and getNode, whose only caller already
  held the state as a prop.
- LGraphNodeProperties is deleted. It bolted change events onto six
  properties that shape already emitted from its own setter; all six now
  go through one helper that skips the emit when nothing changed.
- Error state is derived in one place. LGraphNode.vue and
  useProcessedWidgets both read node.has_errors, a plain class field the
  stores write into, so Vue never re-ran the guard and the state latched.
- One locator vocabulary: locatorIdFromState replaces the {id, subgraphId}
  shape that callers holding a NodeState had to hand-build.

Fixes found while doing the above:

- configure no longer reinstates a serialised id over one the graph
  assigned, which rendered a duplicate id as a phantom node.
- unregisterAllNodeStates recurses into subgraph definitions, so clear()
  cannot leak them.
- subgraphIdFromState returns null when the root graph is unknown instead
  of misreporting a root node as subgraph-owned.
- createNode's type write moved inside the exception guard.
- The advanced-inputs toggle works both ways for subgraph nodes; its
  getter was always false, so closePanel was unreachable.
- checkNodeTypes deleted; it had no callers and bypassed registration.
- appModeBuilder waited on the error overlay, which only renders when
  Comfy.RightSidePanel.ShowErrorsTab is set. Wait on the node's error ring
  instead: it is the user-visible signal that the store took the error, and
  it keeps the builder assertions from racing the response.
- The duplicate-id fixture placed both nodes under the topbar overlay, so
  the select click was intercepted. Move them clear of it.
- Revert the two minimap edits. hasData() asks whether the viewed graph has
  nodes to draw, which is not the same question as whether layoutStore has
  caught up with them, and deriving the change-detection count from
  getNodes() was a cosmetic tidy with no defect behind it.
Seeding a real validation error costs a queue round trip, which pushed the
combined errors-and-notes test past 15s at its second enterBuilder(). They
are two behaviours; run them as two tests.
`LGraph.add` dispatches `node:added` synchronously from inside
`LGraph.configure`'s create loop, so the minimap's leading-edge throttle
derives bounds from a one-node graph before any node is configured.

Reloading the same workflow leaves the node count and every per-node
geometry string identical, so change detection cannot tell those bounds
are stale, and the minimap draws every node against a one-node frame.

Until now an accident papered over it: the old property instrumentation
emitted `node:property:changed` on every write, and `configure` writes an
unchanged `mode` per node, so the minimap's cache got invalidated by
events that carried no change. Suppressing no-op emits removed the crutch.

Reset the change-detection caches on `configured` instead, which is the
signal that actually means "the graph you measured is not the graph you
have".
The test now seeds a real validation error instead of poking has_errors,
which costs a prompt round trip on top of two setting changes. That does
not fit the 15s per-test budget, and it timed out at enterBuilder.
A failed prompt raises the modal error dialog unless the errors tab is on
(app.ts:1754), and a modal makes the rest of the page inert — so
`getByRole('button', { name: 'Workflow actions' })` found nothing even
though the button was in the DOM.

Every failure of this test so far was that dialog, not slowness: the first
attempt dismissed the wrong component, and the 15s and 45s timeouts were
both spent waiting on a button behind the modal.

Enable the errors overlay so the failure surfaces as the dismissible
overlay, and dismiss it before entering the builder.
LayoutStoreDataSource.hasData() counted registered node states while
getNodes() dropped any state without a layout entry, so a registered but
unseeded node reported data with nothing to draw. Both callers gate on
hasData(), so they would proceed to bounds over an empty list.

Also from review:
- share NodeLifecycleEvent from LGraphEventMap instead of redeclaring it
  in useVueNodeLifecycle and useErrorClearingHooks
- give useVueNodeLifecycle.test reactive mocks and a per-test effect
  scope; the shared composable leaked isInitialized across tests, so the
  dispose test passed with a graph that was never wired up
- assert the unregister-before-register handoff in useNodeReplacement
- correct the migration plan's claim that every store keys on a
  composite string ID

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The plan's key-format table and the slot-array section both described a
design that did not ship: buckets hold a `Set<NodeState>` keyed by state
identity, not by `NodeId`, and the slot arrays live on `NodeState` rather
than in a sibling map.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`LGraphNode`'s constructor already takes `(title, type)`, so 26 test
sites were reaching past the read-only `type` getter into `_state` to
finish building a node the constructor could have built outright. The
three remaining `_state.type` writes are production code.

Also from review:
- tag the two Vue-nodes builder specs `@vue-nodes` rather than setting
  `Comfy.VueNodes.Enabled` mid-test; the tag applies it during fixture
  setup and makes `loadWorkflow` wait for the nodes
- use the same-name shorthand for `:node-data` and destructure
  `rootGraphId` in GraphCanvas

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The tag applies `Comfy.VueNodes.Enabled` during fixture setup, before the
app loads, and makes `loadWorkflow` wait for the nodes to render. Setting
it from inside the test body does neither.

Covers the specs this branch already touches; the rest of browser_tests
still sets the setting by hand.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`this._node.inputs.indexOf(this)` appeared three times in NodeInputSlot
and the outputs equivalent three times in NodeOutputSlot, once per
link-store lookup. Name it once per class.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`toJSON` and the deprecated `link` / `links` mirrors each rebuilt the
same store lookup, guard included. Name it once per class: `linkId` on
the input slot, `linkIds` on the output.

`isConnected` keeps calling inputHasLink / outputHasLinks, which reach
cheaper store predicates than materialising and sorting the ids.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`index`, `linkId` and `linkIds` were added as getter-only accessors on
the slot prototypes. `NodeSlot`'s constructor does `Object.assign(this,
rest)` over the whole serialized slot, so any slot carrying one of those
keys threw `TypeError: Cannot set property index of #<NodeOutputSlot>
which has only a getter` — the same trap the `link` / `links` strips in
both constructors already guard against, which is why they are stripped
by hand.

Move them to module-local functions: no prototype surface, so nothing to
collide with, and no new public API next to the deprecated mirrors.
Regression test covers construction from a slot with unknown keys.

`link` / `links` stay as class accessors. They have setters, so
`Object.assign` cannot throw on them, and they keep warning for external
callers.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
The blocks on `_state`, `inputs`, `widgets`, `registerNodeState` and the
slot proxy explained mechanism and rationale at length. Keep the part a
caller can act on — assignment splices, mutate widgets in place — and
drop the rest.

Also assert the node:added / node:removed listeners with `vi.fn()` and
`toHaveReturnedWith` instead of encoding the fire-time state into a
string.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
MinimapDataSource.test.ts had its own createMockGraph, createMockLinks
and graphNode, each ending in `as unknown as`. All three already exist in
litegraphTestUtils, so use those and drop the casts.

createMockLGraph gains the pieces the minimap needed — node list, groups,
links, a getNodeById wired from the nodes, and a self-referencing
rootGraph — and both it and createMockLGraphNode build through
shoehorn's fromPartial rather than a double cast. Same for
createMockLoadedWorkflow, the last `as unknown as` in the file.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Required fields first, then optional, alphabetical within each group;
the `_state` literal in the LGraphNode ctor and `createNodeState` follow
the same order, as does the nodeDataStore return object.

Comments cut to what the code cannot say: the NodeState header, the
store header, and `nodeHasError` — which keeps only the note that
`has_errors` is deliberately not consulted.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Also folds the duplicate inline instanceof check in the reordering test
into the same helper.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`mountLifecycle` returns null rather than throwing, and the two
"expected a link" guards become `expect(...).not.toBeNull()` — an
assertion is what they were standing in for. The two widget-state guards
go away entirely; `state?.value` reads the same and a missing state still
fails the assertion below.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
…ack/merge-main

# Conflicts:
#	src/renderer/extensions/minimap/composables/useMinimapGraph.ts
`LGraph.add` registers node shell state, which needs a store. The test
arrived from main, where `add` had no such dependency.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
`LGraph.add` no longer seeds layoutStore — the renderer's event
listeners do — so a test that never mounts the renderer has no entry to
assert against. The test came from main, where `add` still seeded.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
Base automatically changed from drjkl/node-data-store to feature/ecs-migration July 29, 2026 00:49
@DrJKL
DrJKL force-pushed the feature/ecs-migration branch from 6d1cd8e to 96ba092 Compare July 29, 2026 04:18
@DrJKL

DrJKL commented Jul 29, 2026

Copy link
Copy Markdown
Contributor Author

Superseded by the rebase of feature/ecs-migration onto current main (now 96ba092d3e, one collapsed commit).

This branch's payload — the node-data-store work — already landed in the feature branch via the #13963 squash, and merging this back would have re-derived it from before that squash existed. Its two genuine integration fixes were independently rediscovered while resolving the rebase, so both are already in the tree:

  • setActivePinia in collections.test.ts — LGraph.add now registers node shell state, which needs a store
  • explicit layout seeding in nodeSizeReflow.test.ts — LGraph.add no longer seeds layoutStore

#14110 has been retargeted onto feature/ecs-migration directly, removing this layer from the stack. CI evidence for the rebased tree is on #14240.

Pre-rebase state is preserved at backup/ecs-pre-rebase (both a tag and a branch on origin).

@DrJKL DrJKL closed this Jul 29, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants