From 5807c1f5a6cd9d03589ec7e771ace5bf102760b1 Mon Sep 17 00:00:00 2001 From: Dave Date: Tue, 24 Feb 2026 23:28:41 +0000 Subject: [PATCH] story-kit: create 173_bug_pipeline_board_lozenges_dont_update_on_agent_state_changes --- ...nges_dont_update_on_agent_state_changes.md | 28 +++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .story_kit/work/1_upcoming/173_bug_pipeline_board_lozenges_dont_update_on_agent_state_changes.md diff --git a/.story_kit/work/1_upcoming/173_bug_pipeline_board_lozenges_dont_update_on_agent_state_changes.md b/.story_kit/work/1_upcoming/173_bug_pipeline_board_lozenges_dont_update_on_agent_state_changes.md new file mode 100644 index 0000000..cef51a8 --- /dev/null +++ b/.story_kit/work/1_upcoming/173_bug_pipeline_board_lozenges_dont_update_on_agent_state_changes.md @@ -0,0 +1,28 @@ +--- +type: bug +title: Pipeline board lozenges don't update on agent state changes +--- + +# Bug 173: Pipeline board lozenges don't update on agent state changes + +## Description + +The pipeline board (`LozengeFlyContext`) only refreshes on `WorkItemChanged` and `PipelineState` WebSocket events (file moves between stages). It does not react to `AgentStateChanged` events. This means lozenge colors (amber=unassigned, green=agent working) don't update in real-time when agents are assigned or complete. + +The coder assignment appeared to work because the file moved from `1_upcoming` to `2_current` at the same time, triggering a `WorkItemChanged` refresh. But QA assignment doesn't move the file (it's already in `3_qa`), so the lozenge stays amber until a full page refresh. + +## Root cause + +`LozengeFlyContext.tsx` does not consume `agentStateVersion` (or any equivalent signal from `AgentStateChanged` WebSocket events). Only `AgentPanel.tsx` reacts to that signal via `stateVersion`. + +## Key files + +- `frontend/src/components/LozengeFlyContext.tsx` — needs to react to `AgentStateChanged` +- `frontend/src/components/Chat.tsx:1074` — passes `stateVersion={agentStateVersion}` to `AgentPanel` but not to the pipeline board +- `frontend/src/components/AgentPanel.tsx:312` — example of how `stateVersion` triggers a re-fetch + +## Acceptance Criteria + +- [ ] Pipeline board re-fetches and updates lozenge colors when an `AgentStateChanged` event is received +- [ ] QA agent assignment turns the lozenge green without a page refresh +- [ ] All tests pass