Skip to content

fix: ECS stack audit fixes (store desync, reroute hijack, null preservation, GC) - #13528

Merged
DrJKL merged 23 commits into
feature/ecs-migrationfrom
drjkl/ecs-stack-audit-fixes
Jul 27, 2026
Merged

DrJKL merged 23 commits into
feature/ecs-migrationfrom
drjkl/ecs-stack-audit-fixes

Conversation

@DrJKL

@DrJKL DrJKL commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

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

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.

@dosubot dosubot Bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Jul 8, 2026
@coderabbitai

coderabbitai Bot commented Jul 8, 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: a3636cae-4a05-4066-8c98-eef9bb98d91d

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
🚥 Pre-merge checks | ✅ 6
✅ Passed checks (6 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
End-To-End Regression Coverage For Fixes ✅ Passed Bug-fix language is present, but the PR also changes a browser_tests asset, so the fail criteria aren’t all met.
Adr Compliance For Entity/Litegraph Changes ✅ Passed No ADR 0003/0008 red flags in the PR metadata: no direct entity-state mutation, no new LGraph/LGraphNode/Subgraph API growth, and no serialize/version or listed extension-callback changes.
Title check ✅ Passed The title is concise and accurately summarizes the main audit-fix changes across store, reroute, null, and GC behavior.
Description check ✅ Passed The description follows the template well with Summary, Changes, and Review Focus sections and covers the key implementation details.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch drjkl/ecs-stack-audit-fixes

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

@github-actions

github-actions Bot commented Jul 8, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 07/27/2026, 11:30:11 PM UTC

Links

🎭 Playwright: ✅ 1693 passed, 0 failed · 1 flaky

📊 Browser Reports
  • chromium: View Report (✅ 1672 / ❌ 0 / ⚠️ 1 / ⏭️ 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)

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 59.2 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 57.9 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 61.9 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 47.4 MB heap
large-graph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 54.0 MB heap
large-graph-pan: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 71.9 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 69.7 MB heap
minimap-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 70.5 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.0 MB heap
subgraph-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 60.0 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 53.2 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 141ms TBT · 73.1 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 65.2 MB heap
vue-large-graph-idle: · 58.1 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 159.3 MB heap
vue-large-graph-pan: · 56.3 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 23ms TBT · 162.8 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 48.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 9ms
canvas-idle: layout count 0
canvas-idle: style recalc count 10
canvas-idle: task duration 401ms
canvas-idle: script duration 23ms
canvas-idle: TBT 0ms
canvas-idle: heap used 59.2 MB
canvas-idle: DOM nodes -127
canvas-idle: event listeners -97
canvas-mouse-sweep: avg frame time 17ms
canvas-mouse-sweep: p95 frame time 17ms
canvas-mouse-sweep: layout duration 4ms
canvas-mouse-sweep: style recalc duration 41ms
canvas-mouse-sweep: layout count 12
canvas-mouse-sweep: style recalc count 74
canvas-mouse-sweep: task duration 815ms
canvas-mouse-sweep: script duration 131ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 57.9 MB
canvas-mouse-sweep: DOM nodes -76
canvas-mouse-sweep: event listeners -98
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 16ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 32
canvas-zoom-sweep: task duration 335ms
canvas-zoom-sweep: script duration 24ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 61.9 MB
canvas-zoom-sweep: DOM nodes -69
canvas-zoom-sweep: event listeners -83
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 7ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 10
dom-widget-clipping: task duration 375ms
dom-widget-clipping: script duration 62ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 47.4 MB
dom-widget-clipping: DOM nodes -274
dom-widget-clipping: event listeners -203
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 8ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 9
large-graph-idle: task duration 659ms
large-graph-idle: script duration 212ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 54.0 MB
large-graph-idle: DOM nodes -268
large-graph-idle: event listeners -198
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 18ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 69
large-graph-pan: task duration 1322ms
large-graph-pan: script duration 681ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 71.9 MB
large-graph-pan: DOM nodes 15
large-graph-pan: event listeners 6
large-graph-zoom: avg frame time 17ms
large-graph-zoom: p95 frame time 17ms
large-graph-zoom: layout duration 8ms
large-graph-zoom: style recalc duration 17ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 63
large-graph-zoom: task duration 1611ms
large-graph-zoom: script duration 841ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 69.7 MB
large-graph-zoom: DOM nodes 7
large-graph-zoom: event listeners 9
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 8
minimap-idle: task duration 602ms
minimap-idle: script duration 205ms
minimap-idle: TBT 0ms
minimap-idle: heap used 70.5 MB
minimap-idle: DOM nodes 15
minimap-idle: event listeners 5
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 11ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 48
subgraph-dom-widget-clipping: task duration 357ms
subgraph-dom-widget-clipping: script duration 130ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 67.0 MB
subgraph-dom-widget-clipping: DOM nodes 21
subgraph-dom-widget-clipping: event listeners 6
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 11
subgraph-idle: task duration 404ms
subgraph-idle: script duration 15ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 60.0 MB
subgraph-idle: DOM nodes -269
subgraph-idle: event listeners -198
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 4ms
subgraph-mouse-sweep: style recalc duration 36ms
subgraph-mouse-sweep: layout count 16
subgraph-mouse-sweep: style recalc count 76
subgraph-mouse-sweep: task duration 687ms
subgraph-mouse-sweep: script duration 93ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 53.2 MB
subgraph-mouse-sweep: DOM nodes -223
subgraph-mouse-sweep: event listeners -197
subgraph-transition-enter: avg frame time 17ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 14ms
subgraph-transition-enter: style recalc duration 32ms
subgraph-transition-enter: layout count 14
subgraph-transition-enter: style recalc count 18
subgraph-transition-enter: task duration 737ms
subgraph-transition-enter: script duration 23ms
subgraph-transition-enter: TBT 141ms
subgraph-transition-enter: heap used 73.1 MB
subgraph-transition-enter: DOM nodes 13673
subgraph-transition-enter: event listeners 2533
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 56ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 251
viewport-pan-sweep: task duration 4697ms
viewport-pan-sweep: script duration 2259ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 65.2 MB
viewport-pan-sweep: DOM nodes -265
viewport-pan-sweep: event listeners -153
vue-large-graph-idle: avg frame time 17ms
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 13172ms
vue-large-graph-idle: script duration 930ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 159.3 MB
vue-large-graph-idle: DOM nodes -3300
vue-large-graph-idle: event listeners -16371
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 108
vue-large-graph-pan: task duration 16495ms
vue-large-graph-pan: script duration 1331ms
vue-large-graph-pan: TBT 23ms
vue-large-graph-pan: heap used 162.8 MB
vue-large-graph-pan: DOM nodes -3300
vue-large-graph-pan: event listeners -16374
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 26ms
workflow-execution: layout count 5
workflow-execution: style recalc count 17
workflow-execution: task duration 181ms
workflow-execution: script duration 18ms
workflow-execution: TBT 0ms
workflow-execution: heap used 48.2 MB
workflow-execution: DOM nodes -151
workflow-execution: event listeners -133
Raw data
{
  "timestamp": "2026-07-27T22:55:43.564Z",
  "gitSha": "9811b6fc5b8b7518cc3288fbaf10ee57e9b3598a",
  "branch": "drjkl/ecs-stack-audit-fixes",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2089.2960000000185,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 7.931999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 439.01800000000003,
      "heapDeltaBytes": -6574548,
      "heapUsedBytes": 63942124,
      "domNodes": -274,
      "jsHeapTotalBytes": 19025920,
      "scriptDurationMs": 25.012,
      "eventListeners": -197,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "canvas-idle",
      "durationMs": 2054.680000000019,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 10.439000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 363.975,
      "heapDeltaBytes": 2044416,
      "heapUsedBytes": 60287856,
      "domNodes": 20,
      "jsHeapTotalBytes": 18350080,
      "scriptDurationMs": 20.461000000000002,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1936.4769999999965,
      "styleRecalcs": 75,
      "styleRecalcDurationMs": 46.553000000000004,
      "layouts": 12,
      "layoutDurationMs": 3.5520000000000005,
      "taskDurationMs": 888.509,
      "heapDeltaBytes": -9741212,
      "heapUsedBytes": 60687968,
      "domNodes": -206,
      "jsHeapTotalBytes": 19025920,
      "scriptDurationMs": 131.49099999999999,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1796.1109999999962,
      "styleRecalcs": 73,
      "styleRecalcDurationMs": 34.936,
      "layouts": 12,
      "layoutDurationMs": 3.5359999999999996,
      "taskDurationMs": 741.666,
      "heapDeltaBytes": -4288156,
      "heapUsedBytes": 60716328,
      "domNodes": 55,
      "jsHeapTotalBytes": 23617536,
      "scriptDurationMs": 130.267,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1714.1500000000178,
      "styleRecalcs": 32,
      "styleRecalcDurationMs": 15.757,
      "layouts": 6,
      "layoutDurationMs": 0.714,
      "taskDurationMs": 303.186,
      "heapDeltaBytes": 2950420,
      "heapUsedBytes": 62364252,
      "domNodes": 79,
      "jsHeapTotalBytes": 24379392,
      "scriptDurationMs": 22.532,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1744.8040000000447,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 16.702,
      "layouts": 6,
      "layoutDurationMs": 0.7869999999999999,
      "taskDurationMs": 366.848,
      "heapDeltaBytes": -3099216,
      "heapUsedBytes": 67475504,
      "domNodes": -217,
      "jsHeapTotalBytes": 14045184,
      "scriptDurationMs": 24.819999999999997,
      "eventListeners": -184,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 575.335999999993,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 6.154000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 370.988,
      "heapDeltaBytes": -1438868,
      "heapUsedBytes": 50994248,
      "domNodes": -270,
      "jsHeapTotalBytes": -135168,
      "scriptDurationMs": 61.794000000000004,
      "eventListeners": -203,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 601.4049999999997,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 7.0600000000000005,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 379.949,
      "heapDeltaBytes": -3755204,
      "heapUsedBytes": 48355228,
      "domNodes": -277,
      "jsHeapTotalBytes": 2224128,
      "scriptDurationMs": 63.17100000000001,
      "eventListeners": -203,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.700000000000273
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2056.9209999999885,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 9.156,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 662.347,
      "heapDeltaBytes": -21052868,
      "heapUsedBytes": 56456384,
      "domNodes": -266,
      "jsHeapTotalBytes": -2019328,
      "scriptDurationMs": 213.614,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2046.057000000019,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 6.279,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 655.642,
      "heapDeltaBytes": -21457132,
      "heapUsedBytes": 56777280,
      "domNodes": -269,
      "jsHeapTotalBytes": -2019328,
      "scriptDurationMs": 209.579,
      "eventListeners": -197,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2138.432000000023,
      "styleRecalcs": 68,
      "styleRecalcDurationMs": 17.885,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1321.443,
      "heapDeltaBytes": 17356956,
      "heapUsedBytes": 75401392,
      "domNodes": 14,
      "jsHeapTotalBytes": 7778304,
      "scriptDurationMs": 685.21,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2122.0879999999624,
      "styleRecalcs": 69,
      "styleRecalcDurationMs": 17.967,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1322.91,
      "heapDeltaBytes": 17085564,
      "heapUsedBytes": 75300076,
      "domNodes": 16,
      "jsHeapTotalBytes": 6729728,
      "scriptDurationMs": 676.1790000000001,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3294.32700000001,
      "styleRecalcs": 62,
      "styleRecalcDurationMs": 15.642000000000003,
      "layouts": 60,
      "layoutDurationMs": 7.7459999999999996,
      "taskDurationMs": 1589.628,
      "heapDeltaBytes": 10805600,
      "heapUsedBytes": 66422140,
      "domNodes": 4,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 837.381,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3284.2509999999834,
      "styleRecalcs": 64,
      "styleRecalcDurationMs": 18.113999999999997,
      "layouts": 60,
      "layoutDurationMs": 8.297,
      "taskDurationMs": 1633.0830000000003,
      "heapDeltaBytes": 17385504,
      "heapUsedBytes": 79761188,
      "domNodes": 10,
      "jsHeapTotalBytes": 6815744,
      "scriptDurationMs": 844.317,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "minimap-idle",
      "durationMs": 1994.0470000000232,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 6.304,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 598.565,
      "heapDeltaBytes": 10214660,
      "heapUsedBytes": 80312032,
      "domNodes": 16,
      "jsHeapTotalBytes": 6610944,
      "scriptDurationMs": 201.23100000000002,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "minimap-idle",
      "durationMs": 2004.7690000000102,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 5.573999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 604.6109999999999,
      "heapDeltaBytes": 8951404,
      "heapUsedBytes": 67550424,
      "domNodes": 14,
      "jsHeapTotalBytes": 5767168,
      "scriptDurationMs": 208.673,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 571.4900000000398,
      "styleRecalcs": 49,
      "styleRecalcDurationMs": 11.681000000000003,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 349.266,
      "heapDeltaBytes": 9598936,
      "heapUsedBytes": 71201324,
      "domNodes": 24,
      "jsHeapTotalBytes": 23855104,
      "scriptDurationMs": 126.02,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.663333333333338,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 565.2380000000221,
      "styleRecalcs": 46,
      "styleRecalcDurationMs": 9.808,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 364.627,
      "heapDeltaBytes": 9943016,
      "heapUsedBytes": 69365144,
      "domNodes": 18,
      "jsHeapTotalBytes": 20971520,
      "scriptDurationMs": 132.985,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66666666666665,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2027.7450000000385,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 8.669,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 401.974,
      "heapDeltaBytes": -7589964,
      "heapUsedBytes": 62918876,
      "domNodes": -269,
      "jsHeapTotalBytes": 19025920,
      "scriptDurationMs": 15.773999999999996,
      "eventListeners": -197,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2030.5629999999724,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 9.398000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 406.339,
      "heapDeltaBytes": -7549728,
      "heapUsedBytes": 62912232,
      "domNodes": -269,
      "jsHeapTotalBytes": 18239488,
      "scriptDurationMs": 14.975999999999999,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1747.4189999999794,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 38.597,
      "layouts": 16,
      "layoutDurationMs": 4.169,
      "taskDurationMs": 702.3159999999999,
      "heapDeltaBytes": -15987548,
      "heapUsedBytes": 54432596,
      "domNodes": -224,
      "jsHeapTotalBytes": 19812352,
      "scriptDurationMs": 91.638,
      "eventListeners": -195,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1733.8040000000206,
      "styleRecalcs": 75,
      "styleRecalcDurationMs": 34.295,
      "layouts": 16,
      "layoutDurationMs": 3.925,
      "taskDurationMs": 670.9209999999999,
      "heapDeltaBytes": 4915432,
      "heapUsedBytes": 57162628,
      "domNodes": -221,
      "jsHeapTotalBytes": 16117760,
      "scriptDurationMs": 93.59100000000001,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 932.7690000000075,
      "styleRecalcs": 18,
      "styleRecalcDurationMs": 31.621000000000002,
      "layouts": 14,
      "layoutDurationMs": 13.989,
      "taskDurationMs": 736.8699999999999,
      "heapDeltaBytes": 328864,
      "heapUsedBytes": 76599988,
      "domNodes": 13673,
      "jsHeapTotalBytes": 16252928,
      "scriptDurationMs": 23.240999999999996,
      "eventListeners": 2533,
      "totalBlockingTimeMs": 141,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8164.756000000011,
      "styleRecalcs": 251,
      "styleRecalcDurationMs": 56.335,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 4676.129000000001,
      "heapDeltaBytes": 10666576,
      "heapUsedBytes": 81870732,
      "domNodes": -266,
      "jsHeapTotalBytes": 3080192,
      "scriptDurationMs": 2271.2279999999996,
      "eventListeners": -183,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8203.792999999905,
      "styleRecalcs": 251,
      "styleRecalcDurationMs": 55.547,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 4718.192,
      "heapDeltaBytes": -3545488,
      "heapUsedBytes": 54799416,
      "domNodes": -263,
      "jsHeapTotalBytes": 8667136,
      "scriptDurationMs": 2245.8509999999997,
      "eventListeners": -122,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 13116.300000000025,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 13097.957,
      "heapDeltaBytes": -32921088,
      "heapUsedBytes": 165489236,
      "domNodes": -3300,
      "jsHeapTotalBytes": 10223616,
      "scriptDurationMs": 925.4219999999999,
      "eventListeners": -16366,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.223333333333358,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 13261.854999999969,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 13245.543999999998,
      "heapDeltaBytes": -27379368,
      "heapUsedBytes": 168552252,
      "domNodes": -3300,
      "jsHeapTotalBytes": 14913536,
      "scriptDurationMs": 933.7979999999999,
      "eventListeners": -16376,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.223333333333237,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 16479.255000000023,
      "styleRecalcs": 105,
      "styleRecalcDurationMs": 21.311000000000025,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 16459.515,
      "heapDeltaBytes": -45683396,
      "heapUsedBytes": 168451476,
      "domNodes": -3300,
      "jsHeapTotalBytes": 8622080,
      "scriptDurationMs": 1339.545,
      "eventListeners": -16376,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666763,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 16550.415000000045,
      "styleRecalcs": 111,
      "styleRecalcDurationMs": 22.40000000000003,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 16530.523,
      "heapDeltaBytes": -23650104,
      "heapUsedBytes": 172969556,
      "domNodes": -3300,
      "jsHeapTotalBytes": 8536064,
      "scriptDurationMs": 1323.1770000000001,
      "eventListeners": -16372,
      "totalBlockingTimeMs": 45,
      "frameDurationMs": 17.776666666666642,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "workflow-execution",
      "durationMs": 515.4899999999998,
      "styleRecalcs": 18,
      "styleRecalcDurationMs": 27.898,
      "layouts": 5,
      "layoutDurationMs": 1.515,
      "taskDurationMs": 210.44299999999998,
      "heapDeltaBytes": -21909504,
      "heapUsedBytes": 49471928,
      "domNodes": -161,
      "jsHeapTotalBytes": 4608000,
      "scriptDurationMs": 18.474999999999998,
      "eventListeners": -134,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666682,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "workflow-execution",
      "durationMs": 489.6210000000565,
      "styleRecalcs": 15,
      "styleRecalcDurationMs": 23.399000000000004,
      "layouts": 5,
      "layoutDurationMs": 1.4289999999999998,
      "taskDurationMs": 151.22999999999996,
      "heapDeltaBytes": -2199868,
      "heapUsedBytes": 51559260,
      "domNodes": -140,
      "jsHeapTotalBytes": -921600,
      "scriptDurationMs": 17.326,
      "eventListeners": -132,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    }
  ]
}

