Skip to content

Fix sidebar drop affordances for other projects - #5046

Merged
ymichael merged 3 commits into
mainfrom
bb/fix-thread-drop-affordance-thr_95ia32cphi
Oct 6, 2026
Merged

ymichael merged 3 commits into
mainfrom
bb/fix-thread-drop-affordance-thr_95ia32cphi

Conversation

@ymichael

@ymichael ymichael commented Oct 6, 2026 •

Copy link
Copy Markdown
Collaborator

Human comments

What was wrong

In the sidebar's By project mode, project groups were treated as unrestricted drop destinations. Dragging a pinned or child thread onto another project's header or row could show a valid landing affordance and attempt to unpin or detach the thread, even though the drop cannot change its project.

What changed

Track each project group's project ID, including the personal Threads container, and reject mismatched destinations during collision detection and drop resolution. Invalid destinations no longer highlight or show landing previews, and releasing there leaves the thread unchanged. Drops into the thread's own project and supported cross-project parent/child links remain available. No wire, CLI, or public SDK changes. Also align the cache-owner import registry with the sidebar group owner introduced in #5045: declare its six imports and remove the stale projectsQueryKey allowance from the thread state owner.

How you verified

  • Added four regression cases covering another project's header and row, an empty project, and the personal Threads group. Each checks that a valid prior target clears and dropping causes no mutation.
  • pnpm exec turbo run test --filter=bb-plugin-thread-list -- app/dnd/useSectionThreadDnd.test.ts app/dnd/useSectionThreadDnd.projection.test.tsx: 62 passed, including existing cross-project nesting coverage.
  • pnpm exec turbo run typecheck lint --filter=bb-plugin-thread-list: passed; lint reports 9 existing warnings and no errors.
  • Real browser mouse drags in an isolated source app: another project and an empty project show no drop indicators or preview; dropping preserves project and pin state. Dropping onto the thread's own project unpins it, and the placement survives reload.
  • Reproduced the cache-owner registry CI failure locally, then verified all 3 registry checks pass after the update: pnpm exec turbo run test --filter=@bb/app -- src/hooks/cache-owners/cache-owner-registry.test.ts. The 62 drag checks also pass after merging current main.
  • Prepared and started pnpm start:worktree with labeled test projects and threads for manual review.

AGENT GENERATED

@ymichael
ymichael merged commit 6e348ee into main Oct 6, 2026
41 checks passed
@ymichael
ymichael deleted the bb/fix-thread-drop-affordance-thr_95ia32cphi branch October 6, 2026 20:47
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