Repository navigation
fix: drop stale missing-media candidates when the widget value changes - #14948
Conversation
… value change A candidate whose widget value changes while verification is pending still passes isMissingMediaCandidateScopeActive, so the stale value can be surfaced as missing after the user has already corrected it. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1792 passed, 0 failed · 2 flaky📊 Browser Reports
📦 Bundle: 8.69 MB gzip 🟢 -4 BDetailsSummary
Category Glance App Entry Points — 3.67 kB (baseline 3.67 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.36 MB (baseline 1.36 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 124 kB (baseline 124 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 13 added / 13 removed / 4 unchanged Panels & Settings — 570 kB (baseline 570 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 16 unchanged User & Accounts — 27 kB (baseline 27 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 6 added / 6 removed / 4 unchanged Editors & Dialogs — 125 kB (baseline 125 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 7 added / 7 removed / 1 unchanged UI Components — 67.1 kB (baseline 67.1 kB) • ⚪ 0 BReusable component library chunks
Status: 6 added / 6 removed / 8 unchanged Data & Services — 3.5 MB (baseline 3.5 MB) • 🔴 +35 BStores, services, APIs, and repositories
Status: 14 added / 14 removed / 3 unchanged Utilities & Hooks — 550 kB (baseline 550 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 18 added / 18 removed / 20 unchanged Vendor & Third-Party — 16.3 MB (baseline 16.3 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 17 unchanged Other — 14 MB (baseline 14 MB) • ⚪ 0 BBundles that do not match a named category
Status: 68 added / 68 removed / 218 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-08-09T02:57:02.788Z",
"gitSha": "0d15eb24af9ea383f8ce960ac7a810d1d5efd61a",
"branch": "fix/missing-media-stale-value-race",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2036.7160000000126,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.423000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 457.46600000000007,
"heapDeltaBytes": 5715816,
"heapUsedBytes": 69915432,
"domNodes": 18,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 15.389000000000003,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2067.4379999999815,
"styleRecalcs": 9,
"styleRecalcDurationMs": 9.633000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 482.49399999999997,
"heapDeltaBytes": 5766212,
"heapUsedBytes": 69940976,
"domNodes": 18,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 16.725000000000005,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2084.7109999999984,
"styleRecalcs": 79,
"styleRecalcDurationMs": 43.049,
"layouts": 12,
"layoutDurationMs": 3.7510000000000003,
"taskDurationMs": 1056.4830000000002,
"heapDeltaBytes": -12561068,
"heapUsedBytes": 51679124,
"domNodes": -281,
"jsHeapTotalBytes": 24092672,
"scriptDurationMs": 133.73000000000002,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1837.6349999999775,
"styleRecalcs": 71,
"styleRecalcDurationMs": 33.120999999999995,
"layouts": 12,
"layoutDurationMs": 3.4070000000000005,
"taskDurationMs": 866.22,
"heapDeltaBytes": -14922768,
"heapUsedBytes": 49516260,
"domNodes": -283,
"jsHeapTotalBytes": 23044096,
"scriptDurationMs": 117.35299999999998,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1737.8709999999842,
"styleRecalcs": 32,
"styleRecalcDurationMs": 16.586000000000002,
"layouts": 6,
"layoutDurationMs": 0.6430000000000001,
"taskDurationMs": 387.887,
"heapDeltaBytes": 8505936,
"heapUsedBytes": 72988640,
"domNodes": 77,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 20.183,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1755.3719999999657,
"styleRecalcs": 31,
"styleRecalcDurationMs": 16.236,
"layouts": 6,
"layoutDurationMs": 0.639,
"taskDurationMs": 376.384,
"heapDeltaBytes": 8581872,
"heapUsedBytes": 72861076,
"domNodes": 78,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 18.539,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 560.423999999955,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.628000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 376.03700000000003,
"heapDeltaBytes": -11215776,
"heapUsedBytes": 53188332,
"domNodes": 18,
"jsHeapTotalBytes": 25427968,
"scriptDurationMs": 57.106,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 574.7489999999971,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.37,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 377.894,
"heapDeltaBytes": -11272524,
"heapUsedBytes": 53151344,
"domNodes": 18,
"jsHeapTotalBytes": 25690112,
"scriptDurationMs": 57.061,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2083.063999999979,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.947000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 709.1399999999999,
"heapDeltaBytes": 10593480,
"heapUsedBytes": 70249216,
"domNodes": -284,
"jsHeapTotalBytes": 2461696,
"scriptDurationMs": 96.18400000000001,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2031.5250000001015,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.520000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 665.85,
"heapDeltaBytes": 6934400,
"heapUsedBytes": 66363588,
"domNodes": -283,
"jsHeapTotalBytes": 2723840,
"scriptDurationMs": 89.56,
"eventListeners": -149,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2157.4099999999703,
"styleRecalcs": 68,
"styleRecalcDurationMs": 14.522999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1211.515,
"heapDeltaBytes": 1833660,
"heapUsedBytes": 62516980,
"domNodes": -285,
"jsHeapTotalBytes": 3964928,
"scriptDurationMs": 397.056,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2149.0830000000187,
"styleRecalcs": 69,
"styleRecalcDurationMs": 14.301000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1199.5359999999998,
"heapDeltaBytes": 10226596,
"heapUsedBytes": 70969216,
"domNodes": -282,
"jsHeapTotalBytes": 3702784,
"scriptDurationMs": 391.567,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3180.2490000000034,
"styleRecalcs": 66,
"styleRecalcDurationMs": 16.896,
"layouts": 60,
"layoutDurationMs": 8.121,
"taskDurationMs": 1498.874,
"heapDeltaBytes": -5317136,
"heapUsedBytes": 56832216,
"domNodes": -288,
"jsHeapTotalBytes": 5607424,
"scriptDurationMs": 519.158,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3213.7219999999616,
"styleRecalcs": 65,
"styleRecalcDurationMs": 15.878000000000004,
"layouts": 60,
"layoutDurationMs": 7.979,
"taskDurationMs": 1509.8700000000001,
"heapDeltaBytes": -2183124,
"heapUsedBytes": 60122672,
"domNodes": -288,
"jsHeapTotalBytes": 6131712,
"scriptDurationMs": 525.636,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2051.571000000024,
"styleRecalcs": 7,
"styleRecalcDurationMs": 6.2429999999999986,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 692.1129999999999,
"heapDeltaBytes": 6948652,
"heapUsedBytes": 68176424,
"domNodes": -285,
"jsHeapTotalBytes": 3510272,
"scriptDurationMs": 98.128,
"eventListeners": -179,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "minimap-idle",
"durationMs": 2032.9009999999244,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.113999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 683.986,
"heapDeltaBytes": 6780288,
"heapUsedBytes": 67217560,
"domNodes": -285,
"jsHeapTotalBytes": 2723840,
"scriptDurationMs": 98.49000000000001,
"eventListeners": -147,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 607.4370000000044,
"styleRecalcs": 48,
"styleRecalcDurationMs": 12.139999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 421.2830000000001,
"heapDeltaBytes": -10299996,
"heapUsedBytes": 54075884,
"domNodes": 22,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 127.12200000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 599.189000000024,
"styleRecalcs": 46,
"styleRecalcDurationMs": 10.78,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 409.008,
"heapDeltaBytes": -10632236,
"heapUsedBytes": 53881740,
"domNodes": 18,
"jsHeapTotalBytes": 25690112,
"scriptDurationMs": 125.18199999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2008.511999999996,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.751000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 505.76599999999996,
"heapDeltaBytes": -17503084,
"heapUsedBytes": 46835256,
"domNodes": -280,
"jsHeapTotalBytes": 23830528,
"scriptDurationMs": 14.063,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2006.4499999999725,
"styleRecalcs": 9,
"styleRecalcDurationMs": 6.696000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 475.33500000000004,
"heapDeltaBytes": 5776812,
"heapUsedBytes": 70537096,
"domNodes": 18,
"jsHeapTotalBytes": 24903680,
"scriptDurationMs": 13.115,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1722.2869999999944,
"styleRecalcs": 79,
"styleRecalcDurationMs": 35.533,
"layouts": 16,
"layoutDurationMs": 4.3229999999999995,
"taskDurationMs": 793.5949999999999,
"heapDeltaBytes": -18103316,
"heapUsedBytes": 46107824,
"domNodes": -1,
"jsHeapTotalBytes": 22519808,
"scriptDurationMs": 84.421,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1753.7340000000086,
"styleRecalcs": 78,
"styleRecalcDurationMs": 35.361,
"layouts": 16,
"layoutDurationMs": 4.239,
"taskDurationMs": 802.3019999999999,
"heapDeltaBytes": -18232036,
"heapUsedBytes": 46183112,
"domNodes": -282,
"jsHeapTotalBytes": 23306240,
"scriptDurationMs": 89.202,
"eventListeners": -153,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1400.9169999999926,
"styleRecalcs": 18,
"styleRecalcDurationMs": 28.502,
"layouts": 14,
"layoutDurationMs": 11.063,
"taskDurationMs": 910.3090000000003,
"heapDeltaBytes": 31033368,
"heapUsedBytes": 99502100,
"domNodes": 13673,
"jsHeapTotalBytes": 15728640,
"scriptDurationMs": 33.24000000000001,
"eventListeners": 2375,
"totalBlockingTimeMs": 117,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "viewport-pan-sweep",
"durationMs": 8198.463000000003,
"styleRecalcs": 250,
"styleRecalcDurationMs": 42.738,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4450.367,
"heapDeltaBytes": 11731544,
"heapUsedBytes": 71310820,
"domNodes": -283,
"jsHeapTotalBytes": 5275648,
"scriptDurationMs": 1367.911,
"eventListeners": -133,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8164.034000000015,
"styleRecalcs": 250,
"styleRecalcDurationMs": 41.659,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4282.101,
"heapDeltaBytes": 5393780,
"heapUsedBytes": 64850712,
"domNodes": -281,
"jsHeapTotalBytes": 5013504,
"scriptDurationMs": 1296.6950000000002,
"eventListeners": -163,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-large-graph-idle",
"durationMs": 17897.09300000004,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17872.614999999998,
"heapDeltaBytes": -48520444,
"heapUsedBytes": 155941820,
"domNodes": -8312,
"jsHeapTotalBytes": -9117696,
"scriptDurationMs": 597.7159999999999,
"eventListeners": -16387,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.779999999999927,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 17838.39599999999,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17805.952,
"heapDeltaBytes": -37101516,
"heapUsedBytes": 168093468,
"domNodes": -8312,
"jsHeapTotalBytes": -7806976,
"scriptDurationMs": 550.645,
"eventListeners": -16387,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 22747.551999999985,
"styleRecalcs": 171,
"styleRecalcDurationMs": 26.35499999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22720.332,
"heapDeltaBytes": -44884208,
"heapUsedBytes": 153990732,
"domNodes": -8312,
"jsHeapTotalBytes": -10424320,
"scriptDurationMs": 943.8549999999999,
"eventListeners": -16383,
"totalBlockingTimeMs": 849,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 22230.234999999993,
"styleRecalcs": 163,
"styleRecalcDurationMs": 22.794000000000036,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22177.89,
"heapDeltaBytes": -27212316,
"heapUsedBytes": 179812252,
"domNodes": -8312,
"jsHeapTotalBytes": -10727424,
"scriptDurationMs": 880.582,
"eventListeners": -16381,
"totalBlockingTimeMs": 615,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 489.16299999996227,
"styleRecalcs": 18,
"styleRecalcDurationMs": 24.005,
"layouts": 4,
"layoutDurationMs": 1.5220000000000002,
"taskDurationMs": 133.43700000000004,
"heapDeltaBytes": 5283168,
"heapUsedBytes": 68767076,
"domNodes": 152,
"jsHeapTotalBytes": 5767168,
"scriptDurationMs": 13.001999999999999,
"eventListeners": 99,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 100.43499999994765,
"styleRecalcs": 7,
"styleRecalcDurationMs": 11.74,
"layouts": 1,
"layoutDurationMs": 0.702,
"taskDurationMs": 70.18400000000001,
"heapDeltaBytes": 3048424,
"heapUsedBytes": 66331612,
"domNodes": 126,
"jsHeapTotalBytes": 2883584,
"scriptDurationMs": 5.273,
"eventListeners": 25,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.669999999999998,
"p95FrameDurationMs": 16.799999999999727
}
]
} |
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📝 WalkthroughWalkthroughThe change makes pending missing-media candidates inactive when their widget value no longer matches the recorded candidate name. Tests cover missing-media and promoted-media verification behavior. ChangesMissing-media validation
Estimated code review effort: 1 (Trivial) | ~2 minutes Possibly related PRs
Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/platform/missingMedia/missingMediaScan.test.ts`:
- Around line 507-515: Replace the direct synchronous predicate assertions in
the test around createLoadImageGraph with an observable scan-entry-point
scenario: use a deferred verifier to keep candidate verification pending, mutate
widget.value before resolving it, then resolve verification and assert both
realtime and workflow-load scans omit the stale candidate. Ensure the test
exercises the actual scan callers rather than only
isMissingMediaCandidateScopeActive.
- Around line 507-515: Update isMissingMediaCandidateScopeActive to compare the
current widget.value with candidate.name and return false when they differ.
Preserve the existing active-scope behavior when the values match, preventing
stale candidates after verification.
🪄 Autofix
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: c7b4ee99-279e-4a93-a16b-3789ee0e75ca
📒 Files selected for processing (1)
src/platform/missingMedia/missingMediaScan.test.ts
isMissingMediaCandidateScopeActive confirmed the node and widget were still the active value owner, but not that the widget still held the value the candidate captured. Verification is async, so correcting a value while it was in flight left the old candidate passing the predicate and being surfaced against a value that no longer existed. Closes the gap at the shared predicate so both the realtime and workflow-load paths are covered. The promoted-consumer fixture overrode the candidate name without moving the host widget with it, encoding a state that cannot occur: the scan derives candidate.name from the widget value. Seeded via hostValue instead so the two stay in sync. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
|
@DrJKL this picks up the highest-priority item from your post-merge follow-up on #14578, since that PR was already merged and the finding had nowhere to live. The fix is your suggested patch verbatim, applied at the shared predicate so it covers both the realtime and workflow-load paths. Red-green, as you'd expect: the test-only commit went red in CI on exactly one test out of 1148 files ( One thing worth your eye, because it is adjacent to your own "impossible mode transition" finding. The guard broke Your other two findings are not in here. The repeated global reconciliation during multi-node deletion has a real design question in it (whether the global pass should be queued once per removal burst while targeted removal stays synchronous), and the impossible mode transition in |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #14948 +/- ##
==========================================
+ Coverage 78.72% 78.74% +0.01%
==========================================
Files 1866 1868 +2
Lines 115408 116178 +770
Branches 33539 34869 +1330
==========================================
+ Hits 90860 91480 +620
- Misses 24005 24139 +134
- Partials 543 559 +16
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 30 files with indirect coverage changes 🚀 New features to boost your workflow:
|
Adds behavioural coverage through the scan entry point with a deferred verifier, on a promoted host, per review feedback: the predicate-level test alone would not catch a regression in either caller. Verified mutation-killing: reverting the guard fails this test. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
#14948 pinned the guard through the realtime path and 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.
…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
Follow-up to #14578, addressing the highest-priority item from @DrJKL's post-merge review. Since that PR is already merged, the finding had no home.
isMissingMediaCandidateScopeActiveverifies 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 correctsmissing-a.pngtovalid-b.pngwhile 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
scanNodeMediaCandidatesstores the raw widget value ascandidate.name, but nothing compares it back to the live widget on the way out.Red-green verification
test: add failing test ...fix: ...Test plan
mainfor the right reason (expected true to be false), passes with the fixpnpm typecheck, oxfmt, oxlint, eslint cleanNot included
Two other items from the same review remain open and are better handled separately:
useErrorClearingHooks.ts:405) — a perf refactor with an open design question about queueing the global pass per removal burstuseErrorClearingHooks.test.ts:1246)