Repository navigation
feat: add eslint-plugin-playwright via oxlint JS plugins - #11136
Conversation
- Remove ~120 redundant timeout overrides from auto-retrying assertions (toBeVisible, toBeHidden, toHaveCount, toBeEnabled, toHaveAttribute, toContainText, expect.poll) where 5000ms is already the Playwright default - Remove sub-5s timeouts (1s, 2s, 3s) from assertions that were needlessly tighter than the default, encouraging flaky failures - Raise absurdly short timeouts in customMatchers.ts (250ms toPass -> 5000ms, 256ms poll default -> removed to use 5000ms default) - Preserve timeouts on .toPass() (defaults to 0), .waitFor(), .waitForRequest(), waitForFunction(), intentionally-short assertion timeouts inside retry loops, and conditional .isVisible()/.catch() checks Amp-Thread-ID: https://ampcode.com/threads/T-019d7558-e8be-7099-b026-367fa10d97ca Co-authored-by: Amp <amp@ampcode.com>
…d cloud-asset-default Amp-Thread-ID: https://ampcode.com/threads/T-019d7686-b4d9-700e-b24d-9e1b716dca1a Co-authored-by: Amp <amp@ampcode.com>
The collapse() method toggles flags.collapsed, which is unreliable when DOM widget overlays interfere. Set flags.collapsed = false directly to deterministically expand the node. Amp-Thread-ID: https://ampcode.com/threads/T-019d78aa-fa43-711e-98b1-4a438120851d Co-authored-by: Amp <amp@ampcode.com>
Two rapid clicks at the same canvas position within 300ms are treated as a double-click by CanvasPointer, firing onDoubleClick instead of onClick (which toggles collapse). Poll until the double-click window has expired before the second click. Amp-Thread-ID: https://ampcode.com/threads/T-019d78aa-fa43-711e-98b1-4a438120851d Co-authored-by: Amp <amp@ampcode.com>
Add eslint-plugin-playwright as an oxlint JS plugin scoped to browser_tests/ via override. Enables 20 rules (18 recommended + 2 extras) at error severity, enforcing Playwright best practices at lint time. - Install eslint-plugin-playwright, configure in .oxlintrc.json jsPlugins - Add assertFunctionNames/Patterns config for expect-expect - Replace deprecated page methods with locator equivalents - Replace waitForSelector with locator.waitFor - Add timeout to all .toPass() calls - Fix broken prefer-native-locators auto-fix on compound selectors - Update lint scripts to target browser_tests/ - no-force-option set to off (dedicated triage PR needed) Amp-Thread-ID: https://ampcode.com/threads/T-019d792e-231e-735a-aa13-91f4404fd726 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d793f-68d8-73d9-b45b-023fb59bdb44 Co-authored-by: Amp <amp@ampcode.com> # Conflicts: # browser_tests/fixtures/components/SidebarTab.ts # browser_tests/fixtures/helpers/AppModeHelper.ts # browser_tests/fixtures/utils/vueNodeFixtures.ts # browser_tests/tests/linearMode.spec.ts # browser_tests/tests/nodeContextMenuOverflow.spec.ts # browser_tests/tests/selectionToolboxSubmenus.spec.ts # browser_tests/tests/templates.spec.ts # browser_tests/tests/topbar/workflowTabs.spec.ts
🎨 Storybook: ✅ Built — View Storybook |
🎭 Playwright: ✅ 1045 passed, 0 failed · 1 flaky📊 Browser Reports
|
|
No dependency changes detected. Learn more about Socket for GitHub. 👍 No dependency changes detected in pull request |
📦 Bundle: 5.13 MB gzip 🟢 -120 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.21 MB (baseline 1.21 MB) • ⚪ 0 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 — 2.98 MB (baseline 2.98 MB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 13 added / 13 removed / 4 unchanged Utilities & Hooks — 339 kB (baseline 339 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 13 added / 13 removed / 14 unchanged Vendor & Third-Party — 9.8 MB (baseline 9.8 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 8.55 MB (baseline 8.55 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-11T01:32:34.314Z",
"gitSha": "59e6d002f41be41e7ec157a17bebc5cb99e03a4e",
"branch": "drjkl/playwright-linting",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2021.8619999999987,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.796999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 469.854,
"heapDeltaBytes": 21034496,
"heapUsedBytes": 64884932,
"domNodes": 16,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 34.55,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-idle",
"durationMs": 2044.4610000000125,
"styleRecalcs": 11,
"styleRecalcDurationMs": 12.171000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 480.96000000000004,
"heapDeltaBytes": 21024872,
"heapUsedBytes": 63507696,
"domNodes": 22,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 34.276,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2020.5439999999726,
"styleRecalcs": 11,
"styleRecalcDurationMs": 11.588,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 442.87200000000007,
"heapDeltaBytes": 20368076,
"heapUsedBytes": 63181412,
"domNodes": 22,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 31.976999999999997,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2070.06800000002,
"styleRecalcs": 84,
"styleRecalcDurationMs": 54.056999999999995,
"layouts": 12,
"layoutDurationMs": 3.8120000000000003,
"taskDurationMs": 1096.387,
"heapDeltaBytes": 16731980,
"heapUsedBytes": 59278624,
"domNodes": 72,
"jsHeapTotalBytes": 23330816,
"scriptDurationMs": 149.955,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1777.30600000001,
"styleRecalcs": 74,
"styleRecalcDurationMs": 38.368,
"layouts": 12,
"layoutDurationMs": 3.555,
"taskDurationMs": 821.322,
"heapDeltaBytes": 16689372,
"heapUsedBytes": 59453164,
"domNodes": 57,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 145.148,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 2016.8199999999388,
"styleRecalcs": 84,
"styleRecalcDurationMs": 47.271,
"layouts": 12,
"layoutDurationMs": 3.741,
"taskDurationMs": 1013.682,
"heapDeltaBytes": 15898656,
"heapUsedBytes": 58885864,
"domNodes": 67,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 138.224,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1740.4999999999973,
"styleRecalcs": 31,
"styleRecalcDurationMs": 20.596,
"layouts": 6,
"layoutDurationMs": 0.7769999999999999,
"taskDurationMs": 394.87200000000007,
"heapDeltaBytes": 24617312,
"heapUsedBytes": 67303112,
"domNodes": 79,
"jsHeapTotalBytes": 20709376,
"scriptDurationMs": 35.791000000000004,
"eventListeners": 21,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1747.0329999999876,
"styleRecalcs": 33,
"styleRecalcDurationMs": 20.107,
"layouts": 6,
"layoutDurationMs": 0.7670000000000001,
"taskDurationMs": 330.906,
"heapDeltaBytes": 24878792,
"heapUsedBytes": 67481928,
"domNodes": 81,
"jsHeapTotalBytes": 20185088,
"scriptDurationMs": 28.674000000000007,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1749.8729999999796,
"styleRecalcs": 32,
"styleRecalcDurationMs": 19.391999999999996,
"layouts": 6,
"layoutDurationMs": 0.6529999999999999,
"taskDurationMs": 387.0899999999999,
"heapDeltaBytes": 15725628,
"heapUsedBytes": 67142008,
"domNodes": 78,
"jsHeapTotalBytes": 23330816,
"scriptDurationMs": 36.37799999999999,
"eventListeners": 21,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "dom-widget-clipping",
"durationMs": 716.5270000000135,
"styleRecalcs": 10,
"styleRecalcDurationMs": 12.901,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 436.979,
"heapDeltaBytes": 6215988,
"heapUsedBytes": 49404956,
"domNodes": 16,
"jsHeapTotalBytes": 12845056,
"scriptDurationMs": 75.36999999999999,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 590.7799999999952,
"styleRecalcs": 13,
"styleRecalcDurationMs": 13.780999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 390.93699999999995,
"heapDeltaBytes": 6540976,
"heapUsedBytes": 50395208,
"domNodes": 22,
"jsHeapTotalBytes": 12845056,
"scriptDurationMs": 82.49900000000001,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "dom-widget-clipping",
"durationMs": 603.1249999999773,
"styleRecalcs": 13,
"styleRecalcDurationMs": 10.122999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 377.239,
"heapDeltaBytes": 6561608,
"heapUsedBytes": 49091312,
"domNodes": 22,
"jsHeapTotalBytes": 13631488,
"scriptDurationMs": 70.54100000000001,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "large-graph-idle",
"durationMs": 2069.1929999999843,
"styleRecalcs": 11,
"styleRecalcDurationMs": 13.491,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 755.557,
"heapDeltaBytes": 4985436,
"heapUsedBytes": 55696224,
"domNodes": -257,
"jsHeapTotalBytes": 16289792,
"scriptDurationMs": 129.80700000000002,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2055.363,
"styleRecalcs": 10,
"styleRecalcDurationMs": 11.710999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 709.713,
"heapDeltaBytes": 4870768,
"heapUsedBytes": 55691140,
"domNodes": -259,
"jsHeapTotalBytes": 16707584,
"scriptDurationMs": 125.751,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-idle",
"durationMs": 2023.5549999999876,
"styleRecalcs": 9,
"styleRecalcDurationMs": 10.091,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 621.0039999999999,
"heapDeltaBytes": 4013000,
"heapUsedBytes": 55355564,
"domNodes": -259,
"jsHeapTotalBytes": 15921152,
"scriptDurationMs": 114.24,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2204.7979999999825,
"styleRecalcs": 69,
"styleRecalcDurationMs": 18.908,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1285.372,
"heapDeltaBytes": 20430392,
"heapUsedBytes": 74159568,
"domNodes": -263,
"jsHeapTotalBytes": 18747392,
"scriptDurationMs": 468.974,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2161.5189999999984,
"styleRecalcs": 69,
"styleRecalcDurationMs": 16.357999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1234.666,
"heapDeltaBytes": 18644312,
"heapUsedBytes": 72141036,
"domNodes": -263,
"jsHeapTotalBytes": 17960960,
"scriptDurationMs": 454.163,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2133.7439999999788,
"styleRecalcs": 70,
"styleRecalcDurationMs": 18.159000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1151.8500000000001,
"heapDeltaBytes": 16457284,
"heapUsedBytes": 69143136,
"domNodes": -258,
"jsHeapTotalBytes": 18223104,
"scriptDurationMs": 415.488,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3216.4999999999964,
"styleRecalcs": 66,
"styleRecalcDurationMs": 18.522999999999996,
"layouts": 60,
"layoutDurationMs": 7.899,
"taskDurationMs": 1507.0829999999999,
"heapDeltaBytes": 9648584,
"heapUsedBytes": 64628956,
"domNodes": -268,
"jsHeapTotalBytes": 15396864,
"scriptDurationMs": 546.0820000000001,
"eventListeners": -123,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3199.275,
"styleRecalcs": 66,
"styleRecalcDurationMs": 17.697000000000003,
"layouts": 60,
"layoutDurationMs": 7.306,
"taskDurationMs": 1353.022,
"heapDeltaBytes": 1293004,
"heapUsedBytes": 56376188,
"domNodes": -264,
"jsHeapTotalBytes": 18542592,
"scriptDurationMs": 495.472,
"eventListeners": -123,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3193.5529999999517,
"styleRecalcs": 66,
"styleRecalcDurationMs": 17.133,
"layouts": 60,
"layoutDurationMs": 7.755000000000001,
"taskDurationMs": 1419.402,
"heapDeltaBytes": 7203992,
"heapUsedBytes": 61698128,
"domNodes": -265,
"jsHeapTotalBytes": 16707584,
"scriptDurationMs": 521.4720000000001,
"eventListeners": -123,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2044.224999999983,
"styleRecalcs": 8,
"styleRecalcDurationMs": 9.872000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 680.762,
"heapDeltaBytes": 4346168,
"heapUsedBytes": 56671632,
"domNodes": -262,
"jsHeapTotalBytes": 16445440,
"scriptDurationMs": 123.05699999999999,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2018.4679999999844,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.443,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 574.2989999999999,
"heapDeltaBytes": 3871556,
"heapUsedBytes": 56548792,
"domNodes": -260,
"jsHeapTotalBytes": 16183296,
"scriptDurationMs": 105.348,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "minimap-idle",
"durationMs": 2071.67800000002,
"styleRecalcs": 10,
"styleRecalcDurationMs": 11.087999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 717.9309999999999,
"heapDeltaBytes": 3325248,
"heapUsedBytes": 57184588,
"domNodes": -260,
"jsHeapTotalBytes": 15921152,
"scriptDurationMs": 120.32300000000001,
"eventListeners": -127,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 595.1559999999745,
"styleRecalcs": 48,
"styleRecalcDurationMs": 13.997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 406.646,
"heapDeltaBytes": 6857820,
"heapUsedBytes": 49712740,
"domNodes": 22,
"jsHeapTotalBytes": 13107200,
"scriptDurationMs": 138.304,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 575.2080000000319,
"styleRecalcs": 48,
"styleRecalcDurationMs": 12.586999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 354.98300000000006,
"heapDeltaBytes": 6142868,
"heapUsedBytes": 49324496,
"domNodes": 22,
"jsHeapTotalBytes": 13631488,
"scriptDurationMs": 121.88499999999999,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 618.1060000000116,
"styleRecalcs": 49,
"styleRecalcDurationMs": 13.876,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 389.678,
"heapDeltaBytes": 8355284,
"heapUsedBytes": 57788652,
"domNodes": 23,
"jsHeapTotalBytes": 13893632,
"scriptDurationMs": 127.52200000000002,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "subgraph-idle",
"durationMs": 2025.478000000021,
"styleRecalcs": 11,
"styleRecalcDurationMs": 11.703,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 494.646,
"heapDeltaBytes": 11043908,
"heapUsedBytes": 63055176,
"domNodes": 23,
"jsHeapTotalBytes": 26214400,
"scriptDurationMs": 30.756,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2011.4219999999818,
"styleRecalcs": 10,
"styleRecalcDurationMs": 11.507,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 402.50700000000006,
"heapDeltaBytes": 19952164,
"heapUsedBytes": 63038432,
"domNodes": 20,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 24.836000000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-idle",
"durationMs": 2015.2699999999868,
"styleRecalcs": 10,
"styleRecalcDurationMs": 10.248999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 412.296,
"heapDeltaBytes": 19896620,
"heapUsedBytes": 63088520,
"domNodes": 20,
"jsHeapTotalBytes": 22282240,
"scriptDurationMs": 21.180999999999997,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 2021.9640000000254,
"styleRecalcs": 87,
"styleRecalcDurationMs": 51.647,
"layouts": 16,
"layoutDurationMs": 4.927,
"taskDurationMs": 1024.187,
"heapDeltaBytes": 11895976,
"heapUsedBytes": 54676092,
"domNodes": 73,
"jsHeapTotalBytes": 23330816,
"scriptDurationMs": 120.153,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1977.218999999991,
"styleRecalcs": 84,
"styleRecalcDurationMs": 48.559,
"layouts": 16,
"layoutDurationMs": 4.986,
"taskDurationMs": 930.9540000000001,
"heapDeltaBytes": 11854036,
"heapUsedBytes": 55006788,
"domNodes": 72,
"jsHeapTotalBytes": 22806528,
"scriptDurationMs": 107.44700000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1988.2230000000618,
"styleRecalcs": 88,
"styleRecalcDurationMs": 51.83299999999999,
"layouts": 16,
"layoutDurationMs": 4.461,
"taskDurationMs": 955.401,
"heapDeltaBytes": 11867712,
"heapUsedBytes": 55012328,
"domNodes": 74,
"jsHeapTotalBytes": 23068672,
"scriptDurationMs": 109.48799999999999,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "viewport-pan-sweep",
"durationMs": 8230.752999999993,
"styleRecalcs": 251,
"styleRecalcDurationMs": 47.59799999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4262.058,
"heapDeltaBytes": 24955356,
"heapUsedBytes": 75739412,
"domNodes": -257,
"jsHeapTotalBytes": 19533824,
"scriptDurationMs": 1409.552,
"eventListeners": -111,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8181.027000000029,
"styleRecalcs": 250,
"styleRecalcDurationMs": 43.37,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3739.037,
"heapDeltaBytes": 24617560,
"heapUsedBytes": 75927120,
"domNodes": -259,
"jsHeapTotalBytes": 20320256,
"scriptDurationMs": 1282.322,
"eventListeners": -111,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8216.790000000059,
"styleRecalcs": 250,
"styleRecalcDurationMs": 45.53800000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4143.148,
"heapDeltaBytes": 25439488,
"heapUsedBytes": 76690560,
"domNodes": -260,
"jsHeapTotalBytes": 19271680,
"scriptDurationMs": 1362.7699999999998,
"eventListeners": -111,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 14196.798999999999,
"styleRecalcs": 3,
"styleRecalcDurationMs": 29.477000000000004,
"layouts": 2,
"layoutDurationMs": 10.192999999999994,
"taskDurationMs": 14171.498,
"heapDeltaBytes": 5217028,
"heapUsedBytes": 157996528,
"domNodes": -4994,
"jsHeapTotalBytes": 44916736,
"scriptDurationMs": 664.3639999999999,
"eventListeners": 3526,
"totalBlockingTimeMs": 935,
"frameDurationMs": 17.780000000000047,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 13508.165999999961,
"styleRecalcs": 2,
"styleRecalcDurationMs": 28.362,
"layouts": 2,
"layoutDurationMs": 10.140999999999996,
"taskDurationMs": 13486.875000000002,
"heapDeltaBytes": 1829340,
"heapUsedBytes": 166263980,
"domNodes": -4997,
"jsHeapTotalBytes": 55140352,
"scriptDurationMs": 618.985,
"eventListeners": 3532,
"totalBlockingTimeMs": 900,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 14255.764999999996,
"styleRecalcs": 4,
"styleRecalcDurationMs": 38.616000000000014,
"layouts": 2,
"layoutDurationMs": 10.247000000000007,
"taskDurationMs": 14231.383000000002,
"heapDeltaBytes": 15000660,
"heapUsedBytes": 166800732,
"domNodes": -4992,
"jsHeapTotalBytes": 54878208,
"scriptDurationMs": 687.163,
"eventListeners": 3536,
"totalBlockingTimeMs": 967,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 14947.398000000021,
"styleRecalcs": 69,
"styleRecalcDurationMs": 15.736000000000027,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14919.912,
"heapDeltaBytes": -19005252,
"heapUsedBytes": 173265048,
"domNodes": -8333,
"jsHeapTotalBytes": 27004928,
"scriptDurationMs": 922.664,
"eventListeners": -16458,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.773333333333238,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 14275.036999999997,
"styleRecalcs": 66,
"styleRecalcDurationMs": 14.456000000000024,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14252.943,
"heapDeltaBytes": -26409268,
"heapUsedBytes": 173104472,
"domNodes": -8333,
"jsHeapTotalBytes": 24383488,
"scriptDurationMs": 893.6500000000001,
"eventListeners": -16460,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 33.29999999999927
},
{
"name": "vue-large-graph-pan",
"durationMs": 14873.40400000005,
"styleRecalcs": 71,
"styleRecalcDurationMs": 16.19900000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14847.373000000001,
"heapDeltaBytes": -21632236,
"heapUsedBytes": 161218528,
"domNodes": -8333,
"jsHeapTotalBytes": 21323776,
"scriptDurationMs": 885.7860000000001,
"eventListeners": -16459,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666642,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 479.3480000000159,
"styleRecalcs": 21,
"styleRecalcDurationMs": 24.532999999999994,
"layouts": 5,
"layoutDurationMs": 1.693,
"taskDurationMs": 132.933,
"heapDeltaBytes": 4646432,
"heapUsedBytes": 49454864,
"domNodes": 184,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 24.597,
"eventListeners": 71,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999727
},
{
"name": "workflow-execution",
"durationMs": 447.4359999999251,
"styleRecalcs": 16,
"styleRecalcDurationMs": 23.342000000000002,
"layouts": 5,
"layoutDurationMs": 1.437,
"taskDurationMs": 126.06699999999998,
"heapDeltaBytes": 4464372,
"heapUsedBytes": 48788120,
"domNodes": 154,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 27.238,
"eventListeners": 71,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "workflow-execution",
"durationMs": 446.1909999999989,
"styleRecalcs": 16,
"styleRecalcDurationMs": 22.418999999999997,
"layouts": 5,
"layoutDurationMs": 1.382,
"taskDurationMs": 126.77699999999997,
"heapDeltaBytes": 4491164,
"heapUsedBytes": 48481908,
"domNodes": 156,
"jsHeapTotalBytes": 262144,
"scriptDurationMs": 31.304000000000006,
"eventListeners": 71,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
}
]
} |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #11136 +/- ##
========================================
Coverage 43.31% 43.31%
========================================
Files 1344 1344
Lines 68475 68475
Branches 18056 18918 +862
========================================
Hits 29661 29661
Misses 38224 38224
Partials 590 590 🚀 New features to boost your workflow:
|
CI JSON validation uses jq which requires strict JSON. The // comments on no-force-option broke the parse. Amp-Thread-ID: https://ampcode.com/threads/T-019d795b-2ebb-748d-a7a1-3e7fb7e84b1b Co-authored-by: Amp <amp@ampcode.com>
waitForSelector tolerates multiple matches but locator().waitFor() enforces strict single-element matching. The default workflow has 7 nodes, so the bare locator always fails. Amp-Thread-ID: https://ampcode.com/threads/T-019d797f-578f-7399-bc07-e278fa246f3f Co-authored-by: Amp <amp@ampcode.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (1)
✅ Files skipped from review due to trivial changes (1)
📝 WalkthroughWalkthroughAdds Playwright ESLint rules for browser_tests, updates lint scripts and workspace catalog, migrates many Playwright tests/fixtures from page/selector APIs to locator/semantic APIs, standardizes negated visibility assertions to Changes
Sequence Diagram(s)Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Suggested reviewers
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 docstrings
🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
Actionable comments posted: 1
🧹 Nitpick comments (5)
browser_tests/fixtures/components/SettingDialog.ts (1)
55-55: Cache the about panel locator instead of rebuilding it in-method.This works, but in
fixtures/componentswe should keep locators as constructor-initialized properties and reuse them.As per coding guidelines: "Define UI element locators in page objects as `public readonly` properties assigned in the constructor, not as getter methods" and "Reuse cached locator properties in methods rather than rebuilding locators from scratch".♻️ Proposed refactor
export class SettingDialog extends BaseDialog { public readonly searchBox: Locator public readonly categories: Locator public readonly contentArea: Locator + public readonly aboutContainer: Locator @@ this.searchBox = this.root.getByPlaceholder(/Search/) this.categories = this.root.locator('nav').getByRole('button') this.contentArea = this.root.getByRole('main') + this.aboutContainer = this.page.locator('.about-container') @@ - await this.page.locator('.about-container').waitFor() + await this.aboutContainer.waitFor() } }🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/fixtures/components/SettingDialog.ts` at line 55, The test rebuilds the '.about-container' locator inline rather than reusing a cached locator; add a public readonly locator property (e.g., aboutContainer) initialized in the SettingDialog constructor and replace the inline await this.page.locator('.about-container').waitFor() call with await this.aboutContainer.waitFor(), and update any other methods in SettingDialog that reference the same selector to reuse the cached aboutContainer locator.browser_tests/tests/selectionToolboxActions.spec.ts (1)
203-209: Reuse the existingframeButtonlocatorYou already resolve and assert
frameButton; clicking it directly avoids re-query duplication.🧹 Minimal cleanup
- await comfyPage.page - .getByRole('button', { name: /Frame Nodes/i }) - .click({ force: true }) + await frameButton.click({ force: true })🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/selectionToolboxActions.spec.ts` around lines 203 - 209, You resolved and asserted the locator in frameButton but then re-queried the same locator; replace the second comfyPage.page.getByRole(...) call with frameButton.click({ force: true }) to reuse the existing locator (frameButton) and remove the duplicate query to avoid unnecessary re-querying and keep the test DRY.browser_tests/tests/rightClickMenu.spec.ts (1)
138-138: Prefer the context-menu helper over repeated raw menu selectorsThese repeated
'.litemenu-entry:has-text(...)'locators duplicate selector logic and are more brittle than the existing helper abstraction already used in this file.♻️ Suggested refactor
- await comfyPage.page.locator('.litemenu-entry:has-text("Pin")').click() + await comfyPage.contextMenu.clickMenuItem('Pin') ... - await comfyPage.page.locator('.litemenu-entry:has-text("Unpin")').click() + await comfyPage.contextMenu.clickMenuItem('Unpin')Also applies to: 156-156, 176-176, 184-184, 206-206, 217-217
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/rightClickMenu.spec.ts` at line 138, Replace the brittle raw locator usages like await comfyPage.page.locator('.litemenu-entry:has-text("Pin")').click() with the existing context-menu helper used elsewhere in this spec (use the helper that abstracts selecting a context-menu entry) so tests use the helper API instead of repeating '.litemenu-entry:has-text(...)' selectors; update every occurrence (including the similar lines at 156, 176, 184, 206, 217) to call the context-menu helper method (rather than comfyPage.page.locator(...)) passing the menu label (e.g., "Pin") to keep selection logic centralized and less fragile.browser_tests/tests/templates.spec.ts (1)
188-190: Consider replacing hardcoded test-id strings withTestIdshelpers/constants.These selectors are correct, but centralizing them will reduce drift and keep parity with the rest of this spec (e.g., Line 398, Line 404).
🧩 Suggested centralization
- const templateGrid = comfyPage.page.getByTestId( - 'template-workflows-content' - ) + const templateGrid = comfyPage.page.getByTestId(TestIds.templates.content) - await expect( - comfyPage.page.getByTestId('template-workflow-short-description') - ).toBeVisible() + await expect( + comfyPage.page.getByTestId( + TestIds.templates.workflowCard('short-description') + ) + ).toBeVisible() - const shortDescCard = comfyPage.page.getByTestId( - 'template-workflow-short-description' - ) + const shortDescCard = comfyPage.page.getByTestId( + TestIds.templates.workflowCard('short-description') + ) - const mediumDescCard = comfyPage.page.getByTestId( - 'template-workflow-medium-description' - ) + const mediumDescCard = comfyPage.page.getByTestId( + TestIds.templates.workflowCard('medium-description') + ) - const longDescCard = comfyPage.page.getByTestId( - 'template-workflow-long-description' - ) + const longDescCard = comfyPage.page.getByTestId( + TestIds.templates.workflowCard('long-description') + ) - const templateGrid = comfyPage.page.getByTestId( - 'template-workflows-content' - ) + const templateGrid = comfyPage.page.getByTestId(TestIds.templates.content)Also applies to: 305-305, 309-316, 334-336
🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/tests/templates.spec.ts` around lines 188 - 190, Replace hardcoded test-id string usages with the shared TestIds constants: locate usages of comfyPage.page.getByTestId('template-workflows-content') (assigned to templateGrid) and the other occurrences noted (the getByTestId calls around the template selectors) and swap the literal strings for the appropriate TestIds.<templateWorkflowsContent> constant (or the matching name in your TestIds file); update imports to bring in TestIds and ensure all matching selectors in this spec use those constants for consistency with other tests (e.g., the selectors currently at templateGrid and the other getByTestId calls).browser_tests/fixtures/VueNodeHelpers.ts (1)
149-149: Prefer reusing the cachednodeslocator at Line 149.You already cache
[data-node-id]inthis.nodes; reusing it avoids selector drift.♻️ Small DRY refactor
- await this.page.locator('[data-node-id]').first().waitFor() + await this.nodes.first().waitFor()🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@browser_tests/fixtures/VueNodeHelpers.ts` at line 149, The test is calling this.page.locator('[data-node-id]').first().waitFor() directly, causing selector duplication; replace that call by reusing the cached locator this.nodes (e.g., call this.nodes.first().waitFor()) to avoid selector drift and keep the locator centralized — locate the occurrence and swap the direct locator invocation with this.nodes usage in the relevant helper method.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Inline comments:
In @.oxlintrc.json:
- Line 119: The Playwright rule playwright/no-networkidle is enforced and the
test browser_tests/tests/subgraph/subgraphDraftPositions.spec.ts uses waitUntil:
'networkidle' (around the wait call near line 55), causing lint failures; fix by
either replacing that waitUntil usage with a deterministic wait (e.g., use
page.waitForFunction(...) or Locator-based actions like
locator.waitFor()/locator.click()/locator.fill() that assert the desired state)
or add an inline suppression immediately before the offending line (//
oxlint-disable-next-line playwright/no-networkidle) if you must keep
networkidle; update the test in subgraphDraftPositions.spec.ts and ensure the
rule in .oxlintrc.json remains unchanged.
---
Nitpick comments:
In `@browser_tests/fixtures/components/SettingDialog.ts`:
- Line 55: The test rebuilds the '.about-container' locator inline rather than
reusing a cached locator; add a public readonly locator property (e.g.,
aboutContainer) initialized in the SettingDialog constructor and replace the
inline await this.page.locator('.about-container').waitFor() call with await
this.aboutContainer.waitFor(), and update any other methods in SettingDialog
that reference the same selector to reuse the cached aboutContainer locator.
In `@browser_tests/fixtures/VueNodeHelpers.ts`:
- Line 149: The test is calling
this.page.locator('[data-node-id]').first().waitFor() directly, causing selector
duplication; replace that call by reusing the cached locator this.nodes (e.g.,
call this.nodes.first().waitFor()) to avoid selector drift and keep the locator
centralized — locate the occurrence and swap the direct locator invocation with
this.nodes usage in the relevant helper method.
In `@browser_tests/tests/rightClickMenu.spec.ts`:
- Line 138: Replace the brittle raw locator usages like await
comfyPage.page.locator('.litemenu-entry:has-text("Pin")').click() with the
existing context-menu helper used elsewhere in this spec (use the helper that
abstracts selecting a context-menu entry) so tests use the helper API instead of
repeating '.litemenu-entry:has-text(...)' selectors; update every occurrence
(including the similar lines at 156, 176, 184, 206, 217) to call the
context-menu helper method (rather than comfyPage.page.locator(...)) passing the
menu label (e.g., "Pin") to keep selection logic centralized and less fragile.
In `@browser_tests/tests/selectionToolboxActions.spec.ts`:
- Around line 203-209: You resolved and asserted the locator in frameButton but
then re-queried the same locator; replace the second
comfyPage.page.getByRole(...) call with frameButton.click({ force: true }) to
reuse the existing locator (frameButton) and remove the duplicate query to avoid
unnecessary re-querying and keep the test DRY.
In `@browser_tests/tests/templates.spec.ts`:
- Around line 188-190: Replace hardcoded test-id string usages with the shared
TestIds constants: locate usages of
comfyPage.page.getByTestId('template-workflows-content') (assigned to
templateGrid) and the other occurrences noted (the getByTestId calls around the
template selectors) and swap the literal strings for the appropriate
TestIds.<templateWorkflowsContent> constant (or the matching name in your
TestIds file); update imports to bring in TestIds and ensure all matching
selectors in this spec use those constants for consistency with other tests
(e.g., the selectors currently at templateGrid and the other getByTestId calls).
🪄 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: 8072b382-abf1-4fcd-aee6-a057ea199f5c
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (39)
.oxlintrc.jsonbrowser_tests/fixtures/ComfyPage.tsbrowser_tests/fixtures/VueNodeHelpers.tsbrowser_tests/fixtures/components/SettingDialog.tsbrowser_tests/fixtures/components/SidebarTab.tsbrowser_tests/fixtures/helpers/AppModeHelper.tsbrowser_tests/fixtures/helpers/SubgraphHelper.tsbrowser_tests/fixtures/utils/vueNodeFixtures.tsbrowser_tests/tests/bottomPanelShortcuts.spec.tsbrowser_tests/tests/dialog.spec.tsbrowser_tests/tests/featureFlags.spec.tsbrowser_tests/tests/graph.spec.tsbrowser_tests/tests/groupNode.spec.tsbrowser_tests/tests/imageCompare.spec.tsbrowser_tests/tests/interaction.spec.tsbrowser_tests/tests/jobHistoryActions.spec.tsbrowser_tests/tests/linearMode.spec.tsbrowser_tests/tests/nodeContextMenuOverflow.spec.tsbrowser_tests/tests/nodeDisplay.spec.tsbrowser_tests/tests/nodeSearchBoxV2Extended.spec.tsbrowser_tests/tests/performance.spec.tsbrowser_tests/tests/releaseNotifications.spec.tsbrowser_tests/tests/resultGallery.spec.tsbrowser_tests/tests/rightClickMenu.spec.tsbrowser_tests/tests/selectionToolbox.spec.tsbrowser_tests/tests/selectionToolboxActions.spec.tsbrowser_tests/tests/selectionToolboxSubmenus.spec.tsbrowser_tests/tests/sidebar/assets.spec.tsbrowser_tests/tests/sidebar/nodeLibrary.spec.tsbrowser_tests/tests/subgraph/subgraphDraftPositions.spec.tsbrowser_tests/tests/subgraph/subgraphPromotion.spec.tsbrowser_tests/tests/subgraph/subgraphSlots.spec.tsbrowser_tests/tests/templates.spec.tsbrowser_tests/tests/topbar/workflowTabs.spec.tsbrowser_tests/tests/vueNodes/widgets/text/multilineStringWidget.spec.tsbrowser_tests/tests/vueNodes/widgets/widgetReactivity.spec.tsbrowser_tests/tests/widget.spec.tspackage.jsonpnpm-workspace.yaml
Amp-Thread-ID: https://ampcode.com/threads/T-019d798e-81c1-7460-86bf-f6ad7a703f8c Co-authored-by: Amp <amp@ampcode.com>
Enable 8 missing recommended rules from eslint-plugin-playwright: - no-focused-test, no-skipped-test, no-unsafe-references, no-unused-locators, no-useless-not, valid-expect, valid-expect-in-promise, valid-title Auto-fix 158 no-useless-not violations (.not.toBeVisible() -> .toBeHidden()). Refactor customMatchers.ts to avoid valid-expect false positive. Add oxlint-disable for 2 intentional test.skip() calls with issue links. Amp-Thread-ID: https://ampcode.com/threads/T-019d799d-7c10-711e-83db-3af43ffb1e00 Co-authored-by: Amp <amp@ampcode.com>
Amp-Thread-ID: https://ampcode.com/threads/T-019d79b6-b520-7041-b8fb-e8ab573a21a1 Co-authored-by: Amp <amp@ampcode.com>
Bare 'canvas' selector matches multiple elements (graph canvas, link overlay canvas, minimap, charts). Use comfyPage.canvas which targets Amp-Thread-ID: https://ampcode.com/threads/T-019d79bf-1747-70ce-af0c-79d892ae87ae Co-authored-by: Amp <amp@ampcode.com> #graph-canvas specifically.
The playwright/no-networkidle lint rule forbids waitUntil: 'networkidle'. The subsequent waitForFunction and locator.waitFor already provide deterministic readiness checks, making networkidle redundant. Amp-Thread-ID: https://ampcode.com/threads/T-019d79d5-58b6-7021-a990-dc51feb86d58 Co-authored-by: Amp <amp@ampcode.com>
AustinMroz
left a comment
There was a problem hiding this comment.
Belated, and only had time for rules, but still posting for discussion
| "no-unused-private-class-members": "error", | ||
| "unicorn/no-empty-file": "error" | ||
| "unicorn/no-empty-file": "error", | ||
| "playwright/consistent-spacing-between-blocks": "error", |
There was a problem hiding this comment.
We need to add a bonk emoji... Someone call unicode.
| "playwright/no-element-handle": "error", | ||
| "playwright/no-eval": "error", | ||
| "playwright/no-focused-test": "error", | ||
| "playwright/no-force-option": "off", |
There was a problem hiding this comment.
I'm specifically concerned about this one, but I'll reserve judgement until seeing how you've handled it's usage.
There was a problem hiding this comment.
That'll be coming soon™️
| "playwright/prefer-to-have-length": "error", | ||
| "playwright/prefer-web-first-assertions": "error", | ||
| "playwright/prefer-native-locators": "error", | ||
| "playwright/require-to-pass-timeout": "error", |
There was a problem hiding this comment.
I'm a little iffy on this one. We're reintroducing the ick of timeouts for marginal benefit on the uncommon case.
There was a problem hiding this comment.
toPass defaults to 0. Timeouts aren't bad, waiting arbitrary amounts of time with no groundtruth is the problem.
## Summary Add eslint-plugin-playwright as an oxlint JS plugin scoped to browser_tests/, enforcing Playwright best practices at lint time. ## Changes - **What**: Configure eslint-plugin-playwright@2.10.1 via oxlint's alpha `jsPlugins` field (`.oxlintrc.json` override scoped to `browser_tests/**/*.ts`). 18 recommended rules + `prefer-native-locators` + `require-to-pass-timeout` at error severity. All 173 initial violations resolved (config, auto-fix, manual fixes). `no-force-option` set to off — 28 violations need triage (canvas overlay workarounds vs unnecessary force) in a dedicated PR. - **Dependencies**: `eslint-plugin-playwright@^2.10.1` (devDependency, required by oxlint jsPlugins at runtime) ## Review Focus - `.oxlintrc.json` override structure — this is the first use of oxlint's JS plugins alpha feature in this repo - Manual fixes in spec files: `waitForSelector` → `locator.waitFor`, deprecated page methods → locator equivalents, `toPass()` timeout additions - Compound CSS selectors replaced with `.and()` (Playwright native locator composition) to avoid `prefer-native-locators` suppressions - Lint script changes in `package.json` to include `browser_tests/` in oxlint targets --------- Co-authored-by: Amp <amp@ampcode.com> Co-authored-by: GitHub Action <action@github.com>
Summary
Add eslint-plugin-playwright as an oxlint JS plugin scoped to browser_tests/, enforcing Playwright best practices at lint time.
Changes
jsPluginsfield (.oxlintrc.jsonoverride scoped tobrowser_tests/**/*.ts). 18 recommended rules +prefer-native-locators+require-to-pass-timeoutat error severity. All 173 initial violations resolved (config, auto-fix, manual fixes).no-force-optionset to off — 28 violations need triage (canvas overlay workarounds vs unnecessary force) in a dedicated PR.eslint-plugin-playwright@^2.10.1(devDependency, required by oxlint jsPlugins at runtime)Review Focus
.oxlintrc.jsonoverride structure — this is the first use of oxlint's JS plugins alpha feature in this repowaitForSelector→locator.waitFor, deprecated page methods → locator equivalents,toPass()timeout additions.and()(Playwright native locator composition) to avoidprefer-native-locatorssuppressionspackage.jsonto includebrowser_tests/in oxlint targets