Skip to content

Keep New thread split composers independent - #3931

Draft
brsbl wants to merge 5 commits into
mainfrom
bb/independent-new-thread-composers-thr_zii489aezg
Draft

brsbl wants to merge 5 commits into
mainfrom
bb/independent-new-thread-composers-thr_zii489aezg

Conversation

@brsbl

@brsbl brsbl commented Sep 19, 2026

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

New thread splits reused the singleton composer and its draft buffer. Opening another composer could overwrite unfinished text, and pane rearrangement could reset local selections.

What changed

  • Explicit split composers own independent text, attachments, project, and execution selections through existing prompt storage and stable pane identity.
  • Moving, swapping, collapsing, and compact presentation preserve composer identity; nonempty replacement confirms discard and pending creation blocks mutation.
  • SDK threads.openNew() and bb thread open --new [--split <placement>] use authenticated HTTP and the existing realtime hub.
  • CLI discovery and Plugin Guide surfaces document the additive API; strict layout v1 and legacy thread-open contracts remain compatible.

How you verified

  • Full remote CI and the PR run passed at 719bd3567e549a787a074766c88876d7c9f9e2b2.
  • Chrome for Testing 153.0.8010.36 passed the affected branch-app flow at 1440×1000 and compact 700×900.
  • Live source SDK/CLI opening and save-to-origin passed; a controlled failed creation restored the same text and attachment.
Focused regression and runtime evidence

Remote regressions cover keyed storage, legacy v1 hydration, collision-resistant pane identity, ordinary versus composer swaps, route seeds, isolated selections, stale completion, pending mutation guards, discard, CLI/SDK delivery, and lenient legacy signal handling.

Runtime checks covered two distinct composer buffers and attachments through center swap, side move, collapse, compact/desktop transition, and reload. Changing one project's selection preserved the neighboring selection. Nonempty close could be cancelled; confirmed replacement cleared only its own buffer. An empty pane closed immediately.

During a delayed create, editing, closing, and SDK replacement left the composer intact. A controlled HTTP failure restored its original text and attachment. A successful save returned HTTP 201 with the selected Claude provider and replaced only its originating pane; the neighboring composer retained its buffer and attachment.

Connected source CLI and SDK openNew created fresh panes. Compact CLI opening restored the legacy singleton buffer. The isolated server retained an internal realtime subscriber with browser pages closed; zero-client delivery is verified by remote hub/route regressions, not claimed as a zero-subscriber runtime result.

Actual provider-turn dispatch and native-mobile interaction were not exercised. Mobile fallback has realtime regression coverage. The single deliberate code review remains reserved for the coordinator's final workflow.

Same synthetic project, / route, light theme, 1440×1000 CSS viewport, and 2× capture. Open New thread in a split and enter the second prompt: the base has one overwritten editor; the head retains both prompts. Screenshots come from exact pinned base 638bef00662d1aeed626af7b63c0bb90e8b418f0 and exact head 719bd3567e549a787a074766c88876d7c9f9e2b2.

Both captures use Claude Haiku, Low reasoning, and auto permission (Approve for me), with the editor focused. Existing narrow-pane labels hide Low and shorten Approve for me to Auto; the execution choices are identical.

Before

Before: opening another New thread reuses one composer

After

After: independent New thread composers retain distinct prompts

BB-Thread-ID: thr_zii489aezg

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