Skip to content

refactor: derive badge rows on read, delete the badge store - #13686

Merged
DrJKL merged 22 commits into
feature/ecs-migrationfrom
drjkl/and-then-there-was-no-store
Jul 16, 2026
Merged

DrJKL merged 22 commits into
feature/ecs-migrationfrom
drjkl/and-then-there-was-no-store

Conversation

@DrJKL

@DrJKL DrJKL commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Summary

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

Changes

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

Review Focus

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

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

DrJKL and others added 12 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>
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>
- 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.
Badge rows are derived presentation, not entity state; the store was a
materialized cache and its registration/watcher/scope machinery was
cache invalidation. nodeBadges(node) is now one lazy computed per node
instance in a WeakMap: entries die with their nodes, so registration,
teardown, and the stale-bucket bug class do not exist. A single
graphStructureRevision (bumped at add/remove/clear chokepoints and
structure events) replaces bucket membership, subgraphCreditsRevision,
and the live-graph-id seams. Litegraph consumes rows through a
one-function provider seam, keeping its import graph acyclic; the
identity-keyed draw cache is unchanged.
@coderabbitai

coderabbitai Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

Review Change Stack

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: 492e4687-3b6e-4f25-8c04-97f0f91e96f1

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:

  • ✅ Review completed - (🔄 Check again to review again)
📝 Walkthrough

Walkthrough

This PR replaces the node badge store with memoized per-node derivation, updates badge data and pricing contracts, adds provider-based LiteGraph rendering, rewires Vue and linear-mode consumers, removes obsolete pricing and badge APIs, and adds graph-aware derivation and rendering tests.

Changes

Node badge derivation and rendering

