@shipfox/client-workflows 14.0.1 → 15.0.0
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/.storybook/preview.tsx +7 -2
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +21 -0
- package/dist/components/job-detail/agent-config-failure-callout.d.ts.map +1 -0
- package/dist/components/{workflow-run-view → job-detail}/agent-config-failure-callout.js +2 -2
- package/dist/components/job-detail/agent-config-failure-callout.js.map +1 -0
- package/dist/components/job-detail/job-detail-header.d.ts +8 -0
- package/dist/components/job-detail/job-detail-header.d.ts.map +1 -0
- package/dist/components/job-detail/job-detail-header.js +111 -0
- package/dist/components/job-detail/job-detail-header.js.map +1 -0
- package/dist/components/job-detail/job-detail-view.d.ts +16 -0
- package/dist/components/job-detail/job-detail-view.d.ts.map +1 -0
- package/dist/components/job-detail/job-detail-view.js +405 -0
- package/dist/components/job-detail/job-detail-view.js.map +1 -0
- package/dist/components/job-detail/job-empty-states.d.ts +10 -0
- package/dist/components/job-detail/job-empty-states.d.ts.map +1 -0
- package/dist/components/job-detail/job-empty-states.js +195 -0
- package/dist/components/job-detail/job-empty-states.js.map +1 -0
- package/dist/components/job-detail/job-execution-switcher.d.ts.map +1 -0
- package/dist/components/job-detail/job-execution-switcher.js.map +1 -0
- package/dist/components/job-detail/job-execution-time-text.d.ts.map +1 -0
- package/dist/components/job-detail/job-execution-time-text.js.map +1 -0
- package/dist/components/job-detail/job-selection.d.ts +24 -0
- package/dist/components/job-detail/job-selection.d.ts.map +1 -0
- package/dist/components/job-detail/job-selection.js +66 -0
- package/dist/components/job-detail/job-selection.js.map +1 -0
- package/dist/components/job-detail/step-attempt-log-panel.d.ts +15 -0
- package/dist/components/job-detail/step-attempt-log-panel.d.ts.map +1 -0
- package/dist/components/{workflow-run-view → job-detail}/step-attempt-log-panel.js +61 -16
- package/dist/components/job-detail/step-attempt-log-panel.js.map +1 -0
- package/dist/components/job-graph/job-graph-content.js +1 -1
- package/dist/components/job-graph/job-graph-content.js.map +1 -1
- package/dist/components/step-list/step-list-model.js +2 -2
- package/dist/components/step-list/step-list-model.js.map +1 -1
- package/dist/components/step-list/step-list.d.ts +1 -0
- package/dist/components/step-list/step-list.d.ts.map +1 -1
- package/dist/components/step-list/step-list.js +29 -4
- package/dist/components/step-list/step-list.js.map +1 -1
- package/dist/components/workflow-run-duration-label.d.ts +9 -4
- package/dist/components/workflow-run-duration-label.d.ts.map +1 -1
- package/dist/components/workflow-run-duration-label.js +27 -7
- package/dist/components/workflow-run-duration-label.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-row.d.ts.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-row.js +6 -5
- package/dist/components/workflow-run-list/workflow-run-row.js.map +1 -1
- package/dist/components/workflow-run-summary/workflow-run-summary.d.ts.map +1 -1
- package/dist/components/workflow-run-summary/workflow-run-summary.js +68 -64
- package/dist/components/workflow-run-summary/workflow-run-summary.js.map +1 -1
- package/dist/components/workflow-run-tabs/index.d.ts +0 -3
- package/dist/components/workflow-run-tabs/index.d.ts.map +1 -1
- package/dist/components/workflow-run-tabs/index.js +0 -3
- package/dist/components/workflow-run-tabs/index.js.map +1 -1
- package/dist/components/workflow-run-tabs/run-annotations-empty.d.ts +3 -1
- package/dist/components/workflow-run-tabs/run-annotations-empty.d.ts.map +1 -1
- package/dist/components/workflow-run-tabs/run-annotations-empty.js +2 -2
- package/dist/components/workflow-run-tabs/run-annotations-empty.js.map +1 -1
- package/dist/components/workflow-run-view/index.d.ts +0 -1
- package/dist/components/workflow-run-view/index.d.ts.map +1 -1
- package/dist/components/workflow-run-view/index.js +0 -1
- package/dist/components/workflow-run-view/index.js.map +1 -1
- package/dist/components/workflow-run-view/run-workspace-nav.d.ts +20 -0
- package/dist/components/workflow-run-view/run-workspace-nav.d.ts.map +1 -0
- package/dist/components/workflow-run-view/run-workspace-nav.js +271 -0
- package/dist/components/workflow-run-view/run-workspace-nav.js.map +1 -0
- package/dist/components/workflow-run-view/workflow-run-selection.d.ts.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-selection.js +1 -14
- package/dist/components/workflow-run-view/workflow-run-selection.js.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-view.d.ts +10 -8
- package/dist/components/workflow-run-view/workflow-run-view.d.ts.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-view.js +250 -236
- package/dist/components/workflow-run-view/workflow-run-view.js.map +1 -1
- package/dist/components/workflow-status/status-visuals.d.ts.map +1 -1
- package/dist/components/workflow-status/status-visuals.js +10 -2
- package/dist/components/workflow-status/status-visuals.js.map +1 -1
- package/dist/components/workflow-status/workflow-status-icon.d.ts +3 -1
- package/dist/components/workflow-status/workflow-status-icon.d.ts.map +1 -1
- package/dist/components/workflow-status/workflow-status-icon.js +13 -2
- package/dist/components/workflow-status/workflow-status-icon.js.map +1 -1
- package/dist/core/entities/job-execution.d.ts +9 -0
- package/dist/core/entities/job-execution.d.ts.map +1 -1
- package/dist/core/entities/job-execution.js +13 -3
- package/dist/core/entities/job-execution.js.map +1 -1
- package/dist/core/entities/job.d.ts.map +1 -1
- package/dist/core/entities/step-attempt.d.ts.map +1 -1
- package/dist/core/entities/step.d.ts +2 -0
- package/dist/core/entities/step.d.ts.map +1 -1
- package/dist/core/entities/step.js +13 -0
- package/dist/core/entities/step.js.map +1 -1
- package/dist/core/entities/workflow-run-attempt.d.ts.map +1 -1
- package/dist/core/entities/workflow-run.d.ts +56 -1
- package/dist/core/entities/workflow-run.d.ts.map +1 -1
- package/dist/core/entities/workflow-run.js +98 -0
- package/dist/core/entities/workflow-run.js.map +1 -1
- package/dist/core/workflow-run.d.ts +4 -4
- package/dist/core/workflow-run.d.ts.map +1 -1
- package/dist/core/workflow-run.js +3 -3
- package/dist/core/workflow-run.js.map +1 -1
- package/dist/feature.d.ts +20 -16
- package/dist/feature.d.ts.map +1 -1
- package/dist/feature.js +5 -0
- package/dist/feature.js.map +1 -1
- package/dist/hooks/api/workflow-runs.d.ts +5 -3
- package/dist/hooks/api/workflow-runs.d.ts.map +1 -1
- package/dist/hooks/api/workflow-runs.js +5 -4
- package/dist/hooks/api/workflow-runs.js.map +1 -1
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -0
- package/dist/index.js.map +1 -1
- package/dist/pages/workflow-job-detail-page.d.ts +11 -0
- package/dist/pages/workflow-job-detail-page.d.ts.map +1 -0
- package/dist/pages/workflow-job-detail-page.js +66 -0
- package/dist/pages/workflow-job-detail-page.js.map +1 -0
- package/dist/pages/workflow-run-detail-page.d.ts.map +1 -1
- package/dist/pages/workflow-run-detail-page.js +4 -37
- package/dist/pages/workflow-run-detail-page.js.map +1 -1
- package/dist/routes/inputs.d.ts +47 -34
- package/dist/routes/inputs.d.ts.map +1 -1
- package/dist/routes/inputs.js +69 -37
- package/dist/routes/inputs.js.map +1 -1
- package/dist/routes/job-detail.d.ts +10 -0
- package/dist/routes/job-detail.d.ts.map +1 -0
- package/dist/routes/job-detail.js +27 -0
- package/dist/routes/job-detail.js.map +1 -0
- package/dist/routes/project-route.d.ts +1 -1
- package/dist/routes/run-detail.d.ts.map +1 -1
- package/dist/routes/runs.d.ts.map +1 -1
- package/dist/routes/workflows.d.ts.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +3 -3
- package/src/components/{workflow-run-view → job-detail}/agent-config-failure-callout.stories.tsx +1 -1
- package/src/components/{workflow-run-view → job-detail}/agent-config-failure-callout.tsx +2 -2
- package/src/components/job-detail/job-detail-header.test.tsx +31 -0
- package/src/components/job-detail/job-detail-header.tsx +111 -0
- package/src/components/job-detail/job-detail-view.stories.tsx +526 -0
- package/src/components/job-detail/job-detail-view.tsx +450 -0
- package/src/components/job-detail/job-empty-states.test.ts +27 -0
- package/src/components/job-detail/job-empty-states.tsx +248 -0
- package/src/components/job-detail/job-selection.test.ts +188 -0
- package/src/components/job-detail/job-selection.ts +96 -0
- package/src/components/{workflow-run-view → job-detail}/step-attempt-log-panel.test.tsx +32 -9
- package/src/components/{workflow-run-view → job-detail}/step-attempt-log-panel.tsx +52 -18
- package/src/components/job-graph/job-graph-content.tsx +1 -1
- package/src/components/step-list/step-list-model.test.ts +1 -1
- package/src/components/step-list/step-list-model.ts +2 -2
- package/src/components/step-list/step-list.stories.tsx +1 -1
- package/src/components/step-list/step-list.test.tsx +33 -0
- package/src/components/step-list/step-list.tsx +40 -9
- package/src/components/workflow-run-duration-label.tsx +50 -12
- package/src/components/workflow-run-list/workflow-run-row.tsx +6 -4
- package/src/components/workflow-run-summary/workflow-run-summary.stories.tsx +38 -0
- package/src/components/workflow-run-summary/workflow-run-summary.test.tsx +79 -5
- package/src/components/workflow-run-summary/workflow-run-summary.tsx +56 -60
- package/src/components/workflow-run-tabs/index.ts +0 -3
- package/src/components/workflow-run-tabs/run-annotations-empty.tsx +6 -2
- package/src/components/workflow-run-view/index.ts +0 -1
- package/src/components/workflow-run-view/run-workspace-nav.test.tsx +242 -0
- package/src/components/workflow-run-view/run-workspace-nav.tsx +301 -0
- package/src/components/workflow-run-view/workflow-run-selection.ts +1 -23
- package/src/components/workflow-run-view/workflow-run-view.test.tsx +62 -1136
- package/src/components/workflow-run-view/workflow-run-view.tsx +330 -321
- package/src/components/workflow-status/status-visuals.ts +5 -2
- package/src/components/workflow-status/workflow-status-icon.stories.tsx +1 -0
- package/src/components/workflow-status/workflow-status-icon.tsx +26 -1
- package/src/core/entities/job-execution.ts +17 -2
- package/src/core/entities/step.ts +26 -0
- package/src/core/entities/workflow-run-display.test.ts +159 -0
- package/src/core/entities/workflow-run.ts +139 -1
- package/src/core/workflow-run.ts +16 -1
- package/src/feature.ts +5 -0
- package/src/hooks/api/workflow-runs.ts +6 -2
- package/src/index.ts +1 -0
- package/src/page-harness-budget.test.ts +1 -0
- package/src/pages/workflow-job-detail-page.test.tsx +539 -0
- package/src/pages/workflow-job-detail-page.tsx +84 -0
- package/src/pages/workflow-run-detail-page.tsx +3 -43
- package/src/pages/workflow-run-pages.test.tsx +77 -332
- package/src/routes/inputs.test.ts +56 -6
- package/src/routes/inputs.ts +64 -17
- package/src/routes/job-detail.tsx +29 -0
- package/test/pages.tsx +25 -3
- package/test/render.tsx +6 -1
- package/tsconfig.build.tsbuildinfo +1 -1
- package/dist/components/workflow-run-tabs/run-jobs-list.d.ts +0 -18
- package/dist/components/workflow-run-tabs/run-jobs-list.d.ts.map +0 -1
- package/dist/components/workflow-run-tabs/run-jobs-list.js +0 -107
- package/dist/components/workflow-run-tabs/run-jobs-list.js.map +0 -1
- package/dist/components/workflow-run-tabs/run-tab-count.d.ts +0 -6
- package/dist/components/workflow-run-tabs/run-tab-count.d.ts.map +0 -1
- package/dist/components/workflow-run-tabs/run-tab-count.js +0 -27
- package/dist/components/workflow-run-tabs/run-tab-count.js.map +0 -1
- package/dist/components/workflow-run-tabs/run-tab-strip.d.ts +0 -8
- package/dist/components/workflow-run-tabs/run-tab-strip.d.ts.map +0 -1
- package/dist/components/workflow-run-tabs/run-tab-strip.js +0 -82
- package/dist/components/workflow-run-tabs/run-tab-strip.js.map +0 -1
- package/dist/components/workflow-run-view/agent-config-failure-callout.d.ts.map +0 -1
- package/dist/components/workflow-run-view/agent-config-failure-callout.js.map +0 -1
- package/dist/components/workflow-run-view/job-card.d.ts +0 -17
- package/dist/components/workflow-run-view/job-card.d.ts.map +0 -1
- package/dist/components/workflow-run-view/job-card.js +0 -496
- package/dist/components/workflow-run-view/job-card.js.map +0 -1
- package/dist/components/workflow-run-view/job-execution-switcher.d.ts.map +0 -1
- package/dist/components/workflow-run-view/job-execution-switcher.js.map +0 -1
- package/dist/components/workflow-run-view/job-execution-time-text.d.ts.map +0 -1
- package/dist/components/workflow-run-view/job-execution-time-text.js.map +0 -1
- package/dist/components/workflow-run-view/step-attempt-log-panel.d.ts +0 -9
- package/dist/components/workflow-run-view/step-attempt-log-panel.d.ts.map +0 -1
- package/dist/components/workflow-run-view/step-attempt-log-panel.js.map +0 -1
- package/src/components/workflow-run-tabs/run-jobs-list.tsx +0 -151
- package/src/components/workflow-run-tabs/run-tab-count.tsx +0 -28
- package/src/components/workflow-run-tabs/run-tab-strip.stories.tsx +0 -52
- package/src/components/workflow-run-tabs/run-tab-strip.test.tsx +0 -117
- package/src/components/workflow-run-tabs/run-tab-strip.tsx +0 -97
- package/src/components/workflow-run-view/job-card.stories.tsx +0 -789
- package/src/components/workflow-run-view/job-card.test.tsx +0 -115
- package/src/components/workflow-run-view/job-card.tsx +0 -614
- /package/dist/components/{workflow-run-view → job-detail}/agent-config-failure-callout.d.ts +0 -0
- /package/dist/components/{workflow-run-view → job-detail}/job-execution-switcher.d.ts +0 -0
- /package/dist/components/{workflow-run-view → job-detail}/job-execution-switcher.js +0 -0
- /package/dist/components/{workflow-run-view → job-detail}/job-execution-time-text.d.ts +0 -0
- /package/dist/components/{workflow-run-view → job-detail}/job-execution-time-text.js +0 -0
- /package/src/components/{workflow-run-view → job-detail}/job-execution-switcher.tsx +0 -0
- /package/src/components/{workflow-run-view → job-detail}/job-execution-time-text.tsx +0 -0
|
@@ -1,18 +0,0 @@
|
|
|
1
|
-
import { defaultJobExecution, type Job } from '#core/workflow-run.js';
|
|
2
|
-
import { JobCard } from '../workflow-run-view/job-card.js';
|
|
3
|
-
export interface RunJobsListProps {
|
|
4
|
-
jobs: Job[];
|
|
5
|
-
selectedJobId?: string | undefined;
|
|
6
|
-
onSelectedJobChange: (jobId: string | undefined) => void;
|
|
7
|
-
workspaceSlug?: string | undefined;
|
|
8
|
-
selectedJobExecution: ReturnType<typeof defaultJobExecution>;
|
|
9
|
-
selectedAttemptId: string | null | undefined;
|
|
10
|
-
onSelectedJobExecutionChange: ((jobExecutionId: string | undefined) => void) | undefined;
|
|
11
|
-
onSelectedAttemptChange: ((attemptId: string | undefined) => void) | undefined;
|
|
12
|
-
sourcePanelId?: string | undefined;
|
|
13
|
-
sourceAvailable?: boolean | undefined;
|
|
14
|
-
focusedSourceStepId?: string | null | undefined;
|
|
15
|
-
onOpenStepSource?: Parameters<typeof JobCard>[0]['onOpenStepSource'];
|
|
16
|
-
}
|
|
17
|
-
export declare function RunJobsList({ jobs, selectedJobId, onSelectedJobChange, workspaceSlug, selectedJobExecution, selectedAttemptId, onSelectedJobExecutionChange, onSelectedAttemptChange, sourcePanelId, sourceAvailable, focusedSourceStepId, onOpenStepSource, }: RunJobsListProps): import("react").JSX.Element;
|
|
18
|
-
//# sourceMappingURL=run-jobs-list.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"run-jobs-list.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-tabs/run-jobs-list.tsx"],"names":[],"mappings":"AAGA,OAAO,EACL,mBAAmB,EAGnB,KAAK,GAAG,EACT,MAAM,uBAAuB,CAAC;AAG/B,OAAO,EAAC,OAAO,EAAC,MAAM,kCAAkC,CAAC;AAGzD,MAAM,WAAW,gBAAgB;IAC/B,IAAI,EAAE,GAAG,EAAE,CAAC;IACZ,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,mBAAmB,EAAE,CAAC,KAAK,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC;IACzD,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,oBAAoB,EAAE,UAAU,CAAC,OAAO,mBAAmB,CAAC,CAAC;IAC7D,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7C,4BAA4B,EAAE,CAAC,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACzF,uBAAuB,EAAE,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC/E,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,gBAAgB,CAAC,EAAE,UAAU,CAAC,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC,CAAC,kBAAkB,CAAC,CAAC;CACtE;AAED,wBAAgB,WAAW,CAAC,EAC1B,IAAI,EACJ,aAAa,EACb,mBAAmB,EACnB,aAAa,EACb,oBAAoB,EACpB,iBAAiB,EACjB,4BAA4B,EAC5B,uBAAuB,EACvB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,gBAAgB,GACjB,EAAE,gBAAgB,+BAsFlB"}
|
|
@@ -1,107 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { EmptyState } from '@shipfox/react-ui/empty-state';
|
|
3
|
-
import { useTimeTick } from '@shipfox/react-ui/time-ticker';
|
|
4
|
-
import { cn } from '@shipfox/react-ui/utils';
|
|
5
|
-
import { defaultJobExecution, deriveJobDisplayStatus, deriveJobExecutionDisplayStatus } from '#core/workflow-run.js';
|
|
6
|
-
import { formatJobDurationAccessibleLabel } from '../job-graph/job-duration-format.js';
|
|
7
|
-
import { JobDurationLabel } from '../job-graph/job-duration-label.js';
|
|
8
|
-
import { JobCard } from '../workflow-run-view/job-card.js';
|
|
9
|
-
import { WorkflowStatusIcon } from '../workflow-status/workflow-status-icon.js';
|
|
10
|
-
export function RunJobsList({ jobs, selectedJobId, onSelectedJobChange, workspaceSlug, selectedJobExecution, selectedAttemptId, onSelectedJobExecutionChange, onSelectedAttemptChange, sourcePanelId, sourceAvailable, focusedSourceStepId, onOpenStepSource }) {
|
|
11
|
-
useTimeTick();
|
|
12
|
-
if (jobs.length === 0) {
|
|
13
|
-
return /*#__PURE__*/ _jsx("section", {
|
|
14
|
-
"aria-label": "Workflow jobs",
|
|
15
|
-
className: "rounded-8 border border-border-neutral-base bg-background-components-base",
|
|
16
|
-
children: /*#__PURE__*/ _jsx("div", {
|
|
17
|
-
className: "min-h-160",
|
|
18
|
-
children: /*#__PURE__*/ _jsx(RunJobsEmptyState, {})
|
|
19
|
-
})
|
|
20
|
-
});
|
|
21
|
-
}
|
|
22
|
-
const orderedJobs = [
|
|
23
|
-
...jobs
|
|
24
|
-
].sort(compareJobs);
|
|
25
|
-
return /*#__PURE__*/ _jsx("section", {
|
|
26
|
-
"aria-label": "Workflow jobs",
|
|
27
|
-
className: "flex min-w-0 flex-col gap-8",
|
|
28
|
-
children: /*#__PURE__*/ _jsx("ul", {
|
|
29
|
-
"aria-label": "Run jobs",
|
|
30
|
-
className: "m-0 flex min-w-0 list-none flex-col gap-8 p-0",
|
|
31
|
-
children: orderedJobs.map((job)=>{
|
|
32
|
-
const selected = job.id === selectedJobId;
|
|
33
|
-
const status = deriveJobDisplayStatus(job);
|
|
34
|
-
const execution = defaultJobExecution(job);
|
|
35
|
-
const durationLabel = formatJobDurationAccessibleLabel(job.displayDuration, execution ? deriveJobExecutionDisplayStatus(execution) : undefined);
|
|
36
|
-
const rowLabel = [
|
|
37
|
-
job.displayName,
|
|
38
|
-
statusLabel(status),
|
|
39
|
-
durationLabel,
|
|
40
|
-
job.carriedOver ? 'reused' : undefined
|
|
41
|
-
].filter((part)=>Boolean(part)).join(', ');
|
|
42
|
-
return /*#__PURE__*/ _jsxs("li", {
|
|
43
|
-
className: "min-w-0",
|
|
44
|
-
children: [
|
|
45
|
-
/*#__PURE__*/ _jsxs("button", {
|
|
46
|
-
type: "button",
|
|
47
|
-
"aria-expanded": selected,
|
|
48
|
-
"aria-controls": selected ? `job-card-${job.id}` : undefined,
|
|
49
|
-
"aria-label": rowLabel,
|
|
50
|
-
onClick: ()=>onSelectedJobChange(selected ? undefined : job.id),
|
|
51
|
-
className: cn('relative flex min-h-44 w-full min-w-0 items-center gap-8 rounded-8 bg-background-neutral-base px-12 text-left shadow-button-neutral outline-none transition-colors hover:bg-background-components-hover focus-visible:shadow-button-neutral-focus', selected && 'bg-background-components-hover hover:bg-background-components-pressed'),
|
|
52
|
-
children: [
|
|
53
|
-
selected ? /*#__PURE__*/ _jsx("span", {
|
|
54
|
-
"aria-hidden": "true",
|
|
55
|
-
className: "absolute inset-y-6 left-0 w-px rounded-full bg-border-highlights-interactive"
|
|
56
|
-
}) : null,
|
|
57
|
-
/*#__PURE__*/ _jsx(WorkflowStatusIcon, {
|
|
58
|
-
status: status,
|
|
59
|
-
size: 14,
|
|
60
|
-
tooltip: false
|
|
61
|
-
}),
|
|
62
|
-
/*#__PURE__*/ _jsx("span", {
|
|
63
|
-
className: "min-w-0 flex-1 truncate text-sm font-medium text-foreground-neutral-base",
|
|
64
|
-
children: job.displayName
|
|
65
|
-
}),
|
|
66
|
-
/*#__PURE__*/ _jsx(JobDurationLabel, {
|
|
67
|
-
duration: job.displayDuration
|
|
68
|
-
})
|
|
69
|
-
]
|
|
70
|
-
}),
|
|
71
|
-
selected ? /*#__PURE__*/ _jsx("div", {
|
|
72
|
-
id: `job-card-${job.id}`,
|
|
73
|
-
className: "mt-8",
|
|
74
|
-
children: /*#__PURE__*/ _jsx(JobCard, {
|
|
75
|
-
workspaceSlug: workspaceSlug,
|
|
76
|
-
job: job,
|
|
77
|
-
selectedJobExecution: selectedJobExecution,
|
|
78
|
-
selectedAttemptId: job.carriedOver ? undefined : selectedAttemptId,
|
|
79
|
-
onSelectedJobExecutionChange: onSelectedJobExecutionChange,
|
|
80
|
-
onSelectedAttemptChange: onSelectedAttemptChange,
|
|
81
|
-
sourcePanelId: sourcePanelId,
|
|
82
|
-
sourceAvailable: sourceAvailable,
|
|
83
|
-
focusedSourceStepId: focusedSourceStepId,
|
|
84
|
-
onOpenStepSource: onOpenStepSource
|
|
85
|
-
})
|
|
86
|
-
}) : null
|
|
87
|
-
]
|
|
88
|
-
}, job.id);
|
|
89
|
-
})
|
|
90
|
-
})
|
|
91
|
-
});
|
|
92
|
-
}
|
|
93
|
-
function RunJobsEmptyState() {
|
|
94
|
-
return /*#__PURE__*/ _jsx(EmptyState, {
|
|
95
|
-
icon: "componentLine",
|
|
96
|
-
title: "No jobs yet",
|
|
97
|
-
description: "This run has not materialized jobs."
|
|
98
|
-
});
|
|
99
|
-
}
|
|
100
|
-
function compareJobs(left, right) {
|
|
101
|
-
return left.position - right.position || left.displayName.localeCompare(right.displayName) || left.id.localeCompare(right.id);
|
|
102
|
-
}
|
|
103
|
-
function statusLabel(status) {
|
|
104
|
-
return status === 'listening' ? 'Listening' : status.charAt(0).toUpperCase() + status.slice(1);
|
|
105
|
-
}
|
|
106
|
-
|
|
107
|
-
//# sourceMappingURL=run-jobs-list.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/workflow-run-tabs/run-jobs-list.tsx"],"sourcesContent":["import {EmptyState} from '@shipfox/react-ui/empty-state';\nimport {useTimeTick} from '@shipfox/react-ui/time-ticker';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {\n defaultJobExecution,\n deriveJobDisplayStatus,\n deriveJobExecutionDisplayStatus,\n type Job,\n} from '#core/workflow-run.js';\nimport {formatJobDurationAccessibleLabel} from '../job-graph/job-duration-format.js';\nimport {JobDurationLabel} from '../job-graph/job-duration-label.js';\nimport {JobCard} from '../workflow-run-view/job-card.js';\nimport {WorkflowStatusIcon} from '../workflow-status/workflow-status-icon.js';\n\nexport interface RunJobsListProps {\n jobs: Job[];\n selectedJobId?: string | undefined;\n onSelectedJobChange: (jobId: string | undefined) => void;\n workspaceSlug?: string | undefined;\n selectedJobExecution: ReturnType<typeof defaultJobExecution>;\n selectedAttemptId: string | null | undefined;\n onSelectedJobExecutionChange: ((jobExecutionId: string | undefined) => void) | undefined;\n onSelectedAttemptChange: ((attemptId: string | undefined) => void) | undefined;\n sourcePanelId?: string | undefined;\n sourceAvailable?: boolean | undefined;\n focusedSourceStepId?: string | null | undefined;\n onOpenStepSource?: Parameters<typeof JobCard>[0]['onOpenStepSource'];\n}\n\nexport function RunJobsList({\n jobs,\n selectedJobId,\n onSelectedJobChange,\n workspaceSlug,\n selectedJobExecution,\n selectedAttemptId,\n onSelectedJobExecutionChange,\n onSelectedAttemptChange,\n sourcePanelId,\n sourceAvailable,\n focusedSourceStepId,\n onOpenStepSource,\n}: RunJobsListProps) {\n useTimeTick();\n\n if (jobs.length === 0) {\n return (\n <section\n aria-label=\"Workflow jobs\"\n className=\"rounded-8 border border-border-neutral-base bg-background-components-base\"\n >\n <div className=\"min-h-160\">\n <RunJobsEmptyState />\n </div>\n </section>\n );\n }\n\n const orderedJobs = [...jobs].sort(compareJobs);\n\n return (\n <section aria-label=\"Workflow jobs\" className=\"flex min-w-0 flex-col gap-8\">\n <ul aria-label=\"Run jobs\" className=\"m-0 flex min-w-0 list-none flex-col gap-8 p-0\">\n {orderedJobs.map((job) => {\n const selected = job.id === selectedJobId;\n const status = deriveJobDisplayStatus(job);\n const execution = defaultJobExecution(job);\n const durationLabel = formatJobDurationAccessibleLabel(\n job.displayDuration,\n execution ? deriveJobExecutionDisplayStatus(execution) : undefined,\n );\n const rowLabel = [\n job.displayName,\n statusLabel(status),\n durationLabel,\n job.carriedOver ? 'reused' : undefined,\n ]\n .filter((part): part is string => Boolean(part))\n .join(', ');\n\n return (\n <li key={job.id} className=\"min-w-0\">\n <button\n type=\"button\"\n aria-expanded={selected}\n aria-controls={selected ? `job-card-${job.id}` : undefined}\n aria-label={rowLabel}\n onClick={() => onSelectedJobChange(selected ? undefined : job.id)}\n className={cn(\n 'relative flex min-h-44 w-full min-w-0 items-center gap-8 rounded-8 bg-background-neutral-base px-12 text-left shadow-button-neutral outline-none transition-colors hover:bg-background-components-hover focus-visible:shadow-button-neutral-focus',\n selected &&\n 'bg-background-components-hover hover:bg-background-components-pressed',\n )}\n >\n {selected ? (\n <span\n aria-hidden=\"true\"\n className=\"absolute inset-y-6 left-0 w-px rounded-full bg-border-highlights-interactive\"\n />\n ) : null}\n <WorkflowStatusIcon status={status} size={14} tooltip={false} />\n <span className=\"min-w-0 flex-1 truncate text-sm font-medium text-foreground-neutral-base\">\n {job.displayName}\n </span>\n <JobDurationLabel duration={job.displayDuration} />\n </button>\n {selected ? (\n <div id={`job-card-${job.id}`} className=\"mt-8\">\n <JobCard\n workspaceSlug={workspaceSlug}\n job={job}\n selectedJobExecution={selectedJobExecution}\n selectedAttemptId={job.carriedOver ? undefined : selectedAttemptId}\n onSelectedJobExecutionChange={onSelectedJobExecutionChange}\n onSelectedAttemptChange={onSelectedAttemptChange}\n sourcePanelId={sourcePanelId}\n sourceAvailable={sourceAvailable}\n focusedSourceStepId={focusedSourceStepId}\n onOpenStepSource={onOpenStepSource}\n />\n </div>\n ) : null}\n </li>\n );\n })}\n </ul>\n </section>\n );\n}\n\nfunction RunJobsEmptyState() {\n return (\n <EmptyState\n icon=\"componentLine\"\n title=\"No jobs yet\"\n description=\"This run has not materialized jobs.\"\n />\n );\n}\n\nfunction compareJobs(left: Job, right: Job): number {\n return (\n left.position - right.position ||\n left.displayName.localeCompare(right.displayName) ||\n left.id.localeCompare(right.id)\n );\n}\n\nfunction statusLabel(status: ReturnType<typeof deriveJobDisplayStatus>): string {\n return status === 'listening' ? 'Listening' : status.charAt(0).toUpperCase() + status.slice(1);\n}\n"],"names":["EmptyState","useTimeTick","cn","defaultJobExecution","deriveJobDisplayStatus","deriveJobExecutionDisplayStatus","formatJobDurationAccessibleLabel","JobDurationLabel","JobCard","WorkflowStatusIcon","RunJobsList","jobs","selectedJobId","onSelectedJobChange","workspaceSlug","selectedJobExecution","selectedAttemptId","onSelectedJobExecutionChange","onSelectedAttemptChange","sourcePanelId","sourceAvailable","focusedSourceStepId","onOpenStepSource","length","section","aria-label","className","div","RunJobsEmptyState","orderedJobs","sort","compareJobs","ul","map","job","selected","id","status","execution","durationLabel","displayDuration","undefined","rowLabel","displayName","statusLabel","carriedOver","filter","part","Boolean","join","li","button","type","aria-expanded","aria-controls","onClick","span","aria-hidden","size","tooltip","duration","icon","title","description","left","right","position","localeCompare","charAt","toUpperCase","slice"],"mappings":"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"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"run-tab-count.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-tabs/run-tab-count.tsx"],"names":[],"mappings":"AAEA,wBAAgB,WAAW,CAAC,EAC1B,KAAK,EACL,UAAc,EACd,UAAU,GACX,EAAE;IACD,KAAK,EAAE,MAAM,GAAG,SAAS,CAAC;IAC1B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,UAAU,EAAE,MAAM,CAAC;CACpB,sCAiBA"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
-
import { Badge } from '@shipfox/react-ui/badge';
|
|
3
|
-
export function RunTabCount({ count, alertCount = 0, alertLabel }) {
|
|
4
|
-
if (count === undefined && alertCount <= 0) return null;
|
|
5
|
-
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
6
|
-
children: [
|
|
7
|
-
count === undefined ? null : /*#__PURE__*/ _jsx(Badge, {
|
|
8
|
-
size: "2xs",
|
|
9
|
-
variant: "neutral",
|
|
10
|
-
"aria-hidden": "true",
|
|
11
|
-
children: count
|
|
12
|
-
}),
|
|
13
|
-
alertCount > 0 ? /*#__PURE__*/ _jsxs(Badge, {
|
|
14
|
-
size: "2xs",
|
|
15
|
-
variant: "error",
|
|
16
|
-
"aria-hidden": "true",
|
|
17
|
-
children: [
|
|
18
|
-
alertCount,
|
|
19
|
-
" ",
|
|
20
|
-
alertLabel
|
|
21
|
-
]
|
|
22
|
-
}) : null
|
|
23
|
-
]
|
|
24
|
-
});
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
//# sourceMappingURL=run-tab-count.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/workflow-run-tabs/run-tab-count.tsx"],"sourcesContent":["import {Badge} from '@shipfox/react-ui/badge';\n\nexport function RunTabCount({\n count,\n alertCount = 0,\n alertLabel,\n}: {\n count: number | undefined;\n alertCount?: number | undefined;\n alertLabel: string;\n}) {\n if (count === undefined && alertCount <= 0) return null;\n\n return (\n <>\n {count === undefined ? null : (\n <Badge size=\"2xs\" variant=\"neutral\" aria-hidden=\"true\">\n {count}\n </Badge>\n )}\n {alertCount > 0 ? (\n <Badge size=\"2xs\" variant=\"error\" aria-hidden=\"true\">\n {alertCount} {alertLabel}\n </Badge>\n ) : null}\n </>\n );\n}\n"],"names":["Badge","RunTabCount","count","alertCount","alertLabel","undefined","size","variant","aria-hidden"],"mappings":";AAAA,SAAQA,KAAK,QAAO,0BAA0B;AAE9C,OAAO,SAASC,YAAY,EAC1BC,KAAK,EACLC,aAAa,CAAC,EACdC,UAAU,EAKX;IACC,IAAIF,UAAUG,aAAaF,cAAc,GAAG,OAAO;IAEnD,qBACE;;YACGD,UAAUG,YAAY,qBACrB,KAACL;gBAAMM,MAAK;gBAAMC,SAAQ;gBAAUC,eAAY;0BAC7CN;;YAGJC,aAAa,kBACZ,MAACH;gBAAMM,MAAK;gBAAMC,SAAQ;gBAAQC,eAAY;;oBAC3CL;oBAAW;oBAAEC;;iBAEd;;;AAGV"}
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import type { RunAnnotationSummary } from '#core/workflow-run-tabs.js';
|
|
2
|
-
export interface RunTabStripProps {
|
|
3
|
-
jobCount?: number | undefined;
|
|
4
|
-
jobsFailed?: number | undefined;
|
|
5
|
-
annotationSummary?: RunAnnotationSummary | undefined;
|
|
6
|
-
}
|
|
7
|
-
export declare function RunTabStrip({ jobCount, jobsFailed, annotationSummary }: RunTabStripProps): import("react").JSX.Element;
|
|
8
|
-
//# sourceMappingURL=run-tab-strip.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"run-tab-strip.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-tabs/run-tab-strip.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,4BAA4B,CAAC;AAGrE,MAAM,WAAW,gBAAgB;IAC/B,QAAQ,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,iBAAiB,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;CACtD;AAED,wBAAgB,WAAW,CAAC,EAAC,QAAQ,EAAE,UAAc,EAAE,iBAAiB,EAAC,EAAE,gBAAgB,+BA6D1F"}
|
|
@@ -1,82 +0,0 @@
|
|
|
1
|
-
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
-
import { TabsList, TabsTrigger } from '@shipfox/react-ui/tabs';
|
|
3
|
-
import { RunTabCount } from './run-tab-count.js';
|
|
4
|
-
export function RunTabStrip({ jobCount, jobsFailed = 0, annotationSummary }) {
|
|
5
|
-
const annotationCount = annotationSummary?.total;
|
|
6
|
-
const annotationErrors = annotationSummary?.error ?? 0;
|
|
7
|
-
return /*#__PURE__*/ _jsx("div", {
|
|
8
|
-
className: "min-w-0 overflow-x-auto border-b border-border-neutral-base bg-background-neutral-background [scrollbar-width:none] [&::-webkit-scrollbar]:hidden",
|
|
9
|
-
children: /*#__PURE__*/ _jsxs(TabsList, {
|
|
10
|
-
"aria-label": "Run sections",
|
|
11
|
-
className: "h-40 min-h-40 w-max min-w-full gap-16 px-16 [@media(pointer:coarse)]:h-44 [@media(pointer:coarse)]:min-h-44",
|
|
12
|
-
children: [
|
|
13
|
-
/*#__PURE__*/ _jsx(TabsTrigger, {
|
|
14
|
-
value: "summary",
|
|
15
|
-
className: "h-40 min-h-40 py-0 text-xs data-[state=inactive]:text-foreground-neutral-subtle data-[state=inactive]:hover:text-foreground-neutral-base [@media(pointer:coarse)]:h-44 [@media(pointer:coarse)]:min-h-44",
|
|
16
|
-
children: "Summary"
|
|
17
|
-
}),
|
|
18
|
-
/*#__PURE__*/ _jsxs(TabsTrigger, {
|
|
19
|
-
value: "jobs",
|
|
20
|
-
"aria-label": runTabAccessibleName({
|
|
21
|
-
label: 'Jobs',
|
|
22
|
-
total: jobCount,
|
|
23
|
-
totalSingular: 'job',
|
|
24
|
-
totalPlural: 'jobs',
|
|
25
|
-
alertCount: jobsFailed,
|
|
26
|
-
alertSingular: 'failed',
|
|
27
|
-
alertPlural: 'failed'
|
|
28
|
-
}),
|
|
29
|
-
className: "h-40 min-h-40 gap-6 py-0 text-xs data-[state=inactive]:text-foreground-neutral-subtle data-[state=inactive]:hover:text-foreground-neutral-base [@media(pointer:coarse)]:h-44 [@media(pointer:coarse)]:min-h-44",
|
|
30
|
-
children: [
|
|
31
|
-
/*#__PURE__*/ _jsx("span", {
|
|
32
|
-
children: "Jobs"
|
|
33
|
-
}),
|
|
34
|
-
/*#__PURE__*/ _jsx(RunTabCount, {
|
|
35
|
-
count: jobCount,
|
|
36
|
-
alertCount: jobsFailed,
|
|
37
|
-
alertLabel: "failed"
|
|
38
|
-
})
|
|
39
|
-
]
|
|
40
|
-
}),
|
|
41
|
-
/*#__PURE__*/ _jsxs(TabsTrigger, {
|
|
42
|
-
value: "annotations",
|
|
43
|
-
"aria-label": runTabAccessibleName({
|
|
44
|
-
label: 'Annotations',
|
|
45
|
-
total: annotationCount,
|
|
46
|
-
totalSingular: 'annotation',
|
|
47
|
-
totalPlural: 'annotations',
|
|
48
|
-
alertCount: annotationErrors,
|
|
49
|
-
alertSingular: 'error',
|
|
50
|
-
alertPlural: 'errors'
|
|
51
|
-
}),
|
|
52
|
-
className: "h-40 min-h-40 gap-6 py-0 text-xs data-[state=inactive]:text-foreground-neutral-subtle data-[state=inactive]:hover:text-foreground-neutral-base [@media(pointer:coarse)]:h-44 [@media(pointer:coarse)]:min-h-44",
|
|
53
|
-
children: [
|
|
54
|
-
/*#__PURE__*/ _jsx("span", {
|
|
55
|
-
children: "Annotations"
|
|
56
|
-
}),
|
|
57
|
-
/*#__PURE__*/ _jsx(RunTabCount, {
|
|
58
|
-
count: annotationCount,
|
|
59
|
-
alertCount: annotationErrors,
|
|
60
|
-
alertLabel: annotationErrors === 1 ? 'error' : 'errors'
|
|
61
|
-
})
|
|
62
|
-
]
|
|
63
|
-
}),
|
|
64
|
-
/*#__PURE__*/ _jsx(TabsTrigger, {
|
|
65
|
-
value: "source",
|
|
66
|
-
className: "h-40 min-h-40 py-0 text-xs data-[state=inactive]:text-foreground-neutral-subtle data-[state=inactive]:hover:text-foreground-neutral-base [@media(pointer:coarse)]:h-44 [@media(pointer:coarse)]:min-h-44",
|
|
67
|
-
children: "Source"
|
|
68
|
-
})
|
|
69
|
-
]
|
|
70
|
-
})
|
|
71
|
-
});
|
|
72
|
-
}
|
|
73
|
-
function runTabAccessibleName({ label, total, totalSingular, totalPlural, alertCount, alertSingular, alertPlural }) {
|
|
74
|
-
const parts = [
|
|
75
|
-
label
|
|
76
|
-
];
|
|
77
|
-
if (total !== undefined) parts.push(`${total} ${total === 1 ? totalSingular : totalPlural}`);
|
|
78
|
-
if (alertCount > 0) parts.push(`${alertCount} ${alertCount === 1 ? alertSingular : alertPlural}`);
|
|
79
|
-
return parts.join(', ');
|
|
80
|
-
}
|
|
81
|
-
|
|
82
|
-
//# sourceMappingURL=run-tab-strip.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/workflow-run-tabs/run-tab-strip.tsx"],"sourcesContent":["import {TabsList, TabsTrigger} from '@shipfox/react-ui/tabs';\nimport type {RunAnnotationSummary} from '#core/workflow-run-tabs.js';\nimport {RunTabCount} from './run-tab-count.js';\n\nexport interface RunTabStripProps {\n jobCount?: number | undefined;\n jobsFailed?: number | undefined;\n annotationSummary?: RunAnnotationSummary | undefined;\n}\n\nexport function RunTabStrip({jobCount, jobsFailed = 0, annotationSummary}: RunTabStripProps) {\n const annotationCount = annotationSummary?.total;\n const annotationErrors = annotationSummary?.error ?? 0;\n\n return (\n <div className=\"min-w-0 overflow-x-auto border-b border-border-neutral-base bg-background-neutral-background [scrollbar-width:none] [&::-webkit-scrollbar]:hidden\">\n <TabsList\n aria-label=\"Run sections\"\n className=\"h-40 min-h-40 w-max min-w-full gap-16 px-16 [@media(pointer:coarse)]:h-44 [@media(pointer:coarse)]:min-h-44\"\n >\n <TabsTrigger\n value=\"summary\"\n className=\"h-40 min-h-40 py-0 text-xs data-[state=inactive]:text-foreground-neutral-subtle data-[state=inactive]:hover:text-foreground-neutral-base [@media(pointer:coarse)]:h-44 [@media(pointer:coarse)]:min-h-44\"\n >\n Summary\n </TabsTrigger>\n <TabsTrigger\n value=\"jobs\"\n aria-label={runTabAccessibleName({\n label: 'Jobs',\n total: jobCount,\n totalSingular: 'job',\n totalPlural: 'jobs',\n alertCount: jobsFailed,\n alertSingular: 'failed',\n alertPlural: 'failed',\n })}\n className=\"h-40 min-h-40 gap-6 py-0 text-xs data-[state=inactive]:text-foreground-neutral-subtle data-[state=inactive]:hover:text-foreground-neutral-base [@media(pointer:coarse)]:h-44 [@media(pointer:coarse)]:min-h-44\"\n >\n <span>Jobs</span>\n <RunTabCount count={jobCount} alertCount={jobsFailed} alertLabel=\"failed\" />\n </TabsTrigger>\n <TabsTrigger\n value=\"annotations\"\n aria-label={runTabAccessibleName({\n label: 'Annotations',\n total: annotationCount,\n totalSingular: 'annotation',\n totalPlural: 'annotations',\n alertCount: annotationErrors,\n alertSingular: 'error',\n alertPlural: 'errors',\n })}\n className=\"h-40 min-h-40 gap-6 py-0 text-xs data-[state=inactive]:text-foreground-neutral-subtle data-[state=inactive]:hover:text-foreground-neutral-base [@media(pointer:coarse)]:h-44 [@media(pointer:coarse)]:min-h-44\"\n >\n <span>Annotations</span>\n <RunTabCount\n count={annotationCount}\n alertCount={annotationErrors}\n alertLabel={annotationErrors === 1 ? 'error' : 'errors'}\n />\n </TabsTrigger>\n <TabsTrigger\n value=\"source\"\n className=\"h-40 min-h-40 py-0 text-xs data-[state=inactive]:text-foreground-neutral-subtle data-[state=inactive]:hover:text-foreground-neutral-base [@media(pointer:coarse)]:h-44 [@media(pointer:coarse)]:min-h-44\"\n >\n Source\n </TabsTrigger>\n </TabsList>\n </div>\n );\n}\n\nfunction runTabAccessibleName({\n label,\n total,\n totalSingular,\n totalPlural,\n alertCount,\n alertSingular,\n alertPlural,\n}: {\n label: string;\n total: number | undefined;\n totalSingular: string;\n totalPlural: string;\n alertCount: number;\n alertSingular: string;\n alertPlural: string;\n}): string {\n const parts = [label];\n\n if (total !== undefined) parts.push(`${total} ${total === 1 ? totalSingular : totalPlural}`);\n if (alertCount > 0) parts.push(`${alertCount} ${alertCount === 1 ? alertSingular : alertPlural}`);\n\n return parts.join(', ');\n}\n"],"names":["TabsList","TabsTrigger","RunTabCount","RunTabStrip","jobCount","jobsFailed","annotationSummary","annotationCount","total","annotationErrors","error","div","className","aria-label","value","runTabAccessibleName","label","totalSingular","totalPlural","alertCount","alertSingular","alertPlural","span","count","alertLabel","parts","undefined","push","join"],"mappings":";AAAA,SAAQA,QAAQ,EAAEC,WAAW,QAAO,yBAAyB;AAE7D,SAAQC,WAAW,QAAO,qBAAqB;AAQ/C,OAAO,SAASC,YAAY,EAACC,QAAQ,EAAEC,aAAa,CAAC,EAAEC,iBAAiB,EAAmB;IACzF,MAAMC,kBAAkBD,mBAAmBE;IAC3C,MAAMC,mBAAmBH,mBAAmBI,SAAS;IAErD,qBACE,KAACC;QAAIC,WAAU;kBACb,cAAA,MAACZ;YACCa,cAAW;YACXD,WAAU;;8BAEV,KAACX;oBACCa,OAAM;oBACNF,WAAU;8BACX;;8BAGD,MAACX;oBACCa,OAAM;oBACND,cAAYE,qBAAqB;wBAC/BC,OAAO;wBACPR,OAAOJ;wBACPa,eAAe;wBACfC,aAAa;wBACbC,YAAYd;wBACZe,eAAe;wBACfC,aAAa;oBACf;oBACAT,WAAU;;sCAEV,KAACU;sCAAK;;sCACN,KAACpB;4BAAYqB,OAAOnB;4BAAUe,YAAYd;4BAAYmB,YAAW;;;;8BAEnE,MAACvB;oBACCa,OAAM;oBACND,cAAYE,qBAAqB;wBAC/BC,OAAO;wBACPR,OAAOD;wBACPU,eAAe;wBACfC,aAAa;wBACbC,YAAYV;wBACZW,eAAe;wBACfC,aAAa;oBACf;oBACAT,WAAU;;sCAEV,KAACU;sCAAK;;sCACN,KAACpB;4BACCqB,OAAOhB;4BACPY,YAAYV;4BACZe,YAAYf,qBAAqB,IAAI,UAAU;;;;8BAGnD,KAACR;oBACCa,OAAM;oBACNF,WAAU;8BACX;;;;;AAMT;AAEA,SAASG,qBAAqB,EAC5BC,KAAK,EACLR,KAAK,EACLS,aAAa,EACbC,WAAW,EACXC,UAAU,EACVC,aAAa,EACbC,WAAW,EASZ;IACC,MAAMI,QAAQ;QAACT;KAAM;IAErB,IAAIR,UAAUkB,WAAWD,MAAME,IAAI,CAAC,GAAGnB,MAAM,CAAC,EAAEA,UAAU,IAAIS,gBAAgBC,aAAa;IAC3F,IAAIC,aAAa,GAAGM,MAAME,IAAI,CAAC,GAAGR,WAAW,CAAC,EAAEA,eAAe,IAAIC,gBAAgBC,aAAa;IAEhG,OAAOI,MAAMG,IAAI,CAAC;AACpB"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"agent-config-failure-callout.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-view/agent-config-failure-callout.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAC,eAAe,EAAE,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAEtE,wBAAgB,yBAAyB,CAAC,EACxC,aAAa,EACb,MAAM,EACN,KAAK,GACN,EAAE;IACD,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,MAAM,EAAE,eAAe,GAAG,IAAI,CAAC;IAC/B,KAAK,EAAE,SAAS,GAAG,IAAI,CAAC;CACzB,+BAoBA"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/workflow-run-view/agent-config-failure-callout.tsx"],"sourcesContent":["import {\n Alert,\n AlertActions,\n AlertContent,\n AlertDescription,\n AlertTitle,\n} from '@shipfox/react-ui/alert';\nimport {Button} from '@shipfox/react-ui/button';\nimport {Link} from '@tanstack/react-router';\nimport type {AgentStepConfig, StepError} from '#core/workflow-run.js';\n\nexport function AgentConfigFailureCallout({\n workspaceSlug,\n config,\n error,\n}: {\n workspaceSlug?: string | undefined;\n config: AgentStepConfig | null;\n error: StepError | null;\n}) {\n const copy = agentConfigFailureCopy(config, error);\n\n return (\n <Alert variant=\"warning\" animated={false} className=\"px-10 py-8\">\n <AlertContent>\n <AlertTitle>{copy.title}</AlertTitle>\n <AlertDescription>{copy.description}</AlertDescription>\n {copy.showProviderCta && workspaceSlug ? (\n <AlertActions>\n <Button asChild size=\"2xs\" variant=\"secondary\" iconRight=\"chevronRight\">\n <Link to=\"/w/$workspaceSlug/settings/agents\" params={{workspaceSlug}}>\n Configure Agents\n </Link>\n </Button>\n </AlertActions>\n ) : null}\n </AlertContent>\n </Alert>\n );\n}\n\nfunction agentConfigFailureCopy(\n config: AgentStepConfig | null,\n error: StepError | null,\n): {title: string; description: string; showProviderCta: boolean} {\n const provider = configValue(config?.provider, 'the selected provider');\n const model = configValue(config?.model, 'the selected model');\n\n switch (error?.agentConfigIssue) {\n case 'provider_not_configured':\n return {\n title: `Configure credentials for ${provider}`,\n description: `This step uses ${provider}, but no workspace credentials are configured for that model provider. Configure ${provider} in Agents, then re-run the workflow.`,\n showProviderCta: true,\n };\n case 'credentials_invalid':\n return {\n title: `Update credentials for ${provider}`,\n description: `This step uses ${provider}, but the saved credentials could not be used. Reconfigure ${provider} in Agents, then re-run the workflow.`,\n showProviderCta: true,\n };\n case 'provider_unsupported':\n return {\n title: `Choose a supported model provider`,\n description: `This step references ${provider}, which is not available to the agent runner. Update the workflow to use a supported provider, then re-run it.`,\n showProviderCta: false,\n };\n case 'model_unavailable':\n return {\n title: `Choose an available model`,\n description: `This step uses ${model} with ${provider}, but that model is not available for the provider. Update the model or provider in the workflow, then re-run it.`,\n showProviderCta: false,\n };\n case 'step_config_invalid':\n return {\n title: \"Fix this step's agent settings\",\n description:\n 'Make sure the step has a prompt, provider, model, and thinking value, then re-run the workflow.',\n showProviderCta: false,\n };\n case undefined:\n return {\n title: \"We couldn't load the agent configuration for this step\",\n description:\n 'Make sure the step has a prompt, provider, model, and thinking value. Then configure credentials for the model provider in Agents and re-run the workflow.',\n showProviderCta: true,\n };\n }\n}\n\nfunction configValue(value: string | null | undefined, fallback: string): string {\n return value ?? fallback;\n}\n"],"names":["Alert","AlertActions","AlertContent","AlertDescription","AlertTitle","Button","Link","AgentConfigFailureCallout","workspaceSlug","config","error","copy","agentConfigFailureCopy","variant","animated","className","title","description","showProviderCta","asChild","size","iconRight","to","params","provider","configValue","model","agentConfigIssue","undefined","value","fallback"],"mappings":";AAAA,SACEA,KAAK,EACLC,YAAY,EACZC,YAAY,EACZC,gBAAgB,EAChBC,UAAU,QACL,0BAA0B;AACjC,SAAQC,MAAM,QAAO,2BAA2B;AAChD,SAAQC,IAAI,QAAO,yBAAyB;AAG5C,OAAO,SAASC,0BAA0B,EACxCC,aAAa,EACbC,MAAM,EACNC,KAAK,EAKN;IACC,MAAMC,OAAOC,uBAAuBH,QAAQC;IAE5C,qBACE,KAACV;QAAMa,SAAQ;QAAUC,UAAU;QAAOC,WAAU;kBAClD,cAAA,MAACb;;8BACC,KAACE;8BAAYO,KAAKK,KAAK;;8BACvB,KAACb;8BAAkBQ,KAAKM,WAAW;;gBAClCN,KAAKO,eAAe,IAAIV,8BACvB,KAACP;8BACC,cAAA,KAACI;wBAAOc,OAAO;wBAACC,MAAK;wBAAMP,SAAQ;wBAAYQ,WAAU;kCACvD,cAAA,KAACf;4BAAKgB,IAAG;4BAAoCC,QAAQ;gCAACf;4BAAa;sCAAG;;;qBAKxE;;;;AAIZ;AAEA,SAASI,uBACPH,MAA8B,EAC9BC,KAAuB;IAEvB,MAAMc,WAAWC,YAAYhB,QAAQe,UAAU;IAC/C,MAAME,QAAQD,YAAYhB,QAAQiB,OAAO;IAEzC,OAAQhB,OAAOiB;QACb,KAAK;YACH,OAAO;gBACLX,OAAO,CAAC,0BAA0B,EAAEQ,UAAU;gBAC9CP,aAAa,CAAC,eAAe,EAAEO,SAAS,iFAAiF,EAAEA,SAAS,qCAAqC,CAAC;gBAC1KN,iBAAiB;YACnB;QACF,KAAK;YACH,OAAO;gBACLF,OAAO,CAAC,uBAAuB,EAAEQ,UAAU;gBAC3CP,aAAa,CAAC,eAAe,EAAEO,SAAS,2DAA2D,EAAEA,SAAS,qCAAqC,CAAC;gBACpJN,iBAAiB;YACnB;QACF,KAAK;YACH,OAAO;gBACLF,OAAO,CAAC,iCAAiC,CAAC;gBAC1CC,aAAa,CAAC,qBAAqB,EAAEO,SAAS,8GAA8G,CAAC;gBAC7JN,iBAAiB;YACnB;QACF,KAAK;YACH,OAAO;gBACLF,OAAO,CAAC,yBAAyB,CAAC;gBAClCC,aAAa,CAAC,eAAe,EAAES,MAAM,MAAM,EAAEF,SAAS,iHAAiH,CAAC;gBACxKN,iBAAiB;YACnB;QACF,KAAK;YACH,OAAO;gBACLF,OAAO;gBACPC,aACE;gBACFC,iBAAiB;YACnB;QACF,KAAKU;YACH,OAAO;gBACLZ,OAAO;gBACPC,aACE;gBACFC,iBAAiB;YACnB;IACJ;AACF;AAEA,SAASO,YAAYI,KAAgC,EAAEC,QAAgB;IACrE,OAAOD,SAASC;AAClB"}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import type { ReactNode } from 'react';
|
|
2
|
-
import { type Job, type JobExecution, type StepSourceLocation } from '#core/workflow-run.js';
|
|
3
|
-
import { type StepExpandedContext } from '../step-list/index.js';
|
|
4
|
-
export declare function JobCard({ workspaceSlug, job, selectedJobExecution, selectedAttemptId, onSelectedJobExecutionChange, onSelectedAttemptChange, renderExpandedStep, sourcePanelId, sourceAvailable, focusedSourceStepId, onOpenStepSource, }: {
|
|
5
|
-
workspaceSlug?: string | undefined;
|
|
6
|
-
job: Job;
|
|
7
|
-
selectedJobExecution: JobExecution | undefined;
|
|
8
|
-
selectedAttemptId: string | null | undefined;
|
|
9
|
-
onSelectedJobExecutionChange: ((jobExecutionId: string | undefined) => void) | undefined;
|
|
10
|
-
onSelectedAttemptChange: ((attemptId: string | undefined) => void) | undefined;
|
|
11
|
-
renderExpandedStep?: ((context: StepExpandedContext) => ReactNode) | undefined;
|
|
12
|
-
sourcePanelId?: string | undefined;
|
|
13
|
-
sourceAvailable?: boolean | undefined;
|
|
14
|
-
focusedSourceStepId?: string | null | undefined;
|
|
15
|
-
onOpenStepSource?: ((stepId: string, location: StepSourceLocation, trigger: HTMLButtonElement | null) => void) | undefined;
|
|
16
|
-
}): import("react").JSX.Element;
|
|
17
|
-
//# sourceMappingURL=job-card.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"job-card.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-view/job-card.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAGrC,OAAO,EAKL,KAAK,GAAG,EAER,KAAK,YAAY,EAKjB,KAAK,kBAAkB,EAIxB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EAAC,KAAK,mBAAmB,EAAoC,MAAM,uBAAuB,CAAC;AAiBlG,wBAAgB,OAAO,CAAC,EACtB,aAAa,EACb,GAAG,EACH,oBAAoB,EACpB,iBAAiB,EACjB,4BAA4B,EAC5B,uBAAuB,EACvB,kBAAkB,EAClB,aAAa,EACb,eAAe,EACf,mBAAmB,EACnB,gBAAgB,GACjB,EAAE;IACD,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,GAAG,EAAE,GAAG,CAAC;IACT,oBAAoB,EAAE,YAAY,GAAG,SAAS,CAAC;IAC/C,iBAAiB,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAC7C,4BAA4B,EAAE,CAAC,CAAC,cAAc,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACzF,uBAAuB,EAAE,CAAC,CAAC,SAAS,EAAE,MAAM,GAAG,SAAS,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC/E,kBAAkB,CAAC,EAAE,CAAC,CAAC,OAAO,EAAE,mBAAmB,KAAK,SAAS,CAAC,GAAG,SAAS,CAAC;IAC/E,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,eAAe,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;IACtC,mBAAmB,CAAC,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,CAAC;IAChD,gBAAgB,CAAC,EACb,CAAC,CAAC,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,kBAAkB,EAAE,OAAO,EAAE,iBAAiB,GAAG,IAAI,KAAK,IAAI,CAAC,GAC3F,SAAS,CAAC;CACf,+BAyIA"}
|