Skip to content

Give the Top list sidebar a leading window-frame lip - #5703

Merged
ymichael merged 1 commit into
mainfrom
bb/test-top-list-frame-lip-fix-pr-5584-follow-up-thr_v642es9ycy
Oct 17, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/test-top-list-frame-lip-fix-pr-5584-follow-up-thr_v642es9ycy

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

Follow-up to #5584 (reported in #5584 (comment): "when top list enabled, right and left edges are not equal"). In the framed macOS desktop window, the window frame left an 8px lip on the right and bottom of the card. With the Rail placement, the rail fills the left side. With the list placement (Top list) there is no rail, and the frame had no leading lip, so the sidebar card (and the content card when the sidebar is collapsed) sat flush against the window's left edge. The collapsed title-bar reserve also assumed a rail was present, so the page title overlapped the sidebar toggle in Top list.

What changed

  • apps/app/src/components/ui/sidebar.tsx, apps/app/src/app.css: with the list placement, the frame gains a leading lip (--bb-window-frame-leading-lip), so the sidebar card and the collapsed content card are inset 8px on the left, matching the right and bottom. SidebarProvider publishes --bb-window-card-collapsed-left: the rail width for Rail, the leading lip for Top list.
  • apps/app/src/lib/bb-desktop.ts: MACOS_TITLE_BAR_COLLAPSED_SIDEBAR_RESERVE_CLASS subtracts --bb-window-card-collapsed-left instead of assuming a rail, so the title clears the toggle when the sidebar is collapsed in Top list.
  • Rail placement and non-macOS or unframed windows are unchanged. No wire, CLI, or plugin API changes.

How you verified

  • Added cases to apps/app/src/components/ui/sidebar.test.tsx for the leading lip and the published collapsed-left offset under both placements.
  • pnpm exec turbo run typecheck lint --filter=@bb/app and the sidebar/layout/secondary-panel tests pass.
  • Measured in the real Electron app via CDP, window 1280px wide:
    • Top list open: left gap 0 -> 8px; right and bottom gaps stay 8px.
    • Top list collapsed: left gap 0 -> 8px; the title now clears the sidebar toggle.
    • Rail open and collapsed: unchanged.

AGENT GENERATED

🤖 Generated with Claude Code

The framed macOS window left a lip on the right and bottom of the card but
none on the left when navigation used the list placement, so the sidebar card
(and the content card when collapsed) touched the window's left edge. The
collapsed title-bar reserve also assumed a rail, so page titles overlapped
the sidebar toggle in Top list.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ymichael
ymichael merged commit ed97d92 into main Oct 17, 2026
28 checks passed
@ymichael
ymichael deleted the bb/test-top-list-frame-lip-fix-pr-5584-follow-up-thr_v642es9ycy branch October 17, 2026 20:47
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