From 16beab421f05375b9519155f4afe4b7ad8c1d682 Mon Sep 17 00:00:00 2001 From: teknium1 <127238744+teknium1@users.noreply.github.com> Date: Fri, 5 Jun 2026 21:35:07 -0700 Subject: [PATCH] fix(desktop): About panel shows live Hermes version, not stale package.json The native macOS About panel showed the Electron package.json version (e.g. 0.15.1) while the status bar showed the real Hermes version (0.16.0). setAboutPanelOptions() set applicationName + copyright but omitted applicationVersion, so macOS fell back to app.getVersion() = package.json, which drifts (release.py's desktop lockstep bump didn't land for 0.16.0). resolveHermesVersion() already reads the live version from hermes_cli/__init__.py and was built 'so the desktop About panel shows the real Hermes version' per its own comment, but was never wired in. - Seed applicationVersion: resolveHermesVersion() at module load. - Replace the macOS About menu item's role:'about' with a click handler (showAboutPanelFresh) that re-resolves the version on every open, so an in-place `hermes update` is reflected without an app restart. --- apps/desktop/electron/main.cjs | 20 +++++++++++++++++++- 1 file changed, 19 insertions(+), 1 deletion(-) 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,