Repository navigation
fix(litegraph): restore numeric coercion in slider, knob and gradient slider draw - #17068
christian-byrne wants to merge 2 commits into
Conversation
… slider draw #16802 enabled `no-unnecessary-type-conversion` and removed the `Number(...)` coercion at four widget draw sites. The declared type of `IBaseWidget['value']` says the cast is redundant, but custom nodes and persisted workflows restore whatever was serialised, so a string value reaches `toFixed` and throws `TypeError: this.value.toFixed is not a function` as an uncaught page error. #17067 restores the coercion in `NumberWidget` as part of the custom-node E2E red-main repair. The same deletion was made in `SliderWidget`, `KnobWidget` and `GradientSliderWidget`, which this change covers so the defect class is closed rather than only its one observed instance. Uses the same `const rawValue: unknown = this.value` idiom as #17067 so the coercion is not re-flagged as unnecessary. Each widget gets a regression test that drives `drawWidget` with a non-numeric value; all three fail on `main` with the exact production error string and pass with the fix.
🎭 Playwright: ✅ 1907 passed, 0 failed📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 9.74 MB gzip 🟢 -6 BDetailsSummary
Category Glance App Entry Points — 3.73 kB (baseline 3.73 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.43 MB (baseline 1.43 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 2 added / 2 removed / 1 unchanged Views & Navigation — 128 kB (baseline 128 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 14 added / 14 removed / 4 unchanged Panels & Settings — 621 kB (baseline 621 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 17 unchanged User & Accounts — 28.9 kB (baseline 28.9 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 6 added / 6 removed / 5 unchanged Editors & Dialogs — 126 kB (baseline 126 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 7 added / 7 removed / 1 unchanged UI Components — 117 kB (baseline 117 kB) • ⚪ 0 BReusable component library chunks
Status: 7 added / 7 removed / 8 unchanged Data & Services — 3.6 MB (baseline 3.6 MB) • 🔴 +114 BStores, services, APIs, and repositories
Status: 13 added / 13 removed / 3 unchanged Utilities & Hooks — 558 kB (baseline 558 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 18 added / 18 removed / 18 unchanged Vendor & Third-Party — 18.1 MB (baseline 18.1 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 18 unchanged Other — 16.6 MB (baseline 16.6 MB) • ⚪ 0 BBundles that do not match a named category
Status: 72 added / 72 removed / 224 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-09-06T01:55:26.234Z",
"gitSha": "be801adccb1a00e1e8e3f99759d91a4f51b6035c",
"branch": "christian-byrne/shep-79-widget-value-coercion",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2104.6989999999823,
"styleRecalcs": 9,
"styleRecalcDurationMs": 10.018999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 611.486,
"heapDeltaBytes": 10823640,
"heapUsedBytes": 81246832,
"domNodes": -277,
"jsHeapTotalBytes": 4972544,
"scriptDurationMs": 9.770999999999999,
"eventListeners": -146,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2038.3769999999686,
"styleRecalcs": 9,
"styleRecalcDurationMs": 6.842999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 497.798,
"heapDeltaBytes": -3040968,
"heapUsedBytes": 66352328,
"domNodes": -277,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 8.603,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1908.1089999999676,
"styleRecalcs": 77,
"styleRecalcDurationMs": 40.478,
"layouts": 14,
"layoutDurationMs": 4.455,
"taskDurationMs": 928.7440000000001,
"heapDeltaBytes": 9205288,
"heapUsedBytes": 79808996,
"domNodes": -277,
"jsHeapTotalBytes": 6545408,
"scriptDurationMs": 152.04500000000002,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1874.5000000000118,
"styleRecalcs": 79,
"styleRecalcDurationMs": 38.266,
"layouts": 14,
"layoutDurationMs": 4.892,
"taskDurationMs": 873.679,
"heapDeltaBytes": 4736180,
"heapUsedBytes": 75188128,
"domNodes": -277,
"jsHeapTotalBytes": 6807552,
"scriptDurationMs": 141.074,
"eventListeners": -176,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1723.906999999997,
"styleRecalcs": 32,
"styleRecalcDurationMs": 16.599000000000004,
"layouts": 6,
"layoutDurationMs": 1.165,
"taskDurationMs": 360.38000000000005,
"heapDeltaBytes": 5061848,
"heapUsedBytes": 76042652,
"domNodes": 77,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 11.054000000000002,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1721.683999999982,
"styleRecalcs": 31,
"styleRecalcDurationMs": 16.079000000000004,
"layouts": 6,
"layoutDurationMs": 1.0399999999999998,
"taskDurationMs": 357.547,
"heapDeltaBytes": 5109548,
"heapUsedBytes": 75726448,
"domNodes": 78,
"jsHeapTotalBytes": 5242880,
"scriptDurationMs": 10.484,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 646.233000000052,
"styleRecalcs": 12,
"styleRecalcDurationMs": 7.811,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 449.54600000000005,
"heapDeltaBytes": -7420660,
"heapUsedBytes": 63063260,
"domNodes": 20,
"jsHeapTotalBytes": 6553600,
"scriptDurationMs": 156.02700000000002,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 694.5709999999963,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.244000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 453.87100000000004,
"heapDeltaBytes": -7479160,
"heapUsedBytes": 62993064,
"domNodes": 18,
"jsHeapTotalBytes": 6553600,
"scriptDurationMs": 160.68699999999998,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2034.9679999999921,
"styleRecalcs": 4,
"styleRecalcDurationMs": 3.585999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 594.496,
"heapDeltaBytes": -14215064,
"heapUsedBytes": 87961692,
"domNodes": -270,
"jsHeapTotalBytes": -1638400,
"scriptDurationMs": 34.647,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-idle",
"durationMs": 2037.257000000011,
"styleRecalcs": 5,
"styleRecalcDurationMs": 4.42,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 607.534,
"heapDeltaBytes": 10604056,
"heapUsedBytes": 87038840,
"domNodes": -269,
"jsHeapTotalBytes": -1413120,
"scriptDurationMs": 33.92799999999999,
"eventListeners": -172,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2159.282000000019,
"styleRecalcs": 65,
"styleRecalcDurationMs": 10.355000000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1546.8399999999997,
"heapDeltaBytes": 18918028,
"heapUsedBytes": 84766380,
"domNodes": -272,
"jsHeapTotalBytes": 1273856,
"scriptDurationMs": 750.0790000000001,
"eventListeners": -172,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2126.408999999967,
"styleRecalcs": 65,
"styleRecalcDurationMs": 10.310999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1506.317,
"heapDeltaBytes": 18162852,
"heapUsedBytes": 84410140,
"domNodes": 6,
"jsHeapTotalBytes": 225280,
"scriptDurationMs": 737.522,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-zoom",
"durationMs": 3492.1870000000013,
"styleRecalcs": 60,
"styleRecalcDurationMs": 10.532,
"layouts": 60,
"layoutDurationMs": 12.802000000000001,
"taskDurationMs": 1665.8179999999998,
"heapDeltaBytes": 8494736,
"heapUsedBytes": 76122404,
"domNodes": -280,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 752.5759999999999,
"eventListeners": 10,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3508.7969999999586,
"styleRecalcs": 60,
"styleRecalcDurationMs": 10.366,
"layouts": 60,
"layoutDurationMs": 12.549999999999999,
"taskDurationMs": 1653.41,
"heapDeltaBytes": 8491284,
"heapUsedBytes": 76142248,
"domNodes": 0,
"jsHeapTotalBytes": 786432,
"scriptDurationMs": 753.562,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "legacy-node-drag",
"durationMs": 3075.490000000002,
"styleRecalcs": 41,
"styleRecalcDurationMs": 6.095000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1845.441,
"heapDeltaBytes": 18417724,
"heapUsedBytes": 86326060,
"domNodes": -274,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 918.9520000000001,
"eventListeners": 188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "legacy-node-drag",
"durationMs": 3071.466999999984,
"styleRecalcs": 40,
"styleRecalcDurationMs": 5.080000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1873.532,
"heapDeltaBytes": 26233552,
"heapUsedBytes": 93530368,
"domNodes": 0,
"jsHeapTotalBytes": 417792,
"scriptDurationMs": 912.8739999999999,
"eventListeners": 188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666636,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2061.94899999997,
"styleRecalcs": 5,
"styleRecalcDurationMs": 4.07,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 598.78,
"heapDeltaBytes": 10468920,
"heapUsedBytes": 87258356,
"domNodes": -268,
"jsHeapTotalBytes": -1937408,
"scriptDurationMs": 38.259,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2039.1050000000632,
"styleRecalcs": 5,
"styleRecalcDurationMs": 3.8660000000000014,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 603.411,
"heapDeltaBytes": 10513472,
"heapUsedBytes": 87234232,
"domNodes": -269,
"jsHeapTotalBytes": -1675264,
"scriptDurationMs": 33.507999999999996,
"eventListeners": -174,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 599.8329999999896,
"styleRecalcs": 46,
"styleRecalcDurationMs": 9.336,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 405.7289999999999,
"heapDeltaBytes": 14889500,
"heapUsedBytes": 87638532,
"domNodes": 18,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 140.706,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 587.4410000000125,
"styleRecalcs": 47,
"styleRecalcDurationMs": 9.979999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 395.431,
"heapDeltaBytes": 15197472,
"heapUsedBytes": 87649784,
"domNodes": 20,
"jsHeapTotalBytes": 5505024,
"scriptDurationMs": 136.933,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2055.3150000000073,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.232,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 508.85400000000004,
"heapDeltaBytes": 1680192,
"heapUsedBytes": 74375068,
"domNodes": -293,
"jsHeapTotalBytes": 5234688,
"scriptDurationMs": 8.715,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2007.3439999999891,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 498.07599999999996,
"heapDeltaBytes": 1455668,
"heapUsedBytes": 74374984,
"domNodes": -292,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 7.929000000000002,
"eventListeners": -220,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1767.4809999999752,
"styleRecalcs": 78,
"styleRecalcDurationMs": 36.286,
"layouts": 18,
"layoutDurationMs": 5.131,
"taskDurationMs": 818.26,
"heapDeltaBytes": 3455216,
"heapUsedBytes": 76183708,
"domNodes": -295,
"jsHeapTotalBytes": 5758976,
"scriptDurationMs": 103.285,
"eventListeners": -222,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1751.9689999999741,
"styleRecalcs": 77,
"styleRecalcDurationMs": 34.007,
"layouts": 18,
"layoutDurationMs": 5.273,
"taskDurationMs": 794.516,
"heapDeltaBytes": -12186744,
"heapUsedBytes": 60379480,
"domNodes": -296,
"jsHeapTotalBytes": 6545408,
"scriptDurationMs": 99.75,
"eventListeners": -188,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 1368.0020000000468,
"styleRecalcs": 18,
"styleRecalcDurationMs": 30.45699999999999,
"layouts": 14,
"layoutDurationMs": 14.087000000000002,
"taskDurationMs": 909.9099999999997,
"heapDeltaBytes": 20018416,
"heapUsedBytes": 103185864,
"domNodes": 13751,
"jsHeapTotalBytes": 12058624,
"scriptDurationMs": 28.573999999999995,
"eventListeners": 2387,
"totalBlockingTimeMs": 122,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8397.42899999999,
"styleRecalcs": 247,
"styleRecalcDurationMs": 37.827,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5590.025,
"heapDeltaBytes": 5067468,
"heapUsedBytes": 81166692,
"domNodes": -269,
"jsHeapTotalBytes": -401408,
"scriptDurationMs": 2518.195,
"eventListeners": -158,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8253.31600000004,
"styleRecalcs": 245,
"styleRecalcDurationMs": 35.202,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 5569.223,
"heapDeltaBytes": 8388260,
"heapUsedBytes": 84508332,
"domNodes": -273,
"jsHeapTotalBytes": -1187840,
"scriptDurationMs": 2480.658,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 17626.417000000005,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17096.388,
"heapDeltaBytes": -26482664,
"heapUsedBytes": 177102944,
"domNodes": -6548,
"jsHeapTotalBytes": 1961984,
"scriptDurationMs": 281.822,
"eventListeners": -7473,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-idle",
"durationMs": 17984.481999999956,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 17156.825999999997,
"heapDeltaBytes": -33197500,
"heapUsedBytes": 176385988,
"domNodes": -6548,
"jsHeapTotalBytes": -3645440,
"scriptDurationMs": 281.06399999999996,
"eventListeners": -7475,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 21580.727999999966,
"styleRecalcs": 174,
"styleRecalcDurationMs": 19.362999999999964,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 21220.282,
"heapDeltaBytes": -43981788,
"heapUsedBytes": 177913808,
"domNodes": -6548,
"jsHeapTotalBytes": 720896,
"scriptDurationMs": 880.4069999999999,
"eventListeners": -7471,
"totalBlockingTimeMs": 131,
"frameDurationMs": 17.779999999999927,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 22395.94800000009,
"styleRecalcs": 173,
"styleRecalcDurationMs": 20.613999999999965,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 22055.413,
"heapDeltaBytes": -36399928,
"heapUsedBytes": 167078952,
"domNodes": -6548,
"jsHeapTotalBytes": 319488,
"scriptDurationMs": 944.4270000000001,
"eventListeners": -7469,
"totalBlockingTimeMs": 136,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-node-resize-workload",
"durationMs": 6175.734000000034,
"styleRecalcs": 20,
"styleRecalcDurationMs": 82.65,
"layouts": 20,
"layoutDurationMs": 29.688999999999993,
"taskDurationMs": 6113.763000000001,
"heapDeltaBytes": -29047236,
"heapUsedBytes": 175080776,
"domNodes": -6548,
"jsHeapTotalBytes": 9756672,
"scriptDurationMs": 108.134,
"eventListeners": -7471,
"totalBlockingTimeMs": 569,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-node-resize-workload",
"durationMs": 6219.652999999994,
"styleRecalcs": 20,
"styleRecalcDurationMs": 86.04400000000001,
"layouts": 20,
"layoutDurationMs": 34.102,
"taskDurationMs": 6154.612,
"heapDeltaBytes": -35296760,
"heapUsedBytes": 175292364,
"domNodes": -6556,
"jsHeapTotalBytes": 4083712,
"scriptDurationMs": 109.05,
"eventListeners": -7473,
"totalBlockingTimeMs": 640,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-zoom-out-idle",
"durationMs": 9081.489999999974,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8601.830000000002,
"heapDeltaBytes": 10120212,
"heapUsedBytes": 176037420,
"domNodes": 0,
"jsHeapTotalBytes": -13369344,
"scriptDurationMs": 136.35499999999996,
"eventListeners": -14,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.329999999999927,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-zoom-out-idle",
"durationMs": 9090.875000000096,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 8741.826,
"heapDeltaBytes": 14417036,
"heapUsedBytes": 174824996,
"domNodes": 0,
"jsHeapTotalBytes": -4718592,
"scriptDurationMs": 173.18500000000003,
"eventListeners": -12,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 468.3979999999792,
"styleRecalcs": 17,
"styleRecalcDurationMs": 21.227999999999998,
"layouts": 3,
"layoutDurationMs": 1.517,
"taskDurationMs": 110.69000000000001,
"heapDeltaBytes": 5011676,
"heapUsedBytes": 72941852,
"domNodes": 145,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 10.64,
"eventListeners": 65,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "workflow-execution",
"durationMs": 104.4680000001108,
"styleRecalcs": 6,
"styleRecalcDurationMs": 11.344,
"layouts": 2,
"layoutDurationMs": 0.7750000000000001,
"taskDurationMs": 66.556,
"heapDeltaBytes": 3104332,
"heapUsedBytes": 70932676,
"domNodes": 107,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 6.070999999999998,
"eventListeners": 33,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666682,
"p95FrameDurationMs": 16.700000000000728
}
]
}🔬 E2E Coverage
Top 10 files by uncovered lines
|
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Team Run ID: 📒 Files selected for processing (3)
Included review availability: Your plan provides up to 10 included reviews per hour; 1 remains after this review. 📝 WalkthroughWalkthroughThe widget renderers now coerce restored values with ChangesWidget value formatting
Estimated code review effort: 2 (Simple) | ~10 minutes Merge Risk: ⚪ Minimal · up to Slider, knob, and gradient-slider labels now coerce restored numeric strings before fixed-precision formatting, preserving numeric rendering and preventing the reported runtime formatting errors. Suggested reviewers: Important Pre-merge checks failedPlease resolve all errors before merging. Addressing warnings is optional. ❌ Failed checks (1 inconclusive)
✅ Passed checks (6 passed)
Full details: End-To-End Regression Coverage For FixesExplanation The changed-file evidence is available: the PR changes frontend files under Resolution Provide the PR title and exact commit subjects. If either contains the specified bug-fix language, add or update a Playwright regression test under ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Comment |
Codecov Report❌ Patch coverage is
@@ Coverage Diff @@
## main #17068 +/- ##
==========================================
+ Coverage 81.36% 82.89% +1.53%
==========================================
Files 2471 2050 -421
Lines 127185 119558 -7627
Branches 34630 32769 -1861
==========================================
- Hits 103478 99107 -4371
+ Misses 23192 20271 -2921
+ Partials 515 180 -335
Flags with carried forward coverage won't be shown. Click here to find out more.
... and 427 files with indirect coverage changes 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🔍 Cursor Review — Consolidated panel
Triggered by @christian-byrne.
Found 5 finding(s).
| Severity | Count |
|---|---|
| 🟠 High | 1 |
| 🟡 Medium | 3 |
| 🟢 Low | 1 |
Panel: 8/8 reviewers contributed findings.
| ctx.fillStyle = this.text_color | ||
| const fixedValue = this.value.toFixed(this.options.precision ?? 3) | ||
| const rawValue: unknown = this.value | ||
| const fixedValue = Number(rawValue).toFixed(this.options.precision ?? 3) |
There was a problem hiding this comment.
🟠 High — The coercion covers only the label; this.value keeps the restored string, so onDrag's this.value + deltaValue concatenates ('0.5' + 0.01 -> '0.50.01'), clamp coerces that to NaN, and setValue(NaN) writes NaN into widget state and then into widgets_values on save (the type === 'number' coercion in BaseWidget.setValue doesn't apply to 'knob'). Since NaN !== NaN, every subsequent drag re-fires setValue and bumps the graph version. Removing the draw-time throw turns a loud failure into silent, persistent corruption — coerce once at the restore/setValue boundary instead of at the display site. Raised by 5 of 8 reviewers (gpt-5.6-sol-max adversarial, gpt-5.6-sol-max edge-case, claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, kimi-k3-max edge-case).
| ctx.fillStyle = this.text_color | ||
| const fixedValue = this.value.toFixed(this.options.precision ?? 3) | ||
| const rawValue: unknown = this.value | ||
| const fixedValue = Number(rawValue).toFixed(this.options.precision ?? 3) |
There was a problem hiding this comment.
🟡 Medium — Number() avoids the throw but not wrong output: 'abc', undefined, and {} render the literal text NaN, while null, '', [], and false render a plausible-but-false 0.000. The bar geometry above still reads the uncoerced this.value, and the API prompt still sends it, so the label can disagree with both the drawn slider and what executes. Guard with Number.isFinite and fall back to options.min ?? 0 (or repair this.value); same at GradientSliderWidget.ts:42 and KnobWidget.ts:173. Raised by 6 of 8 reviewers (gpt-5.6-sol-max edge-case, claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, gemini-3.1-pro edge-case, kimi-k3-max adversarial, kimi-k3-max edge-case).
| ctx.fillStyle = this.text_color | ||
| const fixedValue = this.value.toFixed(this.options.precision ?? 3) | ||
| const rawValue: unknown = this.value | ||
| const fixedValue = Number(rawValue).toFixed(this.options.precision ?? 3) |
There was a problem hiding this comment.
🟡 Medium — toFixed throws RangeError when its argument is below 0 or above 100, and options.precision is unvalidated data from node/subgraph definitions embedded in workflow JSON — so a workflow carrying precision: 101 still throws from inside the canvas draw loop, the exact "one bad workflow breaks all rendering" failure this PR targets. The Vue counterpart already sanitizes it (WidgetInputNumberGradientSlider.vue rejects non-numbers and negatives); clamp to 0-100 at all three rewritten call sites. Raised by 4 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case, kimi-k3-max adversarial, gemini-3.1-pro edge-case).
| ctx.fillStyle = this.text_color | ||
| const fixedValue = this.value.toFixed(this.options.precision ?? 3) | ||
| const rawValue: unknown = this.value | ||
| const fixedValue = Number(rawValue).toFixed(this.options.precision ?? 3) |
There was a problem hiding this comment.
🟡 Medium — Three of the four toFixed render sites are hardened, but NumberWidget._displayValue (NumberWidget.ts:15) still calls this.value.toFixed(...) and is reached from the same draw path via BaseWidget.drawTruncatingText. number is the most common numeric widget type, so TypeError: this.value.toFixed is not a function stays reachable during rendering; BaseWidget.setValue's Number() coercion doesn't cover it because workflow restore assigns widgets_values straight into widget state. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
| { | ||
| type: 'slider', | ||
| name: 'denoise', | ||
| value: fromAny('0.5'), |
There was a problem hiding this comment.
🟢 Low — The test is named for "a non-numeric restored value" but passes '0.5', which Number() coerces cleanly, so it only exercises the single input class where the new code happens to produce a correct result and gives false confidence that corrupt values are handled. Add a non-coercible case ('abc' or {}, which renders literal NaN) and a null/'' case (which renders a fabricated 0.000); same gap in GradientSliderWidget.test.ts and KnobWidget.test.ts. Raised by 2 of 8 reviewers (claude-opus-5-thinking-max adversarial, claude-opus-5-thinking-max edge-case).
christian-byrne
left a comment
There was a problem hiding this comment.
question: xmarre's open #17083 ("fix: preserve legacy numeric widget rendering") touches the same three drawWidget lines plus NumberWidget.ts via a shared formatNumericWidgetValue helper in utils/widget.ts, so whichever of #17068, #17067 and #17083 lands second will conflict on these exact lines. The body only mentions the #17067 ordering. Is the intent to land this one first and let #17083 rebase onto it, or to defer to the shared helper? Either is fine; I only want the overlap noted so a reviewer merging one does not silently break the other two.
Verified: the #17067 claim in the body is accurate (its NumberWidget.ts change uses the same Number(value).toFixed(...) idiom and is still unmerged). The three new tests pass locally. The non-text math in each widget ((this.value - this.options.min) / range) already coerces a string through subtraction, so text was the only throwing site.
|
Pushed cb0580e: each of the three new draw tests now has a sibling case with a real number ( Full context for agent readersReview at ff08326: one Verification on cb0580e: Landing note: whichever of #17068 / #17067 / #17083 merges first will conflict with the others in |
|
Closing: superseded by merged #17099.
Full context for agent readers
|
Summary
#16802 enabled
typescript/no-unnecessary-type-conversionand removed theNumber(...)coercion at four widget draw sites. The red-mainrepair #17067 restores it inNumberWidget; this restores the other three, so the defect class is closed rather than only its one observed instance.NumberWidget._displayValueNumber(this.value).toFixed(...)SliderWidget.drawWidgetNumber(this.value).toFixed(...)KnobWidget.drawWidgetNumber(this.value).toFixed(...)GradientSliderWidget.drawWidgetNumber(this.value).toFixed(...)Why the type is not the contract here
IBaseWidget['value']declaresnumber, which is what made the coercion look redundant to the rule. At runtime these widgets are populated from serialised workflows and custom-node definitions, so a string reachestoFixedand throwsTypeError: this.value.toFixed is not a function. Because this happens insidedrawWidget, it surfaces as an uncaught page error on canvas render rather than a caught failure, which is how the custom-node E2E console-error collector reports it.The
NumberWidgetinstance of this is currently red onmain(run 33957893453,ca54f4bd2e). The three sites here are latent only because the nightly corpus exercises the number path; nothing prevents a slider or knob from being restored with a non-numeric value.Changes
SliderWidget,KnobWidgetandGradientSliderWidget, using the sameconst rawValue: unknown = this.valueidiom fix: custom-node E2E S9/S3 and stale detection-proof patches #17067 uses so the conversion is not re-flagged as unnecessary.drawWidgetwith a non-numeric value.Disjoint from #17067's files, so the two do not conflict and can land in either order.
Review Focus
Whether coercing at the draw site is the right boundary, or whether these values should instead be normalised on restore so the declared
numbertype is actually honoured. This PR deliberately matches #17067 rather than diverging from an in-flight red-mainfix; a normalise-on-restore change would supersede both and is worth doing separately.Evidence
Failing first, with only the tests applied and the three source files at
main:That is the same error string the nightly connectivity sweep reports.
With the fix (Node 25,
NODE_OPTIONS=--no-experimental-webstorage):vitest run src/lib/litegraph/src/widgets/— 9 files, 80 tests passedvue-tsc --noEmit— exit 0oxfmt --check,oxlint,eslintover all six touched files — exit 0 each