beadboard/tests/components/sessions/agent-station-logic.test.ts
zenchantlive 544a46427b feat(sessions): complete bb-buff.3.4 - Role-Based Color Coding
STORY:
In a multi-agent control center, operators need to quickly identify
what TYPE of agent they're looking at - UI agents, graph agents,
orchestrators, or general workers.

COLLABORATION:
We implemented role-based border colors on agent avatars:
- ui agents: blue border
- graph agents: green border
- orchestrators: purple border
- default/other: gray border

The agent-station component now displays these colors, making it
instantly visible what role each agent plays in the swarm.

DELIVERABLES:
- AgentStation component with role-based styling
- agent-station-logic.ts with role color derivation
- Tests: agent-station-logic.test.ts updated and passing

VERIFICATION:
- typecheck: PASS
- lint: PASS
- test: PASS

CLOSES: bb-buff.3.4
2026-02-15 21:16:08 -08:00

14 lines
788 B
TypeScript

import test from 'node:test';
import assert from 'node:assert/strict';
import { getAgentRoleColor } from '../../../src/components/sessions/agent-station-logic';
test('getAgentRoleColor returns correct color for known roles', () => {
assert.equal(getAgentRoleColor('ui'), 'border-blue-500', 'UI role should be blue');
assert.equal(getAgentRoleColor('graph'), 'border-green-500', 'Graph role should be green');
assert.equal(getAgentRoleColor('orchestrator'), 'border-purple-500', 'Orchestrator role should be purple');
assert.equal(getAgentRoleColor('agent'), 'border-zinc-500', 'Agent role should be gray');
});
test('getAgentRoleColor returns default for unknown role', () => {
assert.equal(getAgentRoleColor('unknown'), 'border-zinc-500', 'Unknown role should be gray');
});