the universal sandbox runtime for agents and humans. pocketenv.io
sandbox openclaw agent claude-code vercel-sandbox deno-sandbox cloudflare-sandbox atproto sprites daytona
7
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add DID sandbox route and refine UI auth

+35 -2
+8 -2
apps/web/src/pages/sandbox/Sandbox.tsx
··· 1 1 import { useState } from "react"; 2 2 import Navbar from "../../components/navbar"; 3 3 import SignIn from "../../components/signin/Signin"; 4 + import { useLocation } from "@tanstack/react-router"; 4 5 5 6 function New() { 7 + const isAuthenticated = !!localStorage.getItem("token"); 6 8 const [signInModalOpen, setSignInModalOpen] = useState(false); 7 9 const onClaim = () => { 10 + if (isAuthenticated) { 11 + return; 12 + } 8 13 setSignInModalOpen(true); 9 14 }; 10 - const isAuthenticated = !!localStorage.getItem("token"); 15 + const location = useLocation(); 16 + 11 17 return ( 12 18 <> 13 19 <div className="flex flex-col min-h-screen bg-base-100"> 14 20 <Navbar withLogo title="" project="lucky-quietude" /> 15 - {!isAuthenticated && ( 21 + {location.pathname.startsWith("/sandbox") && ( 16 22 <div 17 23 className="alert alert-soft alert-warning flex items-center bg-warning/10 border-none" 18 24 role="alert"
+21
apps/web/src/routeTree.gen.ts
··· 17 17 import { Route as ProjectsRouteImport } from './routes/projects' 18 18 import { Route as IndexRouteImport } from './routes/index' 19 19 import { Route as SandboxIdRouteImport } from './routes/sandbox/$id' 20 + import { Route as DidSandboxRkeyRouteImport } from './routes/$did.sandbox.$rkey' 20 21 21 22 const VolumesRoute = VolumesRouteImport.update({ 22 23 id: '/volumes', ··· 56 57 const SandboxIdRoute = SandboxIdRouteImport.update({ 57 58 id: '/sandbox/$id', 58 59 path: '/sandbox/$id', 60 + getParentRoute: () => rootRouteImport, 61 + } as any) 62 + const DidSandboxRkeyRoute = DidSandboxRkeyRouteImport.update({ 63 + id: '/$did/sandbox/$rkey', 64 + path: '/$did/sandbox/$rkey', 59 65 getParentRoute: () => rootRouteImport, 60 66 } as any) 61 67 ··· 68 74 '/snapshots': typeof SnapshotsRoute 69 75 '/volumes': typeof VolumesRoute 70 76 '/sandbox/$id': typeof SandboxIdRoute 77 + '/$did/sandbox/$rkey': typeof DidSandboxRkeyRoute 71 78 } 72 79 export interface FileRoutesByTo { 73 80 '/': typeof IndexRoute ··· 78 85 '/snapshots': typeof SnapshotsRoute 79 86 '/volumes': typeof VolumesRoute 80 87 '/sandbox/$id': typeof SandboxIdRoute 88 + '/$did/sandbox/$rkey': typeof DidSandboxRkeyRoute 81 89 } 82 90 export interface FileRoutesById { 83 91 __root__: typeof rootRouteImport ··· 89 97 '/snapshots': typeof SnapshotsRoute 90 98 '/volumes': typeof VolumesRoute 91 99 '/sandbox/$id': typeof SandboxIdRoute 100 + '/$did/sandbox/$rkey': typeof DidSandboxRkeyRoute 92 101 } 93 102 export interface FileRouteTypes { 94 103 fileRoutesByFullPath: FileRoutesByFullPath ··· 101 110 | '/snapshots' 102 111 | '/volumes' 103 112 | '/sandbox/$id' 113 + | '/$did/sandbox/$rkey' 104 114 fileRoutesByTo: FileRoutesByTo 105 115 to: 106 116 | '/' ··· 111 121 | '/snapshots' 112 122 | '/volumes' 113 123 | '/sandbox/$id' 124 + | '/$did/sandbox/$rkey' 114 125 id: 115 126 | '__root__' 116 127 | '/' ··· 121 132 | '/snapshots' 122 133 | '/volumes' 123 134 | '/sandbox/$id' 135 + | '/$did/sandbox/$rkey' 124 136 fileRoutesById: FileRoutesById 125 137 } 126 138 export interface RootRouteChildren { ··· 132 144 SnapshotsRoute: typeof SnapshotsRoute 133 145 VolumesRoute: typeof VolumesRoute 134 146 SandboxIdRoute: typeof SandboxIdRoute 147 + DidSandboxRkeyRoute: typeof DidSandboxRkeyRoute 135 148 } 136 149 137 150 declare module '@tanstack/react-router' { ··· 192 205 preLoaderRoute: typeof SandboxIdRouteImport 193 206 parentRoute: typeof rootRouteImport 194 207 } 208 + '/$did/sandbox/$rkey': { 209 + id: '/$did/sandbox/$rkey' 210 + path: '/$did/sandbox/$rkey' 211 + fullPath: '/$did/sandbox/$rkey' 212 + preLoaderRoute: typeof DidSandboxRkeyRouteImport 213 + parentRoute: typeof rootRouteImport 214 + } 195 215 } 196 216 } 197 217 ··· 204 224 SnapshotsRoute: SnapshotsRoute, 205 225 VolumesRoute: VolumesRoute, 206 226 SandboxIdRoute: SandboxIdRoute, 227 + DidSandboxRkeyRoute: DidSandboxRkeyRoute, 207 228 } 208 229 export const routeTree = rootRouteImport 209 230 ._addFileChildren(rootRouteChildren)
+6
apps/web/src/routes/$did.sandbox.$rkey.tsx
··· 1 + import { createFileRoute } from "@tanstack/react-router"; 2 + import Sandbox from "../pages/sandbox"; 3 + 4 + export const Route = createFileRoute("/$did/sandbox/$rkey")({ 5 + component: Sandbox, 6 + });