Skip to content

Chore: Upgrade Vitest to v4#7797

Merged
DrJKL merged 5 commits intomainfrom
drjkl/update-vitest
Dec 30, 2025
Merged

Chore: Upgrade Vitest to v4#7797
DrJKL merged 5 commits intomainfrom
drjkl/update-vitest

Conversation

@DrJKL
Copy link
Contributor

@DrJKL DrJKL commented Dec 30, 2025

Summary

https://vitest.dev/guide/migration.html#vitest-4

Changes

  • What: Update Vitest and some associated dependencies
  • What: Fix issue with our existing mocks and mock types

Review Focus

Double check the test updates. I tried to keep the changes minimal.

┆Issue is synchronized with this Notion page by Unito

@DrJKL DrJKL requested a review from a team as a code owner December 30, 2025 01:10
@dosubot dosubot bot added the size:L This PR changes 100-499 lines, ignoring generated files. label Dec 30, 2025
@coderabbitai
Copy link
Contributor

coderabbitai bot commented Dec 30, 2025

📝 Walkthrough

Walkthrough

Bumped workspace dependency versions; exported TypeScript types (UseJobErrorReportingOptions, BuildJobDisplayCtx, RerouteId); and updated many tests to use constructor-style mocks, stricter mock typings, vi.mocked()/vi.stubGlobal()/vi.resetAllMocks() patterns. No runtime control-flow or public API behavior changes detected.

Changes

Cohort / File(s) Summary
Workspace / Dependency updates
pnpm-workspace.yaml
Multiple dependency version bumps (e.g., pinia, @sentry/vue, vitest, happy-dom, jsdom, vue-tsc, etc.); only version constraint changes.
Exported types made public
src/components/queue/job/useJobErrorReporting.ts, src/utils/queueDisplay.ts, @/lib/litegraph/src/litegraph
Exported TypeScript types: UseJobErrorReportingOptions, BuildJobDisplayCtx, and RerouteId (no structural/interface changes).
Constructor-style mock conversions
src/platform/assets/composables/useMediaAssetGalleryStore.test.ts, tests-ui/tests/composables/useLoad3d.test.ts, tests-ui/tests/composables/useLoad3dViewer.test.ts, tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
Replaced mocks that returned object literals with function-constructor style mocks (e.g., function() { Object.assign(this, mock) }) so instances receive properties via this.
Mock reset behavior changes
src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts, tests-ui/tests/components/graph/ZoomControlsModal.test.ts
Replaced vi.restoreAllMocks() with vi.resetAllMocks() in test beforeEach hooks.
Global/stub mocking adjustments
tests-ui/tests/api.featureFlags.test.ts, tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
Switched to vi.stubGlobal(...) for globals (e.g., WebSocket, alert) instead of earlier fake constructor/spies.
Stronger mock typing & vi.mocked usage
tests-ui/tests/components/queue/useJobErrorReporting.test.ts, tests-ui/tests/composables/nodePack/usePacksSelection.test.ts, tests-ui/tests/composables/useCachedRequest.test.ts, tests-ui/tests/composables/useJobList.test.ts, tests-ui/tests/composables/useLoad3dDrag.test.ts, tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts, tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts, tests-ui/tests/services/keybindingService.escape.test.ts
Tightened mock function signatures to concrete types, replaced generic vi.fn() types, and adopted vi.mocked(...) for clearing/inspecting mocks.
Test import/type reorganizations & test surface typing
tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts, tests-ui/tests/litegraph/core/LinkConnector.test.ts, tests-ui/tests/components/queue/useJobErrorReporting.test.ts, tests-ui/tests/composables/useJobList.test.ts
Reorganized imports, added/used types like ConnectingLink, and changed test context callback signatures from generic mock types to concrete function signatures.

Sequence Diagram(s)

(omitted)

Possibly related PRs

✨ Finishing touches
  • 📝 Generate docstrings

📜 Recent review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 3533103 and 6124ed8.

📒 Files selected for processing (1)
  • src/utils/queueDisplay.ts
🧰 Additional context used
📓 Path-based instructions (7)
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/utils/queueDisplay.ts
src/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety

Files:

  • src/utils/queueDisplay.ts
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/utils/queueDisplay.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/utils/queueDisplay.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not use any type or as any type assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code

Files:

  • src/utils/queueDisplay.ts
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width

Files:

  • src/utils/queueDisplay.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Minimize the surface area (exported values) of each module and composable

Files:

  • src/utils/queueDisplay.ts
🧠 Learnings (5)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `vitest` for unit testing in this project
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Always prefer vitest mock functions over writing verbose manual mocks
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Use unit/component tests in `tests-ui/` or `src/**/*.test.ts` with Vitest framework
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `test` instead of `it` for defining test cases in vitest
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Mocks should be cleanly written and easy to understand, with reusable mocks where possible
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Prefer the use of `test.extend` over loose variables; import `test as baseTest` from `vitest`
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:22.909Z
Learning: Applies to browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx} : Test user workflows in browser tests
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7797
File: tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts:648-648
Timestamp: 2025-12-30T01:31:04.927Z
Learning: In Vitest v4, when mocking functions that may be called as constructors (with `new` keyword), the mock implementation must use `function()` or `class` syntax instead of arrow functions. Arrow functions will cause `<anonymous> is not a constructor` errors. This is a breaking change from Vitest v3 where mocks used `mock.apply`.
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.

Applied to files:

  • src/utils/queueDisplay.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.

Applied to files:

  • src/utils/queueDisplay.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).

Applied to files:

  • src/utils/queueDisplay.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.

Applied to files:

  • src/utils/queueDisplay.ts
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: test
  • GitHub Check: setup
  • GitHub Check: collect
  • GitHub Check: lint-and-format
🔇 Additional comments (1)
src/utils/queueDisplay.ts (1)

6-17: This export is correct and necessary for test type safety.

BuildJobDisplayCtx is imported in tests-ui/tests/composables/useJobList.test.ts to type the mock implementation of buildJobDisplay. The type-only export aligns with Vitest v4's stricter mock typing requirements and is the standard pattern for test mocking in this codebase.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@github-actions
Copy link

github-actions bot commented Dec 30, 2025

🎨 Storybook Build Status

Build completed successfully!

⏰ Completed at: 12/30/2025, 02:38:23 AM UTC

🔗 Links


🎉 Your Storybook is ready for review!

@github-actions
Copy link

github-actions bot commented Dec 30, 2025

🎭 Playwright Test Results

⚠️ Tests passed with flaky tests

⏰ Completed at: 12/30/2025, 02:46:43 AM UTC

📈 Summary

  • Total Tests: 513
  • Passed: 504 ✅
  • Failed: 0
  • Flaky: 1 ⚠️
  • Skipped: 8 ⏭️

📊 Test Reports by Browser

  • chromium: View Report • ✅ 492 / ❌ 0 / ⚠️ 1 / ⏭️ 8
  • chromium-2x: View Report • ✅ 2 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • chromium-0.5x: View Report • ✅ 1 / ❌ 0 / ⚠️ 0 / ⏭️ 0
  • mobile-chrome: View Report • ✅ 9 / ❌ 0 / ⚠️ 0 / ⏭️ 0

🎉 Click on the links above to view detailed test results for each browser configuration.

@socket-security
Copy link

socket-security bot commented Dec 30, 2025

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Updated@​vitest/​coverage-v8@​3.2.4 ⏵ 4.0.1699 +110069 -398 +1100
Updated@​pinia/​testing@​0.1.5 ⏵ 1.0.3100 +110069 +485 +5100
Updated@​vitest/​ui@​3.2.4 ⏵ 4.0.1699 +110082 +199 +2100
Addedvite@​7.3.0921008299100
Updated@​sentry/​vue@​8.48.0 ⏵ 10.32.110010099 +996 -3100

View full report

@github-actions
Copy link

github-actions bot commented Dec 30, 2025

Bundle Size Report

Summary

  • Raw size: 17.3 MB baseline 17.3 MB — 🔴 +20.9 kB
  • Gzip: 3.54 MB baseline 3.54 MB — 🔴 +5.81 kB
  • Brotli: 2.7 MB baseline 2.7 MB — 🔴 +4.55 kB
  • Bundles: 98 current • 98 baseline • 55 added / 55 removed

Category Glance
Vendor & Third-Party 🔴 +20.9 kB (9.12 MB) · Other ⚪ 0 B (3.47 MB) · App Entry Points ⚪ 0 B (3.2 MB) · Graph Workspace ⚪ 0 B (1000 kB) · Panels & Settings ⚪ 0 B (300 kB) · UI Components ⚪ 0 B (199 kB) · + 3 more

Per-category breakdown
App Entry Points — 3.2 MB (baseline 3.2 MB) • ⚪ 0 B

Main entry bundles and manifests

File Before After Δ Raw Δ Gzip Δ Brotli
assets/index-7mA2E7SA.js (new) 3.01 MB 🔴 +3.01 MB 🔴 +633 kB 🔴 +481 kB
assets/index-BdMsQZiV.js (removed) 3.01 MB 🟢 -3.01 MB 🟢 -633 kB 🟢 -481 kB
assets/index-B5c2MzIu.js (new) 193 kB 🔴 +193 kB 🔴 +42 kB 🔴 +35 kB
assets/index-Cfps1V_z.js (removed) 193 kB 🟢 -193 kB 🟢 -42 kB 🟢 -35 kB
assets/index-BncAMMb8.js (removed) 345 B 🟢 -345 B 🟢 -242 B 🟢 -208 B
assets/index-urPiinYD.js (new) 345 B 🔴 +345 B 🔴 +245 B 🔴 +230 B

Status: 3 added / 3 removed

Graph Workspace — 1000 kB (baseline 1000 kB) • ⚪ 0 B

Graph editor runtime, canvas, workflow orchestration

File Before After Δ Raw Δ Gzip Δ Brotli
assets/GraphView-b9pRUfYN.js (new) 1000 kB 🔴 +1000 kB 🔴 +194 kB 🔴 +148 kB
assets/GraphView-Ckdd5S60.js (removed) 1000 kB 🟢 -1000 kB 🟢 -194 kB 🟢 -148 kB

Status: 1 added / 1 removed

Views & Navigation — 6.63 kB (baseline 6.63 kB) • ⚪ 0 B

Top-level views, pages, and routed surfaces

File Before After Δ Raw Δ Gzip Δ Brotli
assets/UserSelectView-DcGcLwGT.js (removed) 6.63 kB 🟢 -6.63 kB 🟢 -2.15 kB 🟢 -1.9 kB
assets/UserSelectView-rxThZi3g.js (new) 6.63 kB 🔴 +6.63 kB 🔴 +2.15 kB 🔴 +1.9 kB

Status: 1 added / 1 removed

Panels & Settings — 300 kB (baseline 300 kB) • ⚪ 0 B

