From bc386b1247808bc1aefdfed547a3819608d26e62 Mon Sep 17 00:00:00 2001 From: LukeGus Date: Thu, 28 May 2026 22:14:05 -0500 Subject: [PATCH] fix: uuid crypto error when creating a tab on http based setups --- src/ui/AppShell.tsx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/ui/AppShell.tsx b/src/ui/AppShell.tsx index c4c8766c..e8b0d7f4 100644 --- a/src/ui/AppShell.tsx +++ b/src/ui/AppShell.tsx @@ -547,7 +547,11 @@ export function AppShell({ restore?: { instanceId: string; restoredSessionId: string | null }, ) { const tabId = `${host.name}-${type}-${Date.now()}`; - const instanceId = restore?.instanceId ?? crypto.randomUUID(); + const instanceId = + restore?.instanceId ?? + (typeof crypto.randomUUID === "function" + ? crypto.randomUUID() + : `${Date.now().toString(36)}-${Math.random().toString(36).slice(2)}-${Math.random().toString(36).slice(2)}`); const openedAt = Date.now(); const ref = type === "terminal" ? createRef() : undefined; if (ref) terminalRefs.current.set(tabId, ref);