Skip to content

Compact the app frame around the rail and content - #5458

Closed
brsbl wants to merge 7 commits into
mainfrom
bb/compact-app-frame-thr_eigbyjruhs
Closed

brsbl wants to merge 7 commits into
mainfrom
bb/compact-app-frame-thr_eigbyjruhs

Conversation

@brsbl

@brsbl brsbl commented Oct 14, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

The app frame around the left rail and the content card used uneven, larger-than-needed spacing: a 44px rail with 8px padding around 28px buttons, 10px gaps between rail buttons, and an 8px window lip on the right and bottom of the framed desktop card.

What changed

  • Rail buttons go from 28px to 24px on desktop pointers (touch keeps 36px) with 11px padding, so the rail is 46px wide and its icons center at x=23, under the red light layer 2 places 16px from the left; gaps between rail buttons go from 10px to 4px.
  • The framed window lip goes from 8px to 6px, so the frame is 6px on every side.
  • On framed layouts the rail starts below the card edge so the Home icon shares a center line with the sidebar's New thread row.
  • The web sidebar toggle stays centered over the rail icon column.
  • Settings uses the rail's 24×24 target (it was 28×32 to match the footer actions), stays centered on the footer row, and keeps a 32px box on desktop pointers so it doesn't move when Settings, Plugins or Skills hide the footer actions. The footer's left and bottom padding go from 8px to 6px, so its actions sit 7px from the card edge.

How you verified

  • Chrome for Testing 155.0.8059.39 on the branch web app (1440×900): rail 46px wide, sidebar toggle centered over the rail icons at x=23.
  • Branch desktop dev app (Electron) on macOS 26.5.2, sidebar expanded and collapsed. Measured after: rail icons and Settings 11px from the window edge (x=11–35, centered at x=23); Settings 24×24 centered on the footer row; footer actions 7px from the card's left and bottom edges.
  • Desktop captures draw stand-in traffic lights (colored dots) at the shell's position; native lights can't be captured without Screen Recording permission.
  • Remote CI runs the tests; nothing was run locally.

Layer 1 · Compact frame spacing

Before: c01608d00 (merge base) · After: 335a53d9b · 2× PNGs, same fixture, route and viewport in each pair.

Screen / state Viewport Before After
Home · sidebar expanded Web · 1440×900 Before web expanded After web expanded
Home · sidebar collapsed Web · 1440×900 Before web collapsed After web collapsed
Thread · sidebar expanded macOS desktop · 1280×800 Before thread expanded After thread expanded
Thread · sidebar collapsed macOS desktop · 1280×800 Before thread collapsed After thread collapsed
Home macOS desktop · 1280×800 Before home After home
Rail (zoom) macOS desktop · 1280×800 Before rail After rail
Settings and footer actions (zoom) macOS desktop · 1280×800 Before bottom-left After bottom-left

Alignment guides

The same zoomed captures with measurements drawn over them. Orange dashed boxes are hit areas and blue boxes are the drawn glyphs; labels give the gap from each to the nearest edge (← left, → right, ↓ bottom). Pink lines mark the rail's right edge (the sidebar card) and the card's bottom edge.

Area Viewport Before After
Rail macOS desktop · 1280×800 Before rail guides After rail guides
Settings and footer actions macOS desktop · 1280×800 Before bottom-left guides After bottom-left guides

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:53:43.407627Z 9870f23 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/compact-app-frame-thr_eigbyjruhs branch 2 times, most recently from 90e196b to e01efad Compare October 14, 2026 17:59
brsbl and others added 7 commits October 14, 2026 23:35
Narrow the rail from 44px to 40px, tighten rail button gaps from 10px to
6px, and shrink the framed window lip from 8px to 6px so the frame uses
one 6px spacing all around while keeping 28px click targets.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Rail buttons go from 28px to 24px on desktop pointers (touch keeps 36px),
so the rail is 36px wide, and the gap between rail buttons goes from 6px
to 4px. The web sidebar toggle shifts 2px so it stays centered over the
rail icon column.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
With 24px rail buttons the rail's top inset no longer matched the
sidebar's 48px header row on framed layouts. Start the rail 12px below
the card edge so the Home icon shares a center line with New thread.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Match the rail's padding to the red traffic light's native compact-toolbar
position so the rail icons sit under it with more room from the window
edge. The rail is 38px wide.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
…rd edge

Settings used a 32px-tall target to match the footer actions, so it sat
15px above the window edge while every other rail icon is 24x24 with 7px
around it. Give it the rail's 24x24 target, centered on the footer row,
and trim the footer's left and bottom padding to 6px so its actions sit
7px from the card edge, like the rail and title-bar controls.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Settings, Plugins and Skills hide the footer actions, so the footer row
fell back to the 24px Settings target and shrank, moving Settings 4px
down. Give Settings a 4px vertical margin on fine pointers so its box
matches the 32px footer actions (touch already matches at 36px), and the
row keeps its height in every mode.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The traffic lights move to the 16px inset, so the rail icons need 11px of
padding to stay centered under the red light at x=23. The rail is 46px
wide.

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