@burdenoff/microfe-sandbox 2026.624.2 → 2026.625.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.
@@ -1,66 +1,66 @@
1
1
  import { useSandbox as e } from "../providers/SandboxProvider.js";
2
2
  import { joinPath as t } from "../utils/navigation.js";
3
- import { Badge as n, Button as r, Card as i, CardContent as a, Checkbox as o, Input as ee, Select as te, SelectContent as ne, SelectItem as s, SelectTrigger as re, SelectValue as ie, Skeleton as c } from "../components/ui.js";
4
- import { cn as l } from "../utils/cn.js";
5
- import { tWithFallback as u } from "../utils/i18n.js";
6
- import { StatusBadge as ae } from "../components/StatusBadge.js";
7
- import { ResourceDisplay as oe } from "../components/ResourceDisplay.js";
8
- import { SandboxTypeIcon as se } from "../components/SandboxTypeIcon.js";
9
- import { CountdownTimer as ce } from "../components/CountdownTimer.js";
10
- import { useSandboxStore as le } from "../store/sandboxStore.js";
11
- import { useSandboxEvents as ue } from "../utils/sandboxEvents.js";
12
- import { EmptyState as de, PageLayout as fe } from "../components/PageLayout.js";
13
- import { SandboxUsageBanner as pe } from "../components/SandboxUsageBanner.js";
14
- import { ExportSandboxesDialog as me } from "../components/ExportSandboxesDialog.js";
15
- import { ListSandboxesDocument as he, useDeleteSandboxMutation as ge, useExtendSandboxTtlMutation as _e, useListSandboxesQuery as ve, useOnSandboxesChangedSubscription as ye, useStopSandboxMutation as be } from "../../generated/wspace-operations.js";
16
- import { SandboxKind as d } from "../../generated/wspace-types.js";
17
- import { nativeImpact as xe, nativeNotify as Se } from "../../utils/nativeBridge.js";
18
- import { useCallback as f, useMemo as p, useState as m } from "react";
19
- import { PermissionGate as Ce } from "@burdenoff/fe-libs/shared/components";
20
- import { AlertCircle as we, Box as Te, CheckCircle2 as Ee, ChevronLeft as De, ChevronRight as Oe, Container as ke, Database as Ae, Filter as je, Loader2 as h, Plus as Me, Search as g, StopCircle as _, Timer as Ne, Trash2 as Pe, X as v } from "lucide-react";
21
- import { useApolloClient as Fe } from "@apollo/client/react";
22
- import { useI18n as Ie } from "@burdenoff/fe-libs/shared/providers/shell";
23
- import { Fragment as y, jsx as b, jsxs as x } from "react/jsx-runtime";
24
- import { AlertDialog as Le, AlertDialogAction as Re, AlertDialogCancel as ze, AlertDialogContent as Be, AlertDialogDescription as Ve, AlertDialogFooter as He, AlertDialogHeader as Ue, AlertDialogTitle as We } from "@burdenoff/fe-libs/ui";
3
+ import { Badge as n, Button as r, CTAOverflowMenu as i, Card as a, CardContent as o, Checkbox as ee, GlassCard as te, Input as ne, Select as re, SelectContent as ie, SelectItem as s, SelectTrigger as ae, SelectValue as c, Skeleton as l } from "../components/ui.js";
4
+ import { cn as u } from "../utils/cn.js";
5
+ import { tWithFallback as d } from "../utils/i18n.js";
6
+ import { StatusBadge as oe } from "../components/StatusBadge.js";
7
+ import { ResourceDisplay as se } from "../components/ResourceDisplay.js";
8
+ import { SandboxTypeIcon as ce } from "../components/SandboxTypeIcon.js";
9
+ import { CountdownTimer as le } from "../components/CountdownTimer.js";
10
+ import { useSandboxStore as ue } from "../store/sandboxStore.js";
11
+ import { useSandboxEvents as de } from "../utils/sandboxEvents.js";
12
+ import { EmptyState as fe, PageLayout as pe } from "../components/PageLayout.js";
13
+ import { SandboxUsageBanner as me } from "../components/SandboxUsageBanner.js";
14
+ import { ExportSandboxesDialog as he } from "../components/ExportSandboxesDialog.js";
15
+ import { ListSandboxesDocument as ge, useDeleteSandboxMutation as _e, useExtendSandboxTtlMutation as ve, useListSandboxesQuery as ye, useOnSandboxesChangedSubscription as be, useStopSandboxMutation as xe } from "../../generated/wspace-operations.js";
16
+ import { SandboxKind as f } from "../../generated/wspace-types.js";
17
+ import { nativeImpact as Se, nativeNotify as Ce } from "../../utils/nativeBridge.js";
18
+ import { useCallback as p, useMemo as m, useState as h } from "react";
19
+ import { PermissionGate as we } from "@burdenoff/fe-libs/shared/components";
20
+ import { AlertCircle as Te, Box as Ee, CheckCircle2 as De, ChevronLeft as Oe, ChevronRight as ke, Container as Ae, Database as je, Download as Me, Filter as Ne, Loader2 as g, Plus as Pe, Search as Fe, StopCircle as Ie, Timer as Le, Trash2 as Re, X as _ } from "lucide-react";
21
+ import { useApolloClient as ze } from "@apollo/client/react";
22
+ import { useI18n as Be } from "@burdenoff/fe-libs/shared/providers/shell";
23
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
24
+ import { AlertDialog as Ve, AlertDialogAction as He, AlertDialogCancel as Ue, AlertDialogContent as We, AlertDialogDescription as Ge, AlertDialogFooter as Ke, AlertDialogHeader as qe, AlertDialogTitle as Je } from "@burdenoff/fe-libs/ui";
25
25
  //#region src/sandbox/pages/SandboxListPage.tsx
