From 0856e733dec64deaff1b8c24c9f2fc25bd95d808 Mon Sep 17 00:00:00 2001 From: wander Date: Mon, 5 Jan 2026 02:54:37 -0500 Subject: [PATCH] UI: Handle idle state in scan polling --- templates/dashboard.html | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/templates/dashboard.html b/templates/dashboard.html index b2c012c..2d76dfd 100644 --- a/templates/dashboard.html +++ b/templates/dashboard.html @@ -447,8 +447,13 @@ clearInterval(pollInterval); alert("Scan Error: " + state.results); resetTables("Error: " + state.results); + } else if (state.status === 'idle') { + // Scan state lost (server restart?) + clearInterval(pollInterval); + alert("Scan state lost (Server Restarted?). Please try again."); + resetTables("Scan stopped / State lost."); } - // If 'scanning' or 'idle', keep polling... + // If 'scanning', keep polling... } catch (e) { clearInterval(pollInterval); console.error("Poll error", e);