From cb3e81d726f1f920d751863497a4d15ae68b9345 Mon Sep 17 00:00:00 2001 From: Abhinav Chordia Date: Sat, 31 Oct 2026 09:16:30 +0000 Subject: [PATCH] ui: drop the create form's unused Boot mode and show create progress The sandbox create form offered a Boot mode select (cold boot, snapshot, pool) that never reached the API: the handler dropped the field and the create request has no such option, so choosing "Pool" or "Snapshot" changed nothing. It is removed. The Create button had no in-flight state, so a second click during a slow request submitted a second create under a new idempotency key. It now shows progress and ignores repeat submits until the request settles. --- ui/src/app/dashboard/sandboxes/page.tsx | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/ui/src/app/dashboard/sandboxes/page.tsx b/ui/src/app/dashboard/sandboxes/page.tsx index 35d6c4ce6f..95394afa72 100644 --- a/ui/src/app/dashboard/sandboxes/page.tsx +++ b/ui/src/app/dashboard/sandboxes/page.tsx @@ -606,6 +606,8 @@ function SandboxesPage() { const [editingLifecycleSandbox, setEditingLifecycleSandbox] = useState(null); const [editingNetworkSandbox, setEditingNetworkSandbox] = useState(null); const [manualRefreshing, setManualRefreshing] = useState(false); + const [creating, setCreating] = useState(false); + const creatingRef = useRef(false); const [refreshCooldown, setRefreshCooldown] = useState(false); const [nowMs, setNowMs] = useState(() => Date.now()); const refreshCooldownRef = useRef(false); @@ -750,9 +752,11 @@ function SandboxesPage() { org_id?: string; template: string; runtime: string; - boot_mode?: string; snapshots?: boolean; }) => { + if (creatingRef.current) return; + creatingRef.current = true; + setCreating(true); try { const payload = { name: values.name || null, @@ -821,6 +825,9 @@ function SandboxesPage() { }); } catch (err: any) { message.error(err.message); + } finally { + creatingRef.current = false; + setCreating(false); } }; @@ -1210,13 +1217,6 @@ function SandboxesPage() { ))} - - - Snapshots @@ -1229,7 +1229,7 @@ function SandboxesPage() { Clear ) : null} - +