@burdenoff/microfe-sandbox 2026.625.2 → 2026.626.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -7,19 +7,20 @@ import { SandboxTypeIcon as f } from "../components/SandboxTypeIcon.js";
7
7
  import { CountdownTimer as p } from "../components/CountdownTimer.js";
8
8
  import { useSandboxEvents as m } from "../utils/sandboxEvents.js";
9
9
  import { PageLayout as h } from "../components/PageLayout.js";
10
- import { useDeleteSandboxMutation as g, useExtendSandboxTtlMutation as _, useGetSandboxLogsLazyQuery as v, useGetSandboxQuery as y, useOnSandboxStatusChangedSubscription as ee, useStopSandboxMutation as te } from "../../generated/wspace-operations.js";
11
- import { isNative as b, nativeCopyText as x, nativeImpact as S, nativeNotify as C, nativeToast as w } from "../../utils/nativeBridge.js";
12
- import { ExtendTTLModal as ne } from "../components/ExtendTTLModal.js";
13
- import { SandboxActivityTab as T } from "../components/SandboxActivityTab.js";
14
- import { SandboxAgentAppPanel as re } from "../components/SandboxAgentAppPanel.js";
15
- import { SandboxScriptRunnerPanel as ie } from "../components/SandboxScriptRunnerPanel.js";
16
- import { useCallback as E, useEffect as D, useRef as O, useState as k } from "react";
17
- import { AlertCircle as ae, ArrowLeft as oe, CheckCircle2 as A, Clock as se, Cog as ce, Container as le, Copy as j, Database as M, Download as N, Info as P, Network as ue, Play as de, RefreshCw as F, Shield as fe, StopCircle as I, Terminal as L, Timer as R, Trash2 as z } from "lucide-react";
18
- import { useParams as B } from "react-router-dom";
19
- import { useI18n as V } from "@burdenoff/fe-libs/shared/providers/shell";
20
- import { Fragment as H, jsx as U, jsxs as W } from "react/jsx-runtime";
10
+ import { useDeleteSandboxMutation as g, useExtendSandboxTtlMutation as _, useGetSandboxLogsLazyQuery as v, useGetSandboxQuery as ee, useOnSandboxStatusChangedSubscription as te, useStopSandboxMutation as ne } from "../../generated/wspace-operations.js";
11
+ import { isNative as y, nativeCopyText as b, nativeImpact as x, nativeNotify as S, nativeToast as C } from "../../utils/nativeBridge.js";
12
+ import { ExtendTTLModal as re } from "../components/ExtendTTLModal.js";
13
+ import { SandboxActivityTab as ie } from "../components/SandboxActivityTab.js";
14
+ import { SandboxAgentAppPanel as ae } from "../components/SandboxAgentAppPanel.js";
15
+ import { SandboxScriptRunnerPanel as oe } from "../components/SandboxScriptRunnerPanel.js";
16
+ import { useCallback as w, useEffect as T, useRef as E, useState as D } from "react";
17
+ import { AlertCircle as se, ArrowLeft as ce, CheckCircle2 as O, Clock as le, Cog as ue, Container as de, Copy as k, Database as fe, Download as A, Info as j, Network as M, Play as pe, RefreshCw as N, Shield as me, StopCircle as P, Terminal as F, Timer as I, Trash2 as he } from "lucide-react";
18
+ import { useParams as ge } from "react-router-dom";
19
+ import { useI18n as L } from "@burdenoff/fe-libs/shared/providers/shell";
20
+ import { Fragment as R, jsx as z, jsxs as B } from "react/jsx-runtime";
21
+ import { IllustratedEmptyState as _e, NextSteps as ve, PagePurpose as ye } from "@burdenoff/fe-libs/ui";
21
22
  //#region src/sandbox/pages/SandboxDetailPage.tsx
