Road to No Explicit Any Part 6: Composables and Extensions#8083
Road to No Explicit Any Part 6: Composables and Extensions#8083
Conversation
Replace 'as any' casts with proper interface types for SceneConfig, ModelConfig, CameraConfig, and LightConfig from load3d/interfaces.ts
…s.ts Replace 'node: any' with 'LGraphNode' type since imgs and imageIndex are augmented on LGraphNode in litegraph-augmentation.d.ts
Replace 'as any[]' cast with proper TaskStatus['messages'] type. Extract findExecutionError helper with proper discriminated union handling.
Replace 'any' with generic type parameter that extends PreviewItem interface. This allows tests to use minimal mocks while production code gets full ResultItemImpl type inference.
🎨 Storybook Build Status✅ Build completed successfully! ⏰ Completed at: 01/15/2026, 11:25:06 PM UTC 🔗 Links🎉 Your Storybook is ready for review! |
📝 WalkthroughWalkthroughWidespread TypeScript type tightening across composables, extensions, tests, and schemas: replaces many Changes
Possibly related PRs
Suggested reviewers
✨ Finishing touches
📜 Recent review detailsConfiguration used: Organization UI Review profile: ASSERTIVE Plan: Pro 📒 Files selected for processing (1)
🧰 Additional context used📓 Path-based instructions (12)src/**/*.{vue,ts}📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
src/**/*.ts📄 CodeRabbit inference engine (.github/copilot-instructions.md)
Files:
src/**/{services,composables}/**/*.{ts,tsx}📄 CodeRabbit inference engine (src/CLAUDE.md)
Files:
src/**/*.{ts,tsx,vue}📄 CodeRabbit inference engine (src/CLAUDE.md)
Files:
src/**/{composables,components}/**/*.{ts,tsx,vue}📄 CodeRabbit inference engine (src/CLAUDE.md)
Files:
src/**/*.{vue,ts,tsx}📄 CodeRabbit inference engine (src/CLAUDE.md)
Files:
src/**/{components,composables}/**/*.{ts,tsx,vue}📄 CodeRabbit inference engine (src/CLAUDE.md)
Files:
src/composables/**/*.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
+(tests-ui|src)/**/*.test.ts📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/**/*.{ts,vue}📄 CodeRabbit inference engine (AGENTS.md)
Files:
src/**/*.{ts,tsx}📄 CodeRabbit inference engine (AGENTS.md)
Files:
+(tests-ui|src|browser_tests)/**/*.+(test.ts|spec.ts)📄 CodeRabbit inference engine (AGENTS.md)
Files:
🧠 Learnings (22)📓 Common learnings📚 Learning: 2026-01-08T02:40:15.482ZApplied to files:
📚 Learning: 2026-01-10T00:24:17.695ZApplied to files:
📚 Learning: 2026-01-10T00:24:17.695ZApplied to files:
📚 Learning: 2026-01-09T02:07:54.558ZApplied to files:
📚 Learning: 2025-11-24T19:47:56.371ZApplied to files:
📚 Learning: 2026-01-10T00:24:17.695ZApplied to files:
📚 Learning: 2026-01-10T00:24:17.695ZApplied to files:
📚 Learning: 2026-01-10T00:24:17.695ZApplied to files:
📚 Learning: 2025-11-24T19:47:22.909ZApplied to files:
📚 Learning: 2026-01-10T00:24:17.695ZApplied to files:
📚 Learning: 2025-11-24T19:48:09.318ZApplied to files:
📚 Learning: 2026-01-10T00:24:17.695ZApplied to files:
📚 Learning: 2026-01-10T00:24:17.695ZApplied to files:
📚 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-30T22:22:33.836ZApplied to files:
📚 Learning: 2025-12-10T03:09:13.807ZApplied to files:
📚 Learning: 2025-12-30T01:31:04.927ZApplied to files:
📚 Learning: 2025-12-11T12:25:15.470ZApplied to files:
📚 Learning: 2026-01-12T17:39:27.738ZApplied to files:
🧬 Code graph analysis (1)src/composables/queue/useJobMenu.test.ts (2)
⏰ 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). (5)
🔇 Additional comments (3)
✏️ Tip: You can disable this entire section by setting Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
🎭 Playwright Tests:
|
Bundle Size ReportSummary
Category Glance Per-category breakdownApp Entry Points — 3.34 MB (baseline 3.34 MB) • 🔴 +389 BMain entry bundles and manifests
Status: 3 added / 3 removed Graph Workspace — 1.15 MB (baseline 1.15 MB) • ⚪ 0 BGraph editor runtime, canvas, workflow orchestration
Status: 1 added / 1 removed Views & Navigation — 6.66 kB (baseline 6.66 kB) • ⚪ 0 BTop-level views, pages, and routed surfaces
Status: 1 added / 1 removed Panels & Settings — 372 kB (baseline 372 kB) • ⚪ 0 BConfiguration panels, inspectors, and settings screens
Status: 6 added / 6 removed UI Components — 209 kB (baseline 209 kB) • ⚪ 0 BReusable component library chunks
Status: 8 added / 8 removed Data & Services — 12.5 kB (baseline 12.5 kB) • ⚪ 0 BStores, services, APIs, and repositories
Status: 2 added / 2 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.34 MB (baseline 9.34 MB) • ⚪ 0 BExternal libraries and shared vendor chunks
Other — 5.37 MB (baseline 5.37 MB) • ⚪ 0 BBundles that do not match a named category
Status: 16 added / 16 removed |
There was a problem hiding this comment.
Actionable comments posted: 5
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
src/components/queue/job/JobGroupsList.test.ts (1)
7-53: UsePartial<TaskItemImpl>for mock taskRef typing instead ofunknowncasts.This aligns with test typing guidance and documents the partial nature of the mock.
Based on learnings, prefer `Partial` casts for partial mocks in tests.♻️ Proposed refactor
import type { JobGroup, JobListItem } from '@/composables/queue/useJobList' import type { TaskItemImpl } from '@/stores/queueStore' // Test helper type that allows mock taskRef objects -type MockTaskRef = Record<string, unknown> +type MockTaskRef = Partial<TaskItemImpl> type TestJobListItem = Omit<JobListItem, 'taskRef'> & { taskRef?: MockTaskRef } const createJobItem = ( overrides: Partial<TestJobListItem> = {} ): JobListItem => { const { taskRef, ...rest } = overrides return { id: 'job-id', title: 'Example job', meta: 'Meta text', state: 'running', iconName: 'icon', iconImageUrl: 'https://example.com/icon.png', showClear: true, - taskRef: (taskRef ?? { + taskRef: (taskRef ?? { workflow: { id: 'workflow-id' } - }) as unknown as TaskItemImpl | undefined, + }) as Partial<TaskItemImpl> as TaskItemImpl | undefined, progressTotalPercent: 60, progressCurrentPercent: 30, runningNodeName: 'Node A', ...rest } }src/composables/useLoad3dViewer.ts (1)
439-459: Consider simplifying the redundant read-modify-write pattern.The code at lines 439-442 sets
Camera Config, then immediately reads it back at lines 453-455 to spread and addstate. Since we know exactly what was just assigned, this can be simplified:♻️ Simplified assignment
nodeValue.properties['Camera Config'] = { cameraType: initialState.value.cameraType, - fov: initialState.value.fov + fov: initialState.value.fov, + state: initialState.value.cameraState } nodeValue.properties['Light Config'] = { intensity: initialState.value.lightIntensity } nodeValue.properties['Model Config'] = { upDirection: initialState.value.upDirection, materialMode: initialState.value.materialMode } - - const currentCameraConfig = nodeValue.properties['Camera Config'] as - | CameraConfig - | undefined - nodeValue.properties['Camera Config'] = { - ...currentCameraConfig, - state: initialState.value.cameraState - }
🤖 Fix all issues with AI agents
In `@src/composables/queue/useJobMenu.test.ts`:
- Around line 120-136: Replace the ad-hoc MockTaskRef and unknown casts with a
typed partial of the real TaskItemImpl: change MockTaskRef to
Partial<TaskItemImpl>, update TestJobListItem.taskRef to use that type, and
adjust createJobItem's overrides/taskRef handling so taskRef is typed as
Partial<TaskItemImpl> and cast only where necessary when assigning to the
JobListItem.taskRef; update any explicit "as unknown as TaskItemImpl" casts
around taskRef in createJobItem to a single, intentional cast from
Partial<TaskItemImpl> to TaskItemImpl if the JobListItem type requires it,
referencing MockTaskRef, TestJobListItem, createJobItem, taskRef, and
TaskItemImpl.
In `@src/extensions/core/saveMesh.ts`:
- Around line 96-97: The code unsafely asserts fileInfo.type as 'input' |
'output' before calling config.configureForSaveMesh; add a runtime type guard
for fileInfo.type (e.g., check if it equals 'input' or 'output') and set
loadFolder to that checked value or a safe fallback (or throw a clear error)
before passing it into configureForSaveMesh to avoid unexpected runtime values;
reference the variables fileInfo.type, loadFolder and the method
config.configureForSaveMesh when making the change.
- Around line 9-14: Move the SaveMeshOutput type definition below the import
statements so imports (NodeOutputWith, ResultItem, CustomInputSpec) are grouped
together; specifically, place the SaveMeshOutput declaration after the two
import lines that reference NodeOutputWith/ResultItem and CustomInputSpec,
keeping the type name and shape unchanged and ensuring no imports are
accidentally duplicated or removed.
- Around line 89-90: The path construction for filePath produces a leading slash
when fileInfo.subfolder is empty; change the assignment to conditionally include
the separator so that filePath uses fileInfo.subfolder ?
`${fileInfo.subfolder}/${fileInfo.filename}` : fileInfo.filename (mirroring the
createPath/createAnnotatedPath behavior), ensuring you reference the fileInfo
object and the filePath variable and avoid inserting a slash when subfolder is
falsy.
In `@src/extensions/core/uploadAudio.ts`:
- Around line 155-162: The code assumes audioUIWidget exists and accesses
audioUIWidget.element which can throw if node.widgets?.find(...) returns
undefined; update the block around audioUIWidget (the result of
node.widgets?.find with type DOMWidget<HTMLAudioElement, string>) to first check
for a truthy widget before setting element.src and removing the class, and
handle the missing-widget case (e.g., skip the DOM updates or log/early-return)
while still using api.apiURL(getResourceURL(...)) only when audioUIWidget is
present and output.audio[0] is defined.
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (16)
src/components/queue/job/JobGroupsList.test.tssrc/composables/graph/useImageMenuOptions.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useCompletionSummary.tssrc/composables/queue/useJobList.tssrc/composables/queue/useJobMenu.test.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/useCivitaiModel.tssrc/composables/useContextMenuTranslation.tssrc/composables/useLoad3dViewer.tssrc/extensions/core/imageCompare.tssrc/extensions/core/load3d.tssrc/extensions/core/saveMesh.tssrc/extensions/core/uploadAudio.tssrc/schemas/apiSchema.ts
🧰 Additional context used
📓 Path-based instructions (13)
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/schemas/apiSchema.tssrc/composables/queue/useCompletionSummary.tssrc/composables/useContextMenuTranslation.tssrc/extensions/core/load3d.tssrc/extensions/core/imageCompare.tssrc/composables/useCivitaiModel.tssrc/composables/useLoad3dViewer.tssrc/extensions/core/saveMesh.tssrc/composables/queue/useJobList.tssrc/components/queue/job/JobGroupsList.test.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/graph/useImageMenuOptions.tssrc/extensions/core/uploadAudio.tssrc/composables/queue/useJobMenu.test.ts
src/**/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety
src/**/*.ts: Derive component types usingvue-component-type-helpers(ComponentProps,ComponentSlots) instead of separate type files
Use es-toolkit for utility functions
Minimize the surface area (exported values) of each module and composable
Favor pure functions, especially testable ones
Files:
src/schemas/apiSchema.tssrc/composables/queue/useCompletionSummary.tssrc/composables/useContextMenuTranslation.tssrc/extensions/core/load3d.tssrc/extensions/core/imageCompare.tssrc/composables/useCivitaiModel.tssrc/composables/useLoad3dViewer.tssrc/extensions/core/saveMesh.tssrc/composables/queue/useJobList.tssrc/components/queue/job/JobGroupsList.test.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/graph/useImageMenuOptions.tssrc/extensions/core/uploadAudio.tssrc/composables/queue/useJobMenu.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
src/**/*.{ts,tsx,vue}: Use separateimport typestatements instead of inlinetypein mixed imports
Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, 80-character width
Sort and group imports by plugin, runpnpm formatbefore committing
Never useanytype - use proper TypeScript types
Never useas anytype assertions - fix the underlying type issue
Write code that is expressive and self-documenting - avoid unnecessary comments
Do not add or retain redundant comments - clean as you go
Avoid mutable state - prefer immutability and assignment at point of declaration
Watch out for Code Smells and refactor to avoid them
Files:
src/schemas/apiSchema.tssrc/composables/queue/useCompletionSummary.tssrc/composables/useContextMenuTranslation.tssrc/extensions/core/load3d.tssrc/extensions/core/imageCompare.tssrc/composables/useCivitaiModel.tssrc/composables/useLoad3dViewer.tssrc/extensions/core/saveMesh.tssrc/composables/queue/useJobList.tssrc/components/queue/job/JobGroupsList.test.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/graph/useImageMenuOptions.tssrc/extensions/core/uploadAudio.tssrc/composables/queue/useJobMenu.test.ts
src/**/*.{vue,ts,tsx}
📄 CodeRabbit inference engine (src/CLAUDE.md)
Follow Vue 3 composition API style guide
Files:
src/schemas/apiSchema.tssrc/composables/queue/useCompletionSummary.tssrc/composables/useContextMenuTranslation.tssrc/extensions/core/load3d.tssrc/extensions/core/imageCompare.tssrc/composables/useCivitaiModel.tssrc/composables/useLoad3dViewer.tssrc/extensions/core/saveMesh.tssrc/composables/queue/useJobList.tssrc/components/queue/job/JobGroupsList.test.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/graph/useImageMenuOptions.tssrc/extensions/core/uploadAudio.tssrc/composables/queue/useJobMenu.test.ts
src/**/*.{ts,vue}
📄 CodeRabbit inference engine (AGENTS.md)
src/**/*.{ts,vue}: Usereffor reactive state,computed()for derived values, andwatch/watchEffectfor side effects in Composition API
Avoid usingrefwithwatchif acomputedwould suffice - minimize refs and derived state
Useprovide/injectfor dependency injection only when simpler alternatives (Store or shared composable) won't work
Leverage VueUse functions for performance-enhancing composables
Use VueUse function for useI18n in composition API for string literals
Files:
src/schemas/apiSchema.tssrc/composables/queue/useCompletionSummary.tssrc/composables/useContextMenuTranslation.tssrc/extensions/core/load3d.tssrc/extensions/core/imageCompare.tssrc/composables/useCivitaiModel.tssrc/composables/useLoad3dViewer.tssrc/extensions/core/saveMesh.tssrc/composables/queue/useJobList.tssrc/components/queue/job/JobGroupsList.test.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/graph/useImageMenuOptions.tssrc/extensions/core/uploadAudio.tssrc/composables/queue/useJobMenu.test.ts
src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
src/**/*.{ts,tsx}: Keep functions short and functional
Minimize nesting (if statements, for loops, etc.)
Use function declarations instead of function expressions when possible
Files:
src/schemas/apiSchema.tssrc/composables/queue/useCompletionSummary.tssrc/composables/useContextMenuTranslation.tssrc/extensions/core/load3d.tssrc/extensions/core/imageCompare.tssrc/composables/useCivitaiModel.tssrc/composables/useLoad3dViewer.tssrc/extensions/core/saveMesh.tssrc/composables/queue/useJobList.tssrc/components/queue/job/JobGroupsList.test.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/graph/useImageMenuOptions.tssrc/extensions/core/uploadAudio.tssrc/composables/queue/useJobMenu.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/composables/queue/useCompletionSummary.tssrc/composables/useContextMenuTranslation.tssrc/composables/useCivitaiModel.tssrc/composables/useLoad3dViewer.tssrc/composables/queue/useJobList.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/graph/useImageMenuOptions.tssrc/composables/queue/useJobMenu.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/composables/queue/useCompletionSummary.tssrc/composables/useContextMenuTranslation.tssrc/composables/useCivitaiModel.tssrc/composables/useLoad3dViewer.tssrc/composables/queue/useJobList.tssrc/components/queue/job/JobGroupsList.test.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/graph/useImageMenuOptions.tssrc/composables/queue/useJobMenu.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/composables/queue/useCompletionSummary.tssrc/composables/useContextMenuTranslation.tssrc/composables/useCivitaiModel.tssrc/composables/useLoad3dViewer.tssrc/composables/queue/useJobList.tssrc/components/queue/job/JobGroupsList.test.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/graph/useImageMenuOptions.tssrc/composables/queue/useJobMenu.test.ts
src/composables/**/*.ts
📄 CodeRabbit inference engine (AGENTS.md)
Name composables as
useXyz.ts(e.g.,useForm.ts)
Files:
src/composables/queue/useCompletionSummary.tssrc/composables/useContextMenuTranslation.tssrc/composables/useCivitaiModel.tssrc/composables/useLoad3dViewer.tssrc/composables/queue/useJobList.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/graph/useImageMenuOptions.tssrc/composables/queue/useJobMenu.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/JobGroupsList.test.ts
+(tests-ui|src)/**/*.test.ts
📄 CodeRabbit inference engine (AGENTS.md)
+(tests-ui|src)/**/*.test.ts: Unit and component tests belong intests-ui/orsrc/**/*.test.tsusing Vitest
Write tests for all changes, especially bug fixes to catch future regressions
Do not write tests dependent on non-behavioral features like utility classes or styles
Do not write tests that just test the mocks - ensure tests fail when code behaves unexpectedly
Leverage Vitest's utilities for mocking where possible
Keep module mocks contained - do not use global mutable state within test files; usevi.hoisted()if necessary
Use Vue Test Utils for Component testing and follow best practices for making components easy to test
Aim for behavioral coverage of critical and new features in unit tests
Files:
src/components/queue/job/JobGroupsList.test.tssrc/composables/queue/useJobMenu.test.ts
+(tests-ui|src|browser_tests)/**/*.+(test.ts|spec.ts)
📄 CodeRabbit inference engine (AGENTS.md)
+(tests-ui|src|browser_tests)/**/*.+(test.ts|spec.ts): Do not write change detector tests - avoid tests that only assert default values
Be parsimonious in testing - do not write redundant tests
Don't Mock What You Don't Own
Files:
src/components/queue/job/JobGroupsList.test.tssrc/composables/queue/useJobMenu.test.ts
🧠 Learnings (33)
📓 Common learnings
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
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7898
File: src/composables/usePaste.test.ts:248-248
Timestamp: 2026-01-09T02:07:59.035Z
Learning: In test files at src/**/*.test.ts, when creating mock objects that partially implement an interface (e.g., LGraphNode), use `as Partial<InterfaceType> as InterfaceType` instead of `as any` or `as unknown as InterfaceType` to explicitly acknowledge the incomplete implementation while maintaining type safety.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Never use `as any` type assertions - fix the underlying type issue
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7894
File: src/renderer/extensions/vueNodes/widgets/components/WidgetToggleSwitch.test.ts:11-14
Timestamp: 2026-01-08T02:40:22.621Z
Learning: In the Comfy-Org/ComfyUI_frontend repository test files: When testing components, import the real type definitions from the component files instead of duplicating interface definitions in the test files. This prevents type drift and maintains consistency.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Never use `any` type - use proper TypeScript types
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/**/*.ts : Use TypeScript for type safety
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
📚 Learning: 2025-12-09T03:39:54.501Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7169
File: src/platform/remote/comfyui/jobs/jobTypes.ts:1-107
Timestamp: 2025-12-09T03:39:54.501Z
Learning: In the ComfyUI_frontend project, Zod is on v3.x. Do not suggest Zod v4 standalone validators (z.uuid, z.ulid, z.cuid2, z.nanoid) until an upgrade to Zod 4 is performed. When reviewing TypeScript files (e.g., src/platform/remote/comfyui/jobs/jobTypes.ts) validate against Zod 3 capabilities and avoid introducing v4-specific features; flag any proposal to upgrade or incorporate v4-only validators and propose staying with compatible 3.x patterns.
Applied to files:
src/schemas/apiSchema.tssrc/composables/queue/useCompletionSummary.tssrc/composables/useContextMenuTranslation.tssrc/extensions/core/load3d.tssrc/extensions/core/imageCompare.tssrc/composables/useCivitaiModel.tssrc/composables/useLoad3dViewer.tssrc/extensions/core/saveMesh.tssrc/composables/queue/useJobList.tssrc/components/queue/job/JobGroupsList.test.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/graph/useImageMenuOptions.tssrc/extensions/core/uploadAudio.tssrc/composables/queue/useJobMenu.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:
src/schemas/apiSchema.tssrc/composables/queue/useCompletionSummary.tssrc/composables/useContextMenuTranslation.tssrc/extensions/core/load3d.tssrc/extensions/core/imageCompare.tssrc/composables/useCivitaiModel.tssrc/composables/useLoad3dViewer.tssrc/extensions/core/saveMesh.tssrc/composables/queue/useJobList.tssrc/components/queue/job/JobGroupsList.test.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/graph/useImageMenuOptions.tssrc/extensions/core/uploadAudio.tssrc/composables/queue/useJobMenu.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:
src/schemas/apiSchema.tssrc/composables/queue/useCompletionSummary.tssrc/composables/useContextMenuTranslation.tssrc/extensions/core/load3d.tssrc/extensions/core/imageCompare.tssrc/composables/useCivitaiModel.tssrc/composables/useLoad3dViewer.tssrc/extensions/core/saveMesh.tssrc/composables/queue/useJobList.tssrc/components/queue/job/JobGroupsList.test.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/graph/useImageMenuOptions.tssrc/extensions/core/uploadAudio.tssrc/composables/queue/useJobMenu.test.ts
📚 Learning: 2025-12-30T22:22:33.836Z
Learnt from: kaili-yang
Repo: Comfy-Org/ComfyUI_frontend PR: 7805
File: src/composables/useCoreCommands.ts:439-439
Timestamp: 2025-12-30T22:22:33.836Z
Learning: When accessing reactive properties from Pinia stores in TypeScript files, avoid using .value on direct property access (e.g., useStore().isOverlayExpanded). Pinia auto-wraps refs when accessed directly, returning the primitive value. The .value accessor is only needed when destructuring store properties or when using storeToRefs().
Applied to files:
src/schemas/apiSchema.tssrc/composables/queue/useCompletionSummary.tssrc/composables/useContextMenuTranslation.tssrc/extensions/core/load3d.tssrc/extensions/core/imageCompare.tssrc/composables/useCivitaiModel.tssrc/composables/useLoad3dViewer.tssrc/extensions/core/saveMesh.tssrc/composables/queue/useJobList.tssrc/components/queue/job/JobGroupsList.test.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/graph/useImageMenuOptions.tssrc/extensions/core/uploadAudio.tssrc/composables/queue/useJobMenu.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:
src/schemas/apiSchema.tssrc/composables/queue/useCompletionSummary.tssrc/composables/useContextMenuTranslation.tssrc/extensions/core/load3d.tssrc/extensions/core/imageCompare.tssrc/composables/useCivitaiModel.tssrc/composables/useLoad3dViewer.tssrc/extensions/core/saveMesh.tssrc/composables/queue/useJobList.tssrc/components/queue/job/JobGroupsList.test.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/graph/useImageMenuOptions.tssrc/extensions/core/uploadAudio.tssrc/composables/queue/useJobMenu.test.ts
📚 Learning: 2026-01-12T17:39:27.738Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7906
File: src/components/sidebar/tabs/AssetsSidebarTab.vue:545-552
Timestamp: 2026-01-12T17:39:27.738Z
Learning: In Vue/TypeScript files (src/**/*.{ts,tsx,vue}), prefer if/else statements over ternary operators when performing side effects or actions (e.g., mutating state, calling methods with side effects). Ternaries should be reserved for computing and returning values.
Applied to files:
src/schemas/apiSchema.tssrc/composables/queue/useCompletionSummary.tssrc/composables/useContextMenuTranslation.tssrc/extensions/core/load3d.tssrc/extensions/core/imageCompare.tssrc/composables/useCivitaiModel.tssrc/composables/useLoad3dViewer.tssrc/extensions/core/saveMesh.tssrc/composables/queue/useJobList.tssrc/components/queue/job/JobGroupsList.test.tssrc/composables/maskeditor/useBrushDrawing.tssrc/composables/queue/useJobMenu.tssrc/composables/queue/useResultGallery.tssrc/composables/graph/useImageMenuOptions.tssrc/extensions/core/uploadAudio.tssrc/composables/queue/useJobMenu.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:
src/composables/queue/useCompletionSummary.ts
📚 Learning: 2026-01-08T02:40:22.621Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7894
File: src/renderer/extensions/vueNodes/widgets/components/WidgetToggleSwitch.test.ts:11-14
Timestamp: 2026-01-08T02:40:22.621Z
Learning: In the Comfy-Org/ComfyUI_frontend repository test files: When testing components, import the real type definitions from the component files instead of duplicating interface definitions in the test files. This prevents type drift and maintains consistency.
Applied to files:
src/composables/useLoad3dViewer.ts
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Never use `as any` type assertions - fix the underlying type issue
Applied to files:
src/composables/useLoad3dViewer.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} : Implement proper TypeScript types throughout the codebase
Applied to files:
src/composables/useLoad3dViewer.ts
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to +(tests-ui|src)/**/*.test.ts : Leverage Vitest's utilities for mocking where possible
Applied to files:
src/components/queue/job/JobGroupsList.test.tssrc/composables/queue/useJobMenu.test.ts
📚 Learning: 2026-01-08T02:40:15.482Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7894
File: src/renderer/extensions/vueNodes/widgets/components/WidgetToggleSwitch.test.ts:11-14
Timestamp: 2026-01-08T02:40:15.482Z
Learning: In TypeScript test files (e.g., any test under src), avoid duplicating interface/type definitions. Import real type definitions from the component modules under test and reference them directly, so there is a single source of truth and to prevent type drift. This improves maintainability and consistency across tests.
Applied to files:
src/components/queue/job/JobGroupsList.test.tssrc/composables/queue/useJobMenu.test.ts
📚 Learning: 2026-01-09T02:07:54.558Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7898
File: src/composables/usePaste.test.ts:248-248
Timestamp: 2026-01-09T02:07:54.558Z
Learning: In test files (e.g., any .test.ts or .test.tsx under src/...), when you create mock objects that partially implement an interface (such as LGraphNode), prefer casting with as Partial<InterfaceType> as InterfaceType rather than as any or as unknown as InterfaceType. This makes the incomplete implementation explicit while preserving type safety, improving readability and maintainability of tests.
Applied to files:
src/components/queue/job/JobGroupsList.test.tssrc/composables/queue/useJobMenu.test.ts
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to +(tests-ui|src|browser_tests)/**/*.+(test.ts|spec.ts) : Don't Mock What You Don't Own
Applied to files:
src/components/queue/job/JobGroupsList.test.tssrc/composables/queue/useJobMenu.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:
src/components/queue/job/JobGroupsList.test.tssrc/composables/graph/useImageMenuOptions.tssrc/composables/queue/useJobMenu.test.ts
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to +(tests-ui|src)/**/*.test.ts : Keep module mocks contained - do not use global mutable state within test files; use `vi.hoisted()` if necessary
Applied to files:
src/components/queue/job/JobGroupsList.test.tssrc/composables/queue/useJobMenu.test.ts
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to +(tests-ui|src)/**/*.test.ts : Write tests for all changes, especially bug fixes to catch future regressions
Applied to files:
src/components/queue/job/JobGroupsList.test.tssrc/composables/queue/useJobMenu.test.ts
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to +(tests-ui|src|browser_tests)/**/*.+(test.ts|spec.ts) : Be parsimonious in testing - do not write redundant tests
Applied to files:
src/components/queue/job/JobGroupsList.test.ts
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to +(tests-ui|src)/**/*.test.ts : Do not write tests that just test the mocks - ensure tests fail when code behaves unexpectedly
Applied to files:
src/components/queue/job/JobGroupsList.test.tssrc/composables/queue/useJobMenu.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:
src/components/queue/job/JobGroupsList.test.ts
📚 Learning: 2025-12-22T21:36:46.909Z
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:46.909Z
Learning: In the Comfy-Org/ComfyUI_frontend repository test files: Do not stub primitive UI components or customized primitive components (e.g., Button). Instead, import and register the real components in test setup. This ensures tests accurately reflect production behavior and component API usage.
Applied to files:
src/components/queue/job/JobGroupsList.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:
src/components/queue/job/JobGroupsList.test.tssrc/composables/queue/useJobMenu.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:
src/components/queue/job/JobGroupsList.test.tssrc/composables/queue/useJobMenu.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:
src/composables/maskeditor/useBrushDrawing.ts
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to src/**/*.{ts,vue} : Leverage VueUse functions for performance-enhancing composables
Applied to files:
src/composables/queue/useResultGallery.ts
📚 Learning: 2026-01-09T02:07:59.035Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7898
File: src/composables/usePaste.test.ts:248-248
Timestamp: 2026-01-09T02:07:59.035Z
Learning: In test files at src/**/*.test.ts, when creating mock objects that partially implement an interface (e.g., LGraphNode), use `as Partial<InterfaceType> as InterfaceType` instead of `as any` or `as unknown as InterfaceType` to explicitly acknowledge the incomplete implementation while maintaining type safety.
Applied to files:
src/composables/graph/useImageMenuOptions.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:
src/composables/graph/useImageMenuOptions.ts
📚 Learning: 2025-12-11T03:55:57.926Z
Learnt from: simula-r
Repo: Comfy-Org/ComfyUI_frontend PR: 7252
File: src/renderer/extensions/vueNodes/components/ImagePreview.vue:151-158
Timestamp: 2025-12-11T03:55:57.926Z
Learning: In src/renderer/extensions/vueNodes/components/ImagePreview.vue and LGraphNode.vue, keyboard navigation for image galleries should respond to node-level focus (via keyEvent injection from LGraphNode), not require focus within the image preview wrapper itself. This allows users to navigate the gallery with arrow keys immediately when the node is focused/selected.
Applied to files:
src/composables/graph/useImageMenuOptions.ts
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to src/**/*.{ts,vue} : Use VueUse function for useI18n in composition API for string literals
Applied to files:
src/composables/graph/useImageMenuOptions.ts
📚 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,ts,js} : Use vue-i18n for ALL UI strings
Applied to files:
src/composables/graph/useImageMenuOptions.ts
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to +(tests-ui|src)/**/*.test.ts : Do not write tests dependent on non-behavioral features like utility classes or styles
Applied to files:
src/composables/queue/useJobMenu.test.ts
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to +(tests-ui|src)/**/*.test.ts : Use Vue Test Utils for Component testing and follow best practices for making components easy to test
Applied to files:
src/composables/queue/useJobMenu.test.ts
🧬 Code graph analysis (11)
src/composables/useContextMenuTranslation.ts (1)
src/lib/litegraph/src/interfaces.ts (1)
INodeInputSlot(345-354)
src/extensions/core/load3d.ts (3)
src/schemas/apiSchema.ts (1)
NodeOutputWith(38-39)src/extensions/core/load3d/interfaces.ts (1)
CameraState(20-25)src/platform/updates/common/toastStore.ts (1)
useToastStore(8-39)
src/extensions/core/imageCompare.ts (1)
src/schemas/apiSchema.ts (1)
NodeOutputWith(38-39)
src/composables/useLoad3dViewer.ts (1)
src/extensions/core/load3d/interfaces.ts (4)
SceneConfig(27-32)ModelConfig(34-38)CameraConfig(40-44)LightConfig(46-48)
src/extensions/core/saveMesh.ts (1)
src/schemas/apiSchema.ts (2)
NodeOutputWith(38-39)ResultItem(25-25)
src/composables/queue/useJobList.ts (1)
src/stores/queueStore.ts (1)
TaskItemImpl(217-476)
src/components/queue/job/JobGroupsList.test.ts (2)
src/composables/queue/useJobList.ts (1)
JobListItem(33-47)src/stores/queueStore.ts (1)
TaskItemImpl(217-476)
src/composables/queue/useJobMenu.ts (2)
src/stores/queueStore.ts (1)
messages(319-321)src/schemas/apiSchema.ts (2)
TaskStatus(296-296)ExecutionErrorWsMessage(165-165)
src/composables/queue/useResultGallery.ts (1)
src/composables/queue/useJobList.ts (1)
JobListItem(33-47)
src/composables/graph/useImageMenuOptions.ts (1)
src/composables/graph/useMoreOptionsMenu.ts (1)
MenuOption(18-30)
src/extensions/core/uploadAudio.ts (6)
src/schemas/apiSchema.ts (1)
NodeExecutionOutput(36-36)src/scripts/api.ts (1)
api(1336-1336)src/renderer/extensions/vueNodes/widgets/utils/audioUtils.ts (1)
getResourceURL(27-40)src/scripts/app.ts (3)
nodeOutputs(313-315)nodeOutputs(317-321)app(1746-1746)src/types/index.ts (2)
NodeLocatorId(33-33)DOMWidget(42-42)src/utils/graphTraversalUtil.ts (1)
getNodeByLocatorId(317-338)
⏰ 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). (14)
- GitHub Check: playwright-tests-chromium-sharded (7, 8)
- GitHub Check: playwright-tests-chromium-sharded (1, 8)
- GitHub Check: playwright-tests-chromium-sharded (6, 8)
- GitHub Check: playwright-tests-chromium-sharded (8, 8)
- GitHub Check: playwright-tests-chromium-sharded (4, 8)
- GitHub Check: playwright-tests-chromium-sharded (2, 8)
- GitHub Check: playwright-tests-chromium-sharded (3, 8)
- GitHub Check: playwright-tests (chromium-0.5x)
- GitHub Check: playwright-tests-chromium-sharded (5, 8)
- GitHub Check: playwright-tests (mobile-chrome)
- GitHub Check: playwright-tests (chromium-2x)
- GitHub Check: test
- GitHub Check: lint-and-format
- GitHub Check: collect
🔇 Additional comments (21)
src/composables/maskeditor/useBrushDrawing.ts (1)
407-410: LGTM! Type-safe error message extraction.The pattern
error instanceof Error ? error.message : String(error)is the idiomatic TypeScript approach for safely extracting error messages from catch blocks withunknownerror types. This properly handles bothErrorinstances and non-Error thrown values.src/composables/useContextMenuTranslation.ts (1)
126-129: Good: explicitextraInfotyping improves clarity without runtime impact.This makes the expected shape explicit and keeps downstream access type-safe.
src/extensions/core/saveMesh.ts (1)
78-83: Well-typed callback with proper context preservation.The
onExecutedhandler is correctly typed withSaveMeshOutput, and the original handler is invoked with.call(this, output)to preserve context. The optional chaining and guard clause safely handle missing data.src/composables/queue/useResultGallery.ts (3)
5-14: Clean, minimal preview/task contracts.The local interfaces keep the gallery typing tight without expanding the module’s public surface.
19-23: Generic signature and typed gallery state look solid.The generic constraint ensures callers get precise typing without leaking implementation details.
26-36: Typed filtering and active-index selection are consistent.The filtered list and index calculation align with the new T-based preview typing.
src/schemas/apiSchema.ts (1)
38-39: Nice addition of a reusable output helper type.This keeps node outputs strongly typed without altering runtime behavior.
src/composables/queue/useCompletionSummary.ts (1)
60-62: Type inference here is clean and safe.The filtering logic remains intact while keeping the code concise.
src/extensions/core/imageCompare.ts (2)
1-9: Good type tightening for image-compare outputs.The new alias cleanly captures the extra payload fields.
22-25: Typed onExecuted payload improves safety without altering behavior.The destructuring is now backed by a precise output shape.
src/composables/useCivitaiModel.ts (1)
39-39: Good move tightening extra fields tounknown.This prevents accidental unsafe access while preserving flexibility.
src/composables/queue/useJobList.ts (1)
41-41: Stronger typing fortaskReflooks good.This aligns job items with the concrete queue task implementation.
src/composables/queue/useJobMenu.ts (2)
12-17: No concerns with the import-only update.
86-108: Helper extraction is clean and keeps call sites focused.The
findExecutionErrorutility makes the error handling paths clearer and removes duplication.src/composables/graph/useImageMenuOptions.ts (1)
4-80: Stronger LGraphNode typing improves API clarity.Nice tightening of handler signatures without changing behavior.
src/extensions/core/load3d.ts (1)
18-22: Typed output tuple makes onExecuted handling safer and clearer.The NodeOutputWith-based alias removes ad-hoc casts and keeps the logic aligned with the output shape.
Also applies to: 503-517
src/composables/useLoad3dViewer.ts (2)
8-16: LGTM! Proper type imports from existing interfaces.The imported types (
CameraConfig,LightConfig,ModelConfig,SceneConfig) correctly match the interface definitions in@/extensions/core/load3d/interfaces.ts. Using separateimport typestatements aligns with coding guidelines.
278-289: LGTM! Proper type narrowing with explicit union types.Using
| undefinedin the type assertions correctly acknowledges that these properties may not exist on the node, improving type safety over the previousas anypattern.src/extensions/core/uploadAudio.ts (3)
18-18: LGTM! Correctly using separate type import.The
NodeExecutionOutputtype import follows the coding guideline to use separateimport typestatements.
116-129: LGTM! Well-typed execution callback with proper guards.Good improvements:
- Typed parameter
output: NodeExecutionOutputinstead of generic message- Early return guard
if (!audios?.length) returnprevents null access- Nullish coalescing
audio.subfolder ?? ''andaudio.filename ?? ''provides safe defaults
146-150: Good type annotation for the callback parameter.The
Record<NodeLocatorId, NodeExecutionOutput>type properly constrains the node outputs map. The early continue guard at line 150 efficiently skips nodes without audio output.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| import type { NodeOutputWith, ResultItem } from '@/schemas/apiSchema' | ||
|
|
||
| type SaveMeshOutput = NodeOutputWith<{ | ||
| '3d'?: ResultItem[] | ||
| }> | ||
| import type { CustomInputSpec } from '@/schemas/nodeDef/nodeDefSchemaV2' |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Import and type definition placement is awkward.
The SaveMeshOutput type definition is interleaved between import statements. Consider moving the type definition after all imports for better organization:
import type { NodeOutputWith, ResultItem } from '@/schemas/apiSchema'
-
-type SaveMeshOutput = NodeOutputWith<{
- '3d'?: ResultItem[]
-}>
import type { CustomInputSpec } from '@/schemas/nodeDef/nodeDefSchemaV2'
+
+type SaveMeshOutput = NodeOutputWith<{
+ '3d'?: ResultItem[]
+}>🤖 Prompt for AI Agents
In `@src/extensions/core/saveMesh.ts` around lines 9 - 14, Move the SaveMeshOutput
type definition below the import statements so imports (NodeOutputWith,
ResultItem, CustomInputSpec) are grouped together; specifically, place the
SaveMeshOutput declaration after the two import lines that reference
NodeOutputWith/ResultItem and CustomInputSpec, keeping the type name and shape
unchanged and ensuring no imports are accidentally duplicated or removed.
| const filePath = | ||
| (fileInfo.subfolder ?? '') + '/' + (fileInfo.filename ?? '') |
There was a problem hiding this comment.
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# First, find the saveMesh.ts file and see the context around lines 89-90
find . -name "saveMesh.ts" -type fRepository: Comfy-Org/ComfyUI_frontend
Length of output: 103
🏁 Script executed:
#!/bin/bash
# Get full context of the file to understand the path usage
if [ -f "src/extensions/core/saveMesh.ts" ]; then
cat -n "src/extensions/core/saveMesh.ts" | head -100
fiRepository: Comfy-Org/ComfyUI_frontend
Length of output: 3648
🏁 Script executed:
#!/bin/bash
# Search for configureForSaveMesh function to see how filePath is used
rg -n "configureForSaveMesh" --type=ts -A 5 -B 2Repository: Comfy-Org/ComfyUI_frontend
Length of output: 1172
🏁 Script executed:
#!/bin/bash
# Check for other path construction patterns in the codebase
rg -n "subfolder.*filename" --type=ts -C 3Repository: Comfy-Org/ComfyUI_frontend
Length of output: 4945
Use conditional path construction to avoid leading slash when subfolder is empty.
This pattern differs from the established createPath utility in src/utils/createAnnotatedPath.ts, which only adds the separator when subfolder is not empty. When subfolder is empty or undefined, this code produces a path like /filename with a leading slash, which is inconsistent with the rest of the codebase and may cause issues in downstream path parsing logic. Use the same conditional pattern: subfolder ? \${subfolder}/${filename}` : filename`.
🤖 Prompt for AI Agents
In `@src/extensions/core/saveMesh.ts` around lines 89 - 90, The path construction
for filePath produces a leading slash when fileInfo.subfolder is empty; change
the assignment to conditionally include the separator so that filePath uses
fileInfo.subfolder ? `${fileInfo.subfolder}/${fileInfo.filename}` :
fileInfo.filename (mirroring the createPath/createAnnotatedPath behavior),
ensuring you reference the fileInfo object and the filePath variable and avoid
inserting a slash when subfolder is falsy.
| const loadFolder = fileInfo.type as 'input' | 'output' | ||
| config.configureForSaveMesh(loadFolder, filePath) |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Type assertion assumes valid type value.
The assertion as 'input' | 'output' narrows the type but doesn't guard against unexpected values at runtime. Consider adding a fallback:
- const loadFolder = fileInfo.type as 'input' | 'output'
+ const loadFolder: 'input' | 'output' =
+ fileInfo.type === 'input' || fileInfo.type === 'output'
+ ? fileInfo.type
+ : 'output'Alternatively, if ResultItem.type is always guaranteed to be one of these values from the backend, the current assertion is acceptable.
🤖 Prompt for AI Agents
In `@src/extensions/core/saveMesh.ts` around lines 96 - 97, The code unsafely
asserts fileInfo.type as 'input' | 'output' before calling
config.configureForSaveMesh; add a runtime type guard for fileInfo.type (e.g.,
check if it equals 'input' or 'output') and set loadFolder to that checked value
or a safe fallback (or throw a clear error) before passing it into
configureForSaveMesh to avoid unexpected runtime values; reference the variables
fileInfo.type, loadFolder and the method config.configureForSaveMesh when making
the change.
| const audioUIWidget = node.widgets?.find( | ||
| (w) => w.name === 'audioUI' | ||
| ) as unknown as DOMWidget<HTMLAudioElement, string> | ||
| const audio = output.audio[0] | ||
| audioUIWidget.element.src = api.apiURL( | ||
| getResourceURL(audio.subfolder ?? '', audio.filename ?? '', audio.type) | ||
| ) | ||
| audioUIWidget.element.classList.remove('empty-audio-widget') |
There was a problem hiding this comment.
Missing null check for audioUIWidget can cause runtime error.
node.widgets?.find(...) returns undefined if no widget matches, but the code immediately accesses audioUIWidget.element.src without verifying the widget exists. This will throw a TypeError when the audio UI widget is not present on the node.
🐛 Proposed fix: Add null guard
const audioUIWidget = node.widgets?.find(
(w) => w.name === 'audioUI'
) as unknown as DOMWidget<HTMLAudioElement, string>
+ if (!audioUIWidget) continue
+
const audio = output.audio[0]
audioUIWidget.element.src = api.apiURL(
getResourceURL(audio.subfolder ?? '', audio.filename ?? '', audio.type)
)
audioUIWidget.element.classList.remove('empty-audio-widget')🤖 Prompt for AI Agents
In `@src/extensions/core/uploadAudio.ts` around lines 155 - 162, The code assumes
audioUIWidget exists and accesses audioUIWidget.element which can throw if
node.widgets?.find(...) returns undefined; update the block around audioUIWidget
(the result of node.widgets?.find with type DOMWidget<HTMLAudioElement, string>)
to first check for a truthy widget before setting element.src and removing the
class, and handle the missing-widget case (e.g., skip the DOM updates or
log/early-return) while still using api.apiURL(getResourceURL(...)) only when
audioUIWidget is present and output.audio[0] is defined.
| const createJobItem = ( | ||
| overrides: Partial<TestJobListItem> = {} | ||
| ): JobListItem => { | ||
| const { taskRef, ...rest } = overrides | ||
| return { | ||
| id: 'job-id', | ||
| title: 'Example job', | ||
| meta: 'Meta text', | ||
| state: 'running', | ||
| iconName: 'icon', | ||
| iconImageUrl: 'https://example.com/icon.png', | ||
| showClear: true, | ||
| taskRef: (taskRef ?? { | ||
| workflow: { id: 'workflow-id' } | ||
| }) as unknown as TaskItemImpl | undefined, | ||
| progressTotalPercent: 60, | ||
| progressCurrentPercent: 30, | ||
| runningNodeName: 'Node A', | ||
| ...rest | ||
| } | ||
| } |
There was a problem hiding this comment.
| const createJobItem = ( | |
| overrides: Partial<TestJobListItem> = {} | |
| ): JobListItem => { | |
| const { taskRef, ...rest } = overrides | |
| return { | |
| id: 'job-id', | |
| title: 'Example job', | |
| meta: 'Meta text', | |
| state: 'running', | |
| iconName: 'icon', | |
| iconImageUrl: 'https://example.com/icon.png', | |
| showClear: true, | |
| taskRef: (taskRef ?? { | |
| workflow: { id: 'workflow-id' } | |
| }) as unknown as TaskItemImpl | undefined, | |
| progressTotalPercent: 60, | |
| progressCurrentPercent: 30, | |
| runningNodeName: 'Node A', | |
| ...rest | |
| } | |
| } | |
| const createJobItem = ( | |
| overrides: Partial<JobListItem> = {} | |
| ): JobListItem => { | |
| const { taskRef, ...rest } = overrides | |
| return { | |
| id: 'job-id', | |
| title: 'Example job', | |
| meta: 'Meta text', | |
| state: 'running', | |
| iconName: 'icon', | |
| iconImageUrl: 'https://example.com/icon.png', | |
| showClear: true, | |
| taskRef: (taskRef ?? { | |
| workflow: { id: 'workflow-id' } | |
| }) as TaskItemImpl, | |
| progressTotalPercent: 60, | |
| progressCurrentPercent: 30, | |
| runningNodeName: 'Node A', | |
| ...rest | |
| } | |
| } |
The null coalesce guarantees that taskRef is non-null., which is great since we can remove the mock types entirely
| taskRef?: MockTaskRef | ||
| } | ||
|
|
||
| const createJobItem = ( |
There was a problem hiding this comment.
| const createJobItem = ( | |
| const createJobItem = ( | |
| overrides: Partial<TestJobListItem> = {} | |
| ): JobListItem => ({ | |
| id: 'job-1', | |
| title: 'test job', | |
| meta: 'meta', | |
| state: 'completed', | |
| ...overrides, | |
| taskRef: overrides.taskRef as Partial<TaskItemImpl>|undefined as TaskItemImpl|undefined | |
| }) |
This one is a good big gnarlier and potentially out of scope for any cleanup
Remove unnecessary MockTaskRef and TestJobListItem types. The null coalesce guarantees taskRef is non-null, allowing direct cast to TaskItemImpl.
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Fix all issues with AI agents
In `@src/components/queue/job/JobGroupsList.test.ts`:
- Around line 29-47: The default mock in createJobItem returns an incomplete
TaskItemImpl for the taskRef field; change the fallback to explicitly
acknowledge the partial type by casting the object as Partial<TaskItemImpl> and
then to TaskItemImpl (e.g., replace the current (taskRef ?? { workflow: { id:
'workflow-id' } }) as TaskItemImpl with (taskRef ?? ({ workflow: { id:
'workflow-id' } } as Partial<TaskItemImpl>)) as TaskItemImpl) so the mock is
explicit while preserving type compatibility for JobListItem.
📜 Review details
Configuration used: Organization UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (1)
src/components/queue/job/JobGroupsList.test.ts
🧰 Additional context used
📓 Path-based instructions (11)
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/JobGroupsList.test.ts
src/**/*.ts
📄 CodeRabbit inference engine (.github/copilot-instructions.md)
src/**/*.ts: Use es-toolkit for utility functions
Use TypeScript for type safety
src/**/*.ts: Derive component types usingvue-component-type-helpers(ComponentProps,ComponentSlots) instead of separate type files
Use es-toolkit for utility functions
Minimize the surface area (exported values) of each module and composable
Favor pure functions, especially testable ones
Files:
src/components/queue/job/JobGroupsList.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
src/**/*.{ts,tsx,vue}: Use separateimport typestatements instead of inlinetypein mixed imports
Apply Prettier formatting with 2-space indentation, single quotes, no trailing semicolons, 80-character width
Sort and group imports by plugin, runpnpm formatbefore committing
Never useanytype - use proper TypeScript types
Never useas anytype assertions - fix the underlying type issue
Write code that is expressive and self-documenting - avoid unnecessary comments
Do not add or retain redundant comments - clean as you go
Avoid mutable state - prefer immutability and assignment at point of declaration
Watch out for Code Smells and refactor to avoid them
Files:
src/components/queue/job/JobGroupsList.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/JobGroupsList.test.ts
src/**/*.{vue,ts,tsx}
📄 CodeRabbit inference engine (src/CLAUDE.md)
Follow Vue 3 composition API style guide
Files:
src/components/queue/job/JobGroupsList.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/JobGroupsList.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/JobGroupsList.test.ts
+(tests-ui|src)/**/*.test.ts
📄 CodeRabbit inference engine (AGENTS.md)
+(tests-ui|src)/**/*.test.ts: Unit and component tests belong intests-ui/orsrc/**/*.test.tsusing Vitest
Write tests for all changes, especially bug fixes to catch future regressions
Do not write tests dependent on non-behavioral features like utility classes or styles
Do not write tests that just test the mocks - ensure tests fail when code behaves unexpectedly
Leverage Vitest's utilities for mocking where possible
Keep module mocks contained - do not use global mutable state within test files; usevi.hoisted()if necessary
Use Vue Test Utils for Component testing and follow best practices for making components easy to test
Aim for behavioral coverage of critical and new features in unit tests
Files:
src/components/queue/job/JobGroupsList.test.ts
src/**/*.{ts,vue}
📄 CodeRabbit inference engine (AGENTS.md)
src/**/*.{ts,vue}: Usereffor reactive state,computed()for derived values, andwatch/watchEffectfor side effects in Composition API
Avoid usingrefwithwatchif acomputedwould suffice - minimize refs and derived state
Useprovide/injectfor dependency injection only when simpler alternatives (Store or shared composable) won't work
Leverage VueUse functions for performance-enhancing composables
Use VueUse function for useI18n in composition API for string literals
Files:
src/components/queue/job/JobGroupsList.test.ts
src/**/*.{ts,tsx}
📄 CodeRabbit inference engine (AGENTS.md)
src/**/*.{ts,tsx}: Keep functions short and functional
Minimize nesting (if statements, for loops, etc.)
Use function declarations instead of function expressions when possible
Files:
src/components/queue/job/JobGroupsList.test.ts
+(tests-ui|src|browser_tests)/**/*.+(test.ts|spec.ts)
📄 CodeRabbit inference engine (AGENTS.md)
+(tests-ui|src|browser_tests)/**/*.+(test.ts|spec.ts): Do not write change detector tests - avoid tests that only assert default values
Be parsimonious in testing - do not write redundant tests
Don't Mock What You Don't Own
Files:
src/components/queue/job/JobGroupsList.test.ts
🧠 Learnings (12)
📓 Common learnings
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7894
File: src/renderer/extensions/vueNodes/widgets/components/WidgetToggleSwitch.test.ts:11-14
Timestamp: 2026-01-08T02:40:22.621Z
Learning: In the Comfy-Org/ComfyUI_frontend repository test files: When testing components, import the real type definitions from the component files instead of duplicating interface definitions in the test files. This prevents type drift and maintains consistency.
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
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7898
File: src/composables/usePaste.test.ts:248-248
Timestamp: 2026-01-09T02:07:59.035Z
Learning: In test files at src/**/*.test.ts, when creating mock objects that partially implement an interface (e.g., LGraphNode), use `as Partial<InterfaceType> as InterfaceType` instead of `as any` or `as unknown as InterfaceType` to explicitly acknowledge the incomplete implementation while maintaining type safety.
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to src/**/*.{ts,tsx,vue} : Never use `as any` type assertions - fix the underlying type issue
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to +(tests-ui|src)/**/*.test.ts : Write tests for all changes, especially bug fixes to catch future regressions
📚 Learning: 2026-01-08T02:40:15.482Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7894
File: src/renderer/extensions/vueNodes/widgets/components/WidgetToggleSwitch.test.ts:11-14
Timestamp: 2026-01-08T02:40:15.482Z
Learning: In TypeScript test files (e.g., any test under src), avoid duplicating interface/type definitions. Import real type definitions from the component modules under test and reference them directly, so there is a single source of truth and to prevent type drift. This improves maintainability and consistency across tests.
Applied to files:
src/components/queue/job/JobGroupsList.test.ts
📚 Learning: 2026-01-10T00:24:17.695Z
Learnt from: CR
Repo: Comfy-Org/ComfyUI_frontend PR: 0
File: AGENTS.md:0-0
Timestamp: 2026-01-10T00:24:17.695Z
Learning: Applies to +(tests-ui|src)/**/*.test.ts : Write tests for all changes, especially bug fixes to catch future regressions
Applied to files:
src/components/queue/job/JobGroupsList.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:
src/components/queue/job/JobGroupsList.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:
src/components/queue/job/JobGroupsList.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:
src/components/queue/job/JobGroupsList.test.ts
📚 Learning: 2025-12-30T22:22:33.836Z
Learnt from: kaili-yang
Repo: Comfy-Org/ComfyUI_frontend PR: 7805
File: src/composables/useCoreCommands.ts:439-439
Timestamp: 2025-12-30T22:22:33.836Z
Learning: When accessing reactive properties from Pinia stores in TypeScript files, avoid using .value on direct property access (e.g., useStore().isOverlayExpanded). Pinia auto-wraps refs when accessed directly, returning the primitive value. The .value accessor is only needed when destructuring store properties or when using storeToRefs().
Applied to files:
src/components/queue/job/JobGroupsList.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:
src/components/queue/job/JobGroupsList.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:
src/components/queue/job/JobGroupsList.test.ts
📚 Learning: 2026-01-09T02:07:54.558Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7898
File: src/composables/usePaste.test.ts:248-248
Timestamp: 2026-01-09T02:07:54.558Z
Learning: In test files (e.g., any .test.ts or .test.tsx under src/...), when you create mock objects that partially implement an interface (such as LGraphNode), prefer casting with as Partial<InterfaceType> as InterfaceType rather than as any or as unknown as InterfaceType. This makes the incomplete implementation explicit while preserving type safety, improving readability and maintainability of tests.
Applied to files:
src/components/queue/job/JobGroupsList.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:
src/components/queue/job/JobGroupsList.test.ts
📚 Learning: 2026-01-12T17:39:27.738Z
Learnt from: DrJKL
Repo: Comfy-Org/ComfyUI_frontend PR: 7906
File: src/components/sidebar/tabs/AssetsSidebarTab.vue:545-552
Timestamp: 2026-01-12T17:39:27.738Z
Learning: In Vue/TypeScript files (src/**/*.{ts,tsx,vue}), prefer if/else statements over ternary operators when performing side effects or actions (e.g., mutating state, calling methods with side effects). Ternaries should be reserved for computing and returning values.
Applied to files:
src/components/queue/job/JobGroupsList.test.ts
🧬 Code graph analysis (1)
src/components/queue/job/JobGroupsList.test.ts (2)
src/composables/queue/useJobList.ts (1)
JobListItem(33-47)src/stores/queueStore.ts (1)
TaskItemImpl(217-476)
⏰ 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: collect
- GitHub Check: lint-and-format
- GitHub Check: test
🔇 Additional comments (2)
src/components/queue/job/JobGroupsList.test.ts (2)
7-7: LGTM!Correct use of separate
import typestatement forTaskItemImpl, aligning with the coding guidelines.
63-97: LGTM!The test properly validates hover timing behavior with precise threshold checks. The behavioral assertions (verifying
activeDetailsIdtransitions) are appropriate and not change-detector tests.
✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.
| const createJobItem = (overrides: Partial<JobListItem> = {}): JobListItem => { | ||
| const { taskRef, ...rest } = overrides | ||
| return { | ||
| id: 'job-id', | ||
| title: 'Example job', | ||
| meta: 'Meta text', | ||
| state: 'running', | ||
| iconName: 'icon', | ||
| iconImageUrl: 'https://example.com/icon.png', | ||
| showClear: true, | ||
| taskRef: (taskRef ?? { | ||
| workflow: { id: 'workflow-id' } | ||
| }) as TaskItemImpl, | ||
| progressTotalPercent: 60, | ||
| progressCurrentPercent: 30, | ||
| runningNodeName: 'Node A', | ||
| ...rest | ||
| } | ||
| } |
There was a problem hiding this comment.
🧹 Nitpick | 🔵 Trivial
Consider explicit partial type acknowledgment for the mock.
The minimal mock object { workflow: { id: 'workflow-id' } } only implements a subset of TaskItemImpl. Per repository learnings, using as Partial<TaskItemImpl> as TaskItemImpl makes the incomplete implementation explicit while maintaining type safety.
🔧 Suggested improvement
- taskRef: (taskRef ?? {
- workflow: { id: 'workflow-id' }
- }) as TaskItemImpl,
+ taskRef: (taskRef ?? {
+ workflow: { id: 'workflow-id' }
+ }) as Partial<TaskItemImpl> as TaskItemImpl,Based on learnings, this pattern explicitly acknowledges that the mock doesn't fully implement the interface.
📝 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.
| const createJobItem = (overrides: Partial<JobListItem> = {}): JobListItem => { | |
| const { taskRef, ...rest } = overrides | |
| return { | |
| id: 'job-id', | |
| title: 'Example job', | |
| meta: 'Meta text', | |
| state: 'running', | |
| iconName: 'icon', | |
| iconImageUrl: 'https://example.com/icon.png', | |
| showClear: true, | |
| taskRef: (taskRef ?? { | |
| workflow: { id: 'workflow-id' } | |
| }) as TaskItemImpl, | |
| progressTotalPercent: 60, | |
| progressCurrentPercent: 30, | |
| runningNodeName: 'Node A', | |
| ...rest | |
| } | |
| } | |
| const createJobItem = (overrides: Partial<JobListItem> = {}): JobListItem => { | |
| const { taskRef, ...rest } = overrides | |
| return { | |
| id: 'job-id', | |
| title: 'Example job', | |
| meta: 'Meta text', | |
| state: 'running', | |
| iconName: 'icon', | |
| iconImageUrl: 'https://example.com/icon.png', | |
| showClear: true, | |
| taskRef: (taskRef ?? { | |
| workflow: { id: 'workflow-id' } | |
| }) as Partial<TaskItemImpl> as TaskItemImpl, | |
| progressTotalPercent: 60, | |
| progressCurrentPercent: 30, | |
| runningNodeName: 'Node A', | |
| ...rest | |
| } | |
| } |
🤖 Prompt for AI Agents
In `@src/components/queue/job/JobGroupsList.test.ts` around lines 29 - 47, The
default mock in createJobItem returns an incomplete TaskItemImpl for the taskRef
field; change the fallback to explicitly acknowledge the partial type by casting
the object as Partial<TaskItemImpl> and then to TaskItemImpl (e.g., replace the
current (taskRef ?? { workflow: { id: 'workflow-id' } }) as TaskItemImpl with
(taskRef ?? ({ workflow: { id: 'workflow-id' } } as Partial<TaskItemImpl>)) as
TaskItemImpl) so the mock is explicit while preserving type compatibility for
JobListItem.
Resolved conflicts from PRs #8083 (TypeScript no-explicit-any) and #8065 (bugfix). Key changes: - Kept jobs API-based error handling in useJobMenu using TaskItemImpl getters - Preserved async lazy loading in useResultGallery with getOutputsForTask - Removed unused type imports (ExecutionErrorWsMessage, TaskStatus, PreviewItem, TaskWithPreview) - Integrated bulk workflow actions and asset list view from main - Maintained compatibility with jobs API migration (Phase 3)
## Summary Continues the TypeScript strict typing improvements by removing `any` types from core scripts and dialog components. ### Changes **api.ts (6 instances)** - Define `V1RawPrompt` and `CloudRawPrompt` tuple types for queue prompt formats - Export `QueueIndex`, `PromptInputs`, `ExtraData`, `OutputsToExecute` from apiSchema - Type `#postItem` body, `storeUserData` data, and `getCustomNodesI18n` return **groupNodeManage.ts (all @ts-expect-error removed)** - Add `GroupNodeConfigEntry` interface to LGraph.ts - Extend `GroupNodeWorkflowData` with `title`, `widgets_values`, and typed `config` - Type all class properties with definite assignment assertions - Type all method parameters and event handlers - Fix save button callback with proper generic types for node ordering **changeTracker.ts (4 instances)** - Type `nodeOutputs` as `Record<string, ExecutedWsMessage['output']>` - Type prompt callback with `CanvasPointerEvent` and proper value types **asyncDialog.ts and dialog.ts** - Make `ComfyAsyncDialog` generic with `DialogAction<T>` type - Type `ComfyDialog` constructor and show method parameters - Update `ManageGroupDialog.show` signature to match base class ## Test plan - [x] `pnpm typecheck` passes - [x] `pnpm lint` passes - [x] Sourcegraph checks for external usage --- Related: Continues from #8083 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8092-Road-to-No-Explicit-Any-Part-7-Scripts-and-Dialog-Cleanup-2ea6d73d365081fbb890e73646a6ad16) by [Unito](https://www.unito.io)
…#8092) ## Summary Continues the TypeScript strict typing improvements by removing `any` types from core scripts and dialog components. ### Changes **api.ts (6 instances)** - Define `V1RawPrompt` and `CloudRawPrompt` tuple types for queue prompt formats - Export `QueueIndex`, `PromptInputs`, `ExtraData`, `OutputsToExecute` from apiSchema - Type `#postItem` body, `storeUserData` data, and `getCustomNodesI18n` return **groupNodeManage.ts (all @ts-expect-error removed)** - Add `GroupNodeConfigEntry` interface to LGraph.ts - Extend `GroupNodeWorkflowData` with `title`, `widgets_values`, and typed `config` - Type all class properties with definite assignment assertions - Type all method parameters and event handlers - Fix save button callback with proper generic types for node ordering **changeTracker.ts (4 instances)** - Type `nodeOutputs` as `Record<string, ExecutedWsMessage['output']>` - Type prompt callback with `CanvasPointerEvent` and proper value types **asyncDialog.ts and dialog.ts** - Make `ComfyAsyncDialog` generic with `DialogAction<T>` type - Type `ComfyDialog` constructor and show method parameters - Update `ManageGroupDialog.show` signature to match base class ## Test plan - [x] `pnpm typecheck` passes - [x] `pnpm lint` passes - [x] Sourcegraph checks for external usage --- Related: Continues from Comfy-Org#8083 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8092-Road-to-No-Explicit-Any-Part-7-Scripts-and-Dialog-Cleanup-2ea6d73d365081fbb890e73646a6ad16) by [Unito](https://www.unito.io)
## Summary
This PR removes unsafe type assertions ("as unknown as Type") from test
files and improves type safety across the codebase.
### Key Changes
#### Type Safety Improvements
- Removed all instances of "as unknown as" patterns from test files
- Used proper factory functions from litegraphTestUtils instead of
custom mocks
- Made incomplete mocks explicit using Partial<T> types
- Fixed DialogStore mocking with proper interface exports
- Improved type safety with satisfies operator where applicable
#### App Parameter Removal
- **Removed the unused `app` parameter from all ComfyExtension interface
methods**
- The app parameter was always undefined at runtime as it was never
passed from invokeExtensions
- Affected methods: init, setup, addCustomNodeDefs,
beforeRegisterNodeDef, beforeRegisterVueAppNodeDefs,
registerCustomNodes, loadedGraphNode, nodeCreated, beforeConfigureGraph,
afterConfigureGraph
##### Breaking Change Analysis
Verified via Sourcegraph that this is NOT a breaking change:
- Searched all 10 affected methods across GitHub repositories
- Only one external repository
([drawthingsai/draw-things-comfyui](https://github.com/drawthingsai/draw-things-comfyui))
declares the app parameter in their extension methods
- That repository never actually uses the app parameter (just declares
it in the function signature)
- All other repositories already omit the app parameter
- Search queries used:
- [init method
search](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/.*+lang:typescript+%22init%28app%22+-repo:Comfy-Org/ComfyUI_frontend&patternType=standard)
- [setup method
search](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/.*+lang:typescript+%22setup%28app%22+-repo:Comfy-Org/ComfyUI_frontend&patternType=standard)
- Similar searches for all 10 methods confirmed no usage
### Files Changed
Test files:
-
src/components/settings/widgets/__tests__/WidgetInputNumberInput.test.ts
- src/services/keybindingService.escape.test.ts
- src/services/keybindingService.forwarding.test.ts
- src/utils/__tests__/newUserService.test.ts →
src/utils/__tests__/useNewUserService.test.ts
- src/services/jobOutputCache.test.ts
-
src/renderer/extensions/vueNodes/widgets/composables/useRemoteWidget.test.ts
-
src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.test.ts
-
src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.test.ts
Source files:
- src/types/comfy.ts - Removed app parameter from ComfyExtension
interface
- src/services/extensionService.ts - Improved type safety with
FunctionPropertyNames helper
- src/scripts/metadata/isobmff.ts - Fixed extractJson return type per
review
- src/extensions/core/*.ts - Updated extension implementations
- src/scripts/app.ts - Updated app initialization
### Testing
- All existing tests pass
- Type checking passes
- ESLint/oxlint checks pass
- No breaking changes for external repositories
Part of the "Road to No Explicit Any" initiative.
### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344 (this PR)
## Summary
This PR removes unsafe type assertions ("as unknown as Type") from test
files and improves type safety across the codebase.
### Key Changes
#### Type Safety Improvements
- Removed all instances of "as unknown as" patterns from test files
- Used proper factory functions from litegraphTestUtils instead of
custom mocks
- Made incomplete mocks explicit using Partial<T> types
- Fixed DialogStore mocking with proper interface exports
- Improved type safety with satisfies operator where applicable
#### App Parameter Removal
- **Removed the unused `app` parameter from all ComfyExtension interface
methods**
- The app parameter was always undefined at runtime as it was never
passed from invokeExtensions
- Affected methods: init, setup, addCustomNodeDefs,
beforeRegisterNodeDef, beforeRegisterVueAppNodeDefs,
registerCustomNodes, loadedGraphNode, nodeCreated, beforeConfigureGraph,
afterConfigureGraph
##### Breaking Change Analysis
Verified via Sourcegraph that this is NOT a breaking change:
- Searched all 10 affected methods across GitHub repositories
- Only one external repository
([drawthingsai/draw-things-comfyui](https://github.com/drawthingsai/draw-things-comfyui))
declares the app parameter in their extension methods
- That repository never actually uses the app parameter (just declares
it in the function signature)
- All other repositories already omit the app parameter
- Search queries used:
- [init method
search](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/.*+lang:typescript+%22init%28app%22+-repo:Comfy-Org/ComfyUI_frontend&patternType=standard)
- [setup method
search](https://sourcegraph.com/search?q=context:global+repo:%5Egithub%5C.com/.*+lang:typescript+%22setup%28app%22+-repo:Comfy-Org/ComfyUI_frontend&patternType=standard)
- Similar searches for all 10 methods confirmed no usage
### Files Changed
Test files:
-
src/components/settings/widgets/__tests__/WidgetInputNumberInput.test.ts
- src/services/keybindingService.escape.test.ts
- src/services/keybindingService.forwarding.test.ts
- src/utils/__tests__/newUserService.test.ts →
src/utils/__tests__/useNewUserService.test.ts
- src/services/jobOutputCache.test.ts
-
src/renderer/extensions/vueNodes/widgets/composables/useRemoteWidget.test.ts
-
src/renderer/extensions/vueNodes/widgets/composables/useIntWidget.test.ts
-
src/renderer/extensions/vueNodes/widgets/composables/useFloatWidget.test.ts
Source files:
- src/types/comfy.ts - Removed app parameter from ComfyExtension
interface
- src/services/extensionService.ts - Improved type safety with
FunctionPropertyNames helper
- src/scripts/metadata/isobmff.ts - Fixed extractJson return type per
review
- src/extensions/core/*.ts - Updated extension implementations
- src/scripts/app.ts - Updated app initialization
### Testing
- All existing tests pass
- Type checking passes
- ESLint/oxlint checks pass
- No breaking changes for external repositories
Part of the "Road to No Explicit Any" initiative.
### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344 (this PR)
## Summary
This PR removes unsafe type assertions ("as unknown as Type") from test
files and improves type safety across the codebase.
### Key Changes
#### Type Safety Improvements
- Removed improper `as unknown as Type` patterns from 17 test files in
Group 8 part 7
- Replaced with proper TypeScript patterns using factory functions and
Mock types
- Fixed createTestingPinia usage in test files (was incorrectly using
createPinia)
- Fixed vi.hoisted pattern for mockSetDirty in viewport tests
- Fixed vi.doMock lint issues with vi.mock and vi.hoisted pattern
- Retained necessary `as unknown as` casts only for complex mock objects
where direct type assertions would fail
### Files Changed
Test files (Group 8 part 7 - services, stores, utils):
- src/services/nodeOrganizationService.test.ts
- src/services/providers/algoliaSearchProvider.test.ts
- src/services/providers/registrySearchProvider.test.ts
- src/stores/comfyRegistryStore.test.ts
- src/stores/domWidgetStore.test.ts
- src/stores/executionStore.test.ts
- src/stores/firebaseAuthStore.test.ts
- src/stores/modelToNodeStore.test.ts
- src/stores/queueStore.test.ts
- src/stores/subgraphNavigationStore.test.ts
- src/stores/subgraphNavigationStore.viewport.test.ts
- src/stores/subgraphStore.test.ts
- src/stores/systemStatsStore.test.ts
- src/stores/workspace/nodeHelpStore.test.ts
- src/utils/colorUtil.test.ts
- src/utils/executableGroupNodeChildDTO.test.ts
Source files:
- src/stores/modelStore.ts - Improved type handling
### Testing
- All TypeScript type checking passes (`pnpm typecheck`)
- All affected test files pass (`pnpm test:unit`)
- Linting passes without errors (`pnpm lint`)
- Code formatting applied (`pnpm format`)
Part of the "Road to No Explicit Any" initiative, cleaning up type
casting issues from branch `fix/remove-any-types-part8`.
### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459 (this PR)
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8459-Road-to-No-explicit-any-Group-8-part-7-test-files-2f86d73d36508114ad28d82e72a3a5e9)
by [Unito](https://www.unito.io)
## Summary
This PR removes unsafe type assertions ("as unknown as Type") from test
files and improves type safety across the codebase.
### Key Changes
#### Type Safety Improvements
- Removed improper `as unknown as Type` patterns from 17 test files in
Group 8 part 7
- Replaced with proper TypeScript patterns using factory functions and
Mock types
- Fixed createTestingPinia usage in test files (was incorrectly using
createPinia)
- Fixed vi.hoisted pattern for mockSetDirty in viewport tests
- Fixed vi.doMock lint issues with vi.mock and vi.hoisted pattern
- Retained necessary `as unknown as` casts only for complex mock objects
where direct type assertions would fail
### Files Changed
Test files (Group 8 part 7 - services, stores, utils):
- src/services/nodeOrganizationService.test.ts
- src/services/providers/algoliaSearchProvider.test.ts
- src/services/providers/registrySearchProvider.test.ts
- src/stores/comfyRegistryStore.test.ts
- src/stores/domWidgetStore.test.ts
- src/stores/executionStore.test.ts
- src/stores/firebaseAuthStore.test.ts
- src/stores/modelToNodeStore.test.ts
- src/stores/queueStore.test.ts
- src/stores/subgraphNavigationStore.test.ts
- src/stores/subgraphNavigationStore.viewport.test.ts
- src/stores/subgraphStore.test.ts
- src/stores/systemStatsStore.test.ts
- src/stores/workspace/nodeHelpStore.test.ts
- src/utils/colorUtil.test.ts
- src/utils/executableGroupNodeChildDTO.test.ts
Source files:
- src/stores/modelStore.ts - Improved type handling
### Testing
- All TypeScript type checking passes (`pnpm typecheck`)
- All affected test files pass (`pnpm test:unit`)
- Linting passes without errors (`pnpm lint`)
- Code formatting applied (`pnpm format`)
Part of the "Road to No Explicit Any" initiative, cleaning up type
casting issues from branch `fix/remove-any-types-part8`.
### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459 (this PR)
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8459-Road-to-No-explicit-any-Group-8-part-7-test-files-2f86d73d36508114ad28d82e72a3a5e9)
by [Unito](https://www.unito.io)
## Summary
This PR removes unsafe type assertions ("as unknown as Type") from test
files and improves type safety across the codebase.
### Key Changes
#### Type Safety Improvements
- Removed improper `as unknown as Type` patterns from test files in
Group 8 part 8
- Replaced with proper TypeScript patterns using Pinia store testing
patterns
- Fixed parameter shadowing issue in typeGuardUtil.test.ts (constructor
→ nodeConstructor)
- Fixed stale mock values in useConflictDetection.test.ts using getter
functions
- Refactored useManagerState tests to follow proper Pinia store testing
patterns with createTestingPinia
### Files Changed
Test files (Group 8 part 8 - utils and manager composables):
- src/utils/typeGuardUtil.test.ts - Fixed parameter shadowing
- src/utils/graphTraversalUtil.test.ts - Removed unsafe type assertions
- src/utils/litegraphUtil.test.ts - Improved type handling
- src/workbench/extensions/manager/composables/useManagerState.test.ts -
Complete rewrite using Pinia testing patterns
-
src/workbench/extensions/manager/composables/useConflictDetection.test.ts
- Fixed stale mock values with getters
- src/workbench/extensions/manager/composables/useManagerQueue.test.ts -
Type safety improvements
-
src/workbench/extensions/manager/composables/nodePack/useMissingNodes.test.ts
- Removed unsafe casts
-
src/workbench/extensions/manager/composables/nodePack/usePacksSelection.test.ts
- Type improvements
-
src/workbench/extensions/manager/composables/nodePack/usePacksStatus.test.ts
- Type improvements
- src/workbench/extensions/manager/utils/versionUtil.test.ts - Type
safety fixes
Source files (minor type fixes):
- src/utils/fuseUtil.ts - Type improvements
- src/utils/linkFixer.ts - Type safety fixes
- src/utils/syncUtil.ts - Type improvements
-
src/workbench/extensions/manager/composables/nodePack/useWorkflowPacks.ts
- Type fix
-
src/workbench/extensions/manager/composables/useConflictAcknowledgment.ts
- Type fix
### Testing
- All TypeScript type checking passes (`pnpm typecheck`)
- All affected test files pass (`pnpm test:unit`)
- Linting passes without errors (`pnpm lint`)
- Code formatting applied (`pnpm format`)
Part of the "Road to No Explicit Any" initiative, cleaning up type
casting issues from branch `fix/remove-any-types-part8`.
### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459
- Part 8 Group 8: #8496 (this PR)
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8496-Road-to-No-explicit-any-Group-8-part-8-test-files-2f86d73d365081f3afdcf8d01fba81e1)
by [Unito](https://www.unito.io)
---------
Co-authored-by: GitHub Action <action@github.com>
## Summary
This PR removes unsafe type assertions ("as unknown as Type") from test
files and improves type safety across the codebase.
### Key Changes
#### Type Safety Improvements
- Removed improper `as unknown as Type` patterns from 17 test files in
Group 8 part 7
- Replaced with proper TypeScript patterns using factory functions and
Mock types
- Fixed createTestingPinia usage in test files (was incorrectly using
createPinia)
- Fixed vi.hoisted pattern for mockSetDirty in viewport tests
- Fixed vi.doMock lint issues with vi.mock and vi.hoisted pattern
- Retained necessary `as unknown as` casts only for complex mock objects
where direct type assertions would fail
### Files Changed
Test files (Group 8 part 7 - services, stores, utils):
- src/services/nodeOrganizationService.test.ts
- src/services/providers/algoliaSearchProvider.test.ts
- src/services/providers/registrySearchProvider.test.ts
- src/stores/comfyRegistryStore.test.ts
- src/stores/domWidgetStore.test.ts
- src/stores/executionStore.test.ts
- src/stores/firebaseAuthStore.test.ts
- src/stores/modelToNodeStore.test.ts
- src/stores/queueStore.test.ts
- src/stores/subgraphNavigationStore.test.ts
- src/stores/subgraphNavigationStore.viewport.test.ts
- src/stores/subgraphStore.test.ts
- src/stores/systemStatsStore.test.ts
- src/stores/workspace/nodeHelpStore.test.ts
- src/utils/colorUtil.test.ts
- src/utils/executableGroupNodeChildDTO.test.ts
Source files:
- src/stores/modelStore.ts - Improved type handling
### Testing
- All TypeScript type checking passes (`pnpm typecheck`)
- All affected test files pass (`pnpm test:unit`)
- Linting passes without errors (`pnpm lint`)
- Code formatting applied (`pnpm format`)
Part of the "Road to No Explicit Any" initiative, cleaning up type
casting issues from branch `fix/remove-any-types-part8`.
### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459 (this PR)
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8459-Road-to-No-explicit-any-Group-8-part-7-test-files-2f86d73d36508114ad28d82e72a3a5e9)
by [Unito](https://www.unito.io)
## Summary
This PR removes unsafe type assertions ("as unknown as Type") from test
files and improves type safety across the codebase.
### Key Changes
#### Type Safety Improvements
- Removed improper `as unknown as Type` patterns from test files in
Group 8 part 8
- Replaced with proper TypeScript patterns using Pinia store testing
patterns
- Fixed parameter shadowing issue in typeGuardUtil.test.ts (constructor
→ nodeConstructor)
- Fixed stale mock values in useConflictDetection.test.ts using getter
functions
- Refactored useManagerState tests to follow proper Pinia store testing
patterns with createTestingPinia
### Files Changed
Test files (Group 8 part 8 - utils and manager composables):
- src/utils/typeGuardUtil.test.ts - Fixed parameter shadowing
- src/utils/graphTraversalUtil.test.ts - Removed unsafe type assertions
- src/utils/litegraphUtil.test.ts - Improved type handling
- src/workbench/extensions/manager/composables/useManagerState.test.ts -
Complete rewrite using Pinia testing patterns
-
src/workbench/extensions/manager/composables/useConflictDetection.test.ts
- Fixed stale mock values with getters
- src/workbench/extensions/manager/composables/useManagerQueue.test.ts -
Type safety improvements
-
src/workbench/extensions/manager/composables/nodePack/useMissingNodes.test.ts
- Removed unsafe casts
-
src/workbench/extensions/manager/composables/nodePack/usePacksSelection.test.ts
- Type improvements
-
src/workbench/extensions/manager/composables/nodePack/usePacksStatus.test.ts
- Type improvements
- src/workbench/extensions/manager/utils/versionUtil.test.ts - Type
safety fixes
Source files (minor type fixes):
- src/utils/fuseUtil.ts - Type improvements
- src/utils/linkFixer.ts - Type safety fixes
- src/utils/syncUtil.ts - Type improvements
-
src/workbench/extensions/manager/composables/nodePack/useWorkflowPacks.ts
- Type fix
-
src/workbench/extensions/manager/composables/useConflictAcknowledgment.ts
- Type fix
### Testing
- All TypeScript type checking passes (`pnpm typecheck`)
- All affected test files pass (`pnpm test:unit`)
- Linting passes without errors (`pnpm lint`)
- Code formatting applied (`pnpm format`)
Part of the "Road to No Explicit Any" initiative, cleaning up type
casting issues from branch `fix/remove-any-types-part8`.
### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459
- Part 8 Group 8: #8496 (this PR)
┆Issue is synchronized with this [Notion
page](https://www.notion.so/PR-8496-Road-to-No-explicit-any-Group-8-part-8-test-files-2f86d73d365081f3afdcf8d01fba81e1)
by [Unito](https://www.unito.io)
---------
Co-authored-by: GitHub Action <action@github.com>
## Summary This PR removes `any` types from UI component files and replaces them with proper TypeScript types. ### Key Changes #### Type Safety Improvements - Replaced `any` with `unknown`, explicit types, or proper interfaces across UI components - Used `ComponentPublicInstance` with explicit method signatures for component refs - Used `Record<string, unknown>` for dynamic property access - Added generics for form components with flexible value types - Used `CSSProperties` for style objects ### Files Changed UI Components: - src/components/common/ComfyImage.vue - Used proper class prop type - src/components/common/DeviceInfo.vue - Used `string | number` for formatValue - src/components/common/FormItem.vue - Used `unknown` for model value - src/components/common/FormRadioGroup.vue - Added generic type parameter - src/components/common/TreeExplorer.vue - Used proper async function signature - src/components/custom/widget/WorkflowTemplateSelectorDialog.vue - Fixed duplicate import - src/components/graph/CanvasModeSelector.vue - Used `ComponentPublicInstance` for ref - src/components/node/NodePreview.vue - Changed `any` to `unknown` - src/components/queue/job/JobDetailsPopover.vue - Removed unnecessary casts - src/components/queue/job/JobFiltersBar.vue - Removed `as any` casts - src/platform/assets/components/MediaAssetContextMenu.vue - Added `ContextMenuInstance` type - src/renderer/extensions/minimap/MiniMapPanel.vue - Used `CSSProperties` - src/renderer/extensions/vueNodes/composables/useNodeTooltips.ts - Added `PrimeVueTooltipElement` interface - src/renderer/extensions/vueNodes/widgets/components/form/FormSelectButton.vue - Used `Record<string, unknown>` - src/workbench/extensions/manager/components/manager/infoPanel/tabs/DescriptionTabPanel.vue - Added `LicenseObject` interface ### Testing - All TypeScript type checking passes (`pnpm typecheck`) - Linting passes without errors (`pnpm lint`) Part of the "Road to No Explicit Any" initiative. ### Previous PRs in this series: - Part 2: #7401 - Part 3: #7935 - Part 4: #7970 - Part 5: #8064 - Part 6: #8083 - Part 7: #8092 - Part 8 Group 1: #8253 - Part 8 Group 2: #8258 - Part 8 Group 3: #8304 - Part 8 Group 4: #8314 - Part 8 Group 5: #8329 - Part 8 Group 6: #8344 - Part 8 Group 7: #8459 - Part 8 Group 8: #8496 - Part 9: #8498 - Part 10: #8499 ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-8499-Road-to-No-Explicit-Any-Part-10-2f86d73d365081aab129f165c7d02434) by [Unito](https://www.unito.io)
## Summary
This PR removes `any` types from core source files and replaces them
with proper TypeScript types.
### Key Changes
#### Type Safety Improvements
- Replaced `any` with `unknown`, explicit types, or proper interfaces
across core files
- Introduced new type definitions: `SceneConfig`, `Load3DNode`,
`ElectronWindow`
- Used `Object.assign` instead of `as any` for dynamic property
assignment
- Replaced `as any` casts with proper type assertions
### Files Changed
Source files:
- src/extensions/core/widgetInputs.ts - Removed unnecessary `as any`
cast
- src/platform/cloud/onboarding/auth.ts - Used `Record<string, unknown>`
and Sentry types
- src/platform/telemetry/providers/cloud/MixpanelTelemetryProvider.ts -
Used `AuditLog[]` type
- src/platform/workflow/management/stores/workflowStore.ts - Used
`typeof ComfyWorkflow` constructor type
- src/scripts/app.ts - Used `ResultItem[]` for Clipspace images
- src/services/colorPaletteService.ts - Used `Object.assign` instead of
`as any`
- src/services/customerEventsService.ts - Used `unknown` instead of
`any`
- src/services/load3dService.ts - Added proper interface types for
Load3D nodes
- src/types/litegraph-augmentation.d.ts - Used `TWidgetValue[]` type
- src/utils/envUtil.ts - Added ElectronWindow interface
- src/workbench/extensions/manager/stores/comfyManagerStore.ts - Typed
event as `CustomEvent<{ ui_id?: string }>`
### Testing
- All TypeScript type checking passes (`pnpm typecheck`)
- Linting passes without errors (`pnpm lint`)
- Code formatting applied (`pnpm format`)
Part of the "Road to No Explicit Any" initiative.
### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459
- Part 8 Group 8: #8496
- Part 9: #8498 (this PR)
## Summary
This PR removes `any` types from widgets, services, stores, and test
files, replacing them with proper TypeScript types.
### Key Changes
#### Type Safety Improvements
- Replaced `any` with `unknown`, explicit types, or proper interfaces
across widgets and services
- Added proper type imports (TgpuRoot, Point, StyleValue, etc.)
- Created typed interfaces (NumericWidgetOptions, TestWindow,
ImportFailureDetail, etc.)
- Fixed function return types to be non-nullable where appropriate
- Added type guards and null checks instead of non-null assertions
- Used `ComponentProps` from vue-component-type-helpers for component
testing
#### Widget System
- Added index signature to IWidgetOptions for Record compatibility
- Centralized disabled logic in WidgetInputNumberInput
- Moved template type assertions to computed properties
- Fixed ComboWidget getOptionLabel type assertions
- Improved remote widget type handling with runtime checks
#### Services & Stores
- Fixed getOrCreateViewer to return non-nullable values
- Updated addNodeOnGraph to use specific options type `{ pos?: Point }`
- Added proper type assertions for settings store retrieval
- Fixed executionIdToCurrentId return type (string | undefined)
#### Test Infrastructure
- Exported GraphOrSubgraph from litegraph barrel to avoid circular
dependencies
- Updated test fixtures with proper TypeScript types (TestInfo,
LGraphNode)
- Replaced loose Record types with ComponentProps in tests
- Added proper error handling in WebSocket fixture
#### Code Organization
- Created shared i18n-types module for locale data types
- Made ImportFailureDetail non-exported (internal use only)
- Added @public JSDoc tag to ElectronWindow type
- Fixed console.log usage in scripts to use allowed methods
### Files Changed
**Widgets & Components:**
-
src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumberInput.vue
-
src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
-
src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue
- src/renderer/extensions/vueNodes/widgets/components/WidgetTextarea.vue
-
src/renderer/extensions/vueNodes/widgets/composables/useRemoteWidget.ts
- src/lib/litegraph/src/widgets/ComboWidget.ts
- src/lib/litegraph/src/types/widgets.ts
- src/components/common/LazyImage.vue
- src/components/load3d/Load3dViewerContent.vue
**Services & Stores:**
- src/services/litegraphService.ts
- src/services/load3dService.ts
- src/services/colorPaletteService.ts
- src/stores/maskEditorStore.ts
- src/stores/nodeDefStore.ts
- src/platform/settings/settingStore.ts
- src/platform/workflow/management/stores/workflowStore.ts
**Composables & Utils:**
- src/composables/node/useWatchWidget.ts
- src/composables/useCanvasDrop.ts
- src/utils/widgetPropFilter.ts
- src/utils/queueDisplay.ts
- src/utils/envUtil.ts
**Test Files:**
- browser_tests/fixtures/ComfyPage.ts
- browser_tests/fixtures/ws.ts
- browser_tests/tests/actionbar.spec.ts
-
src/workbench/extensions/manager/components/manager/skeleton/PackCardGridSkeleton.test.ts
- src/lib/litegraph/src/subgraph/subgraphUtils.test.ts
- src/components/rightSidePanel/shared.test.ts
- src/platform/cloud/subscription/composables/useSubscription.test.ts
-
src/platform/workflow/persistence/composables/useWorkflowPersistence.test.ts
**Scripts & Types:**
- scripts/i18n-types.ts (new shared module)
- scripts/diff-i18n.ts
- scripts/check-unused-i18n-keys.ts
- src/workbench/extensions/manager/types/conflictDetectionTypes.ts
- src/types/algoliaTypes.ts
- src/types/simplifiedWidget.ts
**Infrastructure:**
- src/lib/litegraph/src/litegraph.ts (added GraphOrSubgraph export)
- src/lib/litegraph/src/infrastructure/CustomEventTarget.ts
- src/platform/assets/services/assetService.ts
**Stories:**
- apps/desktop-ui/src/views/InstallView.stories.ts
- src/components/queue/job/JobDetailsPopover.stories.ts
**Extension Manager:**
- src/workbench/extensions/manager/composables/useConflictDetection.ts
- src/workbench/extensions/manager/composables/useManagerQueue.ts
- src/workbench/extensions/manager/services/comfyManagerService.ts
- src/workbench/extensions/manager/utils/conflictMessageUtil.ts
### Testing
- [x] All TypeScript type checking passes (`pnpm typecheck`)
- [x] ESLint passes without errors (`pnpm lint`)
- [x] Format checks pass (`pnpm format:check`)
- [x] Knip (unused exports) passes (`pnpm knip`)
- [x] Pre-commit and pre-push hooks pass
Part of the "Road to No Explicit Any" initiative.
### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459
- Part 8 Group 8: #8496
- Part 9: #8498
- Part 10: #8499
---------
Co-authored-by: Comfy Org PR Bot <snomiao+comfy-pr@gmail.com>
Co-authored-by: christian-byrne <72887196+christian-byrne@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
## Summary
This PR removes `any` types from widgets, services, stores, and test
files, replacing them with proper TypeScript types.
### Key Changes
#### Type Safety Improvements
- Replaced `any` with `unknown`, explicit types, or proper interfaces
across widgets and services
- Added proper type imports (TgpuRoot, Point, StyleValue, etc.)
- Created typed interfaces (NumericWidgetOptions, TestWindow,
ImportFailureDetail, etc.)
- Fixed function return types to be non-nullable where appropriate
- Added type guards and null checks instead of non-null assertions
- Used `ComponentProps` from vue-component-type-helpers for component
testing
#### Widget System
- Added index signature to IWidgetOptions for Record compatibility
- Centralized disabled logic in WidgetInputNumberInput
- Moved template type assertions to computed properties
- Fixed ComboWidget getOptionLabel type assertions
- Improved remote widget type handling with runtime checks
#### Services & Stores
- Fixed getOrCreateViewer to return non-nullable values
- Updated addNodeOnGraph to use specific options type `{ pos?: Point }`
- Added proper type assertions for settings store retrieval
- Fixed executionIdToCurrentId return type (string | undefined)
#### Test Infrastructure
- Exported GraphOrSubgraph from litegraph barrel to avoid circular
dependencies
- Updated test fixtures with proper TypeScript types (TestInfo,
LGraphNode)
- Replaced loose Record types with ComponentProps in tests
- Added proper error handling in WebSocket fixture
#### Code Organization
- Created shared i18n-types module for locale data types
- Made ImportFailureDetail non-exported (internal use only)
- Added @public JSDoc tag to ElectronWindow type
- Fixed console.log usage in scripts to use allowed methods
### Files Changed
**Widgets & Components:**
-
src/renderer/extensions/vueNodes/widgets/components/WidgetInputNumberInput.vue
-
src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDefault.vue
-
src/renderer/extensions/vueNodes/widgets/components/WidgetSelectDropdown.vue
- src/renderer/extensions/vueNodes/widgets/components/WidgetTextarea.vue
-
src/renderer/extensions/vueNodes/widgets/composables/useRemoteWidget.ts
- src/lib/litegraph/src/widgets/ComboWidget.ts
- src/lib/litegraph/src/types/widgets.ts
- src/components/common/LazyImage.vue
- src/components/load3d/Load3dViewerContent.vue
**Services & Stores:**
- src/services/litegraphService.ts
- src/services/load3dService.ts
- src/services/colorPaletteService.ts
- src/stores/maskEditorStore.ts
- src/stores/nodeDefStore.ts
- src/platform/settings/settingStore.ts
- src/platform/workflow/management/stores/workflowStore.ts
**Composables & Utils:**
- src/composables/node/useWatchWidget.ts
- src/composables/useCanvasDrop.ts
- src/utils/widgetPropFilter.ts
- src/utils/queueDisplay.ts
- src/utils/envUtil.ts
**Test Files:**
- browser_tests/fixtures/ComfyPage.ts
- browser_tests/fixtures/ws.ts
- browser_tests/tests/actionbar.spec.ts
-
src/workbench/extensions/manager/components/manager/skeleton/PackCardGridSkeleton.test.ts
- src/lib/litegraph/src/subgraph/subgraphUtils.test.ts
- src/components/rightSidePanel/shared.test.ts
- src/platform/cloud/subscription/composables/useSubscription.test.ts
-
src/platform/workflow/persistence/composables/useWorkflowPersistence.test.ts
**Scripts & Types:**
- scripts/i18n-types.ts (new shared module)
- scripts/diff-i18n.ts
- scripts/check-unused-i18n-keys.ts
- src/workbench/extensions/manager/types/conflictDetectionTypes.ts
- src/types/algoliaTypes.ts
- src/types/simplifiedWidget.ts
**Infrastructure:**
- src/lib/litegraph/src/litegraph.ts (added GraphOrSubgraph export)
- src/lib/litegraph/src/infrastructure/CustomEventTarget.ts
- src/platform/assets/services/assetService.ts
**Stories:**
- apps/desktop-ui/src/views/InstallView.stories.ts
- src/components/queue/job/JobDetailsPopover.stories.ts
**Extension Manager:**
- src/workbench/extensions/manager/composables/useConflictDetection.ts
- src/workbench/extensions/manager/composables/useManagerQueue.ts
- src/workbench/extensions/manager/services/comfyManagerService.ts
- src/workbench/extensions/manager/utils/conflictMessageUtil.ts
### Testing
- [x] All TypeScript type checking passes (`pnpm typecheck`)
- [x] ESLint passes without errors (`pnpm lint`)
- [x] Format checks pass (`pnpm format:check`)
- [x] Knip (unused exports) passes (`pnpm knip`)
- [x] Pre-commit and pre-push hooks pass
Part of the "Road to No Explicit Any" initiative.
### Previous PRs in this series:
- Part 2: #7401
- Part 3: #7935
- Part 4: #7970
- Part 5: #8064
- Part 6: #8083
- Part 7: #8092
- Part 8 Group 1: #8253
- Part 8 Group 2: #8258
- Part 8 Group 3: #8304
- Part 8 Group 4: #8314
- Part 8 Group 5: #8329
- Part 8 Group 6: #8344
- Part 8 Group 7: #8459
- Part 8 Group 8: #8496
- Part 9: #8498
- Part 10: #8499
---------
Co-authored-by: Comfy Org PR Bot <snomiao+comfy-pr@gmail.com>
Co-authored-by: christian-byrne <72887196+christian-byrne@users.noreply.github.com>
Co-authored-by: github-actions <github-actions@github.com>
Summary
onExecutedcallbacks withNodeExecutionOutputin saveMesh.ts and uploadAudio.tstaskRefasTaskItemImplwith updated test mocksanyNodeOutputWith<T>generic helper for typed access to passthrough properties onNodeExecutionOutputTest plan
pnpm typecheckpassespnpm lintpasses┆Issue is synchronized with this Notion page by Unito