@burdenoff/microfe-bigconsole 2026.1101.1 → 2026.1102.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.
- package/dist/bigconsole/components/pipeline/PipelineRunHistory.d.ts +15 -0
- package/dist/bigconsole/components/pipeline/PipelineRunHistory.js +270 -0
- package/dist/bigconsole/hooks/usePipelineOperations.d.ts +2 -1
- package/dist/bigconsole/pages/PipelineBuilderPage.js +307 -306
- package/dist/bigconsole/pages/PipelineViewPage.js +201 -310
- package/dist/bigconsole/utils/pipelineExecutionTimeline.d.ts +47 -0
- package/dist/bigconsole/utils/pipelineExecutionTimeline.js +87 -0
- package/dist/bigconsole/utils/pipelineStages.d.ts +41 -0
- package/dist/bigconsole/utils/pipelineStages.js +49 -0
- package/package.json +1 -1
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import { PipelineExecution, PipelineStage } from '../../types';
|
|
2
|
+
export interface PipelineRunHistoryListProps {
|
|
3
|
+
/** Runs of this pipeline, newest first. */
|
|
4
|
+
executions: readonly PipelineExecution[];
|
|
5
|
+
selectedId: string | null;
|
|
6
|
+
onSelect: (execution: PipelineExecution) => void;
|
|
7
|
+
currentActorId: string | null | undefined;
|
|
8
|
+
}
|
|
9
|
+
export declare const PipelineRunHistoryList: import('react').NamedExoticComponent<PipelineRunHistoryListProps>;
|
|
10
|
+
export interface PipelineStageTimelineProps {
|
|
11
|
+
execution: PipelineExecution;
|
|
12
|
+
stages: readonly PipelineStage[] | null | undefined;
|
|
13
|
+
currentActorId: string | null | undefined;
|
|
14
|
+
}
|
|
15
|
+
export declare const PipelineStageTimeline: import('react').NamedExoticComponent<PipelineStageTimelineProps>;
|
|
@@ -0,0 +1,270 @@
|
|
|
1
|
+
import { SECTION_FOCUS_RING as e } from "../common/sectionStyles.js";
|
|
2
|
+
import { Section as t } from "../common/Section.js";
|
|
3
|
+
import "../common/index.js";
|
|
4
|
+
import { buildStageTimeline as n, formatDurationMs as r, runDurationMs as i, runStatusTone as a, triggeredByLabel as o } from "../../utils/pipelineExecutionTimeline.js";
|
|
5
|
+
import { memo as s, useMemo as c } from "react";
|
|
6
|
+
import { useI18n as l } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
7
|
+
import { jsx as u, jsxs as d } from "react/jsx-runtime";
|
|
8
|
+
//#region src/bigconsole/components/pipeline/PipelineRunHistory.tsx
|
|
9
|
+
var f = {
|
|
10
|
+
success: "bg-[var(--color-status-success-bgSubtle)] text-[var(--color-status-success-text)] border-[var(--color-status-success-border)]",
|
|
11
|
+
danger: "bg-[var(--color-status-error-bgSubtle)] text-[var(--color-status-error-text)] border-[var(--color-status-error-border)]",
|
|
12
|
+
warning: "bg-[var(--color-status-warning-bgSubtle)] text-[var(--color-status-warning-text)] border-[var(--color-status-warning-border)]",
|
|
13
|
+
info: "bg-[var(--color-status-info-bgSubtle)] text-[var(--color-status-info-text)] border-[var(--color-status-info-border)]",
|
|
14
|
+
neutral: "bg-bg-surface text-text-secondary border-[var(--color-border-subtle)]"
|
|
15
|
+
}, p = {
|
|
16
|
+
success: "bg-[var(--color-status-success-text)]",
|
|
17
|
+
danger: "bg-[var(--color-status-error-text)]",
|
|
18
|
+
warning: "bg-[var(--color-status-warning-text)]",
|
|
19
|
+
info: "bg-[var(--color-status-info-text)]",
|
|
20
|
+
neutral: "bg-[var(--color-border-strong)]"
|
|
21
|
+
}, m = "rounded-button bg-bg-surface px-1.5 py-0.5 font-mono break-all text-text-primary";
|
|
22
|
+
function h({ tone: e, label: t }) {
|
|
23
|
+
return /* @__PURE__ */ u("span", {
|
|
24
|
+
className: `inline-flex items-center whitespace-nowrap rounded-pill border px-2 py-0.5 text-xs font-medium ${f[e]}`,
|
|
25
|
+
children: t
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
function g() {
|
|
29
|
+
let { t: e } = l();
|
|
30
|
+
return (t) => {
|
|
31
|
+
switch (t) {
|
|
32
|
+
case "completed": return e("bigconsole.pipelines.execution.status.completed", "Completed");
|
|
33
|
+
case "failed": return e("bigconsole.pipelines.execution.status.failed", "Failed");
|
|
34
|
+
case "running": return e("bigconsole.pipelines.execution.status.running", "Running");
|
|
35
|
+
case "pending": return e("bigconsole.pipelines.execution.status.pending", "Pending");
|
|
36
|
+
case "success": return e("bigconsole.pipelines.execution.status.success", "Success");
|
|
37
|
+
case "skipped": return e("bigconsole.pipelines.execution.status.skipped", "Skipped");
|
|
38
|
+
default: return t;
|
|
39
|
+
}
|
|
40
|
+
};
|
|
41
|
+
}
|
|
42
|
+
function _(e) {
|
|
43
|
+
if (!e) return "—";
|
|
44
|
+
let t = new Date(e);
|
|
45
|
+
return Number.isNaN(t.getTime()) ? "—" : t.toLocaleString();
|
|
46
|
+
}
|
|
47
|
+
var v = s(function({ executions: n, selectedId: s, onSelect: c, currentActorId: f }) {
|
|
48
|
+
let { t: p } = l(), m = g();
|
|
49
|
+
return /* @__PURE__ */ u(t, {
|
|
50
|
+
headingLevel: 2,
|
|
51
|
+
title: p("bigconsole.pipelines.execution.historyHeading", "Previous runs"),
|
|
52
|
+
meta: n.length > 0 ? /* @__PURE__ */ u("span", {
|
|
53
|
+
className: "rounded-pill bg-bg-sunken px-2 py-0.5 text-xs font-medium text-text-secondary",
|
|
54
|
+
children: n.length
|
|
55
|
+
}) : null,
|
|
56
|
+
"data-testid": "pipeline-execution-history",
|
|
57
|
+
children: n.length === 0 ? /* @__PURE__ */ u("p", {
|
|
58
|
+
className: "text-sm text-text-secondary",
|
|
59
|
+
children: p("bigconsole.pipelines.execution.noHistory", "No execution history yet. Test this pipeline with sample input to inspect its stages.")
|
|
60
|
+
}) : /* @__PURE__ */ u("ol", {
|
|
61
|
+
className: "flex flex-col gap-control-gap",
|
|
62
|
+
"aria-label": p("bigconsole.pipelines.execution.runList", "Runs"),
|
|
63
|
+
children: n.map((t) => {
|
|
64
|
+
let n = t.id === s, l = o(t.executedBy, f);
|
|
65
|
+
return /* @__PURE__ */ u("li", { children: /* @__PURE__ */ d("button", {
|
|
66
|
+
type: "button",
|
|
67
|
+
"aria-pressed": n,
|
|
68
|
+
onClick: () => c(t),
|
|
69
|
+
"data-testid": "pipeline-execution-run",
|
|
70
|
+
"data-status": t.status,
|
|
71
|
+
className: `flex w-full min-w-0 flex-col gap-1 rounded-button border p-3 text-left ${e} ${n ? "border-[var(--color-border-strong)] bg-bg-sunken" : "border-[var(--color-border-subtle)] bg-bg-surface"}`,
|
|
72
|
+
children: [
|
|
73
|
+
/* @__PURE__ */ d("span", {
|
|
74
|
+
className: "flex flex-wrap items-center justify-between gap-2 text-sm font-medium text-text-primary",
|
|
75
|
+
children: [/* @__PURE__ */ u(h, {
|
|
76
|
+
tone: a(t.status),
|
|
77
|
+
label: m(t.status)
|
|
78
|
+
}), /* @__PURE__ */ u("span", { children: r(i(t)) })]
|
|
79
|
+
}),
|
|
80
|
+
/* @__PURE__ */ u("span", {
|
|
81
|
+
className: "break-words text-xs text-text-secondary",
|
|
82
|
+
children: _(t.startedAt ?? t.createdAt)
|
|
83
|
+
}),
|
|
84
|
+
/* @__PURE__ */ d("span", {
|
|
85
|
+
className: "flex flex-wrap justify-between gap-2 text-xs text-text-muted",
|
|
86
|
+
children: [/* @__PURE__ */ d("span", { children: [
|
|
87
|
+
p("bigconsole.pipelines.execution.triggeredBy", "By"),
|
|
88
|
+
" ",
|
|
89
|
+
/* @__PURE__ */ u("span", {
|
|
90
|
+
className: "font-mono",
|
|
91
|
+
title: t.executedBy,
|
|
92
|
+
children: l ?? p("bigconsole.pipelines.execution.triggeredByYou", "you")
|
|
93
|
+
})
|
|
94
|
+
] }), /* @__PURE__ */ u("span", { children: p("bigconsole.pipelines.execution.versionShort", "v{{version}}", { version: t.pipelineVersion }) })]
|
|
95
|
+
})
|
|
96
|
+
]
|
|
97
|
+
}) }, t.id);
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
}), y = s(function({ execution: e, stages: s, currentActorId: f }) {
|
|
102
|
+
let { t: v } = l(), y = g(), b = c(() => n(e, s), [e, s]), x = o(e.executedBy, f);
|
|
103
|
+
return /* @__PURE__ */ u(t, {
|
|
104
|
+
emphasis: "primary",
|
|
105
|
+
headingLevel: 2,
|
|
106
|
+
title: v("bigconsole.pipelines.execution.timelineHeading", "Stage timeline"),
|
|
107
|
+
meta: /* @__PURE__ */ u(h, {
|
|
108
|
+
tone: a(e.status),
|
|
109
|
+
label: y(e.status)
|
|
110
|
+
}),
|
|
111
|
+
"data-testid": "pipeline-stage-timeline",
|
|
112
|
+
children: /* @__PURE__ */ d("div", {
|
|
113
|
+
className: "flex flex-col gap-form-gap",
|
|
114
|
+
children: [
|
|
115
|
+
/* @__PURE__ */ d("dl", {
|
|
116
|
+
className: "grid grid-cols-2 gap-form-gap sm:grid-cols-4",
|
|
117
|
+
children: [
|
|
118
|
+
/* @__PURE__ */ d("div", {
|
|
119
|
+
className: "min-w-0",
|
|
120
|
+
children: [/* @__PURE__ */ u("dt", {
|
|
121
|
+
className: "text-xs text-text-muted",
|
|
122
|
+
children: v("bigconsole.pipelines.execution.totalDuration", "Total duration")
|
|
123
|
+
}), /* @__PURE__ */ u("dd", {
|
|
124
|
+
className: "text-text-primary",
|
|
125
|
+
"data-testid": "pipeline-run-duration",
|
|
126
|
+
children: r(i(e))
|
|
127
|
+
})]
|
|
128
|
+
}),
|
|
129
|
+
/* @__PURE__ */ d("div", {
|
|
130
|
+
className: "min-w-0",
|
|
131
|
+
children: [/* @__PURE__ */ u("dt", {
|
|
132
|
+
className: "text-xs text-text-muted",
|
|
133
|
+
children: v("bigconsole.pipelines.execution.started", "Started")
|
|
134
|
+
}), /* @__PURE__ */ u("dd", {
|
|
135
|
+
className: "break-words text-text-primary",
|
|
136
|
+
children: _(e.startedAt)
|
|
137
|
+
})]
|
|
138
|
+
}),
|
|
139
|
+
/* @__PURE__ */ d("div", {
|
|
140
|
+
className: "min-w-0",
|
|
141
|
+
children: [/* @__PURE__ */ u("dt", {
|
|
142
|
+
className: "text-xs text-text-muted",
|
|
143
|
+
children: v("bigconsole.pipelines.execution.finished", "Finished")
|
|
144
|
+
}), /* @__PURE__ */ u("dd", {
|
|
145
|
+
className: "break-words text-text-primary",
|
|
146
|
+
children: _(e.completedAt)
|
|
147
|
+
})]
|
|
148
|
+
}),
|
|
149
|
+
/* @__PURE__ */ d("div", {
|
|
150
|
+
className: "min-w-0",
|
|
151
|
+
children: [/* @__PURE__ */ u("dt", {
|
|
152
|
+
className: "text-xs text-text-muted",
|
|
153
|
+
children: v("bigconsole.pipelines.execution.triggeredByHeading", "Triggered by")
|
|
154
|
+
}), /* @__PURE__ */ u("dd", {
|
|
155
|
+
className: "break-all font-mono text-text-primary",
|
|
156
|
+
title: e.executedBy,
|
|
157
|
+
children: x ?? v("bigconsole.pipelines.execution.triggeredByYou", "you")
|
|
158
|
+
})]
|
|
159
|
+
})
|
|
160
|
+
]
|
|
161
|
+
}),
|
|
162
|
+
/* @__PURE__ */ u("p", {
|
|
163
|
+
className: "text-xs text-text-secondary",
|
|
164
|
+
"data-testid": "pipeline-stage-counts",
|
|
165
|
+
children: v("bigconsole.pipelines.execution.stageCounts", "{{success}} succeeded · {{skipped}} skipped · {{failed}} failed", b.counts)
|
|
166
|
+
}),
|
|
167
|
+
b.rows.length === 0 ? /* @__PURE__ */ u("p", {
|
|
168
|
+
className: "text-sm text-text-secondary",
|
|
169
|
+
children: v("bigconsole.pipelines.execution.noStageResults", "This run recorded no stage results.")
|
|
170
|
+
}) : /* @__PURE__ */ u("ol", {
|
|
171
|
+
className: "flex flex-col gap-control-gap",
|
|
172
|
+
children: b.rows.map((e) => /* @__PURE__ */ d("li", {
|
|
173
|
+
"data-testid": "pipeline-timeline-stage",
|
|
174
|
+
"data-status": e.status,
|
|
175
|
+
className: "min-w-0 rounded-card border border-[var(--color-border-subtle)] bg-bg-sunken p-3",
|
|
176
|
+
children: [
|
|
177
|
+
/* @__PURE__ */ d("div", {
|
|
178
|
+
className: "flex flex-wrap items-center justify-between gap-control-gap",
|
|
179
|
+
children: [/* @__PURE__ */ d("h3", {
|
|
180
|
+
className: "min-w-0 break-words text-sm font-medium text-text-primary",
|
|
181
|
+
children: [
|
|
182
|
+
e.step,
|
|
183
|
+
". ",
|
|
184
|
+
e.name
|
|
185
|
+
]
|
|
186
|
+
}), /* @__PURE__ */ d("span", {
|
|
187
|
+
className: "flex items-center gap-2 text-sm text-text-secondary",
|
|
188
|
+
children: [/* @__PURE__ */ u(h, {
|
|
189
|
+
tone: e.tone,
|
|
190
|
+
label: y(e.status)
|
|
191
|
+
}), /* @__PURE__ */ u("span", { children: r(e.durationMs) })]
|
|
192
|
+
})]
|
|
193
|
+
}),
|
|
194
|
+
/* @__PURE__ */ u("div", {
|
|
195
|
+
className: "relative mt-2 h-2 w-full overflow-hidden rounded-pill bg-bg-surface",
|
|
196
|
+
role: "img",
|
|
197
|
+
"aria-label": v("bigconsole.pipelines.execution.barLabel", "{{name}}: {{duration}}, {{share}}% of stage time", {
|
|
198
|
+
name: e.name,
|
|
199
|
+
duration: r(e.durationMs),
|
|
200
|
+
share: Math.round(e.widthPercent)
|
|
201
|
+
}),
|
|
202
|
+
children: /* @__PURE__ */ u("span", {
|
|
203
|
+
className: `absolute inset-y-0 rounded-pill ${p[e.tone]}`,
|
|
204
|
+
style: {
|
|
205
|
+
left: `${e.offsetPercent}%`,
|
|
206
|
+
width: `${e.widthPercent}%`
|
|
207
|
+
}
|
|
208
|
+
})
|
|
209
|
+
}),
|
|
210
|
+
(e.inputKey || e.outputKey) && /* @__PURE__ */ d("div", {
|
|
211
|
+
className: "mt-2 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-text-secondary",
|
|
212
|
+
children: [
|
|
213
|
+
/* @__PURE__ */ u("span", {
|
|
214
|
+
className: "text-text-muted",
|
|
215
|
+
children: v("bigconsole.pipelines.execution.reads", "Reads")
|
|
216
|
+
}),
|
|
217
|
+
/* @__PURE__ */ u("code", {
|
|
218
|
+
className: m,
|
|
219
|
+
children: e.inputKey ?? "—"
|
|
220
|
+
}),
|
|
221
|
+
/* @__PURE__ */ u("span", {
|
|
222
|
+
"aria-hidden": "true",
|
|
223
|
+
children: "→"
|
|
224
|
+
}),
|
|
225
|
+
/* @__PURE__ */ u("span", {
|
|
226
|
+
className: "text-text-muted",
|
|
227
|
+
children: v("bigconsole.pipelines.execution.writes", "writes")
|
|
228
|
+
}),
|
|
229
|
+
/* @__PURE__ */ u("code", {
|
|
230
|
+
className: m,
|
|
231
|
+
children: e.outputKey ?? "—"
|
|
232
|
+
})
|
|
233
|
+
]
|
|
234
|
+
}),
|
|
235
|
+
e.error && /* @__PURE__ */ u("p", {
|
|
236
|
+
className: "mt-2 break-words text-sm text-status-error-text",
|
|
237
|
+
"data-testid": "pipeline-timeline-error",
|
|
238
|
+
children: e.error
|
|
239
|
+
}),
|
|
240
|
+
e.hasOutput && /* @__PURE__ */ d("details", {
|
|
241
|
+
className: "mt-2",
|
|
242
|
+
children: [/* @__PURE__ */ u("summary", {
|
|
243
|
+
className: "cursor-pointer rounded-button text-sm text-text-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
244
|
+
children: v("bigconsole.pipelines.execution.stageOutput", "Stage output")
|
|
245
|
+
}), /* @__PURE__ */ u("pre", {
|
|
246
|
+
className: "mt-2 max-h-48 overflow-auto rounded-input bg-bg-canvas p-3 text-xs text-text-primary",
|
|
247
|
+
children: JSON.stringify(e.output, null, 2)
|
|
248
|
+
})]
|
|
249
|
+
})
|
|
250
|
+
]
|
|
251
|
+
}, e.id))
|
|
252
|
+
}),
|
|
253
|
+
e.error && /* @__PURE__ */ u("p", {
|
|
254
|
+
role: "alert",
|
|
255
|
+
className: "break-words text-sm text-status-error-text",
|
|
256
|
+
children: e.error
|
|
257
|
+
}),
|
|
258
|
+
e.outputData !== null && e.outputData !== void 0 && /* @__PURE__ */ d("details", { children: [/* @__PURE__ */ u("summary", {
|
|
259
|
+
className: "cursor-pointer rounded-button text-sm text-text-secondary focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-ring focus-visible:ring-offset-2 focus-visible:ring-offset-bg-surface",
|
|
260
|
+
children: v("bigconsole.pipelines.execution.runOutput", "Run output")
|
|
261
|
+
}), /* @__PURE__ */ u("pre", {
|
|
262
|
+
className: "mt-2 max-h-64 overflow-auto rounded-input bg-bg-canvas p-3 text-xs text-text-primary",
|
|
263
|
+
children: JSON.stringify(e.outputData, null, 2)
|
|
264
|
+
})] })
|
|
265
|
+
]
|
|
266
|
+
})
|
|
267
|
+
});
|
|
268
|
+
});
|
|
269
|
+
//#endregion
|
|
270
|
+
export { v as PipelineRunHistoryList, y as PipelineStageTimeline };
|
|
@@ -18,7 +18,8 @@ interface UpdatePipelineInput {
|
|
|
18
18
|
name?: string;
|
|
19
19
|
description?: string;
|
|
20
20
|
status?: PipelineStatus;
|
|
21
|
-
|
|
21
|
+
/** Full replacement of the stage list, in order (the service replaces stages wholesale). */
|
|
22
|
+
stages?: UpdatePipelineStageInput[];
|
|
22
23
|
}
|
|
23
24
|
interface CreatePipelineStageInput {
|
|
24
25
|
parserId: string;
|