Repository navigation
fix: surface missing media on the promoted host widget - #14578
Conversation
Mirror the missingModelPipeline seam so the media pipeline is reachable outside ComfyApp. Pure move: no behavior change.
Failing coverage for the ADR 0009 contract: missing-media candidates are created from the editable host promoted widget, not the linked interior widget, and stay alive while any interior consumer is active. No production code; the implementation follows.
📄 Knowledge reviewDosu skipped reviewing this PR because your organization has used its |
🎭 Playwright: ✅ 1782 passed, 0 failed · 2 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 8.21 MB gzip 🔴 +1.33 kBDetailsSummary
Category Glance App Entry Points — 3.64 kB (baseline 3.64 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.29 MB (baseline 1.29 MB) • 🔴 +3.37 kBGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed / 1 unchanged Views & Navigation — 111 kB (baseline 111 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 12 added / 12 removed / 4 unchanged Panels & Settings — 551 kB (baseline 551 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 11 added / 11 removed / 15 unchanged User & Accounts — 28.7 kB (baseline 28.7 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 7 added / 7 removed / 3 unchanged Editors & Dialogs — 124 kB (baseline 124 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 6 added / 6 removed / 1 unchanged UI Components — 70 kB (baseline 70 kB) • ⚪ 0 BReusable component library chunks
Status: 6 added / 6 removed / 9 unchanged Data & Services — 3.45 MB (baseline 3.45 MB) • 🔴 +3.65 kBStores, services, APIs, and repositories
Status: 14 added / 14 removed / 3 unchanged Utilities & Hooks — 386 kB (baseline 386 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 19 added / 19 removed / 17 unchanged Vendor & Third-Party — 15.7 MB (baseline 15.7 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 12.8 MB (baseline 12.8 MB) • 🔴 +118 BBundles that do not match a named category
Status: 78 added / 78 removed / 203 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-08-03T14:02:51.118Z",
"gitSha": "d3a54a32ee7f91bd39506c7da7ba1359f732cd08",
"branch": "jaeone/missing-media-promoted-host-scan",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2180.168999999978,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.974,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 604.2099999999999,
"heapDeltaBytes": 5231576,
"heapUsedBytes": 73241788,
"domNodes": 20,
"jsHeapTotalBytes": 20049920,
"scriptDurationMs": 18.995999999999995,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-idle",
"durationMs": 2022.4159999999074,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.897000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 477.939,
"heapDeltaBytes": 5332832,
"heapUsedBytes": 73273520,
"domNodes": 18,
"jsHeapTotalBytes": 20049920,
"scriptDurationMs": 17.101,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1874.100999999996,
"styleRecalcs": 75,
"styleRecalcDurationMs": 38.352,
"layouts": 12,
"layoutDurationMs": 3.673,
"taskDurationMs": 878.4940000000001,
"heapDeltaBytes": -15308080,
"heapUsedBytes": 52513284,
"domNodes": -281,
"jsHeapTotalBytes": 19914752,
"scriptDurationMs": 122.23,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1862.6689999999826,
"styleRecalcs": 77,
"styleRecalcDurationMs": 37.400999999999996,
"layouts": 12,
"layoutDurationMs": 3.4929999999999994,
"taskDurationMs": 886.581,
"heapDeltaBytes": -21009524,
"heapUsedBytes": 46734740,
"domNodes": -281,
"jsHeapTotalBytes": 20963328,
"scriptDurationMs": 127.076,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1756.3339999999812,
"styleRecalcs": 31,
"styleRecalcDurationMs": 16.570999999999998,
"layouts": 6,
"layoutDurationMs": 0.49799999999999994,
"taskDurationMs": 389.69200000000006,
"heapDeltaBytes": 7939056,
"heapUsedBytes": 75847940,
"domNodes": 78,
"jsHeapTotalBytes": 20574208,
"scriptDurationMs": 18.822,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1753.9560000000165,
"styleRecalcs": 32,
"styleRecalcDurationMs": 17.259999999999998,
"layouts": 6,
"layoutDurationMs": 0.7280000000000001,
"taskDurationMs": 380.17100000000005,
"heapDeltaBytes": 7998080,
"heapUsedBytes": 75974312,
"domNodes": 77,
"jsHeapTotalBytes": 20312064,
"scriptDurationMs": 18.88,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 589.8839999999836,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.657000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 376.685,
"heapDeltaBytes": -12350200,
"heapUsedBytes": 55626592,
"domNodes": 18,
"jsHeapTotalBytes": 21622784,
"scriptDurationMs": 59.707,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 590.644999999995,
"styleRecalcs": 12,
"styleRecalcDurationMs": 8.881,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 378.644,
"heapDeltaBytes": -12431616,
"heapUsedBytes": 55602332,
"domNodes": 20,
"jsHeapTotalBytes": 21622784,
"scriptDurationMs": 58.619,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2034.1599999999858,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.859000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 664.396,
"heapDeltaBytes": 8379332,
"heapUsedBytes": 67544552,
"domNodes": -283,
"jsHeapTotalBytes": 5304320,
"scriptDurationMs": 102.901,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-idle",
"durationMs": 2030.0690000000259,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.452999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 679.4769999999999,
"heapDeltaBytes": 8558192,
"heapUsedBytes": 67493788,
"domNodes": -282,
"jsHeapTotalBytes": 5042176,
"scriptDurationMs": 106.673,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2187.4030000000175,
"styleRecalcs": 69,
"styleRecalcDurationMs": 13.607999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1261.9089999999999,
"heapDeltaBytes": 5431576,
"heapUsedBytes": 65578788,
"domNodes": -282,
"jsHeapTotalBytes": 4743168,
"scriptDurationMs": 422.479,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2199.400999999966,
"styleRecalcs": 69,
"styleRecalcDurationMs": 13.479999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1345.1470000000002,
"heapDeltaBytes": 2810752,
"heapUsedBytes": 63226704,
"domNodes": -283,
"jsHeapTotalBytes": 6053888,
"scriptDurationMs": 482.68999999999994,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3181.9110000000137,
"styleRecalcs": 64,
"styleRecalcDurationMs": 13.436,
"layouts": 60,
"layoutDurationMs": 7.189000000000001,
"taskDurationMs": 1511.9799999999998,
"heapDeltaBytes": 26641304,
"heapUsedBytes": 88636756,
"domNodes": 10,
"jsHeapTotalBytes": 9961472,
"scriptDurationMs": 583.866,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3213.0200000000286,
"styleRecalcs": 65,
"styleRecalcDurationMs": 14.107000000000001,
"layouts": 60,
"layoutDurationMs": 7.021999999999999,
"taskDurationMs": 1510.353,
"heapDeltaBytes": -1693772,
"heapUsedBytes": 60153064,
"domNodes": -273,
"jsHeapTotalBytes": 7401472,
"scriptDurationMs": 528.864,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2038.0719999999997,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.335000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 674.531,
"heapDeltaBytes": 8438992,
"heapUsedBytes": 69355996,
"domNodes": -282,
"jsHeapTotalBytes": 3731456,
"scriptDurationMs": 110.211,
"eventListeners": -144,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2041.1550000000034,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.226,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 672.576,
"heapDeltaBytes": 8384424,
"heapUsedBytes": 69475508,
"domNodes": -283,
"jsHeapTotalBytes": 4780032,
"scriptDurationMs": 108.54299999999999,
"eventListeners": -142,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 600.7230000000163,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.104999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 409.973,
"heapDeltaBytes": -11069364,
"heapUsedBytes": 57053276,
"domNodes": 20,
"jsHeapTotalBytes": 20836352,
"scriptDurationMs": 123.48900000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 594.6589999999787,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.261000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 399.27799999999996,
"heapDeltaBytes": -10859860,
"heapUsedBytes": 57109252,
"domNodes": 20,
"jsHeapTotalBytes": 21622784,
"scriptDurationMs": 120.544,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2020.5559999999991,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.086,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 459.41299999999995,
"heapDeltaBytes": 4404972,
"heapUsedBytes": 72448124,
"domNodes": 22,
"jsHeapTotalBytes": 21098496,
"scriptDurationMs": 13.951000000000002,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 1994.8490000000447,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.680999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 454.743,
"heapDeltaBytes": 4521292,
"heapUsedBytes": 72322736,
"domNodes": 18,
"jsHeapTotalBytes": 20574208,
"scriptDurationMs": 14.423000000000002,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1697.0120000000293,
"styleRecalcs": 74,
"styleRecalcDurationMs": 35.789,
"layouts": 16,
"layoutDurationMs": 4.228,
"taskDurationMs": 807.5169999999999,
"heapDeltaBytes": -19777140,
"heapUsedBytes": 48217616,
"domNodes": -281,
"jsHeapTotalBytes": 21225472,
"scriptDurationMs": 94.202,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1707.3059999999032,
"styleRecalcs": 75,
"styleRecalcDurationMs": 35.272,
"layouts": 16,
"layoutDurationMs": 4.3020000000000005,
"taskDurationMs": 805.9190000000001,
"heapDeltaBytes": -19167360,
"heapUsedBytes": 48865248,
"domNodes": -279,
"jsHeapTotalBytes": 20176896,
"scriptDurationMs": 90.88799999999999,
"eventListeners": -148,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1384.059000000093,
"styleRecalcs": 19,
"styleRecalcDurationMs": 30.165999999999997,
"layouts": 15,
"layoutDurationMs": 12.328999999999999,
"taskDurationMs": 926.846,
"heapDeltaBytes": 31078724,
"heapUsedBytes": 99239740,
"domNodes": 13673,
"jsHeapTotalBytes": 15990784,
"scriptDurationMs": 35.278000000000006,
"eventListeners": 2375,
"totalBlockingTimeMs": 137,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8329.346999999983,
"styleRecalcs": 250,
"styleRecalcDurationMs": 35.151,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4444.8460000000005,
"heapDeltaBytes": 13309816,
"heapUsedBytes": 72165444,
"domNodes": -279,
"jsHeapTotalBytes": 7331840,
"scriptDurationMs": 1388.488,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8294.555999999942,
"styleRecalcs": 249,
"styleRecalcDurationMs": 34.666000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4414.397,
"heapDeltaBytes": 12144740,
"heapUsedBytes": 71382672,
"domNodes": -283,
"jsHeapTotalBytes": 6807552,
"scriptDurationMs": 1367.7559999999999,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-large-graph-idle",
"durationMs": 16915.022000000023,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16872.008,
"heapDeltaBytes": -33940020,
"heapUsedBytes": 171018296,
"domNodes": -8312,
"jsHeapTotalBytes": -10952704,
"scriptDurationMs": 585.974,
"eventListeners": -16387,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17060.86700000003,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17042.492,
"heapDeltaBytes": -46766288,
"heapUsedBytes": 167320112,
"domNodes": -8312,
"jsHeapTotalBytes": -9641984,
"scriptDurationMs": 529.004,
"eventListeners": -16387,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 20472.26500000005,
"styleRecalcs": 139,
"styleRecalcDurationMs": 15.925000000000022,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20422.273,
"heapDeltaBytes": -30605496,
"heapUsedBytes": 179039832,
"domNodes": -8312,
"jsHeapTotalBytes": -10760192,
"scriptDurationMs": 900.282,
"eventListeners": -16383,
"totalBlockingTimeMs": 92,
"frameDurationMs": 18.330000000000048,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 20555.67799999994,
"styleRecalcs": 140,
"styleRecalcDurationMs": 16.403999999999975,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 20531.756999999998,
"heapDeltaBytes": -54297272,
"heapUsedBytes": 154014544,
"domNodes": -8312,
"jsHeapTotalBytes": -15933440,
"scriptDurationMs": 879.9449999999999,
"eventListeners": -16383,
"totalBlockingTimeMs": 131,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 453.2050000000254,
"styleRecalcs": 13,
"styleRecalcDurationMs": 16.383000000000003,
"layouts": 2,
"layoutDurationMs": 0.3129999999999999,
"taskDurationMs": 107.45699999999998,
"heapDeltaBytes": -16014944,
"heapUsedBytes": 50725380,
"domNodes": 130,
"jsHeapTotalBytes": 7991296,
"scriptDurationMs": 9.479,
"eventListeners": 67,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 470.3230000000076,
"styleRecalcs": 14,
"styleRecalcDurationMs": 19.935000000000002,
"layouts": 3,
"layoutDurationMs": 0.629,
"taskDurationMs": 111.404,
"heapDeltaBytes": -16051320,
"heapUsedBytes": 50982584,
"domNodes": 119,
"jsHeapTotalBytes": 6942720,
"scriptDurationMs": 9.113000000000001,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
}
]
} |
|
Note Reviews pausedIt looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughPromoted-media support now covers graph scanning, asynchronous verification, lifecycle cleanup, widget error rendering, workflow loading, and browser workflows. Tests cover nested subgraphs, fanout, bypass, deletion, demotion, host errors, media selection, and uploads. ChangesPromoted missing-media handling
Estimated code review effort: 4 (Complex) | ~60 minutes Sequence Diagram(s)sequenceDiagram
participant WorkflowLoader
participant MissingMediaPipeline
participant GraphScanner
participant MissingMediaStore
participant PropertiesPanel
WorkflowLoader->>MissingMediaPipeline: pass root graph and silent-error setting
MissingMediaPipeline->>GraphScanner: scan promoted media candidates
GraphScanner-->>MissingMediaPipeline: return active candidates
MissingMediaPipeline->>MissingMediaStore: verify and cache missing candidates
MissingMediaStore-->>PropertiesPanel: expose widget error state
Possibly related PRs
Suggested labels: Suggested reviewers: 🚥 Pre-merge checks | ✅ 5 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Actionable comments posted: 10
🤖 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 `@browser_tests/tests/propertiesPanel/errorsTabMissingMediaRuntime.spec.ts`:
- Around line 581-614: In the test around setPromotedMediaHostOptionsAndValue,
open or initialize the PropertiesPanelHelper and assert that panel.errorsTab and
getErrorOverlay(comfyPage) are hidden immediately after validating optionState,
before either bypass call. Keep the existing bypass round-trip assertions
afterward so the baseline verifies the host-only value clears the error
independently.
In `@src/composables/graph/useErrorClearingHooks.test.ts`:
- Around line 1017-1024: Update the test cases around the outerHost mode-change
events to use the existing setNodeMode helper, including the case near the later
mode-change assertion. Remove the hand-built property-change events and
synthetic oldValue values so the helper derives each transition from the node’s
actual current mode.
- Around line 986-1085: Extract the duplicated runtime, candidate, spy,
hook-installation, and pending-verification setup from the two async tests into
a shared helper returning rootGraph, outerHost, leafNode, pendingCandidate, and
resolveVerification, following the shape of
startPendingWorkflowLoadMediaVerification. Update both tests to use the helper,
retaining only their distinct verification outcome steps, including leafNode
bypassing in the second test.
- Around line 71-82: Move createPromotedMissingMediaCandidate into the fixture
module beside createPromotedMediaRuntime, preserving its existing behavior and
shared fixture defaults. In src/composables/graph/useErrorClearingHooks.test.ts
lines 71-82 and src/platform/missingMedia/missingMediaPipeline.test.ts lines
24-35, delete the local duplicate helpers and import the shared helper from
`@/platform/missingMedia/__fixtures__/promotedMedia`.
In `@src/platform/missingMedia/missingMediaPipeline.test.ts`:
- Around line 88-110: The test around startPendingWorkflowLoadMediaVerification
is vacuous because missingMediaCandidates starts as null; first assert that
verification completed and the candidate state was actually mutated, using the
sibling suite’s expect.soft precondition pattern, then retain the final null
assertion after bypassing all sourceNodes.
In `@src/platform/missingMedia/missingMediaPipeline.ts`:
- Around line 59-80: Update the verification promise catch handler associated
with the controller checked in the preceding then block to return immediately
when controller.signal.aborted is true, preventing stale runs from logging or
showing a toast. Keep warning handling and existing pendingWarnings/cache
behavior unchanged for non-aborted runs.
In `@src/platform/missingMedia/missingMediaScan.test.ts`:
- Around line 596-654: Consolidate the four fanout consumer tests around
scanAllMediaCandidates into one it.each table with [consumer index,
LGraphEventMode, expected result] tuples. Reuse createPromotedMediaRuntime for
each case, apply the mode to the specified sourceNodes index (including the
all-consumers case), and preserve the existing host-candidate expectations for
partial bypass/never scenarios and an empty result when all consumers use the
mode.
In `@src/platform/missingMedia/missingMediaStore.test.ts`:
- Around line 344-360: Narrow every createNodeExecutionId result before using it
in the affected tests: in src/platform/missingMedia/missingMediaStore.test.ts
lines 344-360, narrow hostExecutionId before isWidgetMissingMedia; in
src/renderer/extensions/vueNodes/composables/useProcessedWidgets.test.ts lines
353-379, narrow the results at lines 357, 363, and 370 before assigning
sourceExecutionId or nodeId; and in lines 335-351, narrow the candidate nodeId
result at line 341. Use a shared helper that throws on null or equivalent local
narrowing, ensuring all resulting values satisfy NodeExecutionId and
SerializedNodeId types.
- Around line 42-49: Make isWidgetMissingMedia required in
MissingMediaStoreWithPromotedHostIdentity, removing the optional marker, and
update the calls around the referenced test locations to invoke it directly
instead of using optional chaining. Preserve the existing method signature and
ensure the test type-checks only when the store exposes this contract.
In `@src/renderer/extensions/vueNodes/composables/useProcessedWidgets.test.ts`:
- Around line 353-379: Update the test case around processWidgets so otherWidget
uses the same name, outer_image, as matchingWidget while differing only in
sourceExecutionId, ensuring the assertion verifies source-path isolation.
Preserve the existing name-mismatch scenario separately if coverage for name
filtering is still required.
🪄 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: 56289f60-3267-4fb9-8767-2342b77703db
📒 Files selected for processing (17)
browser_tests/assets/missing/missing_media_promoted_widget.jsonbrowser_tests/fixtures/components/WidgetSelectDropdown.tsbrowser_tests/fixtures/helpers/SubgraphHelper.tsbrowser_tests/fixtures/selectors.tsbrowser_tests/fixtures/utils/promotedMissingMedia.tsbrowser_tests/fixtures/utils/promotedMissingModel.tsbrowser_tests/tests/propertiesPanel/errorsTabMissingMediaRuntime.spec.tsbrowser_tests/tests/vueNodes/widgets/load/uploadWidgets.spec.tssrc/composables/graph/useErrorClearingHooks.test.tssrc/platform/assets/utils/markDeletedAssetsAsMissingMedia.test.tssrc/platform/missingMedia/__fixtures__/promotedMedia.tssrc/platform/missingMedia/missingMediaPipeline.test.tssrc/platform/missingMedia/missingMediaPipeline.tssrc/platform/missingMedia/missingMediaScan.test.tssrc/platform/missingMedia/missingMediaStore.test.tssrc/renderer/extensions/vueNodes/composables/useProcessedWidgets.test.tssrc/scripts/app.ts
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
browser_tests/fixtures/helpers/SubgraphHelper.ts (1)
367-372: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winGuard against empty-string node IDs before numeric parsing.
Number('')returns0, notNaN. IfnodeIdis an empty string,Number.isNaN(numericNodeId)isfalse, and the function silently proceeds as if targeting node"0". Add an explicit empty-string check before the numeric parse, so an invalid or unresolved node ID fails with a clear error instead of silently targeting the wrong node.🐛 Proposed fix
async enterSubgraphWithFallback(nodeId: string): Promise<void> { + if (!nodeId) { + throw new Error('Expected non-empty subgraph node id') + } const numericNodeId = Number(nodeId) if (Number.isNaN(numericNodeId)) { throw new Error(`Expected numeric subgraph node id, got ${nodeId}`) }🤖 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 `@browser_tests/fixtures/helpers/SubgraphHelper.ts` around lines 367 - 372, Update enterSubgraphWithFallback to reject an empty nodeId before converting it with Number. Preserve the existing clear error for invalid or unresolved IDs, ensuring empty strings cannot be interpreted as node 0.
🤖 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 `@browser_tests/fixtures/helpers/SubgraphHelper.ts`:
- Around line 367-372: Update enterSubgraphWithFallback to reject an empty
nodeId before converting it with Number. Preserve the existing clear error for
invalid or unresolved IDs, ensuring empty strings cannot be interpreted as node
0.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: bfd8dba5-cf7f-4a85-a293-9da5babb01d5
📒 Files selected for processing (12)
browser_tests/fixtures/VueNodeHelpers.tsbrowser_tests/fixtures/components/WidgetSelectDropdown.tsbrowser_tests/fixtures/helpers/SubgraphHelper.tsbrowser_tests/fixtures/utils/promotedMissingMedia.tsbrowser_tests/fixtures/utils/promotedMissingModel.tsbrowser_tests/fixtures/utils/promotedWidgets.tsbrowser_tests/tests/propertiesPanel/errorsTabMissingMediaRuntime.spec.tssrc/composables/graph/useErrorClearingHooks.test.tssrc/platform/missingMedia/__fixtures__/promotedMedia.tssrc/platform/missingMedia/missingMediaPipeline.test.tssrc/platform/missingMedia/missingMediaScan.test.tssrc/renderer/extensions/vueNodes/composables/useProcessedWidgets.test.ts
💤 Files with no reviewable changes (1)
- browser_tests/fixtures/components/WidgetSelectDropdown.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@browser_tests/fixtures/helpers/SubgraphHelper.ts`:
- Around line 368-370: Update the node ID validation in the helper around
numericNodeId to trim the input before checking for blank values, then reject
any value that is not a finite integer using the same integer rule as LGraph.
Keep valid integer IDs flowing unchanged to getSubgraphEnterButton or toNodeId.
🪄 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: 449c72d3-386b-4bc6-98cf-1444a5abe572
📒 Files selected for processing (1)
browser_tests/fixtures/helpers/SubgraphHelper.ts
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/composables/graph/useErrorClearingHooks.ts`:
- Around line 394-403: Update removeNodeErrors and the onNodeRemoved removal
flow to avoid filtering mediaStore.missingMediaCandidates for every individual
node removal. Batch candidate-scope validation across grouped graph removals, or
maintain candidate activity incrementally, so one workflow change performs at
most one rescan while preserving removal of inactive candidates.
🪄 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: cb2c9991-171e-4d7e-8a86-ff7b0ec20a61
📒 Files selected for processing (9)
src/composables/graph/useErrorClearingHooks.tssrc/core/graph/subgraph/resolveConcretePromotedWidget.tssrc/platform/assets/utils/markDeletedAssetsAsMissingMedia.tssrc/platform/missingMedia/missingMediaPipeline.tssrc/platform/missingMedia/missingMediaScan.tssrc/platform/missingMedia/missingMediaStore.test.tssrc/platform/missingMedia/missingMediaStore.tssrc/renderer/extensions/vueNodes/composables/useProcessedWidgets.test.tssrc/renderer/extensions/vueNodes/composables/useProcessedWidgets.ts
Codecov Report❌ Patch coverage is @@ Coverage Diff @@
## main #14578 +/- ##
==========================================
+ Coverage 79.14% 79.17% +0.02%
==========================================
Files 1769 1772 +3
Lines 113307 113524 +217
Branches 35242 35296 +54
==========================================
+ Hits 89678 89880 +202
- Misses 23092 23101 +9
- Partials 537 543 +6
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 6 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
Note Docstrings generation - SUCCESS |
Docstrings generation was requested by @jaeone94. * #14578 (comment) The following files were modified: * `browser_tests/fixtures/utils/promotedMissingMedia.ts` * `browser_tests/fixtures/utils/promotedMissingModel.ts` * `browser_tests/fixtures/utils/promotedWidgets.ts` * `src/composables/graph/useErrorClearingHooks.ts` * `src/core/graph/subgraph/resolveConcretePromotedWidget.ts` * `src/platform/assets/utils/markDeletedAssetsAsMissingMedia.ts` * `src/platform/missingMedia/__fixtures__/promotedMedia.ts` * `src/platform/missingMedia/missingMediaPipeline.ts` * `src/platform/missingMedia/missingMediaScan.ts` * `src/platform/missingMedia/missingMediaStore.ts` * `src/renderer/extensions/vueNodes/composables/useProcessedWidgets.ts`
Replace the hardcoded MEDIA_NODE_WIDGETS map with the upload flags the backend already declares on the combo input spec, read through nodeDefStore.getInputSpecForWidget. The flag precedence mirrors WidgetSelect.vue, which resolves the same spec to decide whether a widget renders an upload control. Custom loader nodes are now covered; previously only LoadImage, LoadImageMask, LoadVideo and LoadAudio were.
…otion Promotion transfers value ownership from the interior widget to the host, and demotion transfers it back. Only the demotion direction was handled, so promoting a widget with a missing file left the error keyed to the interior node the user can no longer edit, and demoting deleted the error without re-checking the widget that regained ownership. Both events now rescan the host subtree: whichever side lost ownership fails the scope check and is dropped, whichever side gained it is scanned fresh. Demotion keeps its explicit host removal because the host input still carries the widget when the event fires. Also drops two branches that cannot change behaviour: the app.rootGraph === graph.rootGraph guard in onNodeRemoved, which is always true because a single root graph exists for the app's lifetime, and the missing-widget early return in isMissingMediaCandidateScopeActive, which returns exactly what the code below it already returns.
- Skip the missing-media store write when the scope filter removes nothing, so node removal and mode toggles stop churning the candidate array. - Correct the isMissingCandidateActive doc comment: it no longer covers the media paths, which resolve scope through isMissingMediaCandidateActive. - Name the pipeline parameter rootGraph, which is what it has to be for root-relative execution ids to key correctly. - enterSubgraphWithFallback waits for the canvas and Vue nodes after both branches instead of only the fallback, mirroring exitViaBreadcrumb, and validates ids with parseNodeId so non-numeric node ids are accepted. - Drop the unused leaf lookup from the first evaluate in the promoted media helper, and rename the option-value test which claimed to upload.
There was a problem hiding this comment.
Missing-media investigation: corrected architectural finding
Correction: my original review interpreted PR #13434's "no source traversal" too narrowly. After re-reading its commit history and ADR 0009 direction, that statement was wrong. Subgraphs are black boxes. Topology queries are constrained by the same boundary.
Primary finding: missing-media pierces the subgraph boundary
PR #13434 moves consumers from live source traversal to host-owned WidgetId and SubgraphInput.name. PR #14578 restores two forms of interior inspection:
| Interior inspection | Current purpose | Why it violates the direction |
|---|---|---|
resolvePromotedWidgetSource(...) |
Walk to the leaf node/widget to recover its media input spec | Schema must be projected through host-owned boundary metadata; missing-media cannot discover it by opening the box |
hasActivePromotedWidgetConsumer(...) |
Recursively inspect input-node slots, links, node modes, concrete widgets, and nested subgraphs | Liveness is topology. A boundary consumer must query boundary-owned aggregate state, not private graph structure |
flowchart LR
MM[Missing-media system] -->|allowed| BC[Host boundary contract]
BC --> WI[Host WidgetId]
BC --> SM[Projected media schema]
BC --> LV[Aggregate input liveness]
MM -. forbidden .-> IN[Subgraph inputNode]
MM -. forbidden .-> LK[Interior links]
MM -. forbidden .-> ND[Interior nested nodes]
SG[Subgraph execution system] -->|maintains| BC
style BC fill:#d4edda,stroke:#28a745
style IN fill:#f8d7da,stroke:#dc3545
style LK fill:#f8d7da,stroke:#dc3545
style ND fill:#f8d7da,stroke:#dc3545
Evidence from PR #13434 and ADR 0009
- Commit
8fa9de3, "make promoted widget rows host-scoped, drop source traversal," replaces live source discovery with the host input'swidgetId. - Host identity is
(host node, SubgraphInput.name), not a flattened path to a leaf. - ADR 0009 warns that deep paths couple host consumers to private nested internals.
- Nested composition is boundary-by-boundary; subgraphs remain opaque.
- ADR 0009's source-metadata carve-out explains why some diagnostic helpers still existed. It does not require each feature consumer to traverse nested topology. Under the black-box direction, schema and diagnostic metadata must also be exported through the boundary.
Required replacement direction
| Concern | Boundary-safe contract |
|---|---|
| Candidate identity/value/options | Host WidgetId and host-owned widget state |
| Media classification | Projected host input/widget schema, or a host-scoped schema store |
| Consumer liveness | Boundary-owned aggregate keyed by host WidgetId or input name |
| Nested composition | Each subgraph publishes its own boundary state; never flatten or cache a canonical leaf path |
The subgraph or execution system may inspect and reconcile its own internals. The missing-media system must consume only the published boundary contract.
Secondary lifecycle findings
These remain valid, but fixing them without removing traversal would harden the wrong abstraction:
| Severity | Missing transition | Result |
|---|---|---|
| Medium | Host input linked/unlinked | Candidate can remain stale or fail to reappear |
| Medium | Widget removed/renamed during verification | Late verification can re-surface a stale candidate |
The boundary-owned liveness design should naturally make link transitions observable without media-specific interior rescans.
Pairwise decision check: corrected
| Decision | PR #13434 direction | PR #14578 | Verdict |
|---|---|---|---|
| Host value/error ownership | Host-scoped | Host-scoped | Aligned |
| Schema access | Published at/through boundary | Resolves concrete leaf | Wrong abstraction |
| Liveness | Boundary-owned state | Recursively walks private topology | Violates black-box rule |
| Nested subgraphs | Compose boundary-by-boundary | Traverses to concrete consumers | Excess coupling |
| ECS migration | Stores/systems own derived state | Feature service reads LiteGraph internals | Migration obstacle |
feature/ecs-migration impact
This is more than a merge hotspot. Porting hasActivePromotedWidgetConsumer to a generic ECS link-store query would still expose private topology to the wrong consumer. The combined design should instead add a boundary-owned liveness/schema projection and have missing-media query that projection.
useProcessedWidgets.ts still requires a semantic port that preserves host-keyed missing-media identity. The feature snapshot's SubgraphNode scan exclusion should not simply be deleted in favor of recursive scanning; it should be replaced with boundary-state scanning.
Verification dossier
- PR #13434 diff and commit direction re-read independently
- ADR 0009 host identity, opacity, and nested boundary composition checked
- 6 targeted unit files / 178 tests remain green
- Type checking remains green
- Existing tests prove recursive behavior, but currently encode the abstraction that needs replacement
Verdict
Request architectural changes before merging. The user-visible ownership fix is correct, but both schema resolution and consumer liveness must arrive through a host-owned black-box boundary. Once that architecture is corrected, the two lifecycle bugs should be re-evaluated against the new boundary contract.
| if (!isComboWidget(widget)) continue | ||
| if (widget.name !== mediaInfo.widgetName) continue | ||
| const input = node.getSlotFromWidget?.(widget) | ||
| if (input?.link != null) continue |
There was a problem hiding this comment.
🧩 Missing transition: link ownership changes
This ownership rule is correct, but the stored error is not synchronized when the link state changes. The connection hook clears only simple execution errors on connection and returns immediately on disconnection.
| Transition | Expected media behavior | Current behavior |
|---|---|---|
| unlinked → linked | Remove host candidate; upstream owns the value | Existing missing-media candidate remains stale |
| linked → unlinked | Rescan host; it regains value ownership | No media rescan occurs |
A focused lifecycle test can start with a promoted missing image, connect an upstream output and assert removal, then disconnect and assert the host candidate returns. This likely belongs in the connection hook as media-specific prune/rescan handling for both transitions.
There was a problem hiding this comment.
Good catch — this was real, and both directions were broken. The rule was only ever evaluated at scan time; nothing observed the transition. The connection hook returned early on disconnect and only cleared execution errors on connect, so a stale candidate survived linking and unlinking never restored one.
Fixed in a7dd49e. Linking and unlinking now prune and rescan through the same path promotion uses:
queueMicrotask(() => {
if (!app.rootGraph) return
dropOutOfScopeMissingMedia()
if (!isConnected) scanSingleNodeMedia(node)
})Added the lifecycle test you described — promoted missing image, connect upstream and assert the candidate is gone, disconnect and assert it returns. Mutation-proved in both directions: dropping the prune fails the connect half, dropping the rescan fails the disconnect half.
This was the same class of gap as promotion/demotion, which I'd handled earlier in the PR — link ownership is the third transition and I'd missed it entirely. Thanks.
|
|
||
| const node = getNodeByExecutionId(rootGraph, executionId) | ||
| if (!node) return false | ||
| const widget = node?.widgets?.find( |
There was a problem hiding this comment.
🔎 Missing witness: the candidate widget itself
If this lookup fails, getSlotFromWidget(undefined) yields no input and the function later returns true for an ordinary node.
scan → verification awaits → widget removed/renamed
→ late scope check → ordinary node reports active
→ stale error is surfaced again
A missing widget should make the candidate out of scope:
| const widget = node?.widgets?.find( | |
| if (!widget) return false |
Please cover removal or rename while verification is pending, then confirm the late result is discarded.
There was a problem hiding this comment.
You're right, and this one is slightly embarrassing on my side. An earlier round had if (!widget) return !node.isSubgraphNode() here. I proved it was equivalent to falling through and deleted it as dead — which was true, but I never asked whether the behaviour it duplicated was correct. It wasn't: an ordinary node reported active for a widget that no longer exists.
Applied your suggestion in a7dd49e:
// Removed or renamed while verification was pending: nothing owns the value.
if (!widget) return falseCovered both removal and rename while verification is pending, and confirmed the late result is discarded. Reverting the guard fails both.
One related thing your comment surfaced: the existing un-bypass path surfaces pending media candidates after verification test built its node with no widgets at all while mocking the scan, so it was passing for a reason unrelated to what it claims. Gave it the image widget a real LoadImage would have — assertions unchanged.
DrJKL
left a comment
There was a problem hiding this comment.
Follow-up after independently rechecking the unresolved review assumptions against the merged HEAD across architecture, lifecycle, performance, unit-test, and browser-test paths.
Correction to the earlier architecture review: the ADR 0009/black-box objection does not apply here. Ownership remains host-keyed, and topology traversal is encapsulated in the subgraph domain. Most other substantive concerns were fixed before merge.
The inline comments capture the remaining actionable items. The highest priority is an async stale-value race: post-verification liveness checks widget identity but not whether the widget still contains the candidate's captured value. The other findings are repeated global reconciliation during multi-node deletion and a regression test that synthesizes an impossible mode transition.
This is an informational follow-up because the PR is already merged.
| // Removed or renamed while verification was pending: nothing owns the value. | ||
| if (!widget) return false | ||
|
|
||
| return isEditableValueOwner(node, widget) |
There was a problem hiding this comment.
The post-verification witness confirms that the same node and widget are still active, but not that the widget still contains the value captured by this candidate. If verification of missing-a.png is pending while the user changes the widget to valid-b.png, the old candidate can pass this predicate and be surfaced again. Because the scan stores the raw string as candidate.name, this can be closed at the shared predicate:
| return isEditableValueOwner(node, widget) | |
| return ( | |
| widget.value === candidate.name && | |
| isEditableValueOwner(node, widget) | |
| ) |
Please also add a deferred-verification regression test that changes A → B before resolving and asserts A is neither surfaced nor cached, including a promoted-host case. This predicate protects both the realtime and workflow-load paths.
| nodesStore.removeMissingNodesByPrefix(prefix) | ||
| } | ||
|
|
||
| dropOutOfScopeMissingMedia() |
There was a problem hiding this comment.
This runs the full candidate filter and topology checks for every node-removal event. A synchronous deletion of N nodes therefore repeats global reconciliation N times, roughly O(removed nodes × missing-media candidates). Could targeted per-node removal remain synchronous while the global reconciliation is queued once per removal burst (for example with a guarded microtask)? The mode-change path can remain synchronous if it needs immediate semantics. A regression test could delete several nodes synchronously, verify targeted candidates disappear immediately, and assert one global reconciliation after the microtask.
| expect(mediaStore.missingMediaCandidates).toBeNull() | ||
| }) | ||
|
|
||
| it('rescans ancestor hosts when a promoted source ancestor is un-bypassed', () => { |
There was a problem hiding this comment.
This test later puts innerSubgraphNode in ALWAYS and then manually emits an event claiming BYPASS → ALWAYS, so the node state and transition witness cannot both be true. That can leave the test green if production behavior incorrectly relies on the synthetic event fields. Establish the real initial state and drive the transition through the existing helper instead:
innerSubgraphNode.mode = LGraphEventMode.BYPASS
setNodeMode(outerSubgraph, innerSubgraphNode, LGraphEventMode.ALWAYS)main moved `updatePendingWarnings` out of app.ts in #14578 and #14556 landed a workflowService mock in app.test.ts. Both merge without conflict markers in app.ts but leave this branch broken: - restore the `updatePendingWarnings` import; this branch adds a new caller in `showMissingNodesError` that main no longer imports for - point the workflowService mock at the real implementation in the two tests that exercise the load lifecycle itself, so #14556's mock and this branch's lifecycle assertions can coexist
Comfy-Org#14948) ## Summary Follow-up to Comfy-Org#14578, addressing the highest-priority item from @DrJKL's post-merge review. Since that PR is already merged, the finding had no home. `isMissingMediaCandidateScopeActive` verifies that the candidate's node and widget are still present and still the editable value owner, but not that the widget still holds the value the candidate captured. Media verification is async, so if the user corrects `missing-a.png` to `valid-b.png` while verification is in flight, the stale candidate still passes the predicate and gets surfaced as missing against a value that is no longer there. The predicate guards both the realtime and workflow-load paths, so the fix closes it once at the shared site rather than at each caller. ## Root cause `scanNodeMediaCandidates` stores the raw widget value as `candidate.name`, but nothing compares it back to the live widget on the way out. ## Red-green verification | Commit | CI | Purpose | |---|---|---| | `test: add failing test ...` | red | Proves the test detects the stale candidate | | `fix: ...` | green | Proves the fix resolves it | ## Test plan - [x] New unit test fails on `main` for the right reason (`expected true to be false`), passes with the fix - [x] `pnpm typecheck`, oxfmt, oxlint, eslint clean - [ ] CI red on the test-only commit, green on the fix commit ## Not included Two other items from the same review remain open and are better handled separately: - repeated global reconciliation during multi-node deletion (`useErrorClearingHooks.ts:405`) — a perf refactor with an open design question about queueing the global pass per removal burst - a regression test that synthesizes an impossible mode transition (`useErrorClearingHooks.test.ts:1246`) --------- Co-authored-by: Claude Opus 5 <noreply@anthropic.com>
Comments now say what a thing is rather than narrating the situation around it, and names carry the rest: the reconciler's module doc keeps its first line, and the notes above the dropOutOfScope guard, the scan's ordering, isEditableValueOwner, and rootGraph are gone because the code already says all of it. Deletes the missingMediaStore.test.ts comment that could not be parsed. Also settles on `drop` for the operation that had been both `prune` and `drop`, and aliases comfyPageFixture to `test` the way the other 213 specs do. No behaviour changes.
…14668) ## Summary Follow-up to [Comfy-Org#14578](Comfy-Org#14578): the comment/naming cleanup requested during its review, plus what remains of DrJKL's post-merge findings after [Comfy-Org#14948](Comfy-Org#14948) landed the stale-value guard. Rebased onto current `main`. Contained to files Comfy-Org#14578 already touched — no new modules, exports, or store surfaces. ## Changes **Reconciliation during multi-node deletion (`useErrorClearingHooks.ts`)** — deleting N nodes ran the global candidate walk N times. Targeted removal for the deleted node stays synchronous; only the global pass is coalesced into one microtask per burst, and it drops if the hooks were torn down meanwhile. The mode-change path keeps its synchronous semantics. The scheduler lives in the `installErrorClearingHooks` closure rather than at module scope, so it follows the per-installation `disposed` lifecycle Comfy-Org#15012 introduced. Two promotion lifecycle tests seeded their stale candidate after the removal and relied on the synchronous pass having already gone by; they now let the removal's own reconcile land first. **Un-bypass transition test** — hand-rolled the mode event while leaving the node in its default mode, so it never established the BYPASS state its transition claimed. Driven through `setNodeMode`, which already sits in that file. **Workflow-load coverage for the stale-value guard** — Comfy-Org#14948 pinned the guard through the realtime path and through the predicate itself. The pipeline also writes confirmed candidates into the workflow's `pendingWarnings`, which `workflowService` restores without re-validating, so a stale candidate surviving there outlives the session. Asserting the cache needs a workflow stub, which is why the `workspaceStore` mock stops returning a null `activeWorkflow`. **Comment and naming cleanup** — comments say what a thing *is* rather than narrating the situation around it: the reconciler's module doc keeps its first line and drops the essay; the notes above the `dropOutOfScope` guard, the scan's ordering, `isEditableValueOwner`, and `rootGraph` are gone because the code and the names already carry them. The unparseable `missingMediaStore.test.ts` comment is deleted. `findNodesReferencingValues` no longer explains a caller's behaviour. Settles on `drop` for the operation spelled both `prune` and `drop`. Aliases `comfyPageFixture` to `test` in `errorsTabMissingMediaRuntime.spec.ts`, matching the 213 other specs that do. **Breaking**: none. ## Dropped on rebase The stale-value hunk and its realtime regression test are identical to what Comfy-Org#14948 shipped, so `main` already has them. The promoted-media harness also encoded an impossible fixture state — `createPromotedMissingMediaCandidate` derives `name` from `hostWidget.value`, but the harness overrode `name` while leaving the widget elsewhere. Comfy-Org#14948 fixed that by seeding through `hostValue`, which keeps the two in sync rather than dropping the distinct name; that resolution is kept. ## Review focus Both behavioural changes carry a mutation-proved regression test on this base: reverting the coalescing makes the burst test fail (2 calls instead of 0 before the microtask), and reverting the value guard makes the workflow-load test fail. Commits are split so each is independently reviewable and independently green. Deliberately **not** included: - Moving `isEditableValueOwner` into `src/core/graph/subgraph/`, raised on Comfy-Org#14578. The point stands — nothing there combines link state, promotion and liveness into "is this widget the editable value owner", and the predicate isn't missing-media-specific. But the move creates a new shared surface in the area `feature/ecs-migration` is actively reworking, which is not worth it for a single-caller helper. Left where it is. - `WidgetSelectDropdown`'s `root`/`trigger` semantics, and the reconciler's dependency on node add/remove — both scoped out by the reviewer, the latter to be handled in his refactor. - The E2E-structure items — the conditional repair path in `enterSubgraphWithFallback`, driving promoted-widget setup through user behaviour instead of `page.evaluate`, the options argument, and the `_testNodes` mock branches. Those change how the suite is built, so they're tracked in [FE-1493](https://linear.app/comfyorg/issue/FE-1493/no-e2e-for-promotedemote-error-reconciliation-and-promoted-media). ## Test plan Static gates clean on the rebased tree (`typecheck`, `lint`, `format:check`, `knip`). Unit run scoped to the affected areas — `composables/graph`, `platform/missingMedia` — 188 tests green, and each of the four commits verified green on its own. Full suite left to CI.
Summary
Move missing-media error surfacing from the interior widget to the promoted host widget, matching the ADR 0009 ownership model.
Built as a red-green pair. The tests were written and pushed first and failed on CI; the implementation followed and turned them green, with the failing and passing runs both linked below.
Changes
refactor: extract the missing media pipeline seam— movesrunMissingMediaPipeline/cacheMediaCandidatesout ofComfyAppintosrc/platform/missingMedia/missingMediaPipeline.ts, mirroring the existingmissingModelPipeline.ts. Pure move.fix: surface missing media on the promoted host widget— the implementation.refactor: derive missing media detection from the input spec— replaces the hardcodedMEDIA_NODE_WIDGETSmap with the upload flags the backend already declares.fix: move the missing media error surface on promotion as well as demotion— closes the promotion half of the ownership transfer.refactor: address review nits on the promoted missing media surface.Production total: 332 insertions / 114 deletions across 9 files.
Why
#12197 (ADR 0009) made promoted widgets host-owned: the host
SubgraphNodewidget owns the value and the interior widget only supplies schema/options metadata. #13059 updated missing model detection for that contract. Missing media was never updated —missingMediaScan.tsstill skips subgraph hosts entirely and reads the interior widget.What the user sees today, with a
LoadImageinside a subgraph whoseimagewidget is promoted:onNodeAddedrescan.The contract these tests pin
A candidate is created from the unlinked final editable value owner.
nodeIdwidgetNamenodeTypeLoadImage)InputSpecupload flags (image_upload,animated_image_upload,video_upload,audio_upload) vianodeDefStore.getInputSpecForWidget. The tests were written against the four-nodeMEDIA_NODE_WIDGETSmap that existed at the time; the later spec-based commit keeps every one of them green and additionally covers custom loader nodes.A → B → C: onlyAcreates a candidate.Review Focus
Two intentional differences from missing model
1. Options are read from the host, not the leaf.
missingModelScanreads the interior widget's options. Media cannot: uploading through the host dropdown appends the filename to the host widget's option list only (useWidgetSelectActions.handleFilesUpdate), so reading leaf options would report a just-uploaded file as missing on the next rescan. Model combos have no upload control —allowUploadderives from the same spec flags this PR now reads for detection — so the divergence does not apply to them.2. Liveness is any-consumer, not first-link. A
SubgraphInputcan feed N interior widgets, and ADR 0009's primitive-fanout repair creates exactly that shape.resolveSubgraphInputLinkreturns only the first resolvable link as the "promoted representative", andmissingModelScan.ts:219uses that single representative for liveness. In model today, with consumers A/B/C, bypassing A alone clears the host error even though B and C still need the file — the outcome depends on link order, which is an implementation detail. Media does not inherit that. A follow-up PR will alignmissingModelScanto the same rule.What each wrong implementation trips on
uses a valid host value even when the linked interior value is staleaccepts a value found only in the promoted host options+reports a value found only in the interior leaf options as missingAll four production liveness call sites are pinned separately — scan, removal/mode-change, workflow-load async verification, realtime async verification — so a partial implementation cannot go green.
Test notes
scanNodeMediaCandidatesBYPASS/NEVER guards and threemissingMediaStoretests pass without production changes; they exclude specific wrong implementations rather than proving the bug. Removal authority intentionally lives in the scan rather than in a targeted store API.MissingMediaCandidategains no new field. An earlier design recorded the leaf execution path on the candidate; that cannot express any-consumer liveness and goes stale when consumers change, so liveness is re-derived from the host at check time.this.rootGraphwas read lazily inside.then()and is now captured as a parameter; these are equivalent becauserootGraphInternalhas exactly one assignment site (app.ts:955), so a singleLGraphexists for the app's lifetime. Verified by applying only the two production files tomainand running the full unit suite.Known unrelated CI noise
src/platform/cloud/onboarding/onboardingCloudRoutes.test.tsintermittently times out at 5s on module-level dynamic imports. Reproduced on this branch's base commit..nvmrcpins a floatingnode 25, resolved fresh per run, so identical commits can behave differently across runs.Changes after the green run
Three commits landed after the red-green pair. All 51 checks pass on
86382c61.Spec-based media detection. Ecosystem impact: this broadens detection from four hardcoded node types to every node whose combo input declares an upload flag, so third-party media loaders will now surface missing-media errors where they previously never did.
mesh_uploadstays unhandled — missing media has no mesh surface yet. Detection was a hardcoded map of four node types (LoadImage,LoadImageMask,LoadVideo,LoadAudio) keyed by widget name. It now reads the upload flags the backend already declares on the comboInputSpec, resolved throughnodeDefStore.getInputSpecForWidget— the same API the Vue layer uses to populateSimplifiedWidget.spec(useGraphNodeManager.ts:165), and the same flag precedenceWidgetSelect.vueuses to decide whether a widget renders an upload control. Custom loader nodes are now covered.candidate.nodeTypestill comes from the leaf: the errors overlay formats it directly (missingErrorResolver.ts:265), and aSubgraphNode's owntypeis a UUID, whichformatNodeTypeNamewould pass through verbatim.Promotion, not just demotion. Promotion transfers value ownership from the interior widget to the host; demotion transfers it back. Only demotion was handled, so promoting a widget with a missing file left the error keyed to the interior node the user can no longer edit — the same class of bug this PR exists to fix, reached by a different route — and demoting deleted the error without re-checking the widget that regained ownership. Both events now rescan the host subtree: whichever side lost ownership fails the scope check and is dropped, whichever side gained it is scanned fresh. Demotion keeps its explicit host removal because
ensureWidgetRemoveddispatches before the widget leaves the input, so the scope filter cannot yet see it gone. Two tests, both mutation-proven.Two branches that could not change behaviour were removed: the
app.rootGraph === graph.rootGraphguard inonNodeRemoved(hooks install oncanvasStore.currentGraph, which may be aSubgraph, butSubgraph.rootGraphreturns the app's single root, so it is always true), and the missing-widget early return inisMissingMediaCandidateScopeActive(getSlotFromWidgetacceptsundefined, so the branch returned exactly what the code below it already returned).Follow-ups
An 18-lane blackbox review produced these. Each is real but outside this PR's scope; none block it.
findNodesReferencingValuesskips subgraph hosts, so a deleted asset stays written into the workflow JSON through a promoted hostMapkeys onSubgraph, retaining definitions until teardownrootGraphstaleness guard cannot fire for same-workflow editsAbortSignalthrough the scan path, whichverifyMediaCandidatesalready acceptsisWidgetMissingMediais a linear scan where the model store precomputes a keySethasActiveConsumerre-implementsresolveSubgraphInputLink's traversal and sits inresolveConcretePromotedWidget.tsuseNodeImageUploadnever runs, andWidgetSelectDropdowntracks upload state in a localrefisUploadingguard is therefore unreachable for promoted widgets; fixing it is an upload-path change, not a detection changecandidate.nodeType, which only the overlay message consumes directly (missingErrorResolver.ts:265); the row label already prefers the node's display nameresolvePromotedWidgetSourceentirely —getInputSpecForWidgetalready walks the promoted chain itself, so chain resolution would live behind one store API instead of being re-derived here. Deferred because it changes a user-visible string (i18n) andnodeTypeis a public field onMissingMediaCandidateshared with grouping and the model-side symmetryshowPendingWarnings()unconditionally (app.ts:714), restoringwf.pendingWarnings.missingMediaCandidatesverbatim — so an error cleared by a bypass, a node deletion or a demotion comes back, keyed to a node that may no longer existmain— filed as FE-1487. Nothing outside the load pipeline updates that cache, andshowPendingWarningsre-writes what it read, so the divergence is self-perpetuating. The restore path is shared with missing model and missing node, so any fix has to be validated across all threemediaTypeFromSpecduplicatesWidgetSelect.vue:82-90, which derives the sameAssetKindfrom the same flags and also handlesmesh_uploadassetKindFromComboSpecwould keep them from drifting when a flag is added, butWidgetSelect.vueis outside this PR's diffNon-goals
findNodesReferencingValues; the deleted-asset path will be fixed at its call site so the preview-clearing and value-clearing consumers keep their current behavior.Red-green proof
e11161a81fe2d9a8At red, the only failing jobs were the unit suite, one chromium E2E shard, and the
e2e-statusjob that aggregates them; the other 47 checks passed. The failing unit files were exactly the six this PR touches. The E2E failures were behavioural assertions rather than setup errors — the first one printed the bug directly, with the errors-tab row naming the interior node the user cannot edit:At green, all 50 checks pass, including the same three jobs. The three commits added after that run are described above; the branch head
86382c61is green on every check — unit, e2e (27/27 jobs, covering thecloud,mobile-chrome,mobile-safari,chromium-2xandchromium-0.5xprojects as well as the 16 chromium shards).Tests changed between the two runs
Two tests were corrected after the red run was recorded. Both are listed here rather than folded in silently:
missingMediaStore.test.ts— the red-phase intersection type and cast were removed andisWidgetMissingMediais now called directly. During red the store did not expose the method, so an optional member kept the failure anAssertionErrorinstead of aTypeError; once the implementation landed the scaffolding became unnecessary. This completes what was promised in the review thread.useProcessedWidgets.test.ts—otherWidgetwas re-aimed fromouter_imagetoouter_mask. As written it shared its entire host identity withmatchingWidgetand differed only insourceExecutionId, so it demanded source-path discrimination that this contract deliberately removes — it could not pass under any implementation. It remains a promoted widget, so the promoted path is still exercised, and a mutation that drops thewidgetNamecomparison in the store still fails it.No other test changed: the 193
it/describetitles across the six red files are identical at both revisions, with noskiporonlyadded, and the fixtures, E2E specs and helpers are untouched.Verification beyond CI
widget-promotedlistener fails the promotion test, reverting the demotion rescan fails the demotion test, and reverting spec-based detection to the old map fails the custom-node test.:5173, and thecloudproject against apnpm build:clouddist served by a local backend, matching how CI builds and serves it.Video
2026-08-03.1.11.36.mov