@@ -70,7 +70,7 @@ import { onFeatureFlagsLoaded } from "@posthog/ui/shell/posthogAnalyticsImpl";
7070import { SpaceSwitcher } from "@posthog/ui/shell/SpaceSwitcher" ;
7171import { useShortcutsSheetStore } from "@posthog/ui/shell/shortcutsSheetStore" ;
7272import { openUrlInBrowser } from "@posthog/ui/utils/browser" ;
73- import { isWindows } from "@posthog/ui/utils/platform" ;
73+ import { isMac , isWindows } from "@posthog/ui/utils/platform" ;
7474import { getPostHogUrl } from "@posthog/ui/utils/urls" ;
7575import { Box , Flex } from "@radix-ui/themes" ;
7676import { useQueryClient } from "@tanstack/react-query" ;
@@ -338,7 +338,9 @@ function RootLayout() {
338338 { /* Full-width title bar: a window-drag region carrying the PostHog
339339 mark. The left section matches the sidebar width so the tab strip
340340 starts flush with the content pane; its padding clears the macOS
341- stoplights. */ }
341+ stoplights via env(titlebar-area-x), the system-reported right
342+ edge of the traffic-light strip (see titleBarOverlay in
343+ window.ts). */ }
342344 < Flex
343345 align = "center"
344346 className = "drag h-10 shrink-0"
@@ -351,8 +353,12 @@ function RootLayout() {
351353 align = "center"
352354 justify = "between"
353355 gap = "3"
354- className = "shrink-0 pr-2 pl-[78px] "
356+ className = "shrink-0 pr-2"
355357 style = { {
358+ // Traffic-light size varies by macOS version, so a fixed inset
359+ // over- or under-shoots; the env var fallback covers hosts
360+ // without Window Controls Overlay.
361+ paddingLeft : isMac ? "env(titlebar-area-x, 78px)" : "78px" ,
356362 width : sidebarOpen ? channelsSidebarWidth : undefined ,
357363 // Same curve/duration as ResizableSidebar's SLIDE_EASING so the
358364 // title bar tracks the sidebar edge.
0 commit comments