The best way to control Claude Code, Codex and more from any computer or phone
Mirrored from https://github.com/Camo67/t3code.git
Synced Nov 23, 15:30 UTC
fix(desktop): tooltips no longer open under the macOS traffic lights (#17726)
oliver committed
Oct 11, 2026 at 16:19 UTC
662148dd296984d11b40863ce6f90ead9c26396e
1 file changed
+7
-1
apps/web/src/lib/windowControlsOverlay.ts
+7
-1
@@ -1,10 +1,15 @@
1
import { useSyncExternalStore } from "react";
2
3
-import { isWindowsPlatform } from "./utils";
3
+import { isElectron } from "~/env";
4
+
5
+import { isMacPlatform, isWindowsPlatform } from "./utils";
6
7
const WCO_CLASS_NAME = "wco";
8
const ELECTRON_CLASS_NAME = "electron";
9
const ELECTRON_WINDOWS_CLASS_NAME = "electron-windows";
10
+// The workspace topbar the desktop app centers the traffic lights in. macOS has
11
+// no overlay API to measure, and the lights stay inside it at any zoom level.
12
+const MACOS_TITLEBAR_HEIGHT = 52;
13
14
interface WindowControlsOverlayLike {
15
readonly visible: boolean;
@@ -53,6 +58,7 @@ function subscribeTitlebarArea(listener: () => void): () => void {
58
}
59
60
function getNativeTitlebarHeight(): number {
61
+ if (isElectron && isMacPlatform(navigator.platform)) return MACOS_TITLEBAR_HEIGHT;
62
const overlay = getWindowControlsOverlay();
63
return overlay?.visible ? overlay.getTitlebarAreaRect().bottom : 0;
64
}