@@ -41,7 +41,7 @@ import {
4141 shutdownPostHog ,
4242 trackAppEvent ,
4343} from "./services/posthog-analytics.js" ;
44- import { registerAutoUpdater } from "./services/updates.js" ;
44+ import type { UpdatesService } from "./services/updates/service .js" ;
4545import { registerWorkspaceIpc } from "./services/workspace/index.js" ;
4646
4747const __filename = fileURLToPath ( import . meta. url ) ;
@@ -152,12 +152,19 @@ function createWindow(): void {
152152 } ,
153153 } ,
154154 { type : "separator" } ,
155- {
156- label : "Check for Updates..." ,
157- click : ( ) => {
158- mainWindow ?. webContents . send ( "check-for-updates-menu" ) ;
159- } ,
160- } ,
155+ ...( app . isPackaged
156+ ? [
157+ {
158+ label : "Check for Updates..." ,
159+ click : ( ) => {
160+ const updatesService = container . get < UpdatesService > (
161+ MAIN_TOKENS . UpdatesService ,
162+ ) ;
163+ updatesService . triggerMenuCheck ( ) ;
164+ } ,
165+ } ,
166+ ]
167+ : [ ] ) ,
161168 { type : "separator" } ,
162169 {
163170 label : "Settings..." ,
@@ -249,8 +256,9 @@ app.whenReady().then(() => {
249256 createWindow ( ) ;
250257 ensureClaudeConfigDir ( ) ;
251258
252- // Initialize dock badge service for notification badges
259+ // Initialize services that need early startup
253260 container . get < DockBadgeService > ( MAIN_TOKENS . DockBadgeService ) ;
261+ container . get < UpdatesService > ( MAIN_TOKENS . UpdatesService ) ;
254262
255263 // Initialize PostHog analytics
256264 initializePostHog ( ) ;
@@ -284,9 +292,6 @@ app.on("activate", () => {
284292 }
285293} ) ;
286294
287- // Background services
288- registerAutoUpdater ( ( ) => mainWindow ) ;
289-
290295ipcMain . handle ( "app:get-version" , ( ) => app . getVersion ( ) ) ;
291296
292297// Register IPC handlers via services
0 commit comments