@burdenoff/microfe-cosmicintersection 2026.704.1 → 2026.704.3

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