Layer / File(s) Summary
Badge data contract and architecture
docs/adr/..., docs/architecture/..., src/types/badgeData.ts
Badge data now consists of transient core and credits rows, with derive-on-read architecture and renderer provider seams documented.
Memoized badge and pricing derivation
src/systems/badgeSystem.ts, src/composables/node/useNodePricing.ts, src/systems/*.test.ts, src/composables/node/useNodePricing.test.ts
Badge computation handles core rows, API pricing, subgraph aggregation, promoted widget values, and per-signature pricing caches through memoized node projections.
LiteGraph badge rendering
src/lib/litegraph/src/{LGraph,LGraphNode,LGraphBadge,litegraph,nodeBadgeDraw}*, browser_tests/tests/nodeBadge.spec.ts
LiteGraph obtains derived rows through a provider, converts them into memoized draw objects, removes positional badge support, and renders badges right-aligned with extension badges.
Graph consumers and renderer integration
src/renderer/extensions/..., src/composables/graph/..., src/composables/node/useNodeBadge.ts, src/utils/graphTraversalUtil.ts, src/locales/en/main.json
Vue partitioning, partner-node listing, graph traversal, extension bootstrapping, node state extraction, localization, and graph reactivity are updated for derived badge rows.

Estimated code review effort: 4 (Complex) | ~45 minutes

Possibly related PRs

Suggested labels: refactor

Suggested reviewers: austinmroz, christian-byrne, bigcat88, jojodecayz

Sequence Diagram(s)

sequenceDiagram
  participant Canvas as Legacy canvas
  participant Node as LGraphNode
  participant Draw as nodeBadgeDraw
  participant System as badgeSystem
  Canvas->>Node: drawBadges()
  Node->>Draw: badgeRows(node)
  Draw->>System: call registered nodeBadges provider
  System-->>Draw: derived core and credits rows
  Draw-->>Node: memoized LGraphBadge objects
  Node-->>Canvas: render right-aligned badges
Loading
🚥 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 PASS: the PR changes src/ files and also updates browser_tests/tests/nodeBadge.spec.ts, so the E2E-regression-test requirement is already satisfied.
Adr Compliance For Entity/Litegraph Changes ✅ Passed The litegraph/entity changes are migration-oriented and remove store wiring; no direct entity mutations, risky callbacks, or new entity responsibilities are evident.
Title check ✅ Passed The title clearly summarizes the main change: deriving badge rows on read and removing the badge store.
Description check ✅ Passed The description matches the template well and includes summary, changes, breaking impact, and review focus.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch drjkl/and-then-there-was-no-store

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

@github-actions

github-actions Bot commented Jul 15, 2026 •

Copy link
Copy Markdown
Contributor

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

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

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 07/16/2026, 06:14:32 PM UTC

Links

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 60.1 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 52.9 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 59.4 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 46.8 MB heap
large-graph-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 64.2 MB heap
large-graph-pan: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 77.7 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 78.6 MB heap
minimap-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 55.2 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 45.3 MB heap
subgraph-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 60.9 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 61.3 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 137ms TBT · 93.0 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 64.8 MB heap
vue-large-graph-idle: · 59.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 159.6 MB heap
vue-large-graph-pan: · 59.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 22ms TBT · 152.2 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 54.8 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 10ms
canvas-idle: layout count 0
canvas-idle: style recalc count 10
canvas-idle: task duration 448ms
canvas-idle: script duration 24ms
canvas-idle: TBT 0ms
canvas-idle: heap used 60.1 MB
canvas-idle: DOM nodes -274
canvas-idle: event listeners -199
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 39ms
canvas-mouse-sweep: layout count 12
canvas-mouse-sweep: style recalc count 74
canvas-mouse-sweep: task duration 867ms
canvas-mouse-sweep: script duration 122ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 52.9 MB
canvas-mouse-sweep: DOM nodes -93
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 30
canvas-zoom-sweep: task duration 366ms
canvas-zoom-sweep: script duration 26ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 59.4 MB
canvas-zoom-sweep: DOM nodes -236
canvas-zoom-sweep: event listeners -183
dom-widget-clipping: avg frame time 17ms
dom-widget-clipping: p95 frame time 17ms
dom-widget-clipping: layout duration 0ms
dom-widget-clipping: style recalc duration 10ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 10
dom-widget-clipping: task duration 375ms
dom-widget-clipping: script duration 54ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 46.8 MB
dom-widget-clipping: DOM nodes -272
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 689ms
large-graph-idle: script duration 225ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 64.2 MB
large-graph-idle: DOM nodes -188
large-graph-idle: event listeners -134
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 16ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 69
large-graph-pan: task duration 1236ms
large-graph-pan: script duration 537ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 77.7 MB
large-graph-pan: DOM nodes -272
large-graph-pan: event listeners -198
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 16ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 64
large-graph-zoom: task duration 1523ms
large-graph-zoom: script duration 705ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 78.6 MB
large-graph-zoom: DOM nodes -136
large-graph-zoom: event listeners -94
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 6ms
minimap-idle: layout count 0
minimap-idle: style recalc count 7
minimap-idle: task duration 647ms
minimap-idle: script duration 217ms
minimap-idle: TBT 0ms
minimap-idle: heap used 55.2 MB
minimap-idle: DOM nodes -270
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 14ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 47
subgraph-dom-widget-clipping: task duration 412ms
subgraph-dom-widget-clipping: script duration 130ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 45.3 MB
subgraph-dom-widget-clipping: DOM nodes -274
subgraph-dom-widget-clipping: event listeners -197
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 9ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 10
subgraph-idle: task duration 404ms
subgraph-idle: script duration 19ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 60.9 MB
subgraph-idle: DOM nodes -269
subgraph-idle: event listeners -199
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 40ms
subgraph-mouse-sweep: layout count 16
subgraph-mouse-sweep: style recalc count 76
subgraph-mouse-sweep: task duration 844ms
subgraph-mouse-sweep: script duration 109ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 61.3 MB
subgraph-mouse-sweep: DOM nodes -80
subgraph-mouse-sweep: event listeners -97
subgraph-transition-enter: avg frame time 17ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 13ms
subgraph-transition-enter: style recalc duration 29ms
subgraph-transition-enter: layout count 13
subgraph-transition-enter: style recalc count 17
subgraph-transition-enter: task duration 749ms
subgraph-transition-enter: script duration 25ms
subgraph-transition-enter: TBT 137ms
subgraph-transition-enter: heap used 93.0 MB
subgraph-transition-enter: DOM nodes 13673
subgraph-transition-enter: event listeners 2531
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 53ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 250
viewport-pan-sweep: task duration 4474ms
viewport-pan-sweep: script duration 1883ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 64.8 MB
viewport-pan-sweep: DOM nodes -270
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 10994ms
vue-large-graph-idle: script duration 920ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 159.6 MB
vue-large-graph-idle: DOM nodes -3301
vue-large-graph-idle: event listeners -16363
vue-large-graph-pan: avg frame time 17ms
vue-large-graph-pan: p95 frame time 17ms
vue-large-graph-pan: layout duration 0ms
vue-large-graph-pan: style recalc duration 20ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 65
vue-large-graph-pan: task duration 13718ms
vue-large-graph-pan: script duration 1244ms
vue-large-graph-pan: TBT 22ms
vue-large-graph-pan: heap used 152.2 MB
vue-large-graph-pan: DOM nodes -3301
vue-large-graph-pan: event listeners -16373
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 2ms
workflow-execution: style recalc duration 24ms
workflow-execution: layout count 5
workflow-execution: style recalc count 15
workflow-execution: task duration 152ms
workflow-execution: script duration 20ms
workflow-execution: TBT 0ms
workflow-execution: heap used 54.8 MB
workflow-execution: DOM nodes 11
workflow-execution: event listeners -32
Raw data
{
  "timestamp": "2026-07-16T18:23:19.286Z",
  "gitSha": "2f7c48e603238ef3cc99cda73c211ea3b7523220",
  "branch": "drjkl/and-then-there-was-no-store",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2090.238999999997,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 9.276,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 453.52799999999996,
      "heapDeltaBytes": -6579724,
      "heapUsedBytes": 63219884,
      "domNodes": -277,
      "jsHeapTotalBytes": 18763776,
      "scriptDurationMs": 23.369,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-idle",
      "durationMs": 2059.921000000031,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 10.53,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 442.494,
      "heapDeltaBytes": -7047764,
      "heapUsedBytes": 62785720,
      "domNodes": -270,
      "jsHeapTotalBytes": 19550208,
      "scriptDurationMs": 24.464,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1940.6549999999925,
      "styleRecalcs": 72,
      "styleRecalcDurationMs": 40.056999999999995,
      "layouts": 12,
      "layoutDurationMs": 3.613,
      "taskDurationMs": 944.428,
      "heapDeltaBytes": -12021200,
      "heapUsedBytes": 57732788,
      "domNodes": -242,
      "jsHeapTotalBytes": 19288064,
      "scriptDurationMs": 123.59200000000001,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1830.964999999992,
      "styleRecalcs": 75,
      "styleRecalcDurationMs": 38.688,
      "layouts": 12,
      "layoutDurationMs": 3.8609999999999998,
      "taskDurationMs": 790.5230000000001,
      "heapDeltaBytes": -5816688,
      "heapUsedBytes": 53281680,
      "domNodes": 57,
      "jsHeapTotalBytes": 25165824,
      "scriptDurationMs": 121.112,
      "eventListeners": 4,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1746.1379999999735,
      "styleRecalcs": 29,
      "styleRecalcDurationMs": 16.707,
      "layouts": 6,
      "layoutDurationMs": 0.7740000000000001,
      "taskDurationMs": 366.24600000000004,
      "heapDeltaBytes": 11377676,
      "heapUsedBytes": 63043208,
      "domNodes": -236,
      "jsHeapTotalBytes": 7467008,
      "scriptDurationMs": 24.964999999999996,
      "eventListeners": -184,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1749.3769999999813,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 15.616000000000001,
      "layouts": 6,
      "layoutDurationMs": 0.626,
      "taskDurationMs": 365.79699999999997,
      "heapDeltaBytes": 8738776,
      "heapUsedBytes": 61493844,
      "domNodes": -235,
      "jsHeapTotalBytes": 7204864,
      "scriptDurationMs": 26.206,
      "eventListeners": -182,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 575.540999999987,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 8.612,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 359.10699999999997,
      "heapDeltaBytes": -1291072,
      "heapUsedBytes": 50654360,
      "domNodes": -268,
      "jsHeapTotalBytes": -659456,
      "scriptDurationMs": 52.969,
      "eventListeners": -203,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66666666666665,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 606.1490000000163,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 10.872,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 390.59599999999995,
      "heapDeltaBytes": -4538036,
      "heapUsedBytes": 47413836,
      "domNodes": -275,
      "jsHeapTotalBytes": 389120,
      "scriptDurationMs": 54.35999999999999,
      "eventListeners": -203,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000273
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2029.4269999999983,
      "styleRecalcs": 8,
      "styleRecalcDurationMs": 7.416000000000002,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 662.0570000000001,
      "heapDeltaBytes": -6620560,
      "heapUsedBytes": 57121816,
      "domNodes": -269,
      "jsHeapTotalBytes": -1089536,
      "scriptDurationMs": 219.38599999999997,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2028.4829999999943,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 8.400999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 715.517,
      "heapDeltaBytes": 3277436,
      "heapUsedBytes": 77437824,
      "domNodes": -106,
      "jsHeapTotalBytes": 6713344,
      "scriptDurationMs": 230.533,
      "eventListeners": -68,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2115.0930000000017,
      "styleRecalcs": 68,
      "styleRecalcDurationMs": 15.988,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1208.2079999999999,
      "heapDeltaBytes": 15652424,
      "heapUsedBytes": 81059564,
      "domNodes": -273,
      "jsHeapTotalBytes": 163840,
      "scriptDurationMs": 525.299,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66999999999998,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "large-graph-pan",
      "durationMs": 2118.7949999999773,
      "styleRecalcs": 69,
      "styleRecalcDurationMs": 17.008000000000003,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1263.671,
      "heapDeltaBytes": 16547928,
      "heapUsedBytes": 81917612,
      "domNodes": -271,
      "jsHeapTotalBytes": 425984,
      "scriptDurationMs": 548.631,
      "eventListeners": -197,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3230.8649999999943,
      "styleRecalcs": 62,
      "styleRecalcDurationMs": 15.118,
      "layouts": 60,
      "layoutDurationMs": 7.361,
      "taskDurationMs": 1469.708,
      "heapDeltaBytes": 26850820,
      "heapUsedBytes": 81844292,
      "domNodes": 4,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 683.951,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3341.4679999999635,
      "styleRecalcs": 65,
      "styleRecalcDurationMs": 17.769,
      "layouts": 60,
      "layoutDurationMs": 7.786999999999999,
      "taskDurationMs": 1575.777,
      "heapDeltaBytes": 29196676,
      "heapUsedBytes": 83050512,
      "domNodes": -275,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 726.039,
      "eventListeners": -195,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "minimap-idle",
      "durationMs": 2004.694000000029,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 6.002999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 617.9229999999999,
      "heapDeltaBytes": 5391472,
      "heapUsedBytes": 58236408,
      "domNodes": -268,
      "jsHeapTotalBytes": 4456448,
      "scriptDurationMs": 210.85000000000002,
      "eventListeners": -197,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "minimap-idle",
      "durationMs": 2037.097000000017,
      "styleRecalcs": 7,
      "styleRecalcDurationMs": 5.777000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 676.5479999999999,
      "heapDeltaBytes": -8711464,
      "heapUsedBytes": 57547456,
      "domNodes": -271,
      "jsHeapTotalBytes": -1843200,
      "scriptDurationMs": 222.47199999999998,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 610.4740000000106,
      "styleRecalcs": 46,
      "styleRecalcDurationMs": 14.671000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 417.103,
      "heapDeltaBytes": -22134456,
      "heapUsedBytes": 47736476,
      "domNodes": -275,
      "jsHeapTotalBytes": 5394432,
      "scriptDurationMs": 128.613,
      "eventListeners": -197,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.663333333333338,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 610.4589999999916,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 12.406,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 406.948,
      "heapDeltaBytes": -22467676,
      "heapUsedBytes": 47277476,
      "domNodes": -273,
      "jsHeapTotalBytes": 5656576,
      "scriptDurationMs": 131.612,
      "eventListeners": -197,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999727
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2020.7240000000013,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 8.329999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 387.025,
      "heapDeltaBytes": 12506228,
      "heapUsedBytes": 65224060,
      "domNodes": -265,
      "jsHeapTotalBytes": 17428480,
      "scriptDurationMs": 18.700000000000003,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2039.8439999999596,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 9.855,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 421.3829999999999,
      "heapDeltaBytes": -7387612,
      "heapUsedBytes": 62481384,
      "domNodes": -273,
      "jsHeapTotalBytes": 18501632,
      "scriptDurationMs": 18.741,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1740.5860000000075,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 39.088,
      "layouts": 16,
      "layoutDurationMs": 4.056,
      "taskDurationMs": 697.225,
      "heapDeltaBytes": 15516652,
      "heapUsedBytes": 73186028,
      "domNodes": 65,
      "jsHeapTotalBytes": 25165824,
      "scriptDurationMs": 91.55099999999999,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 2097.6949999999874,
      "styleRecalcs": 75,
      "styleRecalcDurationMs": 41.632000000000005,
      "layouts": 16,
      "layoutDurationMs": 4.619999999999999,
      "taskDurationMs": 990.809,
      "heapDeltaBytes": 3840460,
      "heapUsedBytes": 55467168,
      "domNodes": -224,
      "jsHeapTotalBytes": 16904192,
      "scriptDurationMs": 126.62599999999999,
      "eventListeners": -199,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 951.7660000000205,
      "styleRecalcs": 17,
      "styleRecalcDurationMs": 28.711999999999996,
      "layouts": 13,
      "layoutDurationMs": 13.321,
      "taskDurationMs": 748.6290000000002,
      "heapDeltaBytes": 27606496,
      "heapUsedBytes": 97523412,
      "domNodes": 13673,
      "jsHeapTotalBytes": 16252928,
      "scriptDurationMs": 24.895,
      "eventListeners": 2531,
      "totalBlockingTimeMs": 137,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8169.515999999987,
      "styleRecalcs": 249,
      "styleRecalcDurationMs": 52.632,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 4531.029,
      "heapDeltaBytes": 7313268,
      "heapUsedBytes": 70852880,
      "domNodes": -271,
      "jsHeapTotalBytes": 6455296,
      "scriptDurationMs": 1944.4859999999999,
      "eventListeners": -183,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333338,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 8174.1309999999885,
      "styleRecalcs": 250,
      "styleRecalcDurationMs": 53.633,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 4417.609,
      "heapDeltaBytes": -5427556,
      "heapUsedBytes": 65129960,
      "domNodes": -269,
      "jsHeapTotalBytes": 1245184,
      "scriptDurationMs": 1821.47,
      "eventListeners": -183,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 10914.340999999979,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 10882.261,
      "heapDeltaBytes": -42293608,
      "heapUsedBytes": 165770920,
      "domNodes": -3300,
      "jsHeapTotalBytes": 12554240,
      "scriptDurationMs": 883.8430000000002,
      "eventListeners": -16350,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333338,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 11120.847000000027,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 11105.655,
      "heapDeltaBytes": -45152004,
      "heapUsedBytes": 168924912,
      "domNodes": -3301,
      "jsHeapTotalBytes": 4194304,
      "scriptDurationMs": 955.2049999999999,
      "eventListeners": -16376,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.223333333333358,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 13662.65999999996,
      "styleRecalcs": 65,
      "styleRecalcDurationMs": 19.346000000000004,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 13644.342999999999,
      "heapDeltaBytes": -42175484,
      "heapUsedBytes": 154713652,
      "domNodes": -3300,
      "jsHeapTotalBytes": 4952064,
      "scriptDurationMs": 1209.339,
      "eventListeners": -16376,
      "totalBlockingTimeMs": 1,
      "frameDurationMs": 16.66333333333338,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 13809.311999999976,
      "styleRecalcs": 65,
      "styleRecalcDurationMs": 21.421999999999997,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 13791.96,
      "heapDeltaBytes": -25224460,
      "heapUsedBytes": 164469040,
      "domNodes": -3301,
      "jsHeapTotalBytes": 17301504,
      "scriptDurationMs": 1279.16,
      "eventListeners": -16369,
      "totalBlockingTimeMs": 43,
      "frameDurationMs": 17.219999999999953,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "workflow-execution",
      "durationMs": 436.10100000000784,
      "styleRecalcs": 16,
      "styleRecalcDurationMs": 20.812,
      "layouts": 5,
      "layoutDurationMs": 1.5070000000000001,
      "taskDurationMs": 110.546,
      "heapDeltaBytes": 5208548,
      "heapUsedBytes": 63840584,
      "domNodes": 168,
      "jsHeapTotalBytes": 5242880,
      "scriptDurationMs": 16.83,
      "eventListeners": 69,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "workflow-execution",
      "durationMs": 535.8459999999923,
      "styleRecalcs": 14,
      "styleRecalcDurationMs": 27.059,
      "layouts": 5,
      "layoutDurationMs": 1.855,
      "taskDurationMs": 194.075,
      "heapDeltaBytes": -2218564,
      "heapUsedBytes": 50981808,
      "domNodes": -147,
      "jsHeapTotalBytes": -659456,
      "scriptDurationMs": 23.718000000000004,
      "eventListeners": -132,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    }
  ]
}

@github-actions

Copy link
Copy Markdown
Contributor

🎨 Storybook: 🚧 Building...

@codecov

codecov Bot commented Jul 15, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 88.81119% with 16 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...enderer/extensions/linearMode/PartnerNodesList.vue 0.00% 7 Missing ⚠️
src/composables/node/useNodeBadge.ts 0.00% 5 Missing ⚠️
src/composables/node/useNodePricing.ts 90.90% 2 Missing ⚠️
src/systems/badgeSystem.ts 97.43% 2 Missing ⚠️
@@                   Coverage Diff                    @@
##             feature/ecs-migration   #13686   +/-   ##
========================================================
  Coverage                         ?   78.70%           
========================================================
  Files                            ?     1653           
  Lines                            ?   110924           
  Branches                         ?    39862           
========================================================
  Hits                             ?    87299           
  Misses                           ?    22775           
  Partials                         ?      850           
Flag Coverage Δ
unit 65.81% <88.81%> (?)

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.46% <ø> (ø)
src/lib/litegraph/src/LGraphBadge.ts 98.91% <ø> (ø)
src/lib/litegraph/src/LGraphNode.ts 80.52% <ø> (ø)
src/lib/litegraph/src/litegraph.ts 100.00% <ø> (ø)
...sions/vueNodes/composables/usePartitionedBadges.ts 90.24% <100.00%> (ø)
src/types/badgeData.ts 100.00% <100.00%> (ø)
src/utils/graphTraversalUtil.ts 94.19% <100.00%> (ø)
src/composables/node/useNodePricing.ts 85.61% <90.90%> (ø)
src/systems/badgeSystem.ts 96.42% <97.43%> (ø)
... 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.

@DrJKL
DrJKL changed the base branch from drjkl/and-then-there-were-none to feature/ecs-migration July 15, 2026 19:13
@DrJKL
DrJKL marked this pull request as ready for review July 15, 2026 21:04
@DrJKL
DrJKL requested review from a team, bigcat88 and jojodecayz as code owners July 15, 2026 21:04
@dosubot dosubot Bot added the size:XXL This PR changes 1000+ lines, ignoring generated files. label Jul 15, 2026

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

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
src/composables/node/useNodePricing.ts (1)

500-530: 🚀 Performance & Scalability | 🟠 Major | ⚡ Quick win

Track in-flight evaluations per signature.

inflight retains only one signature per node. Starting signature B replaces pending A, so another A read schedules a duplicate evaluation. Multiple wrappers with alternating overrides can fan out redundant JSONata work. Use a per-node Map<signature, promise> and remove only the completed signature.

🤖 Prompt for 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.

In `@src/composables/node/useNodePricing.ts` around lines 500 - 530, Update
scheduleEvaluation and the inflight state to track promises in a per-node Map
keyed by signature, rather than a single { sig, promise } entry. Skip scheduling
only when the requested signature already has an in-flight promise, store each
new signature independently, and in finally remove only that completed signature
while preserving the existing cache and revision updates.
🤖 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 `@docs/adr/0008-entity-component-system.md`:
- Around line 40-53: Update the amendment paragraph in
0008-entity-component-system.md to remove the obsolete “store” reference from
the registration seam description, leaving litegraph independent from the badge
system’s pricing and node-definition dependencies. Keep the surrounding
explanation of lazy projections and transient badge rows unchanged.

In `@docs/architecture/node-badge-store.md`:
- Around line 222-227: Monitor the global graphStructureRevision invalidation
behavior in nodeBadges and the legacy LGraphBadge draw cache, profiling large
graphs with frequent structural edits to detect app-wide recomputation or redraw
costs; preserve the current accepted global invalidation design unless profiling
reveals a regression.

In `@src/lib/litegraph/src/LGraph.ts`:
- Around line 305-311: Document `_versionRef` beside its declaration, explaining
that `_version` is ref-backed so `nodes`-getter consumers such as
`mapUniqueNodes` react to version changes. Update the `incrementVersion()`
documentation to describe both its debug-display use and its role in driving
`nodes` getter reactivity, replacing the stale “only read” wording.

In `@src/lib/litegraph/src/nodeBadgeDraw.test.ts`:
- Around line 13-24: The test `joins core parts into one badge in id, lifecycle,
source order` does not distinguish which core row supplies the badge colors
because every `coreRow` uses identical colors. Assign distinct foreground and
background colors to the lifecycle, id, and source rows, then assert the
expected colors from the join-order-selected `firstCore` while preserving the
existing text-order assertion.

In `@src/locales/en/main.json`:
- Around line 2249-2251: Update the nodeBadge.partnerNodesCount locale entry to
provide vue-i18n singular and plural forms instead of hardcoding “Nodes”. Ensure
the corresponding node-count translation call uses the pluralization overload
and passes the count so one renders the singular form and other counts render
the plural form.

In `@src/renderer/extensions/vueNodes/composables/usePartitionedBadges.ts`:
- Around line 24-33: Move the node definition lookup from the outer scope into
the computed callback in usePartitionedBadges, using nodeData.type with the
reactive node-definition store there. Keep the existing showComfyLogo logic
unchanged so additions or replacements in nodeDefsByName trigger recomputation.

In `@src/systems/badgeSystem.subgraph.test.ts`:
- Around line 116-131: Move the promoted-widget-override setup out of the test’s
direct wrapper._internalConfigureAfterSlots() call and into subgraphHelpers,
preferably through createTestSubgraphNode or a focused helper. Update this test
to use that public test utility for connecting the promoted input, reconfiguring
slots, and applying the widget override, while preserving the existing
wrapperCredits() assertion.

In `@src/systems/badgeSystem.ts`:
- Around line 231-249: Update nodeBadges to read the graph-level reactive
revision or identity inside its computed callback before gatherSources(node),
ensuring cached badge rows recompute when a node moves between graphs or a
subgraph reloads. Reuse the existing reactive graph source and preserve the
current memoization and gatherSources flow.

---

Outside diff comments:
In `@src/composables/node/useNodePricing.ts`:
- Around line 500-530: Update scheduleEvaluation and the inflight state to track
promises in a per-node Map keyed by signature, rather than a single { sig,
promise } entry. Skip scheduling only when the requested signature already has
an in-flight promise, store each new signature independently, and in finally
remove only that completed signature while preserving the existing cache and
revision updates.
🪄 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: 8cacb438-185f-45c8-86db-f5da6a643326

📥 Commits

Reviewing files that changed from the base of the PR and between eb80183 and 2b69f93.

⛔ 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 (29)
  • browser_tests/tests/nodeBadge.spec.ts
  • docs/adr/0008-entity-component-system.md
  • 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/LGraph.badges.test.ts
  • src/lib/litegraph/src/LGraph.ts
  • src/lib/litegraph/src/LGraphBadge.ts
  • src/lib/litegraph/src/LGraphNode.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/stores/nodeBadgeStore.test.ts
  • src/stores/nodeBadgeStore.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
  • src/utils/graphTraversalUtil.test.ts
  • src/utils/graphTraversalUtil.ts
💤 Files with no reviewable changes (8)
  • src/stores/nodeBadgeStore.test.ts
  • src/composables/node/usePriceBadge.test.ts
  • src/stores/nodeBadgeStore.ts
  • src/lib/litegraph/src/LGraph.badges.test.ts
  • src/lib/litegraph/src/LGraphBadge.ts
  • src/composables/node/usePriceBadge.ts
  • src/composables/graph/useGraphNodeManager.ts
  • browser_tests/tests/nodeBadge.spec.ts

Comment thread docs/architecture/node-badge-store.md Resolved
Comment on lines +305 to +311
private readonly _versionRef = shallowRef(-1)
get _version(): number {
return toRaw(this)._versionRef.value
}
set _version(value: number) {
toRaw(this)._versionRef.value = value
}

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.

📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick win

_version's new reactive role isn't documented, and incrementVersion()'s doc is now stale.

The _id field (just above) has a comment explaining why it's ref-backed ("propagates to reactive consumers keyed by root graph id"). _versionRef has no equivalent rationale, even though this diff gives _version a new job: the nodes getter (line 561) now touches it to drive reactive badge/credits derivation for consumers like mapUniqueNodes. Meanwhile incrementVersion()'s existing doc still says _version is "Currently only read for debug display in {@link LGraphCanvas.renderInfo}" — that's no longer accurate and could mislead a future refactor into thinking it's safe to drop/batch increments.

📝 Suggested doc update
+  /**
+   * Ref-backed so structural changes (node/group add, remove, connect) are
+   * observable by reactive consumers that read {`@link` nodes} inside a
+   * computed (e.g. subgraph credit-badge derivation).
+   */
   private readonly _versionRef = shallowRef(-1)

