@burdenoff/microfe-vibecontrols 2026.1117.2 → 2026.1123.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.
@@ -6,27 +6,28 @@ import { PageSkeleton as i } from "../components/shared/PageSkeleton.js";
6
6
  import { PageHeader as a } from "../components/shared/PageHeader.js";
7
7
  import { ErrorState as ee } from "../components/shared/ErrorState.js";
8
8
  import { useVibeControlsStore as te } from "../store/vibeControlsStore.js";
9
- import "../components/shared/index.js";
10
- import { EmptyState as ne } from "../components/shared/EmptyState.js";
11
- import { StatusBadge as re } from "../components/shared/StatusBadge.js";
9
+ import { getSafeTunnelIframeUrl as ne } from "../utils/iframeUrl.js";
10
+ import { EmptyState as re } from "../components/shared/EmptyState.js";
11
+ import { StatusBadge as ie } from "../components/shared/StatusBadge.js";
12
12
  import { Card as o } from "../components/shared/Card.js";
13
- import { BILLING_PLANS_ROUTE as ie, useVibeControls as ae, useVibeNavigate as oe } from "../providers/VibeControlsProvider.js";
14
- import { useCollaboratorJoinedSubscription as se, useCollaboratorLeftSubscription as ce, useGetSessionQuery as le, useJoinSharedSessionMutation as ue, useMintAgentCapabilityMutation as de, useReleaseSessionControlMutation as fe, useRequestSessionControlMutation as pe, useRestartSessionMutation as me, useRestartSessionTerminalMutation as he, useSessionControlChangedSubscription as ge, useStartSessionMutation as _e, useStartSessionTerminalMutation as ve, useStopSessionMutation as ye, useUpdateSessionMutation as be } from "../generated/wspace-operations.js";
15
- import { AgentCapabilityScope as xe, CollaboratorRole as Se, SessionSharePermission as Ce } from "../generated/wspace-types.js";
16
- import { SharedTerminalPanel as we } from "../components/sessions/SharedTerminalPanel.js";
17
- import { SessionPublicLinkPanel as Te } from "../components/sessions/SessionPublicLinkPanel.js";
18
- import { SessionWorkbenchDrawer as Ee } from "../components/sessions/SessionWorkbenchDrawer.js";
19
- import { getQuotaDialogContent as De, isQuotaExhaustedError as s, markQuotaHandledLocally as c } from "../utils/quotaUtils.js";
13
+ import "../components/shared/index.js";
14
+ import { BILLING_PLANS_ROUTE as ae, useVibeControls as oe, useVibeNavigate as se } from "../providers/VibeControlsProvider.js";
15
+ import { useCollaboratorJoinedSubscription as ce, useCollaboratorLeftSubscription as le, useGetSessionQuery as ue, useJoinSharedSessionMutation as de, useMintAgentCapabilityMutation as fe, useReleaseSessionControlMutation as pe, useRequestSessionControlMutation as me, useRestartSessionMutation as he, useRestartSessionTerminalMutation as ge, useSessionControlChangedSubscription as _e, useStartSessionMutation as ve, useStartSessionTerminalMutation as ye, useStopSessionMutation as be, useUpdateSessionMutation as xe } from "../generated/wspace-operations.js";
16
+ import { AgentCapabilityScope as Se, CollaboratorRole as Ce, SessionSharePermission as we } from "../generated/wspace-types.js";
17
+ import { SharedTerminalPanel as Te } from "../components/sessions/SharedTerminalPanel.js";
18
+ import { SessionPublicLinkPanel as Ee } from "../components/sessions/SessionPublicLinkPanel.js";
19
+ import { SessionWorkbenchDrawer as De } from "../components/sessions/SessionWorkbenchDrawer.js";
20
+ import { getQuotaDialogContent as Oe, isQuotaExhaustedError as s, markQuotaHandledLocally as c } from "../utils/quotaUtils.js";
20
21
  import { useCallback as l, useEffect as u, useRef as d, useState as f } from "react";
21
- import { useI18n as Oe } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
22
- import { AlertCircle as p, ArrowLeft as m, Check as ke, ChevronDown as Ae, ChevronUp as je, Clock as Me, Code as Ne, ExternalLink as Pe, Folder as Fe, Hash as Ie, Link2 as Le, Loader2 as h, Maximize2 as Re, Minimize2 as ze, PanelRightOpen as Be, Pencil as Ve, Play as He, RefreshCw as Ue, RotateCcw as We, Server as Ge, Square as Ke, Tag as qe, Terminal as g, Variable as Je, X as Ye, Zap as Xe } from "lucide-react";
23
- import { useParams as Ze } from "react-router";
24
- import { usePermissions as Qe } from "@burdenoff/fe-libs/shared/providers/shell";
25
- import { Fragment as _, jsx as v, jsxs as y } from "react/jsx-runtime";
26
- import { PagePurpose as $e } from "@burdenoff/fe-libs/ui";
27
- import { MotionItem as b, MotionList as et, MotionPage as x } from "@burdenoff/fe-libs/shared/motion";
22
+ import { useI18n as ke } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
23
+ import { AlertCircle as Ae, ArrowLeft as p, Check as je, ChevronDown as Me, ChevronUp as Ne, Clock as Pe, Code as Fe, ExternalLink as Ie, Folder as Le, Hash as Re, Link2 as ze, Loader2 as m, Maximize2 as Be, Minimize2 as Ve, PanelRightOpen as He, Pencil as Ue, Play as We, RefreshCw as Ge, RotateCcw as Ke, Server as qe, Square as Je, Tag as Ye, Terminal as h, Variable as Xe, X as Ze, Zap as Qe } from "lucide-react";
24
+ import { useParams as $e } from "react-router";
25
+ import { usePermissions as et } from "@burdenoff/fe-libs/shared/providers/shell";
26
+ import { Fragment as g, jsx as _, jsxs as v } from "react/jsx-runtime";
27
+ import { PagePurpose as tt } from "@burdenoff/fe-libs/ui";
28
+ import { MotionItem as y, MotionList as nt, MotionPage as b } from "@burdenoff/fe-libs/shared/motion";
28
29
  // src/pages/SessionDetailsPage.tsx
