[Bug] macOS Traffic Light Window Buttons Top-Clipped at 100%+ Zoom on High-DPI Displays

Open Beginner friendly
#34,703 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
2/5
Estimated time
1-3 hours
Newbie friendliness
68/100
Issue type
Bug
Clarity
Mostly clear
Activity status
Quiet
Tech stack
javascript
Domain
desktop

Research direction

Start by locating setWindowButtonPosition in the desktop app's main-process window positioning logic and inspect how trafficLightPosition is calculated from zoom. Test the macOS app at 100%, 110%, and 120% zoom on a high-DPI display, then verify the traffic-light buttons are no longer top-clipped at those zoom levels.

Written by the indexing model from the issue text.

Description

app bug
Bug Description

On Intel macOS with a 5K Retina display (5120 x 2880), the native window control buttons (red/yellow/green traffic lights) in the desktop app get truncated at the top when the app zoom is at 100% or above (110%, 120%, etc.).

Root Cause Analysis

In the main process window positioning logic, setWindowButtonPosition dynamically recalculates the Y position of the native traffic lights using a linear formula based on content zoom:

trafficLightPosition: { x: 16, y: Math.round((46 * zoom - 14) / 2) }

At 100%+ zoom levels on Retina scaling, this calculation pushes the native Y coordinate too high relative to the top window inset boundary, causing the top of the circles to be clipped.

Suggested Fix

Decouple native macOS window control positions from web content zoom scale by setting a constant Y offset regardless of the zoom scale factor:

trafficLightPosition: { x: 16, y: 14 }
Environment
  • OS: macOS 13
  • Display: 5K Retina (5120 x 2880)
  • App: Codex Desktop App for macOS
Dominant language
Rust
Stars
125k
Forks
19.5k
Avg merge
1m
Merged PRs (30d)
1k

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openai/codex

All issues in openai/codex

Similar issues

More Rust issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.