@burdenoff/microfe-cosmicintersection 2026.1107.1 → 2026.1108.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 (42) hide show
  1. package/dist/cosmicintersection/api/cosmicApi.d.ts +208 -1
  2. package/dist/cosmicintersection/api/cosmicApi.d.ts.map +1 -1
  3. package/dist/cosmicintersection/api/cosmicApi.js +291 -107
  4. package/dist/cosmicintersection/api/cosmicApi.js.map +1 -1
  5. package/dist/cosmicintersection/components/AiRunAttribution.d.ts +18 -0
  6. package/dist/cosmicintersection/components/AiRunAttribution.d.ts.map +1 -0
  7. package/dist/cosmicintersection/components/AiRunAttribution.js +39 -0
  8. package/dist/cosmicintersection/components/AiRunAttribution.js.map +1 -0
  9. package/dist/cosmicintersection/components/ReleaseDraftDialog.d.ts +15 -0
  10. package/dist/cosmicintersection/components/ReleaseDraftDialog.d.ts.map +1 -0
  11. package/dist/cosmicintersection/components/ReleaseDraftDialog.js +193 -0
  12. package/dist/cosmicintersection/components/ReleaseDraftDialog.js.map +1 -0
  13. package/dist/cosmicintersection/components/RunTriageCard.d.ts +15 -0
  14. package/dist/cosmicintersection/components/RunTriageCard.d.ts.map +1 -0
  15. package/dist/cosmicintersection/components/RunTriageCard.js +282 -0
  16. package/dist/cosmicintersection/components/RunTriageCard.js.map +1 -0
  17. package/dist/cosmicintersection/components/SchemaProposalPanel.d.ts +18 -0
  18. package/dist/cosmicintersection/components/SchemaProposalPanel.d.ts.map +1 -0
  19. package/dist/cosmicintersection/components/SchemaProposalPanel.js +277 -0
  20. package/dist/cosmicintersection/components/SchemaProposalPanel.js.map +1 -0
  21. package/dist/cosmicintersection/components/index.d.ts +4 -0
  22. package/dist/cosmicintersection/components/index.d.ts.map +1 -1
  23. package/dist/cosmicintersection/components/index.js +5 -1
  24. package/dist/cosmicintersection/pages/access/AccessPage.d.ts.map +1 -1
  25. package/dist/cosmicintersection/pages/access/AccessPage.js +348 -326
  26. package/dist/cosmicintersection/pages/access/AccessPage.js.map +1 -1
  27. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.d.ts.map +1 -1
  28. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js +732 -543
  29. package/dist/cosmicintersection/pages/datasets/DatasetDetailPage.js.map +1 -1
  30. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.d.ts.map +1 -1
  31. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js +268 -119
  32. package/dist/cosmicintersection/pages/discovery/DiscoveryPage.js.map +1 -1
  33. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.d.ts.map +1 -1
  34. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js +322 -307
  35. package/dist/cosmicintersection/pages/notebooks/NotebookDetailPage.js.map +1 -1
  36. package/dist/cosmicintersection/pages/releases/ReleasesPage.d.ts.map +1 -1
  37. package/dist/cosmicintersection/pages/releases/ReleasesPage.js +5 -2
  38. package/dist/cosmicintersection/pages/releases/ReleasesPage.js.map +1 -1
  39. package/dist/cosmicintersection/pages/runs/RunDetailPage.d.ts.map +1 -1
  40. package/dist/cosmicintersection/pages/runs/RunDetailPage.js +190 -185
  41. package/dist/cosmicintersection/pages/runs/RunDetailPage.js.map +1 -1
  42. package/package.json +1 -1
@@ -8,23 +8,24 @@ import { ActivityFeedPanel as re } from "../../components/ActivityFeedPanel.js";
8
8
  import { SafeLink as ie } from "../../components/SafeLink.js";
9
9
  import { PageLayout as c } from "../../components/PageLayout.js";
10
10
  import { StatusBadge as l, formatEnumLabel as u } from "../../components/StatusBadge.js";
11
+ import { RunTriageCard as ae } from "../../components/RunTriageCard.js";
11
12
  import "../../components/index.js";
12
- import { useTrackRecentItem as ae } from "../../lib/useTrackRecentItem.js";
13
- import { describeError as oe, mutationSucceeded as d } from "../../lib/mutationResult.js";
14
- import { useMemo as f, useState as p } from "react";
15
- import { Fragment as se, jsx as m, jsxs as h } from "react/jsx-runtime";
16
- import { useParams as ce } from "react-router";
17
- import { Check as g, Circle as _, ListTree as le, Loader2 as v, Plus as y, SearchX as ue, X as b } from "lucide-react";
18
- import { Badge as x, Button as S, Card as C, CardContent as w, CardHeader as T, CardTitle as E, Dialog as de, DialogContent as fe, DialogDescription as pe, DialogFooter as me, DialogHeader as he, DialogTitle as ge, Input as D, Label as O, Select as _e, SelectContent as ve, SelectItem as ye, SelectTrigger as be, SelectValue as xe, Table as Se, TableBody as Ce, TableCell as k, TableHead as A, TableHeader as we, TableRow as j, Textarea as Te } from "@burdenoff/fe-libs/ui";
13
+ import { useTrackRecentItem as oe } from "../../lib/useTrackRecentItem.js";
14
+ import { describeError as se, mutationSucceeded as ce } from "../../lib/mutationResult.js";
15
+ import { useMemo as d, useState as f } from "react";
16
+ import { Fragment as le, jsx as p, jsxs as m } from "react/jsx-runtime";
17
+ import { useParams as ue } from "react-router";
18
+ import { Check as h, Circle as g, ListTree as de, Loader2 as _, Plus as v, SearchX as fe, X as y } from "lucide-react";
19
+ import { Badge as b, Button as x, Card as S, CardContent as C, CardHeader as w, CardTitle as T, Dialog as pe, DialogContent as me, DialogDescription as he, DialogFooter as ge, DialogHeader as _e, DialogTitle as ve, Input as E, Label as D, Select as ye, SelectContent as be, SelectItem as xe, SelectTrigger as Se, SelectValue as Ce, Table as we, TableBody as Te, TableCell as O, TableHead as k, TableHeader as Ee, TableRow as A, Textarea as De } from "@burdenoff/fe-libs/ui";
19
20
  //#region src/cosmicintersection/pages/runs/RunDetailPage.tsx
