Skip to content

feat: cut badge renderers over to nodeBadgeStore rows - #13460

Closed
DrJKL wants to merge 11 commits into
feature/ecs-migrationfrom
drjkl/and-then-there-were-none
Closed

DrJKL wants to merge 11 commits into
feature/ecs-migrationfrom
drjkl/and-then-there-were-none

Conversation

@DrJKL

@DrJKL DrJKL commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Summary

Slice B of docs/architecture/node-badge-store.md: both renderers now read system-written badge rows from nodeBadgeStore, the closure producers are deleted, and subgraph credits aggregation moves into the badge system. Stacked on #13458.

Changes

  • What:
    • badgeSystem bootstrapped by the Comfy.NodeBadge extension (useNodeBadge): starts per root graph, restarts on afterConfigureGraph, and the three subgraph-structure events bump a system revision. Dynamic-pricing recalculation wiring preserved.
    • Subgraph credits aggregation in the system: inner api nodes counted recursively (Partner Nodes x N, localized), single api node priced with the wrapper's promoted widget overrides — same semantics as the deleted updateSubgraphCredits, now covered by badgeSystem.subgraph.test.ts.
    • useNodePricing caches labels per signature (bounded): a leaf's own read and its wrapper's override read previously shared one slot and would evict each other and re-schedule evaluations forever under eager effects.
    • Legacy drawBadges renders store rows via a per-node memoized LGraphBadge cache (core parts joined id/lifecycle/source, truncated 31; iconKey resolved through a new litegraph badgeIconRegistry), then the raw node.badges extension surface with per-frame thunk evaluation.
    • Vue usePartitionedBadges partitions the same rows (lifecycle brackets trimmed, built-in source row replaced by the Comfy logo chip) plus the raw extension surface; slice(1) and icon-identity credits detection are gone. PartnerNodesList queries the store by kind.
    • Deleted: usePriceBadge, VueNodeData.badges + its property-trigger case, node.badgePosition, the BadgePosition enum, the badge-left e2e test + golden.
  • Breaking: node.badgePosition and BadgePosition are removed (GitHub-wide search found zero uses outside this repo; badges always rendered top-right in practice). node.badges is unchanged in shape and kept deliberately — three custom-node packs actively write it (ComfyUI-Wildcard-Pipeline, ComfyUI-Enhancement-Utils, ComfyUI-XENodes) — but core/credits badges no longer appear in the array; extensions that read it now see only their own entries. Migration: extensions setting badgePosition can simply remove the write; extensions reading core/credits badges should query useNodeBadgeStore().getBadges(graphId, nodeId).

Review Focus

  • Subgraph credits semantics vs the old updateSubgraphCredits (explicit requirement to preserve): count basis is inner api nodes, matching the old unconditional per-api-node badges; the promoted-override decoy-link case is ported verbatim into badgeSystem.subgraph.test.ts.
  • Screenshot goldens were intentionally NOT regenerated: legacy join order/truncation and Vue chip presentation reproduce current pixels. Known unification: Vue now respects HideBuiltIn for id/lifecycle badges on built-in nodes.
  • getBadges + JSON.stringify cache key run per node per frame in the legacy canvas (rows are ≤4 small objects; previous code evaluated reactive closures per frame).

🤖 Generated with Claude Code

@coderabbitai

coderabbitai Bot commented Jul 6, 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: 021928c6-13f9-425b-9fc0-0e915f215de6

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 | ✅ 4 | ❌ 2

❌ Failed checks (2 inconclusive)

Check name Status Explanation Resolution
End-To-End Regression Coverage For Fixes ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
Adr Compliance For Entity/Litegraph Changes ❓ Inconclusive Repository clone failed, so this custom check could not run with code access. Retry the review run. If this persists, inspect pre-merge custom-check logs for infrastructure or agent runtime failures.
✅ Passed checks (4 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.
Title check ✅ Passed The title is concise and accurately summarizes the main change: moving badge rendering over to nodeBadgeStore rows.
Description check ✅ Passed The description covers Summary, Changes, and Review Focus, and is mostly aligned with the template despite omitting the optional Dependencies section.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch drjkl/and-then-there-were-none

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

@github-actions

github-actions Bot commented Jul 6, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 07/15/2026, 09:28:59 AM UTC

Links

🎭 Playwright: ❌ 1683 passed, 3 failed · 3 flaky

❌ Failed Tests

📊 Browser Reports
  • chromium: View Report (✅ 1662 / ❌ 3 / ⚠️ 3 / ⏭️ 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.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 60.3 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 51.8 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 61.4 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 53.5 MB heap
large-graph-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 55.5 MB heap
large-graph-pan: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 81.1 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 76.8 MB heap
minimap-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 56.0 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 56.1 MB heap
subgraph-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 55.9 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 50.3 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 102ms TBT · 76.3 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 84.0 MB heap
vue-large-graph-idle: · 59.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 159.2 MB heap
vue-large-graph-pan: · 56.2 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 1ms TBT · 160.7 MB heap
workflow-execution: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 46.9 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 8ms
canvas-idle: layout count 0
canvas-idle: style recalc count 10
canvas-idle: task duration 347ms
canvas-idle: script duration 18ms
canvas-idle: TBT 0ms
canvas-idle: heap used 60.3 MB
canvas-idle: DOM nodes -274
canvas-idle: event listeners -197
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 29ms
canvas-mouse-sweep: layout count 12
canvas-mouse-sweep: style recalc count 72
canvas-mouse-sweep: task duration 642ms
canvas-mouse-sweep: script duration 98ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 51.8 MB
canvas-mouse-sweep: DOM nodes -94
canvas-mouse-sweep: event listeners -97
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 14ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 31
canvas-zoom-sweep: task duration 271ms
canvas-zoom-sweep: script duration 19ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 61.4 MB
canvas-zoom-sweep: DOM nodes -72
canvas-zoom-sweep: event listeners -82
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 11
dom-widget-clipping: task duration 285ms
dom-widget-clipping: script duration 44ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 53.5 MB
dom-widget-clipping: DOM nodes -130
dom-widget-clipping: event listeners -99
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 6ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 10
large-graph-idle: task duration 534ms
large-graph-idle: script duration 175ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 55.5 MB
large-graph-idle: DOM nodes -266
large-graph-idle: event listeners -199
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 17ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 70
large-graph-pan: task duration 968ms
large-graph-pan: script duration 433ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 81.1 MB
large-graph-pan: DOM nodes -127
large-graph-pan: event listeners -97
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 16ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 65
large-graph-zoom: task duration 1207ms
large-graph-zoom: script duration 569ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 76.8 MB
large-graph-zoom: DOM nodes 12
large-graph-zoom: event listeners 7
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 10
minimap-idle: task duration 514ms
minimap-idle: script duration 169ms
minimap-idle: TBT 0ms
minimap-idle: heap used 56.0 MB
minimap-idle: DOM nodes -263
minimap-idle: event listeners -198
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 48
subgraph-dom-widget-clipping: task duration 294ms
subgraph-dom-widget-clipping: script duration 95ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 56.1 MB
subgraph-dom-widget-clipping: DOM nodes -133
subgraph-dom-widget-clipping: event listeners -94
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 7ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 11
subgraph-idle: task duration 307ms
subgraph-idle: script duration 13ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 55.9 MB
subgraph-idle: DOM nodes -134
subgraph-idle: event listeners -96
subgraph-mouse-sweep: avg frame time 17ms
subgraph-mouse-sweep: p95 frame time 17ms
subgraph-mouse-sweep: layout duration 3ms
subgraph-mouse-sweep: style recalc duration 29ms
subgraph-mouse-sweep: layout count 16
subgraph-mouse-sweep: style recalc count 76
subgraph-mouse-sweep: task duration 559ms
subgraph-mouse-sweep: script duration 77ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 50.3 MB
subgraph-mouse-sweep: DOM nodes -98
subgraph-mouse-sweep: event listeners -98
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 24ms
subgraph-transition-enter: layout count 11
subgraph-transition-enter: style recalc count 15
subgraph-transition-enter: task duration 656ms
subgraph-transition-enter: script duration 25ms
subgraph-transition-enter: TBT 102ms
subgraph-transition-enter: heap used 76.3 MB
subgraph-transition-enter: DOM nodes 12227
subgraph-transition-enter: event listeners 844
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 55ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 251
viewport-pan-sweep: task duration 3433ms
viewport-pan-sweep: script duration 1430ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 84.0 MB
viewport-pan-sweep: DOM nodes -269
viewport-pan-sweep: event listeners -183
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 10829ms
vue-large-graph-idle: script duration 709ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 159.2 MB
vue-large-graph-idle: DOM nodes -3300
vue-large-graph-idle: event listeners -16375
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 17ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 65
vue-large-graph-pan: task duration 13654ms
vue-large-graph-pan: script duration 984ms
vue-large-graph-pan: TBT 1ms
vue-large-graph-pan: heap used 160.7 MB
vue-large-graph-pan: DOM nodes -3297
vue-large-graph-pan: event listeners -16369
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 20ms
workflow-execution: layout count 5
workflow-execution: style recalc count 18
workflow-execution: task duration 176ms
workflow-execution: script duration 14ms
workflow-execution: TBT 0ms
workflow-execution: heap used 46.9 MB
workflow-execution: DOM nodes -164
workflow-execution: event listeners -132
Raw data
{
  "timestamp": "2026-07-15T09:37:28.271Z",
  "gitSha": "aeed387ca47143661f5adc8bd6f7f6666b009ccb",
  "branch": "drjkl/and-then-there-were-none",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2068.557000000027,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 7.806,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 350.92699999999996,
      "heapDeltaBytes": -6179404,
      "heapUsedBytes": 63831888,
      "domNodes": -273,
      "jsHeapTotalBytes": 18763776,
      "scriptDurationMs": 18.591,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-idle",
      "durationMs": 2035.4729999999677,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 8.464,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 343.603,
      "heapDeltaBytes": -7308712,
      "heapUsedBytes": 62685792,
      "domNodes": -275,
      "jsHeapTotalBytes": 19812352,
      "scriptDurationMs": 18.088,
      "eventListeners": -195,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1738.1630000000143,
      "styleRecalcs": 72,
      "styleRecalcDurationMs": 28.295,
      "layouts": 12,
      "layoutDurationMs": 3.2740000000000005,
      "taskDurationMs": 642.3370000000001,
      "heapDeltaBytes": -7016028,
      "heapUsedBytes": 50685524,
      "domNodes": 54,
      "jsHeapTotalBytes": 24903680,
      "scriptDurationMs": 101.503,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1726.6099999999938,
      "styleRecalcs": 72,
      "styleRecalcDurationMs": 30.518000000000004,
      "layouts": 12,
      "layoutDurationMs": 3.458,
      "taskDurationMs": 641.7189999999999,
      "heapDeltaBytes": -12164352,
      "heapUsedBytes": 57865488,
      "domNodes": -242,
      "jsHeapTotalBytes": 19812352,
      "scriptDurationMs": 93.59299999999999,
      "eventListeners": -197,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1709.4989999999939,
      "styleRecalcs": 30,
      "styleRecalcDurationMs": 12.508000000000001,
      "layouts": 6,
      "layoutDurationMs": 0.5300000000000001,
      "taskDurationMs": 246.85500000000002,
      "heapDeltaBytes": 2865540,
      "heapUsedBytes": 62010928,
      "domNodes": 77,
      "jsHeapTotalBytes": 25690112,
      "scriptDurationMs": 19.609,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1719.6400000000267,
      "styleRecalcs": 32,
      "styleRecalcDurationMs": 14.973000000000003,
      "layouts": 6,
      "layoutDurationMs": 0.6000000000000001,
      "taskDurationMs": 295.839,
      "heapDeltaBytes": -3291576,
      "heapUsedBytes": 66764356,
      "domNodes": -221,
      "jsHeapTotalBytes": 12996608,
      "scriptDurationMs": 19.060000000000002,
      "eventListeners": -182,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 432.9189999999983,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 5.7540000000000004,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 259.1,
      "heapDeltaBytes": 8642744,
      "heapUsedBytes": 66256292,
      "domNodes": 16,
      "jsHeapTotalBytes": 14942208,
      "scriptDurationMs": 44.255,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.663333333333338,
      "p95FrameDurationMs": 16.700000000000273
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 463.65400000001955,
      "styleRecalcs": 12,
      "styleRecalcDurationMs": 7.476999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 311.887,
      "heapDeltaBytes": -24204676,
      "heapUsedBytes": 46038556,
      "domNodes": -275,
      "jsHeapTotalBytes": 6180864,
      "scriptDurationMs": 44.513,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2045.7169999999678,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 6.138000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 543.195,
      "heapDeltaBytes": -8505416,
      "heapUsedBytes": 58017708,
      "domNodes": -270,
      "jsHeapTotalBytes": -3416064,
      "scriptDurationMs": 177.642,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.670000000000012,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2018.9230000000293,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 6.411,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 524.3660000000001,
      "heapDeltaBytes": -13950152,
      "heapUsedBytes": 58343688,
      "domNodes": -261,
      "jsHeapTotalBytes": -1318912,
      "scriptDurationMs": 172.45300000000003,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2084.412000000043,
      "styleRecalcs": 70,
      "styleRecalcDurationMs": 18.163999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 951.6800000000001,
      "heapDeltaBytes": 31060140,
      "heapUsedBytes": 89200904,
      "domNodes": 20,
      "jsHeapTotalBytes": 9351168,
      "scriptDurationMs": 431.725,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2096.8950000000177,
      "styleRecalcs": 69,
      "styleRecalcDurationMs": 16.156,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 983.77,
      "heapDeltaBytes": 13126896,
      "heapUsedBytes": 80871336,
      "domNodes": -273,
      "jsHeapTotalBytes": -1114112,
      "scriptDurationMs": 434.35599999999994,
      "eventListeners": -197,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3104.4389999999566,
      "styleRecalcs": 67,
      "styleRecalcDurationMs": 17.737999999999996,
      "layouts": 60,
      "layoutDurationMs": 7.2589999999999995,
      "taskDurationMs": 1222.524,
      "heapDeltaBytes": 24921432,
      "heapUsedBytes": 84096824,
      "domNodes": 16,
      "jsHeapTotalBytes": 8126464,
      "scriptDurationMs": 582.765,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3031.5650000000005,
      "styleRecalcs": 63,
      "styleRecalcDurationMs": 14.794999999999996,
      "layouts": 60,
      "layoutDurationMs": 6.976,
      "taskDurationMs": 1191.507,
      "heapDeltaBytes": 21202252,
      "heapUsedBytes": 76861900,
      "domNodes": 8,
      "jsHeapTotalBytes": 786432,
      "scriptDurationMs": 555.0469999999999,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2020.986999999991,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 7.149000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 513.5750000000002,
      "heapDeltaBytes": -8822492,
      "heapUsedBytes": 58926016,
      "domNodes": -258,
      "jsHeapTotalBytes": -1056768,
      "scriptDurationMs": 167.715,
      "eventListeners": -197,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "minimap-idle",
      "durationMs": 2018.940999999984,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 5.204999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 514.008,
      "heapDeltaBytes": -20987364,
      "heapUsedBytes": 58593728,
      "domNodes": -267,
      "jsHeapTotalBytes": 3223552,
      "scriptDurationMs": 169.47699999999998,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 477.1790000000351,
      "styleRecalcs": 48,
      "styleRecalcDurationMs": 9.754000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 313.276,
      "heapDeltaBytes": 9256464,
      "heapUsedBytes": 61643512,
      "domNodes": -287,
      "jsHeapTotalBytes": 7991296,
      "scriptDurationMs": 94.212,
      "eventListeners": -195,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.799999999999727
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 457.56499999998823,
      "styleRecalcs": 48,
      "styleRecalcDurationMs": 9.707,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 275.18399999999997,
      "heapDeltaBytes": 5699044,
      "heapUsedBytes": 56007736,
      "domNodes": 22,
      "jsHeapTotalBytes": 10485760,
      "scriptDurationMs": 96.71499999999999,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000273
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2004.380999999995,
      "styleRecalcs": 11,
      "styleRecalcDurationMs": 7.325,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 296.01899999999995,
      "heapDeltaBytes": 3643364,
      "heapUsedBytes": 68386820,
      "domNodes": 22,
      "jsHeapTotalBytes": 23592960,
      "scriptDurationMs": 13.297,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2007.5939999999832,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 6.685,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 317.469,
      "heapDeltaBytes": -3200232,
      "heapUsedBytes": 48829616,
      "domNodes": -289,
      "jsHeapTotalBytes": 16642048,
      "scriptDurationMs": 13.27,
      "eventListeners": -197,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1700.949000000037,
      "styleRecalcs": 76,
      "styleRecalcDurationMs": 28.708000000000002,
      "layouts": 16,
      "layoutDurationMs": 3.4499999999999997,
      "taskDurationMs": 541.5550000000001,
      "heapDeltaBytes": -5366724,
      "heapUsedBytes": 59748888,
      "domNodes": 63,
      "jsHeapTotalBytes": 24117248,
      "scriptDurationMs": 76.908,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1733.5120000000188,
      "styleRecalcs": 76,
      "styleRecalcDurationMs": 30.1,
      "layouts": 16,
      "layoutDurationMs": 3.441,
      "taskDurationMs": 575.666,
      "heapDeltaBytes": -6754824,
      "heapUsedBytes": 45656624,
      "domNodes": -259,
      "jsHeapTotalBytes": 17166336,
      "scriptDurationMs": 76.535,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 916.3659999999823,
      "styleRecalcs": 15,
      "styleRecalcDurationMs": 24.136000000000006,
      "layouts": 11,
      "layoutDurationMs": 10.86,
      "taskDurationMs": 655.9999999999999,
      "heapDeltaBytes": 70268,
      "heapUsedBytes": 80018692,
      "domNodes": 12227,
      "jsHeapTotalBytes": 12599296,
      "scriptDurationMs": 25.119000000000003,
      "eventListeners": 844,
      "totalBlockingTimeMs": 102,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8130.873000000009,
      "styleRecalcs": 251,
      "styleRecalcDurationMs": 57.288999999999994,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 3462.0029999999997,
      "heapDeltaBytes": 24197220,
      "heapUsedBytes": 90317868,
      "domNodes": -269,
      "jsHeapTotalBytes": 3342336,
      "scriptDurationMs": 1463.641,
      "eventListeners": -183,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8124.532000000045,
      "styleRecalcs": 251,
      "styleRecalcDurationMs": 51.946,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 3404.2400000000002,
      "heapDeltaBytes": 19828040,
      "heapUsedBytes": 85826064,
      "domNodes": -269,
      "jsHeapTotalBytes": 2031616,
      "scriptDurationMs": 1396.678,
      "eventListeners": -183,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 10852.997000000016,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 10841.174,
      "heapDeltaBytes": -28821432,
      "heapUsedBytes": 169119108,
      "domNodes": -3300,
      "jsHeapTotalBytes": -1601536,
      "scriptDurationMs": 703.9570000000001,
      "eventListeners": -16380,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.216666666666665,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 10826.748999999949,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 10816.515,
      "heapDeltaBytes": -51639216,
      "heapUsedBytes": 164827888,
      "domNodes": -3300,
      "jsHeapTotalBytes": 262144,
      "scriptDurationMs": 713.636,
      "eventListeners": -16370,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 13471.53400000002,
      "styleRecalcs": 65,
      "styleRecalcDurationMs": 16.676999999999996,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 13446.518000000002,
      "heapDeltaBytes": -31126516,
      "heapUsedBytes": 178884488,
      "domNodes": -3291,
      "jsHeapTotalBytes": 15904768,
      "scriptDurationMs": 985.0729999999999,
      "eventListeners": -16364,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666763,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 13877.22400000007,
      "styleRecalcs": 65,
      "styleRecalcDurationMs": 16.96700000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 13861.675,
      "heapDeltaBytes": -32156732,
      "heapUsedBytes": 158174460,
      "domNodes": -3302,
      "jsHeapTotalBytes": 19894272,
      "scriptDurationMs": 983.901,
      "eventListeners": -16374,
      "totalBlockingTimeMs": 1,
      "frameDurationMs": 17.779999999999927,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "workflow-execution",
      "durationMs": 475.0619999999799,
      "styleRecalcs": 18,
      "styleRecalcDurationMs": 21.044,
      "layouts": 4,
      "layoutDurationMs": 1.0829999999999997,
      "taskDurationMs": 177.68700000000004,
      "heapDeltaBytes": -21841080,
      "heapUsedBytes": 49304776,
      "domNodes": -157,
      "jsHeapTotalBytes": 4608000,
      "scriptDurationMs": 14.223,
      "eventListeners": -130,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000273
    },
    {
      "name": "workflow-execution",
      "durationMs": 469.21199999997043,
      "styleRecalcs": 18,
      "styleRecalcDurationMs": 19.837,
      "layouts": 5,
      "layoutDurationMs": 1.1049999999999998,
      "taskDurationMs": 175,
      "heapDeltaBytes": -22160552,
      "heapUsedBytes": 49086312,
      "domNodes": -171,
      "jsHeapTotalBytes": 4870144,
      "scriptDurationMs": 13.95,
      "eventListeners": -134,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.663333333333338,
      "p95FrameDurationMs": 16.700000000000273
    }
  ]
}