22
- function G(e) {
23
+ function V(e) {
23
24
  return new Date(e).toLocaleString(void 0, {
24
25
  year: "numeric",
25
26
  month: "short",
@@ -28,383 +29,417 @@ function G(e) {
28
29
  minute: "2-digit"
29
30
  });
30
31
  }
31
- function K(e) {
32
+ function be(e) {
32
33
  let t = Math.floor(e / 3600), n = Math.floor(e % 3600 / 60);
33
34
  return t > 0 ? `${t}h ${n}m` : `${n}m`;
34
35
  }
35
- function pe(e) {
36
+ function xe(e) {
36
37
  if (!e) return null;
37
38
  let t = new Date(e).getTime() - Date.now();
38
39
  if (t <= 0) return "Expired";
39
40
  let n = Math.floor(t / 36e5), r = Math.floor(t % 36e5 / 6e4);
40
41
  return n > 0 ? `${n}h ${r}m remaining` : `${r}m remaining`;
41
42
  }
42
- function q({ isCopied: e, onCopy: t, ariaLabel: n }) {
43
- return /* @__PURE__ */ U("button", {
43
+ function H({ isCopied: e, onCopy: t, ariaLabel: n }) {
44
+ return /* @__PURE__ */ z("button", {
44
45
  type: "button",
45
46
  onClick: t,
46
47
  className: "p-1 rounded hover:bg-bg-sunken transition-colors",
47
48
  "aria-label": n,
48
- children: e ? /* @__PURE__ */ U(A, {
49
+ children: e ? /* @__PURE__ */ z(O, {
49
50
  size: 14,
50
51
  className: "text-status-success-text"
51
- }) : /* @__PURE__ */ U(j, {
52
+ }) : /* @__PURE__ */ z(k, {
52
53
  size: 14,
53
54
  className: "text-text-secondary"
54
55
  })
55
56
  });
56
57
  }
57
- function J({ value: e, field: t, copiedField: n, onCopy: r, ariaLabel: i }) {
58
- return /* @__PURE__ */ U(q, {
58
+ function U({ value: e, field: t, copiedField: n, onCopy: r, ariaLabel: i }) {
59
+ return /* @__PURE__ */ z(H, {
59
60
  isCopied: n === t,
60
61
  onCopy: () => r(e, t),
61
62
  ariaLabel: i
62
63
  });
63
64
  }
64
- function me({ enabled: e, collapsedHeight: t, children: n }) {
65
- return e ? /* @__PURE__ */ U(c, {
65
+ function Se({ enabled: e, collapsedHeight: t, children: n }) {
66
+ return e ? /* @__PURE__ */ z(c, {
66
67
  collapsedHeight: t,
67
68
  children: n
68
- }) : /* @__PURE__ */ U(H, { children: n });
69
+ }) : /* @__PURE__ */ z(R, { children: n });
69
70
  }
70
- function Y() {
71
- let { sandboxId: c } = B(), { basePath: v = "/", navigate: E, workspaceId: D } = e(), { t: O } = V(), [A, j] = k(null), [N, L] = k(!1), [q, Y] = k(!1), { data: ge, loading: _e, refetch: X } = y({
71
+ function W() {
72
+ let { sandboxId: c } = ge(), { basePath: v = "/", navigate: w, workspaceId: T } = e(), { t: E } = L(), [O, k] = D(null), [A, H] = D(!1), [W, G] = D(!1), { data: we, loading: Te, refetch: K } = ee({
72
73
  variables: {
73
- context: { workspaceId: D },
74
+ context: { workspaceId: T },
74
75
  id: c
75
76
  },
76
- skip: !c || !D
77
+ skip: !c || !T
77
78
  });
78
- ee({
79
+ te({
79
80
  variables: {
80
- workspaceId: D,
81
+ workspaceId: T,
81
82
  sandboxId: c
82
83
  },
83
- skip: !c || !D
84
+ skip: !c || !T
84
85
  });
85
- let [ve] = te(), [ye] = g(), [be] = _(), xe = m(), Z = ge?.getSandbox, Se = async (e, t) => {
86
- S("light"), await x(e) ? (C("success"), b() && w(`Copied ${t}`), j(t), setTimeout(() => j(null), 2e3)) : C("error");
87
- }, Q = (e, t) => {
88
- Se(e, t);
89
- }, $ = (e) => l(O, "sandbox.detail.actions.copy.ariaLabel", "Copy {field}", { field: e });
90
- if (_e) return /* @__PURE__ */ U(h, {
86
+ let [q] = ne(), [Ee] = g(), [De] = _(), Oe = m(), J = we?.getSandbox, ke = async (e, t) => {
87
+ x("light"), await b(e) ? (S("success"), y() && C(`Copied ${t}`), k(t), setTimeout(() => k(null), 2e3)) : S("error");
88
+ }, Y = (e, t) => {
89
+ ke(e, t);
90
+ }, X = (e) => l(E, "sandbox.detail.actions.copy.ariaLabel", "Copy {field}", { field: e });
91
+ if (Te) return /* @__PURE__ */ z(h, {
91
92
  showHeader: !1,
92
- children: /* @__PURE__ */ U("div", {
93
+ children: /* @__PURE__ */ z("div", {
93
94
  className: "flex items-center justify-center h-64",
94
- children: /* @__PURE__ */ U(F, {
95
+ children: /* @__PURE__ */ z(N, {
95
96
  size: 24,
96
97
  className: "animate-spin text-text-secondary"
97
98
  })
98
99
  })
99
100
  });
100
- if (!Z) return /* @__PURE__ */ U(h, {
101
+ if (!J) return /* @__PURE__ */ z(h, {
101
102
  showHeader: !1,
102
- children: /* @__PURE__ */ W("div", {
103
- className: "text-center py-16",
104
- children: [/* @__PURE__ */ U("p", {
105
- className: "text-text-secondary",
106
- children: l(O, "sandbox.detail.notFound.message", "Sandbox not found")
107
- }), /* @__PURE__ */ U(n, {
103
+ children: /* @__PURE__ */ z(_e, {
104
+ illustration: "empty-generic",
105
+ title: l(E, "sandbox.detail.notFound.message", "Sandbox not found"),
106
+ action: /* @__PURE__ */ z(n, {
108
107
  variant: "outline",
109
- onClick: () => E?.(v),
110
- className: "mt-4",
111
- children: l(O, "sandbox.detail.notFound.backButton", "Back to Sandboxes")
112
- })]
108
+ onClick: () => w?.(v),
109
+ children: l(E, "sandbox.detail.notFound.backButton", "Back to Sandboxes")
110
+ })
113
111
  })
114
112
  });
115
- let Ce = Z.status === "RUNNING" || Z.status === "PROVISIONING" || Z.status === "PENDING", we = Z.status === "RUNNING", Te = Z.status === "STOPPED" || Z.status === "ERROR" || Z.status === "EXPIRED" || Z.status === "FAILED", Ee = [
116
- ...Z.status === "RUNNING" ? [{
117
- label: l(O, "sandbox.detail.actions.extendTtl", "Extend TTL"),
118
- onSelect: () => L(!0),
119
- icon: /* @__PURE__ */ U(R, { size: 16 })
113
+ let Ae = J.status === "RUNNING" || J.status === "PROVISIONING" || J.status === "PENDING", Z = J.status === "RUNNING", je = J.status === "STOPPED" || J.status === "ERROR" || J.status === "EXPIRED" || J.status === "FAILED", Q = J.status === "RUNNING", Me = [
114
+ ...Q ? [{
115
+ label: l(E, "sandbox.detail.actions.extendTtl", "Extend TTL"),
116
+ onSelect: () => H(!0),
117
+ icon: /* @__PURE__ */ z(I, { size: 16 })
120
118
  }] : [],
121
- ...we ? [{
122
- label: l(O, "sandbox.detail.actions.stop", "Stop"),
123
- onSelect: () => void ve({ variables: {
124
- context: { workspaceId: D },
125
- id: Z.id
126
- } }).then(() => X()),
127
- icon: /* @__PURE__ */ U(I, { size: 16 })
119
+ ...Z ? [{
120
+ label: l(E, "sandbox.detail.actions.stop", "Stop"),
121
+ onSelect: () => void q({ variables: {
122
+ context: { workspaceId: T },
123
+ id: J.id
124
+ } }).then(() => K()),
125
+ icon: /* @__PURE__ */ z(P, { size: 16 })
128
126
  }] : [],
129
- ...Te ? [{
130
- label: l(O, "sandbox.detail.actions.delete", "Delete"),
131
- onSelect: () => void ye({ variables: {
132
- context: { workspaceId: D },
133
- id: Z.id
127
+ ...je ? [{
128
+ label: l(E, "sandbox.detail.actions.delete", "Delete"),
129
+ onSelect: () => void Ee({ variables: {
130
+ context: { workspaceId: T },
131
+ id: J.id
134
132
  } }).then(() => {
135
- E?.(v);
133
+ w?.(v);
136
134
  }),
137
- icon: /* @__PURE__ */ U(z, { size: 16 }),
135
+ icon: /* @__PURE__ */ z(he, { size: 16 }),
138
136
  intent: "destructive"
139
137
  }] : []
140
- ];
141
- return /* @__PURE__ */ W(h, {
138
+ ], $ = [
139
+ J.network?.internalUrl && J.status === "RUNNING" ? {
140
+ id: "copy-url",
141
+ label: l(E, "sandbox.detail.nextSteps.copyUrl.label", "Copy the internal URL to connect"),
142
+ description: l(E, "sandbox.detail.nextSteps.copyUrl.desc", "Use it to reach the running service from another sandbox or tool."),
143
+ icon: /* @__PURE__ */ z(M, { size: 16 }),
144
+ onClick: () => Y(J.network.internalUrl, "internalUrl")
145
+ } : null,
146
+ J.status === "RUNNING" ? {
147
+ id: "run-script",
148
+ label: l(E, "sandbox.detail.nextSteps.runScript.label", "Run a script inside the sandbox"),
149
+ description: l(E, "sandbox.detail.nextSteps.runScript.desc", "Execute a command or generated script, review the output, then promote it."),
150
+ icon: /* @__PURE__ */ z(F, { size: 16 }),
151
+ href: "#sandbox-script-runner"
152
+ } : null,
153
+ Q ? {
154
+ id: "extend-ttl",
155
+ label: l(E, "sandbox.detail.nextSteps.extendTtl.label", "Extend the time-to-live"),
156
+ description: l(E, "sandbox.detail.nextSteps.extendTtl.desc", "Keep this sandbox alive longer before it auto-expires."),
157
+ icon: /* @__PURE__ */ z(I, { size: 16 }),
158
+ onClick: () => H(!0)
159
+ } : null,
160
+ Z ? {
161
+ id: "stop",
162
+ label: l(E, "sandbox.detail.nextSteps.stop.label", "Stop the sandbox when you are done"),
163
+ description: l(E, "sandbox.detail.nextSteps.stop.desc", "Frees up resources and concurrency for your workspace."),
164
+ icon: /* @__PURE__ */ z(P, { size: 16 }),
165
+ onClick: () => void q({ variables: {
166
+ context: { workspaceId: T },
167
+ id: J.id
168
+ } }).then(() => K())
169
+ } : null
170
+ ].filter((e) => e !== null);
171
+ return /* @__PURE__ */ B(h, {
142
172
  showHeader: !1,
143
173
  children: [
144
- /* @__PURE__ */ W(o, {
174
+ /* @__PURE__ */ B(o, {
145
175
  className: "overflow-hidden bg-hero-mesh",
146
176
  children: [
147
- /* @__PURE__ */ W("div", {
177
+ /* @__PURE__ */ B("div", {
148
178
  className: "flex flex-col gap-4 sm:flex-row sm:items-start sm:justify-between",
149
- children: [/* @__PURE__ */ W("div", {
179
+ children: [/* @__PURE__ */ B("div", {
150
180
  className: "flex items-center gap-3 min-w-0",
151
181
  children: [
152
- /* @__PURE__ */ U("button", {
182
+ /* @__PURE__ */ z("button", {
153
183
  type: "button",
154
- onClick: () => E?.(v),
184
+ onClick: () => w?.(v),
155
185
  className: "flex size-11 flex-shrink-0 items-center justify-center rounded-lg hover:bg-bg-sunken/60 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-action-primary-border",
156
- "aria-label": l(O, "sandbox.detail.header.back.ariaLabel", "Back to sandboxes"),
157
- children: /* @__PURE__ */ U(oe, { size: 20 })
186
+ "aria-label": l(E, "sandbox.detail.header.back.ariaLabel", "Back to sandboxes"),
187
+ children: /* @__PURE__ */ z(ce, { size: 20 })
158
188
  }),
159
- /* @__PURE__ */ U(f, {
160
- type: Z.template,
189
+ /* @__PURE__ */ z(f, {
190
+ type: J.template,
161
191
  size: 28
162
192
  }),
163
- /* @__PURE__ */ W("div", {
193
+ /* @__PURE__ */ B("div", {
164
194
  className: "min-w-0",
165
- children: [/* @__PURE__ */ U("h1", {
195
+ children: [/* @__PURE__ */ z("h1", {
166
196
  className: "truncate text-2xl sm:text-3xl font-bold",
167
- children: Z.name
168
- }), /* @__PURE__ */ W("div", {
197
+ children: J.name
198
+ }), /* @__PURE__ */ B("div", {
169
199
  className: "flex flex-wrap items-center gap-2 mt-1",
170
200
  children: [
171
- /* @__PURE__ */ U(u, {
172
- status: Z.status,
201
+ /* @__PURE__ */ z(u, {
202
+ status: J.status,
173
203
  size: "md"
174
204
  }),
175
- /* @__PURE__ */ U("span", {
205
+ /* @__PURE__ */ z("span", {
176
206
  className: "text-sm text-text-secondary font-mono truncate",
177
- children: Z.id
207
+ children: J.id
178
208
  }),
179
- /* @__PURE__ */ U(J, {
180
- value: Z.id,
209
+ /* @__PURE__ */ z(U, {
210
+ value: J.id,
181
211
  field: "id",
182
- copiedField: A,
183
- onCopy: Q,
184
- ariaLabel: $("id")
212
+ copiedField: O,
213
+ onCopy: Y,
214
+ ariaLabel: X("id")
185
215
  })
186
216
  ]
187
217
  })]
188
218
  })
189
219
  ]
190
- }), /* @__PURE__ */ U(r, {
220
+ }), /* @__PURE__ */ z(r, {
191
221
  className: "flex-shrink-0",
192
222
  primary: {
193
- label: l(O, "sandbox.detail.actions.refresh", "Refresh"),
194
- onSelect: () => void X(),
195
- icon: /* @__PURE__ */ U(F, { size: 16 })
223
+ label: l(E, "sandbox.detail.actions.refresh", "Refresh"),
224
+ onSelect: () => void K(),
225
+ icon: /* @__PURE__ */ z(N, { size: 16 })
196
226
  },
197
- actions: Ee
227
+ actions: Me
198
228
  })]
199
229
  }),
200
- Z.network?.internalUrl && Z.status === "RUNNING" && /* @__PURE__ */ U("div", {
230
+ J.network?.internalUrl && J.status === "RUNNING" && /* @__PURE__ */ z("div", {
201
231
  className: "mt-4",
202
- children: /* @__PURE__ */ W(t, {
232
+ children: /* @__PURE__ */ B(t, {
203
233
  variant: "outline",
204
234
  className: "gap-1.5 px-3 py-1.5 text-sm border-border-seam",
205
235
  children: [
206
- /* @__PURE__ */ U(ue, { size: 14 }),
207
- Z.network.internalUrl,
208
- /* @__PURE__ */ U(J, {
209
- value: Z.network.internalUrl,
236
+ /* @__PURE__ */ z(M, { size: 14 }),
237
+ J.network.internalUrl,
238
+ /* @__PURE__ */ z(U, {
239
+ value: J.network.internalUrl,
210
240
  field: "internalUrl",
211
- copiedField: A,
212
- onCopy: Q,
213
- ariaLabel: $("internalUrl")
241
+ copiedField: O,
242
+ onCopy: Y,
243
+ ariaLabel: X("internalUrl")
214
244
  })
215
245
  ]
216
246
  })
217
247
  }),
218
- Z.status === "RUNNING" && Z.expiresAt && /* @__PURE__ */ U("div", {
248
+ J.status === "RUNNING" && J.expiresAt && /* @__PURE__ */ z("div", {
219
249
  className: "mt-4",
220
- children: /* @__PURE__ */ U(p, {
221
- expiresAt: Z.expiresAt,
222
- onExpired: () => X(),
223
- onExtend: () => L(!0)
250
+ children: /* @__PURE__ */ z(p, {
251
+ expiresAt: J.expiresAt,
252
+ onExpired: () => K(),
253
+ onExtend: () => H(!0)
224
254
  })
225
255
  })
226
256
  ]
227
257
  }),
228
- Z.description && /* @__PURE__ */ U(i, {
258
+ /* @__PURE__ */ z(ye, { children: l(E, "sandbox.detail.purpose", "This is the control room for a single sandbox — inspect its status, networking, containers, storage and live logs, run scripts inside it, extend its lifetime, or tear it down. Everything you do here is isolated to this one disposable environment.") }),
259
+ $.length > 0 && /* @__PURE__ */ z(ve, {
260
+ storageKey: "sandbox-detail",
261
+ steps: $
262
+ }),
263
+ J.description && /* @__PURE__ */ z(i, {
229
264
  className: "border-border-seam",
230
- children: /* @__PURE__ */ U(a, {
265
+ children: /* @__PURE__ */ z(a, {
231
266
  className: "p-5",
232
- children: /* @__PURE__ */ W("div", {
267
+ children: /* @__PURE__ */ B("div", {
233
268
  className: "flex items-start gap-3",
234
- children: [/* @__PURE__ */ U(P, {
269
+ children: [/* @__PURE__ */ z(j, {
235
270
  size: 18,
236
271
  className: "text-primary flex-shrink-0 mt-0.5"
237
- }), /* @__PURE__ */ U("p", {
272
+ }), /* @__PURE__ */ z("p", {
238
273
  className: "text-sm text-text-secondary leading-relaxed",
239
- children: Z.description
274
+ children: J.description
240
275
  })]
241
276
  })
242
277
  })
243
278
  }),
244
- /* @__PURE__ */ W("div", {
279
+ /* @__PURE__ */ B("div", {
245
280
  className: "grid grid-cols-1 lg:grid-cols-2 gap-4",
246
281
  children: [
247
- /* @__PURE__ */ U(s, {
282
+ /* @__PURE__ */ z(s, {
248
283
  treatment: "plain",
249
284
  className: "border-border-seam",
250
- children: /* @__PURE__ */ W("div", {
285
+ children: /* @__PURE__ */ B("div", {
251
286
  className: "p-5",
252
- children: [/* @__PURE__ */ W("h3", {
287
+ children: [/* @__PURE__ */ B("h3", {
253
288
  className: "font-semibold mb-4 flex items-center gap-2",
254
- children: [/* @__PURE__ */ U("div", {
289
+ children: [/* @__PURE__ */ z("div", {
255
290
  className: "p-1.5 rounded-lg bg-action-primary-bg/10",
256
- children: /* @__PURE__ */ U(F, {
291
+ children: /* @__PURE__ */ z(N, {
257
292
  size: 14,
258
293
  className: "text-primary"
259
294
  })
260
- }), l(O, "sandbox.detail.cards.resources.title", "Resources")]
261
- }), /* @__PURE__ */ U(d, {
262
- cpuRequest: Z.resources?.cpuRequest ?? "0",
263
- cpuLimit: Z.resources?.cpuLimit,
264
- memoryRequest: Z.resources?.memoryRequest ?? "0",
265
- memoryLimit: Z.resources?.memoryLimit,
266
- containerCount: Z.containers?.length,
295
+ }), l(E, "sandbox.detail.cards.resources.title", "Resources")]
296
+ }), /* @__PURE__ */ z(d, {
297
+ cpuRequest: J.resources?.cpuRequest ?? "0",
298
+ cpuLimit: J.resources?.cpuLimit,
299
+ memoryRequest: J.resources?.memoryRequest ?? "0",
300
+ memoryLimit: J.resources?.memoryLimit,
301
+ containerCount: J.containers?.length,
267
302
  layout: "grid"
268
303
  })]
269
304
  })
270
305
  }),
271
- /* @__PURE__ */ U(s, {
306
+ /* @__PURE__ */ z(s, {
272
307
  treatment: "plain",
273
308
  className: "border-border-seam",
274
- children: /* @__PURE__ */ W("div", {
309
+ children: /* @__PURE__ */ B("div", {
275
310
  className: "p-5",
276
- children: [/* @__PURE__ */ W("h3", {
311
+ children: [/* @__PURE__ */ B("h3", {
277
312
  className: "font-semibold mb-4 flex items-center gap-2",
278
- children: [/* @__PURE__ */ U("div", {
313
+ children: [/* @__PURE__ */ z("div", {
279
314
  className: "p-1.5 rounded-lg bg-action-primary-bg/10",
280
- children: /* @__PURE__ */ U(fe, {
315
+ children: /* @__PURE__ */ z(me, {
281
316
  size: 14,
282
317
  className: "text-primary"
283
318
  })
284
- }), l(O, "sandbox.detail.cards.kubernetes.title", "Kubernetes")]
285
- }), /* @__PURE__ */ W("div", {
319
+ }), l(E, "sandbox.detail.cards.kubernetes.title", "Kubernetes")]
320
+ }), /* @__PURE__ */ B("div", {
286
321
  className: "space-y-3",
287
322
  children: [
288
- Z.crdName && /* @__PURE__ */ W("div", {
323
+ J.crdName && /* @__PURE__ */ B("div", {
289
324
  className: "flex items-center justify-between",
290
- children: [/* @__PURE__ */ U("span", {
325
+ children: [/* @__PURE__ */ z("span", {
291
326
  className: "text-sm text-text-secondary",
292
- children: l(O, "sandbox.detail.cards.kubernetes.crdName", "CRD Name")
293
- }), /* @__PURE__ */ W("div", {
327
+ children: l(E, "sandbox.detail.cards.kubernetes.crdName", "CRD Name")
328
+ }), /* @__PURE__ */ B("div", {
294
329
  className: "flex items-center gap-1.5",
295
- children: [/* @__PURE__ */ U("span", {
330
+ children: [/* @__PURE__ */ z("span", {
296
331
  className: "text-sm font-mono",
297
- children: Z.crdName
298
- }), /* @__PURE__ */ U(J, {
299
- value: Z.crdName,
332
+ children: J.crdName
333
+ }), /* @__PURE__ */ z(U, {
334
+ value: J.crdName,
300
335
  field: "crdName",
301
- copiedField: A,
302
- onCopy: Q,
303
- ariaLabel: $("crdName")
336
+ copiedField: O,
337
+ onCopy: Y,
338
+ ariaLabel: X("crdName")
304
339
  })]
305
340
  })]
306
341
  }),
307
- Z.podName && /* @__PURE__ */ W("div", {
342
+ J.podName && /* @__PURE__ */ B("div", {
308
343
  className: "flex items-center justify-between",
309
- children: [/* @__PURE__ */ U("span", {
344
+ children: [/* @__PURE__ */ z("span", {
310
345
  className: "text-sm text-text-secondary",
311
- children: l(O, "sandbox.detail.cards.kubernetes.podName", "Pod Name")
312
- }), /* @__PURE__ */ W("div", {
346
+ children: l(E, "sandbox.detail.cards.kubernetes.podName", "Pod Name")
347
+ }), /* @__PURE__ */ B("div", {
313
348
  className: "flex items-center gap-1.5",
314
- children: [/* @__PURE__ */ U("span", {
349
+ children: [/* @__PURE__ */ z("span", {
315
350
  className: "text-sm font-mono",
316
- children: Z.podName
317
- }), /* @__PURE__ */ U(J, {
318
- value: Z.podName,
351
+ children: J.podName
352
+ }), /* @__PURE__ */ z(U, {
353
+ value: J.podName,
319
354
  field: "podName",
320
- copiedField: A,
321
- onCopy: Q,
322
- ariaLabel: $("podName")
355
+ copiedField: O,
356
+ onCopy: Y,
357
+ ariaLabel: X("podName")
323
358
  })]
324
359
  })]
325
360
  }),
326
- /* @__PURE__ */ W("div", {
361
+ /* @__PURE__ */ B("div", {
327
362
  className: "flex items-center justify-between",
328
- children: [/* @__PURE__ */ U("span", {
363
+ children: [/* @__PURE__ */ z("span", {
329
364
  className: "text-sm text-text-secondary",
330
- children: l(O, "sandbox.detail.cards.kubernetes.namespace", "Namespace")
331
- }), /* @__PURE__ */ U("span", {
365
+ children: l(E, "sandbox.detail.cards.kubernetes.namespace", "Namespace")
366
+ }), /* @__PURE__ */ z("span", {
332
367
  className: "text-sm font-mono",
333
- children: Z.namespace
368
+ children: J.namespace
334
369
  })]
335
370
  }),
336
- /* @__PURE__ */ W("div", {
371
+ /* @__PURE__ */ B("div", {
337
372
  className: "flex items-center justify-between",
338
- children: [/* @__PURE__ */ U("span", {
373
+ children: [/* @__PURE__ */ z("span", {
339
374
  className: "text-sm text-text-secondary",
340
- children: l(O, "sandbox.detail.cards.kubernetes.runtimeClass", "Runtime Class")
341
- }), /* @__PURE__ */ U(t, {
375
+ children: l(E, "sandbox.detail.cards.kubernetes.runtimeClass", "Runtime Class")
376
+ }), /* @__PURE__ */ z(t, {
342
377
  variant: "secondary",
343
378
  className: "font-mono text-xs",
344
- children: Z.runtimeClass
379
+ children: J.runtimeClass
345
380
  })]
346
381
  }),
347
- Z.network?.serviceName && /* @__PURE__ */ W("div", {
382
+ J.network?.serviceName && /* @__PURE__ */ B("div", {
348
383
  className: "flex items-center justify-between",
349
- children: [/* @__PURE__ */ U("span", {
384
+ children: [/* @__PURE__ */ z("span", {
350
385
  className: "text-sm text-text-secondary",
351
- children: l(O, "sandbox.detail.cards.kubernetes.serviceName", "Service Name")
352
- }), /* @__PURE__ */ W("div", {
386
+ children: l(E, "sandbox.detail.cards.kubernetes.serviceName", "Service Name")
387
+ }), /* @__PURE__ */ B("div", {
353
388
  className: "flex items-center gap-1.5",
354
- children: [/* @__PURE__ */ U("span", {
389
+ children: [/* @__PURE__ */ z("span", {
355
390
  className: "text-sm font-mono",
356
- children: Z.network.serviceName
357
- }), /* @__PURE__ */ U(J, {
358
- value: Z.network.serviceName,
391
+ children: J.network.serviceName
392
+ }), /* @__PURE__ */ z(U, {
393
+ value: J.network.serviceName,
359
394
  field: "serviceName",
360
- copiedField: A,
361
- onCopy: Q,
362
- ariaLabel: $("serviceName")
395
+ copiedField: O,
396
+ onCopy: Y,
397
+ ariaLabel: X("serviceName")
363
398
  })]
364
399
  })]
365
400
  }),
366
- Z.network?.internalUrl && /* @__PURE__ */ W("div", {
401
+ J.network?.internalUrl && /* @__PURE__ */ B("div", {
367
402
  className: "flex items-center justify-between",
368
- children: [/* @__PURE__ */ U("span", {
403
+ children: [/* @__PURE__ */ z("span", {
369
404
  className: "text-sm text-text-secondary",
370
- children: l(O, "sandbox.detail.cards.kubernetes.internalUrl", "Internal URL")
371
- }), /* @__PURE__ */ W("div", {
405
+ children: l(E, "sandbox.detail.cards.kubernetes.internalUrl", "Internal URL")
406
+ }), /* @__PURE__ */ B("div", {
372
407
  className: "flex items-center gap-1.5",
373
- children: [/* @__PURE__ */ U("span", {
408
+ children: [/* @__PURE__ */ z("span", {
374
409
  className: "text-sm text-primary font-mono truncate max-w-48",
375
- children: Z.network.internalUrl
376
- }), /* @__PURE__ */ U(J, {
377
- value: Z.network.internalUrl,
410
+ children: J.network.internalUrl
411
+ }), /* @__PURE__ */ z(U, {
412
+ value: J.network.internalUrl,
378
413
  field: "internalUrl",
379
- copiedField: A,
380
- onCopy: Q,
381
- ariaLabel: $("internalUrl")
414
+ copiedField: O,
415
+ onCopy: Y,
416
+ ariaLabel: X("internalUrl")
382
417
  })]
383
418
  })]
384
419
  }),
385
- Z.network?.containerUrls && typeof Z.network.containerUrls == "object" && Object.keys(Z.network.containerUrls).filter((e) => !e.includes(":")).length > 1 && /* @__PURE__ */ W("div", {
420
+ J.network?.containerUrls && typeof J.network.containerUrls == "object" && Object.keys(J.network.containerUrls).filter((e) => !e.includes(":")).length > 1 && /* @__PURE__ */ B("div", {
386
421
  className: "mt-3 pt-3 border-t border-border-subtle/30",
387
- children: [/* @__PURE__ */ U("p", {
422
+ children: [/* @__PURE__ */ z("p", {
388
423
  className: "text-xs font-semibold text-text-secondary mb-2",
389
- children: l(O, "sandbox.detail.cards.kubernetes.containerEndpoints", "Container Endpoints")
390
- }), /* @__PURE__ */ U("div", {
424
+ children: l(E, "sandbox.detail.cards.kubernetes.containerEndpoints", "Container Endpoints")
425
+ }), /* @__PURE__ */ z("div", {
391
426
  className: "space-y-1.5",
392
- children: Object.entries(Z.network.containerUrls).reduce((e, [t, n]) => (t.includes(":") || e.push(/* @__PURE__ */ W("div", {
427
+ children: Object.entries(J.network.containerUrls).reduce((e, [t, n]) => (t.includes(":") || e.push(/* @__PURE__ */ B("div", {
393
428
  className: "flex items-center justify-between",
394
- children: [/* @__PURE__ */ U("span", {
429
+ children: [/* @__PURE__ */ z("span", {
395
430
  className: "text-xs text-text-secondary font-mono",
396
431
  children: t
397
- }), /* @__PURE__ */ W("div", {
432
+ }), /* @__PURE__ */ B("div", {
398
433
  className: "flex items-center gap-1.5",
399
- children: [/* @__PURE__ */ U("span", {
434
+ children: [/* @__PURE__ */ z("span", {
400
435
  className: "text-xs text-primary font-mono truncate max-w-40",
401
436
  children: n
402
- }), /* @__PURE__ */ U(J, {
437
+ }), /* @__PURE__ */ z(U, {
403
438
  value: n,
404
439
  field: `container-${t}`,
405
- copiedField: A,
406
- onCopy: Q,
407
- ariaLabel: $(`container-${t}`)
440
+ copiedField: O,
441
+ onCopy: Y,
442
+ ariaLabel: X(`container-${t}`)
408
443
  })]
409
444
  })]
410
445
  }, t)), e), [])
@@ -414,142 +449,142 @@ function Y() {
414
449
  })]
415
450
  })
416
451
  }),
417
- /* @__PURE__ */ U(s, {
452
+ /* @__PURE__ */ z(s, {
418
453
  treatment: "plain",
419
454
  className: "border-border-seam",
420
- children: /* @__PURE__ */ W("div", {
455
+ children: /* @__PURE__ */ B("div", {
421
456
  className: "p-5",
422
- children: [/* @__PURE__ */ W("h3", {
457
+ children: [/* @__PURE__ */ B("h3", {
423
458
  className: "font-semibold mb-4 flex items-center gap-2",
424
- children: [/* @__PURE__ */ U("div", {
459
+ children: [/* @__PURE__ */ z("div", {
425
460
  className: "p-1.5 rounded-lg bg-action-primary-bg/10",
426
- children: /* @__PURE__ */ U(se, {
461
+ children: /* @__PURE__ */ z(le, {
427
462
  size: 14,
428
463
  className: "text-primary"
429
464
  })
430
- }), l(O, "sandbox.detail.cards.lifecycle.title", "Lifecycle")]
431
- }), /* @__PURE__ */ W("div", {
465
+ }), l(E, "sandbox.detail.cards.lifecycle.title", "Lifecycle")]
466
+ }), /* @__PURE__ */ B("div", {
432
467
  className: "space-y-3",
433
468
  children: [
434
- /* @__PURE__ */ W("div", {
469
+ /* @__PURE__ */ B("div", {
435
470
  className: "flex items-center justify-between",
436
- children: [/* @__PURE__ */ U("span", {
471
+ children: [/* @__PURE__ */ z("span", {
437
472
  className: "text-sm text-text-secondary",
438
- children: l(O, "sandbox.detail.cards.lifecycle.ttl", "TTL")
439
- }), /* @__PURE__ */ U("span", {
473
+ children: l(E, "sandbox.detail.cards.lifecycle.ttl", "TTL")
474
+ }), /* @__PURE__ */ z("span", {
440
475
  className: "text-sm font-medium",
441
- children: K(Z.ttlSeconds)
476
+ children: be(J.ttlSeconds)
442
477
  })]
443
478
  }),
444
- Z.expiresAt && Ce && /* @__PURE__ */ W("div", {
479
+ J.expiresAt && Ae && /* @__PURE__ */ B("div", {
445
480
  className: "flex items-center justify-between",
446
- children: [/* @__PURE__ */ U("span", {
481
+ children: [/* @__PURE__ */ z("span", {
447
482
  className: "text-sm text-text-secondary",
448
- children: l(O, "sandbox.detail.cards.lifecycle.expires", "Expires")
449
- }), /* @__PURE__ */ W(t, {
483
+ children: l(E, "sandbox.detail.cards.lifecycle.expires", "Expires")
484
+ }), /* @__PURE__ */ B(t, {
450
485
  variant: "outline",
451
486
  className: "gap-1",
452
- children: [/* @__PURE__ */ U(R, { size: 12 }), pe(Z.expiresAt)]
487
+ children: [/* @__PURE__ */ z(I, { size: 12 }), xe(J.expiresAt)]
453
488
  })]
454
489
  }),
455
- /* @__PURE__ */ W("div", {
490
+ /* @__PURE__ */ B("div", {
456
491
  className: "flex items-center justify-between",
457
- children: [/* @__PURE__ */ U("span", {
492
+ children: [/* @__PURE__ */ z("span", {
458
493
  className: "text-sm text-text-secondary",
459
- children: l(O, "sandbox.detail.cards.lifecycle.created", "Created")
460
- }), /* @__PURE__ */ U("span", {
494
+ children: l(E, "sandbox.detail.cards.lifecycle.created", "Created")
495
+ }), /* @__PURE__ */ z("span", {
461
496
  className: "text-sm",
462
- children: G(Z.createdAt)
497
+ children: V(J.createdAt)
463
498
  })]
464
499
  }),
465
- /* @__PURE__ */ W("div", {
500
+ /* @__PURE__ */ B("div", {
466
501
  className: "flex items-center justify-between",
467
- children: [/* @__PURE__ */ U("span", {
502
+ children: [/* @__PURE__ */ z("span", {
468
503
  className: "text-sm text-text-secondary",
469
- children: l(O, "sandbox.detail.cards.lifecycle.updated", "Updated")
470
- }), /* @__PURE__ */ U("span", {
504
+ children: l(E, "sandbox.detail.cards.lifecycle.updated", "Updated")
505
+ }), /* @__PURE__ */ z("span", {
471
506
  className: "text-sm",
472
- children: G(Z.updatedAt)
507
+ children: V(J.updatedAt)
473
508
  })]
474
509
  }),
475
- Z.stoppedAt && /* @__PURE__ */ W("div", {
510
+ J.stoppedAt && /* @__PURE__ */ B("div", {
476
511
  className: "flex items-center justify-between",
477
- children: [/* @__PURE__ */ U("span", {
512
+ children: [/* @__PURE__ */ z("span", {
478
513
  className: "text-sm text-text-secondary",
479
- children: l(O, "sandbox.detail.cards.lifecycle.stopped", "Stopped")
480
- }), /* @__PURE__ */ U("span", {
514
+ children: l(E, "sandbox.detail.cards.lifecycle.stopped", "Stopped")
515
+ }), /* @__PURE__ */ z("span", {
481
516
  className: "text-sm",
482
- children: G(Z.stoppedAt)
517
+ children: V(J.stoppedAt)
483
518
  })]
484
519
  })
485
520
  ]
486
521
  })]
487
522
  })
488
523
  }),
489
- /* @__PURE__ */ U(s, {
524
+ /* @__PURE__ */ z(s, {
490
525
  treatment: "plain",
491
526
  className: "border-border-seam",
492
- children: /* @__PURE__ */ W("div", {
527
+ children: /* @__PURE__ */ B("div", {
493
528
  className: "p-5",
494
- children: [/* @__PURE__ */ W("h3", {
529
+ children: [/* @__PURE__ */ B("h3", {
495
530
  className: "font-semibold mb-4 flex items-center gap-2",
496
- children: [/* @__PURE__ */ U("div", {
531
+ children: [/* @__PURE__ */ z("div", {
497
532
  className: "p-1.5 rounded-lg bg-action-primary-bg/10",
498
- children: /* @__PURE__ */ U(P, {
533
+ children: /* @__PURE__ */ z(j, {
499
534
  size: 14,
500
535
  className: "text-primary"
501
536
  })
502
- }), l(O, "sandbox.detail.cards.details.title", "Details")]
503
- }), /* @__PURE__ */ W("div", {
537
+ }), l(E, "sandbox.detail.cards.details.title", "Details")]
538
+ }), /* @__PURE__ */ B("div", {
504
539
  className: "space-y-3",
505
540
  children: [
506
- /* @__PURE__ */ W("div", {
541
+ /* @__PURE__ */ B("div", {
507
542
  className: "flex items-center justify-between",
508
- children: [/* @__PURE__ */ U("span", {
543
+ children: [/* @__PURE__ */ z("span", {
509
544
  className: "text-sm text-text-secondary",
510
- children: l(O, "sandbox.detail.cards.details.template", "Template")
511
- }), /* @__PURE__ */ U(f, {
512
- type: Z.template,
545
+ children: l(E, "sandbox.detail.cards.details.template", "Template")
546
+ }), /* @__PURE__ */ z(f, {
547
+ type: J.template,
513
548
  showLabel: !0
514
549
  })]
515
550
  }),
516
- /* @__PURE__ */ W("div", {
551
+ /* @__PURE__ */ B("div", {
517
552
  className: "flex items-center justify-between",
518
- children: [/* @__PURE__ */ U("span", {
553
+ children: [/* @__PURE__ */ z("span", {
519
554
  className: "text-sm text-text-secondary",
520
- children: l(O, "sandbox.detail.cards.details.mode", "Mode")
521
- }), /* @__PURE__ */ U(t, {
555
+ children: l(E, "sandbox.detail.cards.details.mode", "Mode")
556
+ }), /* @__PURE__ */ z(t, {
522
557
  variant: "outline",
523
558
  className: "gap-1 text-xs font-mono",
524
- children: Z.mode === "JOB" ? /* @__PURE__ */ W(H, { children: [
525
- /* @__PURE__ */ U(de, { size: 12 }),
559
+ children: J.mode === "JOB" ? /* @__PURE__ */ B(R, { children: [
560
+ /* @__PURE__ */ z(pe, { size: 12 }),
526
561
  " ",
527
- l(O, "sandbox.detail.cards.details.mode.job", "Job")
528
- ] }) : /* @__PURE__ */ W(H, { children: [
529
- /* @__PURE__ */ U(ce, { size: 12 }),
562
+ l(E, "sandbox.detail.cards.details.mode.job", "Job")
563
+ ] }) : /* @__PURE__ */ B(R, { children: [
564
+ /* @__PURE__ */ z(ue, { size: 12 }),
530
565
  " ",
531
- l(O, "sandbox.detail.cards.details.mode.deployment", "Deployment")
566
+ l(E, "sandbox.detail.cards.details.mode.deployment", "Deployment")
532
567
  ] })
533
568
  })]
534
569
  }),
535
- /* @__PURE__ */ W("div", {
570
+ /* @__PURE__ */ B("div", {
536
571
  className: "flex items-center justify-between",
537
- children: [/* @__PURE__ */ U("span", {
572
+ children: [/* @__PURE__ */ z("span", {
538
573
  className: "text-sm text-text-secondary",
539
- children: l(O, "sandbox.detail.cards.details.workspace", "Workspace")
540
- }), /* @__PURE__ */ U("span", {
574
+ children: l(E, "sandbox.detail.cards.details.workspace", "Workspace")
575
+ }), /* @__PURE__ */ z("span", {
541
576
  className: "text-sm font-mono",
542
- children: Z.workspaceId
577
+ children: J.workspaceId
543
578
  })]
544
579
  }),
545
- /* @__PURE__ */ W("div", {
580
+ /* @__PURE__ */ B("div", {
546
581
  className: "flex items-center justify-between",
547
- children: [/* @__PURE__ */ U("span", {
582
+ children: [/* @__PURE__ */ z("span", {
548
583
  className: "text-sm text-text-secondary",
549
- children: l(O, "sandbox.detail.cards.details.createdBy", "Created By")
550
- }), /* @__PURE__ */ U("span", {
584
+ children: l(E, "sandbox.detail.cards.details.createdBy", "Created By")
585
+ }), /* @__PURE__ */ z("span", {
551
586
  className: "text-sm",
552
- children: Z.createdBy
587
+ children: J.createdBy
553
588
  })]
554
589
  })
555
590
  ]
@@ -558,53 +593,53 @@ function Y() {
558
593
  })
559
594
  ]
560
595
  }),
561
- Z.containers && Z.containers.length > 0 && /* @__PURE__ */ U(s, {
596
+ J.containers && J.containers.length > 0 && /* @__PURE__ */ z(s, {
562
597
  treatment: "plain",
563
598
  className: "border-border-seam",
564
- children: /* @__PURE__ */ W("div", {
599
+ children: /* @__PURE__ */ B("div", {
565
600
  className: "p-5",
566
- children: [/* @__PURE__ */ W("h3", {
601
+ children: [/* @__PURE__ */ B("h3", {
567
602
  className: "font-semibold mb-4 flex items-center gap-2",
568
603
  children: [
569
- /* @__PURE__ */ U("div", {
604
+ /* @__PURE__ */ z("div", {
570
605
  className: "p-1.5 rounded-lg bg-action-primary-bg/10",
571
- children: /* @__PURE__ */ U(le, {
606
+ children: /* @__PURE__ */ z(de, {
572
607
  size: 14,
573
608
  className: "text-primary"
574
609
  })
575
610
  }),
576
- l(O, "sandbox.detail.cards.containers.title", "Containers"),
577
- /* @__PURE__ */ U(t, {
611
+ l(E, "sandbox.detail.cards.containers.title", "Containers"),
612
+ /* @__PURE__ */ z(t, {
578
613
  variant: "secondary",
579
614
  className: "ml-1",
580
- children: Z.containers.length
615
+ children: J.containers.length
581
616
  })
582
617
  ]
583
- }), /* @__PURE__ */ U(me, {
584
- enabled: Z.containers.length > 4,
618
+ }), /* @__PURE__ */ z(Se, {
619
+ enabled: J.containers.length > 4,
585
620
  collapsedHeight: 220,
586
- children: /* @__PURE__ */ U("div", {
621
+ children: /* @__PURE__ */ z("div", {
587
622
  className: "space-y-3",
588
- children: Z.containers.map((e, n) => {
589
- let r = Z.containerStatuses?.find((t) => t.name === e.name);
590
- return /* @__PURE__ */ W("div", {
623
+ children: J.containers.map((e, n) => {
624
+ let r = J.containerStatuses?.find((t) => t.name === e.name);
625
+ return /* @__PURE__ */ B("div", {
591
626
  className: "flex items-center justify-between p-3 rounded-lg border border-border-seam hover:bg-bg-sunken/30 transition-colors",
592
- children: [/* @__PURE__ */ W("div", {
627
+ children: [/* @__PURE__ */ B("div", {
593
628
  className: "flex items-center gap-3 min-w-0",
594
- children: [/* @__PURE__ */ U("div", { className: `w-2.5 h-2.5 rounded-full flex-shrink-0 ${r?.ready ? "bg-status-success-text" : r ? "bg-status-warning-text animate-pulse" : "bg-text-tertiary"}` }), /* @__PURE__ */ W("div", {
629
+ children: [/* @__PURE__ */ z("div", { className: `w-2.5 h-2.5 rounded-full flex-shrink-0 ${r?.ready ? "bg-status-success-text motion-safe:animate-vc-glow-pulse" : r ? "bg-status-warning-text animate-pulse" : "bg-text-tertiary"}` }), /* @__PURE__ */ B("div", {
595
630
  className: "min-w-0",
596
- children: [/* @__PURE__ */ U("p", {
631
+ children: [/* @__PURE__ */ z("p", {
597
632
  className: "text-sm font-medium",
598
633
  children: e.name
599
- }), /* @__PURE__ */ U("p", {
634
+ }), /* @__PURE__ */ z("p", {
600
635
  className: "text-xs text-text-secondary font-mono truncate",
601
636
  children: e.image
602
637
  })]
603
638
  })]
604
- }), /* @__PURE__ */ W("div", {
639
+ }), /* @__PURE__ */ B("div", {
605
640
  className: "flex items-center gap-2 flex-shrink-0",
606
641
  children: [
607
- e.ports?.map((e) => /* @__PURE__ */ W(t, {
642
+ e.ports?.map((e) => /* @__PURE__ */ B(t, {
608
643
  variant: "outline",
609
644
  className: "text-xs font-mono",
610
645
  children: [
@@ -613,12 +648,12 @@ function Y() {
613
648
  e.name ? ` (${e.name})` : ""
614
649
  ]
615
650
  }, e.containerPort)),
616
- r && /* @__PURE__ */ U(t, {
651
+ r && /* @__PURE__ */ z(t, {
617
652
  variant: r.ready ? "default" : "secondary",
618
653
  className: `text-xs ${r.ready ? "bg-status-success-bg-subtle text-status-success-text" : ""}`,
619
- children: r.ready ? l(O, "sandbox.detail.cards.containers.status.ready", "Ready") : l(O, "sandbox.detail.cards.containers.status.notReady", "Not Ready")
654
+ children: r.ready ? l(E, "sandbox.detail.cards.containers.status.ready", "Ready") : l(E, "sandbox.detail.cards.containers.status.notReady", "Not Ready")
620
655
  }),
621
- r?.restartCount !== void 0 && r.restartCount > 0 && /* @__PURE__ */ W(t, {
656
+ r?.restartCount !== void 0 && r.restartCount > 0 && /* @__PURE__ */ B(t, {
622
657
  variant: "outline",
623
658
  className: "text-xs text-status-warning-text",
624
659
  children: [
@@ -635,88 +670,88 @@ function Y() {
635
670
  })]
636
671
  })
637
672
  }),
638
- Z.storage && Z.storage.mode !== "NONE" && /* @__PURE__ */ U(s, {
673
+ J.storage && J.storage.mode !== "NONE" && /* @__PURE__ */ z(s, {
639
674
  treatment: "plain",
640
675
  className: "border-border-seam",
641
- children: /* @__PURE__ */ W("div", {
676
+ children: /* @__PURE__ */ B("div", {
642
677
  className: "p-5",
643
- children: [/* @__PURE__ */ W("h3", {
678
+ children: [/* @__PURE__ */ B("h3", {
644
679
  className: "font-semibold mb-4 flex items-center gap-2",
645
- children: [/* @__PURE__ */ U("div", {
680
+ children: [/* @__PURE__ */ z("div", {
646
681
  className: "p-1.5 rounded-lg bg-action-primary-bg/10",
647
- children: /* @__PURE__ */ U(M, {
682
+ children: /* @__PURE__ */ z(fe, {
648
683
  size: 14,
649
684
  className: "text-primary"
650
685
  })
651
- }), l(O, "sandbox.detail.cards.storage.title", "Storage")]
652
- }), /* @__PURE__ */ W("div", {
686
+ }), l(E, "sandbox.detail.cards.storage.title", "Storage")]
687
+ }), /* @__PURE__ */ B("div", {
653
688
  className: "space-y-3",
654
689
  children: [
655
- /* @__PURE__ */ W("div", {
690
+ /* @__PURE__ */ B("div", {
656
691
  className: "flex items-center justify-between",
657
- children: [/* @__PURE__ */ U("span", {
692
+ children: [/* @__PURE__ */ z("span", {
658
693
  className: "text-sm text-text-secondary",
659
- children: l(O, "sandbox.detail.cards.storage.mode", "Mode")
660
- }), /* @__PURE__ */ U(t, {
694
+ children: l(E, "sandbox.detail.cards.storage.mode", "Mode")
695
+ }), /* @__PURE__ */ z(t, {
661
696
  variant: "outline",
662
- children: Z.storage.mode === "EPHEMERAL" ? l(O, "sandbox.detail.cards.storage.ephemeral", "Ephemeral") : l(O, "sandbox.detail.cards.storage.persistent", "Persistent")
697
+ children: J.storage.mode === "EPHEMERAL" ? l(E, "sandbox.detail.cards.storage.ephemeral", "Ephemeral") : l(E, "sandbox.detail.cards.storage.persistent", "Persistent")
663
698
  })]
664
699
  }),
665
- Z.storage.sizeGi && /* @__PURE__ */ W("div", {
700
+ J.storage.sizeGi && /* @__PURE__ */ B("div", {
666
701
  className: "flex items-center justify-between",
667
- children: [/* @__PURE__ */ U("span", {
702
+ children: [/* @__PURE__ */ z("span", {
668
703
  className: "text-sm text-text-secondary",
669
- children: l(O, "sandbox.detail.cards.storage.size", "Size")
670
- }), /* @__PURE__ */ W("span", {
704
+ children: l(E, "sandbox.detail.cards.storage.size", "Size")
705
+ }), /* @__PURE__ */ B("span", {
671
706
  className: "text-sm font-medium",
672
- children: [Z.storage.sizeGi, " GiB"]
707
+ children: [J.storage.sizeGi, " GiB"]
673
708
  })]
674
709
  }),
675
- Z.storage.mountPath && /* @__PURE__ */ W("div", {
710
+ J.storage.mountPath && /* @__PURE__ */ B("div", {
676
711
  className: "flex items-center justify-between",
677
- children: [/* @__PURE__ */ U("span", {
712
+ children: [/* @__PURE__ */ z("span", {
678
713
  className: "text-sm text-text-secondary",
679
- children: l(O, "sandbox.detail.cards.storage.mountPath", "Mount Path")
680
- }), /* @__PURE__ */ U("span", {
714
+ children: l(E, "sandbox.detail.cards.storage.mountPath", "Mount Path")
715
+ }), /* @__PURE__ */ z("span", {
681
716
  className: "text-sm font-mono",
682
- children: Z.storage.mountPath
717
+ children: J.storage.mountPath
683
718
  })]
684
719
  }),
685
- /* @__PURE__ */ W("div", {
720
+ /* @__PURE__ */ B("div", {
686
721
  className: "flex items-center justify-between",
687
- children: [/* @__PURE__ */ U("span", {
722
+ children: [/* @__PURE__ */ z("span", {
688
723
  className: "text-sm text-text-secondary",
689
- children: l(O, "sandbox.detail.cards.storage.retainOnDelete", "Retain on Delete")
690
- }), /* @__PURE__ */ U(t, {
691
- variant: Z.storage.retainOnDelete ? "default" : "secondary",
692
- children: Z.storage.retainOnDelete ? l(O, "sandbox.detail.cards.storage.retainYes", "Yes") : l(O, "sandbox.detail.cards.storage.retainNo", "No")
724
+ children: l(E, "sandbox.detail.cards.storage.retainOnDelete", "Retain on Delete")
725
+ }), /* @__PURE__ */ z(t, {
726
+ variant: J.storage.retainOnDelete ? "default" : "secondary",
727
+ children: J.storage.retainOnDelete ? l(E, "sandbox.detail.cards.storage.retainYes", "Yes") : l(E, "sandbox.detail.cards.storage.retainNo", "No")
693
728
  })]
694
729
  })
695
730
  ]
696
731
  })]
697
732
  })
698
733
  }),
699
- Z.errorMessage && /* @__PURE__ */ U(i, {
734
+ J.errorMessage && /* @__PURE__ */ z(i, {
700
735
  className: "border-status-error-border/50 bg-status-error-bg/5",
701
- children: /* @__PURE__ */ W(a, {
736
+ children: /* @__PURE__ */ B(a, {
702
737
  className: "p-5",
703
- children: [/* @__PURE__ */ W("h3", {
738
+ children: [/* @__PURE__ */ B("h3", {
704
739
  className: "font-semibold text-status-error-text mb-2 flex items-center gap-2",
705
- children: [/* @__PURE__ */ U(ae, { size: 18 }), l(O, "sandbox.detail.cards.errorDetails.title", "Error Details")]
706
- }), /* @__PURE__ */ U("p", {
740
+ children: [/* @__PURE__ */ z(se, { size: 18 }), l(E, "sandbox.detail.cards.errorDetails.title", "Error Details")]
741
+ }), /* @__PURE__ */ z("p", {
707
742
  className: "text-sm text-status-error-text/80 font-mono bg-status-error-bg/5 rounded-lg p-3",
708
- children: Z.errorMessage
743
+ children: J.errorMessage
709
744
  })]
710
745
  })
711
746
  }),
712
747
  (() => {
713
- let e = Z.metadata ?? null, t = e?.devPortalApplicationId ?? e?.appId, n = e?.clientId, r = e?.clientSecretRevealOnce;
714
- return !t && !n ? null : /* @__PURE__ */ U(s, {
748
+ let e = J.metadata ?? null, t = e?.devPortalApplicationId ?? e?.appId, n = e?.clientId, r = e?.clientSecretRevealOnce;
749
+ return !t && !n ? null : /* @__PURE__ */ z(s, {
715
750
  treatment: "plain",
716
751
  className: "border-border-seam",
717
- children: /* @__PURE__ */ U("div", {
752
+ children: /* @__PURE__ */ z("div", {
718
753
  className: "p-5",
719
- children: /* @__PURE__ */ U(re, {
754
+ children: /* @__PURE__ */ z(ae, {
720
755
  appId: t,
721
756
  clientId: n,
722
757
  clientSecret: r
@@ -724,57 +759,60 @@ function Y() {
724
759
  })
725
760
  });
726
761
  })(),
727
- /* @__PURE__ */ U(s, {
762
+ /* @__PURE__ */ z(s, {
728
763
  treatment: "plain",
729
764
  className: "border-border-seam",
730
- children: /* @__PURE__ */ W("div", {
765
+ children: /* @__PURE__ */ B("div", {
731
766
  className: "p-5",
732
- children: [/* @__PURE__ */ U("h3", {
767
+ children: [/* @__PURE__ */ z("h3", {
733
768
  className: "mb-3 text-sm font-semibold text-text-primary",
734
- children: l(O, "sandbox.detail.cards.activity.title", "Activity")
735
- }), /* @__PURE__ */ U(T, {
736
- sandboxId: Z.id,
737
- workspaceId: D ?? ""
769
+ children: l(E, "sandbox.detail.cards.activity.title", "Activity")
770
+ }), /* @__PURE__ */ z(ie, {
771
+ sandboxId: J.id,
772
+ workspaceId: T ?? ""
738
773
  })]
739
774
  })
740
775
  }),
741
- /* @__PURE__ */ U(he, {
742
- sandbox: Z,
743
- workspaceId: D ?? ""
776
+ /* @__PURE__ */ z(Ce, {
777
+ sandbox: J,
778
+ workspaceId: T ?? ""
744
779
  }),
745
- /* @__PURE__ */ U(ie, {
746
- sandbox: Z,
747
- workspaceId: D ?? ""
780
+ /* @__PURE__ */ z("div", {
781
+ id: "sandbox-script-runner",
782
+ children: /* @__PURE__ */ z(oe, {
783
+ sandbox: J,
784
+ workspaceId: T ?? ""
785
+ })
748
786
  }),
749
- Z.expiresAt && /* @__PURE__ */ U(ne, {
750
- isOpen: N,
751
- onClose: () => L(!1),
752
- currentExpiresAt: Z.expiresAt,
753
- isLoading: q,
787
+ J.expiresAt && /* @__PURE__ */ z(re, {
788
+ isOpen: A,
789
+ onClose: () => H(!1),
790
+ currentExpiresAt: J.expiresAt,
791
+ isLoading: W,
754
792
  onExtend: (e) => {
755
- Y(!0), be({ variables: {
756
- context: { workspaceId: D },
757
- id: Z.id,
793
+ G(!0), De({ variables: {
794
+ context: { workspaceId: T },
795
+ id: J.id,
758
796
  additionalSeconds: e
759
797
  } }).then((t) => {
760
798
  let n = t.data?.extendSandboxTTL;
761
- n && xe.sandboxExtended({
799
+ n && Oe.sandboxExtended({
762
800
  sandboxId: n.id,
763
801
  addedSeconds: e,
764
802
  newExpiresAt: n.expiresAt
765
- }), X();
803
+ }), K();
766
804
  }).catch((e) => {
767
805
  console.error("Failed to extend TTL:", e);
768
806
  }).finally(() => {
769
- Y(!1), L(!1);
807
+ G(!1), H(!1);
770
808
  });
771
809
  }
772
810
  })
773
811
  ]
774
812
  });
775
813
  }
776
- function he({ sandbox: e, workspaceId: t }) {
777
- let { t: r } = V(), [i, a] = k(e.containers?.[0]?.name ?? ""), [o, c] = k(100), u = O(null), [d, { data: f, loading: p, error: m }] = v(), h = e.status === "RUNNING" || e.status === "PROVISIONING", g = E(() => {
814
+ function Ce({ sandbox: e, workspaceId: t }) {
815
+ let { t: r } = L(), [i, a] = D(e.containers?.[0]?.name ?? ""), [o, c] = D(100), u = E(null), [d, { data: f, loading: p, error: m }] = v(), h = e.status === "RUNNING" || e.status === "PROVISIONING", g = w(() => {
778
816
  !i || !h || d({ variables: {
779
817
  context: { workspaceId: t },
780
818
  id: e.id,
@@ -789,88 +827,88 @@ function he({ sandbox: e, workspaceId: t }) {
789
827
  o,
790
828
  h
791
829
  ]);
792
- D(() => {
830
+ T(() => {
793
831
  h && i && g();
794
832
  }, [
795
833
  i,
796
834
  h,
797
835
  g
798
- ]), D(() => {
836
+ ]), T(() => {
799
837
  u.current?.scrollIntoView({ behavior: "smooth" });
800
838
  }, [f]);
801
839
  let _ = f?.getSandboxLogs?.split("\n") ?? [];
802
- return /* @__PURE__ */ U(s, {
840
+ return /* @__PURE__ */ z(s, {
803
841
  treatment: "plain",
804
842
  className: "border-border-seam",
805
- children: /* @__PURE__ */ W("div", {
843
+ children: /* @__PURE__ */ B("div", {
806
844
  className: "p-5",
807
- children: [/* @__PURE__ */ W("div", {
845
+ children: [/* @__PURE__ */ B("div", {
808
846
  className: "flex items-center justify-between mb-4",
809
- children: [/* @__PURE__ */ W("h3", {
847
+ children: [/* @__PURE__ */ B("h3", {
810
848
  className: "font-semibold flex items-center gap-2",
811
- children: [/* @__PURE__ */ U("div", {
849
+ children: [/* @__PURE__ */ z("div", {
812
850
  className: "p-1.5 rounded-lg bg-action-primary-bg/10",
813
- children: /* @__PURE__ */ U(L, {
851
+ children: /* @__PURE__ */ z(F, {
814
852
  size: 14,
815
853
  className: "text-primary"
816
854
  })
817
855
  }), l(r, "sandbox.detail.logs.title", "Logs")]
818
- }), /* @__PURE__ */ W("div", {
856
+ }), /* @__PURE__ */ B("div", {
819
857
  className: "flex items-center gap-2",
820
858
  children: [
821
- e.containers && e.containers.length > 1 && /* @__PURE__ */ U("select", {
859
+ e.containers && e.containers.length > 1 && /* @__PURE__ */ z("select", {
822
860
  value: i,
823
861
  onChange: (e) => a(e.target.value),
824
862
  className: "px-2 py-1 text-xs border rounded-lg bg-bg-surface font-mono",
825
- children: e.containers.map((e) => /* @__PURE__ */ U("option", {
863
+ children: e.containers.map((e) => /* @__PURE__ */ z("option", {
826
864
  value: e.name,
827
865
  children: e.name
828
866
  }, e.name))
829
867
  }),
830
- /* @__PURE__ */ W("select", {
868
+ /* @__PURE__ */ B("select", {
831
869
  value: o,
832
870
  onChange: (e) => c(Number(e.target.value)),
833
871
  className: "px-2 py-1 text-xs border rounded-lg bg-bg-surface font-mono",
834
872
  children: [
835
- /* @__PURE__ */ U("option", {
873
+ /* @__PURE__ */ z("option", {
836
874
  value: 50,
837
875
  children: l(r, "sandbox.detail.logs.tailLines.50", "50 lines")
838
876
  }),
839
- /* @__PURE__ */ U("option", {
877
+ /* @__PURE__ */ z("option", {
840
878
  value: 100,
841
879
  children: l(r, "sandbox.detail.logs.tailLines.100", "100 lines")
842
880
  }),
843
- /* @__PURE__ */ U("option", {
881
+ /* @__PURE__ */ z("option", {
844
882
  value: 500,
845
883
  children: l(r, "sandbox.detail.logs.tailLines.500", "500 lines")
846
884
  }),
847
- /* @__PURE__ */ U("option", {
885
+ /* @__PURE__ */ z("option", {
848
886
  value: 1e3,
849
887
  children: l(r, "sandbox.detail.logs.tailLines.1000", "1000 lines")
850
888
  })
851
889
  ]
852
890
  }),
853
- /* @__PURE__ */ W(n, {
891
+ /* @__PURE__ */ B(n, {
854
892
  variant: "ghost",
855
893
  size: "sm",
856
894
  onClick: g,
857
895
  disabled: !h || p,
858
- children: [/* @__PURE__ */ U(F, {
896
+ children: [/* @__PURE__ */ z(N, {
859
897
  size: 14,
860
898
  className: p ? "animate-spin" : ""
861
899
  }), l(r, "sandbox.detail.logs.refresh", "Refresh")]
862
900
  }),
863
- _.length > 0 && /* @__PURE__ */ W(H, { children: [/* @__PURE__ */ U(n, {
901
+ _.length > 0 && /* @__PURE__ */ B(R, { children: [/* @__PURE__ */ z(n, {
864
902
  variant: "ghost",
865
903
  size: "sm",
866
904
  onClick: () => {
867
- S("light"), x(_.join("\n")).then((e) => {
868
- e ? (C("success"), b() && w("Copied logs")) : C("error");
905
+ x("light"), b(_.join("\n")).then((e) => {
906
+ e ? (S("success"), y() && C("Copied logs")) : S("error");
869
907
  });
870
908
  },
871
909
  title: l(r, "sandbox.detail.logs.copy.title", "Copy logs to clipboard"),
872
- children: /* @__PURE__ */ U(j, { size: 14 })
873
- }), /* @__PURE__ */ U(n, {
910
+ children: /* @__PURE__ */ z(k, { size: 14 })
911
+ }), /* @__PURE__ */ z(n, {
874
912
  variant: "ghost",
875
913
  size: "sm",
876
914
  onClick: () => {
@@ -878,39 +916,39 @@ function he({ sandbox: e, workspaceId: t }) {
878
916
  r.href = n, r.download = `sandbox-${e.name}-logs.txt`, r.click(), URL.revokeObjectURL(n);
879
917
  },
880
918
  title: l(r, "sandbox.detail.logs.download.title", "Download logs"),
881
- children: /* @__PURE__ */ U(N, { size: 14 })
919
+ children: /* @__PURE__ */ z(A, { size: 14 })
882
920
  })] })
883
921
  ]
884
922
  })]
885
- }), /* @__PURE__ */ W("div", {
923
+ }), /* @__PURE__ */ B("div", {
886
924
  className: "bg-zinc-950 text-zinc-300 rounded-lg p-4 font-mono text-xs leading-relaxed min-h-[200px] max-h-[500px] overflow-y-auto",
887
925
  children: [
888
- !h && /* @__PURE__ */ U("p", {
926
+ !h && /* @__PURE__ */ z("p", {
889
927
  className: "text-zinc-500",
890
928
  children: l(r, "sandbox.detail.logs.unavailable", "Logs are available when the sandbox is running.")
891
929
  }),
892
- p && /* @__PURE__ */ U("p", {
930
+ p && /* @__PURE__ */ z("p", {
893
931
  className: "text-zinc-500 animate-pulse",
894
932
  children: l(r, "sandbox.detail.logs.fetching", "Fetching logs...")
895
933
  }),
896
- m && /* @__PURE__ */ U("p", {
934
+ m && /* @__PURE__ */ z("p", {
897
935
  className: "text-status-error-text",
898
936
  children: l(r, "sandbox.detail.logs.fetchError", "Failed to fetch logs: {message}", { message: m.message })
899
937
  }),
900
- _.length > 0 && !p ? _.map((e, t) => /* @__PURE__ */ U("p", {
938
+ _.length > 0 && !p ? _.map((e, t) => /* @__PURE__ */ z("p", {
901
939
  className: e.toLowerCase().includes("error") ? "text-status-error-text" : e.toLowerCase().includes("warn") ? "text-status-warning-text" : "text-zinc-300",
902
940
  children: e
903
- }, `${t}:${e}`)) : !p && h && !m && /* @__PURE__ */ U("p", {
941
+ }, `${t}:${e}`)) : !p && h && !m && /* @__PURE__ */ z("p", {
904
942
  className: "text-zinc-500",
905
943
  children: l(r, "sandbox.detail.logs.empty", "No logs yet. Click Refresh to fetch.")
906
944
  }),
907
- /* @__PURE__ */ U("div", { ref: u })
945
+ /* @__PURE__ */ z("div", { ref: u })
908
946
  ]
909
947
  })]
910
948
  })
911
949
  });
912
950
  }
913
951
  //#endregion
914
- export { Y as SandboxDetailPage };
952
+ export { W as SandboxDetailPage };
915
953
 
916
954
  //# sourceMappingURL=SandboxDetailPage.js.map