Repository navigation
test: expand E2E coverage for toolbox actions - #10968
Conversation
Add selectionToolboxMoreActions.spec.ts covering previously untested toolbox actions: pin/unpin, minimize/expand, adjust size, copy, duplicate, refresh button visibility, align (top/left), distribute (horizontal/vertical), alignment options hidden for single selection, and multi-node bypass toggle.
|
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:
📝 WalkthroughWalkthroughAdds a new Playwright end-to-end test spec exercising the Selection Toolbox “More Options” menu to validate node actions and UI state across single- and multi-selection: pin/unpin, minimize/expand, adjust size, copy/duplicate, refresh visibility, align/distribute, and bypass toggling. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 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: ✅ 1120 passed, 0 failed📊 Browser Reports
|
📦 Bundle: 5.16 MB gzip 🟢 -71 BDetailsSummary
Category Glance App Entry Points — 22.3 kB (baseline 22.3 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.22 MB (baseline 1.22 MB) • 🔴 +41 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 76.6 kB (baseline 76.6 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed / 2 unchanged Panels & Settings — 482 kB (baseline 482 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 10 added / 10 removed / 11 unchanged User & Accounts — 17.1 kB (baseline 17.1 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 5 added / 5 removed / 2 unchanged Editors & Dialogs — 109 kB (baseline 109 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 2 added / 2 removed UI Components — 60.3 kB (baseline 60.3 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed / 8 unchanged Data & Services — 3 MB (baseline 3 MB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 13 added / 13 removed / 4 unchanged Utilities & Hooks — 344 kB (baseline 344 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 13 added / 13 removed / 14 unchanged Vendor & Third-Party — 9.86 MB (baseline 9.86 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 8.57 MB (baseline 8.57 MB) • ⚪ 0 BBundles that do not match a named category
Status: 56 added / 56 removed / 79 unchanged ⚡ Performance Report
No regressions detected. All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-04-14T22:03:35.513Z",
"gitSha": "4cd3c0a55b62e9e8f863441cc08dd22d73bd5fa0",
"branch": "worktree-agent-ae659b47",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2007.0249999999987,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.577000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 328.15799999999996,
"heapDeltaBytes": 20323396,
"heapUsedBytes": 63314040,
"domNodes": 21,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 21.159999999999997,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2010.4440000000068,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.448000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 346.966,
"heapDeltaBytes": 20350280,
"heapUsedBytes": 63202720,
"domNodes": 22,
"jsHeapTotalBytes": 22544384,
"scriptDurationMs": 20.367000000000004,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2006.3440000000128,
"styleRecalcs": 12,
"styleRecalcDurationMs": 9.460999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 347.40000000000003,
"heapDeltaBytes": 21015732,
"heapUsedBytes": 63548096,
"domNodes": 23,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 21.323,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2009.8129999999799,
"styleRecalcs": 84,
"styleRecalcDurationMs": 41.475,
"layouts": 12,
"layoutDurationMs": 3.62,
"taskDurationMs": 926.4089999999999,
"heapDeltaBytes": 16036628,
"heapUsedBytes": 58915244,
"domNodes": 66,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 129.334,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2054.6429999999987,
"styleRecalcs": 87,
"styleRecalcDurationMs": 39.111,
"layouts": 12,
"layoutDurationMs": 3.3080000000000003,
"taskDurationMs": 929.182,
"heapDeltaBytes": 16375704,
"heapUsedBytes": 58945592,
"domNodes": 65,
"jsHeapTotalBytes": 23330816,
"scriptDurationMs": 128.1,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1999.635000000012,
"styleRecalcs": 83,
"styleRecalcDurationMs": 39.217999999999996,
"layouts": 12,
"layoutDurationMs": 3.38,
"taskDurationMs": 926.177,
"heapDeltaBytes": 16253488,
"heapUsedBytes": 58900016,
"domNodes": 64,
"jsHeapTotalBytes": 22544384,
"scriptDurationMs": 128.74400000000003,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1736.0560000000191,
"styleRecalcs": 32,
"styleRecalcDurationMs": 16.327,
"layouts": 6,
"layoutDurationMs": 0.6069999999999999,
"taskDurationMs": 284.34099999999995,
"heapDeltaBytes": -264456,
"heapUsedBytes": 48562660,
"domNodes": 80,
"jsHeapTotalBytes": 24117248,
"scriptDurationMs": 24.358999999999998,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1733.0460000000016,
"styleRecalcs": 33,
"styleRecalcDurationMs": 16.479,
"layouts": 6,
"layoutDurationMs": 0.5979999999999999,
"taskDurationMs": 281.834,
"heapDeltaBytes": 24709928,
"heapUsedBytes": 67396156,
"domNodes": 81,
"jsHeapTotalBytes": 20709376,
"scriptDurationMs": 24.513,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1752.81700000005,
"styleRecalcs": 31,
"styleRecalcDurationMs": 15.976,
"layouts": 6,
"layoutDurationMs": 0.593,
"taskDurationMs": 281.596,
"heapDeltaBytes": 24707096,
"heapUsedBytes": 67286196,
"domNodes": 79,
"jsHeapTotalBytes": 20447232,
"scriptDurationMs": 25.088999999999995,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 610.1979999999969,
"styleRecalcs": 12,
"styleRecalcDurationMs": 8.346000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 362.059,
"heapDeltaBytes": 6210244,
"heapUsedBytes": 49235184,
"domNodes": 20,
"jsHeapTotalBytes": 14417920,
"scriptDurationMs": 71.542,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 538.4690000000205,
"styleRecalcs": 13,
"styleRecalcDurationMs": 8.323,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 326.457,
"heapDeltaBytes": 6586348,
"heapUsedBytes": 49410392,
"domNodes": 22,
"jsHeapTotalBytes": 13631488,
"scriptDurationMs": 64.294,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-clipping",
"durationMs": 527.0690000000968,
"styleRecalcs": 13,
"styleRecalcDurationMs": 9.206999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 311.898,
"heapDeltaBytes": 6543384,
"heapUsedBytes": 49155636,
"domNodes": 22,
"jsHeapTotalBytes": 13107200,
"scriptDurationMs": 62.123,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "large-graph-idle",
"durationMs": 1993.0430000000001,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.476,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 520.824,
"heapDeltaBytes": 15753984,
"heapUsedBytes": 67242460,
"domNodes": -253,
"jsHeapTotalBytes": 14663680,
"scriptDurationMs": 90.85399999999998,
"eventListeners": -123,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-idle",
"durationMs": 2026.390000000049,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.301,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 506.09499999999997,
"heapDeltaBytes": 3907528,
"heapUsedBytes": 54684732,
"domNodes": -258,
"jsHeapTotalBytes": 15917056,
"scriptDurationMs": 94.53299999999999,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-idle",
"durationMs": 2028.2849999999826,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.607,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 511.668,
"heapDeltaBytes": 4616836,
"heapUsedBytes": 55624744,
"domNodes": -257,
"jsHeapTotalBytes": 16703488,
"scriptDurationMs": 92.92299999999999,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2103.5080000000053,
"styleRecalcs": 69,
"styleRecalcDurationMs": 15.257000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 981.9929999999999,
"heapDeltaBytes": 16541212,
"heapUsedBytes": 70253516,
"domNodes": -259,
"jsHeapTotalBytes": 18219008,
"scriptDurationMs": 369.091,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2143.2810000000018,
"styleRecalcs": 69,
"styleRecalcDurationMs": 15.313,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1042.55,
"heapDeltaBytes": 18070744,
"heapUsedBytes": 71911448,
"domNodes": -258,
"jsHeapTotalBytes": 18481152,
"scriptDurationMs": 397.231,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2108.255999999983,
"styleRecalcs": 68,
"styleRecalcDurationMs": 15.133999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1000.2559999999999,
"heapDeltaBytes": 17252572,
"heapUsedBytes": 71461812,
"domNodes": -261,
"jsHeapTotalBytes": 17694720,
"scriptDurationMs": 382.07599999999996,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3165.742999999992,
"styleRecalcs": 66,
"styleRecalcDurationMs": 14.926000000000002,
"layouts": 60,
"layoutDurationMs": 6.931999999999999,
"taskDurationMs": 1244.299,
"heapDeltaBytes": 6482028,
"heapUsedBytes": 61626704,
"domNodes": -264,
"jsHeapTotalBytes": 18014208,
"scriptDurationMs": 480.967,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-zoom",
"durationMs": 3143.891999999994,
"styleRecalcs": 65,
"styleRecalcDurationMs": 15.192999999999998,
"layouts": 60,
"layoutDurationMs": 6.685,
"taskDurationMs": 1236.555,
"heapDeltaBytes": 8785840,
"heapUsedBytes": 64516588,
"domNodes": -264,
"jsHeapTotalBytes": 15761408,
"scriptDurationMs": 466.35699999999997,
"eventListeners": -123,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3151.6940000000204,
"styleRecalcs": 66,
"styleRecalcDurationMs": 14.837000000000003,
"layouts": 60,
"layoutDurationMs": 6.548,
"taskDurationMs": 1261.886,
"heapDeltaBytes": 9478224,
"heapUsedBytes": 64809604,
"domNodes": -263,
"jsHeapTotalBytes": 15654912,
"scriptDurationMs": 479.98,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "minimap-idle",
"durationMs": 2001.3139999999794,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.247999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 507.73999999999995,
"heapDeltaBytes": 1965800,
"heapUsedBytes": 54705020,
"domNodes": -257,
"jsHeapTotalBytes": 15392768,
"scriptDurationMs": 92.37199999999999,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2017.6419999999666,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.907,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 498.215,
"heapDeltaBytes": 2349380,
"heapUsedBytes": 56793696,
"domNodes": -262,
"jsHeapTotalBytes": 16703488,
"scriptDurationMs": 89.122,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2017.9899999999407,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.541,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 522.218,
"heapDeltaBytes": 5952996,
"heapUsedBytes": 68454828,
"domNodes": -257,
"jsHeapTotalBytes": 15507456,
"scriptDurationMs": 94.258,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 517.1680000000265,
"styleRecalcs": 48,
"styleRecalcDurationMs": 11.017000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 336.62500000000006,
"heapDeltaBytes": 6403336,
"heapUsedBytes": 49609576,
"domNodes": 22,
"jsHeapTotalBytes": 13893632,
"scriptDurationMs": 118.70100000000002,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 545.8740000000262,
"styleRecalcs": 48,
"styleRecalcDurationMs": 11.333,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 344.434,
"heapDeltaBytes": 6581340,
"heapUsedBytes": 49499752,
"domNodes": 22,
"jsHeapTotalBytes": 13631488,
"scriptDurationMs": 122.477,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 513.3349999999837,
"styleRecalcs": 48,
"styleRecalcDurationMs": 11.370000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 321.849,
"heapDeltaBytes": 6115816,
"heapUsedBytes": 49346820,
"domNodes": 22,
"jsHeapTotalBytes": 13631488,
"scriptDurationMs": 113.836,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 2011.4170000000229,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.83,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 330.139,
"heapDeltaBytes": 20265076,
"heapUsedBytes": 63562976,
"domNodes": 22,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 16.667,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 1993.725999999981,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.536999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 330.83700000000005,
"heapDeltaBytes": 20342412,
"heapUsedBytes": 63117544,
"domNodes": 22,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 16.685,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2011.8210000000545,
"styleRecalcs": 11,
"styleRecalcDurationMs": 10.081999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 329.19100000000003,
"heapDeltaBytes": 19879020,
"heapUsedBytes": 63096144,
"domNodes": 22,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 17.235,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1965.64699999999,
"styleRecalcs": 84,
"styleRecalcDurationMs": 40.532,
"layouts": 16,
"layoutDurationMs": 4.154000000000001,
"taskDurationMs": 856.165,
"heapDeltaBytes": 11808264,
"heapUsedBytes": 55040540,
"domNodes": 72,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 94.17600000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1974.7610000000009,
"styleRecalcs": 84,
"styleRecalcDurationMs": 42.302,
"layouts": 16,
"layoutDurationMs": 4.201,
"taskDurationMs": 880.393,
"heapDeltaBytes": 11802632,
"heapUsedBytes": 55000236,
"domNodes": 74,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 96.624,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1966.2500000000591,
"styleRecalcs": 83,
"styleRecalcDurationMs": 41.56999999999999,
"layouts": 16,
"layoutDurationMs": 4.298,
"taskDurationMs": 862.753,
"heapDeltaBytes": 12103812,
"heapUsedBytes": 56688892,
"domNodes": 72,
"jsHeapTotalBytes": 23855104,
"scriptDurationMs": 93.858,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "viewport-pan-sweep",
"durationMs": 8185.761000000013,
"styleRecalcs": 252,
"styleRecalcDurationMs": 43.52499999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3783.458,
"heapDeltaBytes": 35114036,
"heapUsedBytes": 86008596,
"domNodes": -255,
"jsHeapTotalBytes": 26869760,
"scriptDurationMs": 1429.681,
"eventListeners": -109,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8156.434999999988,
"styleRecalcs": 251,
"styleRecalcDurationMs": 40.628,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3431.34,
"heapDeltaBytes": 26400332,
"heapUsedBytes": 77221016,
"domNodes": -258,
"jsHeapTotalBytes": 19005440,
"scriptDurationMs": 1194.4479999999999,
"eventListeners": -111,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8169.612000000029,
"styleRecalcs": 250,
"styleRecalcDurationMs": 43.37,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3376.5780000000004,
"heapDeltaBytes": 22266484,
"heapUsedBytes": 75463816,
"domNodes": -257,
"jsHeapTotalBytes": 18481152,
"scriptDurationMs": 1186.8100000000002,
"eventListeners": -111,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 11156.075999999985,
"styleRecalcs": 1,
"styleRecalcDurationMs": 16.266000000000002,
"layouts": 1,
"layoutDurationMs": 4.726000000000008,
"taskDurationMs": 11134.727,
"heapDeltaBytes": -26653548,
"heapUsedBytes": 167738816,
"domNodes": -8329,
"jsHeapTotalBytes": 36003840,
"scriptDurationMs": 556.1709999999999,
"eventListeners": -14700,
"totalBlockingTimeMs": 1198,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 12394.935999999972,
"styleRecalcs": 3,
"styleRecalcDurationMs": 41.61799999999999,
"layouts": 2,
"layoutDurationMs": 9.715000000000002,
"taskDurationMs": 12374.408000000001,
"heapDeltaBytes": 11052208,
"heapUsedBytes": 163270928,
"domNodes": -4992,
"jsHeapTotalBytes": 60645376,
"scriptDurationMs": 561.827,
"eventListeners": 5292,
"totalBlockingTimeMs": 1192,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 11983.586999999943,
"styleRecalcs": 3,
"styleRecalcDurationMs": 44.02399999999998,
"layouts": 2,
"layoutDurationMs": 9.56399999999999,
"taskDurationMs": 11961.496000000001,
"heapDeltaBytes": 17617308,
"heapUsedBytes": 169888140,
"domNodes": -4992,
"jsHeapTotalBytes": 68509696,
"scriptDurationMs": 582.4659999999999,
"eventListeners": 5292,
"totalBlockingTimeMs": 1202,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 13821.51600000003,
"styleRecalcs": 67,
"styleRecalcDurationMs": 12.52500000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13789.182,
"heapDeltaBytes": -64348328,
"heapUsedBytes": 150358116,
"domNodes": -9848,
"jsHeapTotalBytes": -11182080,
"scriptDurationMs": 827.903,
"eventListeners": -23983,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 13621.269999999982,
"styleRecalcs": 65,
"styleRecalcDurationMs": 12.379999999999946,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13599.208,
"heapDeltaBytes": -23146832,
"heapUsedBytes": 173543824,
"domNodes": -9850,
"jsHeapTotalBytes": -28831744,
"scriptDurationMs": 836.5010000000001,
"eventListeners": -23953,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 13324.195999999916,
"styleRecalcs": 64,
"styleRecalcDurationMs": 11.556000000000012,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13302.789,
"heapDeltaBytes": -49119172,
"heapUsedBytes": 167441672,
"domNodes": -9847,
"jsHeapTotalBytes": 26566656,
"scriptDurationMs": 790.91,
"eventListeners": -23961,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "workflow-execution",
"durationMs": 433.55200000002014,
"styleRecalcs": 18,
"styleRecalcDurationMs": 23.068000000000005,
"layouts": 4,
"layoutDurationMs": 1.173,
"taskDurationMs": 112.82199999999999,
"heapDeltaBytes": 4611752,
"heapUsedBytes": 55096492,
"domNodes": 169,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 23.992,
"eventListeners": 71,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 123.8020000000688,
"styleRecalcs": 10,
"styleRecalcDurationMs": 18.990000000000002,
"layouts": 5,
"layoutDurationMs": 1.365,
"taskDurationMs": 95.46499999999999,
"heapDeltaBytes": 2814404,
"heapUsedBytes": 47127472,
"domNodes": 143,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 27.072,
"eventListeners": 37,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 438.590999999974,
"styleRecalcs": 17,
"styleRecalcDurationMs": 20.623,
"layouts": 5,
"layoutDurationMs": 1.14,
"taskDurationMs": 111.25600000000001,
"heapDeltaBytes": 4485196,
"heapUsedBytes": 48921848,
"domNodes": 157,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 26.808999999999997,
"eventListeners": 71,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
}
]
} |
There was a problem hiding this comment.
🧹 Nitpick comments (2)
browser_tests/tests/selectionToolboxMoreActions.spec.ts (2)
20-29: DecoupleopenMoreOptionsfrom a single menu item (Rename).This helper is reused across single- and multi-selection scenarios; anchoring it to one specific entry makes unrelated tests brittle if menu composition changes. Prefer a caller-provided expected item (or a stable menu container locator).
♻️ Suggested refactor
-async function openMoreOptions(comfyPage: ComfyPage) { +async function openMoreOptions( + comfyPage: ComfyPage, + expectedItemText: string = 'Copy' +) { const moreOptionsBtn = comfyPage.page.getByTestId('more-options-button') await expect(moreOptionsBtn).toBeVisible() await moreOptionsBtn.click({ force: true }) await comfyPage.nextFrame() await expect( - comfyPage.page.getByText('Rename', { exact: true }) + comfyPage.page.getByText(expectedItemText, { exact: true }) ).toBeVisible() }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/selectionToolboxMoreActions.spec.ts` around lines 20 - 29, The helper openMoreOptions is anchored to a specific menu item ('Rename'), making unrelated tests fragile; update the function (openMoreOptions) to stop asserting for 'Rename' and instead either accept a caller-provided expectedItem string param (e.g., openMoreOptions(comfyPage: ComfyPage, expectedItem?: string) and only assert that expectedItem is visible when provided) or assert a stable menu container (e.g., check for a test-id like 'more-options-menu' or the menu root via comfyPage.page.locator) to confirm the menu opened; update call sites to pass the expected menu entry where needed.
51-67: Useexpect.poll()for retrying assertions on node state changes.The assertions read async UI state immediately after one frame; these should use
expect.poll()to wait on actual state readiness and reduce CI flake. This pattern is already used elsewhere in the codebase (e.g.,contextMenu.spec.ts:128, 146, 158) and aligns withFLAKE_PREVENTION_RULES.mdwhich recommendsexpect.poll()for single async values.Convert to:
await expect.poll(() => nodeRef.isPinned()).toBe(true)Also applies to lines 78–95 (isCollapsed) and 424–440 (isBypassed).
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/selectionToolboxMoreActions.spec.ts` around lines 51 - 67, Replace immediate async assertions on nodeRef pin state with expect.poll() retries: where the test currently calls expect(await nodeRef.isPinned()).toBe(...), change to awaiting expect.poll(() => nodeRef.isPinned()).toBe(...) so the test waits for the UI state to stabilize after actions triggered via openMoreOptions(comfyPage) and comfyPage.page.getByText(...).click(...); apply the same pattern for nodeRef.isCollapsed() (lines ~78–95) and nodeRef.isBypassed() (lines ~424–440) to avoid flakiness.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@browser_tests/tests/selectionToolboxMoreActions.spec.ts`:
- Around line 20-29: The helper openMoreOptions is anchored to a specific menu
item ('Rename'), making unrelated tests fragile; update the function
(openMoreOptions) to stop asserting for 'Rename' and instead either accept a
caller-provided expectedItem string param (e.g., openMoreOptions(comfyPage:
ComfyPage, expectedItem?: string) and only assert that expectedItem is visible
when provided) or assert a stable menu container (e.g., check for a test-id like
'more-options-menu' or the menu root via comfyPage.page.locator) to confirm the
menu opened; update call sites to pass the expected menu entry where needed.
- Around line 51-67: Replace immediate async assertions on nodeRef pin state
with expect.poll() retries: where the test currently calls expect(await
nodeRef.isPinned()).toBe(...), change to awaiting expect.poll(() =>
nodeRef.isPinned()).toBe(...) so the test waits for the UI state to stabilize
after actions triggered via openMoreOptions(comfyPage) and
comfyPage.page.getByText(...).click(...); apply the same pattern for
nodeRef.isCollapsed() (lines ~78–95) and nodeRef.isBypassed() (lines ~424–440)
to avoid flakiness.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 37bfff58-50b2-4730-ae6d-e711a4d853a3
📒 Files selected for processing (1)
browser_tests/tests/selectionToolboxMoreActions.spec.ts
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #10968 +/- ##
========================================
Coverage 43.74% 43.74%
========================================
Files 1350 1350
Lines 69216 69216
Branches 19186 18315 -871
========================================
Hits 30279 30279
Misses 38338 38338
Partials 599 599
🚀 New features to boost your workflow:
|
… distribute checks
Use 'Copy' instead of 'Rename' for menu-open verification since Copy is always present in both single and multi-selection contexts.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In `@browser_tests/tests/selectionToolboxMoreActions.spec.ts`:
- Around line 325-327: The two assertions using xValues[1] being between
xValues[0] and xValues[2] are tautological after sorting; change them to assert
the actual distribution behavior you expect: for example, verify xValues are
strictly increasing (expect(xValues[1]).toBeGreaterThan(xValues[0]) and
expect(xValues[2]).toBeGreaterThan(xValues[1])) and assert spacing/spacing
equality (e.g., compute dx1 = xValues[1]-xValues[0], dx2 = xValues[2]-xValues[1]
and expect(Math.abs(dx1-dx2)).toBeLessThanOrEqual(tolerance)) or assert the
middle value equals the expected median if you know it; update both occurrences
that reference xValues to use these stronger assertions.
🪄 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: CHILL
Plan: Pro
Run ID: 00ff49c7-3102-4aca-9c40-a9c4cf798da2
📒 Files selected for processing (1)
browser_tests/tests/selectionToolboxMoreActions.spec.ts
There was a problem hiding this comment.
♻️ Duplicate comments (1)
browser_tests/tests/selectionToolboxMoreActions.spec.ts (1)
320-326:⚠️ Potential issue | 🟠 MajorThese distribute assertions are still tautological.
After sorting, the middle value will always fall between the min and max, so both tests can pass even if distribute is a no-op. Assert equal gaps (or compare before/after positions) so the test actually validates distribution.
Also applies to: 369-375
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/selectionToolboxMoreActions.spec.ts` around lines 320 - 326, The current assertions on xValues (derived from posAfter.ksampler.x, posAfter.emptyLatent.x, posAfter.vaeDecode.x) are tautological after sorting; replace them with a real distribution check: compute the sorted values, derive the two gaps (gap1 = xValues[1]-xValues[0], gap2 = xValues[2]-xValues[1]) and assert those gaps are approximately equal (or within a small tolerance) to validate even distribution, or alternatively compare each component's x before vs after distribution to ensure spacing increased (e.g., each neighbor distance after > before). Apply the same fix for the duplicate instance around the posAfter block later in the file.
🧹 Nitpick comments (1)
browser_tests/tests/selectionToolboxMoreActions.spec.ts (1)
104-136: Make theAdjust Sizeassertion prove the resize actually worked.This currently only proves the width became smaller than the artificially enlarged size. A regression that leaves height wrong—or only nudges width down slightly—still passes. Consider polling the full size and comparing both dimensions back toward
initialSize.🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/selectionToolboxMoreActions.spec.ts` around lines 104 - 136, The current assertion only checks width decreased after clicking 'Adjust Size'; update the test around nodeRef/initialSize/enlargedSize to poll the full size (both width and height) and assert both dimensions have moved back toward initialSize (e.g., both width and height are less than enlargedSize and not greater than initialSize or within an expected tolerance). Locate the block that calls selectNodeWithPan(comfyPage, nodeRef), openMoreOptions(comfyPage) and the click on 'Adjust Size', then replace the single-width poll with a poll returning (await nodeRef.getSize()) and assert both size.width and size.height meet the expected condition relative to initialSize and enlargedSize.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@browser_tests/tests/selectionToolboxMoreActions.spec.ts`:
- Around line 320-326: The current assertions on xValues (derived from
posAfter.ksampler.x, posAfter.emptyLatent.x, posAfter.vaeDecode.x) are
tautological after sorting; replace them with a real distribution check: compute
the sorted values, derive the two gaps (gap1 = xValues[1]-xValues[0], gap2 =
xValues[2]-xValues[1]) and assert those gaps are approximately equal (or within
a small tolerance) to validate even distribution, or alternatively compare each
component's x before vs after distribution to ensure spacing increased (e.g.,
each neighbor distance after > before). Apply the same fix for the duplicate
instance around the posAfter block later in the file.
---
Nitpick comments:
In `@browser_tests/tests/selectionToolboxMoreActions.spec.ts`:
- Around line 104-136: The current assertion only checks width decreased after
clicking 'Adjust Size'; update the test around nodeRef/initialSize/enlargedSize
to poll the full size (both width and height) and assert both dimensions have
moved back toward initialSize (e.g., both width and height are less than
enlargedSize and not greater than initialSize or within an expected tolerance).
Locate the block that calls selectNodeWithPan(comfyPage, nodeRef),
openMoreOptions(comfyPage) and the click on 'Adjust Size', then replace the
single-width poll with a poll returning (await nodeRef.getSize()) and assert
both size.width and size.height meet the expected condition relative to
initialSize and enlargedSize.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4a3683f6-526f-4a90-a460-584c6749722b
📒 Files selected for processing (1)
browser_tests/tests/selectionToolboxMoreActions.spec.ts
- Add selectNodesWithPan helper that uses canvas.selectItems() for proper selection state and pans viewport to keep toolbox visible - Fix adjust-size test: re-pan after resize to prevent toolbox from going outside viewport - Fix refresh button test: verify visibility matches actual node refreshable state instead of always expecting visible - Fix align/distribute tests: use programmatic selection with viewport panning instead of click-based selection that fails off-screen - Add toolbox visibility check in openMoreOptions for early detection
There was a problem hiding this comment.
♻️ Duplicate comments (1)
browser_tests/tests/selectionToolboxMoreActions.spec.ts (1)
371-379:⚠️ Potential issue | 🟠 MajorStrengthen the distribute assertions.
These checks are tautological after sorting: the middle value is always between the min and max, so the tests still pass if distribute is a no-op. Assert gap equality instead.
🔧 Suggested assertion fix
const xValues = [ posAfter.ksampler.x, posAfter.emptyLatent.x, posAfter.vaeDecode.x ].sort((a, b) => a - b) - expect(xValues[1]).toBeGreaterThanOrEqual(xValues[0]) - expect(xValues[1]).toBeLessThanOrEqual(xValues[2]) + const [left, middleX, right] = xValues + const leftGap = middleX - left + const rightGap = right - middleX + expect(leftGap).toBeGreaterThan(0) + expect(rightGap).toBeGreaterThan(0) + expect(Math.abs(leftGap - rightGap)).toBeLessThanOrEqual(1) @@ const yValues = [ posAfter.ksampler.y, posAfter.emptyLatent.y, posAfter.vaeDecode.y ].sort((a, b) => a - b) - expect(yValues[1]).toBeGreaterThanOrEqual(yValues[0]) - expect(yValues[1]).toBeLessThanOrEqual(yValues[2]) + const [top, middleY, bottom] = yValues + const topGap = middleY - top + const bottomGap = bottom - middleY + expect(topGap).toBeGreaterThan(0) + expect(bottomGap).toBeGreaterThan(0) + expect(Math.abs(topGap - bottomGap)).toBeLessThanOrEqual(1)As per coding guidelines:
Write tests for all changes, especially bug fixes to catch future regressions.Also applies to: 419-427
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/selectionToolboxMoreActions.spec.ts` around lines 371 - 379, The current assertions sort xValues and then check the middle is between min and max which is tautological; instead verify the distribution actually spaced nodes evenly by computing the x positions for posAfter.ksampler.x, posAfter.emptyLatent.x, and posAfter.vaeDecode.x and asserting that the gap between left and middle equals the gap between middle and right (e.g., |middle - left| === |right - middle| within a small tolerance), and apply the same stronger gap-equality assertions for the other similar group referenced later (the block involving the other three node positions).
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Duplicate comments:
In `@browser_tests/tests/selectionToolboxMoreActions.spec.ts`:
- Around line 371-379: The current assertions sort xValues and then check the
middle is between min and max which is tautological; instead verify the
distribution actually spaced nodes evenly by computing the x positions for
posAfter.ksampler.x, posAfter.emptyLatent.x, and posAfter.vaeDecode.x and
asserting that the gap between left and middle equals the gap between middle and
right (e.g., |middle - left| === |right - middle| within a small tolerance), and
apply the same stronger gap-equality assertions for the other similar group
referenced later (the block involving the other three node positions).
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: 4b417416-2b8e-4207-a274-d8d657164386
📒 Files selected for processing (1)
browser_tests/tests/selectionToolboxMoreActions.spec.ts
- Select node via evaluate to avoid viewport click issues on enlarged nodes - Replace .hover() with .click() for submenu items (more reliable in CI)
…ribute) Keep stable tests: pin, unpin, minimize, expand, copy, duplicate, refresh, bypass. The removed tests depend on submenu interactions that are unreliable in CI headless environments.
DrJKL
left a comment
There was a problem hiding this comment.
Good set of tests — solid use of expect.poll, no waitForTimeout, proper readiness waits. A few things to tighten up before this ships, mostly around flake-proofing and keeping force: true honest. Details inline.
| async panToNode(nodeRef: NodeReference): Promise<void> { | ||
| const nodePos = await nodeRef.getPosition() | ||
| await this.page.evaluate((pos) => { | ||
| const canvas = window.app!.canvas | ||
| canvas.ds.offset[0] = -pos.x + canvas.canvas.width / 2 | ||
| canvas.ds.offset[1] = -pos.y + canvas.canvas.height / 2 + 100 | ||
| canvas.setDirty(true, true) | ||
| }, nodePos) | ||
| await this.comfyPage.nextFrame() | ||
| } |
There was a problem hiding this comment.
@coderabbitai Open an issue to migrate the other 4 places that have this same code to delegate to this utility.
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
rg -n "canvas\.ds\.offset" --type ts -A2 -B2
Length of output: 16399
🏁 Script executed:
#!/bin/bash
# Check selectionToolboxMoreActions.spec.ts for inline pan logic
rg -n "canvas\.ds\.offset\[0\]|canvas\.canvas\.width" browser_tests/tests/selectionToolboxMoreActions.spec.ts -A2 -B2 2>/dev/null || echo "File not found or no matches"
# Also get the context around the selectionToolboxActions match to confirm it's the same pattern
rg -n "canvas\.ds\.offset\[0\]" browser_tests/tests/selectionToolboxActions.spec.ts -A3 -B3
rg -n "canvas\.ds\.offset\[0\]" browser_tests/tests/nodeHelp.spec.ts -A3 -B3
# Open the GitHub issue
gh issue create \
--repo Comfy-Org/ComfyUI_frontend \
--assignee DrJKL \
--title "refactor: migrate inline panToNode canvas panning logic to NodeOperationsHelper.panToNode()" \
--body "## Summary
PR `#10968` extracted the repeated canvas-panning pattern into \`NodeOperationsHelper.panToNode()\` in \`browser_tests/fixtures/helpers/NodeOperationsHelper.ts\`. Several existing test files still inline the same logic and should be migrated to call the shared utility instead.
## Locations to migrate
The following files contain the duplicated inline pattern:
\`\`\`ts
canvas.ds.offset[0] = -pos.x + canvas.canvas.width / 2
canvas.ds.offset[1] = -pos.y + canvas.canvas.height / 2 + 100
canvas.setDirty(true, true)
\`\`\`
1. \`browser_tests/tests/selectionToolboxActions.spec.ts\` (~line 21–26)
2. \`browser_tests/tests/nodeHelp.spec.ts\` (~line 16–21)
Please also audit \`browser_tests/tests/selectionToolboxMoreActions.spec.ts\` (added in PR `#10968`) for any local helper functions that inline the same pattern and should delegate to \`comfyPage.nodeOps.panToNode()\` (or whichever accessor exposes \`NodeOperationsHelper\`).
## Action
Replace each inline occurrence with a call to \`NodeOperationsHelper.panToNode(nodeRef)\` (available via \`comfyPage\`'s node ops helper) to remove duplication and ensure consistent panning behaviour across all E2E tests.
## References
- PR introducing the utility: https://github.com/Comfy-Org/ComfyUI_frontend/pull/10968
- Comment requesting this issue: https://github.com/Comfy-Org/ComfyUI_frontend/pull/10968#discussion_r3075880863
- Requested by: `@DrJKL`
"
Length of output: 699
@DrJKL, I've opened issue #11200 to track this: #11200
The search confirmed two files that still inline the exact same canvas-panning formula and should be migrated to NodeOperationsHelper.panToNode():
browser_tests/tests/selectionToolboxActions.spec.ts— lines 21–26browser_tests/tests/nodeHelp.spec.ts— lines 15–21
browser_tests/tests/selectionToolboxMoreActions.spec.ts (the new file in this PR) does not contain the raw inline pattern, so no migration is needed there.
🧠 Learnings used
Learnt from: jaeone94
Repo: Comfy-Org/ComfyUI_frontend PR: 10741
File: browser_tests/fixtures/helpers/boundsUtils.ts:32-45
Timestamp: 2026-03-31T12:17:31.232Z
Learning: In this codebase’s Playwright E2E test helpers under `browser_tests/fixtures/helpers/`, prefer measuring collapsed node dimensions directly from the DOM using `offsetWidth`/`offsetHeight`. Do not access Pinia stores from within `page.evaluate` blocks in E2E helpers (e.g., avoid calling `getNodeCollapsedSize()` or reading from `layoutStore`). This is intentional: E2E helpers should validate the final user-visible result, while Pinia store synchronization correctness is expected to be covered by unit tests.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/AGENTS.md:0-0
Timestamp: 2026-04-10T21:19:19.063Z
Learning: Applies to browser_tests/**/*.spec.ts : Select node first (`vueNodes.selectNode()` or `nodeRef.click('title')`) before performing context menu operations to avoid empty or wrong menu items
Learnt from: viva-jinyi
Repo: Comfy-Org/ComfyUI_frontend PR: 10499
File: browser_tests/tests/vueNodes/widgets/load/formDropdownPosition.spec.ts:55-59
Timestamp: 2026-03-25T03:30:32.279Z
Learning: In browser_tests for Comfy-Org/ComfyUI_frontend, it is an established convention to set canvas zoom via direct `canvas.ds.scale = s` assignment (see `browser_tests/fixtures/helpers/CanvasHelper.ts:108` `CanvasHelper.setScale()` and `lodThreshold.spec.ts:167`). Do not suggest replacing this with `canvas.ds.changeScale()` in tests that re-query element positions via Playwright's `boundingBox()` — viewport coordinates are already post-transform, so offset recalculation from `changeScale()` is irrelevant in that context.
Learnt from: jtydhr88
Repo: Comfy-Org/ComfyUI_frontend PR: 10574
File: browser_tests/tests/maskEditor.spec.ts:70-75
Timestamp: 2026-03-26T23:45:24.624Z
Learning: In Comfy-Org/ComfyUI_frontend browser_tests, the `dispatchEvent('contextmenu', { bubbles: true, cancelable: true, button: 2 })` pattern is only needed when the canvas z-999 overlay intercepts pointer events on canvas-level DOM widgets. Vue-rendered elements like `.lg-node-header` are NOT occluded by the canvas overlay; for these elements, the standard `locator.click()` (left-click to select) followed by `locator.click({ button: 'right' })` is correct and matches the established pattern in imagePreview.spec.ts. `getNodeLocator()` returns a Playwright `Locator`, not a NodeReference; `Locator.click('title')` is invalid syntax — only `NodeReference.click('title')` accepts a string part argument.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/tests/propertiesPanel/AGENTS.md:0-0
Timestamp: 2026-03-29T22:58:02.002Z
Learning: Applies to browser_tests/tests/propertiesPanel/**/*nodeSettings.spec.ts : Verify color changes via `page.evaluate` accessing node properties, per the guidance in `docs/guidance/playwright.md`
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/tests/propertiesPanel/AGENTS.md:0-0
Timestamp: 2026-03-29T22:58:02.002Z
Learning: Applies to browser_tests/tests/propertiesPanel/**/*nodeSettings.spec.ts : Enable VueNodes rendering in `beforeEach` via `comfyPage.settings.setSetting('Comfy.VueNodes.Enabled', true)` and call `comfyPage.vueNodes.waitForNodes()` for tests requiring VueNodes rendering
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 10958
File: browser_tests/helpers/builderTestUtils.ts:65-66
Timestamp: 2026-04-08T18:10:32.142Z
Learning: In `browser_tests/helpers/builderTestUtils.ts` (Comfy-Org/ComfyUI_frontend), the `ksampler.convertToSubgraph()` followed by a single `comfyPage.nextFrame()` wait before returning `{ inputNodeTitle: 'New Subgraph', widgetNames: ['seed'] }` is a pre-existing, CI-verified pattern. Do not flag this as a race condition or request additional polling/assertions for promoted-widget hydration in this helper; it works reliably in CI.
Learnt from: pythongosssss
Repo: Comfy-Org/ComfyUI_frontend PR: 11184
File: browser_tests/tests/pasteImageContextMenu.spec.ts:18-23
Timestamp: 2026-04-13T15:30:35.595Z
Learning: In `browser_tests/tests/pasteImageContextMenu.spec.ts` (Comfy-Org/ComfyUI_frontend), the tests right-click a node locator directly (without a prior left-click to select) to open the context menu. This is a pre-existing, CI-verified, non-flaky pattern specific to this file. Do not flag the absence of a prior `nodeEl.click()` or `vueNodes.selectNode()` call before the right-click as a potential issue in this file.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 10810
File: src/stores/subgraphNavigationStore.ts:148-161
Timestamp: 2026-04-07T15:37:53.114Z
Learning: In Comfy-Org/ComfyUI_frontend, the AABB node-visibility check (computeVisibleArea + visible_area intersection over graph.nodes) appears in both `src/stores/subgraphNavigationStore.ts` (PR `#10810`) and `src/scripts/app.ts` (~lines 1272–1281). A follow-up issue was opened to extract this into a standalone utility (not a method on LGraphCanvas per ADR 0008). Candidate locations: `src/utils/graphTraversalUtil.ts` or a new `src/utils/viewportUtil.ts`.
Learnt from: pythongosssss
Repo: Comfy-Org/ComfyUI_frontend PR: 11184
File: browser_tests/tests/vueNodes/interactions/node/remove.spec.ts:91-112
Timestamp: 2026-04-13T15:30:39.465Z
Learning: In Comfy-Org/ComfyUI_frontend `browser_tests/tests/vueNodes/interactions/node/remove.spec.ts`, the test "Delete key does not delete node when typing in Vue node widgets" intentionally skips `comfyPage.vueNodes.waitForNodes()` and uses a broad `input[type="text"], textarea` locator. This is a pre-existing, non-flaky test pattern. Do not flag the absence of `waitForNodes()` in this test as a race condition risk.
Learnt from: pythongosssss
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: :0-0
Timestamp: 2026-04-09T19:42:11.374Z
Learning: In Comfy-Org/ComfyUI_frontend PR `#10993` ("fix/feat: App mode - Persist user resized widget heights"), end-to-end regression tests for the new `useAppModeWidgetResizing` composable and persisted widget height behavior were intentionally deferred to a follow-up PR. The reason given by the author (pythongosssss) is to allow the fix to be backported more easily. Do not flag the absence of browser_tests/ changes in PR `#10993` as a coverage gap.
Learnt from: pythongosssss
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: :0-0
Timestamp: 2026-04-09T19:41:58.302Z
Learning: In Comfy-Org/ComfyUI_frontend PR `#10993` ("fix/feat: App mode - Persist user resized widget heights"), e2e regression tests for persisting user-resized widget heights are intentionally deferred to a follow-up PR to make backporting easier. Do not flag the absence of `browser_tests/` changes in PR `#10993` as a missing regression test.
Learnt from: jaeone94
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: :0-0
Timestamp: 2026-03-18T03:20:24.898Z
Learning: In Comfy-Org/ComfyUI_frontend PR `#10228`, E2E testing for the `toBrowsableUrl` clipboard copy behavior in `MissingModelRow.vue` is not practical because: (1) the Copy Url button is only visible under `!isCloud && model.representative.url && !isAssetSupported`, requiring a special fixture with a real HuggingFace/Civitai URL and local node definitions that mark the model unsupported; (2) `clipboard-read` permission must be explicitly granted in Playwright; (3) there are no existing clipboard E2E test patterns in the codebase. The pure function `toBrowsableUrl` is fully covered by unit tests instead. Do not request an E2E test for this clipboard URL-conversion feature.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2026-03-24T17:16:12.386Z
Learning: For bug-fix PRs, ensure end-to-end regression coverage by either: (1) changing at least one file under `browser_tests/`, or (2) providing a concrete, non-placeholder explanation in the PR description of why an end-to-end regression test was not added. Use only PR metadata available in the review context (PR title, commit subjects, files changed relative to base, PR description). Do not rely on shell commands or inspect files outside the PR.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2026-04-13T20:52:40.846Z
Learning: End-to-end regression coverage for fixes: When PR title or commit subjects use bug-fix language (`fix`, `fixed`, `fixes`, `fixing`, `bugfix`, `hotfix`), verify that either: (1) at least one file under `browser_tests/` is changed, or (2) the PR description includes a concrete, non-placeholder explanation of why an end-to-end regression test was not added. Fail if neither condition is met and ask the author to add or update a Playwright regression test or provide concrete justification.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2026-03-27T04:23:01.330Z
Learning: End-to-end regression coverage for fixes: For PRs that include bug-fix language in the title or commit subjects (fix, fixed, fixes, fixing, bugfix, hotfix), ensure at least one of the following: (1) files are changed under browser_tests/, or (2) the PR description includes a concrete, non-placeholder explanation of why an end-to-end regression test was not added. Only use PR metadata available in the review context (PR title, commit subjects, files changed relative to base, PR description). Do not rely on shell commands, reverse diffs, or files outside the PR.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2026-03-17T07:39:57.336Z
Learning: End-to-end regression coverage for fixes: Use PR metadata (PR title, commit subjects, files changed relative to PR base, PR description) to verify bug-fix PRs include end-to-end regression test coverage. Pass if: (1) PR title and commit subjects don't use bug-fix language (fix, fixed, fixes, fixing, bugfix, hotfix), OR (2) PR changes at least one file under browser_tests/, OR (3) PR description includes concrete non-placeholder explanation for why end-to-end regression test wasn't added. Fail otherwise, mentioning the bug-fix signal found and asking to add/update Playwright regression test under browser_tests/ or provide concrete explanation in PR description.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2026-04-07T02:00:26.259Z
Learning: End-to-end regression coverage for fixes: Verify that bug-fix PRs include either an end-to-end regression test under `browser_tests/`, or a concrete explanation in the PR description of why a test was not added. Analysis must use only PR metadata (title, commit subjects, files changed, PR description) without shell commands or inspection of files outside the PR.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2026-04-13T18:52:34.863Z
Learning: End-to-end regression coverage for fixes: For PRs with bug-fix language in title or commit subjects (`fix`, `fixed`, `fixes`, `fixing`, `bugfix`, `hotfix`), require either: (1) at least one file changed under `browser_tests/`, or (2) a concrete, non-placeholder explanation in the PR description of why an end-to-end regression test was not added.
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 10140
File: apps/website/package.json:1-79
Timestamp: 2026-03-17T07:28:27.677Z
Learning: In Comfy-Org/ComfyUI_frontend, PRs managed via Graphite stacked sets (using `gt split`) may show browser_tests/ files in the diff as artifacts of the split process. These files contain no actual changes relative to origin/main and should not be flagged as unrelated scope changes. Verify against the PR title/description stacking context before raising scope concerns.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).
Learnt from: kaili-yang
Repo: Comfy-Org/ComfyUI_frontend PR: 7805
File: src/composables/useCoreCommands.ts:439-439
Timestamp: 2025-12-30T22:22:33.836Z
Learning: When accessing reactive properties from Pinia stores in TypeScript files, avoid using .value on direct property access (e.g., useStore().isOverlayExpanded). Pinia auto-wraps refs when accessed directly, returning the primitive value. The .value accessor is only needed when destructuring store properties or when using storeToRefs().
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 8248
File: src/platform/assets/schemas/assetSchema.ts:109-118
Timestamp: 2026-01-22T23:44:59.888Z
Learning: Do not export declarations (e.g., schemas, constants, types) unless they are actually used elsewhere in the codebase. Keep the public API surface minimal by exporting only items with concrete usage. This reduces coupling and keeps imports explicit. In src/platform/assets/schemas/assetSchema.ts, ensure only necessary exports are exposed; remove unused exports or switch to non-exported/internal where appropriate.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 8722
File: src/composables/maskeditor/useBrushDrawing.ts:5-5
Timestamp: 2026-02-08T03:19:12.009Z
Learning: Treat unresolved import warnings caused by pnpm workspace catalog mappings (pnpm-workspace.yaml) and unplugin-typegpu in vite.config.mts as false positives. Do not flag these in PR reviews; they are expected in sandboxes without node_modules and are not indicative of actual missing dependencies in the TS codebase.
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 8966
File: src/extensions/core/load3d.ts:427-430
Timestamp: 2026-02-19T02:06:23.468Z
Learning: In TypeScript, you can use typeof SomeClass in type annotation positions (e.g., param: typeof LGraphNode) even when SomeClass is imported with import type. This is a type query that only exists at compile time and is erased in runtime, so it is safe to combine with type-only imports. Apply this pattern to TS files broadly when you need a type that references the shape of a class or constructor function without importing the value at runtime.
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 8966
File: src/extensions/core/uploadAudio.ts:91-94
Timestamp: 2026-02-19T02:06:38.395Z
Learning: In TypeScript files, you can use a type annotation like 'nodeType: typeof MyClass' even if MyClass is imported via 'import type'. Both the type-only import and 'typeof' operate at the type level and are erased at compile time. This pattern is commonly used for constructor types (e.g., 'nodeType: typeof LGraphNode'). Apply this pattern across TypeScript files in the repository (src/**/*.ts) as appropriate, ensuring the imported symbol is a type-only import when possible for clarity and to avoid runtime imports.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 8992
File: src/lib/litegraph/src/widgets/GradientSliderWidget.ts:18-18
Timestamp: 2026-02-20T21:08:19.814Z
Learning: When drawing with CanvasRenderingContext2D in TypeScript/JavaScript, wrap the drawing logic with ctx.save() at the start and ctx.restore() at the end to preserve and restore the canvas state. Do not manually destructure and restore individual properties (e.g., fillStyle, strokeStyle); rely on save/restore to manage state changes in a scoped manner. This should be applied to all TS files that perform canvas drawing.
Learnt from: dante01yoon
Repo: Comfy-Org/ComfyUI_frontend PR: 9075
File: src/scripts/api.featureFlags.test.ts:237-268
Timestamp: 2026-02-22T04:27:33.379Z
Learning: In Vite/Vitest, import.meta.env.DEV is true for any mode that is not 'production' (i.e., DEV is the opposite of PROD, and can be true in 'test', 'development', etc.). Do not assume DEV implies only 'development' mode. When reviewing code and tests, treat DEV as a non-production flag and verify environment-specific logic accordingly. Reference: https://vite.dev/guide/env-and-mode#modes
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 9427
File: src/renderer/extensions/vueNodes/widgets/components/form/dropdown/FormDropdownMenuFilter.vue:33-33
Timestamp: 2026-03-06T00:53:28.835Z
Learning: When reviewing code, note that the enforce-canonical-classes (better-tailwindcss) rule may auto-fix Tailwind v3 !class-name syntax by converting it to v4 class-name! syntax. Do not treat these auto-fixed class-name! instances as newly introduced issues; the perceived change is in syntax placement, not in usage or intent. This guidance applies across all .vue and .ts files in the repository.
Learnt from: sonnybox
Repo: Comfy-Org/ComfyUI_frontend PR: 9446
File: src/renderer/extensions/vueNodes/widgets/components/WidgetTextarea.vue:45-45
Timestamp: 2026-03-06T01:55:00.013Z
Learning: Treat wrap-break-word as a valid Tailwind CSS utility for overflow-wrap: break-word in Tailwind v4+ projects. Do not flag this class as invalid in any Vue (.vue) or TypeScript (.ts/.tsx) files within the repository (e.g., Comfy-Org/ComfyUI_frontend) or other Tailwind v4+ projects. When reviewing, verify that the class is used to enable word breaking in long text content and reference the Tailwind docs: https://tailwindcss.com/docs/overflow-wrap.
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 9554
File: browser_tests/fixtures/ComfyPage.ts:189-193
Timestamp: 2026-03-12T10:03:55.383Z
Learning: In browser_tests, seed localStorage-based feature flags at init time using FeatureFlagHelper.seedFlags() (which uses page.addInitScript) before any navigation. Ensure this happens before comfyPage.setup() is called. The comfyPageFixture currently yields after calling comfyPage.setup(), so do not defer setup() from the fixture or add a pre-setup hook, as changing this would break existing tests.
Learnt from: Yourz
Repo: Comfy-Org/ComfyUI_frontend PR: 10310
File: browser_tests/tests/topbarMenuDismissal.spec.ts:0-0
Timestamp: 2026-03-19T16:16:40.350Z
Learning: In Comfy-Org/ComfyUI_frontend, when reviewing changes limited to adding/revising `:modal="false"` (or similar modal/non-modal behavior props) on reakit-ui/reka-ui primitives such as `ContextMenuRoot` and `DropdownMenuRoot`, do not request Playwright/E2E regression coverage solely for that prop-level change. The dismissal behavior for modal vs non-modal is documented and tested upstream in the reka-ui library; only ask for E2E tests when the change affects ComfyUI_frontend behavior beyond these primitive prop wiring differences (e.g., custom logic, integration behavior, or new user flows not covered upstream).
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 10958
File: browser_tests/tests/bottomPanelLogs.spec.ts:4-4
Timestamp: 2026-04-08T18:09:35.787Z
Learning: In this repo’s E2E browser tests, do not flag `import-x/no-unresolved` for imports using the `e2e/*` path alias. CodeRabbit sandbox reports these as unresolved because it may not run a full `pnpm install`; `e2e/*` is defined in the root `tsconfig.json` and the related `apps/website/tsconfig.json`/workspace dependency resolution only works when dependencies are installed. Apply this only to `browser_tests/**/*.ts` files.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 10958
File: browser_tests/tests/subgraph/subgraphSearch.spec.ts:3-4
Timestamp: 2026-04-08T18:09:50.771Z
Learning: In Comfy-Org/ComfyUI_frontend browser tests (browser_tests/**/*.ts), do not report `import-x/no-unresolved` for imports using the `e2e/*` alias. The alias is defined in the root tsconfig.json as `"e2e/*": ["./browser_tests/*"]`, and eslint.config.ts includes the correct tsconfig `project` list; lint passes locally and in CI. Treat any `e2e/*` unresolved-import findings in the CodeRabbit sandbox as false positives.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 10958
File: browser_tests/tests/rightClickMenu.spec.ts:3-5
Timestamp: 2026-04-08T18:10:12.748Z
Learning: In Comfy-Org/ComfyUI_frontend, `import-x/no-unresolved` errors caused by `@/` (src alias) and `e2e/` (browser_tests alias) imports inside `browser_tests/**/*.ts` are false positives in CodeRabbit’s sandbox because the sandbox cannot resolve the root `tsconfig.json` (it extends `astro/tsconfigs/strict`), which breaks the TypeScript import resolver. Since ESLint passes clean locally and in CI, do not treat these specific `@/` and `e2e/` unresolved import findings as real issues, and do not recommend adding `browser_tests/tsconfig.json` (or similar) to ESLint/CodeRabbit resolver project lists for this case.
There was a problem hiding this comment.
Seems like the humans are having a chat. I'll hop back into my burrow for now. If you need me again, just tag @coderabbitai in a new comment, and I'll come hopping out!
| )[0] | ||
| await comfyPage.nodeOps.selectNodeWithPan(nodeRef) | ||
|
|
||
| await expect(comfyPage.page.locator('.selection-toolbox')).toBeVisible() |
There was a problem hiding this comment.
Could this be given a testid? The toolbox as a whole is probably worth a Page Object.
There was a problem hiding this comment.
Added a selection-toolbox test id on the root and routed the spec through comfyPage.selectionToolbox, so this now uses a page-object-backed locator instead of the raw class selector.
There was a problem hiding this comment.
@coderabbitai Open an issue assigned to @dante01yoon to make a Page Object for the SelectionToolbox.
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
gh issue create \
--repo Comfy-Org/ComfyUI_frontend \
--title "Create a Page Object for the SelectionToolbox in browser tests" \
--assignee dante01yoon \
--body "## Summary
The \`SelectionToolbox\` component currently lacks a dedicated Playwright Page Object in the browser test suite. Tests in \`browser_tests/tests/selectionToolboxMoreActions.spec.ts\` (and related specs) interact with the toolbox via raw locators (e.g., \`.selection-toolbox\` class selectors and \`getByTestId\` calls scattered throughout the spec files).
A dedicated Page Object (e.g., \`SelectionToolboxPage\` or similar, under \`browser_tests/fixtures/\`) would:
- Encapsulate all locator logic for the toolbox and its buttons (more-options button, refresh button, bypass button, etc.)
- Provide typed helper methods for common actions (open more options, click pin/unpin, align, distribute, etc.)
- Improve maintainability and readability across all toolbox-related specs
## Requested by
Requested by `@DrJKL` in PR `#10968` (comment: https://github.com/Comfy-Org/ComfyUI_frontend/pull/10968#discussion_r3075918232).
## References
- PR: https://github.com/Comfy-Org/ComfyUI_frontend/pull/10968"
Length of output: 58
@DrJKL, done! I've opened issue #11244 — "Create a Page Object for the SelectionToolbox in browser tests" — assigned to @dante01yoon. It includes backlinks to this PR and the specific comment for context.
🧠 Learnings used
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: coderabbit-custom-pre-merge-checks-unique-id-file-non-traceable-F7F2B60C-1728-4C9A-8889-4F2235E186CA.txt:0-0
Timestamp: 2026-04-14T17:39:58.431Z
Learning: End-to-end regression test coverage for bug fixes: If the PR title or commit subjects indicate a bug fix (using language like fix, fixed, fixes, fixing, bugfix, or hotfix), ensure the PR includes at least one test under browser_tests/ or provides a concrete, non-placeholder explanation in the PR description of why an end-to-end regression test is not practical.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7415
File: browser_tests/tests/mobileBaseline.spec.ts:7-15
Timestamp: 2025-12-13T05:34:15.488Z
Learning: In Playwright tests for the ComfyUI frontend, the toPass() assertion uses incremental backoff during retries. When a test may involve async operations, increasing the timeout (e.g., to 5000 ms) can be sufficient instead of aggressively extending timeouts. Apply this understanding to tests under browser_tests/tests/; if not resolved, review the toPass() backoff behavior and ensure timeouts align with expected async completion without masking issues.
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).
Learnt from: kaili-yang
Repo: Comfy-Org/ComfyUI_frontend PR: 7805
File: src/composables/useCoreCommands.ts:439-439
Timestamp: 2025-12-30T22:22:33.836Z
Learning: When accessing reactive properties from Pinia stores in TypeScript files, avoid using .value on direct property access (e.g., useStore().isOverlayExpanded). Pinia auto-wraps refs when accessed directly, returning the primitive value. The .value accessor is only needed when destructuring store properties or when using storeToRefs().
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 8248
File: src/platform/assets/schemas/assetSchema.ts:109-118
Timestamp: 2026-01-22T23:44:59.888Z
Learning: Do not export declarations (e.g., schemas, constants, types) unless they are actually used elsewhere in the codebase. Keep the public API surface minimal by exporting only items with concrete usage. This reduces coupling and keeps imports explicit. In src/platform/assets/schemas/assetSchema.ts, ensure only necessary exports are exposed; remove unused exports or switch to non-exported/internal where appropriate.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 8722
File: src/composables/maskeditor/useBrushDrawing.ts:5-5
Timestamp: 2026-02-08T03:19:12.009Z
Learning: Treat unresolved import warnings caused by pnpm workspace catalog mappings (pnpm-workspace.yaml) and unplugin-typegpu in vite.config.mts as false positives. Do not flag these in PR reviews; they are expected in sandboxes without node_modules and are not indicative of actual missing dependencies in the TS codebase.
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 8966
File: src/extensions/core/load3d.ts:427-430
Timestamp: 2026-02-19T02:06:23.468Z
Learning: In TypeScript, you can use typeof SomeClass in type annotation positions (e.g., param: typeof LGraphNode) even when SomeClass is imported with import type. This is a type query that only exists at compile time and is erased in runtime, so it is safe to combine with type-only imports. Apply this pattern to TS files broadly when you need a type that references the shape of a class or constructor function without importing the value at runtime.
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 8966
File: src/extensions/core/uploadAudio.ts:91-94
Timestamp: 2026-02-19T02:06:38.395Z
Learning: In TypeScript files, you can use a type annotation like 'nodeType: typeof MyClass' even if MyClass is imported via 'import type'. Both the type-only import and 'typeof' operate at the type level and are erased at compile time. This pattern is commonly used for constructor types (e.g., 'nodeType: typeof LGraphNode'). Apply this pattern across TypeScript files in the repository (src/**/*.ts) as appropriate, ensuring the imported symbol is a type-only import when possible for clarity and to avoid runtime imports.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 8992
File: src/lib/litegraph/src/widgets/GradientSliderWidget.ts:18-18
Timestamp: 2026-02-20T21:08:19.814Z
Learning: When drawing with CanvasRenderingContext2D in TypeScript/JavaScript, wrap the drawing logic with ctx.save() at the start and ctx.restore() at the end to preserve and restore the canvas state. Do not manually destructure and restore individual properties (e.g., fillStyle, strokeStyle); rely on save/restore to manage state changes in a scoped manner. This should be applied to all TS files that perform canvas drawing.
Learnt from: dante01yoon
Repo: Comfy-Org/ComfyUI_frontend PR: 9075
File: src/scripts/api.featureFlags.test.ts:237-268
Timestamp: 2026-02-22T04:27:33.379Z
Learning: In Vite/Vitest, import.meta.env.DEV is true for any mode that is not 'production' (i.e., DEV is the opposite of PROD, and can be true in 'test', 'development', etc.). Do not assume DEV implies only 'development' mode. When reviewing code and tests, treat DEV as a non-production flag and verify environment-specific logic accordingly. Reference: https://vite.dev/guide/env-and-mode#modes
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 9427
File: src/renderer/extensions/vueNodes/widgets/components/form/dropdown/FormDropdownMenuFilter.vue:33-33
Timestamp: 2026-03-06T00:53:28.835Z
Learning: When reviewing code, note that the enforce-canonical-classes (better-tailwindcss) rule may auto-fix Tailwind v3 !class-name syntax by converting it to v4 class-name! syntax. Do not treat these auto-fixed class-name! instances as newly introduced issues; the perceived change is in syntax placement, not in usage or intent. This guidance applies across all .vue and .ts files in the repository.
Learnt from: sonnybox
Repo: Comfy-Org/ComfyUI_frontend PR: 9446
File: src/renderer/extensions/vueNodes/widgets/components/WidgetTextarea.vue:45-45
Timestamp: 2026-03-06T01:55:00.013Z
Learning: Treat wrap-break-word as a valid Tailwind CSS utility for overflow-wrap: break-word in Tailwind v4+ projects. Do not flag this class as invalid in any Vue (.vue) or TypeScript (.ts/.tsx) files within the repository (e.g., Comfy-Org/ComfyUI_frontend) or other Tailwind v4+ projects. When reviewing, verify that the class is used to enable word breaking in long text content and reference the Tailwind docs: https://tailwindcss.com/docs/overflow-wrap.
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 9554
File: browser_tests/fixtures/ComfyPage.ts:189-193
Timestamp: 2026-03-12T10:03:55.383Z
Learning: In browser_tests, seed localStorage-based feature flags at init time using FeatureFlagHelper.seedFlags() (which uses page.addInitScript) before any navigation. Ensure this happens before comfyPage.setup() is called. The comfyPageFixture currently yields after calling comfyPage.setup(), so do not defer setup() from the fixture or add a pre-setup hook, as changing this would break existing tests.
Learnt from: Yourz
Repo: Comfy-Org/ComfyUI_frontend PR: 10310
File: browser_tests/tests/topbarMenuDismissal.spec.ts:0-0
Timestamp: 2026-03-19T16:16:40.350Z
Learning: In Comfy-Org/ComfyUI_frontend, when reviewing changes limited to adding/revising `:modal="false"` (or similar modal/non-modal behavior props) on reakit-ui/reka-ui primitives such as `ContextMenuRoot` and `DropdownMenuRoot`, do not request Playwright/E2E regression coverage solely for that prop-level change. The dismissal behavior for modal vs non-modal is documented and tested upstream in the reka-ui library; only ask for E2E tests when the change affects ComfyUI_frontend behavior beyond these primitive prop wiring differences (e.g., custom logic, integration behavior, or new user flows not covered upstream).
Learnt from: jaeone94
Repo: Comfy-Org/ComfyUI_frontend PR: 10302
File: browser_tests/tests/dialog.spec.ts:31-32
Timestamp: 2026-03-22T14:21:45.793Z
Learning: In E2E tests, when asserting errors rendered by `ErrorOverlay.vue` (container has `data-testid="error-overlay"`), do not use `TestIds.dialogs.missingNodePacksGroup` (`error-group-missing-node`) or `TestIds.dialogs.missingModelsGroup` (`error-group-missing-model`)—those test IDs are rendered on `PropertiesAccordionItem` elements inside `TabErrors.vue`, not inside the overlay. For overlay-level assertions, scope queries to the overlay container and assert using the visible text (e.g., `errorOverlay.getByText(/Missing Node Packs/)`) rather than `getByTestId`.
Learnt from: viva-jinyi
Repo: Comfy-Org/ComfyUI_frontend PR: 10499
File: browser_tests/tests/vueNodes/widgets/load/formDropdownPosition.spec.ts:55-59
Timestamp: 2026-03-25T03:30:28.527Z
Learning: In Comfy-Org/ComfyUI_frontend browser tests, follow the established canvas zoom convention: set zoom in tests using direct assignment `canvas.ds.scale = s` (as used by `browser_tests/fixtures/helpers/CanvasHelper.ts` in `CanvasHelper.setScale()`). Do not recommend switching to `canvas.ds.changeScale()` in spec files when the test re-queries element positions using Playwright `boundingBox()`, since boundingBox coordinates are already in the post-transform viewport space and any offset recalculation associated with `changeScale()` is not relevant there.
Learnt from: jtydhr88
Repo: Comfy-Org/ComfyUI_frontend PR: 10574
File: browser_tests/tests/maskEditor.spec.ts:70-75
Timestamp: 2026-03-26T23:45:21.231Z
Learning: In Comfy-Org/ComfyUI_frontend browser tests, only use `dispatchEvent('contextmenu', { bubbles: true, cancelable: true, button: 2 })` when the ComfyUI canvas z-999 overlay is intercepting pointer events on canvas-level DOM widgets. Vue-rendered elements (e.g., selectors like `.lg-node-header`) are not occluded by the canvas overlay—so for those, follow the established pattern used in `imagePreview.spec.ts`: click to select with `locator.click()` (left click), then trigger the context menu with `locator.click({ button: 'right' })`.
Also, ensure you’re using the correct Playwright API: `getNodeLocator()` returns a Playwright `Locator` (not a NodeReference). Therefore, `Locator.click('title')` is invalid syntax—if you need to click a string part of a node, only `NodeReference.click('title')` supports the string part argument.
Learnt from: dante01yoon
Repo: Comfy-Org/ComfyUI_frontend PR: 10580
File: browser_tests/tests/sidebar/textSizeRename.spec.ts:20-20
Timestamp: 2026-03-27T13:58:46.129Z
Learning: In ComfyUI_frontend browser tests, when selecting the element with test id `node-tree-leaf`, use `getByTestId('node-tree-leaf')` with the raw string even if `node-tree-leaf` is intentionally NOT present in the centralized `TestIds` (see `browser_tests/fixtures/selectors.ts`). Do not flag this as a violation of the centralized `TestIds` guideline for this specific test id.
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 10689
File: browser_tests/tests/tabProgressIsolation.spec.ts:0-0
Timestamp: 2026-03-29T00:40:29.127Z
Learning: In Comfy-Org/ComfyUI_frontend browser tests, when you need the ComfyUI API from inside a Playwright `page.evaluate()` callback, access it as `window.app!.api`. Do not use `window.comfyAPI.api` (it does not exist). This should be the standard approach for API references within `browser_tests/**/*.spec.ts` browser test files.
Learnt from: jaeone94
Repo: Comfy-Org/ComfyUI_frontend PR: 10848
File: browser_tests/tests/propertiesPanel/errorsTabMissingModels.spec.ts:11-23
Timestamp: 2026-04-04T11:02:09.126Z
Learning: When reviewing Playwright browser tests in Comfy-Org/ComfyUI_frontend, don’t treat `beforeEach` calls that are explicitly OSS/devtools-related as potentially executing in the cloud project if the suite/tests are tagged with `ui`. In `playwright.config.ts`, the cloud project runs only tests matching `grep: /cloud/` (and excludes `oss` via `grepInvert: /oss/`), while the chromium (OSS) project uses `grepInvert: /mobile|perf|audit|cloud/`, so `ui`-tagged suites (including OSS devtools usage) will only run against the OSS backend and are excluded from the cloud project by the cloud `grep: /cloud/` filter.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 10958
File: browser_tests/tests/bottomPanelLogs.spec.ts:4-4
Timestamp: 2026-04-08T18:09:35.787Z
Learning: In this repo’s E2E browser tests, do not flag `import-x/no-unresolved` for imports using the `e2e/*` path alias. CodeRabbit sandbox reports these as unresolved because it may not run a full `pnpm install`; `e2e/*` is defined in the root `tsconfig.json` and the related `apps/website/tsconfig.json`/workspace dependency resolution only works when dependencies are installed. Apply this only to `browser_tests/**/*.ts` files.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 10958
File: browser_tests/tests/subgraph/subgraphSearch.spec.ts:3-4
Timestamp: 2026-04-08T18:09:50.771Z
Learning: In Comfy-Org/ComfyUI_frontend browser tests (browser_tests/**/*.ts), do not report `import-x/no-unresolved` for imports using the `e2e/*` alias. The alias is defined in the root tsconfig.json as `"e2e/*": ["./browser_tests/*"]`, and eslint.config.ts includes the correct tsconfig `project` list; lint passes locally and in CI. Treat any `e2e/*` unresolved-import findings in the CodeRabbit sandbox as false positives.
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 10958
File: browser_tests/tests/rightClickMenu.spec.ts:3-5
Timestamp: 2026-04-08T18:10:12.748Z
Learning: In Comfy-Org/ComfyUI_frontend, `import-x/no-unresolved` errors caused by `@/` (src alias) and `e2e/` (browser_tests alias) imports inside `browser_tests/**/*.ts` are false positives in CodeRabbit’s sandbox because the sandbox cannot resolve the root `tsconfig.json` (it extends `astro/tsconfigs/strict`), which breaks the TypeScript import resolver. Since ESLint passes clean locally and in CI, do not treat these specific `@/` and `e2e/` unresolved import findings as real issues, and do not recommend adding `browser_tests/tsconfig.json` (or similar) to ESLint/CodeRabbit resolver project lists for this case.
## Summary - Adds `selectionToolboxMoreActions.spec.ts` with E2E coverage for previously untested toolbox actions - Covers: pin/unpin, minimize/expand, adjust size, copy, duplicate, refresh button, align (top/left), distribute (horizontal/vertical), alignment options hidden for single selection, multi-node bypass toggle - Part of the FixIt Burndown test coverage initiative (toolbox actions) ## Test plan - [ ] All new tests pass in CI - [ ] No regressions in existing selectionToolbox tests ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10968-test-expand-E2E-coverage-for-toolbox-actions-33c6d73d3650811286cefdd0eb4f5242) by [Unito](https://www.unito.io) --------- Co-authored-by: Alexander Brown <drjkl@comfy.org>
## Summary - Adds `selectionToolboxMoreActions.spec.ts` with E2E coverage for previously untested toolbox actions - Covers: pin/unpin, minimize/expand, adjust size, copy, duplicate, refresh button, align (top/left), distribute (horizontal/vertical), alignment options hidden for single selection, multi-node bypass toggle - Part of the FixIt Burndown test coverage initiative (toolbox actions) ## Test plan - [ ] All new tests pass in CI - [ ] No regressions in existing selectionToolbox tests ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10968-test-expand-E2E-coverage-for-toolbox-actions-33c6d73d3650811286cefdd0eb4f5242) by [Unito](https://www.unito.io) --------- Co-authored-by: Alexander Brown <drjkl@comfy.org>
## Summary - Adds `selectionToolboxMoreActions.spec.ts` with E2E coverage for previously untested toolbox actions - Covers: pin/unpin, minimize/expand, adjust size, copy, duplicate, refresh button, align (top/left), distribute (horizontal/vertical), alignment options hidden for single selection, multi-node bypass toggle - Part of the FixIt Burndown test coverage initiative (toolbox actions) ## Test plan - [ ] All new tests pass in CI - [ ] No regressions in existing selectionToolbox tests ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-10968-test-expand-E2E-coverage-for-toolbox-actions-33c6d73d3650811286cefdd0eb4f5242) by [Unito](https://www.unito.io) --------- Co-authored-by: Alexander Brown <drjkl@comfy.org>
Summary
selectionToolboxMoreActions.spec.tswith E2E coverage for previously untested toolbox actionsTest plan
┆Issue is synchronized with this Notion page by Unito