[fix] Add conflict detection when installed packages list updates

- Import useConflictDetection composable in comfyManagerStore
- Call performConflictDetection after refreshing installed packages list
- Ensures conflict status stays up-to-date when packages change
- Follows existing codebase patterns for composable usage
This commit is contained in:
Jin Yi
2025-08-06 14:17:38 +09:00
parent 4c45507d9b
commit aa73a284ef
2 changed files with 8 additions and 1 deletions

View File

@@ -78,7 +78,9 @@ export function useConflictDetection() {
try {
// Get system stats from store (primary source of system information)
const systemStatsStore = useSystemStatsStore()
await systemStatsStore.fetchSystemStats()
if (!systemStatsStore.systemStats) {
await systemStatsStore.fetchSystemStats()
}
// Fetch version information from backend (with error resilience)
const [frontendVersion] = await Promise.allSettled([

View File

@@ -5,6 +5,7 @@ import { ref, watch } from 'vue'
import { useI18n } from 'vue-i18n'
import { useCachedRequest } from '@/composables/useCachedRequest'
import { useConflictDetection } from '@/composables/useConflictDetection'
import { useManagerQueue } from '@/composables/useManagerQueue'
import { useServerLogs } from '@/composables/useServerLogs'
import { useComfyManagerService } from '@/services/comfyManagerService'
@@ -122,6 +123,10 @@ export const useComfyManagerStore = defineStore('comfyManager', () => {
return key.split('@')[0]
})
installedPacks.value = packsWithCleanedKeys
// Run conflict detection for all installed packages
// This ensures conflict status is always up-to-date when installed list changes
const { performConflictDetection } = useConflictDetection()
await performConflictDetection()
}
isStale.value = false
}