Skip to content

Drag cards into sections on the board#55

Merged
Ed-Barnes937 merged 1 commit into
mainfrom
dnd-board-view
Jul 13, 2026
Merged

Drag cards into sections on the board#55
Ed-Barnes937 merged 1 commit into
mainfrom
dnd-board-view

Conversation

@Ed-Barnes937

Copy link
Copy Markdown
Collaborator

What

Adds drag-and-drop to move agent cards between section columns in the Board view, with a blue hover preview of the section under the mouse while dragging.

How

  • Board .agent-cards are now draggable. dragstart stashes the session id in a dedicated draggingCardId module var — kept separate from the sidebar's draggingSessionId and the column-reorder's draggingColId so the three drag flows can't interfere.
  • Each section column is wired as a drop target (makeCardDropTarget): dragover highlights the whole column in accent blue, drop calls the existing move_to_section command. The "No section" catch-all clears the pin (section: null); dropping on the card's current section is a no-op.
  • CSS: .board-col.card-drop-target (2px --accent outline + faint accent fill) for the hover preview, and .agent-card.dragging (0.5 opacity) for drag feedback, matching the existing sidebar/tab drag affordances.

No backend changes — reuses the existing move_to_section Tauri command.

Testing

  • npm run typecheck / npm run build — clean
  • npm test — 49 unit tests pass
  • npm run test-iwft -- scenarios/board — 13 pass, including 4 new tests: re-pin to another section, clear pin via "No section", no-op guard on the current section, and the accent-blue hover preview.

🤖 Generated with Claude Code

Make board agent cards draggable onto section columns to re-pin a
session's section, mirroring the existing sidebar row → section-header
drag. A dragstart stashes the session id in a dedicated draggingCardId
(kept apart from the sidebar's draggingSessionId and the column-reorder's
draggingColId so the three drag flows don't interfere); each column is a
drop target that highlights in accent blue while a card hovers and calls
move_to_section on drop — clearing the pin on the "No section" catch-all
and short-circuiting a no-op drop on the card's current section.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@Ed-Barnes937
Ed-Barnes937 merged commit fab2f58 into main Jul 13, 2026
4 checks passed
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