fix: clean up slow-load toast interval on component destroy (#8207)

The slowStreamIntervalId (which fires "Loading is taking a long time..."
toasts every 15s) was not cleared in onDestroy, causing it to keep
firing after navigating away from the runs page.

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
Ruben Fiszel
2026-03-03 13:25:17 +00:00
committed by GitHub
parent 54a86528bb
commit 104bd5fbb1
@@ -666,6 +666,11 @@ export function useJobsLoader(args: () => UseJobLoaderArgs) {
if (intervalId) {
clearInterval(intervalId)
}
if (slowStreamIntervalId) {
clearInterval(slowStreamIntervalId)
slowStreamIntervalId = undefined
}
paramChangePromise?.cancel()
})
$effect(() => {
Object.keys(filters ?? {}).map((k) => filters?.[k as keyof RunsFilterInstance])