Compare commits

..

15 Commits

Author SHA1 Message Date
GitHub Action
24a3b28fb9 [automated] Apply ESLint and Oxfmt fixes 2026-02-06 02:36:54 +00:00
bymyself
6ac72fafcc fix: use current graph state for node replacement to preserve prior replacements
Amp-Thread-ID: https://ampcode.com/threads/T-019c3047-baa8-757f-b271-4be924f4cde3
2026-02-05 18:34:25 -08:00
bymyself
f50afee6c4 test: add browser test for node replacement UI
Amp-Thread-ID: https://ampcode.com/threads/T-019c3047-baa8-757f-b271-4be924f4cde3
2026-02-05 18:12:46 -08:00
Jin Yi
3b3430e2d8 Merge branch 'feature/node-replacement-classify' into feature/node-replacement-ui 2026-02-05 15:16:30 +09:00
Jin Yi
52a46e72c9 Merge branch 'main' into feature/node-replacement-classify 2026-02-05 15:15:47 +09:00
Jin Yi
513dd0e426 feature: replace nodes 2026-02-04 14:30:26 +09:00
Jin Yi
1fc34dfd6a feature: isEnabled flag added & hardcoding deleted 2026-02-04 13:13:18 +09:00
Jin Yi
24612b2082 Merge branch 'main' into feature/node-replacement-classify 2026-02-04 12:07:35 +09:00
Jin Yi
7a7a1a5e70 feat: classify missing nodes by replacement availability 2026-01-30 15:59:23 +09:00
Jin Yi
4c2f2a910f chore: addressed code review 2026-01-30 14:33:40 +09:00
Jin Yi
31177bc036 Merge branch 'main' into feature/node-deprecated-store 2026-01-30 14:20:59 +09:00
Jin Yi
8390838ed2 chore: service folder deleted 2026-01-29 17:10:23 +09:00
Jin Yi
ee0c0e9996 Merge branch 'main' into feature/node-deprecated-store 2026-01-29 17:08:02 +09:00
Jin Yi
4b57a12ca5 fix: applied based on code review 2026-01-29 17:00:17 +09:00
Jin Yi
07c8b822bc feature: node deprecated store + service 2026-01-28 15:46:30 +09:00
105 changed files with 899 additions and 1313 deletions

View File

@@ -109,7 +109,7 @@ jobs:
# Run sharded tests with snapshot updates (browsers pre-installed in container)
- name: Update snapshots (Shard ${{ matrix.shardIndex }}/${{ matrix.shardTotal }})
id: playwright-tests
run: pnpm exec playwright test --update-snapshots --grep @screenshot --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
run: pnpm exec playwright test --update-snapshots --shard=${{ matrix.shardIndex }}/${{ matrix.shardTotal }}
continue-on-error: true
- name: Stage changed snapshot files

View File