29
- function tt(e) {
30
+ function rt(e) {
30
31
  let t = e.ttydUrl;
31
32
  if (!t) return null;
32
33
  try {
@@ -36,121 +37,121 @@ function tt(e) {
36
37
  return t;
37
38
  }
38
39
  }
39
- var nt = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
40
- function rt(e) {
40
+ var it = (e) => e.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
41
+ function at(e) {
41
42
  if (!e) return "Never";
42
43
  let t = Date.now() - new Date(e).getTime();
43
44
  return t < 6e4 ? "Just now" : t < 36e5 ? `${Math.floor(t / 6e4)}m ago` : t < 864e5 ? `${Math.floor(t / 36e5)}h ago` : new Date(e).toLocaleDateString();
44
45
  }
45
- function S() {
46
- let { t: S } = Oe(), C = l((e, t, n) => {
47
- let r = S(e, n);
48
- return r === e ? n ? Object.entries(n).reduce((e, [t, n]) => e.replace(RegExp(`\\{\\{${nt(t)}\\}\\}`, "g"), () => String(n)), t) : t : r;
49
- }, [S]), { id: w } = Ze(), { basePath: it, currentUser: at } = ae(), ot = it || "", T = at?.id ?? "", E = oe(), { hasPermission: st, isLoading: ct, permissions: lt } = Qe(), [ut] = _e({ refetchQueries: ["GetSession"] }), [dt] = ye({ refetchQueries: ["GetSession"] }), [ft] = me({ refetchQueries: ["GetSession"] }), [pt] = ve({ refetchQueries: ["GetSession"] }), [mt] = he({ refetchQueries: ["GetSession"] }), [ht] = be({ refetchQueries: ["GetSession"] }), [gt, _t] = f(!1), [vt, yt] = f(""), [bt, xt] = f(""), [D, St] = f(!1), Ct = () => {
50
- yt(A?.command || ""), xt(A?.workingDirectory || ""), _t(!0);
51
- }, wt = async () => {
52
- if (A?.id) {
53
- St(!0);
46
+ function x() {
47
+ let { t: x } = ke(), S = l((e, t, n) => {
48
+ let r = x(e, n);
49
+ return r === e ? n ? Object.entries(n).reduce((e, [t, n]) => e.replace(RegExp(`\\{\\{${it(t)}\\}\\}`, "g"), () => String(n)), t) : t : r;
50
+ }, [x]), { id: C } = $e(), { basePath: ot, currentUser: st } = oe(), ct = ot || "", w = st?.id ?? "", T = se(), { hasPermission: lt, isLoading: ut, permissions: dt } = et(), [ft] = ve({ refetchQueries: ["GetSession"] }), [pt] = be({ refetchQueries: ["GetSession"] }), [mt] = he({ refetchQueries: ["GetSession"] }), [ht] = ye({ refetchQueries: ["GetSession"] }), [gt] = ge({ refetchQueries: ["GetSession"] }), [_t] = xe({ refetchQueries: ["GetSession"] }), [vt, yt] = f(!1), [bt, xt] = f(""), [St, Ct] = f(""), [wt, Tt] = f(!1), Et = () => {
51
+ xt(O?.command || ""), Ct(O?.workingDirectory || ""), yt(!0);
52
+ }, Dt = async () => {
53
+ if (O?.id) {
54
+ Tt(!0);
54
55
  try {
55
- await ht({ variables: {
56
- id: A.id,
56
+ await _t({ variables: {
57
+ id: O.id,
57
58
  input: {
58
- command: vt || null,
59
- workingDirectory: bt || null
59
+ command: bt || null,
60
+ workingDirectory: St || null
60
61
  }
61
- } }), _t(!1);
62
+ } }), yt(!1);
62
63
  } finally {
63
- St(!1);
64
+ Tt(!1);
64
65
  }
65
66
  }
66
- }, { data: Tt, loading: O, error: Et, refetch: k } = le({
67
- variables: { id: w || "" },
68
- skip: !w,
67
+ }, { data: Ot, loading: E, error: kt, refetch: D } = ue({
68
+ variables: { id: C || "" },
69
+ skip: !C,
69
70
  fetchPolicy: "cache-and-network"
70
- }), A = Tt?.session, j = A?.agent || null, M = A?.vibe || null;
71
+ }), O = Ot?.session, k = O?.agent || null, A = O?.vibe || null;
71
72
  u(() => {
72
- A && te.setState({
73
- activeAgentId: j?.id ?? null,
74
- selectedAgentId: j?.id ?? null,
75
- activeVibeId: M?.id ?? null,
76
- selectedVibeId: M?.id ?? null,
77
- activeSessionId: A.id,
78
- selectedSessionId: A.id
73
+ O && te.setState({
74
+ activeAgentId: k?.id ?? null,
75
+ selectedAgentId: k?.id ?? null,
76
+ activeVibeId: A?.id ?? null,
77
+ selectedVibeId: A?.id ?? null,
78
+ activeSessionId: O.id,
79
+ selectedSessionId: O.id
79
80
  });
80
81
  }, [
81
- A?.id,
82
- j?.id,
83
- M?.id
82
+ O?.id,
83
+ k?.id,
84
+ A?.id
84
85
  ]);
85
- let N = A?.context?.userId ?? null, Dt = !!N && !!T && N === T, Ot = A?.collaborators ?? [], P = Ot.find((e) => e.userId === T) ?? null, F = !!A && !Dt && (!!N || !!A?.myGrantRole || !!P), [kt] = ue(), [At, { loading: jt }] = pe(), [Mt, { loading: Nt }] = fe(), I = d(null);
86
+ let j = O?.context?.userId ?? null, At = !!j && !!w && j === w, jt = O?.collaborators ?? [], M = jt.find((e) => e.userId === w) ?? null, N = !!O && !At && (!!j || !!O?.myGrantRole || !!M), [Mt] = de(), [Nt, { loading: Pt }] = me(), [Ft, { loading: It }] = pe(), Lt = d(null);
86
87
  u(() => {
87
- let e = A?.id;
88
- e && F && !P && I.current !== e && (I.current = e, kt({ variables: { input: { sessionId: e } } }).then(() => {
89
- k();
88
+ let e = O?.id;
89
+ e && N && !M && Lt.current !== e && (Lt.current = e, Mt({ variables: { input: { sessionId: e } } }).then(() => {
90
+ D();
90
91
  }).catch((e) => {
91
- I.current = null, console.warn("[sessionDetails] joinSharedSession(sessionId) failed", e);
92
+ Lt.current = null, console.warn("[sessionDetails] joinSharedSession(sessionId) failed", e);
92
93
  }));
93
94
  }, [
94
- A?.id,
95
- F,
96
- P,
97
- kt,
98
- k
95
+ O?.id,
96
+ N,
97
+ M,
98
+ Mt,
99
+ D
99
100
  ]);
100
- let { data: Pt } = se({
101
- variables: { sessionId: A?.id ?? "" },
102
- skip: !A?.id || !F
103
- }), { data: Ft } = ce({
104
- variables: { sessionId: A?.id ?? "" },
105
- skip: !A?.id || !F
106
- }), { data: It } = ge({
107
- variables: { sessionId: A?.id ?? "" },
108
- skip: !A?.id || !F
101
+ let { data: Rt } = ce({
102
+ variables: { sessionId: O?.id ?? "" },
103
+ skip: !O?.id || !N
104
+ }), { data: zt } = le({
105
+ variables: { sessionId: O?.id ?? "" },
106
+ skip: !O?.id || !N
107
+ }), { data: Bt } = _e({
108
+ variables: { sessionId: O?.id ?? "" },
109
+ skip: !O?.id || !N
109
110
  });
110
111
  u(() => {
111
- (Pt || Ft || It) && k();
112
+ (Rt || zt || Bt) && D();
112
113
  }, [
113
- Pt,
114
- Ft,
115
- It,
116
- k
114
+ Rt,
115
+ zt,
116
+ Bt,
117
+ D
117
118
  ]);
118
- let Lt = P?.role === Se.Viewer ? Ce.View : Ce.Interact, Rt = l(async () => {
119
- if (A?.id) try {
120
- await At({ variables: { sessionId: A.id } }), await k();
119
+ let Vt = M?.role === Ce.Viewer ? we.View : we.Interact, Ht = l(async () => {
120
+ if (O?.id) try {
121
+ await Nt({ variables: { sessionId: O.id } }), await D();
121
122
  } catch (e) {
122
123
  console.error("Failed to request control:", e);
123
124
  }
124
125
  }, [
125
- A?.id,
126
- At,
127
- k
128
- ]), zt = l(async () => {
129
- if (A?.id) try {
130
- await Mt({ variables: { sessionId: A.id } }), await k();
126
+ O?.id,
127
+ Nt,
128
+ D
129
+ ]), Ut = l(async () => {
130
+ if (O?.id) try {
131
+ await Ft({ variables: { sessionId: O.id } }), await D();
131
132
  } catch (e) {
132
133
  console.error("Failed to release control:", e);
133
134
  }
134
135
  }, [
135
- A?.id,
136
- Mt,
137
- k
138
- ]), [Bt, L] = f(!1);
136
+ O?.id,
137
+ Ft,
138
+ D
139
+ ]), [Wt, P] = f(!1);
139
140
  u(() => {
140
141
  let e = (e) => {
141
- (e.metaKey || e.ctrlKey) && (e.key === "j" || e.key === "J") ? (e.preventDefault(), L((e) => !e)) : e.key === "Escape" && L(!1);
142
+ (e.metaKey || e.ctrlKey) && (e.key === "j" || e.key === "J") ? (e.preventDefault(), P((e) => !e)) : e.key === "Escape" && P(!1);
142
143
  };
143
144
  return window.addEventListener("keydown", e), () => window.removeEventListener("keydown", e);
144
145
  }, []);
145
- let [R, z] = f(!0), [B, Vt] = f(!1), [V, Ht] = f(!1), [Ut, H] = f(null), [Wt, U] = f(!1), [Gt, Kt] = f(!1), [qt, Jt] = f(!1), [Yt, W] = f(null), G = d(null), Xt = d(null), Zt = d(!1), Qt = d(!1), K = A ? tt(A) : null, [$t] = de(), [en, q] = f(null), [tn, J] = f(null), [nn, rn] = f(!1), [an, on] = f(0), sn = l(() => on((e) => e + 1), []), Y = j?.id ?? null, cn = A?.id ?? null;
146
+ let [F, I] = f(!0), [L, Gt] = f(!1), [R, Kt] = f(!1), [qt, z] = f(null), [Jt, B] = f(!1), [Yt, V] = f(!1), [Xt, Zt] = f(!1), [H, U] = f(null), W = d(null), Qt = d(null), $t = d(!1), G = d(!1), K = O ? rt(O) : null, [en] = fe(), [tn, q] = f(null), [nn, J] = f(null), [rn, an] = f(!1), [on, sn] = f(0), cn = l(() => sn((e) => e + 1), []), ln = k?.id ?? null, Y = O?.id ?? null;
146
147
  u(() => {
147
148
  let e = !1;
148
- if (!K || !Y || !cn) q(null), J(null);
149
- else return rn(!0), J(null), $t({ variables: {
150
- agentId: Y,
149
+ if (!K || !ln || !Y) q(null), J(null);
150
+ else return an(!0), J(null), en({ variables: {
151
+ agentId: ln,
151
152
  profile: "default",
152
- scope: xe.TerminalSession,
153
- resourceId: cn,
153
+ scope: Se.TerminalSession,
154
+ resourceId: Y,
154
155
  ttlSeconds: 60
155
156
  } }).then((t) => {
156
157
  if (e) return;
@@ -159,433 +160,433 @@ function S() {
159
160
  }).catch((t) => {
160
161
  e || (J(t instanceof Error ? t.message : "Failed to mint terminal capability"), q(null));
161
162
  }).finally(() => {
162
- e || rn(!1);
163
+ e || an(!1);
163
164
  }), () => {
164
165
  e = !0;
165
166
  };
166
167
  }, [
167
168
  K,
169
+ ln,
168
170
  Y,
169
- cn,
170
- an,
171
- $t
171
+ on,
172
+ en
172
173
  ]);
173
- let X = K && en ? `${K}#vt=${encodeURIComponent(en)}` : null, Z = () => {
174
- E("/sessions");
175
- }, ln = async () => {
176
- if (A?.id) try {
177
- await ut({ variables: { id: A.id } });
174
+ let X = K && tn ? ne(`${K}#vt=${encodeURIComponent(tn)}`) : null, Z = () => {
175
+ T("/sessions");
176
+ }, un = async () => {
177
+ if (O?.id) try {
178
+ await ft({ variables: { id: O.id } });
178
179
  } catch (e) {
179
180
  if (s(e)) {
180
- c(), U(!0);
181
+ c(), B(!0);
181
182
  return;
182
183
  }
183
184
  console.error("Failed to start session:", e);
184
185
  }
185
- }, un = async () => {
186
- if (A?.id) try {
187
- await dt({ variables: { id: A.id } });
186
+ }, dn = async () => {
187
+ if (O?.id) try {
188
+ await pt({ variables: { id: O.id } });
188
189
  } catch (e) {
189
190
  console.error("Failed to stop session:", e);
190
191
  }
191
- }, dn = async () => {
192
- if (A?.id) try {
193
- await ft({ variables: { id: A.id } });
192
+ }, fn = async () => {
193
+ if (O?.id) try {
194
+ await mt({ variables: { id: O.id } });
194
195
  } catch (e) {
195
196
  if (s(e)) {
196
- c(), U(!0);
197
+ c(), B(!0);
197
198
  return;
198
199
  }
199
200
  console.error("Failed to restart session:", e);
200
201
  }
201
202
  }, Q = l(() => {
202
203
  requestAnimationFrame(() => {
203
- Xt.current?.scrollIntoView({
204
+ Qt.current?.scrollIntoView({
204
205
  behavior: "smooth",
205
206
  block: "end"
206
207
  });
207
208
  });
208
209
  }, []), $ = l(async (e, t, n) => {
209
- let r = A?.id;
210
+ let r = O?.id;
210
211
  if (!r) return;
211
- Ht(!0), H(null);
212
+ Kt(!0), z(null);
212
213
  let i = !1;
213
214
  try {
214
215
  let a = await e(r);
215
- a.error && s(a.error) ? (c(), U(!0)) : a.error ? H(a.error.message) : !a.data || !a.data[t] ? H(n) : (z(!0), i = !0);
216
+ a.error && s(a.error) ? (c(), B(!0)) : a.error ? z(a.error.message) : !a.data || !a.data[t] ? z(n) : (I(!0), i = !0);
216
217
  } catch (e) {
217
218
  if (s(e)) {
218
- c(), U(!0);
219
+ c(), B(!0);
219
220
  return;
220
221
  }
221
222
  let t = e instanceof Error ? e.message : n;
222
- H(t);
223
+ z(t);
223
224
  } finally {
224
- Ht(!1), i && Q();
225
+ Kt(!1), i && Q();
225
226
  }
226
- }, [A?.id, Q]), fn = l(() => $((e) => pt({ variables: { id: e } }), "startSessionTerminal", "Failed to start terminal"), [pt, $]), pn = l(() => $((e) => mt({ variables: { id: e } }), "restartSessionTerminal", "Failed to restart terminal"), [mt, $]);
227
+ }, [O?.id, Q]), pn = l(() => $((e) => ht({ variables: { id: e } }), "startSessionTerminal", "Failed to start terminal"), [ht, $]), mn = l(() => $((e) => gt({ variables: { id: e } }), "restartSessionTerminal", "Failed to restart terminal"), [gt, $]);
227
228
  u(() => {
228
- if (!Zt.current) {
229
- Zt.current = !0, Qt.current = R;
229
+ if (!$t.current) {
230
+ $t.current = !0, G.current = F;
230
231
  return;
231
232
  }
232
- let e = R && !Qt.current;
233
- Qt.current = R, e && Q();
234
- }, [R, Q]);
235
- let mn = A?.id ?? null, hn = d(null);
233
+ let e = F && !G.current;
234
+ G.current = F, e && Q();
235
+ }, [F, Q]);
236
+ let hn = O?.id ?? null, gn = d(null);
236
237
  u(() => {
237
- let e = A?.status ?? null, t = A?.exitCode ?? null;
238
- if (mn !== hn.current) {
239
- hn.current = mn, G.current = e, W(null);
238
+ let e = O?.status ?? null, t = O?.exitCode ?? null;
239
+ if (hn !== gn.current) {
240
+ gn.current = hn, W.current = e, U(null);
240
241
  return;
241
242
  }
242
243
  if (e === "RUNNING" || e === "STARTING") {
243
- W(null), G.current = e;
244
+ U(null), W.current = e;
244
245
  return;
245
246
  }
246
- let n = G.current;
247
- e === "STOPPED" && (n === "RUNNING" || n === "STARTING") && R ? W({ exitCode: t }) : e === "STOPPED" && R && t !== null && W((e) => e && e.exitCode === null ? { exitCode: t } : e), G.current = e;
247
+ let n = W.current;
248
+ e === "STOPPED" && (n === "RUNNING" || n === "STARTING") && F ? U({ exitCode: t }) : e === "STOPPED" && F && t !== null && U((e) => e && e.exitCode === null ? { exitCode: t } : e), W.current = e;
248
249
  }, [
249
- mn,
250
- A?.status,
251
- A?.exitCode,
252
- R
250
+ hn,
251
+ O?.status,
252
+ O?.exitCode,
253
+ F
253
254
  ]);
254
- let gn = l(() => {
255
- X && window.open(X, "_blank");
255
+ let _n = l(() => {
256
+ X && window.open(X, "_blank", "noopener,noreferrer");
256
257
  }, [X]);
257
- if (ct) return /* @__PURE__ */ v("div", {
258
+ if (ut) return /* @__PURE__ */ _("div", {
258
259
  className: "flex items-center justify-center min-h-[400px]",
259
- children: /* @__PURE__ */ v("p", {
260
+ children: /* @__PURE__ */ _("p", {
260
261
  className: "text-text-secondary",
261
- children: C("sessionDetails.loadingPermissions", "Loading permissions...")
262
+ children: S("sessionDetails.loadingPermissions", "Loading permissions...")
262
263
  })
263
264
  });
264
- if (lt && (lt.permissionStrings?.length ?? 0) > 0 && !st(e.SESSION_READ)) return /* @__PURE__ */ v("div", {
265
+ if (dt && (dt.permissionStrings?.length ?? 0) > 0 && !lt(e.SESSION_READ)) return /* @__PURE__ */ _("div", {
265
266
  className: "flex items-center justify-center min-h-[400px] px-4",
266
- children: /* @__PURE__ */ y("div", {
267
+ children: /* @__PURE__ */ v("div", {
267
268
  className: "text-center space-y-2 max-w-sm",
268
- children: [/* @__PURE__ */ v("h2", {
269
+ children: [/* @__PURE__ */ _("h2", {
269
270
  className: "text-lg font-semibold tracking-tight text-text-primary",
270
- children: C("sessionDetails.accessDenied", "Access Denied")
271
- }), /* @__PURE__ */ v("p", {
271
+ children: S("sessionDetails.accessDenied", "Access Denied")
272
+ }), /* @__PURE__ */ _("p", {
272
273
  className: "text-sm text-text-secondary",
273
- children: C("sessionDetails.accessDeniedDesc", "You don't have permission to access this page.")
274
+ children: S("sessionDetails.accessDeniedDesc", "You don't have permission to access this page.")
274
275
  })]
275
276
  })
276
277
  });
277
- let _n = () => {
278
- j && E(`/agents/${j.id}`);
279
- }, vn = () => {
280
- M && E(`/vibes/${M.id}`);
278
+ let vn = () => {
279
+ k && T(`/agents/${k.id}`);
280
+ }, yn = () => {
281
+ A && T(`/vibes/${A.id}`);
281
282
  };
282
- if (O && !A) return /* @__PURE__ */ y(x, {
283
+ if (E && !O) return /* @__PURE__ */ v(b, {
283
284
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
284
- children: [/* @__PURE__ */ y("button", {
285
+ children: [/* @__PURE__ */ v("button", {
285
286
  type: "button",
286
287
  onClick: Z,
287
288
  className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
288
- children: [/* @__PURE__ */ v(m, { className: "size-4" }), C("sessionDetails.backToSessions", "Back to Sessions")]
289
- }), /* @__PURE__ */ v(i, { variant: "detail" })]
289
+ children: [/* @__PURE__ */ _(p, { className: "size-4" }), S("sessionDetails.backToSessions", "Back to Sessions")]
290
+ }), /* @__PURE__ */ _(i, { variant: "detail" })]
290
291
  });
291
- if (Et && !A) return /* @__PURE__ */ y(x, {
292
+ if (kt && !O) return /* @__PURE__ */ v(b, {
292
293
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
293
- children: [/* @__PURE__ */ y("button", {
294
+ children: [/* @__PURE__ */ v("button", {
294
295
  type: "button",
295
296
  onClick: Z,
296
297
  className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
297
- children: [/* @__PURE__ */ v(m, { className: "size-4" }), "Back to Sessions"]
298
- }), /* @__PURE__ */ v(ee, {
299
- title: C("sessionDetails.failedLoad", "Failed to load session"),
300
- message: Et.message,
301
- onRetry: () => k()
298
+ children: [/* @__PURE__ */ _(p, { className: "size-4" }), "Back to Sessions"]
299
+ }), /* @__PURE__ */ _(ee, {
300
+ title: S("sessionDetails.failedLoad", "Failed to load session"),
301
+ message: kt.message,
302
+ onRetry: () => D()
302
303
  })]
303
304
  });
304
- if (!A) return /* @__PURE__ */ y(x, {
305
+ if (!O) return /* @__PURE__ */ v(b, {
305
306
  className: "space-y-6 p-4 sm:p-6 bg-bg-surface min-h-screen",
306
- children: [/* @__PURE__ */ y("button", {
307
+ children: [/* @__PURE__ */ v("button", {
307
308
  type: "button",
308
309
  onClick: Z,
309
310
  className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
310
- children: [/* @__PURE__ */ v(m, { className: "size-4" }), "Back to Sessions"]
311
- }), /* @__PURE__ */ v(ne, {
312
- icon: /* @__PURE__ */ v(g, { className: "size-8 text-text-secondary" }),
313
- title: C("sessionDetails.notFound", "Session not found"),
314
- description: `${C("sessionDetails.notFoundDescPrefix", "No session with ID")} "${w}" ${C("sessionDetails.notFoundDescSuffix", "exists")}`,
315
- action: /* @__PURE__ */ v("button", {
311
+ children: [/* @__PURE__ */ _(p, { className: "size-4" }), "Back to Sessions"]
312
+ }), /* @__PURE__ */ _(re, {
313
+ icon: /* @__PURE__ */ _(h, { className: "size-8 text-text-secondary" }),
314
+ title: S("sessionDetails.notFound", "Session not found"),
315
+ description: `${S("sessionDetails.notFoundDescPrefix", "No session with ID")} "${C}" ${S("sessionDetails.notFoundDescSuffix", "exists")}`,
316
+ action: /* @__PURE__ */ _("button", {
316
317
  type: "button",
317
318
  onClick: Z,
318
319
  className: "px-4 py-2 bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-all duration-200 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
319
- children: C("sessionDetails.backToSessions", "Back to Sessions")
320
+ children: S("sessionDetails.backToSessions", "Back to Sessions")
320
321
  })
321
322
  })]
322
323
  });
323
- let yn = A.status === "RUNNING", bn = B ? "h-[calc(100vh-200px)]" : "h-[280px] sm:h-[420px]";
324
- return /* @__PURE__ */ y(x, {
324
+ let bn = O.status === "RUNNING", xn = L ? "h-[calc(100vh-200px)]" : "h-[280px] sm:h-[420px]";
325
+ return /* @__PURE__ */ v(b, {
325
326
  className: "flex flex-col bg-bg-surface min-h-screen",
326
327
  children: [
327
- /* @__PURE__ */ y("div", {
328
- className: `flex-1 overflow-y-auto space-y-6 p-4 sm:p-6 ${R && X ? "pb-2" : ""}`,
328
+ /* @__PURE__ */ v("div", {
329
+ className: `flex-1 overflow-y-auto space-y-6 p-4 sm:p-6 ${F && X ? "pb-2" : ""}`,
329
330
  children: [
330
- /* @__PURE__ */ y("button", {
331
+ /* @__PURE__ */ v("button", {
331
332
  type: "button",
332
333
  onClick: Z,
333
334
  className: "flex items-center gap-2 text-text-secondary hover:text-text-primary transition-colors",
334
- children: [/* @__PURE__ */ v(m, { className: "size-4" }), "Back to Sessions"]
335
+ children: [/* @__PURE__ */ _(p, { className: "size-4" }), "Back to Sessions"]
335
336
  }),
336
- /* @__PURE__ */ v(a, {
337
- title: A.name,
338
- description: A.command || "No command specified",
337
+ /* @__PURE__ */ _(a, {
338
+ title: O.name,
339
+ description: O.command || "No command specified",
339
340
  breadcrumb: [{
340
341
  label: "Sessions",
341
- path: ot ? `${ot}/sessions` : "/sessions"
342
- }, { label: A.name }],
343
- actions: /* @__PURE__ */ y("div", {
342
+ path: ct ? `${ct}/sessions` : "/sessions"
343
+ }, { label: O.name }],
344
+ actions: /* @__PURE__ */ v("div", {
344
345
  className: "flex items-center gap-2 flex-wrap",
345
346
  children: [
346
- /* @__PURE__ */ v("button", {
347
+ /* @__PURE__ */ _("button", {
347
348
  type: "button",
348
- onClick: () => k(),
349
- disabled: O,
349
+ onClick: () => D(),
350
+ disabled: E,
350
351
  className: "flex items-center gap-2 px-3 py-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors disabled:opacity-50",
351
352
  title: "Refresh",
352
- children: /* @__PURE__ */ v(Ue, { className: `size-4 ${O ? "animate-spin" : ""}` })
353
+ children: /* @__PURE__ */ _(Ge, { className: `size-4 ${E ? "animate-spin" : ""}` })
353
354
  }),
354
- /* @__PURE__ */ y("button", {
355
+ /* @__PURE__ */ v("button", {
355
356
  type: "button",
356
- onClick: () => Jt(!0),
357
+ onClick: () => Zt(!0),
357
358
  className: "flex items-center gap-2 px-3 py-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors",
358
- title: C("sessionDetails.publicLinkTitle", "Create an expiring share link (viewer or interactive, optional password)"),
359
- children: [/* @__PURE__ */ v(Le, { className: "size-4" }), /* @__PURE__ */ v("span", {
359
+ title: S("sessionDetails.publicLinkTitle", "Create an expiring share link (viewer or interactive, optional password)"),
360
+ children: [/* @__PURE__ */ _(ze, { className: "size-4" }), /* @__PURE__ */ _("span", {
360
361
  className: "hidden sm:inline",
361
- children: C("sessionDetails.publicLink", "Share link")
362
+ children: S("sessionDetails.publicLink", "Share link")
362
363
  })]
363
364
  }),
364
- /* @__PURE__ */ y("button", {
365
+ /* @__PURE__ */ v("button", {
365
366
  type: "button",
366
- onClick: () => L((e) => !e),
367
- className: `flex items-center gap-2 px-3 py-2 rounded-md transition-colors ${Bt ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover" : "bg-bg-sunken text-text-primary hover:bg-bg-sunken/80"}`,
368
- title: C("sessionDetails.workbenchTitle", "Notes, prompts & history for this session (Cmd/Ctrl+J)"),
369
- children: [/* @__PURE__ */ v(Be, { className: "size-4" }), C("sessionDetails.workbench", "Workbench")]
367
+ onClick: () => P((e) => !e),
368
+ className: `flex items-center gap-2 px-3 py-2 rounded-md transition-colors ${Wt ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover" : "bg-bg-sunken text-text-primary hover:bg-bg-sunken/80"}`,
369
+ title: S("sessionDetails.workbenchTitle", "Notes, prompts & history for this session (Cmd/Ctrl+J)"),
370
+ children: [/* @__PURE__ */ _(He, { className: "size-4" }), S("sessionDetails.workbench", "Workbench")]
370
371
  }),
371
- yn ? /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("button", {
372
+ bn ? /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("button", {
372
373
  type: "button",
373
- onClick: un,
374
+ onClick: dn,
374
375
  className: "flex items-center gap-2 px-3 py-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors",
375
- children: [/* @__PURE__ */ v(Ke, { className: "size-4" }), C("sessionDetails.stopCommand", "Stop Command")]
376
- }), /* @__PURE__ */ y("button", {
376
+ children: [/* @__PURE__ */ _(Je, { className: "size-4" }), S("sessionDetails.stopCommand", "Stop Command")]
377
+ }), /* @__PURE__ */ v("button", {
377
378
  type: "button",
378
- onClick: dn,
379
+ onClick: fn,
379
380
  className: "flex items-center gap-2 px-3 py-2 bg-bg-sunken text-text-primary rounded-md hover:bg-bg-sunken/80 transition-colors",
380
- children: [/* @__PURE__ */ v(We, { className: "size-4" }), C("sessionDetails.restartCommand", "Restart Command")]
381
- })] }) : /* @__PURE__ */ y("button", {
381
+ children: [/* @__PURE__ */ _(Ke, { className: "size-4" }), S("sessionDetails.restartCommand", "Restart Command")]
382
+ })] }) : /* @__PURE__ */ v("button", {
382
383
  type: "button",
383
- onClick: ln,
384
+ onClick: un,
384
385
  className: "flex items-center gap-2 px-3 py-2 bg-status-success-bg-subtle text-status-success-text border border-status-success-border rounded-button hover:bg-status-success-bg-subtle/80 transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
385
- children: [/* @__PURE__ */ v(He, { className: "size-4" }), C("sessionDetails.runCommand", "Run Command")]
386
+ children: [/* @__PURE__ */ _(We, { className: "size-4" }), S("sessionDetails.runCommand", "Run Command")]
386
387
  }),
387
- X ? /* @__PURE__ */ y(_, { children: [
388
- /* @__PURE__ */ y("button", {
388
+ X ? /* @__PURE__ */ v(g, { children: [
389
+ /* @__PURE__ */ v("button", {
389
390
  type: "button",
390
- onClick: () => z((e) => !e),
391
- className: `flex items-center gap-2 px-3 py-2 rounded-md transition-colors ${R ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover" : "bg-bg-sunken text-text-primary hover:bg-bg-sunken/80"}`,
392
- title: R ? C("sessionDetails.hideTerminal", "Hide terminal") : C("sessionDetails.showTerminal", "Show terminal"),
393
- children: [/* @__PURE__ */ v(g, { className: "size-4" }), C("sessionDetails.terminal", "Terminal")]
391
+ onClick: () => I((e) => !e),
392
+ className: `flex items-center gap-2 px-3 py-2 rounded-md transition-colors ${F ? "bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bg-hover" : "bg-bg-sunken text-text-primary hover:bg-bg-sunken/80"}`,
393
+ title: F ? S("sessionDetails.hideTerminal", "Hide terminal") : S("sessionDetails.showTerminal", "Show terminal"),
394
+ children: [/* @__PURE__ */ _(h, { className: "size-4" }), S("sessionDetails.terminal", "Terminal")]
394
395
  }),
395
- /* @__PURE__ */ y("button", {
396
+ /* @__PURE__ */ v("button", {
396
397
  type: "button",
397
- onClick: () => Kt(!0),
398
- disabled: V,
398
+ onClick: () => V(!0),
399
+ disabled: R,
399
400
  className: "flex items-center gap-1.5 p-2 bg-bg-sunken text-text-secondary rounded-md hover:text-text-primary hover:bg-bg-sunken/80 transition-colors disabled:opacity-50",
400
- title: C("sessionDetails.restartTerminalTitle", "Restart terminal — kills the tmux session and re-runs the command"),
401
- children: [V ? /* @__PURE__ */ v(h, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ v(We, { className: "size-3.5" }), /* @__PURE__ */ v("span", {
401
+ title: S("sessionDetails.restartTerminalTitle", "Restart terminal — kills the tmux session and re-runs the command"),
402
+ children: [R ? /* @__PURE__ */ _(m, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ _(Ke, { className: "size-3.5" }), /* @__PURE__ */ _("span", {
402
403
  className: "text-xs",
403
- children: C("sessionDetails.restartTerminalShort", "Restart")
404
+ children: S("sessionDetails.restartTerminalShort", "Restart")
404
405
  })]
405
406
  }),
406
- /* @__PURE__ */ v("button", {
407
+ /* @__PURE__ */ _("button", {
407
408
  type: "button",
408
- onClick: gn,
409
+ onClick: _n,
409
410
  className: "flex items-center p-2 bg-bg-sunken text-text-secondary rounded-md hover:text-text-primary hover:bg-bg-sunken/80 transition-colors",
410
- title: C("sessionDetails.openInNewTab", "Open terminal in new tab"),
411
- children: /* @__PURE__ */ v(Pe, { className: "size-4" })
411
+ title: S("sessionDetails.openInNewTab", "Open terminal in new tab"),
412
+ children: /* @__PURE__ */ _(Ie, { className: "size-4" })
412
413
  })
413
- ] }) : /* @__PURE__ */ y("button", {
414
+ ] }) : /* @__PURE__ */ v("button", {
414
415
  type: "button",
415
- onClick: fn,
416
- disabled: V || !j,
416
+ onClick: pn,
417
+ disabled: R || !k,
417
418
  className: "flex items-center gap-2 px-3 py-2 bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-all duration-200 disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
418
- title: j ? j.tunnelUrl ? C("sessionDetails.openTerminal", "Open terminal") : C("sessionDetails.agentNoTunnelUrl", "Agent has no tunnel URL configured") : C("sessionDetails.noAgentAssigned", "No agent assigned"),
419
- children: [V ? /* @__PURE__ */ v(h, { className: "size-4 animate-spin" }) : /* @__PURE__ */ v(g, { className: "size-4" }), C("sessionDetails.openTerminal", "Open Terminal")]
419
+ title: k ? k.tunnelUrl ? S("sessionDetails.openTerminal", "Open terminal") : S("sessionDetails.agentNoTunnelUrl", "Agent has no tunnel URL configured") : S("sessionDetails.noAgentAssigned", "No agent assigned"),
420
+ children: [R ? /* @__PURE__ */ _(m, { className: "size-4 animate-spin" }) : /* @__PURE__ */ _(h, { className: "size-4" }), S("sessionDetails.openTerminal", "Open Terminal")]
420
421
  })
421
422
  ]
422
423
  })
423
424
  }),
424
- /* @__PURE__ */ v($e, {
425
- icon: /* @__PURE__ */ v(g, { className: "size-4" }),
426
- children: C("sessionDetails.purpose", "This is a single session — a live terminal or task running on an agent through a vibe. Open the terminal to interact with it, follow its output, share a read-only public link so others can watch, rename it, or stop it when the work is done. Everything you need to drive and review this one piece of running work is here.")
425
+ /* @__PURE__ */ _(tt, {
426
+ icon: /* @__PURE__ */ _(h, { className: "size-4" }),
427
+ children: S("sessionDetails.purpose", "This is a single session — a live terminal or task running on an agent through a vibe. Open the terminal to interact with it, follow its output, share a read-only public link so others can watch, rename it, or stop it when the work is done. Everything you need to drive and review this one piece of running work is here.")
427
428
  }),
428
- /* @__PURE__ */ y(et, {
429
+ /* @__PURE__ */ v(nt, {
429
430
  stagger: .04,
430
431
  className: "grid grid-cols-2 sm:grid-cols-4 gap-4",
431
432
  children: [
432
- /* @__PURE__ */ v(b, { children: /* @__PURE__ */ v(o, {
433
+ /* @__PURE__ */ _(y, { children: /* @__PURE__ */ _(o, {
433
434
  className: "p-4",
434
- children: /* @__PURE__ */ y("div", {
435
+ children: /* @__PURE__ */ v("div", {
435
436
  className: "flex items-center gap-3",
436
- children: [/* @__PURE__ */ v("div", {
437
+ children: [/* @__PURE__ */ _("div", {
437
438
  className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center",
438
- children: /* @__PURE__ */ v(g, { className: "size-5 text-action-primary-bg" })
439
- }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
439
+ children: /* @__PURE__ */ _(h, { className: "size-5 text-action-primary-bg" })
440
+ }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
440
441
  className: "text-sm text-text-secondary",
441
- children: C("sessionDetails.statusLabel", "Status")
442
- }), /* @__PURE__ */ v(re, {
443
- status: A.status,
442
+ children: S("sessionDetails.statusLabel", "Status")
443
+ }), /* @__PURE__ */ _(ie, {
444
+ status: O.status,
444
445
  size: "md"
445
446
  })] })]
446
447
  })
447
448
  }) }),
448
- /* @__PURE__ */ v(b, { children: /* @__PURE__ */ v(o, {
449
+ /* @__PURE__ */ _(y, { children: /* @__PURE__ */ _(o, {
449
450
  className: "p-4",
450
- children: /* @__PURE__ */ y("div", {
451
+ children: /* @__PURE__ */ v("div", {
451
452
  className: "flex items-center gap-3",
452
- children: [/* @__PURE__ */ v("div", {
453
+ children: [/* @__PURE__ */ _("div", {
453
454
  className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center",
454
- children: /* @__PURE__ */ v(Ne, { className: "size-5 text-action-primary-bg" })
455
- }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
455
+ children: /* @__PURE__ */ _(Fe, { className: "size-5 text-action-primary-bg" })
456
+ }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
456
457
  className: "text-sm text-text-secondary",
457
- children: C("sessionDetails.typeLabel", "Type")
458
- }), /* @__PURE__ */ v("p", {
458
+ children: S("sessionDetails.typeLabel", "Type")
459
+ }), /* @__PURE__ */ _("p", {
459
460
  className: "font-semibold text-text-primary",
460
- children: A.type
461
+ children: O.type
461
462
  })] })]
462
463
  })
463
464
  }) }),
464
- /* @__PURE__ */ v(b, { children: /* @__PURE__ */ v(o, {
465
+ /* @__PURE__ */ _(y, { children: /* @__PURE__ */ _(o, {
465
466
  className: "p-4",
466
- children: /* @__PURE__ */ y("div", {
467
+ children: /* @__PURE__ */ v("div", {
467
468
  className: "flex items-center gap-3",
468
- children: [/* @__PURE__ */ v("div", {
469
+ children: [/* @__PURE__ */ _("div", {
469
470
  className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center",
470
- children: /* @__PURE__ */ v(Ie, { className: "size-5 text-action-primary-bg" })
471
- }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
471
+ children: /* @__PURE__ */ _(Re, { className: "size-5 text-action-primary-bg" })
472
+ }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
472
473
  className: "text-sm text-text-secondary",
473
- children: C("sessionDetails.pidLabel", "PID")
474
- }), /* @__PURE__ */ v("p", {
474
+ children: S("sessionDetails.pidLabel", "PID")
475
+ }), /* @__PURE__ */ _("p", {
475
476
  className: "font-semibold text-text-primary",
476
- children: A.pid || "N/A"
477
+ children: O.pid || "N/A"
477
478
  })] })]
478
479
  })
479
480
  }) }),
480
- /* @__PURE__ */ v(b, { children: /* @__PURE__ */ v(o, {
481
+ /* @__PURE__ */ _(y, { children: /* @__PURE__ */ _(o, {
481
482
  className: "p-4",
482
- children: /* @__PURE__ */ y("div", {
483
+ children: /* @__PURE__ */ v("div", {
483
484
  className: "flex items-center gap-3",
484
- children: [/* @__PURE__ */ v("div", {
485
+ children: [/* @__PURE__ */ _("div", {
485
486
  className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center",
486
- children: /* @__PURE__ */ v(Ge, { className: "size-5 text-action-primary-bg" })
487
- }), /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
487
+ children: /* @__PURE__ */ _(qe, { className: "size-5 text-action-primary-bg" })
488
+ }), /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
488
489
  className: "text-sm text-text-secondary",
489
- children: C("sessionDetails.agentLabel", "Agent")
490
- }), /* @__PURE__ */ v("p", {
490
+ children: S("sessionDetails.agentLabel", "Agent")
491
+ }), /* @__PURE__ */ _("p", {
491
492
  className: "font-semibold text-text-primary truncate",
492
- children: j?.name || "Unknown"
493
+ children: k?.name || "Unknown"
493
494
  })] })]
494
495
  })
495
496
  }) })
496
497
  ]
497
498
  }),
498
- /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ y("div", {
499
+ /* @__PURE__ */ v(o, { children: [/* @__PURE__ */ v("div", {
499
500
  className: "p-4 border-b border-border-default flex items-center justify-between",
500
- children: [/* @__PURE__ */ y("h3", {
501
+ children: [/* @__PURE__ */ v("h3", {
501
502
  className: "font-semibold text-text-primary flex items-center gap-2",
502
- children: [/* @__PURE__ */ v(Ne, { className: "size-5" }), C("sessionDetails.commandTitle", "Command")]
503
- }), !gt && /* @__PURE__ */ v("button", {
503
+ children: [/* @__PURE__ */ _(Fe, { className: "size-5" }), S("sessionDetails.commandTitle", "Command")]
504
+ }), !vt && /* @__PURE__ */ _("button", {
504
505
  type: "button",
505
- onClick: Ct,
506
+ onClick: Et,
506
507
  className: "p-1.5 rounded text-text-secondary hover:text-text-primary hover:bg-bg-sunken transition-colors",
507
- title: C("sessionDetails.editCommandTitle", "Edit command and working directory"),
508
- children: /* @__PURE__ */ v(Ve, { className: "size-4" })
508
+ title: S("sessionDetails.editCommandTitle", "Edit command and working directory"),
509
+ children: /* @__PURE__ */ _(Ue, { className: "size-4" })
509
510
  })]
510
- }), /* @__PURE__ */ v("div", {
511
+ }), /* @__PURE__ */ _("div", {
511
512
  className: "p-4",
512
- children: gt ? /* @__PURE__ */ y("div", {
513
+ children: vt ? /* @__PURE__ */ v("div", {
513
514
  className: "space-y-3",
514
515
  children: [
515
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
516
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
516
517
  className: "block text-xs font-medium text-text-secondary mb-1",
517
- children: C("sessionDetails.commandLabel", "Command")
518
- }), /* @__PURE__ */ v("input", {
518
+ children: S("sessionDetails.commandLabel", "Command")
519
+ }), /* @__PURE__ */ _("input", {
519
520
  "aria-label": "control",
520
521
  type: "text",
521
- value: vt,
522
- onChange: (e) => yt(e.target.value),
523
- placeholder: C("sessionDetails.commandPlaceholder", "bun run dev"),
522
+ value: bt,
523
+ onChange: (e) => xt(e.target.value),
524
+ placeholder: S("sessionDetails.commandPlaceholder", "bun run dev"),
524
525
  className: "w-full px-3 py-2 text-sm bg-bg-sunken border border-border-subtle rounded-input text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-1 focus:ring-[var(--color-focus-ring)] focus:border-border-strong font-mono transition-colors"
525
526
  })] }),
526
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("label", {
527
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("label", {
527
528
  className: "block text-xs font-medium text-text-secondary mb-1",
528
- children: C("sessionDetails.workingDirLabel", "Working Directory")
529
- }), /* @__PURE__ */ v("input", {
529
+ children: S("sessionDetails.workingDirLabel", "Working Directory")
530
+ }), /* @__PURE__ */ _("input", {
530
531
  "aria-label": "control",
531
532
  type: "text",
532
- value: bt,
533
- onChange: (e) => xt(e.target.value),
534
- placeholder: C("sessionDetails.workingDirPlaceholder", "/home/user/myproject"),
533
+ value: St,
534
+ onChange: (e) => Ct(e.target.value),
535
+ placeholder: S("sessionDetails.workingDirPlaceholder", "/home/user/myproject"),
535
536
  className: "w-full px-3 py-2 text-sm bg-bg-sunken border border-border-subtle rounded-input text-text-primary placeholder:text-text-placeholder focus:outline-none focus:ring-1 focus:ring-[var(--color-focus-ring)] focus:border-border-strong font-mono transition-colors"
536
537
  })] }),
537
- /* @__PURE__ */ y("div", {
538
+ /* @__PURE__ */ v("div", {
538
539
  className: "flex items-center gap-2",
539
- children: [/* @__PURE__ */ y("button", {
540
+ children: [/* @__PURE__ */ v("button", {
540
541
  type: "button",
541
- onClick: wt,
542
- disabled: D,
542
+ onClick: Dt,
543
+ disabled: wt,
543
544
  className: "flex items-center gap-1.5 px-3 py-1.5 text-sm bg-action-primary-bg text-action-primary-text rounded-button hover:bg-action-primary-bgHover transition-all duration-200 disabled:opacity-50 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
544
- children: [D ? /* @__PURE__ */ v(h, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ v(ke, { className: "size-3.5" }), C("sessionDetails.save", "Save")]
545
- }), /* @__PURE__ */ y("button", {
545
+ children: [wt ? /* @__PURE__ */ _(m, { className: "size-3.5 animate-spin" }) : /* @__PURE__ */ _(je, { className: "size-3.5" }), S("sessionDetails.save", "Save")]
546
+ }), /* @__PURE__ */ v("button", {
546
547
  type: "button",
547
- onClick: () => _t(!1),
548
- disabled: D,
548
+ onClick: () => yt(!1),
549
+ disabled: wt,
549
550
  className: "flex items-center gap-1.5 px-3 py-1.5 text-sm bg-bg-sunken text-text-primary rounded-md hover:bg-bg-elevated transition-colors disabled:opacity-50",
550
- children: [/* @__PURE__ */ v(Ye, { className: "size-3.5" }), C("sessionDetails.cancel", "Cancel")]
551
+ children: [/* @__PURE__ */ _(Ze, { className: "size-3.5" }), S("sessionDetails.cancel", "Cancel")]
551
552
  })]
552
553
  })
553
554
  ]
554
- }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ y("div", {
555
+ }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ v("div", {
555
556
  className: "bg-bg-sunken rounded-md p-3 font-mono text-sm text-text-primary overflow-x-auto",
556
557
  children: [
557
558
  "$",
558
559
  " ",
559
- A.command || C("sessionDetails.noCommandSpecified", "No command specified")
560
+ O.command || S("sessionDetails.noCommandSpecified", "No command specified")
560
561
  ]
561
- }), /* @__PURE__ */ y("div", {
562
+ }), /* @__PURE__ */ v("div", {
562
563
  className: "mt-3 flex items-center gap-2 text-sm text-text-secondary",
563
564
  children: [
564
- /* @__PURE__ */ v(Fe, { className: "size-4" }),
565
- C("sessionDetails.workingDirectory", "Working Directory"),
565
+ /* @__PURE__ */ _(Le, { className: "size-4" }),
566
+ S("sessionDetails.workingDirectory", "Working Directory"),
566
567
  ":",
567
568
  " ",
568
- /* @__PURE__ */ v("span", {
569
+ /* @__PURE__ */ _("span", {
569
570
  className: "text-text-primary font-mono",
570
- children: A.workingDirectory || /* @__PURE__ */ v("em", {
571
+ children: O.workingDirectory || /* @__PURE__ */ _("em", {
571
572
  className: "not-italic text-text-placeholder",
572
- children: C("sessionDetails.workingDirDefault", "not set — defaults to OS home")
573
+ children: S("sessionDetails.workingDirDefault", "not set — defaults to OS home")
573
574
  })
574
575
  })
575
576
  ]
576
577
  })] })
577
578
  })] }),
578
- /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ v("div", {
579
+ /* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _("div", {
579
580
  className: "p-4 border-b border-border-default",
580
- children: /* @__PURE__ */ y("h3", {
581
+ children: /* @__PURE__ */ v("h3", {
581
582
  className: "font-semibold text-text-primary flex items-center gap-2",
582
- children: [/* @__PURE__ */ v(Je, { className: "size-5" }), C("sessionDetails.envVars", "Environment Variables")]
583
+ children: [/* @__PURE__ */ _(Xe, { className: "size-5" }), S("sessionDetails.envVars", "Environment Variables")]
583
584
  })
584
- }), /* @__PURE__ */ v("div", {
585
+ }), /* @__PURE__ */ _("div", {
585
586
  className: "p-4",
586
- children: A.environmentVariables && Object.keys(A.environmentVariables).length > 0 ? /* @__PURE__ */ v("div", {
587
+ children: O.environmentVariables && Object.keys(O.environmentVariables).length > 0 ? /* @__PURE__ */ _("div", {
587
588
  className: "flex flex-wrap gap-2",
588
- children: Object.entries(A.environmentVariables).map(([e, t]) => /* @__PURE__ */ y("span", {
589
+ children: Object.entries(O.environmentVariables).map(([e, t]) => /* @__PURE__ */ v("span", {
589
590
  className: "px-3 py-1 bg-bg-sunken text-text-primary text-sm rounded-full font-mono",
590
591
  children: [
591
592
  e,
@@ -593,313 +594,315 @@ function S() {
593
594
  String(t)
594
595
  ]
595
596
  }, e))
596
- }) : /* @__PURE__ */ v("p", {
597
+ }) : /* @__PURE__ */ _("p", {
597
598
  className: "text-text-secondary",
598
- children: C("sessionDetails.noEnvVars", "No environment variables configured")
599
+ children: S("sessionDetails.noEnvVars", "No environment variables configured")
599
600
  })
600
601
  })] }),
601
- /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ v("div", {
602
+ /* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _("div", {
602
603
  className: "p-4 border-b border-border-default",
603
- children: /* @__PURE__ */ y("h3", {
604
+ children: /* @__PURE__ */ v("h3", {
604
605
  className: "font-semibold text-text-primary flex items-center gap-2",
605
- children: [/* @__PURE__ */ v(g, { className: "size-5" }), C("sessionDetails.lastOutput", "Last Output")]
606
+ children: [/* @__PURE__ */ _(h, { className: "size-5" }), S("sessionDetails.lastOutput", "Last Output")]
606
607
  })
607
- }), /* @__PURE__ */ v("div", {
608
+ }), /* @__PURE__ */ _("div", {
608
609
  className: "p-4",
609
- children: A.lastOutput ? /* @__PURE__ */ v("div", {
610
+ children: O.lastOutput ? /* @__PURE__ */ _("div", {
610
611
  className: "bg-bg-sunken rounded-md p-3 font-mono text-sm text-text-primary overflow-x-auto whitespace-pre-wrap",
611
- children: A.lastOutput
612
- }) : /* @__PURE__ */ v("p", {
612
+ children: O.lastOutput
613
+ }) : /* @__PURE__ */ _("p", {
613
614
  className: "text-text-secondary",
614
- children: C("sessionDetails.noOutput", "No output captured")
615
+ children: S("sessionDetails.noOutput", "No output captured")
615
616
  })
616
617
  })] }),
617
- M && /* @__PURE__ */ v(o, {
618
- onClick: vn,
618
+ A && /* @__PURE__ */ _(o, {
619
+ onClick: yn,
619
620
  hoverable: !0,
620
- children: /* @__PURE__ */ y("div", {
621
+ children: /* @__PURE__ */ v("div", {
621
622
  className: "p-4 flex items-center justify-between",
622
- children: [/* @__PURE__ */ y("div", {
623
+ children: [/* @__PURE__ */ v("div", {
623
624
  className: "flex items-center gap-3",
624
- children: [/* @__PURE__ */ v("div", {
625
+ children: [/* @__PURE__ */ _("div", {
625
626
  className: "size-10 rounded-lg bg-bg-sunken flex items-center justify-center",
626
- children: /* @__PURE__ */ v(Xe, { className: "size-5 text-text-secondary" })
627
- }), /* @__PURE__ */ y("div", { children: [
628
- /* @__PURE__ */ v("p", {
627
+ children: /* @__PURE__ */ _(Qe, { className: "size-5 text-text-secondary" })
628
+ }), /* @__PURE__ */ v("div", { children: [
629
+ /* @__PURE__ */ _("p", {
629
630
  className: "text-sm text-text-secondary",
630
- children: C("sessionDetails.relatedVibe", "Related Vibe")
631
+ children: S("sessionDetails.relatedVibe", "Related Vibe")
631
632
  }),
632
- /* @__PURE__ */ v("p", {
633
+ /* @__PURE__ */ _("p", {
633
634
  className: "font-medium text-text-primary",
634
- children: M.name
635
+ children: A.name
635
636
  }),
636
- M.path && /* @__PURE__ */ v("p", {
637
+ A.path && /* @__PURE__ */ _("p", {
637
638
  className: "text-sm text-text-secondary truncate max-w-md",
638
- children: M.path
639
+ children: A.path
639
640
  })
640
641
  ] })]
641
- }), /* @__PURE__ */ v(re, { status: M.status })]
642
+ }), /* @__PURE__ */ _(ie, { status: A.status })]
642
643
  })
643
644
  }),
644
- j && /* @__PURE__ */ v(o, {
645
- onClick: _n,
645
+ k && /* @__PURE__ */ _(o, {
646
+ onClick: vn,
646
647
  hoverable: !0,
647
- children: /* @__PURE__ */ y("div", {
648
+ children: /* @__PURE__ */ v("div", {
648
649
  className: "p-4 flex items-center justify-between",
649
- children: [/* @__PURE__ */ y("div", {
650
+ children: [/* @__PURE__ */ v("div", {
650
651
  className: "flex items-center gap-3",
651
- children: [/* @__PURE__ */ v("div", {
652
+ children: [/* @__PURE__ */ _("div", {
652
653
  className: "size-10 rounded-lg bg-[var(--color-accent-soft)] flex items-center justify-center",
653
- children: /* @__PURE__ */ v(Ge, { className: "size-5 text-action-primary-bg" })
654
- }), /* @__PURE__ */ y("div", { children: [
655
- /* @__PURE__ */ v("p", {
654
+ children: /* @__PURE__ */ _(qe, { className: "size-5 text-action-primary-bg" })
655
+ }), /* @__PURE__ */ v("div", { children: [
656
+ /* @__PURE__ */ _("p", {
656
657
  className: "text-sm text-text-secondary",
657
- children: C("sessionDetails.runningOnAgent", "Running on Agent")
658
+ children: S("sessionDetails.runningOnAgent", "Running on Agent")
658
659
  }),
659
- /* @__PURE__ */ v("p", {
660
+ /* @__PURE__ */ _("p", {
660
661
  className: "font-medium text-text-primary",
661
- children: j.name
662
+ children: k.name
662
663
  }),
663
- /* @__PURE__ */ v("p", {
664
+ /* @__PURE__ */ _("p", {
664
665
  className: "text-sm text-text-secondary",
665
- children: j.hostname
666
+ children: k.hostname
666
667
  })
667
668
  ] })]
668
- }), /* @__PURE__ */ v(re, { status: j.isActive ? "ACTIVE" : "OFFLINE" })]
669
+ }), /* @__PURE__ */ _(ie, { status: k.isActive ? "ACTIVE" : "OFFLINE" })]
669
670
  })
670
671
  }),
671
- /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ v("div", {
672
+ /* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _("div", {
672
673
  className: "p-4 border-b border-border-default",
673
- children: /* @__PURE__ */ y("h3", {
674
+ children: /* @__PURE__ */ v("h3", {
674
675
  className: "font-semibold text-text-primary flex items-center gap-2",
675
- children: [/* @__PURE__ */ v(Me, { className: "size-5" }), C("sessionDetails.timeline", "Timeline")]
676
+ children: [/* @__PURE__ */ _(Pe, { className: "size-5" }), S("sessionDetails.timeline", "Timeline")]
676
677
  })
677
- }), /* @__PURE__ */ y("div", {
678
+ }), /* @__PURE__ */ v("div", {
678
679
  className: "p-4",
679
- children: [/* @__PURE__ */ y("div", {
680
+ children: [/* @__PURE__ */ v("div", {
680
681
  className: "grid grid-cols-1 sm:grid-cols-3 gap-4 text-sm",
681
682
  children: [
682
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
683
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
683
684
  className: "text-text-secondary",
684
- children: C("sessionDetails.autoStart", "Auto Start")
685
- }), /* @__PURE__ */ v("p", {
685
+ children: S("sessionDetails.autoStart", "Auto Start")
686
+ }), /* @__PURE__ */ _("p", {
686
687
  className: "font-medium text-text-primary",
687
- children: A.autoStart ? C("sessionDetails.yes", "Yes") : C("sessionDetails.no", "No")
688
+ children: O.autoStart ? S("sessionDetails.yes", "Yes") : S("sessionDetails.no", "No")
688
689
  })] }),
689
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
690
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
690
691
  className: "text-text-secondary",
691
- children: C("sessionDetails.created", "Created")
692
- }), /* @__PURE__ */ v("p", {
692
+ children: S("sessionDetails.created", "Created")
693
+ }), /* @__PURE__ */ _("p", {
693
694
  className: "font-medium text-text-primary",
694
- children: rt(A.createdAt)
695
+ children: at(O.createdAt)
695
696
  })] }),
696
- /* @__PURE__ */ y("div", { children: [/* @__PURE__ */ v("p", {
697
+ /* @__PURE__ */ v("div", { children: [/* @__PURE__ */ _("p", {
697
698
  className: "text-text-secondary",
698
- children: C("sessionDetails.updated", "Updated")
699
- }), /* @__PURE__ */ v("p", {
699
+ children: S("sessionDetails.updated", "Updated")
700
+ }), /* @__PURE__ */ _("p", {
700
701
  className: "font-medium text-text-primary",
701
- children: rt(A.updatedAt)
702
+ children: at(O.updatedAt)
702
703
  })] })
703
704
  ]
704
- }), A.exitCode !== null && A.exitCode !== void 0 && /* @__PURE__ */ y("div", {
705
+ }), O.exitCode !== null && O.exitCode !== void 0 && /* @__PURE__ */ v("div", {
705
706
  className: "mt-4 pt-4 border-t border-border-default",
706
- children: [/* @__PURE__ */ v("p", {
707
+ children: [/* @__PURE__ */ _("p", {
707
708
  className: "text-sm text-text-secondary",
708
- children: C("sessionDetails.exitCode", "Exit Code")
709
- }), /* @__PURE__ */ v("p", {
710
- className: `font-medium ${A.exitCode === 0 ? "text-status-success-text" : "text-status-error-text"}`,
711
- children: A.exitCode
709
+ children: S("sessionDetails.exitCode", "Exit Code")
710
+ }), /* @__PURE__ */ _("p", {
711
+ className: `font-medium ${O.exitCode === 0 ? "text-status-success-text" : "text-status-error-text"}`,
712
+ children: O.exitCode
712
713
  })]
713
714
  })]
714
715
  })] }),
715
- /* @__PURE__ */ y(o, { children: [/* @__PURE__ */ v("div", {
716
+ /* @__PURE__ */ v(o, { children: [/* @__PURE__ */ _("div", {
716
717
  className: "p-4 border-b border-border-default",
717
- children: /* @__PURE__ */ y("h3", {
718
+ children: /* @__PURE__ */ v("h3", {
718
719
  className: "font-semibold text-text-primary flex items-center gap-2",
719
- children: [/* @__PURE__ */ v(qe, { className: "size-5" }), C("sessionDetails.tags", "Tags")]
720
+ children: [/* @__PURE__ */ _(Ye, { className: "size-5" }), S("sessionDetails.tags", "Tags")]
720
721
  })
721
- }), /* @__PURE__ */ v("div", {
722
+ }), /* @__PURE__ */ _("div", {
722
723
  className: "p-4",
723
- children: /* @__PURE__ */ v(r, {
724
+ children: /* @__PURE__ */ _(r, {
724
725
  entityType: "VIBECONTROLS_SESSION",
725
- entityId: A.id
726
+ entityId: O.id
726
727
  })
727
728
  })] }),
728
- /* @__PURE__ */ v("div", {
729
+ /* @__PURE__ */ _("div", {
729
730
  id: "connection-log",
730
731
  className: "scroll-mt-20",
731
- children: /* @__PURE__ */ v(o, {
732
+ children: /* @__PURE__ */ _(o, {
732
733
  className: "min-h-[40vh]",
733
- children: /* @__PURE__ */ v(n, {
734
- sessionId: A.id,
735
- sessionName: A.name
734
+ children: /* @__PURE__ */ _(n, {
735
+ sessionId: O.id,
736
+ sessionName: O.name
736
737
  })
737
738
  })
738
739
  })
739
740
  ]
740
741
  }),
741
- R && /* @__PURE__ */ y("div", {
742
- ref: Xt,
742
+ F && /* @__PURE__ */ v("div", {
743
+ ref: Qt,
743
744
  className: "border-t border-border-default bg-bg-surface shrink-0",
744
745
  children: [
745
- /* @__PURE__ */ y("div", {
746
+ /* @__PURE__ */ v("div", {
746
747
  className: "flex items-center bg-bg-sunken border-b border-border-default",
747
748
  children: [
748
- /* @__PURE__ */ y("button", {
749
+ /* @__PURE__ */ v("button", {
749
750
  type: "button",
750
- onClick: () => z(!1),
751
+ onClick: () => I(!1),
751
752
  className: "flex items-center gap-1.5 px-3 py-2 text-text-secondary hover:text-text-primary transition-colors text-xs font-medium uppercase tracking-wide",
752
- title: C("sessionDetails.collapseTerminal", "Collapse terminal"),
753
+ title: S("sessionDetails.collapseTerminal", "Collapse terminal"),
753
754
  children: [
754
- /* @__PURE__ */ v(g, { className: "size-3.5" }),
755
- C("sessionDetails.terminal", "Terminal"),
756
- /* @__PURE__ */ v(Ae, { className: "size-3" })
755
+ /* @__PURE__ */ _(h, { className: "size-3.5" }),
756
+ S("sessionDetails.terminal", "Terminal"),
757
+ /* @__PURE__ */ _(Me, { className: "size-3" })
757
758
  ]
758
759
  }),
759
- /* @__PURE__ */ y("div", {
760
+ /* @__PURE__ */ v("div", {
760
761
  className: "flex items-center px-3 py-1.5 text-xs bg-bg-surface text-text-primary border-r border-border-subtle border-b-2 border-b-action-primary-bg",
761
- children: [/* @__PURE__ */ v(g, { className: "size-3 mr-1.5" }), A.name]
762
+ children: [/* @__PURE__ */ _(h, { className: "size-3 mr-1.5" }), O.name]
762
763
  }),
763
- /* @__PURE__ */ v("div", { className: "flex-1" }),
764
- /* @__PURE__ */ y("div", {
764
+ /* @__PURE__ */ _("div", { className: "flex-1" }),
765
+ /* @__PURE__ */ v("div", {
765
766
  className: "flex items-center gap-1 px-2",
766
- children: [X && /* @__PURE__ */ v("button", {
767
+ children: [X && /* @__PURE__ */ _("button", {
767
768
  type: "button",
768
- onClick: gn,
769
+ onClick: _n,
769
770
  className: "p-1 text-text-secondary hover:text-text-primary transition-colors",
770
- title: C("sessionDetails.openInNewTabShort", "Open in new tab"),
771
- children: /* @__PURE__ */ v(Pe, { className: "size-3.5" })
772
- }), /* @__PURE__ */ v("button", {
771
+ title: S("sessionDetails.openInNewTabShort", "Open in new tab"),
772
+ children: /* @__PURE__ */ _(Ie, { className: "size-3.5" })
773
+ }), /* @__PURE__ */ _("button", {
773
774
  type: "button",
774
- onClick: () => Vt((e) => !e),
775
+ onClick: () => Gt((e) => !e),
775
776
  className: "p-1 text-text-secondary hover:text-text-primary transition-colors",
776
- title: B ? C("sessionDetails.restoreSize", "Restore size") : C("sessionDetails.maximize", "Maximize"),
777
- children: v(B ? ze : Re, { className: "size-3.5" })
777
+ title: L ? S("sessionDetails.restoreSize", "Restore size") : S("sessionDetails.maximize", "Maximize"),
778
+ children: _(L ? Ve : Be, { className: "size-3.5" })
778
779
  })]
779
780
  })
780
781
  ]
781
782
  }),
782
- Yt && /* @__PURE__ */ y("div", {
783
+ H && /* @__PURE__ */ v("div", {
783
784
  role: "status",
784
785
  className: "flex items-start justify-between gap-3 px-3 py-2 bg-status-warning-bg/30 text-status-warning-text border-b border-status-warning-bg/50 text-xs",
785
- children: [/* @__PURE__ */ y("div", {
786
+ children: [/* @__PURE__ */ v("div", {
786
787
  className: "flex items-center gap-2 flex-1",
787
- children: [/* @__PURE__ */ v(p, { className: "size-3.5 shrink-0" }), /* @__PURE__ */ v("span", { children: C("sessionDetails.commandExited", "Command exited{{code}} — click Run Command to run it again.", { code: Yt.exitCode === null ? "" : ` (exit ${Yt.exitCode})` }) })]
788
- }), /* @__PURE__ */ v("button", {
788
+ children: [/* @__PURE__ */ _(Ae, { className: "size-3.5 shrink-0" }), /* @__PURE__ */ _("span", { children: S("sessionDetails.commandExited", "Command exited{{code}} — click Run Command to run it again.", { code: H.exitCode === null ? "" : ` (exit ${H.exitCode})` }) })]
789
+ }), /* @__PURE__ */ _("button", {
789
790
  type: "button",
790
- onClick: () => W(null),
791
+ onClick: () => U(null),
791
792
  className: "text-text-secondary hover:text-text-primary",
792
- title: C("common.dismiss", "Dismiss"),
793
- children: /* @__PURE__ */ v(Ye, { className: "size-3.5" })
793
+ title: S("common.dismiss", "Dismiss"),
794
+ children: /* @__PURE__ */ _(Ze, { className: "size-3.5" })
794
795
  })]
795
796
  }),
796
- /* @__PURE__ */ v("div", {
797
- className: `${bn} bg-bg-inverse text-text-inverse`,
798
- children: V ? /* @__PURE__ */ v("div", {
797
+ /* @__PURE__ */ _("div", {
798
+ className: `${xn} bg-bg-inverse text-text-inverse`,
799
+ children: R ? /* @__PURE__ */ _("div", {
799
800
  className: "flex items-center justify-center h-full",
800
- children: /* @__PURE__ */ y("div", {
801
+ children: /* @__PURE__ */ v("div", {
801
802
  className: "text-center",
802
803
  children: [
803
- /* @__PURE__ */ v(h, { className: "size-8 text-text-secondary animate-spin mx-auto mb-3" }),
804
- /* @__PURE__ */ y("p", {
804
+ /* @__PURE__ */ _(m, { className: "size-8 text-text-secondary animate-spin mx-auto mb-3" }),
805
+ /* @__PURE__ */ v("p", {
805
806
  className: "text-text-secondary text-sm",
806
807
  children: [
807
- C("sessionDetails.startingTerminal", "Starting terminal for"),
808
+ S("sessionDetails.startingTerminal", "Starting terminal for"),
808
809
  " ",
809
- A.name,
810
+ O.name,
810
811
  "..."
811
812
  ]
812
813
  }),
813
- /* @__PURE__ */ v("p", {
814
+ /* @__PURE__ */ _("p", {
814
815
  className: "text-text-tertiary text-xs mt-1",
815
- children: C("sessionDetails.settingUpTunnel", "Setting up session + web terminal tunnel")
816
+ children: S("sessionDetails.settingUpTunnel", "Setting up session + web terminal tunnel")
816
817
  })
817
818
  ]
818
819
  })
819
- }) : Ut ? /* @__PURE__ */ v("div", {
820
+ }) : qt ? /* @__PURE__ */ _("div", {
820
821
  className: "flex items-center justify-center h-full",
821
- children: /* @__PURE__ */ y("div", {
822
+ children: /* @__PURE__ */ v("div", {
822
823
  className: "text-center max-w-md",
823
824
  children: [
824
- /* @__PURE__ */ v(p, { className: "size-8 text-status-error-text mx-auto mb-3" }),
825
- /* @__PURE__ */ v("p", {
825
+ /* @__PURE__ */ _(Ae, { className: "size-8 text-status-error-text mx-auto mb-3" }),
826
+ /* @__PURE__ */ _("p", {
826
827
  className: "text-status-error-text text-sm font-medium",
827
- children: C("sessionDetails.failedStartTerminal", "Failed to start terminal")
828
+ children: S("sessionDetails.failedStartTerminal", "Failed to start terminal")
828
829
  }),
829
- /* @__PURE__ */ v("p", {
830
+ /* @__PURE__ */ _("p", {
830
831
  className: "text-text-secondary text-xs mt-2",
831
- children: Ut
832
+ children: qt
832
833
  }),
833
- /* @__PURE__ */ v("button", {
834
+ /* @__PURE__ */ _("button", {
834
835
  type: "button",
835
- onClick: fn,
836
+ onClick: pn,
836
837
  className: "mt-4 px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-button hover:bg-bg-elevated transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
837
- children: C("sessionDetails.retry", "Retry")
838
+ children: S("sessionDetails.retry", "Retry")
838
839
  })
839
840
  ]
840
841
  })
841
- }) : X ? /* @__PURE__ */ v(we, {
842
- isShared: F,
843
- collaborators: Ot,
844
- currentUserId: T,
845
- permission: Lt,
846
- onRequestControl: Rt,
847
- onReleaseControl: zt,
848
- isRequestingControl: jt,
849
- isReleasingControl: Nt,
842
+ }) : X ? /* @__PURE__ */ _(Te, {
843
+ isShared: N,
844
+ collaborators: jt,
845
+ currentUserId: w,
846
+ permission: Vt,
847
+ onRequestControl: Ht,
848
+ onReleaseControl: Ut,
849
+ isRequestingControl: Pt,
850
+ isReleasingControl: It,
850
851
  className: "h-full",
851
- children: /* @__PURE__ */ v("iframe", {
852
+ children: /* @__PURE__ */ _("iframe", {
852
853
  src: X,
853
- title: `Terminal - ${A.name}`,
854
+ title: `Terminal - ${O.name}`,
854
855
  className: "w-full h-full border-0",
855
856
  allow: "clipboard-read; clipboard-write",
856
- onError: sn
857
+ sandbox: "allow-scripts allow-same-origin allow-forms",
858
+ referrerPolicy: "no-referrer",
859
+ onError: cn
857
860
  })
858
- }) : K && (nn || tn) ? /* @__PURE__ */ v("div", {
861
+ }) : K && (rn || nn) ? /* @__PURE__ */ _("div", {
859
862
  className: "flex items-center justify-center h-full",
860
- children: /* @__PURE__ */ v("div", {
863
+ children: /* @__PURE__ */ _("div", {
861
864
  className: "text-center",
862
- children: tn ? /* @__PURE__ */ y(_, { children: [
863
- /* @__PURE__ */ v(p, { className: "size-8 text-status-error mx-auto mb-3" }),
864
- /* @__PURE__ */ v("p", {
865
+ children: nn ? /* @__PURE__ */ v(g, { children: [
866
+ /* @__PURE__ */ _(Ae, { className: "size-8 text-status-error mx-auto mb-3" }),
867
+ /* @__PURE__ */ _("p", {
865
868
  className: "text-text-secondary text-sm",
866
- children: C("sessionDetails.terminalCapabilityFailed", "Could not prepare terminal access")
869
+ children: S("sessionDetails.terminalCapabilityFailed", "Could not prepare terminal access")
867
870
  }),
868
- /* @__PURE__ */ v("p", {
871
+ /* @__PURE__ */ _("p", {
869
872
  className: "text-text-tertiary text-xs mt-1",
870
- children: tn
873
+ children: nn
871
874
  }),
872
- /* @__PURE__ */ v("button", {
875
+ /* @__PURE__ */ _("button", {
873
876
  type: "button",
874
- onClick: sn,
877
+ onClick: cn,
875
878
  className: "mt-4 px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-button hover:bg-bg-elevated transition-colors focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
876
- children: C("sessionDetails.retry", "Retry")
879
+ children: S("sessionDetails.retry", "Retry")
877
880
  })
878
- ] }) : /* @__PURE__ */ y(_, { children: [/* @__PURE__ */ v(h, { className: "size-6 text-text-tertiary mx-auto mb-3 animate-spin" }), /* @__PURE__ */ v("p", {
881
+ ] }) : /* @__PURE__ */ v(g, { children: [/* @__PURE__ */ _(m, { className: "size-6 text-text-tertiary mx-auto mb-3 animate-spin" }), /* @__PURE__ */ _("p", {
879
882
  className: "text-text-secondary text-sm",
880
- children: C("sessionDetails.preparingTerminal", "Preparing terminal…")
883
+ children: S("sessionDetails.preparingTerminal", "Preparing terminal…")
881
884
  })] })
882
885
  })
883
- }) : /* @__PURE__ */ v("div", {
886
+ }) : /* @__PURE__ */ _("div", {
884
887
  className: "flex items-center justify-center h-full",
885
- children: /* @__PURE__ */ y("div", {
888
+ children: /* @__PURE__ */ v("div", {
886
889
  className: "text-center",
887
890
  children: [
888
- /* @__PURE__ */ v(g, { className: "size-8 text-text-tertiary mx-auto mb-3" }),
889
- /* @__PURE__ */ v("p", {
891
+ /* @__PURE__ */ _(h, { className: "size-8 text-text-tertiary mx-auto mb-3" }),
892
+ /* @__PURE__ */ _("p", {
890
893
  className: "text-text-secondary text-sm",
891
- children: C("sessionDetails.noTerminalRunning", "No terminal running")
894
+ children: S("sessionDetails.noTerminalRunning", "No terminal running")
892
895
  }),
893
- /* @__PURE__ */ v("p", {
896
+ /* @__PURE__ */ _("p", {
894
897
  className: "text-text-tertiary text-xs mt-1",
895
- children: j ? C("sessionDetails.clickOpenTerminalHint", "Click \"Open Terminal\" to create a tmux session with a browser terminal.") : C("sessionDetails.noAgentForSession", "No agent is assigned to this session.")
898
+ children: k ? S("sessionDetails.clickOpenTerminalHint", "Click \"Open Terminal\" to create a tmux session with a browser terminal.") : S("sessionDetails.noAgentForSession", "No agent is assigned to this session.")
896
899
  }),
897
- j && /* @__PURE__ */ v("button", {
900
+ k && /* @__PURE__ */ _("button", {
898
901
  type: "button",
899
- onClick: fn,
900
- disabled: V,
902
+ onClick: pn,
903
+ disabled: R,
901
904
  className: "mt-4 px-4 py-2 bg-bg-sunken text-text-primary text-sm rounded-md hover:bg-bg-sunken transition-colors disabled:opacity-50",
902
- children: V ? C("sessionDetails.opening", "Opening...") : C("sessionDetails.openTerminal", "Open Terminal")
905
+ children: R ? S("sessionDetails.opening", "Opening...") : S("sessionDetails.openTerminal", "Open Terminal")
903
906
  })
904
907
  ]
905
908
  })
@@ -907,57 +910,57 @@ function S() {
907
910
  })
908
911
  ]
909
912
  }),
910
- !R && (X || Ut) && /* @__PURE__ */ v("div", {
913
+ !F && (X || qt) && /* @__PURE__ */ _("div", {
911
914
  className: "border-t border-border-default bg-bg-sunken shrink-0",
912
- children: /* @__PURE__ */ y("button", {
915
+ children: /* @__PURE__ */ v("button", {
913
916
  type: "button",
914
- onClick: () => z(!0),
917
+ onClick: () => I(!0),
915
918
  className: "flex items-center gap-1.5 px-3 py-1.5 text-text-secondary hover:text-text-primary transition-colors text-xs font-medium uppercase tracking-wide w-full",
916
- title: C("sessionDetails.expandTerminal", "Expand terminal"),
919
+ title: S("sessionDetails.expandTerminal", "Expand terminal"),
917
920
  children: [
918
- /* @__PURE__ */ v(g, { className: "size-3.5" }),
919
- C("sessionDetails.terminal", "Terminal"),
921
+ /* @__PURE__ */ _(h, { className: "size-3.5" }),
922
+ S("sessionDetails.terminal", "Terminal"),
920
923
  " - ",
921
- A.name,
922
- /* @__PURE__ */ v(je, { className: "size-3 ml-1" })
924
+ O.name,
925
+ /* @__PURE__ */ _(Ne, { className: "size-3 ml-1" })
923
926
  ]
924
927
  })
925
928
  }),
926
- /* @__PURE__ */ v(t, {
927
- isOpen: Wt,
928
- onClose: () => U(!1),
929
+ /* @__PURE__ */ _(t, {
930
+ isOpen: Jt,
931
+ onClose: () => B(!1),
929
932
  onConfirm: () => {
930
- U(!1), E(ie);
933
+ B(!1), T(ae);
931
934
  },
932
- title: De("session").title,
933
- message: De("session").message,
935
+ title: Oe("session").title,
936
+ message: Oe("session").message,
934
937
  confirmLabel: "View Billing",
935
938
  cancelLabel: "Dismiss",
936
939
  variant: "warning"
937
940
  }),
938
- qt && A && /* @__PURE__ */ v(Te, {
939
- sessionId: A.id,
940
- sessionName: A.name,
941
- onClose: () => Jt(!1)
941
+ Xt && O && /* @__PURE__ */ _(Ee, {
942
+ sessionId: O.id,
943
+ sessionName: O.name,
944
+ onClose: () => Zt(!1)
942
945
  }),
943
- /* @__PURE__ */ v(t, {
944
- isOpen: Gt,
945
- onClose: () => Kt(!1),
946
+ /* @__PURE__ */ _(t, {
947
+ isOpen: Yt,
948
+ onClose: () => V(!1),
946
949
  onConfirm: () => {
947
- Kt(!1), pn();
950
+ V(!1), mn();
948
951
  },
949
- title: C("sessionDetails.restartTerminalConfirmTitle", "Restart terminal?"),
950
- message: C("sessionDetails.restartTerminalConfirmBody", "This kills the current tmux session and re-runs the command from scratch. Any in-progress output will be lost."),
951
- confirmLabel: C("sessionDetails.restartTerminalConfirmLabel", "Restart terminal"),
952
- cancelLabel: C("common.cancel", "Cancel"),
952
+ title: S("sessionDetails.restartTerminalConfirmTitle", "Restart terminal?"),
953
+ message: S("sessionDetails.restartTerminalConfirmBody", "This kills the current tmux session and re-runs the command from scratch. Any in-progress output will be lost."),
954
+ confirmLabel: S("sessionDetails.restartTerminalConfirmLabel", "Restart terminal"),
955
+ cancelLabel: S("common.cancel", "Cancel"),
953
956
  variant: "warning"
954
957
  }),
955
- /* @__PURE__ */ v(Ee, {
956
- sessionId: A.id,
957
- open: Bt,
958
- onClose: () => L(!1)
958
+ /* @__PURE__ */ _(De, {
959
+ sessionId: O.id,
960
+ open: Wt,
961
+ onClose: () => P(!1)
959
962
  })
960
963
  ]
961
964
  });
962
965
  }
963
- export { S as SessionDetailsPage };
966
+ export { x as SessionDetailsPage };