Add story 53: WebSocket push notifications for panel auto-refresh
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -0,0 +1,39 @@
|
||||
---
|
||||
name: WebSocket Push Notifications for Panel Auto-Refresh
|
||||
test_plan: pending
|
||||
---
|
||||
|
||||
# Story 53: WebSocket Push Notifications for Panel Auto-Refresh
|
||||
|
||||
## User Story
|
||||
|
||||
As a user, I want the UI panels to update automatically when server-side state changes, so that I don't have to manually click Refresh to see current data.
|
||||
|
||||
## Context
|
||||
|
||||
The WebSocket at `/ws` already exists for chat streaming. Server-side deterministic commands (create_story, create_bug, close_bug, record_tests, ensure_acceptance, start_agent, etc.) mutate state that the panels display. Currently, panels only update on mount or manual refresh.
|
||||
|
||||
By pushing lightweight notification events over the existing WebSocket when mutations occur, the frontend can auto-refresh the affected panel without polling.
|
||||
|
||||
## Acceptance Criteria
|
||||
|
||||
- [ ] The server broadcasts a notification event over the WebSocket when any of these mutations occur:
|
||||
- Story created, moved, or archived
|
||||
- Bug created or closed
|
||||
- Tests recorded or acceptance checked
|
||||
- Coverage collected
|
||||
- Agent started, completed, or failed
|
||||
- [ ] Notification events are simple typed messages (e.g. `{"type": "notification", "topic": "stories"}`) — not full data payloads
|
||||
- [ ] The frontend listens for notification events and auto-refreshes the relevant panel:
|
||||
- `stories` → UpcomingPanel, ReviewPanel
|
||||
- `bugs` → (future BugPanel, no-op for now)
|
||||
- `tests` / `acceptance` → GatePanel, TodoPanel
|
||||
- `agents` → AgentPanel
|
||||
- [ ] Manual refresh buttons continue to work as before
|
||||
- [ ] Panels do not flicker or lose scroll position on auto-refresh
|
||||
|
||||
## Out of Scope
|
||||
|
||||
- File-system watching (inotify/fsevents) for changes made outside the server
|
||||
- Replacing the existing AgentPanel SSE with WebSocket (it works fine as-is)
|
||||
- Debouncing rapid successive notifications (can be a follow-up)
|
||||
Reference in New Issue
Block a user