test: cover utility and base branch gaps#13332
Conversation
|
Important Review skippedNo new commits to review since the last review. ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎨 Storybook: ✅ Built — View Storybook🎭 Playwright: ✅ 1693 passed, 0 failed · 1 flaky📊 Browser Reports
📦 Bundle: 7.77 MB gzip 🔴 +65 BDetailsSummary
Category Glance App Entry Points — 47.4 kB (baseline 47.4 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.25 MB (baseline 1.25 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 97.7 kB (baseline 97.7 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 9 added / 9 removed / 3 unchanged Panels & Settings — 546 kB (baseline 546 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 11 added / 11 removed / 16 unchanged User & Accounts — 26.9 kB (baseline 26.9 kB) • ⚪ 0 BAuthentication, profile, and account management bundles
Status: 7 added / 7 removed / 3 unchanged Editors & Dialogs — 117 kB (baseline 117 kB) • ⚪ 0 BModals, dialogs, drawers, and in-app editors
Status: 4 added / 4 removed / 1 unchanged UI Components — 57.2 kB (baseline 57.2 kB) • ⚪ 0 BReusable component library chunks
Status: 5 added / 5 removed / 8 unchanged Data & Services — 270 kB (baseline 270 kB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 13 added / 13 removed / 3 unchanged Utilities & Hooks — 3.37 MB (baseline 3.37 MB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 16 added / 16 removed / 17 unchanged Vendor & Third-Party — 15.3 MB (baseline 15.3 MB) • ⚪ 0 BExternal libraries and shared vendor chunks Status: 16 unchanged Other — 11.7 MB (baseline 11.7 MB) • ⚪ 0 BBundles that do not match a named category
Status: 66 added / 66 removed / 99 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-07-01T07:35:30.269Z",
"gitSha": "8c9be02b3299addf9057fa9c3681a788906155b9",
"branch": "shihchi/coverage-utils-tests",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2044.0100000000143,
"styleRecalcs": 8,
"styleRecalcDurationMs": 9.889999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 397.9320000000001,
"heapDeltaBytes": -7494152,
"heapUsedBytes": 61759576,
"domNodes": -283,
"jsHeapTotalBytes": 17723392,
"scriptDurationMs": 14.415000000000001,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2009.1449999999895,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.812000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 381.67699999999996,
"heapDeltaBytes": -3686288,
"heapUsedBytes": 48369648,
"domNodes": -290,
"jsHeapTotalBytes": 16117760,
"scriptDurationMs": 14.769999999999998,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1959.8059999999862,
"styleRecalcs": 79,
"styleRecalcDurationMs": 51.105000000000004,
"layouts": 12,
"layoutDurationMs": 4.821000000000001,
"taskDurationMs": 925.4630000000001,
"heapDeltaBytes": -12895332,
"heapUsedBytes": 56375644,
"domNodes": -242,
"jsHeapTotalBytes": 19558400,
"scriptDurationMs": 123.986,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1736.4239999999995,
"styleRecalcs": 72,
"styleRecalcDurationMs": 31.607999999999997,
"layouts": 12,
"layoutDurationMs": 3.17,
"taskDurationMs": 724.294,
"heapDeltaBytes": -2893248,
"heapUsedBytes": 62613872,
"domNodes": 54,
"jsHeapTotalBytes": 21004288,
"scriptDurationMs": 114.50200000000001,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1747.0199999999636,
"styleRecalcs": 32,
"styleRecalcDurationMs": 17.5,
"layouts": 6,
"layoutDurationMs": 0.6500000000000001,
"taskDurationMs": 354.894,
"heapDeltaBytes": -3708936,
"heapUsedBytes": 65842500,
"domNodes": -227,
"jsHeapTotalBytes": 12742656,
"scriptDurationMs": 19.229999999999997,
"eventListeners": -184,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1708.9670000000297,
"styleRecalcs": 31,
"styleRecalcDurationMs": 16.48,
"layouts": 6,
"layoutDurationMs": 0.551,
"taskDurationMs": 333.46799999999996,
"heapDeltaBytes": -3716364,
"heapUsedBytes": 65719720,
"domNodes": -223,
"jsHeapTotalBytes": 13266944,
"scriptDurationMs": 16.605999999999995,
"eventListeners": -184,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 552.0599999999831,
"styleRecalcs": 11,
"styleRecalcDurationMs": 7.949999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 369.04699999999997,
"heapDeltaBytes": 5789908,
"heapUsedBytes": 57860236,
"domNodes": -289,
"jsHeapTotalBytes": 10612736,
"scriptDurationMs": 58.937000000000005,
"eventListeners": -203,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 633.1400000000258,
"styleRecalcs": 10,
"styleRecalcDurationMs": 7.4559999999999995,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 420.307,
"heapDeltaBytes": 8262488,
"heapUsedBytes": 59906908,
"domNodes": -293,
"jsHeapTotalBytes": 9564160,
"scriptDurationMs": 63.644000000000005,
"eventListeners": -201,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2033.3610000000135,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.143,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 488.27700000000004,
"heapDeltaBytes": -8819064,
"heapUsedBytes": 64683240,
"domNodes": 18,
"jsHeapTotalBytes": 9318400,
"scriptDurationMs": 86.15500000000002,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-idle",
"durationMs": 2046.8930000000114,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.129000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 555.76,
"heapDeltaBytes": -8388144,
"heapUsedBytes": 58651024,
"domNodes": -267,
"jsHeapTotalBytes": -1310720,
"scriptDurationMs": 98.08,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2106.4290000000483,
"styleRecalcs": 69,
"styleRecalcDurationMs": 17.586,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1072.823,
"heapDeltaBytes": 12422072,
"heapUsedBytes": 80859788,
"domNodes": -273,
"jsHeapTotalBytes": -1368064,
"scriptDurationMs": 399.07800000000003,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-pan",
"durationMs": 2130.018000000007,
"styleRecalcs": 68,
"styleRecalcDurationMs": 16.835,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1115.801,
"heapDeltaBytes": -2615456,
"heapUsedBytes": 82868536,
"domNodes": -277,
"jsHeapTotalBytes": 2650112,
"scriptDurationMs": 432.975,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3048.432000000048,
"styleRecalcs": 61,
"styleRecalcDurationMs": 13.748000000000003,
"layouts": 60,
"layoutDurationMs": 7.03,
"taskDurationMs": 1214.0389999999998,
"heapDeltaBytes": 12025252,
"heapUsedBytes": 66063660,
"domNodes": 2,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 456.3809999999999,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "large-graph-zoom",
"durationMs": 3137.895999999955,
"styleRecalcs": 63,
"styleRecalcDurationMs": 19.391,
"layouts": 60,
"layoutDurationMs": 8.541,
"taskDurationMs": 1359.956,
"heapDeltaBytes": 12676972,
"heapUsedBytes": 66759916,
"domNodes": -278,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 509.9429999999999,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2042.2999999999547,
"styleRecalcs": 8,
"styleRecalcDurationMs": 6.6999999999999975,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 509.2300000000001,
"heapDeltaBytes": -2551928,
"heapUsedBytes": 59173404,
"domNodes": -274,
"jsHeapTotalBytes": -1867776,
"scriptDurationMs": 85.69100000000002,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 2011.5680000000111,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.909,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 493.64200000000005,
"heapDeltaBytes": -9434840,
"heapUsedBytes": 63971840,
"domNodes": 18,
"jsHeapTotalBytes": 9580544,
"scriptDurationMs": 88.76,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 600.812000000019,
"styleRecalcs": 48,
"styleRecalcDurationMs": 16.515,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 417.11499999999995,
"heapDeltaBytes": -23135660,
"heapUsedBytes": 46337280,
"domNodes": -275,
"jsHeapTotalBytes": 6451200,
"scriptDurationMs": 119.23,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 565.0560000000269,
"styleRecalcs": 46,
"styleRecalcDurationMs": 10.143999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 383.93899999999996,
"heapDeltaBytes": -1548820,
"heapUsedBytes": 50694272,
"domNodes": -271,
"jsHeapTotalBytes": -921600,
"scriptDurationMs": 118.84700000000001,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2032.2309999999675,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.991,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 390.85099999999994,
"heapDeltaBytes": -7819868,
"heapUsedBytes": 61719012,
"domNodes": -274,
"jsHeapTotalBytes": 19296256,
"scriptDurationMs": 12.597999999999999,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2055.6640000000357,
"styleRecalcs": 10,
"styleRecalcDurationMs": 12.011000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 408.291,
"heapDeltaBytes": -8381220,
"heapUsedBytes": 61098136,
"domNodes": -279,
"jsHeapTotalBytes": 20344832,
"scriptDurationMs": 13.862999999999998,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1708.488999999986,
"styleRecalcs": 77,
"styleRecalcDurationMs": 36.129999999999995,
"layouts": 16,
"layoutDurationMs": 3.9609999999999994,
"taskDurationMs": 658.2920000000001,
"heapDeltaBytes": -5552120,
"heapUsedBytes": 57761324,
"domNodes": 63,
"jsHeapTotalBytes": 15466496,
"scriptDurationMs": 91.993,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1745.9349999999745,
"styleRecalcs": 75,
"styleRecalcDurationMs": 38.864999999999995,
"layouts": 16,
"layoutDurationMs": 4.326999999999999,
"taskDurationMs": 744.152,
"heapDeltaBytes": 19842720,
"heapUsedBytes": 72149304,
"domNodes": -263,
"jsHeapTotalBytes": 16379904,
"scriptDurationMs": 95.69100000000002,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-transition-enter",
"durationMs": 964.7889999999961,
"styleRecalcs": 16,
"styleRecalcDurationMs": 27.533999999999995,
"layouts": 4,
"layoutDurationMs": 13.684999999999999,
"taskDurationMs": 733.4470000000002,
"heapDeltaBytes": 29960680,
"heapUsedBytes": 102119880,
"domNodes": 13833,
"jsHeapTotalBytes": 16515072,
"scriptDurationMs": 27.964000000000002,
"eventListeners": 2533,
"totalBlockingTimeMs": 164,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8181.05700000001,
"styleRecalcs": 251,
"styleRecalcDurationMs": 56.013999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4018.53,
"heapDeltaBytes": 4940924,
"heapUsedBytes": 76760728,
"domNodes": 20,
"jsHeapTotalBytes": 22339584,
"scriptDurationMs": 1450.923,
"eventListeners": 20,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8260.692999999947,
"styleRecalcs": 249,
"styleRecalcDurationMs": 65.79299999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 4286.313,
"heapDeltaBytes": 13964992,
"heapUsedBytes": 73788160,
"domNodes": -279,
"jsHeapTotalBytes": 7774208,
"scriptDurationMs": 1549.041,
"eventListeners": -181,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.80000000000109
},
{
"name": "vue-large-graph-idle",
"durationMs": 12369.101,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12341.113000000001,
"heapDeltaBytes": -33349288,
"heapUsedBytes": 183555092,
"domNodes": -8325,
"jsHeapTotalBytes": 16248832,
"scriptDurationMs": 538.058,
"eventListeners": -16376,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-idle",
"durationMs": 12805.45799999993,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12787.026999999998,
"heapDeltaBytes": -30158412,
"heapUsedBytes": 166234856,
"domNodes": -3302,
"jsHeapTotalBytes": 19632128,
"scriptDurationMs": 522.826,
"eventListeners": -16376,
"totalBlockingTimeMs": 0,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 14686.641999999949,
"styleRecalcs": 67,
"styleRecalcDurationMs": 17.392999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14662.706000000002,
"heapDeltaBytes": -34170804,
"heapUsedBytes": 158412272,
"domNodes": -3302,
"jsHeapTotalBytes": 16748544,
"scriptDurationMs": 780.0070000000001,
"eventListeners": -16372,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.219999999999953,
"p95FrameDurationMs": 16.80000000000291
},
{
"name": "vue-large-graph-pan",
"durationMs": 14474.066999999992,
"styleRecalcs": 65,
"styleRecalcDurationMs": 16.94799999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14455.033,
"heapDeltaBytes": -65231784,
"heapUsedBytes": 159215160,
"domNodes": -3300,
"jsHeapTotalBytes": 3117056,
"scriptDurationMs": 775.436,
"eventListeners": -16376,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 484.12400000000844,
"styleRecalcs": 18,
"styleRecalcDurationMs": 32.955999999999996,
"layouts": 4,
"layoutDurationMs": 1.191,
"taskDurationMs": 230.07700000000003,
"heapDeltaBytes": -21993304,
"heapUsedBytes": 48655076,
"domNodes": -167,
"jsHeapTotalBytes": 5140480,
"scriptDurationMs": 18.12,
"eventListeners": -134,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 527.9199999999946,
"styleRecalcs": 16,
"styleRecalcDurationMs": 22.965,
"layouts": 5,
"layoutDurationMs": 1.2990000000000002,
"taskDurationMs": 221.898,
"heapDeltaBytes": -21915604,
"heapUsedBytes": 48916428,
"domNodes": -172,
"jsHeapTotalBytes": 4091904,
"scriptDurationMs": 16.134000000000004,
"eventListeners": -132,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
}
]
} |
🌐 Website E2ENote Tests are running… View workflow run |
There was a problem hiding this comment.
Actionable comments posted: 3
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In @.github/workflows/ci-tests-unit.yaml:
- Around line 58-60: The `Enforce critical coverage gate` step is re-running the
full Vitest suite via `pnpm test:coverage:critical`, which duplicates the
earlier `pnpm test:coverage` run. Update the CI workflow so this step validates
the critical threshold from the existing coverage artifacts instead of executing
tests again, using the coverage files produced by the first run and keeping the
logic isolated to the critical file subset.
In `@src/utils/gridUtil.test.ts`:
- Around line 45-54: The zero-columns path in createGridStyle is warning about
“defaulting to 1” even though the implementation still falls back to auto-fill,
so the message and behavior are inconsistent. Update the logic in
createGridStyle to either clamp columns to 1 before computing
gridTemplateColumns or adjust the console.warn text to explicitly describe the
auto-fill fallback. Make sure the test in src/utils/gridUtil.test.ts matches the
actual behavior and expected warning string for the columns: 0 case.
In `@src/utils/objectUrlUtil.test.ts`:
- Around line 1-48: The import style in objectUrlUtil.test.ts is inconsistent
with the other util tests in this PR. Update the test’s import for
createSharedObjectUrl, releaseSharedObjectUrl, and retainSharedObjectUrl to use
the same `@/utils/`... alias pattern used by nodeTitleUtil.test.ts and
queueDisplay.test.ts so the test suite stays consistent.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: fa29b737-0290-41f2-9aa9-07ce155df8d4
📒 Files selected for processing (14)
.github/workflows/ci-tests-unit.yaml.github/workflows/ci-website-e2e.yamlpackage.jsonsrc/base/common/async.test.tssrc/base/credits/comfyCredits.test.tssrc/utils/fuseUtil.test.tssrc/utils/gridUtil.test.tssrc/utils/mouseDownUtil.test.tssrc/utils/nodeTitleUtil.test.tssrc/utils/objectUrlUtil.test.tssrc/utils/queueDisplay.test.tssrc/utils/rafBatch.test.tssrc/utils/typeGuardUtil.test.tsvite.config.mts
|
|
||
| - name: Enforce critical coverage gate | ||
| run: pnpm test:coverage:critical |
There was a problem hiding this comment.
🚀 Performance & Scalability | 🔵 Trivial | ⚡ Quick win
Critical coverage gate re-runs the entire unit test suite.
pnpm test:coverage:critical re-executes the full Vitest suite a second time (after pnpm test:coverage at Line 39) purely to apply a different include/thresholds config — effectively doubling unit-test CI time on every run. Consider instead checking the critical thresholds against the coverage report already produced by the first run (e.g., parsing coverage/coverage-final.json/coverage-summary.json for the curated file subset) rather than re-executing tests.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In @.github/workflows/ci-tests-unit.yaml around lines 58 - 60, The `Enforce
critical coverage gate` step is re-running the full Vitest suite via `pnpm
test:coverage:critical`, which duplicates the earlier `pnpm test:coverage` run.
Update the CI workflow so this step validates the critical threshold from the
existing coverage artifacts instead of executing tests again, using the coverage
files produced by the first run and keeping the logic isolated to the critical
file subset.
| it('warns for columns: 0 but falls through to auto-fill (falsy zero)', () => { | ||
| const warn = vi.spyOn(console, 'warn').mockImplementation(() => undefined) | ||
|
|
||
| expect(createGridStyle({ columns: 0 }).gridTemplateColumns).toBe( | ||
| 'repeat(auto-fill, minmax(15rem, 1fr))' | ||
| ) | ||
| expect(warn).toHaveBeenCalledWith( | ||
| 'createGridStyle: columns must be >= 1, defaulting to 1' | ||
| ) | ||
| }) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Inspect createGridStyle to confirm the falsy-zero vs warning-message mismatch
fd -t f 'gridUtil.ts' src
rg -n -A 15 'function createGridStyle|export const createGridStyle' src/utils/gridUtil.tsRepository: Comfy-Org/ComfyUI_frontend
Length of output: 680
🏁 Script executed:
#!/bin/bash
sed -n '1,120p' src/utils/gridUtil.ts | cat -nRepository: Comfy-Org/ComfyUI_frontend
Length of output: 1793
🏁 Script executed:
#!/bin/bash
rg -n "columns: 0|defaulting to 1|repeat\\(auto-fill|createGridStyle" srcRepository: Comfy-Org/ComfyUI_frontend
Length of output: 4032
Align the zero-columns warning with the real fallback
In src/utils/gridUtil.ts, columns: 0 still returns repeat(auto-fill, ...), so the warning about “defaulting to 1” is misleading. Either clamp before building gridTemplateColumns or change the warning to describe the auto-fill fallback.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/utils/gridUtil.test.ts` around lines 45 - 54, The zero-columns path in
createGridStyle is warning about “defaulting to 1” even though the
implementation still falls back to auto-fill, so the message and behavior are
inconsistent. Update the logic in createGridStyle to either clamp columns to 1
before computing gridTemplateColumns or adjust the console.warn text to
explicitly describe the auto-fill fallback. Make sure the test in
src/utils/gridUtil.test.ts matches the actual behavior and expected warning
string for the columns: 0 case.
| import { beforeEach, describe, expect, it, vi } from 'vitest' | ||
|
|
||
| import { | ||
| createSharedObjectUrl, | ||
| releaseSharedObjectUrl, | ||
| retainSharedObjectUrl | ||
| } from './objectUrlUtil' | ||
|
|
||
| describe('objectUrlUtil', () => { | ||
| beforeEach(() => { | ||
| vi.restoreAllMocks() | ||
| }) | ||
|
|
||
| it('retains and releases shared blob URLs by reference count', () => { | ||
| const revokeObjectURL = vi.spyOn(URL, 'revokeObjectURL') | ||
| vi.spyOn(URL, 'createObjectURL').mockReturnValue('blob:test') | ||
|
|
||
| const url = createSharedObjectUrl(new Blob(['data'])) | ||
| retainSharedObjectUrl(url) | ||
| releaseSharedObjectUrl(url) | ||
|
|
||
| expect(revokeObjectURL).not.toHaveBeenCalled() | ||
|
|
||
| releaseSharedObjectUrl(url) | ||
|
|
||
| expect(revokeObjectURL).toHaveBeenCalledWith(url) | ||
| }) | ||
|
|
||
| it('ignores missing and non-blob URLs', () => { | ||
| const revokeObjectURL = vi.spyOn(URL, 'revokeObjectURL') | ||
|
|
||
| retainSharedObjectUrl(undefined) | ||
| retainSharedObjectUrl('https://example.com/image.png') | ||
| releaseSharedObjectUrl(undefined) | ||
| releaseSharedObjectUrl('https://example.com/image.png') | ||
|
|
||
| expect(revokeObjectURL).not.toHaveBeenCalled() | ||
| }) | ||
|
|
||
| it('revokes unknown blob URLs once', () => { | ||
| const revokeObjectURL = vi.spyOn(URL, 'revokeObjectURL') | ||
|
|
||
| releaseSharedObjectUrl('blob:unknown') | ||
|
|
||
| expect(revokeObjectURL).toHaveBeenCalledOnce() | ||
| expect(revokeObjectURL).toHaveBeenCalledWith('blob:unknown') | ||
| }) | ||
| }) |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
Solid coverage of the ref-count lifecycle.
Tests correctly cover retain/release counting, non-blob/undefined no-ops, and revocation of unknown URLs, matching releaseSharedObjectUrl's currentCount === undefined || currentCount <= 1 branch.
One minor nit: this file imports via relative path (./objectUrlUtil) while the sibling test files in this PR (nodeTitleUtil.test.ts, queueDisplay.test.ts) use the @/utils/... alias. Consider aligning for consistency.
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
In `@src/utils/objectUrlUtil.test.ts` around lines 1 - 48, The import style in
objectUrlUtil.test.ts is inconsistent with the other util tests in this PR.
Update the test’s import for createSharedObjectUrl, releaseSharedObjectUrl, and
retainSharedObjectUrl to use the same `@/utils/`... alias pattern used by
nodeTitleUtil.test.ts and queueDisplay.test.ts so the test suite stays
consistent.
965c0f4 to
b3665b2
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/utils/typeGuardUtil.test.ts`:
- Around line 86-94: The `isSlotObject` test in `typeGuardUtil.test.ts` still
misses the `typeof obj !== 'object'` branch because `null` only covers the null
guard. Update the `describe('isSlotObject')` case to add a primitive input such
as a string or number, alongside the existing `null` and shape checks, so the
`isSlotObject` function’s `typeof` branch is exercised and branch coverage is
complete.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: 0e88d6c2-6944-4f84-96e6-1030b2522d65
📒 Files selected for processing (10)
src/base/common/async.test.tssrc/base/credits/comfyCredits.test.tssrc/utils/fuseUtil.test.tssrc/utils/gridUtil.test.tssrc/utils/mouseDownUtil.test.tssrc/utils/nodeTitleUtil.test.tssrc/utils/objectUrlUtil.test.tssrc/utils/queueDisplay.test.tssrc/utils/rafBatch.test.tssrc/utils/typeGuardUtil.test.ts
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #13332 +/- ##
==========================================
+ Coverage 76.89% 77.01% +0.11%
==========================================
Files 1636 1639 +3
Lines 98625 98648 +23
Branches 33194 33845 +651
==========================================
+ Hits 75842 75974 +132
+ Misses 22067 21963 -104
+ Partials 716 711 -5
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
src/utils/typeGuardUtil.test.ts (1)
86-94: 🎯 Functional Correctness | 🟡 Minor | ⚡ Quick winMissing primitive-value case for
isSlotObject'stypeofbranch.
nullistypeof 'object'in JS, so this only exercises theobj !== nullguard, not thetypeof obj === 'object'check. Add a case likeisSlotObject('slot')to cover the untested branch.✅ Suggested addition
expect(isSlotObject(null)).toBe(false) + expect(isSlotObject('image')).toBe(false) expect(isSlotObject({ name: 'image', type: 'IMAGE' })).toBe(false)🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In `@src/utils/typeGuardUtil.test.ts` around lines 86 - 94, The isSlotObject test only covers the null guard and the object-shape path, but not the primitive typeof branch. Update the isSlotObject spec in the typeGuardUtil test to add a primitive input case such as a string, alongside the existing null and slot-shape assertions, so the typeof obj === 'object' check is exercised. Use the isSlotObject helper in the describe block as the anchor when adding the new expectation.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/utils/queueDisplay.test.ts`:
- Around line 248-270: Split the combined fallback-title assertion in
buildJobDisplay tests into two focused it blocks in queueDisplay.test.ts: one
covering the jobId-derived completed title path and one covering the fully empty
generic label path. Keep the assertions against buildJobDisplay and
createTask/createCtx the same, but separate the cases so failures point to the
exact fallback branch.
---
Duplicate comments:
In `@src/utils/typeGuardUtil.test.ts`:
- Around line 86-94: The isSlotObject test only covers the null guard and the
object-shape path, but not the primitive typeof branch. Update the isSlotObject
spec in the typeGuardUtil test to add a primitive input case such as a string,
alongside the existing null and slot-shape assertions, so the typeof obj ===
'object' check is exercised. Use the isSlotObject helper in the describe block
as the anchor when adding the new expectation.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: a0c984d2-54bf-4769-8b94-6a7ddb4768ea
📒 Files selected for processing (10)
src/base/common/async.test.tssrc/base/credits/comfyCredits.test.tssrc/utils/fuseUtil.test.tssrc/utils/gridUtil.test.tssrc/utils/mouseDownUtil.test.tssrc/utils/nodeTitleUtil.test.tssrc/utils/objectUrlUtil.test.tssrc/utils/queueDisplay.test.tssrc/utils/rafBatch.test.tssrc/utils/typeGuardUtil.test.ts
b3665b2 to
be5cfed
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In `@src/utils/rafBatch.test.ts`:
- Line 3: The import in rafBatch.test should use the project’s @ alias for
consistency with the other utility tests. Update the import that references
createRafBatch to come from the aliased utils path instead of a relative path,
matching the style used in gridUtil.test and mouseDownUtil.test.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: af66319a-7faf-48f2-a9ce-bf7ea29dc26d
📒 Files selected for processing (10)
src/base/common/async.test.tssrc/base/credits/comfyCredits.test.tssrc/utils/fuseUtil.test.tssrc/utils/gridUtil.test.tssrc/utils/mouseDownUtil.test.tssrc/utils/nodeTitleUtil.test.tssrc/utils/objectUrlUtil.test.tssrc/utils/queueDisplay.test.tssrc/utils/rafBatch.test.tssrc/utils/typeGuardUtil.test.ts
be5cfed to
af733e9
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai review |
✅ Action performedReview finished.
|
Summary
Add unit branch-coverage for utility and base helpers — part of the critical-coverage series (gate established in the infra PR).
Changes
fuseUtil,gridUtil,mouseDownUtil,nodeTitleUtil,objectUrlUtil,queueDisplay,rafBatch,typeGuardUtil, and thebase/common/async+base/credits/comfyCreditshelpers. Test-only — no source changes.Review Focus
Measured with the critical-coverage gate (
pnpm test:coverage:critical) over the 27-file allow-list, before → after these tests:treeUtil.test.tsis intentionally held back — one case depends on acloneTreerefactor and ships with that source change in a later refactor PR.Note
Low Risk
Changes are limited to new and expanded unit tests; runtime behavior is unchanged.
Overview
Adds test-only Vitest coverage for base and shared utilities to raise branch coverage on the critical-coverage allow-list (~+7.2% branches per the PR description). There are no production source changes.
New suites exercise
runWhenGlobalIdle(native idle vs timeout fallback, cancel/dispose),FuseSearch/FuseFilter(auxiliary ranking, deprecated penalties, wildcards),createGridStyle,whileMouseDown,resolveNodeDisplayName, shared blobobjectUrlUtil, **createRafBatching, **buildJobDisplay/iconForJobState, and expandedtypeproposalCancellation, **clampUsd/formatCreditsedge cases, **typeGuardUtil** guards, and **queueDisplay` state branches.comfyCredits.test.tsgains cases for invalid fraction-digit bounds and USD clamping.Reviewed by Cursor Bugbot for commit a7f7471. Bugbot is set up for automated code reviews on this repo. Configure here.