The outage detail page (src/app/outages/[id]/page.tsx) implements a 15-second polling interval to fetch updates while the outage status is "open". The cleanup function only calls controller.abort() and clearInterval(). If the user navigates away before the interval fires, the in-flight getOutage request may resolve after unmount, attempting to call setOutage(data) on an unmounted component.
Root cause: Lines 118-134 in src/app/outages/[id]/page.tsx - setOutage called after unmount if navigation occurs mid-request.
Why this is architecturally hard
- AbortController aborts the request but promise may still resolve
- The
mountedRef pattern used in SessionProvider is not applied here
- React 19 concurrent features may re-render after effects cleaned up
Acceptance criteria
Getting started
Files: src/app/outages/[id]/page.tsx
The outage detail page (
src/app/outages/[id]/page.tsx) implements a 15-second polling interval to fetch updates while the outage status is "open". The cleanup function only callscontroller.abort()andclearInterval(). If the user navigates away before the interval fires, the in-flightgetOutagerequest may resolve after unmount, attempting to callsetOutage(data)on an unmounted component.Root cause: Lines 118-134 in src/app/outages/[id]/page.tsx -
setOutagecalled after unmount if navigation occurs mid-request.Why this is architecturally hard
mountedRefpattern used in SessionProvider is not applied hereAcceptance criteria
Getting started
Files:
src/app/outages/[id]/page.tsx