fix(titlebar): Clear macOS traffic lights via window controls overlay#3460
Conversation
|
Merging to
After your PR is submitted to the merge queue, this comment will be automatically updated with its status. If the PR fails, failure details will also be posted here |
|
React Doctor found no issues in the changed files. 🎉 Reviewed by React Doctor for commit |
|
Reviews (1): Last reviewed commit: "remove pr screenshot" | Re-trigger Greptile |
There was a problem hiding this comment.
Low-risk titlebar layout fix: enables the Window Controls Overlay API in the Electron main process to expose CSS env vars, then uses env(titlebar-area-x, 78px) with a safe hardcoded fallback in the renderer. Both changes are in the correct architectural layers and the fallback prevents any regression if the env var isn't available.
Problem
On macOS Tahoe the traffic lights are bigger and wider than on earlier versions, so the title bar's hardcoded 78px left inset no longer clears them and the PostHog logo renders under the window controls.
Changes
titleBarOverlay: trueon the macOS window, which enables the Window Controls Overlay CSS env vars (titlebar-area-*) reporting the system bounds of the control strip.env(titlebar-area-x, 78px)instead ofpl-[78px], so it tracks whatever the running macOS version needs (88px on Tahoe). Other platforms keep the fixed 78px.How did you test this?
env(titlebar-area-x)reports 88px and content padded with it starts exactly at the system-reported edge, clear of the lights.pnpm typecheckand Biome pass.Automatic notifications