Skip to content

Local-first AI coding agent desktop: Electron + Rust host core + pi Agent Harness + user-installable plugins

feat(macos): make the translucent window surface an opt-in setting

vastsae144b8e6d1fb
diff --git a/apps/desktop/electron/main/bootstrap/app-lifecycle.ts b/apps/desktop/electron/main/bootstrap/app-lifecycle.ts
index 787bc4bf8..2a69066d6 100644
--- a/apps/desktop/electron/main/bootstrap/app-lifecycle.ts
+++ b/apps/desktop/electron/main/bootstrap/app-lifecycle.ts
@@ -572,6 +572,29 @@ export function createApplicationLifecycle({
}
if (nativeTheme.themeSource === next) return;
nativeTheme.themeSource = next;
+ // Only a translucent window owns a vibrancy material to re-apply; the
+ // opaque surface is repainted through the background path instead.
+ if (
+ process.platform === "darwin" &&
+ state.macosWindowTranslucency &&
+ state.mainWindow &&
+ !state.mainWindow.isDestroyed()
+ ) {
+ state.mainWindow.setVibrancy("sidebar");
+ }
+ }
+
+ /**
+ * Remember the surface the next main window is created with.
+ * `settings.macosWindowTranslucency` cannot take effect on a live window —
+ * Electron fixes `transparent` at creation — so a change is persisted and
+ * applied on the next launch instead of mutating the current window.
+ */
+ function applyMacosWindowTranslucency(
+ settings?: { macosWindowTranslucency?: unknown } | null,
+ ) {
+ state.macosWindowTranslucency =
+ process.platform === "darwin" && settings?.macosWindowTranslucency === true;
}
/**
@@ -725,6 +748,7 @@ export function createApplicationLifecycle({
executeNativeMenuAction,
dispatchNativeMenuAction,
applyDeveloperMode,
+ applyMacosWindowTranslucency,
applyPreventScreenSleep,
applyKeepAwakeWhileRunning,
disposePowerSaveBlockers,
diff --git a/apps/desktop/electron/main/bootstrap/main-state.ts b/apps/desktop/electron/main/bootstrap/main-state.ts
index 6fae3582b..cbcab4dcb 100644
--- a/apps/desktop/electron/main/bootstrap/main-state.ts
+++ b/apps/desktop/electron/main/bootstrap/main-state.ts
@@ -79,6 +79,7 @@ export class MainProcessState {
closePromptOpen = false;
quitConfirmed = false;
developerMode = false;
+ macosWindowTranslucency = false;
updaterLocale = "en";
pluginPanelTheme: PluginPanelTheme = nativeTheme.shouldUseDarkColors ? "dark" : "light";
@@ -249,6 +250,12 @@ export class MainProcessState {
set developerMode(value) {
self.developerMode = value;
},
+ get macosWindowTranslucency() {
+ return self.macosWindowTranslucency;
+ },
+ set macosWindowTranslucency(value) {
+ self.macosWindowTranslucency = value;
+ },
get pluginLauncherWindow() {
return self.pluginLauncherWindow;
},
diff --git a/apps/desktop/electron/main/bootstrap/startup.ts b/apps/desktop/electron/main/bootstrap/startup.ts
index 1209f04e0..eb5d77b5b 100644
--- a/apps/desktop/electron/main/bootstrap/startup.ts
+++ b/apps/desktop/electron/main/bootstrap/startup.ts
@@ -100,6 +100,9 @@ export type StartupDependencies = {
developerMode?: unknown;
} | null) => void;
applyDeveloperMode: (settings?: { developerMode?: unknown } | null) => void;
+ applyMacosWindowTranslucency: (
+ settings?: { macosWindowTranslucency?: unknown } | null,
+ ) => void;
applyPreventScreenSleep: (settings?: { preventScreenSleep?: unknown } | null) => void;
applyKeepAwakeWhileRunning: (settings?: { keepAwakeWhileRunning?: unknown } | null) => void;
applyPluginLauncherShortcut: (keybindings?: KeybindingOverrides) => void;
@@ -160,6 +163,7 @@ export function registerApplicationStartup(deps: StartupDependencies): void {
planUiProbe,
applyApplicationMenuSettings,
applyDeveloperMode,
+ applyMacosWindowTranslucency,
applyPreventScreenSleep,
applyKeepAwakeWhileRunning,
applyPluginLauncherShortcut,
@@ -319,11 +323,13 @@ export function registerApplicationStartup(deps: StartupDependencies): void {
theme?: unknown;
keybindings?: unknown;
developerMode?: unknown;
+ macosWindowTranslucency?: unknown;
preventScreenSleep?: unknown;
keepAwakeWhileRunning?: unknown;
} | null;
applyApplicationMenuSettings(stored);
applyDeveloperMode(stored);
+ applyMacosWindowTranslucency(stored);
applyPreventScreenSleep(stored);
applyKeepAwakeWhileRunning(stored);
await applyNetworkProxyFromAppSettings(stored);
diff --git a/apps/desktop/electron/main/bootstrap/window.ts b/apps/desktop/electron/main/bootstrap/window.ts
index 14b769868..9181c1446 100644
--- a/apps/desktop/electron/main/bootstrap/window.ts
+++ b/apps/desktop/electron/main/bootstrap/window.ts
@@ -41,7 +41,11 @@ import {
installWindows11CornerController,
usesWindows11NativeCorners,
} from "../window-native-corners";
-import { applyMainWindowBackground, mainWindowBackgroundOptions } from "../window-background";
+import {
+ applyMainWindowBackground,
+ macosWindowSurfaceOptions,
+ mainWindowBackgroundOptions,
+} from "../window-background";
import { recoverRendererAfterGone } from "../renderer-recovery";
function windowsIconPath(): string | undefined {
@@ -76,6 +80,13 @@ export type WindowLifecycleState = {
tray: Tray | null;
closeBehavior: CloseBehavior;
developerMode: boolean;
+ /**
+ * macOS surface this process launched with: `true` keeps the vibrancy
+ * material behind a transparent window, `false` paints an opaque one. It is
+ * read once before the window is created and is not the live preference —
+ * `settings.macosWindowTranslucency` is.
+ */
+ macosWindowTranslucency: boolean;
pluginLauncherWindow: BrowserWindow | null;
host: HostProcess | null;
};
@@ -196,12 +207,13 @@ export async function createWindow({
? {
titleBarStyle: "hiddenInset" as const,
trafficLightPosition: MAC_TRAFFIC_LIGHT_POSITION,
- // An opaque native surface avoids continuous WindowServer
+ // The default opaque surface avoids continuous WindowServer
// recomposition while the Electron window is visible (issue #1064).
- ...mainWindowBackgroundOptions(
- process.platform,
- initialWindowBackground,
- windows11NativeCorners,
+ // `settings.macosWindowTranslucency` opts back into the vibrancy
+ // material, and it is only readable here: Electron fixes
+ // `transparent` when the window is created.
+ ...macosWindowSurfaceOptions(
+ windowState.macosWindowTranslucency,
initialWindowBackground,
),
}
diff --git a/apps/desktop/electron/main/index.ts b/apps/desktop/electron/main/index.ts
index f5addefd5..d24b89362 100644
--- a/apps/desktop/electron/main/index.ts
+++ b/apps/desktop/electron/main/index.ts
@@ -541,6 +541,7 @@ const {
executeNativeMenuAction,
dispatchNativeMenuAction,
applyDeveloperMode,
+ applyMacosWindowTranslucency,
applyPreventScreenSleep,
applyKeepAwakeWhileRunning,
disposePowerSaveBlockers,
@@ -931,6 +932,7 @@ function registerIpc() {
getWorkPanelChatWidthSetter: () => mainState.setWorkPanelChatWidthForWindow,
applyCloseBehavior,
getCloseBehavior: () => mainState.closeBehavior,
+ isMacosWindowTranslucent: () => mainState.macosWindowTranslucency,
markMenuRendererReady,
markLifecycleDialogRendererReady,
respondLifecycleDialog,
@@ -1041,6 +1043,7 @@ registerApplicationStartup({
planUiProbe,
applyApplicationMenuSettings,
applyDeveloperMode,
+ applyMacosWindowTranslucency,
applyPreventScreenSleep,
applyKeepAwakeWhileRunning,
applyPluginLauncherShortcut,
diff --git a/apps/desktop/electron/main/ipc/register.ts b/apps/desktop/electron/main/ipc/register.ts
index 464618685..5237eb58e 100644
--- a/apps/desktop/electron/main/ipc/register.ts
+++ b/apps/desktop/electron/main/ipc/register.ts
@@ -146,6 +146,7 @@ export function registerIpcHandlers(dependencies: RegisterIpcDependencies) {
getWorkPanelChatWidthSetter,
applyCloseBehavior,
getCloseBehavior,
+ isMacosWindowTranslucent,
markMenuRendererReady,
markLifecycleDialogRendererReady,
respondLifecycleDialog,
@@ -352,6 +353,7 @@ export function registerIpcHandlers(dependencies: RegisterIpcDependencies) {
getWorkPanelChatWidthSetter,
applyCloseBehavior,
getCloseBehavior,
+ isMacosWindowTranslucent,
markMenuRendererReady,
markLifecycleDialogRendererReady,
respondLifecycleDialog,
diff --git a/apps/desktop/electron/main/ipc/window-ipc.ts b/apps/desktop/electron/main/ipc/window-ipc.ts
index 39b41dbea..61bca7a9d 100644
--- a/apps/desktop/electron/main/ipc/window-ipc.ts
+++ b/apps/desktop/electron/main/ipc/window-ipc.ts
@@ -40,9 +40,16 @@ export type WindowIpcDependencies = {
markMenuRendererReady: (window: BrowserWindow) => boolean;
executeNativeMenuAction: (action: NativeMenuAction) => unknown;
setTraySessionPreferences: (preferences: TraySessionPreferences) => Promise<void>;
+ isMacosWindowTranslucent: () => boolean;
};
-/** Register renderer-drawn window chrome and work-panel geometry channels. */
+/**
+ * Register renderer-drawn window chrome and work-panel geometry channels.
+ *
+ * `isMacosWindowTranslucent` reports the surface the running window was
+ * created with: a translucent window leaves its pixels to the native vibrancy
+ * material, so a theme colour must not paint over it.
+ */
export function registerWindowIpc({
registrar,
getMainWindow,
@@ -57,6 +64,7 @@ export function registerWindowIpc({
respondLifecycleDialog,
executeNativeMenuAction,
setTraySessionPreferences,
+ isMacosWindowTranslucent,
}: WindowIpcDependencies): void {
const { handle, handleWithEvent } = registrar;
handleWithEvent(IPC.invoke.traySetSessionPreferences, async (event, input: unknown) => {
@@ -133,6 +141,12 @@ export function registerWindowIpc({
errorCode: ErrorCodes.INVALID_ARGUMENT,
});
}
+ // A translucent macOS window keeps its pixels transparent over the native
+ // vibrancy material; painting the theme colour would flatten the glass.
+ // The default opaque surface takes the colour like every other platform.
+ if (process.platform === "darwin" && isMacosWindowTranslucent()) {
+ return { applied: false, theme };
+ }
const mainWindow = getMainWindow();
if (!mainWindow || mainWindow.isDestroyed()) {
throw new Error("main window unavailable");
@@ -168,7 +182,9 @@ export function registerWindowIpc({
throw new Error("unsupported window control action");
}
const mainWindow = getMainWindow();
- if (!mainWindow || mainWindow.isDestroyed()) return { maximized: false };
+ if (!mainWindow || mainWindow.isDestroyed()) {
+ return { maximized: false, macosWindowTranslucency: isMacosWindowTranslucent() };
+ }
switch (input.action as WindowControlAction) {
case "getState":
break;
@@ -185,6 +201,9 @@ export function registerWindowIpc({
}
return {
maximized: !mainWindow.isDestroyed() && mainWindow.isMaximized(),
+ // The surface this window was created with, so a Settings switch can tell
+ // whether the stored preference has taken effect (#1064 / ADR 0332).
+ macosWindowTranslucency: isMacosWindowTranslucent(),
};
});
diff --git a/apps/desktop/electron/main/runtime/provider-catalog.ts b/apps/desktop/electron/main/runtime/provider-catalog.ts
index 11aee7649..0c60524b5 100644
--- a/apps/desktop/electron/main/runtime/provider-catalog.ts
+++ b/apps/desktop/electron/main/runtime/provider-catalog.ts
@@ -192,6 +192,7 @@ export function createProviderCatalogRuntime({
updatePreference?: unknown;
lastNotifiedUpdateVersion?: unknown;
networkProxy?: unknown;
+ macosWindowTranslucency?: unknown;
};
if (
Object.prototype.hasOwnProperty.call(value, "defaultCommandShell") &&
@@ -225,6 +226,14 @@ export function createProviderCatalogRuntime({
errorCode: ErrorCodes.INVALID_PARAMS,
});
}
+ if (
+ Object.prototype.hasOwnProperty.call(value, "macosWindowTranslucency") &&
+ typeof value.macosWindowTranslucency !== "boolean"
+ ) {
+ throw Object.assign(new Error("macosWindowTranslucency is invalid"), {
+ errorCode: ErrorCodes.INVALID_PARAMS,
+ });
+ }
if (
Object.prototype.hasOwnProperty.call(value, "updatePreference") &&
value.updatePreference !== "automatic" &&
diff --git a/apps/desktop/electron/main/window-background.ts b/apps/desktop/electron/main/window-background.ts
index b702bf47d..ef30f63f4 100644
--- a/apps/desktop/electron/main/window-background.ts
+++ b/apps/desktop/electron/main/window-background.ts
@@ -35,16 +35,42 @@ export function mainWindowBackgroundOptions(
}
return { transparent: true, backgroundColor: "#00000000" };
}
- if (platform === "darwin") {
- // An opaque native surface stops WindowServer from recompositing the
- // window every frame while it stays visible; the vibrancy material
- // behind a transparent surface did exactly that (issue #1064).
+ if (platform === "darwin") return macosWindowSurfaceOptions(false, color);
+ return { backgroundColor: toElectronBackgroundColor(color) };
+}
+
+/**
+ * macOS paints one of two surfaces:
+ *
+ * - `translucent` keeps the native `sidebar` vibrancy material behind a
+ * transparent Electron surface. That is the original Liquid Glass look, and
+ * it is also why WindowServer recomposited the whole window every frame the
+ * material stayed visible (issue #1064).
+ * - `opaque` (the default) paints the host palette on an opaque surface, so
+ * the window leaves the compositor's per-frame path.
+ *
+ * Electron fixes `transparent` when the window is created, so the preference
+ * is read before `new BrowserWindow` rather than applied to a live window.
+ */
+export function macosWindowSurfaceOptions(
+ translucent: boolean,
+ color: string,
+): Pick<
+ BrowserWindowConstructorOptions,
+ "vibrancy" | "visualEffectState" | "transparent" | "backgroundColor"
+> {
+ if (translucent) {
return {
- transparent: false,
- backgroundColor: toElectronBackgroundColor(color),
+ vibrancy: "sidebar",
+ visualEffectState: "followWindow",
+ transparent: true,
+ backgroundColor: "#00000000",
};
}
- return { backgroundColor: toElectronBackgroundColor(color) };
+ return {
+ transparent: false,
+ backgroundColor: toElectronBackgroundColor(color),
+ };
}
/** Apply a theme background to its platform-owned surface. */
diff --git a/apps/desktop/src/components/settings/MacosWindowTranslucencyRow.tsx b/apps/desktop/src/components/settings/MacosWindowTranslucencyRow.tsx
new file mode 100644
index 000000000..d74b2b7c2
--- /dev/null
+++ b/apps/desktop/src/components/settings/MacosWindowTranslucencyRow.tsx
@@ -0,0 +1,61 @@
+/**
+ * macOS-only appearance switch for the native window surface (ADR 0332).
+ *
+ * Electron fixes `transparent` when a window is created, so the choice cannot
+ * be applied to the window that is already on screen: it is persisted for the
+ * next launch. The row reads the surface the main process actually created and
+ * shows the restart hint only while the switch disagrees with it.
+ */
+import { useEffect, useState } from "react";
+import { useTranslation } from "react-i18next";
+import type { AppSettings } from "@pi-desktop/shared";
+import { api } from "../../lib/api";
+import { SettingsRow } from "../../features/settings/primitives";
+import { Badge, SettingsToggle } from "../ui";
+
+export function MacosWindowTranslucencyRow({
+ settings,
+ saveSettings,
+}: {
+ settings: AppSettings;
+ saveSettings: (patch: Partial<AppSettings>) => Promise<void>;
+}) {
+ const { t } = useTranslation();
+ const translucent = settings.macosWindowTranslucency === true;
+ // `null` until the running window reports its surface; an unreadable state
+ // keeps the hint hidden rather than claiming a restart is needed.
+ const [applied, setApplied] = useState<boolean | null>(null);
+
+ useEffect(() => {
+ let mounted = true;
+ void api
+ .windowControl("getState")
+ .then((state) => {
+ if (mounted) setApplied(state.macosWindowTranslucency);
+ })
+ .catch(() => undefined);
+ return () => {
+ mounted = false;
+ };
+ }, []);
+
+ return (
+ <SettingsRow
+ title={t("settings.windowTranslucency")}
+ description={t("settings.windowTranslucencyDesc")}
+ detail={
+ applied !== null && applied !== translucent ? (
+ <Badge tone="warning">{t("settings.windowTranslucencyRestart")}</Badge>
+ ) : undefined
+ }
+ >
+ <SettingsToggle
+ checked={translucent}
+ label={t("settings.windowTranslucency")}
+ onChange={() =>
+ void saveSettings({ macosWindowTranslucency: !translucent })
+ }
+ />
+ </SettingsRow>
+ );
+}
diff --git a/apps/desktop/src/features/settings/SettingsPage.tsx b/apps/desktop/src/features/settings/SettingsPage.tsx
index f275f99ef..a81190936 100644
--- a/apps/desktop/src/features/settings/SettingsPage.tsx
+++ b/apps/desktop/src/features/settings/SettingsPage.tsx
@@ -41,6 +41,7 @@ import { FontSizeRow } from "../../components/settings/FontSizeRow";
import { LanguageRow } from "../../components/settings/LanguageRow";
import { SettingsMenuSelect } from "../../components/settings/SettingsMenuSelect";
import { ThemeRow } from "../../components/settings/ThemeRow";
+import { MacosWindowTranslucencyRow } from "../../components/settings/MacosWindowTranslucencyRow";
import { NetworkProxySection } from "../../components/settings/NetworkProxySection";
import { ProjectsPage } from "../../pages/ProjectsPage";
import { AgentSkillsPage } from "../../components/settings/AgentSkillsPage";
@@ -413,6 +414,9 @@ export function SettingsPage() {
<LanguageRow settings={settings} saveSettings={saveSettings} />
<FontFamilyRow settings={settings} saveSettings={saveSettings} />
<FontSizeRow settings={settings} saveSettings={saveSettings} />
+ {platform === "darwin" && (
+ <MacosWindowTranslucencyRow settings={settings} saveSettings={saveSettings} />
+ )}
</SettingsCard>
<SettingsCard title={t("settings.sidebar")}>
diff --git a/apps/desktop/src/lib/api.ts b/apps/desktop/src/lib/api.ts
index 85810d88a..b78fe97fc 100644
--- a/apps/desktop/src/lib/api.ts
+++ b/apps/desktop/src/lib/api.ts
@@ -544,6 +544,7 @@ export function validateSettingsWrite(settings: AppSettings): AppSettings {
"sidebarRunningBadge",
"sidebarRunningRail",
"sidebarSessionTime",
+ "macosWindowTranslucency",
] as const) {
if (
Object.prototype.hasOwnProperty.call(value, key) &&
@@ -1624,7 +1625,10 @@ export const api = {
{ theme, color, cornerRadius },
),
windowControl: (action: WindowControlAction) =>
- invoke<{ maximized: boolean }>(IPC.invoke.windowControl, { action }),
+ invoke<{ maximized: boolean; macosWindowTranslucency: boolean }>(
+ IPC.invoke.windowControl,
+ { action },
+ ),
getCloseBehavior: () =>
invoke<{ behavior: CloseBehavior; supported: boolean }>(
IPC.invoke.closeBehaviorGet,
diff --git a/apps/desktop/src/lib/settings-search.ts b/apps/desktop/src/lib/settings-search.ts
index caed70c21..2395133a0 100644
--- a/apps/desktop/src/lib/settings-search.ts
+++ b/apps/desktop/src/lib/settings-search.ts
@@ -84,7 +84,6 @@ export const SETTINGS_NAV: SettingsNavEntry[] = [
"settings.proxyDirect",
"settings.proxyCustom",
"settings.proxyUrl",
- "settings.networkRelaxedMode",
"settings.networkRelaxedModeDesc",
"settings.networkRelaxedModeStrictDesc",
"settings.preventScreenSleep",
@@ -94,6 +93,8 @@ export const SETTINGS_NAV: SettingsNavEntry[] = [
"settings.sidebarRunningIndicatorsDesc",
"settings.sidebarRunningBadge",
"settings.sidebarSessionTime",
+ "settings.windowTranslucency",
+ "settings.windowTranslucencyDesc",
],
},
{
diff --git a/apps/desktop/test/macos-opaque-window-surface.test.mjs b/apps/desktop/test/macos-opaque-window-surface.test.mjs
index ea17a1cc1..9036c0d44 100644
--- a/apps/desktop/test/macos-opaque-window-surface.test.mjs
+++ b/apps/desktop/test/macos-opaque-window-surface.test.mjs
@@ -30,18 +30,22 @@ function functionSource(source, name) {
return source.slice(start, next === -1 ? undefined : next);
}
-test("macOS main window paints an opaque native surface", () => {
+test("macOS main window takes its surface from the platform helper", () => {
assert.match(macOptions, /titleBarStyle:\s*"hiddenInset"/);
// The position itself lives in @pi-desktop/shared so the renderer's reserve
// for it (styles/tokens.css) is derived from the same numbers.
assert.match(macOptions, /trafficLightPosition:\s*MAC_TRAFFIC_LIGHT_POSITION/);
// A transparent window over the macOS vibrancy material made WindowServer
// recomposite the whole window every frame it stayed dirty: an idle foreground
- // app held ~40% GPU (issue #1064). macOS now uses the opaque helper surface.
+ // app held ~40% GPU (issue #1064). The window no longer declares a material
+ // itself; the helper paints an opaque surface unless the user opted back in.
assert.doesNotMatch(macOptions, /vibrancy:/);
assert.doesNotMatch(macOptions, /visualEffectState:/);
assert.doesNotMatch(macOptions, /transparent:\s*true/);
- assert.match(macOptions, /\.\.\.mainWindowBackgroundOptions\(/);
+ assert.match(
+ macOptions,
+ /\.\.\.macosWindowSurfaceOptions\(\s*windowState\.macosWindowTranslucency,\s*initialWindowBackground,?\s*\)/,
+ );
assert.doesNotMatch(
mainWindowBlock,
/vibrancy:\s*"(?:sidebar|under-window)"/,
@@ -85,9 +89,11 @@ test("native theme source follows the app preference without touching window mat
);
assert.match(applyNative, /if \(nativeTheme\.themeSource === next\) return;/);
assert.match(applyNative, /nativeTheme\.themeSource = next;/);
- // Setting the source must not re-apply a vibrancy material: the window has no
- // material to reset, and the opaque surface is updated by the background path.
- assert.doesNotMatch(applyNative, /setVibrancy/);
+ // Only a translucent window owns a material to reset. The opaque surface is
+ // repainted by the background path, so the theme switch and the material must
+ // not diverge.
+ assert.match(applyNative, /state\.macosWindowTranslucency &&/);
+ assert.match(applyNative, /state\.mainWindow\.setVibrancy\("sidebar"\)/);
// The theme mapping lives in `applyAppThemePreference` so the narrow plugin
// `setTheme` path can never re-derive locale, keybindings, or dev-mode menu
@@ -103,12 +109,14 @@ test("native theme source follows the app preference without touching window mat
test("a theme change repaints the macOS native surface instead of skipping it", () => {
// The native background path used to return early on darwin because vibrancy
- // owned the surface. With an opaque window the colour has to be applied.
+ // owned the surface. With the default opaque window the colour has to be
+ // applied; only a translucent window keeps its transparent pixels.
assert.doesNotMatch(
windowIpcSource,
/if \(process\.platform === "darwin"\) return \{ applied: false, theme \};/,
- "darwin must no longer skip the native window background",
+ "darwin must no longer skip the native window background unconditionally",
);
+ assert.match(windowIpcSource, /if \(process\.platform === "darwin" && isMacosWindowTranslucent\(\)\) \{/);
assert.match(windowIpcSource, /applyMainWindowBackground\(/);
});
diff --git a/apps/desktop/test/macos-window-translucency.test.mjs b/apps/desktop/test/macos-window-translucency.test.mjs
new file mode 100644
index 000000000..430c2cfca
--- /dev/null
+++ b/apps/desktop/test/macos-window-translucency.test.mjs
@@ -0,0 +1,86 @@
+import {
+ readMainModule,
+ readSettingsSource,
+ readSharedTypesSource,
+} from "./helpers/source-contracts.mjs";
+import assert from "node:assert/strict";
+import { readFile } from "node:fs/promises";
+import test from "node:test";
+
+const read = (path) => readFile(new URL(path, import.meta.url), "utf8");
+
+const [sharedTypes, settingsSource, windowSource, lifecycleSource, mainStateSource, startupSource] =
+ await Promise.all([
+ readSharedTypesSource(),
+ readSettingsSource(),
+ readMainModule("bootstrap/window.ts"),
+ readMainModule("bootstrap/app-lifecycle.ts"),
+ readMainModule("bootstrap/main-state.ts"),
+ readMainModule("bootstrap/startup.ts"),
+ ]);
+
+test("the macOS translucency preference is an optional, off-by-default setting", () => {
+ assert.match(sharedTypes, /macosWindowTranslucency\?: boolean;/);
+ assert.match(mainStateSource, /macosWindowTranslucency = false;/);
+ assert.match(
+ lifecycleSource,
+ /state\.macosWindowTranslucency =\s*process\.platform === "darwin" && settings\?\.macosWindowTranslucency === true;/,
+ );
+ // The value is read where the window is created, before Electron fixes the
+ // surface, and it comes from the settings the boot sequence applied.
+ assert.match(windowSource, /windowState\.macosWindowTranslucency,/);
+ assert.match(startupSource, /applyMacosWindowTranslucency\(stored\);/);
+});
+
+test("a running window cannot switch surfaces, so the preference waits for a launch", async () => {
+ const applyBody =
+ lifecycleSource.match(/function applyMacosWindowTranslucency\([\s\S]*?\n \}/)?.[0] ?? "";
+ assert.ok(applyBody, "expected applyMacosWindowTranslucency");
+ assert.doesNotMatch(applyBody, /setVibrancy|setBackgroundColor|new BrowserWindow/);
+ // A translucent window keeps its transparent surface for the background IPC,
+ // and the renderer reads the created surface so a saved change can show a
+ // restart hint instead of faking a live switch.
+ const windowIpc = await readMainModule("ipc/window-ipc.ts");
+ assert.match(
+ windowIpc,
+ /process\.platform === "darwin" && isMacosWindowTranslucent\(\)/,
+ );
+ assert.match(windowIpc, /macosWindowTranslucency: isMacosWindowTranslucent\(\)/);
+});
+
+test("the switch is macOS-only and says when a restart is needed", async () => {
+ const row = await read("../src/components/settings/MacosWindowTranslucencyRow.tsx");
+ assert.match(
+ settingsSource,
+ /platform === "darwin" && \(\s*<MacosWindowTranslucencyRow settings=\{settings\} saveSettings=\{saveSettings\} \/>/,
+ );
+ assert.match(row, /settings\.macosWindowTranslucency === true/);
+ assert.match(row, /saveSettings\(\{ macosWindowTranslucency: !translucent \}\)/);
+ assert.match(row, /t\("settings\.windowTranslucencyRestart"\)/);
+ assert.match(row, /const \[applied, setApplied\] = useState<boolean \| null>\(null\)/);
+ assert.match(row, /\.windowControl\("getState"\)/);
+ assert.match(row, /applied !== null && applied !== translucent/);
+
+ const en = await read("../../../packages/i18n/src/locales/en/index.ts");
+ const zh = await read("../../../packages/i18n/src/locales/zh-CN/index.ts");
+ for (const source of [en, zh]) {
+ for (const key of [
+ "windowTranslucency:",
+ "windowTranslucencyDesc:",
+ "windowTranslucencyRestart:",
+ ]) {
+ assert.ok(source.includes(key), `missing i18n key ${key}`);
+ }
+ }
+});
+
+test("both settings write paths reject a non-boolean translucency value", async () => {
+ const rendererApi = await read("../src/lib/api.ts");
+ const mainCatalog = await readMainModule("runtime/provider-catalog.ts");
+ assert.match(rendererApi, /"macosWindowTranslucency",\s*\] as const\) \{/);
+ assert.match(rendererApi, /typeof value\[key\] !== "boolean"/);
+ assert.match(
+ mainCatalog,
+ /hasOwnProperty\.call\(value, "macosWindowTranslucency"\)[\s\S]*?typeof value\.macosWindowTranslucency !== "boolean"/,
+ );
+});
diff --git a/apps/desktop/test/window-background.test.mjs b/apps/desktop/test/window-background.test.mjs
index 29bcf520a..99d5107f0 100644
--- a/apps/desktop/test/window-background.test.mjs
+++ b/apps/desktop/test/window-background.test.mjs
@@ -2,6 +2,7 @@ import assert from "node:assert/strict";
import test from "node:test";
import {
applyMainWindowBackground,
+ macosWindowSurfaceOptions,
mainWindowBackgroundOptions,
toElectronBackgroundColor,
} from "../electron/main/window-background.ts";
@@ -41,6 +42,28 @@ test("constructor backgrounds use opaque macOS and Windows 11 surfaces", () => {
});
});
+test("macOS surfaces are opaque by default and translucent only on request", () => {
+ // Absent/false keeps the window out of WindowServer's per-frame
+ // recomposition path (issue #1064).
+ assert.deepEqual(macosWindowSurfaceOptions(false, "#12345680"), {
+ transparent: false,
+ backgroundColor: "rgba(18, 52, 86, 0.5019607843137255)",
+ });
+ // The opt-in restores the native `sidebar` material behind a transparent
+ // Electron surface.
+ assert.deepEqual(macosWindowSurfaceOptions(true, "#12345680"), {
+ vibrancy: "sidebar",
+ visualEffectState: "followWindow",
+ transparent: true,
+ backgroundColor: "#00000000",
+ });
+ // The platform helper must not disagree with the default surface.
+ assert.deepEqual(
+ mainWindowBackgroundOptions("darwin", "#12345680"),
+ macosWindowSurfaceOptions(false, "#12345680"),
+ );
+});
+
test("Windows 11 uses an opaque top-level background", () => {
assert.deepEqual(mainWindowBackgroundOptions("win32", "#12345680", true, "#ffffff"), {
transparent: false,
@@ -64,6 +87,7 @@ test("background updates target the rounded content view on Windows and native w
assert.equal(applyMainWindowBackground(linux, "linux", "#123456"), true);
assert.deepEqual(linux.calls, [["window", "rgba(18, 52, 86, 1)"]]);
+ // macOS takes the colour on the opaque surface like every other platform.
const mac = makeWindow();
assert.equal(applyMainWindowBackground(mac, "darwin", "#123456"), true);
assert.deepEqual(mac.calls, [["window", "rgba(18, 52, 86, 1)"]]);
diff --git a/docs/adr/0248-plugin-theme-assets-and-window-background.md b/docs/adr/0248-plugin-theme-assets-and-window-background.md
index c0f035654..e3bfc59a2 100644
--- a/docs/adr/0248-plugin-theme-assets-and-window-background.md
+++ b/docs/adr/0248-plugin-theme-assets-and-window-background.md
@@ -77,7 +77,9 @@ existing rule that darwin does not download one.
> **Superseded in part by ADR 0332.** macOS now paints an opaque native window
> surface instead of a vibrancy plate, so `windowAppearance.backgroundColor` is
> applied on darwin like every other platform. The permission, the derived-not-
-> remembered restoration, and the palette resolution above are unchanged.
+> remembered restoration, and the palette resolution above are unchanged. With
+> `settings.macosWindowTranslucency` on, the window is a vibrancy surface again
+> and the colour is skipped for the same reason it was skipped before.
Permission: new `ui.window.appearance`, confirmed at install and shown in the
Settings permission list. A declaration without the grant is audited and
diff --git a/docs/adr/0332-macos-opaque-window-surface.md b/docs/adr/0332-macos-opaque-window-surface.md
index 107914b91..912b92671 100644
--- a/docs/adr/0332-macos-opaque-window-surface.md
+++ b/docs/adr/0332-macos-opaque-window-surface.md
@@ -47,15 +47,29 @@ a transparent backing. The window's native background comes from the same
platform helper the other platforms use, so a theme change repaints it instead
of being skipped on `darwin`.
-- `mainWindowBackgroundOptions("darwin", color)` returns an opaque
- `{ transparent: false, backgroundColor }` surface.
+- `macosWindowSurfaceOptions(translucent, color)` is the single place that
+ declares the macOS surface: `false` paints an opaque
+ `{ transparent: false, backgroundColor }` window, `true` restores
+ `vibrancy: "sidebar"`, `visualEffectState: "followWindow"`, and the
+ transparent `#00000000` backing.
+- `mainWindowBackgroundOptions("darwin", color)` keeps returning the opaque
+ surface, so callers that only know a platform never get the material.
- `applyMainWindowBackground` applies the colour on darwin like every other
platform; the `win32` content-view and Windows 11 DWM branches are unchanged.
-- `applyNativeThemeSource` no longer calls `setVibrancy` — there is no material
- to reset when the theme source changes.
-- The `window.setBackgroundColor` IPC no longer returns early on darwin, so a
- plugin theme's `windowAppearance.backgroundColor` is applied on macOS too
- (ADR 0248), for the palette the renderer has resolved.
+- `applyNativeThemeSource` re-applies `setVibrancy("sidebar")` only when the
+ running window is translucent; an opaque window has no material to reset.
+- The `window.setBackgroundColor` IPC applies the colour on darwin unless the
+ running window is translucent — a vibrancy surface keeps its transparent
+ pixels, while an opaque one takes a plugin theme's
+ `windowAppearance.backgroundColor` (ADR 0248) for the palette the renderer
+ resolved.
+
+`AppSettings.macosWindowTranslucency` opts back into the material on macOS. It
+is read once, before `new BrowserWindow`, because Electron fixes `transparent`
+at creation: absent and `false` mean the opaque default, and a change is
+persisted for the next launch instead of mutating the window on screen. The
+Settings switch is darwin-only and shows a restart hint while the stored value
+differs from the surface the running process was created with.
The renderer-side sidebar treatment is unchanged: `--ds-sidebar-glass-tint` and
the sheen still paint the sidebar, splash, and rail so the surface keeps
@@ -68,9 +82,10 @@ without the per-frame material cost.
- An idle focused window returns to the desktop GPU baseline: after the change
the same measurement showed the focused-idle case matching the idle baseline
instead of ~40%.
-- macOS loses the live wallpaper blur behind the sidebar. The tint and sheen
- keep the glass appearance; the material is no longer translucent to desktop
- content.
+- macOS can still show the live wallpaper blur: the opt-in restores the
+ material, and with it WindowServer's per-frame recomposition cost while the
+ window is visible and focused. The tint and sheen are the same in both
+ surfaces, so only the translucency to desktop content changes.
- Plugins with a granted `ui.window.appearance` permission now have their
`windowAppearance.backgroundColor` applied on macOS, matching Windows and
Linux. Previously darwin silently ignored it because vibrancy owned the
@@ -93,9 +108,15 @@ without the per-frame material cost.
- **Drop transparency but keep vibrancy.** A vibrancy material without a
transparent surface still has WindowServer composite the material; the
transparent backing is what let it blend, not what made it expensive.
-- **Make the opaque surface opt-in behind a setting.** The load is present on
- default installs, and a setting would leave every default user with the
- regression while adding a second rendering path to maintain.
+- **Make the setting live on a running window.** `transparent` is fixed when
+ Electron creates the window, so a live change would either leave a
+ transparent window with an opaque colour (keeping the compositor cost) or an
+ opaque window that can never show the material. Persisting the preference for
+ the next launch keeps one rendering path per process instead of a
+ half-applied state.
+- **Make the opaque surface opt-in behind a setting.** Rejected as the
+ *starting* point: the load is present on default installs, so the default
+ stays opaque and translucency is the explicit opt-in (see Decision).
## Evidence
@@ -104,4 +125,6 @@ without the per-frame material cost.
foreground vs. minimized, before and after this change.
- `apps/desktop/test/macos-opaque-window-surface.test.mjs` — window option and
native-background contracts.
+- `apps/desktop/test/macos-window-translucency.test.mjs` — the setting, its
+ restart boundary, and the macOS-only Settings row.
- `apps/desktop/test/window-background.test.mjs` — per-platform surface colours.
diff --git a/docs/spec/04-ux/06-settings-ia.md b/docs/spec/04-ux/06-settings-ia.md
index abf6daaae..83fa6af66 100644
--- a/docs/spec/04-ux/06-settings-ia.md
+++ b/docs/spec/04-ux/06-settings-ia.md
@@ -160,6 +160,14 @@ Settings is a **full-window page** that replaces the app sidebar + main chrome (
shared Lucide icon scales in proportion without a reload. Window Zoom
In/Out/Reset stays independent. The UI never asks for a px value
(D343 / ADR 0180)
+ - **Translucent window** (macOS only): one switch for the native window
+ surface (ADR 0332). Off — and absent — keeps the opaque surface that frees
+ the window from WindowServer's per-frame recomposition; on restores the
+ `sidebar` vibrancy material behind a transparent backing. It persists as
+ `AppSettings.macosWindowTranslucency` and is applied when the main window is
+ created, so the row shows a restart hint while the stored value differs from
+ the surface this process launched with instead of pretending to change the
+ live window. Other platforms do not render the row.
- **Auto language detection** resolves the OS locale through the main process
(`app.getLocale()`) rather than the renderer's `navigator.language`, and the
Auto option shows the detected language inline (e.g. "Currently 简体中文")
diff --git a/docs/spec/04-ux/07-ui-design-system.md b/docs/spec/04-ux/07-ui-design-system.md
index c852d65c5..51d7a059a 100644
--- a/docs/spec/04-ux/07-ui-design-system.md
+++ b/docs/spec/04-ux/07-ui-design-system.md
@@ -754,7 +754,8 @@ plain status text:
- Reduced motion: near-zero enter/exit and a static full-width bar
- macOS: the splash uses the same sidebar treatment as the app shell (D304 /
D348) — the `--ds-sidebar-glass-tint` fill plus top/bottom sheen over the
- opaque native surface (ADR 0332 superseded the `sidebar` vibrancy plate), so
+ native surface (ADR 0332 superseded the `sidebar` vibrancy plate; the
+ `Translucent window` setting brings the plate back), so
the boot surface never flashes a mismatched panel ahead of the sidebar. The
mounted shell stays hidden under the splash until the exit fade, then
cross-fades in. Other platforms keep the opaque `--ds-bg-primary` fill
diff --git a/docs/spec/04-ux/08-component-spec.md b/docs/spec/04-ux/08-component-spec.md
index 45baf2835..f9c5dfe1a 100644
--- a/docs/spec/04-ux/08-component-spec.md
+++ b/docs/spec/04-ux/08-component-spec.md
@@ -172,6 +172,12 @@ Outer frame that positions Topbar, Sidebar, MainChat, and WorkPanel. Owns resize
`bg-primary` surfaces, so the sidebar treatment does not spread across the
whole window.
Windows/Linux retain their existing opaque background and frameless behavior.
+- Settings → General → Appearance → **Translucent window** (macOS only) opts
+ back into the `sidebar` vibrancy material behind a transparent backing. The
+ choice is read when the main window is created, so the row shows a restart
+ hint until the app is relaunched; both surfaces keep the same tint and sheen,
+ and while the window is translucent the `window.setBackgroundColor` IPC leaves
+ the surface to the material (a plugin theme colour is not painted over it).
- The macOS system menu exposes New Task, Open Project, Settings, Command
Palette, Sidebar, standard editing, zoom/fullscreen, window, Help, Logs, and
Check for Updates actions. Windows/Linux expose equivalent product actions
diff --git a/docs/spec/07-plugins/13-plugin-permissions-matrix.md b/docs/spec/07-plugins/13-plugin-permissions-matrix.md
index 06d001e96..197954fb1 100644
--- a/docs/spec/07-plugins/13-plugin-permissions-matrix.md
+++ b/docs/spec/07-plugins/13-plugin-permissions-matrix.md
@@ -12,7 +12,7 @@ Provide a permission–capability–risk–default-policy reference table for re
| `ui.view` | low | `contributes.views` are listed in the work panel and may be opened | Granted at install | Same isolation as a panel window: sandboxed page, per-plugin partition, `net.domains` egress. Filtered by activation scope |
| `ui.theme` | low | `contributes.themes` CSS is loaded and offered in Settings; runtime `pi.themes.upsert` / `remove` / `list` and `pi.app.setTheme` (ADR 0260) | Granted at install | CSS is sanitized by the host; it cannot script. Declared `assets` are served over the host's read-only `plugin-asset:` scheme. `setTheme` may only select a built-in preference or a currently registered plugin theme. There is no per-plugin theme count cap |
| `ui.settings` | low | `contributes.settingsDestinations` adds a sandboxed Settings entry in Extensions | Granted at install | Rendered only in host Extensions group; isolated view host with same sandbox as panel views (ADR 0261) |
-| `ui.window.appearance` | low | `contributes.windowAppearance` sets the native window background and Windows main-window corner request while one of the plugin's themes is selected | Granted at install | `#rrggbb` / `#rrggbbaa` background and integer `cornerRadius` 0..24 DIP; restores host background and the 12 DIP default request when the theme is gone. Windows 11 maps 0 to square and positive values to the system-rounded preference (not exact DIP radii); alpha is composited over the built-in theme color on its opaque window. Earlier Windows builds retain the requested DIP radius. macOS applies the background to its opaque native surface (ADR 0332) and keeps native corners |
+| `ui.window.appearance` | low | `contributes.windowAppearance` sets the native window background and Windows main-window corner request while one of the plugin's themes is selected | Granted at install | `#rrggbb` / `#rrggbbaa` background and integer `cornerRadius` 0..24 DIP; restores host background and the 12 DIP default request when the theme is gone. Windows 11 maps 0 to square and positive values to the system-rounded preference (not exact DIP radii); alpha is composited over the built-in theme color on its opaque window. Earlier Windows builds retain the requested DIP radius. macOS applies the background to its opaque native surface (ADR 0332) and keeps native corners; with the `Translucent window` setting on, the vibrancy surface ignores the colour |
| `clipboard.read` | medium | `clipboard.readText`, `clipboard.getHistory` | Confirm on first use | May read sensitive information and retained clipboard history |
| `clipboard.write` | medium | `clipboard.writeText` | Confirm on first use | Prevents clipboard pollution |
| `notify` | low | `ui.notify`, `ui.getNotificationPermission`, `ui.requestNotificationPermission`, `ui.showNativeNotification` | Can be granted by default | Native delivery is OS-controlled; avoid notification-spam abuse |
diff --git a/docs/spec/08-meta/decisions-log.md b/docs/spec/08-meta/decisions-log.md
index 5958a9bc0..1790714d5 100644
--- a/docs/spec/08-meta/decisions-log.md
+++ b/docs/spec/08-meta/decisions-log.md
@@ -7801,3 +7801,26 @@ must keep splitting are covered by `markdown-blocks.test.mjs`.
`apps/desktop/test/window-background.test.mjs`,
`apps/desktop/test/window-background-theme.test.mjs`, and
`apps/desktop/test/idle-status-animations.test.mjs`.
+
+## 2026-10-20 — macOS translucency is an opt-in window setting (D666)
+
+- D666 amends D665 / ADR 0332: the macOS main window still paints an opaque
+ native surface by default, and `AppSettings.macosWindowTranslucency` lets a
+ user opt back into the `sidebar` vibrancy material behind a transparent
+ backing. `macosWindowSurfaceOptions(translucent, color)` is the single surface
+ declaration; `mainWindowBackgroundOptions("darwin", color)` keeps the opaque
+ result so a platform-only caller never gets the material.
+- Electron fixes `transparent` when a window is created, so the preference is
+ read before `new BrowserWindow` and a change applies on the next launch. The
+ darwin-only Settings → General → Appearance row persists the choice and shows
+ a restart hint while it differs from the surface this process was created
+ with; no runtime window mutation, renderer reload, or relaunch is performed.
+- While the window is translucent, `window.setBackgroundColor` leaves the
+ surface to the material, so a plugin theme's
+ `windowAppearance.backgroundColor` is applied only on the opaque surface. The
+ renderer tint and sheen are unchanged in both modes, and no persisted-format
+ migration is required: an absent value means opaque.
+- Covered by `apps/desktop/test/macos-window-translucency.test.mjs`,
+ `apps/desktop/test/macos-opaque-window-surface.test.mjs`, and
+ `apps/desktop/test/window-background.test.mjs`. See ADR 0332,
+ `04-ux/08-component-spec.md`, and `04-ux/07-ui-design-system.md`.
diff --git a/packages/i18n/src/locales/de/index.ts b/packages/i18n/src/locales/de/index.ts
index 0fa00141c..961b7b143 100644
--- a/packages/i18n/src/locales/de/index.ts
+++ b/packages/i18n/src/locales/de/index.ts
@@ -1433,6 +1433,9 @@ sklm: {
"smoothStreamingDesc": "Gibt gestreamten Text zeichenweise aus, um einen Schreibmaschineneffekt zu erzeugen. Wird automatisch deaktiviert, wenn das System reduzierte Bewegung bevorzugt.",
"preventScreenSleep": "Bildschirmsperre verhindern",
"preventScreenSleepDesc": "Hält das Display wach, solange die App läuft. Nutzt plattformübergreifend die System-Energieverwaltung.",
+ "windowTranslucency": "Transparentes Fenster",
+ "windowTranslucencyDesc": "Hält das macOS-Fenster über der Unschärfe des Schreibtischs transparent. Kostet mehr GPU, solange das Fenster sichtbar ist; für die geringste Leerlauflast ausschalten.",
+ "windowTranslucencyRestart": "Zum Anwenden neu starten",
"linkOpenTarget": "Ziel für Link-Öffnung",
"linkOpenTargetWorkpanel": "Arbeitsbereich-Browser",
"linkOpenTargetExternal": "Standard-Betriebssystem-Browser",
diff --git a/packages/i18n/src/locales/en/index.ts b/packages/i18n/src/locales/en/index.ts
index 7b16fca98..5f2610c79 100644
--- a/packages/i18n/src/locales/en/index.ts
+++ b/packages/i18n/src/locales/en/index.ts
@@ -1447,6 +1447,9 @@ sklm: {
smoothStreamingDesc: "Release streamed text character by character for a typewriter effect. Automatically disabled when the system prefers reduced motion.",
preventScreenSleep: "Prevent screen sleep",
preventScreenSleepDesc: "Keep the display awake while the app is running. Uses system power management APIs on all platforms.",
+ windowTranslucency: "Translucent window",
+ windowTranslucencyDesc: "Keep the macOS window translucent over the desktop blur. It costs more GPU while the window is visible; turn it off for the lowest idle load.",
+ windowTranslucencyRestart: "Restart to apply",
linkOpenTarget: "Link open destination",
linkOpenTargetWorkpanel: "Work panel browser",
linkOpenTargetExternal: "Default OS browser",
diff --git a/packages/i18n/src/locales/es/index.ts b/packages/i18n/src/locales/es/index.ts
index 205a5595a..46bfa7a4d 100644
--- a/packages/i18n/src/locales/es/index.ts
+++ b/packages/i18n/src/locales/es/index.ts
@@ -1433,6 +1433,9 @@ sklm: {
"smoothStreamingDesc": "Libera el texto transmitido carácter por carácter para un efecto de máquina de escribir. Se desactiva automáticamente cuando el sistema prefiere movimiento reducido.",
"preventScreenSleep": "Evitar suspensión de pantalla",
"preventScreenSleepDesc": "Mantiene la pantalla encendida mientras la aplicación está en ejecución. Usa las API de gestión de energía del sistema en todas las plataformas.",
+ "windowTranslucency": "Ventana translúcida",
+ "windowTranslucencyDesc": "Mantiene la ventana de macOS translúcida sobre el desenfoque del escritorio. Usa más GPU mientras la ventana está visible; desactívalo para la menor carga en reposo.",
+ "windowTranslucencyRestart": "Reinicia para aplicar",
"linkOpenTarget": "Destino al abrir enlaces",
"linkOpenTargetWorkpanel": "Navegador del panel de trabajo",
"linkOpenTargetExternal": "Navegador predeterminado del sistema",
diff --git a/packages/i18n/src/locales/fr/index.ts b/packages/i18n/src/locales/fr/index.ts
index f015a5604..39c0c6bff 100644
--- a/packages/i18n/src/locales/fr/index.ts
+++ b/packages/i18n/src/locales/fr/index.ts
@@ -1433,6 +1433,9 @@ sklm: {
"smoothStreamingDesc": "Libère le texte diffusé caractère par caractère pour un effet machine à écrire. Automatiquement désactivé lorsque le système préfère un mouvement réduit.",
"preventScreenSleep": "Empêcher la mise en veille",
"preventScreenSleepDesc": "Garde l'écran allumé tant que l'application est ouverte. Utilise les API de gestion d'énergie du système sur toutes les plateformes.",
+ "windowTranslucency": "Fenêtre translucide",
+ "windowTranslucencyDesc": "Garde la fenêtre macOS translucide sur le flou du bureau. Consomme plus de GPU tant que la fenêtre est visible ; désactivez pour une charge au repos minimale.",
+ "windowTranslucencyRestart": "Redémarrer pour appliquer",
"linkOpenTarget": "Destination d'ouverture des liens",
"linkOpenTargetWorkpanel": "Navigateur du panneau de travail",
"linkOpenTargetExternal": "Navigateur par défaut du système",
diff --git a/packages/i18n/src/locales/ko/index.ts b/packages/i18n/src/locales/ko/index.ts
index 5c5b1723f..3f985dceb 100644
--- a/packages/i18n/src/locales/ko/index.ts
+++ b/packages/i18n/src/locales/ko/index.ts
@@ -1443,6 +1443,9 @@ sklm: {
smoothStreamingDesc: "스트리밍 텍스트를 한 글자씩 타자기 효과로 표시합니다. 시스템에서 동작 줄이기를 선호하면 자동으로 비활성화됩니다.",
preventScreenSleep: "화면 절전 방지",
preventScreenSleepDesc: "앱이 실행되는 동안 화면이 꺼지지 않도록 합니다. 모든 플랫폼에서 시스템 전원 관리 API를 사용합니다.",
+ windowTranslucency: "반투명 창",
+ windowTranslucencyDesc: "macOS 창을 데스크톱 흐림 위에 반투명하게 유지합니다. 창이 보이는 동안 GPU를 더 사용하므로 유휴 부하를 가장 낮추려면 끄세요.",
+ windowTranslucencyRestart: "적용하려면 재시작",
linkOpenTarget: "링크 열기 위치",
linkOpenTargetWorkpanel: "작업 패널 브라우저",
linkOpenTargetExternal: "시스템 기본 브라우저",
diff --git a/packages/i18n/src/locales/pt-BR/index.ts b/packages/i18n/src/locales/pt-BR/index.ts
index 48036f423..d5f633f82 100644
--- a/packages/i18n/src/locales/pt-BR/index.ts
+++ b/packages/i18n/src/locales/pt-BR/index.ts
@@ -1406,6 +1406,9 @@ export const ptBR = {
smoothStreamingDesc: "Exibe o texto recebido caractere por caractere, criando um efeito de máquina de escrever. É desativada automaticamente quando o sistema está configurado para reduzir animações.",
preventScreenSleep: "Impedir suspensão da tela",
preventScreenSleepDesc: "Mantém a tela ligada enquanto o app está em execução. Usa as APIs de gerenciamento de energia do sistema em todas as plataformas.",
+ windowTranslucency: "Janela translúcida",
+ windowTranslucencyDesc: "Mantém a janela do macOS translúcida sobre o desfoque da área de trabalho. Usa mais GPU enquanto a janela está visível; desative para a menor carga ociosa.",
+ windowTranslucencyRestart: "Reiniciar para aplicar",
linkOpenTarget: "Destino ao abrir links",
linkOpenTargetWorkpanel: "Navegador do painel de trabalho",
linkOpenTargetExternal: "Navegador padrão do sistema",
diff --git a/packages/i18n/src/locales/tr/index.ts b/packages/i18n/src/locales/tr/index.ts
index 10d7331cf..2b937638b 100644
--- a/packages/i18n/src/locales/tr/index.ts
+++ b/packages/i18n/src/locales/tr/index.ts
@@ -1437,6 +1437,9 @@ sklm: {
smoothStreamingDesc: "Akan metni daktilo efekti için karakter karakter gösterir. Sistem hareket azaltmayı tercih ettiğinde otomatik devre dışı kalır.",
preventScreenSleep: "Ekran uykusunu engelle",
preventScreenSleepDesc: "Uygulama çalışırken ekranı açık tutar. Tüm platformlarda sistem güç yönetimi API'lerini kullanır.",
+ windowTranslucency: "Saydam pencere",
+ windowTranslucencyDesc: "macOS penceresini masaüstü bulanıklığı üzerinde saydam tutar. Pencere görünürken daha fazla GPU kullanır; en düşük boşta yük için kapatın.",
+ windowTranslucencyRestart: "Uygulamak için yeniden başlatın",
linkOpenTarget: "Bağlantı açma hedefi",
linkOpenTargetWorkpanel: "Çalışma paneli tarayıcısı",
linkOpenTargetExternal: "Varsayılan sistem tarayıcısı",
diff --git a/packages/i18n/src/locales/zh-CN/index.ts b/packages/i18n/src/locales/zh-CN/index.ts
index b193bfda2..7cc114f95 100644
--- a/packages/i18n/src/locales/zh-CN/index.ts
+++ b/packages/i18n/src/locales/zh-CN/index.ts
@@ -1427,6 +1427,9 @@ sklm: {
smoothStreamingDesc: "将流式文本逐字释放,产生打字机效果。系统开启“减少动态效果”时自动禁用。",
preventScreenSleep: "阻止屏幕休眠",
preventScreenSleepDesc: "应用运行时保持屏幕常亮,跨平台使用系统电源管理接口。",
+ windowTranslucency: "窗口透明效果",
+ windowTranslucencyDesc: "让 macOS 窗口保持透明并显示桌面模糊背景。窗口可见时占用更多 GPU;关闭可让空闲占用最低。",
+ windowTranslucencyRestart: "重启后生效",
linkOpenTarget: "链接打开位置",
linkOpenTargetWorkpanel: "工作区浏览器",
linkOpenTargetExternal: "系统默认浏览器",
diff --git a/packages/i18n/src/locales/zh-TW/index.ts b/packages/i18n/src/locales/zh-TW/index.ts
index a954bec61..587843e4a 100644
--- a/packages/i18n/src/locales/zh-TW/index.ts
+++ b/packages/i18n/src/locales/zh-TW/index.ts
@@ -1427,6 +1427,9 @@ sklm: {
smoothStreamingDesc: "將串流文字逐字釋放,產生打字機效果。系統開啟「減少動態效果」時自動停用。",
preventScreenSleep: "防止螢幕休眠",
preventScreenSleepDesc: "應用程式執行時保持螢幕常亮,跨平台使用系統電源管理介面。",
+ windowTranslucency: "視窗透明效果",
+ windowTranslucencyDesc: "讓 macOS 視窗保持透明並顯示桌面模糊背景。視窗可見時佔用更多 GPU;關閉可讓閒置佔用最低。",
+ windowTranslucencyRestart: "重新啟動後生效",
linkOpenTarget: "連結開啟位置",
linkOpenTargetWorkpanel: "工作區瀏覽器",
linkOpenTargetExternal: "系統預設瀏覽器",
diff --git a/packages/shared/src/types/settings.ts b/packages/shared/src/types/settings.ts
index 26d6d96cb..c04a0b61d 100644
--- a/packages/shared/src/types/settings.ts
+++ b/packages/shared/src/types/settings.ts
@@ -75,6 +75,14 @@ export type AppSettings = {
promptEnhancementThinkingLevel?: ThinkingLevel;
defaultPermissionMode?: GlobalPermissionMode;
theme: ThemePreference;
+ /**
+ * macOS only: keep the native `sidebar` vibrancy material behind a
+ * transparent window surface. Absent and false paint an opaque surface,
+ * which keeps the window out of WindowServer's per-frame recomposition path
+ * (#1064). Other platforms ignore it. Electron fixes `transparent` when the
+ * window is created, so a change applies on the next launch.
+ */
+ macosWindowTranslucency?: boolean;
/** UI language; `auto` (and absent) follows the OS locale. */
language?: "auto" | "en" | "zh-CN" | "zh-TW" | "tr" | "de" | "es" | "fr" | "ko" | "pt-BR";
/**