Repository navigation
Description
Summary
With one thread open, resizing across the compact breakpoint unmounts and remounts the entire thread view: timeline, composer editor, scroll keeper and plugin slots. The composer loses focus, its selection collapses to the end, and the timeline scroller is recreated. Expected: the thread view stays mounted and only the surrounding chrome changes.
I am filing this as a bug because the remount loses editor state the user did not ask to discard. The fix does not change what is rendered. It has one incidental plugin-visible consequence, described under Proposed fix.
Versions and environment
mainat 3a2c49a; the same code ships in 0.47.1.- Any client that can cross the compact breakpoint: a desktop window resized narrow, split-screen or tablet rotation.
Steps to reproduce
- Open one thread with no split. Type text in the composer, select part of it, and scroll the timeline up.
- Narrow the window below the compact breakpoint (for example 1200 → 660 px wide), then widen it again.
Expected vs actual
Expected: the same composer editor, focus and selection; the same timeline scroller.
Actual: both are recreated at each crossing; focus is lost and the selection collapses to the end.
Evidence
- When the viewport is compact,
SplitThreadAreaContentrendersStandalonePaneContent:bb/apps/app/src/views/thread-detail/SplitThreadArea.tsx
Lines 683 to 696 in 3a2c49a
if (layout === null || currentContent === null) return null; if (!splitWorkspaceActive) { return ( <StandalonePaneContent content={currentContent} paneId={layout.focusedPaneId} onRequestClose={ currentContent.kind === "new-thread" ? null : () => closePane(layout.focusedPaneId) } onNavigateInPane={navigateInPane} /> ); - On desktop, the same single thread renders through
WorkspacePaneContent:bb/apps/app/src/views/thread-detail/SplitThreadArea.tsx
Lines 714 to 720 in 3a2c49a
const firstPane = panes[0]; if (panes.length === 1 && firstPane !== undefined) { return ( <> {commandHandlers} <WorkspacePaneContent content={firstPane.content} - The two branches are different element types at the same position, so React remounts the subtree.
- An earlier headless Chromium run of the web app, using a local build with the same component change on an older base, found for a 1200 ↔ 660 px crossing: median input-to-first-frame 171 ms → 92–93 ms (n = 12 per direction), DOM mutations per crossing 1916 → 899. In that run the ProseMirror editor and timeline scroller nodes, the draft, focus and selection survived repeated crossings. A within-desktop 1200 ↔ 900 px resize was unchanged. These figures are not from current
main, Electron, iOS or a physical device.
Proposed fix
https://github.com/JackALaing/bb/tree/fix/compact-single-pane-stable (one commit, 55f702b, on main at 3a2c49a)
- When the layout holds one pane and the route shows a thread, render
WorkspacePaneContenton both sides of the breakpoint. On compact it renders the routed thread, so route navigation shows the next thread immediately. Split command handlers are registered only while the split workspace is active. - Splits still collapse to the focused pane on compact and restore on desktop. A compact new-thread composer keeps
StandalonePaneContent. - Incidental plugin-visible consequence: on compact, the single thread pane's
PaneContext.paneId/data-split-pane-idbecomes the layout's pane id (for examplepane-1) instead of"main", matching desktop. - Tests in
SplitThreadArea.test.tsx(79 pass; 4 new ones fail againstmain'sSplitThreadArea.tsx): mount identity with draft, focus, selection and scroll; identical pane chrome on both sides; plugin composer scope across crossings and route navigation; split collapse/restore; opening a thread from the compact composer. These tests use a fixture thread pane in jsdom, not the fullThreadDetailViewwith ProseMirror. No browser or device check was run on this exact commit.
What you ruled out
- Within-desktop resizes do not remount.
- Splits are not affected: they already collapse to the focused pane on compact and restore on desktop, and the fix keeps that behavior.
Checks
- I reproduced this on the latest release or on
main, or I say above that I could not. - I searched open and closed issues for the same problem.
- If an agent wrote this, the body ends with
> AGENT GENERATEDand links the thread or report.
AGENT GENERATED
Activity
bb-slop-cop commentedon Oct 26, 2026
🚨 SLOP COP 🚨 ·
new-issue-autopilotui. All were missing and have been applied.confirmed-repro.3a2c49a26: node identity, focus, selection and scroll are lost; persisted draft text survives. All 70 existing owner-suite tests pass. Full ProseMirror cursor position and device behavior remain unverified.Keep the compact single thread pane mounted across the breakpoint (ge…
Make plugin surfaces prove they use core's path and delete plugin-onl…