Skip to content

Preserve restored panes during startup reconciliation - #2921

Merged
SawyerHood merged 1 commit into
mainfrom
slopcop/issue-2919
Sep 2, 2026
Merged

SawyerHood merged 1 commit into
mainfrom
slopcop/issue-2919

Conversation

@bb-slop-cop

@bb-slop-cop bb-slop-cop Bot commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Human comments

What was wrong

The startup route sent a restored split layout through the normal navigation reconciliation. When the layout had no composer, that path replaced the focused pane. The direct reproduction and root-cause report is https://get-bb.github.io/reports/issues/2919.html.

What changed

The first route reconciliation now adds a missing composer to the right edge when the layout has room. Later route navigation keeps the existing replacement behavior. This change does not alter a wire protocol, CLI surface, schema, or stored-data format.

How you verified

  • The regression test failed before the production change with one failed test and 43 passed tests.
  • The focused component suite passed all 44 tests after the change.
  • The component and navigation suites passed all 54 tests.
  • pnpm exec turbo run typecheck --filter=@bb/app passed.
  • git diff --check passed.
  • The change has 51 text-line additions and deletions across three files, with no binary files.
  • The pre-push EAP model-name scan found no matches in the working tree, tracked files, added lines, or commit messages.

Fixes #2919

AGENT GENERATED

@SawyerHood
SawyerHood merged commit 970480f into main Sep 2, 2026
15 checks passed
@SawyerHood
SawyerHood deleted the slopcop/issue-2919 branch September 2, 2026 17:40
SawyerHood added a commit that referenced this pull request Sep 3, 2026
…it (#3006)

## Human comments

## What was wrong

The "Handoff to new thread" action opened the composer in a new split
pane instead of the focused pane. `handleHandoffToNewThread` navigates
to the legacy project compose path `/projects/:projectId`
(`apps/app/src/views/thread-detail/ThreadDetailPromptArea.tsx:1004`).
`SplitWorkspaceRoute` answers that path with
`LegacyProjectComposeRedirect`, so React unmounts `SplitThreadArea`. The
redirect then replaces the URL with `/`, and `SplitThreadArea` mounts
again. PR #2921 gated its startup reconciliation behind a per-mount
`useRef`, so the remount looked like a fresh startup. The mount effect
therefore called `reconcileRestoredLayoutForContent`, which splits the
rightmost pane to the right for `new-thread` content. A handoff from the
personal project did not show the bug, because
`getProjectComposeRoutePath` returns `/` for that project and no unmount
happens.

## What changed

This pull request reverts commit `970480f6c6` (PR #2921). It removes
`reconcileRestoredLayoutForContent` from
`apps/app/src/views/thread-detail/splitThreadNavigation.ts`, removes the
`shouldReconcileRestoredLayout` ref from
`apps/app/src/views/thread-detail/SplitThreadArea.tsx`, and removes that
PR's regression test. Route reconciliation again always replaces the
focused pane. The change does not touch a wire protocol,
`HOST_DAEMON_PROTOCOL_VERSION`, a CLI surface, a schema, or a
stored-data format.

Note the cost of this revert: issue #2919 comes back. After a restart
with a restored multi-pane layout on `/`, the composer replaces a
restored thread pane instead of joining the layout at the right edge. A
later change can fix both bugs together. It must make the startup guard
true only for the first route reconciliation of the session, and not for
each mount of `SplitThreadArea`.

## How you verified

- `pnpm exec turbo run typecheck --filter=@bb/app` passed.
- `pnpm exec turbo run test --filter=@bb/app -- SplitThreadArea
splitThreadNavigation` passed with 4 test files and 58 tests.
- The first test run failed in the `ensure-native-modules` prerequisite
with a `better-sqlite3` segmentation fault. That step is unrelated to
this change, and the retry passed.
- This pull request adds no test. The reverted commit held the only test
of this reconciliation path, and the revert removes it.

Fixes #

This revert reopens #2919.

> AGENT GENERATED
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.

Restart replaces the focused pane with the New thread composer instead of adding it beside the restored panes

1 participant