Repository navigation
Conversation
📝 WalkthroughWalkthroughIntroduces a shared ChangesWidget Error Clearing Refactor
Estimated code review effort: 2 (Simple) | ~10 minutes Possibly related issues
Suggested labels: 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)
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 |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1693 passed, 0 failed · 1 flaky📊 Browser Reports
📦 Bundle: 7.77 MB gzip 🔴 +467 BDetailsSummary
Category Glance App Entry Points — 47.4 kB (baseline 47.4 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.25 MB (baseline 1.25 MB) • 🔴 +262 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 98 kB (baseline 98 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed / 3 unchanged Panels & Settings — 547 kB (baseline 547 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 11 added / 11 removed / 16 unchanged User & Accounts — 26.9 kB (baseline 26.9 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 7 added / 7 removed / 3 unchanged Editors & Dialogs — 117 kB (baseline 117 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 4 added / 4 removed / 1 unchanged UI Components — 57.2 kB (baseline 57.2 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed / 8 unchanged Data & Services — 270 kB (baseline 270 kB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 13 added / 13 removed / 3 unchanged Utilities & Hooks — 3.37 MB (baseline 3.37 MB) • 🔴 +730 BHelpers, composables, and utility bundles
Status: 16 added / 16 removed / 17 unchanged Vendor & Third-Party — 15.3 MB (baseline 15.3 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 11.7 MB (baseline 11.7 MB) • ⚪ 0 BBundles that do not match a named category
Status: 67 added / 67 removed / 98 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-07-03T01:26:19.755Z",
"gitSha": "47ea5311cf8f2e14bdc2f689eaf9a951bccd1e39",
"branch": "jaeone/extract-promoted-widget-error-clearing",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2031.8900000000326,
"styleRecalcs": 10,
"styleRecalcDurationMs": 11.053999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 462.929,
"heapDeltaBytes": 18817984,
"heapUsedBytes": 71429292,
"domNodes": -290,
"jsHeapTotalBytes": 16379904,
"scriptDurationMs": 22.272,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2071.5549999999894,
"styleRecalcs": 11,
"styleRecalcDurationMs": 10.703,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 423.038,
"heapDeltaBytes": -7295976,
"heapUsedBytes": 62049576,
"domNodes": -276,
"jsHeapTotalBytes": 18509824,
"scriptDurationMs": 19.804000000000002,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2132.6799999999935,
"styleRecalcs": 80,
"styleRecalcDurationMs": 67.081,
"layouts": 12,
"layoutDurationMs": 3.863,
"taskDurationMs": 1086.1150000000002,
"heapDeltaBytes": -12133820,
"heapUsedBytes": 57084668,
"domNodes": -241,
"jsHeapTotalBytes": 19558400,
"scriptDurationMs": 151.053,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1791.8579999999906,
"styleRecalcs": 72,
"styleRecalcDurationMs": 41.314,
"layouts": 12,
"layoutDurationMs": 3.8539999999999996,
"taskDurationMs": 821.3969999999999,
"heapDeltaBytes": -12954008,
"heapUsedBytes": 56395764,
"domNodes": -242,
"jsHeapTotalBytes": 19820544,
"scriptDurationMs": 126.057,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1720.18700000001,
"styleRecalcs": 33,
"styleRecalcDurationMs": 19.136,
"layouts": 6,
"layoutDurationMs": 0.611,
"taskDurationMs": 326.44,
"heapDeltaBytes": 7872244,
"heapUsedBytes": 71096264,
"domNodes": 79,
"jsHeapTotalBytes": 15204352,
"scriptDurationMs": 22.838,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1756.8260000000464,
"styleRecalcs": 30,
"styleRecalcDurationMs": 20.334,
"layouts": 6,
"layoutDurationMs": 0.8029999999999999,
"taskDurationMs": 333.046,
"heapDeltaBytes": 7932864,
"heapUsedBytes": 71148740,
"domNodes": 79,
"jsHeapTotalBytes": 15204352,
"scriptDurationMs": 23.567000000000004,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 597.7790000000027,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.115000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 356.087,
"heapDeltaBytes": 7398104,
"heapUsedBytes": 66507820,
"domNodes": 18,
"jsHeapTotalBytes": 19398656,
"scriptDurationMs": 60.726,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 585.6229999999982,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.351999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 397.05500000000006,
"heapDeltaBytes": 5805744,
"heapUsedBytes": 57802504,
"domNodes": -292,
"jsHeapTotalBytes": 10612736,
"scriptDurationMs": 63.38399999999999,
"eventListeners": -203,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2056.464999999946,
"styleRecalcs": 7,
"styleRecalcDurationMs": 7.283999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 606.409,
"heapDeltaBytes": -25537436,
"heapUsedBytes": 58644412,
"domNodes": -273,
"jsHeapTotalBytes": 2445312,
"scriptDurationMs": 108.769,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2052.236999999991,
"styleRecalcs": 10,
"styleRecalcDurationMs": 12.197,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 597.774,
"heapDeltaBytes": -8001956,
"heapUsedBytes": 58834912,
"domNodes": -269,
"jsHeapTotalBytes": -1572864,
"scriptDurationMs": 105.92199999999998,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2109.597000000008,
"styleRecalcs": 69,
"styleRecalcDurationMs": 17.36,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1165.4370000000001,
"heapDeltaBytes": 20844308,
"heapUsedBytes": 81695516,
"domNodes": -276,
"jsHeapTotalBytes": -352256,
"scriptDurationMs": 423.34499999999997,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2121.2299999999686,
"styleRecalcs": 70,
"styleRecalcDurationMs": 20.172,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1147.826,
"heapDeltaBytes": 8310880,
"heapUsedBytes": 84014652,
"domNodes": 18,
"jsHeapTotalBytes": 12378112,
"scriptDurationMs": 444.306,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3113.0960000000414,
"styleRecalcs": 62,
"styleRecalcDurationMs": 16.380999999999997,
"layouts": 60,
"layoutDurationMs": 7.672,
"taskDurationMs": 1354.5339999999999,
"heapDeltaBytes": 11938620,
"heapUsedBytes": 66483084,
"domNodes": 6,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 504.189,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3118.3939999999666,
"styleRecalcs": 65,
"styleRecalcDurationMs": 19.573999999999998,
"layouts": 60,
"layoutDurationMs": 7.72,
"taskDurationMs": 1344.964,
"heapDeltaBytes": 12843760,
"heapUsedBytes": 67350800,
"domNodes": -269,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 499.943,
"eventListeners": -195,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2016.9910000000186,
"styleRecalcs": 6,
"styleRecalcDurationMs": 5.556000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 523.2520000000001,
"heapDeltaBytes": -3296560,
"heapUsedBytes": 58513112,
"domNodes": -276,
"jsHeapTotalBytes": -1081344,
"scriptDurationMs": 96.318,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2003.453000000036,
"styleRecalcs": 5,
"styleRecalcDurationMs": 5.610000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 567.58,
"heapDeltaBytes": 6760380,
"heapUsedBytes": 59486168,
"domNodes": -278,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 109.881,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 625.5299999999693,
"styleRecalcs": 48,
"styleRecalcDurationMs": 19.130000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 434.454,
"heapDeltaBytes": -23220752,
"heapUsedBytes": 46226540,
"domNodes": -279,
"jsHeapTotalBytes": 6451200,
"scriptDurationMs": 126.20699999999998,
"eventListeners": -195,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 618.4620000000223,
"styleRecalcs": 47,
"styleRecalcDurationMs": 12.482999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 413.25999999999993,
"heapDeltaBytes": -22396648,
"heapUsedBytes": 47123520,
"domNodes": -277,
"jsHeapTotalBytes": 5664768,
"scriptDurationMs": 126.99499999999999,
"eventListeners": -195,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2040.659000000005,
"styleRecalcs": 10,
"styleRecalcDurationMs": 12.508999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 450.704,
"heapDeltaBytes": -8381456,
"heapUsedBytes": 61120648,
"domNodes": -279,
"jsHeapTotalBytes": 20082688,
"scriptDurationMs": 19.078,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2042.9309999999532,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.84,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 406.407,
"heapDeltaBytes": 12441548,
"heapUsedBytes": 64277168,
"domNodes": -271,
"jsHeapTotalBytes": 16379904,
"scriptDurationMs": 17.480999999999998,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1703.8500000000454,
"styleRecalcs": 77,
"styleRecalcDurationMs": 39.741,
"layouts": 16,
"layoutDurationMs": 4.293,
"taskDurationMs": 701.5910000000001,
"heapDeltaBytes": 18911428,
"heapUsedBytes": 76251616,
"domNodes": 66,
"jsHeapTotalBytes": 18874368,
"scriptDurationMs": 97.05000000000001,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1748.5039999999685,
"styleRecalcs": 76,
"styleRecalcDurationMs": 40.708,
"layouts": 16,
"layoutDurationMs": 4.707,
"taskDurationMs": 762.0720000000001,
"heapDeltaBytes": -6310496,
"heapUsedBytes": 45838916,
"domNodes": -261,
"jsHeapTotalBytes": 16379904,
"scriptDurationMs": 97.338,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 948.6109999999712,
"styleRecalcs": 17,
"styleRecalcDurationMs": 29.285,
"layouts": 4,
"layoutDurationMs": 14.113000000000001,
"taskDurationMs": 747.292,
"heapDeltaBytes": 29930428,
"heapUsedBytes": 102013128,
"domNodes": 13833,
"jsHeapTotalBytes": 16515072,
"scriptDurationMs": 28.947,
"eventListeners": 2533,
"totalBlockingTimeMs": 170,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8261.278000000004,
"styleRecalcs": 250,
"styleRecalcDurationMs": 57.85,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4040.2760000000003,
"heapDeltaBytes": 1638192,
"heapUsedBytes": 68533104,
"domNodes": -273,
"jsHeapTotalBytes": 204800,
"scriptDurationMs": 1303.3490000000002,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8190.264999999954,
"styleRecalcs": 252,
"styleRecalcDurationMs": 62.83,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4035.5870000000004,
"heapDeltaBytes": -916888,
"heapUsedBytes": 66153156,
"domNodes": -267,
"jsHeapTotalBytes": 1253376,
"scriptDurationMs": 1306.6480000000001,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 12608.83100000001,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12586.608000000002,
"heapDeltaBytes": -57221372,
"heapUsedBytes": 170723680,
"domNodes": -3300,
"jsHeapTotalBytes": -552960,
"scriptDurationMs": 541.477,
"eventListeners": -16380,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-idle",
"durationMs": 13543.235000000095,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13524.625,
"heapDeltaBytes": -4968540,
"heapUsedBytes": 181895464,
"domNodes": -3302,
"jsHeapTotalBytes": 22253568,
"scriptDurationMs": 577.3489999999999,
"eventListeners": -16371,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.77333333333336,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 14726.890999999967,
"styleRecalcs": 66,
"styleRecalcDurationMs": 18.056999999999988,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14701.616000000002,
"heapDeltaBytes": -66513808,
"heapUsedBytes": 155219016,
"domNodes": -3300,
"jsHeapTotalBytes": -262144,
"scriptDurationMs": 858.417,
"eventListeners": -16374,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 15026.041000000077,
"styleRecalcs": 73,
"styleRecalcDurationMs": 19.686000000000035,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15001.556999999999,
"heapDeltaBytes": -51980292,
"heapUsedBytes": 175657284,
"domNodes": -8325,
"jsHeapTotalBytes": 22085632,
"scriptDurationMs": 834.064,
"eventListeners": -16366,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "workflow-execution",
"durationMs": 159.5490000000268,
"styleRecalcs": 14,
"styleRecalcDurationMs": 31.923,
"layouts": 4,
"layoutDurationMs": 1.6750000000000003,
"taskDurationMs": 148.96099999999996,
"heapDeltaBytes": -16916392,
"heapUsedBytes": 53651268,
"domNodes": 158,
"jsHeapTotalBytes": 6848512,
"scriptDurationMs": 17.968999999999998,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999995,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 172.33999999996286,
"styleRecalcs": 11,
"styleRecalcDurationMs": 21.025999999999996,
"layouts": 5,
"layoutDurationMs": 2.0629999999999997,
"taskDurationMs": 157.495,
"heapDeltaBytes": -16724372,
"heapUsedBytes": 53939968,
"domNodes": 146,
"jsHeapTotalBytes": 6324224,
"scriptDurationMs": 23.898999999999997,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000273
}
]
} |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #13269 +/- ##
==========================================
- Coverage 77.90% 77.43% -0.48%
==========================================
Files 1642 1642
Lines 109713 93635 -16078
Branches 36954 31870 -5084
==========================================
- Hits 85476 72504 -12972
+ Misses 23380 20442 -2938
+ Partials 857 689 -168
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 408 files with indirect coverage changes 🚀 New features to boost your workflow:
|
dante01yoon
left a comment
There was a problem hiding this comment.
Behavior-preserving refactor — verified against the PR base. Looks good to merge; only minor nits below.
Verified
- Behavior preserved across all 3 call sites. Host/source args, source→host ordering, and
rangeare identical to the pre-refactor code. TheerrorInputName ?? widgetNamefallback inapplyScopeClearcorrectly reproduces each old call, including theuseErrorClearingHookshost case where the displaynameandwidget.namelegitimately differ. - Type fidelity. The local
ClearWidgetRelatedErrorstype exactly mirrors the store signature (executionErrorStore.clearWidgetRelatedErrors), includingnewValue: unknownandoptions?: { min?, max? }. - No missed call site.
git grepconfirms all direct callers now route through the helper; zero remaining duplication.NodeWidgets.vuedelegates viauseProcessedWidgets. - Tests. The strengthened
useErrorClearingHookstest (distinctdisplay_namevsstore_name) is a genuine improvement — it would catch anerrorInputName/widgetNameswap, the contract most at risk. New helper tests cover host-only, distinct names, and source-before-host ordering.
Nits (non-blocking)
- JSDoc is slightly misleading. "The range belongs to the widget surface that emitted the value" — but the same
rangeis applied to both source and host scopes (matching old behavior). Suggest: "the host widget's range is applied to both scopes." errorInputNameon thesourcescope is unused capability (YAGNI). No caller sets it onsource; it always falls through towidgetName. Symmetric and harmless, just slightly more surface than exercised.- "pure helper" wording. It's dependency-injected, not pure (invokes a side-effecting callback). The DI design is the right call for testability — deliberately not deriving the type from the store avoids re-coupling. Consider a one-line comment pointing at
executionErrorStore.clearWidgetRelatedErrorsas the source of truth so the duplicated type doesn't silently drift.
Net: removes real triplication of a subtle source-vs-host naming contract and upgrades the integration test to actually exercise name routing. 👍
|
Thanks for the careful review. I addressed the small documentation/wording items in 31c4f2c. What changed:
What I intentionally deferred:
|
31c4f2c to
1000fbe
Compare
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/widgetErrorClearing.ts`:
- Around line 37-49: The promoted-widget error scope mapping is duplicated
across call sites, so centralize it in this module to avoid divergence. Add a
small helper in widgetErrorClearing.ts (for example, a helper that converts a
resolvePromotedWidgetSource result into a WidgetErrorScope) and have both
useErrorClearingHooks.ts and SectionWidgets.vue use that shared helper instead
of repeating the ternary. Keep clearWidgetRelatedErrorScopes as the main
clearing entry point and reuse the new helper wherever source scopes are built.
🪄 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: b9f154ba-1ce5-41dd-a321-20ce7b2e6cad
📒 Files selected for processing (6)
src/components/rightSidePanel/parameters/SectionWidgets.vuesrc/composables/graph/useErrorClearingHooks.test.tssrc/composables/graph/useErrorClearingHooks.tssrc/composables/graph/widgetErrorClearing.test.tssrc/composables/graph/widgetErrorClearing.tssrc/renderer/extensions/vueNodes/composables/useProcessedWidgets.ts
|
Thank you for documenting and reducing the duplicated promoted-widget error-clearing sequence, and for addressing the review feedback. Since this draft was opened, #14578 substantially redesigned promoted missing-media ownership and changed the same hook and widget-processing paths, so this helper would need to be redesigned against current main rather than rebased as written. Please open a fresh, focused refactor if the duplication is still worth removing under the current contract. |
Summary
This PR extracts the promoted-widget error-clearing sequence introduced by #13059 into a small shared helper. It keeps behavior unchanged while making the source-scope and host-scope contract explicit across the Vue node body, Parameters panel, and LiteGraph hook paths.
Context
After #13059, promoted subgraph widgets need to clear two related scopes when their value changes:
That orchestration was duplicated in three UI/runtime paths. The duplication made it easier for the source-vs-host naming contract to drift, especially because validation clearing and missing asset clearing use different names for different stores.
Changes
clearWidgetRelatedErrorScopes, a dependency-injected helper that applies source-scope clearing before host-scope clearing.errorInputNameandwidgetName:errorInputNameis matched against validation errorextra_info.input_name.widgetNameis used for missing model and missing media store lookup.{ min, max }payload torangeto make the numeric-bound contract clearer.Review Focus
This is intended to be a behavior-preserving refactor. The helper receives
clearWidgetRelatedErrorsas a parameter instead of importing the Pinia store so it stays decoupled from Pinia imports, easy to test, and still keeps call sites compact.Related issue: #13173
Validation
pnpm typecheckpnpm test:unit widgetErrorClearing.test.ts useErrorClearingHooks.test.ts useProcessedWidgets.test.ts SectionWidgets.test.tspnpm format:check src/composables/graph/widgetErrorClearing.ts src/composables/graph/widgetErrorClearing.test.ts src/composables/graph/useErrorClearingHooks.ts src/composables/graph/useErrorClearingHooks.test.ts src/renderer/extensions/vueNodes/composables/useProcessedWidgets.ts src/components/rightSidePanel/parameters/SectionWidgets.vuepnpm lintpnpm knip