diff --git a/.github/workflows/update-manager-types.yaml b/.github/workflows/update-manager-types.yaml index 8f3bf6cdb..244127dc2 100644 --- a/.github/workflows/update-manager-types.yaml +++ b/.github/workflows/update-manager-types.yaml @@ -121,4 +121,4 @@ jobs: labels: Manager delete-branch: true add-paths: | - src/types/generatedManagerTypes.ts + src/types/generatedManagerTypes.ts \ No newline at end of file diff --git a/src/App.vue b/src/App.vue index 85b36240c..1a4068a27 100644 --- a/src/App.vue +++ b/src/App.vue @@ -15,12 +15,14 @@ import ProgressSpinner from 'primevue/progressspinner' import { computed, onMounted } from 'vue' import GlobalDialog from '@/components/dialog/GlobalDialog.vue' +import { useConflictDetection } from '@/composables/useConflictDetection' import config from '@/config' import { useWorkspaceStore } from '@/stores/workspaceStore' import { electronAPI, isElectron } from './utils/envUtil' const workspaceStore = useWorkspaceStore() +const conflictDetection = useConflictDetection() const isLoading = computed(() => workspaceStore.spinner) const handleKey = (e: KeyboardEvent) => { workspaceStore.shiftDown = e.shiftKey @@ -47,5 +49,9 @@ onMounted(() => { if (isElectron()) { document.addEventListener('contextmenu', showContextMenu) } + + // Initialize conflict detection in background + // This runs async and doesn't block UI setup + void conflictDetection.initializeConflictDetection() }) diff --git a/src/components/dialog/GlobalDialog.vue b/src/components/dialog/GlobalDialog.vue index a8b60a60c..6edd13d35 100644 --- a/src/components/dialog/GlobalDialog.vue +++ b/src/components/dialog/GlobalDialog.vue @@ -29,7 +29,7 @@ /> diff --git a/src/components/dialog/content/LoadWorkflowWarning.vue b/src/components/dialog/content/LoadWorkflowWarning.vue index 343bf9e96..18ac1b139 100644 --- a/src/components/dialog/content/LoadWorkflowWarning.vue +++ b/src/components/dialog/content/LoadWorkflowWarning.vue @@ -34,9 +34,11 @@
import Button from 'primevue/button' import ListBox from 'primevue/listbox' -import { computed } from 'vue' +import { computed, onMounted, ref } from 'vue' import { useI18n } from 'vue-i18n' import NoResultsPlaceholder from '@/components/common/NoResultsPlaceholder.vue' import MissingCoreNodesMessage from '@/components/dialog/content/MissingCoreNodesMessage.vue' import { useMissingNodes } from '@/composables/nodePack/useMissingNodes' +import { useComfyManagerService } from '@/services/comfyManagerService' import { useDialogService } from '@/services/dialogService' import { useComfyManagerStore } from '@/stores/comfyManagerStore' import { useCommandStore } from '@/stores/commandStore' @@ -79,6 +82,7 @@ const { missingNodePacks, isLoading, error, missingCoreNodes } = useMissingNodes() const comfyManagerStore = useComfyManagerStore() +const isLegacyManager = ref(false) // Check if any of the missing packs are currently being installed const isInstalling = computed(() => { @@ -151,6 +155,13 @@ const openManager = async () => { break } } + +onMounted(async () => { + const isLegacyResponse = await useComfyManagerService().isLegacyManagerUI() + if (isLegacyResponse?.is_legacy_manager_ui) { + isLegacyManager.value = true + } +}) diff --git a/src/components/dialog/content/manager/NodeConflictFooter.vue b/src/components/dialog/content/manager/NodeConflictFooter.vue new file mode 100644 index 000000000..c76f77908 --- /dev/null +++ b/src/components/dialog/content/manager/NodeConflictFooter.vue @@ -0,0 +1,54 @@ + + + diff --git a/src/components/dialog/content/manager/NodeConflictHeader.vue b/src/components/dialog/content/manager/NodeConflictHeader.vue new file mode 100644 index 000000000..70e30d129 --- /dev/null +++ b/src/components/dialog/content/manager/NodeConflictHeader.vue @@ -0,0 +1,12 @@ + diff --git a/src/components/dialog/content/manager/PackStatusMessage.vue b/src/components/dialog/content/manager/PackStatusMessage.vue index b31f880e9..ab2b38a45 100644 --- a/src/components/dialog/content/manager/PackStatusMessage.vue +++ b/src/components/dialog/content/manager/PackStatusMessage.vue @@ -17,9 +17,10 @@ diff --git a/src/components/dialog/content/manager/PackVersionBadge.test.ts b/src/components/dialog/content/manager/PackVersionBadge.test.ts index eb88f34e8..71d3383d8 100644 --- a/src/components/dialog/content/manager/PackVersionBadge.test.ts +++ b/src/components/dialog/content/manager/PackVersionBadge.test.ts @@ -10,6 +10,14 @@ import enMessages from '@/locales/en/main.json' import PackVersionBadge from './PackVersionBadge.vue' import PackVersionSelectorPopover from './PackVersionSelectorPopover.vue' +// Mock config to prevent __COMFYUI_FRONTEND_VERSION__ error +vi.mock('@/config', () => ({ + default: { + app_title: 'ComfyUI', + app_version: '1.0.0' + } +})) + const mockNodePack = { id: 'test-pack', name: 'Test Pack', diff --git a/src/components/dialog/content/manager/PackVersionBadge.vue b/src/components/dialog/content/manager/PackVersionBadge.vue index a8555d39b..f9dabf1f5 100644 --- a/src/components/dialog/content/manager/PackVersionBadge.vue +++ b/src/components/dialog/content/manager/PackVersionBadge.vue @@ -1,8 +1,8 @@