Skip to content

Preserve placement when creating threads from sidebar groups - #4503

Merged
ymichael merged 3 commits into
mainfrom
fix/thread-creation-placement
Sep 29, 2026
Merged

ymichael merged 3 commits into
mainfrom
fix/thread-creation-placement

Conversation

@ymichael

@ymichael ymichael commented Sep 29, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

New-thread actions inferred placement from a representative thread, so creating from a pinned environment row silently created an unpinned thread in its underlying section. Other entry points could retain stale section state, and the composer did not show its destination. Related API context: #4323; no matching open bug was found.

What changed

Creation now carries explicit section and pin intent separately from project, machine, and environment choice. Pinned groups pin; custom sections select that section; project/machine/general groups start unsectioned and unpinned. Environment rows reuse their environment and containing group's placement. A pinned environment retains a common underlying section, or none for a mixed-section group. Source-thread actions and forks preserve source placement.

The composer keeps its existing UI and persists inferred placement and reuse-environment choice across reload. The server writes section, pinned timestamp, and pin order together at creation. SDK threads.spawn accepts pinned; CLI adds bb thread spawn --pinned; plugin openNewThread adds experimental_placement. Guides and API audit are updated; plugin SDK compatibility version is bumped to 0.6.1. Existing callers default unpinned; legacy sectionId remains supported. No schema migration or host-daemon protocol change.

How you verified

  • After removing the destination control: 132 focused composer/placement tests plus app typecheck and lint pass.
  • SDK version alignment test and version-bump guard pass.
  • Turbo typechecks and lint for app/server/CLI/database/sidebar: pass, no lint errors.
  • 463 sidebar tests; 133 selected app tests; 56 composer integration tests; 52 database, 45 CLI, 40 contract, and 12 server creation tests pass.
  • Matched base and PR browser QA: pinned environment creation reproduces the misplaced unpinned thread on base; PR keeps the new thread pinned and preserves its underlying section. Section creation and reload persistence checked, including unsent project/environment/destination choice.
  • Persistent isolated QA servers: PR and matched base. Provider concurrency is zero in both test instances. No production source or runtime changes.

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