@burdenoff/microfe-botmanor 2026.1120.11 → 2026.1120.13

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,194 +1,306 @@
1
1
  import { useBotlit as e } from "../providers/BotlitProvider.js";
2
2
  import { useTr as t } from "../../shared/hooks/useTr.js";
3
- import { PageLayout as n } from "../components/PageLayout.js";
4
- import { Card as r, CardContent as i } from "../components/Card.js";
5
- import { Button as a } from "../components/Button.js";
6
- import { Input as o } from "../components/Input.js";
7
- import { Badge as s } from "../components/Badge.js";
8
- import { EmptyState as c } from "../components/EmptyState.js";
9
- import { ErrorState as l } from "../components/ErrorState.js";
10
- import { LoadMore as u } from "../components/LoadMore.js";
11
- import { LiveIndicator as d } from "../components/LiveIndicator.js";
12
- import { useLiveExecutionList as f } from "../hooks/useExecutionLiveUpdates.js";
13
- import { summariseExecutions as p, useExecutions as m } from "../hooks/useExecutions.js";
3
+ import { useBots as n } from "../hooks/useBots.js";
4
+ import { useAgents as r } from "../hooks/useAgents.js";
5
+ import { PageLayout as i } from "../components/PageLayout.js";
6
+ import { Card as a, CardContent as o } from "../components/Card.js";
7
+ import { Button as s } from "../components/Button.js";
8
+ import { Input as ee } from "../components/Input.js";
9
+ import { Badge as c } from "../components/Badge.js";
10
+ import { EmptyState as te } from "../components/EmptyState.js";
11
+ import { ErrorState as ne } from "../components/ErrorState.js";
12
+ import { LoadMore as re } from "../components/LoadMore.js";
13
+ import { LiveIndicator as ie } from "../components/LiveIndicator.js";
14
+ import { executionStatusLabels as ae } from "../utils/executionStatus.js";
15
+ import { useExecutionSummary as oe, useExecutions as l } from "../hooks/useExecutions.js";
16
+ import { useLiveExecutionList as u } from "../hooks/useExecutionLiveUpdates.js";
14
17
  import "../hooks/index.js";
15
- import { formatCurrency as h, formatDuration as g, formatNumber as _, formatRelativeTime as v } from "../utils/formatters.js";
16
- import { ExecutionStatus as y } from "../../generated/wspace-types.js";
17
- import { useMemo as b, useState as x } from "react";
18
- import { PagePurpose as S } from "@burdenoff/fe-libs/ui";
19
- import { jsx as C, jsxs as w } from "react/jsx-runtime";
20
- import { Link as T } from "react-router";
21
- import { Activity as E, CheckCircle as D, Clock as O, DollarSign as k, Hourglass as A, RefreshCw as j, Search as M, TrendingUp as N, XCircle as P, Zap as F } from "lucide-react";
18
+ import { formatCurrency as d, formatDuration as f, formatNumber as p, formatRelativeTime as m } from "../utils/formatters.js";
19
+ import { ExecutionStatus as h } from "../../generated/wspace-types.js";
20
+ import { useEffect as g, useMemo as se, useState as _ } from "react";
21
+ import { PagePurpose as ce } from "@burdenoff/fe-libs/ui";
22
+ import { Fragment as v, jsx as y, jsxs as b } from "react/jsx-runtime";
23
+ import { Link as le } from "react-router";
24
+ import { Activity as x, Ban as S, CheckCircle as C, Clock as w, DollarSign as T, Hourglass as E, RefreshCw as D, Search as O, Timer as k, TrendingUp as A, XCircle as j, Zap as M } from "lucide-react";
22
25
  // src/botlit/pages/ExecutionsPage.tsx