@codecov

codecov Bot commented Jul 8, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                   Coverage Diff                    @@
##             feature/ecs-migration   #13528   +/-   ##
========================================================
  Coverage                         ?   78.59%           
========================================================
  Files                            ?     1655           
  Lines                            ?   111318           
  Branches                         ?    39957           
========================================================
  Hits                             ?    87489           
  Misses                           ?    22988           
  Partials                         ?      841           
Flag Coverage Δ
unit 66.23% <99.03%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

Files with missing lines Coverage Δ
...onents/rightSidePanel/parameters/WidgetActions.vue 84.05% <100.00%> (ø)
src/extensions/core/widgetInputs.ts 73.59% <100.00%> (ø)
src/lib/litegraph/src/LGraph.ts 91.46% <ø> (ø)
src/lib/litegraph/src/LGraphCanvas.ts 72.22% <ø> (ø)
src/lib/litegraph/src/node/NodeOutputSlot.ts 79.06% <ø> (ø)
src/lib/litegraph/src/subgraph/SubgraphNode.ts 87.48% <100.00%> (ø)
...graph/src/subgraph/__fixtures__/subgraphHelpers.ts 96.83% <100.00%> (ø)
...ib/litegraph/src/subgraph/subgraphDeduplication.ts 96.00% <100.00%> (ø)
src/lib/litegraph/src/subgraph/subgraphUtils.ts 93.17% <100.00%> (ø)
...platform/workflow/core/services/workflowService.ts 95.83% <100.00%> (ø)
... and 3 more
🚀 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 refactor New Browser Test Expectations New browser test screenshot should be set by github action labels Jul 9, 2026
@github-actions

