@burdenoff/microfe-cosmicintersection 2026.1101.3 → 2026.1107.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (43) hide show
  1. package/dist/cosmicintersection/api/cosmicApi.d.ts +33 -0
  2. package/dist/cosmicintersection/api/cosmicApi.d.ts.map +1 -1
  3. package/dist/cosmicintersection/api/cosmicApi.js +118 -71
  4. package/dist/cosmicintersection/api/cosmicApi.js.map +1 -1
  5. package/dist/cosmicintersection/components/ScienceCanvas.d.ts.map +1 -1
  6. package/dist/cosmicintersection/components/ScienceCanvas.js +9 -2
  7. package/dist/cosmicintersection/components/ScienceCanvas.js.map +1 -1
  8. package/dist/cosmicintersection/lib/useTrackRecentItem.d.ts +22 -0
  9. package/dist/cosmicintersection/lib/useTrackRecentItem.d.ts.map +1 -0
  10. package/dist/cosmicintersection/lib/useTrackRecentItem.js +28 -0
  11. package/dist/cosmicintersection/lib/useTrackRecentItem.js.map +1 -0
  12. package/dist/cosmicintersection/pages/analyses/AnalysesPage.d.ts.map +1 -1
  13. package/dist/cosmicintersection/pages/analyses/AnalysesPage.js +321 -285
  14. package/dist/cosmicintersection/pages/analyses/AnalysesPage.js.map +1 -1
  15. package/dist/cosmicintersection/pages/collections/CollectionDetailPage.d.ts.map +1 -1
  16. package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js +101 -93
  17. package/dist/cosmicintersection/pages/collections/CollectionDetailPage.js.map +1 -1
  18. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts.map +1 -1
  19. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +82 -74
  20. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
  21. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.d.ts.map +1 -1
  22. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +66 -58
  23. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
  24. package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.d.ts.map +1 -1
  25. package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js +126 -118
  26. package/dist/cosmicintersection/pages/pipelines/PipelineDetailPage.js.map +1 -1
  27. package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts.map +1 -1
  28. package/dist/cosmicintersection/pages/releases/ReleasesPage.js +211 -203
  29. package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
  30. package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts.map +1 -1
  31. package/dist/cosmicintersection/pages/runs/RunDetailPage.js +92 -84
  32. package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
  33. package/dist/cosmicintersection/pages/sources/SourceDetailPage.d.ts.map +1 -1
  34. package/dist/cosmicintersection/pages/sources/SourceDetailPage.js +101 -93
  35. package/dist/cosmicintersection/pages/sources/SourceDetailPage.js.map +1 -1
  36. package/dist/index.d.ts +2 -0
  37. package/dist/index.d.ts.map +1 -1
  38. package/dist/index.js +2 -1
  39. package/dist/services/recentItems.d.ts +40 -0
  40. package/dist/services/recentItems.d.ts.map +1 -0
  41. package/dist/services/recentItems.js +128 -0
  42. package/dist/services/recentItems.js.map +1 -0
  43. package/package.json +5 -1
@@ -1,27 +1,28 @@
1
1
  import { useCosmicIntersection as e } from "../../context/CosmicIntersectionContext.js";
2
2
  import { notify as t } from "../../lib/toast.js";
3
- import { useCosAnalysesQuery as n, useCosCompleteAnalysisMutation as r, useCosDatasetsQuery as i, useCosNotebooksQuery as a, useCosRunAnalysisMutation as o } from "../../api/cosmicApi.js";
4
- import { useTr as s } from "../../../shared/hooks/useTr.js";
5
- import { ActionMenu as c } from "../../components/ActionMenu.js";
6
- import { EmptyState as l } from "../../components/EmptyState.js";
7
- import { ErrorState as u } from "../../components/ErrorState.js";
8
- import { LoadingState as d } from "../../components/LoadingState.js";
9
- import { FileUploadField as f, useFileDownloadUrl as p } from "../../components/FileUploadField.js";
10
- import { PageLayout as m } from "../../components/PageLayout.js";
11
- import { ScienceCanvas as h } from "../../components/ScienceCanvas.js";
12
- import { StatusBadge as g } from "../../components/StatusBadge.js";
3
+ import { useCosAnalysesQuery as n, useCosAnalysisQuery as r, useCosCompleteAnalysisMutation as i, useCosDatasetsQuery as a, useCosNotebooksQuery as o, useCosRunAnalysisMutation as s } from "../../api/cosmicApi.js";
4
+ import { useTr as c } from "../../../shared/hooks/useTr.js";
5
+ import { ActionMenu as l } from "../../components/ActionMenu.js";
6
+ import { EmptyState as u } from "../../components/EmptyState.js";
7
+ import { ErrorState as d } from "../../components/ErrorState.js";
8
+ import { LoadingState as f } from "../../components/LoadingState.js";
9
+ import { FileUploadField as p, useFileDownloadUrl as m } from "../../components/FileUploadField.js";
10
+ import { PageLayout as h } from "../../components/PageLayout.js";
11
+ import { ScienceCanvas as g } from "../../components/ScienceCanvas.js";
12
+ import { StatusBadge as _ } from "../../components/StatusBadge.js";
13
13
  import "../../components/index.js";
14
- import { useSelectedRecord as _ } from "../../lib/useSelectedRecord.js";
15
- import { ASSISTANT_AWARE_DIALOG_CONTENT_PROPS as v, ASSISTANT_AWARE_DIALOG_ROOT_PROPS as y } from "../../lib/assistantAwareDialog.js";
16
- import { useMemo as b, useState as x } from "react";
17
- import { Fragment as S, jsx as C, jsxs as w } from "react/jsx-runtime";
18
- import { BarChart3 as T, Beaker as E, Download as D, ExternalLink as O, Play as k, Sparkles as A } from "lucide-react";
19
- import { Badge as j, Button as M, Dialog as N, DialogClose as P, DialogContent as F, DialogDescription as I, DialogFooter as L, DialogHeader as R, DialogTitle as z, Input as B, Label as V, Select as H, SelectContent as U, SelectItem as W, SelectTrigger as G, SelectValue as K, Switch as q, Table as ee, TableBody as te, TableCell as J, TableHead as Y, TableHeader as ne, TableRow as re, Textarea as ie } from "@burdenoff/fe-libs/ui";
14
+ import { useSelectedRecord as v } from "../../lib/useSelectedRecord.js";
15
+ import { ASSISTANT_AWARE_DIALOG_CONTENT_PROPS as y, ASSISTANT_AWARE_DIALOG_ROOT_PROPS as b } from "../../lib/assistantAwareDialog.js";
16
+ import { useTrackRecentItem as ee } from "../../lib/useTrackRecentItem.js";
17
+ import { useMemo as x, useState as S } from "react";
18
+ import { Fragment as C, jsx as w, jsxs as T } from "react/jsx-runtime";
19
+ import { BarChart3 as E, Beaker as D, Download as O, ExternalLink as k, Play as A, Sparkles as te } from "lucide-react";
20
+ import { Badge as j, Button as M, Dialog as N, DialogClose as ne, DialogContent as P, DialogDescription as F, DialogFooter as I, DialogHeader as L, DialogTitle as R, Input as z, Label as B, Select as V, SelectContent as H, SelectItem as U, SelectTrigger as W, SelectValue as G, Switch as re, Table as ie, TableBody as ae, TableCell as K, TableHead as q, TableHeader as oe, TableRow as se, Textarea as J } from "@burdenoff/fe-libs/ui";
20
21
  //#region src/cosmicintersection/pages/analyses/AnalysesPage.tsx