And update the incrementVersion() doc to note it now also drives nodes-getter reactivity, not just debug display.

🤖 Prompt for 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.

In `@src/lib/litegraph/src/LGraph.ts` around lines 305 - 311, Document
`_versionRef` beside its declaration, explaining that `_version` is ref-backed
so `nodes`-getter consumers such as `mapUniqueNodes` react to version changes.
Update the `incrementVersion()` documentation to describe both its debug-display
use and its role in driving `nodes` getter reactivity, replacing the stale “only
read” wording.

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 See what happens? You document one field...

Comment thread src/locales/en/main.json Resolved
Comment thread src/systems/badgeSystem.ts Resolved
Comment thread src/lib/litegraph/src/LGraphNode.ts Resolved
const { t } = useI18n()
const canvasStore = useCanvasStore()

const creditsBadges = computed(() =>

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.

Worth moving this into the store?

I've got a current PR that also needs this information, and I've run into some lifecycle/reactivity issues that could benefit from some ECS love.

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.

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.

Moved it into badgeSystem

Comment thread src/composables/node/useNodePricing.ts Resolved
const { t } = useI18n()
const canvasStore = useCanvasStore()

const creditsBadges = computed(() =>

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.

Comment thread src/lib/litegraph/src/LGraphNode.ts Resolved
DrJKL added 2 commits July 15, 2026 17:07
Reactive version bump before onNodeAdded scheduled the Vue flush ahead
of the hook's microtask-deferred missing-model scan; the errors tab was
evicted on paste before the pasted node's candidate existed.
Ref-backed graph fields make node instances non-serializable, so
Playwright resolves them to undefined; project the type inline instead.
@DrJKL
DrJKL requested a review from AustinMroz July 16, 2026 00:25
DrJKL added 2 commits July 15, 2026 17:44
Captured once at composable creation, core-node defs registered or
replaced after mount never re-partitioned (logo, source suppression).
Remove claims that drifted from code: _version 'debug only', badge
computed 'tracks graph structure revision', the never-built
graphStructureRevision module, and the deleted badge store.

@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.

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
docs/architecture/node-badge-store.md (1)

215-218: 📐 Maintainability & Code Quality | 🟡 Minor | ⚡ Quick win

Use the actual provider API name.

The implementation exports registerBadgeRowsProvider, not setBadgeRowsProvider. Update this documentation so the architecture description matches the current seam and remains searchable.

Proposed wording fix
-- `setBadgeRowsProvider` (in `nodeBadgeDraw.ts`) — a one-function seam
+- `registerBadgeRowsProvider` (in `nodeBadgeDraw.ts`) — a one-function seam
🤖 Prompt for 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.

In `@docs/architecture/node-badge-store.md` around lines 215 - 218, Update the
architecture description to replace setBadgeRowsProvider with the actual
exported API name registerBadgeRowsProvider, preserving the existing explanation
of the provider seam and keeping the symbol searchable.
🤖 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.

Outside diff comments:
In `@docs/architecture/node-badge-store.md`:
- Around line 215-218: Update the architecture description to replace
setBadgeRowsProvider with the actual exported API name
registerBadgeRowsProvider, preserving the existing explanation of the provider
seam and keeping the symbol searchable.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro Plus

Run ID: a1c95d2e-81ad-482b-8ea6-2876f957ce15

📥 Commits

Reviewing files that changed from the base of the PR and between 2b69f93 and 1306091.

📒 Files selected for processing (9)
  • browser_tests/fixtures/helpers/NodeOperationsHelper.ts
  • browser_tests/tests/workflowPersistence.spec.ts
  • docs/adr/0008-entity-component-system.md
  • docs/architecture/node-badge-store.md
  • src/composables/node/useNodePricing.ts
  • src/lib/litegraph/src/LGraph.ts
  • src/renderer/extensions/vueNodes/composables/usePartitionedBadges.test.ts
  • src/renderer/extensions/vueNodes/composables/usePartitionedBadges.ts
  • src/systems/badgeSystem.ts
💤 Files with no reviewable changes (2)
  • src/composables/node/useNodePricing.ts
  • browser_tests/fixtures/helpers/NodeOperationsHelper.ts

@DrJKL DrJKL added the refactor label Jul 16, 2026
DrJKL added 2 commits July 16, 2026 10:50
PartnerNodesList mounts twice and PR 13657's free-tier quota needs the
same list; one memoized per-graph computed replaces per-component
traversals.
@AustinMroz AustinMroz removed their assignment Jul 16, 2026
@DrJKL

DrJKL commented Jul 16, 2026

Copy link
Copy Markdown
Contributor Author

Going to merge to the feature branch for now, but if you have comments I'll follow up before trying to merge into main.

@DrJKL
DrJKL merged commit e547694 into feature/ecs-migration Jul 16, 2026
48 checks passed
@DrJKL
DrJKL deleted the drjkl/and-then-there-was-no-store branch July 16, 2026 22:51
@github-actions github-actions Bot locked and limited conversation to collaborators Jul 16, 2026
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