From 630bc2971a38b6cbba60b937af4fb07b970e1efd Mon Sep 17 00:00:00 2001 From: cemaxecuter Date: Sat, 31 Jan 2026 08:51:17 -0500 Subject: [PATCH] Fix WiFi deep scan polling on agent - normalize scan_type value Agent returns scan_type 'deepscan' but UI expected 'deep', causing the polling to immediately stop when checking scan status on agent switch. Now normalizes 'deepscan' to 'deep' in checkScanStatus. --- static/js/modes/wifi.js | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/static/js/modes/wifi.js b/static/js/modes/wifi.js index f2020ec..2bf9d02 100644 --- a/static/js/modes/wifi.js +++ b/static/js/modes/wifi.js @@ -594,7 +594,10 @@ const WiFiMode = (function() { if (status.is_scanning || status.running) { // Agent returns scan_type in params, local returns scan_mode - const detectedMode = status.scan_mode || (status.params && status.params.scan_type) || 'deep'; + // Normalize: agent may return 'deepscan' or 'deep', UI expects 'deep' or 'quick' + let detectedMode = status.scan_mode || (status.params && status.params.scan_type) || 'deep'; + if (detectedMode === 'deepscan') detectedMode = 'deep'; + setScanning(true, detectedMode); if (detectedMode === 'deep') { startEventStream();