Skip to content

Move thread and page headers into the macOS title bar - #5462

Closed
brsbl wants to merge 10 commits into
bb/mobile-home-scrollable-band-thr_eigbyjruhsfrom
bb/header-in-title-bar-thr_eigbyjruhs
Closed

brsbl wants to merge 10 commits into
bb/mobile-home-scrollable-band-thr_eigbyjruhsfrom
bb/header-in-title-bar-thr_eigbyjruhs

Conversation

@brsbl

@brsbl brsbl commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

On macOS desktop the title bar held only Back, Forward and the sidebar toggle, while every page spent another 48px header row inside the card, and the right panel spent a matching 48px tab row. The title bar band was mostly empty space.

What changed

  • On the framed macOS layout, the page/thread header and the right panel's tab row render in the title-bar band, centered on the traffic lights. The conversation and panel each gain the 48px row. Split view keeps one header per pane; top-row pane headers sit in the band.
  • The band uses layer 2's 44px title bar, with the lights centered at y=22. Every title-bar control is 28×28 at y=8–36, so hover, active and focus shapes keep 8px from the window top and from the cards below.
  • The right inset panel keeps its rounded top-right corner: an SVG mask clips the card's contents to the card shape below the band, so the panel body and scroll fade no longer paint square corners over it. The right-panel toggle in the band is 28×28 and ends at the card edge; its icon is shifted 2px so it sits on the corner arc's center.
  • The sidebar/thread and thread/panel boundaries continue up through the bar as border-seam hairlines.
  • Thread, panel and page scroll areas that start at the card top show bb's existing background-toned overflow fade at their top edge while content is scrolled under it, so content no longer cuts off hard at the card edge. No new divider and no size change.
  • The framed card starts at the window top and draws its edge from the title-bar line (a pseudo-element), so headers inside clipped panel columns reach the band without negative margins. Only panels whose host starts at the window top (thread and home) use the band; the Plugins page detail panel keeps its normal row.
  • Each surface hosts its own right-panel toggle, as it already does on the web; the title bar's separate toggle and its registry (WindowRightPanelToggle, useWindowRightPanel) are removed. The title bar keeps only its left controls; a full-width strip underneath keeps the band draggable, while header controls stay clickable (no-drag).
  • When the sidebar is collapsed (and in full screen, for a maximized panel), band rows start after the title-bar controls. Home, plugin-detail and loading states keep their content below the title-bar line.

How you verified

  • Branch desktop dev app (Electron) on macOS 26.5.2 with seeded threads, rebuilt so the shell really placed the lights: thread with sidebar expanded/collapsed and right panel open/closed, Home, Settings and Skills, plus mid-scroll states for the top fade. No console errors.
  • Hover pass: every title-bar control hovered with real mouse events; no hover, active, focus or tooltip shape overlaps the traffic lights, a neighbor, a divider or the panels, and nothing is clipped. The one tooltip that opens in the band (the Xcode button's "Choose another app") floats just over the card edge as tooltip overlays do. Measured at the head: bar 44px, controls at y=8–36 (center 22, on the lights' line), red light and rail icons centered at x=23, right-panel toggle 28×28 at x=1246–1274 with its icon centered at x=1262, on the panel corner's arc center (card right 1274, radius 12).
  • Screenshots draw stand-in traffic lights (colored dots) at the shell's reported geometry; native lights can't be captured without Screen Recording permission.
  • Not covered: window dragging from the band (needs a real pointer on the native window), split view (behind the thread-splits experiment), and the loading skeleton on screen (thread data was always cached on the dev build).
  • Remote CI runs the tests; nothing was run locally.

Layer 5 · Headers in the title bar

Before: 4edaeba0a (layer 4) · After: ffe4127a2 · 2× PNGs, same seeded fixture, route and window in each pair.

