Repository navigation
Conversation
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
🚥 Pre-merge checks | ✅ 4 | ❌ 2❌ Failed checks (2 inconclusive)
✅ Passed checks (4 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ❌ 1683 passed, 3 failed · 3 flaky❌ Failed Tests📊 Browser Reports
📦 Bundle Size
⚡ Performance Report
Absolute values
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 Report❌ Patch coverage is @@ Coverage Diff @@
## feature/ecs-migration #13460 +/- ##
========================================================
Coverage ? 78.70%
========================================================
Files ? 1653
Lines ? 110991
Branches ? 40517
========================================================
Hits ? 87353
Misses ? 22789
Partials ? 849
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
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
⛔ Files ignored due to path filters (1)
browser_tests/tests/nodeBadge.spec.ts-snapshots/node-badge-left-chromium-linux.pngis excluded by!**/*.png
📒 Files selected for processing (23)
browser_tests/tests/nodeBadge.spec.tsdocs/architecture/node-badge-store.mdsrc/composables/graph/useGraphNodeManager.tssrc/composables/node/useNodeBadge.tssrc/composables/node/useNodePricing.test.tssrc/composables/node/useNodePricing.tssrc/composables/node/usePriceBadge.test.tssrc/composables/node/usePriceBadge.tssrc/lib/litegraph/src/LGraphBadge.tssrc/lib/litegraph/src/LGraphNode.tssrc/lib/litegraph/src/badgeIconRegistry.tssrc/lib/litegraph/src/litegraph.tssrc/lib/litegraph/src/nodeBadgeDraw.test.tssrc/lib/litegraph/src/nodeBadgeDraw.tssrc/locales/en/main.jsonsrc/renderer/extensions/linearMode/PartnerNodesList.vuesrc/renderer/extensions/vueNodes/composables/usePartitionedBadges.test.tssrc/renderer/extensions/vueNodes/composables/usePartitionedBadges.tssrc/systems/badgeSystem.pricing.test.tssrc/systems/badgeSystem.subgraph.test.tssrc/systems/badgeSystem.test.tssrc/systems/badgeSystem.tssrc/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
3410ae6 to
cb9ebec
Compare
c221781 to
a71df2f
Compare
cb9ebec to
ff8a725
Compare
a71df2f to
5f4b28c
Compare
786a688 to
c4ab44a
Compare
5f4b28c to
ab8f3d3
Compare
AustinMroz
left a comment
There was a problem hiding this comment.
Glad to see this section of the code base cleaned up.
| "failedToSetGizmoMode": "Failed to set gizmo mode" | ||
| }, | ||
| "nodeBadge": { | ||
| "partnerNodesCount": "Partner Nodes x {count}" |
There was a problem hiding this comment.
This wasn't localized? Wonder who's fault that was...
There was a problem hiding this comment.
Ran git blame so you don't have to: it was me, in #12197. Consider this PR my penance.
| // 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 |
There was a problem hiding this comment.
But don't we only want dependency on size when get misses?
There was a problem hiding this comment.
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.
| 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) |
There was a problem hiding this comment.
Why re-implement mapAllNodes with a version that requires muting a list?
There was a problem hiding this comment.
These were extracted from usePriceBadge.ts
There was a problem hiding this comment.
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.
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>
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>
ab8f3d3 to
0c61bd3
Compare
- 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.
|
Closing in favor of #13686 |
Summary
Slice B of
docs/architecture/node-badge-store.md: both renderers now read system-written badge rows fromnodeBadgeStore, the closure producers are deleted, and subgraph credits aggregation moves into the badge system. Stacked on #13458.Changes
badgeSystembootstrapped by theComfy.NodeBadgeextension (useNodeBadge): starts per root graph, restarts onafterConfigureGraph, and the three subgraph-structure events bump a system revision. Dynamic-pricing recalculation wiring preserved.Partner Nodes x N, localized), single api node priced with the wrapper's promoted widget overrides — same semantics as the deletedupdateSubgraphCredits, now covered bybadgeSystem.subgraph.test.ts.useNodePricingcaches 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.drawBadgesrenders store rows via a per-node memoizedLGraphBadgecache (core parts joined id/lifecycle/source, truncated 31;iconKeyresolved through a new litegraphbadgeIconRegistry), then the rawnode.badgesextension surface with per-frame thunk evaluation.usePartitionedBadgespartitions 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.PartnerNodesListqueries the store by kind.usePriceBadge,VueNodeData.badges+ its property-trigger case,node.badgePosition, theBadgePositionenum, the badge-left e2e test + golden.node.badgePositionandBadgePositionare removed (GitHub-wide search found zero uses outside this repo; badges always rendered top-right in practice).node.badgesis 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 settingbadgePositioncan simply remove the write; extensions reading core/credits badges should queryuseNodeBadgeStore().getBadges(graphId, nodeId).Review Focus
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 intobadgeSystem.subgraph.test.ts.getBadges+JSON.stringifycache 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