From 87c443ed2355ef58549e73d4a5664ce51e61ca47 Mon Sep 17 00:00:00 2001 From: Nepha Peachy <267095040+amanayayatu-tech@users.noreply.github.com> Date: Mon, 23 Nov 2026 19:09:40 +0100 Subject: [PATCH 1/2] fix(desktop): restore custom icon when macOS Dock returns Signed-off-by: Nepha Peachy <267095040+amanayayatu-tech@users.noreply.github.com> --- apps/desktop/src/main/app-icon.ts | 6 ++++++ apps/desktop/src/main/appPresence.ts | 2 ++ 2 files changed, 8 insertions(+) diff --git a/apps/desktop/src/main/app-icon.ts b/apps/desktop/src/main/app-icon.ts index 227875601da..bb100ec4e3a 100644 --- a/apps/desktop/src/main/app-icon.ts +++ b/apps/desktop/src/main/app-icon.ts @@ -45,3 +45,9 @@ export function applyDockIcon( // Dock updates are cosmetic and must not block startup or settings writes. } } + +export function restoreDockIconAfterShow(): void { + // macOS can rebuild the tile with the bundle icon while this process keeps running. + appliedIconPath = null; + applyDockIcon(); +} diff --git a/apps/desktop/src/main/appPresence.ts b/apps/desktop/src/main/appPresence.ts index e86b217cdbb..dda2358a5ad 100644 --- a/apps/desktop/src/main/appPresence.ts +++ b/apps/desktop/src/main/appPresence.ts @@ -1,5 +1,6 @@ import { app, BrowserWindow } from 'electron'; +import { restoreDockIconAfterShow } from './app-icon.js'; import { createLogger } from './logger.js'; const log = createLogger('app-presence'); @@ -37,6 +38,7 @@ export async function ensureMainAppPresence( // actually fallen out of the Dock. app.setActivationPolicy('regular'); await app.dock?.show(); + restoreDockIconAfterShow(); return; } From 77b455fe43aa2145914bd06c27c9fe36558cd509 Mon Sep 17 00:00:00 2001 From: Nepha Peachy <267095040+amanayayatu-tech@users.noreply.github.com> Date: Mon, 23 Nov 2026 19:33:12 +0100 Subject: [PATCH 2/2] test(desktop): isolate Dock artwork from simulated platforms Signed-off-by: Nepha Peachy <267095040+amanayayatu-tech@users.noreply.github.com> --- .../src/main/remote-desktop/__tests__/captureBoundary.test.ts | 3 +++ .../src/main/voice-input/__tests__/globalShortcut.test.ts | 3 +++ 2 files changed, 6 insertions(+) diff --git a/apps/desktop/src/main/remote-desktop/__tests__/captureBoundary.test.ts b/apps/desktop/src/main/remote-desktop/__tests__/captureBoundary.test.ts index 477b4849fa2..21976b303f5 100644 --- a/apps/desktop/src/main/remote-desktop/__tests__/captureBoundary.test.ts +++ b/apps/desktop/src/main/remote-desktop/__tests__/captureBoundary.test.ts @@ -10,6 +10,9 @@ vi.hoisted(() => { vi.stubGlobal('process', { ...process, platform: 'darwin', getSystemVersion: () => '26.0' }); }); +// The simulated platform is for capture behavior. Dock artwork loads native sharp. +vi.mock('../../app-icon.js', () => ({ restoreDockIconAfterShow: vi.fn() })); + const h = vi.hoisted(() => ({ wayland: false, hyprland: false, diff --git a/apps/desktop/src/main/voice-input/__tests__/globalShortcut.test.ts b/apps/desktop/src/main/voice-input/__tests__/globalShortcut.test.ts index cc06d558699..ae89d1e04a4 100644 --- a/apps/desktop/src/main/voice-input/__tests__/globalShortcut.test.ts +++ b/apps/desktop/src/main/voice-input/__tests__/globalShortcut.test.ts @@ -5,6 +5,9 @@ import type { BrowserWindow } from 'electron'; import type { VoiceInputShortcut } from '../../../shared/voiceInputData.js'; import type { GlobalVoiceInputIpcDeps } from '../global.js'; +// Shortcut tests switch process.platform independently of the native sharp binary. +vi.mock('../../app-icon.js', () => ({ restoreDockIconAfterShow: vi.fn() })); + const mocks = vi.hoisted(() => { const handlers = new Map unknown>(); const registeredShortcuts = new Map void>();