20
- var Ee = [
21
+ var Oe = [
21
22
  "INGEST",
22
23
  "CALIBRATE",
23
24
  "TRANSFORM",
24
25
  "ANALYZE",
25
26
  "EXPORT",
26
27
  "NOTIFY"
27
- ], De = {
28
+ ], ke = {
28
29
  QUEUED: ["RUNNING", "CANCELLED"],
29
30
  RUNNING: [
30
31
  "SUCCEEDED",
@@ -34,79 +35,79 @@ var Ee = [
34
35
  SUCCEEDED: [],
35
36
  FAILED: [],
36
37
  CANCELLED: []
37
- }, M = {
38
+ }, j = {
38
39
  SUCCEEDED: {
39
- icon: g,
40
+ icon: h,
40
41
  spin: !1,
41
42
  wrap: "border-status-success-border bg-status-success-bg-subtle text-status-success-text"
42
43
  },
43
44
  RUNNING: {
44
- icon: v,
45
+ icon: _,
45
46
  spin: !0,
46
47
  wrap: "border-status-warning-border bg-status-warning-bg-subtle text-status-warning-text"
47
48
  },
48
49
  FAILED: {
49
- icon: b,
50
+ icon: y,
50
51
  spin: !1,
51
52
  wrap: "border-status-error-border bg-status-error-bg-subtle text-status-error-text"
52
53
  },
53
54
  QUEUED: {
54
- icon: _,
55
+ icon: g,
55
56
  spin: !1,
56
57
  wrap: "border-status-info-border bg-status-info-bg-subtle text-status-info-text"
57
58
  },
58
59
  CANCELLED: {
59
- icon: b,
60
+ icon: y,
60
61
  spin: !1,
61
62
  wrap: "border-border-default bg-bg-sunken text-text-secondary"
62
63
  }
63
64
  };
64
- function N(e) {
65
+ function M(e) {
65
66
  if (!e) return "—";
66
67
  let t = new Date(e);
67
68
  return Number.isNaN(t.getTime()) ? "—" : t.toLocaleString();
68
69
  }
69
- function P(e) {
70
+ function N(e) {
70
71
  if (e == null) return "—";
71
72
  if (e < 1e3) return `${e} ms`;
72
73
  let t = e / 1e3;
73
74
  return t < 60 ? `${t.toFixed(1)} s` : `${Math.floor(t / 60)}m ${Math.round(t % 60)}s`;
74
75
  }
75
- function F(e) {
76
+ function P(e) {
76
77
  let t = (e ?? []).filter((e) => e.status === "FAILED");
77
78
  return t.length === 0 ? null : t.reduce((e, t) => t.position < e.position ? t : e);
78
79
  }
79
- function I({ label: e, children: t }) {
80
- return /* @__PURE__ */ h("div", {
80
+ function F({ label: e, children: t }) {
81
+ return /* @__PURE__ */ m("div", {
81
82
  className: "flex flex-col gap-1 border-b border-border-seam py-3 last:border-0 sm:flex-row sm:items-start sm:gap-4",
82
- children: [/* @__PURE__ */ m("span", {
83
+ children: [/* @__PURE__ */ p("span", {
83
84
  className: "w-40 shrink-0 text-sm font-medium text-text-secondary",
84
85
  children: e
85
- }), /* @__PURE__ */ m("span", {
86
+ }), /* @__PURE__ */ p("span", {
86
87
  className: "min-w-0 text-sm text-text-primary",
87
88
  children: t
88
89
  })]
89
90
  });
90
91
  }
91
- function L({ value: e }) {
92
- return !e || Object.keys(e).length === 0 ? /* @__PURE__ */ m("span", {
92
+ function I({ value: e }) {
93
+ return !e || Object.keys(e).length === 0 ? /* @__PURE__ */ p("span", {
93
94
  className: "text-sm text-text-secondary",
94
95
  children: "—"
95
- }) : /* @__PURE__ */ m("pre", {
96
+ }) : /* @__PURE__ */ p("pre", {
96
97
  className: "overflow-x-auto rounded-card border border-border-default bg-bg-sunken p-3 font-mono text-xs text-text-primary",
97
98
  children: JSON.stringify(e, null, 2)
98
99
  });
99
100
  }
100
- function R() {
101
- let { id: g = "" } = ce(), { navigate: _ } = e(), { data: v, loading: b, error: R, refetch: z } = ee(g), { data: B, loading: Oe, error: ke, refetch: V } = te(g), [Ae, { loading: je }] = ne(), [Me, { loading: H }] = n(), [Ne, U] = p(!1), [W, Pe] = p(""), [Fe, Ie] = p("INGEST"), [G, Le] = p(""), [K, Re] = p(""), q = v?.cosRun;
102
- ae(q ? {
101
+ function L() {
102
+ let { id: h = "" } = ue(), { navigate: g } = e(), { data: _, loading: y, error: L, refetch: R } = ee(h), { data: z, loading: Ae, error: je, refetch: B } = te(h), [Me, { loading: Ne }] = ne(), [Pe, { loading: V }] = n(), [Fe, H] = f(!1), [U, W] = f(""), [Ie, Le] = f("INGEST"), [G, Re] = f(""), [K, ze] = f(""), q = _?.cosRun;
103
+ oe(q ? {
103
104
  type: "run",
104
105
  id: q.id,
105
106
  name: q.pipeline ? `${q.pipeline.name} #${q.runNumber}` : `#${q.runNumber}`,
106
107
  path: `runs/${encodeURIComponent(q.id)}`
107
108
  } : null);
108
- let J = f(() => [...B?.cosListRunSteps ?? []].sort((e, t) => e.position - t.position), [B]), { data: ze } = r(q?.datasetId), Be = ze?.cosDataset?.name ?? null, Ve = q?.status === "FAILED", { data: Y, loading: He, error: Ue, refetch: We } = i(q?.pipelineId, { skip: !Ve }), X = f(() => F(J), [J]), Z = f(() => (Y?.cosListRuns.items ?? []).filter((e) => e.id !== q?.id).map((e) => {
109
- let t = F(e.steps);
109
+ let J = d(() => [...z?.cosListRunSteps ?? []].sort((e, t) => e.position - t.position), [z]), { data: Be } = r(q?.datasetId), Ve = Be?.cosDataset?.name ?? null, Y = q?.status === "FAILED", { data: He, loading: Ue, error: We, refetch: Ge } = i(q?.pipelineId, { skip: !Y }), X = d(() => P(J), [J]), Z = d(() => (He?.cosListRuns.items ?? []).filter((e) => e.id !== q?.id).map((e) => {
110
+ let t = P(e.steps);
110
111
  return {
111
112
  id: e.id,
112
113
  runNumber: e.runNumber,
@@ -116,21 +117,21 @@ function R() {
116
117
  sameStep: X !== null && t !== null && t.name === X.name
117
118
  };
118
119
  }).slice(0, 8), [
119
- Y,
120
+ He,
120
121
  q?.id,
121
122
  X
122
- ]), Ge = async (e) => {
123
+ ]), Ke = async (e) => {
123
124
  if (!q) return;
124
- let n = await Ae({ variables: {
125
+ let n = await Me({ variables: {
125
126
  id: q.id,
126
127
  status: e
127
128
  } });
128
- d(n, n.data?.cosTransitionRun?.id, "Could not update the run") && (t.success("Run updated", `Run #${q.runNumber} moved to ${u(e)}.`), await Promise.all([z(), V()]));
129
+ ce(n, n.data?.cosTransitionRun?.id, "Could not update the run") && (t.success("Run updated", `Run #${q.runNumber} moved to ${u(e)}.`), await Promise.all([R(), B()]));
129
130
  }, Q = () => {
130
- Pe(""), Ie("INGEST"), Le(""), Re("");
131
- }, Ke = async () => {
131
+ W(""), Le("INGEST"), Re(""), ze("");
132
+ }, qe = async () => {
132
133
  if (!q) return;
133
- if (!W.trim()) {
134
+ if (!U.trim()) {
134
135
  t.error("Step name is required", "Give the step a name before adding it.");
135
136
  return;
136
137
  }
@@ -140,7 +141,7 @@ function R() {
140
141
  if (typeof t != "object" || !t || Array.isArray(t)) throw Error("Inputs must be a JSON object.");
141
142
  e = t;
142
143
  } catch (e) {
143
- t.error("Invalid inputs JSON", oe(e) ?? "Please provide valid JSON.");
144
+ t.error("Invalid inputs JSON", se(e) ?? "Please provide valid JSON.");
144
145
  return;
145
146
  }
146
147
  let n = G.trim() ? Number(G.trim()) : void 0;
@@ -148,392 +149,396 @@ function R() {
148
149
  t.error("Invalid position", "Position must be a non-negative number.");
149
150
  return;
150
151
  }
151
- let r = await Me({ variables: { input: {
152
+ let r = await Pe({ variables: { input: {
152
153
  runId: q.id,
153
- name: W.trim(),
154
- kind: Fe,
154
+ name: U.trim(),
155
+ kind: Ie,
155
156
  inputs: e,
156
157
  position: n
157
158
  } } });
158
- d(r, r.data?.cosAddRunStep?.id, "Could not add the step") && (t.success("Step added", `“${W.trim()}” was added to the run.`), U(!1), Q(), await V());
159
+ ce(r, r.data?.cosAddRunStep?.id, "Could not add the step") && (t.success("Step added", `“${U.trim()}” was added to the run.`), H(!1), Q(), await B());
159
160
  };
160
- if (b) return /* @__PURE__ */ m(c, {
161
+ if (y) return /* @__PURE__ */ p(c, {
161
162
  title: "Run",
162
163
  backPath: "runs",
163
- children: /* @__PURE__ */ m(s, { label: "Loading run…" })
164
+ children: /* @__PURE__ */ p(s, { label: "Loading run…" })
164
165
  });
165
- if (R) return /* @__PURE__ */ m(c, {
166
+ if (L) return /* @__PURE__ */ p(c, {
166
167
  title: "Run",
167
168
  backPath: "runs",
168
- children: /* @__PURE__ */ m(o, { onRetry: () => void z() })
169
+ children: /* @__PURE__ */ p(o, { onRetry: () => void R() })
169
170
  });
170
- if (!q) return /* @__PURE__ */ m(c, {
171
+ if (!q) return /* @__PURE__ */ p(c, {
171
172
  title: "Run",
172
173
  backPath: "runs",
173
- children: /* @__PURE__ */ m(a, {
174
+ children: /* @__PURE__ */ p(a, {
174
175
  title: "Run not found",
175
176
  description: "This run may have been removed or you may not have access to it.",
176
- action: /* @__PURE__ */ m(S, {
177
+ action: /* @__PURE__ */ p(x, {
177
178
  type: "button",
178
179
  variant: "outline",
179
- onClick: () => _("runs"),
180
+ onClick: () => g("runs"),
180
181
  children: "Back to runs"
181
182
  })
182
183
  })
183
184
  });
184
- let $ = De[q.status] ?? [];
185
- return /* @__PURE__ */ h(c, {
185
+ let $ = ke[q.status] ?? [];
186
+ return /* @__PURE__ */ m(c, {
186
187
  title: `Run #${q.runNumber}`,
187
188
  description: q.pipeline ? `Pipeline: ${q.pipeline.name}` : void 0,
188
189
  backPath: "runs",
189
- actions: /* @__PURE__ */ h("div", {
190
+ actions: /* @__PURE__ */ m("div", {
190
191
  className: "flex flex-wrap items-center gap-2",
191
- children: [$.map((e) => /* @__PURE__ */ m(S, {
192
+ children: [$.map((e) => /* @__PURE__ */ p(x, {
192
193
  type: "button",
193
194
  variant: e === "CANCELLED" || e === "FAILED" ? "outline" : "default",
194
- onClick: () => void Ge(e),
195
- disabled: je,
195
+ onClick: () => void Ke(e),
196
+ disabled: Ne,
196
197
  children: `Mark ${u(e)}`
197
- }, e)), /* @__PURE__ */ h(S, {
198
+ }, e)), /* @__PURE__ */ m(x, {
198
199
  type: "button",
199
200
  variant: "outline",
200
- onClick: () => U(!0),
201
- children: [/* @__PURE__ */ m(y, { className: "size-4" }), "Add step"]
201
+ onClick: () => H(!0),
202
+ children: [/* @__PURE__ */ p(v, { className: "size-4" }), "Add step"]
202
203
  })]
203
204
  }),
204
- children: [/* @__PURE__ */ h("div", {
205
+ children: [/* @__PURE__ */ m("div", {
205
206
  className: "space-y-6",
206
207
  children: [
207
- /* @__PURE__ */ h(C, { children: [/* @__PURE__ */ m(T, { children: /* @__PURE__ */ m(E, { children: "Overview" }) }), /* @__PURE__ */ h(w, { children: [
208
- /* @__PURE__ */ m(I, {
208
+ /* @__PURE__ */ m(S, { children: [/* @__PURE__ */ p(w, { children: /* @__PURE__ */ p(T, { children: "Overview" }) }), /* @__PURE__ */ m(C, { children: [
209
+ /* @__PURE__ */ p(F, {
209
210
  label: "Status",
210
- children: /* @__PURE__ */ m(l, { status: q.status })
211
+ children: /* @__PURE__ */ p(l, { status: q.status })
211
212
  }),
212
- /* @__PURE__ */ m(I, {
213
+ /* @__PURE__ */ p(F, {
213
214
  label: "Pipeline",
214
- children: q.pipeline ? /* @__PURE__ */ m("button", {
215
+ children: q.pipeline ? /* @__PURE__ */ p("button", {
215
216
  type: "button",
216
217
  className: "text-text-primary underline-offset-2 hover:underline",
217
- onClick: () => _(`pipelines/${q.pipelineId}`),
218
+ onClick: () => g(`pipelines/${q.pipelineId}`),
218
219
  children: q.pipeline.name
219
- }) : /* @__PURE__ */ m("span", {
220
+ }) : /* @__PURE__ */ p("span", {
220
221
  className: "font-mono text-xs",
221
222
  children: q.pipelineId
222
223
  })
223
224
  }),
224
- /* @__PURE__ */ m(I, {
225
+ /* @__PURE__ */ p(F, {
225
226
  label: "Dataset",
226
- children: q.datasetId ? /* @__PURE__ */ m("button", {
227
+ children: q.datasetId ? /* @__PURE__ */ p("button", {
227
228
  type: "button",
228
229
  className: "text-text-primary underline-offset-2 hover:underline",
229
- onClick: () => _(`datasets/${q.datasetId}`),
230
- children: Be ?? /* @__PURE__ */ m("span", {
230
+ onClick: () => g(`datasets/${q.datasetId}`),
231
+ children: Ve ?? /* @__PURE__ */ p("span", {
231
232
  className: "font-mono text-xs",
232
233
  children: q.datasetId
233
234
  })
234
235
  }) : "—"
235
236
  }),
236
- q.pipeline ? /* @__PURE__ */ m(I, {
237
+ q.pipeline ? /* @__PURE__ */ p(F, {
237
238
  label: "Pipeline trigger",
238
- children: /* @__PURE__ */ h("span", {
239
+ children: /* @__PURE__ */ m("span", {
239
240
  className: "inline-flex flex-wrap items-center gap-2",
240
- children: [/* @__PURE__ */ m(l, {
241
+ children: [/* @__PURE__ */ p(l, {
241
242
  status: q.pipeline.trigger,
242
243
  tone: "neutral"
243
- }), q.pipeline.trigger === "SCHEDULED" && q.pipeline.schedule ? /* @__PURE__ */ m("span", {
244
+ }), q.pipeline.trigger === "SCHEDULED" && q.pipeline.schedule ? /* @__PURE__ */ p("span", {
244
245
  className: "font-mono text-xs text-text-secondary",
245
246
  children: q.pipeline.schedule
246
247
  }) : null]
247
248
  })
248
249
  }) : null,
249
- /* @__PURE__ */ m(I, {
250
+ /* @__PURE__ */ p(F, {
250
251
  label: "Triggered by",
251
252
  children: q.triggeredBy || "—"
252
253
  }),
253
- /* @__PURE__ */ m(I, {
254
+ /* @__PURE__ */ p(F, {
254
255
  label: "Started",
255
- children: N(q.startedAt)
256
+ children: M(q.startedAt)
256
257
  }),
257
- /* @__PURE__ */ m(I, {
258
+ /* @__PURE__ */ p(F, {
258
259
  label: "Finished",
259
- children: N(q.finishedAt)
260
+ children: M(q.finishedAt)
260
261
  }),
261
- /* @__PURE__ */ m(I, {
262
+ /* @__PURE__ */ p(F, {
262
263
  label: "Duration",
263
- children: P(q.durationMs)
264
+ children: N(q.durationMs)
264
265
  }),
265
- q.errorMessage ? /* @__PURE__ */ m(I, {
266
+ q.errorMessage ? /* @__PURE__ */ p(F, {
266
267
  label: "Error",
267
- children: /* @__PURE__ */ m("span", {
268
+ children: /* @__PURE__ */ p("span", {
268
269
  className: "text-status-error-text",
269
270
  children: q.errorMessage
270
271
  })
271
272
  }) : null,
272
- $.length === 0 ? /* @__PURE__ */ m(I, {
273
+ $.length === 0 ? /* @__PURE__ */ p(F, {
273
274
  label: "Discuss",
274
- children: /* @__PURE__ */ m(ie, {
275
+ children: /* @__PURE__ */ p(ie, {
275
276
  href: "/conversations",
276
277
  className: "text-text-primary underline-offset-2 hover:underline",
277
278
  children: "Open discussions"
278
279
  })
279
280
  }) : null
280
281
  ] })] }),
281
- /* @__PURE__ */ h("div", {
282
+ /* @__PURE__ */ m("div", {
282
283
  className: "grid grid-cols-1 gap-6 lg:grid-cols-2",
283
- children: [/* @__PURE__ */ h(C, { children: [/* @__PURE__ */ m(T, { children: /* @__PURE__ */ m(E, { children: "Parameters" }) }), /* @__PURE__ */ m(w, { children: /* @__PURE__ */ m(L, { value: q.params }) })] }), /* @__PURE__ */ h(C, { children: [/* @__PURE__ */ m(T, { children: /* @__PURE__ */ m(E, { children: "Metrics" }) }), /* @__PURE__ */ m(w, { children: /* @__PURE__ */ m(L, { value: q.metrics }) })] })]
284
+ children: [/* @__PURE__ */ m(S, { children: [/* @__PURE__ */ p(w, { children: /* @__PURE__ */ p(T, { children: "Parameters" }) }), /* @__PURE__ */ p(C, { children: /* @__PURE__ */ p(I, { value: q.params }) })] }), /* @__PURE__ */ m(S, { children: [/* @__PURE__ */ p(w, { children: /* @__PURE__ */ p(T, { children: "Metrics" }) }), /* @__PURE__ */ p(C, { children: /* @__PURE__ */ p(I, { value: q.metrics }) })] })]
285
+ }),
286
+ /* @__PURE__ */ p(ae, {
287
+ run: q,
288
+ onChanged: () => void Promise.all([R(), B()])
284
289
  }),
285
- /* @__PURE__ */ h(C, { children: [/* @__PURE__ */ m(T, { children: /* @__PURE__ */ m(E, { children: "Steps" }) }), /* @__PURE__ */ m(w, { children: Oe ? /* @__PURE__ */ m(s, {
290
+ /* @__PURE__ */ m(S, { children: [/* @__PURE__ */ p(w, { children: /* @__PURE__ */ p(T, { children: "Steps" }) }), /* @__PURE__ */ p(C, { children: Ae ? /* @__PURE__ */ p(s, {
286
291
  variant: "rows",
287
292
  rows: 4,
288
293
  label: "Loading steps…"
289
- }) : ke ? /* @__PURE__ */ m(o, {
294
+ }) : je ? /* @__PURE__ */ p(o, {
290
295
  message: "Could not load steps.",
291
- onRetry: () => void V()
292
- }) : J.length === 0 ? /* @__PURE__ */ m(a, {
293
- icon: le,
296
+ onRetry: () => void B()
297
+ }) : J.length === 0 ? /* @__PURE__ */ p(a, {
298
+ icon: de,
294
299
  title: "No steps yet",
295
300
  description: "Add steps to record the ingest, calibration, transform, analyze or export stages of this run.",
296
- action: /* @__PURE__ */ h(S, {
301
+ action: /* @__PURE__ */ m(x, {
297
302
  type: "button",
298
- onClick: () => U(!0),
299
- children: [/* @__PURE__ */ m(y, { className: "size-4" }), "Add step"]
303
+ onClick: () => H(!0),
304
+ children: [/* @__PURE__ */ p(v, { className: "size-4" }), "Add step"]
300
305
  })
301
- }) : /* @__PURE__ */ m("ol", {
306
+ }) : /* @__PURE__ */ p("ol", {
302
307
  className: "flex flex-col",
303
308
  children: J.map((e, t) => {
304
- let n = M[e.status] ?? M.QUEUED, r = n.icon, i = t === J.length - 1;
305
- return /* @__PURE__ */ h("li", {
309
+ let n = j[e.status] ?? j.QUEUED, r = n.icon, i = t === J.length - 1;
310
+ return /* @__PURE__ */ m("li", {
306
311
  className: "flex gap-4",
307
- children: [/* @__PURE__ */ h("div", {
312
+ children: [/* @__PURE__ */ m("div", {
308
313
  className: "flex flex-col items-center",
309
- children: [/* @__PURE__ */ m("span", {
314
+ children: [/* @__PURE__ */ p("span", {
310
315
  className: `flex size-8 shrink-0 items-center justify-center rounded-full border ${n.wrap}`,
311
- children: /* @__PURE__ */ m(r, {
316
+ children: /* @__PURE__ */ p(r, {
312
317
  className: `size-4 ${n.spin ? "animate-spin" : ""}`,
313
318
  "aria-hidden": "true"
314
319
  })
315
- }), i ? null : /* @__PURE__ */ m("span", {
320
+ }), i ? null : /* @__PURE__ */ p("span", {
316
321
  className: "w-px flex-1 bg-border-default",
317
322
  "aria-hidden": "true"
318
323
  })]
319
- }), /* @__PURE__ */ h("div", {
324
+ }), /* @__PURE__ */ m("div", {
320
325
  className: `min-w-0 flex-1 rounded-card border border-border-default bg-bg-elevated p-4 ${i ? "" : "mb-4"}`,
321
326
  children: [
322
- /* @__PURE__ */ h("div", {
327
+ /* @__PURE__ */ m("div", {
323
328
  className: "flex flex-wrap items-center gap-2",
324
329
  children: [
325
- /* @__PURE__ */ h("span", {
330
+ /* @__PURE__ */ m("span", {
326
331
  className: "text-xs font-semibold tabular-nums text-text-secondary",
327
332
  children: [t + 1, "."]
328
333
  }),
329
- /* @__PURE__ */ m("span", {
334
+ /* @__PURE__ */ p("span", {
330
335
  className: "min-w-0 truncate font-medium text-text-primary",
331
336
  children: e.name
332
337
  }),
333
- /* @__PURE__ */ m(l, {
338
+ /* @__PURE__ */ p(l, {
334
339
  status: e.kind,
335
340
  tone: "neutral"
336
341
  }),
337
- /* @__PURE__ */ m(l, {
342
+ /* @__PURE__ */ p(l, {
338
343
  status: e.status,
339
344
  className: "ml-auto"
340
345
  })
341
346
  ]
342
347
  }),
343
- e.errorMessage ? /* @__PURE__ */ m("p", {
348
+ e.errorMessage ? /* @__PURE__ */ p("p", {
344
349
  className: "mt-1.5 text-xs text-status-error-text",
345
350
  children: e.errorMessage
346
351
  }) : null,
347
- /* @__PURE__ */ h("p", {
352
+ /* @__PURE__ */ m("p", {
348
353
  className: "mt-1.5 text-xs text-text-secondary",
349
- children: ["Duration: ", P(e.durationMs)]
354
+ children: ["Duration: ", N(e.durationMs)]
350
355
  })
351
356
  ]
352
357
  })]
353
358
  }, e.id);
354
359
  })
355
360
  }) })] }),
356
- Ve ? /* @__PURE__ */ h(C, { children: [/* @__PURE__ */ h(T, { children: [/* @__PURE__ */ m(E, { children: "Similar failures" }), /* @__PURE__ */ m("p", {
361
+ Y ? /* @__PURE__ */ m(S, { children: [/* @__PURE__ */ m(w, { children: [/* @__PURE__ */ p(T, { children: "Similar failures" }), /* @__PURE__ */ p("p", {
357
362
  className: "text-sm text-text-secondary",
358
363
  children: X ? `Other runs of this pipeline that ended in Failed. “Same step” marks the ones that broke at “${X.name}” too.` : "Other runs of this pipeline that ended in Failed."
359
- })] }), /* @__PURE__ */ m(w, { children: He ? /* @__PURE__ */ m(s, {
364
+ })] }), /* @__PURE__ */ p(C, { children: Ue ? /* @__PURE__ */ p(s, {
360
365
  variant: "rows",
361
366
  rows: 3,
362
367
  label: "Loading failure history…"
363
- }) : Ue ? /* @__PURE__ */ m(o, {
368
+ }) : We ? /* @__PURE__ */ p(o, {
364
369
  message: "Could not load the pipeline's failure history.",
365
- onRetry: () => void We()
366
- }) : Z.length === 0 ? /* @__PURE__ */ m(a, {
367
- icon: ue,
370
+ onRetry: () => void Ge()
371
+ }) : Z.length === 0 ? /* @__PURE__ */ p(a, {
372
+ icon: fe,
368
373
  title: "No other failed runs",
369
374
  description: "This is the only run of this pipeline that has failed so far."
370
- }) : /* @__PURE__ */ h(se, { children: [/* @__PURE__ */ m("div", {
375
+ }) : /* @__PURE__ */ m(le, { children: [/* @__PURE__ */ p("div", {
371
376
  className: "hidden overflow-hidden rounded-card border border-border-default md:block",
372
- children: /* @__PURE__ */ h(Se, { children: [/* @__PURE__ */ m(we, { children: /* @__PURE__ */ h(j, { children: [
373
- /* @__PURE__ */ m(A, { children: "Run" }),
374
- /* @__PURE__ */ m(A, { children: "Step" }),
375
- /* @__PURE__ */ m(A, { children: "Error" }),
376
- /* @__PURE__ */ m(A, { children: "When" })
377
- ] }) }), /* @__PURE__ */ m(Ce, { children: Z.map((e) => /* @__PURE__ */ h(j, {
377
+ children: /* @__PURE__ */ m(we, { children: [/* @__PURE__ */ p(Ee, { children: /* @__PURE__ */ m(A, { children: [
378
+ /* @__PURE__ */ p(k, { children: "Run" }),
379
+ /* @__PURE__ */ p(k, { children: "Step" }),
380
+ /* @__PURE__ */ p(k, { children: "Error" }),
381
+ /* @__PURE__ */ p(k, { children: "When" })
382
+ ] }) }), /* @__PURE__ */ p(Te, { children: Z.map((e) => /* @__PURE__ */ m(A, {
378
383
  className: "cursor-pointer",
379
- onClick: () => _(`runs/${e.id}`),
384
+ onClick: () => g(`runs/${e.id}`),
380
385
  children: [
381
- /* @__PURE__ */ h(k, {
386
+ /* @__PURE__ */ m(O, {
382
387
  className: "whitespace-nowrap font-medium text-text-primary",
383
388
  children: ["Run #", e.runNumber]
384
389
  }),
385
- /* @__PURE__ */ m(k, { children: e.step ? /* @__PURE__ */ h("span", {
390
+ /* @__PURE__ */ p(O, { children: e.step ? /* @__PURE__ */ m("span", {
386
391
  className: "inline-flex flex-wrap items-center gap-1.5",
387
392
  children: [
388
- /* @__PURE__ */ m("span", {
393
+ /* @__PURE__ */ p("span", {
389
394
  className: "text-sm text-text-primary",
390
395
  children: e.step.name
391
396
  }),
392
- /* @__PURE__ */ m(l, {
397
+ /* @__PURE__ */ p(l, {
393
398
  status: e.step.kind,
394
399
  tone: "neutral"
395
400
  }),
396
- e.sameStep ? /* @__PURE__ */ m(x, {
401
+ e.sameStep ? /* @__PURE__ */ p(b, {
397
402
  variant: "outline",
398
403
  className: "border-status-warning-border bg-status-warning-bg-subtle text-xs text-status-warning-text",
399
404
  children: "Same step"
400
405
  }) : null
401
406
  ]
402
- }) : /* @__PURE__ */ m("span", {
407
+ }) : /* @__PURE__ */ p("span", {
403
408
  className: "text-sm text-text-secondary",
404
409
  children: "Not recorded"
405
410
  }) }),
406
- /* @__PURE__ */ m(k, {
411
+ /* @__PURE__ */ p(O, {
407
412
  className: "max-w-md text-sm text-text-secondary",
408
- children: /* @__PURE__ */ m("span", {
413
+ children: /* @__PURE__ */ p("span", {
409
414
  className: "line-clamp-2",
410
415
  children: e.error ?? "—"
411
416
  })
412
417
  }),
413
- /* @__PURE__ */ m(k, {
418
+ /* @__PURE__ */ p(O, {
414
419
  className: "whitespace-nowrap text-sm text-text-secondary",
415
- children: N(e.when)
420
+ children: M(e.when)
416
421
  })
417
422
  ]
418
423
  }, e.id)) })] })
419
- }), /* @__PURE__ */ m("ul", {
424
+ }), /* @__PURE__ */ p("ul", {
420
425
  className: "space-y-3 md:hidden",
421
- children: Z.map((e) => /* @__PURE__ */ m("li", { children: /* @__PURE__ */ h("button", {
426
+ children: Z.map((e) => /* @__PURE__ */ p("li", { children: /* @__PURE__ */ m("button", {
422
427
  type: "button",
423
- onClick: () => _(`runs/${e.id}`),
428
+ onClick: () => g(`runs/${e.id}`),
424
429
  className: "flex w-full flex-col gap-2 rounded-card border border-border-default bg-bg-elevated p-4 text-left transition-colors hover:bg-bg-sunken focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-border-focus",
425
430
  children: [
426
- /* @__PURE__ */ h("div", {
431
+ /* @__PURE__ */ m("div", {
427
432
  className: "flex flex-wrap items-center gap-1.5",
428
433
  children: [
429
- /* @__PURE__ */ h("span", {
434
+ /* @__PURE__ */ m("span", {
430
435
  className: "font-medium text-text-primary",
431
436
  children: ["Run #", e.runNumber]
432
437
  }),
433
- e.step ? /* @__PURE__ */ m(l, {
438
+ e.step ? /* @__PURE__ */ p(l, {
434
439
  status: e.step.kind,
435
440
  tone: "neutral"
436
441
  }) : null,
437
- e.sameStep ? /* @__PURE__ */ m(x, {
442
+ e.sameStep ? /* @__PURE__ */ p(b, {
438
443
  variant: "outline",
439
444
  className: "border-status-warning-border bg-status-warning-bg-subtle text-xs text-status-warning-text",
440
445
  children: "Same step"
441
446
  }) : null
442
447
  ]
443
448
  }),
444
- /* @__PURE__ */ m("p", {
449
+ /* @__PURE__ */ p("p", {
445
450
  className: "text-sm text-text-primary",
446
451
  children: e.step ? e.step.name : "Step not recorded"
447
452
  }),
448
- /* @__PURE__ */ m("p", {
453
+ /* @__PURE__ */ p("p", {
449
454
  className: "text-xs text-text-secondary",
450
455
  children: e.error ?? "—"
451
456
  }),
452
- /* @__PURE__ */ m("p", {
457
+ /* @__PURE__ */ p("p", {
453
458
  className: "text-xs text-text-tertiary",
454
- children: N(e.when)
459
+ children: M(e.when)
455
460
  })
456
461
  ]
457
462
  }) }, e.id))
458
463
  })] }) })] }) : null,
459
- /* @__PURE__ */ h(C, { children: [/* @__PURE__ */ m(T, { children: /* @__PURE__ */ m(E, { children: "Activity" }) }), /* @__PURE__ */ m(w, { children: /* @__PURE__ */ m(re, {
464
+ /* @__PURE__ */ m(S, { children: [/* @__PURE__ */ p(w, { children: /* @__PURE__ */ p(T, { children: "Activity" }) }), /* @__PURE__ */ p(C, { children: /* @__PURE__ */ p(re, {
460
465
  resourceId: q.id,
461
466
  resourceType: "cosmicintersection-run"
462
467
  }) })] })
463
468
  ]
464
- }), /* @__PURE__ */ m(de, {
465
- open: Ne,
469
+ }), /* @__PURE__ */ p(pe, {
470
+ open: Fe,
466
471
  onOpenChange: (e) => {
467
- H || (U(e), e || Q());
472
+ V || (H(e), e || Q());
468
473
  },
469
- children: /* @__PURE__ */ h(fe, { children: [
470
- /* @__PURE__ */ h(he, { children: [/* @__PURE__ */ m(ge, { children: "Add step" }), /* @__PURE__ */ m(pe, { children: "Record a stage of this run — its kind, order and optional inputs." })] }),
471
- /* @__PURE__ */ h("div", {
474
+ children: /* @__PURE__ */ m(me, { children: [
475
+ /* @__PURE__ */ m(_e, { children: [/* @__PURE__ */ p(ve, { children: "Add step" }), /* @__PURE__ */ p(he, { children: "Record a stage of this run — its kind, order and optional inputs." })] }),
476
+ /* @__PURE__ */ m("div", {
472
477
  className: "space-y-4",
473
478
  children: [
474
- /* @__PURE__ */ h("div", {
479
+ /* @__PURE__ */ m("div", {
475
480
  className: "space-y-1",
476
- children: [/* @__PURE__ */ m(O, {
481
+ children: [/* @__PURE__ */ p(D, {
477
482
  htmlFor: "step-name",
478
483
  children: "Name"
479
- }), /* @__PURE__ */ m(D, {
484
+ }), /* @__PURE__ */ p(E, {
480
485
  id: "step-name",
481
- value: W,
482
- onChange: (e) => Pe(e.target.value),
486
+ value: U,
487
+ onChange: (e) => W(e.target.value),
483
488
  placeholder: "e.g. Calibrate flat fields"
484
489
  })]
485
490
  }),
486
- /* @__PURE__ */ h("div", {
491
+ /* @__PURE__ */ m("div", {
487
492
  className: "grid grid-cols-1 gap-4 sm:grid-cols-2",
488
- children: [/* @__PURE__ */ h("div", {
493
+ children: [/* @__PURE__ */ m("div", {
489
494
  className: "space-y-1",
490
- children: [/* @__PURE__ */ m(O, {
495
+ children: [/* @__PURE__ */ p(D, {
491
496
  htmlFor: "step-kind",
492
497
  children: "Kind"
493
- }), /* @__PURE__ */ h(_e, {
494
- value: Fe,
495
- onValueChange: (e) => Ie(e),
496
- children: [/* @__PURE__ */ m(be, {
498
+ }), /* @__PURE__ */ m(ye, {
499
+ value: Ie,
500
+ onValueChange: (e) => Le(e),
501
+ children: [/* @__PURE__ */ p(Se, {
497
502
  id: "step-kind",
498
503
  "aria-label": "Step kind",
499
- children: /* @__PURE__ */ m(xe, {})
500
- }), /* @__PURE__ */ m(ve, { children: Ee.map((e) => /* @__PURE__ */ m(ye, {
504
+ children: /* @__PURE__ */ p(Ce, {})
505
+ }), /* @__PURE__ */ p(be, { children: Oe.map((e) => /* @__PURE__ */ p(xe, {
501
506
  value: e,
502
507
  children: u(e)
503
508
  }, e)) })]
504
509
  })]
505
- }), /* @__PURE__ */ h("div", {
510
+ }), /* @__PURE__ */ m("div", {
506
511
  className: "space-y-1",
507
- children: [/* @__PURE__ */ m(O, {
512
+ children: [/* @__PURE__ */ p(D, {
508
513
  htmlFor: "step-position",
509
514
  children: "Position"
510
- }), /* @__PURE__ */ m(D, {
515
+ }), /* @__PURE__ */ p(E, {
511
516
  id: "step-position",
512
517
  type: "number",
513
518
  min: "0",
514
519
  value: G,
515
- onChange: (e) => Le(e.target.value),
520
+ onChange: (e) => Re(e.target.value),
516
521
  placeholder: "Auto"
517
522
  })]
518
523
  })]
519
524
  }),
520
- /* @__PURE__ */ h("div", {
525
+ /* @__PURE__ */ m("div", {
521
526
  className: "space-y-1",
522
527
  children: [
523
- /* @__PURE__ */ m(O, {
528
+ /* @__PURE__ */ p(D, {
524
529
  htmlFor: "step-inputs",
525
530
  children: "Inputs (JSON)"
526
531
  }),
527
- /* @__PURE__ */ m(Te, {
532
+ /* @__PURE__ */ p(De, {
528
533
  id: "step-inputs",
529
534
  value: K,
530
- onChange: (e) => Re(e.target.value),
535
+ onChange: (e) => ze(e.target.value),
531
536
  rows: 4,
532
537
  spellCheck: !1,
533
538
  className: "font-mono text-xs",
534
539
  placeholder: "{\n \"source\": \"raw-frames\"\n}"
535
540
  }),
536
- /* @__PURE__ */ m("p", {
541
+ /* @__PURE__ */ p("p", {
537
542
  className: "text-xs text-text-secondary",
538
543
  children: "Optional. A JSON object of step inputs."
539
544
  })
@@ -541,25 +546,25 @@ function R() {
541
546
  })
542
547
  ]
543
548
  }),
544
- /* @__PURE__ */ h(me, { children: [/* @__PURE__ */ m(S, {
549
+ /* @__PURE__ */ m(ge, { children: [/* @__PURE__ */ p(x, {
545
550
  type: "button",
546
551
  variant: "outline",
547
552
  onClick: () => {
548
- U(!1), Q();
553
+ H(!1), Q();
549
554
  },
550
- disabled: H,
555
+ disabled: V,
551
556
  children: "Cancel"
552
- }), /* @__PURE__ */ h(S, {
557
+ }), /* @__PURE__ */ m(x, {
553
558
  type: "button",
554
- onClick: () => void Ke(),
555
- disabled: H,
556
- children: [/* @__PURE__ */ m(y, { className: "size-4" }), H ? "Adding…" : "Add step"]
559
+ onClick: () => void qe(),
560
+ disabled: V,
561
+ children: [/* @__PURE__ */ p(v, { className: "size-4" }), V ? "Adding…" : "Add step"]
557
562
  })] })
558
563
  ] })
559
564
  })]
560
565
  });
561
566
  }
562
567
  //#endregion
563
- export { R as default };
568
+ export { L as default };
564
569
 
565
570
  //# sourceMappingURL=RunDetailPage.js.map