Compare commits

...
1 Commits
Author SHA1 Message Date
ZacharyZhang-NYandClaude Opus 4.6 a4fd98d934 fix: add system tray icon for all platforms (macOS, Windows, Linux)
Build & Release / Lint & Typecheck (push) Successful in 1m29s
Build & Release / Unit Tests (push) Successful in 31s
Build & Release / Windows (arm64) (push) Failing after 4m48s
Build & Release / Windows (x64) (push) Failing after 4m42s
Build & Release / Linux (x64) (push) Failing after 19s
Build & Release / Linux (arm64) (push) Failing after 1m9s
Build & Release / macOS (arm64) (push) Canceled after 0s
Build & Release / macOS (x64) (push) Canceled after 0s
Build & Release / Publish Release (push) Canceled after 0s
Tray was invisible on Windows/Linux (icon not bundled in asar) and
completely absent on macOS (early return guard). Generate dedicated
tray-sized icons, bundle them in the packaged app, and create tray
on all platforms with macOS Template image support.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-03-24 01:21:17 -04:00
7 changed files with 33 additions and 4 deletions

No files matched your search

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.7 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 4.3 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 311 B

+2
View File
@@ -6,6 +6,8 @@ directories:
files:
- out/**
- package.json
- assets/icon.png
- assets/tray-icon*.png
asar: true
icon: assets/icon.png
+1 -1
View File
@@ -1,6 +1,6 @@
{
"name": "agent-company",
"version": "0.4.90",
"version": "0.4.91",
"private": true,
"type": "module",
"description": "Cross-platform Electron desktop control plane for local-first AI agent companies.",
+30 -3
View File
@@ -1,5 +1,5 @@
import { existsSync } from "node:fs";
import { extname } from "node:path";
import { extname, dirname, join } from "node:path";
import { pathToFileURL } from "node:url";
import { resolve, sep } from "node:path";
import {
@@ -275,11 +275,38 @@ export function createDesktopShellService({
}
function createTray() {
if (process.platform === "darwin" || appTray) {
if (appTray) {
return;
}
const trayIcon = nativeImage.createFromPath(iconPath);
const assetsDir = dirname(iconPath);
let trayIcon: Electron.NativeImage;
if (process.platform === "darwin") {
// macOS menu bar: use Template images (monochrome black + alpha).
// Electron auto-detects the @2x variant when the base name includes "Template".
const templatePath = join(assetsDir, "tray-iconTemplate.png");
trayIcon = nativeImage.createFromPath(templatePath);
if (!trayIcon.isEmpty()) {
trayIcon.setTemplateImage(true);
}
} else {
// Windows / Linux: use the color tray icon
const trayPath = join(assetsDir, "tray-icon.png");
trayIcon = nativeImage.createFromPath(trayPath);
}
// Fallback: resize the full app icon
if (trayIcon.isEmpty()) {
const fallback = nativeImage.createFromPath(iconPath);
if (!fallback.isEmpty()) {
trayIcon = fallback.resize({ width: 32, height: 32 });
if (process.platform === "darwin") {
trayIcon.setTemplateImage(true);
}
}
}
appTray = new Tray(trayIcon.isEmpty() ? nativeImage.createEmpty() : trayIcon);
appTray.setToolTip("AgentCompany");
appTray.setContextMenu(