Repository navigation
Conversation
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: 57714dfc9d
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| const MACOS_TRAFFIC_LIGHT_POSITION = { | ||
| x: MACOS_TRAFFIC_LIGHT_DIAGONAL_INSET, | ||
| y: MACOS_TRAFFIC_LIGHT_DIAGONAL_INSET, | ||
| x: MACOS_TRAFFIC_LIGHT_INSET_PX, | ||
| y: MACOS_TRAFFIC_LIGHT_INSET_PX, |
There was a problem hiding this comment.
Preserve pre-Tahoe traffic-light geometry
The desktop supports macOS 13 and newer (apps/desktop/README.md:49-50), but this position is now applied to every macOS window without checking the OS version. On macOS 13–15, the native controls retain the smaller pre-Tahoe geometry while the preload unconditionally reports this inset and the renderer assumes 14px lights and 9px gaps, so controls and reserved spacing are calculated for macOS 26 and become misaligned on supported older systems. Select and report the geometry according to the running macOS version.
Useful? React with 👍 / 👎.
2d0be4a to
d5a45b5
Compare
2e28267 to
f4514ac
Compare
42690c4 to
ffc05c2
Compare
The title bar assumed pre-Tahoe traffic-light spacing, so on macOS 26 the Back button sat 6px from the zoom button (#4145) and the controls sat 1px below the lights' center. The red light was also off the rail icon column. Move the traffic lights to a 13px inset so the close button sits over the rail icons, report that inset through the desktop bridge, and derive the title bar height, control axis, and traffic-light reserves from it. Older desktop builds that report no inset keep the 18px geometry. Fixes #4145 Co-Authored-By: Claude Opus 5.5 <[email protected]>
The rail icons are now centered 18px from the window edge, so place the traffic lights 11px in to keep the close button over them. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Use the native compact-toolbar left inset on macOS 26 so the lights clear the window's rounded corner, and keep the close button over the rail icons, which are now centered 19px from the window edge. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Every macOS title row centers its window buttons: the compact toolbar puts them 12px from the left and 13px from the top of a 40px bar. Place the lights there, report the top inset to the renderer as macosTrafficLightTopInset, and size the title bar at twice the lights' center so its 28px controls sit 6px from the window top and the panels. Older desktop builds that report no top inset keep their diagonal inset. Co-Authored-By: Claude Opus 5.5 <[email protected]>
A 40px bar felt tight. Place the lights at (16, 15), the setup ChatGPT's desktop app uses, so they center at y=22 in a 44px bar with the 28px title-bar controls 8px from the window top and the panels. With the rail at 11px padding the red light stays over the rail icons at x=23. Co-Authored-By: Claude Opus 5.5 <[email protected]>
ffc05c2 to
6ad0c58
Compare
|
Superseded by #5529 (Compact the macOS app frame and move headers into the title bar), which combines the frame layers (#5458, #5459, #5462) into one PR from main with the frame geometry in one place. Its description carries over this layer's review results, follow-ups and the #5495 merge-order note. |
…s into the title bar (#5529) ## Human comments ## What was wrong On macOS the app frame used more space than its controls needed and was laid out for pre-Tahoe traffic lights, so Back sat 6px from the lights (#4145), title-bar icons sat below the lights' center line, and every page spent an extra 48px header row inside the card. ## What changed - The window frame is compact: a 44px title bar, a 48px rail and an 8px frame. - Page, thread and right-panel headers now sit in the title bar, giving content 48px more height. - Title-bar icons line up with the traffic lights and sit 24px apart. - The right-panel toggle mirrors the red light at the top-right corner. - Settings and the footer actions mirror the red light at the bottom-left corner. - Card corners are 8px, concentric with the window's 16px corner. - Card edges and split dividers run their full length; the title band is one color. - Framed card edges and pane dividers use the `border` token, so panes stay distinct in dark mode. - Footer actions use 28px click areas with focus rings drawn inside them. - The desktop shell places the lights at (17, 15) and reports both insets to the app. - Frame geometry lives in one file, `packages/desktop-contract/src/macos-window-chrome.ts`. > **Older desktop apps:** until the desktop app updates, its window buttons sit 3px below the title-bar icons. Nothing overlaps or loses its click area. > > | Desktop shell | Top-left, marked | > | --- | --- | > | Current shell (lights 17, 15) |  | > | Older shell (lights 18, 18) |  | ## How you verified - Remote CI passed on the head. - Branch desktop dev app on macOS 26.5.2 matched the measured layout at rest (table below). - Native light frames read from AppKit: 14×14 at x=17, 40, 63, matching the 9px gap constant. - Window corner radius read from AppKit: 16px, the macOS 26 value for windows without a toolbar. - DOM drag map: none of the 20 title-bar buttons is a window-drag area; empty bar stretches are. - Footer focus rings stay inside their boxes; Settings keeps its full outset ring. - Light and dark themes keep the title band one color. - At 700px the narrow drawer still shows New thread 4px after its sidebar toggle. - brsbl passed QA on the final screenshots. Her QA did not cover dragging or full screen. - Screenshots draw stand-in traffic lights; native lights need Screen Recording permission to capture. ### Manual checks still open - **Full screen** (green light or ⌃⌘F): the lights hide, Back moves to the left edge, and the bar stays 44px. - **Window dragging**, thread page, panel closed: drag from left of Back, between the sidebar toggle and the title, between the thread menu and the right-side buttons, the right edge, and the strips above and below the controls. - **Then click** Back, Forward, the sidebar toggle, the title menu, the open-in-app buttons and the right-panel toggle; none should move the window. <details> <summary>Measured gaps at rest: main vs this PR (px, 1280×800)</summary> | Gap | main `c01608d00` | This PR `1f3863b76` | | --- | --- | --- | | Lights above / below (to card top) | 18 / 8 | 15 / 15 | | Title-bar hit boxes above / below | 12 / 0 | 8 / 8 | | Title-bar glyphs above / below | 22 / 10 | 18 / 18 | | Lights → Back (hit / glyph) | 6 / 18 | 12 / 24 | | Between drawn icons (Back→Forward, Forward→sidebar) | 28 / 23.3 | 24 / 24.3 | | Rail width · rail x · red light x | 44 · 22 · 25 | 48 · 24 · 24 | | Right toggle icon center to right edge · y | 39 · 26 | 24 · 22 | | Settings icon center x · from bottom | 22 · 33 | 24 · 22 | | Footer icons center from bottom · box | 33 · 32×32 | 22 · 28×28 | | Card corner radius (window 16) | 12 | 8 | | Window frame right / bottom | 8 / 8 | 8 / 8 | | Card bottoms (sidebar · thread) | 792 · 792 | 792 · 792 | </details> ### Before and after Before: `4363ba27d` (merge base) · After: `df5f51b87` (head) · macOS desktop dev app, 1280×900 window, captured at 2×, same seeded fixture and route in each pair. | Screen / state | Viewport | Before | After | | --- | --- | --- | --- | | Thread · panel closed | macOS desktop · 1280×900 |  |  | | Thread · panel open | macOS desktop · 1280×900 |  |  | | Home | macOS desktop · 1280×900 |  |  | | Split view · two threads | macOS desktop · 1280×900 |  |  | #### Alignment guides At rest, thread page, panel closed. Pink crosses mark the red light's center and its mirror at each corner; blue boxes are drawn icons; dashed orange boxes are click areas; blue curves are the window's 16px corner. | Corner | Before | After | | --- | --- | --- | | Top-left |  |  | | Top-right |  |  | | Bottom-left |  |  | | Bottom-right |  |  | #### Dark mode Split view at `df5f51b87`, dark theme.  ### Follow-ups (P2, not in this PR) - **Newer desktop app, older server:** the new shell puts the lights at (17, 15), while an older server's app centers its controls at y=26, 4px below the lights (no overlap or clipping). Avoiding it needs the shell to keep (18, 18) until the app opts in; needs a product decision. - `MACOS_TITLE_BAR_CONTROL_SIZE_CLASS` sets every button in the band to the control height, which also stretches the panel tab's close button (found by code inspection). - `RootComposePanelCommandHandlers` still accepts an `isOpen` prop that nothing reads since the title bar's own toggle was removed. - In macOS full screen with the sidebar collapsed, page and thread titles start about 91px after the sidebar toggle instead of 12px; the header reserve is computed for the windowed layout. Supersedes #5458, #5459 and #5462. Fixes #4145 BB-Thread-ID: thr_eigbyjruhs 🤖 Generated with [Claude Code](https://claude.com/claude-code) > AGENT GENERATED --------- Co-authored-by: Claude Opus 5.5 <[email protected]>
Human comments
What was wrong
The macOS title bar was laid out for pre-Tahoe traffic lights. On macOS 26 each light is 14×14 with 9px gaps (measured from
standardWindowButtonon macOS 26.5), so with the 18px inset the cluster ends at x=78 and the Back button at x=84 had 6px of clearance (#4145). The title-bar controls sat 1px below the lights' center line, the red light was not over the rail icon column, and the narrow-window right-panel toggles ignored the traffic-light axis entirely.What changed
@bb/desktop-contract(macos-window-chrome.ts). The desktop shell places the lights 16px from the left and 15px from the top (the position ChatGPT's desktop app uses), which puts the close button over the rail icons (both centered at x=23). It reports both insets to the renderer asbbDesktop.macosTrafficLightInsetandbbDesktop.macosTrafficLightTopInset.Fixes #4145
How you verified
Layer 2 · Traffic-light alignment
Before:
335a53d9b(layer 1) · After:6ad0c5852· 2× PNGs, same seeded fixture, route and window in each pair.Alignment guides
The top-left zoom with measurements drawn over it. Pink lines mark the traffic-light center (
y=) and the rail axis (rail x=); the blue line marks the light cluster's edge and itsgapto Back; the green line marks the card top and the title-bar height.Merge order with "Keep New thread clear of the macOS traffic lights in the narrow sidebar drawer" (#5495)
Resolved: the PRs can merge in either order. #5495 used to pad the narrow-window drawer header with a literal
88px, which assumed the sidebar toggle sits at the 84px reserve; with this stack's 88px reserve New thread would have started 4px under the toggle. #5495 now includes5bd8c8b85, which derives that padding from--bb-macos-traffic-light-reserve(falling back to 84px), so New thread starts 4px after the toggle under either geometry. Measured on a real Mac at 700px:5bd8c8b85on main5bd8c8b855bd8c8b85Follow-ups (P2, not in this PR)
BB-Thread-ID: thr_eigbyjruhs
🤖 Generated with Claude Code