Configuration panels, inspectors, and settings screens

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LegacyCreditsPanel-BjTRQBq1.js (removed) 22.7 kB 🟢 -22.7 kB 🟢 -5.26 kB 🟢 -4.6 kB
assets/LegacyCreditsPanel-BvCve10Y.js (new) 22.7 kB 🔴 +22.7 kB 🔴 +5.26 kB 🔴 +4.61 kB
assets/KeybindingPanel-BugymVbe.js (new) 14.8 kB 🔴 +14.8 kB 🔴 +3.57 kB 🔴 +3.12 kB
assets/KeybindingPanel-LAkPRFfZ.js (removed) 14.8 kB 🟢 -14.8 kB 🟢 -3.57 kB 🟢 -3.13 kB
assets/ExtensionPanel-6DmkYqxV.js (removed) 11.1 kB 🟢 -11.1 kB 🟢 -2.62 kB 🟢 -2.3 kB
assets/ExtensionPanel-Dpd3S0z9.js (new) 11.1 kB 🔴 +11.1 kB 🔴 +2.62 kB 🔴 +2.3 kB
assets/AboutPanel-CUJ9UhUD.js (removed) 9.16 kB 🟢 -9.16 kB 🟢 -2.46 kB 🟢 -2.21 kB
assets/AboutPanel-D0_zGiSv.js (new) 9.16 kB 🔴 +9.16 kB 🔴 +2.46 kB 🔴 +2.21 kB
assets/ServerConfigPanel-DJsvO6CM.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -2.05 kB 🟢 -1.81 kB
assets/ServerConfigPanel-Hf0FpTKH.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +2.05 kB 🔴 +1.81 kB
assets/UserPanel-BGBsMjnd.js (removed) 6.88 kB 🟢 -6.88 kB 🟢 -1.79 kB 🟢 -1.57 kB
assets/UserPanel-D1Bxhlvd.js (new) 6.88 kB 🔴 +6.88 kB 🔴 +1.79 kB 🔴 +1.57 kB
assets/settings-AN2JfZVQ.js 21.7 kB 21.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BhbWhsRg.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-BIdKi-OT.js 26.2 kB 26.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Bu3OR-lX.js 24.6 kB 24.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-ByL6gy5c.js 25.4 kB 25.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-CjlRFMdL.js 32.8 kB 32.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-DkGwvylK.js 26.9 kB 26.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-Dyd027Dx.js 24.7 kB 24.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-wwBxqLH5.js 21.3 kB 21.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/settings-xx2Yb6R2.js 23.8 kB 23.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 6 added / 6 removed

UI Components — 199 kB (baseline 199 kB) • ⚪ 0 B

Reusable component library chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/LazyImage.vue_vue_type_script_setup_true_lang-B4wrtPc4.js (removed) 59.9 kB 🟢 -59.9 kB 🟢 -12.4 kB 🟢 -10.8 kB
assets/LazyImage.vue_vue_type_script_setup_true_lang-De0OSwBJ.js (new) 59.9 kB 🔴 +59.9 kB 🔴 +12.4 kB 🔴 +10.8 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-CbXexKcT.js (new) 56.4 kB 🔴 +56.4 kB 🔴 +8.9 kB 🔴 +7.59 kB
assets/Load3D.vue_vue_type_script_setup_true_lang-CYvmaeRt.js (removed) 56.4 kB 🟢 -56.4 kB 🟢 -8.9 kB 🟢 -7.59 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-CH2M4TJK.js (new) 48.8 kB 🔴 +48.8 kB 🔴 +10.5 kB 🔴 +9.16 kB
assets/WidgetSelect.vue_vue_type_script_setup_true_lang-D0OUuujA.js (removed) 48.8 kB 🟢 -48.8 kB 🟢 -10.5 kB 🟢 -9.13 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-D0sfEa6m.js (new) 14.3 kB 🔴 +14.3 kB 🔴 +3.73 kB 🔴 +3.29 kB
assets/WidgetInputNumber.vue_vue_type_script_setup_true_lang-Qy_eIKKZ.js (removed) 14.3 kB 🟢 -14.3 kB 🟢 -3.73 kB 🟢 -3.29 kB
assets/ComfyQueueButton-2UamM4lj.js (removed) 8.83 kB 🟢 -8.83 kB 🟢 -2.57 kB 🟢 -2.29 kB
assets/ComfyQueueButton-CRyuJ6Ku.js (new) 8.83 kB 🔴 +8.83 kB 🔴 +2.58 kB 🔴 +2.29 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-Ckyanoc_.js (removed) 3.72 kB 🟢 -3.72 kB 🟢 -1.45 kB 🟢 -1.31 kB
assets/WidgetWithControl.vue_vue_type_script_setup_true_lang-DFnqIha5.js (new) 3.72 kB 🔴 +3.72 kB 🔴 +1.46 kB 🔴 +1.32 kB
assets/WidgetButton-B3628knh.js (removed) 2.21 kB 🟢 -2.21 kB 🟢 -999 B 🟢 -895 B
assets/WidgetButton-CztsWPgt.js (new) 2.21 kB 🔴 +2.21 kB 🔴 +997 B 🔴 +895 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-CU1FPVr_.js (removed) 2.14 kB 🟢 -2.14 kB 🟢 -890 B 🟢 -764 B
assets/WidgetLayoutField.vue_vue_type_script_setup_true_lang-DaN1jvU_.js (new) 2.14 kB 🔴 +2.14 kB 🔴 +891 B 🔴 +764 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-3ve79e_P.js (removed) 1.34 kB 🟢 -1.34 kB 🟢 -686 B 🟢 -597 B
assets/UserAvatar.vue_vue_type_script_setup_true_lang-DV-9JnFV.js (new) 1.34 kB 🔴 +1.34 kB 🔴 +687 B 🔴 +594 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-Bu9LRkf7.js (removed) 897 B 🟢 -897 B 🟢 -504 B 🟢 -461 B
assets/MediaTitle.vue_vue_type_script_setup_true_lang-DqXadPDr.js (new) 897 B 🔴 +897 B 🔴 +503 B 🔴 +432 B

Status: 10 added / 10 removed

Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 B

Stores, services, APIs, and repositories

File Before After Δ Raw Δ Gzip Δ Brotli
assets/keybindingService--heAv134.js (new) 7.51 kB 🔴 +7.51 kB 🔴 +1.83 kB 🔴 +1.58 kB
assets/keybindingService-BpraE2Ic.js (removed) 7.51 kB 🟢 -7.51 kB 🟢 -1.83 kB 🟢 -1.57 kB
assets/serverConfigStore-ClbvVDb_.js (removed) 2.83 kB 🟢 -2.83 kB 🟢 -908 B 🟢 -788 B
assets/serverConfigStore-CulKZi3K.js (new) 2.83 kB 🔴 +2.83 kB 🔴 +910 B 🔴 +796 B
assets/audioService-D1uNVcfH.js (removed) 2.2 kB 🟢 -2.2 kB 🟢 -960 B 🟢 -825 B
assets/audioService-DhvvmnnR.js (new) 2.2 kB 🔴 +2.2 kB 🔴 +959 B 🔴 +827 B

Status: 3 added / 3 removed

Utilities & Hooks — 1.41 kB (baseline 1.41 kB) • ⚪ 0 B

Helpers, composables, and utility bundles

File Before After Δ Raw Δ Gzip Δ Brotli
assets/audioUtils-CYMrphTf.js (new) 1.41 kB 🔴 +1.41 kB 🔴 +651 B 🔴 +543 B
assets/audioUtils-DCBJfR1_.js (removed) 1.41 kB 🟢 -1.41 kB 🟢 -652 B 🟢 -542 B

Status: 1 added / 1 removed

Vendor & Third-Party — 9.12 MB (baseline 9.1 MB) • 🔴 +20.9 kB

External libraries and shared vendor chunks

File Before After Δ Raw Δ Gzip Δ Brotli
assets/vendor-other-CzYzbUcM.js (new) 3.89 MB 🔴 +3.89 MB 🔴 +845 kB 🔴 +676 kB
assets/vendor-other-DdEHkzYa.js (removed) 3.86 MB 🟢 -3.86 MB 🟢 -839 kB 🟢 -672 kB
assets/vendor-primevue-Ch6rhmJJ.js (new) 1.95 MB 🔴 +1.95 MB 🔴 +334 kB 🔴 +201 kB
assets/vendor-primevue-DmDWdkDd.js (removed) 1.95 MB 🟢 -1.95 MB 🟢 -334 kB 🟢 -201 kB
assets/vendor-chart-ByLwKL2Y.js (removed) 452 kB 🟢 -452 kB 🟢 -99 kB 🟢 -81 kB
assets/vendor-chart-KBsqeQPQ.js (new) 452 kB 🔴 +452 kB 🔴 +99 kB 🔴 +81 kB
assets/vendor-tiptap-B76LFN34.js (removed) 232 kB 🟢 -232 kB 🟢 -45.7 kB 🟢 -37.7 kB
assets/vendor-tiptap-XfQ74oRB.js (new) 232 kB 🔴 +232 kB 🔴 +45.7 kB 🔴 +37.7 kB
assets/vendor-vue-BIRc7P93.js (removed) 160 kB 🟢 -160 kB 🟢 -37.2 kB 🟢 -31.4 kB
assets/vendor-vue-DLbRHZS7.js (new) 160 kB 🔴 +160 kB 🔴 +37 kB 🔴 +31.3 kB
assets/vendor-three-DYL0ZbEr.js 2.02 MB 2.02 MB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/vendor-xterm-BF8peZ5_.js 420 kB 420 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 5 added / 5 removed

Other — 3.47 MB (baseline 3.47 MB) • ⚪ 0 B

Bundles that do not match a named category

File Before After Δ Raw Δ Gzip Δ Brotli
assets/SubscriptionRequiredDialogContent-BxB-J_Og.js (removed) 28.5 kB 🟢 -28.5 kB 🟢 -6.29 kB 🟢 -5.46 kB
assets/SubscriptionRequiredDialogContent-CnC6uG9I.js (new) 28.5 kB 🔴 +28.5 kB 🔴 +6.3 kB 🔴 +5.46 kB
assets/WidgetRecordAudio-DQYxpFRZ.js (new) 20.4 kB 🔴 +20.4 kB 🔴 +5.24 kB 🔴 +4.63 kB
assets/WidgetRecordAudio-mrUPuUxI.js (removed) 20.4 kB 🟢 -20.4 kB 🟢 -5.24 kB 🟢 -4.64 kB
assets/AudioPreviewPlayer-CK_hEh9w.js (removed) 13.3 kB 🟢 -13.3 kB 🟢 -3.35 kB 🟢 -3.01 kB
assets/AudioPreviewPlayer-DPDLkq6B.js (new) 13.3 kB 🔴 +13.3 kB 🔴 +3.35 kB 🔴 +3 kB
assets/ValueControlPopover-biQ-pMYG.js (new) 5.49 kB 🔴 +5.49 kB 🔴 +1.71 kB 🔴 +1.52 kB
assets/ValueControlPopover-Dfz5mxNP.js (removed) 5.49 kB 🟢 -5.49 kB 🟢 -1.71 kB 🟢 -1.51 kB
assets/WidgetGalleria-B1VIRFNF.js (removed) 4.1 kB 🟢 -4.1 kB 🟢 -1.45 kB 🟢 -1.31 kB
assets/WidgetGalleria-P0GyBlUP.js (new) 4.1 kB 🔴 +4.1 kB 🔴 +1.45 kB 🔴 +1.31 kB
assets/WidgetColorPicker-CgHhbOpF.js (removed) 3.41 kB 🟢 -3.41 kB 🟢 -1.38 kB 🟢 -1.23 kB
assets/WidgetColorPicker-Vd-QKlop.js (new) 3.41 kB 🔴 +3.41 kB 🔴 +1.38 kB 🔴 +1.24 kB
assets/WidgetImageCompare-Bvg3Od2A.js (removed) 3.18 kB 🟢 -3.18 kB 🟢 -1.1 kB 🟢 -967 B
assets/WidgetImageCompare-DOO74J4Y.js (new) 3.18 kB 🔴 +3.18 kB 🔴 +1.1 kB 🔴 +985 B
assets/WidgetTextarea-BtBs287u.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.22 kB 🟢 -1.07 kB
assets/WidgetTextarea-STZyRln_.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.22 kB 🔴 +1.07 kB
assets/WidgetMarkdown-Bu_nnFg-.js (new) 3.08 kB 🔴 +3.08 kB 🔴 +1.28 kB 🔴 +1.13 kB
assets/WidgetMarkdown-DSRmyo-i.js (removed) 3.08 kB 🟢 -3.08 kB 🟢 -1.28 kB 🟢 -1.13 kB
assets/WidgetAudioUI-Dgq5xpXq.js (removed) 2.89 kB 🟢 -2.89 kB 🟢 -1.17 kB 🟢 -1.06 kB
assets/WidgetAudioUI-DxlQwMnc.js (new) 2.89 kB 🔴 +2.89 kB 🔴 +1.17 kB 🔴 +1.06 kB
assets/MediaVideoTop-DrDqLo2M.js (removed) 2.65 kB 🟢 -2.65 kB 🟢 -1.02 kB 🟢 -868 B
assets/MediaVideoTop-uhl1tYxE.js (new) 2.65 kB 🔴 +2.65 kB 🔴 +1.01 kB 🔴 +868 B
assets/WidgetChart-CXIOBBuD.js (new) 2.48 kB 🔴 +2.48 kB 🔴 +934 B 🔴 +820 B
assets/WidgetChart-DE0SfMVO.js (removed) 2.48 kB 🟢 -2.48 kB 🟢 -932 B 🟢 -819 B
assets/WidgetInputText-BQy89--Y.js (removed) 1.99 kB 🟢 -1.99 kB 🟢 -922 B 🟢 -857 B
assets/WidgetInputText-CAb59UPx.js (new) 1.99 kB 🔴 +1.99 kB 🔴 +923 B 🔴 +854 B
assets/WidgetToggleSwitch-DcExjj-o.js (new) 1.76 kB 🔴 +1.76 kB 🔴 +836 B 🔴 +735 B
assets/WidgetToggleSwitch-DXwrrdq1.js (removed) 1.76 kB 🟢 -1.76 kB 🟢 -834 B 🟢 -735 B
assets/MediaImageTop-BenufCTB.js (new) 1.75 kB 🔴 +1.75 kB 🔴 +840 B 🔴 +718 B
assets/MediaImageTop-BmT4ess7.js (removed) 1.75 kB 🟢 -1.75 kB 🟢 -841 B 🟢 -718 B
assets/MediaImageBottom-35HklA1L.js (new) 1.55 kB 🔴 +1.55 kB 🔴 +735 B 🔴 +642 B
assets/MediaImageBottom-DUG6iOM7.js (removed) 1.55 kB 🟢 -1.55 kB 🟢 -733 B 🟢 -638 B
assets/MediaAudioBottom-BFII1sOb.js (new) 1.51 kB 🔴 +1.51 kB 🔴 +735 B 🔴 +645 B
assets/MediaAudioBottom-D98aPzRD.js (removed) 1.51 kB 🟢 -1.51 kB 🟢 -733 B 🟢 -643 B
assets/Media3DBottom-By_4Uo4x.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +731 B 🔴 +641 B
assets/Media3DBottom-SVpn6TuN.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -732 B 🟢 -642 B
assets/MediaVideoBottom-CxDJL7Us.js (removed) 1.5 kB 🟢 -1.5 kB 🟢 -733 B 🟢 -643 B
assets/MediaVideoBottom-zp4eDfo2.js (new) 1.5 kB 🔴 +1.5 kB 🔴 +731 B 🔴 +644 B
assets/Media3DTop-a7D-b3g2.js (new) 1.49 kB 🔴 +1.49 kB 🔴 +769 B 🔴 +650 B
assets/Media3DTop-BDwcXYTm.js (removed) 1.49 kB 🟢 -1.49 kB 🟢 -769 B 🟢 -652 B
assets/MediaAudioTop-CgldzfMV.js (removed) 1.46 kB 🟢 -1.46 kB 🟢 -738 B 🟢 -615 B
assets/MediaAudioTop-DnMHwvAw.js (new) 1.46 kB 🔴 +1.46 kB 🔴 +738 B 🔴 +616 B
assets/WidgetSelect-BiLXHqaF.js (new) 733 B 🔴 +733 B 🔴 +364 B 🔴 +331 B
assets/WidgetSelect-CisUS06V.js (removed) 733 B 🟢 -733 B 🟢 -362 B 🟢 -306 B
assets/WidgetInputNumber-CFcKPEpE.js (new) 673 B 🔴 +673 B 🔴 +349 B 🔴 +287 B
assets/WidgetInputNumber-DbryQvRa.js (removed) 673 B 🟢 -673 B 🟢 -347 B 🟢 -282 B
assets/Load3D-70vot4jD.js (new) 424 B 🔴 +424 B 🔴 +269 B 🔴 +224 B
assets/Load3D-DQu-Vghs.js (removed) 424 B 🟢 -424 B 🟢 -266 B 🟢 -228 B
assets/WidgetLegacy-Biq5hqKH.js (new) 364 B 🔴 +364 B 🔴 +239 B 🔴 +195 B
assets/WidgetLegacy-YLx_reCm.js (removed) 364 B 🟢 -364 B 🟢 -237 B 🟢 -194 B
assets/commands-bTEY9Mp6.js 13.8 kB 13.8 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-BWp4HdfU.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CcfGaui5.js 14.4 kB 14.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CisfgZf5.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CkU12Foh.js 13 kB 13 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-CoH2DJa6.js 14.2 kB 14.2 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-COSt-Bjx.js 14.9 kB 14.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DalfIW5f.js 15.9 kB 15.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DfTl0eCm.js 13.5 kB 13.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/commands-DwSJL865.js 13.7 kB 13.7 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Bdc58rJq.js 97.1 kB 97.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-BRKE6VDs.js 91 kB 91 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-C9ZJBRdI.js 81.5 kB 81.5 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CAL83XT3.js 84.6 kB 84.6 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-CHLLfvpG.js 82.4 kB 82.4 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-Cw9RZWRY.js 89 B 89 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DDqR5EuX.js 71.3 kB 71.3 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-DLHyaEcz.js 92.1 kB 92.1 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-O7KfJeMO.js 79.9 kB 79.9 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/main-OzGsrlqJ.js 112 kB 112 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-aW9En70v.js 260 kB 260 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BIckSVgU.js 273 kB 273 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-BiYpVi7D.js 263 kB 263 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Bw_Jitw_.js 101 B 101 B ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CCEXtYfM.js 243 kB 243 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-CvmVDWYd.js 323 kB 323 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-D_wreoPJ.js 267 kB 267 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-DIAYlJwM.js 246 kB 246 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-Dz-0ZIBN.js 297 kB 297 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/nodeDefs-VZsNmhG7.js 264 kB 264 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B
assets/widgetPropFilter-BIbGSUAt.js 1.28 kB 1.28 kB ⚪ 0 B ⚪ 0 B ⚪ 0 B

Status: 25 added / 25 removed

@github-actions
Copy link

🔧 Auto-fixes Applied

This PR has been automatically updated to fix linting and formatting issues.

⚠️ Important: Your local branch is now behind. Run git pull before making additional changes to avoid conflicts.

Changes made:

  • ESLint auto-fixes
  • Prettier formatting

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 6

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts (1)

43-50: Remove unnecessary empty object pattern.

The empty object pattern {} on line 45 is flagged by Biome and can be simplified. When a fixture has no dependencies, the destructuring parameter can be omitted entirely.

🔎 Proposed fix
  setConnectingLinks: async (
-    {},
-    use: (mock: (value: ConnectingLink[]) => void) => Promise<void>
+    use: (mock: (value: ConnectingLink[]) => void) => Promise<void>
  ) => {
    const mock = vi.fn()
    await use(mock)
  },

Based on static analysis hints from Biome.

tests-ui/tests/api.featureFlags.test.ts (1)

42-45: Add vi.unstubAllGlobals() to the afterEach cleanup.

vi.restoreAllMocks() only handles spies created with vi.spyOn(). Since the test uses vi.stubGlobal('WebSocket', ...) on line 27, it requires explicit cleanup with vi.unstubAllGlobals(). Without it, the WebSocket stub will persist across tests, breaking test isolation.

Update the afterEach block to:

  afterEach(() => {
    vi.useRealTimers()
    vi.restoreAllMocks()
    vi.unstubAllGlobals()
  })
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 91ed58a and 7fcfec9.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (21)
  • pnpm-workspace.yaml
  • src/components/queue/job/useJobErrorReporting.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
🧰 Additional context used
📓 Path-based instructions (14)
tests-ui/**/*.test.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (tests-ui/CLAUDE.md)

tests-ui/**/*.test.{js,ts,jsx,tsx}: Write tests for new features
Follow existing test patterns in the codebase
Use existing test utilities rather than writing custom utilities
Mock external dependencies in tests
Always prefer vitest mock functions over writing verbose manual mocks

Files:

  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not use any type or as any type assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code

Files:

  • tests-ui/tests/api.featureFlags.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width

Files:

  • tests-ui/tests/api.featureFlags.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.test.ts: Use unit/component tests in tests-ui/ or src/**/*.test.ts with Vitest framework
For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files
Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles
Aim for behavioral coverage of critical and new features in unit tests

Files:

  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Minimize the surface area (exported values) of each module and composable

Files:

  • tests-ui/tests/api.featureFlags.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/components/queue/job/useJobErrorReporting.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
src/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety

Files:

  • src/components/queue/job/useJobErrorReporting.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/components/queue/job/useJobErrorReporting.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/components/queue/job/useJobErrorReporting.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/components/queue/job/useJobErrorReporting.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
src/**/{components,composables}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Use vue-i18n for ALL user-facing strings by adding them to src/locales/en/main.json

Files:

  • src/components/queue/job/useJobErrorReporting.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
src/components/**/*.{vue,ts,js}

📄 CodeRabbit inference engine (src/components/CLAUDE.md)

src/components/**/*.{vue,ts,js}: Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners
Use useIntersectionObserver for visibility detection instead of custom scroll handlers
Use vue-i18n for ALL UI strings