23
- var I = [
24
- y.Completed,
25
- y.Running,
26
- y.Pending,
27
- y.Failed,
28
- y.Timeout,
29
- y.Cancelled
30
- ];
31
- function L(e) {
32
- return {
33
- [y.Completed]: e("botlit.executions.status.completed", "Completed"),
34
- [y.Running]: e("botlit.executions.status.running", "Running"),
35
- [y.Pending]: e("botlit.executions.status.pending", "Pending"),
36
- [y.Failed]: e("botlit.executions.status.failed", "Failed"),
37
- [y.Timeout]: e("botlit.executions.status.timedOut", "Timed out"),
38
- [y.Cancelled]: e("botlit.executions.status.cancelled", "Cancelled")
39
- };
26
+ var ue = [
27
+ h.Completed,
28
+ h.Running,
29
+ h.Pending,
30
+ h.Failed
31
+ ], de = 300;
32
+ function fe(e, t) {
33
+ let [n, r] = _(e);
34
+ return g(() => {
35
+ let n = setTimeout(() => r(e), t);
36
+ return () => clearTimeout(n);
37
+ }, [e, t]), n;
38
+ }
39
+ function pe(e) {
40
+ if (!e) return;
41
+ let t = /* @__PURE__ */ new Date(`${e}T00:00:00`);
42
+ return Number.isNaN(t.getTime()) ? void 0 : t.toISOString();
43
+ }
44
+ function N(e) {
45
+ if (!e) return;
46
+ let t = /* @__PURE__ */ new Date(`${e}T23:59:59.999`);
47
+ return Number.isNaN(t.getTime()) ? void 0 : t.toISOString();
40
48
  }
41
- var R = ({ status: e, className: t }) => {
49
+ var P = ({ status: e, className: t }) => {
42
50
  switch (e) {
43
- case y.Completed: return /* @__PURE__ */ C(D, { className: t ?? "h-4 w-4 text-status-success-text" });
44
- case y.Failed:
45
- case y.Timeout: return /* @__PURE__ */ C(P, { className: t ?? "h-4 w-4 text-status-error-text" });
46
- case y.Running: return /* @__PURE__ */ C(j, { className: t ?? "h-4 w-4 text-status-info-text motion-safe:animate-spin" });
47
- case y.Pending: return /* @__PURE__ */ C(A, { className: t ?? "h-4 w-4 text-status-warning-text" });
48
- default: return /* @__PURE__ */ C(E, { className: t ?? "h-4 w-4 text-text-secondary" });
51
+ case h.Completed: return /* @__PURE__ */ y(C, { className: t ?? "h-4 w-4 text-status-success-text" });
52
+ case h.Failed: return /* @__PURE__ */ y(j, { className: t ?? "h-4 w-4 text-status-error-text" });
53
+ case h.Timeout: return /* @__PURE__ */ y(k, { className: t ?? "h-4 w-4 text-status-error-text" });
54
+ case h.Cancelled: return /* @__PURE__ */ y(S, { className: t ?? "h-4 w-4 text-text-secondary" });
55
+ case h.Running: return /* @__PURE__ */ y(D, { className: t ?? "h-4 w-4 text-status-info-text motion-safe:animate-spin" });
56
+ case h.Pending: return /* @__PURE__ */ y(E, { className: t ?? "h-4 w-4 text-status-warning-text" });
57
+ default: return /* @__PURE__ */ y(x, { className: t ?? "h-4 w-4 text-text-secondary" });
49
58
  }
50
- }, z = ({ status: e, labels: t }) => {
59
+ }, F = ({ status: e, labels: t }) => {
51
60
  let n = {
52
- [y.Completed]: "success",
53
- [y.Failed]: "destructive",
54
- [y.Timeout]: "destructive",
55
- [y.Running]: "default",
56
- [y.Pending]: "warning",
57
- [y.Cancelled]: "secondary"
61
+ [h.Completed]: "success",
62
+ [h.Failed]: "destructive",
63
+ [h.Timeout]: "destructive",
64
+ [h.Running]: "default",
65
+ [h.Pending]: "warning",
66
+ [h.Cancelled]: "secondary"
58
67
  };
59
- return /* @__PURE__ */ w(s, {
68
+ return /* @__PURE__ */ b(c, {
60
69
  variant: n[e] ?? "secondary",
61
70
  className: "flex items-center gap-1",
62
- children: [/* @__PURE__ */ C(R, { status: e }), t[e] ?? e]
71
+ children: [/* @__PURE__ */ y(P, { status: e }), t[e] ?? e]
63
72
  });
64
- }, B = () => {
65
- let s = t(), { getPath: y } = e(), [D, A] = x(""), [P, B] = x([]), V = L(s), H = b(() => ({
66
- search: D,
67
- status: P
68
- }), [D, P]), { data: U, loading: W, error: G, refetch: K, hasMore: q, loadingMore: J, loadMore: Y } = m(H), { rows: X, live: Z } = f(U, {
73
+ }, I = ({ execution: e, noBot: t, noAgent: n }) => {
74
+ let r = e.appName ?? e.appId ?? t, i = e.agentName ?? e.agentId ?? n;
75
+ return /* @__PURE__ */ b(v, { children: [/* @__PURE__ */ y("p", {
76
+ className: "font-medium truncate",
77
+ title: e.appId ?? void 0,
78
+ children: r
79
+ }), /* @__PURE__ */ y("p", {
80
+ className: "text-sm text-text-secondary truncate",
81
+ title: e.agentId ?? void 0,
82
+ children: i
83
+ })] });
84
+ }, L = () => {
85
+ let c = t(), { getPath: h } = e(), [g, v] = _(""), [S, C] = _([]), [E, k] = _(""), [j, L] = _(""), [R, z] = _(""), [B, V] = _(""), H = ae(c), U = fe(g, de), me = r(), he = n(), W = se(() => ({
86
+ search: U,
87
+ status: S,
88
+ agentId: E || void 0,
89
+ appId: j || void 0,
90
+ startDate: pe(R),
91
+ endDate: N(B)
92
+ }), [
93
+ U,
94
+ S,
95
+ E,
96
+ j,
97
+ R,
98
+ B
99
+ ]), { data: ge, loading: _e, error: G, refetch: K, hasMore: ve, loadingMore: ye, loadMore: q } = l(W), J = oe(W), Y = J.data, X = S.length > 0 || !!U.trim() || !!(E || j || R || B), { rows: Z, live: be } = u(ge, {
69
100
  enabled: !0,
70
- includeNew: D.trim() === "" && P.length === 0,
71
- onFallbackPoll: () => void K()
72
- }), Q = b(() => p(X), [X]);
73
- return /* @__PURE__ */ C(n, {
74
- title: s("botlit.executions.title", "Executions"),
75
- description: s("botlit.executions.description", "Monitor agent execution history, performance, and costs"),
76
- actions: /* @__PURE__ */ w("div", {
101
+ includeNew: !X,
102
+ onFallbackPoll: () => {
103
+ K(), J.refetch();
104
+ }
105
+ }), xe = c("botlit.executions.table.noBot", "No bot"), Q = c("botlit.executions.table.noAgent", "No agent"), $ = "h-9 rounded-md border border-border-default bg-bg-surface px-2 text-sm text-text-primary";
106
+ return /* @__PURE__ */ y(i, {
107
+ title: c("botlit.executions.title", "Executions"),
108
+ description: c("botlit.executions.description", "Monitor agent execution history, performance, and costs"),
109
+ actions: /* @__PURE__ */ b("div", {
77
110
  className: "flex items-center gap-2",
78
- children: [/* @__PURE__ */ C(d, { state: Z }), /* @__PURE__ */ C(a, {
111
+ children: [/* @__PURE__ */ y(ie, { state: be }), /* @__PURE__ */ y(s, {
79
112
  variant: "outline",
80
- leftIcon: /* @__PURE__ */ C(j, { size: 16 }),
81
- onClick: () => void K(),
82
- children: s("botlit.executions.actions.refresh", "Refresh")
113
+ leftIcon: /* @__PURE__ */ y(D, { size: 16 }),
114
+ onClick: () => {
115
+ K(), J.refetch();
116
+ },
117
+ children: c("botlit.executions.actions.refresh", "Refresh")
83
118
  })]
84
119
  }),
85
- children: /* @__PURE__ */ w("div", {
120
+ children: /* @__PURE__ */ b("div", {
86
121
  className: "space-y-6",
87
122
  children: [
88
- /* @__PURE__ */ C(S, {
89
- icon: /* @__PURE__ */ C(E, { size: 18 }),
90
- children: s("botlit.executions.purpose", "An execution is a single run of an agent — one request in, one response out. This page is your observability and cost dashboard: see which runs succeeded or failed, how long they took, how many tokens they burned and what they cost. Use it to spot failing agents, runaway spend and latency regressions, then open any run to inspect its full trace.")
123
+ /* @__PURE__ */ y(ce, {
124
+ icon: /* @__PURE__ */ y(x, { size: 18 }),
125
+ children: c("botlit.executions.purpose", "An execution is a single run of an agent — one request in, one response out. See which runs succeeded or failed, how long they took, how many tokens they used and, where the model price is known, what they cost. Open a run to read its input and output, the model and agent version that answered, its token split, and the knowledge and policies that shaped it.")
91
126
  }),
92
- Q.total > 0 && /* @__PURE__ */ w("div", {
127
+ Y && Y.total > 0 && /* @__PURE__ */ b("div", {
93
128
  className: "space-y-2",
94
- children: [/* @__PURE__ */ w("div", {
129
+ children: [/* @__PURE__ */ b("div", {
95
130
  className: "grid grid-cols-2 md:grid-cols-4 gap-4",
96
131
  children: [
97
- /* @__PURE__ */ C(r, {
132
+ /* @__PURE__ */ y(a, {
98
133
  treatment: "glass",
99
134
  glow: !0,
100
- children: /* @__PURE__ */ C(i, {
135
+ children: /* @__PURE__ */ y(o, {
101
136
  className: "pt-6",
102
- children: /* @__PURE__ */ w("div", {
137
+ children: /* @__PURE__ */ b("div", {
103
138
  className: "flex items-center justify-between",
104
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
139
+ children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
105
140
  className: "text-sm text-text-secondary",
106
- children: s("botlit.executions.rollup.executions", "Executions")
107
- }), /* @__PURE__ */ C("p", {
141
+ children: c("botlit.executions.rollup.executions", "Executions")
142
+ }), /* @__PURE__ */ y("p", {
108
143
  className: "text-2xl font-bold tabular-nums",
109
- children: _(Q.total)
110
- })] }), /* @__PURE__ */ C(E, { className: "h-8 w-8 text-text-secondary" })]
144
+ children: p(Y.total)
145
+ })] }), /* @__PURE__ */ y(x, { className: "h-8 w-8 text-text-secondary" })]
111
146
  })
112
147
  })
113
148
  }),
114
- /* @__PURE__ */ C(r, {
149
+ /* @__PURE__ */ y(a, {
115
150
  treatment: "metric",
116
- children: /* @__PURE__ */ C(i, {
151
+ children: /* @__PURE__ */ y(o, {
117
152
  className: "pt-6",
118
- children: /* @__PURE__ */ w("div", {
153
+ children: /* @__PURE__ */ b("div", {
119
154
  className: "flex items-center justify-between",
120
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
155
+ children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
121
156
  className: "text-sm text-text-secondary",
122
- children: s("botlit.executions.rollup.successRate", "Success Rate")
123
- }), /* @__PURE__ */ w("p", {
157
+ children: c("botlit.executions.rollup.successRate", "Success Rate")
158
+ }), /* @__PURE__ */ b("p", {
124
159
  className: "text-2xl font-bold tabular-nums text-status-success-text",
125
- children: [(Q.successRate * 100).toFixed(1), "%"]
126
- })] }), /* @__PURE__ */ C(N, { className: "h-8 w-8 text-status-success-text" })]
160
+ children: [(Y.succeeded / Y.total * 100).toFixed(1), "%"]
161
+ })] }), /* @__PURE__ */ y(A, { className: "h-8 w-8 text-status-success-text" })]
127
162
  })
128
163
  })
129
164
  }),
130
- /* @__PURE__ */ C(r, {
165
+ /* @__PURE__ */ y(a, {
131
166
  treatment: "metric",
132
- children: /* @__PURE__ */ C(i, {
167
+ children: /* @__PURE__ */ y(o, {
133
168
  className: "pt-6",
134
- children: /* @__PURE__ */ w("div", {
169
+ children: /* @__PURE__ */ b("div", {
135
170
  className: "flex items-center justify-between",
136
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
171
+ children: [/* @__PURE__ */ b("div", { children: [/* @__PURE__ */ y("p", {
137
172
  className: "text-sm text-text-secondary",
138
- children: s("botlit.executions.rollup.avgDuration", "Avg Duration")
139
- }), /* @__PURE__ */ C("p", {
173
+ children: c("botlit.executions.rollup.avgDuration", "Avg Duration")
174
+ }), /* @__PURE__ */ y("p", {
140
175
  className: "text-2xl font-bold tabular-nums",
141
- children: g(Q.avgDurationMs)
142
- })] }), /* @__PURE__ */ C(O, { className: "h-8 w-8 text-text-secondary" })]
176
+ children: f(Y.avgDurationMs)
177
+ })] }), /* @__PURE__ */ y(w, { className: "h-8 w-8 text-text-secondary" })]
143
178
  })
144
179
  })
145
180
  }),
146
- /* @__PURE__ */ C(r, {
181
+ /* @__PURE__ */ y(a, {
147
182
  treatment: "metric",
148
- children: /* @__PURE__ */ C(i, {
183
+ children: /* @__PURE__ */ y(o, {
149
184
  className: "pt-6",
150
- children: /* @__PURE__ */ w("div", {
185
+ children: /* @__PURE__ */ b("div", {
151
186
  className: "flex items-center justify-between",
152
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("p", {
153
- className: "text-sm text-text-secondary",
154
- children: s("botlit.executions.rollup.totalCost", "Total Cost")
155
- }), /* @__PURE__ */ C("p", {
156
- className: "text-2xl font-bold tabular-nums",
157
- children: h(Q.totalCost)
158
- })] }), /* @__PURE__ */ C(k, { className: "h-8 w-8 text-text-secondary" })]
187
+ children: [/* @__PURE__ */ b("div", { children: [
188
+ /* @__PURE__ */ y("p", {
189
+ className: "text-sm text-text-secondary",
190
+ children: c("botlit.executions.rollup.totalCost", "Total Cost")
191
+ }),
192
+ /* @__PURE__ */ y("p", {
193
+ className: "text-2xl font-bold tabular-nums",
194
+ children: d(Y.totalCost)
195
+ }),
196
+ Y.unpricedRuns > 0 && /* @__PURE__ */ y("p", {
197
+ className: "text-xs text-text-secondary",
198
+ children: c("botlit.executions.rollup.unpriced", "{{count}} runs have no known price", { count: Y.unpricedRuns })
199
+ })
200
+ ] }), /* @__PURE__ */ y(T, { className: "h-8 w-8 text-text-secondary" })]
159
201
  })
160
202
  })
161
203
  })
162
204
  ]
163
- }), /* @__PURE__ */ C("p", {
205
+ }), /* @__PURE__ */ y("p", {
164
206
  className: "text-xs text-text-secondary",
165
- children: s("botlit.executions.rollup.calculatedAcross", "Calculated across the {{count}} runs shown below.", { count: Q.total })
207
+ children: c("botlit.executions.rollup.calculatedAcrossAll", "Calculated across all {{count}} matching runs. Average duration covers the {{timed}} runs that recorded one.", {
208
+ count: Y.total,
209
+ timed: Y.timedRuns
210
+ })
166
211
  })]
167
212
  }),
168
- /* @__PURE__ */ w("div", {
213
+ /* @__PURE__ */ b("div", {
169
214
  className: "flex flex-wrap items-center gap-4",
170
- children: [/* @__PURE__ */ w("div", {
215
+ children: [/* @__PURE__ */ b("div", {
171
216
  className: "relative flex-1 max-w-md",
172
- children: [/* @__PURE__ */ C(M, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ C(o, {
173
- placeholder: s("botlit.executions.filters.searchPlaceholder", "Search by run, agent, bot or input…"),
174
- value: D,
175
- onChange: (e) => A(e.target.value),
176
- className: "pl-9"
217
+ children: [/* @__PURE__ */ y(O, { className: "absolute left-3 top-1/2 -translate-y-1/2 h-4 w-4 text-text-secondary" }), /* @__PURE__ */ y(ee, {
218
+ placeholder: c("botlit.executions.filters.searchPlaceholder", "Search by run, agent, bot or input…"),
219
+ value: g,
220
+ onChange: (e) => v(e.target.value),
221
+ className: "pl-9",
222
+ "aria-label": c("botlit.executions.filters.searchLabel", "Search executions")
177
223
  })]
178
- }), /* @__PURE__ */ C("div", {
224
+ }), /* @__PURE__ */ y("div", {
179
225
  className: "flex flex-wrap gap-2",
180
- children: I.map((e) => /* @__PURE__ */ w(a, {
181
- variant: P.includes(e) ? "default" : "outline",
226
+ role: "group",
227
+ "aria-label": c("botlit.executions.filters.statusGroup", "Filter by status"),
228
+ children: ue.map((e) => /* @__PURE__ */ b(s, {
229
+ variant: S.includes(e) ? "default" : "outline",
182
230
  size: "sm",
183
- onClick: () => B((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]),
184
- children: [/* @__PURE__ */ C(R, { status: e }), /* @__PURE__ */ C("span", {
231
+ "aria-pressed": S.includes(e),
232
+ onClick: () => C((t) => t.includes(e) ? t.filter((t) => t !== e) : [...t, e]),
233
+ children: [/* @__PURE__ */ y(P, { status: e }), /* @__PURE__ */ y("span", {
185
234
  className: "ml-1",
186
- children: V[e]
235
+ children: H[e]
187
236
  })]
188
237
  }, e))
189
238
  })]
190
239
  }),
191
- W ? /* @__PURE__ */ C("div", {
240
+ /* @__PURE__ */ b("div", {
241
+ className: "flex flex-wrap items-end gap-4",
242
+ children: [
243
+ /* @__PURE__ */ b("label", {
244
+ className: "grid gap-1 text-xs text-text-secondary",
245
+ children: [c("botlit.executions.filters.agent", "Agent"), /* @__PURE__ */ b("select", {
246
+ className: $,
247
+ value: E,
248
+ onChange: (e) => k(e.target.value),
249
+ children: [/* @__PURE__ */ y("option", {
250
+ value: "",
251
+ children: c("botlit.executions.filters.allAgents", "All agents")
252
+ }), me.data.map((e) => /* @__PURE__ */ y("option", {
253
+ value: e.id,
254
+ children: e.name
255
+ }, e.id))]
256
+ })]
257
+ }),
258
+ /* @__PURE__ */ b("label", {
259
+ className: "grid gap-1 text-xs text-text-secondary",
260
+ children: [c("botlit.executions.filters.bot", "Bot"), /* @__PURE__ */ b("select", {
261
+ className: $,
262
+ value: j,
263
+ onChange: (e) => L(e.target.value),
264
+ children: [/* @__PURE__ */ y("option", {
265
+ value: "",
266
+ children: c("botlit.executions.filters.allBots", "All bots")
267
+ }), he.data.map((e) => /* @__PURE__ */ y("option", {
268
+ value: e.id,
269
+ children: e.name
270
+ }, e.id))]
271
+ })]
272
+ }),
273
+ /* @__PURE__ */ b("label", {
274
+ className: "grid gap-1 text-xs text-text-secondary",
275
+ children: [c("botlit.executions.filters.from", "From"), /* @__PURE__ */ y("input", {
276
+ type: "date",
277
+ className: $,
278
+ value: R,
279
+ max: B || void 0,
280
+ onChange: (e) => z(e.target.value)
281
+ })]
282
+ }),
283
+ /* @__PURE__ */ b("label", {
284
+ className: "grid gap-1 text-xs text-text-secondary",
285
+ children: [c("botlit.executions.filters.to", "To"), /* @__PURE__ */ y("input", {
286
+ type: "date",
287
+ className: $,
288
+ value: B,
289
+ min: R || void 0,
290
+ onChange: (e) => V(e.target.value)
291
+ })]
292
+ }),
293
+ X && /* @__PURE__ */ y(s, {
294
+ variant: "ghost",
295
+ size: "sm",
296
+ onClick: () => {
297
+ v(""), C([]), k(""), L(""), z(""), V("");
298
+ },
299
+ children: c("botlit.executions.filters.clear", "Clear filters")
300
+ })
301
+ ]
302
+ }),
303
+ _e ? /* @__PURE__ */ y("div", {
192
304
  className: "space-y-4",
193
305
  children: [
194
306
  1,
@@ -196,121 +308,132 @@ var R = ({ status: e, className: t }) => {
196
308
  3,
197
309
  4,
198
310
  5
199
- ].map((e) => /* @__PURE__ */ C("div", { className: "h-20 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }, e))
200
- }) : G ? /* @__PURE__ */ C(l, {
311
+ ].map((e) => /* @__PURE__ */ y("div", { className: "h-20 bg-bg-sunken motion-safe:animate-vc-shimmer rounded-lg" }, e))
312
+ }) : G ? /* @__PURE__ */ y(ne, {
201
313
  resource: "executions",
202
314
  error: G,
203
315
  onRetry: () => void K()
204
- }) : X.length > 0 ? /* @__PURE__ */ w("div", {
316
+ }) : Z.length > 0 ? /* @__PURE__ */ b("div", {
205
317
  className: "space-y-2",
206
- children: [/* @__PURE__ */ w("div", {
318
+ children: [/* @__PURE__ */ b("div", {
319
+ "aria-hidden": "true",
207
320
  className: "grid grid-cols-12 gap-4 px-4 py-2 text-sm font-medium text-text-secondary border-b border-border-subtle",
208
321
  children: [
209
- /* @__PURE__ */ C("div", {
322
+ /* @__PURE__ */ y("div", {
210
323
  className: "col-span-2",
211
- children: s("botlit.executions.table.status", "Status")
324
+ children: c("botlit.executions.table.status", "Status")
212
325
  }),
213
- /* @__PURE__ */ C("div", {
326
+ /* @__PURE__ */ y("div", {
214
327
  className: "col-span-3",
215
- children: s("botlit.executions.table.botAgent", "Bot / Agent")
328
+ children: c("botlit.executions.table.botAgent", "Bot / Agent")
216
329
  }),
217
- /* @__PURE__ */ C("div", {
330
+ /* @__PURE__ */ y("div", {
218
331
  className: "col-span-2",
219
- children: s("botlit.executions.table.duration", "Duration")
332
+ children: c("botlit.executions.table.duration", "Duration")
220
333
  }),
221
- /* @__PURE__ */ C("div", {
334
+ /* @__PURE__ */ y("div", {
222
335
  className: "col-span-2",
223
- children: s("botlit.executions.table.tokens", "Tokens")
336
+ children: c("botlit.executions.table.tokens", "Tokens")
224
337
  }),
225
- /* @__PURE__ */ C("div", {
338
+ /* @__PURE__ */ y("div", {
226
339
  className: "col-span-1",
227
- children: s("botlit.executions.table.cost", "Cost")
340
+ children: c("botlit.executions.table.cost", "Cost")
228
341
  }),
229
- /* @__PURE__ */ C("div", {
342
+ /* @__PURE__ */ y("div", {
230
343
  className: "col-span-2",
231
- children: s("botlit.executions.table.started", "Started")
344
+ children: c("botlit.executions.table.started", "Started")
232
345
  })
233
346
  ]
234
- }), X.map((e) => /* @__PURE__ */ C(T, {
235
- to: y(`executions/${e.id}`),
236
- children: /* @__PURE__ */ C(r, {
237
- className: "hover:border-primary/50 transition-colors cursor-pointer",
238
- children: /* @__PURE__ */ C(i, {
239
- className: "py-3",
240
- children: /* @__PURE__ */ w("div", {
241
- className: "grid grid-cols-12 gap-4 items-center",
242
- children: [
243
- /* @__PURE__ */ C("div", {
244
- className: "col-span-2",
245
- children: /* @__PURE__ */ C(z, {
246
- status: e.status,
247
- labels: V
248
- })
249
- }),
250
- /* @__PURE__ */ w("div", {
251
- className: "col-span-3",
252
- children: [/* @__PURE__ */ C("p", {
253
- className: "font-medium truncate",
254
- children: e.appId ?? "—"
255
- }), /* @__PURE__ */ C("p", {
256
- className: "text-sm text-text-secondary truncate",
257
- children: e.agentId ?? "—"
258
- })]
259
- }),
260
- /* @__PURE__ */ C("div", {
261
- className: "col-span-2",
262
- children: /* @__PURE__ */ w("div", {
263
- className: "flex items-center gap-1",
264
- children: [/* @__PURE__ */ C(O, {
265
- size: 14,
266
- className: "text-text-secondary"
267
- }), /* @__PURE__ */ C("span", { children: g(e.duration) })]
268
- })
269
- }),
270
- /* @__PURE__ */ C("div", {
271
- className: "col-span-2",
272
- children: /* @__PURE__ */ w("div", {
273
- className: "flex items-center gap-1",
274
- children: [/* @__PURE__ */ C(F, {
275
- size: 14,
276
- className: "text-text-secondary"
277
- }), /* @__PURE__ */ C("span", { children: _(e.tokensUsed) })]
278
- })
279
- }),
280
- /* @__PURE__ */ C("div", {
281
- className: "col-span-1",
282
- children: /* @__PURE__ */ w("div", {
283
- className: "flex items-center gap-1",
284
- children: [/* @__PURE__ */ C(k, {
285
- size: 14,
286
- className: "text-text-secondary"
287
- }), /* @__PURE__ */ C("span", { children: h(e.cost) })]
347
+ }), /* @__PURE__ */ y("ul", {
348
+ className: "space-y-2",
349
+ "aria-label": c("botlit.executions.list.label", "Executions"),
350
+ children: Z.map((e) => /* @__PURE__ */ y("li", { children: /* @__PURE__ */ y(le, {
351
+ to: h(`executions/${e.id}`),
352
+ "aria-label": c("botlit.executions.list.rowLabel", "{{status}} run of {{agent}}, started {{started}}", {
353
+ status: H[e.status] ?? e.status,
354
+ agent: e.agentName ?? e.agentId ?? Q,
355
+ started: m(e.createdAt)
356
+ }),
357
+ children: /* @__PURE__ */ y(a, {
358
+ className: "hover:border-primary/50 transition-colors cursor-pointer",
359
+ children: /* @__PURE__ */ y(o, {
360
+ className: "py-3",
361
+ children: /* @__PURE__ */ b("div", {
362
+ className: "grid grid-cols-12 gap-4 items-center",
363
+ children: [
364
+ /* @__PURE__ */ b("div", {
365
+ className: "col-span-2",
366
+ children: [/* @__PURE__ */ y(F, {
367
+ status: e.status,
368
+ labels: H
369
+ }), e.errorCode === "ORPHANED" && /* @__PURE__ */ y("p", {
370
+ className: "mt-1 text-xs text-text-secondary",
371
+ children: c("botlit.executions.status.orphaned", "Never finished (cleaned up)")
372
+ })]
373
+ }),
374
+ /* @__PURE__ */ y("div", {
375
+ className: "col-span-3",
376
+ children: /* @__PURE__ */ y(I, {
377
+ execution: e,
378
+ noBot: xe,
379
+ noAgent: Q
380
+ })
381
+ }),
382
+ /* @__PURE__ */ y("div", {
383
+ className: "col-span-2",
384
+ children: /* @__PURE__ */ b("div", {
385
+ className: "flex items-center gap-1",
386
+ children: [/* @__PURE__ */ y(w, {
387
+ size: 14,
388
+ className: "text-text-secondary"
389
+ }), /* @__PURE__ */ y("span", { children: f(e.duration) })]
390
+ })
391
+ }),
392
+ /* @__PURE__ */ y("div", {
393
+ className: "col-span-2",
394
+ children: /* @__PURE__ */ b("div", {
395
+ className: "flex items-center gap-1",
396
+ children: [/* @__PURE__ */ y(M, {
397
+ size: 14,
398
+ className: "text-text-secondary"
399
+ }), /* @__PURE__ */ y("span", { children: e.tokensUsed === null || e.tokensUsed === void 0 ? "—" : p(e.tokensUsed) })]
400
+ })
401
+ }),
402
+ /* @__PURE__ */ y("div", {
403
+ className: "col-span-1",
404
+ children: /* @__PURE__ */ b("div", {
405
+ className: "flex items-center gap-1",
406
+ children: [/* @__PURE__ */ y(T, {
407
+ size: 14,
408
+ className: "text-text-secondary"
409
+ }), /* @__PURE__ */ y("span", { children: d(e.cost) })]
410
+ })
411
+ }),
412
+ /* @__PURE__ */ y("div", {
413
+ className: "col-span-2 text-sm text-text-secondary",
414
+ children: m(e.createdAt)
288
415
  })
289
- }),
290
- /* @__PURE__ */ C("div", {
291
- className: "col-span-2 text-sm text-text-secondary",
292
- children: v(e.createdAt)
293
- })
294
- ]
416
+ ]
417
+ })
295
418
  })
296
419
  })
297
- })
298
- }, e.id))]
299
- }) : /* @__PURE__ */ C(c, {
420
+ }) }, e.id))
421
+ })]
422
+ }) : /* @__PURE__ */ y(te, {
300
423
  illustration: "empty-search",
301
- title: s("botlit.executions.empty.title", "No executions found"),
302
- description: P.length > 0 || D ? s("botlit.executions.empty.descriptionFiltered", "No executions match your filters. Try adjusting your search.") : s("botlit.executions.empty.descriptionNoData", "Executions will appear here when agents process requests.")
424
+ title: c("botlit.executions.empty.title", "No executions found"),
425
+ description: X ? c("botlit.executions.empty.descriptionFiltered", "No executions match your filters. Try adjusting your search.") : c("botlit.executions.empty.descriptionNoData", "Executions will appear here when agents process requests.")
303
426
  }),
304
- /* @__PURE__ */ C(u, {
305
- hasMore: q,
306
- loadingMore: J,
307
- onLoadMore: () => void Y(),
308
- loadedCount: X.length
427
+ /* @__PURE__ */ y(re, {
428
+ hasMore: ve,
429
+ loadingMore: ye,
430
+ onLoadMore: () => void q(),
431
+ loadedCount: Z.length
309
432
  })
310
433
  ]
311
434
  })
312
435
  });
313
436
  };
314
- export { B as ExecutionsPage };
437
+ export { L as ExecutionsPage };
315
438
 
316
439
  //# sourceMappingURL=ExecutionsPage.js.map