@@ -66,18 +66,12 @@ app.on('ready', () => {
6666 return
6767 }
6868
69- log . info ( 'Simulating a new release for testing purposes' )
7069 mainWindow . webContents . send ( 'update-downloaded' )
7170 } , 2000 )
7271} )
7372
74- autoUpdater . on ( 'before-quit-for-update' , ( ) => {
75- log . info ( '🔄 before-quit-for-update event fired' )
76- } )
77-
7873autoUpdater . on ( 'update-downloaded' , ( _ , __ , releaseName ) => {
7974 log . info ( '🔄 Update downloaded - showing dialog' )
80- log . info ( `📦 Release info: ${ releaseName } ` )
8175
8276 if ( ! mainWindow ) {
8377 log . error ( 'MainWindow not available for update dialog' )
@@ -108,12 +102,8 @@ autoUpdater.on('update-downloaded', (_, __, releaseName) => {
108102 dialog
109103 . showMessageBox ( mainWindow , dialogOpts )
110104 . then ( async ( returnValue ) => {
111- log . info (
112- `🎯 User clicked: ${ returnValue . response === 0 ? 'Restart' : 'Later' } `
113- )
114-
115105 if ( returnValue . response === 0 ) {
116- log . info ( '🎯 User clicked: Restart')
106+ log . debug ( ' User clicked: Restart')
117107 isUpdateInProgress = true
118108
119109 log . info ( '🛑 Removing quit listeners to avoid interference' )
@@ -123,13 +113,10 @@ autoUpdater.on('update-downloaded', (_, __, releaseName) => {
123113 isQuitting = true
124114 tearingDown = true
125115
126- log . info ( '🔄 Starting restart process...' )
127-
128116 try {
129117 log . info ( '🛑 Starting graceful shutdown before update...' )
130118 mainWindow ?. webContents . send ( 'graceful-exit' )
131119
132- log . info ( '⏳ Waiting for renderer...' )
133120 await delay ( 500 )
134121
135122 const port = getToolhivePort ( )
@@ -152,7 +139,9 @@ autoUpdater.on('update-downloaded', (_, __, releaseName) => {
152139 }
153140 } else {
154141 isUpdateInProgress = false
155- log . info ( '⏰ User chose Later - showing toast notification' )
142+ log . info (
143+ 'User deferred update installation - showing toast notification'
144+ )
156145 if ( mainWindow ) {
157146 mainWindow . webContents . send ( 'update-downloaded' )
158147 }
@@ -239,7 +228,6 @@ if (!gotTheLock) {
239228} else {
240229 app . on ( 'second-instance' , ( ) => {
241230 // Someone tried to run a second instance, focus our window instead
242- log . info ( 'Second instance attempted, focusing existing window' )
243231 if ( mainWindow ) {
244232 if ( mainWindow . isMinimized ( ) ) mainWindow . restore ( )
245233 mainWindow . focus ( )
0 commit comments