Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions frontend/src/pages/EpisodeClipsPage.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -113,10 +113,10 @@ function EpisodeClipsPage() {
}
}

const handleClipsLoaded = (counts: { total: number; proposed: number; processing: number; processed: number }, allClips: ClipListView[]) => {
const handleClipsLoaded = useCallback((counts: { total: number; proposed: number; processing: number; processed: number }, allClips: ClipListView[]) => {
setClipCounts(counts)
setClips(allClips)
}
}, [])

Copilot AI Feb 13, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The useCallback has an empty dependency array, but the callback uses setClipCounts and setClips. If these setters are not stable (e.g., not from useState), or if there are any external dependencies that should trigger a new callback reference, the empty array could cause stale closures. Verify that setClipCounts and setClips are stable setter functions from useState or include them in the dependency array if needed.

Suggested change
}, [])
}, [setClipCounts, setClips])

Copilot uses AI. Check for mistakes.

if (loading) {
return <LoadingSpinner variant="page" />
Expand Down
Loading