Repository navigation
refactor: internalize nextFrame() into fixture/helper methods - #11166
Conversation
|
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 fixture-level screenshot helper, introduces/centralizes next-frame helpers and keyboard helpers, adds WorkflowHelper.loadGraphData, and removes many explicit post-action nextFrame waits across fixtures and tests while normalizing keyboard event dispatch to a unified page-level helper. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant Test as Test (spec)
participant Fixture as ComfyPage (fixture)
participant Page as Playwright Page
participant App as In-page App (window.app)
Test->>Fixture: call expectScreenshot(locator, name, options)
Fixture->>Page: await nextFrame() (requestAnimationFrame)
Fixture->>Page: capture locator.screenshot(options)
Page->>App: DOM/render stabilized for screenshot
Fixture->>Test: comfyExpect(locator).toHaveScreenshot(name, options) resolves
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 4 | ❌ 3❌ Failed checks (2 warnings, 1 inconclusive)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
🎭 Playwright: ✅ 1114 passed, 0 failed📊 Browser Reports
|
🎨 Storybook: ✅ Built — View Storybook |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #11166 +/- ##
========================================
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:
|
📦 Bundle: 5.16 MB gzip 🔴 +199 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
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-04-14T23:32:35.693Z",
"gitSha": "945ab14d71490388f1e67386fceb5758128305bd",
"branch": "drjkl/audit-nextframe",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2025.8819999999957,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.326000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 368.26899999999995,
"heapDeltaBytes": 19981504,
"heapUsedBytes": 63272356,
"domNodes": 16,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 16.016000000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2063.2229999999936,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.616999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 365.0059999999999,
"heapDeltaBytes": 20994676,
"heapUsedBytes": 65106056,
"domNodes": 20,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 23.153,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2020.4730000000382,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.712999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 337.20099999999996,
"heapDeltaBytes": 19987048,
"heapUsedBytes": 63200000,
"domNodes": 20,
"jsHeapTotalBytes": 23592960,
"scriptDurationMs": 14.573999999999998,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1997.569999999996,
"styleRecalcs": 81,
"styleRecalcDurationMs": 39.122,
"layouts": 12,
"layoutDurationMs": 3.236,
"taskDurationMs": 908.6739999999999,
"heapDeltaBytes": 16357292,
"heapUsedBytes": 58904668,
"domNodes": 67,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 118.905,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1987.5390000000266,
"styleRecalcs": 84,
"styleRecalcDurationMs": 40.993,
"layouts": 12,
"layoutDurationMs": 3.4419999999999997,
"taskDurationMs": 936.0100000000001,
"heapDeltaBytes": 16080668,
"heapUsedBytes": 58941828,
"domNodes": 67,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 121.475,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2031.44199999997,
"styleRecalcs": 83,
"styleRecalcDurationMs": 40.205000000000005,
"layouts": 12,
"layoutDurationMs": 3.892,
"taskDurationMs": 939.317,
"heapDeltaBytes": 16286916,
"heapUsedBytes": 59221532,
"domNodes": 65,
"jsHeapTotalBytes": 22544384,
"scriptDurationMs": 122.835,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1730.291999999963,
"styleRecalcs": 30,
"styleRecalcDurationMs": 15.815,
"layouts": 6,
"layoutDurationMs": 0.6050000000000001,
"taskDurationMs": 292.25,
"heapDeltaBytes": 15289700,
"heapUsedBytes": 66357444,
"domNodes": 78,
"jsHeapTotalBytes": 22020096,
"scriptDurationMs": 22.872000000000003,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1724.7410000000514,
"styleRecalcs": 31,
"styleRecalcDurationMs": 15.172,
"layouts": 6,
"layoutDurationMs": 0.6629999999999999,
"taskDurationMs": 286.65299999999996,
"heapDeltaBytes": 24842924,
"heapUsedBytes": 67829736,
"domNodes": 77,
"jsHeapTotalBytes": 20971520,
"scriptDurationMs": 22.524999999999995,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1739.4340000000739,
"styleRecalcs": 32,
"styleRecalcDurationMs": 15.877999999999997,
"layouts": 6,
"layoutDurationMs": 0.5839999999999999,
"taskDurationMs": 295.569,
"heapDeltaBytes": 24686044,
"heapUsedBytes": 67670900,
"domNodes": 80,
"jsHeapTotalBytes": 20709376,
"scriptDurationMs": 24.693,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 575.254000000001,
"styleRecalcs": 14,
"styleRecalcDurationMs": 9.898,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 362.4219999999999,
"heapDeltaBytes": -2188172,
"heapUsedBytes": 49426148,
"domNodes": 24,
"jsHeapTotalBytes": 16252928,
"scriptDurationMs": 66.36399999999999,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 578.6620000000084,
"styleRecalcs": 13,
"styleRecalcDurationMs": 9.361,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 338.11199999999997,
"heapDeltaBytes": 6521856,
"heapUsedBytes": 49440052,
"domNodes": 22,
"jsHeapTotalBytes": 13893632,
"scriptDurationMs": 63.410999999999994,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.669999999999998,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "dom-widget-clipping",
"durationMs": 562.2290000000021,
"styleRecalcs": 13,
"styleRecalcDurationMs": 7.745000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 324.648,
"heapDeltaBytes": 6398416,
"heapUsedBytes": 49421624,
"domNodes": 22,
"jsHeapTotalBytes": 12582912,
"scriptDurationMs": 57.931999999999995,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.669999999999998,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "large-graph-idle",
"durationMs": 2055.3130000000124,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.676,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 530.025,
"heapDeltaBytes": 4174340,
"heapUsedBytes": 54487308,
"domNodes": -261,
"jsHeapTotalBytes": 15917056,
"scriptDurationMs": 86.04899999999999,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2033.990000000017,
"styleRecalcs": 11,
"styleRecalcDurationMs": 8.722000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 531.4290000000001,
"heapDeltaBytes": 3985656,
"heapUsedBytes": 55432556,
"domNodes": -258,
"jsHeapTotalBytes": 15917056,
"scriptDurationMs": 86.95400000000001,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2028.897000000029,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.086,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 531.7650000000001,
"heapDeltaBytes": 4332216,
"heapUsedBytes": 55992196,
"domNodes": -257,
"jsHeapTotalBytes": 15654912,
"scriptDurationMs": 87.723,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2151.471000000015,
"styleRecalcs": 70,
"styleRecalcDurationMs": 17.311,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1050.5059999999999,
"heapDeltaBytes": 14501064,
"heapUsedBytes": 66843152,
"domNodes": -259,
"jsHeapTotalBytes": 19005440,
"scriptDurationMs": 377.46200000000005,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2126.308999999992,
"styleRecalcs": 69,
"styleRecalcDurationMs": 15.74,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1028.289,
"heapDeltaBytes": 19804376,
"heapUsedBytes": 73708348,
"domNodes": -261,
"jsHeapTotalBytes": 18743296,
"scriptDurationMs": 363.09200000000004,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2138.0649999999832,
"styleRecalcs": 69,
"styleRecalcDurationMs": 18.493,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1048.8880000000001,
"heapDeltaBytes": 17063236,
"heapUsedBytes": 69390932,
"domNodes": -261,
"jsHeapTotalBytes": 18219008,
"scriptDurationMs": 369.998,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-zoom",
"durationMs": 3181.59399999999,
"styleRecalcs": 66,
"styleRecalcDurationMs": 17.248999999999995,
"layouts": 60,
"layoutDurationMs": 8.171000000000001,
"taskDurationMs": 1285.984,
"heapDeltaBytes": 9621400,
"heapUsedBytes": 64568584,
"domNodes": -263,
"jsHeapTotalBytes": 16179200,
"scriptDurationMs": 476.65399999999994,
"eventListeners": -123,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3165.097000000003,
"styleRecalcs": 66,
"styleRecalcDurationMs": 16.985,
"layouts": 60,
"layoutDurationMs": 8.123999999999999,
"taskDurationMs": 1341.938,
"heapDeltaBytes": 7893880,
"heapUsedBytes": 62652660,
"domNodes": -263,
"jsHeapTotalBytes": 16965632,
"scriptDurationMs": 520.99,
"eventListeners": -123,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3143.226000000027,
"styleRecalcs": 65,
"styleRecalcDurationMs": 16.447999999999997,
"layouts": 60,
"layoutDurationMs": 7.974,
"taskDurationMs": 1289.009,
"heapDeltaBytes": 6261744,
"heapUsedBytes": 61991900,
"domNodes": -264,
"jsHeapTotalBytes": 17489920,
"scriptDurationMs": 474.819,
"eventListeners": -123,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2016.8509999999742,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.9719999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 524.791,
"heapDeltaBytes": 3816428,
"heapUsedBytes": 57304636,
"domNodes": -260,
"jsHeapTotalBytes": 16179200,
"scriptDurationMs": 82.222,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2021.7440000000124,
"styleRecalcs": 9,
"styleRecalcDurationMs": 7.188,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 519.78,
"heapDeltaBytes": 4389540,
"heapUsedBytes": 57556344,
"domNodes": -259,
"jsHeapTotalBytes": 16703488,
"scriptDurationMs": 85.26899999999999,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "minimap-idle",
"durationMs": 2057.9300000000558,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.005000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 531.568,
"heapDeltaBytes": 4260228,
"heapUsedBytes": 57835892,
"domNodes": -259,
"jsHeapTotalBytes": 14639104,
"scriptDurationMs": 85.28099999999999,
"eventListeners": -125,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 548.8689999999679,
"styleRecalcs": 47,
"styleRecalcDurationMs": 10.357,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 342.3280000000001,
"heapDeltaBytes": 6465288,
"heapUsedBytes": 49660768,
"domNodes": 20,
"jsHeapTotalBytes": 13369344,
"scriptDurationMs": 121.84400000000001,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 546.2589999999636,
"styleRecalcs": 48,
"styleRecalcDurationMs": 10.661,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 357.3949999999999,
"heapDeltaBytes": -2603196,
"heapUsedBytes": 49378052,
"domNodes": 21,
"jsHeapTotalBytes": 15728640,
"scriptDurationMs": 124.449,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 571.990000000028,
"styleRecalcs": 48,
"styleRecalcDurationMs": 11.378,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 348.691,
"heapDeltaBytes": 6436228,
"heapUsedBytes": 49675536,
"domNodes": 22,
"jsHeapTotalBytes": 13107200,
"scriptDurationMs": 124.421,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 1995.7030000000202,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.503999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 332.677,
"heapDeltaBytes": 19937472,
"heapUsedBytes": 63101456,
"domNodes": 20,
"jsHeapTotalBytes": 22544384,
"scriptDurationMs": 16.163999999999998,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2012.2240000000033,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.575000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 339.876,
"heapDeltaBytes": 19810116,
"heapUsedBytes": 63180600,
"domNodes": 20,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 18.990999999999993,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2022.0140000000129,
"styleRecalcs": 12,
"styleRecalcDurationMs": 9.347000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 340.248,
"heapDeltaBytes": 19873600,
"heapUsedBytes": 63105280,
"domNodes": 23,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 18.939000000000004,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1970.281,
"styleRecalcs": 84,
"styleRecalcDurationMs": 49.553999999999995,
"layouts": 16,
"layoutDurationMs": 4.824999999999999,
"taskDurationMs": 874.206,
"heapDeltaBytes": 11853524,
"heapUsedBytes": 55067468,
"domNodes": 73,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 93.926,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1975.8170000000064,
"styleRecalcs": 84,
"styleRecalcDurationMs": 42.571999999999996,
"layouts": 16,
"layoutDurationMs": 4.36,
"taskDurationMs": 869.63,
"heapDeltaBytes": 12290904,
"heapUsedBytes": 56716664,
"domNodes": 74,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 93.03200000000001,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1983.4730000000036,
"styleRecalcs": 84,
"styleRecalcDurationMs": 49.19299999999999,
"layouts": 16,
"layoutDurationMs": 4.405,
"taskDurationMs": 876.218,
"heapDeltaBytes": 12217592,
"heapUsedBytes": 56677744,
"domNodes": 73,
"jsHeapTotalBytes": 23592960,
"scriptDurationMs": 88.91099999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "viewport-pan-sweep",
"durationMs": 8201.929000000007,
"styleRecalcs": 251,
"styleRecalcDurationMs": 44.537000000000006,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3465.754,
"heapDeltaBytes": 26983408,
"heapUsedBytes": 78635632,
"domNodes": -258,
"jsHeapTotalBytes": 18481152,
"scriptDurationMs": 1134.089,
"eventListeners": -109,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8173.2440000000115,
"styleRecalcs": 251,
"styleRecalcDurationMs": 45.047,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3617.756,
"heapDeltaBytes": 23055228,
"heapUsedBytes": 74004720,
"domNodes": -255,
"jsHeapTotalBytes": 22937600,
"scriptDurationMs": 1229.1670000000001,
"eventListeners": -111,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8184.654000000023,
"styleRecalcs": 252,
"styleRecalcDurationMs": 46.305,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3496.824,
"heapDeltaBytes": 25124440,
"heapUsedBytes": 76231024,
"domNodes": -255,
"jsHeapTotalBytes": 19791872,
"scriptDurationMs": 1150.312,
"eventListeners": -107,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 12932.961000000034,
"styleRecalcs": 1,
"styleRecalcDurationMs": 21.913000000000014,
"layouts": 1,
"layoutDurationMs": 4.6689999999999925,
"taskDurationMs": 12912.047999999999,
"heapDeltaBytes": -32859896,
"heapUsedBytes": 161950868,
"domNodes": -8329,
"jsHeapTotalBytes": 37052416,
"scriptDurationMs": 594.314,
"eventListeners": -14694,
"totalBlockingTimeMs": 1068,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 12778.11700000001,
"styleRecalcs": 1,
"styleRecalcDurationMs": 20.08199999999999,
"layouts": 1,
"layoutDurationMs": 4.527000000000003,
"taskDurationMs": 12759.091000000002,
"heapDeltaBytes": -16877688,
"heapUsedBytes": 168667036,
"domNodes": -8331,
"jsHeapTotalBytes": 37183488,
"scriptDurationMs": 555.409,
"eventListeners": -14696,
"totalBlockingTimeMs": 1044,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-idle",
"durationMs": 12770.578999999998,
"styleRecalcs": 1,
"styleRecalcDurationMs": 18.728000000000023,
"layouts": 1,
"layoutDurationMs": 4.550999999999999,
"taskDurationMs": 12749.954,
"heapDeltaBytes": -26600792,
"heapUsedBytes": 168032432,
"domNodes": -8329,
"jsHeapTotalBytes": 26304512,
"scriptDurationMs": 601.888,
"eventListeners": -14696,
"totalBlockingTimeMs": 1069,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 15043.89900000001,
"styleRecalcs": 69,
"styleRecalcDurationMs": 15.183000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 15006.595000000001,
"heapDeltaBytes": -47961956,
"heapUsedBytes": 166864740,
"domNodes": -9848,
"jsHeapTotalBytes": 25518080,
"scriptDurationMs": 818.052,
"eventListeners": -23953,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 33.400000000001455
},
{
"name": "vue-large-graph-pan",
"durationMs": 14869.274000000076,
"styleRecalcs": 69,
"styleRecalcDurationMs": 15.182000000000029,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14849.447,
"heapDeltaBytes": -48515324,
"heapUsedBytes": 167247264,
"domNodes": -9850,
"jsHeapTotalBytes": 26304512,
"scriptDurationMs": 851.577,
"eventListeners": -23955,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 14735.553999999978,
"styleRecalcs": 65,
"styleRecalcDurationMs": 14.716999999999981,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14713.980999999998,
"heapDeltaBytes": -48955416,
"heapUsedBytes": 167918724,
"domNodes": -9850,
"jsHeapTotalBytes": 26828800,
"scriptDurationMs": 835.0949999999999,
"eventListeners": -23953,
"totalBlockingTimeMs": 4,
"frameDurationMs": 17.77333333333336,
"p95FrameDurationMs": 33.29999999999927
},
{
"name": "workflow-execution",
"durationMs": 461.67400000001635,
"styleRecalcs": 17,
"styleRecalcDurationMs": 23.098,
"layouts": 5,
"layoutDurationMs": 1.651,
"taskDurationMs": 129.346,
"heapDeltaBytes": 5353440,
"heapUsedBytes": 50411380,
"domNodes": 169,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 29.053999999999995,
"eventListeners": 71,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "workflow-execution",
"durationMs": 451.41000000000986,
"styleRecalcs": 15,
"styleRecalcDurationMs": 21.624,
"layouts": 5,
"layoutDurationMs": 1.5150000000000003,
"taskDurationMs": 116.446,
"heapDeltaBytes": 5006532,
"heapUsedBytes": 49855604,
"domNodes": 154,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 24.154000000000003,
"eventListeners": 71,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 472.02900000002046,
"styleRecalcs": 16,
"styleRecalcDurationMs": 23.334,
"layouts": 5,
"layoutDurationMs": 1.4300000000000002,
"taskDurationMs": 129.03900000000002,
"heapDeltaBytes": 5137764,
"heapUsedBytes": 49577124,
"domNodes": 156,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 33.408,
"eventListeners": 71,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
}
]
} |
setSetting() now calls nextFrame() internally, so callers no longer need to remember to add it. Removed 15 redundant nextFrame() calls across 7 spec/helper files. Phase 1 of nextFrame() internalization plan. Amp-Thread-ID: https://ampcode.com/threads/T-019d7b5d-2961-76f1-b4f3-cfd557b8dc0e Co-authored-by: Amp <amp@ampcode.com>
executeCommand() now calls nextFrame() internally. Removed 15 redundant nextFrame() calls across 7 spec/helper files, including the now-redundant call in AppModeHelper.toggleAppMode(). Phase 2 of nextFrame() internalization plan. Amp-Thread-ID: https://ampcode.com/threads/T-019d7b5d-2961-76f1-b4f3-cfd557b8dc0e Co-authored-by: Amp <amp@ampcode.com>
…ame() New helper wraps page.evaluate(loadGraphData) + nextFrame() for simple cases. Migrated SubgraphHelper.serializeAndReload() and groupNode.spec.ts. Raw calls with extra arguments (subgraphSlots, templateFitView, AppModeHelper) are left as-is since they need custom parameters. Phase 3 of nextFrame() internalization plan. Amp-Thread-ID: https://ampcode.com/threads/T-019d7b5d-2961-76f1-b4f3-cfd557b8dc0e Co-authored-by: Amp <amp@ampcode.com>
Removed redundant nextFrame() from copy() (click already does it),
convertToGroupNode() (fillPromptDialog already does it), resizeNode()
and dragTextEncodeNode2() (dragAndDrop already does it),
convertDefaultKSamplerToSubgraph() (convertToSubgraph already does it).
Also removed 6 spec-level nextFrame() calls after node.click('title').
Phase 4 of nextFrame() internalization plan.
Amp-Thread-ID: https://ampcode.com/threads/T-019d7b5d-2961-76f1-b4f3-cfd557b8dc0e
Co-authored-by: Amp <amp@ampcode.com>
…extFrame() New convenience methods that press a key and wait one frame. Converted 40 canvas.press(key) + nextFrame() and page.keyboard.press(key) + nextFrame() pairs across 13 spec files to use comfyPage.keyboard.press(). Phase 5 of nextFrame() internalization plan. Amp-Thread-ID: https://ampcode.com/threads/T-019d7b5d-2961-76f1-b4f3-cfd557b8dc0e Co-authored-by: Amp <amp@ampcode.com>
New helper combines nextFrame() + toHaveScreenshot() into a single call. Converted 45 nextFrame+screenshot pairs across 12 spec files. Removed unused comfyExpect import from rerouteNodeSize.spec.ts. Phase 6 of nextFrame() internalization plan. Amp-Thread-ID: https://ampcode.com/threads/T-019d7b5d-2961-76f1-b4f3-cfd557b8dc0e Co-authored-by: Amp <amp@ampcode.com>
e5ba2e5 to
7985306
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (2)
browser_tests/fixtures/helpers/KeyboardHelper.ts (1)
13-21: Unifynulltarget semantics betweenpress()andctrlSend().
press()currently treatsnullthe same asundefined(falls back to canvas), whilectrlSend()usesnullto fall back topage.keyboard. Aligning these avoids ambiguous caller behavior.Suggested adjustment
- async press(key: string, locator?: Locator | null): Promise<void> { - const target = locator ?? this.canvas + async press( + key: string, + locator: Locator | null = this.canvas + ): Promise<void> { + const target = locator ?? this.page.keyboard await target.press(key) await this.nextFrame() }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/fixtures/helpers/KeyboardHelper.ts` around lines 13 - 21, press() treats null like undefined (falls back to this.canvas) while ctrlSend() treats null as a signal to use this.page.keyboard; make press() mirror ctrlSend() by distinguishing null and undefined: if locator === undefined use this.canvas, if locator === null use this.page.keyboard, and otherwise use the provided Locator; update the implementation of press (and thus delete which calls press) so it branches on locator === undefined vs locator === null and uses this.canvas or this.page.keyboard accordingly to unify semantics with ctrlSend().browser_tests/tests/selectionRectangle.spec.ts (1)
20-22: Update stale inline comment to match the new helper call.The comment says “canvas press,” but the code now uses
comfyPage.keyboard.press(...).Suggested edit
- // Use canvas press for keyboard shortcuts (doesn't need click target) + // Use page-level keyboard helper for shortcuts (includes frame sync) await comfyPage.keyboard.press('Control+a')As per coding guidelines, "Write code that is expressive and self-documenting to minimize the need for comments; avoid redundant comments and clean them up as you go".
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/selectionRectangle.spec.ts` around lines 20 - 22, The inline comment "// Use canvas press for keyboard shortcuts (doesn't need click target)" is stale; update or remove it to reflect that the shortcut is invoked via comfyPage.keyboard.press('Control+a') instead of a "canvas press". Locate the call to comfyPage.keyboard.press in selectionRectangle.spec.ts and either change the comment to something like "Use keyboard.press for shortcuts (no click target needed)" or remove the redundant comment entirely so the code is self-explanatory.
🤖 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/fixtures/ComfyPage.ts`:
- Around line 398-405: The options type for expectScreenshot currently borrows
Locator['screenshot'] and manually adds a few assertion fields; instead use the
actual toHaveScreenshot assertion options so consumers get the full surface
(including stylePath and name). Replace the current options type with the
second-parameter type of comfyExpect(...).toHaveScreenshot (e.g.
Parameters<ReturnType<typeof comfyExpect>['toHaveScreenshot']>[1]) so
expectScreenshot(locator).toHaveScreenshot is accurately typed; update the
function signature for expectScreenshot accordingly.
---
Nitpick comments:
In `@browser_tests/fixtures/helpers/KeyboardHelper.ts`:
- Around line 13-21: press() treats null like undefined (falls back to
this.canvas) while ctrlSend() treats null as a signal to use this.page.keyboard;
make press() mirror ctrlSend() by distinguishing null and undefined: if locator
=== undefined use this.canvas, if locator === null use this.page.keyboard, and
otherwise use the provided Locator; update the implementation of press (and thus
delete which calls press) so it branches on locator === undefined vs locator ===
null and uses this.canvas or this.page.keyboard accordingly to unify semantics
with ctrlSend().
In `@browser_tests/tests/selectionRectangle.spec.ts`:
- Around line 20-22: The inline comment "// Use canvas press for keyboard
shortcuts (doesn't need click target)" is stale; update or remove it to reflect
that the shortcut is invoked via comfyPage.keyboard.press('Control+a') instead
of a "canvas press". Locate the call to comfyPage.keyboard.press in
selectionRectangle.spec.ts and either change the comment to something like "Use
keyboard.press for shortcuts (no click target needed)" or remove the redundant
comment entirely so the code is self-explanatory.
🪄 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: 64153a3d-bbe3-4cf5-92aa-5e0eb01c25db
📒 Files selected for processing (41)
browser_tests/fixtures/ComfyPage.tsbrowser_tests/fixtures/helpers/AppModeHelper.tsbrowser_tests/fixtures/helpers/CommandHelper.tsbrowser_tests/fixtures/helpers/KeyboardHelper.tsbrowser_tests/fixtures/helpers/NodeOperationsHelper.tsbrowser_tests/fixtures/helpers/SettingsHelper.tsbrowser_tests/fixtures/helpers/SubgraphHelper.tsbrowser_tests/fixtures/helpers/WorkflowHelper.tsbrowser_tests/fixtures/utils/litegraphUtils.tsbrowser_tests/tests/builderSaveFlow.spec.tsbrowser_tests/tests/canvasModeSelector.spec.tsbrowser_tests/tests/changeTracker.spec.tsbrowser_tests/tests/colorPalette.spec.tsbrowser_tests/tests/copyPaste.spec.tsbrowser_tests/tests/defaultKeybindings.spec.tsbrowser_tests/tests/graphCanvasMenu.spec.tsbrowser_tests/tests/groupNode.spec.tsbrowser_tests/tests/interaction.spec.tsbrowser_tests/tests/load3d/load3d.spec.tsbrowser_tests/tests/minimap.spec.tsbrowser_tests/tests/mobileBaseline.spec.tsbrowser_tests/tests/nodeContextMenuOverflow.spec.tsbrowser_tests/tests/nodeGhostPlacement.spec.tsbrowser_tests/tests/nodeSearchBox.spec.tsbrowser_tests/tests/rightClickMenu.spec.tsbrowser_tests/tests/selectionRectangle.spec.tsbrowser_tests/tests/selectionToolbox.spec.tsbrowser_tests/tests/selectionToolboxSubmenus.spec.tsbrowser_tests/tests/sidebar/sidebarSplitterWidth.spec.tsbrowser_tests/tests/subgraph/subgraphNavigation.spec.tsbrowser_tests/tests/subgraph/subgraphOperations.spec.tsbrowser_tests/tests/subgraph/subgraphPromotionDom.spec.tsbrowser_tests/tests/subgraph/subgraphSearch.spec.tsbrowser_tests/tests/subgraph/subgraphSerialization.spec.tsbrowser_tests/tests/subgraph/subgraphSlots.spec.tsbrowser_tests/tests/viewport.spec.tsbrowser_tests/tests/vueNodes/groups/groups.spec.tsbrowser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.tsbrowser_tests/tests/vueNodes/nodeStates/bypass.spec.tsbrowser_tests/tests/vueNodes/rerouteNodeSize.spec.tsbrowser_tests/tests/workflowPersistence.spec.ts
💤 Files with no reviewable changes (10)
- browser_tests/tests/nodeContextMenuOverflow.spec.ts
- browser_tests/fixtures/helpers/AppModeHelper.ts
- browser_tests/tests/sidebar/sidebarSplitterWidth.spec.ts
- browser_tests/fixtures/utils/litegraphUtils.ts
- browser_tests/tests/selectionToolboxSubmenus.spec.ts
- browser_tests/tests/copyPaste.spec.ts
- browser_tests/tests/workflowPersistence.spec.ts
- browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts
- browser_tests/tests/subgraph/subgraphSlots.spec.ts
- browser_tests/fixtures/helpers/NodeOperationsHelper.ts
| options?: Parameters<Locator['screenshot']>[0] & { | ||
| maxDiffPixelRatio?: number | ||
| maxDiffPixels?: number | ||
| threshold?: number | ||
| } | ||
| ): Promise<void> { | ||
| await this.nextFrame() | ||
| await comfyExpect(locator).toHaveScreenshot(name, options) |
There was a problem hiding this comment.
🧩 Analysis chain
🌐 Web query:
In Playwright, compare the TypeScript options accepted by Locator.screenshot() and expect(locator).toHaveScreenshot(). Are they identical, or does toHaveScreenshot expose assertion-only options such as stylePath/maxDiffPixels that Locator.screenshot() does not?
💡 Result:
The TypeScript options accepted by Locator.screenshot and expect(locator).toHaveScreenshot are not identical. expect(locator).toHaveScreenshot exposes assertion-only options such as maxDiffPixels and stylePath that Locator.screenshot does not accept. Locator.screenshot accepts ScreenshotOptions including: animations, caret, mask, maskColor, path, quality, scale, style, timeout, type. These control the screenshot capture process and return a Buffer. expect(locator).toHaveScreenshot accepts a superset including all the above capture options plus assertion-specific options like: maxDiffPixels (max differing pixels allowed), maxDiffPixelRatio, stylePath (custom stylesheet for comparison), threshold (color difference tolerance), name (snapshot name), and it performs automatic comparison against stored snapshots, with retry until stable. This design allows toHaveScreenshot to both capture (using screenshot options) and compare, while screenshot only captures.
Citations:
- 1: https://playwright.dev/docs/api/class-locator
- 2: https://playwright.dev/docs/test-snapshots
- 3: https://playwright.dev/docs/api/class-pageassertions
- 4: https://playwright.dev/docs/next/api/class-locatorassertions
- 5: https://playwright.dev/docs/api/class-locatorassertions
Use correct assertion type for expectScreenshot() options.
This helper wraps comfyExpect(locator).toHaveScreenshot(), but derives its options type from Locator.screenshot(). These are distinct APIs with different option surfaces:
Locator.screenshot()provides capture-only options (animations, caret, mask, maskColor, path, quality, scale, style, timeout, type)toHaveScreenshot()includes all capture options plus assertion-specific options (maxDiffPixels, maxDiffPixelRatio, stylePath, threshold, name)
The current type manually adds only three assertion options, omitting stylePath and name. Use the correct assertion type to reflect the actual wrapped API and expose the complete option surface.
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@browser_tests/fixtures/ComfyPage.ts` around lines 398 - 405, The options type
for expectScreenshot currently borrows Locator['screenshot'] and manually adds a
few assertion fields; instead use the actual toHaveScreenshot assertion options
so consumers get the full surface (including stylePath and name). Replace the
current options type with the second-parameter type of
comfyExpect(...).toHaveScreenshot (e.g. Parameters<ReturnType<typeof
comfyExpect>['toHaveScreenshot']>[1]) so
expectScreenshot(locator).toHaveScreenshot is accurately typed; update the
function signature for expectScreenshot accordingly.
- cloud-asset-default: poll for widget type before asserting value - settingsDialog: wait for combobox visible+enabled after search filter - enterBuilder: wait for workflow-tab popover to dismiss before clicking Amp-Thread-ID: https://ampcode.com/threads/T-019d882d-8403-7648-a9f3-06d7518d9772 Co-authored-by: Amp <amp@ampcode.com>
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/fixtures/helpers/AppModeHelper.ts`:
- Around line 99-102: Replace the silent .waitFor().catch() pattern on the
'.workflow-popover-fade' locator in AppModeHelper (the await
this.page.locator(...).waitFor(...).catch(() => {}) call) with the Playwright
assertion expect(await
this.page.locator('.workflow-popover-fade')).toBeHidden(), so the test fails
with a clear error when the popover never appears or stays visible and matches
the project's playbook (see interaction.spec usage).
🪄 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: 3e2bfbc5-2e7f-4268-9cb7-5be3f2f755c3
📒 Files selected for processing (3)
browser_tests/fixtures/helpers/AppModeHelper.tsbrowser_tests/tests/cloud-asset-default.spec.tsbrowser_tests/tests/dialogs/settingsDialog.spec.ts
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
- builderReorder:159 — increase timeout to 45s, add waitForActiveWorkflow after each tab switch to prevent page-closed errors - cloud-asset-default:44 — merge type+value polls into single atomic poll that waits for both widget mount and value resolution - settingsDialog:134 — wait for search filter to settle before interacting with combobox, increase toPass timeout to 10s Amp-Thread-ID: https://ampcode.com/threads/T-019d8853-20da-73b8-a960-27afeda8db24 Co-authored-by: Amp <amp@ampcode.com>
The .waitFor({ state: 'hidden', timeout: 5000 }).catch(() => {}) pattern
wastes 5s on the common path (no popover) and silently swallows real
failures. toBeHidden() passes immediately if absent, retries if visible,
and fails with a clear assertion message if stuck.
Amp-Thread-ID: https://ampcode.com/threads/T-019d8853-20da-73b8-a960-27afeda8db24
Co-authored-by: Amp <amp@ampcode.com>
toBeHidden() hard-fails when the popover stays visible, breaking the test. The .waitFor().catch() pattern is intentional — it's a best-effort wait that proceeds regardless, since the popover may or may not exist. Amp-Thread-ID: https://ampcode.com/threads/T-019d8853-20da-73b8-a960-27afeda8db24 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d8853-20da-73b8-a960-27afeda8db24 Co-authored-by: Amp <amp@ampcode.com> # Conflicts: # browser_tests/tests/vueNodes/interactions/links/linkInteraction.spec.ts
Assert node selection outline before pressing mute hotkey to prevent race where selected_nodes isn't populated yet. Amp-Thread-ID: https://ampcode.com/threads/T-019d88c6-399d-76a8-a9f0-ce4969914090 Co-authored-by: Amp <amp@ampcode.com>
5 helpers each had private nextFrame() reimplementations. Extract to timing.ts, delegate everywhere. Amp-Thread-ID: https://ampcode.com/threads/T-019d8e32-703e-76c7-b6d5-d5c2eadca4e0 Co-authored-by: Amp <amp@ampcode.com>
Replace Locator['screenshot'] capture-only type with the full LocatorAssertions.toHaveScreenshot options, exposing stylePath, omitBackground, and timeout that were previously missing. Amp-Thread-ID: https://ampcode.com/threads/T-019d8e46-f4e2-71ce-8983-786e207ab7cf Co-authored-by: Amp <amp@ampcode.com>
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
browser_tests/fixtures/ComfyPage.ts (1)
393-400:⚠️ Potential issue | 🟡 MinorUse
toHaveScreenshotassertion options type directly.Line 396 currently derives options from
Locator.screenshot()and manually adds a subset of assertion fields. That can miss validtoHaveScreenshot()options and drift as Playwright evolves.Suggested typing update
+type ScreenshotAssertOptions = + Parameters<ReturnType<typeof comfyExpect>['toHaveScreenshot']>[1] + async expectScreenshot( locator: Locator, name: string | string[], - options?: Parameters<Locator['screenshot']>[0] & { - maxDiffPixelRatio?: number - maxDiffPixels?: number - threshold?: number - } + options?: ScreenshotAssertOptions ): Promise<void> { await this.nextFrame() await comfyExpect(locator).toHaveScreenshot(name, options) }In Playwright Test, compare the TypeScript option types for Locator.screenshot() and expect(locator).toHaveScreenshot(). Which assertion-only options are present in toHaveScreenshot that are not in Locator.screenshot?🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/fixtures/ComfyPage.ts` around lines 393 - 400, The custom options type on expectScreenshot is brittle; replace it with Playwright Test's toHaveScreenshot assertion options type by importing the Expect type from '@playwright/test' and using Parameters<Expect['toHaveScreenshot']>[1] as the options type for the expectScreenshot(locator, name, options) signature so it matches the exact assertion-only fields (update the function declaration for expectScreenshot and remove the manual Locator['screenshot']-derived union).
🤖 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/interaction.spec.ts`:
- Around line 510-513: The test is routing the group-title confirmation through
KeyboardHelper.press(), which defaults to comfyPage.canvas and can move focus
off the title input; instead, send the Enter key directly to the group title
input (the input opened by Control+G) by using the input locator's
press('Enter') or by focusing that locator and calling
comfyPage.keyboard.press('Enter') so the Enter goes to the correct target rather
than via KeyboardHelper.press() which targets comfyPage.canvas.
---
Duplicate comments:
In `@browser_tests/fixtures/ComfyPage.ts`:
- Around line 393-400: The custom options type on expectScreenshot is brittle;
replace it with Playwright Test's toHaveScreenshot assertion options type by
importing the Expect type from '@playwright/test' and using
Parameters<Expect['toHaveScreenshot']>[1] as the options type for the
expectScreenshot(locator, name, options) signature so it matches the exact
assertion-only fields (update the function declaration for expectScreenshot and
remove the manual Locator['screenshot']-derived union).
🪄 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: 2862d387-6a94-40eb-9e41-f76676e2fc0b
📒 Files selected for processing (24)
browser_tests/fixtures/ComfyPage.tsbrowser_tests/fixtures/helpers/AppModeHelper.tsbrowser_tests/fixtures/helpers/CanvasHelper.tsbrowser_tests/fixtures/helpers/CommandHelper.tsbrowser_tests/fixtures/helpers/DragDropHelper.tsbrowser_tests/fixtures/helpers/KeyboardHelper.tsbrowser_tests/fixtures/helpers/SettingsHelper.tsbrowser_tests/fixtures/helpers/SubgraphHelper.tsbrowser_tests/fixtures/helpers/WorkflowHelper.tsbrowser_tests/fixtures/utils/timing.tsbrowser_tests/tests/builderReorder.spec.tsbrowser_tests/tests/defaultKeybindings.spec.tsbrowser_tests/tests/interaction.spec.tsbrowser_tests/tests/minimap.spec.tsbrowser_tests/tests/selectionRectangle.spec.tsbrowser_tests/tests/sidebar/sidebarSplitterWidth.spec.tsbrowser_tests/tests/subgraph/subgraphNavigation.spec.tsbrowser_tests/tests/subgraph/subgraphPromotionDom.spec.tsbrowser_tests/tests/subgraph/subgraphSearch.spec.tsbrowser_tests/tests/subgraph/subgraphSerialization.spec.tsbrowser_tests/tests/vueNodes/groups/groups.spec.tsbrowser_tests/tests/vueNodes/nodeStates/bypass.spec.tsbrowser_tests/tests/vueNodes/nodeStates/mute.spec.tsbrowser_tests/tests/vueNodes/rerouteNodeSize.spec.ts
💤 Files with no reviewable changes (1)
- browser_tests/tests/sidebar/sidebarSplitterWidth.spec.ts
✅ Files skipped from review due to trivial changes (1)
- browser_tests/tests/subgraph/subgraphPromotionDom.spec.ts
🚧 Files skipped from review as they are similar to previous changes (10)
- browser_tests/tests/subgraph/subgraphSerialization.spec.ts
- browser_tests/tests/defaultKeybindings.spec.ts
- browser_tests/tests/selectionRectangle.spec.ts
- browser_tests/tests/builderReorder.spec.ts
- browser_tests/tests/vueNodes/nodeStates/bypass.spec.ts
- browser_tests/tests/vueNodes/groups/groups.spec.ts
- browser_tests/tests/subgraph/subgraphNavigation.spec.ts
- browser_tests/tests/minimap.spec.ts
- browser_tests/fixtures/helpers/SubgraphHelper.ts
- browser_tests/fixtures/helpers/WorkflowHelper.ts
| await comfyPage.keyboard.press('Enter') | ||
| await expect(comfyPage.canvas).toHaveScreenshot( | ||
| 'group-selected-nodes.png' | ||
| ) |
There was a problem hiding this comment.
Don't route the group-title confirmation through KeyboardHelper.
Line 510 is confirming the editor opened by Control+G, but KeyboardHelper.press() defaults to comfyPage.canvas. That can move focus off the title input and send Enter to the wrong target, leaving the rename UI open.
💡 Proposed fix
- await comfyPage.keyboard.press('Enter')
- await expect(comfyPage.canvas).toHaveScreenshot(
- 'group-selected-nodes.png'
- )
+ await comfyPage.page.keyboard.press('Enter')
+ await comfyPage.expectScreenshot(
+ comfyPage.canvas,
+ 'group-selected-nodes.png'
+ )🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.
In `@browser_tests/tests/interaction.spec.ts` around lines 510 - 513, The test is
routing the group-title confirmation through KeyboardHelper.press(), which
defaults to comfyPage.canvas and can move focus off the title input; instead,
send the Enter key directly to the group title input (the input opened by
Control+G) by using the input locator's press('Enter') or by focusing that
locator and calling comfyPage.keyboard.press('Enter') so the Enter goes to the
correct target rather than via KeyboardHelper.press() which targets
comfyPage.canvas.
## Summary
Internalize `nextFrame()` calls into fixture/helper methods so spec
authors don't need to remember to call it after common operations.
`nextFrame()` waits for one `requestAnimationFrame` (~16ms) — an extra
call is always safe, making this a low-risk refactor.
## Changes
### Phase 1: `SettingsHelper.setSetting()`
`setSetting()` now calls `nextFrame()` internally. Removed 15 redundant
calls across 7 files.
### Phase 2: `CommandHelper.executeCommand()`
`executeCommand()` now calls `nextFrame()` internally. Removed 15
redundant calls across 7 files, including the now-redundant call in
`AppModeHelper.toggleAppMode()`.
### Phase 3: `WorkflowHelper.loadGraphData()`
New helper wraps `page.evaluate(loadGraphData)` + `nextFrame()`.
Migrated `SubgraphHelper.serializeAndReload()` and `groupNode.spec.ts`.
### Phase 4: `NodeReference` cleanup
Removed redundant `nextFrame()` from `copy()`, `convertToGroupNode()`,
`resizeNode()`, `dragTextEncodeNode2()`, and
`convertDefaultKSamplerToSubgraph()`. Removed 6 spec-level calls after
`node.click('title')`.
### Phase 5: `KeyboardHelper.press()` and `delete()`
New convenience methods that press a key and wait one frame. Converted
40 `canvas.press(key)` + `nextFrame()` pairs across 13 spec files.
### Phase 6: `ComfyPage.expectScreenshot()`
New helper combines `nextFrame()` + `toHaveScreenshot()`. Converted 45
pairs across 12 spec files.
## Total impact
- **~130 redundant `nextFrame()` calls eliminated** across ~35
spec/helper files
- **3 new helper methods** added (`loadGraphData`, `press`/`delete`,
`expectScreenshot`)
- **2 existing methods** enhanced (`setSetting`, `executeCommand`)
## What was NOT changed
- `performance.spec.ts` frame-counting loops (intentional)
- `ComfyMouse.ts` / `CanvasHelper.ts` (already internalized)
- `SubgraphHelper.packAllInteriorNodes()` (deliberate orchestration)
- Builder helpers (already internalized)
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-11166-refactor-internalize-nextFrame-into-fixture-helper-methods-33f6d73d3650817bb5f6fb46e396085e)
by [Unito](https://www.unito.io)
---------
Co-authored-by: Amp <amp@ampcode.com>
## Summary
Internalize `nextFrame()` calls into fixture/helper methods so spec
authors don't need to remember to call it after common operations.
`nextFrame()` waits for one `requestAnimationFrame` (~16ms) — an extra
call is always safe, making this a low-risk refactor.
## Changes
### Phase 1: `SettingsHelper.setSetting()`
`setSetting()` now calls `nextFrame()` internally. Removed 15 redundant
calls across 7 files.
### Phase 2: `CommandHelper.executeCommand()`
`executeCommand()` now calls `nextFrame()` internally. Removed 15
redundant calls across 7 files, including the now-redundant call in
`AppModeHelper.toggleAppMode()`.
### Phase 3: `WorkflowHelper.loadGraphData()`
New helper wraps `page.evaluate(loadGraphData)` + `nextFrame()`.
Migrated `SubgraphHelper.serializeAndReload()` and `groupNode.spec.ts`.
### Phase 4: `NodeReference` cleanup
Removed redundant `nextFrame()` from `copy()`, `convertToGroupNode()`,
`resizeNode()`, `dragTextEncodeNode2()`, and
`convertDefaultKSamplerToSubgraph()`. Removed 6 spec-level calls after
`node.click('title')`.
### Phase 5: `KeyboardHelper.press()` and `delete()`
New convenience methods that press a key and wait one frame. Converted
40 `canvas.press(key)` + `nextFrame()` pairs across 13 spec files.
### Phase 6: `ComfyPage.expectScreenshot()`
New helper combines `nextFrame()` + `toHaveScreenshot()`. Converted 45
pairs across 12 spec files.
## Total impact
- **~130 redundant `nextFrame()` calls eliminated** across ~35
spec/helper files
- **3 new helper methods** added (`loadGraphData`, `press`/`delete`,
`expectScreenshot`)
- **2 existing methods** enhanced (`setSetting`, `executeCommand`)
## What was NOT changed
- `performance.spec.ts` frame-counting loops (intentional)
- `ComfyMouse.ts` / `CanvasHelper.ts` (already internalized)
- `SubgraphHelper.packAllInteriorNodes()` (deliberate orchestration)
- Builder helpers (already internalized)
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-11166-refactor-internalize-nextFrame-into-fixture-helper-methods-33f6d73d3650817bb5f6fb46e396085e)
by [Unito](https://www.unito.io)
---------
Co-authored-by: Amp <amp@ampcode.com>
## Summary
Internalize `nextFrame()` calls into fixture/helper methods so spec
authors don't need to remember to call it after common operations.
`nextFrame()` waits for one `requestAnimationFrame` (~16ms) — an extra
call is always safe, making this a low-risk refactor.
## Changes
### Phase 1: `SettingsHelper.setSetting()`
`setSetting()` now calls `nextFrame()` internally. Removed 15 redundant
calls across 7 files.
### Phase 2: `CommandHelper.executeCommand()`
`executeCommand()` now calls `nextFrame()` internally. Removed 15
redundant calls across 7 files, including the now-redundant call in
`AppModeHelper.toggleAppMode()`.
### Phase 3: `WorkflowHelper.loadGraphData()`
New helper wraps `page.evaluate(loadGraphData)` + `nextFrame()`.
Migrated `SubgraphHelper.serializeAndReload()` and `groupNode.spec.ts`.
### Phase 4: `NodeReference` cleanup
Removed redundant `nextFrame()` from `copy()`, `convertToGroupNode()`,
`resizeNode()`, `dragTextEncodeNode2()`, and
`convertDefaultKSamplerToSubgraph()`. Removed 6 spec-level calls after
`node.click('title')`.
### Phase 5: `KeyboardHelper.press()` and `delete()`
New convenience methods that press a key and wait one frame. Converted
40 `canvas.press(key)` + `nextFrame()` pairs across 13 spec files.
### Phase 6: `ComfyPage.expectScreenshot()`
New helper combines `nextFrame()` + `toHaveScreenshot()`. Converted 45
pairs across 12 spec files.
## Total impact
- **~130 redundant `nextFrame()` calls eliminated** across ~35
spec/helper files
- **3 new helper methods** added (`loadGraphData`, `press`/`delete`,
`expectScreenshot`)
- **2 existing methods** enhanced (`setSetting`, `executeCommand`)
## What was NOT changed
- `performance.spec.ts` frame-counting loops (intentional)
- `ComfyMouse.ts` / `CanvasHelper.ts` (already internalized)
- `SubgraphHelper.packAllInteriorNodes()` (deliberate orchestration)
- Builder helpers (already internalized)
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-11166-refactor-internalize-nextFrame-into-fixture-helper-methods-33f6d73d3650817bb5f6fb46e396085e)
by [Unito](https://www.unito.io)
---------
Co-authored-by: Amp <amp@ampcode.com>
Summary
Internalize
nextFrame()calls into fixture/helper methods so spec authors don't need to remember to call it after common operations.nextFrame()waits for onerequestAnimationFrame(~16ms) — an extra call is always safe, making this a low-risk refactor.Changes
Phase 1:
SettingsHelper.setSetting()setSetting()now callsnextFrame()internally. Removed 15 redundant calls across 7 files.Phase 2:
CommandHelper.executeCommand()executeCommand()now callsnextFrame()internally. Removed 15 redundant calls across 7 files, including the now-redundant call inAppModeHelper.toggleAppMode().Phase 3:
WorkflowHelper.loadGraphData()New helper wraps
page.evaluate(loadGraphData)+nextFrame(). MigratedSubgraphHelper.serializeAndReload()andgroupNode.spec.ts.Phase 4:
NodeReferencecleanupRemoved redundant
nextFrame()fromcopy(),convertToGroupNode(),resizeNode(),dragTextEncodeNode2(), andconvertDefaultKSamplerToSubgraph(). Removed 6 spec-level calls afternode.click('title').Phase 5:
KeyboardHelper.press()anddelete()New convenience methods that press a key and wait one frame. Converted 40
canvas.press(key)+nextFrame()pairs across 13 spec files.Phase 6:
ComfyPage.expectScreenshot()New helper combines
nextFrame()+toHaveScreenshot(). Converted 45 pairs across 12 spec files.Total impact
nextFrame()calls eliminated across ~35 spec/helper filesloadGraphData,press/delete,expectScreenshot)setSetting,executeCommand)What was NOT changed
performance.spec.tsframe-counting loops (intentional)ComfyMouse.ts/CanvasHelper.ts(already internalized)SubgraphHelper.packAllInteriorNodes()(deliberate orchestration)┆Issue is synchronized with this Notion page by Unito