github-actions Bot commented Jul 9, 2026

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 9, 2026
@dosubot dosubot Bot added size:XS This PR changes 0-9 lines, ignoring generated files. and removed size:L This PR changes 100-499 lines, ignoring generated files. labels Jul 9, 2026
@DrJKL DrJKL added the New Browser Test Expectations New browser test screenshot should be set by github action label Jul 9, 2026
@github-actions github-actions Bot removed the New Browser Test Expectations New browser test screenshot should be set by github action label Jul 9, 2026
@DrJKL DrJKL added the New Browser Test Expectations New browser test screenshot should be set by github action label Jul 9, 2026
@github-actions github-actions Bot removed the New Browser Test Expectations New browser test screenshot should be set by github action label Jul 9, 2026
@DrJKL DrJKL added the preview label Jul 10, 2026
@DrJKL
DrJKL force-pushed the drjkl/input-link-mirror branch from 9952026 to 9446519 Compare July 14, 2026 06:55
@DrJKL
DrJKL force-pushed the drjkl/ecs-stack-audit-fixes branch from 859b9d6 to 247a064 Compare July 14, 2026 07:03
@DrJKL
DrJKL force-pushed the drjkl/input-link-mirror branch from 9446519 to 0d9ba7f Compare July 16, 2026 01:39
@DrJKL
DrJKL force-pushed the drjkl/ecs-stack-audit-fixes branch from 247a064 to a33e981 Compare July 16, 2026 01:50
@DrJKL
DrJKL force-pushed the drjkl/input-link-mirror branch from 0d9ba7f to 9f6112e Compare July 18, 2026 00:37
@DrJKL
DrJKL force-pushed the drjkl/ecs-stack-audit-fixes branch from 51ac692 to 53cc9a5 Compare July 18, 2026 00:37
@DrJKL
DrJKL force-pushed the drjkl/input-link-mirror branch from 9f6112e to f0614c8 Compare July 19, 2026 05:36
pull Bot pushed a commit to Mu-L/ComfyUI_frontend that referenced this pull request Jul 21, 2026
…Comfy-Org#13851)

