@devries-cameron20 / t3code-1 / commits / a3aa4bd189
Fork 0

The best way to control Claude Code, Codex and more from any computer or phone

Fix destructive menu icon showing app logo on non-macOS

getDestructiveMenuIcon fell back to resolveIconPath("png") on Windows/Linux which resolved to the T3 Code app icon, not a trash icon. Restrict the icon to macOS where createFromNamedImage("trash") provides the correct system icon. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

Julius Marminge committed Mar 2, 2026 at 13:48 UTC a3aa4bd189721a87271e9d7a1bed0cb605bc5eee
1 file changed +6 -13
apps/desktop/src/main.ts
+6 -13
@@ -40,27 +40,20 @@ let desktopProtocolRegistered = false;
40 let destructiveMenuIconCache: Electron.NativeImage | null | undefined;
41
42 function getDestructiveMenuIcon(): Electron.NativeImage | undefined {
43 + if (process.platform !== "darwin") return undefined;
44 if (destructiveMenuIconCache !== undefined) {
45 return destructiveMenuIconCache ?? undefined;
46 }
47 try {
47 - const icon =
48 - process.platform === "darwin"
49 - ? nativeImage.createFromNamedImage("trash").resize({
50 - width: 14,
51 - height: 14,
52 - })
53 - : nativeImage.createFromPath(resolveIconPath("png") ?? "").resize({
54 - width: 14,
55 - height: 14,
56 - });
48 + const icon = nativeImage.createFromNamedImage("trash").resize({
49 + width: 14,
50 + height: 14,
51 + });
52 if (icon.isEmpty()) {
53 destructiveMenuIconCache = null;
54 return undefined;
55 }
61 - if (process.platform === "darwin") {
62 - icon.setTemplateImage(true);
63 - }
56 + icon.setTemplateImage(true);
57 destructiveMenuIconCache = icon;
58 return icon;
59 } catch {