Repository navigation
Conversation
📝 WalkthroughWalkthroughThis PR adds Vitest coverage for settings components, settings composables, core setting behaviors, and vue-node badge partitioning logic. It also refactors the ChangesSettings and node badge test additions
Estimated code review effort: 3 (Moderate) | ~25 minutes Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✨ 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 |
🎭 Playwright: ✅ 1691 passed, 0 failed · 2 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 7.78 MB gzip 🔴 +168 BDetailsSummary
Category Glance App Entry Points — 47.8 kB (baseline 47.8 kB) • ⚪ 0 BMain entry bundles and manifests
Status: 1 added / 1 removed Graph Workspace — 1.26 MB (baseline 1.26 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 98 kB (baseline 98 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 — 29.1 kB (baseline 29.1 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.5 kB (baseline 57.5 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.38 MB (baseline 3.38 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: 67 added / 67 removed / 98 unchanged ⚡ Performance Report
Show regressions
All metrics
Historical variance (last 15 runs)
Trend (last 15 commits on main)
Raw data{
"timestamp": "2026-07-08T04:19:08.616Z",
"gitSha": "7c23cb58f61b49b580182069b9d2dbb268abc59b",
"branch": "codex/coverage-core-settings-renderer",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2045.6670000000088,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.457999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 409.88,
"heapDeltaBytes": 1820504,
"heapUsedBytes": 54464508,
"domNodes": -292,
"jsHeapTotalBytes": 15855616,
"scriptDurationMs": 18.464000000000002,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-idle",
"durationMs": 2016.8100000000209,
"styleRecalcs": 8,
"styleRecalcDurationMs": 7.48,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 403.85800000000006,
"heapDeltaBytes": 18635032,
"heapUsedBytes": 70724972,
"domNodes": -291,
"jsHeapTotalBytes": 16642048,
"scriptDurationMs": 16.541,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1980.0009999999872,
"styleRecalcs": 77,
"styleRecalcDurationMs": 56.586999999999996,
"layouts": 12,
"layoutDurationMs": 4.176,
"taskDurationMs": 958.14,
"heapDeltaBytes": -12906808,
"heapUsedBytes": 56614076,
"domNodes": -243,
"jsHeapTotalBytes": 20074496,
"scriptDurationMs": 134.443,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1926.019999999994,
"styleRecalcs": 78,
"styleRecalcDurationMs": 45.329,
"layouts": 12,
"layoutDurationMs": 4.047999999999999,
"taskDurationMs": 843.079,
"heapDeltaBytes": -12612932,
"heapUsedBytes": 56908852,
"domNodes": -238,
"jsHeapTotalBytes": 19025920,
"scriptDurationMs": 121.08699999999999,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1738.5830000000055,
"styleRecalcs": 32,
"styleRecalcDurationMs": 17.852,
"layouts": 6,
"layoutDurationMs": 0.7300000000000002,
"taskDurationMs": 382.10999999999996,
"heapDeltaBytes": -3741368,
"heapUsedBytes": 65731828,
"domNodes": -229,
"jsHeapTotalBytes": 12996608,
"scriptDurationMs": 22.905,
"eventListeners": -184,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1743.7770000000228,
"styleRecalcs": 30,
"styleRecalcDurationMs": 16.752000000000002,
"layouts": 6,
"layoutDurationMs": 0.68,
"taskDurationMs": 345.34400000000005,
"heapDeltaBytes": 6832344,
"heapUsedBytes": 58520036,
"domNodes": -240,
"jsHeapTotalBytes": 3272704,
"scriptDurationMs": 18.358000000000004,
"eventListeners": -185,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 597.3400000000026,
"styleRecalcs": 12,
"styleRecalcDurationMs": 9.368000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 356.73199999999997,
"heapDeltaBytes": 8748880,
"heapUsedBytes": 68620140,
"domNodes": 20,
"jsHeapTotalBytes": 19398656,
"scriptDurationMs": 58.085,
"eventListeners": 2,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 607.9929999999649,
"styleRecalcs": 12,
"styleRecalcDurationMs": 9.483,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 378.18600000000004,
"heapDeltaBytes": -22762592,
"heapUsedBytes": 46753280,
"domNodes": -278,
"jsHeapTotalBytes": 5394432,
"scriptDurationMs": 54.45700000000001,
"eventListeners": -203,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2038.7359999999717,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.394,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 550.658,
"heapDeltaBytes": -9662116,
"heapUsedBytes": 62050032,
"domNodes": 20,
"jsHeapTotalBytes": 10104832,
"scriptDurationMs": 98.71400000000001,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 1992.5069999999891,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.654,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 494.38300000000004,
"heapDeltaBytes": -9571148,
"heapUsedBytes": 62181484,
"domNodes": 20,
"jsHeapTotalBytes": 11153408,
"scriptDurationMs": 81.132,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2148.5770000000457,
"styleRecalcs": 70,
"styleRecalcDurationMs": 21.368999999999996,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1107.542,
"heapDeltaBytes": -12816320,
"heapUsedBytes": 55475688,
"domNodes": -271,
"jsHeapTotalBytes": -1843200,
"scriptDurationMs": 387.707,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-pan",
"durationMs": 2073.3900000000176,
"styleRecalcs": 67,
"styleRecalcDurationMs": 17.738999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1021.2109999999999,
"heapDeltaBytes": 2316832,
"heapUsedBytes": 55003252,
"domNodes": -281,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 369.49299999999994,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3119.437000000005,
"styleRecalcs": 63,
"styleRecalcDurationMs": 17.709,
"layouts": 60,
"layoutDurationMs": 8.79,
"taskDurationMs": 1387.621,
"heapDeltaBytes": 14336916,
"heapUsedBytes": 68054348,
"domNodes": -285,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 538.005,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "large-graph-zoom",
"durationMs": 3136.8699999999876,
"styleRecalcs": 63,
"styleRecalcDurationMs": 18.41,
"layouts": 60,
"layoutDurationMs": 8.836,
"taskDurationMs": 1362.9089999999999,
"heapDeltaBytes": 14201496,
"heapUsedBytes": 67748732,
"domNodes": -282,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 527.2320000000001,
"eventListeners": -195,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "minimap-idle",
"durationMs": 2032.8309999999874,
"styleRecalcs": 8,
"styleRecalcDurationMs": 8.157000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 549.14,
"heapDeltaBytes": 12125844,
"heapUsedBytes": 72869164,
"domNodes": 16,
"jsHeapTotalBytes": 20447232,
"scriptDurationMs": 97.696,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2007.2779999999284,
"styleRecalcs": 5,
"styleRecalcDurationMs": 3.8119999999999994,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 461.72999999999996,
"heapDeltaBytes": 6753996,
"heapUsedBytes": 61317656,
"domNodes": -269,
"jsHeapTotalBytes": 1048576,
"scriptDurationMs": 77.72299999999998,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 580.9530000000223,
"styleRecalcs": 47,
"styleRecalcDurationMs": 12.633999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 391.092,
"heapDeltaBytes": 7785440,
"heapUsedBytes": 66675844,
"domNodes": 20,
"jsHeapTotalBytes": 19660800,
"scriptDurationMs": 128.551,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66666666666665,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 596.9330000000355,
"styleRecalcs": 47,
"styleRecalcDurationMs": 16.115,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 407.42400000000004,
"heapDeltaBytes": -22088228,
"heapUsedBytes": 47525864,
"domNodes": -277,
"jsHeapTotalBytes": 5656576,
"scriptDurationMs": 122.88600000000001,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 1999.5779999999854,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.663000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 355.607,
"heapDeltaBytes": 1624700,
"heapUsedBytes": 58515980,
"domNodes": 18,
"jsHeapTotalBytes": 18087936,
"scriptDurationMs": 14.277,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-idle",
"durationMs": 2045.735000000036,
"styleRecalcs": 10,
"styleRecalcDurationMs": 10.076000000000002,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 406.899,
"heapDeltaBytes": -8112748,
"heapUsedBytes": 61586268,
"domNodes": -276,
"jsHeapTotalBytes": 19025920,
"scriptDurationMs": 12.593000000000002,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1742.5140000000283,
"styleRecalcs": 75,
"styleRecalcDurationMs": 40.912000000000006,
"layouts": 16,
"layoutDurationMs": 4.863,
"taskDurationMs": 744.318,
"heapDeltaBytes": 18500432,
"heapUsedBytes": 70811156,
"domNodes": -250,
"jsHeapTotalBytes": 15331328,
"scriptDurationMs": 96.844,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1740.666000000033,
"styleRecalcs": 78,
"styleRecalcDurationMs": 40.321999999999996,
"layouts": 16,
"layoutDurationMs": 4.542,
"taskDurationMs": 704.7070000000001,
"heapDeltaBytes": -17052552,
"heapUsedBytes": 52690560,
"domNodes": -236,
"jsHeapTotalBytes": 19812352,
"scriptDurationMs": 92.04300000000002,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-transition-enter",
"durationMs": 1014.8130000000037,
"styleRecalcs": 18,
"styleRecalcDurationMs": 32.964000000000006,
"layouts": 14,
"layoutDurationMs": 14.508999999999997,
"taskDurationMs": 804.1290000000001,
"heapDeltaBytes": 27771472,
"heapUsedBytes": 99653452,
"domNodes": 13673,
"jsHeapTotalBytes": 17301504,
"scriptDurationMs": 30.743000000000006,
"eventListeners": 2531,
"totalBlockingTimeMs": 154,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8155.668999999989,
"styleRecalcs": 251,
"styleRecalcDurationMs": 65.592,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3832.0999999999995,
"heapDeltaBytes": -1026792,
"heapUsedBytes": 71208396,
"domNodes": 22,
"jsHeapTotalBytes": 18407424,
"scriptDurationMs": 1230.394,
"eventListeners": 20,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8198.958999999944,
"styleRecalcs": 250,
"styleRecalcDurationMs": 62.162,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3633.8369999999995,
"heapDeltaBytes": 1342808,
"heapUsedBytes": 68934856,
"domNodes": -271,
"jsHeapTotalBytes": -589824,
"scriptDurationMs": 1199.314,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 13608.518000000004,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13592.098,
"heapDeltaBytes": -26774260,
"heapUsedBytes": 166148168,
"domNodes": -3300,
"jsHeapTotalBytes": 11796480,
"scriptDurationMs": 526.241,
"eventListeners": -16368,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 13500.830999999947,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 13485.426,
"heapDeltaBytes": -36179108,
"heapUsedBytes": 166383460,
"domNodes": -3300,
"jsHeapTotalBytes": -1863680,
"scriptDurationMs": 531.452,
"eventListeners": -16378,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.776666666666763,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 16412.180000000037,
"styleRecalcs": 93,
"styleRecalcDurationMs": 22.085000000000022,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16388.37,
"heapDeltaBytes": -61883784,
"heapUsedBytes": 154784612,
"domNodes": -3300,
"jsHeapTotalBytes": 13893632,
"scriptDurationMs": 792.517,
"eventListeners": -16366,
"totalBlockingTimeMs": 51,
"frameDurationMs": 18.333333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 16820.768000000044,
"styleRecalcs": 110,
"styleRecalcDurationMs": 23.33799999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 16797.802,
"heapDeltaBytes": -22081012,
"heapUsedBytes": 167655248,
"domNodes": -3302,
"jsHeapTotalBytes": 15437824,
"scriptDurationMs": 796.9649999999999,
"eventListeners": -16369,
"totalBlockingTimeMs": 26,
"frameDurationMs": 18.889999999999905,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 489.74299999997584,
"styleRecalcs": 15,
"styleRecalcDurationMs": 24.602,
"layouts": 4,
"layoutDurationMs": 1.2660000000000002,
"taskDurationMs": 229.84300000000002,
"heapDeltaBytes": -21733716,
"heapUsedBytes": 49174188,
"domNodes": -172,
"jsHeapTotalBytes": 4083712,
"scriptDurationMs": 23.666,
"eventListeners": -134,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000273
},
{
"name": "workflow-execution",
"durationMs": 472.2469999999248,
"styleRecalcs": 22,
"styleRecalcDurationMs": 26.028999999999996,
"layouts": 5,
"layoutDurationMs": 1.6710000000000003,
"taskDurationMs": 122.871,
"heapDeltaBytes": 5064760,
"heapUsedBytes": 69636916,
"domNodes": 181,
"jsHeapTotalBytes": 4980736,
"scriptDurationMs": 18.227000000000004,
"eventListeners": 71,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
}
]
} |
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #13374 +/- ##
==========================================
+ Coverage 77.83% 77.93% +0.09%
==========================================
Files 1648 1648
Lines 96953 96142 -811
Branches 33770 32563 -1207
==========================================
- Hits 75467 74929 -538
+ Misses 20771 20523 -248
+ Partials 715 690 -25
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
25914bf to
78f8fd8
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
|
@coderabbitai approve |
✅ Action performedComments resolved and changes approved. |
6e11d4a to
5a82742
Compare
|
@coderabbitai review |
✅ Action performedReview finished.
|
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/platform/settings/composables/useLitegraphSettings.test.ts`:
- Around line 13-31: The test mock for canvasStore.canvas is non-reactive, so it
cannot exercise the real shallowRef-style absent-to-present transition that
useLitegraphSettings depends on. Update the canvasStore mock in
useLitegraphSettings.test.ts to behave like a reactive ref matching
canvasStore.canvas from useLitegraphSettings/canvasStore, then add a test that
starts with no canvas, mounts the composable, and later assigns a canvas so the
watchEffects can rerun and verify the settings are applied after availability
changes.
🪄 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: ff76a285-49b3-442a-a46f-f1965a9e885d
📒 Files selected for processing (8)
src/platform/settings/components/ColorPaletteMessage.test.tssrc/platform/settings/components/ExtensionPanel.test.tssrc/platform/settings/components/ServerConfigPanel.test.tssrc/platform/settings/components/SettingDialog.test.tssrc/platform/settings/composables/useLitegraphSettings.test.tssrc/platform/settings/composables/useSettingUI.test.tssrc/platform/settings/constants/coreSettings.test.tssrc/renderer/extensions/vueNodes/composables/usePartitionedBadges.test.ts
5a82742 to
38c6fd9
Compare
|
@coderabbitai review |
Rate Limit Exceeded
|
|
@coderabbitai approve |
Rate Limit Exceeded
|
|
@coderabbitai approve |
✅ Action performedComments resolved and changes approved. |
DrJKL
left a comment
There was a problem hiding this comment.
Abby Cadabby found one high-impact mock mismatch. A tiny bit more magic in the fixture should keep this composable test from hiding runtime failures.
…type-safe patterns
- Swap vi.mock('vue-i18n') in 4 component tests and useSettingUI.test.ts
for createI18n({legacy:false, locale:'en', messages:{en:{}}}) passed via
global.plugins; removes all five vue-i18n-mock warnings
- Replace fromAny({$t:...}) globalProperties hack with the real i18n plugin
- Fix keybinding migration test: drop unnecessary double cast by passing
the array directly to the migrateDeprecatedValue(val: unknown) function
- Fix useSettingUI fallback test: use 'subscription' (a valid but absent
SettingPanelType) instead of a casted 'missing' string literal
- Add missing `type` ref to useBillingContext mock in useSettingUI.test.ts
so the mock matches the full production BillingContext contract
- Wrap useSettingUI() calls in a runSettingUI helper that mounts the
composable inside a minimal component with i18n installed
a2e1344 to
182229c
Compare
There was a problem hiding this comment.
Actionable comments posted: 4
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/platform/settings/composables/useSettingUI.test.ts (1)
85-92: 📐 Maintainability & Code Quality | 🔵 Trivial | ⚡ Quick winDuplicated
SettingParams-like shape instead of importing the real type.
MockSettingParamsre-declares fields (id,name,type,defaultValue,category,hideInVueNodes) that mirror the productionSettingParamstype used byuseSettingUI.ts. Importing the real type keeps the mock in sync automatically if the production shape changes.Based on learnings, "avoid duplicating interface/type definitions. Import real type definitions from the component modules under test and reference them directly, so there is a single source of truth and to prevent type drift."
🤖 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/platform/settings/composables/useSettingUI.test.ts` around lines 85 - 92, The test is duplicating the production setting shape with MockSettingParams instead of using the real SettingParams type, which can drift from useSettingUI.ts over time. Replace the local interface in useSettingUI.test.ts with an import of the actual SettingParams definition from the module under test, and update any mock fixtures to use that imported type directly so the test stays aligned with the production contract.Source: Learnings
🤖 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/platform/settings/components/ExtensionPanel.test.ts`:
- Around line 217-296: The ExtensionPanel tests rely on
`getByTestId('extension-table')` and `getByTestId('extension-message')` for text
assertions where a user-facing query may be available. Update the affected
assertions in `ExtensionPanel.test.ts` to prefer accessible selectors and
content checks via roles, visible text, or accessible names when possible, while
keeping `data-testid` only for mocked PrimeVue internals that have no semantic
equivalent. Focus on the bulk of the checks around the render/click flows and
the `renderPanel`-driven assertions.
In `@src/platform/settings/components/SettingDialog.test.ts`:
- Around line 15-22: The test file is duplicating production type shapes with
MockSettingTreeNode and the inline mockSettingSearch.refs.results structure
instead of using the real types from the composables under test. Update the
SettingDialog.test.ts mocks to import and reference the actual SettingTreeNode
type and the search result item type from useSettingUI.ts/useSettingSearch.ts,
and then apply those types to the mock data so the test stays aligned with
production shapes and avoids type drift.
In `@src/platform/settings/constants/coreSettings.test.ts`:
- Around line 41-56: The sidebar size tests are stubbing the global innerWidth
without cleanup, so the stub can leak into later tests in the same worker. Add
an afterEach in the coreSettings.test suite to call vi.unstubAllGlobals() after
the tests that use vi.stubGlobal, and keep the existing assertions around
setting('Comfy.Sidebar.Size').defaultValue unchanged.
In `@src/renderer/extensions/vueNodes/composables/usePartitionedBadges.test.ts`:
- Around line 115-133: The test in usePartitionedBadges is too weak and does not
actually verify dependency tracking for the api node. Strengthen it by asserting
the behavioral effects of usePartitionedBadges: check that getWidgetMock is
invoked for the dynamic pricing widget name seed and that the relevant input
slots such as model and lora.0 are read/tracked, similar to the assertions used
in trackNodePrice. Keep the existing no-throw setup, but replace the generic
core/extension property checks with expectations tied to these specific symbols
so the test fails if tracking logic is removed.
---
Outside diff comments:
In `@src/platform/settings/composables/useSettingUI.test.ts`:
- Around line 85-92: The test is duplicating the production setting shape with
MockSettingParams instead of using the real SettingParams type, which can drift
from useSettingUI.ts over time. Replace the local interface in
useSettingUI.test.ts with an import of the actual SettingParams definition from
the module under test, and update any mock fixtures to use that imported type
directly so the test stays aligned with the production contract.
🪄 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: 1fae42b2-b7d9-4cc0-9b28-d3842dc8f1b7
📒 Files selected for processing (8)
src/platform/settings/components/ColorPaletteMessage.test.tssrc/platform/settings/components/ExtensionPanel.test.tssrc/platform/settings/components/ServerConfigPanel.test.tssrc/platform/settings/components/SettingDialog.test.tssrc/platform/settings/composables/useLitegraphSettings.test.tssrc/platform/settings/composables/useSettingUI.test.tssrc/platform/settings/constants/coreSettings.test.tssrc/renderer/extensions/vueNodes/composables/usePartitionedBadges.test.ts
| expect(screen.getByTestId('extension-table')).toHaveTextContent( | ||
| 'core.color' | ||
| ) | ||
| expect(screen.getByTestId('extension-table')).toHaveTextContent( | ||
| 'custom.pack' | ||
| ) | ||
|
|
||
| await userEvent.click(screen.getByRole('button', { name: 'g.core' })) | ||
| expect(screen.getByTestId('extension-table')).toHaveTextContent( | ||
| 'core.color' | ||
| ) | ||
| expect(screen.getByTestId('extension-table')).not.toHaveTextContent( | ||
| 'custom.pack' | ||
| ) | ||
|
|
||
| await userEvent.click(screen.getByRole('button', { name: 'g.custom' })) | ||
| expect(screen.getByTestId('extension-table')).not.toHaveTextContent( | ||
| 'core.color' | ||
| ) | ||
| expect(screen.getByTestId('extension-table')).toHaveTextContent( | ||
| 'custom.pack' | ||
| ) | ||
| expect(screen.getByTestId('extension-table')).toHaveTextContent( | ||
| 'readonly.pack' | ||
| ) | ||
| }) | ||
|
|
||
| it('applies selected extension commands without changing read-only rows', async () => { | ||
| renderPanel() | ||
|
|
||
| await userEvent.click(screen.getByTestId('select-visible')) | ||
| await userEvent.click( | ||
| screen.getByRole('button', { name: 'g.disableSelected' }) | ||
| ) | ||
|
|
||
| expect(mockSettingStore.set).toHaveBeenLastCalledWith( | ||
| 'Comfy.Extension.Disabled', | ||
| ['inactive.pack', 'core.color', 'custom.pack'] | ||
| ) | ||
| expect(screen.getByTestId('extension-message')).toHaveTextContent( | ||
| 'core.color' | ||
| ) | ||
| expect(screen.getByTestId('extension-message')).toHaveTextContent( | ||
| 'custom.pack' | ||
| ) | ||
| expect(screen.getByTestId('extension-message')).not.toHaveTextContent( | ||
| 'readonly.pack' | ||
| ) | ||
|
|
||
| await userEvent.click( | ||
| screen.getByRole('button', { name: 'g.enableSelected' }) | ||
| ) | ||
| expect(mockSettingStore.set).toHaveBeenLastCalledWith( | ||
| 'Comfy.Extension.Disabled', | ||
| ['inactive.pack'] | ||
| ) | ||
| }) | ||
|
|
||
| it('applies bulk commands and disables third-party command when unavailable', async () => { | ||
| const { unmount } = renderPanel() | ||
|
|
||
| await userEvent.click(screen.getByRole('button', { name: 'g.disableAll' })) | ||
| expect(mockSettingStore.set).toHaveBeenLastCalledWith( | ||
| 'Comfy.Extension.Disabled', | ||
| ['inactive.pack', 'core.color', 'custom.pack'] | ||
| ) | ||
|
|
||
| await userEvent.click(screen.getByRole('button', { name: 'g.enableAll' })) | ||
| expect(mockSettingStore.set).toHaveBeenLastCalledWith( | ||
| 'Comfy.Extension.Disabled', | ||
| ['inactive.pack'] | ||
| ) | ||
|
|
||
| await userEvent.click( | ||
| screen.getByRole('button', { name: 'g.disableThirdParty' }) | ||
| ) | ||
| expect(mockSettingStore.set).toHaveBeenLastCalledWith( | ||
| 'Comfy.Extension.Disabled', | ||
| ['inactive.pack', 'custom.pack', 'readonly.pack'] | ||
| ) |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
Consider accessible-content queries over data-testid where feasible.
Assertions like toHaveTextContent target data-testid containers (extension-table, extension-message) rather than accessible roles/text. Given the heavy mocking of PrimeVue internals here, some data-testid usage is a pragmatic necessity, but where a semantic query is achievable (e.g. querying rows by role/text directly) it would better validate user-facing behavior.
Based on learnings, "In test files, prefer selecting or asserting on accessible properties (text content, aria-label, role, accessible name) over data-testid attributes."
🤖 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/platform/settings/components/ExtensionPanel.test.ts` around lines 217 -
296, The ExtensionPanel tests rely on `getByTestId('extension-table')` and
`getByTestId('extension-message')` for text assertions where a user-facing query
may be available. Update the affected assertions in `ExtensionPanel.test.ts` to
prefer accessible selectors and content checks via roles, visible text, or
accessible names when possible, while keeping `data-testid` only for mocked
PrimeVue internals that have no semantic equivalent. Focus on the bulk of the
checks around the render/click flows and the `renderPanel`-driven assertions.
Source: Learnings
There was a problem hiding this comment.
Keeping the data-testid scoping here. The extension-table/extension-message containers are the local mock stand-ins for PrimeVue DataTable/Message, which have no intrinsic accessible role once mocked — adding a role to the mock template would just be asserting on semantics the test itself fabricated. The scoping is also load-bearing: after disableSelected, core.color appears in both the table and the warning message, so an unscoped text query is ambiguous and within(getByRole(...)) has nothing real to target. All interactive elements (filter buttons, commands, toggles) are already queried by role.
There was a problem hiding this comment.
Rate Limit Exceeded
@huang47 have exceeded the limit for the number of chat messages per hour. Please wait 28 minutes and 40 seconds before sending another message.
- unstub window.innerWidth after each coreSettings test - derive SettingDialog mock types from SettingTreeNode/SettingParams/ISettingGroup - assert dynamic-pricing dependency reads in usePartitionedBadges test
|
@coderabbitai review |
Rate Limit Exceeded
|
|
Addressed the still-live feedback in Intentionally not applied: the ExtensionPanel.test.ts testid→role conversion — deferred as style, and CodeRabbit itself allows keeping data-testid for mocked PrimeVue internals with no semantic equivalent. Other items (SettingDialog type reuse, coreSettings unstubAllGlobals, usePartitionedBadges assertion strength) were already resolved on the branch. |
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
src/platform/settings/composables/useSettingUI.test.ts (1)
227-258: 🎯 Functional Correctness | 🔵 Trivial | ⚡ Quick winSplit cloud and desktop gate coverage into separate cases
src/platform/settings/composables/useSettingUI.test.ts:isCloudandisDesktopare mutually exclusive in production, so this single test exercises an impossible state and can’t distinguish cloud-vs-desktop gating bugs. Cover each distribution in its own test instead.🤖 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/platform/settings/composables/useSettingUI.test.ts` around lines 227 - 258, The current useSettingUI test combines dist.isCloud and dist.isDesktop in one case, but those states are mutually exclusive and hide distribution-specific regressions. Split this into separate tests in useSettingUI.test.ts: one that sets dist.isCloud for cloud gating and another that sets dist.isDesktop for desktop gating, while keeping the shared assertions around runSettingUI, findCategoryByKey, findPanelByKey, navGroups, and panels in the appropriate scenario.
🤖 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.
Outside diff comments:
In `@src/platform/settings/composables/useSettingUI.test.ts`:
- Around line 227-258: The current useSettingUI test combines dist.isCloud and
dist.isDesktop in one case, but those states are mutually exclusive and hide
distribution-specific regressions. Split this into separate tests in
useSettingUI.test.ts: one that sets dist.isCloud for cloud gating and another
that sets dist.isDesktop for desktop gating, while keeping the shared assertions
around runSettingUI, findCategoryByKey, findPanelByKey, navGroups, and panels in
the appropriate scenario.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: ASSERTIVE
Plan: Pro Plus
Run ID: b85c14d9-9d4e-45e6-9a20-fed648af1a95
📒 Files selected for processing (4)
src/platform/settings/components/SettingDialog.test.tssrc/platform/settings/composables/useSettingUI.test.tssrc/platform/settings/constants/coreSettings.test.tssrc/renderer/extensions/vueNodes/composables/usePartitionedBadges.test.ts
addressed in follow-up commits
Add a companion assertion proving the missing-button branch actually took the early-return path, instead of relying on bare not.toThrow().
|
Closing this stale generated coverage batch. The critical coverage gate is already on main; the old settings/renderer test expansion no longer justifies its rebase and maintenance cost. |
Note
Test proposal: https://app.notion.com/p/comfy-org/Test-Coverage-PR-Split-38e6d73d3650815a977ce2e9213cd653?source=copy_link
Summary
Critical branch coverage
Tests
pnpm test:coverage:criticalon clean aggregate: 1065 files passed, 14720 tests passed, 8 skipped.Side-effect policy
This PR is test-only. It does not include production code, scripts, config, or workflow changes. Any mandatory production fix or side effect must be a separate follow-up PR with an explicit justification.
Created by Codex
Note
Low Risk
No production, config, or workflow changes—only new and extended unit/component tests with mocks.
Overview
Test-only PR that adds Vitest coverage for core settings UI, composables, and related renderer paths to support the critical branch-coverage push toward 90%.
New suites exercise settings panels and dialogs: color palette import/export/delete and persistence, extension filtering and bulk enable/disable (including read-only rows), server config display/revert/restart/unmount warnings and setting persistence, and SettingDialog navigation, search, sorting, credits balance fetch, and scroll-to-setting highlight behavior.
Composables and constants gain coverage for
useLitegraphSettings(canvas mount timing and reactive updates), a substantially expandeduseSettingUI(feature gates, nav/panels, billing layouts),CORE_SETTINGShandlers (navigation presets, migrations, DOM side effects), andusePartitionedBadges/trackNodePricefor Vue node badges and dynamic pricing dependencies.Reviewed by Cursor Bugbot for commit 65bd017. Bugbot is set up for automated code reviews on this repo. Configure here.