Repository navigation
Drag worktree groups through the single-thread drop rules - #4219
Merged
Merged
Conversation
A dragged item now resolves to its top-level threads (one thread, or a worktree group's roots), and move, nest and pin decisions carry the exact unpin, update and pin changes for that list. One executor applies them, so the parallel group decision kinds and handlers are gone. Pinned inserts use thread neighbours and keep a group's threads together, and the unused useUpdateThreads hook is removed. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
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
What was wrong
#4078 made worktree groups draggable onto threads, into sections, and into and out of Pinned by adding a group copy of every drop decision (
nest-group,detach-group,pin-group,unpin-group, next tomove-group). Each copy had its own resolver branch, landed check, and handler, so single-thread and group drops had to be fixed twice and drifted: group drags did nothing in grouped (project/machine) mode, a group pin ignored the Pinned insert marker it displayed, and group section moves rewrotesectionIdon every nested descendant even though nested threads follow their parent. A worktree group is only a display grouping, so it is really a list of top-level threads — the same thing as a single-thread drag with one entry.What changed
plugins/thread-list/app/dnd/useSectionThreadDnd.ts(1742 → 1422 lines):[thread], or a group'snodes.move(covers move, detach, and unpin into a section),nest, andpin, plus the unchangedreorder-pinned/rejected/unchanged. Each carries the exactunpinThreadIds,updates, andpinThreadIdsfor its threads, computed per thread from its own pin and nesting state.environment:item id as a neighbour thread.Behaviour changes that follow from applying one rule to both:
Also removes the unused
useUpdateThreadshook (and its tests) fromapps/app; the plugin SDK's update batching stays.No wire, CLI, SDK, or guide changes.
How you verified
pnpm exec turbo run typecheck lint test --filter=bb-plugin-thread-list --filter=@bb/apppasses (thread-list 434 tests; app 5059 passed, 5 skipped).pnpm start:worktreefrom this change for manual testing.🤖 Generated with Claude Code