26
- var S = ["RUNNING"], C = ["RUNNING", "PENDING"], w = [
26
+ var x = ["RUNNING"], S = ["RUNNING", "PENDING"], C = [
27
27
  "STOPPED",
28
28
  "ERROR",
29
29
  "EXPIRED",
30
30
  "FAILED"
31
- ], T = 5;
32
- function Ge(e) {
31
+ ], w = 5;
32
+ function Ye(e) {
33
33
  let t = Date.now() - new Date(e).getTime(), n = Math.floor(t / 6e4);
34
34
  if (n < 1) return "just now";
35
35
  if (n < 60) return `${n}m ago`;
36
36
  let r = Math.floor(n / 60);
37
37
  return r < 24 ? `${r}h ago` : `${Math.floor(r / 24)}d ago`;
38
38
  }
39
- function Ke(e) {
39
+ function Xe(e) {
40
40
  return {
41
41
  ...e.search?.trim() ? { search: e.search.trim() } : {},
42
42
  ...e.template && e.template !== "all" ? { template: e.template } : {},
43
43
  ...e.status && e.status !== "all" ? { status: e.status } : {},
44
- kind: d.User
44
+ kind: f.User
45
45
  };
46
46
  }
47
- function qe(e) {
47
+ function Ze(e) {
48
+ return x.includes(e.status);
49
+ }
50
+ function Qe(e) {
48
51
  return S.includes(e.status);
49
52
  }
50
- function Je(e) {
53
+ function $e(e) {
51
54
  return C.includes(e.status);
52
55
  }
53
- function Ye(e) {
54
- return w.includes(e.status);
55
- }
56
- function E(e, t) {
56
+ function T(e, t) {
57
57
  return e instanceof Error && e.message.trim() ? e.message : t;
58
58
  }
59
- function Xe(e, t, n, r) {
59
+ function et(e, t, n, r) {
60
60
  let i = [`${e} ${t} sandbox${t === 1 ? "" : "es"}`];
61
61
  return n > 0 && i.push(`${n} failed`), r > 0 && i.push(`${r} skipped`), i.join(" • ");
62
62
  }
63
- async function Ze(e, t, n = T) {
63
+ async function tt(e, t, n = w) {
64
64
  let r = [];
65
65
  for (let i = 0; i < e.length; i += n) {
66
66
  let a = e.slice(i, i + n), o = await Promise.allSettled(a.map(t));
@@ -68,68 +68,68 @@ async function Ze(e, t, n = T) {
68
68
  }
69
69
  return r;
70
70
  }
71
- function D() {
72
- let { basePath: d = "/", navigate: S } = e(), { sandboxFilter: C, updateFilter: w, resetFilter: T } = le(), D = Fe(), { t: O } = Ie(), [k, Qe] = m(!1), [A, j] = m(1), [M, N] = m(/* @__PURE__ */ new Map()), [P, F] = m(null), [I, L] = m(null), [$e, R] = m(null), { workspaceId: z } = e(), B = Ke(C), { data: et, loading: tt, refetch: V } = ve({
71
+ function E() {
72
+ let { basePath: f = "/", navigate: x } = e(), { sandboxFilter: S, updateFilter: C, resetFilter: w } = ue(), E = ze(), { t: D } = Be(), [O, nt] = h(!1), [k, A] = h(1), [j, M] = h(/* @__PURE__ */ new Map()), [N, P] = h(null), [F, I] = h(null), [rt, L] = h(null), { workspaceId: R } = e(), z = Xe(S), { data: it, loading: at, refetch: B } = ye({
73
73
  variables: {
74
- context: { workspaceId: z },
75
- filter: B,
74
+ context: { workspaceId: R },
75
+ filter: z,
76
76
  pagination: {
77
- page: A,
77
+ page: k,
78
78
  limit: 20
79
79
  }
80
80
  },
81
- skip: !z
82
- }), [H] = be(), [U] = ge(), [nt] = _e(), rt = ue(), [it, at] = m(!1);
83
- ye({
84
- variables: { workspaceId: z },
85
- skip: !z,
81
+ skip: !R
82
+ }), [V] = xe(), [H] = _e(), [ot] = ve(), st = de(), [ct, lt] = h(!1);
83
+ be({
84
+ variables: { workspaceId: R },
85
+ skip: !R,
86
86
  onData: ({ data: e }) => {
87
87
  let t = e.data?.onSandboxesChanged;
88
- t && (t.changeType === "CREATED" || t.changeType === "DELETED") && V();
88
+ t && (t.changeType === "CREATED" || t.changeType === "DELETED") && B();
89
89
  }
90
90
  });
91
- let ot = et?.listSandboxes?.items ?? [], W = et?.listSandboxes?.total ?? 0, st = tt, ct = ot, G = Math.ceil(W / 20), K = ct, q = C.search || C.template && C.template !== "all" || C.status && C.status !== "all", J = ot.filter((e) => e.status === "RUNNING").length, lt = W, ut = p(() => Array.from(M.keys()), [M]), Y = p(() => Array.from(M.values()), [M]), X = p(() => K.filter((e) => M.has(e.id)).length, [K, M]), Z = p(() => Y.filter(qe), [Y]), Q = p(() => Y.filter(Ye), [Y]), dt = ut.length > 0, ft = K.length > 0 && X === K.length, pt = X > 0 && X < K.length, $ = P !== null, mt = P === "select-all", ht = P === "stop", gt = P === "delete", _t = f((e) => {
92
- w({ search: e }), j(1);
93
- }, [w]), vt = f(() => {
94
- T(), j(1);
95
- }, [T]), yt = () => {
96
- S?.(t(d, "new"));
97
- }, bt = (e) => {
98
- S?.(t(d, e));
99
- }, xt = f((e, t) => {
100
- N((n) => {
91
+ let ut = it?.listSandboxes?.items ?? [], U = it?.listSandboxes?.total ?? 0, dt = at, ft = ut, W = Math.ceil(U / 20), G = ft, K = S.search || S.template && S.template !== "all" || S.status && S.status !== "all", q = ut.filter((e) => e.status === "RUNNING").length, pt = U, mt = m(() => Array.from(j.keys()), [j]), J = m(() => Array.from(j.values()), [j]), Y = m(() => G.filter((e) => j.has(e.id)).length, [G, j]), X = m(() => J.filter(Ze), [J]), Z = m(() => J.filter($e), [J]), ht = mt.length > 0, gt = G.length > 0 && Y === G.length, _t = Y > 0 && Y < G.length, Q = N !== null, vt = N === "select-all", yt = N === "stop", bt = N === "delete", xt = p((e) => {
92
+ C({ search: e }), A(1);
93
+ }, [C]), St = p(() => {
94
+ w(), A(1);
95
+ }, [w]), Ct = () => {
96
+ x?.(t(f, "new"));
97
+ }, wt = (e) => {
98
+ x?.(t(f, e));
99
+ }, Tt = p((e, t) => {
100
+ M((n) => {
101
101
  let r = new Map(n);
102
102
  return t ? r.set(e.id, e) : r.delete(e.id), r;
103
103
  });
104
- }, []), St = f((e) => {
105
- N((t) => {
104
+ }, []), Et = p((e) => {
105
+ M((t) => {
106
106
  let n = new Map(t);
107
- for (let t of K) e ? n.set(t.id, t) : n.delete(t.id);
107
+ for (let t of G) e ? n.set(t.id, t) : n.delete(t.id);
108
108
  return n;
109
109
  });
110
- }, [K]), Ct = f(() => {
111
- N(/* @__PURE__ */ new Map());
112
- }, []), wt = f((e) => {
113
- N((t) => {
110
+ }, [G]), Dt = p(() => {
111
+ M(/* @__PURE__ */ new Map());
112
+ }, []), Ot = p((e) => {
113
+ M((t) => {
114
114
  if (!t.has(e)) return t;
115
115
  let n = new Map(t);
116
116
  return n.delete(e), n;
117
117
  });
118
- }, []), Tt = f((e) => {
119
- N((t) => {
118
+ }, []), kt = p((e) => {
119
+ M((t) => {
120
120
  if (!t.has(e.id)) return t;
121
121
  let n = new Map(t);
122
122
  return n.set(e.id, e), n;
123
123
  });
124
- }, []), Et = f(async () => {
125
- if (!z) return [];
124
+ }, []), $ = p(async () => {
125
+ if (!R) return [];
126
126
  let e = [], t = 1;
127
127
  for (;;) {
128
- let n = (await D.query({
129
- query: he,
128
+ let n = (await E.query({
129
+ query: ge,
130
130
  variables: {
131
- context: { workspaceId: z },
132
- filter: B,
131
+ context: { workspaceId: R },
132
+ filter: z,
133
133
  pagination: {
134
134
  page: t,
135
135
  limit: 100
@@ -142,327 +142,323 @@ function D() {
142
142
  }
143
143
  return e;
144
144
  }, [
145
- D,
146
- B,
147
- z
148
- ]), Dt = f(async (e) => {
145
+ E,
146
+ z,
147
+ R
148
+ ]), At = p(async (e) => {
149
149
  try {
150
- let t = (await H({ variables: {
151
- context: { workspaceId: z },
150
+ let t = (await V({ variables: {
151
+ context: { workspaceId: R },
152
152
  id: e.id
153
153
  } })).data?.stopSandbox;
154
154
  if (!t) throw Error(`Failed to stop sandbox "${e.name}".`);
155
- Tt({
155
+ kt({
156
156
  ...e,
157
157
  status: t.status,
158
158
  stoppedAt: t.stoppedAt ?? e.stoppedAt
159
- }), await V();
159
+ }), await B();
160
160
  } catch (t) {
161
- L({
161
+ I({
162
162
  kind: "error",
163
- message: E(t, `Failed to stop sandbox "${e.name}".`)
163
+ message: T(t, `Failed to stop sandbox "${e.name}".`)
164
164
  });
165
165
  }
166
166
  }, [
167
+ B,
167
168
  V,
168
- H,
169
- Tt,
170
- z
171
- ]), Ot = f(async (e) => {
172
- xe("medium");
169
+ kt,
170
+ R
171
+ ]), jt = p(async (e) => {
172
+ Se("medium");
173
173
  try {
174
- if (!(await U({ variables: {
175
- context: { workspaceId: z },
174
+ if (!(await H({ variables: {
175
+ context: { workspaceId: R },
176
176
  id: e.id
177
177
  } })).data?.deleteSandbox) throw Error(`Failed to delete sandbox "${e.name}".`);
178
- Se("success"), rt.sandboxDeleted({ sandboxId: e.id }), wt(e.id), await V();
178
+ Ce("success"), st.sandboxDeleted({ sandboxId: e.id }), Ot(e.id), await B();
179
179
  } catch (t) {
180
- Se("error"), L({
180
+ Ce("error"), I({
181
181
  kind: "error",
182
- message: E(t, `Failed to delete sandbox "${e.name}".`)
182
+ message: T(t, `Failed to delete sandbox "${e.name}".`)
183
183
  });
184
184
  }
185
185
  }, [
186
- U,
187
- V,
188
- wt,
189
- rt,
190
- z
191
- ]), kt = f(async () => {
192
- F("select-all");
186
+ H,
187
+ B,
188
+ Ot,
189
+ st,
190
+ R
191
+ ]), Mt = p(async () => {
192
+ P("select-all");
193
193
  try {
194
- let e = await Et();
195
- N(new Map(e.map((e) => [e.id, e]))), L({
194
+ let e = await $();
195
+ M(new Map(e.map((e) => [e.id, e]))), I({
196
196
  kind: "success",
197
197
  message: `Selected ${e.length} sandbox${e.length === 1 ? "" : "es"}.`
198
198
  });
199
199
  } catch (e) {
200
- L({
200
+ I({
201
201
  kind: "error",
202
- message: E(e, "Failed to select all matching sandboxes.")
202
+ message: T(e, "Failed to select all matching sandboxes.")
203
203
  });
204
204
  } finally {
205
- F(null);
205
+ P(null);
206
206
  }
207
- }, [Et]), At = f(async () => {
208
- if (Z.length === 0) {
209
- L({
207
+ }, [$]), Nt = p(async () => {
208
+ if (X.length === 0) {
209
+ I({
210
210
  kind: "error",
211
211
  message: "Select at least one running sandbox to stop."
212
212
  });
213
213
  return;
214
214
  }
215
- let e = Y.length - Z.length;
216
- F("stop");
215
+ let e = J.length - X.length;
216
+ P("stop");
217
217
  try {
218
- let t = await Ze(Z, async (e) => {
219
- let t = await H({ variables: {
220
- context: { workspaceId: z },
218
+ let t = await tt(X, async (e) => {
219
+ let t = await V({ variables: {
220
+ context: { workspaceId: R },
221
221
  id: e.id
222
222
  } });
223
223
  if (!t.data?.stopSandbox) throw Error(`Failed to stop sandbox "${e.name}".`);
224
224
  return t.data.stopSandbox;
225
225
  }), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
226
- N(/* @__PURE__ */ new Map()), await V(), L({
226
+ M(/* @__PURE__ */ new Map()), await B(), I({
227
227
  kind: r === 0 ? "success" : "error",
228
- message: Xe("Stopped", n, r, e)
228
+ message: et("Stopped", n, r, e)
229
229
  });
230
230
  } catch (e) {
231
- L({
231
+ I({
232
232
  kind: "error",
233
- message: E(e, "Failed to stop selected sandboxes.")
233
+ message: T(e, "Failed to stop selected sandboxes.")
234
234
  });
235
235
  } finally {
236
- F(null);
236
+ P(null);
237
237
  }
238
238
  }, [
239
+ B,
240
+ J.length,
241
+ X,
239
242
  V,
240
- Y.length,
241
- Z,
242
- H,
243
- z
244
- ]), jt = f(() => {
245
- if (Q.length === 0) {
246
- L({
243
+ R
244
+ ]), Pt = p(() => {
245
+ if (Z.length === 0) {
246
+ I({
247
247
  kind: "error",
248
248
  message: "Select at least one stopped, failed, expired, or errored sandbox to delete."
249
249
  });
250
250
  return;
251
251
  }
252
- let e = Y.length - Q.length;
253
- R({ message: e > 0 ? `Delete ${Q.length} selected sandbox(es)? ${e} selected sandbox(es) cannot be deleted right now and will be skipped. This cannot be undone.` : `Delete ${Q.length} selected sandbox(es)? This cannot be undone.` });
254
- }, [Q.length, Y.length]), Mt = f(async () => {
255
- if (R(null), Q.length === 0) return;
256
- let e = Y.length - Q.length;
257
- F("delete");
252
+ let e = J.length - Z.length;
253
+ L({ message: e > 0 ? `Delete ${Z.length} selected sandbox(es)? ${e} selected sandbox(es) cannot be deleted right now and will be skipped. This cannot be undone.` : `Delete ${Z.length} selected sandbox(es)? This cannot be undone.` });
254
+ }, [Z.length, J.length]), Ft = p(async () => {
255
+ if (L(null), Z.length === 0) return;
256
+ let e = J.length - Z.length;
257
+ P("delete");
258
258
  try {
259
- let t = await Ze(Q, async (e) => {
260
- let t = await U({ variables: {
261
- context: { workspaceId: z },
259
+ let t = await tt(Z, async (e) => {
260
+ let t = await H({ variables: {
261
+ context: { workspaceId: R },
262
262
  id: e.id
263
263
  } });
264
264
  if (!t.data?.deleteSandbox) throw Error(`Failed to delete sandbox "${e.name}".`);
265
265
  return t.data.deleteSandbox;
266
266
  }), n = t.filter((e) => e.status === "fulfilled").length, r = t.length - n;
267
- N(/* @__PURE__ */ new Map()), await V(), L({
267
+ M(/* @__PURE__ */ new Map()), await B(), I({
268
268
  kind: r === 0 ? "success" : "error",
269
- message: Xe("Deleted", n, r, e)
269
+ message: et("Deleted", n, r, e)
270
270
  });
271
271
  } catch (e) {
272
- L({
272
+ I({
273
273
  kind: "error",
274
- message: E(e, "Failed to delete selected sandboxes.")
274
+ message: T(e, "Failed to delete selected sandboxes.")
275
275
  });
276
276
  } finally {
277
- F(null);
277
+ P(null);
278
278
  }
279
279
  }, [
280
- U,
281
- V,
282
- Q,
283
- Y.length,
284
- z
280
+ H,
281
+ B,
282
+ Z,
283
+ J.length,
284
+ R
285
285
  ]);
286
- return /* @__PURE__ */ x(fe, {
287
- title: u(O, "sandbox.list.title", "Sandboxes"),
288
- subtitle: u(O, "sandbox.list.subtitle", "Manage ephemeral sandbox environments for development and testing"),
289
- icon: /* @__PURE__ */ b(Te, { size: 24 }),
290
- headerActions: /* @__PURE__ */ b(Ce, {
291
- permission: "sandbox:create",
292
- children: /* @__PURE__ */ x(r, {
293
- onClick: yt,
294
- size: "lg",
295
- "data-tour": "sandbox-list-create-button",
296
- children: [/* @__PURE__ */ b(Me, { size: 18 }), u(O, "sandbox.list.actions.create", "Create Sandbox")]
297
- })
286
+ return /* @__PURE__ */ b(pe, {
287
+ title: d(D, "sandbox.list.title", "Sandboxes"),
288
+ subtitle: d(D, "sandbox.list.subtitle", "Manage ephemeral sandbox environments for development and testing"),
289
+ icon: /* @__PURE__ */ y(Ee, { size: 24 }),
290
+ headerActions: /* @__PURE__ */ b("div", {
291
+ className: "flex items-center gap-2",
292
+ children: [/* @__PURE__ */ y(we, {
293
+ permission: "sandbox:create",
294
+ children: /* @__PURE__ */ b(r, {
295
+ onClick: Ct,
296
+ size: "lg",
297
+ "data-tour": "sandbox-list-create-button",
298
+ children: [/* @__PURE__ */ y(Pe, { size: 18 }), d(D, "sandbox.list.actions.create", "Create Sandbox")]
299
+ })
300
+ }), /* @__PURE__ */ y(i, { actions: [{
301
+ label: d(D, "sandbox.list.actions.export.label", "Export"),
302
+ onSelect: () => lt(!0),
303
+ icon: /* @__PURE__ */ y(Me, { size: 16 })
304
+ }] })]
298
305
  }),
299
- headerContent: lt > 0 ? /* @__PURE__ */ x("div", {
306
+ headerContent: pt > 0 ? /* @__PURE__ */ b("div", {
300
307
  className: "flex items-center gap-3 flex-wrap",
301
- children: [/* @__PURE__ */ b(n, {
308
+ children: [/* @__PURE__ */ y(n, {
302
309
  variant: "secondary",
303
310
  className: "gap-1.5",
304
- children: u(O, "sandbox.list.header.total", "{count} total", { count: lt })
305
- }), /* @__PURE__ */ b(n, {
311
+ children: d(D, "sandbox.list.header.total", "{count} total", { count: pt })
312
+ }), /* @__PURE__ */ y(n, {
306
313
  variant: "default",
307
314
  className: "gap-1.5 bg-status-success-bg-subtle text-status-success-text border-border-default",
308
- children: u(O, "sandbox.list.header.running", "{count} running", { count: J })
315
+ children: d(D, "sandbox.list.header.running", "{count} running", { count: q })
309
316
  })]
310
317
  }) : null,
311
318
  children: [
312
- /* @__PURE__ */ b(pe, {
313
- runningCount: J,
314
- maxConcurrent: Math.max(J, 10)
319
+ /* @__PURE__ */ y(me, {
320
+ runningCount: q,
321
+ maxConcurrent: Math.max(q, 10)
315
322
  }),
316
- /* @__PURE__ */ x("div", {
323
+ /* @__PURE__ */ b("div", {
317
324
  className: "space-y-4",
318
325
  children: [
319
- /* @__PURE__ */ x("div", {
326
+ /* @__PURE__ */ b("div", {
320
327
  className: "flex flex-col sm:flex-row gap-3",
321
- children: [
322
- /* @__PURE__ */ b(r, {
323
- variant: "outline",
324
- size: "sm",
325
- onClick: () => at(!0),
326
- "aria-label": u(O, "sandbox.list.actions.export.ariaLabel", "Export sandboxes"),
327
- className: "self-start sm:self-auto",
328
- children: u(O, "sandbox.list.actions.export.label", "Export")
329
- }),
330
- /* @__PURE__ */ x("div", {
331
- className: "flex-1 relative group",
332
- children: [/* @__PURE__ */ b(g, {
333
- size: 18,
334
- className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors"
335
- }), /* @__PURE__ */ b(ee, {
336
- type: "text",
337
- placeholder: u(O, "sandbox.list.search.placeholder", "Search sandboxes by name, description, or ID..."),
338
- value: C.search,
339
- onChange: (e) => _t(e.target.value),
340
- className: "pl-[3.25rem] h-10",
341
- "aria-label": u(O, "sandbox.list.search.ariaLabel", "Search sandboxes"),
342
- "data-tour": "sandbox-list-search-input"
343
- })]
344
- }),
345
- /* @__PURE__ */ x(r, {
346
- variant: k || q ? "default" : "outline",
347
- onClick: () => Qe(!k),
348
- "aria-label": u(O, "sandbox.list.filters.toggle.ariaLabel", "Toggle filters"),
349
- "data-tour": "sandbox-list-filters-button",
350
- children: [
351
- /* @__PURE__ */ b(je, { size: 16 }),
352
- k ? u(O, "sandbox.list.filters.toggle.hide", "Hide") : u(O, "sandbox.list.filters.toggle.show", "Filter"),
353
- q && /* @__PURE__ */ b(n, {
354
- variant: "secondary",
355
- className: "ml-1 h-5 min-w-5 px-1.5",
356
- children: [
357
- C.search,
358
- C.template !== "all" && C.template,
359
- C.status !== "all" && C.status
360
- ].filter(Boolean).length
361
- })
362
- ]
363
- })
364
- ]
328
+ children: [/* @__PURE__ */ b("div", {
329
+ className: "flex-1 relative group",
330
+ children: [/* @__PURE__ */ y(Fe, {
331
+ size: 18,
332
+ className: "absolute left-3 top-1/2 -translate-y-1/2 text-text-secondary group-focus-within:text-primary transition-colors"
333
+ }), /* @__PURE__ */ y(ne, {
334
+ type: "text",
335
+ placeholder: d(D, "sandbox.list.search.placeholder", "Search sandboxes by name, description, or ID..."),
336
+ value: S.search,
337
+ onChange: (e) => xt(e.target.value),
338
+ className: "pl-[3.25rem] h-10",
339
+ "aria-label": d(D, "sandbox.list.search.ariaLabel", "Search sandboxes"),
340
+ "data-tour": "sandbox-list-search-input"
341
+ })]
342
+ }), /* @__PURE__ */ b(r, {
343
+ variant: O || K ? "default" : "outline",
344
+ onClick: () => nt(!O),
345
+ "aria-label": d(D, "sandbox.list.filters.toggle.ariaLabel", "Toggle filters"),
346
+ "data-tour": "sandbox-list-filters-button",
347
+ children: [
348
+ /* @__PURE__ */ y(Ne, { size: 16 }),
349
+ O ? d(D, "sandbox.list.filters.toggle.hide", "Hide") : d(D, "sandbox.list.filters.toggle.show", "Filter"),
350
+ K && /* @__PURE__ */ y(n, {
351
+ variant: "secondary",
352
+ className: "ml-1 h-5 min-w-5 px-1.5",
353
+ children: [
354
+ S.search,
355
+ S.template !== "all" && S.template,
356
+ S.status !== "all" && S.status
357
+ ].filter(Boolean).length
358
+ })
359
+ ]
360
+ })]
365
361
  }),
366
- k && /* @__PURE__ */ b(i, {
362
+ O && /* @__PURE__ */ y(a, {
367
363
  className: "animate-in slide-in-from-top-2 duration-200",
368
- children: /* @__PURE__ */ x(a, {
364
+ children: /* @__PURE__ */ b(o, {
369
365
  className: "p-4",
370
- children: [/* @__PURE__ */ x("div", {
366
+ children: [/* @__PURE__ */ b("div", {
371
367
  className: "flex items-center justify-between mb-4",
372
- children: [/* @__PURE__ */ x("h3", {
368
+ children: [/* @__PURE__ */ b("h3", {
373
369
  className: "font-semibold text-text-primary flex items-center gap-2",
374
- children: [/* @__PURE__ */ b(je, {
370
+ children: [/* @__PURE__ */ y(Ne, {
375
371
  size: 16,
376
372
  className: "text-primary"
377
- }), u(O, "sandbox.list.filters.panel.title", "Filter Sandboxes")]
378
- }), q && /* @__PURE__ */ x(r, {
373
+ }), d(D, "sandbox.list.filters.panel.title", "Filter Sandboxes")]
374
+ }), K && /* @__PURE__ */ b(r, {
379
375
  variant: "ghost",
380
376
  size: "sm",
381
- onClick: vt,
377
+ onClick: St,
382
378
  className: "text-text-secondary hover:text-status-error-text",
383
- children: [/* @__PURE__ */ b(v, { size: 16 }), u(O, "sandbox.list.filters.clearAll", "Clear All")]
379
+ children: [/* @__PURE__ */ y(_, { size: 16 }), d(D, "sandbox.list.filters.clearAll", "Clear All")]
384
380
  })]
385
- }), /* @__PURE__ */ x("div", {
381
+ }), /* @__PURE__ */ b("div", {
386
382
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
387
- children: [/* @__PURE__ */ x("div", {
383
+ children: [/* @__PURE__ */ b("div", {
388
384
  className: "space-y-2",
389
- children: [/* @__PURE__ */ b("label", {
385
+ children: [/* @__PURE__ */ y("label", {
390
386
  className: "block text-sm font-medium text-text-primary",
391
- children: u(O, "sandbox.list.filters.template.label", "Template")
392
- }), /* @__PURE__ */ x(te, {
393
- value: C.template || "all",
387
+ children: d(D, "sandbox.list.filters.template.label", "Template")
388
+ }), /* @__PURE__ */ b(re, {
389
+ value: S.template || "all",
394
390
  onValueChange: (e) => {
395
- w({ template: e }), j(1);
391
+ C({ template: e }), A(1);
396
392
  },
397
- children: [/* @__PURE__ */ b(re, { children: /* @__PURE__ */ b(ie, { placeholder: u(O, "sandbox.list.filters.template.all", "All Templates") }) }), /* @__PURE__ */ x(ne, { children: [
398
- /* @__PURE__ */ b(s, {
393
+ children: [/* @__PURE__ */ y(ae, { children: /* @__PURE__ */ y(c, { placeholder: d(D, "sandbox.list.filters.template.all", "All Templates") }) }), /* @__PURE__ */ b(ie, { children: [
394
+ /* @__PURE__ */ y(s, {
399
395
  value: "all",
400
- children: u(O, "sandbox.list.filters.template.all", "All Templates")
396
+ children: d(D, "sandbox.list.filters.template.all", "All Templates")
401
397
  }),
402
- /* @__PURE__ */ b(s, {
398
+ /* @__PURE__ */ y(s, {
403
399
  value: "AI_BUILDER",
404
- children: u(O, "sandbox.list.filters.template.aiBuilder", "AI Builder")
400
+ children: d(D, "sandbox.list.filters.template.aiBuilder", "AI Builder")
405
401
  }),
406
- /* @__PURE__ */ b(s, {
402
+ /* @__PURE__ */ y(s, {
407
403
  value: "WORKFLOW_MULTI_NODE",
408
- children: u(O, "sandbox.list.filters.template.workflowMultiNode", "Workflow Multi-Node")
404
+ children: d(D, "sandbox.list.filters.template.workflowMultiNode", "Workflow Multi-Node")
409
405
  }),
410
- /* @__PURE__ */ b(s, {
406
+ /* @__PURE__ */ y(s, {
411
407
  value: "MISC_SHELL",
412
- children: u(O, "sandbox.list.filters.template.miscShell", "Misc Shell")
408
+ children: d(D, "sandbox.list.filters.template.miscShell", "Misc Shell")
413
409
  }),
414
- /* @__PURE__ */ b(s, {
410
+ /* @__PURE__ */ y(s, {
415
411
  value: "CUSTOM",
416
- children: u(O, "sandbox.list.filters.template.custom", "Custom")
412
+ children: d(D, "sandbox.list.filters.template.custom", "Custom")
417
413
  })
418
414
  ] })]
419
415
  })]
420
- }), /* @__PURE__ */ x("div", {
416
+ }), /* @__PURE__ */ b("div", {
421
417
  className: "space-y-2",
422
- children: [/* @__PURE__ */ b("label", {
418
+ children: [/* @__PURE__ */ y("label", {
423
419
  className: "block text-sm font-medium text-text-primary",
424
- children: u(O, "sandbox.list.filters.status.label", "Status")
425
- }), /* @__PURE__ */ x(te, {
426
- value: C.status || "all",
420
+ children: d(D, "sandbox.list.filters.status.label", "Status")
421
+ }), /* @__PURE__ */ b(re, {
422
+ value: S.status || "all",
427
423
  onValueChange: (e) => {
428
- w({ status: e }), j(1);
424
+ C({ status: e }), A(1);
429
425
  },
430
- children: [/* @__PURE__ */ b(re, { children: /* @__PURE__ */ b(ie, { placeholder: u(O, "sandbox.list.filters.status.all", "All Statuses") }) }), /* @__PURE__ */ x(ne, { children: [
431
- /* @__PURE__ */ b(s, {
426
+ children: [/* @__PURE__ */ y(ae, { children: /* @__PURE__ */ y(c, { placeholder: d(D, "sandbox.list.filters.status.all", "All Statuses") }) }), /* @__PURE__ */ b(ie, { children: [
427
+ /* @__PURE__ */ y(s, {
432
428
  value: "all",
433
- children: u(O, "sandbox.list.filters.status.all", "All Statuses")
429
+ children: d(D, "sandbox.list.filters.status.all", "All Statuses")
434
430
  }),
435
- /* @__PURE__ */ b(s, {
431
+ /* @__PURE__ */ y(s, {
436
432
  value: "PENDING",
437
- children: u(O, "sandbox.list.filters.status.pending", "Pending")
433
+ children: d(D, "sandbox.list.filters.status.pending", "Pending")
438
434
  }),
439
- /* @__PURE__ */ b(s, {
435
+ /* @__PURE__ */ y(s, {
440
436
  value: "PROVISIONING",
441
- children: u(O, "sandbox.list.filters.status.provisioning", "Provisioning")
437
+ children: d(D, "sandbox.list.filters.status.provisioning", "Provisioning")
442
438
  }),
443
- /* @__PURE__ */ b(s, {
439
+ /* @__PURE__ */ y(s, {
444
440
  value: "RUNNING",
445
- children: u(O, "sandbox.list.filters.status.running", "Running")
441
+ children: d(D, "sandbox.list.filters.status.running", "Running")
446
442
  }),
447
- /* @__PURE__ */ b(s, {
443
+ /* @__PURE__ */ y(s, {
448
444
  value: "STOPPING",
449
- children: u(O, "sandbox.list.filters.status.stopping", "Stopping")
445
+ children: d(D, "sandbox.list.filters.status.stopping", "Stopping")
450
446
  }),
451
- /* @__PURE__ */ b(s, {
447
+ /* @__PURE__ */ y(s, {
452
448
  value: "STOPPED",
453
- children: u(O, "sandbox.list.filters.status.stopped", "Stopped")
449
+ children: d(D, "sandbox.list.filters.status.stopped", "Stopped")
454
450
  }),
455
- /* @__PURE__ */ b(s, {
451
+ /* @__PURE__ */ y(s, {
456
452
  value: "ERROR",
457
- children: u(O, "sandbox.list.filters.status.error", "Error")
453
+ children: d(D, "sandbox.list.filters.status.error", "Error")
458
454
  }),
459
- /* @__PURE__ */ b(s, {
455
+ /* @__PURE__ */ y(s, {
460
456
  value: "EXPIRED",
461
- children: u(O, "sandbox.list.filters.status.expired", "Expired")
457
+ children: d(D, "sandbox.list.filters.status.expired", "Expired")
462
458
  }),
463
- /* @__PURE__ */ b(s, {
459
+ /* @__PURE__ */ y(s, {
464
460
  value: "FAILED",
465
- children: u(O, "sandbox.list.filters.status.failed", "Failed")
461
+ children: d(D, "sandbox.list.filters.status.failed", "Failed")
466
462
  })
467
463
  ] })]
468
464
  })]
@@ -470,285 +466,286 @@ function D() {
470
466
  })]
471
467
  })
472
468
  }),
473
- I && /* @__PURE__ */ b(i, {
474
- className: l("border-l-4", I.kind === "success" ? "border-l-status-success-text bg-status-success-bg-subtle" : "border-l-destructive bg-status-error-bg/5"),
475
- children: /* @__PURE__ */ x(a, {
469
+ F && /* @__PURE__ */ y(a, {
470
+ className: u("border-l-4", F.kind === "success" ? "border-l-status-success-text bg-status-success-bg-subtle" : "border-l-destructive bg-status-error-bg/5"),
471
+ children: /* @__PURE__ */ b(o, {
476
472
  className: "p-4 flex items-start justify-between gap-3",
477
- children: [/* @__PURE__ */ x("div", {
478
- role: I.kind === "error" ? "alert" : "status",
473
+ children: [/* @__PURE__ */ b("div", {
474
+ role: F.kind === "error" ? "alert" : "status",
479
475
  className: "flex items-start gap-2 text-sm",
480
- children: [I.kind === "success" ? /* @__PURE__ */ b(Ee, {
476
+ children: [F.kind === "success" ? /* @__PURE__ */ y(De, {
481
477
  size: 16,
482
478
  className: "mt-0.5 text-status-success-text"
483
- }) : /* @__PURE__ */ b(we, {
479
+ }) : /* @__PURE__ */ y(Te, {
484
480
  size: 16,
485
481
  className: "mt-0.5 text-status-error-text"
486
- }), /* @__PURE__ */ b("span", {
487
- className: l("font-medium", I.kind === "success" ? "text-status-success-text" : "text-status-error-text"),
488
- children: I.message
482
+ }), /* @__PURE__ */ y("span", {
483
+ className: u("font-medium", F.kind === "success" ? "text-status-success-text" : "text-status-error-text"),
484
+ children: F.message
489
485
  })]
490
- }), /* @__PURE__ */ b(r, {
486
+ }), /* @__PURE__ */ y(r, {
491
487
  variant: "ghost",
492
488
  size: "icon",
493
- onClick: () => L(null),
494
- "aria-label": u(O, "sandbox.list.bulk.feedback.dismiss.ariaLabel", "Dismiss bulk action message"),
495
- children: /* @__PURE__ */ b(v, { size: 16 })
489
+ onClick: () => I(null),
490
+ "aria-label": d(D, "sandbox.list.bulk.feedback.dismiss.ariaLabel", "Dismiss bulk action message"),
491
+ children: /* @__PURE__ */ y(_, { size: 16 })
496
492
  })]
497
493
  })
498
494
  })
499
495
  ]
500
496
  }),
501
- st && /* @__PURE__ */ b("div", {
497
+ dt && /* @__PURE__ */ y("div", {
502
498
  className: "space-y-4 animate-in fade-in-0 duration-200",
503
499
  children: [...[
504
500
  ,
505
501
  ,
506
502
  ,
507
- ]].map((e, t) => /* @__PURE__ */ b(i, { children: /* @__PURE__ */ b(a, {
503
+ ]].map((e, t) => /* @__PURE__ */ y(a, { children: /* @__PURE__ */ y(o, {
508
504
  className: "p-5",
509
- children: /* @__PURE__ */ x("div", {
505
+ children: /* @__PURE__ */ b("div", {
510
506
  className: "flex items-start gap-4",
511
- children: [/* @__PURE__ */ b(c, { className: "size-12 rounded-lg" }), /* @__PURE__ */ x("div", {
507
+ children: [/* @__PURE__ */ y(l, { className: "size-12 rounded-lg" }), /* @__PURE__ */ b("div", {
512
508
  className: "flex-1 space-y-2",
513
509
  children: [
514
- /* @__PURE__ */ b(c, { className: "h-5 w-1/3" }),
515
- /* @__PURE__ */ b(c, { className: "h-4 w-2/3" }),
516
- /* @__PURE__ */ x("div", {
510
+ /* @__PURE__ */ y(l, { className: "h-5 w-1/3" }),
511
+ /* @__PURE__ */ y(l, { className: "h-4 w-2/3" }),
512
+ /* @__PURE__ */ b("div", {
517
513
  className: "flex gap-2 pt-1",
518
- children: [/* @__PURE__ */ b(c, { className: "h-5 w-20 rounded-full" }), /* @__PURE__ */ b(c, { className: "h-5 w-24 rounded-full" })]
514
+ children: [/* @__PURE__ */ y(l, { className: "h-5 w-20 rounded-full" }), /* @__PURE__ */ y(l, { className: "h-5 w-24 rounded-full" })]
519
515
  })
520
516
  ]
521
517
  })]
522
518
  })
523
519
  }) }, t))
524
520
  }),
525
- !st && /* @__PURE__ */ b("div", {
521
+ !dt && /* @__PURE__ */ y("div", {
526
522
  className: "space-y-4",
527
- children: K.length > 0 ? /* @__PURE__ */ x(y, { children: [
528
- /* @__PURE__ */ b(i, {
523
+ children: G.length > 0 ? /* @__PURE__ */ b(v, { children: [
524
+ /* @__PURE__ */ y(a, {
529
525
  className: "animate-in fade-in-0 duration-200",
530
- children: /* @__PURE__ */ x(a, {
526
+ children: /* @__PURE__ */ b(o, {
531
527
  className: "p-4 space-y-3",
532
- children: [/* @__PURE__ */ x("div", {
528
+ children: [/* @__PURE__ */ b("div", {
533
529
  className: "flex flex-col gap-3 xl:flex-row xl:items-center xl:justify-between",
534
530
  "data-tour": "sandbox-list-bulk-controls",
535
- children: [/* @__PURE__ */ x("div", {
531
+ children: [/* @__PURE__ */ b("div", {
536
532
  className: "flex flex-wrap items-center gap-3",
537
533
  children: [
538
- /* @__PURE__ */ x("label", {
534
+ /* @__PURE__ */ b("label", {
539
535
  className: "inline-flex items-center gap-2 text-sm font-medium text-text-primary",
540
- children: [/* @__PURE__ */ b(o, {
541
- checked: ft ? !0 : pt ? "indeterminate" : !1,
542
- onCheckedChange: (e) => St(e === !0),
543
- "aria-label": u(O, "sandbox.list.bulk.selectPage.ariaLabel", "Select all sandboxes on this page")
544
- }), /* @__PURE__ */ b("span", { children: u(O, "sandbox.list.bulk.selectPage.label", "Select page") })]
536
+ children: [/* @__PURE__ */ y(ee, {
537
+ checked: gt ? !0 : _t ? "indeterminate" : !1,
538
+ onCheckedChange: (e) => Et(e === !0),
539
+ "aria-label": d(D, "sandbox.list.bulk.selectPage.ariaLabel", "Select all sandboxes on this page")
540
+ }), /* @__PURE__ */ y("span", { children: d(D, "sandbox.list.bulk.selectPage.label", "Select page") })]
545
541
  }),
546
- W > K.length && /* @__PURE__ */ x(r, {
542
+ U > G.length && /* @__PURE__ */ b(r, {
547
543
  variant: "ghost",
548
544
  size: "sm",
549
- onClick: kt,
550
- disabled: $,
551
- children: [mt ? /* @__PURE__ */ b(h, {
545
+ onClick: Mt,
546
+ disabled: Q,
547
+ children: [vt ? /* @__PURE__ */ y(g, {
552
548
  size: 14,
553
549
  className: "animate-spin"
554
- }) : null, u(O, "sandbox.list.bulk.selectAll", "Select all {count}", { count: W })]
550
+ }) : null, d(D, "sandbox.list.bulk.selectAll", "Select all {count}", { count: U })]
555
551
  }),
556
- dt && /* @__PURE__ */ b(r, {
552
+ ht && /* @__PURE__ */ y(r, {
557
553
  variant: "ghost",
558
554
  size: "sm",
559
- onClick: Ct,
560
- disabled: $,
561
- children: u(O, "sandbox.list.bulk.clearSelection", "Clear selection")
555
+ onClick: Dt,
556
+ disabled: Q,
557
+ children: d(D, "sandbox.list.bulk.clearSelection", "Clear selection")
562
558
  })
563
559
  ]
564
- }), /* @__PURE__ */ x("div", {
560
+ }), /* @__PURE__ */ b("div", {
565
561
  className: "flex flex-wrap items-center gap-2",
566
562
  children: [
567
- /* @__PURE__ */ b(n, {
568
- variant: dt ? "default" : "secondary",
563
+ /* @__PURE__ */ y(n, {
564
+ variant: ht ? "default" : "secondary",
569
565
  className: "gap-1.5",
570
- children: u(O, "sandbox.list.bulk.selectedCount", "{count} selected", { count: ut.length })
566
+ children: d(D, "sandbox.list.bulk.selectedCount", "{count} selected", { count: mt.length })
571
567
  }),
572
- /* @__PURE__ */ x(r, {
568
+ /* @__PURE__ */ b(r, {
573
569
  variant: "outline",
574
- onClick: At,
575
- disabled: $ || Z.length === 0,
570
+ onClick: Nt,
571
+ disabled: Q || X.length === 0,
576
572
  children: [
577
- ht ? /* @__PURE__ */ b(h, {
573
+ yt ? /* @__PURE__ */ y(g, {
578
574
  size: 16,
579
575
  className: "animate-spin"
580
- }) : /* @__PURE__ */ b(_, { size: 16 }),
581
- u(O, "sandbox.list.bulk.stopSelected", "Stop Selected"),
582
- Z.length > 0 ? ` (${Z.length})` : ""
576
+ }) : /* @__PURE__ */ y(Ie, { size: 16 }),
577
+ d(D, "sandbox.list.bulk.stopSelected", "Stop Selected"),
578
+ X.length > 0 ? ` (${X.length})` : ""
583
579
  ]
584
580
  }),
585
- /* @__PURE__ */ x(r, {
581
+ /* @__PURE__ */ b(r, {
586
582
  variant: "outline",
587
583
  className: "text-status-error-text border-status-error-border/50 hover:bg-status-error-bg/10",
588
- onClick: jt,
589
- disabled: $ || Q.length === 0,
584
+ onClick: Pt,
585
+ disabled: Q || Z.length === 0,
590
586
  children: [
591
- gt ? /* @__PURE__ */ b(h, {
587
+ bt ? /* @__PURE__ */ y(g, {
592
588
  size: 16,
593
589
  className: "animate-spin"
594
- }) : /* @__PURE__ */ b(Pe, { size: 16 }),
595
- u(O, "sandbox.list.bulk.deleteSelected", "Delete Selected"),
596
- Q.length > 0 ? ` (${Q.length})` : ""
590
+ }) : /* @__PURE__ */ y(Re, { size: 16 }),
591
+ d(D, "sandbox.list.bulk.deleteSelected", "Delete Selected"),
592
+ Z.length > 0 ? ` (${Z.length})` : ""
597
593
  ]
598
594
  })
599
595
  ]
600
596
  })]
601
- }), /* @__PURE__ */ b("p", {
597
+ }), /* @__PURE__ */ y("p", {
602
598
  className: "text-xs text-text-secondary",
603
- children: u(O, "sandbox.list.bulk.helpText", "Select one, many, or every sandbox on the current filter set. Only running sandboxes can be stopped, and only stopped, failed, expired, or errored sandboxes can be deleted.")
599
+ children: d(D, "sandbox.list.bulk.helpText", "Select one, many, or every sandbox on the current filter set. Only running sandboxes can be stopped, and only stopped, failed, expired, or errored sandboxes can be deleted.")
604
600
  })]
605
601
  })
606
602
  }),
607
- /* @__PURE__ */ b("div", {
603
+ /* @__PURE__ */ y("div", {
608
604
  className: "space-y-3",
609
- children: K.map((e, t) => {
610
- let n = M.has(e.id);
611
- return /* @__PURE__ */ b(i, {
612
- className: l("cursor-pointer overflow-hidden group", "hover:shadow-md hover:border-primary/30 transition-all duration-200", "animate-in fade-in-0 slide-in-from-bottom-2", n && "border-primary/60 bg-action-primary-bg/5 shadow-sm"),
605
+ children: G.map((e, t) => {
606
+ let n = j.has(e.id);
607
+ return /* @__PURE__ */ y(te, {
608
+ treatment: "insight",
609
+ className: u("cursor-pointer overflow-hidden group", "animate-in fade-in-0 slide-in-from-bottom-2", n && "border-action-primary-border bg-accent-wash"),
613
610
  style: { animationDelay: `${t * 40}ms` },
614
- onClick: () => bt(e.id),
611
+ onClick: () => wt(e.id),
615
612
  tabIndex: 0,
616
613
  onKeyDown: (t) => {
617
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), bt(e.id));
614
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), wt(e.id));
618
615
  },
619
616
  "data-tour": "sandbox-list-item-card",
620
- children: /* @__PURE__ */ b(a, {
617
+ children: /* @__PURE__ */ y("div", {
621
618
  className: "p-5",
622
- children: /* @__PURE__ */ x("div", {
619
+ children: /* @__PURE__ */ b("div", {
623
620
  className: "flex items-start gap-4",
624
621
  children: [
625
- /* @__PURE__ */ b("div", {
622
+ /* @__PURE__ */ y("div", {
626
623
  className: "pt-1",
627
- children: /* @__PURE__ */ b(o, {
624
+ children: /* @__PURE__ */ y(ee, {
628
625
  checked: n,
629
- onCheckedChange: (t) => xt(e, t === !0),
626
+ onCheckedChange: (t) => Tt(e, t === !0),
630
627
  onClick: (e) => e.stopPropagation(),
631
- "aria-label": u(O, "sandbox.list.item.select.ariaLabel", "Select sandbox {name}", { name: e.name })
628
+ "aria-label": d(D, "sandbox.list.item.select.ariaLabel", "Select sandbox {name}", { name: e.name })
632
629
  })
633
630
  }),
634
- /* @__PURE__ */ b("div", {
631
+ /* @__PURE__ */ y("div", {
635
632
  className: "flex-shrink-0 p-3 rounded-lg bg-bg-sunken/50",
636
- children: /* @__PURE__ */ b(se, {
633
+ children: /* @__PURE__ */ y(ce, {
637
634
  type: e.template,
638
635
  size: 24
639
636
  })
640
637
  }),
641
- /* @__PURE__ */ x("div", {
638
+ /* @__PURE__ */ b("div", {
642
639
  className: "flex-1 min-w-0",
643
640
  children: [
644
- /* @__PURE__ */ x("div", {
641
+ /* @__PURE__ */ b("div", {
645
642
  className: "flex items-start justify-between gap-3",
646
- children: [/* @__PURE__ */ x("div", {
643
+ children: [/* @__PURE__ */ b("div", {
647
644
  className: "min-w-0",
648
- children: [/* @__PURE__ */ x("div", {
645
+ children: [/* @__PURE__ */ b("div", {
649
646
  className: "flex items-center gap-2 mb-1",
650
- children: [/* @__PURE__ */ b("h3", {
647
+ children: [/* @__PURE__ */ y("h3", {
651
648
  className: "font-semibold text-base truncate",
652
649
  children: e.name
653
- }), /* @__PURE__ */ b(ae, { status: e.status })]
654
- }), e.description && /* @__PURE__ */ b("p", {
650
+ }), /* @__PURE__ */ y(oe, { status: e.status })]
651
+ }), e.description && /* @__PURE__ */ y("p", {
655
652
  className: "text-sm text-text-secondary line-clamp-1 mb-2",
656
653
  children: e.description
657
654
  })]
658
- }), /* @__PURE__ */ x("div", {
659
- className: l("flex items-center gap-1 transition-opacity flex-shrink-0", n ? "opacity-100" : "opacity-0 group-hover:opacity-100"),
655
+ }), /* @__PURE__ */ b("div", {
656
+ className: u("flex items-center gap-1 transition-opacity flex-shrink-0", n ? "opacity-100" : "opacity-0 group-hover:opacity-100"),
660
657
  children: [
661
- qe(e) && /* @__PURE__ */ b(r, {
658
+ Ze(e) && /* @__PURE__ */ y(r, {
662
659
  variant: "ghost",
663
660
  size: "icon",
664
661
  onClick: (t) => {
665
- t.stopPropagation(), Dt(e);
662
+ t.stopPropagation(), At(e);
666
663
  },
667
- "aria-label": u(O, "sandbox.list.item.actions.stop.ariaLabel", "Stop sandbox"),
668
- children: /* @__PURE__ */ b(_, { size: 16 })
664
+ "aria-label": d(D, "sandbox.list.item.actions.stop.ariaLabel", "Stop sandbox"),
665
+ children: /* @__PURE__ */ y(Ie, { size: 16 })
669
666
  }),
670
- Je(e) && /* @__PURE__ */ b(r, {
667
+ Qe(e) && /* @__PURE__ */ y(r, {
671
668
  variant: "ghost",
672
669
  size: "icon",
673
670
  onClick: (t) => {
674
- t.stopPropagation(), nt({ variables: {
675
- context: { workspaceId: z },
671
+ t.stopPropagation(), ot({ variables: {
672
+ context: { workspaceId: R },
676
673
  id: e.id,
677
674
  additionalSeconds: 3600
678
- } }).then(() => V());
675
+ } }).then(() => B());
679
676
  },
680
- "aria-label": u(O, "sandbox.list.item.actions.extendTtl.ariaLabel", "Extend TTL"),
681
- children: /* @__PURE__ */ b(Ne, { size: 16 })
677
+ "aria-label": d(D, "sandbox.list.item.actions.extendTtl.ariaLabel", "Extend TTL"),
678
+ children: /* @__PURE__ */ y(Le, { size: 16 })
682
679
  }),
683
- Ye(e) && /* @__PURE__ */ b(r, {
680
+ $e(e) && /* @__PURE__ */ y(r, {
684
681
  variant: "ghost",
685
682
  size: "icon",
686
683
  className: "text-status-error-text hover:text-status-error-text",
687
684
  onClick: (t) => {
688
- t.stopPropagation(), Ot(e);
685
+ t.stopPropagation(), jt(e);
689
686
  },
690
- "aria-label": u(O, "sandbox.list.item.actions.delete.ariaLabel", "Delete sandbox"),
691
- children: /* @__PURE__ */ b(Pe, { size: 16 })
687
+ "aria-label": d(D, "sandbox.list.item.actions.delete.ariaLabel", "Delete sandbox"),
688
+ children: /* @__PURE__ */ y(Re, { size: 16 })
692
689
  })
693
690
  ]
694
691
  })]
695
692
  }),
696
- /* @__PURE__ */ x("div", {
693
+ /* @__PURE__ */ b("div", {
697
694
  className: "flex flex-wrap items-center gap-x-4 gap-y-2 text-xs text-text-secondary",
698
695
  children: [
699
- /* @__PURE__ */ b(oe, {
696
+ /* @__PURE__ */ y(se, {
700
697
  cpuRequest: e.resources?.cpuRequest ?? "0",
701
698
  memoryRequest: e.resources?.memoryRequest ?? "0",
702
699
  containerCount: e.containers?.length,
703
700
  className: "text-xs"
704
701
  }),
705
- /* @__PURE__ */ b("span", {
702
+ /* @__PURE__ */ y("span", {
706
703
  className: "text-text-secondary/40",
707
704
  children: "|"
708
705
  }),
709
- /* @__PURE__ */ b(se, {
706
+ /* @__PURE__ */ y(ce, {
710
707
  type: e.template,
711
708
  size: 12,
712
709
  showLabel: !0
713
710
  }),
714
- e.storage?.mode && e.storage.mode !== "NONE" && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
711
+ e.storage?.mode && e.storage.mode !== "NONE" && /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("span", {
715
712
  className: "text-text-secondary/40",
716
713
  children: "|"
717
- }), /* @__PURE__ */ x("span", {
714
+ }), /* @__PURE__ */ b("span", {
718
715
  className: "inline-flex items-center gap-1",
719
716
  children: [
720
- /* @__PURE__ */ b(Ae, { size: 12 }),
721
- e.storage.mode === "EPHEMERAL" ? u(O, "sandbox.list.item.storage.ephemeral", "Ephemeral") : u(O, "sandbox.list.item.storage.persistent", "Persistent"),
717
+ /* @__PURE__ */ y(je, { size: 12 }),
718
+ e.storage.mode === "EPHEMERAL" ? d(D, "sandbox.list.item.storage.ephemeral", "Ephemeral") : d(D, "sandbox.list.item.storage.persistent", "Persistent"),
722
719
  e.storage.sizeGi && ` ${e.storage.sizeGi}Gi`
723
720
  ]
724
721
  })] }),
725
- e.containers?.length > 0 && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
722
+ e.containers?.length > 0 && /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("span", {
726
723
  className: "text-text-secondary/40",
727
724
  children: "|"
728
- }), /* @__PURE__ */ x("span", {
725
+ }), /* @__PURE__ */ b("span", {
729
726
  className: "inline-flex items-center gap-1",
730
- children: [/* @__PURE__ */ b(ke, { size: 12 }), u(O, "sandbox.list.item.containers", "{count} container{count, plural, one {} other {s}}", { count: e.containers.length })]
727
+ children: [/* @__PURE__ */ y(Ae, { size: 12 }), d(D, "sandbox.list.item.containers", "{count} container{count, plural, one {} other {s}}", { count: e.containers.length })]
731
728
  })] }),
732
- e.expiresAt && e.status === "RUNNING" && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
729
+ e.expiresAt && e.status === "RUNNING" && /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("span", {
733
730
  className: "text-text-secondary/40",
734
731
  children: "|"
735
- }), /* @__PURE__ */ b(ce, {
732
+ }), /* @__PURE__ */ y(le, {
736
733
  compact: !0,
737
734
  expiresAt: e.expiresAt
738
735
  })] }),
739
- /* @__PURE__ */ b("span", {
736
+ /* @__PURE__ */ y("span", {
740
737
  className: "text-text-secondary/40",
741
738
  children: "|"
742
739
  }),
743
- /* @__PURE__ */ b("span", { children: u(O, "sandbox.list.item.created", "Created {time}", { time: Ge(e.createdAt) }) })
740
+ /* @__PURE__ */ y("span", { children: d(D, "sandbox.list.item.created", "Created {time}", { time: Ye(e.createdAt) }) })
744
741
  ]
745
742
  }),
746
- e.errorMessage && /* @__PURE__ */ x("div", {
743
+ e.errorMessage && /* @__PURE__ */ b("div", {
747
744
  className: "mt-2 flex items-start gap-1.5 text-xs text-status-error-text bg-status-error-bg-subtle px-2.5 py-1.5 rounded-md",
748
- children: [/* @__PURE__ */ b(we, {
745
+ children: [/* @__PURE__ */ y(Te, {
749
746
  size: 12,
750
747
  className: "flex-shrink-0 mt-0.5"
751
- }), /* @__PURE__ */ b("span", {
748
+ }), /* @__PURE__ */ y("span", {
752
749
  className: "line-clamp-1",
753
750
  children: e.errorMessage
754
751
  })]
@@ -761,76 +758,76 @@ function D() {
761
758
  }, e.id);
762
759
  })
763
760
  }),
764
- G > 1 && /* @__PURE__ */ b(i, {
761
+ W > 1 && /* @__PURE__ */ y(a, {
765
762
  className: "animate-in fade-in-0 duration-200",
766
- children: /* @__PURE__ */ x(a, {
763
+ children: /* @__PURE__ */ b(o, {
767
764
  className: "p-4 flex flex-col sm:flex-row items-center justify-between gap-3",
768
- children: [/* @__PURE__ */ b("p", {
765
+ children: [/* @__PURE__ */ y("p", {
769
766
  className: "text-sm text-text-secondary",
770
- children: u(O, "sandbox.list.pagination.showing", "Showing {from}-{to} of {total}", {
771
- from: (A - 1) * 20 + 1,
772
- to: Math.min(A * 20, W),
773
- total: W
767
+ children: d(D, "sandbox.list.pagination.showing", "Showing {from}-{to} of {total}", {
768
+ from: (k - 1) * 20 + 1,
769
+ to: Math.min(k * 20, U),
770
+ total: U
774
771
  })
775
- }), /* @__PURE__ */ x("div", {
772
+ }), /* @__PURE__ */ b("div", {
776
773
  className: "flex items-center gap-2",
777
774
  children: [
778
- /* @__PURE__ */ b(r, {
775
+ /* @__PURE__ */ y(r, {
779
776
  variant: "outline",
780
777
  size: "icon",
781
- onClick: () => j((e) => Math.max(1, e - 1)),
782
- disabled: A === 1,
783
- "aria-label": u(O, "sandbox.list.pagination.previous.ariaLabel", "Previous page"),
784
- children: /* @__PURE__ */ b(De, { size: 18 })
778
+ onClick: () => A((e) => Math.max(1, e - 1)),
779
+ disabled: k === 1,
780
+ "aria-label": d(D, "sandbox.list.pagination.previous.ariaLabel", "Previous page"),
781
+ children: /* @__PURE__ */ y(Oe, { size: 18 })
785
782
  }),
786
- /* @__PURE__ */ b(n, {
783
+ /* @__PURE__ */ y(n, {
787
784
  variant: "secondary",
788
785
  className: "px-4 py-2 text-sm",
789
- children: u(O, "sandbox.list.pagination.pageOf", "Page {current} of {total}", {
790
- current: A,
791
- total: G
786
+ children: d(D, "sandbox.list.pagination.pageOf", "Page {current} of {total}", {
787
+ current: k,
788
+ total: W
792
789
  })
793
790
  }),
794
- /* @__PURE__ */ b(r, {
791
+ /* @__PURE__ */ y(r, {
795
792
  variant: "outline",
796
793
  size: "icon",
797
- onClick: () => j((e) => Math.min(G, e + 1)),
798
- disabled: A === G,
799
- "aria-label": u(O, "sandbox.list.pagination.next.ariaLabel", "Next page"),
800
- children: /* @__PURE__ */ b(Oe, { size: 18 })
794
+ onClick: () => A((e) => Math.min(W, e + 1)),
795
+ disabled: k === W,
796
+ "aria-label": d(D, "sandbox.list.pagination.next.ariaLabel", "Next page"),
797
+ children: /* @__PURE__ */ y(ke, { size: 18 })
801
798
  })
802
799
  ]
803
800
  })]
804
801
  })
805
802
  })
806
- ] }) : /* @__PURE__ */ b(de, {
807
- icon: b(q ? g : Te, { size: 48 }),
808
- title: q ? u(O, "sandbox.list.empty.filtered.title", "No matching sandboxes") : u(O, "sandbox.list.empty.title", "No sandboxes yet"),
809
- description: q ? u(O, "sandbox.list.empty.filtered.description", "Try adjusting your search or filters to find what you're looking for.") : u(O, "sandbox.list.empty.description", "Create your first sandbox to start building and testing in isolated environments."),
810
- action: q ? /* @__PURE__ */ x(r, {
803
+ ] }) : /* @__PURE__ */ y(fe, {
804
+ icon: y(K ? Fe : Ee, { size: 48 }),
805
+ title: K ? d(D, "sandbox.list.empty.filtered.title", "No matching sandboxes") : d(D, "sandbox.list.empty.title", "No sandboxes yet"),
806
+ description: K ? d(D, "sandbox.list.empty.filtered.description", "Try adjusting your search or filters to find what you're looking for.") : d(D, "sandbox.list.empty.description", "Create your first sandbox to start building and testing in isolated environments."),
807
+ action: K ? /* @__PURE__ */ b(r, {
811
808
  variant: "outline",
812
- onClick: vt,
813
- children: [/* @__PURE__ */ b(v, { size: 16 }), u(O, "sandbox.list.empty.filtered.clearFilters", "Clear Filters")]
814
- }) : /* @__PURE__ */ x(r, {
815
- onClick: yt,
816
- children: [/* @__PURE__ */ b(Me, { size: 16 }), u(O, "sandbox.list.empty.createFirst", "Create First Sandbox")]
809
+ onClick: St,
810
+ children: [/* @__PURE__ */ y(_, { size: 16 }), d(D, "sandbox.list.empty.filtered.clearFilters", "Clear Filters")]
811
+ }) : /* @__PURE__ */ b(r, {
812
+ onClick: Ct,
813
+ children: [/* @__PURE__ */ y(Pe, { size: 16 }), d(D, "sandbox.list.empty.createFirst", "Create First Sandbox")]
817
814
  })
818
815
  })
819
816
  }),
820
- /* @__PURE__ */ b(me, {
821
- workspaceId: z ?? "",
822
- open: it,
823
- onClose: () => at(!1)
817
+ /* @__PURE__ */ y(he, {
818
+ workspaceId: R ?? "",
819
+ open: ct,
820
+ onClose: () => lt(!1)
824
821
  }),
825
- /* @__PURE__ */ b(Le, {
826
- open: $e !== null,
822
+ /* @__PURE__ */ y(Ve, {
823
+ open: rt !== null,
827
824
  onOpenChange: (e) => {
828
- e || R(null);
825
+ e || L(null);
829
826
  },
830
- children: /* @__PURE__ */ x(Be, { children: [/* @__PURE__ */ x(Ue, { children: [/* @__PURE__ */ b(We, { children: u(O, "sandbox.list.bulk.deleteSelected", "Delete Selected") }), /* @__PURE__ */ b(Ve, { children: $e?.message })] }), /* @__PURE__ */ x(He, { children: [/* @__PURE__ */ b(ze, { children: "Cancel" }), /* @__PURE__ */ b(Re, {
827
+ children: /* @__PURE__ */ b(We, { children: [/* @__PURE__ */ b(qe, { children: [/* @__PURE__ */ y(Je, { children: d(D, "sandbox.list.bulk.deleteSelected", "Delete Selected") }), /* @__PURE__ */ y(Ge, { children: rt?.message })] }), /* @__PURE__ */ b(Ke, { children: [/* @__PURE__ */ y(Ue, { children: "Cancel" }), /* @__PURE__ */ y(He, {
831
828
  className: "bg-status-error-bg text-status-error-text hover:bg-status-error-bg/90",
832
829
  onClick: () => {
833
- Mt();
830
+ Ft();
834
831
  },
835
832
  children: "Delete"
836
833
  })] })] })
@@ -839,6 +836,6 @@ function D() {
839
836
  });
840
837
  }
841
838
  //#endregion
842
- export { D as SandboxListPage };
839
+ export { E as SandboxListPage };
843
840
 
844
841
  //# sourceMappingURL=SandboxListPage.js.map