CUB-125: implement real-time SSE/WebSocket in React frontend #39
Reference in New Issue
Block a user
Delete Branch "agent/rex/CUB-125-realtime-sse"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
useSSEhook with exponential back-off reconnect (1s → 30s cap)useRealtimeSynchook: maps SSE events → React Query cache invalidationagent.status→ invalidates["agents"]agent.task/agent.progress→ invalidates["tasks"]+["agents"]fleet.update→ invalidates["agents"],["sessions"],["tasks"]SSEContext/SSEProvider(mounts once insideQueryClientProvider)SSEProviderinmain.tsx— no polling, all updates pushed via SSESettingsPage: replace polling-interval slider with SSE status panelstaleTimeraised to 60s,refetchIntervalremoved)src/services/sse.tsEvents supported
agent.status,agent.task,agent.progress,fleet.updateValidation
npm run buildpasses — tsc + vite, 0 errors.Closes CUB-125
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.