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