Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 16 additions & 4 deletions src/main/desktop-shell.ts
Original file line number Diff line number Diff line change
Expand Up @@ -68,6 +68,12 @@ export interface DesktopShellEarlyHandle {
transport: ElectronServerTransport
}

/** User-facing product name. Deliberately NOT `app.name` — package.json's
* `name` stays "harness" because it keys the userData directory and the
* macOS Safe Storage keychain item (see CLAUDE.md), so renaming it or
* calling `app.setName()` would break secrets.enc decryption. */
const APP_DISPLAY_NAME = 'Ness'

/** Where the web-client bundle lives at runtime. Differs between
* packaged builds (asar-relative) and dev / unpacked (sibling of the
* main bundle output). Lives here so index.ts doesn't need to call
Expand Down Expand Up @@ -378,17 +384,17 @@ export function startDesktopShell(deps: DesktopShellStartDeps): DesktopShellStar
function buildMenu(): void {
const template: Electron.MenuItemConstructorOptions[] = [
{
label: app.name,
label: APP_DISPLAY_NAME,
submenu: [
{ role: 'about' },
{ role: 'about', label: `About ${APP_DISPLAY_NAME}` },
{ type: 'separator' },
{
label: 'Settings…',
accelerator: 'CmdOrCtrl+,',
click: () => transport.sendSignal('app:openSettings')
},
{ type: 'separator' },
{ role: 'hide' },
{ role: 'hide', label: `Hide ${APP_DISPLAY_NAME}` },
{ role: 'hideOthers' },
{ role: 'unhide' },
{ type: 'separator' },
Expand All @@ -411,7 +417,7 @@ export function startDesktopShell(deps: DesktopShellStartDeps): DesktopShellStar
// AND keyup) flows to our handlers, where the hold gesture lives.
// Menu click still quits immediately.
{
label: `Quit ${app.name}`,
label: `Quit ${APP_DISPLAY_NAME}`,
click: () => app.quit()
}
]
Expand Down Expand Up @@ -769,6 +775,12 @@ export function startDesktopShell(deps: DesktopShellStartDeps): DesktopShellStar
log('app', 'failed to set dock icon', err instanceof Error ? err.message : err)
}
}
if (process.platform === 'darwin') {
app.setAboutPanelOptions({
applicationName: APP_DISPLAY_NAME,
applicationVersion: app.getVersion()
})
}
buildMenu()
void runBoot()
createWindow()
Expand Down
Loading