Shared task board where people and AI coding agents work as teammates. Source-available, self-hostable.
Go
fix(desktop): use asterisk tray icon and show-only menu
Jiayuan Zhang5e03b4d76bff
diff --git a/apps/desktop/build/trayTemplate.png b/apps/desktop/build/trayTemplate.pngnew file mode 100644index 0000000000..3b86d3d59eBinary files /dev/null and b/apps/desktop/build/trayTemplate.png differdiff --git a/apps/desktop/build/[email protected] b/apps/desktop/build/[email protected]new file mode 100644index 0000000000..dfb64239d0Binary files /dev/null and b/apps/desktop/build/[email protected] differdiff --git a/apps/desktop/electron-builder.json5 b/apps/desktop/electron-builder.json5index 2acbbfbe8f..753424e2cc 100644--- a/apps/desktop/electron-builder.json5+++ b/apps/desktop/electron-builder.json5@@ -10,6 +10,7 @@},"files": ["out",+ "build/trayTemplate*.png","!**/.vscode/*","!src/*","!electron.vite.config.{js,ts,mjs,cjs}",diff --git a/apps/desktop/src/main/tray.ts b/apps/desktop/src/main/tray.tsindex a0e2d47b33..90436ce2fe 100644--- a/apps/desktop/src/main/tray.ts+++ b/apps/desktop/src/main/tray.ts@@ -18,20 +18,15 @@ let statusInterval: ReturnType<typeof setInterval> | null = nullexport function createTray(window: BrowserWindow): void {mainWindowRef = window- const iconPath = path.join(process.env.APP_ROOT!, 'build', 'icon.png')+ // Use dedicated tray icon (asterisk shape matching MulticaIcon).+ // On macOS, Electron auto-picks trayTemplate.png / [email protected]+ // and treats "Template" suffix as a template image (adapts to dark/light menu bar).+ const iconPath = path.join(process.env.APP_ROOT!, 'build', 'trayTemplate.png')const icon = nativeImage.createFromPath(iconPath)- const trayIcon = icon.resize({ width: 16, height: 16 })- if (process.platform === 'darwin') {- trayIcon.setTemplateImage(true)- }-- tray = new Tray(trayIcon)+ tray = new Tray(icon)tray.setToolTip('Multica')- // Click to toggle window visibility- tray.on('click', toggleWindowVisibility)-// Initial menuupdateTrayMenu()@@ -54,15 +49,10 @@ export function destroyTray(): void {mainWindowRef = null}-function toggleWindowVisibility(): void {+function showMainWindow(): void {if (!mainWindowRef || mainWindowRef.isDestroyed()) return-- if (mainWindowRef.isVisible()) {- mainWindowRef.hide()- } else {- mainWindowRef.show()- mainWindowRef.focus()- }+ mainWindowRef.show()+ mainWindowRef.focus()}function updateTrayMenu(): void {@@ -90,15 +80,13 @@ function updateTrayMenu(): void {tray.setToolTip(`Multica - Agent: ${agentStatus}`)- const windowVisible = mainWindowRef && !mainWindowRef.isDestroyed() && mainWindowRef.isVisible()-const menu = Menu.buildFromTemplate([{ label: `Agent: ${agentStatus}`, enabled: false },{ label: `Hub: ${hubStatus}`, enabled: false },{ type: 'separator' },{- label: windowVisible ? 'Hide Window' : 'Show Window',- click: toggleWindowVisibility,+ label: 'Show Main Window',+ click: showMainWindow,},{ type: 'separator' },{