Conversation
📝 WalkthroughWalkthroughBumped workspace dependency versions; exported TypeScript types ( Changes
Sequence Diagram(s)(omitted) Possibly related PRs
✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (7)src/**/*.{vue,ts}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
src/**/*.ts📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
src/**/*.{ts,tsx,vue}📄 CodeRabbit inference engine (src/CLAUDE.md)
Files:
src/**/*.{vue,ts,tsx}📄 CodeRabbit inference engine (src/CLAUDE.md)
Files:
**/*.{ts,tsx,vue}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx,vue,js,jsx,json,css}📄 CodeRabbit inference engine (AGENTS.md)
Files:
**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (5)📓 Common learnings📚 Learning: 2025-12-09T03:39:54.501ZApplied to files:
📚 Learning: 2025-12-13T11:03:11.264ZApplied to files:
📚 Learning: 2025-12-17T00:40:09.635ZApplied to files:
📚 Learning: 2025-12-11T12:25:15.470ZApplied to files:
⏰ 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)
🔇 Additional comments (1)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 12/30/2025, 02:38:23 AM UTC 🔗 Links🎉 Your Storybook is ready for review! |
🎭 Playwright Test Results⏰ Completed at: 12/30/2025, 02:46:43 AM UTC 📈 Summary
📊 Test Reports by Browser
🎉 Click on the links above to view detailed test results for each browser configuration. |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.2 MB (baseline 3.2 MB) • ⚪ 0 BMain entry bundles and manifests
Status: 3 added / 3 removed Graph Workspace — 1000 kB (baseline 1000 kB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 6.63 kB (baseline 6.63 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 1 added / 1 removed Panels & Settings — 300 kB (baseline 300 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 6 added / 6 removed UI Components — 199 kB (baseline 199 kB) • ⚪ 0 BReusable component library chunks
Status: 10 added / 10 removed Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 3 added / 3 removed Utilities & Hooks — 1.41 kB (baseline 1.41 kB) • ⚪ 0 BHelpers, composables, and utility bundles
Status: 1 added / 1 removed Vendor & Third-Party — 9.12 MB (baseline 9.1 MB) • 🔴 +20.9 kBExternal libraries and shared vendor chunks
Status: 5 added / 5 removed Other — 3.47 MB (baseline 3.47 MB) • ⚪ 0 BBundles that do not match a named category
Status: 25 added / 25 removed |
🔧 Auto-fixes AppliedThis PR has been automatically updated to fix linting and formatting issues.
Changes made:
|
There was a problem hiding this comment.
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: Addvi.unstubAllGlobals()to the afterEach cleanup.
vi.restoreAllMocks()only handles spies created withvi.spyOn(). Since the test usesvi.stubGlobal('WebSocket', ...)on line 27, it requires explicit cleanup withvi.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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (21)
pnpm-workspace.yamlsrc/components/queue/job/useJobErrorReporting.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-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.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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 useanytype oras anytype 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.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useJobList.test.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useJobList.test.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/litegraph/core/LinkConnector.test.ts
**/*.test.ts
📄 CodeRabbit inference engine (AGENTS.md)
**/*.test.ts: Use unit/component tests intests-ui/orsrc/**/*.test.tswith 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.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useJobList.test.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tssrc/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.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tssrc/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.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tssrc/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.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/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.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tssrc/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.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/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.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.ts
src/**/{services,composables}/**/*.{ts,tsx}
📄 CodeRabbit inference engine (src/CLAUDE.md)
src/**/{services,composables}/**/*.{ts,tsx}: Useapi.apiURL()for backend endpoints instead of constructing URLs directly
Useapi.fileURL()for static file access instead of constructing URLs directly
Files:
src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/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.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tspnpm-workspace.yamlsrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tspnpm-workspace.yamlsrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-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.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useJobList.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-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.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useJobList.test.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useJobList.test.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useJobList.test.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useJobList.test.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tstests-ui/tests/components/graph/ZoomControlsModal.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-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.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-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.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-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.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-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.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-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.tspnpm-workspace.yamlsrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tspnpm-workspace.yamlsrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.yamlsrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.yamlsrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-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.yamltests-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
| let mockRequestFn: ( | ||
| params: any, | ||
| signal?: AbortSignal | ||
| ) => Promise<unknown | null> | ||
| let abortSpy: () => void |
There was a problem hiding this comment.
🧹 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.
| 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>> |
| 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 () { |
There was a problem hiding this comment.
🧹 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.
There was a problem hiding this comment.
There was a problem hiding this comment.
@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 () { |
There was a problem hiding this comment.
🧹 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.
tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts
Show resolved
Hide resolved
| mockCommandExecute = vi.fn() | ||
| commandStore.execute = mockCommandExecute |
There was a problem hiding this comment.
🧹 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 = mockCommandExecuteThis 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.
| 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.
There was a problem hiding this comment.
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
📒 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 useanytype oras anytype 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 intests-ui/orsrc/**/*.test.tswith 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
ConnectingLinktype 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[]) => voidaligns with Vitest v4's stricter mock typing and makes the expected interface clearer.
be374fc to
c28b84f
Compare
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (5)
tests-ui/tests/api.featureFlags.test.ts (1)
27-29: Fix the constructor'sthistype annotation.The type annotation
this: typeof WebSocketis incorrect. In a constructor function,thisshould 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
anytype violates the coding guideline- Signature mismatch between the type annotation (includes
signal) and implementation at line 28 (omitssignal)Consider the approach from the previous review or simplify by removing the unused
signalparameter from the type annotation since it's never used in these tests.As per coding guidelines, avoid using
anytype 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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (21)
pnpm-workspace.yamlsrc/components/queue/job/useJobErrorReporting.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-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.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/composables/useJobList.test.tstests-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 useanytype oras anytype 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.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/api.featureFlags.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/composables/useJobList.test.tstests-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.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/api.featureFlags.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.test.ts
**/*.test.ts
📄 CodeRabbit inference engine (AGENTS.md)
**/*.test.ts: Use unit/component tests intests-ui/orsrc/**/*.test.tswith 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.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/api.featureFlags.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/composables/useJobList.test.tstests-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.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/api.featureFlags.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/composables/useJobList.test.tstests-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.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/components/queue/useJobErrorReporting.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-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.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tssrc/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.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tssrc/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.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tssrc/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.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/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.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tssrc/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.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/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}: Useapi.apiURL()for backend endpoints instead of constructing URLs directly
Useapi.fileURL()for static file access instead of constructing URLs directly
Files:
src/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/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.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/api.featureFlags.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/composables/useJobList.test.tstests-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.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tspnpm-workspace.yamltests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/api.featureFlags.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/composables/useJobList.test.tstests-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.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tspnpm-workspace.yamltests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/api.featureFlags.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-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.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/api.featureFlags.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-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.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-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.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tspnpm-workspace.yamltests-ui/tests/components/queue/useJobErrorReporting.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-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.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tspnpm-workspace.yamltests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/composables/useJobList.test.tstests-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.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-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.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-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.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/api.featureFlags.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-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.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/api.featureFlags.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/composables/useJobList.test.tstests-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.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/api.featureFlags.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/composables/useJobList.test.tstests-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.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/api.featureFlags.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/composables/useJobList.test.tstests-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.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/api.featureFlags.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/composables/useJobList.test.tstests-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.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/api.featureFlags.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/composables/useJobList.test.tstests-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.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/api.featureFlags.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/composables/useJobList.test.tstests-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.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/services/keybindingService.escape.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/composables/useJobList.test.tstests-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.tstests-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.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tspnpm-workspace.yamlsrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/api.featureFlags.test.tstests-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.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tspnpm-workspace.yamlsrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-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.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-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.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-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.yamltests-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
| globals: ^16.5.0 | ||
| happy-dom: ^20.0.11 |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
cd /tmp && find . -name "pnpm-workspace.yaml" -o -name "pnpm-workspace.yml" 2>/dev/null | head -5Repository: 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 120Repository: 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
- Vitest config / docs (environments, jsdom note). [1]
- Vitest guide — features (installing jsdom/happy-dom). [2]
- environmentOptions config reference (jsdom / happyDOM keys). [3]
- 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: trueif tests rely on it.
Audit tests for assumptions about event types, passive event behavior, UA stylesheet dependencies, and any eval-based code before merging.
christian-byrne
left a comment
There was a problem hiding this comment.
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 |
There was a problem hiding this comment.
Won't this change be the more important one? Wonder what this major change included in pinia
There was a problem hiding this comment.
c28b84f to
3533103
Compare
There was a problem hiding this comment.
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
anyfor the params parameter (violates coding guidelines), and the type signature includessignal?: AbortSignalwhile the implementation at line 28 omits this parameter. The previous review comment provides specific guidance on using Vitest'sMocktype utilities and replacinganywith a more appropriate type.tests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.ts (1)
22-22: Type annotation improves clarity overReturnType<typeof vi.fn>.The explicit
() => voidtype annotation on line 22 is a clear improvement. However, this pattern differs from the companion fileuseMinimapInteraction.test.tswhich usesvi.fn<signature>()with inline generics. While both approaches are type-safe, consider usingonGraphChangedMock = 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
⛔ Files ignored due to path filters (1)
pnpm-lock.yamlis excluded by!**/pnpm-lock.yaml
📒 Files selected for processing (21)
pnpm-workspace.yamlsrc/components/queue/job/useJobErrorReporting.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tssrc/utils/queueDisplay.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/components/graph/ZoomControlsModal.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-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.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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 useanytype oras anytype 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.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-ui/tests/services/keybindingService.escape.test.ts
**/*.test.ts
📄 CodeRabbit inference engine (AGENTS.md)
**/*.test.ts: Use unit/component tests intests-ui/orsrc/**/*.test.tswith 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.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tssrc/components/queue/job/useJobErrorReporting.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tssrc/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.tssrc/components/queue/job/useJobErrorReporting.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tssrc/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.tssrc/components/queue/job/useJobErrorReporting.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tssrc/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.tssrc/components/queue/job/useJobErrorReporting.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tssrc/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.tstests-ui/tests/composables/useLoad3dViewer.test.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-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.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tssrc/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.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tssrc/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}: Useapi.apiURL()for backend endpoints instead of constructing URLs directly
Useapi.fileURL()for static file access instead of constructing URLs directly
Files:
src/platform/assets/composables/useMediaAssetGalleryStore.test.tssrc/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.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-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.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tspnpm-workspace.yamltests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-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.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/api.featureFlags.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tspnpm-workspace.yamltests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/api.featureFlags.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tspnpm-workspace.yamltests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-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.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useJobList.test.tspnpm-workspace.yamltests-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.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tstests-ui/tests/composables/useJobList.test.tspnpm-workspace.yamltests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-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.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-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.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-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.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tspnpm-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.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-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.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tssrc/utils/queueDisplay.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tssrc/components/queue/job/useJobErrorReporting.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3d.test.tssrc/platform/assets/composables/useMediaAssetGalleryStore.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tstests-ui/tests/composables/useLoad3dDrag.test.tstests-ui/tests/composables/useLoad3dViewer.test.tstests-ui/tests/composables/nodePack/usePacksSelection.test.tstests-ui/tests/lib/litegraph/src/widgets/ComboWidget.test.tstests-ui/tests/composables/useLoad3d.test.tstests-ui/tests/api.featureFlags.test.tstests-ui/tests/litegraph/core/LinkConnector.test.tstests-ui/tests/composables/useCachedRequest.test.tstests-ui/tests/composables/useJobList.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapInteraction.test.tstests-ui/tests/composables/maskeditor/useCanvasHistory.test.tstests-ui/tests/renderer/extensions/minimap/composables/useMinimapGraph.test.tstests-ui/tests/components/queue/useJobErrorReporting.test.tstests-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.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tspnpm-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.tstests-ui/tests/litegraph/core/LinkConnector.test.tssrc/renderer/extensions/vueNodes/composables/useNodePointerInteractions.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tspnpm-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.tstests-ui/tests/litegraph/core/LinkConnector.test.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-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.tstests-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.tstests-ui/tests/litegraph/core/LinkConnector.integration.test.tstests-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.tspnpm-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.tstests-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.tstests-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
|
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.
|
## 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>
|
## 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>
|
|
Seems like it doesn't actually need to be backported -- all the other backports still worked. |
Summary
https://vitest.dev/guide/migration.html#vitest-4
Changes
Review Focus
Double check the test updates. I tried to keep the changes minimal.
┆Issue is synchronized with this Notion page by Unito