@burdenoff/microfe-sandbox 2026.528.1 → 2026.528.2

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