From 0bd2821924ef77b68c443289b4347953144cd39b Mon Sep 17 00:00:00 2001 From: Adam Shiervani Date: Thu, 23 Oct 2025 15:17:29 +0000 Subject: [PATCH] refactor: disable old ota rebooting method in new version --- ui/src/routes/devices.$id.tsx | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/ui/src/routes/devices.$id.tsx b/ui/src/routes/devices.$id.tsx index bf73902e..2a0de491 100644 --- a/ui/src/routes/devices.$id.tsx +++ b/ui/src/routes/devices.$id.tsx @@ -677,6 +677,13 @@ export default function KvmIdRoute() { return; } + + // This is to prevent the otaState from handling page refreshes after an update + // We've recently implemented a new general rebooting flow, so we don't need to handle this specific ota-rebooting case + // However, with old devices, we wont get the `willReboot` message, so we need to keep this for backwards compatibility + // only for the cloud version with an old device + if (rebootState?.isRebooting) return; + const currentUrl = new URL(window.location.href); currentUrl.search = ""; currentUrl.searchParams.set("updateSuccess", "true");