test: cover metadata parser and manager pack composables#13334
Conversation
📝 WalkthroughWalkthroughThis PR adds three new Vitest test files covering ChangesNew unit test suites
Estimated code review effort: 2 (Simple) | ~15 minutes Related issues: None specified Related PRs: None specified Suggested labels: tests Suggested reviewers: None specified 🐰 Three test files hop into view, 🚥 Pre-merge checks | ✅ 6✅ Passed checks (6 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 · 1 flaky📊 Browser Reports
🎨 Storybook: ✅ Built — View Storybook📦 Bundle: 7.77 MB gzip 🔴 +11 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-01T05:57:41.012Z",
"gitSha": "0012dbe792429126211246b221ee962aa3018fbe",
"branch": "shihchi/coverage-metadata-manager",
"measurements": [
{
"name": "canvas-idle",
"durationMs": 2041.5640000000224,
"styleRecalcs": 8,
"styleRecalcDurationMs": 9.046,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 446.13900000000007,
"heapDeltaBytes": -3329720,
"heapUsedBytes": 49590152,
"domNodes": -290,
"jsHeapTotalBytes": 17690624,
"scriptDurationMs": 17.163,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-idle",
"durationMs": 2038.4770000000003,
"styleRecalcs": 9,
"styleRecalcDurationMs": 8.589,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 388.08799999999997,
"heapDeltaBytes": 19852640,
"heapUsedBytes": 71470792,
"domNodes": -290,
"jsHeapTotalBytes": 16117760,
"scriptDurationMs": 16.204000000000004,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1814.185999999978,
"styleRecalcs": 76,
"styleRecalcDurationMs": 42.814,
"layouts": 12,
"layoutDurationMs": 3.4579999999999997,
"taskDurationMs": 829.548,
"heapDeltaBytes": -13078312,
"heapUsedBytes": 56377772,
"domNodes": -238,
"jsHeapTotalBytes": 19558400,
"scriptDurationMs": 123.55700000000002,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "canvas-mouse-sweep",
"durationMs": 1843.2700000000182,
"styleRecalcs": 76,
"styleRecalcDurationMs": 39.521,
"layouts": 12,
"layoutDurationMs": 3.773,
"taskDurationMs": 754.104,
"heapDeltaBytes": -1539160,
"heapUsedBytes": 61759060,
"domNodes": 58,
"jsHeapTotalBytes": 15990784,
"scriptDurationMs": 122.45000000000002,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66999999999998,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1729.5070000000123,
"styleRecalcs": 32,
"styleRecalcDurationMs": 18.605999999999998,
"layouts": 6,
"layoutDurationMs": 0.6950000000000001,
"taskDurationMs": 359.379,
"heapDeltaBytes": -3663448,
"heapUsedBytes": 65691892,
"domNodes": -224,
"jsHeapTotalBytes": 13791232,
"scriptDurationMs": 18.953999999999997,
"eventListeners": -184,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "canvas-zoom-sweep",
"durationMs": 1739.8959999999306,
"styleRecalcs": 33,
"styleRecalcDurationMs": 22.75,
"layouts": 6,
"layoutDurationMs": 0.5509999999999998,
"taskDurationMs": 310.168,
"heapDeltaBytes": 1494020,
"heapUsedBytes": 59078200,
"domNodes": 79,
"jsHeapTotalBytes": 24641536,
"scriptDurationMs": 18.636,
"eventListeners": 19,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "dom-widget-clipping",
"durationMs": 592.376999999999,
"styleRecalcs": 12,
"styleRecalcDurationMs": 9.061,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 360.738,
"heapDeltaBytes": 6028544,
"heapUsedBytes": 60671760,
"domNodes": 20,
"jsHeapTotalBytes": 10747904,
"scriptDurationMs": 63.664,
"eventListeners": 0,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "dom-widget-clipping",
"durationMs": 624.7899999999618,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.072000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 394.02700000000004,
"heapDeltaBytes": 2697308,
"heapUsedBytes": 72087064,
"domNodes": -285,
"jsHeapTotalBytes": 6189056,
"scriptDurationMs": 57.83699999999999,
"eventListeners": -203,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2020.2859999999987,
"styleRecalcs": 10,
"styleRecalcDurationMs": 10.357999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 559.7970000000001,
"heapDeltaBytes": 4619068,
"heapUsedBytes": 64722376,
"domNodes": -264,
"jsHeapTotalBytes": 3432448,
"scriptDurationMs": 97.28300000000002,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-idle",
"durationMs": 2065.242000000012,
"styleRecalcs": 9,
"styleRecalcDurationMs": 14.383,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 540.242,
"heapDeltaBytes": -551820,
"heapUsedBytes": 58925992,
"domNodes": -272,
"jsHeapTotalBytes": -1605632,
"scriptDurationMs": 92.708,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333335,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-pan",
"durationMs": 2057.7590000000328,
"styleRecalcs": 66,
"styleRecalcDurationMs": 14.762,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1037.2379999999998,
"heapDeltaBytes": 26909496,
"heapUsedBytes": 81559600,
"domNodes": 8,
"jsHeapTotalBytes": 1515520,
"scriptDurationMs": 384.007,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "large-graph-pan",
"durationMs": 2095.234000000005,
"styleRecalcs": 68,
"styleRecalcDurationMs": 17.088,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 1059.802,
"heapDeltaBytes": 20669088,
"heapUsedBytes": 81257496,
"domNodes": -279,
"jsHeapTotalBytes": -352256,
"scriptDurationMs": 378.915,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3097.295000000031,
"styleRecalcs": 63,
"styleRecalcDurationMs": 16.674000000000003,
"layouts": 60,
"layoutDurationMs": 7.311999999999999,
"taskDurationMs": 1286.211,
"heapDeltaBytes": 13586092,
"heapUsedBytes": 69444576,
"domNodes": 8,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 478.294,
"eventListeners": 8,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "large-graph-zoom",
"durationMs": 3111.2549999999715,
"styleRecalcs": 63,
"styleRecalcDurationMs": 15.740999999999998,
"layouts": 60,
"layoutDurationMs": 7.188,
"taskDurationMs": 1285.111,
"heapDeltaBytes": 13627496,
"heapUsedBytes": 66921840,
"domNodes": -283,
"jsHeapTotalBytes": 0,
"scriptDurationMs": 491.93800000000005,
"eventListeners": -195,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "minimap-idle",
"durationMs": 1994.2819999999983,
"styleRecalcs": 10,
"styleRecalcDurationMs": 9.691000000000003,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 485.58599999999996,
"heapDeltaBytes": -9362888,
"heapUsedBytes": 64437024,
"domNodes": 20,
"jsHeapTotalBytes": 8269824,
"scriptDurationMs": 84.745,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "minimap-idle",
"durationMs": 2019.369000000097,
"styleRecalcs": 10,
"styleRecalcDurationMs": 8.589,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 487.126,
"heapDeltaBytes": -9280016,
"heapUsedBytes": 63889012,
"domNodes": 20,
"jsHeapTotalBytes": 9842688,
"scriptDurationMs": 86.579,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.800000000000182
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 587.3090000000047,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.274000000000001,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 366.607,
"heapDeltaBytes": 9368156,
"heapUsedBytes": 66946112,
"domNodes": 20,
"jsHeapTotalBytes": 15990784,
"scriptDurationMs": 125.55,
"eventListeners": 6,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-dom-widget-clipping",
"durationMs": 622.3720000000412,
"styleRecalcs": 47,
"styleRecalcDurationMs": 11.754,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 405.26399999999995,
"heapDeltaBytes": -23022396,
"heapUsedBytes": 46385188,
"domNodes": -278,
"jsHeapTotalBytes": 6713344,
"scriptDurationMs": 117.19300000000001,
"eventListeners": -197,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.663333333333338,
"p95FrameDurationMs": 16.699999999999818
},
{
"name": "subgraph-idle",
"durationMs": 2038.3339999999919,
"styleRecalcs": 11,
"styleRecalcDurationMs": 9.792,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 393.318,
"heapDeltaBytes": -7981320,
"heapUsedBytes": 61551804,
"domNodes": -277,
"jsHeapTotalBytes": 19296256,
"scriptDurationMs": 14.109,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-idle",
"durationMs": 1996.849999999995,
"styleRecalcs": 11,
"styleRecalcDurationMs": 10.346999999999998,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 343.952,
"heapDeltaBytes": -1889656,
"heapUsedBytes": 57176832,
"domNodes": 22,
"jsHeapTotalBytes": 25165824,
"scriptDurationMs": 13.68,
"eventListeners": 4,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1726.0630000000106,
"styleRecalcs": 75,
"styleRecalcDurationMs": 38.462,
"layouts": 16,
"layoutDurationMs": 4.644,
"taskDurationMs": 740.689,
"heapDeltaBytes": 19101780,
"heapUsedBytes": 71684088,
"domNodes": -262,
"jsHeapTotalBytes": 17428480,
"scriptDurationMs": 96.275,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "subgraph-mouse-sweep",
"durationMs": 1744.9510000000146,
"styleRecalcs": 77,
"styleRecalcDurationMs": 40.812,
"layouts": 16,
"layoutDurationMs": 4.303000000000001,
"taskDurationMs": 746.886,
"heapDeltaBytes": -17025376,
"heapUsedBytes": 52447428,
"domNodes": -241,
"jsHeapTotalBytes": 19820544,
"scriptDurationMs": 94.829,
"eventListeners": -199,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "subgraph-transition-enter",
"durationMs": 930.6709999999612,
"styleRecalcs": 15,
"styleRecalcDurationMs": 28.618,
"layouts": 4,
"layoutDurationMs": 13.963999999999997,
"taskDurationMs": 713.815,
"heapDeltaBytes": 4403408,
"heapUsedBytes": 81269724,
"domNodes": 13833,
"jsHeapTotalBytes": 16515072,
"scriptDurationMs": 24.701,
"eventListeners": 2533,
"totalBlockingTimeMs": 162,
"frameDurationMs": 16.666666666666668,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "viewport-pan-sweep",
"durationMs": 8212.481999999965,
"styleRecalcs": 251,
"styleRecalcDurationMs": 55.52,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3866.2340000000004,
"heapDeltaBytes": -1427096,
"heapUsedBytes": 65680096,
"domNodes": -267,
"jsHeapTotalBytes": 991232,
"scriptDurationMs": 1250.156,
"eventListeners": -183,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "viewport-pan-sweep",
"durationMs": 8250.041000000067,
"styleRecalcs": 250,
"styleRecalcDurationMs": 54.38999999999999,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 3980.304,
"heapDeltaBytes": -8699112,
"heapUsedBytes": 65602720,
"domNodes": -263,
"jsHeapTotalBytes": 8941568,
"scriptDurationMs": 1401.127,
"eventListeners": -128,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.670000000000012,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-idle",
"durationMs": 12564.179000000024,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12540.608,
"heapDeltaBytes": -57170080,
"heapUsedBytes": 170809056,
"domNodes": -3300,
"jsHeapTotalBytes": 3903488,
"scriptDurationMs": 572.751,
"eventListeners": -16378,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-idle",
"durationMs": 12252.287000000024,
"styleRecalcs": 0,
"styleRecalcDurationMs": 0,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 12241.483,
"heapDeltaBytes": -27430764,
"heapUsedBytes": 185444532,
"domNodes": -3300,
"jsHeapTotalBytes": 1806336,
"scriptDurationMs": 553.198,
"eventListeners": -16378,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333358,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "vue-large-graph-pan",
"durationMs": 14271.119999999995,
"styleRecalcs": 66,
"styleRecalcDurationMs": 17.00999999999997,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14250.824000000002,
"heapDeltaBytes": -53703304,
"heapUsedBytes": 157189792,
"domNodes": -3300,
"jsHeapTotalBytes": -2650112,
"scriptDurationMs": 858.7739999999999,
"eventListeners": -16376,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.220000000000073,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "vue-large-graph-pan",
"durationMs": 14901.343999999994,
"styleRecalcs": 72,
"styleRecalcDurationMs": 17.99900000000004,
"layouts": 0,
"layoutDurationMs": 0,
"taskDurationMs": 14880.299,
"heapDeltaBytes": -39881576,
"heapUsedBytes": 168168444,
"domNodes": -3304,
"jsHeapTotalBytes": 20418560,
"scriptDurationMs": 832.0029999999999,
"eventListeners": -16374,
"totalBlockingTimeMs": 0,
"frameDurationMs": 17.223333333333237,
"p95FrameDurationMs": 16.799999999999272
},
{
"name": "workflow-execution",
"durationMs": 479.2879999999968,
"styleRecalcs": 17,
"styleRecalcDurationMs": 23.650000000000006,
"layouts": 4,
"layoutDurationMs": 1.1260000000000003,
"taskDurationMs": 217.393,
"heapDeltaBytes": -21947340,
"heapUsedBytes": 48650212,
"domNodes": -166,
"jsHeapTotalBytes": 5140480,
"scriptDurationMs": 16.976,
"eventListeners": -134,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
},
{
"name": "workflow-execution",
"durationMs": 470.5940000000055,
"styleRecalcs": 16,
"styleRecalcDurationMs": 24.482000000000003,
"layouts": 4,
"layoutDurationMs": 1.1049999999999998,
"taskDurationMs": 223.729,
"heapDeltaBytes": -22220932,
"heapUsedBytes": 48426192,
"domNodes": -181,
"jsHeapTotalBytes": 4616192,
"scriptDurationMs": 18.652,
"eventListeners": -132,
"totalBlockingTimeMs": 0,
"frameDurationMs": 16.66333333333332,
"p95FrameDurationMs": 16.700000000000728
}
]
} |
🎨 Storybook: 🚧 Building... |
🌐 Website E2ENote Tests are running… View workflow run 🔗 Website PreviewWebsite Preview: https://comfy-website-preview-pr-13334.vercel.app This commit: https://website-frontend-lk5ovi0z2-comfyui.vercel.app Last updated: 2026-07-01T05:36:47Z for |
fce7342 to
459eceb
Compare
459eceb to
e2fe1c3
Compare
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/workbench/extensions/manager/composables/useManagerDisplayPacks.test.ts`:
- Line 23: The test setup in useManagerDisplayPacks.test.ts is duplicating the
conflicted package shape with an inline type, which can drift from the real
store contract. Replace the ad hoc { package_id: string }[] annotation on
conflicts with the actual exported conflict entry type from
conflictDetectionStore (or the module that defines conflictedPackages), and
update the test fixtures to use that imported type consistently.
- Around line 27-34: The `whenever` mock in `useManagerDisplayPacks.test` is too
eager and fires immediately on a truthy source, so it can hide whether
`useManagerDisplayPacks` actually fetches on mount. Update the `@vueuse/core`
mock so `whenever` behaves like VueUse’s lazy watcher and only invokes the
callback after a simulated state change, not just because the source is already
truthy. Keep the fix localized to the test mock and verify the mount-time fetch
path through the `useManagerDisplayPacks` behavior.
🪄 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: 7c1deeaf-14ff-4a95-83cf-308be0d29a18
📒 Files selected for processing (3)
src/scripts/metadata/parser.test.tssrc/workbench/extensions/manager/composables/nodePack/usePackInstall.test.tssrc/workbench/extensions/manager/composables/useManagerDisplayPacks.test.ts
| startFetchWorkflowPacks: vi.fn(), | ||
| installedIds: new Set<string>(), | ||
| installedVersions: {} as Record<string, string>, | ||
| conflicts: [] as { package_id: string }[] |
There was a problem hiding this comment.
📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value
Consider importing the real conflict entry type instead of an ad hoc inline shape.
{ package_id: string }[] duplicates the shape of whatever conflictDetectionStore.conflictedPackages actually returns. Based on learnings, tests should import real type definitions from the modules under test rather than redefining interface shapes inline, to avoid 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/workbench/extensions/manager/composables/useManagerDisplayPacks.test.ts`
at line 23, The test setup in useManagerDisplayPacks.test.ts is duplicating the
conflicted package shape with an inline type, which can drift from the real
store contract. Replace the ad hoc { package_id: string }[] annotation on
conflicts with the actual exported conflict entry type from
conflictDetectionStore (or the module that defines conflictedPackages), and
update the test fixtures to use that imported type consistently.
Source: Learnings
| vi.mock('@vueuse/core', async (orig) => ({ | ||
| ...(await orig<typeof VueUse>()), | ||
| whenever: (source: unknown, callback?: () => void) => { | ||
| if (typeof source === 'function' && source() && callback) { | ||
| callback() | ||
| } | ||
| } | ||
| })) |
There was a problem hiding this comment.
🎯 Functional Correctness | 🟡 Minor | ⚡ Quick win
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# Description: Check whether whenever() calls in useManagerDisplayPacks.ts pass immediate:true,
# and how selectedTabId is typically initialized by callers.
rg -n -A3 -B3 'whenever\(' src/workbench/extensions/manager/composables/useManagerDisplayPacks.ts
rg -n 'useManagerDisplayPacks\(' -A5 -g '!*.test.ts'Repository: Comfy-Org/ComfyUI_frontend
Length of output: 671
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '--- useManagerDisplayPacks.ts around whenever calls ---'
sed -n '1,220p' src/workbench/extensions/manager/composables/useManagerDisplayPacks.ts | nl -ba | sed -n '90,140p'
echo
echo '--- test file around the eager whenever mock and fetch-triggering tests ---'
sed -n '1,260p' src/workbench/extensions/manager/composables/useManagerDisplayPacks.test.ts | nl -ba | sed -n '1,260p'
echo
echo '--- call sites of useManagerDisplayPacks ---'
rg -n 'useManagerDisplayPacks\(' -g '!*.test.ts' src/workbench/extensions/managerRepository: Comfy-Org/ComfyUI_frontend
Length of output: 260
🏁 Script executed:
#!/bin/bash
set -euo pipefail
echo '--- useManagerDisplayPacks.ts around whenever calls ---'
sed -n '100,135p' src/workbench/extensions/manager/composables/useManagerDisplayPacks.ts
echo
echo '--- useManagerDisplayPacks.test.ts around the mock and fetch-triggering tests ---'
sed -n '1,240p' src/workbench/extensions/manager/composables/useManagerDisplayPacks.test.ts
echo
echo '--- call sites of useManagerDisplayPacks ---'
rg -n 'useManagerDisplayPacks\(' -g '!*.test.ts' src/workbench/extensions/managerRepository: Comfy-Org/ComfyUI_frontend
Length of output: 9070
🏁 Script executed:
#!/bin/bash
set -euo pipefail
sed -n '360,430p' src/workbench/extensions/manager/components/manager/ManagerDialog.vueRepository: Comfy-Org/ComfyUI_frontend
Length of output: 1988
🏁 Script executed:
#!/bin/bash
set -euo pipefail
rg -n -A6 -B6 'selectedNavId' src/workbench/extensions/manager/components/manager/ManagerDialog.vueRepository: Comfy-Org/ComfyUI_frontend
Length of output: 2240
Align the whenever mock with VueUse’s lazy watch behavior
The current mock fires immediately on a truthy source, so these fetch assertions can pass even if useManagerDisplayPacks never starts fetching from the initial selected tab. Make it trigger on a real state change, or the tests won’t cover the mount-time fetch path.
🤖 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/workbench/extensions/manager/composables/useManagerDisplayPacks.test.ts`
around lines 27 - 34, The `whenever` mock in `useManagerDisplayPacks.test` is
too eager and fires immediately on a truthy source, so it can hide whether
`useManagerDisplayPacks` actually fetches on mount. Update the `@vueuse/core`
mock so `whenever` behaves like VueUse’s lazy watcher and only invokes the
callback after a simulated state change, not just because the source is already
truthy. Keep the fix localized to the test mock and verify the mount-time fetch
path through the `useManagerDisplayPacks` behavior.
Codecov Report✅ All modified and coverable lines are covered by tests. @@ Coverage Diff @@
## main #13334 +/- ##
==========================================
+ Coverage 77.08% 77.19% +0.10%
==========================================
Files 1636 1636
Lines 98282 98258 -24
Branches 33120 33752 +632
==========================================
+ Hits 75763 75848 +85
+ Misses 21810 21706 -104
+ Partials 709 704 -5
Flags with carried forward coverage won't be shown. Click here to find out more. 🚀 New features to boost your workflow:
|
Summary
Add unit branch-coverage for the workflow-metadata parser and the extension-manager pack composables — part of the critical-coverage series.
Changes
scripts/metadata/parser(the file-format dispatcher),usePackInstall, anduseManagerDisplayPacks. Test-only — no source changes. Format sub-parsers are stubbed; first-party deps mocked.Review Focus
Measured with the critical-coverage gate over the 27-file allow-list, before → after these tests: