@@ -246,25 +246,25 @@ export function useConflictDetection() {
246246 // Step 5: Combine local installation data with Registry version data
247247 const requirements : NodePackRequirements [ ] = [ ]
248248
249- // Create a map for quick access to version info
250- const versionInfoMap = new Map (
251- installedPacksWithVersions . value . map ( ( pack ) => [ pack . id , pack . version ] )
252- )
253-
254- for ( const pack of installedPacks . value ) {
255- const packageId = pack . id || ''
249+ // IMPORTANT: Use installedPacksWithVersions to check ALL installed packages
250+ // not just the ones that exist in Registry (installedPacks)
251+ for ( const installedPack of installedPacksWithVersions . value ) {
252+ const packageId = installedPack . id
256253 const versionData = versionDataMap . get ( packageId )
257- const installedVersion = versionInfoMap . get ( packageId ) || 'unknown'
254+ const installedVersion = installedPack . version || 'unknown'
258255
259256 // Check if package is enabled using store method
260257 const isEnabled = managerStore . isPackEnabled ( packageId )
261258
259+ // Find the pack info from Registry if available
260+ const packInfo = installedPacks . value . find ( ( p ) => p . id === packageId )
261+
262262 if ( versionData ) {
263263 // Combine local installation data with version-specific Registry data
264264 const requirement : NodePackRequirements = {
265265 // Basic package info
266- id : pack . id ,
267- name : pack . name ,
266+ id : packageId ,
267+ name : packInfo ? .name || packageId ,
268268 installed_version : installedVersion ,
269269 is_enabled : isEnabled ,
270270
@@ -289,8 +289,8 @@ export function useConflictDetection() {
289289
290290 // Create fallback requirement without Registry data
291291 const fallbackRequirement : NodePackRequirements = {
292- id : pack . id ,
293- name : pack . name ,
292+ id : packageId ,
293+ name : packInfo ? .name || packageId ,
294294 installed_version : installedVersion ,
295295 is_enabled : isEnabled ,
296296 is_banned : false ,
@@ -400,19 +400,19 @@ export function useConflictDetection() {
400400 try {
401401 const comfyManagerService = useComfyManagerService ( )
402402
403- // Use installed packs from useInstalledPacks composable
403+ // Use installedPacksWithVersions to match what versions bulk API uses
404+ // This ensures both APIs check the same set of packages
404405 if (
405- ! installedPacksReady . value ||
406- ! installedPacks . value ||
407- installedPacks . value . length === 0
406+ ! installedPacksWithVersions . value ||
407+ installedPacksWithVersions . value . length === 0
408408 ) {
409409 console . warn (
410- '[ConflictDetection] No installed packages available from useInstalledPacks '
410+ '[ConflictDetection] No installed packages available for import failure check '
411411 )
412412 return { }
413413 }
414414
415- const packageIds = installedPacks . value . map ( ( pack ) => pack . id || '' )
415+ const packageIds = installedPacksWithVersions . value . map ( ( pack ) => pack . id )
416416
417417 // Use bulk API to get import failure info for all packages at once
418418 const bulkResult = await comfyManagerService . getImportFailInfoBulk (
@@ -544,10 +544,6 @@ export function useConflictDetection() {
544544 // 4. Detect Python import failures
545545 const importFailInfo = await fetchImportFailInfo ( )
546546 const importFailResults = detectImportFailConflicts ( importFailInfo )
547- console . log (
548- '[ConflictDetection] Python import failures detected:' ,
549- importFailResults
550- )
551547
552548 // 5. Combine all results
553549 const allResults = [ ...packageResults , ...importFailResults ]
@@ -636,9 +632,12 @@ export function useConflictDetection() {
636632 /**
637633 * Error-resilient initialization (called on app mount).
638634 * Async function that doesn't block UI setup.
635+ * Ensures proper order: installed -> system_stats -> versions bulk -> import_fail_info_bulk
639636 */
640637 async function initializeConflictDetection ( ) : Promise < void > {
641638 try {
639+ // Simply perform conflict detection
640+ // The useInstalledPacks will handle fetching installed list if needed
642641 await performConflictDetection ( )
643642 } catch ( error ) {
644643 console . warn (
0 commit comments