You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
CodeSession polling interval captures stale session status #162
CodeSession polling interval captures stale session status
Severity: Medium File:frontend/src/pages/Code/CodeSession.tsx:59
The useEffect hook sets up a 3-second polling interval that checks session?.status. However, the closure captures the session value at the time the effect runs. When loadData() updates session, the interval continues using the old status until the effect re-runs.
When a session transitions from "running" to "completed", the polling may continue for several cycles before the effect cleanup runs, causing unnecessary API calls and potential UI flicker.
Activity