beadboard/tests/components/graph
zenchantlive 211e503409 feat(graph): enforce single archetype per task
## Design Decision
Per bd (bead) system design, a task should have only ONE agent archetype
assigned at a time. This provides clear ownership and simpler mental model.

## What Changed
When assigning a new archetype:
1. Remove any existing agent: labels first (DELETE API)
2. Then add the new agent: label (POST API)
3. Optimistic UI updates to match

## Why This Makes Sense
- Clear ownership: 'Who's working on this?'
- Simpler coordination between tasks
- Matches how bd/agent orchestration is intended to work
- Reassigning is still possible (just click a different archetype)

## UI Behavior
- If task has 'coder' assigned, clicking 'architect' will:
  1. Remove 'coder' label
  2. Add 'architect' label
- Dropdown shows 'Assigned' badge on current archetype
- X button still available to unassign completely

## Test Coverage
Added graph-node-single-archetype.test.tsx with 5 tests:
- Removes existing labels before adding new
- Calls DELETE before POST
- Only allows one archetype per task
- Preserves non-agent labels
- Returns early if same archetype clicked
2026-02-24 17:04:44 -08:00
..
assignment-panel-sections.test.tsx feat(ui): add AssignmentPanel with Needs Agent, Pre-assigned, Squad Roster 2026-02-24 16:15:35 -08:00
graph-node-assign.test.tsx feat(graph): add Assign button and archetype dropdown to GraphNodeCard 2026-02-24 16:14:56 -08:00
graph-node-labels-optimistic.test.tsx fix(graph): prevent SSE overwrites of optimistic label updates 2026-02-24 16:48:16 -08:00
graph-node-labels.test.tsx feat(graph): pass labels through WorkflowGraph to enable agent assignment display 2026-02-24 16:14:39 -08:00
graph-node-single-archetype.test.tsx feat(graph): enforce single archetype per task 2026-02-24 17:04:44 -08:00
smart-dag.test.tsx feat(core): add SmartDag and supporting infrastructure for assign mode 2026-02-24 16:16:10 -08:00