@codecov

codecov Bot commented Jul 6, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 80.53691% with 29 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
src/composables/node/useNodeBadge.ts 0.00% 12 Missing ⚠️
...enderer/extensions/linearMode/PartnerNodesList.vue 0.00% 12 Missing ⚠️
src/composables/node/useNodePricing.ts 90.90% 2 Missing ⚠️
src/systems/badgeSystem.ts 96.77% 2 Missing ⚠️
...sions/vueNodes/composables/usePartitionedBadges.ts 94.44% 0 Missing and 1 partial ⚠️
@@                   Coverage Diff                    @@
##             feature/ecs-migration   #13460   +/-   ##
========================================================
  Coverage                         ?   78.70%           
========================================================
  Files                            ?     1653           
  Lines                            ?   110991           
  Branches                         ?    40517           
========================================================
  Hits                             ?    87353           
  Misses                           ?    22789           
  Partials                         ?      849           
Flag Coverage Δ
unit 65.82% <81.08%> (?)

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

Files with missing lines Coverage Δ
src/composables/graph/useGraphNodeManager.ts 93.70% <ø> (ø)
src/lib/litegraph/src/LGraph.ts 91.47% <ø> (ø)
src/lib/litegraph/src/LGraphBadge.ts 98.91% <ø> (ø)
src/lib/litegraph/src/LGraphNode.ts 80.52% <ø> (ø)
src/lib/litegraph/src/litegraph.ts 100.00% <ø> (ø)
src/stores/nodeBadgeStore.ts 100.00% <100.00%> (ø)
src/utils/graphTraversalUtil.ts 94.19% <100.00%> (ø)
...sions/vueNodes/composables/usePartitionedBadges.ts 90.69% <94.44%> (ø)
src/composables/node/useNodePricing.ts 85.61% <90.90%> (ø)
src/systems/badgeSystem.ts 96.80% <96.77%> (ø)
... and 2 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.