@@ -1,8 +1,6 @@
// eslint-disable-next-line storybook/no-renderer-packages
import type { Meta, StoryObj } from '@storybook/vue3'
import type { ElectronAPI } from '@comfyorg/comfyui-electron-types'
import { nextTick, provide } from 'vue'
import type { ElectronWindow } from '@/utils/envUtil'
import { createMemoryHistory, createRouter } from 'vue-router'
import InstallView from './InstallView.vue'
@@ -44,21 +42,16 @@ const meta: Meta<typeof InstallView> = {
const router = createMockRouter()
// Mock electron API
;(window as ElectronWindow).electronAPI = {
;(window as any).electronAPI = {
getPlatform: () => 'darwin',
Config: {
getDetectedGpu: () => Promise.resolve('mps')
},
Events: {
trackEvent: (
_eventName: string,
_data?: Record<string, unknown>
) => {}
trackEvent: (_eventName: string, _data?: any) => {}
},
installComfyUI: (
_options: Parameters<ElectronAPI['installComfyUI']>[0]
) => {},
changeTheme: (_theme: Parameters<ElectronAPI['changeTheme']>[0]) => {},
installComfyUI: (_options: any) => {},
changeTheme: (_theme: any) => {},
getSystemPaths: () =>
Promise.resolve({
defaultInstallPath: '/Users/username/ComfyUI'
@@ -247,8 +240,8 @@ export const DesktopSettings: Story = {
export const WindowsPlatform: Story = {
render: () => {
// Override the platform to Windows
;(window as ElectronWindow).electronAPI.getPlatform = () => 'win32'
;(window as ElectronWindow).electronAPI.Config.getDetectedGpu = () =>
;(window as any).electronAPI.getPlatform = () => 'win32'
;(window as any).electronAPI.Config.getDetectedGpu = () =>
Promise.resolve('nvidia')
return {
@@ -266,8 +259,8 @@ export const MacOSPlatform: Story = {
name: 'macOS Platform',
render: () => {
// Override the platform to macOS
;(window as ElectronWindow).electronAPI.getPlatform = () => 'darwin'
;(window as ElectronWindow).electronAPI.Config.getDetectedGpu = () =>
;(window as any).electronAPI.getPlatform = () => 'darwin'
;(window as any).electronAPI.Config.getDetectedGpu = () =>
Promise.resolve('mps')
return {
@@ -334,7 +327,7 @@ export const ManualInstall: Story = {
export const ErrorState: Story = {
render: () => {
// Override validation to return an error
;(window as ElectronWindow).electronAPI.validateInstallPath = () =>
;(window as any).electronAPI.validateInstallPath = () =>
Promise.resolve({
isValid: false,
exists: false,
@@ -382,7 +375,7 @@ export const ErrorState: Story = {
export const WarningState: Story = {
render: () => {
// Override validation to return a warning about non-default drive
;(window as ElectronWindow).electronAPI.validateInstallPath = () =>
;(window as any).electronAPI.validateInstallPath = () =>
Promise.resolve({
isValid: true,
exists: false,

View File

@@ -0,0 +1,59 @@
{
"last_node_id": 3,
"last_link_id": 1,
"nodes": [
{
"id": 1,
"type": "T2IAdapterLoader",
"pos": [100, 100],
"size": { "0": 300, "1": 58 },
"flags": {},
"order": 0,
"mode": 0,
"inputs": [],
"outputs": [
{
"name": "CONTROL_NET",
"type": "CONTROL_NET",
"links": null
}
],
"properties": { "Node name for S&R": "T2IAdapterLoader" },
"widgets_values": ["t2iadapter_model.safetensors"]
},
{
"id": 2,
"type": "ImageBatch",
"pos": [100, 200],
"size": { "0": 210, "1": 46 },
"flags": {},
"order": 1,
"mode": 0,
"inputs": [
{ "name": "image1", "type": "IMAGE", "link": null },
{ "name": "image2", "type": "IMAGE", "link": null }
],
"outputs": [{ "name": "IMAGE", "type": "IMAGE", "links": [1] }],
"properties": { "Node name for S&R": "ImageBatch" }
},
{
"id": 3,
"type": "UNKNOWN_NO_REPLACEMENT",
"pos": [100, 300],
"size": { "0": 210, "1": 46 },
"flags": {},
"order": 2,
"mode": 0,
"inputs": [{ "name": "image", "type": "IMAGE", "link": 1 }],
"outputs": [{ "name": "IMAGE", "type": "IMAGE", "links": null }],
"properties": { "Node name for S&R": "UNKNOWN_NO_REPLACEMENT" }
}
],
"links": [[1, 2, 0, 3, 0, "IMAGE"]],
"groups": [],
"config": {},
"extra": {
"ds": { "scale": 1, "offset": [0, 0] }
},
"version": 0.4
}

View File

@@ -1,9 +1,5 @@
import { test as base } from '@playwright/test'
interface TestWindow extends Window {
__ws__?: Record<string, WebSocket>
}
export const webSocketFixture = base.extend<{
ws: { trigger(data: unknown, url?: string): Promise<void> }
}>({

View File

@@ -34,6 +34,33 @@ test.describe('Load workflow warning', { tag: '@ui' }, () => {
expect(warningText).toContain('MISSING_NODE_TYPE_IN_SUBGRAPH')
expect(warningText).toContain('in subgraph')
})
test('Should show replacement UI for replaceable missing nodes', async ({
comfyPage
}) => {
await comfyPage.settings.setSetting('Comfy.NodeReplacement.Enabled', true)
await comfyPage.workflow.loadWorkflow('missing/replaceable_nodes')
const missingNodesWarning = comfyPage.page.locator('.comfy-missing-nodes')
await expect(missingNodesWarning).toBeVisible()
// Verify "Replaceable" badges appear for nodes with replacements
const replaceableBadges = missingNodesWarning.getByText('Replaceable')
await expect(replaceableBadges.first()).toBeVisible()
expect(await replaceableBadges.count()).toBeGreaterThanOrEqual(2)
// Verify individual "Replace" buttons appear
const replaceButtons = missingNodesWarning.getByRole('button', {
name: 'Replace'
})
expect(await replaceButtons.count()).toBeGreaterThanOrEqual(2)
// Verify "Replace All" button appears in footer
const replaceAllButton = comfyPage.page.getByRole('button', {
name: 'Replace All'
})
await expect(replaceAllButton).toBeVisible()
})
})
test('Does not report warning on undo/redo', async ({ comfyPage }) => {

Binary file not shown.

Before

Width:  |  Height:  |  Size: 112 KiB

After

Width:  |  Height:  |  Size: 114 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 55 KiB

After

Width:  |  Height:  |  Size: 55 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 27 KiB

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 59 KiB

After

Width:  |  Height:  |  Size: 59 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 62 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 61 KiB

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 63 KiB

After

Width:  |  Height:  |  Size: 63 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 95 KiB

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 26 KiB

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 106 KiB

After

Width:  |  Height:  |  Size: 107 KiB

Binary file not shown.

Before

Width:  |  Height:  |  Size: 80 KiB

After

Width:  |  Height:  |  Size: 80 KiB

View File

@@ -1,6 +1,6 @@
{
"name": "@comfyorg/comfyui-frontend",
"version": "1.39.8",
"version": "1.39.7",
"private": true,
"description": "Official front-end implementation of ComfyUI",
"homepage": "https://comfy.org",

View File

@@ -1 +0,0 @@
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 16 16"><path d="M6.66667 14V5.33333C6.66667 5.15652 6.59643 4.98695 6.4714 4.86193C6.34638 4.7369 6.17681 4.66667 6 4.66667H2.66667C2.48986 4.66667 2.32029 4.7369 2.19526 4.86193C2.07024 4.98695 2 5.15652 2 5.33333V13.3333C2 13.5101 2.07024 13.6797 2.19526 13.8047C2.32029 13.9298 2.48986 14 2.66667 14H10.6667C10.8435 14 11.013 13.9298 11.1381 13.8047C11.2631 13.6797 11.3333 13.5101 11.3333 13.3333V10C11.3333 9.82319 11.2631 9.65362 11.1381 9.5286C11.013 9.40357 10.8435 9.33333 10.6667 9.33333H2M10 2H13.3333C13.7015 2 14 2.29848 14 2.66667V6C14 6.36819 13.7015 6.66667 13.3333 6.66667H10C9.63181 6.66667 9.33333 6.36819 9.33333 6V2.66667C9.33333 2.29848 9.63181 2 10 2Z" stroke="currentColor" stroke-width="1.3" stroke-linecap="round" stroke-linejoin="round"/></svg>

Before

Width:  |  Height:  |  Size: 837 B

View File

@@ -2,7 +2,10 @@
import { execSync } from 'child_process'
import * as fs from 'fs'
import { globSync } from 'glob'
import type { LocaleData } from './i18n-types'
interface LocaleData {
[key: string]: any
}
// Configuration
const SOURCE_PATTERNS = ['src/**/*.{js,ts,vue}', '!src/locales/**/*']
@@ -42,7 +45,7 @@ function getStagedLocaleFiles(): string[] {
}
// Extract all keys from a nested object
function extractKeys(obj: LocaleData, prefix = ''): string[] {
function extractKeys(obj: any, prefix = ''): string[] {
const keys: string[] = []
for (const [key, value] of Object.entries(obj)) {
@@ -163,17 +166,17 @@ async function checkNewUnusedKeys() {
// Report results
if (unusedNewKeys.length > 0) {
console.warn('\n⚠ Warning: Found unused NEW i18n keys:\n')
console.log('\n⚠ Warning: Found unused NEW i18n keys:\n')
for (const key of unusedNewKeys.sort()) {
console.warn(` - ${key}`)
console.log(` - ${key}`)
}
console.warn(`\n✨ Total unused new keys: ${unusedNewKeys.length}`)
console.warn(
console.log(`\n✨ Total unused new keys: ${unusedNewKeys.length}`)
console.log(
'\nThese keys were added but are not used anywhere in the codebase.'
)
console.warn('Consider using them or removing them in a future update.')
console.log('Consider using them or removing them in a future update.')
// Changed from process.exit(1) to process.exit(0) for warning only
process.exit(0)

View File

@@ -7,7 +7,6 @@ import {
writeFileSync
} from 'fs'
import { dirname, join } from 'path'
import type { LocaleData } from './i18n-types'
// Ensure directories exist
function ensureDir(dir: string) {
@@ -42,8 +41,8 @@ function getAllJsonFiles(dir: string): string[] {
}
// Find additions in new object compared to base
function findAdditions(base: LocaleData, updated: LocaleData): LocaleData {
const additions: LocaleData = {}
function findAdditions(base: any, updated: any): Record<string, any> {
const additions: Record<string, any> = {}
for (const key in updated) {
if (!(key in base)) {
@@ -75,7 +74,7 @@ function capture(srcLocaleDir: string, tempBaseDir: string) {
ensureDir(dirname(targetPath))
writeFileSync(targetPath, readFileSync(file, 'utf8'))
}
console.warn('Captured current locale files to temp/base/')
console.log('Captured current locale files to temp/base/')
}
// Diff command
@@ -95,7 +94,7 @@ function diff(srcLocaleDir: string, tempBaseDir: string, tempDiffDir: string) {
if (Object.keys(additions).length > 0) {
ensureDir(dirname(diffPath))
writeFileSync(diffPath, JSON.stringify(additions, null, 2))
console.warn(`Wrote diff to ${diffPath}`)
console.log(`Wrote diff to ${diffPath}`)
}
}
}
@@ -117,9 +116,9 @@ switch (command) {
// Remove temp directory recursively
if (existsSync('temp')) {
rmSync('temp', { recursive: true, force: true })
console.warn('Removed temp directory')
console.log('Removed temp directory')
}
break
default:
console.error('Please specify either "capture" or "diff" command')
console.log('Please specify either "capture" or "diff" command')
}

View File

@@ -1,5 +0,0 @@
/**
* Shared types for i18n-related scripts
*/
export type LocaleData = { [key: string]: string | LocaleData }

View File

@@ -19,14 +19,12 @@
<Button
v-tooltip.bottom="customNodesManagerTooltipConfig"
variant="secondary"
:aria-label="t('menu.manageExtensions')"
size="icon"
:aria-label="t('menu.customNodesManager')"
class="relative"
@click="openCustomNodeManager"
>
<i class="icon-[comfy--extensions-blocks] size-4" />
<span class="not-md:hidden">
{{ t('menu.manageExtensions') }}
</span>
<i class="icon-[lucide--puzzle] size-4" />
<span
v-if="shouldShowRedDot"
class="absolute top-0.5 right-1 size-2 rounded-full bg-red-500"
@@ -222,7 +220,7 @@ const queueHistoryTooltipConfig = computed(() =>
buildTooltipConfig(t('sideToolbar.queueProgressOverlay.viewJobHistory'))
)
const customNodesManagerTooltipConfig = computed(() =>
buildTooltipConfig(t('menu.manageExtensions'))
buildTooltipConfig(t('menu.customNodesManager'))
)
const queueContextMenu = ref<InstanceType<typeof ContextMenu> | null>(null)
const queueContextMenuItems = computed<MenuItem[]>(() => [

View File

@@ -38,7 +38,6 @@
<script setup lang="ts">
import Skeleton from 'primevue/skeleton'
import { computed, onUnmounted, ref, watch } from 'vue'
import type { StyleValue } from 'vue'
import { useIntersectionObserver } from '@/composables/useIntersectionObserver'
import { useMediaCache } from '@/services/mediaCacheService'
@@ -56,7 +55,7 @@ const {
alt?: string
containerClass?: ClassValue
imageClass?: ClassValue
imageStyle?: StyleValue
imageStyle?: Record<string, any>
rootMargin?: string
}>()

View File

@@ -1,5 +1,8 @@
<template>
<div ref="container" class="h-full scrollbar-custom">
<div
ref="container"
class="h-full overflow-y-auto scrollbar-thin scrollbar-track-transparent scrollbar-thumb-(--dialog-surface)"
>
<div :style="topSpacerStyle" />
<div :style="mergedGridStyle">
<div

View File

@@ -25,10 +25,25 @@
:key="i"
class="flex min-h-8 items-center justify-between px-4 py-2 bg-secondary-background text-muted-foreground"
>
<span class="text-xs">
{{ node.label }}
</span>
<span v-if="node.hint" class="text-xs">{{ node.hint }}</span>
<div class="flex items-center gap-2">
<StatusBadge
v-if="node.isReplaceable"
:label="$t('nodeReplacement.replaceable')"
severity="default"
/>
<span class="text-xs">{{ node.label }}</span>
<span v-if="node.hint" class="text-xs text-muted-foreground">
{{ node.hint }}
</span>
</div>
<Button
v-if="node.isReplaceable"
variant="secondary"
size="sm"
@click="emit('replace', node.label)"
>
{{ $t('nodeReplacement.replace') }}
</Button>
</div>
</div>
@@ -49,7 +64,9 @@
<script setup lang="ts">
import { computed } from 'vue'
import StatusBadge from '@/components/common/StatusBadge.vue'
import MissingCoreNodesMessage from '@/components/dialog/content/MissingCoreNodesMessage.vue'
import Button from '@/components/ui/button/Button.vue'
import { isCloud } from '@/platform/distribution/types'
import type { MissingNodeType } from '@/types/comfy'
import { useMissingNodes } from '@/workbench/extensions/manager/composables/nodePack/useMissingNodes'
@@ -58,6 +75,10 @@ const props = defineProps<{
missingNodeTypes: MissingNodeType[]
}>()
const emit = defineEmits<{
(e: 'replace', nodeType: string): void
}>()
// Get missing core nodes for OSS mode
const { missingCoreNodes } = useMissingNodes()
@@ -75,10 +96,12 @@ const uniqueNodes = computed(() => {
return {
label: node.type,
hint: node.hint,
action: node.action
action: node.action,
isReplaceable: node.isReplaceable ?? false,
replacement: node.replacement
}
}
return { label: node }
return { label: node, isReplaceable: false }
})
})
</script>

View File

@@ -1,5 +1,5 @@
<template>
<!-- Cloud mode: Learn More + Got It buttons -->
<!-- Cloud mode: Learn More + Replace All + Got It buttons -->
<div
v-if="isCloud"
class="flex w-full items-center justify-between gap-2 py-2 px-4"
@@ -15,16 +15,34 @@
<i class="icon-[lucide--info]"></i>
<span>{{ $t('missingNodes.cloud.learnMore') }}</span>
</Button>
<Button variant="secondary" size="md" @click="handleGotItClick">{{
$t('missingNodes.cloud.gotIt')
}}</Button>
<div class="flex gap-1">
<Button
v-if="hasReplaceableNodes"
variant="primary"
size="md"
@click="emit('replaceAll')"
>
{{ $t('nodeReplacement.replaceAll') }}
</Button>
<Button variant="secondary" size="md" @click="handleGotItClick">{{
$t('missingNodes.cloud.gotIt')
}}</Button>
</div>
</div>
<!-- OSS mode: Open Manager + Install All buttons -->
<!-- OSS mode: Open Manager + Replace All + Install All buttons -->
<div v-else-if="showManagerButtons" class="flex justify-end gap-1 py-2 px-4">
<Button variant="textonly" @click="openManager">{{
$t('g.openManager')
}}</Button>
<Button
v-if="hasReplaceableNodes"
variant="primary"
size="md"
@click="emit('replaceAll')"
>
{{ $t('nodeReplacement.replaceAll') }}
</Button>
<PackInstallButton
v-if="showInstallAllButton"
type="secondary"
@@ -51,12 +69,25 @@ import Button from '@/components/ui/button/Button.vue'
import { isCloud } from '@/platform/distribution/types'
import { useToastStore } from '@/platform/updates/common/toastStore'
import { useDialogStore } from '@/stores/dialogStore'
import type { MissingNodeType } from '@/types/comfy'
import PackInstallButton from '@/workbench/extensions/manager/components/manager/button/PackInstallButton.vue'
import { useMissingNodes } from '@/workbench/extensions/manager/composables/nodePack/useMissingNodes'
import { useManagerState } from '@/workbench/extensions/manager/composables/useManagerState'
import { useComfyManagerStore } from '@/workbench/extensions/manager/stores/comfyManagerStore'
import { ManagerTab } from '@/workbench/extensions/manager/types/comfyManagerTypes'
const { missingNodeTypes = [] } = defineProps<{
missingNodeTypes?: MissingNodeType[]
}>()
const emit = defineEmits<{
(e: 'replaceAll'): void
}>()
const hasReplaceableNodes = computed(() =>
missingNodeTypes.some((n) => typeof n === 'object' && n.isReplaceable)
)
const dialogStore = useDialogStore()
const { t } = useI18n()

View File

@@ -131,7 +131,7 @@ const { isDragging, dragMessage, handleDragOver, handleDragLeave, handleDrop } =
onModelDrop: async (file) => {
await viewer.handleModelDrop(file)
},
disabled: viewer.isPreview.value || !!isStandaloneMode
disabled: viewer.isPreview.value || isStandaloneMode
})
onMounted(async () => {

View File

@@ -158,7 +158,7 @@ export const Queued: Story = {
prompt_id: 'p1'
}
}
}
} as any
return { args: { ...args, jobId } }
},
@@ -217,7 +217,7 @@ export const QueuedParallel: Story = {
prompt_id: 'p2'
}
}
}
} as any
return { args: { ...args, jobId } }
},
@@ -258,7 +258,7 @@ export const Running: Story = {
prompt_id: 'p1'
}
}
}
} as any
return { args: { ...args, jobId } }
},
@@ -303,7 +303,7 @@ export const QueuedZeroAheadSingleRunning: Story = {
prompt_id: 'p1'
}
}
}
} as any
return { args: { ...args, jobId } }
},
@@ -360,7 +360,7 @@ export const QueuedZeroAheadMultiRunning: Story = {
prompt_id: 'p2'
}
}
}
} as any
return { args: { ...args, jobId } }
},

View File

@@ -138,6 +138,7 @@ describe('flatAndCategorizeSelectedItems', () => {
expect(result.nodes).toEqual([testNode1])
expect(result.groups).toEqual([testGroup1, testGroup2])
expect(result.nodeToParentGroup.get(testNode1)).toBe(testGroup2)
expect(result.nodeToParentGroup.has(testGroup2 as any)).toBe(false)
})
it('should handle mixed selection of nodes and groups', () => {

View File

@@ -230,7 +230,7 @@ const extraMenuItems = computed(() => [
{
key: 'manage-extensions',
label: t('menu.manageExtensions'),
icon: 'icon-[comfy--extensions-blocks]',
icon: 'icon-[lucide--puzzle]',
command: showManageExtensions
}
])

View File

@@ -1,7 +1,23 @@
<template>
<div class="flex h-full flex-col">
<!-- Active Jobs Grid -->
<div
v-if="!isInFolderView && isQueuePanelV2Enabled && activeJobItems.length"
class="grid max-h-[50%] scrollbar-custom overflow-y-auto"
:style="gridStyle"
>
<ActiveMediaAssetCard
v-for="job in activeJobItems"
:key="job.id"
:job="job"
/>
</div>
<!-- Assets Header -->
<div v-if="assets.length" class="px-2 2xl:px-4">
<div
v-if="assets.length"
:class="cn('px-2 2xl:px-4', activeJobItems.length && 'mt-2')"
>
<div
class="flex items-center py-2 text-sm font-normal leading-normal text-muted-foreground font-inter"
>
@@ -43,18 +59,25 @@ import { computed } from 'vue'
import { useI18n } from 'vue-i18n'
import VirtualGrid from '@/components/common/VirtualGrid.vue'
import ActiveMediaAssetCard from '@/platform/assets/components/ActiveMediaAssetCard.vue'
import { useJobList } from '@/composables/queue/useJobList'
import MediaAssetCard from '@/platform/assets/components/MediaAssetCard.vue'
import type { AssetItem } from '@/platform/assets/schemas/assetSchema'
import { isActiveJobState } from '@/utils/queueUtil'
import { cn } from '@/utils/tailwindUtil'
import { useSettingStore } from '@/platform/settings/settingStore'
const {
assets,
isSelected,
isInFolderView = false,
assetType = 'output',
showOutputCount,
getOutputCount
} = defineProps<{
assets: AssetItem[]
isSelected: (assetId: string) => boolean
isInFolderView?: boolean
assetType?: 'input' | 'output'
showOutputCount: (asset: AssetItem) => boolean
getOutputCount: (asset: AssetItem) => number
@@ -69,9 +92,19 @@ const emit = defineEmits<{
}>()
const { t } = useI18n()
const { jobItems } = useJobList()
const settingStore = useSettingStore()
const isQueuePanelV2Enabled = computed(() =>
settingStore.get('Comfy.Queue.QPOV2')
)
type AssetGridItem = { key: string; asset: AssetItem }
const activeJobItems = computed(() =>
jobItems.value.filter((item) => isActiveJobState(item.state)).toReversed()
)
const assetItems = computed<AssetGridItem[]>(() =>
assets.map((asset) => ({
key: `asset-${asset.id}`,

View File

@@ -1,5 +1,6 @@
import { mount } from '@vue/test-utils'
import { beforeEach, describe, expect, it, vi } from 'vitest'
import { ref } from 'vue'
import AssetsSidebarListView from './AssetsSidebarListView.vue'
@@ -9,12 +10,51 @@ vi.mock('vue-i18n', () => ({
})
}))
vi.mock('@/composables/queue/useJobActions', () => ({
useJobActions: () => ({
cancelAction: { variant: 'ghost', label: 'Cancel', icon: 'pi pi-times' },
canCancelJob: ref(false),
runCancelJob: vi.fn()
})
}))
const mockJobItems = ref<
Array<{
id: string
title: string
meta: string
state: string
createTime?: number
}>
>([])
vi.mock('@/composables/queue/useJobList', () => ({
useJobList: () => ({
jobItems: mockJobItems
})
}))
vi.mock('@/stores/assetsStore', () => ({
useAssetsStore: () => ({
isAssetDeleting: () => false
})
}))
vi.mock('@/platform/settings/settingStore', () => ({
useSettingStore: () => ({
get: (key: string) => key === 'Comfy.Queue.QPOV2'
})
}))
vi.mock('@/utils/queueUtil', () => ({
isActiveJobState: (state: string) =>
state === 'pending' || state === 'running'
}))
vi.mock('@/utils/queueDisplay', () => ({
iconForJobState: () => 'pi pi-spinner'
}))
vi.mock('@/platform/assets/schemas/assetMetadataSchema', () => ({
getOutputAssetMetadata: () => undefined
}))
@@ -33,6 +73,7 @@ vi.mock('@/utils/formatUtil', () => ({
describe('AssetsSidebarListView', () => {
beforeEach(() => {
vi.clearAllMocks()
mockJobItems.value = []
})
const defaultProps = {
@@ -43,14 +84,67 @@ describe('AssetsSidebarListView', () => {
toggleStack: async () => {}
}
it('renders without errors with empty assets', () => {
it('displays active jobs in oldest-first order (FIFO)', () => {
mockJobItems.value = [
{
id: 'newest',
title: 'Newest Job',
meta: '',
state: 'pending',
createTime: 3000
},
{
id: 'middle',
title: 'Middle Job',
meta: '',
state: 'running',
createTime: 2000
},
{
id: 'oldest',
title: 'Oldest Job',
meta: '',
state: 'pending',
createTime: 1000
}
]
const wrapper = mount(AssetsSidebarListView, {
props: defaultProps,
shallow: true
})
expect(wrapper.exists()).toBe(true)
const listItems = wrapper.findAllComponents({ name: 'AssetsListItem' })
expect(listItems).toHaveLength(0)
const jobListItems = wrapper.findAllComponents({ name: 'AssetsListItem' })
expect(jobListItems).toHaveLength(3)
const displayedTitles = jobListItems.map((item) =>
item.props('primaryText')
)
expect(displayedTitles).toEqual(['Oldest Job', 'Middle Job', 'Newest Job'])
})
it('excludes completed and failed jobs from active jobs section', () => {
mockJobItems.value = [
{ id: 'pending', title: 'Pending', meta: '', state: 'pending' },
{ id: 'completed', title: 'Completed', meta: '', state: 'completed' },
{ id: 'failed', title: 'Failed', meta: '', state: 'failed' },
{ id: 'running', title: 'Running', meta: '', state: 'running' }
]
const wrapper = mount(AssetsSidebarListView, {
props: defaultProps,
shallow: true
})
const jobListItems = wrapper.findAllComponents({ name: 'AssetsListItem' })
expect(jobListItems).toHaveLength(2)
const displayedTitles = jobListItems.map((item) =>
item.props('primaryText')
)
expect(displayedTitles).toContain('Running')
expect(displayedTitles).toContain('Pending')
expect(displayedTitles).not.toContain('Completed')
expect(displayedTitles).not.toContain('Failed')
})
})

View File

@@ -1,6 +1,48 @@
<template>
<div class="flex h-full flex-col">
<div v-if="assetItems.length" class="px-2">
<div
v-if="isQueuePanelV2Enabled && activeJobItems.length"
class="flex max-h-[50%] scrollbar-custom flex-col gap-2 overflow-y-auto px-2"
>
<AssetsListItem
v-for="job in activeJobItems"
:key="job.id"
:class="
cn(
'w-full shrink-0 text-text-primary transition-colors hover:bg-secondary-background-hover',
'cursor-default'
)
"
:preview-url="job.iconImageUrl"
:preview-alt="job.title"
:icon-name="job.iconName"
:icon-class="getJobIconClass(job)"
:primary-text="job.title"
:secondary-text="job.meta"
:progress-total-percent="job.progressTotalPercent"
:progress-current-percent="job.progressCurrentPercent"
@mouseenter="onJobEnter(job.id)"
@mouseleave="onJobLeave(job.id)"
@click.stop
>
<template v-if="hoveredJobId === job.id" #actions>
<Button
v-if="canCancelJob"
:variant="cancelAction.variant"
size="icon"
:aria-label="cancelAction.label"
@click.stop="runCancelJob()"
>
<i :class="cancelAction.icon" class="size-4" />
</Button>
</template>
</AssetsListItem>
</div>
<div
v-if="assetItems.length"
:class="cn('px-2', activeJobItems.length && 'mt-2')"
>
<div
class="flex items-center p-2 text-sm font-normal leading-normal text-muted-foreground font-inter"
>
@@ -77,25 +119,31 @@
</template>
<script setup lang="ts">
import { ref } from 'vue'
import { computed, ref } from 'vue'
import { useI18n } from 'vue-i18n'
import LoadingOverlay from '@/components/common/LoadingOverlay.vue'
import VirtualGrid from '@/components/common/VirtualGrid.vue'
import Button from '@/components/ui/button/Button.vue'
import { useJobActions } from '@/composables/queue/useJobActions'
import type { JobListItem } from '@/composables/queue/useJobList'
import { useJobList } from '@/composables/queue/useJobList'
import AssetsListItem from '@/platform/assets/components/AssetsListItem.vue'
import type { OutputStackListItem } from '@/platform/assets/composables/useOutputStacks'
import { getOutputAssetMetadata } from '@/platform/assets/schemas/assetMetadataSchema'
import type { AssetItem } from '@/platform/assets/schemas/assetSchema'
import { iconForMediaType } from '@/platform/assets/utils/mediaIconUtil'
import { useAssetsStore } from '@/stores/assetsStore'
import { isActiveJobState } from '@/utils/queueUtil'
import {
formatDuration,
formatSize,
getMediaTypeFromFilename,
truncateFilename
} from '@/utils/formatUtil'
import { iconForJobState } from '@/utils/queueDisplay'
import { cn } from '@/utils/tailwindUtil'
import { useSettingStore } from '@/platform/settings/settingStore'
const {
assetItems,
@@ -122,8 +170,24 @@ const emit = defineEmits<{
}>()
const { t } = useI18n()
const { jobItems } = useJobList()
const settingStore = useSettingStore()
const isQueuePanelV2Enabled = computed(() =>
settingStore.get('Comfy.Queue.QPOV2')
)
const hoveredJobId = ref<string | null>(null)
const hoveredAssetId = ref<string | null>(null)
const activeJobItems = computed(() =>
jobItems.value.filter((item) => isActiveJobState(item.state)).toReversed()
)
const hoveredJob = computed(() =>
hoveredJobId.value
? (activeJobItems.value.find((job) => job.id === hoveredJobId.value) ??
null)
: null
)
const { cancelAction, canCancelJob, runCancelJob } = useJobActions(hoveredJob)
const listGridStyle = {
display: 'grid',
@@ -176,6 +240,16 @@ function getAssetCardClass(selected: boolean): string {
)
}
function onJobEnter(jobId: string) {
hoveredJobId.value = jobId
}
function onJobLeave(jobId: string) {
if (hoveredJobId.value === jobId) {
hoveredJobId.value = null
}
}
function onAssetEnter(assetId: string) {
hoveredAssetId.value = assetId
}
@@ -185,4 +259,13 @@ function onAssetLeave(assetId: string) {
hoveredAssetId.value = null
}
}
function getJobIconClass(job: JobListItem): string | undefined {
const classes = []
const iconName = job.iconName ?? iconForJobState(job.state)
if (!job.iconImageUrl && iconName === iconForJobState('pending')) {
classes.push('animate-spin')
}
return classes.length ? classes.join(' ') : undefined
}
</script>

View File

@@ -26,15 +26,6 @@
<template #tool-buttons>
<!-- Normal Tab View -->
<TabList v-if="!isInFolderView" v-model="activeTab">
<Tab v-if="isQueuePanelV2Enabled" class="font-inter" value="queue">
{{ $t('sideToolbar.labels.queue') }}
<span
v-if="activeJobsCount > 0"
class="ml-1 inline-flex items-center justify-center rounded-full bg-primary px-1.5 text-xs text-base-foreground font-medium h-5"
>
{{ activeJobsCount }}
</span>
</Tab>
<Tab class="font-inter" value="output">{{
$t('sideToolbar.labels.generated')
}}</Tab>
@@ -52,9 +43,8 @@
</Button>
</div>
<!-- Filter Bar (hidden on queue tab) -->
<!-- Filter Bar -->
<MediaAssetFilterBar
v-if="!isQueueTab"
v-model:search-query="searchQuery"
v-model:sort-by="sortBy"
v-model:view-mode="viewMode"
@@ -63,14 +53,13 @@
:show-generation-time-sort="activeTab === 'output'"
/>
<div
v-if="isQueueTab && !isInFolderView"
class="flex items-center justify-between px-4 2xl:px-6"
v-if="isQueuePanelV2Enabled && !isInFolderView"
class="flex items-center justify-between px-2 py-2 2xl:px-4"
>
<span class="text-sm text-muted-foreground">
{{ activeJobsLabel }}
</span>
<div class="flex items-center gap-2">
<MediaAssetViewModeToggle v-model:view-mode="viewMode" />
<span class="text-sm text-base-foreground">
{{ t('sideToolbar.queueProgressOverlay.clearQueueTooltip') }}
</span>
@@ -87,7 +76,7 @@
</Button>
</div>
</div>
<Divider v-else-if="!isQueueTab" type="dashed" class="my-2" />
<Divider v-else type="dashed" class="my-2" />
</template>
<template #body>
<div v-if="showLoadingState">
@@ -98,32 +87,23 @@
icon="pi pi-info-circle"
:title="
$t(
isQueueTab
? 'sideToolbar.noQueueItems'
: activeTab === 'input'
? 'sideToolbar.noImportedFiles'
: 'sideToolbar.noGeneratedFiles'
)
"
:message="
$t(
isQueueTab
? 'sideToolbar.noQueueItemsMessage'
: 'sideToolbar.noFilesFoundMessage'
activeTab === 'input'
? 'sideToolbar.noImportedFiles'
: 'sideToolbar.noGeneratedFiles'
)
"
:message="$t('sideToolbar.noFilesFoundMessage')"
/>
</div>
<div v-else class="relative size-full" @click="handleEmptySpaceClick">
<QueueAssetView v-if="isQueueTab" :view-mode="viewMode" />
<AssetsSidebarListView
v-else-if="isListView"
v-if="isListView"
:asset-items="listViewAssetItems"
:is-selected="isSelected"
:selectable-assets="listViewSelectableAssets"
:is-stack-expanded="isListViewStackExpanded"
:toggle-stack="toggleListViewStack"
:asset-type="assetTabType"
:asset-type="activeTab"
@select-asset="handleAssetSelect"
@context-menu="handleAssetContextMenu"
@approach-end="handleApproachEnd"
@@ -132,7 +112,8 @@
v-else
:assets="displayAssets"
:is-selected="isSelected"
:asset-type="assetTabType"
:is-in-folder-view="isInFolderView"
:asset-type="activeTab"
:show-output-count="shouldShowOutputCount"
:get-output-count="getOutputCount"
@select-asset="handleAssetSelect"
@@ -243,7 +224,6 @@ const Load3dViewerContent = () =>
import('@/components/load3d/Load3dViewerContent.vue')
import AssetsSidebarGridView from '@/components/sidebar/tabs/AssetsSidebarGridView.vue'
import AssetsSidebarListView from '@/components/sidebar/tabs/AssetsSidebarListView.vue'
import QueueAssetView from '@/components/sidebar/tabs/QueueAssetView.vue'
import SidebarTabTemplate from '@/components/sidebar/tabs/SidebarTabTemplate.vue'
import ResultGallery from '@/components/sidebar/tabs/queue/ResultGallery.vue'
import Tab from '@/components/tab/Tab.vue'
@@ -251,7 +231,6 @@ import TabList from '@/components/tab/TabList.vue'
import Button from '@/components/ui/button/Button.vue'
import MediaAssetContextMenu from '@/platform/assets/components/MediaAssetContextMenu.vue'
import MediaAssetFilterBar from '@/platform/assets/components/MediaAssetFilterBar.vue'
import MediaAssetViewModeToggle from '@/platform/assets/components/MediaAssetViewModeToggle.vue'
import { getAssetType } from '@/platform/assets/composables/media/assetMappers'
import { useMediaAssets } from '@/platform/assets/composables/media/useMediaAssets'
import { useAssetSelection } from '@/platform/assets/composables/useAssetSelection'
@@ -278,7 +257,7 @@ const { activeJobsCount } = storeToRefs(queueStore)
const executionStore = useExecutionStore()
const settingStore = useSettingStore()
const activeTab = ref<'input' | 'output' | 'queue'>('output')
const activeTab = ref<'input' | 'output'>('output')
const folderPromptId = ref<string | null>(null)
const folderExecutionTime = ref<number | undefined>(undefined)
const isInFolderView = computed(() => folderPromptId.value !== null)
@@ -289,10 +268,6 @@ const viewMode = useStorage<'list' | 'grid'>(
const isQueuePanelV2Enabled = computed(() =>
settingStore.get('Comfy.Queue.QPOV2')
)
const isQueueTab = computed(() => activeTab.value === 'queue')
const assetTabType = computed<'input' | 'output'>(() =>
activeTab.value === 'input' ? 'input' : 'output'
)
const isListView = computed(
() => isQueuePanelV2Enabled.value && viewMode.value === 'list'
)
@@ -440,15 +415,18 @@ const isBulkMode = computed(
)
const showLoadingState = computed(
() => !isQueueTab.value && loading.value && displayAssets.value.length === 0
() =>
loading.value &&
displayAssets.value.length === 0 &&
activeJobsCount.value === 0
)
const showEmptyState = computed(() => {
if (isQueueTab.value) {
return activeJobsCount.value === 0
}
return !loading.value && displayAssets.value.length === 0
})
const showEmptyState = computed(
() =>
!loading.value &&
displayAssets.value.length === 0 &&
activeJobsCount.value === 0
)
watch(visibleAssets, (newAssets) => {
// Alternative: keep hidden selections and surface them in UI; for now prune
@@ -505,21 +483,12 @@ watch(
clearSelection()
// Clear search when switching tabs
searchQuery.value = ''
// Skip asset fetch for queue tab
if (activeTab.value !== 'queue') {
void refreshAssets()
}
// Reset pagination state when tab changes
void refreshAssets()
},
{ immediate: true }
)
// Reset to output tab if QPOV2 is disabled while on queue tab
watch(isQueuePanelV2Enabled, (enabled) => {
if (!enabled && activeTab.value === 'queue') {
activeTab.value = 'output'
}
})
function handleAssetSelect(asset: AssetItem, assets?: AssetItem[]) {
const assetList = assets ?? visibleAssets.value
const index = assetList.findIndex((a) => a.id === asset.id)

View File

@@ -1,123 +0,0 @@
<template>
<div class="flex h-full flex-col">
<!-- Grid View -->
<VirtualGrid
v-if="viewMode === 'grid'"
class="flex-1"
:items="gridItems"
:grid-style="gridStyle"
>
<template #item="{ item }">
<ActiveMediaAssetCard :job="item.job" />
</template>
</VirtualGrid>
<!-- List View -->
<div
v-else
class="flex flex-1 scrollbar-custom flex-col gap-2 overflow-y-auto px-2"
>
<AssetsListItem
v-for="job in activeJobItems"
:key="job.id"
:class="
cn(
'w-full shrink-0 text-text-primary transition-colors hover:bg-secondary-background-hover',
'cursor-default'
)
"
:preview-url="job.iconImageUrl"
:preview-alt="job.title"
:icon-name="job.iconName"
:icon-class="getJobIconClass(job)"
:primary-text="job.title"
:secondary-text="job.meta"
:progress-total-percent="job.progressTotalPercent"
:progress-current-percent="job.progressCurrentPercent"
@mouseenter="onJobEnter(job.id)"
@mouseleave="onJobLeave(job.id)"
@click.stop
>
<template v-if="hoveredJobId === job.id" #actions>
<Button
v-if="canCancelJob"
:variant="cancelAction.variant"
size="icon"
:aria-label="cancelAction.label"
@click.stop="runCancelJob()"
>
<i :class="cancelAction.icon" class="size-4" />
</Button>
</template>
</AssetsListItem>
</div>
</div>
</template>
<script setup lang="ts">
import { computed, ref } from 'vue'
import VirtualGrid from '@/components/common/VirtualGrid.vue'
import Button from '@/components/ui/button/Button.vue'
import { useJobActions } from '@/composables/queue/useJobActions'
import type { JobListItem } from '@/composables/queue/useJobList'
import { useJobList } from '@/composables/queue/useJobList'
import ActiveMediaAssetCard from '@/platform/assets/components/ActiveMediaAssetCard.vue'
import AssetsListItem from '@/platform/assets/components/AssetsListItem.vue'
import { isActiveJobState } from '@/utils/queueUtil'
import { iconForJobState } from '@/utils/queueDisplay'
import { cn } from '@/utils/tailwindUtil'
const { viewMode = 'grid' } = defineProps<{
viewMode?: 'list' | 'grid'
}>()
const { jobItems } = useJobList()
const activeJobItems = computed(() =>
jobItems.value.filter((item) => isActiveJobState(item.state)).toReversed()
)
const gridItems = computed(() =>
activeJobItems.value.map((job) => ({
key: `queue-${job.id}`,
job
}))
)
const gridStyle = {
display: 'grid',
gridTemplateColumns: 'repeat(auto-fill, minmax(200px, 1fr))',
padding: '0 0.5rem',
gap: '0.5rem'
}
// List view hover & cancel logic
const hoveredJobId = ref<string | null>(null)
const hoveredJob = computed(() =>
hoveredJobId.value
? (activeJobItems.value.find((job) => job.id === hoveredJobId.value) ??
null)
: null
)
const { cancelAction, canCancelJob, runCancelJob } = useJobActions(hoveredJob)
function onJobEnter(jobId: string) {
hoveredJobId.value = jobId
}
function onJobLeave(jobId: string) {
if (hoveredJobId.value === jobId) {
hoveredJobId.value = null
}
}
function getJobIconClass(job: JobListItem): string | undefined {
const classes = []
const iconName = job.iconName ?? iconForJobState(job.state)
if (!job.iconImageUrl && iconName === iconForJobState('pending')) {
classes.push('animate-spin')
}
return classes.length ? classes.join(' ') : undefined
}
</script>

View File

@@ -52,7 +52,7 @@ export interface SafeWidgetData {
isDOMWidget?: boolean
label?: string
nodeType?: string
options?: IWidgetOptions
options?: IWidgetOptions<unknown>
spec?: InputSpec
slotMetadata?: WidgetSlotMetadata
}
@@ -145,7 +145,7 @@ interface SharedWidgetEnhancements {
/** Widget label */
label?: string
/** Widget options */
options?: IWidgetOptions
options?: Record<string, any>
}
/**
@@ -170,7 +170,7 @@ export function getSharedWidgetEnhancements(
? 'ring ring-component-node-widget-advanced'
: undefined,
label: widget.label,
options: widget.options as IWidgetOptions
options: widget.options
}
}
@@ -432,7 +432,7 @@ export function useGraphNodeManager(graph: LGraph): GraphNodeManager {
} else {
// Not during workflow loading - initialize layout immediately
// This handles individual node additions during normal operation
initializeVueNodeLayout()
requestAnimationFrame(initializeVueNodeLayout)
}
// Call original callback if provided

View File

@@ -47,7 +47,7 @@ export const useComputedWithWidgetWatch = (
const { widgetNames, triggerCanvasRedraw = false } = options
// Create a reactive trigger based on widget values
const widgetValues = ref<Record<string, unknown>>({})
const widgetValues = ref<Record<string, any>>({})
// Initialize widget observers
if (node.widgets) {
@@ -56,7 +56,7 @@ export const useComputedWithWidgetWatch = (
: node.widgets
// Initialize current values
const currentValues: Record<string, unknown> = {}
const currentValues: Record<string, any> = {}
widgetsToObserve.forEach((widget) => {
currentValues[widget.name] = widget.value
})

View File

@@ -2,7 +2,7 @@ import type { Ref } from 'vue'
import { useSharedCanvasPositionConversion } from '@/composables/element/useCanvasPositionConversion'
import { usePragmaticDroppable } from '@/composables/usePragmaticDragAndDrop'
import type { LGraphNode, Point } from '@/lib/litegraph/src/litegraph'
import type { LGraphNode } from '@/lib/litegraph/src/litegraph'
import { LiteGraph } from '@/lib/litegraph/src/litegraph'
import { useWorkflowService } from '@/platform/workflow/core/services/workflowService'
import { ComfyWorkflow } from '@/platform/workflow/management/stores/workflowStore'
@@ -33,7 +33,7 @@ export const useCanvasDrop = (canvasRef: Ref<HTMLCanvasElement | null>) => {
if (node.data instanceof ComfyNodeDefImpl) {
const nodeDef = node.data
const pos: Point = [...basePos]
const pos = [...basePos]
// Add an offset on y to make sure after adding the node, the cursor
// is on the node (top left corner)
pos[1] += LiteGraph.NODE_TITLE_HEIGHT

View File

@@ -2,7 +2,7 @@ import type { NeverNever, PickNevers } from '@/lib/litegraph/src/types/utility'
type EventListeners<T> = {
readonly [K in keyof T]:
| ((this: EventTarget, ev: CustomEvent<T[K]>) => unknown)
| ((this: EventTarget, ev: CustomEvent<T[K]>) => any)
| EventListenerObject
| null
}

View File

@@ -68,7 +68,7 @@ describe.skip('subgraphUtils', () => {
describe.skip('findUsedSubgraphIds', () => {
it('should handle graph with no subgraphs', () => {
const graph = new LGraph()
const registry = new Map<UUID, LGraph>()
const registry = new Map<UUID, any>()
const result = findUsedSubgraphIds(graph, registry)
expect(result.size).toBe(0)
@@ -87,7 +87,7 @@ describe.skip('subgraphUtils', () => {
const node2 = createTestSubgraphNode(subgraph2)
subgraph1.add(node2)
const registry = new Map<UUID, LGraph>([
const registry = new Map<UUID, any>([
[subgraph1.id, subgraph1],
[subgraph2.id, subgraph2]
])
@@ -115,7 +115,7 @@ describe.skip('subgraphUtils', () => {
const node3 = createTestSubgraphNode(subgraph1, { id: 3 })
subgraph2.add(node3)
const registry = new Map<UUID, LGraph>([
const registry = new Map<UUID, any>([
[subgraph1.id, subgraph1],
[subgraph2.id, subgraph2]
])
@@ -139,7 +139,7 @@ describe.skip('subgraphUtils', () => {
rootGraph.add(node2)
// Only register subgraph1
const registry = new Map<UUID, LGraph>([[subgraph1.id, subgraph1]])
const registry = new Map<UUID, any>([[subgraph1.id, subgraph1]])
const result = findUsedSubgraphIds(rootGraph, registry)
expect(result.size).toBe(2)

View File

@@ -37,14 +37,6 @@ export interface IWidgetOptions<TValues = unknown[]> {
getOptionLabel?: (value?: string | null) => string
callback?: IWidget['callback']
iconClass?: string
// Vue widget options
disabled?: boolean
useGrouping?: boolean
placeholder?: string
showThumbnails?: boolean
showItemNavigators?: boolean
hidden?: boolean
}
interface IWidgetSliderOptions extends IWidgetOptions<number[]> {

View File

@@ -35,10 +35,11 @@ export class ComboWidget
override get _displayValue() {
if (this.computedDisabled) return ''
const getOptionLabel = this.options.getOptionLabel
if (getOptionLabel) {
if (this.options.getOptionLabel) {
try {
return getOptionLabel(this.value ? String(this.value) : null)
return this.options.getOptionLabel(
this.value ? String(this.value) : null
)
} catch (e) {
console.error('Failed to map value:', e)
return this.value ? String(this.value) : ''
@@ -154,12 +155,9 @@ export class ComboWidget
}
const menu = new LiteGraph.ContextMenu([], menuOptions)
const getOptionLabel = this.options.getOptionLabel
for (const value of values_list) {
try {
const label = getOptionLabel
? getOptionLabel(String(value))
: String(value)
const label = this.options.getOptionLabel(String(value))
menu.addItem(label, value, menuOptions)
} catch (err) {
console.error('Failed to map value:', err)

View File

@@ -2018,20 +2018,6 @@
}
}
},
"CreateList": {
"display_name": "إنشاء قائمة",
"inputs": {
"inputs": {
"name": "المدخلات"
}
},
"outputs": {
"0": {
"name": "قائمة",
"tooltip": null
}
}
},
"CreateVideo": {
"description": "إنشاء فيديو من الصور.",
"display_name": "إنشاء فيديو",
@@ -13954,9 +13940,6 @@
"bpm": {
"name": "الإيقاع (BPM)"
},
"cfg_scale": {
"name": "cfg_scale"
},
"clip": {
"name": "clip"
},
@@ -13966,10 +13949,6 @@
"duration": {
"name": "المدة"
},
"generate_audio_codes": {
"name": "توليد رموز الصوت",
"tooltip": "تفعيل نموذج اللغة الكبير (LLM) الذي يولد رموز الصوت. قد يكون بطيئًا لكنه سيزيد من جودة الصوت الناتج. قم بإيقاف هذا الخيار إذا كنت تقدم مرجعًا صوتيًا للنموذج."
},
"keyscale": {
"name": "المقام الموسيقي"
},
@@ -13985,17 +13964,8 @@
"tags": {
"name": "الوسوم"
},
"temperature": {
"name": "درجة الحرارة"
},
"timesignature": {
"name": "توقيع الإيقاع"
},
"top_k": {
"name": "top_k"
},
"top_p": {
"name": "top_p"
}
},
"outputs": {
@@ -14930,28 +14900,6 @@
}
}
},
"VAEDecodeAudioTiled": {
"display_name": "فك ترميز الصوت بواسطة VAE (مجزأ)",
"inputs": {
"overlap": {
"name": "تداخل"
},
"samples": {
"name": "عينات"
},
"tile_size": {
"name": "حجم التجزئة"
},
"vae": {
"name": "vae"
}
},
"outputs": {
"0": {
"tooltip": null
}
}
},
"VAEDecodeHunyuan3D": {
"display_name": "فك ترميز VAE Hunyuan3D",
"inputs": {

View File

@@ -10,7 +10,6 @@
"download": "Download",
"downloadImage": "Download image",
"downloadVideo": "Download video",
"downloadAudio": "Download audio",
"editOrMaskImage": "Edit or mask image",
"editImage": "Edit image",
"decrement": "Decrement",
@@ -755,8 +754,6 @@
"noFilesFound": "No files found",
"noImportedFiles": "No imported files found",
"noGeneratedFiles": "No generated files found",
"noQueueItems": "No active jobs",
"noQueueItemsMessage": "Queue a prompt to see active jobs here",
"generatedAssetsHeader": "Generated assets",
"importedAssetsHeader": "Imported assets",
"activeJobStatus": "Active job: {status}",
@@ -2809,6 +2806,14 @@
"replacementInstruction": "Install these nodes to run this workflow, or replace them with installed alternatives. Missing nodes are highlighted in red on the canvas."
}
},
"nodeReplacement": {
"replaceable": "Replaceable",
"replace": "Replace",
"replaceAll": "Replace All",
"replacedNode": "Replaced node: {nodeType}",
"replacedAllNodes": "Replaced {count} node type(s)",
"replaceFailed": "Failed to replace nodes"
},
"rightSidePanel": {
"togglePanel": "Toggle properties panel",
"noSelection": "Select a node to see its properties and info.",

View File

@@ -2020,20 +2020,6 @@
}
}
},
"CreateList": {
"display_name": "Create List",
"inputs": {
"inputs": {
"name": "inputs"
}
},
"outputs": {
"0": {
"name": "list",
"tooltip": null
}
}
},
"CreateVideo": {
"display_name": "Create Video",
"description": "Create a video from images.",
@@ -11506,8 +11492,8 @@
}
},
"ReferenceTimbreAudio": {
"display_name": "Reference Audio",
"description": "This node sets the reference audio for ace step 1.5",
"display_name": "ReferenceTimbreAudio",
"description": "This node sets the reference audio for timbre (for ace step 1.5)",
"inputs": {
"conditioning": {
"name": "conditioning"
@@ -14071,22 +14057,6 @@
"keyscale": {
"name": "keyscale"
},
"generate_audio_codes": {
"name": "generate_audio_codes",
"tooltip": "Enable the LLM that generates audio codes. This can be slow but will increase the quality of the generated audio. Turn this off if you are giving the model an audio reference."
},
"cfg_scale": {
"name": "cfg_scale"
},
"temperature": {
"name": "temperature"
},
"top_p": {
"name": "top_p"
},
"top_k": {
"name": "top_k"
},
"control_after_generate": {
"name": "control after generate"
}
@@ -15090,28 +15060,6 @@
}
}
},
"VAEDecodeAudioTiled": {
"display_name": "VAE Decode Audio (Tiled)",
"inputs": {
"samples": {
"name": "samples"
},
"vae": {
"name": "vae"
},
"tile_size": {
"name": "tile_size"
},
"overlap": {
"name": "overlap"
}
},
"outputs": {
"0": {
"tooltip": null
}
}
},
"VAEDecodeHunyuan3D": {
"display_name": "VAEDecodeHunyuan3D",
"inputs": {

View File

@@ -2018,20 +2018,6 @@
}
}
},
"CreateList": {
"display_name": "Crear lista",
"inputs": {
"inputs": {
"name": "entradas"
}
},
"outputs": {
"0": {
"name": "lista",
"tooltip": null
}
}
},
"CreateVideo": {
"description": "Crea un video a partir de imágenes.",
"display_name": "Crear video",
@@ -6432,7 +6418,9 @@
"Load3D": {
"display_name": "Cargar 3D",
"inputs": {
"clear": {},
"clear": {
"": "limpiar"
},
"height": {
"name": "alto"
},
@@ -6443,10 +6431,10 @@
"name": "archivo_modelo"
},
"upload 3d model": {
"es": "Subir modelo 3D"
"": "subir modelo 3D"
},
"upload extra resources": {
"es": "Subir recursos adicionales"
"": "subir recursos adicionales"
},
"width": {
"name": "ancho"
@@ -13958,9 +13946,6 @@
"bpm": {
"name": "bpm"
},
"cfg_scale": {
"name": "cfg_scale"
},
"clip": {
"name": "clip"
},
@@ -13970,10 +13955,6 @@
"duration": {
"name": "duración"
},
"generate_audio_codes": {
"name": "generar_códigos_de_audio",
"tooltip": "Activa el LLM que genera códigos de audio. Esto puede ser lento, pero aumentará la calidad del audio generado. Desactívalo si proporcionas una referencia de audio al modelo."
},
"keyscale": {
"name": "escala tonal"
},
@@ -13989,17 +13970,8 @@
"tags": {
"name": "etiquetas"
},
"temperature": {
"name": "temperatura"
},
"timesignature": {
"name": "compás"
},
"top_k": {
"name": "top_k"
},
"top_p": {
"name": "top_p"
}
},
"outputs": {
@@ -14934,28 +14906,6 @@
}
}
},
"VAEDecodeAudioTiled": {
"display_name": "VAE Decodificar audio (en mosaico)",
"inputs": {
"overlap": {
"name": "superposición"
},
"samples": {
"name": "muestras"
},
"tile_size": {
"name": "tamaño_de_mosaico"
},
"vae": {
"name": "vae"
}
},
"outputs": {
"0": {
"tooltip": null
}
}
},
"VAEDecodeHunyuan3D": {
"display_name": "VAEDecodeHunyuan3D",
"inputs": {

View File

@@ -2020,20 +2020,6 @@
}
}
},
"CreateList": {
"display_name": "ایجاد لیست",
"inputs": {
"inputs": {
"name": "ورودی‌ها"
}
},
"outputs": {
"0": {
"name": "لیست",
"tooltip": null
}
}
},
"CreateVideo": {
"description": "ایجاد ویدیو از تصاویر.",
"display_name": "ایجاد ویدیو",
@@ -6441,9 +6427,7 @@
"Load3D": {
"display_name": "بارگذاری ۳بعدی و انیمیشن",
"inputs": {
"clear": {
"": "پاک‌سازی"
},
"clear": {},
"height": {
"name": "ارتفاع"
},
@@ -6453,12 +6437,8 @@
"model_file": {
"name": "فایل مدل"
},
"upload 3d model": {
"": "بارگذاری مدل سه‌بعدی"
},
"upload extra resources": {
"": "بارگذاری منابع اضافی"
},
"upload 3d model": {},
"upload extra resources": {},
"width": {
"name": "عرض"
}
@@ -13973,9 +13953,6 @@
"bpm": {
"name": "ضرب در دقیقه (BPM)"
},
"cfg_scale": {
"name": "cfg_scale"
},
"clip": {
"name": "clip"
},
@@ -13985,10 +13962,6 @@
"duration": {
"name": "مدت زمان"
},
"generate_audio_codes": {
"name": "تولید کدهای صوتی",
"tooltip": "فعال‌سازی LLM برای تولید کدهای صوتی. این کار ممکن است کند باشد اما کیفیت صدای تولیدشده را افزایش می‌دهد. اگر به مدل یک مرجع صوتی می‌دهید، این گزینه را غیرفعال کنید."
},
"keyscale": {
"name": "گام"
},
@@ -14004,17 +13977,8 @@
"tags": {
"name": "برچسب‌ها"
},
"temperature": {
"name": "temperature"
},
"timesignature": {
"name": "امضای زمانی"
},
"top_k": {
"name": "top_k"
},
"top_p": {
"name": "top_p"
}
},
"outputs": {
@@ -14949,28 +14913,6 @@
}
}
},
"VAEDecodeAudioTiled": {
"display_name": "رمزگشایی VAE صوتی (کاشی‌بندی‌شده)",
"inputs": {
"overlap": {
"name": "همپوشانی"
},
"samples": {
"name": "نمونه‌ها"
},
"tile_size": {
"name": "اندازه کاشی"
},
"vae": {
"name": "vae"
}
},
"outputs": {
"0": {
"tooltip": null
}
}
},
"VAEDecodeHunyuan3D": {
"display_name": "VAEDecodeHunyuan3D",
"inputs": {

View File

@@ -2018,20 +2018,6 @@
}
}
},
"CreateList": {
"display_name": "Créer une liste",
"inputs": {
"inputs": {
"name": "entrées"
}
},
"outputs": {
"0": {
"name": "liste",
"tooltip": null
}
}
},
"CreateVideo": {
"description": "Créer une vidéo à partir dimages.",
"display_name": "Créer une vidéo",
@@ -13960,9 +13946,6 @@
"bpm": {
"name": "bpm"
},
"cfg_scale": {
"name": "cfg_scale"
},
"clip": {
"name": "clip"
},
@@ -13972,10 +13955,6 @@
"duration": {
"name": "durée"
},
"generate_audio_codes": {
"name": "générer des codes audio",
"tooltip": "Activez le LLM qui génère des codes audio. Cela peut être lent mais augmentera la qualité de laudio généré. Désactivez cette option si vous fournissez une référence audio au modèle."
},
"keyscale": {
"name": "tonalité"
},
@@ -13991,17 +13970,8 @@
"tags": {
"name": "tags"
},
"temperature": {
"name": "température"
},
"timesignature": {
"name": "signature rythmique"
},
"top_k": {
"name": "top_k"
},
"top_p": {
"name": "top_p"
}
},
"outputs": {
@@ -14936,28 +14906,6 @@
}
}
},
"VAEDecodeAudioTiled": {
"display_name": "Décoder Audio VAE (par tuiles)",
"inputs": {
"overlap": {
"name": "chevauchement"
},
"samples": {
"name": "échantillons"
},
"tile_size": {
"name": "taille de tuile"
},
"vae": {
"name": "vae"
}
},
"outputs": {
"0": {
"tooltip": null
}
}
},
"VAEDecodeHunyuan3D": {
"display_name": "VAEDecodeHunyuan3D",
"inputs": {

View File

@@ -2018,20 +2018,6 @@
}
}
},
"CreateList": {
"display_name": "リストを作成",
"inputs": {
"inputs": {
"name": "入力"
}
},
"outputs": {
"0": {
"name": "リスト",
"tooltip": null
}
}
},
"CreateVideo": {
"description": "画像から動画を作成します。",
"display_name": "動画を作成",
@@ -6432,7 +6418,9 @@
"Load3D": {
"display_name": "3Dを読み込む",
"inputs": {
"clear": "クリア",
"clear": {
"": "クリア"
},
"height": {
"name": "高さ"
},
@@ -6442,8 +6430,12 @@
"model_file": {
"name": "モデルファイル"
},
"upload 3d model": "3Dモデルをアップロード",
"upload extra resources": "追加リソースをアップロード",
"upload 3d model": {
"": "3Dモデルをアップロード"
},
"upload extra resources": {
"": "追加リソースをアップロード"
},
"width": {
"name": "幅"
}
@@ -13954,9 +13946,6 @@
"bpm": {
"name": "BPM"
},
"cfg_scale": {
"name": "cfgスケール"
},
"clip": {
"name": "clip"
},
@@ -13966,10 +13955,6 @@
"duration": {
"name": "長さ"
},
"generate_audio_codes": {
"name": "オーディオコードを生成",
"tooltip": "オーディオコードを生成するLLMを有効にします。これにより生成されるオーディオの品質が向上しますが、処理が遅くなる場合があります。モデルにオーディオリファレンスを与える場合はオフにしてください。"
},
"keyscale": {
"name": "キー"
},
@@ -13985,17 +13970,8 @@
"tags": {
"name": "タグ"
},
"temperature": {
"name": "温度"
},
"timesignature": {
"name": "拍子"
},
"top_k": {
"name": "top_k"
},
"top_p": {
"name": "top_p"
}
},
"outputs": {
@@ -14930,28 +14906,6 @@
}
}
},
"VAEDecodeAudioTiled": {
"display_name": "VAEデコードオーディオタイル",
"inputs": {
"overlap": {
"name": "オーバーラップ"
},
"samples": {
"name": "サンプル"
},
"tile_size": {
"name": "タイルサイズ"
},
"vae": {
"name": "vae"
}
},
"outputs": {
"0": {
"tooltip": null
}
}
},
"VAEDecodeHunyuan3D": {
"display_name": "VAEDecodeHunyuan3D",
"inputs": {

View File

@@ -2018,20 +2018,6 @@
}
}
},
"CreateList": {
"display_name": "목록 만들기",
"inputs": {
"inputs": {
"name": "입력값"
}
},
"outputs": {
"0": {
"name": "목록",
"tooltip": null
}
}
},
"CreateVideo": {
"description": "이미지로부터 비디오를 생성합니다.",
"display_name": "비디오 생성",
@@ -6432,7 +6418,7 @@
"Load3D": {
"display_name": "3D 불러오기",
"inputs": {
"clear": "지우기",
"clear": {},
"height": {
"name": "높이"
},
@@ -6442,8 +6428,12 @@
"model_file": {
"name": "모델 파일"
},
"upload 3d model": "3D 모델 업로드",
"upload extra resources": "추가 리소스 업로드",
"upload 3d model": {
"ko": "3D 모델 업로드"
},
"upload extra resources": {
"ko": "추가 리소스 업로드"
},
"width": {
"name": "너비"
}
@@ -13954,9 +13944,6 @@
"bpm": {
"name": "BPM"
},
"cfg_scale": {
"name": "cfg_scale"
},
"clip": {
"name": "clip"
},
@@ -13966,10 +13953,6 @@
"duration": {
"name": "길이"
},
"generate_audio_codes": {
"name": "오디오 코드 생성",
"tooltip": "오디오 코드를 생성하는 LLM을 활성화합니다. 느릴 수 있지만 생성된 오디오의 품질이 향상됩니다. 모델에 오디오 참조를 제공하는 경우 이 옵션을 끄세요."
},
"keyscale": {
"name": "조성"
},
@@ -13985,17 +13968,8 @@
"tags": {
"name": "태그"
},
"temperature": {
"name": "temperature"
},
"timesignature": {
"name": "박자"
},
"top_k": {
"name": "top_k"
},
"top_p": {
"name": "top_p"
}
},
"outputs": {
@@ -14930,28 +14904,6 @@
}
}
},
"VAEDecodeAudioTiled": {
"display_name": "VAE 오디오 디코드 (타일)",
"inputs": {
"overlap": {
"name": "오버랩"
},
"samples": {
"name": "샘플"
},
"tile_size": {
"name": "타일 크기"
},
"vae": {
"name": "vae"
}
},
"outputs": {
"0": {
"tooltip": null
}
}
},
"VAEDecodeHunyuan3D": {
"display_name": "VAEDecodeHunyuan3D",
"inputs": {

View File

@@ -2020,20 +2020,6 @@
}
}
},
"CreateList": {
"display_name": "Criar Lista",
"inputs": {
"inputs": {
"name": "entradas"
}
},
"outputs": {
"0": {
"name": "lista",
"tooltip": null
}
}
},
"CreateVideo": {
"description": "Crie um vídeo a partir de imagens.",
"display_name": "Criar Vídeo",
@@ -6441,9 +6427,7 @@
"Load3D": {
"display_name": "Carregar 3D & Animação",
"inputs": {
"clear": {
"": "limpar"
},
"clear": {},
"height": {
"name": "altura"
},
@@ -6453,12 +6437,8 @@
"model_file": {
"name": "arquivo_do_modelo"
},
"upload 3d model": {
"": "enviar modelo 3D"
},
"upload extra resources": {
"": "enviar recursos extras"
},
"upload 3d model": {},
"upload extra resources": {},
"width": {
"name": "largura"
}
@@ -13973,9 +13953,6 @@
"bpm": {
"name": "bpm"
},
"cfg_scale": {
"name": "cfg_scale"
},
"clip": {
"name": "clip"
},
@@ -13985,10 +13962,6 @@
"duration": {
"name": "duração"
},
"generate_audio_codes": {
"name": "gerar_códigos_de_áudio",
"tooltip": "Ativa o LLM que gera códigos de áudio. Isso pode ser lento, mas aumentará a qualidade do áudio gerado. Desative se você fornecer uma referência de áudio ao modelo."
},
"keyscale": {
"name": "escala tonal"
},
@@ -14004,17 +13977,8 @@
"tags": {
"name": "tags"
},
"temperature": {
"name": "temperatura"
},
"timesignature": {
"name": "fórmula de compasso"
},
"top_k": {
"name": "top_k"
},
"top_p": {
"name": "top_p"
}
},
"outputs": {
@@ -14949,28 +14913,6 @@
}
}
},
"VAEDecodeAudioTiled": {
"display_name": "VAE Decodificar Áudio (Em Blocos)",
"inputs": {
"overlap": {
"name": "sobreposição"
},
"samples": {
"name": "amostras"
},
"tile_size": {
"name": "tamanho_do_bloco"
},
"vae": {
"name": "vae"
}
},
"outputs": {
"0": {
"tooltip": null
}
}
},
"VAEDecodeHunyuan3D": {
"display_name": "VAEDecodeHunyuan3D",
"inputs": {

View File

@@ -2018,20 +2018,6 @@
}
}
},
"CreateList": {
"display_name": "Создать список",
"inputs": {
"inputs": {
"name": "входные данные"
}
},
"outputs": {
"0": {
"name": "список",
"tooltip": null
}
}
},
"CreateVideo": {
"description": "Создайте видео из изображений.",
"display_name": "Создать видео",
@@ -6432,9 +6418,7 @@
"Load3D": {
"display_name": "Загрузить 3D",
"inputs": {
"clear": {
"": "Очистить"
},
"clear": "Очистить",
"height": {
"name": "высота"
},
@@ -6444,12 +6428,8 @@
"model_file": {
"name": "файл модели"
},
"upload 3d model": {
"": "Загрузить 3D-модель"
},
"upload extra resources": {
"": "Загрузить дополнительные ресурсы"
},
"upload 3d model": "Загрузить 3D-модель",
"upload extra resources": "Загрузить дополнительные ресурсы",
"width": {
"name": "ширина"
}
@@ -13960,9 +13940,6 @@
"bpm": {
"name": "bpm"
},
"cfg_scale": {
"name": "cfg_scale"
},
"clip": {
"name": "clip"
},
@@ -13972,10 +13949,6 @@
"duration": {
"name": "длительность"
},
"generate_audio_codes": {
"name": "генерировать аудиокоды",
"tooltip": "Включить LLM, который генерирует аудиокоды. Это может быть медленно, но повысит качество сгенерированного аудио. Отключите, если вы предоставляете модели аудиореференс."
},
"keyscale": {
"name": "тональность"
},
@@ -13991,17 +13964,8 @@
"tags": {
"name": "теги"
},
"temperature": {
"name": "температура"
},
"timesignature": {
"name": "размер"
},
"top_k": {
"name": "top_k"
},
"top_p": {
"name": "top_p"
}
},
"outputs": {
@@ -14936,28 +14900,6 @@
}
}
},
"VAEDecodeAudioTiled": {
"display_name": "VAE декодирование аудио (плитками)",
"inputs": {
"overlap": {
"name": "перекрытие"
},
"samples": {
"name": "образцы"
},
"tile_size": {
"name": "размер плитки"
},
"vae": {
"name": "vae"
}
},
"outputs": {
"0": {
"tooltip": null
}
}
},
"VAEDecodeHunyuan3D": {
"display_name": "VAEDecodeHunyuan3D",
"inputs": {

View File

@@ -2018,20 +2018,6 @@
}
}
},
"CreateList": {
"display_name": "Liste Oluştur",
"inputs": {
"inputs": {
"name": "girdiler"
}
},
"outputs": {
"0": {
"name": "liste",
"tooltip": null
}
}
},
"CreateVideo": {
"description": "Görüntülerden bir video oluşturun.",
"display_name": "Video Oluştur",
@@ -13960,9 +13946,6 @@
"bpm": {
"name": "bpm"
},
"cfg_scale": {
"name": "cfg ölçeği"
},
"clip": {
"name": "clip"
},
@@ -13972,10 +13955,6 @@
"duration": {
"name": "süre"
},
"generate_audio_codes": {
"name": "ses kodlarını üret",
"tooltip": "Ses kodlarını üreten LLM'i etkinleştir. Bu işlem yavaş olabilir ancak üretilen sesin kalitesini artırır. Eğer modele bir ses referansı veriyorsanız bunu kapatın."
},
"keyscale": {
"name": "ton anahtarı"
},
@@ -13991,17 +13970,8 @@
"tags": {
"name": "etiketler"
},
"temperature": {
"name": "sıcaklık"
},
"timesignature": {
"name": "zaman imzası"
},
"top_k": {
"name": "top_k"
},
"top_p": {
"name": "top_p"
}
},
"outputs": {
@@ -14936,28 +14906,6 @@
}
}
},
"VAEDecodeAudioTiled": {
"display_name": "VAE Sesini Çöz (Döşemeli)",
"inputs": {
"overlap": {
"name": "örtüşme"
},
"samples": {
"name": "örnekler"
},
"tile_size": {
"name": "döşeme boyutu"
},
"vae": {
"name": "vae"
}
},
"outputs": {
"0": {
"tooltip": null
}
}
},
"VAEDecodeHunyuan3D": {
"display_name": "VAEKodÇözmeHunyuan3D",
"inputs": {

View File

@@ -2018,20 +2018,6 @@
}
}
},
"CreateList": {
"display_name": "建立清單",
"inputs": {
"inputs": {
"name": "輸入"
}
},
"outputs": {
"0": {
"name": "清單",
"tooltip": null
}
}
},
"CreateVideo": {
"description": "從圖片建立影片。",
"display_name": "建立影片",
@@ -13958,9 +13944,6 @@
"bpm": {
"name": "每分鐘節拍數"
},
"cfg_scale": {
"name": "cfg_scale"
},
"clip": {
"name": "clip"
},
@@ -13970,10 +13953,6 @@
"duration": {
"name": "時長"
},
"generate_audio_codes": {
"name": "產生音訊編碼",
"tooltip": "啟用產生音訊編碼的 LLM。這可能會較慢但能提升產生音訊的品質。如果你已提供模型音訊參考請關閉此選項。"
},
"keyscale": {
"name": "調性"
},
@@ -13989,17 +13968,8 @@
"tags": {
"name": "標籤"
},
"temperature": {
"name": "temperature"
},
"timesignature": {
"name": "拍號"
},
"top_k": {
"name": "top_k"
},
"top_p": {
"name": "top_p"
}
},
"outputs": {
@@ -14934,28 +14904,6 @@
}
}
},
"VAEDecodeAudioTiled": {
"display_name": "VAE 解碼音訊(分塊)",
"inputs": {
"overlap": {
"name": "重疊"
},
"samples": {
"name": "樣本"
},
"tile_size": {
"name": "分塊大小"
},
"vae": {
"name": "vae"
}
},
"outputs": {
"0": {
"tooltip": null
}
}
},
"VAEDecodeHunyuan3D": {
"display_name": "VAE 解碼 Hunyuan3D",
"inputs": {

View File

@@ -2020,20 +2020,6 @@
}
}
},
"CreateList": {
"display_name": "创建列表",
"inputs": {
"inputs": {
"name": "输入"
}
},
"outputs": {
"0": {
"name": "列表",
"tooltip": null
}
}
},
"CreateVideo": {
"description": "从图像创建视频。",
"display_name": "创建视频",
@@ -13967,9 +13953,6 @@
"bpm": {
"name": "每分钟节拍数"
},
"cfg_scale": {
"name": "cfg_scale"
},
"clip": {
"name": "clip"
},
@@ -13979,10 +13962,6 @@
"duration": {
"name": "时长"
},
"generate_audio_codes": {
"name": "生成音频代码",
"tooltip": "启用生成音频代码的LLM。这可能较慢但会提升生成音频的质量。如果你为模型提供了音频参考请关闭此选项。"
},
"keyscale": {
"name": "调式"
},
@@ -13998,17 +13977,8 @@
"tags": {
"name": "标签"
},
"temperature": {
"name": "temperature"
},
"timesignature": {
"name": "拍号"
},
"top_k": {
"name": "top_k"
},
"top_p": {
"name": "top_p"
}
},
"outputs": {
@@ -14943,28 +14913,6 @@
}
}
},
"VAEDecodeAudioTiled": {
"display_name": "VAE解码音频分块",
"inputs": {
"overlap": {
"name": "重叠"
},
"samples": {
"name": "样本"
},
"tile_size": {
"name": "分块大小"
},
"vae": {
"name": "vae"
}
},
"outputs": {
"0": {
"tooltip": null
}
}
},
"VAEDecodeHunyuan3D": {
"display_name": "VAE解码Hunyuan3D",
"inputs": {

View File

@@ -65,8 +65,15 @@ export function useMediaAssetActions() {
try {
const filename = targetAsset.name
// Prefer preview_url (already includes subfolder) with getAssetUrl as fallback
const downloadUrl = targetAsset.preview_url || getAssetUrl(targetAsset)
let downloadUrl: string
// In cloud, use preview_url directly (from cloud storage)
// In OSS/localhost, use the /view endpoint
if (isCloud && targetAsset.preview_url) {
downloadUrl = targetAsset.preview_url
} else {
downloadUrl = getAssetUrl(targetAsset)
}
downloadFile(downloadUrl, filename)
@@ -96,8 +103,15 @@ export function useMediaAssetActions() {
try {
assets.forEach((asset) => {
const filename = asset.name
// Prefer preview_url (already includes subfolder) with getAssetUrl as fallback
const downloadUrl = asset.preview_url || getAssetUrl(asset)
let downloadUrl: string
// In cloud, use preview_url directly (from GCS or other cloud storage)
// In OSS/localhost, use the /view endpoint
if (isCloud && asset.preview_url) {
downloadUrl = asset.preview_url
} else {
downloadUrl = getAssetUrl(asset)
}
downloadFile(downloadUrl, filename)
})

View File

@@ -487,7 +487,7 @@ function createAssetService() {
url: string
name: string
tags?: string[]
user_metadata?: Record<string, unknown>
user_metadata?: Record<string, any>
preview_id?: string
}): Promise<AssetItem & { created_new: boolean }> {
const res = await api.fetchApi(ASSETS_ENDPOINT, {
@@ -525,7 +525,7 @@ function createAssetService() {
data: string
name: string
tags?: string[]
user_metadata?: Record<string, unknown>
user_metadata?: Record<string, any>
}): Promise<AssetItem & { created_new: boolean }> {
// Validate that data is a data URL
if (!params.data || !params.data.startsWith('data:')) {

View File

@@ -8,7 +8,7 @@ import { getAssetType } from './assetTypeUtil'
/**
* Get the download/view URL for an asset
* Constructs the proper URL with filename encoding, type, and subfolder parameters
* Constructs the proper URL with filename encoding and type parameter
*
* @param asset The asset to get URL for
* @param defaultType Default type if asset doesn't have tags (default: 'output')
@@ -23,12 +23,7 @@ export function getAssetUrl(
defaultType: 'input' | 'output' = 'output'
): string {
const assetType = getAssetType(asset, defaultType)
const subfolder = asset.user_metadata?.subfolder
const params = new URLSearchParams()
params.set('filename', asset.name)
params.set('type', assetType)
if (typeof subfolder === 'string' && subfolder) {
params.set('subfolder', subfolder)
}
return api.apiURL(`/view?${params}`)
return api.apiURL(
`/view?filename=${encodeURIComponent(asset.name)}&type=${assetType}`
)
}

View File

@@ -38,7 +38,7 @@ vi.mock('@/composables/useErrorHandling', () => ({
useErrorHandling: vi.fn(() => ({
wrapWithErrorHandlingAsync: vi.fn(
(fn, errorHandler) =>
async (...args: Parameters<typeof fn>) => {
async (...args: any[]) => {
try {
return await fn(...args)
} catch (error) {

View File

@@ -22,8 +22,7 @@ function mockSettingStore(enabled: boolean) {
return enabled
}
return false
}),
load: vi.fn().mockResolvedValue(undefined)
})
})
}
@@ -228,16 +227,6 @@ describe('useNodeReplacementStore', () => {
consoleErrorSpy.mockRestore()
})
it('should not fetch when feature is disabled', async () => {
vi.mocked(fetchNodeReplacements).mockResolvedValue({})
store = createStore(false)
await store.load()
expect(fetchNodeReplacements).not.toHaveBeenCalled()
expect(store.isLoaded).toBe(false)
})
it('should not re-fetch when called twice', async () => {
vi.mocked(fetchNodeReplacements).mockResolvedValue(mockReplacements)
store = createStore()
@@ -247,5 +236,15 @@ describe('useNodeReplacementStore', () => {
expect(fetchNodeReplacements).toHaveBeenCalledOnce()
})
it('should not call API when setting is disabled', async () => {
vi.mocked(fetchNodeReplacements).mockResolvedValue(mockReplacements)
store = createStore(false)
await store.load()
expect(fetchNodeReplacements).not.toHaveBeenCalled()
expect(store.isLoaded).toBe(false)
})
})
})

View File

@@ -15,7 +15,7 @@ export const useNodeReplacementStore = defineStore('nodeReplacement', () => {
)
async function load() {
if (isLoaded.value || !isEnabled.value) return
if (!isEnabled.value || isLoaded.value) return
try {
replacements.value = await fetchNodeReplacements()

View File

@@ -0,0 +1,195 @@
import { clone } from 'es-toolkit/compat'
import { t } from '@/i18n'
import { useToastStore } from '@/platform/updates/common/toastStore'
import type { ComfyWorkflowJSON } from '@/platform/workflow/validation/schemas/workflowSchema'
import { useWorkflowStore } from '@/platform/workflow/management/stores/workflowStore'
import { app } from '@/scripts/app'
import type { MissingNodeType } from '@/types/comfy'
import { useNodeReplacementStore } from './nodeReplacementStore'
/**
* Modify workflow data to replace missing node types with their replacements
* @param graphData The workflow JSON data
* @param replacements Map of old node type to new node type
* @returns Modified workflow data with node types replaced
*/
function applyNodeReplacements(
graphData: ComfyWorkflowJSON,
replacements: Map<string, string>
): ComfyWorkflowJSON {
const modifiedData = clone(graphData)
// Helper function to process nodes array
function processNodes(nodes: ComfyWorkflowJSON['nodes']) {
if (!Array.isArray(nodes)) return
for (const node of nodes) {
const replacement = replacements.get(node.type)
if (replacement) {
node.type = replacement
}
}
}
// Process top-level nodes
processNodes(modifiedData.nodes)
// Process nodes in subgraphs
if (modifiedData.definitions?.subgraphs) {
for (const subgraph of modifiedData.definitions.subgraphs) {
if (subgraph && 'nodes' in subgraph) {
processNodes(subgraph.nodes as ComfyWorkflowJSON['nodes'])
}
}
}
return modifiedData
}
export function useNodeReplacement() {
const nodeReplacementStore = useNodeReplacementStore()
const workflowStore = useWorkflowStore()
const toastStore = useToastStore()
/**
* Build a map of replacements from missing node types
*/
function buildReplacementMap(
missingNodeTypes: MissingNodeType[]
): Map<string, string> {
const replacements = new Map<string, string>()
for (const nodeType of missingNodeTypes) {
if (typeof nodeType === 'object' && nodeType.isReplaceable) {
const replacement = nodeType.replacement
if (replacement) {
replacements.set(nodeType.type, replacement.new_node_id)
}
}
}
return replacements
}
/**
* Replace a single node type with its replacement
* This reloads the entire workflow with the replacement applied
* @param nodeType The type of the missing node to replace
* @returns true if replacement was successful
*/
async function replaceNode(nodeType: string): Promise<boolean> {
const replacement = nodeReplacementStore.getReplacementFor(nodeType)
if (!replacement) {
console.warn(`No replacement found for node type: ${nodeType}`)
return false
}
const activeWorkflow = workflowStore.activeWorkflow
if (!activeWorkflow?.isLoaded) {
console.error('No active workflow or workflow not loaded')
return false
}
try {
// Use current graph state, not originalContent, to preserve prior replacements
const currentData =
app.rootGraph.serialize() as unknown as ComfyWorkflowJSON
// Create replacement map for single node
const replacements = new Map<string, string>()
replacements.set(nodeType, replacement.new_node_id)
// Apply replacements
const modifiedData = applyNodeReplacements(currentData, replacements)
// Reload the workflow with modified data
await app.loadGraphData(modifiedData, true, false, activeWorkflow, {
showMissingNodesDialog: true,
showMissingModelsDialog: true
})
toastStore.add({
severity: 'success',
summary: t('g.success'),
detail: t('nodeReplacement.replacedNode', { nodeType }),
life: 3000
})
return true
} catch (error) {
console.error('Failed to replace node:', error)
toastStore.add({
severity: 'error',
summary: t('g.error'),
detail: t('nodeReplacement.replaceFailed'),
life: 5000
})
return false
}
}
/**
* Replace all replaceable missing nodes
* This reloads the entire workflow with all replacements applied
* @param missingNodeTypes Array of missing node types (from dialog props)
* @returns Number of node types that were replaced
*/
async function replaceAllNodes(
missingNodeTypes: MissingNodeType[]
): Promise<number> {
const replacements = buildReplacementMap(missingNodeTypes)
if (replacements.size === 0) {
console.warn('No replaceable nodes found')
return 0
}
const activeWorkflow = workflowStore.activeWorkflow
if (!activeWorkflow?.isLoaded) {
console.error('No active workflow or workflow not loaded')
return 0
}
try {
// Use current graph state, not originalContent, to preserve any prior changes
const currentData =
app.rootGraph.serialize() as unknown as ComfyWorkflowJSON
// Apply all replacements
const modifiedData = applyNodeReplacements(currentData, replacements)
// Reload the workflow with modified data
await app.loadGraphData(modifiedData, true, false, activeWorkflow, {
showMissingNodesDialog: true,
showMissingModelsDialog: true
})
toastStore.add({
severity: 'success',
summary: t('g.success'),
detail: t('nodeReplacement.replacedAllNodes', {
count: replacements.size
}),
life: 3000
})
return replacements.size
} catch (error) {
console.error('Failed to replace nodes:', error)
toastStore.add({
severity: 'error',
summary: t('g.error'),
detail: t('nodeReplacement.replaceFailed'),
life: 5000
})
return 0
}
}
return {
replaceNode,
replaceAllNodes
}
}

View File

@@ -1198,7 +1198,7 @@ export const CORE_SETTINGS: SettingParams[] = [
tooltip:
'When enabled, missing nodes can be automatically replaced with their newer equivalents if a replacement mapping exists.',
type: 'boolean',
defaultValue: false,
defaultValue: true,
experimental: true,
versionAdded: '1.40.0'
}

View File

@@ -46,7 +46,7 @@ function onChange(
}
export const useSettingStore = defineStore('setting', () => {
const settingValues = ref<Partial<Settings>>({})
const settingValues = ref<Record<string, any>>({})
const settingsById = ref<Record<string, SettingParams>>({})
const {
@@ -87,7 +87,7 @@ export const useSettingStore = defineStore('setting', () => {
* @param key - The key of the setting to check.
* @returns Whether the setting exists.
*/
function exists<K extends keyof Settings>(key: K) {
function exists(key: string) {
return settingValues.value[key] !== undefined
}
@@ -118,7 +118,7 @@ export const useSettingStore = defineStore('setting', () => {
*/
function get<K extends keyof Settings>(key: K): Settings[K] {
// Clone the value when returning to prevent external mutations
return _.cloneDeep(settingValues.value[key] ?? getDefaultValue(key)!)
return _.cloneDeep(settingValues.value[key] ?? getDefaultValue(key))
}
/**

View File

@@ -222,7 +222,7 @@ interface WorkflowStore {
activeSubgraph: Subgraph | undefined
/** Updates the {@link subgraphNamePath} and {@link isSubgraphActive} values. */
updateActiveGraph: () => void
executionIdToCurrentId: (id: string) => string | undefined
executionIdToCurrentId: (id: string) => any
nodeIdToNodeLocatorId: (nodeId: NodeId, subgraph?: Subgraph) => NodeLocatorId
nodeToNodeLocatorId: (node: LGraphNode) => NodeLocatorId
nodeExecutionIdToNodeLocatorId: (
@@ -718,7 +718,7 @@ export const useWorkflowStore = defineStore('workflow', () => {
}
//FIXME: use existing util function
const executionIdToCurrentId = (id: string): string | undefined => {
const executionIdToCurrentId = (id: string) => {
const subgraph = activeSubgraph.value
// Short-circuit: ID belongs to the parent workflow / no active subgraph

View File

@@ -4,7 +4,6 @@ import { afterEach, beforeEach, describe, expect, it, vi } from 'vitest'
import type * as I18n from 'vue-i18n'
import { useWorkflowStore } from '@/platform/workflow/management/stores/workflowStore'
import type { WorkflowDraftSnapshot } from '@/platform/workflow/persistence/base/draftCache'
import { useWorkflowPersistence } from '@/platform/workflow/persistence/composables/useWorkflowPersistence'
import { useWorkflowDraftStore } from '@/platform/workflow/persistence/stores/workflowDraftStore'
import { defaultGraphJSON } from '@/scripts/defaultGraph'
@@ -192,7 +191,7 @@ describe('useWorkflowPersistence', () => {
const drafts = JSON.parse(
localStorage.getItem('Comfy.Workflow.Drafts') ?? '{}'
) as Record<string, WorkflowDraftSnapshot>
) as Record<string, any>
expect(Object.keys(drafts).length).toBe(32)
expect(drafts['workflows/Draft0.json']).toBeUndefined()

View File

@@ -184,7 +184,7 @@ describe('LGraphNode', () => {
const wrapper = mountLGraphNode({ nodeData: mockNodeData })
expect(wrapper.classes()).toContain('outline-3')
expect(wrapper.classes()).toContain('outline-2')
expect(wrapper.classes()).toContain('outline-node-component-outline')
})

View File

@@ -17,7 +17,7 @@
// hover (only when node should handle events)
shouldHandleNodePointerEvents &&
'hover:ring-7 ring-node-component-ring',
'outline-transparent outline-3 focus-visible:outline-node-component-outline',
'outline-transparent outline-2 focus-visible:outline-node-component-outline',
borderClass,
outlineClass,
cursorClass,

View File

@@ -36,7 +36,6 @@ import type {
INodeInputSlot,
INodeOutputSlot
} from '@/lib/litegraph/src/interfaces'
import type { IWidgetOptions } from '@/lib/litegraph/src/types/widgets'
import { RenderShape } from '@/lib/litegraph/src/litegraph'
import NodeHeader from '@/renderer/extensions/vueNodes/components/NodeHeader.vue'
import NodeSlots from '@/renderer/extensions/vueNodes/components/NodeSlots.vue'
@@ -70,11 +69,8 @@ const nodeData = computed<VueNodeData>(() => {
options: {
hidden: input.hidden,
advanced: input.advanced,
values:
input.type === 'COMBO' && Array.isArray(input.options)
? input.options
: undefined
} satisfies IWidgetOptions
values: input.type === 'COMBO' ? input.options : undefined // For combo widgets
}
}))
const inputs: INodeInputSlot[] = Object.entries(nodeDef.inputs || {})

View File

@@ -16,12 +16,10 @@ import type { ChartData } from 'chart.js'
import Chart from 'primevue/chart'
import { computed } from 'vue'
import type { IWidgetOptions } from '@/lib/litegraph/src/types/widgets'
import type { ChartInputSpec } from '@/schemas/nodeDef/nodeDefSchemaV2'
import type { SimplifiedWidget } from '@/types/simplifiedWidget'
type ChartWidgetOptions = NonNullable<ChartInputSpec['options']> &
IWidgetOptions
type ChartWidgetOptions = NonNullable<ChartInputSpec['options']>
const value = defineModel<ChartData>({ required: true })

View File

@@ -38,12 +38,10 @@ import {
filterWidgetProps
} from '@/utils/widgetPropFilter'
import type { IWidgetOptions } from '@/lib/litegraph/src/types/widgets'
import { WidgetInputBaseClass } from './layout'
import WidgetLayoutField from './layout/WidgetLayoutField.vue'
type WidgetOptions = IWidgetOptions & { format?: ColorFormat }
type WidgetOptions = { format?: ColorFormat } & Record<string, unknown>
const props = defineProps<{
widget: SimplifiedWidget<string, WidgetOptions>

View File

@@ -67,40 +67,30 @@ function updateValue(e: UIEvent) {
const { target } = e
if (!(target instanceof HTMLInputElement)) return
const parsed = evaluateInput(unformatValue(target.value))
if (parsed !== undefined) {
const max = filteredProps.value.max ?? Number.MAX_VALUE
const min = filteredProps.value.min ?? -Number.MAX_VALUE
modelValue.value = Math.min(max, Math.max(min, parsed))
} else target.value = formattedValue.value
if (parsed !== undefined)
modelValue.value = Math.min(
filteredProps.value.max,
Math.max(filteredProps.value.min, parsed)
)
else target.value = formattedValue.value
textEdit.value = false
}
interface NumericWidgetOptions {
min: number
max: number
step?: number
step2?: number
precision?: number
disabled?: boolean
useGrouping?: boolean
}
const canDecrement = computed(
() =>
modelValue.value > filteredProps.value.min &&
!props.widget.options?.disabled
)
const canIncrement = computed(
() =>
modelValue.value < filteredProps.value.max &&
!props.widget.options?.disabled
)
const filteredProps = computed(() => {
const filtered = filterWidgetProps(props.widget.options, INPUT_EXCLUDED_PROPS)
return filtered as Partial<NumericWidgetOptions>
})
const isDisabled = computed(() => props.widget.options?.disabled ?? false)
const canDecrement = computed(() => {
const min = filteredProps.value.min ?? -Number.MAX_VALUE
return modelValue.value > min && !isDisabled.value
})
const canIncrement = computed(() => {
const max = filteredProps.value.max ?? Number.MAX_VALUE
return modelValue.value < max && !isDisabled.value
})
const filteredProps = computed(() =>
filterWidgetProps(props.widget.options, INPUT_EXCLUDED_PROPS)
)
// Get the precision value for proper number formatting
const precision = computed(() => {
@@ -118,7 +108,7 @@ const stepValue = computed(() => {
// Use step / 10 for custom large step values (> 10) to match litegraph behavior
// This is important for extensions like Impact Pack that use custom step values (e.g., 640)
// We skip default step values (1, 10) to avoid affecting normal widgets
const step = props.widget.options?.step as number | undefined
const step = props.widget.options?.step
if (step !== undefined && step > 10) {
return Number(step) / 10
}
@@ -150,16 +140,17 @@ const buttonsDisabled = computed(() => {
})
function updateValueBy(delta: number) {
const max = filteredProps.value.max ?? Number.MAX_VALUE
const min = filteredProps.value.min ?? -Number.MAX_VALUE
modelValue.value = Math.min(max, Math.max(min, modelValue.value + delta))
modelValue.value = Math.min(
filteredProps.value.max,
Math.max(filteredProps.value.min, modelValue.value + delta)
)
}
const dragValue = ref<number>()
const dragDelta = ref(0)
function handleMouseDown(e: PointerEvent) {
if (e.button > 0) return
if (isDisabled.value) return
if (props.widget.options?.disabled) return
const { target } = e
if (!(target instanceof HTMLElement)) return
target.setPointerCapture(e.pointerId)
@@ -172,9 +163,10 @@ function handleMouseMove(e: PointerEvent) {
const unclippedValue =
dragValue.value + ((dragDelta.value / 10) | 0) * stepValue.value
dragDelta.value %= 10
const max = filteredProps.value.max ?? Number.MAX_VALUE
const min = filteredProps.value.min ?? -Number.MAX_VALUE
dragValue.value = Math.min(max, Math.max(min, unclippedValue))
dragValue.value = Math.min(
filteredProps.value.max,
Math.max(filteredProps.value.min, unclippedValue)
)
}
function handleMouseUp() {
const newValue = dragValue.value
@@ -256,7 +248,7 @@ const sliderWidth = computed(() => {
:value="formattedValue"
role="spinbutton"
tabindex="0"
:disabled="isDisabled"
:disabled="widget.options?.disabled"
autocomplete="off"
autocorrect="off"
spellcheck="false"

View File

@@ -5,7 +5,6 @@ import type { InputTextProps } from 'primevue/inputtext'
import Textarea from 'primevue/textarea'
import { describe, expect, it } from 'vitest'
import type { IWidgetOptions } from '@/lib/litegraph/src/types/widgets'
import type { SimplifiedWidget } from '@/types/simplifiedWidget'
import WidgetInputText from './WidgetInputText.vue'
@@ -19,7 +18,7 @@ describe('WidgetInputText Value Binding', () => {
name: 'test_input',
type: 'string',
value,
options: options as IWidgetOptions,
options,
callback
})

View File

@@ -53,7 +53,7 @@ const props = defineProps<Props>()
const modelValue = defineModel<string | undefined>({
default(props: Props) {
return props.widget.options?.values?.[0] ?? ''
return props.widget.options?.values?.[0] || ''
}
})

View File

@@ -31,7 +31,7 @@ describe('WidgetSelectDropdown custom label mapping', () => {
value: string = 'img_001.png',
options: {
values?: string[]
getOptionLabel?: (value?: string | null) => string
getOptionLabel?: (value: string | null) => string
} = {},
spec?: ComboInputSpec
): SimplifiedWidget<string | undefined> => ({
@@ -82,7 +82,7 @@ describe('WidgetSelectDropdown custom label mapping', () => {
describe('when custom labels are provided via getOptionLabel', () => {
it('displays custom labels while preserving original values', () => {
const getOptionLabel = vi.fn((value?: string | null) => {
const getOptionLabel = vi.fn((value: string | null) => {
if (!value) return 'No file'
const mapping: Record<string, string> = {
'img_001.png': 'Vacation Photo',
@@ -112,7 +112,7 @@ describe('WidgetSelectDropdown custom label mapping', () => {
})
it('emits original values when items with custom labels are selected', async () => {
const getOptionLabel = vi.fn((value?: string | null) => {
const getOptionLabel = vi.fn((value: string | null) => {
if (!value) return 'No file'
return `Custom: ${value}`
})
@@ -134,7 +134,7 @@ describe('WidgetSelectDropdown custom label mapping', () => {
})
it('falls back to original value when label mapping fails', () => {
const getOptionLabel = vi.fn((value?: string | null) => {
const getOptionLabel = vi.fn((value: string | null) => {
if (value === 'photo_abc.jpg') {
throw new Error('Mapping failed')
}
@@ -163,7 +163,7 @@ describe('WidgetSelectDropdown custom label mapping', () => {
})
it('falls back to original value when label mapping returns empty string', () => {
const getOptionLabel = vi.fn((value?: string | null) => {
const getOptionLabel = vi.fn((value: string | null) => {
if (value === 'photo_abc.jpg') {
return ''
}
@@ -185,7 +185,7 @@ describe('WidgetSelectDropdown custom label mapping', () => {
})
it('falls back to original value when label mapping returns undefined', () => {
const getOptionLabel = vi.fn((value?: string | null) => {
const getOptionLabel = vi.fn((value: string | null) => {
if (value === 'hash789.png') {
return undefined as unknown as string
}
@@ -209,7 +209,7 @@ describe('WidgetSelectDropdown custom label mapping', () => {
describe('output items with custom label mapping', () => {
it('applies custom label mapping to output items from queue history', () => {
const getOptionLabel = vi.fn((value?: string | null) => {
const getOptionLabel = vi.fn((value: string | null) => {
if (!value) return 'No file'
return `Output: ${value}`
})

View File

@@ -57,7 +57,7 @@ provide(
const modelValue = defineModel<string | undefined>({
default(props: Props) {
return props.widget.options?.values?.[0] ?? ''
return props.widget.options?.values?.[0] || ''
}
})
@@ -73,8 +73,7 @@ const combinedProps = computed(() => ({
}))
const getAssetData = () => {
const nodeType: string | undefined =
props.widget.options?.nodeType ?? props.nodeType
const nodeType = props.widget.options?.nodeType ?? props.nodeType
if (props.isAssetMode && nodeType) {
return useAssetWidgetData(toRef(nodeType))
}
@@ -135,11 +134,11 @@ const inputItems = computed<FormDropdownItem[]>(() => {
return []
}
return values.map((value, index) => ({
return values.map((value: string, index: number) => ({
id: `input-${index}`,
preview_url: getMediaUrl(String(value), 'input'),
name: String(value),
label: getDisplayLabel(String(value))
preview_url: getMediaUrl(value, 'input'),
name: value,
label: getDisplayLabel(value)
}))
})
const outputItems = computed<FormDropdownItem[]>(() => {

View File

@@ -15,8 +15,8 @@
v-model="modelValue"
:class="cn(WidgetInputBaseClass, 'size-full text-xs resize-none')"
:placeholder
:readonly="isReadOnly"
:disabled="isReadOnly"
:readonly="widget.options?.read_only"
:disabled="widget.options?.read_only"
fluid
data-capture-wheel="true"
@pointerdown.capture.stop
@@ -58,6 +58,4 @@ const filteredProps = computed(() =>
const displayName = computed(() => widget.label || widget.name)
const id = useId()
const isReadOnly = computed(() => widget.options?.read_only ?? false)
</script>

View File

@@ -1,86 +0,0 @@
import { mount } from '@vue/test-utils'
import { describe, expect, it, vi } from 'vitest'
import { createI18n } from 'vue-i18n'
import Button from '@/components/ui/button/Button.vue'
import AudioPreviewPlayer from '@/renderer/extensions/vueNodes/widgets/components/audio/AudioPreviewPlayer.vue'
const mockToastAdd = vi.fn()
vi.mock('primevue/usetoast', () => ({
useToast: () => ({ add: mockToastAdd })
}))
vi.mock('@/base/common/downloadUtil', () => ({
downloadFile: vi.fn()
}))
const i18n = createI18n({
legacy: false,
locale: 'en',
messages: { en: {} }
})
function mountPlayer(modelValue?: string) {
return mount(AudioPreviewPlayer, {
props: {
modelValue,
hideWhenEmpty: false
},
global: {
plugins: [i18n],
components: { Button },
stubs: {
TieredMenu: true,
Slider: true
}
}
})
}
function findDownloadButton(wrapper: ReturnType<typeof mountPlayer>) {
return wrapper.find('[aria-label="g.downloadAudio"]')
}
describe('AudioPreviewPlayer', () => {
describe('download button', () => {
it('shows download button when audio is loaded', () => {
const wrapper = mountPlayer('http://example.com/audio.mp3')
expect(findDownloadButton(wrapper).exists()).toBe(true)
})
it('hides download button when no audio is loaded', () => {
const wrapper = mountPlayer()
expect(findDownloadButton(wrapper).exists()).toBe(false)
})
it('calls downloadFile when download button is clicked', async () => {
const { downloadFile } = await import('@/base/common/downloadUtil')
const wrapper = mountPlayer('http://example.com/audio.mp3')
await findDownloadButton(wrapper).trigger('click')
expect(downloadFile).toHaveBeenCalledWith('http://example.com/audio.mp3')
})
it('shows toast on download failure', async () => {
const { downloadFile } = await import('@/base/common/downloadUtil')
vi.mocked(downloadFile).mockImplementation(() => {
throw new Error('download failed')
})
const wrapper = mountPlayer('http://example.com/audio.mp3')
await findDownloadButton(wrapper).trigger('click')
expect(mockToastAdd).toHaveBeenCalledWith(
expect.objectContaining({
severity: 'error'
})
)
vi.mocked(downloadFile).mockReset()
})
})
})

View File

@@ -16,11 +16,11 @@
<!-- Left Actions -->
<div class="relative flex shrink-0 items-center justify-start gap-2">
<!-- Play/Pause Button -->
<Button
variant="textonly"
size="unset"
<div
role="button"
:tabindex="0"
:aria-label="$t('g.playPause')"
class="size-6 rounded"
class="flex size-6 cursor-pointer items-center justify-center rounded hover:bg-interface-menu-component-surface-hovered"
@click="togglePlayPause"
>
<i
@@ -28,7 +28,7 @@
class="text-secondary icon-[lucide--play] size-4"
/>
<i v-else class="text-secondary icon-[lucide--pause] size-4" />
</Button>
</div>
<!-- Time Display -->
<div class="text-sm font-normal text-nowrap text-base-foreground">
@@ -57,11 +57,11 @@
<!-- Right Actions -->
<div class="relative flex shrink-0 items-center justify-start gap-2">
<!-- Volume Button -->
<Button
variant="textonly"
size="unset"
<div
role="button"
:tabindex="0"
:aria-label="$t('g.volume')"
class="size-6 rounded"
class="flex size-6 cursor-pointer items-center justify-center rounded hover:bg-interface-menu-component-surface-hovered"
@click="toggleMute"
>
<i
@@ -73,32 +73,19 @@
class="text-secondary icon-[lucide--volume-1] size-4"
/>
<i v-else class="text-secondary icon-[lucide--volume-x] size-4" />
</Button>
<!-- Download Button -->
<Button
v-if="modelValue"
size="icon-sm"
variant="textonly"
:aria-label="$t('g.downloadAudio')"
:title="$t('g.downloadAudio')"
class="size-6 hover:bg-interface-menu-component-surface-hovered"
@click="handleDownload"
>
<i class="text-secondary icon-[lucide--download] size-4" />
</Button>
</div>
<!-- Options Button -->
<Button
<div
v-if="showOptionsButton"
variant="textonly"
size="unset"
role="button"
:tabindex="0"
:aria-label="$t('g.moreOptions')"
class="size-6 rounded"
class="flex size-6 cursor-pointer items-center justify-center rounded hover:bg-interface-menu-component-surface-hovered"
@click="toggleOptionsMenu"
>
<i class="text-secondary icon-[lucide--more-vertical] size-4" />
</Button>
</div>
</div>
<!-- Options Menu -->
@@ -150,16 +137,11 @@ import { computed, ref, useTemplateRef } from 'vue'
import { useI18n } from 'vue-i18n'
import { whenever } from '@vueuse/core'
import { useToast } from 'primevue/usetoast'
import { downloadFile } from '@/base/common/downloadUtil'
import Button from '@/components/ui/button/Button.vue'
import { cn } from '@/utils/tailwindUtil'
import { formatTime } from '../../utils/audioUtils'
const { t } = useI18n()
const toast = useToast()
const props = withDefaults(
defineProps<{
@@ -205,20 +187,6 @@ const togglePlayPause = () => {
isPlaying.value = !isPlaying.value
}
const handleDownload = () => {
if (!modelValue.value) return
try {
downloadFile(modelValue.value)
} catch {
toast.add({
severity: 'error',
summary: t('g.error'),
detail: t('g.failedToDownloadFile'),
life: 3000
})
}
}
const toggleMute = () => {
if (audioRef.value) {
isMuted.value = !isMuted.value

View File

@@ -42,11 +42,11 @@ export function useTextPreviewWidget(
widgetValue.value = typeof value === 'string' ? value : String(value)
},
getMinHeight: () => options.minHeight ?? 42 + PADDING,
serialize: false,
read_only: true
},
type: inputSpec.type
})
widget.serialize = false
addWidget(node, widget)
return widget
}

View File

@@ -32,7 +32,7 @@ async function getAuthHeaders() {
return {}
}
const dataCache = new Map<string, CacheEntry<unknown>>()
const dataCache = new Map<string, CacheEntry<any>>()
const createCacheKey = (config: RemoteWidgetConfig): string => {
const { route, query_params = {}, refresh = 0 } = config
@@ -49,9 +49,7 @@ const getBackoff = (retryCount: number) =>
Math.min(1000 * Math.pow(2, retryCount), 512)
const isInitialized = (entry: CacheEntry<unknown> | undefined) =>
entry?.data !== undefined &&
entry?.timestamp !== undefined &&
entry.timestamp > 0
entry?.data && entry?.timestamp && entry.timestamp > 0
const isStale = (entry: CacheEntry<unknown> | undefined, ttl: number) =>
entry?.timestamp && Date.now() - entry.timestamp >= ttl
@@ -130,11 +128,9 @@ export function useRemoteWidget<
return !isLoaded && isInitialized(dataCache.get(cacheKey))
}
const onFirstLoad = (data: T | T[]) => {
const onFirstLoad = (data: T[]) => {
isLoaded = true
const nextValue =
Array.isArray(data) && data.length > 0 ? data[0] : undefined
widget.value = nextValue ?? (Array.isArray(data) ? defaultValue : data)
widget.value = data[0]
widget.callback?.(widget.value)
node.graph?.setDirtyCanvas(true)
}
@@ -142,16 +138,13 @@ export function useRemoteWidget<
const fetchValue = async () => {
const entry = dataCache.get(cacheKey)
if (isFailed(entry)) return entry!.data as T
if (isFailed(entry)) return entry!.data
const isValid =
isInitialized(entry) && (isPermanent || !isStale(entry, refresh))
if (isValid || isBackingOff(entry) || isFetching(entry))
return entry!.data as T
if (isValid || isBackingOff(entry) || isFetching(entry)) return entry!.data
const currentEntry: CacheEntry<T> = (entry as
| CacheEntry<T>
| undefined) || { data: defaultValue }
const currentEntry: CacheEntry<T> = entry || { data: defaultValue }
dataCache.set(cacheKey, currentEntry)
try {

View File

@@ -1137,25 +1137,25 @@ export class ComfyApp {
return
}
for (let n of nodes) {
// Patch T2IAdapterLoader to ControlNetLoader since they are the same node now
if (n.type == 'T2IAdapterLoader') n.type = 'ControlNetLoader'
if (n.type == 'ConditioningAverage ') n.type = 'ConditioningAverage' //typo fix
if (n.type == 'SDV_img2vid_Conditioning')
n.type = 'SVD_img2vid_Conditioning' //typo fix
if (n.type == 'Load3DAnimation') n.type = 'Load3D' // Animation node merged into Load3D
if (n.type == 'Preview3DAnimation') n.type = 'Preview3D' // Animation node merged into Load3D
// Find missing node types
if (!(n.type in LiteGraph.registered_node_types)) {
// Include context about subgraph location if applicable
if (path) {
missingNodeTypes.push({
type: n.type,
hint: `in subgraph '${path}'`
})
} else {
missingNodeTypes.push(n.type)
}
const nodeReplacementStore = useNodeReplacementStore()
const replacement = nodeReplacementStore.getReplacementFor(n.type)
// TODO: Remove debug log
console.log('[MissingNode]', n.type, {
isReplaceable: replacement !== null,
replacement,
allReplacements: nodeReplacementStore.replacements
})
missingNodeTypes.push({
type: n.type,
...(path && { hint: `in subgraph '${path}'` }),
isReplaceable: replacement !== null,
replacement: replacement ?? undefined
})
n.type = sanitizeNodeName(n.type)
}

View File

@@ -188,7 +188,7 @@ export const useColorPaletteService = () => {
* @param schema - The Zod schema object to analyze.
* @returns Array of optional key names.
*/
const getOptionalKeys = (schema: z.ZodObject<z.ZodRawShape>) => {
const getOptionalKeys = (schema: z.ZodObject<any, any>) => {
const optionalKeys: string[] = []
const shape = schema.shape

View File

@@ -7,6 +7,7 @@ import PromptDialogContent from '@/components/dialog/content/PromptDialogContent
import { t } from '@/i18n'
import { useTelemetry } from '@/platform/telemetry'
import { isCloud } from '@/platform/distribution/types'
import { useNodeReplacement } from '@/platform/nodeReplacement/useNodeReplacement'
import { useSubscription } from '@/platform/cloud/subscription/composables/useSubscription'
import { useDialogStore } from '@/stores/dialogStore'
import type {
@@ -14,6 +15,7 @@ import type {
ShowDialogOptions
} from '@/stores/dialogStore'
import type { MissingNodeType } from '@/types/comfy'
import type { ConflictDetectionResult } from '@/workbench/extensions/manager/types/conflictDetectionTypes'
import type { ComponentAttrs } from 'vue-component-type-helpers'
@@ -94,6 +96,17 @@ export const useDialogService = () => {
lazyMissingNodesFooter()
])
const { replaceNode, replaceAllNodes } = useNodeReplacement()
const handleReplace = async (nodeType: string) => {
await replaceNode(nodeType)
}
const handleReplaceAll = async () => {
await replaceAllNodes(props.missingNodeTypes as MissingNodeType[])
dialogStore.closeDialog({ key: 'global-missing-nodes' })
}
dialogStore.showDialog({
key: 'global-missing-nodes',
headerComponent: MissingNodesHeader,
@@ -113,7 +126,14 @@ export const useDialogService = () => {
}
}
},
props
props: {
...props,
onReplace: handleReplace
},
footerProps: {
missingNodeTypes: props.missingNodeTypes,
onReplaceAll: handleReplaceAll
}
})
}

View File

@@ -162,7 +162,7 @@ export const useLitegraphService = () => {
const state =
useExecutionStore().nodeLocationProgressStates[nodeLocatorId]?.state
if (state === 'running') {
return { color: '#0f0', lineWidth: 3 }
return { color: '#0f0' }
}
}
node.strokeStyles['dragOver'] = function (this: LGraphNode) {
@@ -172,7 +172,7 @@ export const useLitegraphService = () => {
}
node.strokeStyles['executionError'] = function (this: LGraphNode) {
if (app.lastExecutionError?.node_id == this.id) {
return { color: '#f0f', lineWidth: 3 }
return { color: '#f0f', lineWidth: 2 }
}
}
}
@@ -849,7 +849,7 @@ export const useLitegraphService = () => {
function addNodeOnGraph(
nodeDef: ComfyNodeDefV1 | ComfyNodeDefV2,
options: Record<string, unknown> & { pos?: Point } = {}
options: Record<string, any> = {}
): LGraphNode {
options.pos ??= getCanvasCenter()

View File

@@ -32,6 +32,7 @@ type UseLoad3dViewerFn = (node?: LGraphNode) => {
handleModelDrop: (file: File) => Promise<void>
handleSeek: (progress: number) => void
needApplyChanges: { value: boolean }
[key: string]: unknown
}
// Type for SkeletonUtils module
@@ -80,7 +81,7 @@ interface Load3DNode extends LGraphNode {
syncLoad3dConfig?: () => void
}
const viewerInstances = new Map<NodeId, ReturnType<UseLoad3dViewerFn>>()
const viewerInstances = new Map<NodeId, any>()
export class Load3dService {
private static instance: Load3dService
@@ -164,15 +165,12 @@ export class Load3dService {
* Only works after useLoad3dViewer has been loaded.
* Returns null if module not yet loaded - use async version instead.
*/
getOrCreateViewerSync<T extends UseLoad3dViewerFn>(
node: LGraphNode,
useLoad3dViewer: T
): ReturnType<T> {
getOrCreateViewerSync(node: LGraphNode, useLoad3dViewer: UseLoad3dViewerFn) {
if (!viewerInstances.has(node.id)) {
viewerInstances.set(node.id, useLoad3dViewer(node))
}
return viewerInstances.get(node.id) as ReturnType<T>
return viewerInstances.get(node.id)
}
removeViewer(node: LGraphNode) {
@@ -290,7 +288,6 @@ export class Load3dService {
async handleViewerClose(node: LGraphNode) {
const viewer = await useLoad3dService().getOrCreateViewer(node)
if (!viewer) return
if (viewer.needApplyChanges.value) {
await viewer.applyChanges()

View File

@@ -1,7 +1,6 @@
import { defineStore } from 'pinia'
import { computed, ref, watch } from 'vue'
import _ from 'es-toolkit/compat'
import type { TgpuRoot } from 'typegpu'
import {
BrushShape,
@@ -72,7 +71,7 @@ export const useMaskEditorStore = defineStore('maskEditor', () => {
const canvasHistory = useCanvasHistory(20)
const tgpuRoot = ref<TgpuRoot | null>(null)
const tgpuRoot = ref<any>(null)
const colorInput = ref<HTMLInputElement | null>(null)

View File

@@ -86,7 +86,7 @@ export class ComfyNodeDefImpl
// V2 fields
readonly inputs: Record<string, InputSpecV2>
readonly outputs: OutputSpecV2[]
readonly hidden?: Record<string, boolean>
readonly hidden?: Record<string, any>
// ComfyNodeDefImpl fields
readonly nodeSource: NodeSource

View File

@@ -72,7 +72,7 @@ export interface NodesIndexSuggestion {
exact_nb_hits: number
facets: {
exact_matches: Record<string, number>
analytics: Record<string, unknown>
analytics: Record<string, any>
}
}
objectID: RegistryNodePack['id']

View File

@@ -3,6 +3,7 @@ import type {
Positionable
} from '@/lib/litegraph/src/interfaces'
import type { LGraphCanvas, LGraphNode } from '@/lib/litegraph/src/litegraph'
import type { NodeReplacement } from '@/platform/nodeReplacement/types'
import type { SettingParams } from '@/platform/settings/types'
import type { ComfyWorkflowJSON } from '@/platform/workflow/validation/schemas/workflowSchema'
import type { Keybinding } from '@/platform/keybindings/types'
@@ -93,6 +94,8 @@ export type MissingNodeType =
text: string
callback: () => void
}
isReplaceable?: boolean
replacement?: NodeReplacement
}
export interface ComfyExtension {

View File

@@ -3,7 +3,6 @@
* Removes all DOM manipulation and positioning concerns
*/
import type { InputSpec as InputSpecV2 } from '@/schemas/nodeDef/nodeDefSchemaV2'
import type { IWidgetOptions } from '@/lib/litegraph/src/types/widgets'
/** Valid types for widget values */
export type WidgetValue =
@@ -40,7 +39,7 @@ export type SafeControlWidget = {
export interface SimplifiedWidget<
T extends WidgetValue = WidgetValue,
O extends IWidgetOptions = IWidgetOptions
O = Record<string, any>
> {
/** Display name of the widget */
name: string
@@ -69,7 +68,7 @@ export interface SimplifiedWidget<
nodeType?: string
/** Optional serialization method for custom value handling */
serializeValue?: () => unknown
serializeValue?: () => any
/** Optional input specification backing this widget */
spec?: InputSpecV2
@@ -79,7 +78,7 @@ export interface SimplifiedWidget<
export interface SimplifiedControlWidget<
T extends WidgetValue = WidgetValue,
O extends IWidgetOptions = IWidgetOptions
O = Record<string, any>
> extends SimplifiedWidget<T, O> {
controlWidget: SafeControlWidget
}

View File

@@ -1,11 +1,7 @@
import type { ElectronAPI } from '@comfyorg/comfyui-electron-types'
/**
* Extend Window interface to include electronAPI
* Used by desktop-ui app storybook stories
* @public
*/
export type ElectronWindow = typeof window & {
// Extend Window interface to include electronAPI
type ElectronWindow = typeof window & {
electronAPI?: ElectronAPI
}

View File

@@ -89,30 +89,6 @@ describe('migrateWidgetsValues', () => {
const result = migrateWidgetsValues(inputDefs, widgets, widgetValues)
expect(result).toEqual(['first value', 'last value'])
})
it('should correctly handle seed with unexpected value', () => {
const inputDefs: Record<string, InputSpec> = {
normalInput: {
type: 'INT',
name: 'normalInput',
control_after_generate: true
},
forceInputField: {
type: 'STRING',
name: 'forceInputField',
forceInput: true
}
}
const widgets = [
{ name: 'normalInput', type: 'number' },
{ name: 'control_after_generate', type: 'string' }
] as Partial<IWidget>[] as IWidget[]
const widgetValues = [42, 'fixed', 'unexpected widget value']
const result = migrateWidgetsValues(inputDefs, widgets, widgetValues)
expect(result).toEqual([42, 'fixed'])
})
})
describe('compressWidgetInputSlots', () => {

View File

@@ -112,17 +112,23 @@ export function migrateWidgetsValues<TWidgetValue>(
const originalWidgetsInputs = Object.values(inputDefs).filter(
(input) => widgetNames.has(input.name) || input.forceInput
)
const widgetIndexHasForceInput = originalWidgetsInputs.flatMap((input) =>
input.control_after_generate
? [!!input.forceInput, false]
: [!!input.forceInput]
// Count the number of original widgets inputs.
const numOriginalWidgets = _.sum(
originalWidgetsInputs.map((input) =>
// If the input has control, it will have 2 widgets.
input.control_after_generate ||
['seed', 'noise_seed'].includes(input.name)
? 2
: 1
)
)
if (widgetIndexHasForceInput.length !== widgetsValues?.length)
return widgetsValues
return widgetsValues.filter((_, index) => !widgetIndexHasForceInput[index])
if (numOriginalWidgets === widgetsValues?.length) {
return _.zip(originalWidgetsInputs, widgetsValues)
.filter(([input]) => !input?.forceInput)
.map(([_, value]) => value as TWidgetValue)
}
return widgetsValues
}
/**

View File

@@ -4,7 +4,7 @@ import { formatDuration } from '@/utils/formatUtil'
import { clampPercentInt, formatPercent0 } from '@/utils/numberUtil'
export type BuildJobDisplayCtx = {
t: (k: string, v?: Record<string, unknown>) => string
t: (k: string, v?: Record<string, any>) => string
locale: string
formatClockTimeFn: (ts: number, locale: string) => string
isActive: boolean

View File

@@ -55,13 +55,13 @@ export const BADGE_EXCLUDED_PROPS = [
* @param excludeList - List of property names to exclude
* @returns Filtered props object
*/
export function filterWidgetProps<T extends object>(
export function filterWidgetProps<T extends Record<string, any>>(
props: T | undefined,
excludeList: readonly string[]
): Partial<T> {
if (!props) return {}
const filtered: Record<string, unknown> = {}
const filtered: Record<string, any> = {}
for (const [key, value] of Object.entries(props)) {
if (!excludeList.includes(key)) {
filtered[key] = value

View File

@@ -6,7 +6,7 @@
class="manager-dialog"
>
<template #leftPanelHeaderTitle>
<i class="icon-[comfy--extensions-blocks]" />
<i class="icon-[lucide--puzzle]" />
<h2 class="text-neutral text-base">{{ $t('manager.title') }}</h2>
</template>
<template #leftPanel>

View File

@@ -5,7 +5,6 @@ import PrimeVue from 'primevue/config'
import { describe, expect, it } from 'vitest'
import { nextTick } from 'vue'
import { createI18n } from 'vue-i18n'
import type { ComponentProps } from 'vue-component-type-helpers'
import enMessages from '@/locales/en/main.json' with { type: 'json' }
@@ -13,11 +12,9 @@ import GridSkeleton from './GridSkeleton.vue'
import PackCardSkeleton from './PackCardSkeleton.vue'
describe('GridSkeleton', () => {
function mountComponent({
const mountComponent = ({
props = {}
}: {
props?: Partial<ComponentProps<typeof GridSkeleton>>
} = {}): VueWrapper {
}: Record<string, any> = {}): VueWrapper => {
const i18n = createI18n({
legacy: false,
locale: 'en',

Some files were not shown because too many files have changed in this diff Show More