story-kit: queue 149_bug_web_ui_does_not_update_when_agents_are_started_or_stopped for QA

This commit is contained in:
Dave
2026-02-24 14:46:12 +00:00
parent 6fd26a5fdd
commit 78fdaf34a0

View File

@@ -0,0 +1,36 @@
---
name: "Web UI does not update when agents are started or stopped"
---
# Bug 149: Web UI does not update when agents are started or stopped
## Description
Agent start/stop changes are in-memory HashMap mutations in the agent pool. No WatcherEvent is emitted for these changes, so the WebSocket never pushes an update to the frontend. The agent panel only refreshes on its polling interval, meaning agent swaps and new agent starts are invisible until the next poll.
Fix options:
1. Emit a WatcherEvent (e.g. AgentStateChanged) when start_agent/stop_agent modifies the pool, and have the WebSocket handler forward it to the frontend
2. Or have the frontend subscribe to a dedicated agent-state WebSocket message type
Key files:
- server/src/agents.rs: start_agent / stop_agent — where the state change happens
- server/src/http/ws.rs: WebSocket handler that could forward agent state events
- frontend/src/components/AgentPanel.tsx: polling-based agent list refresh
## How to Reproduce
1. Open the web UI and look at the Agents panel
2. Start or stop an agent via MCP (e.g. start_agent or stop_agent)
3. Observe the Agents panel
## Actual Result
Agent panel does not update until the next polling interval. Starting or stopping agents is invisible in real-time.
## Expected Result
Agent panel should update immediately when agents are started or stopped.
## Acceptance Criteria
- [ ] Bug is fixed and verified