@shipfox/client-workflows 14.0.1 → 16.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.css +4 -0
- package/.storybook/preview.tsx +7 -2
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +42 -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 +15 -0
- package/dist/components/job-detail/job-detail-header.d.ts.map +1 -0
- package/dist/components/job-detail/job-detail-header.js +124 -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 +420 -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 +69 -64
- package/dist/components/workflow-run-summary/workflow-run-summary.js.map +1 -1
- package/dist/components/workflow-run-tabs/index.d.ts +3 -3
- package/dist/components/workflow-run-tabs/index.d.ts.map +1 -1
- package/dist/components/workflow-run-tabs/index.js +3 -3
- package/dist/components/workflow-run-tabs/index.js.map +1 -1
- package/dist/components/workflow-run-tabs/run-annotation-count-chip.d.ts +16 -0
- package/dist/components/workflow-run-tabs/run-annotation-count-chip.d.ts.map +1 -0
- package/dist/components/workflow-run-tabs/run-annotation-count-chip.js +50 -0
- package/dist/components/workflow-run-tabs/run-annotation-count-chip.js.map +1 -0
- package/dist/components/workflow-run-tabs/run-annotation-item.d.ts +20 -0
- package/dist/components/workflow-run-tabs/run-annotation-item.d.ts.map +1 -0
- package/dist/components/workflow-run-tabs/run-annotation-item.js +102 -0
- package/dist/components/workflow-run-tabs/run-annotation-item.js.map +1 -0
- package/dist/components/workflow-run-tabs/run-annotation-list.d.ts +32 -0
- package/dist/components/workflow-run-tabs/run-annotation-list.d.ts.map +1 -0
- package/dist/components/workflow-run-tabs/run-annotation-list.js +202 -0
- package/dist/components/workflow-run-tabs/run-annotation-list.js.map +1 -0
- package/dist/components/workflow-run-tabs/run-annotation-summary-line.d.ts +1 -1
- package/dist/components/workflow-run-tabs/run-annotation-summary-line.d.ts.map +1 -1
- package/dist/components/workflow-run-tabs/run-annotation-summary-line.js +87 -22
- package/dist/components/workflow-run-tabs/run-annotation-summary-line.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-tabs/severity-visuals.d.ts +20 -0
- package/dist/components/workflow-run-tabs/severity-visuals.d.ts.map +1 -0
- package/dist/components/workflow-run-tabs/severity-visuals.js +31 -0
- package/dist/components/workflow-run-tabs/severity-visuals.js.map +1 -0
- 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 +277 -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 -10
- package/dist/components/workflow-run-view/workflow-run-view.d.ts.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-view.js +351 -239
- 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/run-annotation.d.ts +73 -0
- package/dist/core/run-annotation.d.ts.map +1 -0
- package/dist/core/run-annotation.js +125 -0
- package/dist/core/run-annotation.js.map +1 -0
- 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/run-annotation-mapper.d.ts +10 -0
- package/dist/hooks/api/run-annotation-mapper.d.ts.map +1 -0
- package/dist/hooks/api/run-annotation-mapper.js +22 -0
- package/dist/hooks/api/run-annotation-mapper.js.map +1 -0
- package/dist/hooks/api/run-annotations.d.ts +25 -0
- package/dist/hooks/api/run-annotations.d.ts.map +1 -0
- package/dist/hooks/api/run-annotations.js +78 -0
- package/dist/hooks/api/run-annotations.js.map +1 -0
- 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 +52 -34
- package/dist/routes/inputs.d.ts.map +1 -1
- package/dist/routes/inputs.js +74 -43
- 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 +10 -9
- 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 +34 -0
- package/src/components/job-detail/job-detail-header.tsx +136 -0
- package/src/components/job-detail/job-detail-view.stories.tsx +531 -0
- package/src/components/job-detail/job-detail-view.tsx +467 -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 +3 -3
- package/src/components/workflow-run-tabs/run-annotation-count-chip.tsx +63 -0
- package/src/components/workflow-run-tabs/run-annotation-item.tsx +123 -0
- package/src/components/workflow-run-tabs/run-annotation-list.tsx +258 -0
- package/src/components/workflow-run-tabs/run-annotation-summary-line.test.tsx +77 -3
- package/src/components/workflow-run-tabs/run-annotation-summary-line.tsx +92 -17
- package/src/components/workflow-run-tabs/run-annotations-empty.tsx +6 -2
- package/src/components/workflow-run-tabs/run-annotations.stories.tsx +293 -0
- package/src/components/workflow-run-tabs/severity-visuals.ts +37 -0
- package/src/components/workflow-run-view/index.ts +0 -1
- package/src/components/workflow-run-view/run-workspace-nav.test.tsx +286 -0
- package/src/components/workflow-run-view/run-workspace-nav.tsx +314 -0
- package/src/components/workflow-run-view/workflow-run-selection.ts +1 -23
- package/src/components/workflow-run-view/workflow-run-view.test.tsx +237 -1085
- package/src/components/workflow-run-view/workflow-run-view.tsx +450 -323
- 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/run-annotation.test.ts +315 -0
- package/src/core/run-annotation.ts +238 -0
- package/src/core/workflow-run.ts +16 -1
- package/src/feature.ts +5 -0
- package/src/hooks/api/run-annotation-mapper.ts +30 -0
- package/src/hooks/api/run-annotations.ts +137 -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 +605 -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 +71 -19
- 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/dist/core/workflow-run-tabs.d.ts +0 -9
- package/dist/core/workflow-run-tabs.d.ts.map +0 -1
- package/dist/core/workflow-run-tabs.js +0 -3
- package/dist/core/workflow-run-tabs.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/src/core/workflow-run-tabs.ts +0 -8
- /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
|
@@ -0,0 +1,420 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
// biome-ignore-all lint/a11y/noRedundantRoles: the job log region keeps an explicit role for the public accessibility contract.
|
|
3
|
+
// biome-ignore-all lint/a11y/noNoninteractiveTabindex: the job log region is intentionally keyboard focusable.
|
|
4
|
+
import { ApiError } from '@shipfox/client-api';
|
|
5
|
+
import { QueryLoadError } from '@shipfox/client-ui';
|
|
6
|
+
import { EmptyState } from '@shipfox/react-ui/empty-state';
|
|
7
|
+
import { Icon } from '@shipfox/react-ui/icon';
|
|
8
|
+
import { Skeleton } from '@shipfox/react-ui/skeleton';
|
|
9
|
+
import { TimeTickerProvider } from '@shipfox/react-ui/time-ticker';
|
|
10
|
+
import { Text } from '@shipfox/react-ui/typography';
|
|
11
|
+
import { Link } from '@tanstack/react-router';
|
|
12
|
+
import { useEffect, useRef } from 'react';
|
|
13
|
+
import { summarizeJobAnnotations } from '#core/run-annotation.js';
|
|
14
|
+
import { useRunAnnotationsQuery } from '#hooks/api/run-annotations.js';
|
|
15
|
+
import { workflowJobSearchParams, workflowRunSearchParams } from '#routes/inputs.js';
|
|
16
|
+
import { StepList } from '../step-list/index.js';
|
|
17
|
+
import { WorkflowRunNotFound, WorkflowRunStaleError } from '../workflow-run-view/workflow-run-states.js';
|
|
18
|
+
import { AgentConfigFailureCallout } from './agent-config-failure-callout.js';
|
|
19
|
+
import { JobDetailHeader } from './job-detail-header.js';
|
|
20
|
+
import { CarriedOverStepPanel, emptyStateForJob, emptyStateForMissingExecution, isAgentConfigFailure, jobSucceededSummary, toSelectedAttemptError } from './job-empty-states.js';
|
|
21
|
+
import { resolveWorkflowJobSelection, workflowJobLandingSelection } from './job-selection.js';
|
|
22
|
+
import { StepAttemptLogPanel } from './step-attempt-log-panel.js';
|
|
23
|
+
export function JobDetailView({ workspaceSlug, projectSlug, workflowRunId, jobId, search, query, newerAttempt, newerJob, onSelectionChange }) {
|
|
24
|
+
const rootRef = useRef(null);
|
|
25
|
+
const pageScrollRef = useRef(null);
|
|
26
|
+
const landingSelectionRef = useRef(undefined);
|
|
27
|
+
const hasLoadedData = query.data !== undefined;
|
|
28
|
+
// Same query key as the run workspace, so this reads the cache instead of fetching again.
|
|
29
|
+
const annotations = useRunAnnotationsQuery({
|
|
30
|
+
workflowRunId,
|
|
31
|
+
runAttempt: query.data?.runAttempt.attempt
|
|
32
|
+
});
|
|
33
|
+
const jobAnnotationSummary = annotations.annotations ? summarizeJobAnnotations(annotations.annotations, jobId, {
|
|
34
|
+
truncated: annotations.summary?.truncated ?? false
|
|
35
|
+
}) : undefined;
|
|
36
|
+
useEffect(()=>{
|
|
37
|
+
if (!jobId || !hasLoadedData) return;
|
|
38
|
+
const heading = rootRef.current?.querySelector('[data-job-heading]');
|
|
39
|
+
// The heading is intentionally the route-change focus target: it announces the new job
|
|
40
|
+
// after rail navigation without putting focus on a decorative status element.
|
|
41
|
+
heading?.focus({
|
|
42
|
+
preventScroll: true
|
|
43
|
+
});
|
|
44
|
+
}, [
|
|
45
|
+
hasLoadedData,
|
|
46
|
+
jobId
|
|
47
|
+
]);
|
|
48
|
+
if (query.isPending) return /*#__PURE__*/ _jsx(JobDetailSkeleton, {});
|
|
49
|
+
if (query.isError && query.data === undefined) {
|
|
50
|
+
if (query.error instanceof ApiError && query.error.status === 404) {
|
|
51
|
+
return /*#__PURE__*/ _jsx(WorkflowRunNotFound, {});
|
|
52
|
+
}
|
|
53
|
+
return /*#__PURE__*/ _jsx(QueryLoadError, {
|
|
54
|
+
query: query,
|
|
55
|
+
subject: "workflow run",
|
|
56
|
+
icon: "pulseLine"
|
|
57
|
+
});
|
|
58
|
+
}
|
|
59
|
+
if (query.data === undefined) return /*#__PURE__*/ _jsx(JobDetailSkeleton, {});
|
|
60
|
+
const run = query.data;
|
|
61
|
+
const job = run.jobs.find((candidate)=>candidate.id === jobId);
|
|
62
|
+
if (!job) {
|
|
63
|
+
return /*#__PURE__*/ _jsx(JobNotFoundState, {
|
|
64
|
+
workspaceSlug: workspaceSlug,
|
|
65
|
+
projectSlug: projectSlug,
|
|
66
|
+
workflowRunId: workflowRunId,
|
|
67
|
+
search: search
|
|
68
|
+
});
|
|
69
|
+
}
|
|
70
|
+
const resolvedSelection = resolveWorkflowJobSelection({
|
|
71
|
+
job,
|
|
72
|
+
selection: search
|
|
73
|
+
});
|
|
74
|
+
const selectedJobExecution = resolvedSelection.jobExecution;
|
|
75
|
+
const hasExplicitStep = Boolean(search.stepId && resolvedSelection.step);
|
|
76
|
+
const currentLandingSelection = workflowJobLandingSelection(selectedJobExecution);
|
|
77
|
+
if (selectedJobExecution) {
|
|
78
|
+
const frozenLanding = landingSelectionRef.current;
|
|
79
|
+
if (!frozenLanding || frozenLanding.jobId !== job.id || frozenLanding.jobExecutionId !== selectedJobExecution.id) {
|
|
80
|
+
landingSelectionRef.current = {
|
|
81
|
+
jobId: job.id,
|
|
82
|
+
jobExecutionId: selectedJobExecution.id,
|
|
83
|
+
selection: currentLandingSelection,
|
|
84
|
+
hasSelection: currentLandingSelection !== undefined
|
|
85
|
+
};
|
|
86
|
+
} else if (!frozenLanding.hasSelection && currentLandingSelection) {
|
|
87
|
+
landingSelectionRef.current = {
|
|
88
|
+
...frozenLanding,
|
|
89
|
+
selection: currentLandingSelection,
|
|
90
|
+
hasSelection: true
|
|
91
|
+
};
|
|
92
|
+
}
|
|
93
|
+
} else {
|
|
94
|
+
landingSelectionRef.current = undefined;
|
|
95
|
+
}
|
|
96
|
+
const landingSelection = landingSelectionRef.current?.selection;
|
|
97
|
+
const selectedAttemptId = hasExplicitStep ? resolvedSelection.selectedAttemptId : undefined;
|
|
98
|
+
const runningSelection = runningStepSelection(selectedJobExecution);
|
|
99
|
+
const selectedStepId = resolvedSelection.step?.id ?? landingSelection?.stepId;
|
|
100
|
+
const selectedAttemptForNotice = hasExplicitStep ? resolvedSelection.selectedAttemptId : landingSelection?.attemptId;
|
|
101
|
+
const showRetargetNotice = runningSelection !== undefined && (selectedStepId !== runningSelection.stepId || selectedAttemptForNotice !== runningSelection.attemptId);
|
|
102
|
+
const succeededSummary = !hasExplicitStep && landingSelection === undefined && selectedJobExecution ? jobSucceededSummary(job, selectedJobExecution) : undefined;
|
|
103
|
+
function selectExecution(jobExecutionId) {
|
|
104
|
+
onSelectionChange({
|
|
105
|
+
...search,
|
|
106
|
+
jobExecutionId,
|
|
107
|
+
stepId: undefined,
|
|
108
|
+
stepAttemptId: undefined
|
|
109
|
+
});
|
|
110
|
+
}
|
|
111
|
+
function selectAttempt(attemptId) {
|
|
112
|
+
if (!selectedJobExecution) return;
|
|
113
|
+
if (!attemptId) {
|
|
114
|
+
onSelectionChange({
|
|
115
|
+
...search,
|
|
116
|
+
jobExecutionId: selectedJobExecution.id,
|
|
117
|
+
stepId: undefined,
|
|
118
|
+
stepAttemptId: undefined
|
|
119
|
+
});
|
|
120
|
+
return;
|
|
121
|
+
}
|
|
122
|
+
const match = findAttempt(selectedJobExecution, attemptId);
|
|
123
|
+
if (!match) return;
|
|
124
|
+
onSelectionChange({
|
|
125
|
+
...search,
|
|
126
|
+
jobExecutionId: selectedJobExecution.id,
|
|
127
|
+
stepId: match.step.id,
|
|
128
|
+
stepAttemptId: match.attemptId
|
|
129
|
+
});
|
|
130
|
+
}
|
|
131
|
+
function retargetToRunningStep() {
|
|
132
|
+
if (!runningSelection || !selectedJobExecution) return;
|
|
133
|
+
onSelectionChange({
|
|
134
|
+
...search,
|
|
135
|
+
jobExecutionId: selectedJobExecution.id,
|
|
136
|
+
stepId: runningSelection.stepId,
|
|
137
|
+
stepAttemptId: runningSelection.attemptId
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
return /*#__PURE__*/ _jsx(TimeTickerProvider, {
|
|
141
|
+
intervalMs: 1000,
|
|
142
|
+
reducedMotionIntervalMs: 10_000,
|
|
143
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
144
|
+
ref: rootRef,
|
|
145
|
+
className: "flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden",
|
|
146
|
+
children: [
|
|
147
|
+
query.isError ? /*#__PURE__*/ _jsx(WorkflowRunStaleError, {
|
|
148
|
+
query: query
|
|
149
|
+
}) : null,
|
|
150
|
+
newerJob && newerAttempt && newerAttempt > run.runAttempt.attempt ? /*#__PURE__*/ _jsx(NewerAttemptNotice, {
|
|
151
|
+
workspaceSlug: workspaceSlug,
|
|
152
|
+
projectSlug: projectSlug,
|
|
153
|
+
runId: run.id,
|
|
154
|
+
jobId: newerJob.id,
|
|
155
|
+
attempt: newerAttempt
|
|
156
|
+
}) : null,
|
|
157
|
+
/*#__PURE__*/ _jsx("div", {
|
|
158
|
+
ref: pageScrollRef,
|
|
159
|
+
className: "@container min-h-0 flex-1 overflow-auto pb-24",
|
|
160
|
+
children: /*#__PURE__*/ _jsxs("section", {
|
|
161
|
+
"aria-label": `${job.displayName} logs`,
|
|
162
|
+
className: "mx-auto flex w-full max-w-[1120px] flex-col gap-8 px-24",
|
|
163
|
+
children: [
|
|
164
|
+
/*#__PURE__*/ _jsxs("section", {
|
|
165
|
+
className: "min-w-0 overflow-hidden",
|
|
166
|
+
children: [
|
|
167
|
+
/*#__PURE__*/ _jsx(JobDetailHeader, {
|
|
168
|
+
job: job,
|
|
169
|
+
selectedJobExecution: selectedJobExecution,
|
|
170
|
+
onSelectedJobExecutionChange: selectExecution,
|
|
171
|
+
workspaceSlug: workspaceSlug,
|
|
172
|
+
projectSlug: projectSlug,
|
|
173
|
+
workflowRunId: workflowRunId,
|
|
174
|
+
runAttempt: run.runAttempt.attempt,
|
|
175
|
+
annotationSummary: jobAnnotationSummary
|
|
176
|
+
}),
|
|
177
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
178
|
+
as: "h3",
|
|
179
|
+
className: "sr-only",
|
|
180
|
+
children: "Logs"
|
|
181
|
+
}),
|
|
182
|
+
selectedJobExecution ? /*#__PURE__*/ _jsx(StepList, {
|
|
183
|
+
job: job,
|
|
184
|
+
jobExecution: selectedJobExecution,
|
|
185
|
+
selectedAttemptId: selectedAttemptId,
|
|
186
|
+
defaultSelectedAttemptId: landingSelection?.attemptId,
|
|
187
|
+
onSelectedAttemptChange: selectAttempt,
|
|
188
|
+
autoSelectActiveAttempt: true,
|
|
189
|
+
emptyState: emptyStateForJob(job, selectedJobExecution),
|
|
190
|
+
showHeader: false,
|
|
191
|
+
className: "rounded-none border-0",
|
|
192
|
+
renderExpandedStep: (context)=>/*#__PURE__*/ _jsx(ExpandedStep, {
|
|
193
|
+
context: context,
|
|
194
|
+
workspaceSlug: workspaceSlug,
|
|
195
|
+
pageScrollRef: pageScrollRef
|
|
196
|
+
})
|
|
197
|
+
}) : /*#__PURE__*/ _jsx(EmptyStateForMissingExecution, {
|
|
198
|
+
job: job
|
|
199
|
+
})
|
|
200
|
+
]
|
|
201
|
+
}),
|
|
202
|
+
showRetargetNotice && runningSelection ? /*#__PURE__*/ _jsxs("div", {
|
|
203
|
+
role: "status",
|
|
204
|
+
"aria-live": "polite",
|
|
205
|
+
className: "flex min-w-0 items-center justify-between gap-8 rounded-8 border border-border-neutral-base bg-background-components-base px-10 py-8",
|
|
206
|
+
children: [
|
|
207
|
+
/*#__PURE__*/ _jsxs(Text, {
|
|
208
|
+
size: "xs",
|
|
209
|
+
className: "min-w-0 text-foreground-neutral-muted",
|
|
210
|
+
children: [
|
|
211
|
+
"Run moved on to",
|
|
212
|
+
' ',
|
|
213
|
+
/*#__PURE__*/ _jsx("span", {
|
|
214
|
+
className: "font-code text-foreground-neutral-base",
|
|
215
|
+
children: runningSelection.stepLabel
|
|
216
|
+
}),
|
|
217
|
+
"."
|
|
218
|
+
]
|
|
219
|
+
}),
|
|
220
|
+
/*#__PURE__*/ _jsx("button", {
|
|
221
|
+
type: "button",
|
|
222
|
+
className: "shrink-0 rounded-4 px-6 py-4 text-xs font-medium text-foreground-highlight-interactive outline-none focus-visible:shadow-border-interactive-with-active",
|
|
223
|
+
onClick: retargetToRunningStep,
|
|
224
|
+
children: "Jump to it"
|
|
225
|
+
})
|
|
226
|
+
]
|
|
227
|
+
}) : null,
|
|
228
|
+
succeededSummary ? /*#__PURE__*/ _jsx(Text, {
|
|
229
|
+
size: "xs",
|
|
230
|
+
className: "px-8 text-foreground-neutral-muted",
|
|
231
|
+
children: succeededSummary
|
|
232
|
+
}) : null
|
|
233
|
+
]
|
|
234
|
+
})
|
|
235
|
+
})
|
|
236
|
+
]
|
|
237
|
+
})
|
|
238
|
+
});
|
|
239
|
+
}
|
|
240
|
+
function ExpandedStep({ context, workspaceSlug, pageScrollRef }) {
|
|
241
|
+
if (context.carriedOver) return /*#__PURE__*/ _jsx(CarriedOverStepPanel, {});
|
|
242
|
+
const selectedAttemptError = toSelectedAttemptError(context.step, context.attemptError) ?? context.step.error;
|
|
243
|
+
return /*#__PURE__*/ _jsxs("section", {
|
|
244
|
+
role: "region",
|
|
245
|
+
tabIndex: 0,
|
|
246
|
+
"aria-label": `${context.stepLabel} output, attempt ${context.attempt}`,
|
|
247
|
+
className: "flex min-w-0 flex-col gap-10 border-t border-border-neutral-base bg-background-neutral-subtle px-16 py-12 outline-none focus-visible:shadow-border-interactive-with-active",
|
|
248
|
+
children: [
|
|
249
|
+
isAgentConfigFailure(context.step, selectedAttemptError) ? /*#__PURE__*/ _jsx(AgentConfigFailureCallout, {
|
|
250
|
+
workspaceSlug: workspaceSlug,
|
|
251
|
+
config: context.step.agentConfig,
|
|
252
|
+
error: selectedAttemptError
|
|
253
|
+
}) : null,
|
|
254
|
+
/*#__PURE__*/ _jsx(StepAttemptLogPanel, {
|
|
255
|
+
stepId: context.stepId,
|
|
256
|
+
attempt: context.attempt,
|
|
257
|
+
attemptStatus: context.attemptStatus,
|
|
258
|
+
attemptStartedAt: context.attemptStartedAt,
|
|
259
|
+
pageScrollRef: pageScrollRef,
|
|
260
|
+
surfaceClassName: "rounded-8"
|
|
261
|
+
})
|
|
262
|
+
]
|
|
263
|
+
});
|
|
264
|
+
}
|
|
265
|
+
function EmptyStateForMissingExecution({ job }) {
|
|
266
|
+
const emptyState = emptyStateForMissingExecution(job);
|
|
267
|
+
return /*#__PURE__*/ _jsx(EmptyState, {
|
|
268
|
+
className: "min-h-120 px-16 py-20",
|
|
269
|
+
icon: "componentLine",
|
|
270
|
+
title: emptyState.title,
|
|
271
|
+
description: emptyState.description,
|
|
272
|
+
variant: "compact"
|
|
273
|
+
});
|
|
274
|
+
}
|
|
275
|
+
function JobNotFoundState({ workspaceSlug, projectSlug, workflowRunId, search }) {
|
|
276
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
277
|
+
className: "flex min-h-0 min-w-0 flex-1 flex-col items-center justify-center gap-12 p-24",
|
|
278
|
+
children: [
|
|
279
|
+
/*#__PURE__*/ _jsx(EmptyState, {
|
|
280
|
+
icon: "componentLine",
|
|
281
|
+
title: "Job not found",
|
|
282
|
+
description: "This job is not part of the selected workflow run."
|
|
283
|
+
}),
|
|
284
|
+
/*#__PURE__*/ _jsxs(Link, {
|
|
285
|
+
to: "/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId",
|
|
286
|
+
params: {
|
|
287
|
+
workspaceSlug,
|
|
288
|
+
projectSlug,
|
|
289
|
+
workflowRunId
|
|
290
|
+
},
|
|
291
|
+
search: workflowRunSearchParams({
|
|
292
|
+
runAttempt: search.runAttempt
|
|
293
|
+
}, {
|
|
294
|
+
runAttempt: search.runAttempt
|
|
295
|
+
}),
|
|
296
|
+
className: "inline-flex items-center gap-6 rounded-6 px-8 py-6 text-sm text-foreground-highlight-interactive outline-none focus-visible:shadow-border-interactive-with-active",
|
|
297
|
+
children: [
|
|
298
|
+
/*#__PURE__*/ _jsx(Icon, {
|
|
299
|
+
name: "arrowLeftLine",
|
|
300
|
+
size: 14,
|
|
301
|
+
"aria-hidden": "true"
|
|
302
|
+
}),
|
|
303
|
+
"Back to run summary"
|
|
304
|
+
]
|
|
305
|
+
})
|
|
306
|
+
]
|
|
307
|
+
});
|
|
308
|
+
}
|
|
309
|
+
function NewerAttemptNotice({ workspaceSlug, projectSlug, runId, jobId, attempt }) {
|
|
310
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
311
|
+
role: "status",
|
|
312
|
+
className: "border-b border-border-neutral-base px-16 py-8",
|
|
313
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
314
|
+
className: "mx-auto flex max-w-[1120px] items-center justify-between gap-8 rounded-8 border border-border-neutral-base bg-background-components-base px-10 py-8",
|
|
315
|
+
children: [
|
|
316
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
317
|
+
size: "xs",
|
|
318
|
+
className: "text-foreground-neutral-muted",
|
|
319
|
+
children: "A newer run attempt is available."
|
|
320
|
+
}),
|
|
321
|
+
/*#__PURE__*/ _jsxs(Link, {
|
|
322
|
+
to: "/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId/jobs/$jobId",
|
|
323
|
+
params: {
|
|
324
|
+
workspaceSlug,
|
|
325
|
+
projectSlug,
|
|
326
|
+
workflowRunId: runId,
|
|
327
|
+
jobId
|
|
328
|
+
},
|
|
329
|
+
search: workflowJobSearchParams({
|
|
330
|
+
runAttempt: attempt
|
|
331
|
+
}),
|
|
332
|
+
className: "shrink-0 rounded-4 px-6 py-4 text-xs font-medium text-foreground-highlight-interactive outline-none focus-visible:shadow-border-interactive-with-active",
|
|
333
|
+
children: [
|
|
334
|
+
"View attempt #",
|
|
335
|
+
attempt
|
|
336
|
+
]
|
|
337
|
+
})
|
|
338
|
+
]
|
|
339
|
+
})
|
|
340
|
+
});
|
|
341
|
+
}
|
|
342
|
+
function runningStepSelection(jobExecution) {
|
|
343
|
+
if (!jobExecution) return undefined;
|
|
344
|
+
const steps = [
|
|
345
|
+
...jobExecution.steps
|
|
346
|
+
].sort((left, right)=>left.position - right.position || left.id.localeCompare(right.id));
|
|
347
|
+
for(let stepIndex = steps.length - 1; stepIndex >= 0; stepIndex -= 1){
|
|
348
|
+
const step = steps[stepIndex];
|
|
349
|
+
if (!step) continue;
|
|
350
|
+
const attempt = [
|
|
351
|
+
...step.attempts
|
|
352
|
+
].sort((left, right)=>left.attempt - right.attempt || left.id.localeCompare(right.id)).reverse().find((candidate)=>candidate.status === 'running');
|
|
353
|
+
if (attempt) return {
|
|
354
|
+
stepId: step.id,
|
|
355
|
+
attemptId: attempt.id,
|
|
356
|
+
stepLabel: step.name || step.key || step.id
|
|
357
|
+
};
|
|
358
|
+
}
|
|
359
|
+
return undefined;
|
|
360
|
+
}
|
|
361
|
+
function findAttempt(jobExecution, attemptId) {
|
|
362
|
+
for (const step of jobExecution.steps){
|
|
363
|
+
const attempt = step.attempts.find((candidate)=>candidate.id === attemptId);
|
|
364
|
+
if (attempt) return {
|
|
365
|
+
step,
|
|
366
|
+
attemptId: attempt.id
|
|
367
|
+
};
|
|
368
|
+
}
|
|
369
|
+
return undefined;
|
|
370
|
+
}
|
|
371
|
+
function JobDetailSkeleton() {
|
|
372
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
373
|
+
className: "min-h-0 min-w-0 flex-1 overflow-auto px-24 pb-24",
|
|
374
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
375
|
+
className: "mx-auto max-w-[1120px] overflow-hidden",
|
|
376
|
+
children: [
|
|
377
|
+
/*#__PURE__*/ _jsxs("header", {
|
|
378
|
+
className: "flex items-center gap-12 border-b border-border-neutral-base px-16 py-12",
|
|
379
|
+
children: [
|
|
380
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
381
|
+
className: "size-20 rounded-full"
|
|
382
|
+
}),
|
|
383
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
384
|
+
className: "h-20 w-160 rounded-4"
|
|
385
|
+
}),
|
|
386
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
387
|
+
className: "h-24 w-72 rounded-6"
|
|
388
|
+
}),
|
|
389
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
390
|
+
className: "h-24 w-180 rounded-4"
|
|
391
|
+
})
|
|
392
|
+
]
|
|
393
|
+
}),
|
|
394
|
+
/*#__PURE__*/ _jsx("div", {
|
|
395
|
+
className: "p-16",
|
|
396
|
+
children: JOB_DETAIL_SKELETON_ROWS.map((row)=>/*#__PURE__*/ _jsxs("div", {
|
|
397
|
+
className: "flex min-h-44 items-center gap-8 border-b border-border-neutral-base last:border-b-0",
|
|
398
|
+
children: [
|
|
399
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
400
|
+
className: "size-14 rounded-full"
|
|
401
|
+
}),
|
|
402
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
403
|
+
className: "h-16 w-180 rounded-4"
|
|
404
|
+
})
|
|
405
|
+
]
|
|
406
|
+
}, row))
|
|
407
|
+
})
|
|
408
|
+
]
|
|
409
|
+
})
|
|
410
|
+
});
|
|
411
|
+
}
|
|
412
|
+
const JOB_DETAIL_SKELETON_ROWS = [
|
|
413
|
+
'step-1',
|
|
414
|
+
'step-2',
|
|
415
|
+
'step-3',
|
|
416
|
+
'step-4',
|
|
417
|
+
'step-5'
|
|
418
|
+
];
|
|
419
|
+
|
|
420
|
+
//# sourceMappingURL=job-detail-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/job-detail/job-detail-view.tsx"],"sourcesContent":["// biome-ignore-all lint/a11y/noRedundantRoles: the job log region keeps an explicit role for the public accessibility contract.\n// biome-ignore-all lint/a11y/noNoninteractiveTabindex: the job log region is intentionally keyboard focusable.\n\nimport {ApiError} from '@shipfox/client-api';\nimport {QueryLoadError} from '@shipfox/client-ui';\nimport {EmptyState} from '@shipfox/react-ui/empty-state';\nimport {Icon} from '@shipfox/react-ui/icon';\nimport {Skeleton} from '@shipfox/react-ui/skeleton';\nimport {TimeTickerProvider} from '@shipfox/react-ui/time-ticker';\nimport {Text} from '@shipfox/react-ui/typography';\nimport {Link} from '@tanstack/react-router';\nimport {type RefObject, useEffect, useRef} from 'react';\nimport {summarizeJobAnnotations} from '#core/run-annotation.js';\nimport type {Job, JobExecution} from '#core/workflow-run.js';\nimport {useRunAnnotationsQuery} from '#hooks/api/run-annotations.js';\nimport type {useWorkflowRunAttemptQuery} from '#hooks/api/workflow-runs.js';\nimport {\n type WorkflowJobSearch,\n workflowJobSearchParams,\n workflowRunSearchParams,\n} from '#routes/inputs.js';\nimport {type StepExpandedContext, StepList} from '../step-list/index.js';\nimport {\n WorkflowRunNotFound,\n WorkflowRunStaleError,\n} from '../workflow-run-view/workflow-run-states.js';\nimport {AgentConfigFailureCallout} from './agent-config-failure-callout.js';\nimport {JobDetailHeader} from './job-detail-header.js';\nimport {\n CarriedOverStepPanel,\n emptyStateForJob,\n emptyStateForMissingExecution,\n isAgentConfigFailure,\n jobSucceededSummary,\n toSelectedAttemptError,\n} from './job-empty-states.js';\nimport {\n resolveWorkflowJobSelection,\n type WorkflowJobLandingSelection,\n workflowJobLandingSelection,\n} from './job-selection.js';\nimport {StepAttemptLogPanel} from './step-attempt-log-panel.js';\n\nexport interface JobDetailViewProps {\n workspaceSlug: string;\n projectSlug: string;\n workflowRunId: string;\n jobId: string;\n search: WorkflowJobSearch;\n query: ReturnType<typeof useWorkflowRunAttemptQuery>;\n newerAttempt?: number | undefined;\n newerJob?: Job | undefined;\n onSelectionChange: (selection: WorkflowJobSearch) => void;\n}\n\nexport function JobDetailView({\n workspaceSlug,\n projectSlug,\n workflowRunId,\n jobId,\n search,\n query,\n newerAttempt,\n newerJob,\n onSelectionChange,\n}: JobDetailViewProps) {\n const rootRef = useRef<HTMLDivElement>(null);\n const pageScrollRef = useRef<HTMLDivElement>(null);\n const landingSelectionRef = useRef<FrozenLandingSelection | undefined>(undefined);\n const hasLoadedData = query.data !== undefined;\n // Same query key as the run workspace, so this reads the cache instead of fetching again.\n const annotations = useRunAnnotationsQuery({\n workflowRunId,\n runAttempt: query.data?.runAttempt.attempt,\n });\n const jobAnnotationSummary = annotations.annotations\n ? summarizeJobAnnotations(annotations.annotations, jobId, {\n truncated: annotations.summary?.truncated ?? false,\n })\n : undefined;\n\n useEffect(() => {\n if (!jobId || !hasLoadedData) return;\n const heading = rootRef.current?.querySelector<HTMLElement>('[data-job-heading]');\n // The heading is intentionally the route-change focus target: it announces the new job\n // after rail navigation without putting focus on a decorative status element.\n heading?.focus({preventScroll: true});\n }, [hasLoadedData, jobId]);\n\n if (query.isPending) return <JobDetailSkeleton />;\n\n if (query.isError && query.data === undefined) {\n if (query.error instanceof ApiError && query.error.status === 404) {\n return <WorkflowRunNotFound />;\n }\n return <QueryLoadError query={query} subject=\"workflow run\" icon=\"pulseLine\" />;\n }\n\n if (query.data === undefined) return <JobDetailSkeleton />;\n\n const run = query.data;\n const job = run.jobs.find((candidate) => candidate.id === jobId);\n if (!job) {\n return (\n <JobNotFoundState\n workspaceSlug={workspaceSlug}\n projectSlug={projectSlug}\n workflowRunId={workflowRunId}\n search={search}\n />\n );\n }\n\n const resolvedSelection = resolveWorkflowJobSelection({job, selection: search});\n const selectedJobExecution = resolvedSelection.jobExecution;\n const hasExplicitStep = Boolean(search.stepId && resolvedSelection.step);\n const currentLandingSelection = workflowJobLandingSelection(selectedJobExecution);\n if (selectedJobExecution) {\n const frozenLanding = landingSelectionRef.current;\n if (\n !frozenLanding ||\n frozenLanding.jobId !== job.id ||\n frozenLanding.jobExecutionId !== selectedJobExecution.id\n ) {\n landingSelectionRef.current = {\n jobId: job.id,\n jobExecutionId: selectedJobExecution.id,\n selection: currentLandingSelection,\n hasSelection: currentLandingSelection !== undefined,\n };\n } else if (!frozenLanding.hasSelection && currentLandingSelection) {\n landingSelectionRef.current = {\n ...frozenLanding,\n selection: currentLandingSelection,\n hasSelection: true,\n };\n }\n } else {\n landingSelectionRef.current = undefined;\n }\n const landingSelection = landingSelectionRef.current?.selection;\n const selectedAttemptId = hasExplicitStep ? resolvedSelection.selectedAttemptId : undefined;\n const runningSelection = runningStepSelection(selectedJobExecution);\n const selectedStepId = resolvedSelection.step?.id ?? landingSelection?.stepId;\n const selectedAttemptForNotice = hasExplicitStep\n ? resolvedSelection.selectedAttemptId\n : landingSelection?.attemptId;\n const showRetargetNotice =\n runningSelection !== undefined &&\n (selectedStepId !== runningSelection.stepId ||\n selectedAttemptForNotice !== runningSelection.attemptId);\n const succeededSummary =\n !hasExplicitStep && landingSelection === undefined && selectedJobExecution\n ? jobSucceededSummary(job, selectedJobExecution)\n : undefined;\n\n function selectExecution(jobExecutionId: string) {\n onSelectionChange({\n ...search,\n jobExecutionId,\n stepId: undefined,\n stepAttemptId: undefined,\n });\n }\n\n function selectAttempt(attemptId: string | undefined) {\n if (!selectedJobExecution) return;\n if (!attemptId) {\n onSelectionChange({\n ...search,\n jobExecutionId: selectedJobExecution.id,\n stepId: undefined,\n stepAttemptId: undefined,\n });\n return;\n }\n\n const match = findAttempt(selectedJobExecution, attemptId);\n if (!match) return;\n onSelectionChange({\n ...search,\n jobExecutionId: selectedJobExecution.id,\n stepId: match.step.id,\n stepAttemptId: match.attemptId,\n });\n }\n\n function retargetToRunningStep() {\n if (!runningSelection || !selectedJobExecution) return;\n onSelectionChange({\n ...search,\n jobExecutionId: selectedJobExecution.id,\n stepId: runningSelection.stepId,\n stepAttemptId: runningSelection.attemptId,\n });\n }\n\n return (\n <TimeTickerProvider intervalMs={1000} reducedMotionIntervalMs={10_000}>\n <div ref={rootRef} className=\"flex min-h-0 min-w-0 flex-1 flex-col overflow-hidden\">\n {query.isError ? <WorkflowRunStaleError query={query} /> : null}\n {newerJob && newerAttempt && newerAttempt > run.runAttempt.attempt ? (\n <NewerAttemptNotice\n workspaceSlug={workspaceSlug}\n projectSlug={projectSlug}\n runId={run.id}\n jobId={newerJob.id}\n attempt={newerAttempt}\n />\n ) : null}\n <div ref={pageScrollRef} className=\"@container min-h-0 flex-1 overflow-auto pb-24\">\n <section\n aria-label={`${job.displayName} logs`}\n className=\"mx-auto flex w-full max-w-[1120px] flex-col gap-8 px-24\"\n >\n <section className=\"min-w-0 overflow-hidden\">\n <JobDetailHeader\n job={job}\n selectedJobExecution={selectedJobExecution}\n onSelectedJobExecutionChange={selectExecution}\n workspaceSlug={workspaceSlug}\n projectSlug={projectSlug}\n workflowRunId={workflowRunId}\n runAttempt={run.runAttempt.attempt}\n annotationSummary={jobAnnotationSummary}\n />\n <Text as=\"h3\" className=\"sr-only\">\n Logs\n </Text>\n {selectedJobExecution ? (\n <StepList\n job={job}\n jobExecution={selectedJobExecution}\n selectedAttemptId={selectedAttemptId}\n defaultSelectedAttemptId={landingSelection?.attemptId}\n onSelectedAttemptChange={selectAttempt}\n autoSelectActiveAttempt\n emptyState={emptyStateForJob(job, selectedJobExecution)}\n showHeader={false}\n className=\"rounded-none border-0\"\n renderExpandedStep={(context) => (\n <ExpandedStep\n context={context}\n workspaceSlug={workspaceSlug}\n pageScrollRef={pageScrollRef}\n />\n )}\n />\n ) : (\n <EmptyStateForMissingExecution job={job} />\n )}\n </section>\n {showRetargetNotice && runningSelection ? (\n <div\n role=\"status\"\n aria-live=\"polite\"\n className=\"flex min-w-0 items-center justify-between gap-8 rounded-8 border border-border-neutral-base bg-background-components-base px-10 py-8\"\n >\n <Text size=\"xs\" className=\"min-w-0 text-foreground-neutral-muted\">\n Run moved on to{' '}\n <span className=\"font-code text-foreground-neutral-base\">\n {runningSelection.stepLabel}\n </span>\n .\n </Text>\n <button\n type=\"button\"\n className=\"shrink-0 rounded-4 px-6 py-4 text-xs font-medium text-foreground-highlight-interactive outline-none focus-visible:shadow-border-interactive-with-active\"\n onClick={retargetToRunningStep}\n >\n Jump to it\n </button>\n </div>\n ) : null}\n {succeededSummary ? (\n <Text size=\"xs\" className=\"px-8 text-foreground-neutral-muted\">\n {succeededSummary}\n </Text>\n ) : null}\n </section>\n </div>\n </div>\n </TimeTickerProvider>\n );\n}\n\nfunction ExpandedStep({\n context,\n workspaceSlug,\n pageScrollRef,\n}: {\n context: StepExpandedContext;\n workspaceSlug: string;\n pageScrollRef: RefObject<HTMLDivElement | null>;\n}) {\n if (context.carriedOver) return <CarriedOverStepPanel />;\n\n const selectedAttemptError =\n toSelectedAttemptError(context.step, context.attemptError) ?? context.step.error;\n\n return (\n <section\n role=\"region\"\n tabIndex={0}\n aria-label={`${context.stepLabel} output, attempt ${context.attempt}`}\n className=\"flex min-w-0 flex-col gap-10 border-t border-border-neutral-base bg-background-neutral-subtle px-16 py-12 outline-none focus-visible:shadow-border-interactive-with-active\"\n >\n {isAgentConfigFailure(context.step, selectedAttemptError) ? (\n <AgentConfigFailureCallout\n workspaceSlug={workspaceSlug}\n config={context.step.agentConfig}\n error={selectedAttemptError}\n />\n ) : null}\n <StepAttemptLogPanel\n stepId={context.stepId}\n attempt={context.attempt}\n attemptStatus={context.attemptStatus}\n attemptStartedAt={context.attemptStartedAt}\n pageScrollRef={pageScrollRef}\n surfaceClassName=\"rounded-8\"\n />\n </section>\n );\n}\n\nfunction EmptyStateForMissingExecution({job}: {job: Job}) {\n const emptyState = emptyStateForMissingExecution(job);\n return (\n <EmptyState\n className=\"min-h-120 px-16 py-20\"\n icon=\"componentLine\"\n title={emptyState.title}\n description={emptyState.description}\n variant=\"compact\"\n />\n );\n}\n\nfunction JobNotFoundState({\n workspaceSlug,\n projectSlug,\n workflowRunId,\n search,\n}: {\n workspaceSlug: string;\n projectSlug: string;\n workflowRunId: string;\n search: WorkflowJobSearch;\n}) {\n return (\n <div className=\"flex min-h-0 min-w-0 flex-1 flex-col items-center justify-center gap-12 p-24\">\n <EmptyState\n icon=\"componentLine\"\n title=\"Job not found\"\n description=\"This job is not part of the selected workflow run.\"\n />\n <Link\n to=\"/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId\"\n params={{workspaceSlug, projectSlug, workflowRunId}}\n search={\n workflowRunSearchParams(\n {runAttempt: search.runAttempt},\n {runAttempt: search.runAttempt},\n ) as never\n }\n className=\"inline-flex items-center gap-6 rounded-6 px-8 py-6 text-sm text-foreground-highlight-interactive outline-none focus-visible:shadow-border-interactive-with-active\"\n >\n <Icon name=\"arrowLeftLine\" size={14} aria-hidden=\"true\" />\n Back to run summary\n </Link>\n </div>\n );\n}\n\nfunction NewerAttemptNotice({\n workspaceSlug,\n projectSlug,\n runId,\n jobId,\n attempt,\n}: {\n workspaceSlug: string;\n projectSlug: string;\n runId: string;\n jobId: string;\n attempt: number;\n}) {\n return (\n <div role=\"status\" className=\"border-b border-border-neutral-base px-16 py-8\">\n <div className=\"mx-auto flex max-w-[1120px] items-center justify-between gap-8 rounded-8 border border-border-neutral-base bg-background-components-base px-10 py-8\">\n <Text size=\"xs\" className=\"text-foreground-neutral-muted\">\n A newer run attempt is available.\n </Text>\n <Link\n to=\"/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId/jobs/$jobId\"\n params={{workspaceSlug, projectSlug, workflowRunId: runId, jobId}}\n search={workflowJobSearchParams({runAttempt: attempt}) as never}\n className=\"shrink-0 rounded-4 px-6 py-4 text-xs font-medium text-foreground-highlight-interactive outline-none focus-visible:shadow-border-interactive-with-active\"\n >\n View attempt #{attempt}\n </Link>\n </div>\n </div>\n );\n}\n\nfunction runningStepSelection(jobExecution: JobExecution | undefined) {\n if (!jobExecution) return undefined;\n const steps = [...jobExecution.steps].sort(\n (left, right) => left.position - right.position || left.id.localeCompare(right.id),\n );\n for (let stepIndex = steps.length - 1; stepIndex >= 0; stepIndex -= 1) {\n const step = steps[stepIndex];\n if (!step) continue;\n const attempt = [...step.attempts]\n .sort((left, right) => left.attempt - right.attempt || left.id.localeCompare(right.id))\n .reverse()\n .find((candidate) => candidate.status === 'running');\n if (attempt)\n return {stepId: step.id, attemptId: attempt.id, stepLabel: step.name || step.key || step.id};\n }\n return undefined;\n}\n\nfunction findAttempt(jobExecution: JobExecution, attemptId: string) {\n for (const step of jobExecution.steps) {\n const attempt = step.attempts.find((candidate) => candidate.id === attemptId);\n if (attempt) return {step, attemptId: attempt.id};\n }\n return undefined;\n}\n\nfunction JobDetailSkeleton() {\n return (\n <div className=\"min-h-0 min-w-0 flex-1 overflow-auto px-24 pb-24\">\n <div className=\"mx-auto max-w-[1120px] overflow-hidden\">\n <header className=\"flex items-center gap-12 border-b border-border-neutral-base px-16 py-12\">\n <Skeleton className=\"size-20 rounded-full\" />\n <Skeleton className=\"h-20 w-160 rounded-4\" />\n <Skeleton className=\"h-24 w-72 rounded-6\" />\n <Skeleton className=\"h-24 w-180 rounded-4\" />\n </header>\n <div className=\"p-16\">\n {JOB_DETAIL_SKELETON_ROWS.map((row) => (\n <div\n key={row}\n className=\"flex min-h-44 items-center gap-8 border-b border-border-neutral-base last:border-b-0\"\n >\n <Skeleton className=\"size-14 rounded-full\" />\n <Skeleton className=\"h-16 w-180 rounded-4\" />\n </div>\n ))}\n </div>\n </div>\n </div>\n );\n}\n\nconst JOB_DETAIL_SKELETON_ROWS = ['step-1', 'step-2', 'step-3', 'step-4', 'step-5'];\n\ninterface FrozenLandingSelection {\n jobId: string;\n jobExecutionId: string;\n selection: WorkflowJobLandingSelection | undefined;\n hasSelection: boolean;\n}\n"],"names":["ApiError","QueryLoadError","EmptyState","Icon","Skeleton","TimeTickerProvider","Text","Link","useEffect","useRef","summarizeJobAnnotations","useRunAnnotationsQuery","workflowJobSearchParams","workflowRunSearchParams","StepList","WorkflowRunNotFound","WorkflowRunStaleError","AgentConfigFailureCallout","JobDetailHeader","CarriedOverStepPanel","emptyStateForJob","emptyStateForMissingExecution","isAgentConfigFailure","jobSucceededSummary","toSelectedAttemptError","resolveWorkflowJobSelection","workflowJobLandingSelection","StepAttemptLogPanel","JobDetailView","workspaceSlug","projectSlug","workflowRunId","jobId","search","query","newerAttempt","newerJob","onSelectionChange","rootRef","pageScrollRef","landingSelectionRef","undefined","hasLoadedData","data","annotations","runAttempt","attempt","jobAnnotationSummary","truncated","summary","heading","current","querySelector","focus","preventScroll","isPending","JobDetailSkeleton","isError","error","status","subject","icon","run","job","jobs","find","candidate","id","JobNotFoundState","resolvedSelection","selection","selectedJobExecution","jobExecution","hasExplicitStep","Boolean","stepId","step","currentLandingSelection","frozenLanding","jobExecutionId","hasSelection","landingSelection","selectedAttemptId","runningSelection","runningStepSelection","selectedStepId","selectedAttemptForNotice","attemptId","showRetargetNotice","succeededSummary","selectExecution","stepAttemptId","selectAttempt","match","findAttempt","retargetToRunningStep","intervalMs","reducedMotionIntervalMs","div","ref","className","NewerAttemptNotice","runId","section","aria-label","displayName","onSelectedJobExecutionChange","annotationSummary","as","defaultSelectedAttemptId","onSelectedAttemptChange","autoSelectActiveAttempt","emptyState","showHeader","renderExpandedStep","context","ExpandedStep","EmptyStateForMissingExecution","role","aria-live","size","span","stepLabel","button","type","onClick","carriedOver","selectedAttemptError","attemptError","tabIndex","config","agentConfig","attemptStatus","attemptStartedAt","surfaceClassName","title","description","variant","to","params","name","aria-hidden","steps","sort","left","right","position","localeCompare","stepIndex","length","attempts","reverse","key","header","JOB_DETAIL_SKELETON_ROWS","map","row"],"mappings":";AAAA,gIAAgI;AAChI,+GAA+G;AAE/G,SAAQA,QAAQ,QAAO,sBAAsB;AAC7C,SAAQC,cAAc,QAAO,qBAAqB;AAClD,SAAQC,UAAU,QAAO,gCAAgC;AACzD,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SAAQC,QAAQ,QAAO,6BAA6B;AACpD,SAAQC,kBAAkB,QAAO,gCAAgC;AACjE,SAAQC,IAAI,QAAO,+BAA+B;AAClD,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SAAwBC,SAAS,EAAEC,MAAM,QAAO,QAAQ;AACxD,SAAQC,uBAAuB,QAAO,0BAA0B;AAEhE,SAAQC,sBAAsB,QAAO,gCAAgC;AAErE,SAEEC,uBAAuB,EACvBC,uBAAuB,QAClB,oBAAoB;AAC3B,SAAkCC,QAAQ,QAAO,wBAAwB;AACzE,SACEC,mBAAmB,EACnBC,qBAAqB,QAChB,8CAA8C;AACrD,SAAQC,yBAAyB,QAAO,oCAAoC;AAC5E,SAAQC,eAAe,QAAO,yBAAyB;AACvD,SACEC,oBAAoB,EACpBC,gBAAgB,EAChBC,6BAA6B,EAC7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IAC/F;IACA,OAAO1B;AACT;AAEA,SAASqD,YAAYtB,YAA0B,EAAEe,SAAiB;IAChE,KAAK,MAAMX,QAAQJ,aAAasE,KAAK,CAAE;QACrC,MAAMhG,UAAU8B,KAAK0E,QAAQ,CAACrF,IAAI,CAAC,CAACC,YAAcA,UAAUC,EAAE,KAAKoB;QACnE,IAAIzC,SAAS,OAAO;YAAC8B;YAAMW,WAAWzC,QAAQqB,EAAE;QAAA;IAClD;IACA,OAAO1B;AACT;AAEA,SAASe;IACP,qBACE,KAAC0C;QAAIE,WAAU;kBACb,cAAA,MAACF;YAAIE,WAAU;;8BACb,MAACqD;oBAAOrD,WAAU;;sCAChB,KAAChG;4BAASgG,WAAU;;sCACpB,KAAChG;4BAASgG,WAAU;;sCACpB,KAAChG;4BAASgG,WAAU;;sCACpB,KAAChG;4BAASgG,WAAU;;;;8BAEtB,KAACF;oBAAIE,WAAU;8BACZsD,yBAAyBC,GAAG,CAAC,CAACC,oBAC7B,MAAC1D;4BAECE,WAAU;;8CAEV,KAAChG;oCAASgG,WAAU;;8CACpB,KAAChG;oCAASgG,WAAU;;;2BAJfwD;;;;;AAWnB;AAEA,MAAMF,2BAA2B;IAAC;IAAU;IAAU;IAAU;IAAU;CAAS"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Job, JobExecution, Step, StepError } from '#core/workflow-run.js';
|
|
2
|
+
import type { StepListEmptyState } from '../step-list/index.js';
|
|
3
|
+
export declare function emptyStateForJob(job: Job, jobExecution: JobExecution): StepListEmptyState | undefined;
|
|
4
|
+
export declare function emptyStateForMissingExecution(job: Job): StepListEmptyState;
|
|
5
|
+
export declare function skippedJobDescription(reason: Job['statusReason']): string;
|
|
6
|
+
export declare function CarriedOverStepPanel(): import("react").JSX.Element;
|
|
7
|
+
export declare function toSelectedAttemptError(step: Step, error: Record<string, unknown> | null): StepError | null;
|
|
8
|
+
export declare function isAgentConfigFailure(step: Step, error: StepError | null): boolean;
|
|
9
|
+
export declare function jobSucceededSummary(job: Job, execution: JobExecution): string | undefined;
|
|
10
|
+
//# sourceMappingURL=job-empty-states.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"job-empty-states.d.ts","sourceRoot":"","sources":["../../../src/components/job-detail/job-empty-states.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,GAAG,EAAE,YAAY,EAAE,IAAI,EAAE,SAAS,EAAC,MAAM,uBAAuB,CAAC;AAO9E,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,uBAAuB,CAAC;AAG9D,wBAAgB,gBAAgB,CAC9B,GAAG,EAAE,GAAG,EACR,YAAY,EAAE,YAAY,GACzB,kBAAkB,GAAG,SAAS,CA+DhC;AAED,wBAAgB,6BAA6B,CAAC,GAAG,EAAE,GAAG,GAAG,kBAAkB,CAsD1E;AAED,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,GAAG,CAAC,cAAc,CAAC,GAAG,MAAM,CAoBzE;AAiCD,wBAAgB,oBAAoB,gCAUnC;AAED,wBAAgB,sBAAsB,CACpC,IAAI,EAAE,IAAI,EACV,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI,GACpC,SAAS,GAAG,IAAI,CAgClB;AAED,wBAAgB,oBAAoB,CAAC,IAAI,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,GAAG,IAAI,GAAG,OAAO,CAEjF;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,GAAG,EAAE,SAAS,EAAE,YAAY,GAAG,MAAM,GAAG,SAAS,CAMzF"}
|