Summary
Allow users to reassign a Project from one Client to another by dragging it in the sidebar.
Scope
- Extend dnd-kit setup to support cross-container drops (Project dragged onto a different Client section)
- Add
useDroppable zones on Client section headers/bodies
- On cross-container drop: dispatch
project.client.reassign command
- On drop onto "Unassigned": dispatch
project.client.unassign command
- On drag from "Unassigned" onto a Client: dispatch
project.client.assign command
- Drop onto same Client: no-op
- Drop onto archived Client: rejected with visual feedback
Technical notes — dnd-kit refactor required
The current drag setup needs significant changes for cross-container support:
- Multiple
SortableContext containers — one per Client section (currently one flat list)
DragOverlay component — needed for visual feedback during cross-container drags (currently absent)
- Custom collision detection — must distinguish "reorder within container" from "move to different container"
- Conditional modifiers — vertical-only for reorder within a Client, free movement when crossing Clients
- Data payload on drag items — tag each draggable with
{ type: "client" | "project", id } to route onDragEnd logic
- Optimistic UI with rollback on command failure
Key files to modify
apps/web/src/components/Sidebar.tsx — major DndContext refactor: multiple containers, DragOverlay, collision detection
apps/web/src/store.ts — optimistic project reassignment
Dependencies
- F2 (Client-Project binding commands), F3 (sidebar hierarchy)
Acceptance criteria
Summary
Allow users to reassign a Project from one Client to another by dragging it in the sidebar.
Scope
useDroppablezones on Client section headers/bodiesproject.client.reassigncommandproject.client.unassigncommandproject.client.assigncommandTechnical notes — dnd-kit refactor required
The current drag setup needs significant changes for cross-container support:
SortableContextcontainers — one per Client section (currently one flat list)DragOverlaycomponent — needed for visual feedback during cross-container drags (currently absent){ type: "client" | "project", id }to routeonDragEndlogicKey files to modify
apps/web/src/components/Sidebar.tsx— major DndContext refactor: multiple containers, DragOverlay, collision detectionapps/web/src/store.ts— optimistic project reassignmentDependencies
Acceptance criteria