Skip to content

fix: refresh a placeholder's recorded size when it is collapsed - #15733

Merged
mattmillerai merged 3 commits into
matt/be-8848-placeholder-decorationsfrom
matt/be-8851-collapse-refresh-placeholder-size
Aug 27, 2026
Merged

mattmillerai merged 3 commits into
matt/be-8848-placeholder-decorationsfrom
matt/be-8851-collapse-refresh-placeholder-size

Conversation

@mattmillerai

@mattmillerai mattmillerai commented Aug 23, 2026 •

Copy link
Copy Markdown
Member

STACKED — merging lands on matt/be-8848-placeholder-decorations (owned by @mattmillerai, PR #15719), NOT main. That branch is itself stacked on #15713. Do not merge this until both land; it is not "ready to merge" on its own.

ELI-5

If a node in your workflow comes from an extension you do not have installed, the frontend draws a placeholder in its place. Because it has no node definition to work from, saving the workflow replays whatever the file said about that node instead of regenerating it. #15713 made an expanded placeholder save its live size, but a collapsed one falls back to the size recorded in the file — and that record was written once when the workflow loaded and never updated. So: resize a placeholder, collapse it, save — and the resize was thrown away. This makes collapsing and expanding both refresh that record, so the size you last gave the placeholder is the one that gets saved.

Summary

collapse() now keeps a missing-node placeholder's recorded serialization size and its live size in sync in both directions, so a resize made while expanded survives a collapse-then-save round trip and is not lost again on the way back out.

Changes

  • Collapsing copies the live size into last_serialization.size. fix: preserve a live resize when serializing missing-node placeholders #15713's rule is kept intact — a collapsed placeholder still serializes the recorded size, since it has no definition to re-derive an expanded one from; what changes is that "recorded" now means the last known expanded size rather than the load-time one.
  • Expanding restores the live size from last_serialization.size. In Vue nodes mode node.size is a DOM measurement of whichever card is rendered (useLayoutSync.ts:55 writes the ResizeObserver's bounds into liteNode.size), so immediately after an expand it still holds the collapsed card's dimensions until the next measurement lands a frame later. Without the restore, a serialize() inside that window persisted the collapsed dimensions, and a second collapse inside it re-recorded them — destroying the value the refresh exists to preserve.
  • Both halves run before the flags.collapsed flip, so each reads node.size while it still measures the card the node is leaving.
  • Two guards remain: this.constructor === LGraphNode (mirrors serialize()'s own placeholder test) and last_serialization?.size != null (preserves fix: preserve a live resize when serializing missing-node placeholders #15713's "does not invent a size when the recorded serialization has none" rule). The !this.flags.collapsed guard is gone — the flag now selects the direction instead of gating the write.
  • The record is replaced rather than mutated in place, because LGraph.configure() assigns last_serialization by reference straight out of the caller's data.nodes (LGraph.ts:2626; the dedup clone at LGraph.ts:2599 only kicks in for workflows with subgraph definitions). Writing through it would corrupt a retained caller snapshot, and would throw if the input were frozen — aborting the collapse before the flag flipped.
  • Six tests in the missing-node placeholder serialization block in LGraphNode.test.ts.

Review Focus

  • The direction switch in collapse(). It is the whole change. Canvas mode never overwrites node.size on collapse, so there the restore rewrites the values it just recorded and is a no-op; the asymmetry only exists under Vue nodes.
  • Restoring through the size setter (this.size = recordedSerialization.size) rather than setSize(): the setter copies element-wise (no aliasing with last_serialization), guards length < 2, and mirrors into the layout store, but does not fire onResize. Since the restore happens while the node is still flagged collapsed, LGraphNode.vue's handleLayoutChange bails out and the DOM is restored by the existing isCollapsed watch's --node-width-x stash instead.
  • Reassigning last_serialization. No reader caches the object identity — useNodeReplacement.ts:178, missingNodeScan.ts:28, useErrorClearingHooks.ts:236 and the rest read fields at call time — and the load-time writes that do rely on the aliasing (app.ts:2222, app.ts:2270, LGraph.ts:2007) all run long before any collapse.
  • Second consumer of the refreshed field. useNodeReplacement.ts uses node.last_serialization ?? node.serialize() when swapping a placeholder for a real node, so a replacement now inherits the last expanded size rather than the load-time one. That is the intended direction, but it is worth a look.
  • Incidental fix. Expanding a placeholder that was loaded collapsed and then saving used to persist the collapsed card measurement. The restore fixes that too; it predates this PR.

Sweep

The hook is in collapse() only, on the premise that nothing else flips the flag. Sweeping flags.collapsed = across src/, browser_tests/ and apps/: 1 non-test source assignment — the line this change sits in front of — and 17 assignments across 7 test files, none of which are product paths and none of which are touched here. All 5 non-test .collapse( call sites (useNodeEventHandlers.ts, useCoreCommands.ts, useSelectedNodeActions.ts, and two in LGraphCanvas.ts) route through the hook. So the portion deliberately not covered is the direct-flag path, which exists only in tests.

Notes and judgment calls

Unexercised

  • Verification is unit-level. I did not run the Playwright suite or drive Vue nodes mode in a browser. The Vue-mode measurement timing that motivates both the before-the-flip capture and the restore is read off useLayoutSync.ts and LGraphNode.vue rather than observed live, so the width of the re-measure window is inferred, not bounded empirically. The fix does not depend on that width — it closes the window synchronously rather than racing it.
  • The read-only investigation this implementation came from lives in an internal tracker this environment cannot reach, so its findings were taken as given from the plan text rather than re-derived.

Provenance

  • Authored by: agent-work loop
  • Verified: pnpm test:unit src/lib/litegraph src/platform/nodeReplacement src/renderer/core/layout src/renderer/extensions/vueNodes — 178 files, 2330 passed / 3 expected-fail / 12 skipped, 0 failed; pnpm test:unit src/lib/litegraph/src/LGraphNode.test.ts — 51 passed; call-site suites (useCoreCommands, useLoad3d) — 134 passed; pnpm typecheck — clean; oxlint, oxfmt --check and lint on both changed files — clean. Red/green checked on all three new tests: deleting the restore-on-expand line fails 2 of them with expected [ 80, 30 ] to deeply equal [ 777, 666 ], and reverting the replace to an in-place mutation fails the third.
  • Deviations: none of the plan's acceptance criteria were skipped. Two departures from the plan as written, both explained under "Notes and judgment calls": the existing-test premise no longer matches, and the plan scoped only the collapse direction — review found the expand direction was load-bearing for the same guarantee, so it is included here rather than deferred.

A collapsed missing-node placeholder serializes the size recorded in the
file it was loaded with, which was set once at load and never refreshed.
Resizing an expanded placeholder, collapsing it, then saving therefore
wrote the load-time dimensions and dropped the resize on reload.

collapse() now refreshes that record with the size the node is being
collapsed from, captured before the flag flips so Vue nodes mode's
collapsed-card measurement cannot overwrite it.
@mattmillerai mattmillerai added the agent-coded Opened by the agent-work code loop label Aug 23, 2026
@mattmillerai
mattmillerai marked this pull request as ready for review August 23, 2026 09:41
@coderabbitai

coderabbitai Bot commented Aug 23, 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: 21960f11-2c05-41bf-8e02-0ff5e66adb53

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

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

@dosubot dosubot Bot added the size:S This PR changes 10-29 lines, ignoring generated files. label Aug 23, 2026
@github-actions

github-actions Bot commented Aug 23, 2026 •

Copy link
Copy Markdown
Contributor

🎨 Storybook: ✅ Built — View Storybook

Details

⏰ Completed at: 08/26/2026, 08:02:31 PM UTC

Links

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

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

📦 Bundle Size

⏳ Size data collection in progress…

⚡ Performance Report

canvas-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 67.1 MB heap
canvas-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 63.8 MB heap
canvas-zoom-sweep: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 72.2 MB heap
dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 75.0 MB heap
large-graph-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 73.5 MB heap
large-graph-pan: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 63.0 MB heap
large-graph-zoom: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 63.7 MB heap
legacy-node-drag: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 86.6 MB heap
minimap-idle: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 74.6 MB heap
subgraph-dom-widget-clipping: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 61.5 MB heap
subgraph-idle: · 60.0 avg FPS · 59.9 P5 FPS ✅ (target: ≥52) · 0ms TBT · 56.9 MB heap
subgraph-mouse-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 64.0 MB heap
subgraph-transition-enter: · 60.0 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 84ms TBT · 93.6 MB heap
viewport-pan-sweep: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 76.0 MB heap
vue-large-graph-idle: · 57.1 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 0ms TBT · 170.7 MB heap
vue-large-graph-pan: · 58.1 avg FPS · 59.5 P5 FPS ✅ (target: ≥52) · 5ms TBT · 174.9 MB heap
workflow-execution: · 60.0 avg FPS · 59.7 P5 FPS ✅ (target: ≥52) · 0ms TBT · 69.4 MB heap

ℹ️ No baseline found — significance unavailable.

Absolute values
Metric Value
canvas-idle: avg frame time 17ms
canvas-idle: p95 frame time 17ms
canvas-idle: layout duration 0ms
canvas-idle: style recalc duration 7ms
canvas-idle: layout count 0
canvas-idle: style recalc count 10
canvas-idle: task duration 417ms
canvas-idle: script duration 7ms
canvas-idle: TBT 0ms
canvas-idle: heap used 67.1 MB
canvas-idle: DOM nodes -281
canvas-idle: event listeners -170
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 37ms
canvas-mouse-sweep: layout count 12
canvas-mouse-sweep: style recalc count 78
canvas-mouse-sweep: task duration 1025ms
canvas-mouse-sweep: script duration 124ms
canvas-mouse-sweep: TBT 0ms
canvas-mouse-sweep: heap used 63.8 MB
canvas-mouse-sweep: DOM nodes -281
canvas-mouse-sweep: event listeners -169
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 13ms
canvas-zoom-sweep: layout count 6
canvas-zoom-sweep: style recalc count 31
canvas-zoom-sweep: task duration 295ms
canvas-zoom-sweep: script duration 10ms
canvas-zoom-sweep: TBT 0ms
canvas-zoom-sweep: heap used 72.2 MB
canvas-zoom-sweep: DOM nodes 76
canvas-zoom-sweep: event listeners 19
dom-widget-clipping: avg frame time 17ms
dom-widget-clipping: p95 frame time 17ms
dom-widget-clipping: layout duration 0ms
dom-widget-clipping: style recalc duration 6ms
dom-widget-clipping: layout count 0
dom-widget-clipping: style recalc count 13
dom-widget-clipping: task duration 555ms
dom-widget-clipping: script duration 117ms
dom-widget-clipping: TBT 0ms
dom-widget-clipping: heap used 75.0 MB
dom-widget-clipping: DOM nodes 17
dom-widget-clipping: event listeners 2
large-graph-idle: avg frame time 17ms
large-graph-idle: p95 frame time 17ms
large-graph-idle: layout duration 0ms
large-graph-idle: style recalc duration 4ms
large-graph-idle: layout count 0
large-graph-idle: style recalc count 6
large-graph-idle: task duration 470ms
large-graph-idle: script duration 31ms
large-graph-idle: TBT 0ms
large-graph-idle: heap used 73.5 MB
large-graph-idle: DOM nodes -269
large-graph-idle: event listeners -153
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 10ms
large-graph-pan: layout count 0
large-graph-pan: style recalc count 64
large-graph-pan: task duration 1928ms
large-graph-pan: script duration 691ms
large-graph-pan: TBT 0ms
large-graph-pan: heap used 63.0 MB
large-graph-pan: DOM nodes 4
large-graph-pan: event listeners 8
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 11ms
large-graph-zoom: layout count 60
large-graph-zoom: style recalc count 66
large-graph-zoom: task duration 1924ms
large-graph-zoom: script duration 660ms
large-graph-zoom: TBT 0ms
large-graph-zoom: heap used 63.7 MB
large-graph-zoom: DOM nodes 24
large-graph-zoom: event listeners 10
legacy-node-drag: avg frame time 17ms
legacy-node-drag: p95 frame time 17ms
legacy-node-drag: layout duration 0ms
legacy-node-drag: style recalc duration 4ms
legacy-node-drag: layout count 0
legacy-node-drag: style recalc count 40
legacy-node-drag: task duration 2773ms
legacy-node-drag: script duration 745ms
legacy-node-drag: TBT 0ms
legacy-node-drag: heap used 86.6 MB
legacy-node-drag: DOM nodes 0
legacy-node-drag: event listeners 190
minimap-idle: avg frame time 17ms
minimap-idle: p95 frame time 17ms
minimap-idle: layout duration 0ms
minimap-idle: style recalc duration 3ms
minimap-idle: layout count 0
minimap-idle: style recalc count 5
minimap-idle: task duration 434ms
minimap-idle: script duration 31ms
minimap-idle: TBT 0ms
minimap-idle: heap used 74.6 MB
minimap-idle: DOM nodes -269
minimap-idle: event listeners -151
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 9ms
subgraph-dom-widget-clipping: layout count 0
subgraph-dom-widget-clipping: style recalc count 47
subgraph-dom-widget-clipping: task duration 422ms
subgraph-dom-widget-clipping: script duration 117ms
subgraph-dom-widget-clipping: TBT 0ms
subgraph-dom-widget-clipping: heap used 61.5 MB
subgraph-dom-widget-clipping: DOM nodes 19
subgraph-dom-widget-clipping: event listeners 7
subgraph-idle: avg frame time 17ms
subgraph-idle: p95 frame time 17ms
subgraph-idle: layout duration 0ms
subgraph-idle: style recalc duration 6ms
subgraph-idle: layout count 0
subgraph-idle: style recalc count 10
subgraph-idle: task duration 402ms
subgraph-idle: script duration 7ms
subgraph-idle: TBT 0ms
subgraph-idle: heap used 56.9 MB
subgraph-idle: DOM nodes -296
subgraph-idle: event listeners -201
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 32ms
subgraph-mouse-sweep: layout count 16
subgraph-mouse-sweep: style recalc count 76
subgraph-mouse-sweep: task duration 898ms
subgraph-mouse-sweep: script duration 91ms
subgraph-mouse-sweep: TBT 0ms
subgraph-mouse-sweep: heap used 64.0 MB
subgraph-mouse-sweep: DOM nodes -296
subgraph-mouse-sweep: event listeners -201
subgraph-transition-enter: avg frame time 17ms
subgraph-transition-enter: p95 frame time 17ms
subgraph-transition-enter: layout duration 11ms
subgraph-transition-enter: style recalc duration 25ms
subgraph-transition-enter: layout count 15
subgraph-transition-enter: style recalc count 20
subgraph-transition-enter: task duration 592ms
subgraph-transition-enter: script duration 22ms
subgraph-transition-enter: TBT 84ms
subgraph-transition-enter: heap used 93.6 MB
subgraph-transition-enter: DOM nodes 13671
subgraph-transition-enter: event listeners 2381
viewport-pan-sweep: avg frame time 17ms
viewport-pan-sweep: p95 frame time 17ms
viewport-pan-sweep: layout duration 0ms
viewport-pan-sweep: style recalc duration 37ms
viewport-pan-sweep: layout count 0
viewport-pan-sweep: style recalc count 248
viewport-pan-sweep: task duration 6895ms
viewport-pan-sweep: script duration 2375ms
viewport-pan-sweep: TBT 0ms
viewport-pan-sweep: heap used 76.0 MB
viewport-pan-sweep: DOM nodes -273
viewport-pan-sweep: event listeners -142
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 14694ms
vue-large-graph-idle: script duration 275ms
vue-large-graph-idle: TBT 0ms
vue-large-graph-idle: heap used 170.7 MB
vue-large-graph-idle: DOM nodes -6548
vue-large-graph-idle: event listeners -7473
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 15ms
vue-large-graph-pan: layout count 0
vue-large-graph-pan: style recalc count 146
vue-large-graph-pan: task duration 17327ms
vue-large-graph-pan: script duration 745ms
vue-large-graph-pan: TBT 5ms
vue-large-graph-pan: heap used 174.9 MB
vue-large-graph-pan: DOM nodes -6548
vue-large-graph-pan: event listeners -7472
workflow-execution: avg frame time 17ms
workflow-execution: p95 frame time 17ms
workflow-execution: layout duration 1ms
workflow-execution: style recalc duration 18ms
workflow-execution: layout count 5
workflow-execution: style recalc count 15
workflow-execution: task duration 97ms
workflow-execution: script duration 6ms
workflow-execution: TBT 0ms
workflow-execution: heap used 69.4 MB
workflow-execution: DOM nodes 128
workflow-execution: event listeners 62
Raw data
{
  "timestamp": "2026-08-26T20:12:28.446Z",
  "gitSha": "08ec362052ca3e1ca091ba70bda656bb9b8b4a03",
  "branch": "matt/be-8851-collapse-refresh-placeholder-size",
  "measurements": [
    {
      "name": "canvas-idle",
      "durationMs": 2006.2839999999937,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 6.188000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 422.848,
      "heapDeltaBytes": 11292828,
      "heapUsedBytes": 82618964,
      "domNodes": -281,
      "jsHeapTotalBytes": 4448256,
      "scriptDurationMs": 7.3469999999999995,
      "eventListeners": -185,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-idle",
      "durationMs": 1992.379000000028,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 7.0749999999999975,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 411.222,
      "heapDeltaBytes": -13632844,
      "heapUsedBytes": 58119372,
      "domNodes": -280,
      "jsHeapTotalBytes": 4710400,
      "scriptDurationMs": 7.300000000000001,
      "eventListeners": -155,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 2107.533999999987,
      "styleRecalcs": 79,
      "styleRecalcDurationMs": 40.433,
      "layouts": 12,
      "layoutDurationMs": 2.9850000000000003,
      "taskDurationMs": 1093.8000000000002,
      "heapDeltaBytes": 3585572,
      "heapUsedBytes": 74830428,
      "domNodes": -282,
      "jsHeapTotalBytes": 5234688,
      "scriptDurationMs": 128.00400000000002,
      "eventListeners": -153,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "canvas-mouse-sweep",
      "durationMs": 1961.0169999999698,
      "styleRecalcs": 77,
      "styleRecalcDurationMs": 34.457,
      "layouts": 12,
      "layoutDurationMs": 3.1620000000000004,
      "taskDurationMs": 955.9720000000001,
      "heapDeltaBytes": -12942740,
      "heapUsedBytes": 58974488,
      "domNodes": -279,
      "jsHeapTotalBytes": 5758976,
      "scriptDurationMs": 119.31700000000001,
      "eventListeners": -185,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1708.4970000000226,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 13.072999999999999,
      "layouts": 6,
      "layoutDurationMs": 0.51,
      "taskDurationMs": 293.687,
      "heapDeltaBytes": 3880796,
      "heapUsedBytes": 75055408,
      "domNodes": 76,
      "jsHeapTotalBytes": 4718592,
      "scriptDurationMs": 9.629999999999997,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "canvas-zoom-sweep",
      "durationMs": 1707.66100000003,
      "styleRecalcs": 31,
      "styleRecalcDurationMs": 13.258,
      "layouts": 6,
      "layoutDurationMs": 0.58,
      "taskDurationMs": 297.09499999999997,
      "heapDeltaBytes": 4444312,
      "heapUsedBytes": 76282568,
      "domNodes": 75,
      "jsHeapTotalBytes": 5767168,
      "scriptDurationMs": 10.404,
      "eventListeners": 19,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 754.0860000000293,
      "styleRecalcs": 12,
      "styleRecalcDurationMs": 5.438999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 539.83,
      "heapDeltaBytes": 6888612,
      "heapUsedBytes": 78697668,
      "domNodes": 16,
      "jsHeapTotalBytes": 6553600,
      "scriptDurationMs": 110.49499999999999,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.699999999999818
    },
    {
      "name": "dom-widget-clipping",
      "durationMs": 813.3650000000898,
      "styleRecalcs": 13,
      "styleRecalcDurationMs": 6.124,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 570.4449999999999,
      "heapDeltaBytes": 6517240,
      "heapUsedBytes": 78667008,
      "domNodes": 18,
      "jsHeapTotalBytes": 6553600,
      "scriptDurationMs": 123.12699999999998,
      "eventListeners": 2,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2017.1940000000177,
      "styleRecalcs": 5,
      "styleRecalcDurationMs": 3.396,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 481.661,
      "heapDeltaBytes": -1538776,
      "heapUsedBytes": 77348560,
      "domNodes": -268,
      "jsHeapTotalBytes": -1880064,
      "scriptDurationMs": 32.001999999999995,
      "eventListeners": -151,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-idle",
      "durationMs": 2021.5840000000753,
      "styleRecalcs": 6,
      "styleRecalcDurationMs": 4.500000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 457.922,
      "heapDeltaBytes": -2265536,
      "heapUsedBytes": 76870672,
      "domNodes": -269,
      "jsHeapTotalBytes": -2142208,
      "scriptDurationMs": 30.9,
      "eventListeners": -155,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 3112.899999999968,
      "styleRecalcs": 64,
      "styleRecalcDurationMs": 9.600000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1912.47,
      "heapDeltaBytes": 367776,
      "heapUsedBytes": 65891648,
      "domNodes": 4,
      "jsHeapTotalBytes": 2621440,
      "scriptDurationMs": 682.797,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-pan",
      "durationMs": 3128.990999999928,
      "styleRecalcs": 64,
      "styleRecalcDurationMs": 10.009999999999998,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 1943.594,
      "heapDeltaBytes": 688676,
      "heapUsedBytes": 66223356,
      "domNodes": 4,
      "jsHeapTotalBytes": 2621440,
      "scriptDurationMs": 698.388,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3994.000000000028,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 10.796,
      "layouts": 60,
      "layoutDurationMs": 7.171,
      "taskDurationMs": 1936.7289999999998,
      "heapDeltaBytes": -4035296,
      "heapUsedBytes": 66724404,
      "domNodes": 24,
      "jsHeapTotalBytes": 2621440,
      "scriptDurationMs": 663.6569999999999,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "large-graph-zoom",
      "durationMs": 3966.321999999991,
      "styleRecalcs": 66,
      "styleRecalcDurationMs": 10.751,
      "layouts": 60,
      "layoutDurationMs": 7.091,
      "taskDurationMs": 1911.4110000000003,
      "heapDeltaBytes": -3333796,
      "heapUsedBytes": 66863572,
      "domNodes": 24,
      "jsHeapTotalBytes": 2097152,
      "scriptDurationMs": 656.926,
      "eventListeners": 10,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3967.2149999999533,
      "styleRecalcs": 40,
      "styleRecalcDurationMs": 4.386000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2787.154,
      "heapDeltaBytes": 22884696,
      "heapUsedBytes": 90632264,
      "domNodes": 0,
      "jsHeapTotalBytes": 1990656,
      "scriptDurationMs": 752.122,
      "eventListeners": 190,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "legacy-node-drag",
      "durationMs": 3901.974999999993,
      "styleRecalcs": 40,
      "styleRecalcDurationMs": 4.441000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 2758.634,
      "heapDeltaBytes": 23489228,
      "heapUsedBytes": 91026232,
      "domNodes": 0,
      "jsHeapTotalBytes": 1990656,
      "scriptDurationMs": 737.9169999999999,
      "eventListeners": 190,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "minimap-idle",
      "durationMs": 2009.4589999999926,
      "styleRecalcs": 5,
      "styleRecalcDurationMs": 3.356000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 410.67600000000004,
      "heapDeltaBytes": 13135012,
      "heapUsedBytes": 78274484,
      "domNodes": -269,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 30.01000000000001,
      "eventListeners": -151,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "minimap-idle",
      "durationMs": 2015.3030000000172,
      "styleRecalcs": 5,
      "styleRecalcDurationMs": 3.6290000000000004,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 457.195,
      "heapDeltaBytes": 13131156,
      "heapUsedBytes": 78270696,
      "domNodes": -268,
      "jsHeapTotalBytes": 0,
      "scriptDurationMs": 31.74,
      "eventListeners": -151,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 609.581999999989,
      "styleRecalcs": 46,
      "styleRecalcDurationMs": 9.226,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 434.06399999999996,
      "heapDeltaBytes": -7567652,
      "heapUsedBytes": 64804092,
      "domNodes": 18,
      "jsHeapTotalBytes": 6029312,
      "scriptDurationMs": 123.3,
      "eventListeners": 6,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66666666666665,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-dom-widget-clipping",
      "durationMs": 583.1860000000688,
      "styleRecalcs": 47,
      "styleRecalcDurationMs": 9.069999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 409.54600000000005,
      "heapDeltaBytes": -7563004,
      "heapUsedBytes": 64213416,
      "domNodes": 20,
      "jsHeapTotalBytes": 5767168,
      "scriptDurationMs": 110.764,
      "eventListeners": 8,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2008.0999999999563,
      "styleRecalcs": 9,
      "styleRecalcDurationMs": 6.721000000000001,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 403.815,
      "heapDeltaBytes": -13613416,
      "heapUsedBytes": 58197444,
      "domNodes": -296,
      "jsHeapTotalBytes": 4972544,
      "scriptDurationMs": 6.845999999999998,
      "eventListeners": -201,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-idle",
      "durationMs": 2005.5549999999585,
      "styleRecalcs": 10,
      "styleRecalcDurationMs": 6.064,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 399.268,
      "heapDeltaBytes": -11801488,
      "heapUsedBytes": 61081132,
      "domNodes": -295,
      "jsHeapTotalBytes": 5234688,
      "scriptDurationMs": 7.159000000000001,
      "eventListeners": -201,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1759.0759999999932,
      "styleRecalcs": 76,
      "styleRecalcDurationMs": 33.221999999999994,
      "layouts": 16,
      "layoutDurationMs": 4.115,
      "taskDurationMs": 924.9790000000002,
      "heapDeltaBytes": -6602672,
      "heapUsedBytes": 65249408,
      "domNodes": -295,
      "jsHeapTotalBytes": 4972544,
      "scriptDurationMs": 92.55000000000001,
      "eventListeners": -201,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "subgraph-mouse-sweep",
      "durationMs": 1722.4410000000034,
      "styleRecalcs": 75,
      "styleRecalcDurationMs": 29.821,
      "layouts": 16,
      "layoutDurationMs": 3.6630000000000003,
      "taskDurationMs": 870.377,
      "heapDeltaBytes": -3714132,
      "heapUsedBytes": 68958864,
      "domNodes": -297,
      "jsHeapTotalBytes": 5758976,
      "scriptDurationMs": 88.501,
      "eventListeners": -201,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333332,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "subgraph-transition-enter",
      "durationMs": 866.1970000000565,
      "styleRecalcs": 20,
      "styleRecalcDurationMs": 24.658000000000005,
      "layouts": 15,
      "layoutDurationMs": 10.609000000000002,
      "taskDurationMs": 591.6949999999998,
      "heapDeltaBytes": 1824476,
      "heapUsedBytes": 98104840,
      "domNodes": 13671,
      "jsHeapTotalBytes": 10485760,
      "scriptDurationMs": 22.203999999999994,
      "eventListeners": 2381,
      "totalBlockingTimeMs": 84,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.800000000000182
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 12047.733999999991,
      "styleRecalcs": 247,
      "styleRecalcDurationMs": 36.937999999999995,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 7020.728,
      "heapDeltaBytes": -8259256,
      "heapUsedBytes": 70836216,
      "domNodes": -268,
      "jsHeapTotalBytes": 1527808,
      "scriptDurationMs": 2442.287,
      "eventListeners": -127,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.80000000000109
    },
    {
      "name": "viewport-pan-sweep",
      "durationMs": 11906.896999999957,
      "styleRecalcs": 249,
      "styleRecalcDurationMs": 37.363,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 6768.668,
      "heapDeltaBytes": 10641144,
      "heapUsedBytes": 88615016,
      "domNodes": -277,
      "jsHeapTotalBytes": 1458176,
      "scriptDurationMs": 2307.572,
      "eventListeners": -157,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.666666666666668,
      "p95FrameDurationMs": 16.700000000000728
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 15512.209999999981,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 14946.591,
      "heapDeltaBytes": -24676972,
      "heapUsedBytes": 181024356,
      "domNodes": -6548,
      "jsHeapTotalBytes": 5726208,
      "scriptDurationMs": 274.735,
      "eventListeners": -7473,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.219999999999953,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-idle",
      "durationMs": 14888.734,
      "styleRecalcs": 0,
      "styleRecalcDurationMs": 0,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 14441.603000000001,
      "heapDeltaBytes": -22345932,
      "heapUsedBytes": 176868540,
      "domNodes": -6548,
      "jsHeapTotalBytes": -4333568,
      "scriptDurationMs": 275.072,
      "eventListeners": -7473,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 17.776666666666763,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 17673.625999999957,
      "styleRecalcs": 144,
      "styleRecalcDurationMs": 15.514,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 17302.593,
      "heapDeltaBytes": -33416744,
      "heapUsedBytes": 175814372,
      "domNodes": -6548,
      "jsHeapTotalBytes": 3354624,
      "scriptDurationMs": 753.9879999999999,
      "eventListeners": -7471,
      "totalBlockingTimeMs": 8,
      "frameDurationMs": 17.216666666666665,
      "p95FrameDurationMs": 16.80000000000291
    },
    {
      "name": "vue-large-graph-pan",
      "durationMs": 17775.982999999997,
      "styleRecalcs": 147,
      "styleRecalcDurationMs": 14.66999999999999,
      "layouts": 0,
      "layoutDurationMs": 0,
      "taskDurationMs": 17351.856,
      "heapDeltaBytes": -28618736,
      "heapUsedBytes": 191005196,
      "domNodes": -6548,
      "jsHeapTotalBytes": 921600,
      "scriptDurationMs": 735.2030000000001,
      "eventListeners": -7473,
      "totalBlockingTimeMs": 1,
      "frameDurationMs": 17.220000000000073,
      "p95FrameDurationMs": 16.799999999999272
    },
    {
      "name": "workflow-execution",
      "durationMs": 123.18599999991875,
      "styleRecalcs": 13,
      "styleRecalcDurationMs": 16.133000000000003,
      "layouts": 7,
      "layoutDurationMs": 1.519,
      "taskDurationMs": 87.432,
      "heapDeltaBytes": 4025340,
      "heapUsedBytes": 71944784,
      "domNodes": 133,
      "jsHeapTotalBytes": 524288,
      "scriptDurationMs": 6.34,
      "eventListeners": 25,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.663333333333338,
      "p95FrameDurationMs": 16.700000000000273
    },
    {
      "name": "workflow-execution",
      "durationMs": 453.43800000000556,
      "styleRecalcs": 16,
      "styleRecalcDurationMs": 20.650999999999996,
      "layouts": 3,
      "layoutDurationMs": 0.6489999999999999,
      "taskDurationMs": 106.233,
      "heapDeltaBytes": 5693568,
      "heapUsedBytes": 73540632,
      "domNodes": 123,
      "jsHeapTotalBytes": 262144,
      "scriptDurationMs": 6.114,
      "eventListeners": 99,
      "totalBlockingTimeMs": 0,
      "frameDurationMs": 16.66333333333335,
      "p95FrameDurationMs": 16.800000000000182
    }
  ]
}

@github-actions github-actions Bot added the risk:R3 PR risk grade (advisory shadow check; grader-owned) label Aug 23, 2026
@mattmillerai mattmillerai added the cursor-review Trigger multi-model Cursor agent review on this PR label Aug 23, 2026
@codecov

codecov Bot commented Aug 23, 2026 •

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.

@@                          Coverage Diff                           @@
##           matt/be-8848-placeholder-decorations   #15733    +/-   ##
======================================================================
  Coverage                                 79.47%   79.47%            
======================================================================
  Files                                      1947     1947            
  Lines                                    118503   118503            
  Branches                                  34001    33533   -468     
======================================================================
+ Hits                                      94181    94182     +1     
+ Misses                                    23823    23822     -1     
  Partials                                    499      499            
Flag Coverage Δ
e2e 66.91% <ø> (-0.01%) ⬇️

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

Files with missing lines Coverage Δ
src/lib/litegraph/src/LGraphNode.ts 69.46% <ø> (ø)

... and 6 files with indirect coverage changes

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

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

🔍 Cursor Review — Consolidated panel

Triggered by @mattmillerai.

Found 4 finding(s).

Severity Count
🟠 High 1
🟡 Medium 3

Panel: 8/8 reviewers contributed findings.

Comment thread src/lib/litegraph/src/LGraphNode.ts Resolved
Comment thread src/lib/litegraph/src/LGraphNode.ts Resolved
Comment thread src/lib/litegraph/src/LGraphNode.ts Resolved
@dosubot dosubot Bot added size:M This PR changes 30-99 lines, ignoring generated files. and removed size:S This PR changes 10-29 lines, ignoring generated files. labels Aug 23, 2026
collapse() refreshed last_serialization.size on the expanded->collapsed
transition only. In Vue nodes mode node.size is a DOM measurement of the
card that is currently rendered, so right after an expand it still holds
the collapsed card's dimensions until the ResizeObserver write-back lands
a frame later. Serializing inside that window persisted the collapsed
size over the recorded one, and a second collapse inside it re-recorded
the collapsed size, destroying the value the refresh exists to keep.

Make the refresh symmetric: expanding now restores node.size from the
recorded size, so both the window's serialize and its re-collapse see the
expanded dimensions. The record is also replaced rather than mutated in
place, since LGraph.configure() assigns it by reference out of the
caller's workflow data.
…ions' into matt/be-8851-collapse-refresh-placeholder-size

# Conflicts:
#	src/lib/litegraph/src/LGraphNode.ts
@vercel

vercel Bot commented Aug 26, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
comfy-ui-frontend-desktop-ui Ready Ready Preview Aug 26, 2026 8:01pm

Request Review

@mattmillerai
mattmillerai merged commit d2b3c15 into matt/be-8848-placeholder-decorations Aug 27, 2026
82 of 85 checks passed
@mattmillerai
mattmillerai deleted the matt/be-8851-collapse-refresh-placeholder-size branch August 27, 2026 22:40
@huang47 huang47 added the risk:xhigh PR risk grade (advisory shadow check; grader-owned) label Sep 2, 2026 — with ChatGPT Codex Connector
@huang47 huang47 removed the risk:R3 PR risk grade (advisory shadow check; grader-owned) label Sep 2, 2026

This branch was successfully deployed

1 active deployment
Preview – comfy-ui-frontend-desktop-ui — e7f19f9c Deployed Aug 26, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

agent-coded Opened by the agent-work code loop cursor-review Trigger multi-model Cursor agent review on this PR risk:xhigh PR risk grade (advisory shadow check; grader-owned) size:M This PR changes 30-99 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants