From 37695a8a338dd326841a3833b05b62ba5def7d18 Mon Sep 17 00:00:00 2001 From: Codex Date: Fri, 24 Apr 2026 17:31:07 +0000 Subject: [PATCH] Show sandbox list in destroy mode --- app/page.tsx | 66 +++++++++++++++++++++++-------- tests/sandbox-lifecycle-check.mjs | 5 +++ 2 files changed, 54 insertions(+), 17 deletions(-) diff --git a/app/page.tsx b/app/page.tsx index 0352a9b..c20c628 100644 --- a/app/page.tsx +++ b/app/page.tsx @@ -214,24 +214,56 @@ export default function Dashboard() { ) : isDestroyMode ? ( -
-

- DESTROY SANDBOX -

-

- Click on any sandbox below to initiate destruction. All sandboxes are highlighted in red. -

-
- +
+
+

+ DESTROY SANDBOX +

+

+ Click a sandbox below to destroy it. +

+
+ +
+ + {lifecycleMessage && ( +
+ {lifecycleMessage} +
+ )} + + {inventoryEnabled && loading ? ( +
+
+ INITIALIZING... +
+
+ ) : inventoryEnabled && error ? ( +
+

Inventory Unavailable

+

{error}

+
+ ) : ( + + )}
) : ( <> diff --git a/tests/sandbox-lifecycle-check.mjs b/tests/sandbox-lifecycle-check.mjs index 7a7ffaf..c0fecff 100644 --- a/tests/sandbox-lifecycle-check.mjs +++ b/tests/sandbox-lifecycle-check.mjs @@ -41,6 +41,11 @@ assert.match(pageSource, /fetch\('\/api\/sandbox\/delete'/, 'destroy workflow mu assert.match(pageSource, /refresh\(\{ force: true \}\)/, 'create and destroy workflows must force fresh inventory reads') assert.match(pageSource, /refreshUntilSandboxVisible/, 'create workflow must wait for the new sandbox to appear in inventory') assert.match(pageSource, /refreshUntilSandboxGone/, 'destroy workflow must wait for deleted sandboxes to leave inventory') +assert.match( + pageSource, + /isDestroyMode \? \([\s\S]*