## Summary

Fixes BUG-001b (QA: Ali A-2/A-5): custom-node multiline widgets render
but show no value — pythongosssss Show Text and ltdrdata
ImpactWildcardProcessor `populated_text` stay blank on 1.47, though the
serialized prompt is correct. Works on 1.45.21.

## Changes

- **What**: multiline (`customtext`) DOM widgets read their displayed
value exclusively from `widgetValueStore` (Vue Nodes; `SafeWidgetData`
omits `value`), but `useStringWidget`'s `setValue` only wrote the store
`if (widgetState)` — so imperative / execution-time value writes
(`widget.value = x` → `domWidget.ts` `set value` → `options.setValue`)
never reached the display when no entry existed yet. Serialization
stayed correct via the `inputEl.value` fallback in `getValue`, which is
why the prompt was right but the node blank. Now `setValue` registers
the value when no entry exists.
- **Breaking**: none.

## Review Focus

- @DrJKL — this is in the DOM-widget store-binding you're reworking (ECS
Comfy-Org#13528 series). Litegraph Comfy-Org#2902 (sync dom widget store on remove) landed
the delete-on-remove half; this is the write-into-store half. **Please
confirm this fits your rework / doesn't conflict, or fold it in.** If
the fuller fix belongs in your series, happy to close this stopgap.
- Metadata: the fallback registration uses `type: 'customtext'` + the
widget's current options; label/serialize/disabled default until the
widget's normal registration reconciles. Flagging in case those should
be carried through.

