Skip to content

A project's new-thread button replaces the focused pane instead of opening beside it #2795

Description

@Techno911

The workflow

I work with several thread panes open at once (three or four is normal). When I want one more thread in a specific project, I hover that project's row in the sidebar and press its plus button.

Steps (bb 0.40.0, macOS desktop app, sidebar organized "By project"):

  1. Open two or three threads in panes.
  2. Focus one of them.
  3. Hover a project row in the sidebar and press the plus button ("New thread in ").

What happens today

The composer replaces the focused pane, so the thread I was reading disappears from the workspace. The handler navigates to the root compose route (

);
const setCollapsedProjectIdList = useSetAtom(collapsedProjectIdsAtom);
const [collapsedThreadIdList, setCollapsedThreadIdList] = useAtom(
collapsedThreadIdsAtom,
);
const [collapsedEnvironmentIdList, setCollapsedEnvironmentIdList] = useAtom(
collapsedEnvironmentIdsAtom,
);
const setCollapsedMachineKeyList = useSetAtom(sidebarCollapsedMachinesAtom);
const [collapsedSidebarSectionIdList, setCollapsedSidebarSectionIdList] =
useAtom(collapsedSidebarSectionIdsAtom);
const [openSidebarMenu, setOpenSidebarMenu] = useState<OpenSidebarMenu>(null);
const setSidebarMenuOpen = useCallback(
(menu: Exclude<OpenSidebarMenu, null>, open: boolean) => {
setOpenSidebarMenu((current) =>
open ? menu : current === menu ? null : current,
);
},
), and reconcileLayoutForContent then swaps the focused pane's content for the composer. The sidebar's global "New thread" button has an escape hatch for this (Mod+click opens it in a split); the per-project and per-section plus buttons have none, and the button is the natural way to start a thread in a specific project.

Second, smaller thing from the same workflow: the split cap is eight panes (MAX_PANES in apps/app/src/lib/split-layout/ops.ts). Past that, an edge placement replaces the focused pane, which is the same surprise as above at a different moment.

What you would expect

The plus button on a project row (and on a section row, and on the Threads section) opens the composer in a new pane beside the current one, scoped to that project, and leaves every open pane alone. If a composer pane is already open, it keeps its singleton behavior: focus it and retarget its project rather than opening a second one.

And a cap high enough that a normal workspace never meets it.

Prototype (not a PR, per CONTRIBUTING): https://github.com/Techno911/bb/tree/feature/thread-project-dnd-and-panes — commit Techno911@69e3d53

There the sidebar create handler routes through the existing openPaneContentInSplit with { kind: "new-thread" } content, so the composer lands in a pane to the right and the compact viewport keeps its current single-page behavior. MAX_PANES moves from 8 to 64, and the pane-cap tests, docs/configuration.md, the threads guide, and the bb-cli skill move with it. Checked in a dev instance driven with Playwright: with a thread open, the plus button leaves it in place and adds the composer beside it, and ten panes open past the old cap.

Open question for your call: whether the plus buttons should always open beside, as in the prototype, or whether the split should stay behind a modifier for consistency with the global "New thread" button.

Context and alternatives

The workaround today is to press the global "New thread" button with Mod held and then pick the project inside the composer, which is two extra steps and loses the point of the per-project button.

Checks

  • I searched open and closed issues for the same request.

AGENT GENERATED

Activity

  1. added theissue type on Sep 1, 2026
  2. added
    ui
    confirmed-repro
    on Sep 1, 2026
  3. bb-slop-cop commented on Sep 1, 2026

    @bb-slop-cop
    Contributor

    🚨 SLOP COP 🚨 · new-issue-autopilot

    Classification: Type Bug · Priority Medium · Effort Medium · labels ui, confirmed-repro.

    Report: https://get-bb.github.io/reports/issues/2795.html
    Verdict: REPRODUCED · confidence: high · reproduction label: confirmed-repro.

    Root cause: The scoped create handler navigates directly to composer content, so route reconciliation replaces the focused pane.

    No pull request was safe. The split interaction and pane-cap behavior require product decisions.

  4. Techno911 commented on Sep 1, 2026

    @Techno911
    Author

    Scope correction after using the prototype: the plus button was only one of eleven entry points that start a thread, and the rest still replaced the focused pane. Starting a thread from the sidebar button, the keyboard shortcut, the quick palette, a plugin panel, a plugin's sidebar list, the skill library, the plugin editor, the custom palette prompt, a fork, a new worktree thread, or right after creating a project all closed whatever pane the user was watching.

    The prototype branch now routes every one of them through a single useOpenNewThreadPane hook, so the rule holds wherever the user is, and adds apps/app/src/hooks/useOpenNewThreadPane.test.ts, which fails when a new file navigates to the compose route on its own. Redirect-after-delete callers (thread and project actions, resource route owner, compose self-navigation, settings route memory) stay on an explicit list, since replacing a pane whose content just disappeared is correct.

    The automations edit route keeps its history replacement through an explicit replaceHistoryEntry flag, so Back still leaves the edit route once.

    Commit: Techno911@d724833ef

    AGENT GENERATED

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    confirmed-reproui

    Type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions