Refactor: Update TeamMonitor activity feed for simplified single-leader architecture
Context
The current TeamMonitor activity feed renders inter-agent events (agent→agent messages via NATS) added in issue #1. With the new architecture there is only one container (the leader), and sub-agent interactions happen internally within Claude Code — they do not produce separate NATS events.
The Agents panel also needs updating: only the leader has a container; sub-agents are file-based and have no container status.
Changes Required
src/pages/TeamMonitorPage.tsx
Activity feed:
- Remove rendering logic for
agent_messageevent type (inter-agent events from issue #1) - Keep rendering for: user messages, leader responses, status updates
- Ensure no runtime errors when these event types no longer appear
Agents panel:
- Only the leader agent has a container status (
ContainerStatusbadge) - Non-leader agents (sub-agents) should be shown as a list with their role and delegation description, but no container status (they have none)
- Optionally: add a visual indicator that sub-agents are ".claude/agents/ files" rather than containers
src/types/index.ts (if not covered in the types refactor issue)
- Remove
agent_messagefromTaskLogevent type union
Acceptance Criteria
- [ ] Activity feed renders correctly with no
agent_messageevent type logic - [ ] No TypeScript or runtime errors related to removed event types
- [ ] Agents panel shows leader with container status, sub-agents without container status
- [ ] Sub-agents display their delegation description (
sub_agent_description) in the panel - [ ] All existing unit tests pass
- [ ] TypeScript compiles without errors (
npm run build)
Estado al pausar sesión
COMPLETADO — implementado y verificado (190/190 tests pasando).
Lo que se hizo
- Eliminada función
isInterAgentMessage() - Eliminada función
formatActivityPayload()(inter-agent specific) - Eliminados colores de message types inter-agente (
task_assignment,question,context_share,system_command) - Panel de agentes actualizado: líder muestra dot de container status, sub-agents muestran icono de archivo +
sub_agent_description - Activity feed simplificado: estilo uniforme sin badges inter-agente
- 9 tests inter-agente eliminados, 4 nuevos tests añadidos
Implemented in 06ac288. TeamMonitorPage simplified: removed inter-agent message types, leader shows container status dot, sub-agents show file icon with description. No more inter-agent colors or formatActivityPayload().