Repository navigation
Fix desktop right-panel toggle drag region - #6105
Merged
Merged
Conversation
ymichael
deleted the
bb/test-right-panel-drag-fix-on-m5-thr_ubzxcbrdv6
branch
October 22, 2026 06:26
ymichael
added a commit
that referenced
this pull request
Oct 26, 2026
## 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 `Panel`s 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](https://claude.com/claude-code) Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
What was wrong
The show-right-panel button protrudes beyond its header actions wrapper because framed macOS chrome applies a negative trailing margin. The wrapper's no-drag region therefore does not cover the full button, allowing Electron to treat clicks on the icon as window dragging after navigating to a thread.
What changed
Apply the existing macOS no-drag class directly to the show-right-panel button when desktop chrome is active, matching the hide-panel button. This excludes the whole button from the window drag region.
How you verified
pnpm exec turbo run test --filter=@bb/app -- ThreadDetailHeader.test.tsx: all 22 tests passed on M5.git diff --check: passed.pnpm desktop:worktree: packaged and launched the isolated M5 desktop app; server and host-daemon health checks passed, with the M5 host connected and a separate Electron profile.