From 8189861bfa72489edf902b3bf90e8d10cf40a6cb Mon Sep 17 00:00:00 2001 From: Alex P Date: Sat, 18 Oct 2025 00:33:22 +0300 Subject: [PATCH] fix: version info not loading in feature flags and settings The getLocalVersion() call was happening before the WebRTC RPC data channel was established, causing version fetch to fail silently. This resulted in: - Feature flags always returning false (no version = disabled) - Settings UI showing "App: Loading..." and "System: Loading..." indefinitely - Version-gated features (like HDMI Sleep Mode) never appearing Fixed by adding rpcDataChannel readyState check before calling getLocalVersion(), matching the pattern used by all other RPC calls in the same file. --- ui/src/routes/devices.$id.tsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/src/routes/devices.$id.tsx b/ui/src/routes/devices.$id.tsx index bbcbefa3..238715da 100644 --- a/ui/src/routes/devices.$id.tsx +++ b/ui/src/routes/devices.$id.tsx @@ -898,10 +898,11 @@ export default function KvmIdRoute() { useEffect(() => { if (appVersion) return; + if (rpcDataChannel?.readyState !== "open") return; getLocalVersion(); // eslint-disable-next-line react-hooks/exhaustive-deps - }, [appVersion]); + }, [appVersion, rpcDataChannel?.readyState]); const ConnectionStatusElement = useMemo(() => { const isOtherSession = location.pathname.includes("other-session");