21
- function X(e) {
22
+ function Y(e) {
22
23
  return !!e.outputFile?.id || !!(e.results && Object.keys(e.results).length > 0);
23
24
  }
24
- var ae = [
25
+ var ce = [
25
26
  {
26
27
  value: "PENDING",
27
28
  label: "Pending"
@@ -38,8 +39,32 @@ var ae = [
38
39
  value: "FAILED",
39
40
  label: "Failed"
40
41
  }
41
- ], Z = "ALL";
42
- function Q(e) {
42
+ ], X = "ALL";
43
+ function le({ value: e }) {
44
+ let t = Z(e);
45
+ if (!e || t === "—") return /* @__PURE__ */ w("span", { children: "—" });
46
+ let n = new Date(e);
47
+ return /* @__PURE__ */ T("time", {
48
+ dateTime: n.toISOString(),
49
+ title: t,
50
+ className: "flex flex-col leading-tight",
51
+ children: [/* @__PURE__ */ w("span", {
52
+ className: "whitespace-nowrap",
53
+ children: n.toLocaleDateString(void 0, {
54
+ year: "numeric",
55
+ month: "short",
56
+ day: "numeric"
57
+ })
58
+ }), /* @__PURE__ */ w("span", {
59
+ className: "whitespace-nowrap text-xs text-text-muted",
60
+ children: n.toLocaleTimeString(void 0, {
61
+ hour: "2-digit",
62
+ minute: "2-digit"
63
+ })
64
+ })]
65
+ });
66
+ }
67
+ function Z(e) {
43
68
  if (!e) return "—";
44
69
  let t = new Date(e);
45
70
  return Number.isNaN(t.getTime()) ? "—" : t.toLocaleString(void 0, {
@@ -50,70 +75,70 @@ function Q(e) {
50
75
  minute: "2-digit"
51
76
  });
52
77
  }
53
- function oe({ fileId: e }) {
54
- let { data: t, loading: n } = p(e), [r, i] = x(!1), a = t?.getFileDownloadUrl ?? null;
55
- return n ? /* @__PURE__ */ C("span", {
78
+ function Q({ fileId: e }) {
79
+ let { data: t, loading: n } = m(e), [r, i] = S(!1), a = t?.getFileDownloadUrl ?? null;
80
+ return n ? /* @__PURE__ */ w("span", {
56
81
  className: "text-xs text-text-secondary",
57
82
  children: "Resolving link…"
58
- }) : a ? /* @__PURE__ */ w("div", {
83
+ }) : a ? /* @__PURE__ */ T("div", {
59
84
  className: "space-y-2",
60
- children: [r ? null : /* @__PURE__ */ C("img", {
85
+ children: [r ? null : /* @__PURE__ */ w("img", {
61
86
  src: a,
62
87
  alt: "Analysis output preview",
63
88
  onError: () => i(!0),
64
89
  className: "max-h-72 w-full rounded-card border border-border-default bg-bg-sunken object-contain"
65
- }), /* @__PURE__ */ w("a", {
90
+ }), /* @__PURE__ */ T("a", {
66
91
  href: a,
67
92
  target: "_blank",
68
93
  rel: "noopener noreferrer",
69
94
  className: "inline-flex items-center gap-1 text-sm text-text-primary underline-offset-2 hover:underline",
70
- children: [/* @__PURE__ */ C(D, {
95
+ children: [/* @__PURE__ */ w(O, {
71
96
  className: "size-3.5",
72
97
  "aria-hidden": "true"
73
98
  }), "Download output"]
74
99
  })]
75
- }) : /* @__PURE__ */ w("span", {
100
+ }) : /* @__PURE__ */ T("span", {
76
101
  className: "text-xs text-text-secondary",
77
102
  children: ["File ", e]
78
103
  });
79
104
  }
80
- function se({ analysis: e, onOpenChange: t }) {
105
+ function ue({ analysis: e, onOpenChange: t }) {
81
106
  let n = e?.results ?? null, r = !!(n && Object.keys(n).length > 0), i = !!e?.outputFile?.id;
82
- return /* @__PURE__ */ C(N, {
83
- ...y,
107
+ return /* @__PURE__ */ w(N, {
108
+ ...b,
84
109
  open: !!e,
85
110
  onOpenChange: t,
86
- children: /* @__PURE__ */ C(F, {
87
- ...v,
111
+ children: /* @__PURE__ */ w(P, {
112
+ ...y,
88
113
  className: "max-h-[85vh] max-w-2xl overflow-y-auto",
89
- children: e ? /* @__PURE__ */ w(S, { children: [
90
- /* @__PURE__ */ w(R, { children: [/* @__PURE__ */ w(z, {
114
+ children: e ? /* @__PURE__ */ T(C, { children: [
115
+ /* @__PURE__ */ T(L, { children: [/* @__PURE__ */ T(R, {
91
116
  className: "flex items-center gap-2",
92
- children: [/* @__PURE__ */ C(T, {
117
+ children: [/* @__PURE__ */ w(E, {
93
118
  className: "size-5 text-text-secondary",
94
119
  "aria-hidden": "true"
95
120
  }), "Analysis results"]
96
- }), /* @__PURE__ */ w(I, { children: [e.title, e.method ? ` · ${e.method}` : ""] })] }),
97
- /* @__PURE__ */ w("div", {
121
+ }), /* @__PURE__ */ T(F, { children: [e.title, e.method ? ` · ${e.method}` : ""] })] }),
122
+ /* @__PURE__ */ T("div", {
98
123
  className: "space-y-5",
99
124
  children: [
100
- r && n ? /* @__PURE__ */ C(h, { results: n }) : null,
101
- i && e.outputFile ? /* @__PURE__ */ w("div", {
125
+ r && n ? /* @__PURE__ */ w(g, { results: n }) : null,
126
+ i && e.outputFile ? /* @__PURE__ */ T("div", {
102
127
  className: "space-y-2",
103
- children: [/* @__PURE__ */ C("p", {
128
+ children: [/* @__PURE__ */ w("p", {
104
129
  className: "text-xs font-medium uppercase tracking-wide text-text-secondary",
105
130
  children: "Output artifact"
106
- }), /* @__PURE__ */ C(oe, { fileId: e.outputFile.id })]
131
+ }), /* @__PURE__ */ w(Q, { fileId: e.outputFile.id })]
107
132
  }) : null,
108
- !r && !i ? /* @__PURE__ */ C("p", {
133
+ !r && !i ? /* @__PURE__ */ w("p", {
109
134
  className: "rounded-card border border-border-default bg-bg-sunken px-4 py-6 text-center text-sm text-text-secondary",
110
135
  children: "No results or output artifact has been recorded for this analysis yet."
111
136
  }) : null
112
137
  ]
113
138
  }),
114
- /* @__PURE__ */ C(L, { children: /* @__PURE__ */ C(P, {
139
+ /* @__PURE__ */ w(I, { children: /* @__PURE__ */ w(ne, {
115
140
  asChild: !0,
116
- children: /* @__PURE__ */ C(M, {
141
+ children: /* @__PURE__ */ w(M, {
117
142
  type: "button",
118
143
  variant: "outline",
119
144
  children: "Close"
@@ -145,50 +170,50 @@ function $(e, t) {
145
170
  };
146
171
  }
147
172
  }
148
- function ce({ open: e, onOpenChange: n, onCompleted: r }) {
149
- let c = s(), [l, u] = x(""), [d, f] = x(""), [p, m] = x(!1), [h, g] = x("NOTEBOOK"), [_, v] = x(""), { data: y, loading: b } = a({ pagination: {
173
+ function de({ open: e, onOpenChange: n, onCompleted: r }) {
174
+ let i = c(), [l, u] = S(""), [d, f] = S(""), [p, m] = S(!1), [h, g] = S("NOTEBOOK"), [_, v] = S(""), { data: y, loading: b } = o({ pagination: {
150
175
  limit: 100,
151
176
  offset: 0
152
- } }), { data: S, loading: T } = i({ pagination: {
177
+ } }), { data: ee, loading: x } = a({ pagination: {
153
178
  limit: 100,
154
179
  offset: 0
155
- } }), [E, { loading: D }] = o(), O = y?.cosListNotebooks.items ?? [], A = S?.cosListDatasets.items ?? [], j = () => {
180
+ } }), [C, { loading: E }] = s(), D = y?.cosListNotebooks.items ?? [], O = ee?.cosListDatasets.items ?? [], k = () => {
156
181
  u(""), f(""), m(!1), g("NOTEBOOK"), v("");
157
182
  };
158
- return /* @__PURE__ */ C(N, {
183
+ return /* @__PURE__ */ w(N, {
159
184
  open: e,
160
185
  onOpenChange: (e) => {
161
- D || n(e);
186
+ E || n(e);
162
187
  },
163
- children: /* @__PURE__ */ C(F, { children: /* @__PURE__ */ w("form", {
188
+ children: /* @__PURE__ */ w(P, { children: /* @__PURE__ */ T("form", {
164
189
  onSubmit: async (e) => {
165
190
  e.preventDefault();
166
- let i = l.trim();
167
- if (!i) {
168
- t.error(c("cosmicintersection.pages.analyses.titleRequired", "Title is required"), c("cosmicintersection.pages.analyses.titleRequiredDescription", "Give the analysis a descriptive title."));
191
+ let a = l.trim();
192
+ if (!a) {
193
+ t.error(i("cosmicintersection.pages.analyses.titleRequired", "Title is required"), i("cosmicintersection.pages.analyses.titleRequiredDescription", "Give the analysis a descriptive title."));
169
194
  return;
170
195
  }
171
196
  if (!_) {
172
- t.error(c("cosmicintersection.pages.analyses.selectSource", "Select a source"), c("cosmicintersection.pages.analyses.selectSourceDescription", "Choose a {{kind}} to analyse.", { kind: h === "NOTEBOOK" ? c("nav.notebooks", "notebook").toLowerCase() : c("nav.datasets", "dataset").toLowerCase() }));
197
+ t.error(i("cosmicintersection.pages.analyses.selectSource", "Select a source"), i("cosmicintersection.pages.analyses.selectSourceDescription", "Choose a {{kind}} to analyse.", { kind: h === "NOTEBOOK" ? i("nav.notebooks", "notebook").toLowerCase() : i("nav.datasets", "dataset").toLowerCase() }));
173
198
  return;
174
199
  }
175
- let a = await E({ variables: { input: {
176
- title: i,
200
+ let o = await C({ variables: { input: {
201
+ title: a,
177
202
  method: d.trim() || void 0,
178
203
  aiAssisted: p,
179
204
  ...h === "NOTEBOOK" ? { notebookId: _ } : { datasetId: _ }
180
205
  } } });
181
- a.error || !a.data?.cosRunAnalysis?.id || (t.success(c("cosmicintersection.pages.analyses.analysisStarted", "Analysis started"), c("cosmicintersection.pages.analyses.analysisStartedDescription", "“{{name}}” is now running.", { name: i })), j(), n(!1), r());
206
+ o.error || !o.data?.cosRunAnalysis?.id || (t.success(i("cosmicintersection.pages.analyses.analysisStarted", "Analysis started"), i("cosmicintersection.pages.analyses.analysisStartedDescription", "“{{name}}” is now running.", { name: a })), k(), n(!1), r());
182
207
  },
183
208
  className: "space-y-4",
184
209
  children: [
185
- /* @__PURE__ */ w(R, { children: [/* @__PURE__ */ C(z, { children: "Run analysis" }), /* @__PURE__ */ C(I, { children: "Launch a new analysis against a notebook or a dataset. Exactly one source is required." })] }),
186
- /* @__PURE__ */ w("div", {
210
+ /* @__PURE__ */ T(L, { children: [/* @__PURE__ */ w(R, { children: "Run analysis" }), /* @__PURE__ */ w(F, { children: "Launch a new analysis against a notebook or a dataset. Exactly one source is required." })] }),
211
+ /* @__PURE__ */ T("div", {
187
212
  className: "space-y-1.5",
188
- children: [/* @__PURE__ */ C(V, {
213
+ children: [/* @__PURE__ */ w(B, {
189
214
  htmlFor: "run-title",
190
215
  children: "Title"
191
- }), /* @__PURE__ */ C(B, {
216
+ }), /* @__PURE__ */ w(z, {
192
217
  id: "run-title",
193
218
  value: l,
194
219
  onChange: (e) => u(e.target.value),
@@ -196,176 +221,176 @@ function ce({ open: e, onOpenChange: n, onCompleted: r }) {
196
221
  required: !0
197
222
  })]
198
223
  }),
199
- /* @__PURE__ */ w("div", {
224
+ /* @__PURE__ */ T("div", {
200
225
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
201
- children: [/* @__PURE__ */ w("div", {
226
+ children: [/* @__PURE__ */ T("div", {
202
227
  className: "space-y-1.5",
203
- children: [/* @__PURE__ */ C(V, {
228
+ children: [/* @__PURE__ */ w(B, {
204
229
  htmlFor: "run-source-kind",
205
230
  children: "Source type"
206
- }), /* @__PURE__ */ w(H, {
231
+ }), /* @__PURE__ */ T(V, {
207
232
  value: h,
208
233
  onValueChange: (e) => {
209
234
  g(e), v("");
210
235
  },
211
- children: [/* @__PURE__ */ C(G, {
236
+ children: [/* @__PURE__ */ w(W, {
212
237
  id: "run-source-kind",
213
238
  "aria-label": "Source type",
214
- children: /* @__PURE__ */ C(K, {})
215
- }), /* @__PURE__ */ w(U, { children: [/* @__PURE__ */ C(W, {
239
+ children: /* @__PURE__ */ w(G, {})
240
+ }), /* @__PURE__ */ T(H, { children: [/* @__PURE__ */ w(U, {
216
241
  value: "NOTEBOOK",
217
242
  children: "Notebook"
218
- }), /* @__PURE__ */ C(W, {
243
+ }), /* @__PURE__ */ w(U, {
219
244
  value: "DATASET",
220
245
  children: "Dataset"
221
246
  })] })]
222
247
  })]
223
- }), /* @__PURE__ */ w("div", {
248
+ }), /* @__PURE__ */ T("div", {
224
249
  className: "space-y-1.5",
225
- children: [/* @__PURE__ */ C(V, {
250
+ children: [/* @__PURE__ */ w(B, {
226
251
  htmlFor: "run-source-id",
227
252
  children: h === "NOTEBOOK" ? "Notebook" : "Dataset"
228
- }), /* @__PURE__ */ w(H, {
253
+ }), /* @__PURE__ */ T(V, {
229
254
  value: _,
230
255
  onValueChange: (e) => v(e),
231
- children: [/* @__PURE__ */ C(G, {
256
+ children: [/* @__PURE__ */ w(W, {
232
257
  id: "run-source-id",
233
258
  "aria-label": "Analysis source",
234
- children: /* @__PURE__ */ C(K, { placeholder: (h === "NOTEBOOK" ? b : T) ? "Loading…" : `Select a ${h === "NOTEBOOK" ? "notebook" : "dataset"}` })
235
- }), /* @__PURE__ */ C(U, { children: h === "NOTEBOOK" ? O.map((e) => /* @__PURE__ */ C(W, {
259
+ children: /* @__PURE__ */ w(G, { placeholder: (h === "NOTEBOOK" ? b : x) ? "Loading…" : `Select a ${h === "NOTEBOOK" ? "notebook" : "dataset"}` })
260
+ }), /* @__PURE__ */ w(H, { children: h === "NOTEBOOK" ? D.map((e) => /* @__PURE__ */ w(U, {
236
261
  value: e.id,
237
262
  children: e.title
238
- }, e.id)) : A.map((e) => /* @__PURE__ */ C(W, {
263
+ }, e.id)) : O.map((e) => /* @__PURE__ */ w(U, {
239
264
  value: e.id,
240
265
  children: e.name
241
266
  }, e.id)) })]
242
267
  })]
243
268
  })]
244
269
  }),
245
- /* @__PURE__ */ w("div", {
270
+ /* @__PURE__ */ T("div", {
246
271
  className: "space-y-1.5",
247
- children: [/* @__PURE__ */ C(V, {
272
+ children: [/* @__PURE__ */ w(B, {
248
273
  htmlFor: "run-method",
249
274
  children: "Method"
250
- }), /* @__PURE__ */ C(B, {
275
+ }), /* @__PURE__ */ w(z, {
251
276
  id: "run-method",
252
277
  value: d,
253
278
  onChange: (e) => f(e.target.value),
254
279
  placeholder: "e.g. gaussian-fit"
255
280
  })]
256
281
  }),
257
- /* @__PURE__ */ w("div", {
282
+ /* @__PURE__ */ T("div", {
258
283
  className: "flex items-center gap-3",
259
- children: [/* @__PURE__ */ C(q, {
284
+ children: [/* @__PURE__ */ w(re, {
260
285
  id: "run-ai",
261
286
  checked: p,
262
287
  onCheckedChange: (e) => m(e)
263
- }), /* @__PURE__ */ C(V, {
288
+ }), /* @__PURE__ */ w(B, {
264
289
  htmlFor: "run-ai",
265
290
  className: "cursor-pointer",
266
291
  children: "AI-assisted analysis"
267
292
  })]
268
293
  }),
269
- /* @__PURE__ */ w(L, { children: [/* @__PURE__ */ C(M, {
294
+ /* @__PURE__ */ T(I, { children: [/* @__PURE__ */ w(M, {
270
295
  type: "button",
271
296
  variant: "outline",
272
297
  onClick: () => n(!1),
273
- disabled: D,
298
+ disabled: E,
274
299
  children: "Cancel"
275
- }), /* @__PURE__ */ w(M, {
300
+ }), /* @__PURE__ */ T(M, {
276
301
  type: "submit",
277
- disabled: D,
278
- children: [/* @__PURE__ */ C(k, { className: "size-4" }), D ? "Starting…" : "Run analysis"]
302
+ disabled: E,
303
+ children: [/* @__PURE__ */ w(A, { className: "size-4" }), E ? "Starting…" : "Run analysis"]
279
304
  })] })
280
305
  ]
281
306
  }) })
282
307
  });
283
308
  }
284
- function le({ analysis: e, onOpenChange: n, onCompleted: i }) {
285
- let [a, o] = x("COMPLETED"), [c, l] = x(""), [u, d] = x(""), [p, { loading: m }] = r(), h = s();
286
- return /* @__PURE__ */ C(N, {
309
+ function fe({ analysis: e, onOpenChange: n, onCompleted: r }) {
310
+ let [a, o] = S("COMPLETED"), [s, l] = S(""), [u, d] = S(""), [f, { loading: m }] = i(), h = c();
311
+ return /* @__PURE__ */ w(N, {
287
312
  open: !!e,
288
313
  onOpenChange: (e) => {
289
314
  m || n(e);
290
315
  },
291
- children: /* @__PURE__ */ C(F, { children: /* @__PURE__ */ w("form", {
292
- onSubmit: async (r) => {
293
- if (r.preventDefault(), !e) return;
294
- let o = $(c, h);
316
+ children: /* @__PURE__ */ w(P, { children: /* @__PURE__ */ T("form", {
317
+ onSubmit: async (i) => {
318
+ if (i.preventDefault(), !e) return;
319
+ let o = $(s, h);
295
320
  if (!o.ok) {
296
321
  t.error(h("cosmicintersection.pages.analyses.invalidResults", "Invalid results"), o.error);
297
322
  return;
298
323
  }
299
- let s = await p({ variables: {
324
+ let c = await f({ variables: {
300
325
  id: e.id,
301
326
  status: a,
302
327
  results: o.value,
303
328
  outputFileId: u || void 0
304
329
  } });
305
- s.error || !s.data?.cosCompleteAnalysis || (t.success(a === "COMPLETED" ? h("cosmicintersection.pages.analyses.analysisCompleted", "Analysis completed") : h("cosmicintersection.pages.analyses.analysisMarkedFailed", "Analysis marked failed"), h("cosmicintersection.pages.analyses.analysisUpdatedDescription", "“{{name}}” was updated.", { name: e.title })), n(!1), i());
330
+ c.error || !c.data?.cosCompleteAnalysis || (t.success(a === "COMPLETED" ? h("cosmicintersection.pages.analyses.analysisCompleted", "Analysis completed") : h("cosmicintersection.pages.analyses.analysisMarkedFailed", "Analysis marked failed"), h("cosmicintersection.pages.analyses.analysisUpdatedDescription", "“{{name}}” was updated.", { name: e.title })), n(!1), r());
306
331
  },
307
332
  className: "space-y-4",
308
333
  children: [
309
- /* @__PURE__ */ w(R, { children: [/* @__PURE__ */ C(z, { children: "Complete analysis" }), /* @__PURE__ */ w(I, { children: [
334
+ /* @__PURE__ */ T(L, { children: [/* @__PURE__ */ w(R, { children: "Complete analysis" }), /* @__PURE__ */ T(F, { children: [
310
335
  "Record the outcome for ",
311
336
  e ? `“${e.title}”` : "this analysis",
312
337
  ". Attach results or an output artifact if you have them."
313
338
  ] })] }),
314
- /* @__PURE__ */ w("div", {
339
+ /* @__PURE__ */ T("div", {
315
340
  className: "space-y-1.5",
316
- children: [/* @__PURE__ */ C(V, {
341
+ children: [/* @__PURE__ */ w(B, {
317
342
  htmlFor: "complete-status",
318
343
  children: "Outcome"
319
- }), /* @__PURE__ */ w(H, {
344
+ }), /* @__PURE__ */ T(V, {
320
345
  value: a,
321
346
  onValueChange: (e) => o(e),
322
- children: [/* @__PURE__ */ C(G, {
347
+ children: [/* @__PURE__ */ w(W, {
323
348
  id: "complete-status",
324
349
  "aria-label": "Outcome",
325
- children: /* @__PURE__ */ C(K, {})
326
- }), /* @__PURE__ */ w(U, { children: [/* @__PURE__ */ C(W, {
350
+ children: /* @__PURE__ */ w(G, {})
351
+ }), /* @__PURE__ */ T(H, { children: [/* @__PURE__ */ w(U, {
327
352
  value: "COMPLETED",
328
353
  children: "Completed"
329
- }), /* @__PURE__ */ C(W, {
354
+ }), /* @__PURE__ */ w(U, {
330
355
  value: "FAILED",
331
356
  children: "Failed"
332
357
  })] })]
333
358
  })]
334
359
  }),
335
- /* @__PURE__ */ w("div", {
360
+ /* @__PURE__ */ T("div", {
336
361
  className: "space-y-1.5",
337
362
  children: [
338
- /* @__PURE__ */ C(V, {
363
+ /* @__PURE__ */ w(B, {
339
364
  htmlFor: "complete-results",
340
365
  children: "Results (JSON)"
341
366
  }),
342
- /* @__PURE__ */ C(ie, {
367
+ /* @__PURE__ */ w(J, {
343
368
  id: "complete-results",
344
- value: c,
369
+ value: s,
345
370
  onChange: (e) => l(e.target.value),
346
371
  rows: 4,
347
372
  className: "font-mono text-xs",
348
373
  placeholder: "{ \"snr\": 12.4, \"detections\": 3 }"
349
374
  }),
350
- /* @__PURE__ */ C("p", {
375
+ /* @__PURE__ */ w("p", {
351
376
  className: "text-xs text-text-secondary",
352
377
  children: "Optional structured results as a JSON object."
353
378
  })
354
379
  ]
355
380
  }),
356
- /* @__PURE__ */ C(f, {
381
+ /* @__PURE__ */ w(p, {
357
382
  value: u,
358
383
  onChange: (e) => d(e),
359
384
  label: "Attach output file",
360
385
  hint: "Optional output artifact (plots, tables, exports). Stored in workspace files."
361
386
  }),
362
- /* @__PURE__ */ w(L, { children: [/* @__PURE__ */ C(M, {
387
+ /* @__PURE__ */ T(I, { children: [/* @__PURE__ */ w(M, {
363
388
  type: "button",
364
389
  variant: "outline",
365
390
  onClick: () => n(!1),
366
391
  disabled: m,
367
392
  children: "Cancel"
368
- }), /* @__PURE__ */ C(M, {
393
+ }), /* @__PURE__ */ w(M, {
369
394
  type: "submit",
370
395
  disabled: m,
371
396
  children: m ? "Saving…" : "Save outcome"
@@ -374,247 +399,258 @@ function le({ analysis: e, onOpenChange: n, onCompleted: i }) {
374
399
  }) })
375
400
  });
376
401
  }
377
- function ue() {
378
- let { navigate: t } = e(), r = s(), [o, f] = x(void 0), [p, h] = x(!1), [v, y] = x(null), { data: D, loading: N, error: P, refetch: F } = n({ status: o }), { data: I } = a({ pagination: {
402
+ function pe() {
403
+ let { navigate: t } = e(), i = c(), [s, p] = S(void 0), [m, g] = S(!1), [y, b] = S(null), { data: O, loading: N, error: ne, refetch: P } = n({ status: s }), { data: F } = o({ pagination: {
379
404
  limit: 100,
380
405
  offset: 0
381
- } }), { data: L } = i({ pagination: {
406
+ } }), { data: I } = a({ pagination: {
382
407
  limit: 100,
383
408
  offset: 0
384
- } }), R = D?.cosListAnalyses ?? [], { selectedId: z, select: B } = _(), V = z ? R.find((e) => e.id === z) ?? null : null, q = (e) => B(e ? e.id : null), ie = b(() => {
409
+ } }), L = O?.cosListAnalyses ?? [], { selectedId: R, select: z } = v(), B = R ? L.find((e) => e.id === R) ?? null : null, { data: re } = r(R, { skip: B !== null || N || !O }), J = re?.cosAnalysis ?? null, Q = B ?? (J && J.id === R ? J : null), $ = (e) => z(e ? e.id : null);
410
+ ee(Q ? {
411
+ type: "analysis",
412
+ id: Q.id,
413
+ name: Q.title,
414
+ path: `analyses?id=${encodeURIComponent(Q.id)}`
415
+ } : null);
416
+ let pe = x(() => {
385
417
  let e = /* @__PURE__ */ new Map();
386
- for (let t of I?.cosListNotebooks.items ?? []) e.set(t.id, t.title);
418
+ for (let t of F?.cosListNotebooks.items ?? []) e.set(t.id, t.title);
387
419
  return e;
388
- }, [I]), oe = b(() => {
420
+ }, [F]), me = x(() => {
389
421
  let e = /* @__PURE__ */ new Map();
390
- for (let t of L?.cosListDatasets.items ?? []) e.set(t.id, t.name);
422
+ for (let t of I?.cosListDatasets.items ?? []) e.set(t.id, t.name);
391
423
  return e;
392
- }, [L]), $ = (e) => e.notebookId ? {
393
- label: ie.get(e.notebookId) ?? "Notebook",
424
+ }, [I]), he = (e) => e.notebookId ? {
425
+ label: pe.get(e.notebookId) ?? "Notebook",
394
426
  path: `notebooks/${e.notebookId}`
395
427
  } : e.datasetId ? {
396
- label: oe.get(e.datasetId) ?? "Dataset",
428
+ label: me.get(e.datasetId) ?? "Dataset",
397
429
  path: `datasets/${e.datasetId}`
398
- } : null, ue = (e) => {
430
+ } : null, ge = (e) => {
399
431
  let t = e.status === "PENDING" || e.status === "RUNNING";
400
- return [...X(e) ? [{
432
+ return [...Y(e) ? [{
401
433
  key: "view-results",
402
434
  label: "View results",
403
- icon: T,
404
- onSelect: () => q(e)
435
+ icon: E,
436
+ onSelect: () => $(e)
405
437
  }] : [], ...t ? [{
406
438
  key: "complete",
407
439
  label: "Complete…",
408
- icon: E,
409
- onSelect: () => y(e)
440
+ icon: D,
441
+ onSelect: () => b(e)
410
442
  }] : []];
411
- }, de = /* @__PURE__ */ w(M, {
443
+ }, _e = /* @__PURE__ */ T(M, {
412
444
  type: "button",
413
- onClick: () => h(!0),
414
- children: [/* @__PURE__ */ C(k, { className: "size-4" }), r("cosmicintersection.pages.analyses.create", "Run analysis")]
445
+ onClick: () => g(!0),
446
+ children: [/* @__PURE__ */ w(A, { className: "size-4" }), i("cosmicintersection.pages.analyses.create", "Run analysis")]
415
447
  });
416
- return /* @__PURE__ */ w(m, {
417
- title: r("cosmicintersection.pages.analyses.title", "Analyses"),
418
- description: r("cosmicintersection.pages.analyses.description", "Analysis runs executed over notebooks and federated datasets."),
419
- actions: de,
448
+ return /* @__PURE__ */ T(h, {
449
+ title: i("cosmicintersection.pages.analyses.title", "Analyses"),
450
+ description: i("cosmicintersection.pages.analyses.description", "Analysis runs executed over notebooks and federated datasets."),
451
+ actions: _e,
420
452
  children: [
421
- /* @__PURE__ */ w("div", {
453
+ /* @__PURE__ */ T("div", {
422
454
  className: "space-y-4",
423
- children: [/* @__PURE__ */ w("div", {
455
+ children: [/* @__PURE__ */ T("div", {
424
456
  className: "flex flex-wrap items-center gap-3",
425
- children: [/* @__PURE__ */ C("label", {
457
+ children: [/* @__PURE__ */ w("label", {
426
458
  className: "text-sm text-text-secondary",
427
459
  htmlFor: "analysis-status-filter",
428
460
  children: "Status"
429
- }), /* @__PURE__ */ w(H, {
430
- value: o ?? Z,
431
- onValueChange: (e) => f(e === Z ? void 0 : e),
432
- children: [/* @__PURE__ */ C(G, {
461
+ }), /* @__PURE__ */ T(V, {
462
+ value: s ?? X,
463
+ onValueChange: (e) => p(e === X ? void 0 : e),
464
+ children: [/* @__PURE__ */ w(W, {
433
465
  id: "analysis-status-filter",
434
466
  className: "w-48",
435
467
  "aria-label": "Filter by status",
436
- children: /* @__PURE__ */ C(K, {})
437
- }), /* @__PURE__ */ w(U, { children: [/* @__PURE__ */ C(W, {
438
- value: Z,
468
+ children: /* @__PURE__ */ w(G, {})
469
+ }), /* @__PURE__ */ T(H, { children: [/* @__PURE__ */ w(U, {
470
+ value: X,
439
471
  children: "All statuses"
440
- }), ae.map((e) => /* @__PURE__ */ C(W, {
472
+ }), ce.map((e) => /* @__PURE__ */ w(U, {
441
473
  value: e.value,
442
474
  children: e.label
443
475
  }, e.value))] })]
444
476
  })]
445
- }), N ? /* @__PURE__ */ C(d, {
477
+ }), N ? /* @__PURE__ */ w(f, {
446
478
  variant: "rows",
447
479
  rows: 6,
448
- label: r("cosmicintersection.pages.analyses.loading", "Loading analyses…")
449
- }) : P ? /* @__PURE__ */ C(u, {
450
- message: r("cosmicintersection.pages.analyses.error", "We could not load analyses. Please try again."),
451
- onRetry: () => void F()
452
- }) : R.length === 0 ? /* @__PURE__ */ C(l, {
453
- icon: E,
454
- title: o ? r("cosmicintersection.pages.analyses.emptyFilterTitle", "No analyses match this filter.") : r("cosmicintersection.pages.analyses.emptyTitle", "No analyses yet."),
455
- description: o ? r("cosmicintersection.pages.analyses.emptyFilterDescription", "Try a different status filter.") : r("cosmicintersection.pages.analyses.emptyDescription", "Run an analysis against a notebook or dataset to see results here."),
456
- action: o ? void 0 : /* @__PURE__ */ w(M, {
480
+ label: i("cosmicintersection.pages.analyses.loading", "Loading analyses…")
481
+ }) : ne ? /* @__PURE__ */ w(d, {
482
+ message: i("cosmicintersection.pages.analyses.error", "We could not load analyses. Please try again."),
483
+ onRetry: () => void P()
484
+ }) : L.length === 0 ? /* @__PURE__ */ w(u, {
485
+ icon: D,
486
+ title: s ? i("cosmicintersection.pages.analyses.emptyFilterTitle", "No analyses match this filter.") : i("cosmicintersection.pages.analyses.emptyTitle", "No analyses yet."),
487
+ description: s ? i("cosmicintersection.pages.analyses.emptyFilterDescription", "Try a different status filter.") : i("cosmicintersection.pages.analyses.emptyDescription", "Run an analysis against a notebook or dataset to see results here."),
488
+ action: s ? void 0 : /* @__PURE__ */ T(M, {
457
489
  type: "button",
458
- onClick: () => h(!0),
459
- children: [/* @__PURE__ */ C(k, { className: "size-4" }), r("cosmicintersection.pages.analyses.create", "Run analysis")]
490
+ onClick: () => g(!0),
491
+ children: [/* @__PURE__ */ w(A, { className: "size-4" }), i("cosmicintersection.pages.analyses.create", "Run analysis")]
460
492
  })
461
- }) : /* @__PURE__ */ w(S, { children: [/* @__PURE__ */ C("div", {
493
+ }) : /* @__PURE__ */ T(C, { children: [/* @__PURE__ */ w("div", {
462
494
  className: "hidden rounded-card border border-border-default bg-bg-elevated md:block",
463
- children: /* @__PURE__ */ w(ee, { children: [/* @__PURE__ */ C(ne, { children: /* @__PURE__ */ w(re, { children: [
464
- /* @__PURE__ */ C(Y, { children: "Title" }),
465
- /* @__PURE__ */ C(Y, { children: "Method" }),
466
- /* @__PURE__ */ C(Y, { children: "AI" }),
467
- /* @__PURE__ */ C(Y, { children: "Status" }),
468
- /* @__PURE__ */ C(Y, { children: "Source" }),
469
- /* @__PURE__ */ C(Y, { children: "Started" }),
470
- /* @__PURE__ */ C(Y, { children: "Finished" }),
471
- /* @__PURE__ */ C(Y, { children: "Output" }),
472
- /* @__PURE__ */ C(Y, {
473
- className: "w-12 text-right",
474
- children: "Actions"
475
- })
476
- ] }) }), /* @__PURE__ */ C(te, { children: R.map((e) => {
477
- let n = $(e);
478
- return /* @__PURE__ */ w(re, { children: [
479
- /* @__PURE__ */ C(J, {
480
- className: "font-medium text-text-primary",
481
- children: e.title
482
- }),
483
- /* @__PURE__ */ C(J, {
484
- className: "text-text-secondary",
485
- children: e.method ?? "—"
486
- }),
487
- /* @__PURE__ */ C(J, { children: e.aiAssisted ? /* @__PURE__ */ w(j, {
488
- variant: "secondary",
489
- className: "gap-1",
490
- children: [/* @__PURE__ */ C(A, {
491
- className: "size-3",
492
- "aria-hidden": "true"
493
- }), "AI"]
494
- }) : /* @__PURE__ */ C("span", {
495
- className: "text-text-secondary",
496
- children: "—"
497
- }) }),
498
- /* @__PURE__ */ C(J, { children: /* @__PURE__ */ C(g, { status: e.status }) }),
499
- /* @__PURE__ */ C(J, { children: n ? /* @__PURE__ */ w("button", {
500
- type: "button",
501
- onClick: () => t(n.path),
502
- className: "inline-flex max-w-[12rem] items-center gap-1 truncate text-sm text-text-primary underline-offset-2 hover:underline",
503
- children: [/* @__PURE__ */ C(O, {
504
- className: "size-3.5 shrink-0",
505
- "aria-hidden": "true"
506
- }), /* @__PURE__ */ C("span", {
507
- className: "truncate",
508
- children: n.label
509
- })]
510
- }) : /* @__PURE__ */ C("span", {
511
- className: "text-text-secondary",
512
- children: "—"
513
- }) }),
514
- /* @__PURE__ */ C(J, {
515
- className: "whitespace-nowrap text-text-secondary",
516
- children: Q(e.startedAt)
517
- }),
518
- /* @__PURE__ */ C(J, {
519
- className: "whitespace-nowrap text-text-secondary",
520
- children: Q(e.finishedAt)
521
- }),
522
- /* @__PURE__ */ C(J, { children: X(e) ? /* @__PURE__ */ w(M, {
523
- type: "button",
524
- variant: "outline",
525
- size: "sm",
526
- className: "h-auto gap-1 px-2 py-1",
527
- onClick: () => q(e),
528
- children: [/* @__PURE__ */ C(T, {
529
- className: "size-3.5",
530
- "aria-hidden": "true"
531
- }), "View"]
532
- }) : /* @__PURE__ */ C("span", {
533
- className: "text-text-secondary",
534
- children: "—"
535
- }) }),
536
- /* @__PURE__ */ C(J, {
537
- className: "text-right",
538
- children: /* @__PURE__ */ C(c, {
539
- ariaLabel: `Actions for ${e.title}`,
540
- onView: n ? () => t(n.path) : void 0,
541
- extraItems: ue(e)
542
- })
495
+ children: /* @__PURE__ */ T(ie, {
496
+ className: "table-auto",
497
+ "data-testid": "analyses-table",
498
+ children: [/* @__PURE__ */ w(oe, { children: /* @__PURE__ */ T(se, { children: [
499
+ /* @__PURE__ */ w(q, { children: "Title" }),
500
+ /* @__PURE__ */ w(q, { children: "Method" }),
501
+ /* @__PURE__ */ w(q, { children: "AI" }),
502
+ /* @__PURE__ */ w(q, { children: "Status" }),
503
+ /* @__PURE__ */ w(q, { children: "Source" }),
504
+ /* @__PURE__ */ w(q, { children: "Started" }),
505
+ /* @__PURE__ */ w(q, { children: "Finished" }),
506
+ /* @__PURE__ */ w(q, { children: "Output" }),
507
+ /* @__PURE__ */ w(q, {
508
+ className: "w-12 text-right",
509
+ children: "Actions"
543
510
  })
544
- ] }, e.id);
545
- }) })] })
546
- }), /* @__PURE__ */ C("ul", {
511
+ ] }) }), /* @__PURE__ */ w(ae, { children: L.map((e) => {
512
+ let n = he(e);
513
+ return /* @__PURE__ */ T(se, { children: [
514
+ /* @__PURE__ */ w(K, {
515
+ className: "font-medium text-text-primary",
516
+ children: e.title
517
+ }),
518
+ /* @__PURE__ */ w(K, {
519
+ className: "text-text-secondary",
520
+ children: e.method ?? "—"
521
+ }),
522
+ /* @__PURE__ */ w(K, { children: e.aiAssisted ? /* @__PURE__ */ T(j, {
523
+ variant: "secondary",
524
+ className: "gap-1",
525
+ children: [/* @__PURE__ */ w(te, {
526
+ className: "size-3",
527
+ "aria-hidden": "true"
528
+ }), "AI"]
529
+ }) : /* @__PURE__ */ w("span", {
530
+ className: "text-text-secondary",
531
+ children: "—"
532
+ }) }),
533
+ /* @__PURE__ */ w(K, { children: /* @__PURE__ */ w(_, { status: e.status }) }),
534
+ /* @__PURE__ */ w(K, { children: n ? /* @__PURE__ */ T("button", {
535
+ type: "button",
536
+ onClick: () => t(n.path),
537
+ className: "inline-flex max-w-[12rem] items-center gap-1 truncate text-sm text-text-primary underline-offset-2 hover:underline",
538
+ children: [/* @__PURE__ */ w(k, {
539
+ className: "size-3.5 shrink-0",
540
+ "aria-hidden": "true"
541
+ }), /* @__PURE__ */ w("span", {
542
+ className: "truncate",
543
+ children: n.label
544
+ })]
545
+ }) : /* @__PURE__ */ w("span", {
546
+ className: "text-text-secondary",
547
+ children: "—"
548
+ }) }),
549
+ /* @__PURE__ */ w(K, {
550
+ className: "text-text-secondary",
551
+ children: /* @__PURE__ */ w(le, { value: e.startedAt })
552
+ }),
553
+ /* @__PURE__ */ w(K, {
554
+ className: "text-text-secondary",
555
+ children: /* @__PURE__ */ w(le, { value: e.finishedAt })
556
+ }),
557
+ /* @__PURE__ */ w(K, { children: Y(e) ? /* @__PURE__ */ T(M, {
558
+ type: "button",
559
+ variant: "outline",
560
+ size: "sm",
561
+ className: "h-auto gap-1 px-2 py-1",
562
+ onClick: () => $(e),
563
+ children: [/* @__PURE__ */ w(E, {
564
+ className: "size-3.5",
565
+ "aria-hidden": "true"
566
+ }), "View"]
567
+ }) : /* @__PURE__ */ w("span", {
568
+ className: "text-text-secondary",
569
+ children: "—"
570
+ }) }),
571
+ /* @__PURE__ */ w(K, {
572
+ className: "text-right",
573
+ children: /* @__PURE__ */ w(l, {
574
+ ariaLabel: `Actions for ${e.title}`,
575
+ onView: n ? () => t(n.path) : void 0,
576
+ extraItems: ge(e)
577
+ })
578
+ })
579
+ ] }, e.id);
580
+ }) })]
581
+ })
582
+ }), /* @__PURE__ */ w("ul", {
547
583
  className: "space-y-3 md:hidden",
548
- children: R.map((e) => {
549
- let n = $(e), r = e.status === "PENDING" || e.status === "RUNNING";
550
- return /* @__PURE__ */ w("li", {
584
+ children: L.map((e) => {
585
+ let n = he(e), r = e.status === "PENDING" || e.status === "RUNNING";
586
+ return /* @__PURE__ */ T("li", {
551
587
  className: "space-y-3 rounded-card border border-border-default bg-bg-elevated p-4",
552
588
  children: [
553
- /* @__PURE__ */ w("div", {
589
+ /* @__PURE__ */ T("div", {
554
590
  className: "flex items-start justify-between gap-3",
555
- children: [/* @__PURE__ */ w("div", {
591
+ children: [/* @__PURE__ */ T("div", {
556
592
  className: "min-w-0",
557
- children: [/* @__PURE__ */ C("p", {
593
+ children: [/* @__PURE__ */ w("p", {
558
594
  className: "truncate font-medium text-text-primary",
559
595
  children: e.title
560
- }), e.method ? /* @__PURE__ */ C("p", {
596
+ }), e.method ? /* @__PURE__ */ w("p", {
561
597
  className: "truncate text-xs text-text-secondary",
562
598
  children: e.method
563
599
  }) : null]
564
- }), /* @__PURE__ */ C(g, { status: e.status })]
600
+ }), /* @__PURE__ */ w(_, { status: e.status })]
565
601
  }),
566
- /* @__PURE__ */ w("div", {
602
+ /* @__PURE__ */ T("div", {
567
603
  className: "flex flex-wrap items-center gap-2",
568
- children: [e.aiAssisted ? /* @__PURE__ */ w(j, {
604
+ children: [e.aiAssisted ? /* @__PURE__ */ T(j, {
569
605
  variant: "secondary",
570
606
  className: "gap-1",
571
- children: [/* @__PURE__ */ C(A, {
607
+ children: [/* @__PURE__ */ w(te, {
572
608
  className: "size-3",
573
609
  "aria-hidden": "true"
574
610
  }), "AI"]
575
- }) : null, n ? /* @__PURE__ */ w("button", {
611
+ }) : null, n ? /* @__PURE__ */ T("button", {
576
612
  type: "button",
577
613
  onClick: () => t(n.path),
578
614
  className: "inline-flex max-w-full items-center gap-1 truncate text-sm text-text-primary underline-offset-2 hover:underline",
579
- children: [/* @__PURE__ */ C(O, {
615
+ children: [/* @__PURE__ */ w(k, {
580
616
  className: "size-3.5 shrink-0",
581
617
  "aria-hidden": "true"
582
- }), /* @__PURE__ */ C("span", {
618
+ }), /* @__PURE__ */ w("span", {
583
619
  className: "truncate",
584
620
  children: n.label
585
621
  })]
586
622
  }) : null]
587
623
  }),
588
- /* @__PURE__ */ w("dl", {
624
+ /* @__PURE__ */ T("dl", {
589
625
  className: "grid grid-cols-2 gap-2 text-xs",
590
- children: [/* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
626
+ children: [/* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
591
627
  className: "text-text-secondary",
592
628
  children: "Started"
593
- }), /* @__PURE__ */ C("dd", {
629
+ }), /* @__PURE__ */ w("dd", {
594
630
  className: "text-text-primary",
595
- children: Q(e.startedAt)
596
- })] }), /* @__PURE__ */ w("div", { children: [/* @__PURE__ */ C("dt", {
631
+ children: Z(e.startedAt)
632
+ })] }), /* @__PURE__ */ T("div", { children: [/* @__PURE__ */ w("dt", {
597
633
  className: "text-text-secondary",
598
634
  children: "Finished"
599
- }), /* @__PURE__ */ C("dd", {
635
+ }), /* @__PURE__ */ w("dd", {
600
636
  className: "text-text-primary",
601
- children: Q(e.finishedAt)
637
+ children: Z(e.finishedAt)
602
638
  })] })]
603
639
  }),
604
- X(e) || r ? /* @__PURE__ */ w("div", {
640
+ Y(e) || r ? /* @__PURE__ */ T("div", {
605
641
  className: "flex flex-wrap gap-2",
606
- children: [X(e) ? /* @__PURE__ */ w(M, {
642
+ children: [Y(e) ? /* @__PURE__ */ T(M, {
607
643
  type: "button",
608
644
  variant: "outline",
609
645
  size: "sm",
610
- onClick: () => q(e),
611
- children: [/* @__PURE__ */ C(T, { className: "size-4" }), "View results"]
612
- }) : null, r ? /* @__PURE__ */ w(M, {
646
+ onClick: () => $(e),
647
+ children: [/* @__PURE__ */ w(E, { className: "size-4" }), "View results"]
648
+ }) : null, r ? /* @__PURE__ */ T(M, {
613
649
  type: "button",
614
650
  variant: "outline",
615
651
  size: "sm",
616
- onClick: () => y(e),
617
- children: [/* @__PURE__ */ C(E, { className: "size-4" }), "Complete"]
652
+ onClick: () => b(e),
653
+ children: [/* @__PURE__ */ w(D, { className: "size-4" }), "Complete"]
618
654
  }) : null]
619
655
  }) : null
620
656
  ]
@@ -622,28 +658,28 @@ function ue() {
622
658
  })
623
659
  })] })]
624
660
  }),
625
- /* @__PURE__ */ C(ce, {
626
- open: p,
627
- onOpenChange: h,
628
- onCompleted: () => void F()
661
+ /* @__PURE__ */ w(de, {
662
+ open: m,
663
+ onOpenChange: g,
664
+ onCompleted: () => void P()
629
665
  }),
630
- /* @__PURE__ */ C(le, {
631
- analysis: v,
666
+ /* @__PURE__ */ w(fe, {
667
+ analysis: y,
632
668
  onOpenChange: (e) => {
633
- e || y(null);
669
+ e || b(null);
634
670
  },
635
- onCompleted: () => void F()
636
- }, v?.id ?? "none"),
637
- /* @__PURE__ */ C(se, {
638
- analysis: V,
671
+ onCompleted: () => void P()
672
+ }, y?.id ?? "none"),
673
+ /* @__PURE__ */ w(ue, {
674
+ analysis: Q,
639
675
  onOpenChange: (e) => {
640
- e || q(null);
676
+ e || $(null);
641
677
  }
642
678
  })
643
679
  ]
644
680
  });
645
681
  }
646
682
  //#endregion
647
- export { ue as default };
683
+ export { pe as default };
648
684
 
649
685
  //# sourceMappingURL=AnalysesPage.js.map