Telegram (ask questions / claim the issue here first): https://t.me/+DOylgFv1jyJlNzM0
Why this matters
frontend/src/hooks/useStreamEvents.ts:47-64 - buildUrl's useCallback depends on streamIds, whose default streamIds = [] is a fresh array each render, and every call site passes an inline array. New identity -> buildUrl -> connect change -> the mount effect with deps [connect] closes and reopens the EventSource on every render. Each received event calls setEvents, re-rendering the consumer, so the stream reconnects on every event - a self-sustaining reconnect loop and resource leak.
Acceptance criteria
Files to touch
frontend/src/hooks/useStreamEvents.ts
frontend/src/components/NotificationDropdown.tsx
frontend/src/components/dashboard/dashboard-view.tsx
frontend/src/app/streams/[id]/page.tsx
Out of scope
- Backend SSE controller changes
Why this matters
frontend/src/hooks/useStreamEvents.ts:47-64 - buildUrl's useCallback depends on streamIds, whose default streamIds = [] is a fresh array each render, and every call site passes an inline array. New identity -> buildUrl -> connect change -> the mount effect with deps [connect] closes and reopens the EventSource on every render. Each received event calls setEvents, re-rendering the consumer, so the stream reconnects on every event - a self-sustaining reconnect loop and resource leak.
Acceptance criteria
Files to touch
frontend/src/hooks/useStreamEvents.tsfrontend/src/components/NotificationDropdown.tsxfrontend/src/components/dashboard/dashboard-view.tsxfrontend/src/app/streams/[id]/page.tsxOut of scope