@burdenoff/microfe-sandbox 2026.529.2 → 2026.601.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,66 +1,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,332 +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
- children: [/* @__PURE__ */ v(Pe, { size: 18 }), u(E, "sandbox.list.actions.create", "Create Sandbox")]
292
+ "data-tour": "sandbox-list-create-button",
293
+ children: [/* @__PURE__ */ b(je, { size: 18 }), u(k, "sandbox.list.actions.create", "Create Sandbox")]
297
294
  })
298
295
  }),
299
- headerContent: q > 0 || I ? /* @__PURE__ */ y("div", {
296
+ headerContent: $e > 0 ? /* @__PURE__ */ x("div", {
300
297
  className: "flex items-center gap-3 flex-wrap",
301
- children: [q > 0 && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(n, {
298
+ children: [/* @__PURE__ */ b(n, {
302
299
  variant: "secondary",
303
300
  className: "gap-1.5",
304
- children: u(E, "sandbox.list.header.total", "{count} total", { count: q })
305
- }), /* @__PURE__ */ v(n, {
301
+ children: u(k, "sandbox.list.header.total", "{count} total", { count: $e })
302
+ }), /* @__PURE__ */ b(n, {
306
303
  variant: "default",
307
304
  className: "gap-1.5 bg-status-success-bg-subtle text-status-success-text border-border-default",
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") })]
305
+ children: u(k, "sandbox.list.header.running", "{count} running", { count: J })
319
306
  })]
320
307
  }) : null,
321
308
  children: [
322
- /* @__PURE__ */ v(he, {
323
- runningCount: K,
324
- maxConcurrent: Math.max(K, 10)
309
+ /* @__PURE__ */ b(pe, {
310
+ runningCount: J,
311
+ maxConcurrent: Math.max(J, 10)
325
312
  }),
326
- /* @__PURE__ */ y("div", {
313
+ /* @__PURE__ */ x("div", {
327
314
  className: "space-y-4",
328
315
  children: [
329
- /* @__PURE__ */ y("div", {
316
+ /* @__PURE__ */ x("div", {
330
317
  className: "flex flex-col sm:flex-row gap-3",
331
318
  children: [
332
- /* @__PURE__ */ v(r, {
319
+ /* @__PURE__ */ b(r, {
333
320
  variant: "outline",
334
321
  size: "sm",
335
- onClick: () => rt(!0),
336
- "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"),
337
324
  className: "self-start sm:self-auto",
338
- children: u(E, "sandbox.list.actions.export.label", "Export")
325
+ children: u(k, "sandbox.list.actions.export.label", "Export")
339
326
  }),
340
- /* @__PURE__ */ y("div", {
327
+ /* @__PURE__ */ x("div", {
341
328
  className: "flex-1 relative group",
342
- children: [/* @__PURE__ */ v(Fe, {
329
+ children: [/* @__PURE__ */ b(Me, {
343
330
  size: 18,
344
331
  className: "absolute left-3 top-1/2 -translate-y-1/2 text-muted-foreground group-focus-within:text-primary transition-colors"
345
- }), /* @__PURE__ */ v(ee, {
332
+ }), /* @__PURE__ */ b(ee, {
346
333
  type: "text",
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
+ 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),
350
337
  className: "pl-[3.25rem] h-10",
351
- "aria-label": u(E, "sandbox.list.search.ariaLabel", "Search sandboxes")
338
+ "aria-label": u(k, "sandbox.list.search.ariaLabel", "Search sandboxes"),
339
+ "data-tour": "sandbox-list-search-input"
352
340
  })]
353
341
  }),
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
+ /* @__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"),
346
+ "data-tour": "sandbox-list-filters-button",
358
347
  children: [
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, {
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, {
362
351
  variant: "secondary",
363
352
  className: "ml-1 h-5 min-w-5 px-1.5",
364
353
  children: [
365
- x.search,
366
- x.template !== "all" && x.template,
367
- x.status !== "all" && x.status
354
+ C.search,
355
+ C.template !== "all" && C.template,
356
+ C.status !== "all" && C.status
368
357
  ].filter(Boolean).length
369
358
  })
370
359
  ]
371
360
  })
372
361
  ]
373
362
  }),
374
- D && /* @__PURE__ */ v(i, {
363
+ A && /* @__PURE__ */ b(i, {
375
364
  className: "animate-in slide-in-from-top-2 duration-200",
376
- children: /* @__PURE__ */ y(a, {
365
+ children: /* @__PURE__ */ x(a, {
377
366
  className: "p-4",
378
- children: [/* @__PURE__ */ y("div", {
367
+ children: [/* @__PURE__ */ x("div", {
379
368
  className: "flex items-center justify-between mb-4",
380
- children: [/* @__PURE__ */ y("h3", {
369
+ children: [/* @__PURE__ */ x("h3", {
381
370
  className: "font-semibold text-foreground flex items-center gap-2",
382
- children: [/* @__PURE__ */ v(Ne, {
371
+ children: [/* @__PURE__ */ b(h, {
383
372
  size: 16,
384
373
  className: "text-primary"
385
- }), u(E, "sandbox.list.filters.panel.title", "Filter Sandboxes")]
386
- }), G && /* @__PURE__ */ y(r, {
374
+ }), u(k, "sandbox.list.filters.panel.title", "Filter Sandboxes")]
375
+ }), q && /* @__PURE__ */ x(r, {
387
376
  variant: "ghost",
388
377
  size: "sm",
389
- onClick: mt,
378
+ onClick: ct,
390
379
  className: "text-muted-foreground hover:text-destructive",
391
- 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")]
392
381
  })]
393
- }), /* @__PURE__ */ y("div", {
382
+ }), /* @__PURE__ */ x("div", {
394
383
  className: "grid grid-cols-1 sm:grid-cols-2 gap-4",
395
- children: [/* @__PURE__ */ y("div", {
384
+ children: [/* @__PURE__ */ x("div", {
396
385
  className: "space-y-2",
397
- children: [/* @__PURE__ */ v("label", {
386
+ children: [/* @__PURE__ */ b("label", {
398
387
  className: "block text-sm font-medium text-foreground",
399
- children: u(E, "sandbox.list.filters.template.label", "Template")
400
- }), /* @__PURE__ */ y(te, {
401
- value: x.template || "all",
388
+ children: u(k, "sandbox.list.filters.template.label", "Template")
389
+ }), /* @__PURE__ */ x(te, {
390
+ value: C.template || "all",
402
391
  onValueChange: (e) => {
403
- S({ template: e }), k(1);
392
+ w({ template: e }), M(1);
404
393
  },
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, {
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, {
407
396
  value: "all",
408
- children: u(E, "sandbox.list.filters.template.all", "All Templates")
397
+ children: u(k, "sandbox.list.filters.template.all", "All Templates")
409
398
  }),
410
- /* @__PURE__ */ v(s, {
399
+ /* @__PURE__ */ b(s, {
411
400
  value: "AI_BUILDER",
412
- children: u(E, "sandbox.list.filters.template.aiBuilder", "AI Builder")
401
+ children: u(k, "sandbox.list.filters.template.aiBuilder", "AI Builder")
413
402
  }),
414
- /* @__PURE__ */ v(s, {
403
+ /* @__PURE__ */ b(s, {
415
404
  value: "WORKFLOW_MULTI_NODE",
416
- children: u(E, "sandbox.list.filters.template.workflowMultiNode", "Workflow Multi-Node")
405
+ children: u(k, "sandbox.list.filters.template.workflowMultiNode", "Workflow Multi-Node")
417
406
  }),
418
- /* @__PURE__ */ v(s, {
407
+ /* @__PURE__ */ b(s, {
419
408
  value: "MISC_SHELL",
420
- children: u(E, "sandbox.list.filters.template.miscShell", "Misc Shell")
409
+ children: u(k, "sandbox.list.filters.template.miscShell", "Misc Shell")
421
410
  }),
422
- /* @__PURE__ */ v(s, {
411
+ /* @__PURE__ */ b(s, {
423
412
  value: "CUSTOM",
424
- children: u(E, "sandbox.list.filters.template.custom", "Custom")
413
+ children: u(k, "sandbox.list.filters.template.custom", "Custom")
425
414
  })
426
415
  ] })]
427
416
  })]
428
- }), /* @__PURE__ */ y("div", {
417
+ }), /* @__PURE__ */ x("div", {
429
418
  className: "space-y-2",
430
- children: [/* @__PURE__ */ v("label", {
419
+ children: [/* @__PURE__ */ b("label", {
431
420
  className: "block text-sm font-medium text-foreground",
432
- children: u(E, "sandbox.list.filters.status.label", "Status")
433
- }), /* @__PURE__ */ y(te, {
434
- value: x.status || "all",
421
+ children: u(k, "sandbox.list.filters.status.label", "Status")
422
+ }), /* @__PURE__ */ x(te, {
423
+ value: C.status || "all",
435
424
  onValueChange: (e) => {
436
- S({ status: e }), k(1);
425
+ w({ status: e }), M(1);
437
426
  },
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, {
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, {
440
429
  value: "all",
441
- children: u(E, "sandbox.list.filters.status.all", "All Statuses")
430
+ children: u(k, "sandbox.list.filters.status.all", "All Statuses")
442
431
  }),
443
- /* @__PURE__ */ v(s, {
432
+ /* @__PURE__ */ b(s, {
444
433
  value: "PENDING",
445
- children: u(E, "sandbox.list.filters.status.pending", "Pending")
434
+ children: u(k, "sandbox.list.filters.status.pending", "Pending")
446
435
  }),
447
- /* @__PURE__ */ v(s, {
436
+ /* @__PURE__ */ b(s, {
448
437
  value: "PROVISIONING",
449
- children: u(E, "sandbox.list.filters.status.provisioning", "Provisioning")
438
+ children: u(k, "sandbox.list.filters.status.provisioning", "Provisioning")
450
439
  }),
451
- /* @__PURE__ */ v(s, {
440
+ /* @__PURE__ */ b(s, {
452
441
  value: "RUNNING",
453
- children: u(E, "sandbox.list.filters.status.running", "Running")
442
+ children: u(k, "sandbox.list.filters.status.running", "Running")
454
443
  }),
455
- /* @__PURE__ */ v(s, {
444
+ /* @__PURE__ */ b(s, {
456
445
  value: "STOPPING",
457
- children: u(E, "sandbox.list.filters.status.stopping", "Stopping")
446
+ children: u(k, "sandbox.list.filters.status.stopping", "Stopping")
458
447
  }),
459
- /* @__PURE__ */ v(s, {
448
+ /* @__PURE__ */ b(s, {
460
449
  value: "STOPPED",
461
- children: u(E, "sandbox.list.filters.status.stopped", "Stopped")
450
+ children: u(k, "sandbox.list.filters.status.stopped", "Stopped")
462
451
  }),
463
- /* @__PURE__ */ v(s, {
452
+ /* @__PURE__ */ b(s, {
464
453
  value: "ERROR",
465
- children: u(E, "sandbox.list.filters.status.error", "Error")
454
+ children: u(k, "sandbox.list.filters.status.error", "Error")
466
455
  }),
467
- /* @__PURE__ */ v(s, {
456
+ /* @__PURE__ */ b(s, {
468
457
  value: "EXPIRED",
469
- children: u(E, "sandbox.list.filters.status.expired", "Expired")
458
+ children: u(k, "sandbox.list.filters.status.expired", "Expired")
470
459
  }),
471
- /* @__PURE__ */ v(s, {
460
+ /* @__PURE__ */ b(s, {
472
461
  value: "FAILED",
473
- children: u(E, "sandbox.list.filters.status.failed", "Failed")
462
+ children: u(k, "sandbox.list.filters.status.failed", "Failed")
474
463
  })
475
464
  ] })]
476
465
  })]
@@ -478,283 +467,285 @@ function T() {
478
467
  })]
479
468
  })
480
469
  }),
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, {
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, {
484
473
  className: "p-4 flex items-start justify-between gap-3",
485
- children: [/* @__PURE__ */ y("div", {
486
- role: P.kind === "error" ? "alert" : "status",
474
+ children: [/* @__PURE__ */ x("div", {
475
+ role: L.kind === "error" ? "alert" : "status",
487
476
  className: "flex items-start gap-2 text-sm",
488
- children: [P.kind === "success" ? /* @__PURE__ */ v(Oe, {
477
+ children: [L.kind === "success" ? /* @__PURE__ */ b(Ee, {
489
478
  size: 16,
490
479
  className: "mt-0.5 text-status-success-text"
491
- }) : /* @__PURE__ */ v(Ee, {
480
+ }) : /* @__PURE__ */ b(we, {
492
481
  size: 16,
493
482
  className: "mt-0.5 text-destructive"
494
- }), /* @__PURE__ */ v("span", {
495
- className: l("font-medium", P.kind === "success" ? "text-status-success-text" : "text-destructive"),
496
- 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
497
486
  })]
498
- }), /* @__PURE__ */ v(r, {
487
+ }), /* @__PURE__ */ b(r, {
499
488
  variant: "ghost",
500
489
  size: "icon",
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 })
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 })
504
493
  })]
505
494
  })
506
495
  })
507
496
  ]
508
497
  }),
509
- at && /* @__PURE__ */ v("div", {
498
+ Ze && /* @__PURE__ */ b("div", {
510
499
  className: "space-y-4 animate-in fade-in-0 duration-300",
511
500
  children: [...[
512
501
  ,
513
502
  ,
514
503
  ,
515
- ]].map((e, t) => /* @__PURE__ */ v(i, { children: /* @__PURE__ */ v(a, {
504
+ ]].map((e, t) => /* @__PURE__ */ b(i, { children: /* @__PURE__ */ b(a, {
516
505
  className: "p-5",
517
- children: /* @__PURE__ */ y("div", {
506
+ children: /* @__PURE__ */ x("div", {
518
507
  className: "flex items-start gap-4",
519
- 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", {
520
509
  className: "flex-1 space-y-2",
521
510
  children: [
522
- /* @__PURE__ */ v(c, { className: "h-5 w-1/3" }),
523
- /* @__PURE__ */ v(c, { className: "h-4 w-2/3" }),
524
- /* @__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", {
525
514
  className: "flex gap-2 pt-1",
526
- 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" })]
527
516
  })
528
517
  ]
529
518
  })]
530
519
  })
531
520
  }) }, t))
532
521
  }),
533
- !at && /* @__PURE__ */ v("div", {
522
+ !Ze && /* @__PURE__ */ b("div", {
534
523
  className: "space-y-4",
535
- children: W.length > 0 ? /* @__PURE__ */ y(_, { children: [
536
- /* @__PURE__ */ v(i, {
524
+ children: K.length > 0 ? /* @__PURE__ */ x(y, { children: [
525
+ /* @__PURE__ */ b(i, {
537
526
  className: "animate-in fade-in-0 duration-300",
538
- children: /* @__PURE__ */ y(a, {
527
+ children: /* @__PURE__ */ x(a, {
539
528
  className: "p-4 space-y-3",
540
- children: [/* @__PURE__ */ y("div", {
529
+ children: [/* @__PURE__ */ x("div", {
541
530
  className: "flex flex-col gap-3 xl:flex-row xl:items-center xl:justify-between",
542
- children: [/* @__PURE__ */ y("div", {
531
+ "data-tour": "sandbox-list-bulk-controls",
532
+ children: [/* @__PURE__ */ x("div", {
543
533
  className: "flex flex-wrap items-center gap-3",
544
534
  children: [
545
- /* @__PURE__ */ y("label", {
535
+ /* @__PURE__ */ x("label", {
546
536
  className: "inline-flex items-center gap-2 text-sm font-medium text-foreground",
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") })]
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") })]
552
542
  }),
553
- H > W.length && /* @__PURE__ */ y(r, {
543
+ W > K.length && /* @__PURE__ */ x(r, {
554
544
  variant: "ghost",
555
545
  size: "sm",
556
- onClick: Tt,
546
+ onClick: yt,
557
547
  disabled: $,
558
- children: [ut ? /* @__PURE__ */ v(h, {
548
+ children: [it ? /* @__PURE__ */ b(g, {
559
549
  size: 14,
560
550
  className: "animate-spin"
561
- }) : 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 })]
562
552
  }),
563
- Q && /* @__PURE__ */ v(r, {
553
+ tt && /* @__PURE__ */ b(r, {
564
554
  variant: "ghost",
565
555
  size: "sm",
566
- onClick: yt,
556
+ onClick: pt,
567
557
  disabled: $,
568
- children: u(E, "sandbox.list.bulk.clearSelection", "Clear selection")
558
+ children: u(k, "sandbox.list.bulk.clearSelection", "Clear selection")
569
559
  })
570
560
  ]
571
- }), /* @__PURE__ */ y("div", {
561
+ }), /* @__PURE__ */ x("div", {
572
562
  className: "flex flex-wrap items-center gap-2",
573
563
  children: [
574
- /* @__PURE__ */ v(n, {
575
- variant: Q ? "default" : "secondary",
564
+ /* @__PURE__ */ b(n, {
565
+ variant: tt ? "default" : "secondary",
576
566
  className: "gap-1.5",
577
- 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 })
578
568
  }),
579
- /* @__PURE__ */ y(r, {
569
+ /* @__PURE__ */ x(r, {
580
570
  variant: "outline",
581
- onClick: Et,
582
- disabled: $ || X.length === 0,
571
+ onClick: bt,
572
+ disabled: $ || Z.length === 0,
583
573
  children: [
584
- dt ? /* @__PURE__ */ v(h, {
574
+ at ? /* @__PURE__ */ b(g, {
585
575
  size: 16,
586
576
  className: "animate-spin"
587
- }) : /* @__PURE__ */ v(Ie, { size: 16 }),
588
- u(E, "sandbox.list.bulk.stopSelected", "Stop Selected"),
589
- 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})` : ""
590
580
  ]
591
581
  }),
592
- /* @__PURE__ */ y(r, {
582
+ /* @__PURE__ */ x(r, {
593
583
  variant: "outline",
594
584
  className: "text-destructive border-destructive/50 hover:bg-destructive/10",
595
- onClick: Dt,
596
- disabled: $ || Z.length === 0,
585
+ onClick: xt,
586
+ disabled: $ || Q.length === 0,
597
587
  children: [
598
- ft ? /* @__PURE__ */ v(h, {
588
+ ot ? /* @__PURE__ */ b(g, {
599
589
  size: 16,
600
590
  className: "animate-spin"
601
- }) : /* @__PURE__ */ v(Re, { size: 16 }),
602
- u(E, "sandbox.list.bulk.deleteSelected", "Delete Selected"),
603
- 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})` : ""
604
594
  ]
605
595
  })
606
596
  ]
607
597
  })]
608
- }), /* @__PURE__ */ v("p", {
598
+ }), /* @__PURE__ */ b("p", {
609
599
  className: "text-xs text-muted-foreground",
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.")
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.")
611
601
  })]
612
602
  })
613
603
  }),
614
- /* @__PURE__ */ v("div", {
604
+ /* @__PURE__ */ b("div", {
615
605
  className: "space-y-3",
616
- children: W.map((e, t) => {
617
- let n = A.has(e.id);
618
- return /* @__PURE__ */ v(i, {
606
+ children: K.map((e, t) => {
607
+ let n = N.has(e.id);
608
+ return /* @__PURE__ */ b(i, {
619
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"),
620
610
  style: { animationDelay: `${t * 40}ms` },
621
- onClick: () => gt(e.id),
611
+ onClick: () => ut(e.id),
622
612
  tabIndex: 0,
623
613
  onKeyDown: (t) => {
624
- (t.key === "Enter" || t.key === " ") && (t.preventDefault(), gt(e.id));
614
+ (t.key === "Enter" || t.key === " ") && (t.preventDefault(), ut(e.id));
625
615
  },
626
- children: /* @__PURE__ */ v(a, {
616
+ "data-tour": "sandbox-list-item-card",
617
+ children: /* @__PURE__ */ b(a, {
627
618
  className: "p-5",
628
- children: /* @__PURE__ */ y("div", {
619
+ children: /* @__PURE__ */ x("div", {
629
620
  className: "flex items-start gap-4",
630
621
  children: [
631
- /* @__PURE__ */ v("div", {
622
+ /* @__PURE__ */ b("div", {
632
623
  className: "pt-1",
633
- children: /* @__PURE__ */ v(o, {
624
+ children: /* @__PURE__ */ b(o, {
634
625
  checked: n,
635
- onCheckedChange: (t) => _t(e, t === !0),
626
+ onCheckedChange: (t) => dt(e, t === !0),
636
627
  onClick: (e) => e.stopPropagation(),
637
- "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 })
638
629
  })
639
630
  }),
640
- /* @__PURE__ */ v("div", {
631
+ /* @__PURE__ */ b("div", {
641
632
  className: "flex-shrink-0 p-3 rounded-lg bg-muted/50",
642
- children: /* @__PURE__ */ v(ce, {
633
+ children: /* @__PURE__ */ b(se, {
643
634
  type: e.template,
644
635
  size: 24
645
636
  })
646
637
  }),
647
- /* @__PURE__ */ y("div", {
638
+ /* @__PURE__ */ x("div", {
648
639
  className: "flex-1 min-w-0",
649
640
  children: [
650
- /* @__PURE__ */ y("div", {
641
+ /* @__PURE__ */ x("div", {
651
642
  className: "flex items-start justify-between gap-3",
652
- children: [/* @__PURE__ */ y("div", {
643
+ children: [/* @__PURE__ */ x("div", {
653
644
  className: "min-w-0",
654
- children: [/* @__PURE__ */ y("div", {
645
+ children: [/* @__PURE__ */ x("div", {
655
646
  className: "flex items-center gap-2 mb-1",
656
- children: [/* @__PURE__ */ v("h3", {
647
+ children: [/* @__PURE__ */ b("h3", {
657
648
  className: "font-semibold text-base truncate",
658
649
  children: e.name
659
- }), /* @__PURE__ */ v(oe, { status: e.status })]
660
- }), e.description && /* @__PURE__ */ v("p", {
650
+ }), /* @__PURE__ */ b(ae, { status: e.status })]
651
+ }), e.description && /* @__PURE__ */ b("p", {
661
652
  className: "text-sm text-muted-foreground line-clamp-1 mb-2",
662
653
  children: e.description
663
654
  })]
664
- }), /* @__PURE__ */ y("div", {
655
+ }), /* @__PURE__ */ x("div", {
665
656
  className: l("flex items-center gap-1 transition-opacity flex-shrink-0", n ? "opacity-100" : "opacity-0 group-hover:opacity-100"),
666
657
  children: [
667
- Ue(e) && /* @__PURE__ */ v(r, {
658
+ ze(e) && /* @__PURE__ */ b(r, {
668
659
  variant: "ghost",
669
660
  size: "icon",
670
661
  onClick: (t) => {
671
- t.stopPropagation(), Ct(e);
662
+ t.stopPropagation(), _t(e);
672
663
  },
673
- "aria-label": u(E, "sandbox.list.item.actions.stop.ariaLabel", "Stop sandbox"),
674
- 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 })
675
666
  }),
676
- We(e) && /* @__PURE__ */ v(r, {
667
+ Be(e) && /* @__PURE__ */ b(r, {
677
668
  variant: "ghost",
678
669
  size: "icon",
679
670
  onClick: (t) => {
680
- t.stopPropagation(), et({ variables: {
681
- context: { workspaceId: L },
671
+ t.stopPropagation(), Ke({ variables: {
672
+ context: { workspaceId: z },
682
673
  id: e.id,
683
674
  additionalSeconds: 3600
684
- } }).then(() => z());
675
+ } }).then(() => V());
685
676
  },
686
- "aria-label": u(E, "sandbox.list.item.actions.extendTtl.ariaLabel", "Extend TTL"),
687
- 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 })
688
679
  }),
689
- Ge(e) && /* @__PURE__ */ v(r, {
680
+ Ve(e) && /* @__PURE__ */ b(r, {
690
681
  variant: "ghost",
691
682
  size: "icon",
692
683
  className: "text-destructive hover:text-destructive",
693
684
  onClick: (t) => {
694
- t.stopPropagation(), wt(e);
685
+ t.stopPropagation(), vt(e);
695
686
  },
696
- "aria-label": u(E, "sandbox.list.item.actions.delete.ariaLabel", "Delete sandbox"),
697
- 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 })
698
689
  })
699
690
  ]
700
691
  })]
701
692
  }),
702
- /* @__PURE__ */ y("div", {
693
+ /* @__PURE__ */ x("div", {
703
694
  className: "flex flex-wrap items-center gap-x-4 gap-y-2 text-xs text-muted-foreground",
704
695
  children: [
705
- /* @__PURE__ */ v(se, {
696
+ /* @__PURE__ */ b(oe, {
706
697
  cpuRequest: e.resources?.cpuRequest ?? "0",
707
698
  memoryRequest: e.resources?.memoryRequest ?? "0",
708
699
  containerCount: e.containers?.length,
709
700
  className: "text-xs"
710
701
  }),
711
- /* @__PURE__ */ v("span", {
702
+ /* @__PURE__ */ b("span", {
712
703
  className: "text-muted-foreground/40",
713
704
  children: "|"
714
705
  }),
715
- /* @__PURE__ */ v(ce, {
706
+ /* @__PURE__ */ b(se, {
716
707
  type: e.template,
717
708
  size: 12,
718
709
  showLabel: !0
719
710
  }),
720
- 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", {
721
712
  className: "text-muted-foreground/40",
722
713
  children: "|"
723
- }), /* @__PURE__ */ y("span", {
714
+ }), /* @__PURE__ */ x("span", {
724
715
  className: "inline-flex items-center gap-1",
725
716
  children: [
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"),
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"),
728
719
  e.storage.sizeGi && ` ${e.storage.sizeGi}Gi`
729
720
  ]
730
721
  })] }),
731
- e.containers?.length > 0 && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("span", {
722
+ e.containers?.length > 0 && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
732
723
  className: "text-muted-foreground/40",
733
724
  children: "|"
734
- }), /* @__PURE__ */ y("span", {
725
+ }), /* @__PURE__ */ x("span", {
735
726
  className: "inline-flex items-center gap-1",
736
- 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 })]
737
728
  })] }),
738
- e.expiresAt && e.status === "RUNNING" && /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v("span", {
729
+ e.expiresAt && e.status === "RUNNING" && /* @__PURE__ */ x(y, { children: [/* @__PURE__ */ b("span", {
739
730
  className: "text-muted-foreground/40",
740
731
  children: "|"
741
- }), /* @__PURE__ */ v(le, {
732
+ }), /* @__PURE__ */ b(ce, {
742
733
  compact: !0,
743
734
  expiresAt: e.expiresAt
744
735
  })] }),
745
- /* @__PURE__ */ v("span", {
736
+ /* @__PURE__ */ b("span", {
746
737
  className: "text-muted-foreground/40",
747
738
  children: "|"
748
739
  }),
749
- /* @__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) }) })
750
741
  ]
751
742
  }),
752
- e.errorMessage && /* @__PURE__ */ y("div", {
743
+ e.errorMessage && /* @__PURE__ */ x("div", {
753
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",
754
- children: [/* @__PURE__ */ v(Ee, {
745
+ children: [/* @__PURE__ */ b(we, {
755
746
  size: 12,
756
747
  className: "flex-shrink-0 mt-0.5"
757
- }), /* @__PURE__ */ v("span", {
748
+ }), /* @__PURE__ */ b("span", {
758
749
  className: "line-clamp-1",
759
750
  children: e.errorMessage
760
751
  })]
@@ -767,71 +758,71 @@ function T() {
767
758
  }, e.id);
768
759
  })
769
760
  }),
770
- U > 1 && /* @__PURE__ */ v(i, {
761
+ G > 1 && /* @__PURE__ */ b(i, {
771
762
  className: "animate-in fade-in-0 duration-300",
772
- children: /* @__PURE__ */ y(a, {
763
+ children: /* @__PURE__ */ x(a, {
773
764
  className: "p-4 flex flex-col sm:flex-row items-center justify-between gap-3",
774
- children: [/* @__PURE__ */ v("p", {
765
+ children: [/* @__PURE__ */ b("p", {
775
766
  className: "text-sm text-muted-foreground",
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
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
780
771
  })
781
- }), /* @__PURE__ */ y("div", {
772
+ }), /* @__PURE__ */ x("div", {
782
773
  className: "flex items-center gap-2",
783
774
  children: [
784
- /* @__PURE__ */ v(r, {
775
+ /* @__PURE__ */ b(r, {
785
776
  variant: "outline",
786
777
  size: "icon",
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 })
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 })
791
782
  }),
792
- /* @__PURE__ */ v(n, {
783
+ /* @__PURE__ */ b(n, {
793
784
  variant: "secondary",
794
785
  className: "px-4 py-2 text-sm",
795
- children: u(E, "sandbox.list.pagination.pageOf", "Page {current} of {total}", {
796
- current: O,
797
- total: U
786
+ children: u(k, "sandbox.list.pagination.pageOf", "Page {current} of {total}", {
787
+ current: j,
788
+ total: G
798
789
  })
799
790
  }),
800
- /* @__PURE__ */ v(r, {
791
+ /* @__PURE__ */ b(r, {
801
792
  variant: "outline",
802
793
  size: "icon",
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 })
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 })
807
798
  })
808
799
  ]
809
800
  })]
810
801
  })
811
802
  })
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, {
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, {
817
808
  variant: "outline",
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")]
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")]
823
814
  })
824
815
  })
825
816
  }),
826
- /* @__PURE__ */ v(ge, {
827
- workspaceId: L ?? "",
828
- open: nt,
829
- onClose: () => rt(!1)
817
+ /* @__PURE__ */ b(me, {
818
+ workspaceId: z ?? "",
819
+ open: Je,
820
+ onClose: () => Ye(!1)
830
821
  })
831
822
  ]
832
823
  });
833
824
  }
834
825
  //#endregion
835
- export { T as SandboxListPage };
826
+ export { O as SandboxListPage };
836
827
 
837
828
  //# sourceMappingURL=SandboxListPage.js.map