Skip to content

Add per-pane new thread draft slots - #2404

Open
brsbl wants to merge 1 commit into
bb/sidebar-structure-thr_3zy8th6zycfrom
bb/sidebar-draft-slots-thr_2e2gbjx943
Open

Add per-pane new thread draft slots#2404
brsbl wants to merge 1 commit into
bb/sidebar-structure-thr_3zy8th6zycfrom
bb/sidebar-draft-slots-thr_2e2gbjx943

Conversation

@brsbl

@brsbl brsbl commented Aug 25, 2026

Copy link
Copy Markdown
Collaborator

What was wrong

New-thread compose state was keyed as one browser-wide prompt draft. A second pane therefore reused the same draft identity, and the app could not preserve independent unsent composers or their creation destinations across navigation and layout restoration.

What changed

  • Adds client-local draft slots with stable IDs, timestamps, and project/section submit-destination metadata.
  • Keys every app-owned new-thread pane and route to an explicit slot while keeping plugin-rendered composers outside Drafts state.
  • Opens a fresh empty slot for every ordinary route into a new-thread composer; only explicit draft/pane re-entry reuses a slot.
  • Migrates legacy singleton prompt storage and split-layout persistence deterministically, including corrupt/empty-state cleanup.
  • Preserves slot identity through split navigation, focus, maximize, close, remount, and sidebar modifier/drag interactions.
  • Adds no server state, server files, wire-contract changes, or daemon protocol changes.

Before — Phase 1 parent (c781d323e)

The same modified New thread action remains a singleton composer.

Before: one singleton new-thread composer

After — this PR (e503e4d35)

Two panes retain independent composer text in separate persisted draft slots.

After: two independent new-thread draft slots

How you verified

  • Focused draft-slot, compose-route, split-layout, sidebar split-drag, and plugin-composer regressions: 11 files / 160 tests passed.
  • pnpm exec turbo run typecheck: passed under Node 22.22.1.
  • pnpm exec turbo run lint: passed under Node 22.22.1.
  • Full @bb/app test suite: 436 files; 3,370 passed and 3 skipped.
  • Full repository test graph reached 69/75 tasks; the only failure was the unchanged bb-plugin-provider-claude-code recorded-conformance replay harness, which reported different missing replay cells across retries. This branch has no diff in that package.
  • Chrome for Testing 151.0.7922.71: verified initial paint, hard reload/restoration, modified New thread split creation, two independently editable/persisted composers, and right-panel collapse at 1440×900. Safari verification is still pending and this PR is not presented as merge-ready.

BB-Thread-ID: thr_2e2gbjx943

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.

1 participant