diff --git a/apps/desktop/electron/main.cjs b/apps/desktop/electron/main.cjs index ce8e4bb83ca..3ea31b2720f 100644 --- a/apps/desktop/electron/main.cjs +++ b/apps/desktop/electron/main.cjs @@ -408,8 +408,13 @@ function previewFileMetadata(filePath, mimeType) { } app.setName(APP_NAME) +// Seed the native About panel with the live Hermes version. This is refreshed +// on every open via the explicit "About" menu handler (refreshAboutPanel), so +// an in-place `hermes update` mid-session is reflected without an app restart; +// the seed here just covers the first open and any non-menu invocation path. app.setAboutPanelOptions({ applicationName: APP_NAME, + applicationVersion: resolveHermesVersion(), copyright: 'Copyright © 2026 Nous Research' }) @@ -2981,7 +2986,7 @@ function buildApplicationMenu() { template.push({ label: APP_NAME, submenu: [ - { role: 'about', label: `About ${APP_NAME}` }, + { label: `About ${APP_NAME}`, click: () => showAboutPanelFresh() }, checkForUpdatesItem, { type: 'separator' }, { role: 'services' }, @@ -5373,6 +5378,19 @@ function resolveHermesVersion() { return app.getVersion() } +// Re-resolve the live Hermes version and push it into the native About panel +// just before showing it, so an in-place `hermes update` is reflected without +// an app restart. macOS only — `showAboutPanel()` is a no-op elsewhere, and the +// other platforms don't use this menu item. +function showAboutPanelFresh() { + app.setAboutPanelOptions({ + applicationName: APP_NAME, + applicationVersion: resolveHermesVersion(), + copyright: 'Copyright © 2026 Nous Research' + }) + app.showAboutPanel() +} + ipcMain.handle('hermes:version', async () => ({ appVersion: resolveHermesVersion(), electronVersion: process.versions.electron,