From 3f57f4de51542274781562b15344c5ffbc7710c1 Mon Sep 17 00:00:00 2001 From: pedro-bento Date: Mon, 5 Oct 2026 21:17:09 +0100 Subject: [PATCH] fix(dashboard): pause job polling in a hidden tab Skip the 2 s /api/status poll while document.hidden, and drop the leftover console.log of every status payload. --- dashboard/src/App.jsx | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/dashboard/src/App.jsx b/dashboard/src/App.jsx index 8b76989..44a7c9c 100644 --- a/dashboard/src/App.jsx +++ b/dashboard/src/App.jsx @@ -474,9 +474,11 @@ function App() { let interval; if ((status === 'processing' || status === 'completed') && jobId) { interval = setInterval(async () => { + // Skip a backgrounded tab: with the dashboard open in several tabs the + // hidden ones kept polling /api/status and flooding the access log. + if (document.hidden) return; try { const data = await pollJob(jobId); - console.log("Job status:", data); // Update results if available (real-time) if (data.result) {