Skip to content

fix(titlebar): Clear macOS traffic lights via window controls overlay#3460

Merged
charlesvien merged 3 commits into
mainfrom
fix/titlebar-traffic-light-inset
Jul 15, 2026
Merged

fix(titlebar): Clear macOS traffic lights via window controls overlay#3460
charlesvien merged 3 commits into
mainfrom
fix/titlebar-traffic-light-inset

Conversation

@charlesvien

@charlesvien charlesvien commented Jul 15, 2026

Copy link
Copy Markdown
Member

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.

Before: PostHog logo rendering under the macOS traffic lights After: CleanShot 2026-07-14 at 22 02 43@2x

Changes

  • Set titleBarOverlay: true on the macOS window, which enables the Window Controls Overlay CSS env vars (titlebar-area-*) reporting the system bounds of the control strip.
  • The title bar's left padding on macOS is now env(titlebar-area-x, 78px) instead of pl-[78px], so it tracks whatever the running macOS version needs (88px on Tahoe). Other platforms keep the fixed 78px.

How did you test this?

  • Scratch Electron window on macOS Tahoe with the production window config: env(titlebar-area-x) reports 88px and content padded with it starts exactly at the system-reported edge, clear of the lights.
  • pnpm typecheck and Biome pass.

Automatic notifications

  • Publish to changelog?
  • Alert Sales and Marketing teams?

@trunk-io

trunk-io Bot commented Jul 15, 2026

Copy link
Copy Markdown

Merging to main in this repository is managed by Trunk.

  • To merge this pull request, check the box to the left or comment /trunk merge below.

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

@github-actions

Copy link
Copy Markdown

React Doctor found no issues in the changed files. 🎉

Reviewed by React Doctor for commit d5a8266.

@charlesvien charlesvien marked this pull request as ready for review July 15, 2026 05:04
@greptile-apps

greptile-apps Bot commented Jul 15, 2026

Copy link
Copy Markdown
Contributor

Reviews (1): Last reviewed commit: "remove pr screenshot" | Re-trigger Greptile

@charlesvien charlesvien added the Stamphog This will request an autostamp by stamphog on small changes label Jul 15, 2026

@github-actions github-actions Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

@charlesvien charlesvien merged commit 46ec3df into main Jul 15, 2026
34 checks passed
@charlesvien charlesvien deleted the fix/titlebar-traffic-light-inset branch July 15, 2026 05:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Stamphog This will request an autostamp by stamphog on small changes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant