Filed from the second-wave repository audit (issue 10/100). See the audit summary for full category context.
- Location:
frontend/src/app/streams/[id]/stream-details-content.tsx:141-153
- Problem: The refresh effect re-fires on every
streamEvents update and creates a new AbortController each time, but nothing prevents an older, slower in-flight fetch from resolving after and overwriting a newer one — the abort signal only covers unmount, not overlap within the same mount.
- Evidence: Fresh
AbortController per SSE event with no request-generation/sequence guard.
- Suggested implementation: Track a monotonically increasing request id (or abort the previous controller before starting a new fetch) and ignore responses that don't match the latest id.
- Acceptance criteria: A test firing two SSE events in quick succession with reversed response latencies ends on the data from the later event.
- Difficulty: M
- Expected impact: Prevents the stream detail view from regressing to stale amounts/status during bursts of activity.
frontend/src/app/streams/[id]/stream-details-content.tsx:141-153streamEventsupdate and creates a newAbortControllereach time, but nothing prevents an older, slower in-flight fetch from resolving after and overwriting a newer one — the abort signal only covers unmount, not overlap within the same mount.AbortControllerper SSE event with no request-generation/sequence guard.