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