mirror of
https://github.com/leonvanzyl/autocoder.git
synced 2026-02-02 07:23:35 +00:00
fix: ensure agents are removed from Mission Control UI on completion
Previously, agents that completed their work would remain visible in the Mission Control UI until a manual page refresh. This occurred because the AgentTracker._handle_agent_complete method silently dropped completion messages when an agent wasn't tracked (e.g., due to missed start messages from WebSocket connection issues). Backend changes: - Modified _handle_agent_complete in server/websocket.py to always emit completion messages, even for untracked agents - Synthetic completions use agentIndex=-1 and agentName='Unknown' as sentinel values to indicate untracked agents Frontend changes: - Updated useWebSocket.ts to handle synthetic completions by removing agents by featureId when agentIndex is -1 - Added 30-minute stale agent cleanup as defense-in-depth for users who leave the UI open for extended periods - Updated TypeScript types to allow 'Unknown' as valid agent name Component updates: - AgentAvatar.tsx: Added UNKNOWN_COLORS and UnknownSVG fallback for rendering unknown agents with a neutral gray question mark icon - CelebrationOverlay.tsx, DependencyGraph.tsx: Updated interfaces to accept 'Unknown' agent names Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -4,7 +4,7 @@ import { AgentAvatar } from './AgentAvatar'
|
||||
import type { AgentMascot } from '../lib/types'
|
||||
|
||||
interface CelebrationOverlayProps {
|
||||
agentName: AgentMascot
|
||||
agentName: AgentMascot | 'Unknown'
|
||||
featureName: string
|
||||
onComplete?: () => void
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user