Skip to content

Compact the macOS app frame around the traffic lights and move headers into the title bar - #5529

Merged
brsbl merged 18 commits into
mainfrom
bb/macos-app-frame-thr_eigbyjruhs
Oct 16, 2026
Merged

brsbl merged 18 commits into
mainfrom
bb/macos-app-frame-thr_eigbyjruhs

Conversation

@brsbl

@brsbl brsbl commented Oct 15, 2026 •

Copy link
Copy Markdown
Collaborator

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
Older shell (lights 18, 18) Older shell

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.
Measured gaps at rest: main vs this PR (px, 1280×800)
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

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 After thread, panel closed
Thread · panel open macOS desktop · 1280×900 Before thread, panel open After thread, panel open
Home macOS desktop · 1280×900 Before Home After Home
Split view · two threads macOS desktop · 1280×900 Before split view After split view

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 After top-left
Top-right Before top-right After top-right
Bottom-left Before bottom-left After bottom-left
Bottom-right Before bottom-right After bottom-right

Dark mode

Split view at df5f51b87, dark theme.

After split view, dark

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

AGENT GENERATED

@chatgpt-codex-connector

chatgpt-codex-connector Bot commented Oct 15, 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-15T00:42:54.132206Z eafa7f0 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.

@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: eafa7f0fcb

ℹ️ 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".

Comment on lines +451 to +452
const isAtWindowTop = useContext(SecondaryPanelAtWindowTopContext);
const isPanelInFrame = isFramed && isAtWindowTop && !renderAsDrawer;

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 Pass window-top context to plugin side panels

On a top-level plugin page in the framed macOS app, PluginPanelRightPanelHost still renders LazyThreadSecondaryPanel without a SecondaryPanelAtWindowTopContext.Provider, so this value remains the new default false. Consequently, an open plugin right panel does not receive the title-bar band, transparent framed surface, scroll fade, or trailing-toggle positioning applied here, leaving its 48px legacy chrome misaligned with the adjacent plugin header that was moved into the 44px title bar. Wrap the plugin panel render with the same top-row context used by root-compose and thread-detail panels.

Useful? React with 👍 / 👎.

brsbl added a commit that referenced this pull request Oct 15, 2026
…ar drawer (#5495)

## Human comments

## What was wrong

In macOS desktop windows narrower than 768px, New thread in the sidebar
drawer sits under the traffic lights, and the sidebar toggle draws on
top of it (reported on Discord after desktop-v0.46.0). #5229
(`ff9484883`) moved the navigation rail into the compact drawer and
dropped the macOS start inset from `SidebarTopReserveRow`. The drawer's
header row now starts right after the rail, at x=52. That is under the
lights (x=18–78), and the sidebar toggle, fixed at x=84–112, overlaps
it.

## What changed

- `SidebarTopReserveRow`
(`apps/app/src/components/sidebar/SidebarChrome.tsx`) pads the drawer's
header row so New thread starts at x=116, just after the sidebar toggle.
That is where it sat in 0.45.0.
- The padding applies only on macOS desktop, in the compact drawer (not
the framed sidebar), and outside full screen, where there are no traffic
lights.
- Wide framed windows, browsers and other platforms are unchanged. No
wire, CLI or contract changes.

## How you verified

- New `SidebarChrome.test.tsx`: the compact macOS drawer reserves the
space, while the framed window and a compact browser window don't. CI
failed with only the test ([run
38601538235](https://github.com/get-bb/bb/actions/runs/38601538235),
app-8: "expected false to be true") and passes with the fix.
- Real Mac (macOS 26.5.2), using the Electron desktop dev app built from
`main` (before) and from this branch (after), with the same seeded
thread. The window was resized natively to 700×800 with the sidebar
drawer open, and to 1100×800.
- **700px:** New thread moves from x=52–287, under the lights and the
toggle, to x=116–287. The hit test at its center returns New thread.
  - **1100px:** the framed layout is identical before and after.
- The colored dots are stand-ins drawn at the traffic lights' native
position (18, 18). The native buttons can't be captured without Screen
Recording permission.
- Not covered: a narrow window in native full screen, where the padding
is off by design because there are no lights.
- Remote CI runs the tests; nothing was run locally.
- CI: every job passes except the plugin SDK npm version guard in
Checks. Plugin Fork Check was skipped by change-based selection. The
guard fails because `@get-bb/[email protected]` was published to npm at
15:11 UTC today, and building the SDK from `main` now produces a
different `dist/provider-bridge-testing.js`. This PR doesn't touch the
SDK. Every PR based on current `main` without a version bump fails the
same way (for example #5490 and #5443), and #5492 passes because it
bumps to 0.6.44. It clears once a bump lands on `main` and this PR's CI
reruns.

| Screen / state | Viewport | Before | After |
| --- | --- | --- | --- |
| Thread · sidebar drawer open (zoom) | macOS desktop · 700×800 |
![Before 700
zoom](https://github.com/user-attachments/assets/1f708c7d-f2aa-42ee-aa2d-c5043d2468ed)
| ![After 700
zoom](https://github.com/user-attachments/assets/793b9443-c4e1-463f-a2e6-31c785b87891)
|
| Thread · sidebar drawer open | macOS desktop · 700×800 | ![Before
700](https://github.com/user-attachments/assets/379ba908-be84-4d51-aa75-654ff175ff77)
| ![After
700](https://github.com/user-attachments/assets/ffa9aebd-8e67-4d79-b9db-c46057e63433)
|
| Thread · framed sidebar (unchanged) | macOS desktop · 1100×800 |
![Before
1100](https://github.com/user-attachments/assets/a77833bb-81f7-4b5f-9546-fd5fb4a0c6b7)
| ![After
1100](https://github.com/user-attachments/assets/1327b504-d9f3-4e91-8706-a83257371042)
|

### Merge order with "Compact the macOS app frame and move headers into
the title bar" (#5529)

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 #5529's wider reserve New
thread would have started under the toggle (measured at an earlier 88px
reserve: New thread at x=112 under the toggle at x=88–116). #5495 now
includes `5bd8c8b85`, 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:

| Build | Sidebar toggle | New thread |
| --- | --- | --- |
| #5495 head `5bd8c8b85` on main | x=84–112 | x=116 |
| #5529 head `96084fc15` + #5495 | x=87–115 | x=119 |

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]>
@brsbl
brsbl force-pushed the bb/macos-app-frame-thr_eigbyjruhs branch from 176fd37 to 0a7091b Compare October 15, 2026 07:33
@brsbl brsbl changed the title Compact the macOS app frame and move headers into the title bar Compact the macOS app frame around the traffic lights and move headers into the title bar Oct 15, 2026
brsbl and others added 17 commits October 16, 2026 01:53
Narrow the rail to 24px targets with 4px gaps and frame the desktop card
with a 6px lip on every side. Line the first rail icon up with the
sidebar's first row, give Settings the rail's 24x24 target centered on
the footer row, and pull the footer actions to 7px from the card edge.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Keep the traffic-light geometry in @bb/desktop-contract. The desktop
shell places the lights at (16, 15) and reports both insets to the
renderer, which sizes the title bar at twice the lights' center (44px),
centers 28px controls on them, and keeps them 12px clear of the lights.
The rail's 11px padding puts its icons under the red light. Desktop
builds that report no insets keep the previous diagonal geometry.

Fixes #4145

Co-Authored-By: Claude Opus 5.5 <[email protected]>
On the framed macOS layout, render the page and thread header and the
right panel's tab row in the title-bar band so the conversation and panel
each gain the 48px row. Continue pane dividers through the bar, fade
content scrolled under it, round the right panel's card corner with an
SVG mask, and center the 28x28 right-panel toggle's icon on the corner
arc. Each surface hosts its own right-panel toggle; the title bar's
separate toggle and its registry are removed.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The traffic-light inset, rail control size and title-bar control size
lived in the desktop contract, app.css and bb-desktop.ts, and the rail
padding was tuned by hand to match the lights. Keep these knobs in
macos-window-chrome.ts, derive the rail padding from the light inset so
the rail stays under the red light, and write the rail and title-bar
control sizes to CSS variables at startup. The three right-panel toggle
surfaces now share one class for their size and corner-arc icon offset.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The title bar spaced its 28px hover boxes 4px apart, so with nothing
hovered the gaps between the drawn icons were uneven: 28px between the
narrow back and forward chevrons and 23px before the wider sidebar icon.
Space the boxes so every drawn icon sits 24px from the next, the same
gap as from the green traffic light to the first chevron; the boxes stay
28x28 and centered on their icons, on the lights' center line.

The thread card drew its border beneath its content, so on the thread
page the content covered the bottom border and the card looked lower
than the sidebar card beside it. Keep the content 1px above the card's
bottom edge so both cards end on the same visible line.

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

Place the traffic lights at (15, 15) so the red light's center is (22, 22)
and the rail, derived from it, centers its icons at x=22. Center the
right-panel toggle 22px from the window's right edge, mirroring the red
light, with its 28px box inside the card instead of an icon nudged onto
the corner arc.

With the panel closed, the thread header's title-bar drag region covered
the right half of the pinned toggle: the header's no-drag slot for that
toggle still sat at the old position, so macOS treated half the button as
window drag and hover and clicks there never reached the page. Give the
slot the toggle's own position class so it covers the toggle's whole box.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Move the sidebar footer actions to 8px from the card's left and bottom
edges, matching the title bar's 8px around its controls, and widen the
window frame around the cards from 6px to 8px. Both are knobs in
macos-window-chrome.ts, written to CSS variables at startup.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Drop the older-desktop fallback: when the desktop shell doesn't report
its traffic-light insets, the app now assumes the current position
instead of the old 18px diagonal. An older desktop app keeps its lights
at (18, 18), about 3px off the title-bar icon row and the rail until it
updates; nothing overlaps and every control stays clickable.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Write the frame's CSS variables from one startup function instead of a
geometry getter plus two writers, drop the zero-width nav-gap knob, and
pass the right panel's at-window-top opt-in as a prop instead of a
one-consumer context. Keep the geometry tests that guard reported insets,
the missing-inset default and the macOS-only title bar.

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

Lights move to (17, 15): a 44px bar with the rail kept at 48px. Card corners
use the window's 16px radius minus the 8px frame lip.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Settings and the footer actions center 22px from the window's bottom edge, as
the lights do from the top. Footer click boxes are 28px like the title bar's,
ending at the card edge, with the icons in place.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The framed card clips at its bottom edge, which the 28px footer boxes now
reach, so an outset ring lost its bottom stroke.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
The seam token sits within a few levels of the window frame, so in dark mode
the card edges and the dividers in the title bar disappeared against it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@brsbl
brsbl force-pushed the bb/macos-app-frame-thr_eigbyjruhs branch from 0297dbc to 2f8b532 Compare October 16, 2026 01:54
With Settings centered on the traffic lights' line from the bottom edge, the
framed settings, plugins and skills lists end on that line instead of 10px
above it.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@brsbl
brsbl merged commit c91f77e into main Oct 16, 2026
45 checks passed
@brsbl
brsbl deleted the bb/macos-app-frame-thr_eigbyjruhs branch October 16, 2026 02:28
ymichael added a commit that referenced this pull request Oct 16, 2026
#5605)

## Human comments

## What was wrong

In the macOS desktop app, the divider between the thread timeline and
the in-app browser disappeared below the browser toolbar. The browser
page is a native view placed over the measured content rect
(`BrowserTabContent.tsx` `contentRef`). #5529 (c91f77e) changed the
framed right panel's left divider from a real `border-l` to a
`before:border-l` pseudo-element, which takes no layout space, so the
measured content rect, and the native view placed over it, started on
the divider's pixel column and painted over it.

## What changed

`apps/app/src/components/secondary-panel/ThreadSecondaryPanel.tsx`: the
framed panel uses a real `border-l border-border` again, keeping the
framed `border` token, so the content rect starts after the divider. The
unframed `border-l border-border-seam` case is unchanged. No wire, CLI,
or doc changes.

## How you verified

- `pnpm exec turbo run test --filter=@bb/app -- ThreadSecondaryPanel`: 7
files, 52 tests pass.
- Packaged and launched the desktop app from this branch with `pnpm
desktop:worktree` on an M5 Mac. Opened a browser tab in the right panel
and checked a full-window screenshot: the divider runs the full height
of the native browser page, including well below the toolbar. The screen
checked was the new-thread compose view; it renders the panel through
the same `ThreadSecondaryPanel` path as the thread view.

> AGENT GENERATED

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-authored-by: Claude Opus 5.5 <[email protected]>
ymichael added a commit that referenced this pull request Oct 16, 2026
…ents (#5584)

## Human comments

## What was wrong

#5229 (0.46.0) made the icon rail the only sidebar navigation and
removed the plugin API that let a plugin draw it
(`experimental_sidebarNavigation`, `experimental_sidebarHeader`, and
their hooks).
- Users who preferred labeled rows had no way back (#5360).
- Navigation plugins on the marketplace stopped loading: Nav Rail,
Compact Nav, Collapsible Navigation, Slim Nav, Sidebar Subtitles, and
Herdr commands (#5376).
- Panel counts had nowhere to show, because the rail is icon-only and no
longer mounted `experimental_sidebarAccessory` (#5327). 30 bb-community
plugins draw one.

The old slot only covered rows above the thread list, so the rail and
the slot could not coexist.

## What changed

**One navigation slot with a declared placement.**
- `app.slots.experimental_sidebarNavigation` is restored under its
pre-0.46 names. Registrations declare `placement: "rail" | "list"`;
`list` is the default, so older plugins keep working.
- bb lays out the sidebar from the placement before the provider
renders:
- **rail:** a fixed column that stays when the sidebar collapses, New
thread in the header and Settings at the bottom of the column.
- **list:** rows above the thread list, the footer in the same column
after the thread list with a Settings action, Back to app rows on the
Settings, Plugins, and Skills lists, a collapse that hides the whole
sidebar, and the header slot.
- Both placements use the same macOS window frame on wide viewports.
Switching navigation keeps the title-bar controls in place and Settings
Search at the same height; sidebar headers do not reserve an empty
window-control gutter below the title bar. Providers without header
controls use only an 8-pixel top inset instead of reserving an empty
48-pixel header row. Compact windows retain the floating toggle.
- bb's Top list keeps the 0.45 row affordances: a hover "…" options
button (always shown on touch devices) with the same menu as
right-click, the split pane map beside a row's label when its page is
open in a split, and More only when a destination is hidden.
- bb's Top list pins New thread and More and scrolls the destinations
between them, capped near 70% of the window with fades at the scroll
edges, so many plugin panels or a short window can't push the thread
list out of view (the pre-0.46 rows could). The shared region stays
uncapped so plugin providers manage their own height.
- bb's own **Rail** (`navigation/rail`, the default) and **Top list**
(`navigation/top-list`) are the bundled Navigation plugin (see below),
so they use exactly the contract a third-party provider gets.
- The region is a `<nav>` element again, as before #5229, and list
placements keep the footer after the thread list in the same column, as
0.45 did. Plugins that find their column with `closest("nav")` and inset
what follows, such as Nav Rail, therefore dock with the footer beside
the rail.
- Picking a provider (`sidebar/sidebarNavigationProvider.ts`):
- `sidebar.navigationProvider` (Settings → Appearance → Navigation)
selects Automatic or a provider by plugin key.
- Automatic uses the first provider from a plugin the user installed,
else the first built-in one (Rail). A pinned provider that is missing
once plugins settle falls back the same way; with no provider at all the
sidebar uses the list placement and says no navigation plugin is
enabled.
  - Legacy `__builtin__` and `navigation/navigation` read as Automatic.
- Before plugin frontends settle, a plugin provider's last placement is
reserved, so a reload does not flash the rail.
- A crashing provider or header is replaced by the built-in provider for
its placement, with one toast.
- `experimental_Original` renders the built-in provider for the same
placement, or nothing when the Navigation plugin is disabled.

**Rail and Top list are a bundled, forkable plugin**
(`plugins/navigation`).
- The plugin registers both providers, plus Rail's New thread button as
its `headerComponent`, using only `experimental_useSidebarNavigation`,
`experimental_useSidebarNavigationSplit`,
`experimental_SidebarNavigationIcon`, and registry components. It is
default-enabled, on `scripts/forkable-plugins.json`, and served by the
demo server.
- The host keeps only what surrounds a provider: the placement layout
(including the rail's top inset), Settings, the customize editor, the
navigation model, and badge collection. The macOS window frame is
independent of navigation placement, and navigation headers sit below
the title bar on wide macOS windows.
- The shortcut pill, overflow fade, and split-pane mini-map move into
shared-ui and the component registry, so the app, Navigation, and Thread
list share one copy each (Thread list drops its private copies).

**Built-in providers come from the install source.**
- The app records which plugins were installed as built-ins from the
plugin list. Every replacement setting (thread list, navigation, source
code, diffs) labels their providers "(built-in)" and lists them after
installed plugins, and Automatic prefers a provider from an installed
plugin, then slot order. No per-slot constants remain.
- Monaco is a built-in plugin, so it now shows as "(built-in)" in the
Source code and Diffs settings, and Automatic prefers a third-party
renderer over it.
- The bundled Thread list option drops its "BB default." description;
the Automatic row already names what it chooses.
- The Navigation setting hides when no navigation plugin is installed,
like the thread list setting, and settings search uses the matching
condition.

**Shared model** (`SidebarNavigationModel.tsx`,
`lib/plugin-sidebar-navigation.ts`):
- `experimental_useSidebarNavigation()` returns `isHomeActive`, and its
actions include `goHome()`, `setOrder()`, and `openCustomize()`.
`openCustomize()` opens bb's editor in a popover beside any provider,
after open menus close, and returns focus to the control that opened it.
bb's menus and the editor call it "Customize navigation" on every
provider.
- Each panel's `experimental_useBadge` value is in the model as
`item.badge`. The badge sources mount once in the model instead of in
the rail.

**Badges (supersedes #5524).**
- This PR includes #5524's value-based `experimental_useBadge` and its
compatibility handling for `experimental_sidebarAccessory` (the field is
dropped with a warning), plus Tasks' migration to the hook.
- `ExperimentalBadge` is `{ count?, text?, tone?, label }`:
- `text` is a short visible value of at most 8 characters, such as
"NEW", "73%", or "2 down", and cannot be combined with `count`;
- `tone` is `neutral` (the default), `warning`, or `critical`, and bb
owns the colors.
- The fields follow the 30 bb-community plugins that drew
`experimental_sidebarAccessory`: 12 drew one count, 8 several numbers or
a fraction, 5 a short status, 3 a percentage, and 18 used red, amber, or
an accent color for state.
- Drawing:
- Fills are solid theme colors: muted gray for neutral, attention amber
with a new `--attention-foreground` for warning, and destructive red for
critical.
- The rail draws counts (capped at `9+`) and a tone-colored dot for
text, each cut out of the icon by a ring in the rail's own background.
- The Top list and More menu draw the count (capped at `99+`), the text,
or a dot.
- More's dot takes the strongest hidden tone, and the label is in every
accessible name.
- Plugins written before 0.46 that drew counts from the item's old
`experimental_Accessory` field show none until they read `item.badge`.

**Header.** A navigation's optional `headerComponent` renders in the
sidebar header row while it is active, replacing the separate
`experimental_sidebarHeader` slot and its `sidebar.headerProvider`
setting; that slot remains as an untyped runtime alias so a pre-0.46
plugin's header joins its navigation. The thread list setting is now
**Sidebar thread list**.

**Plugin SDK 0.6.53.**
- Restored types and runtime exports.
- `ExperimentalBadgeTone` and the new badge fields.
- Collector validation for `placement`.
- Test-harness support (the `sidebarNavigation` option and
`sidebarNavigationCalls`).
- Tasks now requires `>=0.6.53`. No server/daemon wire change.

**Docs.**
- `docs/configuration.md`, the customization guide, and the
plugin-authoring references (new `frontend-sidebar-navigation.md`, plus
`frontend-core-slots.md` and the API indexes).
- `docs/api_to_audit.md` entries with stabilization items and the core
callers on the same path.
- A Plugin Guide "Sidebar navigation" surface on the rail fixture, and
verify-bb rows for Top list and navigation/header plugins, including
disabling the Navigation plugin.
- The navigation docs, SDK doc comments, and renderer slot docs describe
the bundled Navigation plugin, the `navigation/*` keys, and the
built-in-aware Automatic rule.

## How you verified

- Empty header correction (`8cee6a05da`): the new regression test fails
before the fix; all 24 affected sidebar, header, and Settings tests pass
after it, along with app lint and typecheck. The rendered macOS
simulation confirms an 8-pixel inset above Top list and the retained
48-pixel Settings Search row.
- Desktop spacing fix (`fb133df5d9`): both regression tests fail before
the fix and pass after it. The 62 focused app layout, sidebar
chrome/header, and Settings tests pass; app lint and typecheck pass. An
isolated browser with simulated macOS chrome confirms Rail and Top list
use identical title-bar/toggle coordinates and Settings Search height,
with no extra window-control gutter. Compact windows retain their
floating toggle. This renderer check does not verify native Electron
window behavior.
- Windows CI timeout fix (`ae0adb0fa6`): the two ACP restart tests use
the same 30-second allowance as similar process-restart tests. All 499
ACP tests pass locally (4 skipped), along with lint and typecheck;
Windows confirmation remains with CI.

- Full typecheck, lint, and test run is left to CI on this branch
(rebased onto `399d63d277`). The rail and its Settings cell keep the
spacing from #5529 (compact macOS frame) and #5609 (row-rhythm
alignment), and the app typecheck passes after the rebase. Locally, the
affected app, SDK, Plugin Guide, Tasks, guide, mobile, and server suites
passed before the last rebase; the mobile theme and `global.css` were
regenerated for the new `--attention-foreground` token.
- `check-plugin-sdk-version.mjs` and `check-npm-version-guard.mjs` pass
at 0.6.53.
- Navigation plugin commit (`5a0cc8d599`):
- `scripts/check-plugin-forks.mjs plugins/navigation
plugins/thread-list`: both copies install, typecheck, test, and `bb
plugin build` outside the monorepo with published packages only (Thread
list passed on a re-run after one vitest worker start timeout under
load).
- Turbo typecheck and lint pass for the app, both sidebar plugins,
shared-ui, plugin registry, server, demo server, domain, SDK, Plugin
Guide, and templates. Tests pass for Navigation (14), Thread list,
Plugin Guide, plugin registry, demo server (which now serves both
sidebar plugins), the server's builtin-registry and UI-preference
suites, and 229 app test files across settings, lib, sidebar, code,
layout, and plugin. One app file (`PluginSettings.test.tsx`) failed
under the parallel run and passed alone.
- The app's Rail and Top list integration tests now load the real plugin
through `test/fixtures/navigation-plugin.ts`; the plugin's own drawing
(count caps, text badges, More's tone, menus, the header button) is
tested portably in `plugins/navigation/app.test.tsx`.
- After rebasing onto `399d63d277`: turbo typecheck and lint pass for
every package affected relative to main (155 tasks); Navigation, Thread
list, plugin registry, and 231 app test files pass.
- Ran `pnpm start:worktree` with the bundled plugin and the installed
Nav Rail, Compact Nav, and Collapsible Navigation plugins. I confirmed
the server and plugins come up, but did not repeat the visual pass below
after this commit.
- New and updated tests:
  - provider resolution (`sidebarNavigationProvider.test.ts`);
- plugin providers on the real SDK path: list placement, badges,
`openCustomize`, pinned built-ins, crash fallback, and Original
(`SidebarNavigationHost.test.tsx`);
- Top list rows, text and tone badges, the More dot, and Customize focus
(`SidebarNavigationList.test.tsx`);
- list placements keep the footer after the navigation in one column
(`AppSidebar.test.tsx`);
- the rail on the provider host, including invalid badge values (zero
count, count plus text, text over 8 characters, unknown tone), text
drawn as a toned dot, and More's strongest tone
(`SidebarNavigationRail.test.tsx`);
- the header slot, Back to app routing, and the last-known preference
store;
- SDK harness and placement validation, and the server reading stored
pre-0.46 provider rows.
- Manual checks with `pnpm start:worktree` in headless Chromium at
1440×900 (light and dark) and 390×844, plus the packaged macOS desktop
app (`pnpm desktop:worktree`), with Rail and Top list on the framed and
unframed windows:
- Installed from bb-community, unmodified: **Nav Rail**, **Compact
Nav**, and **Collapsible Navigation**. Each loads and draws its
navigation; Nav Rail docks as a vertical rail with the footer beside it
and moves New thread into the header; Compact Nav and Collapsible
Navigation also work as header providers.
- Installed the deleted `examples/plugins/sidebar-navigation` plugin:
Customize, Original, the crash fallback, pinning Rail over it, a reload
without a rail flash, and removal falling back to Rail.
- A local plugin with four badged panels (critical text, warning count,
warning text, neutral text) renders as intended on the rail and in the
Top list in both themes.
- Not verified: iOS Safari and the native mobile shell; the header
alignment on macOS after the header moved into the plugin. A pinned
plugin key that is not installed shows an empty rail-width column on the
first load until frontends settle, then falls back.

**Follow-up commits on this branch.**
- `fb133df5d9` keeps the macOS window chrome stable when switching
between rail and list placements (`AppLayout.tsx`, `SidebarChrome.tsx`,
with tests and docs).
- `8cee6a05da` removes the empty header row above Top list navigation
(`AppSidebar.tsx`, with a test).
- `ae0adb0fa6` gives the ACP restart tests enough time on Windows
(`provider-bridge-acp-next` test timeouts only).
- CI is green on `8cee6a05da`: 48 checks passed or skipped.

Supersedes #5524.

Fixes #5360
Fixes #5327

🤖 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.

macOS: sidebar toggle is obstructed by traffic-light controls

1 participant