fix(desktop): remove duplicate getCronJobRuns() call in CronJobSidebarRuns

The separate useEffect for visible-triggered immediate load was firing
simultaneously with the initial load in the main effect when visible=true
on mount, causing duplicate requests. The main effect already handles
initial load when visible, so the separate effect is redundant.

Part of PR #75395.
This commit is contained in:
Daisuke Suzuki 2026-07-31 19:36:32 +02:00
parent 6502e441d4
commit 3fbbc9c1d4
1 changed files with 0 additions and 13 deletions

View File

@ -371,19 +371,6 @@ function CronJobSidebarRuns({ jobId, onOpenRun }: { jobId: string; onOpenRun: (s
// cronChangeTick: a fired run reloads the peek immediately.
}, [changeEventsAvailable, cronChangeTick, jobId, visible])
// Separate effect to trigger immediate load when pane becomes visible
useEffect(() => {
if (visible) {
getCronJobRuns(jobId, PEEK_RUN_LIMIT)
.then(result => {
setRuns(result)
})
.catch(() => {
setRuns(prev => prev ?? [])
})
}
}, [visible, jobId])
return (
<div className="mb-1 ml-[1.375rem] flex flex-col gap-px">
{runs === null ? (