Unit test drives the real `setValue` closure and asserts the value lands
in the store when no entry exists.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@DrJKL
DrJKL force-pushed the drjkl/ecs-stack-audit-fixes branch from 643c7ed to 1c3c6fe Compare July 24, 2026 07:21
Comment on lines +10 to +12
// widgetInputs registers a ComfyUI extension at module load, which needs an
// active pinia, so it is imported per-test rather than at module scope.
async function loadPrimitiveNode() {

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@christian-byrne This might be something we want to account for (and maybe prohibit) with the new API.

get(this: NodeOutputSlot): readonly LinkId[] | null {
warnDeprecated(
'output.links is deprecated. Read connectivity via node.isOutputConnected(slot) / node.getOutputNodes(slot); mutate via node.connect() / node.disconnectOutput().'
'output.links is deprecated. Read connectivity via node.isOutputConnected(slot) / node.getOutputNodes(slot); enumerate links via outputLinks(graph, node.id, slot); mutate via node.connect() / node.disconnectOutput().'

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Once we have the API and docs, we can swap this list for a URL.
Alternatively, I could try moving up some of the documentation into a markdown file we could point users/devs to.

DrJKL and others added 3 commits July 24, 2026 14:30
Extract duplicated node factories out of individual test modules into
__fixtures__/nodeHelpers.ts (createTestNode, createTestWidgetNode) and add
enableSubgraphNodeCreation to subgraphHelpers, replacing three copies.

The copies that cleaned up were subtly broken: unregisterNodeType deletes by
base_class.type, which only registerNodeType sets, so pairing it with a raw
registry write removes the key "undefined" and leaves the real entry. The
shared helper raw-writes and raw-deletes to match.
The badge store the test was named for no longer exists: it was
superseded by derive-on-read (nodeBadges(node), a per-node-instance
WeakMap of lazy computeds in badgeSystem). Nothing registers, so the
test only asserted that convertToSubgraph does not throw. Subgraph
badge derivation is covered by badgeSystem.subgraph.test.ts.

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

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/stores/rerouteStore.test.ts`:
- Around line 73-79: Add an assertion in the test around registerReroute and
deleteReroute to verify that deleteReroute(graphA, usurper) is rejected before
the legitimate owner deletion. Keep the existing owner deletion assertion
unchanged so both the ownership guard and valid deletion path are covered.
- Around line 67-81: Move the console.warn spy cleanup from the test body into
an afterEach hook or a try/finally block surrounding the test assertions. Ensure
warn.mockRestore() always executes when the test fails, while preserving the
existing assertions and spy behavior.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: 21672be0-107d-4085-a000-dbc85b131cc7

📥 Commits

Reviewing files that changed from the base of the PR and between e738492 and 19e52bd.

⛔ Files ignored due to path filters (2)
  • browser_tests/tests/vueNodes/interactions/canvas/pan.spec.ts-snapshots/vue-nodes-paned-with-touch-mobile-chrome-linux.png is excluded by !**/*.png
  • browser_tests/tests/vueNodes/nodeStates/colors.spec.ts-snapshots/vue-node-custom-colors-light-all-colors-chromium-linux.png is excluded by !**/*.png
📒 Files selected for processing (32)
  • browser_tests/assets/missing/missing_models_in_subgraph.json
  • docs/architecture/node-badge-store.md
  • src/components/rightSidePanel/parameters/WidgetActions.test.ts
  • src/components/rightSidePanel/parameters/WidgetActions.vue
  • src/core/graph/subgraph/migration/proxyWidgetMigration.test.ts
  • src/extensions/core/widgetInputs.test.ts
  • src/extensions/core/widgetInputs.ts
  • src/lib/litegraph/src/LGraph.inputSlotRealign.test.ts
  • src/lib/litegraph/src/LGraph.test.ts
  • src/lib/litegraph/src/LGraph.ts
  • src/lib/litegraph/src/LGraphCanvas.clipboard.test.ts
  • src/lib/litegraph/src/LGraphCanvas.ts
  • src/lib/litegraph/src/Reroute.store.test.ts
  • src/lib/litegraph/src/__fixtures__/nodeHelpers.ts
  • src/lib/litegraph/src/node/NodeOutputSlot.ts
  • src/lib/litegraph/src/subgraph/SubgraphConversion.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphNode.ts
  • src/lib/litegraph/src/subgraph/SubgraphSerialization.test.ts
  • src/lib/litegraph/src/subgraph/SubgraphWidgetPromotion.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/README.md
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.test.ts
  • src/lib/litegraph/src/subgraph/__fixtures__/subgraphHelpers.ts
  • src/lib/litegraph/src/subgraph/subgraphDeduplication.ts
  • src/lib/litegraph/src/subgraph/subgraphUtils.ts
  • src/platform/workflow/core/services/workflowService.insertWorkflow.test.ts
  • src/platform/workflow/core/services/workflowService.ts
  • src/stores/linkStore.test.ts
  • src/stores/linkStore.ts
  • src/stores/rerouteStore.test.ts
  • src/stores/rerouteStore.ts
  • src/utils/linkFixer.test.ts
  • src/utils/linkFixer.ts

Comment thread src/stores/rerouteStore.test.ts Resolved
Comment thread src/stores/rerouteStore.test.ts Resolved
dante01yoon pushed a commit that referenced this pull request Jul 27, 2026
…#13851)

## Summary

Fixes BUG-001b (QA: Ali A-2/A-5): custom-node multiline widgets render
but show no value — pythongosssss Show Text and ltdrdata
ImpactWildcardProcessor `populated_text` stay blank on 1.47, though the
serialized prompt is correct. Works on 1.45.21.

## Changes

- **What**: multiline (`customtext`) DOM widgets read their displayed
value exclusively from `widgetValueStore` (Vue Nodes; `SafeWidgetData`
omits `value`), but `useStringWidget`'s `setValue` only wrote the store
`if (widgetState)` — so imperative / execution-time value writes
(`widget.value = x` → `domWidget.ts` `set value` → `options.setValue`)
never reached the display when no entry existed yet. Serialization
stayed correct via the `inputEl.value` fallback in `getValue`, which is
why the prompt was right but the node blank. Now `setValue` registers
the value when no entry exists.
- **Breaking**: none.

## Review Focus

- @DrJKL — this is in the DOM-widget store-binding you're reworking (ECS
#13528 series). Litegraph #2902 (sync dom widget store on remove) landed
the delete-on-remove half; this is the write-into-store half. **Please
confirm this fits your rework / doesn't conflict, or fold it in.** If
the fuller fix belongs in your series, happy to close this stopgap.
- Metadata: the fallback registration uses `type: 'customtext'` + the
widget's current options; label/serialize/disabled default until the
widget's normal registration reconciles. Flagging in case those should
be carried through.

Unit test drives the real `setValue` closure and asserts the value lands
in the store when no entry exists.

Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
for (const output of outputs) this.addOutput('output_' + o++, output)
}
}
LiteGraph.registered_node_types[type] = TestNode

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
LiteGraph.registered_node_types[type] = TestNode
LiteGraph.registered_node_types[type] = TestNode
onTestFinished(() => LiteGraph.unregisterNodeType(type))

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aye, each node type planted by this helper is pulled up at test’s end. The cleanup guards constructor identity, lest it uproot a later replacement. Fixed in e2e4a45.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have no idea what's changed in these screenshots

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aye, there was no crop here—only 20–35 stray antialiasing pixels. All three snapshot changes have been returned to the base harvest in e2e4a45.

describe('Convert to Subgraph store integrity', () => {
it('keeps interior and boundary-derived input links registered in the link store', () => {
const rootGraph = createTestRootGraph()
enableSubgraphNodeCreation(rootGraph)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where dispose? (+2 other places in file)

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aye, the three loose ends are tied. Each enableSubgraphNodeCreation disposer is now entrusted to onTestFinished. Fixed in e2e4a45.


const rootGraph = new LGraph()
registerSubgraphNodeTypeOnCreate(rootGraph)
onTestFinished(enableSubgraphNodeCreation(rootGraph))

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is beautiful. I love this.

Comment thread src/lib/litegraph/src/LGraphCanvas.ts Outdated
Comment on lines +4078 to +4080
// Snapshot without Subgraph.clone(): configuring a throwaway live
// subgraph would register its links and reroutes into the same
// root-scoped store buckets as the live subgraph's.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Penance time

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Penance paid, good steward: the three-line sermon has been cut down to a single line in e2e4a45.

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👀 keep going

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thoroughly weeded in f776b2db2. Complete tally follows.

  1. widgetInputs.test.ts — removed the two-line explanation for importing widgetInputs after Pinia setup.
    That setup note was chatter where the import showed the way;
    DrJKL begs pardon for the prose and carted it away.

  2. nodeHelpers.ts — removed the file-level “generic node factories” banner.
    A banner crowned the helpers like a scarecrow over seed;
    Forgive the needless pageantry—the names supply the need.

  3. nodeHelpers.ts — removed the createTestNode registration and round-trip JSDoc.
    The function and its body make the registration sound;
    DrJKL is sorry extra words were strewn upon that ground.

  4. nodeHelpers.ts — removed the createTestWidgetNode JSDoc.
    The widget helper’s purpose was already plainly told;
    Apologies for wrapping simple grain in verbal gold.

  5. subgraphHelpers.ts — removed the enableSubgraphNodeCreation registration/disposer JSDoc.
    Its signature gives the disposer and its body shows the chore;
    DrJKL begs pardon for describing what the code had shown before.

  6. subgraphDeduplication.ts — removed the collectReservedRerouteIds JSDoc.
    The name already gathers every reroute ID to be seen;
    Forgive the second telling—the furrow now is clean.

  7. subgraphUtils.ts — removed the findReleasableSubgraphs lifecycle and ordering JSDoc.
    The live-set filter and post-order helper mark the track;
    DrJKL is sorry prose was sent to walk the selfsame path and back.

  8. linkStore.ts — removed the long indexOrigin reverse-index JSDoc.
    The floating guard, origin key, and toRaw calls tell it all;
    Apologies for raising words where working code should stand tall.

  9. linkStore.ts — removed the one-line unindexOrigin narration.
    The function name and empty-set branch made every action plain;
    DrJKL begs pardon for pouring explanation down an open drain.

  10. rerouteStore.ts — removed the added ownership-guard narrative and expanded return prose from registerReroute.
    The identity check, warning, and early return already mend the fence;
    Forgive the many sentences that merely echoed common sense.

  11. linkFixer.ts — removed the outputLinkIdsOf live-versus-serialized JSDoc.
    The NodeOutputSlot branch cleanly separates the two;
    DrJKL is sorry for narrating what the types present to view.

  12. LGraph.ts — removed the _removeDuplicateLinks tuple, survivor, purge, and return-map JSDoc.
    The helper names and survivorByPurged already carried that lore;
    Apologies for stacking commentary where the code supplied the core.

  13. LGraph.ts — removed the four-line duplicate-link narration before _removeDuplicateLinks().
    A method named for its labor needs no herald for the call;
    DrJKL begs pardon for announcing what was evident to all.

  14. LGraphCanvas.ts — removed the Subgraph.clone()/live-store-bucket explanation completely.
    The sermon shrank, yet even one last line still stood alone;
    Pardon the stubborn remnant—it is finally overthrown.

  15. workflowService.ts — removed the added synthetic-ID/store-isolation explanation.
    The fresh UUID belongs directly in the scratch graph’s deed;
    DrJKL is sorry for appending words the implementation did not need.

The PR now adds zero code comments relative to feature/ecs-migration.

Comment on lines +137 to +139
createMockCanvasRenderingContext2D() as unknown as ReturnType<
HTMLCanvasElement['getContext']
>

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This reeks. The entire purpose of createMock functions is to keep the casts isolated. This is a double cast to a ReturnType.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aye, the double cast has been cast out. The spy target is narrowed to the 2D overload, and the canvas mock now goes in cleanly without an assertion. Fixed in e2e4a45.

Comment on lines +552 to +554
// serialisation schema. The synthetic id keeps the scratch graph out of
// the open workflow's root-scoped store buckets.
const graph = new LGraph({

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
// serialisation schema. The synthetic id keeps the scratch graph out of
// the open workflow's root-scoped store buckets.
const graph = new LGraph({
// serialisation schema.
const graph = new LGraph({

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aye, the extra commentary has been ploughed under as suggested. Fixed in e2e4a45.

@DrJKL
DrJKL merged commit 5b9b959 into feature/ecs-migration Jul 27, 2026
44 checks passed
@DrJKL
DrJKL deleted the drjkl/ecs-stack-audit-fixes branch July 27, 2026 23:33
DrJKL added a commit that referenced this pull request Jul 29, 2026
#13963)

## Summary

Makes `nodeDataStore` the single source of truth for node shell state,
deleting the `VueNodeData` mirror and all of `useGraphNodeManager`.
Continues [ADR 0008](docs/adr/0008-entity-component-system.md) after the
link topology and reroute chain stores; design record in
[docs/architecture/node-data-store.md](docs/architecture/node-data-store.md).

Stacked on #13528.

## Changes

- **What**:

`nodeDataStore` holds one plain `NodeState` per node in
root-graph-scoped buckets keyed by `NodeId`, registered **by reference**
with proxy-returning registration — the `BaseWidget` pattern.
`LGraphNode`'s shell fields (`title`, `mode`, `flags`, `color`,
`bgcolor`, `titleMode`, …) become accessors over `_state`, so the class
and the store are the same object rather than two copies kept in step.
Registration refuses to overwrite a live entry: it logs and returns
`undefined` rather than letting a throwaway node hijack a registered id,
and the refused caller keeps its own untracked state.

`VueNodeData` and `useGraphNodeManager` are gone (439 lines plus 683 of
tests). All four of the manager's responsibilities were resolved rather
than relocated: `getNode`/`nodeRefs` became store reads plus
`getNodeById`; the slot-array graft became class-side reactivity from
construction; slot-label reprojection became unnecessary once slot
objects are reactive; and layoutStore seeding moved to the renderer.

Slot arrays and slot objects are `shallowReactive` from construction,
and `nodeDataStore` holds the arrays **by reference** beside the states
— the same shape `widgetValueStore` already uses for widget order.
Because the arrays are the node's own, array order *is* slot order and
there is nothing to keep in step.

`node:added` / `node:removed` graph events replace four concurrent
wrappers of the single `graph.onNodeAdded` slot (renderer bootstrap,
error-clearing hooks, minimap, telemetry). Whichever restored first put
back the pre-its-own-install value and silently discarded the others,
order-dependent, on every graph switch. The `onNodeAdded` /
`onNodeRemoved` callbacks still fire, so extension behaviour is
unchanged.

Two consequences of the above, both found by CI rather than by
inspection: layoutStore is seeded from the renderer's event listeners
rather than from `LGraph.add`, so it stays empty when Vue nodes are off;
and the minimap picks its data source by render mode instead of by store
emptiness, scoping membership to the viewed graph.

The node error ring derives from the error stores rather than the
untracked `node.has_errors` field.

- **Breaking**: `useGraphNodeManager` and the `VueNodeData` type are
removed. Both were internal; no entity callback, `node.widgets` access,
`node.serialize`, or `graph._version` behaviour changes, so the ADR 0008
extension-impact surface is untouched.

## Review Focus

**Register-by-reference, not copy.** The store returns the reactive
proxy it holds and the node adopts it as `_state`. This is what removes
the mirror: there is no write-through, no diffing, and no direction to
get wrong. The refusal path is the interesting edge — see `registerNode`
and its tests.

**Why slot arrays are held by reference and not keyed.** An index-keyed
`SlotState` was drafted and rejected: slot index is a property of the
containing array, not of the slot, and ~25 sites permute it — including
`reorderSubgraphInputs`, a pure permutation reachable by dragging
subgraph inputs in the right panel. An index-keyed store must re-key on
every one of them; `linkStore` shows the price.

**A memoisation that was removed for being slower.** The `WeakMap` cache
over input slot index cost more than the `indexOf` it avoided: Vue
routes `indexOf` to the raw array at ~0.8ns/element, while validating
the cache needs a proxied element read plus a `WeakMap` lookup — 345ns
vs 277ns at 3 slots, still slower at 20. Measured, then reverted.

**Test relocations.** Tests moved to the code they now exercise: error
flags to `useNodeErrorFlagSync`, widget-store reactivity to
`widgetValueStore.graphReactivity`, layout seeding to `LGraph`, slot
reactivity to `NodeSlot`.

---------

Co-authored-by: github-actions <github-actions@github.com>
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
DrJKL added a commit that referenced this pull request Aug 12, 2026
Collapses the twelve reviewed slices of the ECS migration into one
commit so the series can be replayed onto main as a unit. Each slice
kept its own review on GitHub:

- ECS: Moving widgets out of the Node data (#13322)
- ECS: Link topology store (single source of truth for link data) (#13436)
- ECS: Reroute chain store with derived link membership (#13449)
- ECS: derive slot floating links; reroute cleanup follow-ups (#13451)
- refactor: read widgeted-input connectivity from linkStore (#13455)
- feat: nodeBadgeStore + badge system (slice A) (#13458)
- refactor: derive badge rows on read, delete the badge store (#13686)
- refactor: host-scoped promoted widget rows (no source traversal) (#13434)
- refactor!: delete the output.links runtime mirror (#13479)
- refactor!: delete the input.link runtime mirror (#13498)
- fix: ECS stack audit fixes (#13528)
- refactor!: make nodeDataStore the source of truth for node shell state (#13963)

Co-authored-by: Claude Opus 5 (1M context) <noreply@anthropic.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019ff78d-80f9-73e1-986a-5e4abc9f9d6a
balpreetgrowthnatives pushed a commit to balpreetgrowthnatives/ComfyUI_frontend that referenced this pull request Aug 24, 2026
## Summary

Still-draft feature branch for migrating entity state from LiteGraph
objects and runtime mirrors into dedicated stores with derived, reactive
views.

This consolidates the reviewed ECS migration slices, strengthens their
coverage, incorporates the layout-state follow-up, and documents the
current migration status and remaining work.

## Changes

- Move widget values and node shell state into dedicated stores.
- Make link topology the source of truth for connectivity.
- Store reroute chains while deriving membership and floating-link
state.
- Derive widgeted input connectivity, badges, and promoted widget rows
from store-backed state.
- Remove the input and output runtime link mirrors.
- Keep DOM measurements separate from persisted node layout state.
- Add migration coverage, extension guidance, and architecture/status
documentation.

Reviewed PRs merged into this feature branch:

- [Comfy-Org#13322 — Move widgets out of node
data](Comfy-Org#13322)
- [Comfy-Org#13434 — Host-scoped promoted widget
rows](Comfy-Org#13434)
- [Comfy-Org#13436 — Link topology
store](Comfy-Org#13436)
- [Comfy-Org#13449 — Reroute chain
store](Comfy-Org#13449)
- [Comfy-Org#13451 — Derived floating links and reroute
cleanup](Comfy-Org#13451)
- [Comfy-Org#13455 — Store-backed widgeted input
connectivity](Comfy-Org#13455)
- [Comfy-Org#13458 — Badge store and
system](Comfy-Org#13458)
- [Comfy-Org#13479 — Remove the output-link runtime
mirror](Comfy-Org#13479)
- [Comfy-Org#13498 — Remove the input-link runtime
mirror](Comfy-Org#13498)
- [Comfy-Org#13528 — Cross-stack migration audit
fixes](Comfy-Org#13528)
- [Comfy-Org#13686 — Derive badges on
read](Comfy-Org#13686)
- [Comfy-Org#13963 — Node data
store](Comfy-Org#13963)
- [Comfy-Org#14110 — Centralize node, group, and reroute
geometry](Comfy-Org#14110)
- [Comfy-Org#14128 — Register node geometry at
attach](Comfy-Org#14128)
- [Comfy-Org#14133 — Read node geometry from the
store](Comfy-Org#14133)
- [Comfy-Org#14758 — Keep DOM measurements out of saved node
sizes](Comfy-Org#14758)
- [Comfy-Org#15001 — Extract entity ID
allocation](Comfy-Org#15001)
- [Comfy-Org#15009 — Scope link and reroute topology by owning
graph](Comfy-Org#15009)
- [Comfy-Org#15017 — Centralize layout ownership and command
submission](Comfy-Org#15017)
- [Comfy-Org#15018 — Preserve subgraph topology during
unpack](Comfy-Org#15018)
- [Comfy-Org#15019 — Transfer node ownership during
replacement](Comfy-Org#15019)
- [Comfy-Org#15330 — Map migration status and remaining
work](Comfy-Org#15330)

## Review Focus

- Store ownership and synchronization boundaries.
- Serialization, undo/redo, subgraph, and extension compatibility.
- Whether remaining direct entity state should migrate before this
feature leaves draft.

## Status

Still draft. The branch is rebased onto `main`; CI is running against
the rebased history.

---------

Co-authored-by: Amp <amp@ampcode.com>
Co-authored-by: Christian Byrne <cbyrne@comfy.org>
Co-authored-by: GitHub Action <action@github.com>
Co-authored-by: Matt Miller <mattmiller@comfy.org>
DrJKL pushed a commit that referenced this pull request Aug 25, 2026
…n art in blueprint theme

Weight rooms by how much review the constituent PRs actually drew:

- New room: The Registry Office (Identity & Ownership). Registration
  policy was the migration's dominant bug class (#13528, #15009, #15017,
  #15019). Its challenge is the real clipboard-hijack bug: refuse
  foreign overwrites vs first-wins vs last-wins.
- New room: The Hall of Mirrors (Compatibility). The mirror-deletion PRs
  (#13479, #13498) were the most heavily reviewed of the migration. Its
  challenge covers the throw vs warn-and-ignore shim decision that
  review settled, plus frozen arrays and zero-warning telemetry tests.
- 12 rooms, 11 challenges; exits rewired; renderer room gains the
  measurement ledger (deleted 197us/op operation log, reverted WeakMap
  cache); Eternal Refactor ending names real remaining work.
- Full V2 asset regen (70 images) in a new vintage-blueprint theme:
  cyan-white linework on midnight-blue drafting paper, Krea 2 Turbo on
  Comfy Cloud. Prompt records updated in the four prompt JSONs; stale
  unreferenced icons removed.
- Prose pass over room and challenge text against AI-writing checklists;
  walkthrough rewritten (map, 24-press route, 22 artifacts); CHANGELOG
  added.

Validated: JS syntax, all 54 icon references resolve, headless run of
the full optimal route reaches The ECS Enlightenment with no console
errors.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

preview refactor size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants