From 4b0863bc28d370bdc42b06b6faa04435d4929ef8 Mon Sep 17 00:00:00 2001 From: jon3350 Date: Sun, 10 May 2026 01:45:15 -0400 Subject: [PATCH] removed sandboxes, patched emphermial sandboxes --- apps/web/src/routes/sandboxes/$sandboxId.tsx | 44 ++++++++----------- apps/web/src/routes/sandboxes/index.tsx | 23 ++++------ .../fastapi/app/services/daytona_service.py | 2 +- 3 files changed, 28 insertions(+), 41 deletions(-) diff --git a/apps/web/src/routes/sandboxes/$sandboxId.tsx b/apps/web/src/routes/sandboxes/$sandboxId.tsx index 103480c..2950a30 100644 --- a/apps/web/src/routes/sandboxes/$sandboxId.tsx +++ b/apps/web/src/routes/sandboxes/$sandboxId.tsx @@ -23,7 +23,6 @@ import { Play, RefreshCw, Save, - Square, Terminal, } from "lucide-react"; import { motion } from "motion/react"; @@ -100,18 +99,13 @@ function SandboxDetailContent({ sandbox }: { sandbox: Sandbox }) { mutationFn: updateSandboxFn, }); const lifecycle = useMutation({ - mutationFn: async (next: "start" | "stop") => { - if (next === "start") { - return sandboxApi.startSandbox(sandbox.daytonaSandboxId); - } - return sandboxApi.stopSandbox(sandbox.daytonaSandboxId); - }, - onSuccess: (_, next) => { + mutationFn: () => sandboxApi.startSandbox(sandbox.daytonaSandboxId), + onSuccess: () => { updateSandboxStatus.mutate({ id: sandbox._id, - status: next === "start" ? "running" : "stopped", + status: "running", }); - toast.success(next === "start" ? "Sandbox started" : "Sandbox stopped"); + toast.success("Sandbox started"); }, onError: () => toast.error("Sandbox lifecycle action failed"), }); @@ -157,21 +151,21 @@ function SandboxDetailContent({ sandbox }: { sandbox: Sandbox }) {
- + {!isRunning && ( + + )}