Conversation
ymichael
force-pushed
the
bb/fix-dragging-threads-into-worktrees-thr_pex33uqdb4
branch
from
September 22, 2026 18:50
6adf538 to
c9abd55
Compare
…ds-into-worktrees-thr_pex33uqdb4 # Conflicts: # HANDOFF.md
This branch has not been deployed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Human comments
This makes a worktree/environment group a valid thread-row drag target, supports dragging it back to a section to unparent it, makes thread nesting less finicky, gives group drags an accurate preview, and applies the whole group optimistically on drop.
What was wrong
Environment-group drags were excluded from the nest-target heuristic, so dropping a Worktree group on a thread row could never establish the requested parent relationship. After adding that path, section drops moved the group section but did not clear its root parent relationships. The heuristic also used a narrow row band, a 350 ms delay, and the dragged card edge for horizontal cancellation, making valid targets easy to miss. The group preview inherited the representative root thread's cached display title, so its floating overlay and projected child looked like one root thread. Group persistence also launched one independent optimistic transaction per root, repeatedly cancelling queries and allowing partial intermediate hierarchy states.
What changed
nest-groupdrop decision that reparents only group root threads, preserving descendants and preventing cycles.detach-groupdecision that unparents only group roots while moving the represented group into the target section.HANDOFF.mdand before/after reviewer evidence for parenting, unparenting, and the corrected child preview.How you verified
pnpm exec turbo run test --filter=bb-plugin-thread-list --force -- --run app/dnd/useSectionThreadDnd.test.ts app/dnd/useSectionThreadDnd.projection.test.tsx(46 passed)pnpm exec turbo run typecheck --filter=bb-plugin-thread-list --forcepnpm exec turbo run test --filter=@bb/app --force -- --run src/hooks/mutations/thread-state-mutations.test.tsx src/lib/plugin-bound-sdk.test.ts src/components/sidebar/useSectionThreadDnd.test.ts src/components/sidebar/useSectionThreadDnd.projection.test.tsx(65 passed)pnpm exec turbo run typecheck --filter=@bb/app --forcepnpm exec turbo run typecheck --filter=@get-bb/plugin-sdk --forceReviewer worktree group (2 threads).Related: #3029