Files:

  • src/components/queue/job/useJobErrorReporting.ts
**/**/use[A-Z]*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables using the pattern useXyz.ts

Files:

  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
src/**/{services,composables}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/{services,composables}/**/*.{ts,tsx}: Use api.apiURL() for backend endpoints instead of constructing URLs directly
Use api.fileURL() for static file access instead of constructing URLs directly

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
🧠 Learnings (32)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `vitest` for unit testing in this project
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Always prefer vitest mock functions over writing verbose manual mocks
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Use unit/component tests in `tests-ui/` or `src/**/*.test.ts` with Vitest framework
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Implement proper TypeScript types throughout the codebase
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files

Applied to files:

  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Always prefer vitest mock functions over writing verbose manual mocks

Applied to files:

  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • pnpm-workspace.yaml
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests

Applied to files:

  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • pnpm-workspace.yaml
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features

Applied to files:

  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.

Applied to files:

  • tests-ui/tests/api.featureFlags.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.

Applied to files:

  • tests-ui/tests/api.featureFlags.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).

Applied to files:

  • tests-ui/tests/api.featureFlags.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-10T03:09:13.807Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7303
File: src/components/topbar/CurrentUserPopover.test.ts:199-205
Timestamp: 2025-12-10T03:09:13.807Z
Learning: In test files, prefer selecting or asserting on accessible properties (text content, aria-label, role, accessible name) over data-testid attributes. This ensures tests validate actual user-facing behavior and accessibility, reducing reliance on implementation details like test IDs.

Applied to files:

  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.

Applied to files:

  • tests-ui/tests/api.featureFlags.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-22T21:36:38.905Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts:189-194
Timestamp: 2025-12-22T21:36:38.905Z
Learning: In tests-ui feature tests, do not stub primitive UI components or customized primitives (e.g., Button). Instead, import and register the real components in the test setup so tests reflect production behavior and component API usage. This improves test reliability and fidelity. If a test must avoid rendering the full component, justify the approach and consider higher-level mocks or integration tests rather than replacing the primitive itself.

Applied to files:

  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup

Applied to files:

  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : When writing tests for subgraph-related code, always import from the barrel export at `@/lib/litegraph/src/litegraph` to avoid circular dependency issues

Applied to files:

  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{js,ts,jsx,tsx} : When adding features, always write vitest unit tests using cursor rules in @.cursor

Applied to files:

  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles

Applied to files:

  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Follow existing test patterns in the codebase

Applied to files:

  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Mocks should be cleanly written and easy to understand, with reusable mocks where possible

Applied to files:

  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Use existing test utilities rather than writing custom utilities

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • pnpm-workspace.yaml
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Use unit/component tests in `tests-ui/` or `src/**/*.test.ts` with Vitest framework

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • pnpm-workspace.yaml
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.{ts,tsx} : Minimize the surface area (exported values) of each module and composable

Applied to files:

  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `vitest` for unit testing in this project

Applied to files:

  • pnpm-workspace.yaml
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Prefer the use of `test.extend` over loose variables; import `test as baseTest` from `vitest`

Applied to files:

  • pnpm-workspace.yaml
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Use Vite for fast development and building

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `test` instead of `it` for defining test cases in vitest

Applied to files:

  • pnpm-workspace.yaml
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.vue : Use Vue 3.5+ with TypeScript in `.vue` files, exclusively using Composition API with `<script setup lang="ts">` syntax

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-12-16T17:41:58.464Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-16T17:41:58.464Z
Learning: Prerequisites for repository setup: Node.js >= 24, Git repository, available ports for dev server and storybook

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.{ts,tsx,vue} : Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.{ts,tsx,vue} : Use es-toolkit for utility functions

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Use es-toolkit for utility functions instead of other utility libraries

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{vue,ts,tsx} : Follow Vue 3 composition API style guide

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{ts,tsx} : Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Avoid using ts-expect-error; use proper TypeScript types instead

Applied to files:

  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
🧬 Code graph analysis (8)
tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts (1)
src/lib/litegraph/src/litegraph.ts (1)
  • LiteGraph (17-17)
tests-ui/tests/composables/useJobList.test.ts (3)
src/stores/queueStore.ts (2)
  • key (282-284)
  • promptId (290-292)
src/types/queue.ts (1)
  • JobState (4-9)
src/utils/queueDisplay.ts (2)
  • BuildJobDisplayCtx (6-17)
  • JobDisplay (19-25)
src/platform/assets/composables/useMediaAssetGalleryStore.test.ts (1)
src/stores/queueStore.ts (1)
  • ResultItemImpl (40-214)
tests-ui/tests/services/keybindingService.escape.test.ts (1)
src/stores/commandStore.ts (1)
  • useCommandStore (75-147)
tests-ui/tests/composables/nodePack/usePacksSelection.test.ts (1)
src/workbench/extensions/manager/composables/nodePack/usePacksSelection.ts (1)
  • usePacksSelection (16-71)
tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts (1)
src/lib/litegraph/src/interfaces.ts (1)
  • ConnectingLink (365-375)
tests-ui/tests/components/queue/useJobErrorReporting.test.ts (2)
src/lib/litegraph/src/LGraphCanvas.ts (1)
  • copyToClipboard (3852-3856)
src/components/queue/job/useJobErrorReporting.ts (2)
  • UseJobErrorReportingOptions (43-47)
  • JobErrorDialogService (9-18)
tests-ui/tests/litegraph/core/LinkConnector.test.ts (1)
src/lib/litegraph/src/interfaces.ts (1)
  • ConnectingLink (365-375)
🪛 Biome (2.1.2)
tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts

[error] 45-45: Unexpected empty object pattern.

(lint/correctness/noEmptyPattern)

⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: lint-and-format
  • GitHub Check: collect
  • GitHub Check: test
  • GitHub Check: setup

Comment on lines +6 to +10
let mockRequestFn: (
params: any,
signal?: AbortSignal
) => Promise<unknown | null>
let abortSpy: () => void
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Consider leveraging Vitest's typed mock utilities for improved type safety.

The explicit type annotations improve clarity for the Vitest v4 upgrade. However, there's a minor inconsistency: the type signature includes signal?: AbortSignal (line 8), but the implementation at line 28 omits this parameter. While TypeScript permits this, including the parameter in the implementation would improve consistency.

Additionally, the use of any for params violates the coding guideline to avoid any types. Consider using Vitest's Mock type utilities for more precise typing.

🔎 Suggested refactor for improved type safety
-  let mockRequestFn: (
-    params: any,
-    signal?: AbortSignal
-  ) => Promise<unknown | null>
-  let abortSpy: () => void
+  let mockRequestFn: ReturnType<typeof vi.fn<[params: unknown, signal?: AbortSignal], Promise<unknown | null>>>
+  let abortSpy: ReturnType<typeof vi.fn<[], void>>

And update the implementation to include the signal parameter for consistency:

-    mockRequestFn = vi.fn(async (params: any) => {
+    mockRequestFn = vi.fn(async (params: unknown, signal?: AbortSignal) => {

As per coding guidelines, avoid using any type and leverage Vitest utilities for mocking.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
let mockRequestFn: (
params: any,
signal?: AbortSignal
) => Promise<unknown | null>
let abortSpy: () => void
let mockRequestFn: ReturnType<typeof vi.fn<[params: unknown, signal?: AbortSignal], Promise<unknown | null>>>
let abortSpy: ReturnType<typeof vi.fn<[], void>>
Suggested change
let mockRequestFn: (
params: any,
signal?: AbortSignal
) => Promise<unknown | null>
let abortSpy: () => void
mockRequestFn = vi.fn(async (params: unknown, signal?: AbortSignal) => {
🤖 Prompt for AI Agents
In tests-ui/tests/composables/useCachedRequest.test.ts around lines 6 to 10, the
mockRequestFn is typed with `any` and its declaration includes `signal?:
AbortSignal` while the implementation omits that parameter; change the type to
use Vitest's Mock generic (e.g. Mock<Promise<unknown | null>, [paramsType,
AbortSignal?]> or a more specific params type instead of any), update the mock
implementation signature to accept the optional signal parameter, and replace
`any` with a concrete type or `unknown` to comply with the no-any guideline.


it('should handle getOptionLabel error gracefully', () => {
const mockGetOptionLabel = vi.fn().mockImplementation(() => {
const mockGetOptionLabel = vi.fn().mockImplementation(function () {
Copy link
Contributor

@coderabbitai coderabbitai bot Dec 30, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Minor: function() syntax not strictly necessary here.

The conversion from arrow function to function() is not required since this is not accessed in this mock. However, it maintains consistency with other mocks in the file and doesn't cause any issues.

🤖 Prompt for AI Agents
In tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts around line 648,
the mock implementation uses function() but does not rely on this; replace the
function() syntax with an arrow function (e.g. () => ...) to match the rest of
the mocks in the file for consistency, updating the vi.fn().mockImplementation
call accordingly.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DrJKL Thank you for the correction! You're absolutely right.

In Vitest v4, all mocks called with a new keyword construct the instance instead of calling mock.apply, which means the mock implementation has to use either the function or the class keyword. If you provide an arrow function, you will get <anonymous> is not a constructor error when the mock is called.

While this specific getOptionLabel mock isn't called as a constructor, using function() syntax maintains consistency with the other mocks in this file (like the ContextMenu mocks) that do require it, and ensures proper this binding if needed. My suggestion to use an arrow function was incorrect given the Vitest v4 migration requirements.


✏️ Learnings added
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7797
File: tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts:648-648
Timestamp: 2025-12-30T01:31:04.927Z
Learning: In Vitest v4, when mocking functions that may be called as constructors (with `new` keyword), the mock implementation must use `function()` or `class` syntax instead of arrow functions. Arrow functions will cause `<anonymous> is not a constructor` errors. This is a breaking change from Vitest v3 where mocks used `mock.apply`.

Note: Learnings are effective only in the context of similar code segments. To apply general coding guidelines, please configure review instructions. You can manage existing learnings in the app.


🧠 Learnings used
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Always prefer vitest mock functions over writing verbose manual mocks

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Mocks should be cleanly written and easy to understand, with reusable mocks where possible

Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:17.361Z
Learning: In the Comfy-Org/ComfyUI_frontend repository, prefer pure function declarations (e.g., `function foo() { ... }`) over function expressions (e.g., `const foo = () => { ... }`) for pure functions, as function declarations are considered more functional than function expressions.

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.{ts,tsx,vue} : Keep functions short and functional; minimize nesting and follow the arrow anti-pattern

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{js,ts,jsx,tsx} : When adding features, always write vitest unit tests using cursor rules in @.cursor

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : When writing tests for subgraph-related code, always import from the barrel export at `@/lib/litegraph/src/litegraph` to avoid circular dependency issues

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `vitest` for unit testing in this project

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Use unit/component tests in `tests-ui/` or `src/**/*.test.ts` with Vitest framework

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `test` instead of `it` for defining test cases in vitest

Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features

.fn()
.mockReturnValueOnce('Beautiful Sunset.png')
.mockImplementationOnce(() => {
.mockImplementationOnce(function () {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Minor: function() syntax not strictly necessary here.

Similar to line 648, the function() syntax is not required since this is not accessed. However, it maintains consistency and doesn't cause issues.

🤖 Prompt for AI Agents
In tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts around line 931,
the mockImplementationOnce uses the legacy function() syntax even though it
doesn't access this; replace that anonymous function with an equivalent arrow
function (() => { ... }) to match the style used at line 648 and keep
consistency across tests.

Comment on lines +37 to 38
mockCommandExecute = vi.fn()
commandStore.execute = mockCommandExecute
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

Mock initialization follows correct pattern.

The mock is properly initialized after obtaining the store instance and assigned to replace the execute method. This aligns with Vitest v4's mocking patterns.

Optional: Make mock return a Promise for better type accuracy

While not required for these tests (which only verify call counts and arguments), you could make the mock more accurately match the async signature:

-    mockCommandExecute = vi.fn()
+    mockCommandExecute = vi.fn().mockResolvedValue(undefined)
     commandStore.execute = mockCommandExecute

This explicitly returns a resolved Promise, matching the real execute method's return type. However, since await undefined resolves immediately in JavaScript and these tests don't check return values, the current approach works fine and aligns with your goal of minimal changes.

📝 Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
mockCommandExecute = vi.fn()
commandStore.execute = mockCommandExecute
mockCommandExecute = vi.fn().mockResolvedValue(undefined)
commandStore.execute = mockCommandExecute
🤖 Prompt for AI Agents
In tests-ui/tests/services/keybindingService.escape.test.ts around lines 37 to
38, the mock for commandStore.execute is fine but can be made type-accurate by
returning a resolved Promise; change the mock initialization so the mock
function returns Promise.resolve(undefined) (or use an async () => undefined)
and assign it to commandStore.execute so the mocked signature matches the real
async execute method.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts (1)

43-49: LGTM: Mock setup correctly typed for Vitest v4.

The type constraint on line 45 ensures the mock has the correct signature. The implementation is minimal and correct.

💡 Optional: Make mock typing even more explicit

For maximum clarity, you could explicitly type the mock function:

-    const mock = vi.fn()
+    const mock = vi.fn<[ConnectingLink[]], void>()

However, the current implementation is perfectly valid since the type constraint on line 45 provides type safety.

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7fcfec9 and be374fc.

📒 Files selected for processing (1)
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
🧰 Additional context used
📓 Path-based instructions (5)
tests-ui/**/*.test.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (tests-ui/CLAUDE.md)

tests-ui/**/*.test.{js,ts,jsx,tsx}: Write tests for new features
Follow existing test patterns in the codebase
Use existing test utilities rather than writing custom utilities
Mock external dependencies in tests
Always prefer vitest mock functions over writing verbose manual mocks

Files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not use any type or as any type assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code

Files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width

Files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.test.ts: Use unit/component tests in tests-ui/ or src/**/*.test.ts with Vitest framework
For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files
Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles
Aim for behavioral coverage of critical and new features in unit tests

Files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Minimize the surface area (exported values) of each module and composable

Files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
🧠 Learnings (20)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `vitest` for unit testing in this project
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Always prefer vitest mock functions over writing verbose manual mocks
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Use unit/component tests in `tests-ui/` or `src/**/*.test.ts` with Vitest framework
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `test` instead of `it` for defining test cases in vitest
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Mocks should be cleanly written and easy to understand, with reusable mocks where possible
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Prefer the use of `test.extend` over loose variables; import `test as baseTest` from `vitest`
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-16T17:41:58.464Z
Learning: Run tests, typecheck, lint, and format checks during development workflow
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:22.909Z
Learning: Applies to browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx} : Test user workflows in browser tests
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : When writing tests for subgraph-related code, always import from the barrel export at `@/lib/litegraph/src/litegraph` to avoid circular dependency issues

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{js,ts,jsx,tsx} : When adding features, always write vitest unit tests using cursor rules in @.cursor

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Prefer the use of `test.extend` over loose variables; import `test as baseTest` from `vitest`

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Use existing test utilities rather than writing custom utilities

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Use unit/component tests in `tests-ui/` or `src/**/*.test.ts` with Vitest framework

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Always prefer vitest mock functions over writing verbose manual mocks

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `vitest` for unit testing in this project

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{ts,tsx} : Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-12-10T03:09:13.807Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7303
File: src/components/topbar/CurrentUserPopover.test.ts:199-205
Timestamp: 2025-12-10T03:09:13.807Z
Learning: In test files, prefer selecting or asserting on accessible properties (text content, aria-label, role, accessible name) over data-testid attributes. This ensures tests validate actual user-facing behavior and accessibility, reducing reliance on implementation details like test IDs.

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-12-22T21:36:38.905Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts:189-194
Timestamp: 2025-12-22T21:36:38.905Z
Learning: In tests-ui feature tests, do not stub primitive UI components or customized primitives (e.g., Button). Instead, import and register the real components in the test setup so tests reflect production behavior and component API usage. This improves test reliability and fidelity. If a test must avoid rendering the full component, justify the approach and consider higher-level mocks or integration tests rather than replacing the primitive itself.

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
🧬 Code graph analysis (1)
tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts (2)
src/lib/litegraph/src/litegraph.ts (2)
  • LGraph (106-106)
  • LinkConnector (80-80)
src/lib/litegraph/src/interfaces.ts (1)
  • ConnectingLink (365-375)
🔇 Additional comments (2)
tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts (2)

4-13: LGTM: Import organization aligns with Vitest v4 migration.

The explicit import of ConnectingLink type and proper separation of type imports support the stricter mock typing patterns required by Vitest v4.


18-18: LGTM: Explicit function signature improves type clarity.

Replacing ReturnType<typeof vi.fn> with the explicit callback signature (value: ConnectingLink[]) => void aligns with Vitest v4's stricter mock typing and makes the expected interface clearer.

Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (5)
tests-ui/tests/api.featureFlags.test.ts (1)

27-29: Fix the constructor's this type annotation.

The type annotation this: typeof WebSocket is incorrect. In a constructor function, this should be typed as the instance type (WebSocket), not the constructor type (typeof WebSocket).

🔎 Proposed fix
-    vi.stubGlobal('WebSocket', function (this: typeof WebSocket) {
+    vi.stubGlobal('WebSocket', function (this: WebSocket) {
       Object.assign(this, mockWebSocket)
     })
tests-ui/tests/composables/useCachedRequest.test.ts (1)

6-10: Address the unresolved type safety concerns from previous review.

The concerns raised in the previous review remain valid:

  • Use of any type violates the coding guideline
  • Signature mismatch between the type annotation (includes signal) and implementation at line 28 (omits signal)

Consider the approach from the previous review or simplify by removing the unused signal parameter from the type annotation since it's never used in these tests.

As per coding guidelines, avoid using any type and fix the signature inconsistency.

tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts (2)

648-650: Acknowledged per prior discussion.

The function() syntax maintains consistency with other mocks in this file and ensures compatibility with Vitest v4 requirements for constructor-style mocks.


931-933: Acknowledged per prior discussion.

Consistent use of function() syntax for mock implementation.

tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts (1)

39-39: Add explicit generic type for consistency.

While line 22 now has an explicit type annotation, line 39 should use vi.fn<() => void>() to match the explicit generic pattern used in the companion test file and provide stronger type safety at the mock creation site.

🔎 Suggested change
-    onGraphChangedMock = vi.fn()
+    onGraphChangedMock = vi.fn<() => void>()
📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between be374fc and c28b84f.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (21)
  • pnpm-workspace.yaml
  • src/components/queue/job/useJobErrorReporting.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
🧰 Additional context used
📓 Path-based instructions (14)
tests-ui/**/*.test.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (tests-ui/CLAUDE.md)

tests-ui/**/*.test.{js,ts,jsx,tsx}: Write tests for new features
Follow existing test patterns in the codebase
Use existing test utilities rather than writing custom utilities
Mock external dependencies in tests
Always prefer vitest mock functions over writing verbose manual mocks

Files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not use any type or as any type assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code

Files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width

Files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.test.ts: Use unit/component tests in tests-ui/ or src/**/*.test.ts with Vitest framework
For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files
Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles
Aim for behavioral coverage of critical and new features in unit tests

Files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Minimize the surface area (exported values) of each module and composable

Files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
**/**/use[A-Z]*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables using the pattern useXyz.ts

Files:

  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/components/queue/job/useJobErrorReporting.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
src/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety

Files:

  • src/components/queue/job/useJobErrorReporting.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/components/queue/job/useJobErrorReporting.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/components/queue/job/useJobErrorReporting.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/components/queue/job/useJobErrorReporting.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
src/**/{components,composables}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Use vue-i18n for ALL user-facing strings by adding them to src/locales/en/main.json

Files:

  • src/components/queue/job/useJobErrorReporting.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
src/components/**/*.{vue,ts,js}

📄 CodeRabbit inference engine (src/components/CLAUDE.md)

src/components/**/*.{vue,ts,js}: Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners
Use useIntersectionObserver for visibility detection instead of custom scroll handlers
Use vue-i18n for ALL UI strings

Files:

  • src/components/queue/job/useJobErrorReporting.ts
src/**/{services,composables}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/{services,composables}/**/*.{ts,tsx}: Use api.apiURL() for backend endpoints instead of constructing URLs directly
Use api.fileURL() for static file access instead of constructing URLs directly

Files:

  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
🧠 Learnings (37)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Always prefer vitest mock functions over writing verbose manual mocks
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `vitest` for unit testing in this project
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Use unit/component tests in `tests-ui/` or `src/**/*.test.ts` with Vitest framework
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7797
File: tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts:648-648
Timestamp: 2025-12-30T01:31:04.927Z
Learning: In Vitest v4, when mocking functions that may be called as constructors (with `new` keyword), the mock implementation must use `function()` or `class` syntax instead of arrow functions. Arrow functions will cause `<anonymous> is not a constructor` errors. This is a breaking change from Vitest v3 where mocks used `mock.apply`.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Mocks should be cleanly written and easy to understand, with reusable mocks where possible
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Prefer the use of `test.extend` over loose variables; import `test as baseTest` from `vitest`
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:22.909Z
Learning: Applies to browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx} : Test user workflows in browser tests
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : When writing tests for subgraph-related code, always import from the barrel export at `@/lib/litegraph/src/litegraph` to avoid circular dependency issues
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Always prefer vitest mock functions over writing verbose manual mocks

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • pnpm-workspace.yaml
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • pnpm-workspace.yaml
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Follow existing test patterns in the codebase

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Use unit/component tests in `tests-ui/` or `src/**/*.test.ts` with Vitest framework

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • pnpm-workspace.yaml
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Use existing test utilities rather than writing custom utilities

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • pnpm-workspace.yaml
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Mocks should be cleanly written and easy to understand, with reusable mocks where possible

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-10T03:09:13.807Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7303
File: src/components/topbar/CurrentUserPopover.test.ts:199-205
Timestamp: 2025-12-10T03:09:13.807Z
Learning: In test files, prefer selecting or asserting on accessible properties (text content, aria-label, role, accessible name) over data-testid attributes. This ensures tests validate actual user-facing behavior and accessibility, reducing reliance on implementation details like test IDs.

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-30T01:31:04.927Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7797
File: tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts:648-648
Timestamp: 2025-12-30T01:31:04.927Z
Learning: In Vitest v4, when mocking functions that may be called as constructors (using new), the mock implementation must use function() or class syntax rather than an arrow function. Arrow mocks can cause '<anonymous> is not a constructor' errors. This is a breaking change from Vitest v3 where mocks could use an arrow function. Apply this guideline to test files that mock constructor-like calls (e.g., in tests under tests-ui, such as ComboWidget.test.ts) and ensure mock implementations are defined with function() { ... } or class { ... } to preserve constructor behavior.

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-22T21:36:38.905Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts:189-194
Timestamp: 2025-12-22T21:36:38.905Z
Learning: In tests-ui feature tests, do not stub primitive UI components or customized primitives (e.g., Button). Instead, import and register the real components in the test setup so tests reflect production behavior and component API usage. This improves test reliability and fidelity. If a test must avoid rendering the full component, justify the approach and consider higher-level mocks or integration tests rather than replacing the primitive itself.

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.{ts,tsx,vue} : Do not use `any` type or `as any` type assertions; fix the underlying type issue instead

Applied to files:

  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Avoid using ts-expect-error; use proper TypeScript types instead

Applied to files:

  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `vitest` for unit testing in this project

Applied to files:

  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • pnpm-workspace.yaml
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Prefer the use of `test.extend` over loose variables; import `test as baseTest` from `vitest`

Applied to files:

  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • pnpm-workspace.yaml
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.{ts,tsx} : Minimize the surface area (exported values) of each module and composable

Applied to files:

  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : When writing tests for subgraph-related code, always import from the barrel export at `@/lib/litegraph/src/litegraph` to avoid circular dependency issues

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{js,ts,jsx,tsx} : When adding features, always write vitest unit tests using cursor rules in @.cursor

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{ts,tsx} : Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Use Vite for fast development and building

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `test` instead of `it` for defining test cases in vitest

Applied to files:

  • pnpm-workspace.yaml
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.vue : Use Vue 3.5+ with TypeScript in `.vue` files, exclusively using Composition API with `<script setup lang="ts">` syntax

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-12-16T17:41:58.464Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-16T17:41:58.464Z
Learning: Prerequisites for repository setup: Node.js >= 24, Git repository, available ports for dev server and storybook

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.{ts,tsx,vue} : Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.{ts,tsx,vue} : Use es-toolkit for utility functions

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Use es-toolkit for utility functions instead of other utility libraries

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{vue,ts,tsx} : Follow Vue 3 composition API style guide

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:22.909Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:22.909Z
Learning: Applies to browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx} : Test user workflows in browser tests

Applied to files:

  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.{ts,tsx,vue} : Keep functions short and functional; minimize nesting and follow the arrow anti-pattern

Applied to files:

  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Do not replace `&&=` or `||=` with `=` when there is no reason to do so. If you do find a reason to remove either `&&=` or `||=`, leave a comment explaining why the removal occurred

Applied to files:

  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
🧬 Code graph analysis (7)
tests-ui/tests/composables/nodePack/usePacksSelection.test.ts (1)
src/workbench/extensions/manager/composables/nodePack/usePacksSelection.ts (1)
  • usePacksSelection (16-71)
tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts (1)
src/lib/litegraph/src/interfaces.ts (1)
  • ConnectingLink (365-375)
tests-ui/tests/components/queue/useJobErrorReporting.test.ts (2)
src/lib/litegraph/src/LGraphCanvas.ts (1)
  • copyToClipboard (3852-3856)
src/components/queue/job/useJobErrorReporting.ts (2)
  • UseJobErrorReportingOptions (43-47)
  • JobErrorDialogService (9-18)
src/platform/assets/composables/useMediaAssetGalleryStore.test.ts (1)
src/stores/queueStore.ts (1)
  • ResultItemImpl (40-214)
tests-ui/tests/services/keybindingService.escape.test.ts (1)
src/stores/commandStore.ts (1)
  • useCommandStore (75-147)
tests-ui/tests/composables/useJobList.test.ts (3)
src/stores/queueStore.ts (2)
  • key (282-284)
  • promptId (290-292)
src/types/queue.ts (1)
  • JobState (4-9)
src/utils/queueDisplay.ts (2)
  • BuildJobDisplayCtx (6-17)
  • JobDisplay (19-25)
tests-ui/tests/litegraph/core/LinkConnector.test.ts (1)
src/lib/litegraph/src/interfaces.ts (1)
  • ConnectingLink (365-375)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: test
  • GitHub Check: setup
  • GitHub Check: collect
  • GitHub Check: lint-and-format

Comment on lines +62 to +63
globals: ^16.5.0
happy-dom: ^20.0.11
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

🏁 Script executed:

cd /tmp && find . -name "pnpm-workspace.yaml" -o -name "pnpm-workspace.yml" 2>/dev/null | head -5

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 98


🏁 Script executed:

# First, let's locate and examine the pnpm-workspace.yaml file
git ls-files | grep -E "pnpm-workspace\.ya?ml"

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 89


🏁 Script executed:

# Read the pnpm-workspace.yaml file to see actual versions
cat pnpm-workspace.yaml | head -n 120

Repository: Comfy-Org/ComfyUI_frontend

Length of output: 2992


🌐 Web query:

Vitest v4 happy-dom jsdom globals compatibility requirements

💡 Result:

Short summary — Vitest v4 compatibility with happy-dom / jsdom and globals

  • Environments: Vitest supports both jsdom and happy-dom as test environments; you must install the chosen package yourself (npm i -D jsdom or happy-dom) and set test.environment to 'jsdom' or 'happy-dom'. [1][2]

  • environmentOptions: Vitest v4 accepts per-environment options (keys: jsdom and happyDOM) via test.environmentOptions to pass options into the environment setup. [3]

  • Globals: Vitest does not enable Jest-style globals by default. Enable them with test.globals = true (or --globals) if you want window/document/test APIs injected as globals; otherwise import from 'vitest'. [4]

  • API differences: happy-dom is generally faster but may lack some browser APIs that jsdom implements; choose jsdom for wider API coverage or happy-dom for speed and configure specific tests if needed. vi.stubGlobal/unstubAllGlobals affects both globalThis and window when using jsdom/happy-dom. [1][2]

References

  1. Vitest config / docs (environments, jsdom note). [1]
  2. Vitest guide — features (installing jsdom/happy-dom). [2]
  3. environmentOptions config reference (jsdom / happyDOM keys). [3]
  4. Migration / globals behavior (globals disabled by default). [4]

🌐 Web query:

happy-dom v20 breaking changes release notes

💡 Result:

Summary — happy-dom v20 breaking changes

  • Main breaking change: JavaScript evaluation (eval/Function) is disabled by default for security (VM-context escape / RCE). To re-enable you must set enableJavaScriptEvaluation: true and follow the safer-usage guidance in the project Wiki. [1][2]

Sources

  • happy-dom v20 release notes (GitHub releases). [1]
  • GHSA advisory / security advisory for the VM context escape (GHSA-37j7-fg3j-429f). [2]

References
[1] https://github.com/capricorn86/happy-dom/releases.
[2] GHSA-37j7-fg3j-429f.


🌐 Web query:

jsdom v27 vitest compatibility breaking changes

💡 Result:

Short summary of jsdom v27 breaking changes that have caused Vitest test failures and compatibility issues — and quick mitigations.

What changed in jsdom v27 (relevant points)

  • Minimum Node.js requirement raised to Node 20+. [1][2]
  • User-agent stylesheet and CSS parsing/OM updates (behavioral changes that can break layout/selector-dependent tests). [2][3]
  • Event/DOM API changes: many new event constructors (PointerEvent, PromiseRejectionEvent, TransitionEvent, BeforeUnloadEvent, etc.), element.click() now fires PointerEvent instead of MouseEvent, some events made passive by default, MouseEvent gained movementX/movementY. These change event behavior/feature-detection in tests. [2]
  • Dependency/behavior changes (e.g., tough-cookie upgrade affecting cookie "secure" handling for http://localhost). [2]

Observed Vitest impacts and causes

  • Tests that relied on previous jsdom CSS/UA-styles, specific event types, or old feature-detection began failing after v27 (reports and writeups show many test suites broke after v27). [3]
  • Separate but related ecosystem problems: module resolution / environment conditions with Vite/Vitest can surface when switching DOM shims; Vitest has also introduced a real browser "browser mode" as an alternative to JSDOM for flaky DOM behavior. [6][4]

Quick mitigations

  • If you need immediate stability: pin jsdom to the latest 26.x release until you can adapt tests (package.json: "jsdom": "26.x"). [2][3]
  • Ensure your CI/dev Node version is >=20 when using jsdom v27+. [1][2]
  • Audit tests for assumptions about event types (MouseEvent vs PointerEvent), passive event behavior, and UA stylesheet-dependent CSS/selector behavior; adjust assertions or simulate the new events.
  • Consider switching tests that require more realistic browser behavior to Vitest’s browser mode (runs in a real browser) or run those tests in a Playwright-backed environment. [4]
  • File or follow issues in Vitest/jsdom repos if you hit specific regressions — many are already tracked. [3][5]

Sources
[1] jsdom v27 release notes / changelog (summary including Node 20 minimum).
[2] jsdom releases page (v27.0.0 → 27.x detailed changelog).
[3] Community writeup reporting Vitest test failures after jsdom v27.
[4] Vitest introduces Browser Mode (alternative to jsdom).
[5] Vitest issues discussing jsdom/environment resolution and related test failures.

If you want, I can:

  • look up the exact jsdom 26.x version string to pin to, or
  • search your repo/tests for specific patterns (element.click, MouseEvent usage, UA stylesheet reliance) and suggest targeted fixes.

Address breaking changes in test environment package upgrades.

The test environment packages have breaking changes that require test updates:

  • jsdom v27: Raises minimum Node.js to v20+, changes event behavior (PointerEvent replaces MouseEvent for element.click()), modifies CSS/UA stylesheet handling, makes some event listeners passive by default, and alters cookie security handling. Community reports indicate many test suites broke after this upgrade.
  • happy-dom v20: Disables JavaScript evaluation (eval/Function) by default for security; re-enable via enableJavaScriptEvaluation: true if tests rely on it.

Audit tests for assumptions about event types, passive event behavior, UA stylesheet dependencies, and any eval-based code before merging.

Copy link
Contributor

@christian-byrne christian-byrne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good. Definitely will be some conflicts with the open Jobs PRs

oxlint-tsgolint: ^0.9.1
picocolors: ^1.1.1
pinia: ^2.1.7
pinia: ^3.0.4
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Won't this change be the more important one? Wonder what this major change included in pinia

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@DrJKL DrJKL requested a review from ric-yu December 30, 2025 02:10
@DrJKL DrJKL force-pushed the drjkl/update-vitest branch from c28b84f to 3533103 Compare December 30, 2025 02:23
Copy link
Contributor

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

♻️ Duplicate comments (2)
tests-ui/tests/composables/useCachedRequest.test.ts (1)

6-10: The concerns from the previous review remain unaddressed.

The explicit type annotations still use any for the params parameter (violates coding guidelines), and the type signature includes signal?: AbortSignal while the implementation at line 28 omits this parameter. The previous review comment provides specific guidance on using Vitest's Mock type utilities and replacing any with a more appropriate type.

tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts (1)

22-22: Type annotation improves clarity over ReturnType<typeof vi.fn>.

The explicit () => void type annotation on line 22 is a clear improvement. However, this pattern differs from the companion file useMinimapInteraction.test.ts which uses vi.fn<signature>() with inline generics. While both approaches are type-safe, consider using onGraphChangedMock = vi.fn<() => void>() on line 39 for consistency across related test files in this PR.

Based on learnings, this aligns with Vitest v4 patterns for explicit mock typing.

Also applies to: 39-39

📜 Review details

Configuration used: Organization UI

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c28b84f and 3533103.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (21)
  • pnpm-workspace.yaml
  • src/components/queue/job/useJobErrorReporting.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
🧰 Additional context used
📓 Path-based instructions (14)
tests-ui/**/*.test.{js,ts,jsx,tsx}

📄 CodeRabbit inference engine (tests-ui/CLAUDE.md)

tests-ui/**/*.test.{js,ts,jsx,tsx}: Write tests for new features
Follow existing test patterns in the codebase
Use existing test utilities rather than writing custom utilities
Mock external dependencies in tests
Always prefer vitest mock functions over writing verbose manual mocks

Files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (AGENTS.md)

**/*.{ts,tsx,vue}: Use TypeScript exclusively; do not write new JavaScript code
Use sorted and grouped imports organized by plugin/source
Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates
Do not use any type or as any type assertions; fix the underlying type issue instead
Write code that is expressive and self-documenting; avoid redundant comments and clean as you go
Keep functions short and functional; minimize nesting and follow the arrow anti-pattern
Avoid mutable state; prefer immutability and assignment at point of declaration
Use function declarations instead of function expressions when possible
Use es-toolkit for utility functions
Implement proper error handling in code

Files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
**/*.{ts,tsx,vue,js,jsx,json,css}

📄 CodeRabbit inference engine (AGENTS.md)

Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, and 80-character line width

Files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
**/*.test.ts

📄 CodeRabbit inference engine (AGENTS.md)

**/*.test.ts: Use unit/component tests in tests-ui/ or src/**/*.test.ts with Vitest framework
For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files
Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles
Aim for behavioral coverage of critical and new features in unit tests

Files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
**/*.{ts,tsx}

📄 CodeRabbit inference engine (AGENTS.md)

Minimize the surface area (exported values) of each module and composable

Files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
src/**/*.{vue,ts}

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.{vue,ts}: Leverage VueUse functions for performance-enhancing styles
Implement proper error handling
Use vue-i18n in composition API for any string literals. Place new translation entries in src/locales/en/main.json

Files:

  • src/utils/queueDisplay.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
src/**/*.ts

📄 CodeRabbit inference engine (.github/copilot-instructions.md)

src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety

Files:

  • src/utils/queueDisplay.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
src/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/*.{ts,tsx,vue}: Sanitize HTML with DOMPurify to prevent XSS attacks
Avoid using @ts-expect-error; use proper TypeScript types instead
Use es-toolkit for utility functions instead of other utility libraries
Implement proper TypeScript types throughout the codebase

Files:

  • src/utils/queueDisplay.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
src/**/*.{vue,ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Follow Vue 3 composition API style guide

Files:

  • src/utils/queueDisplay.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
**/**/use[A-Z]*.ts

📄 CodeRabbit inference engine (AGENTS.md)

Name composables using the pattern useXyz.ts

Files:

  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
src/**/{composables,components}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Clean up subscriptions in state management to prevent memory leaks

Files:

  • src/components/queue/job/useJobErrorReporting.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
src/**/{components,composables}/**/*.{ts,tsx,vue}

📄 CodeRabbit inference engine (src/CLAUDE.md)

Use vue-i18n for ALL user-facing strings by adding them to src/locales/en/main.json

Files:

  • src/components/queue/job/useJobErrorReporting.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
src/components/**/*.{vue,ts,js}

📄 CodeRabbit inference engine (src/components/CLAUDE.md)

src/components/**/*.{vue,ts,js}: Use existing VueUse composables (such as useElementHover) instead of manually managing event listeners
Use useIntersectionObserver for visibility detection instead of custom scroll handlers
Use vue-i18n for ALL UI strings

Files:

  • src/components/queue/job/useJobErrorReporting.ts
src/**/{services,composables}/**/*.{ts,tsx}

📄 CodeRabbit inference engine (src/CLAUDE.md)

src/**/{services,composables}/**/*.{ts,tsx}: Use api.apiURL() for backend endpoints instead of constructing URLs directly
Use api.fileURL() for static file access instead of constructing URLs directly

Files:

  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
🧠 Learnings (51)
📓 Common learnings
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `vitest` for unit testing in this project
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Always prefer vitest mock functions over writing verbose manual mocks
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Use unit/component tests in `tests-ui/` or `src/**/*.test.ts` with Vitest framework
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `test` instead of `it` for defining test cases in vitest
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7797
File: tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts:648-648
Timestamp: 2025-12-30T01:31:04.927Z
Learning: In Vitest v4, when mocking functions that may be called as constructors (with `new` keyword), the mock implementation must use `function()` or `class` syntax instead of arrow functions. Arrow functions will cause `<anonymous> is not a constructor` errors. This is a breaking change from Vitest v3 where mocks used `mock.apply`.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Mocks should be cleanly written and easy to understand, with reusable mocks where possible
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Prefer the use of `test.extend` over loose variables; import `test as baseTest` from `vitest`
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:22.909Z
Learning: Applies to browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx} : Test user workflows in browser tests
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : For mocking in tests, leverage Vitest utilities; keep module mocks contained and avoid global mutable state within test files

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Always prefer vitest mock functions over writing verbose manual mocks

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • pnpm-workspace.yaml
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Mock external dependencies in tests

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • pnpm-workspace.yaml
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Write tests for new features

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • pnpm-workspace.yaml
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Use existing test utilities rather than writing custom utilities

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • pnpm-workspace.yaml
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Applies to tests-ui/**/*.test.{js,ts,jsx,tsx} : Follow existing test patterns in the codebase

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • pnpm-workspace.yaml
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Mocks should be cleanly written and easy to understand, with reusable mocks where possible

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : Use provided test helpers `createTestSubgraph` and `createTestSubgraphNode` from `./fixtures/subgraphHelpers` for consistent subgraph test setup

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Use unit/component tests in `tests-ui/` or `src/**/*.test.ts` with Vitest framework

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • pnpm-workspace.yaml
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Do not write change detector tests or tests dependent on non-behavioral features like utility classes or styles

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
📚 Learning: 2025-12-13T11:03:11.264Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7416
File: src/stores/imagePreviewStore.ts:5-7
Timestamp: 2025-12-13T11:03:11.264Z
Learning: In the ComfyUI_frontend repository, lint rules require keeping 'import type' statements separate from non-type imports, even if importing from the same module. Do not suggest consolidating them into a single import statement. Ensure type imports remain on their own line (import type { ... } from 'module') and regular imports stay on separate lines.

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
📚 Learning: 2025-12-17T00:40:09.635Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7537
File: src/components/ui/button/Button.stories.ts:45-55
Timestamp: 2025-12-17T00:40:09.635Z
Learning: Prefer pure function declarations over function expressions (e.g., use function foo() { ... } instead of const foo = () => { ... }) for pure functions in the repository. Function declarations are more functional-leaning, offer better hoisting clarity, and can improve readability and tooling consistency. Apply this guideline across TypeScript files in Comfy-Org/ComfyUI_frontend, including story and UI component code, except where a function expression is semantically required (e.g., callbacks, higher-order functions with closures).

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
📚 Learning: 2025-12-10T03:09:13.807Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7303
File: src/components/topbar/CurrentUserPopover.test.ts:199-205
Timestamp: 2025-12-10T03:09:13.807Z
Learning: In test files, prefer selecting or asserting on accessible properties (text content, aria-label, role, accessible name) over data-testid attributes. This ensures tests validate actual user-facing behavior and accessibility, reducing reliance on implementation details like test IDs.

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
📚 Learning: 2025-12-30T01:31:04.927Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7797
File: tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts:648-648
Timestamp: 2025-12-30T01:31:04.927Z
Learning: In Vitest v4, when mocking functions that may be called as constructors (using new), the mock implementation must use function() or class syntax rather than an arrow function. Arrow mocks can cause '<anonymous> is not a constructor' errors. This is a breaking change from Vitest v3 where mocks could use an arrow function. Apply this guideline to test files that mock constructor-like calls (e.g., in tests under tests-ui, such as ComboWidget.test.ts) and ensure mock implementations are defined with function() { ... } or class { ... } to preserve constructor behavior.

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
📚 Learning: 2025-12-11T12:25:15.470Z
Learnt from: christian-byrne
Repo: Comfy-Org/ComfyUI_frontend PR: 7358
File: src/components/dialog/content/signin/SignUpForm.vue:45-54
Timestamp: 2025-12-11T12:25:15.470Z
Learning: This repository uses CI automation to format code (pnpm format). Do not include manual formatting suggestions in code reviews for Comfy-Org/ComfyUI_frontend. If formatting issues are detected, rely on the CI formatter or re-run pnpm format. Focus reviews on correctness, readability, performance, accessibility, and maintainability rather than style formatting.

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • src/utils/queueDisplay.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • src/components/queue/job/useJobErrorReporting.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • src/platform/assets/composables/useMediaAssetGalleryStore.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
📚 Learning: 2025-12-22T21:36:38.905Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7649
File: tests-ui/tests/platform/cloud/subscription/components/SubscriptionPanel.test.ts:189-194
Timestamp: 2025-12-22T21:36:38.905Z
Learning: In tests-ui feature tests, do not stub primitive UI components or customized primitives (e.g., Button). Instead, import and register the real components in the test setup so tests reflect production behavior and component API usage. This improves test reliability and fidelity. If a test must avoid rendering the full component, justify the approach and consider higher-level mocks or integration tests rather than replacing the primitive itself.

Applied to files:

  • tests-ui/tests/components/graph/ZoomControlsModal.test.ts
  • tests-ui/tests/composables/useLoad3dDrag.test.ts
  • tests-ui/tests/composables/useLoad3dViewer.test.ts
  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/composables/useLoad3d.test.ts
  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/composables/useJobList.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/composables/maskeditor/useCanvasHistory.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
  • tests-ui/tests/services/keybindingService.escape.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Prefer the use of `test.extend` over loose variables; import `test as baseTest` from `vitest`

Applied to files:

  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `vitest` for unit testing in this project

Applied to files:

  • tests-ui/tests/composables/nodePack/usePacksSelection.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • pnpm-workspace.yaml
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.{ts,tsx,vue} : Keep functions short and functional; minimize nesting and follow the arrow anti-pattern

Applied to files:

  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{js,ts,jsx,tsx} : Do not replace `&&=` or `||=` with `=` when there is no reason to do so. If you do find a reason to remove either `&&=` or `||=`, leave a comment explaining why the removal occurred

Applied to files:

  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{js,ts,jsx,tsx} : When adding features, always write vitest unit tests using cursor rules in @.cursor

Applied to files:

  • tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
📚 Learning: 2025-11-24T19:47:22.909Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:22.909Z
Learning: Applies to browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx} : Use Playwright fixtures for browser tests

Applied to files:

  • tests-ui/tests/api.featureFlags.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.{ts,tsx,vue} : Do not use `any` type or `as any` type assertions; fix the underlying type issue instead

Applied to files:

  • tests-ui/tests/api.featureFlags.test.ts
  • tests-ui/tests/composables/useCachedRequest.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{test,spec}.{ts,tsx} : When writing tests for subgraph-related code, always import from the barrel export at `@/lib/litegraph/src/litegraph` to avoid circular dependency issues

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Use `test` instead of `it` for defining test cases in vitest

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.test.ts
  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Avoid using ts-expect-error; use proper TypeScript types instead

Applied to files:

  • tests-ui/tests/composables/useCachedRequest.test.ts
  • tests-ui/tests/components/queue/useJobErrorReporting.test.ts
📚 Learning: 2025-12-18T16:03:09.642Z
Learnt from: henrikvilhelmberglund
Repo: Comfy-Org/ComfyUI_frontend PR: 7617
File: src/components/actionbar/ComfyActionbar.vue:301-308
Timestamp: 2025-12-18T16:03:09.642Z
Learning: In the ComfyUI frontend queue system (src/stores/queueStore.ts), the `useQueuePendingTaskCountStore().count` includes the currently executing task. When count = 1, there is only the active/running task with no pending tasks. When count > 1, there is an active task plus pending tasks waiting in the queue. The "Clear Pending Tasks" button should only be enabled when count > 1 to avoid clearing the currently running task, which should be handled by the "Cancel current run" button instead.

Applied to files:

  • tests-ui/tests/composables/useJobList.test.ts
📚 Learning: 2025-11-24T19:47:56.371Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/lib/litegraph/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:56.371Z
Learning: Applies to src/lib/litegraph/**/*.{ts,tsx} : Type assertions are an absolute last resort. In almost all cases, they are a crutch that leads to brittle code

Applied to files:

  • tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.{ts,tsx} : Minimize the surface area (exported values) of each module and composable

Applied to files:

  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.ts
  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
📚 Learning: 2025-11-24T19:48:03.270Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: tests-ui/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:48:03.270Z
Learning: Check tests-ui/README.md for test guidelines

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:48:09.318Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .cursor/rules/unit-test.mdc:0-0
Timestamp: 2025-11-24T19:48:09.318Z
Learning: Applies to test/**/*.{test,spec}.{js,ts,jsx,tsx} : Tests should be cross-platform compatible using `path.resolve`, `path.join`, and `path.sep` for Windows, macOS, and Linux compatibility

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:22.909Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: browser_tests/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:22.909Z
Learning: Applies to browser_tests/**/*.{e2e,spec}.{ts,tsx,js,jsx} : Prefer specific selectors in browser tests

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Use the Vue 3 Composition API instead of the Options API when writing Vue components (exception: when overriding or extending PrimeVue components for compatibility)

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.vue : Utilize Vue 3's Teleport component when needed

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Utilize Vue 3's Teleport component when needed

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Replace PrimeVue Steps component with Stepper without panels

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Use vue 3.5 style of default prop declaration

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:02.860Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: .github/copilot-instructions.md:0-0
Timestamp: 2025-11-24T19:47:02.860Z
Learning: Applies to src/**/*.vue : Follow Vue 3 style guide and naming conventions

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{vue,ts,tsx} : Follow Vue 3 composition API style guide

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.vue : Follow Vue 3 style guide and naming conventions

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Use ref/reactive for state management in Vue 3 Composition API

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:45.616Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/components/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:45.616Z
Learning: Applies to src/components/**/*.vue : Destructure props using Vue 3.5 style in Vue components

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Use Vite for fast development and building

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.vue : Use Vue 3.5+ with TypeScript in `.vue` files, exclusively using Composition API with `<script setup lang="ts">` syntax

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-12-16T17:41:58.464Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: CLAUDE.md:0-0
Timestamp: 2025-12-16T17:41:58.464Z
Learning: Prerequisites for repository setup: Node.js >= 24, Git repository, available ports for dev server and storybook

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.{ts,tsx,vue} : Enforce ESLint rules including Vue + TypeScript rules, disallow floating promises, disallow unused imports, and restrict i18n raw text in templates

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.{ts,tsx,vue} : Use es-toolkit for utility functions

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-11-24T19:47:34.324Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: src/CLAUDE.md:0-0
Timestamp: 2025-11-24T19:47:34.324Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Use es-toolkit for utility functions instead of other utility libraries

Applied to files:

  • pnpm-workspace.yaml
📚 Learning: 2025-12-21T06:04:12.562Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2025-12-21T06:04:12.562Z
Learning: Applies to **/*.test.ts : Aim for behavioral coverage of critical and new features in unit tests

Applied to files:

  • tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
🧬 Code graph analysis (8)
tests-ui/tests/composables/nodePack/usePacksSelection.test.ts (1)
src/workbench/extensions/manager/composables/nodePack/usePacksSelection.ts (1)
  • usePacksSelection (16-71)
tests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.ts (1)
src/lib/litegraph/src/litegraph.ts (1)
  • LiteGraph (17-17)
src/platform/assets/composables/useMediaAssetGalleryStore.test.ts (1)
src/stores/queueStore.ts (1)
  • ResultItemImpl (40-214)
tests-ui/tests/litegraph/core/LinkConnector.test.ts (1)
src/lib/litegraph/src/interfaces.ts (1)
  • ConnectingLink (365-375)
tests-ui/tests/composables/useJobList.test.ts (3)
src/stores/queueStore.ts (3)
  • key (282-284)
  • TaskItemImpl (216-475)
  • promptId (290-292)
src/types/queue.ts (1)
  • JobState (4-9)
src/utils/queueDisplay.ts (2)
  • BuildJobDisplayCtx (6-17)
  • buildJobDisplay (62-160)
tests-ui/tests/litegraph/core/LinkConnector.integration.test.ts (1)
src/lib/litegraph/src/interfaces.ts (1)
  • ConnectingLink (365-375)
tests-ui/tests/components/queue/useJobErrorReporting.test.ts (1)
src/components/queue/job/useJobErrorReporting.ts (2)
  • UseJobErrorReportingOptions (43-47)
  • JobErrorDialogService (9-18)
tests-ui/tests/services/keybindingService.escape.test.ts (1)
src/stores/commandStore.ts (1)
  • useCommandStore (75-147)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (4)
  • GitHub Check: setup
  • GitHub Check: lint-and-format
  • GitHub Check: test
  • GitHub Check: collect

@socket-security
Copy link

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm vite is 91.0% likely obfuscated

Confidence: 0.91

Location: Package overview

From: apps/desktop-ui/package.jsonnpm/vite@7.3.0

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/vite@7.3.0. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@DrJKL DrJKL merged commit 3ae2b52 into main Dec 30, 2025
28 checks passed
@DrJKL DrJKL deleted the drjkl/update-vitest branch December 30, 2025 03:24
@christian-byrne christian-byrne added needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch core/1.36 labels Jan 13, 2026
github-actions bot pushed a commit that referenced this pull request Jan 13, 2026
## Summary

https://vitest.dev/guide/migration.html#vitest-4

## Changes

- **What**: Update Vitest and some associated dependencies
- **What**: Fix issue with our existing mocks and mock types

## Review Focus

Double check the test updates. I tried to keep the changes minimal.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7797-Chore-Upgrade-Vitest-to-v4-2d96d73d3650810cbe3ac42d7bd6585a)
by [Unito](https://www.unito.io)

---------

Co-authored-by: GitHub Action <action@github.com>
@github-actions
Copy link

⚠️ Backport to cloud/1.36 failed

Reason: Merge conflicts detected during cherry-pick of 3ae2b52

📄 Conflicting files
pnpm-lock.yaml
🤖 Prompt for AI Agents
Backport PR #7797 (https://github.com/Comfy-Org/ComfyUI_frontend/pull/7797) to cloud/1.36.
Cherry-pick merge commit 3ae2b52649e8303ae48b99d635de9547680194a8 onto new branch
backport-7797-to-cloud-1.36 from origin/cloud/1.36.
Resolve conflicts in: pnpm-lock.yaml .
For test snapshots (browser_tests/**/*-snapshots/), accept PR version if
changed in original PR, else keep target. For package.json versions, keep
target branch. For pnpm-lock.yaml, regenerate with pnpm install.
Ask user for non-obvious conflicts.
Create PR titled "[backport cloud/1.36] <original title>" with label "backport".
See .github/workflows/pr-backport.yaml for workflow details.

cc @DrJKL

github-actions bot pushed a commit that referenced this pull request Jan 13, 2026
## Summary

https://vitest.dev/guide/migration.html#vitest-4

## Changes

- **What**: Update Vitest and some associated dependencies
- **What**: Fix issue with our existing mocks and mock types

## Review Focus

Double check the test updates. I tried to keep the changes minimal.

┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-7797-Chore-Upgrade-Vitest-to-v4-2d96d73d3650810cbe3ac42d7bd6585a)
by [Unito](https://www.unito.io)

---------

Co-authored-by: GitHub Action <action@github.com>
@github-actions
Copy link

⚠️ Backport to cloud/1.36 failed

Reason: Merge conflicts detected during cherry-pick of 3ae2b52

📄 Conflicting files
pnpm-lock.yaml
🤖 Prompt for AI Agents
Backport PR #7797 (https://github.com/Comfy-Org/ComfyUI_frontend/pull/7797) to cloud/1.36.
Cherry-pick merge commit 3ae2b52649e8303ae48b99d635de9547680194a8 onto new branch
backport-7797-to-cloud-1.36 from origin/cloud/1.36.
Resolve conflicts in: pnpm-lock.yaml .
For test snapshots (browser_tests/**/*-snapshots/), accept PR version if
changed in original PR, else keep target. For package.json versions, keep
target branch. For pnpm-lock.yaml, regenerate with pnpm install.
Ask user for non-obvious conflicts.
Create PR titled "[backport cloud/1.36] <original title>" with label "backport".
See .github/workflows/pr-backport.yaml for workflow details.

cc @DrJKL

@christian-byrne
Copy link
Contributor

Seems like it doesn't actually need to be backported -- all the other backports still worked.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

needs-backport Fix/change that needs to be cherry-picked to the current feature freeze branch size:L This PR changes 100-499 lines, ignoring generated files.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants