Skip to content

Keep collapsed panels from covering title-bar buttons - #6211

Merged
ymichael merged 1 commit into
mainfrom
bb/verify-right-panel-button-fix-on-m5-thr_kjwrpdupdb
Oct 26, 2026
Merged

ymichael merged 1 commit into
mainfrom
bb/verify-right-panel-button-fix-on-m5-thr_kjwrpdupdb

Conversation

@ymichael

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

In the desktop app, the "Show right panel" button in the thread header sometimes stopped responding. Dragging from it moved the window, it showed no hover state, and only ⌘J or visiting the new-thread page brought it back. While the button was stuck on a live bb Nightly, the collapsed right panel (#thread-detail-secondary-panel, 0px wide) had scrollLeft=283. react-resizable-panels sets an inline overflow: hidden on every Panel, which overrides our overflow-clip class, so every panel was scrollable from code. Once the collapsed panel was scrolled, its hidden aside moved back into the window. Painting stayed clipped to the 0px panel, but Electron's drag regions ignore overflow clipping. The aside's title-bar chrome (thread-secondary-panel-top-chrome, a drag region later in the DOM than the header) therefore sat over the button. Reopening the panel reset the scroll to 0, which is why ⌘J fixed it. We still don't know what scrolls the panel in real use; the tab strip's scrollIntoView was ruled out. This fix makes the scroll impossible, so the cause no longer matters. #6105 fixed a different overlap of this toggle's drag region.

What changed

Each of the five product Panels now gets an inline style={{ overflow: "clip" }}, which overrides the library's hidden. The dead overflow-clip class is removed. clip paints the same as hidden, but the element is not a scroll container, so neither scrollIntoView nor setting scrollLeft can move a collapsed panel.

  • ThreadSecondaryPanel.tsx (SECONDARY_RESIZABLE_PANEL_STYLE)
  • SecondaryPanelLayout.tsx (main panel)
  • lazySecondaryPanelComponents.tsx (inline placeholder)
  • SplitWorkspaceSecondaryPanelHost.tsx (both panels)

No wire, CLI, or plugin API changes.

How you verified

  • pnpm exec turbo run typecheck --filter=@bb/app passes.
  • vitest run src/components/secondary-panel src/views/thread-detail in apps/app: 78 files, 795 tests pass.
  • Packaged desktop app from this branch (turbo run package --filter=@bb/desktop), launched against an isolated worktree instance with --remote-debugging-port. In a real thread, I opened and then closed the right panel, then forced the scroll over CDP with document.querySelector('#thread-detail-secondary-panel [aria-label^="Hide right panel"]').scrollIntoView({inline:"nearest"}) and scrollLeft = 283:
scrollLeft after scrollIntoView / set 283 Drag-region model over "Show right panel" (left, center, right)
This branch (overflow: clip) 0 / 0 no-drag, no-drag, no-drag (the button)
Same window with main's inline overflow: hidden put back 446 / 283 hidden aside's Full Screen button, its icon, drag strip

The second row reproduces the stuck state seen on the nightly. Not yet covered: a person hovering and clicking the button in the packaged build after the forced scroll. That check is with Michael on the M5.

AGENT GENERATED

🤖 Generated with Claude Code

react-resizable-panels sets an inline overflow: hidden on every Panel,
overriding our overflow-clip class, so each panel was a scroll container.
When something scrolled the collapsed right panel sideways, its hidden
contents shifted back into the window. Painting stayed clipped to the
0px panel, but Electron's drag regions ignore clipping, so the panel's
title-bar drag strip covered the "Show right panel" button and clicks
moved the window instead. Reopening the panel reset the scroll.

Give every Panel an inline overflow: clip, which can't be scrolled.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
@ymichael
ymichael merged commit 579fa2b into main Oct 26, 2026
29 checks passed
@ymichael
ymichael deleted the bb/verify-right-panel-button-fix-on-m5-thr_kjwrpdupdb branch October 26, 2026 16:58
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