diff --git a/electron/main/index.ts b/electron/main/index.ts index 10dbee40b..5d0f0ff93 100644 --- a/electron/main/index.ts +++ b/electron/main/index.ts @@ -1354,6 +1354,9 @@ async function createWindow() { log.info('Window is ready, processing queued protocol URLs...'); processQueuedProtocolUrls(); + // Wait for React components to mount and register event listeners + await new Promise(resolve => setTimeout(resolve, 500)); + // Now check and install dependencies let res:PromiseReturnType = await checkAndInstallDepsOnUpdate({ win }); if (!res.success) { diff --git a/src/hooks/useInstallationSetup.ts b/src/hooks/useInstallationSetup.ts index 4654cd72f..11850756b 100644 --- a/src/hooks/useInstallationSetup.ts +++ b/src/hooks/useInstallationSetup.ts @@ -155,15 +155,6 @@ export const useInstallationSetup = () => { if (installationStatus.success && installationStatus.isInstalling) { startInstallation(); - } else if (initState !== 'done' && toolResult) { - if (toolResult.success && !toolResult.isInstalled) { - console.log('[useInstallationSetup] Tools missing and not installing. Starting installation...'); - try { - await performInstallation(); - } catch (installError) { - console.error('[useInstallationSetup] Installation failed:', installError); - } - } } } catch (err) { console.error('[useInstallationSetup] Failed to check installation status:', err);