From e708ee39f529bf97ee50c5ffc333fce33fe89322 Mon Sep 17 00:00:00 2001 From: Adam Shiervani Date: Tue, 28 Oct 2025 18:46:11 +0100 Subject: [PATCH 1/2] fix: ensure proper redirection and page reload --- ui/src/components/VideoOverlay.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ui/src/components/VideoOverlay.tsx b/ui/src/components/VideoOverlay.tsx index 10d941085..bce15374b 100644 --- a/ui/src/components/VideoOverlay.tsx +++ b/ui/src/components/VideoOverlay.tsx @@ -13,6 +13,7 @@ import { useRTCStore, PostRebootAction } from "@/hooks/stores"; import LogoBlue from "@/assets/logo-blue.svg"; import LogoWhite from "@/assets/logo-white.svg"; import { isOnDevice } from "@/main"; +import { sleep } from "@/utils"; interface OverlayContentProps { @@ -481,8 +482,10 @@ export function RebootingOverlay({ show, postRebootAction }: RebootingOverlayPro // - Protocol-relative URLs: resolved with current protocol // - Fully qualified URLs: used as-is const targetUrl = new URL(postRebootAction.redirectTo, window.location.origin); + clearInterval(intervalId); // Stop polling before redirect window.location.href = targetUrl.href; + await sleep(1000); window.location.reload(); } } catch (err) { From 85f5edbd3c84a73daa17893bd1203c166ea02dc1 Mon Sep 17 00:00:00 2001 From: Adam Shiervani Date: Tue, 28 Oct 2025 18:47:13 +0100 Subject: [PATCH 2/2] fix: add delay before page reload to ensure smooth navigation during redirection --- ui/src/components/VideoOverlay.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/ui/src/components/VideoOverlay.tsx b/ui/src/components/VideoOverlay.tsx index bce15374b..e84cfc04c 100644 --- a/ui/src/components/VideoOverlay.tsx +++ b/ui/src/components/VideoOverlay.tsx @@ -485,6 +485,7 @@ export function RebootingOverlay({ show, postRebootAction }: RebootingOverlayPro clearInterval(intervalId); // Stop polling before redirect window.location.href = targetUrl.href; + // Add 1s delay between setting location.href and calling reload() to prevent reload from interrupting the navigation. await sleep(1000); window.location.reload(); }