@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: 1

🤖 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/locales/en/main.json`:
- Around line 2244-2246: The nodeBadge label uses the plural “Partner Nodes” in
a compound UI string, but it should follow the repo terminology rule and stay
singular. Update the translation entry in nodeBadge so the label text uses
“Partner Node x {count}” while preserving the existing key structure and count
placeholder.
🪄 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: 8835120e-fdf9-4e79-9057-9f27d0520354

📥 Commits

Reviewing files that changed from the base of the PR and between 3410ae6 and f97f37a.

⛔ Files ignored due to path filters (1)
  • browser_tests/tests/nodeBadge.spec.ts-snapshots/node-badge-left-chromium-linux.png is excluded by !**/*.png
📒 Files selected for processing (23)
  • browser_tests/tests/nodeBadge.spec.ts
  • docs/architecture/node-badge-store.md
  • src/composables/graph/useGraphNodeManager.ts
  • src/composables/node/useNodeBadge.ts
  • src/composables/node/useNodePricing.test.ts
  • src/composables/node/useNodePricing.ts
  • src/composables/node/usePriceBadge.test.ts
  • src/composables/node/usePriceBadge.ts
  • src/lib/litegraph/src/LGraphBadge.ts
  • src/lib/litegraph/src/LGraphNode.ts
  • src/lib/litegraph/src/badgeIconRegistry.ts
  • src/lib/litegraph/src/litegraph.ts
  • src/lib/litegraph/src/nodeBadgeDraw.test.ts
  • src/lib/litegraph/src/nodeBadgeDraw.ts
  • src/locales/en/main.json
  • src/renderer/extensions/linearMode/PartnerNodesList.vue
  • src/renderer/extensions/vueNodes/composables/usePartitionedBadges.test.ts
  • src/renderer/extensions/vueNodes/composables/usePartitionedBadges.ts
  • src/systems/badgeSystem.pricing.test.ts
  • src/systems/badgeSystem.subgraph.test.ts
  • src/systems/badgeSystem.test.ts
  • src/systems/badgeSystem.ts
  • src/types/badgeData.ts
💤 Files with no reviewable changes (6)
  • src/renderer/extensions/vueNodes/composables/usePartitionedBadges.test.ts
  • src/composables/node/usePriceBadge.ts
  • src/composables/node/usePriceBadge.test.ts
  • src/lib/litegraph/src/LGraphBadge.ts
  • browser_tests/tests/nodeBadge.spec.ts
  • src/composables/graph/useGraphNodeManager.ts

Comment thread src/locales/en/main.json Resolved
@DrJKL DrJKL added the refactor label Jul 6, 2026
@DrJKL
DrJKL force-pushed the drjkl/a-badge-is-announced branch from 3410ae6 to cb9ebec Compare July 6, 2026 20:58
@DrJKL
DrJKL force-pushed the drjkl/and-then-there-were-none branch from c221781 to a71df2f Compare July 6, 2026 20:58
@DrJKL
DrJKL marked this pull request as ready for review July 7, 2026 06:41
@DrJKL
DrJKL requested review from a team, bigcat88 and jojodecayz as code owners July 7, 2026 06:41
@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jul 7, 2026
@DrJKL
DrJKL force-pushed the drjkl/a-badge-is-announced branch from cb9ebec to ff8a725 Compare July 14, 2026 05:53
@DrJKL
DrJKL force-pushed the drjkl/and-then-there-were-none branch from a71df2f to 5f4b28c Compare July 14, 2026 06:02
@DrJKL
DrJKL force-pushed the drjkl/a-badge-is-announced branch 2 times, most recently from 786a688 to c4ab44a Compare July 14, 2026 22:58
@DrJKL
DrJKL force-pushed the drjkl/and-then-there-were-none branch from 5f4b28c to ab8f3d3 Compare July 14, 2026 23:40

@AustinMroz AustinMroz left a comment

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.

Glad to see this section of the code base cleaned up.

Comment thread src/locales/en/main.json
"failedToSetGizmoMode": "Failed to set gizmo mode"
},
"nodeBadge": {
"partnerNodesCount": "Partner Nodes x {count}"

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 wasn't localized? Wonder who's fault that was...

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.

Ran git blame so you don't have to: it was me, in #12197. Consider this PR my penance.

Comment thread src/stores/nodeBadgeStore.ts Outdated
Comment on lines +111 to +114
// Track bucket membership too: a workflow load creates the bucket
// under a graph id no reader has observed yet, and a get() miss
// alone would leave those readers blind to it.
void buckets.value.size

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.

But don't we only want dependency on size when get misses?

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.

Good call — fixed in c803336. The size read now only happens on a get() miss, so hit-path readers no longer pick up spurious invalidations when unrelated graph buckets are created or deleted. The miss branch still needs it: a workflow load creates the bucket under a graph id no reader has observed yet, and the ITERATE_KEY dep is what wakes those readers.

Comment thread src/systems/badgeSystem.ts Outdated
Comment on lines +206 to +220
function walk(nodes: LGraphNode[]): void {
for (const inner of nodes) {
if (inner.isSubgraphNode()) {
const subgraphId = String(inner.subgraph.id)
if (visited.has(subgraphId)) continue
visited.add(subgraphId)
walk(inner.subgraph.nodes)
continue
}
if (!inner.constructor?.nodeData?.api_node) continue
void pricing.getNodeRevisionRef(inner.id).value
apiLeaves.push(inner)
}
}
walk(wrapper.subgraph.nodes)

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.

Why re-implement mapAllNodes with a version that requires muting a list?

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.

These were extracted from usePriceBadge.ts

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.

mapAllNodes couldn't be used as-is: subgraph instances share their definition's node objects, so it revisits shared internals once per instance and has no cycle guard. This walk needs each definition counted once (the semantics carried over from usePriceBadge, where the visited set did the same job) — swapping directly would change "Partner Nodes x N" counts when a subgraph is instanced more than once.

But the instinct was right, so I unified them in 6e0429b: added mapUniqueNodes to graphTraversalUtil (same shape as mapAllNodes, visits each subgraph definition once, cycle-safe) and cut both this walk and PartnerNodesList.vue over to it. That also fixes duplicate list entries (and duplicate v-for keys) in the partner nodes list when a subgraph definition is instanced twice.

@AustinMroz AustinMroz removed their assignment Jul 15, 2026
Base automatically changed from drjkl/a-badge-is-announced to feature/ecs-migration July 15, 2026 02:56
@dosubot dosubot Bot added size:XL This PR changes 500-999 lines, ignoring generated files. and removed size:XXL This PR changes 1000+ lines, ignoring generated files. labels Jul 15, 2026
DrJKL and others added 5 commits July 14, 2026 20:00
Renderers own presentation: legacy joins id/lifecycle/source in its own
order with brackets intact, Vue trims and reorders. Rows carry the raw
projected text plus a part discriminator instead of pre-trimmed text.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
SubgraphNode wrappers project their credits row from the inner nodes'
store rows: several priced inner nodes collapse to 'Partner Nodes x N',
a single one shows its price with the wrapper's promoted widget values
overriding the inner node's own. The aggregation tracks inner rows, the
registered-node set, and an exported structure revision for the events
stores cannot observe.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Legacy drawBadges renders the store rows through a per-node memoized
LGraphBadge cache (core parts joined id/lifecycle/source and truncated,
icons resolved via a badge icon registry) followed by the raw
node.badges extension surface, whose thunks still evaluate per frame.
The Vue partition reads the same rows — trimming lifecycle brackets and
swapping a built-in node's source row for the Comfy logo chip — plus the
raw extension surface.

useNodeBadge now bootstraps the badge system per root graph and forwards
the subgraph structure events; dynamic-pricing recalculation wiring is
kept. The usePriceBadge closures, the VueNodeData.badges mirror, its
property trigger, and node.badgePosition (no ecosystem uses; single
writer/reader) are deleted. node.badges itself stays: three custom-node
packs actively push to it.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Wrapper aggregation counts inner api nodes (the old unconditional
per-api-node badge basis) rather than resolved credits rows, so a
pending async price still yields 'Partner Nodes x N'; the label is
localized via nodeBadge.partnerNodesCount. useNodePricing now caches
labels per signature: a leaf's own read and its wrapper's
promoted-override read previously shared one cache slot and evicted
each other, re-scheduling evaluations forever once both ran in eager
system effects.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
DrJKL and others added 3 commits July 14, 2026 20:02
LGraph.clear() and configure() reassign the root graph id, so the badge
system now resolves it on every recompute instead of capturing it at
start; a captured id stranded the system on a dead bucket after
Clear Workflow, dropping every badge on nodes added afterwards.

LGraph.add registers the node in the badge store only after
onNodeAdded: the store write wakes the system watcher and queues Vue's
flush, which must not overtake the deferred paste scan that surfaces
missing-model errors before selection-scoped tabs recalculate.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
The system's watch tracked only the current graph id's bucket key; a
workflow load buckets nodes under a brand-new graph id the watcher had
never observed, so it never fired again and no badges were written
after any configure. registeredNodeIds now also reads the bucket map
size, so bucket creation and deletion wake readers regardless of which
id they last saw.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@DrJKL
DrJKL force-pushed the drjkl/and-then-there-were-none branch from ab8f3d3 to 0c61bd3 Compare July 15, 2026 03:19
@dosubot dosubot Bot added size:XXL This PR changes 1000+ lines, ignoring generated files. and removed size:XL This PR changes 500-999 lines, ignoring generated files. labels Jul 15, 2026
DrJKL added 2 commits July 14, 2026 21:18
- registeredNodeIds tracks bucket size only on get() miss, sparing
  hit-path readers spurious invalidations from unrelated buckets
- replace mutable-accumulator walk with collectApiLeaves flatMap;
  keeps definition-dedupe and cycle guard from legacy usePriceBadge
Subgraph instances share their definition's nodes, so mapAllNodes
revisits shared internals per instance. mapUniqueNodes visits each
definition once and terminates on cycles. Replaces the local walk in
badgeSystem and fixes duplicate PartnerNodesList entries (and v-for
keys) when a subgraph is instanced more than once.
Extension badge kind deleted: node.badges is the raw extension surface,
sampled by the Vue partition on recompute. Store rows are replaced
wholesale per write so the draw cache keys on array identity instead of
JSON. wirePricingRecalculation and its onConnectionsChange patch were
redundant with the system's tracked sources. badgePosition returns as a
deprecated no-op accessor. BadgeData and pricing sources are
discriminated unions.
@DrJKL

DrJKL commented Jul 15, 2026

Copy link
Copy Markdown
Contributor Author

Closing in favor of #13686

@DrJKL DrJKL closed this Jul 15, 2026
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 15, 2026
@DrJKL
DrJKL deleted the drjkl/and-then-there-were-none branch July 29, 2026 04:45
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

refactor size:XXL This PR changes 1000+ lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants