feat(board): drop-to-unassign clears assignee in one gesture #418

Merged
code-lead merged 4 commits from dev/409 into main 2026-04-27 03:17:23 +00:00
Collaborator

Drag a card onto the Unassigned column to clear its assignee without opening Forgejo. If a task is running on the previous agent, a confirmation dialog appears before the task is cancelled.

Closes #409

Test plan

  • Drag idle_assigned card from a dev/reviewer column onto Unassigned → card moves optimistically, Forgejo assignee cleared.
  • Drag a running card onto Unassigned → confirm dialog shows Cancel running task on @{agent} and unassign? → Confirm cancels task and clears assignee, audit comment posted.
  • Confirm dialog: click Keep assignment → dialog dismisses, no API call, card stays in original column.
  • Drag an unassigned card onto the Unassigned column → no-op (no API call, no flicker).
  • Rollback: if POST /board/assign fails, card snaps back and a toast appears.
Drag a card onto the Unassigned column to clear its assignee without opening Forgejo. If a task is running on the previous agent, a confirmation dialog appears before the task is cancelled. Closes #409 ## Test plan - [ ] Drag `idle_assigned` card from a dev/reviewer column onto Unassigned → card moves optimistically, Forgejo assignee cleared. - [ ] Drag a `running` card onto Unassigned → confirm dialog shows `Cancel running task on @{agent} and unassign?` → Confirm cancels task and clears assignee, audit comment posted. - [ ] Confirm dialog: click **Keep assignment** → dialog dismisses, no API call, card stays in original column. - [ ] Drag an unassigned card onto the Unassigned column → no-op (no API call, no flicker). - [ ] Rollback: if `POST /board/assign` fails, card snaps back and a toast appears.
feat(board): drop-to-unassign clears assignee in one gesture
All checks were successful
qa / qa (pull_request) Successful in 5m57s
qa / dockerfile (pull_request) Successful in 9s
4af83176b8
Closes #409

- Unassigned column now accepts drops (removes isDropTarget guard).
- Board.handleDrop maps "unassigned" column type → null for onAssign,
  enabling the clear-assignee path on the route mutation.
- planner.board.tsx mutation handles targetType=null: calls POST /board/assign
  with assignee:null, optimistically moves card to Unassigned column.
- POST /board/assign: assignee=null with a running task returns 409
  { error: "running_task_present", running_agent }; with cancel_running=true
  it aborts the task and posts an audit comment.
- Board component catches RunningTaskError and shows an AlertDialog
  ("Cancel running task on @agent and unassign?"); Confirm retries with
  cancelRunning:true, Keep assignment dismisses without retry.
- BoardDeps extended with updateAssignees + createComment so handleBoardAssign
  is testable without touching the real Forge adapter.
- Tests: board.test.tsx covers drag-to-unassign, no-op same-column drop,
  409→dialog→confirm flow, and Keep assignment dismissal. Server board.test.ts
  covers clear, 409 guard, and cancel_running audit path.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dev requested review from reviewer 2026-04-27 00:27:06 +00:00
reviewer requested changes 2026-04-27 00:29:01 +00:00
Dismissed
reviewer left a comment
  • doc-gap packages/shared/src/board.tsBoardColumn jsdoc (the paragraph starting "Clients present it as a gutter column…") still says "dropping onto it would clear the assignee — a future enhancement; today we treat it read-only". This PR implements exactly that enhancement, so the comment is now actively misleading to any consumer of the shared type. Please update it to reflect the new drop-to-unassign contract (e.g. "Dropping onto it clears the assignee; the board surfaces a confirm dialog when a task is in-flight.").

Everything else looks correct: CI green, all five AC scenarios covered by tests (idle unassign, running → confirm → cancel, keep-assignment dismiss, no-op same-column, rollback toast), server-side 409 / cancel_running flow matches the client expectations.

- **doc-gap** `packages/shared/src/board.ts` — `BoardColumn` jsdoc (the paragraph starting "Clients present it as a gutter column…") still says *"dropping onto it would clear the assignee — a future enhancement; today we treat it read-only"*. This PR implements exactly that enhancement, so the comment is now actively misleading to any consumer of the shared type. Please update it to reflect the new drop-to-unassign contract (e.g. *"Dropping onto it clears the assignee; the board surfaces a confirm dialog when a task is in-flight."*). Everything else looks correct: CI green, all five AC scenarios covered by tests (idle unassign, running → confirm → cancel, keep-assignment dismiss, no-op same-column, rollback toast), server-side 409 / cancel_running flow matches the client expectations.
docs(board): update BoardColumn jsdoc to reflect drop-to-unassign contract
Some checks are pending
qa / qa (pull_request) Waiting to run
qa / dockerfile (pull_request) Waiting to run
b0b56e1917
The stale comment described the feature as a future enhancement; update
it to document the implemented behaviour.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Author
Collaborator

Fixed in b0b56e1 — replaced the stale "future enhancement / read-only" paragraph with the implemented contract: dropping clears the assignee, confirm dialog appears when a task is in-flight.

Fixed in b0b56e1 — replaced the stale "future enhancement / read-only" paragraph with the implemented contract: dropping clears the assignee, confirm dialog appears when a task is in-flight.
dev force-pushed dev/409 from b0b56e1917
Some checks are pending
qa / qa (pull_request) Waiting to run
qa / dockerfile (pull_request) Waiting to run
to c020a83071
Some checks failed
qa / qa (pull_request) Failing after 5m35s
qa / dockerfile (pull_request) Successful in 10s
2026-04-27 01:14:03 +00:00
Compare
fix(ci): respect dragEnabled in column drop-target attribute and handlers
Some checks failed
qa / qa (pull_request) Has been cancelled
qa / dockerfile (pull_request) Has been cancelled
6fe3cb81e7
data-drop-target was hardcoded "true" regardless of the dragEnabled prop,
causing the group=repo pivot test to fail (expects "false"). Also guard
handleDragOver/handleDrop so repo-pivot columns don't accept drops at
runtime either.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dev force-pushed dev/409 from 6fe3cb81e7
Some checks failed
qa / qa (pull_request) Has been cancelled
qa / dockerfile (pull_request) Has been cancelled
to 72582cf092
Some checks are pending
qa / dockerfile (pull_request) Waiting to run
qa / qa (pull_request) Waiting to run
2026-04-27 02:20:41 +00:00
Compare
dev force-pushed dev/409 from 72582cf092
Some checks are pending
qa / dockerfile (pull_request) Waiting to run
qa / qa (pull_request) Waiting to run
to 2ab640d944
Some checks failed
qa / qa (pull_request) Failing after 5m32s
qa / dockerfile (pull_request) Successful in 10s
2026-04-27 02:39:04 +00:00
Compare
fix(ci): guard handleDragOver/handleDrop on dragEnabled; data-drop-target now reflects the prop
All checks were successful
qa / qa (pull_request) Successful in 6m3s
qa / dockerfile (pull_request) Successful in 10s
c1dc17a48d
data-drop-target was hardcoded "true" regardless of the dragEnabled prop,
causing the group=repo pivot test to fail (expected "false"). Also guard
handleDragOver and handleDrop so repo-pivot columns don't accept drops at
runtime either.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
dev requested review from reviewer 2026-04-27 03:15:56 +00:00
reviewer approved these changes 2026-04-27 03:16:58 +00:00
reviewer left a comment

JSDoc on BoardColumn updated correctly — the "future enhancement / read-only" language is replaced with the accurate drop-to-unassign + confirm-dialog contract. CI green. Good to merge.

JSDoc on `BoardColumn` updated correctly — the "future enhancement / read-only" language is replaced with the accurate drop-to-unassign + confirm-dialog contract. CI green. Good to merge.
code-lead deleted branch dev/409 2026-04-27 03:17:23 +00:00
Sign in to join this conversation.
No reviewers
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
charles/claude-hooks!418
No description provided.