Screen / state Viewport Before After
Thread · sidebar expanded · panel closed macOS desktop · 1280×800 Before After
Thread · sidebar expanded · panel open macOS desktop · 1280×800 Before After
Thread · sidebar collapsed · panel open macOS desktop · 1280×800 Before After
Thread · sidebar collapsed · panel closed macOS desktop · 1280×800 Before After
Home macOS desktop · 1280×800 Before After
Settings macOS desktop · 1280×800 Before After
Skills macOS desktop · 1280×800 Before After
Title bar · full width, panel open macOS desktop · 1280×800 Before band After band
Thread mid-scroll · panel closed (top fade) macOS desktop · 1280×800 Before mid-scroll no panel After mid-scroll no panel
Thread mid-scroll · panel open (top fade) macOS desktop · 1280×800 Before mid-scroll panel After mid-scroll panel

Layer 5 · Window corners

Screen / state Viewport Before After
Top-left · traffic lights, title-bar controls, rail macOS desktop · 1280×800 Before top-left After top-left
Top-right · panel closed macOS desktop · 1280×800 Before top-right panel closed After top-right panel closed
Top-right · panel open macOS desktop · 1280×800 Before top-right panel open After top-right panel open

Alignment guides

The same corner captures with measurements drawn over them. Pink lines mark the traffic-light center (y=) and the rail axis (rail x=). Blue lines mark the light cluster's edge (gap to the first control) and the right-panel toggle axis (toggle x=). Green lines mark the card top (card top y=, bar height) and the panel's right edge, and a dashed circle traces the 12px corner radius with its center (r=12 · x=). The orange dashed box is the right-panel toggle's hit area.

Corner Viewport Before After
Top-left macOS desktop · 1280×800 Before top-left guides After top-left guides
Top-right · panel closed macOS desktop · 1280×800 Before top-right panel closed guides After top-right panel closed guides
Top-right · panel open macOS desktop · 1280×800 Before top-right panel open guides After top-right panel open guides

Follow-ups (P2, not in this PR)

  • The corner-arc toggle sizing (w-7 plus the 2px icon shift) is repeated in bb-desktop.ts, RootComposeView.tsx and SplitWorkspaceSecondaryPanelHost.tsx; one shared class would keep them from drifting.
  • MACOS_TITLE_BAR_CONTROL_SIZE_CLASS ([&_button]:h-7) also stretches the panel tab-pill close button to 28px tall (found by code inspection).
  • RootComposePanelCommandHandlers still accepts an isOpen prop that nothing reads since the title bar's own toggle was removed.
  • Full screen with the sidebar collapsed: the title-bar header reserve is computed once for the windowed layout (controls ending at x=180), so in macOS full screen, where the controls start at the rail edge and end near x=101, page and thread titles start about 91px after the sidebar toggle instead of 12px. Predates the 44px change.

BB-Thread-ID: thr_eigbyjruhs

🤖 Generated with Claude Code

AGENT GENERATED

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

Codex Review Summary

This comment shows the latest Codex review activity on this pull request.

Review Status Commit Review trigger
📝 Code Review ✅ Completed 2026-10-14T00:56:49.554172Z 9fe2c06 PR opened
ℹ️ 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" or "@codex security review".

Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings.

@brsbl
brsbl added this pull request to stack #5463 October 14, 2026 00:53
@brsbl
brsbl force-pushed the bb/header-in-title-bar-thr_eigbyjruhs branch from 9fe2c06 to c2b859b Compare October 14, 2026 00:54

@chatgpt-codex-connector chatgpt-codex-connector 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.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 9fe2c06a88

ℹ️ 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 mainContent = (
<div className="relative flex h-full min-h-0 flex-1 flex-col overflow-hidden">
<div className="relative flex h-full min-h-0 flex-1 flex-col overflow-hidden pt-(--bb-window-frame-top)">

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

P2 Badge Avoid title-bar padding inside split compose panes

On macOS, every RootComposeSecondaryContent now receives the global 34px frame-top padding, including bounded new-thread panes. Those panes already render an AppPageHeader in NonThreadPaneContent, so top-row panes get an extra gap beneath their title-bar header, while lower-row panes get the same gap despite not touching the title bar at all. Apply this padding only to the standalone/unbounded Home surface.

Useful? React with 👍 / 👎.

@brsbl
brsbl force-pushed the bb/header-in-title-bar-thr_eigbyjruhs branch from 6ca47e1 to aa64f41 Compare October 14, 2026 03:12
@brsbl
brsbl force-pushed the bb/header-in-title-bar-thr_eigbyjruhs branch from aa64f41 to 9bb7d2d Compare October 14, 2026 03:16
@brsbl
brsbl force-pushed the bb/header-in-title-bar-thr_eigbyjruhs branch from 9bb7d2d to 2176cde Compare October 14, 2026 03:25
@brsbl
brsbl force-pushed the bb/header-in-title-bar-thr_eigbyjruhs branch from dbf39e4 to 00fcc87 Compare October 14, 2026 05:12
@brsbl
brsbl force-pushed the bb/header-in-title-bar-thr_eigbyjruhs branch from fd1c693 to 7ac1aff Compare October 14, 2026 17:45
@brsbl
brsbl force-pushed the bb/header-in-title-bar-thr_eigbyjruhs branch 2 times, most recently from f30ceb7 to bdd0412 Compare October 14, 2026 19:12
@brsbl
brsbl force-pushed the bb/header-in-title-bar-thr_eigbyjruhs branch from bdd0412 to aab121a Compare October 14, 2026 23:35
brsbl and others added 9 commits October 14, 2026 23:35
On macOS desktop the 34px title bar held only Back, Forward, and the
sidebar toggle, while each page spent another 48px header row inside the
card. Move the page header and the right panel's tab row up into the title
bar band so the conversation gains that row.

The framed card now starts at the window top and draws its edge from the
title-bar line, so headers sit in the band without escaping clipped panel
columns. Each surface hosts its own right-panel toggle, as it already does
on the web, so the separate title-bar toggle and its registry are removed.
The title bar keeps only its left controls; a full-width strip underneath
keeps the band draggable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Slop Cop review fixes for the header-in-title-bar layer:

- Only right panels whose host starts at the window top (thread and home
  views) use the band tab row; the Plugins page detail panel sits below its
  page header and keeps its normal 48px row, background, and divider.
- A full-width panel beside a collapsed sidebar keeps clearing the
  title-bar controls in full screen, where the traffic lights hide but
  Back, Forward, and the sidebar toggle stay.
- The standalone route loading skeleton uses the band row on framed macOS
  instead of drawing a 48px seam row across the card edge.
- Single-pane plugin detail and unresolved plugin panel content starts
  below the title-bar line instead of under the drag strip.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The title bar band had no separation between the sidebar, thread, and
right panel columns once their headers moved into it. Continue the
sidebar/thread and thread/panel boundaries up through the band as
border-seam hairlines so the columns read as distinct without new chrome.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Title-bar controls used 28px hover and active backgrounds in the 34px
band, so they ran into the top edge of the sidebar, thread, and panel
cards. Size every control in the band to 24px (width unchanged), which
keeps the hover, active, and focus shapes 2px above the card edge without
making the title bar taller. Pinned right-panel toggles keep a 28px box so
their 24px button stays on the traffic-light axis.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With the lights centered at y=22, 24px title-bar controls and a 2px hover
gap above the panels make the title bar 36px. Narrow macOS windows size
their row controls to 24px as well so they clear the window's top edge.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With headers in the title bar there is no in-card header row or seam, so
scrolled thread, panel, and page content was cut off hard at the card's
top edge. Show bb's existing background-toned overflow fade at the top of
those scroll areas while content is scrolled under the edge, on the
framed macOS layout only.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The framed card drew its rounded top corners on a pseudo-element, so the
right panel body and the top scroll fade painted square backgrounds over
the card's top-right corner. Clip the card's contents to its real shape
below the title bar with a mask built from the bar height and the 12px
card radius (top-left stays square while the sidebar is open).

Center the right-panel toggle over that corner curve, the way the red
traffic light sits over the rail icons: in the title bar the toggle is
24px wide and its right edge meets the card's right edge.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With the lights centered in a 44px bar, the title bar fits the 28x28
targets the rest of the app uses while keeping 8px above the panels. Size
every title-bar control 28x28, centered on the lights at y=22, and widen
the right-panel toggle to 28px with its icon still centered on the panel
corner's arc.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
A 28px toggle centered on the corner's arc reached 2px past the card's
right edge, where the panel column clips it, so its hover shape was cut
off and only 26px of it was clickable. End the 28x28 target at the card
edge and shift just the icon 2px, so the icon stays on the arc's center.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Structural svg selectors are reserved for an allowlist; shift the
right-panel toggle's icon through the [data-icon-root] marker instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@brsbl

brsbl commented Oct 15, 2026

Copy link
Copy Markdown
Collaborator Author

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.

@brsbl brsbl closed this Oct 15, 2026
brsbl added a commit that referenced this pull request Oct 16, 2026
…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) | ![Current
shell](https://github.com/user-attachments/assets/6d6cc5a9-5ef5-4a80-892b-7984723b6408)
|
> | Older shell (lights 18, 18) | ![Older
shell](https://github.com/user-attachments/assets/21be9a8c-8b74-47fa-94c2-7787ac13f7f1)
|

## 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 | ![Before thread,
panel
closed](https://github.com/user-attachments/assets/186e34d4-5402-4e45-80bd-aaba871d2377)
| ![After thread, panel
closed](https://github.com/user-attachments/assets/cc8eca57-bd47-44c6-ad49-c87c7985d25d)
|
| Thread · panel open | macOS desktop · 1280×900 | ![Before thread,
panel
open](https://github.com/user-attachments/assets/17ca79fa-bb40-48a5-a14c-f54abd44c24c)
| ![After thread, panel
open](https://github.com/user-attachments/assets/5dc85832-3ffa-4c5b-b949-ae9bcd7bed52)
|
| Home | macOS desktop · 1280×900 | ![Before
Home](https://github.com/user-attachments/assets/66a18d29-a0e3-463d-9d33-2c5f6141f49a)
| ![After
Home](https://github.com/user-attachments/assets/63299d84-fc68-45bd-a624-73b9ca0cc30f)
|
| Split view · two threads | macOS desktop · 1280×900 | ![Before split
view](https://github.com/user-attachments/assets/c4e13d40-f397-4930-adf9-a6ca906a1efc)
| ![After split
view](https://github.com/user-attachments/assets/0d519175-b516-4a1d-95cb-8153523a3710)
|

#### 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 | ![Before
top-left](https://github.com/user-attachments/assets/66bc4cb3-5977-4c4b-931e-c9acb7a723d7)
| ![After
top-left](https://github.com/user-attachments/assets/71727a12-7b53-4530-9db3-6848714bef12)
|
| Top-right | ![Before
top-right](https://github.com/user-attachments/assets/d292255e-c2d1-4aa3-b358-9ba85a7a7667)
| ![After
top-right](https://github.com/user-attachments/assets/86f9eb17-7183-4079-be96-f1fa30faa93a)
|
| Bottom-left | ![Before
bottom-left](https://github.com/user-attachments/assets/e1981a1d-ae7d-42c6-928c-ef439920207e)
| ![After
bottom-left](https://github.com/user-attachments/assets/2b213ff6-4398-4000-9f15-689976142700)
|
| Bottom-right | ![Before
bottom-right](https://github.com/user-attachments/assets/31ca34f5-35a9-46f4-be1b-bf78c059d567)
| ![After
bottom-right](https://github.com/user-attachments/assets/83f032a9-ca6f-4a4b-9c6d-db7b92094c21)
|

#### Dark mode

Split view at `df5f51b87`, dark theme.

![After split view,
dark](https://github.com/user-attachments/assets/37fc7a80-95c2-451d-9896-1496f79f2196)

### 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant