@shipfox/client-workflows 12.0.2 → 14.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/main.ts +16 -1
- package/.storybook/preview.tsx +3 -3
- package/.storybook/workspace-source.ts +31 -0
- package/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +79 -0
- package/dist/components/job-graph/job-duration-format.d.ts +2 -2
- package/dist/components/job-graph/job-duration-format.d.ts.map +1 -1
- package/dist/components/job-graph/job-duration-format.js +4 -2
- package/dist/components/job-graph/job-duration-format.js.map +1 -1
- package/dist/components/job-graph/job-duration-label.js +1 -1
- package/dist/components/job-graph/job-duration-label.js.map +1 -1
- package/dist/components/job-graph/job-graph-content.d.ts +2 -1
- package/dist/components/job-graph/job-graph-content.d.ts.map +1 -1
- package/dist/components/job-graph/job-graph-content.js +3 -3
- package/dist/components/job-graph/job-graph-content.js.map +1 -1
- package/dist/components/job-graph/job-graph-view.d.ts +2 -1
- package/dist/components/job-graph/job-graph-view.d.ts.map +1 -1
- package/dist/components/job-graph/job-graph-view.js +2 -2
- package/dist/components/job-graph/job-graph-view.js.map +1 -1
- package/dist/components/job-graph/job-node.d.ts +1 -1
- package/dist/components/job-graph/job-node.d.ts.map +1 -1
- package/dist/components/job-graph/job-node.js +10 -9
- package/dist/components/job-graph/job-node.js.map +1 -1
- package/dist/components/job-graph/types.d.ts +2 -1
- package/dist/components/job-graph/types.d.ts.map +1 -1
- package/dist/components/job-graph/types.js.map +1 -1
- package/dist/components/step-list/step-list.d.ts +2 -2
- package/dist/components/step-list/step-list.d.ts.map +1 -1
- package/dist/components/step-list/step-list.js.map +1 -1
- package/dist/components/workflow-run-duration-label.js +1 -1
- package/dist/components/workflow-run-duration-label.js.map +1 -1
- package/dist/components/workflow-run-list/job-status-strip.d.ts +21 -0
- package/dist/components/workflow-run-list/job-status-strip.d.ts.map +1 -0
- package/dist/components/workflow-run-list/job-status-strip.js +185 -0
- package/dist/components/workflow-run-list/job-status-strip.js.map +1 -0
- package/dist/components/workflow-run-list/run-display.d.ts +27 -3
- package/dist/components/workflow-run-list/run-display.d.ts.map +1 -1
- package/dist/components/workflow-run-list/run-display.js +78 -7
- package/dist/components/workflow-run-list/run-display.js.map +1 -1
- package/dist/components/workflow-run-list/types.d.ts +23 -24
- package/dist/components/workflow-run-list/types.d.ts.map +1 -1
- package/dist/components/workflow-run-list/types.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-filter-menu.d.ts +22 -0
- package/dist/components/workflow-run-list/workflow-run-filter-menu.d.ts.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-filter-menu.js +68 -0
- package/dist/components/workflow-run-list/workflow-run-filter-menu.js.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-filters.d.ts +18 -0
- package/dist/components/workflow-run-list/workflow-run-filters.d.ts.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-filters.js +236 -0
- package/dist/components/workflow-run-list/workflow-run-filters.js.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-list-content.d.ts +8 -4
- package/dist/components/workflow-run-list/workflow-run-list-content.d.ts.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-content.js +40 -12
- package/dist/components/workflow-run-list/workflow-run-list-content.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-states.d.ts +29 -2
- package/dist/components/workflow-run-list/workflow-run-list-states.d.ts.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-states.js +103 -44
- package/dist/components/workflow-run-list/workflow-run-list-states.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-view.d.ts +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-view.d.ts.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-view.js +60 -43
- package/dist/components/workflow-run-list/workflow-run-list-view.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list.d.ts +1 -1
- package/dist/components/workflow-run-list/workflow-run-list.d.ts.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list.js +20 -8
- package/dist/components/workflow-run-list/workflow-run-list.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-row.d.ts +19 -9
- package/dist/components/workflow-run-list/workflow-run-row.d.ts.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-row.js +179 -112
- package/dist/components/workflow-run-list/workflow-run-row.js.map +1 -1
- package/dist/components/workflow-run-number-label.d.ts +15 -0
- package/dist/components/workflow-run-number-label.d.ts.map +1 -0
- package/dist/components/workflow-run-number-label.js +41 -0
- package/dist/components/workflow-run-number-label.js.map +1 -0
- package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.d.ts +3 -3
- package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.d.ts.map +1 -1
- package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.js +10 -9
- package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.js.map +1 -1
- package/dist/components/workflow-run-summary/workflow-run-summary.d.ts +4 -9
- package/dist/components/workflow-run-summary/workflow-run-summary.d.ts.map +1 -1
- package/dist/components/workflow-run-summary/workflow-run-summary.js +107 -74
- package/dist/components/workflow-run-summary/workflow-run-summary.js.map +1 -1
- package/dist/components/workflow-run-tabs/index.d.ts +6 -0
- package/dist/components/workflow-run-tabs/index.d.ts.map +1 -0
- package/dist/components/workflow-run-tabs/index.js +7 -0
- package/dist/components/workflow-run-tabs/index.js.map +1 -0
- package/dist/components/workflow-run-tabs/run-annotation-summary-line.d.ts +11 -0
- package/dist/components/workflow-run-tabs/run-annotation-summary-line.d.ts.map +1 -0
- package/dist/components/workflow-run-tabs/run-annotation-summary-line.js +71 -0
- package/dist/components/workflow-run-tabs/run-annotation-summary-line.js.map +1 -0
- package/dist/components/workflow-run-tabs/run-annotations-empty.d.ts +2 -0
- package/dist/components/workflow-run-tabs/run-annotations-empty.d.ts.map +1 -0
- package/dist/components/workflow-run-tabs/run-annotations-empty.js +11 -0
- package/dist/components/workflow-run-tabs/run-annotations-empty.js.map +1 -0
- package/dist/components/workflow-run-tabs/run-jobs-list.d.ts +18 -0
- package/dist/components/workflow-run-tabs/run-jobs-list.d.ts.map +1 -0
- package/dist/components/workflow-run-tabs/run-jobs-list.js +107 -0
- package/dist/components/workflow-run-tabs/run-jobs-list.js.map +1 -0
- package/dist/components/workflow-run-tabs/run-tab-count.d.ts +6 -0
- package/dist/components/workflow-run-tabs/run-tab-count.d.ts.map +1 -0
- package/dist/components/workflow-run-tabs/run-tab-count.js +27 -0
- package/dist/components/workflow-run-tabs/run-tab-count.js.map +1 -0
- package/dist/components/workflow-run-tabs/run-tab-strip.d.ts +8 -0
- package/dist/components/workflow-run-tabs/run-tab-strip.d.ts.map +1 -0
- package/dist/components/workflow-run-tabs/run-tab-strip.js +82 -0
- package/dist/components/workflow-run-tabs/run-tab-strip.js.map +1 -0
- package/dist/components/workflow-run-view/agent-config-failure-callout.d.ts +2 -2
- package/dist/components/workflow-run-view/agent-config-failure-callout.d.ts.map +1 -1
- package/dist/components/workflow-run-view/agent-config-failure-callout.js +4 -4
- package/dist/components/workflow-run-view/agent-config-failure-callout.js.map +1 -1
- package/dist/components/workflow-run-view/job-card.d.ts +2 -2
- package/dist/components/workflow-run-view/job-card.d.ts.map +1 -1
- package/dist/components/workflow-run-view/job-card.js +51 -32
- package/dist/components/workflow-run-view/job-card.js.map +1 -1
- package/dist/components/workflow-run-view/job-execution-switcher.d.ts +1 -1
- package/dist/components/workflow-run-view/job-execution-switcher.d.ts.map +1 -1
- package/dist/components/workflow-run-view/job-execution-switcher.js +20 -8
- package/dist/components/workflow-run-view/job-execution-switcher.js.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-selection.d.ts.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-selection.js +40 -1
- package/dist/components/workflow-run-view/workflow-run-selection.js.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-states.d.ts +1 -0
- package/dist/components/workflow-run-view/workflow-run-states.d.ts.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-states.js +10 -1
- package/dist/components/workflow-run-view/workflow-run-states.js.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-view.d.ts +10 -5
- package/dist/components/workflow-run-view/workflow-run-view.d.ts.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-view.js +136 -85
- package/dist/components/workflow-run-view/workflow-run-view.js.map +1 -1
- package/dist/components/workflow-source-panel/index.d.ts +1 -0
- package/dist/components/workflow-source-panel/index.d.ts.map +1 -1
- package/dist/components/workflow-source-panel/index.js +1 -0
- package/dist/components/workflow-source-panel/index.js.map +1 -1
- package/dist/components/workflow-source-panel/workflow-source-content.d.ts +12 -0
- package/dist/components/workflow-source-panel/workflow-source-content.d.ts.map +1 -0
- package/dist/components/workflow-source-panel/workflow-source-content.js +53 -0
- package/dist/components/workflow-source-panel/workflow-source-content.js.map +1 -0
- package/dist/components/workflow-source-panel/workflow-source-panel.d.ts +1 -1
- package/dist/components/workflow-source-panel/workflow-source-panel.d.ts.map +1 -1
- package/dist/components/workflow-source-panel/workflow-source-panel.js +7 -54
- package/dist/components/workflow-source-panel/workflow-source-panel.js.map +1 -1
- package/dist/components/workflow-status/status-visuals.d.ts +4 -4
- package/dist/components/workflow-status/status-visuals.d.ts.map +1 -1
- package/dist/components/workflow-status/status-visuals.js +7 -0
- package/dist/components/workflow-status/status-visuals.js.map +1 -1
- package/dist/components/workflow-status/workflow-status-icon.d.ts +3 -4
- package/dist/components/workflow-status/workflow-status-icon.d.ts.map +1 -1
- package/dist/components/workflow-status/workflow-status-icon.js +6 -4
- package/dist/components/workflow-status/workflow-status-icon.js.map +1 -1
- package/dist/core/entities/job-execution.d.ts +10 -0
- package/dist/core/entities/job-execution.d.ts.map +1 -1
- package/dist/core/entities/job-execution.js +11 -0
- package/dist/core/entities/job-execution.js.map +1 -1
- package/dist/core/entities/job.d.ts +4 -2
- package/dist/core/entities/job.d.ts.map +1 -1
- package/dist/core/entities/job.js +8 -1
- package/dist/core/entities/job.js.map +1 -1
- package/dist/core/entities/step.d.ts +1 -1
- package/dist/core/entities/step.d.ts.map +1 -1
- package/dist/core/entities/step.js +2 -0
- package/dist/core/entities/step.js.map +1 -1
- package/dist/core/entities/workflow-run.d.ts +52 -4
- package/dist/core/entities/workflow-run.d.ts.map +1 -1
- package/dist/core/entities/workflow-run.js +22 -3
- package/dist/core/entities/workflow-run.js.map +1 -1
- package/dist/core/workflow-run-tabs.d.ts +9 -0
- package/dist/core/workflow-run-tabs.d.ts.map +1 -0
- package/dist/core/workflow-run-tabs.js +3 -0
- package/dist/core/workflow-run-tabs.js.map +1 -0
- package/dist/core/workflow-run.d.ts +6 -6
- 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 +7 -7
- package/dist/feature.js +5 -5
- package/dist/feature.js.map +1 -1
- package/dist/hooks/api/workflow-run-mapper.d.ts +4 -3
- package/dist/hooks/api/workflow-run-mapper.d.ts.map +1 -1
- package/dist/hooks/api/workflow-run-mapper.js +31 -3
- package/dist/hooks/api/workflow-run-mapper.js.map +1 -1
- package/dist/hooks/api/workflow-runs.d.ts +4 -4
- package/dist/hooks/api/workflow-runs.d.ts.map +1 -1
- package/dist/hooks/api/workflow-runs.js +12 -4
- package/dist/hooks/api/workflow-runs.js.map +1 -1
- package/dist/index.d.ts +4 -3
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +3 -2
- package/dist/index.js.map +1 -1
- package/dist/pages/project-workflows-page.js +46 -1
- package/dist/pages/project-workflows-page.js.map +1 -1
- package/dist/pages/workflow-run-detail-page.d.ts +11 -0
- package/dist/pages/workflow-run-detail-page.d.ts.map +1 -0
- package/dist/pages/workflow-run-detail-page.js +52 -0
- package/dist/pages/workflow-run-detail-page.js.map +1 -0
- package/dist/pages/workflow-run-list-page.d.ts +10 -0
- package/dist/pages/workflow-run-list-page.d.ts.map +1 -0
- package/dist/pages/workflow-run-list-page.js +43 -0
- package/dist/pages/workflow-run-list-page.js.map +1 -0
- package/dist/routes/inputs.d.ts +94 -5
- package/dist/routes/inputs.d.ts.map +1 -1
- package/dist/routes/inputs.js +199 -13
- package/dist/routes/inputs.js.map +1 -1
- package/dist/routes/project-route.d.ts +6 -0
- package/dist/routes/project-route.d.ts.map +1 -0
- package/dist/routes/project-route.js +25 -0
- package/dist/routes/project-route.js.map +1 -0
- package/dist/routes/run-detail.d.ts.map +1 -1
- package/dist/routes/run-detail.js +12 -7
- package/dist/routes/run-detail.js.map +1 -1
- package/dist/routes/runs.d.ts.map +1 -1
- package/dist/routes/runs.js +11 -6
- package/dist/routes/runs.js.map +1 -1
- package/dist/routes/workflows.d.ts.map +1 -1
- package/dist/routes/workflows.js +6 -5
- package/dist/routes/workflows.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +9 -9
- package/src/components/job-graph/job-duration-format.ts +11 -2
- package/src/components/job-graph/job-duration-label.tsx +5 -1
- package/src/components/job-graph/job-graph-content.tsx +7 -4
- package/src/components/job-graph/job-graph-view.test.tsx +19 -8
- package/src/components/job-graph/job-graph-view.tsx +6 -3
- package/src/components/job-graph/job-graph.stories.tsx +24 -20
- package/src/components/job-graph/job-node.stories.tsx +11 -6
- package/src/components/job-graph/job-node.test.tsx +82 -12
- package/src/components/job-graph/job-node.tsx +22 -15
- package/src/components/job-graph/types.ts +5 -1
- package/src/components/step-list/step-list.stories.tsx +2 -3
- package/src/components/step-list/step-list.tsx +3 -2
- package/src/components/workflow-run-duration-label.tsx +1 -1
- package/src/components/workflow-run-list/job-status-strip.tsx +189 -0
- package/src/components/workflow-run-list/run-display.test.ts +169 -30
- package/src/components/workflow-run-list/run-display.ts +116 -9
- package/src/components/workflow-run-list/types.ts +21 -17
- package/src/components/workflow-run-list/workflow-run-filter-menu.tsx +100 -0
- package/src/components/workflow-run-list/workflow-run-filters.tsx +243 -0
- package/src/components/workflow-run-list/workflow-run-list-content.tsx +44 -16
- package/src/components/workflow-run-list/workflow-run-list-states.tsx +128 -27
- package/src/components/workflow-run-list/workflow-run-list-view.test.tsx +441 -104
- package/src/components/workflow-run-list/workflow-run-list-view.tsx +73 -43
- package/src/components/workflow-run-list/workflow-run-list.stories.tsx +140 -20
- package/src/components/workflow-run-list/workflow-run-list.tsx +20 -10
- package/src/components/workflow-run-list/workflow-run-row.tsx +173 -106
- package/src/components/workflow-run-number-label.test.tsx +45 -0
- package/src/components/workflow-run-number-label.tsx +47 -0
- package/src/components/workflow-run-summary/workflow-run-attempt-switcher.test.tsx +7 -8
- package/src/components/workflow-run-summary/workflow-run-attempt-switcher.tsx +15 -14
- package/src/components/workflow-run-summary/workflow-run-summary.stories.tsx +29 -38
- package/src/components/workflow-run-summary/workflow-run-summary.test.tsx +30 -24
- package/src/components/workflow-run-summary/workflow-run-summary.tsx +102 -77
- package/src/components/workflow-run-tabs/index.ts +5 -0
- package/src/components/workflow-run-tabs/run-annotation-summary-line.test.tsx +69 -0
- package/src/components/workflow-run-tabs/run-annotation-summary-line.tsx +97 -0
- package/src/components/workflow-run-tabs/run-annotations-empty.tsx +11 -0
- package/src/components/workflow-run-tabs/run-jobs-list.tsx +151 -0
- package/src/components/workflow-run-tabs/run-tab-count.tsx +28 -0
- package/src/components/workflow-run-tabs/run-tab-strip.stories.tsx +52 -0
- package/src/components/workflow-run-tabs/run-tab-strip.test.tsx +117 -0
- package/src/components/workflow-run-tabs/run-tab-strip.tsx +97 -0
- package/src/components/workflow-run-view/agent-config-failure-callout.stories.tsx +2 -3
- package/src/components/workflow-run-view/agent-config-failure-callout.tsx +4 -4
- package/src/components/workflow-run-view/job-card.stories.tsx +11 -10
- package/src/components/workflow-run-view/job-card.test.tsx +115 -0
- package/src/components/workflow-run-view/job-card.tsx +74 -35
- package/src/components/workflow-run-view/job-execution-switcher.tsx +31 -9
- package/src/components/workflow-run-view/workflow-run-selection.test.ts +48 -0
- package/src/components/workflow-run-view/workflow-run-selection.ts +48 -1
- package/src/components/workflow-run-view/workflow-run-states.tsx +12 -1
- package/src/components/workflow-run-view/workflow-run-view.test.tsx +152 -94
- package/src/components/workflow-run-view/workflow-run-view.tsx +219 -95
- package/src/components/workflow-source-panel/index.ts +1 -0
- package/src/components/workflow-source-panel/workflow-source-content.tsx +84 -0
- package/src/components/workflow-source-panel/workflow-source-panel.tsx +14 -81
- package/src/components/workflow-status/status-visuals.test.ts +9 -0
- package/src/components/workflow-status/status-visuals.ts +6 -4
- package/src/components/workflow-status/workflow-status-icon.stories.tsx +10 -2
- package/src/components/workflow-status/workflow-status-icon.test.tsx +18 -0
- package/src/components/workflow-status/workflow-status-icon.tsx +17 -24
- package/src/core/entities/job-execution.ts +22 -0
- package/src/core/entities/job-status.test.ts +104 -0
- package/src/core/entities/job.ts +18 -3
- package/src/core/entities/step.ts +4 -0
- package/src/core/entities/workflow-run.ts +76 -7
- package/src/core/workflow-run-tabs.ts +8 -0
- package/src/core/workflow-run.test.ts +24 -9
- package/src/core/workflow-run.ts +17 -2
- package/src/feature.ts +5 -5
- package/src/hooks/api/workflow-run-mapper.ts +30 -3
- package/src/hooks/api/workflow-runs.test.tsx +2 -0
- package/src/hooks/api/workflow-runs.ts +12 -7
- package/src/index.ts +7 -2
- package/src/page-harness-budget.test.ts +1 -1
- package/src/pages/project-workflows-page.test.tsx +59 -5
- package/src/pages/project-workflows-page.tsx +34 -1
- package/src/pages/workflow-run-detail-page.tsx +72 -0
- package/src/pages/workflow-run-list-page.tsx +65 -0
- package/src/pages/workflow-run-pages.test.tsx +823 -0
- package/src/routes/inputs.test.ts +240 -12
- package/src/routes/inputs.ts +215 -11
- package/src/routes/project-route.tsx +25 -0
- package/src/routes/run-detail.tsx +15 -8
- package/src/routes/runs.tsx +14 -7
- package/src/routes/workflows.tsx +5 -4
- package/src/storybook-config.test.ts +27 -0
- package/test/fixtures/workflow-run.ts +76 -7
- package/test/pages.tsx +18 -8
- package/test/render.tsx +8 -2
- package/tsconfig.build.tsbuildinfo +1 -1
- package/tsconfig.test.json +7 -1
- package/dist/components/workflow-run-list/workflow-run-list-header.d.ts +0 -10
- package/dist/components/workflow-run-list/workflow-run-list-header.d.ts.map +0 -1
- package/dist/components/workflow-run-list/workflow-run-list-header.js +0 -55
- package/dist/components/workflow-run-list/workflow-run-list-header.js.map +0 -1
- package/dist/pages/workflow-run-first-time-use.d.ts +0 -6
- package/dist/pages/workflow-run-first-time-use.d.ts.map +0 -1
- package/dist/pages/workflow-run-first-time-use.js +0 -17
- package/dist/pages/workflow-run-first-time-use.js.map +0 -1
- package/dist/pages/workflow-run-page.d.ts +0 -10
- package/dist/pages/workflow-run-page.d.ts.map +0 -1
- package/dist/pages/workflow-run-page.js +0 -90
- package/dist/pages/workflow-run-page.js.map +0 -1
- package/src/components/workflow-run-list/workflow-run-list-header.tsx +0 -53
- package/src/pages/workflow-run-first-time-use.tsx +0 -17
- package/src/pages/workflow-run-page.test.tsx +0 -519
- package/src/pages/workflow-run-page.tsx +0 -94
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/workflow-run-view/job-card.tsx"],"sourcesContent":["import {TriggerSourceIcon} from '@shipfox/client-triggers';\nimport {Badge} from '@shipfox/react-ui/badge';\nimport {Button} from '@shipfox/react-ui/button';\nimport {EmptyState} from '@shipfox/react-ui/empty-state';\nimport {Icon} from '@shipfox/react-ui/icon';\nimport {RelativeTime} from '@shipfox/react-ui/relative-time';\nimport {useTimeTick} from '@shipfox/react-ui/time-ticker';\nimport {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {Text} from '@shipfox/react-ui/typography';\nimport type {ReactNode} from 'react';\nimport {Fragment, useId, useRef, useState} from 'react';\nimport {getWorkflowStatusVisual} from '#components/workflow-status/status-visuals.js';\nimport {\n AGENT_CONFIG_ISSUES,\n type Job,\n type JobExecution,\n type JobExecutionTime,\n STEP_ERROR_REASONS,\n type Step,\n type StepError,\n type StepSourceLocation,\n WORKFLOW_JOB_STATUSES,\n workflowRunTriggerDisplayLabel,\n workflowRunTriggerLabel,\n} from '#core/workflow-run.js';\nimport {type StepExpandedContext, StepList, type StepListEmptyState} from '../step-list/index.js';\nimport {AgentConfigFailureCallout} from './agent-config-failure-callout.js';\nimport {JobExecutionSwitcher} from './job-execution-switcher.js';\nimport {formatJobExecutionTime, JobExecutionTimeText} from './job-execution-time-text.js';\nimport {StepAttemptLogPanel} from './step-attempt-log-panel.js';\n\nconst STATUS_BADGE_LABEL_WIDTH_CH = Math.max(\n ...WORKFLOW_JOB_STATUSES.map((status) => getWorkflowStatusVisual(status).label.length),\n);\n\ninterface LocalSelectedAttempt {\n jobExecutionId: string | undefined;\n attemptId: string | null;\n}\n\nexport function JobCard({\n workspaceId,\n job,\n selectedJobExecution,\n selectedAttemptId,\n onSelectedJobExecutionChange,\n onSelectedAttemptChange,\n renderExpandedStep,\n sourcePanelId,\n sourceAvailable,\n focusedSourceStepId,\n onOpenStepSource,\n}: {\n workspaceId: string;\n job: Job;\n selectedJobExecution: JobExecution | undefined;\n selectedAttemptId: string | null | undefined;\n onSelectedJobExecutionChange: ((jobExecutionId: string | undefined) => void) | undefined;\n onSelectedAttemptChange: ((attemptId: string | undefined) => void) | undefined;\n renderExpandedStep?: ((context: StepExpandedContext) => ReactNode) | undefined;\n sourcePanelId?: string | undefined;\n sourceAvailable?: boolean | undefined;\n focusedSourceStepId?: string | null | undefined;\n onOpenStepSource?:\n | ((stepId: string, location: StepSourceLocation, trigger: HTMLButtonElement | null) => void)\n | undefined;\n}) {\n const titleId = useId();\n const sourceButtonRef = useRef<HTMLButtonElement>(null);\n const [localSelectedAttempt, setLocalSelectedAttempt] = useState<LocalSelectedAttempt>({\n jobExecutionId: undefined,\n attemptId: null,\n });\n const selectedExecutionStatus = selectedJobExecution?.status ?? job.status;\n const effectiveSelectedAttemptId =\n selectedAttemptId === undefined &&\n localSelectedAttempt.jobExecutionId === selectedJobExecution?.id\n ? localSelectedAttempt.attemptId\n : selectedAttemptId;\n const selectedSourceAction = selectedStepSourceAction(\n selectedJobExecution,\n effectiveSelectedAttemptId,\n );\n const defaultRenderExpandedStep = ({\n step,\n stepId,\n attempt,\n attemptError,\n attemptStatus,\n carriedOver,\n }: StepExpandedContext) =>\n carriedOver ? (\n <CarriedOverStepPanel />\n ) : (\n <StepAttemptDetailPanel\n workspaceId={workspaceId}\n step={step}\n stepId={stepId}\n attempt={attempt}\n attemptError={attemptError}\n attemptStatus={attemptStatus}\n />\n );\n\n function selectAttempt(attemptId: string | undefined) {\n if (selectedAttemptId === undefined) {\n setLocalSelectedAttempt({\n jobExecutionId: selectedJobExecution?.id,\n attemptId: attemptId ?? null,\n });\n }\n\n onSelectedAttemptChange?.(attemptId);\n }\n\n return (\n <section\n aria-labelledby={titleId}\n className=\"flex min-h-0 flex-col rounded-8 border border-border-neutral-base bg-background-components-base\"\n >\n <div className=\"grid min-h-52 min-w-0 grid-cols-1 gap-y-4 px-16 py-12\">\n <div className=\"flex min-w-0 flex-wrap items-center justify-between gap-10\">\n {job.mode === 'listening' &&\n job.jobExecutions.length > 0 &&\n onSelectedJobExecutionChange ? (\n <>\n <Text as=\"h2\" id={titleId} size=\"sm\" bold className=\"sr-only\">\n {job.displayName}\n </Text>\n <div className=\"flex min-w-0 items-center gap-8\">\n <JobStatusBadge status={selectedExecutionStatus} />\n <JobExecutionSwitcher\n job={job}\n selectedJobExecution={selectedJobExecution?.id ?? null}\n onSelectedJobExecutionChange={onSelectedJobExecutionChange}\n variant=\"title\"\n />\n </div>\n </>\n ) : (\n <div className=\"flex min-w-0 items-center gap-8\">\n <JobStatusBadge status={selectedExecutionStatus} />\n <Text\n as=\"h2\"\n id={titleId}\n size=\"sm\"\n bold\n className=\"min-w-0 truncate text-foreground-neutral-base\"\n >\n {job.displayName}\n </Text>\n </div>\n )}\n {sourceAvailable && selectedSourceAction && sourcePanelId && onOpenStepSource ? (\n <div className=\"flex min-w-max items-center gap-6\">\n <Button\n ref={sourceButtonRef}\n type=\"button\"\n variant=\"secondary\"\n size=\"xs\"\n aria-controls={sourcePanelId}\n aria-expanded={focusedSourceStepId === selectedSourceAction.stepId}\n onClick={() =>\n onOpenStepSource(\n selectedSourceAction.stepId,\n selectedSourceAction.location,\n sourceButtonRef.current,\n )\n }\n >\n View source\n </Button>\n </div>\n ) : null}\n </div>\n <JobExecutionMetadata execution={selectedJobExecution} />\n </div>\n <div className=\"min-h-0 border-t border-border-neutral-strong\">\n {selectedJobExecution ? (\n <StepList\n job={job}\n jobExecution={selectedJobExecution}\n selectedAttemptId={selectedAttemptId}\n onSelectedAttemptChange={selectAttempt}\n autoSelectActiveAttempt\n emptyState={emptyStateForJob(job, selectedJobExecution)}\n showHeader={false}\n className=\"rounded-none border-0 bg-transparent\"\n renderExpandedStep={renderExpandedStep ?? defaultRenderExpandedStep}\n />\n ) : (\n <JobExecutionEmptyState job={job} />\n )}\n </div>\n </section>\n );\n}\n\nfunction JobStatusBadge({status}: {status: Job['status'] | JobExecution['status']}) {\n const visual = getWorkflowStatusVisual(status);\n\n return (\n <Badge variant={visual.badge} size=\"xs\">\n <span className=\"text-center\" style={{width: `${STATUS_BADGE_LABEL_WIDTH_CH}ch`}}>\n {visual.label}\n </span>\n </Badge>\n );\n}\n\nfunction JobExecutionEmptyState({job}: {job: Job}) {\n const emptyState = emptyStateForMissingExecution(job);\n\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 JobExecutionMetadata({execution}: {execution: JobExecution | undefined}) {\n if (!execution) return null;\n\n const queueTime = execution.queueTime;\n const runTime = execution.runTime;\n const executionStartedAt = execution.startedAt ?? execution.queuedAt ?? execution.createdAt;\n const items = [\n execution.triggerEvents.length > 0 ? {key: 'trigger', kind: 'trigger' as const} : null,\n {key: 'started', kind: 'started' as const, value: executionStartedAt},\n queueTime\n ? {key: 'queue', icon: 'hourglassLine' as const, kind: 'queue' as const, time: queueTime}\n : null,\n runTime ? {key: 'run', icon: 'timerLine' as const, kind: 'run' as const, time: runTime} : null,\n ].filter((item) => item !== null);\n\n if (items.length === 0) return null;\n\n return (\n <div className=\"flex min-w-0 items-center gap-12 overflow-hidden text-foreground-neutral-muted\">\n {items.map((item, index) => (\n <Fragment key={item.key}>\n {index > 0 ? <MetadataSeparator /> : null}\n {item.kind === 'started' ? (\n <RelativeTime\n value={item.value}\n className=\"shrink-0 whitespace-nowrap text-xs leading-20 text-foreground-neutral-muted\"\n />\n ) : item.kind === 'trigger' ? (\n <JobExecutionTriggerMetadata execution={execution} />\n ) : (\n <JobExecutionMetadataItem icon={item.icon} kind={item.kind} time={item.time} />\n )}\n </Fragment>\n ))}\n </div>\n );\n}\n\nfunction JobExecutionTriggerMetadata({execution}: {execution: JobExecution}) {\n const triggerEvent = execution.triggerEvents[0];\n if (!triggerEvent) return null;\n\n const triggerLabel = workflowRunTriggerLabel({\n triggerSource: triggerEvent.source,\n triggerEvent: triggerEvent.event,\n });\n const triggerDisplayLabel = workflowRunTriggerDisplayLabel({\n triggerSource: triggerEvent.source,\n triggerEvent: triggerEvent.event,\n });\n const triggerCount = execution.triggerEvents.length;\n const countLabel = triggerCount > 1 ? ` (${triggerCount})` : '';\n const tooltip = triggerCount > 1 ? `${triggerLabel} (${triggerCount} events)` : triggerLabel;\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n aria-label={tooltip}\n className=\"inline-flex min-w-0 max-w-full cursor-default items-center gap-4 rounded-4 border-0 bg-transparent p-0 text-left text-foreground-neutral-muted outline-none focus-visible:shadow-border-interactive-with-active\"\n >\n <TriggerSourceIcon\n provider={triggerEvent.source}\n source={triggerEvent.source}\n aria-hidden=\"true\"\n className=\"size-12 shrink-0\"\n />\n <Text as=\"span\" size=\"xs\" className=\"min-w-0 truncate\">\n {triggerDisplayLabel}\n {countLabel}\n </Text>\n </button>\n </TooltipTrigger>\n <TooltipContent>\n <Text as=\"span\" size=\"xs\" className=\"block max-w-[360px] break-words\">\n {tooltip}\n </Text>\n </TooltipContent>\n </Tooltip>\n );\n}\n\nfunction JobExecutionMetadataItem({\n icon,\n kind,\n time,\n}: {\n icon: 'hourglassLine' | 'timerLine';\n kind: 'queue' | 'run';\n time: JobExecutionTime;\n}) {\n useTimeTick();\n\n const tooltip = `${jobExecutionTimeVerb(kind, time)} for ${formatJobExecutionTime(time)}`;\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n aria-label={tooltip}\n className=\"inline-flex min-w-0 cursor-default items-center gap-4 rounded-4 border-0 bg-transparent p-0 text-foreground-neutral-muted outline-none focus-visible:shadow-border-interactive-with-active\"\n >\n <Icon name={icon} className=\"size-12 shrink-0\" aria-hidden=\"true\" />\n <span className=\"shrink-0 text-xs leading-20 text-foreground-neutral-muted tabular-nums\">\n <JobExecutionTimeText time={time} />\n </span>\n </button>\n </TooltipTrigger>\n <TooltipContent>\n <Text as=\"span\" size=\"xs\">\n {tooltip}\n </Text>\n </TooltipContent>\n </Tooltip>\n );\n}\n\nfunction jobExecutionTimeVerb(kind: 'queue' | 'run', time: JobExecutionTime): string {\n if (kind === 'queue') return time.state === 'live' ? 'Queuing' : 'Queued';\n return time.state === 'live' ? 'Running' : 'Ran';\n}\n\nfunction MetadataSeparator() {\n return <span aria-hidden=\"true\" className=\"h-12 w-px shrink-0 bg-border-neutral-strong\" />;\n}\n\nfunction selectedStepSourceAction(\n jobExecution: JobExecution | undefined,\n selectedAttemptId: string | null | undefined,\n): {stepId: string; location: StepSourceLocation} | null {\n if (!jobExecution || !selectedAttemptId) return null;\n\n for (const step of jobExecution.steps) {\n const selected =\n selectedAttemptId === `carried-over:${step.id}` ||\n step.attempts.some((attempt) => attempt.id === selectedAttemptId);\n if (selected && step.sourceLocation) {\n return {stepId: step.id, location: step.sourceLocation};\n }\n }\n\n return null;\n}\n\nfunction StepAttemptDetailPanel({\n workspaceId,\n step,\n stepId,\n attempt,\n attemptError,\n attemptStatus,\n}: {\n workspaceId: string;\n step: Step;\n stepId: string;\n attempt: number;\n attemptError: Record<string, unknown> | null;\n attemptStatus: string;\n}) {\n const selectedAttemptError = toSelectedAttemptError(step, attemptError) ?? step.error;\n\n return (\n <div className=\"flex min-w-0 flex-col gap-10\">\n {isAgentConfigFailure(step, selectedAttemptError) ? (\n <AgentConfigFailureCallout\n workspaceId={workspaceId}\n config={step.agentConfig}\n error={selectedAttemptError}\n />\n ) : null}\n <StepAttemptLogPanel stepId={stepId} attempt={attempt} attemptStatus={attemptStatus} />\n </div>\n );\n}\n\nfunction toSelectedAttemptError(\n step: Step,\n error: Record<string, unknown> | null,\n): StepError | null {\n if (error === null) return null;\n\n const rawReason = error.reason;\n const parsedReason =\n typeof rawReason === 'string' &&\n STEP_ERROR_REASONS.has(rawReason as StepError['reason'] & string)\n ? (rawReason as NonNullable<StepError['reason']>)\n : undefined;\n const rawAgentConfigIssue = error.agentConfigIssue ?? error.agent_config_issue;\n const agentConfigIssue =\n typeof rawAgentConfigIssue === 'string' &&\n AGENT_CONFIG_ISSUES.has(rawAgentConfigIssue as NonNullable<StepError['agentConfigIssue']>)\n ? (rawAgentConfigIssue as NonNullable<StepError['agentConfigIssue']>)\n : undefined;\n const exitCode = error.exitCode ?? error.exit_code;\n const resolvedReason = parsedReason\n ? parsedReason\n : agentConfigIssue\n ? 'agent_config_invalid'\n : undefined;\n\n if (resolvedReason === undefined) return null;\n\n return {\n message: typeof error.message === 'string' ? error.message : '',\n exitCode: exitCode === null || typeof exitCode === 'number' ? exitCode : null,\n signal: typeof error.signal === 'string' ? error.signal : undefined,\n reason: resolvedReason,\n agentConfigIssue,\n category: step.type === 'setup' ? 'setup' : 'user',\n };\n}\n\nfunction isAgentConfigFailure(step: Step, error: StepError | null): boolean {\n return step.type === 'agent' && error?.reason === 'agent_config_invalid';\n}\n\nfunction emptyStateForJob(job: Job, jobExecution: JobExecution): StepListEmptyState | undefined {\n if (job.carriedOver) {\n return {\n title: 'Carried over from a previous attempt',\n description: 'This job did not execute in this run.',\n status: 'succeeded',\n };\n }\n\n if (jobExecution.status === 'pending') {\n return {\n title: 'Waiting for this job to start',\n description: 'Steps will appear here once the job starts.',\n status: jobExecution.status,\n };\n }\n\n if (jobExecution.status === 'running') {\n return {\n title: 'Waiting for the first step',\n description: 'This job is running, but no steps have started yet.',\n status: jobExecution.status,\n };\n }\n\n if (jobExecution.status === 'cancelled') {\n return {\n title: 'Cancelled before start',\n description: 'This job was cancelled before any step started.',\n status: jobExecution.status,\n };\n }\n\n if (jobExecution.status === 'succeeded' || jobExecution.status === 'failed') {\n return {\n title: 'No steps recorded',\n description: `Execution #${jobExecution.sequence} finished without recorded steps.`,\n status: jobExecution.status,\n };\n }\n\n return undefined;\n}\n\nfunction emptyStateForMissingExecution(job: Job): StepListEmptyState {\n if (job.carriedOver) {\n return {\n title: 'Carried over from a previous attempt',\n description: 'This job did not execute in this run.',\n status: 'succeeded',\n };\n }\n\n if (job.mode === 'listening' && job.listenerStatus === 'listening') {\n return {\n title: 'Waiting for trigger events',\n description: 'Matching trigger events will create job executions here.',\n status: 'running',\n };\n }\n\n if (job.mode === 'listening' && job.listenerStatus === 'resolved') {\n return {\n title: 'Listener resolved without executions',\n description: 'No matching trigger event created a job execution before the listener stopped.',\n status: job.status,\n };\n }\n\n if (job.status === 'pending') {\n return {\n title: 'Waiting for this job to start',\n description: 'No execution has been created for this job yet.',\n status: 'pending',\n };\n }\n\n if (job.status === 'skipped') {\n return {\n title: 'This job was skipped',\n description: skippedJobDescription(job.statusReason),\n status: 'skipped',\n };\n }\n\n if (job.status === 'cancelled') {\n return {\n title: 'Cancelled before start',\n description: 'This job was cancelled before an execution was created.',\n status: 'cancelled',\n };\n }\n\n return {\n title: 'Execution details unavailable',\n description: 'This job finished, but no job execution record is available.',\n status: job.status,\n };\n}\n\nfunction CarriedOverStepPanel() {\n return (\n <EmptyState\n className=\"min-h-120 rounded-8 border border-border-neutral-base bg-background-components-base px-16 py-20\"\n icon=\"componentLine\"\n title=\"Carried over from a previous attempt\"\n description=\"Not executed in this run.\"\n variant=\"compact\"\n />\n );\n}\n\nfunction skippedJobDescription(reason: Job['statusReason']): string {\n switch (reason) {\n case 'dependency_not_completed':\n return 'A required job did not complete, so this job was skipped.';\n case 'default_gate_rejected':\n return 'A required job did not succeed, so this job was skipped.';\n case 'condition_false':\n case 'condition_rejected':\n return 'The job condition did not match, so this job was skipped.';\n case 'condition_errored':\n return 'The job condition could not be evaluated, so this job was skipped.';\n case 'user_cancelled':\n case 'run_cancelled':\n case 'timed_out':\n case 'runner_lost':\n case 'step_failed':\n case 'unknown':\n case null:\n return 'This job did not start.';\n }\n}\n"],"names":["TriggerSourceIcon","Badge","Button","EmptyState","Icon","RelativeTime","useTimeTick","Tooltip","TooltipContent","TooltipTrigger","Text","Fragment","useId","useRef","useState","getWorkflowStatusVisual","AGENT_CONFIG_ISSUES","STEP_ERROR_REASONS","WORKFLOW_JOB_STATUSES","workflowRunTriggerDisplayLabel","workflowRunTriggerLabel","StepList","AgentConfigFailureCallout","JobExecutionSwitcher","formatJobExecutionTime","JobExecutionTimeText","StepAttemptLogPanel","STATUS_BADGE_LABEL_WIDTH_CH","Math","max","map","status","label","length","JobCard","workspaceId","job","selectedJobExecution","selectedAttemptId","onSelectedJobExecutionChange","onSelectedAttemptChange","renderExpandedStep","sourcePanelId","sourceAvailable","focusedSourceStepId","onOpenStepSource","titleId","sourceButtonRef","localSelectedAttempt","setLocalSelectedAttempt","jobExecutionId","undefined","attemptId","selectedExecutionStatus","effectiveSelectedAttemptId","id","selectedSourceAction","selectedStepSourceAction","defaultRenderExpandedStep","step","stepId","attempt","attemptError","attemptStatus","carriedOver","CarriedOverStepPanel","StepAttemptDetailPanel","selectAttempt","section","aria-labelledby","className","div","mode","jobExecutions","as","size","bold","displayName","JobStatusBadge","variant","ref","type","aria-controls","aria-expanded","onClick","location","current","JobExecutionMetadata","execution","jobExecution","autoSelectActiveAttempt","emptyState","emptyStateForJob","showHeader","JobExecutionEmptyState","visual","badge","span","style","width","emptyStateForMissingExecution","icon","title","description","queueTime","runTime","executionStartedAt","startedAt","queuedAt","createdAt","items","triggerEvents","key","kind","value","time","filter","item","index","MetadataSeparator","JobExecutionTriggerMetadata","JobExecutionMetadataItem","triggerEvent","triggerLabel","triggerSource","source","event","triggerDisplayLabel","triggerCount","countLabel","tooltip","asChild","button","aria-label","provider","aria-hidden","jobExecutionTimeVerb","name","state","steps","selected","attempts","some","sourceLocation","selectedAttemptError","toSelectedAttemptError","error","isAgentConfigFailure","config","agentConfig","rawReason","reason","parsedReason","has","rawAgentConfigIssue","agentConfigIssue","agent_config_issue","exitCode","exit_code","resolvedReason","message","signal","category","sequence","listenerStatus","skippedJobDescription","statusReason"],"mappings":";AAAA,SAAQA,iBAAiB,QAAO,2BAA2B;AAC3D,SAAQC,KAAK,QAAO,0BAA0B;AAC9C,SAAQC,MAAM,QAAO,2BAA2B;AAChD,SAAQC,UAAU,QAAO,gCAAgC;AACzD,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SAAQC,YAAY,QAAO,kCAAkC;AAC7D,SAAQC,WAAW,QAAO,gCAAgC;AAC1D,SAAQC,OAAO,EAAEC,cAAc,EAAEC,cAAc,QAAO,4BAA4B;AAClF,SAAQC,IAAI,QAAO,+BAA+B;AAElD,SAAQC,QAAQ,EAAEC,KAAK,EAAEC,MAAM,EAAEC,QAAQ,QAAO,QAAQ;AACxD,SAAQC,uBAAuB,QAAO,gDAAgD;AACtF,SACEC,mBAAmB,EAInBC,kBAAkB,EAIlBC,qBAAqB,EACrBC,8BAA8B,EAC9BC,uBAAuB,QAClB,wBAAwB;AAC/B,SAAkCC,QAAQ,QAAgC,wBAAwB;AAClG,SAAQC,yBAAyB,QAAO,oCAAoC;AAC5E,SAAQC,oBAAoB,QAAO,8BAA8B;AACjE,SAAQC,sBAAsB,EAAEC,oBAAoB,QAAO,+BAA+B;AAC1F,SAAQC,mBAAmB,QAAO,8BAA8B;AAEhE,MAAMC,8BAA8BC,KAAKC,GAAG,IACvCX,sBAAsBY,GAAG,CAAC,CAACC,SAAWhB,wBA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;QACPC,aAAa;QACbxE,QAAQK,IAAIL,MAAM;IACpB;AACF;AAEA,SAASkC;IACP,qBACE,KAAC9D;QACCmE,WAAU;QACV+B,MAAK;QACLC,OAAM;QACNC,aAAY;QACZxB,SAAQ;;AAGd;AAEA,SAASsF,sBAAsBd,MAA2B;IACxD,OAAQA;QACN,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAO;IACX;AACF"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/workflow-run-view/job-card.tsx"],"sourcesContent":["import {TriggerSourceIcon} from '@shipfox/client-triggers';\nimport {Badge} from '@shipfox/react-ui/badge';\nimport {Button} from '@shipfox/react-ui/button';\nimport {EmptyState} from '@shipfox/react-ui/empty-state';\nimport {Icon} from '@shipfox/react-ui/icon';\nimport {RelativeTime} from '@shipfox/react-ui/relative-time';\nimport {useTimeTick} from '@shipfox/react-ui/time-ticker';\nimport {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {Text} from '@shipfox/react-ui/typography';\nimport type {ReactNode} from 'react';\nimport {Fragment, useId, useRef, useState} from 'react';\nimport {getWorkflowStatusVisual} from '#components/workflow-status/status-visuals.js';\nimport {\n AGENT_CONFIG_ISSUES,\n defaultJobExecution,\n deriveJobDisplayStatus,\n deriveJobExecutionDisplayStatus,\n type Job,\n type JobDisplayStatus,\n type JobExecution,\n type JobExecutionTime,\n STEP_ERROR_REASONS,\n type Step,\n type StepError,\n type StepSourceLocation,\n WORKFLOW_JOB_STATUSES,\n workflowRunTriggerDisplayLabel,\n workflowRunTriggerLabel,\n} from '#core/workflow-run.js';\nimport {type StepExpandedContext, StepList, type StepListEmptyState} from '../step-list/index.js';\nimport {AgentConfigFailureCallout} from './agent-config-failure-callout.js';\nimport {JobExecutionSwitcher} from './job-execution-switcher.js';\nimport {formatJobExecutionTime, JobExecutionTimeText} from './job-execution-time-text.js';\nimport {StepAttemptLogPanel} from './step-attempt-log-panel.js';\n\nconst STATUS_BADGE_LABEL_WIDTH_CH = Math.max(\n ...[...WORKFLOW_JOB_STATUSES, 'listening' as const].map(\n (status) => getWorkflowStatusVisual(status).label.length,\n ),\n);\n\ninterface LocalSelectedAttempt {\n jobExecutionId: string | undefined;\n attemptId: string | null;\n}\n\nexport function JobCard({\n workspaceSlug,\n job,\n selectedJobExecution,\n selectedAttemptId,\n onSelectedJobExecutionChange,\n onSelectedAttemptChange,\n renderExpandedStep,\n sourcePanelId,\n sourceAvailable,\n focusedSourceStepId,\n onOpenStepSource,\n}: {\n workspaceSlug?: string | undefined;\n job: Job;\n selectedJobExecution: JobExecution | undefined;\n selectedAttemptId: string | null | undefined;\n onSelectedJobExecutionChange: ((jobExecutionId: string | undefined) => void) | undefined;\n onSelectedAttemptChange: ((attemptId: string | undefined) => void) | undefined;\n renderExpandedStep?: ((context: StepExpandedContext) => ReactNode) | undefined;\n sourcePanelId?: string | undefined;\n sourceAvailable?: boolean | undefined;\n focusedSourceStepId?: string | null | undefined;\n onOpenStepSource?:\n | ((stepId: string, location: StepSourceLocation, trigger: HTMLButtonElement | null) => void)\n | undefined;\n}) {\n const titleId = useId();\n const sourceButtonRef = useRef<HTMLButtonElement>(null);\n const [localSelectedAttempt, setLocalSelectedAttempt] = useState<LocalSelectedAttempt>({\n jobExecutionId: undefined,\n attemptId: null,\n });\n const title = selectedJobExecution?.displayName ?? job.displayName;\n const isNonDefaultExecutionSelected =\n selectedJobExecution !== undefined && selectedJobExecution.id !== defaultJobExecution(job)?.id;\n const selectedExecutionStatus = isNonDefaultExecutionSelected\n ? deriveJobExecutionDisplayStatus(selectedJobExecution)\n : deriveJobDisplayStatus(job);\n const effectiveSelectedAttemptId =\n selectedAttemptId === undefined &&\n localSelectedAttempt.jobExecutionId === selectedJobExecution?.id\n ? localSelectedAttempt.attemptId\n : selectedAttemptId;\n const selectedSourceAction = selectedStepSourceAction(\n selectedJobExecution,\n effectiveSelectedAttemptId,\n );\n const defaultRenderExpandedStep = ({\n step,\n stepId,\n attempt,\n attemptError,\n attemptStatus,\n carriedOver,\n }: StepExpandedContext) =>\n carriedOver ? (\n <CarriedOverStepPanel />\n ) : (\n <StepAttemptDetailPanel\n workspaceSlug={workspaceSlug}\n step={step}\n stepId={stepId}\n attempt={attempt}\n attemptError={attemptError}\n attemptStatus={attemptStatus}\n />\n );\n\n function selectAttempt(attemptId: string | undefined) {\n if (selectedAttemptId === undefined) {\n setLocalSelectedAttempt({\n jobExecutionId: selectedJobExecution?.id,\n attemptId: attemptId ?? null,\n });\n }\n\n onSelectedAttemptChange?.(attemptId);\n }\n\n return (\n <section\n aria-labelledby={titleId}\n className=\"flex min-h-0 flex-col rounded-8 border border-border-neutral-base bg-background-components-base\"\n >\n <div className=\"grid min-h-52 min-w-0 grid-cols-1 gap-y-4 px-16 py-12\">\n <div className=\"flex min-w-0 flex-wrap items-center justify-between gap-10\">\n {job.mode === 'listening' &&\n job.jobExecutions.length > 0 &&\n onSelectedJobExecutionChange ? (\n <>\n <Text as=\"h2\" id={titleId} size=\"sm\" bold className=\"sr-only\">\n {title}\n </Text>\n <div className=\"flex min-w-0 items-center gap-8\">\n <JobStatusBadge status={selectedExecutionStatus} />\n <JobExecutionSwitcher\n job={job}\n selectedJobExecution={selectedJobExecution?.id ?? null}\n onSelectedJobExecutionChange={onSelectedJobExecutionChange}\n variant=\"title\"\n />\n </div>\n </>\n ) : (\n <div className=\"flex min-w-0 items-center gap-8\">\n <JobStatusBadge status={selectedExecutionStatus} />\n <div className=\"flex min-w-0 items-center gap-8\">\n <Text\n as=\"h2\"\n id={titleId}\n size=\"sm\"\n bold\n className=\"min-w-0 truncate text-foreground-neutral-base\"\n >\n {title}\n </Text>\n </div>\n </div>\n )}\n {sourceAvailable && selectedSourceAction && sourcePanelId && onOpenStepSource ? (\n <div className=\"flex min-w-max items-center gap-6\">\n <Button\n ref={sourceButtonRef}\n type=\"button\"\n variant=\"secondary\"\n size=\"xs\"\n aria-controls={sourcePanelId}\n aria-expanded={focusedSourceStepId === selectedSourceAction.stepId}\n onClick={() =>\n onOpenStepSource(\n selectedSourceAction.stepId,\n selectedSourceAction.location,\n sourceButtonRef.current,\n )\n }\n >\n View source\n </Button>\n </div>\n ) : null}\n </div>\n <JobExecutionMetadata execution={selectedJobExecution} />\n </div>\n <div className=\"min-h-0 border-t border-border-neutral-strong\">\n {selectedJobExecution ? (\n <StepList\n job={job}\n jobExecution={selectedJobExecution}\n selectedAttemptId={selectedAttemptId}\n onSelectedAttemptChange={selectAttempt}\n autoSelectActiveAttempt\n emptyState={emptyStateForJob(job, selectedJobExecution)}\n showHeader={false}\n className=\"rounded-none border-0 bg-transparent\"\n renderExpandedStep={renderExpandedStep ?? defaultRenderExpandedStep}\n />\n ) : (\n <JobExecutionEmptyState job={job} />\n )}\n </div>\n </section>\n );\n}\n\nfunction JobStatusBadge({status}: {status: JobDisplayStatus}) {\n const visual = getWorkflowStatusVisual(status);\n\n return (\n <Badge variant={visual.badge} size=\"xs\">\n <span className=\"text-center\" style={{width: `${STATUS_BADGE_LABEL_WIDTH_CH}ch`}}>\n {visual.label}\n </span>\n </Badge>\n );\n}\n\nfunction JobExecutionEmptyState({job}: {job: Job}) {\n const emptyState = emptyStateForMissingExecution(job);\n\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 JobExecutionMetadata({execution}: {execution: JobExecution | undefined}) {\n if (!execution) return null;\n\n const queueTime = execution.queueTime;\n const runTime = execution.runTime;\n const executionStartedAt = execution.startedAt ?? execution.queuedAt ?? execution.createdAt;\n const items = [\n execution.triggerEvents.length > 0 ? {key: 'trigger', kind: 'trigger' as const} : null,\n {key: 'started', kind: 'started' as const, value: executionStartedAt},\n queueTime\n ? {key: 'queue', icon: 'hourglassLine' as const, kind: 'queue' as const, time: queueTime}\n : null,\n runTime ? {key: 'run', icon: 'timerLine' as const, kind: 'run' as const, time: runTime} : null,\n ].filter((item) => item !== null);\n\n if (items.length === 0) return null;\n\n return (\n <div className=\"flex min-w-0 items-center gap-12 overflow-hidden text-foreground-neutral-muted\">\n {items.map((item, index) => (\n <Fragment key={item.key}>\n {index > 0 ? <MetadataSeparator /> : null}\n {item.kind === 'started' ? (\n <RelativeTime\n value={item.value}\n className=\"shrink-0 whitespace-nowrap text-xs leading-20 text-foreground-neutral-muted\"\n />\n ) : item.kind === 'trigger' ? (\n <JobExecutionTriggerMetadata execution={execution} />\n ) : (\n <JobExecutionMetadataItem\n icon={item.icon}\n kind={item.kind}\n time={item.time}\n displayStatus={deriveJobExecutionDisplayStatus(execution)}\n />\n )}\n </Fragment>\n ))}\n </div>\n );\n}\n\nfunction JobExecutionTriggerMetadata({execution}: {execution: JobExecution}) {\n const triggerEvent = execution.triggerEvents[0];\n if (!triggerEvent) return null;\n\n const triggerLabel = workflowRunTriggerLabel({\n triggerSource: triggerEvent.source,\n triggerEvent: triggerEvent.event,\n });\n const triggerDisplayLabel = workflowRunTriggerDisplayLabel({\n triggerSource: triggerEvent.source,\n triggerEvent: triggerEvent.event,\n });\n const triggerCount = execution.triggerEvents.length;\n const countLabel = triggerCount > 1 ? ` (${triggerCount})` : '';\n const tooltip = triggerCount > 1 ? `${triggerLabel} (${triggerCount} events)` : triggerLabel;\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n aria-label={tooltip}\n className=\"inline-flex min-w-0 max-w-full cursor-default items-center gap-4 rounded-4 border-0 bg-transparent p-0 text-left text-foreground-neutral-muted outline-none focus-visible:shadow-border-interactive-with-active\"\n >\n <TriggerSourceIcon\n provider={triggerEvent.source}\n source={triggerEvent.source}\n aria-hidden=\"true\"\n className=\"size-12 shrink-0\"\n />\n <Text as=\"span\" size=\"xs\" className=\"min-w-0 truncate\">\n {triggerDisplayLabel}\n {countLabel}\n </Text>\n </button>\n </TooltipTrigger>\n <TooltipContent>\n <Text as=\"span\" size=\"xs\" className=\"block max-w-[360px] break-words\">\n {tooltip}\n </Text>\n </TooltipContent>\n </Tooltip>\n );\n}\n\nfunction JobExecutionMetadataItem({\n icon,\n kind,\n time,\n displayStatus,\n}: {\n icon: 'hourglassLine' | 'timerLine';\n kind: 'queue' | 'run';\n time: JobExecutionTime;\n displayStatus: JobExecution['status'];\n}) {\n useTimeTick();\n\n const tooltip = `${jobExecutionTimeVerb(kind, time, displayStatus)} for ${formatJobExecutionTime(time)}`;\n\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n aria-label={tooltip}\n className=\"inline-flex min-w-0 cursor-default items-center gap-4 rounded-4 border-0 bg-transparent p-0 text-foreground-neutral-muted outline-none focus-visible:shadow-border-interactive-with-active\"\n >\n <Icon name={icon} className=\"size-12 shrink-0\" aria-hidden=\"true\" />\n <span className=\"shrink-0 text-xs leading-20 text-foreground-neutral-muted tabular-nums\">\n <JobExecutionTimeText time={time} />\n </span>\n </button>\n </TooltipTrigger>\n <TooltipContent>\n <Text as=\"span\" size=\"xs\">\n {tooltip}\n </Text>\n </TooltipContent>\n </Tooltip>\n );\n}\n\nfunction jobExecutionTimeVerb(\n kind: 'queue' | 'run',\n time: JobExecutionTime,\n displayStatus: JobExecution['status'],\n): string {\n if (kind === 'queue') return time.state === 'live' ? 'Queueing' : 'Queued';\n if (time.state !== 'live') return 'Ran';\n if (displayStatus === 'running') return 'Running';\n return displayStatus === 'pending' ? 'Runner assigned' : 'Execution elapsed';\n}\n\nfunction MetadataSeparator() {\n return <span aria-hidden=\"true\" className=\"h-12 w-px shrink-0 bg-border-neutral-strong\" />;\n}\n\nfunction selectedStepSourceAction(\n jobExecution: JobExecution | undefined,\n selectedAttemptId: string | null | undefined,\n): {stepId: string; location: StepSourceLocation} | null {\n if (!jobExecution || !selectedAttemptId) return null;\n\n for (const step of jobExecution.steps) {\n const selected =\n selectedAttemptId === `carried-over:${step.id}` ||\n step.attempts.some((attempt) => attempt.id === selectedAttemptId);\n if (selected && step.sourceLocation) {\n return {stepId: step.id, location: step.sourceLocation};\n }\n }\n\n return null;\n}\n\nfunction StepAttemptDetailPanel({\n workspaceSlug,\n step,\n stepId,\n attempt,\n attemptError,\n attemptStatus,\n}: {\n workspaceSlug?: string | undefined;\n step: Step;\n stepId: string;\n attempt: number;\n attemptError: Record<string, unknown> | null;\n attemptStatus: string;\n}) {\n const selectedAttemptError = toSelectedAttemptError(step, attemptError) ?? step.error;\n\n return (\n <div className=\"flex min-w-0 flex-col gap-10\">\n {isAgentConfigFailure(step, selectedAttemptError) ? (\n <AgentConfigFailureCallout\n workspaceSlug={workspaceSlug}\n config={step.agentConfig}\n error={selectedAttemptError}\n />\n ) : null}\n <StepAttemptLogPanel stepId={stepId} attempt={attempt} attemptStatus={attemptStatus} />\n </div>\n );\n}\n\nfunction toSelectedAttemptError(\n step: Step,\n error: Record<string, unknown> | null,\n): StepError | null {\n if (error === null) return null;\n\n const rawReason = error.reason;\n const parsedReason =\n typeof rawReason === 'string' &&\n STEP_ERROR_REASONS.has(rawReason as StepError['reason'] & string)\n ? (rawReason as NonNullable<StepError['reason']>)\n : undefined;\n const rawAgentConfigIssue = error.agentConfigIssue ?? error.agent_config_issue;\n const agentConfigIssue =\n typeof rawAgentConfigIssue === 'string' &&\n AGENT_CONFIG_ISSUES.has(rawAgentConfigIssue as NonNullable<StepError['agentConfigIssue']>)\n ? (rawAgentConfigIssue as NonNullable<StepError['agentConfigIssue']>)\n : undefined;\n const exitCode = error.exitCode ?? error.exit_code;\n const resolvedReason = parsedReason\n ? parsedReason\n : agentConfigIssue\n ? 'agent_config_invalid'\n : undefined;\n\n if (resolvedReason === undefined) return null;\n\n return {\n message: typeof error.message === 'string' ? error.message : '',\n exitCode: exitCode === null || typeof exitCode === 'number' ? exitCode : null,\n signal: typeof error.signal === 'string' ? error.signal : undefined,\n reason: resolvedReason,\n agentConfigIssue,\n category: step.type === 'setup' || step.type === 'checkout' ? 'setup' : 'user',\n };\n}\n\nfunction isAgentConfigFailure(step: Step, error: StepError | null): boolean {\n return step.type === 'agent' && error?.reason === 'agent_config_invalid';\n}\n\nfunction emptyStateForJob(job: Job, jobExecution: JobExecution): StepListEmptyState | undefined {\n if (job.carriedOver) {\n return {\n title: 'Carried over from a previous attempt',\n description: 'This job did not execute in this run.',\n status: 'succeeded',\n };\n }\n\n const displayStatus =\n job.mode === 'listening'\n ? deriveJobExecutionDisplayStatus(jobExecution)\n : deriveJobDisplayStatus(job);\n\n if (jobExecution.status === 'running' && displayStatus === 'pending') {\n return {\n title: 'Runner preparing job',\n description: 'A runner is assigned. Steps will appear here when work begins.',\n status: displayStatus,\n };\n }\n\n if (displayStatus === 'pending') {\n return {\n title: 'Waiting for this job to start',\n description: 'Steps will appear here once the job starts.',\n status: displayStatus,\n };\n }\n\n if (displayStatus === 'running') {\n return {\n title: 'Waiting for the first step',\n description: 'The first running step will appear here shortly.',\n status: displayStatus,\n };\n }\n\n if (displayStatus === 'cancelled') {\n return {\n title: 'Cancelled before start',\n description: 'This job was cancelled before any step started.',\n status: displayStatus,\n };\n }\n\n if (displayStatus === 'succeeded' || displayStatus === 'failed') {\n return {\n title: 'No steps recorded',\n description: `Execution #${jobExecution.sequence} finished without recorded steps.`,\n status: displayStatus,\n };\n }\n\n return undefined;\n}\n\nfunction emptyStateForMissingExecution(job: Job): StepListEmptyState {\n if (job.carriedOver) {\n return {\n title: 'Carried over from a previous attempt',\n description: 'This job did not execute in this run.',\n status: 'succeeded',\n };\n }\n\n if (job.mode === 'listening' && job.listenerStatus === 'listening') {\n return {\n title: 'Waiting for trigger events',\n description: 'Matching trigger events will create job executions here.',\n status: deriveJobDisplayStatus(job),\n };\n }\n\n if (job.mode === 'listening' && job.listenerStatus === 'resolved') {\n return {\n title: 'Listener resolved without executions',\n description: 'No matching trigger event created a job execution before the listener stopped.',\n status: job.status,\n };\n }\n\n if (job.status === 'pending') {\n return {\n title: 'Waiting for this job to start',\n description: 'No execution has been created for this job yet.',\n status: 'pending',\n };\n }\n\n if (job.status === 'skipped') {\n return {\n title: 'This job was skipped',\n description: skippedJobDescription(job.statusReason),\n status: 'skipped',\n };\n }\n\n if (job.status === 'cancelled') {\n return {\n title: 'Cancelled before start',\n description: 'This job was cancelled before an execution was created.',\n status: 'cancelled',\n };\n }\n\n return {\n title: 'Execution details unavailable',\n description: 'This job finished, but no job execution record is available.',\n status: job.status,\n };\n}\n\nfunction CarriedOverStepPanel() {\n return (\n <EmptyState\n className=\"min-h-120 rounded-8 border border-border-neutral-base bg-background-components-base px-16 py-20\"\n icon=\"componentLine\"\n title=\"Carried over from a previous attempt\"\n description=\"Not executed in this run.\"\n variant=\"compact\"\n />\n );\n}\n\nfunction skippedJobDescription(reason: Job['statusReason']): string {\n switch (reason) {\n case 'dependency_not_completed':\n return 'A required job did not complete, so this job was skipped.';\n case 'default_gate_rejected':\n return 'A required job did not succeed, so this job was skipped.';\n case 'condition_false':\n case 'condition_rejected':\n return 'The job condition did not match, so this job was skipped.';\n case 'condition_errored':\n return 'The job condition could not be evaluated, so this job was skipped.';\n case 'user_cancelled':\n case 'run_cancelled':\n case 'timed_out':\n case 'runner_lost':\n case 'step_failed':\n case 'unknown':\n case null:\n return 'This job did not start.';\n }\n}\n"],"names":["TriggerSourceIcon","Badge","Button","EmptyState","Icon","RelativeTime","useTimeTick","Tooltip","TooltipContent","TooltipTrigger","Text","Fragment","useId","useRef","useState","getWorkflowStatusVisual","AGENT_CONFIG_ISSUES","defaultJobExecution","deriveJobDisplayStatus","deriveJobExecutionDisplayStatus","STEP_ERROR_REASONS","WORKFLOW_JOB_STATUSES","workflowRunTriggerDisplayLabel","workflowRunTriggerLabel","StepList","AgentConfigFailureCallout","JobExecutionSwitcher","formatJobExecutionTime","JobExecutionTimeText","StepAttemptLogPanel","STATUS_BADGE_LABEL_WIDTH_CH","Math","max","map","status","label","length","JobCard","workspaceSlug","job","selectedJobExecution","selectedAttemptId","onSelectedJobExecutionChange","onSelectedAttemptChange","renderExpandedStep","sourcePanelId","sourceAvailable","focusedSourceStepId","onOpenStepSource","titleId","sourceButtonRef","localSelectedAttempt","setLocalSelectedAttempt","jobExecutionId","undefined","attemptId","title","displayName","isNonDefaultExecutionSelected","id","selectedExecutionStatus","effectiveSelectedAttemptId","selectedSourceAction","selectedStepSourceAction","defaultRenderExpandedStep","step","stepId","attempt","attemptError","attemptStatus","carriedOver","CarriedOverStepPanel","StepAttemptDetailPanel","selectAttempt","section","aria-labelledby","className","div","mode","jobExecutions","as","size","bold","JobStatusBadge","variant","ref","type","aria-controls","aria-expanded","onClick","location","current","JobExecutionMetadata","execution","jobExecution","autoSelectActiveAttempt","emptyState","emptyStateForJob","showHeader","JobExecutionEmptyState","visual","badge","span","style","width","emptyStateForMissingExecution","icon","description","queueTime","runTime","executionStartedAt","startedAt","queuedAt","createdAt","items","triggerEvents","key","kind","value","time","filter","item","index","MetadataSeparator","JobExecutionTriggerMetadata","JobExecutionMetadataItem","displayStatus","triggerEvent","triggerLabel","triggerSource","source","event","triggerDisplayLabel","triggerCount","countLabel","tooltip","asChild","button","aria-label","provider","aria-hidden","jobExecutionTimeVerb","name","state","steps","selected","attempts","some","sourceLocation","selectedAttemptError","toSelectedAttemptError","error","isAgentConfigFailure","config","agentConfig","rawReason","reason","parsedReason","has","rawAgentConfigIssue","agentConfigIssue","agent_config_issue","exitCode","exit_code","resolvedReason","message","signal","category","sequence","listenerStatus","skippedJobDescription","statusReason"],"mappings":";AAAA,SAAQA,iBAAiB,QAAO,2BAA2B;AAC3D,SAAQC,KAAK,QAAO,0BAA0B;AAC9C,SAAQC,MAAM,QAAO,2BAA2B;AAChD,SAAQC,UAAU,QAAO,gCAAgC;AACzD,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SAAQC,YAAY,QAAO,kCAAkC;AAC7D,SAAQC,WAAW,QAAO,gCAAgC;AAC1D,SAAQC,OAAO,EA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K;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;YACH,OAAO;QACT,KAAK;YACH,OAAO;QACT,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;QACL,KAAK;YACH,OAAO;IACX;AACF"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job-execution-switcher.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-view/job-execution-switcher.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"job-execution-switcher.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-view/job-execution-switcher.tsx"],"names":[],"mappings":"AAaA,OAAO,EAAkC,KAAK,GAAG,EAAoB,MAAM,uBAAuB,CAAC;AAGnG,MAAM,WAAW,yBAAyB;IACxC,GAAG,EAAE,GAAG,CAAC;IACT,oBAAoB,EAAE,MAAM,GAAG,IAAI,CAAC;IACpC,4BAA4B,EAAE,CAAC,cAAc,EAAE,MAAM,KAAK,IAAI,CAAC;IAC/D,OAAO,CAAC,EAAE,SAAS,GAAG,OAAO,GAAG,SAAS,CAAC;IAC1C,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED,wBAAgB,oBAAoB,CAAC,EACnC,GAAG,EACH,oBAAoB,EACpB,4BAA4B,EAC5B,OAAmB,EACnB,SAAS,GACV,EAAE,yBAAyB,sCA+F3B"}
|
|
@@ -4,8 +4,10 @@ import { Icon } from '@shipfox/react-ui/icon';
|
|
|
4
4
|
import { Text } from '@shipfox/react-ui/typography';
|
|
5
5
|
import { cn } from '@shipfox/react-ui/utils';
|
|
6
6
|
import { useMemo } from 'react';
|
|
7
|
+
import { getWorkflowStatusVisual } from '#components/workflow-status/status-visuals.js';
|
|
7
8
|
import { WorkflowStatusIcon } from '#components/workflow-status/workflow-status-icon.js';
|
|
8
|
-
import {
|
|
9
|
+
import { deriveJobExecutionDisplayStatus } from '#core/workflow-run.js';
|
|
10
|
+
import { formatJobExecutionTime, JobExecutionTimeText } from './job-execution-time-text.js';
|
|
9
11
|
export function JobExecutionSwitcher({ job, selectedJobExecution, onSelectedJobExecutionChange, variant = 'compact', className }) {
|
|
10
12
|
const executions = useMemo(()=>[
|
|
11
13
|
...job.jobExecutions
|
|
@@ -26,10 +28,9 @@ export function JobExecutionSwitcher({ job, selectedJobExecution, onSelectedJobE
|
|
|
26
28
|
children: [
|
|
27
29
|
/*#__PURE__*/ _jsxs(DropdownMenuTrigger, {
|
|
28
30
|
className: cn('inline-flex min-w-0 max-w-full items-center rounded-6 text-left transition-colors focus-visible:shadow-border-interactive-with-active focus-visible:outline-none', variant === 'title' ? '-mx-6 -my-4 gap-8 px-6 py-4 hover:bg-background-components-hover' : 'min-h-28 gap-6 px-8 py-4 text-sm leading-20 text-foreground-neutral-subtle hover:bg-background-components-hover', className),
|
|
29
|
-
"aria-label": `Switch job execution, currently execution ${selected.sequence}`,
|
|
31
|
+
"aria-label": `Switch job execution, currently execution ${selected.sequence}: ${selected.displayName}`,
|
|
30
32
|
children: [
|
|
31
33
|
variant === 'title' ? /*#__PURE__*/ _jsx(TitleExecutionSummary, {
|
|
32
|
-
job: job,
|
|
33
34
|
execution: selected
|
|
34
35
|
}) : /*#__PURE__*/ _jsx(ExecutionSummary, {
|
|
35
36
|
execution: selected
|
|
@@ -60,10 +61,11 @@ export function JobExecutionSwitcher({ job, selectedJobExecution, onSelectedJobE
|
|
|
60
61
|
children: /*#__PURE__*/ _jsxs("button", {
|
|
61
62
|
type: "button",
|
|
62
63
|
"aria-current": isSelected ? 'true' : undefined,
|
|
64
|
+
"aria-label": executionAccessibleLabel(jobExecution),
|
|
63
65
|
className: "w-full text-left",
|
|
64
66
|
children: [
|
|
65
67
|
/*#__PURE__*/ _jsx(WorkflowStatusIcon, {
|
|
66
|
-
status: jobExecution
|
|
68
|
+
status: deriveJobExecutionDisplayStatus(jobExecution),
|
|
67
69
|
size: 14,
|
|
68
70
|
tooltip: false
|
|
69
71
|
}),
|
|
@@ -76,7 +78,7 @@ export function JobExecutionSwitcher({ job, selectedJobExecution, onSelectedJobE
|
|
|
76
78
|
}),
|
|
77
79
|
/*#__PURE__*/ _jsx("span", {
|
|
78
80
|
className: "min-w-0 truncate text-xs leading-20 text-foreground-neutral-base",
|
|
79
|
-
children:
|
|
81
|
+
children: jobExecution.displayName
|
|
80
82
|
}),
|
|
81
83
|
!isSelected && jobExecution.statusReason ? /*#__PURE__*/ _jsx("span", {
|
|
82
84
|
className: "min-w-0 flex-1 truncate text-xs leading-20 text-foreground-neutral-muted",
|
|
@@ -101,7 +103,16 @@ export function JobExecutionSwitcher({ job, selectedJobExecution, onSelectedJobE
|
|
|
101
103
|
]
|
|
102
104
|
});
|
|
103
105
|
}
|
|
104
|
-
function
|
|
106
|
+
function executionAccessibleLabel(execution) {
|
|
107
|
+
const status = getWorkflowStatusVisual(deriveJobExecutionDisplayStatus(execution));
|
|
108
|
+
return [
|
|
109
|
+
`Execution #${execution.sequence}: ${execution.displayName}`,
|
|
110
|
+
status.label,
|
|
111
|
+
execution.statusReason ?? undefined,
|
|
112
|
+
execution.displayDuration ? `duration ${formatJobExecutionTime(execution.displayDuration)}` : undefined
|
|
113
|
+
].filter((part)=>Boolean(part)).join(', ');
|
|
114
|
+
}
|
|
115
|
+
function TitleExecutionSummary({ execution }) {
|
|
105
116
|
return /*#__PURE__*/ _jsxs("span", {
|
|
106
117
|
className: "flex min-w-0 items-center gap-8",
|
|
107
118
|
children: [
|
|
@@ -120,17 +131,18 @@ function TitleExecutionSummary({ job, execution }) {
|
|
|
120
131
|
size: "sm",
|
|
121
132
|
bold: true,
|
|
122
133
|
className: "min-w-0 truncate text-foreground-neutral-base",
|
|
123
|
-
children:
|
|
134
|
+
children: execution.displayName
|
|
124
135
|
})
|
|
125
136
|
]
|
|
126
137
|
});
|
|
127
138
|
}
|
|
128
139
|
function ExecutionSummary({ execution }) {
|
|
140
|
+
const displayStatus = deriveJobExecutionDisplayStatus(execution);
|
|
129
141
|
return /*#__PURE__*/ _jsxs("span", {
|
|
130
142
|
className: "flex min-w-0 items-center gap-6",
|
|
131
143
|
children: [
|
|
132
144
|
/*#__PURE__*/ _jsx(WorkflowStatusIcon, {
|
|
133
|
-
status:
|
|
145
|
+
status: displayStatus,
|
|
134
146
|
size: 14,
|
|
135
147
|
tooltip: false
|
|
136
148
|
}),
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/workflow-run-view/job-execution-switcher.tsx"],"sourcesContent":["import {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuTrigger,\n} from '@shipfox/react-ui/dropdown-menu';\nimport {Icon} from '@shipfox/react-ui/icon';\nimport {Text} from '@shipfox/react-ui/typography';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {useMemo} from 'react';\nimport {WorkflowStatusIcon} from '#components/workflow-status/workflow-status-icon.js';\nimport type {Job, JobExecution} from '#core/workflow-run.js';\nimport {JobExecutionTimeText} from './job-execution-time-text.js';\n\nexport interface JobExecutionSwitcherProps {\n job: Job;\n selectedJobExecution: string | null;\n onSelectedJobExecutionChange: (jobExecutionId: string) => void;\n variant?: 'compact' | 'title' | undefined;\n className?: string | undefined;\n}\n\nexport function JobExecutionSwitcher({\n job,\n selectedJobExecution,\n onSelectedJobExecutionChange,\n variant = 'compact',\n className,\n}: JobExecutionSwitcherProps) {\n const executions = useMemo(\n () => [...job.jobExecutions].sort((left, right) => right.sequence - left.sequence),\n [job.jobExecutions],\n );\n const selected =\n executions.find((jobExecution) => jobExecution.id === selectedJobExecution) ??\n executions[0] ??\n null;\n\n if (selected === null) return null;\n\n if (!job.executionCountVisible) {\n return (\n <div\n className={cn(\n 'flex min-w-0 items-center gap-6 text-sm leading-20 text-foreground-neutral-subtle',\n className,\n )}\n >\n <ExecutionSummary execution={selected} />\n </div>\n );\n }\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger\n className={cn(\n 'inline-flex min-w-0 max-w-full items-center rounded-6 text-left transition-colors focus-visible:shadow-border-interactive-with-active focus-visible:outline-none',\n variant === 'title'\n ? '-mx-6 -my-4 gap-8 px-6 py-4 hover:bg-background-components-hover'\n : 'min-h-28 gap-6 px-8 py-4 text-sm leading-20 text-foreground-neutral-subtle hover:bg-background-components-hover',\n className,\n )}\n aria-label={`Switch job execution, currently execution ${selected.sequence}`}\n >\n {variant === 'title' ? (\n <TitleExecutionSummary job={job} execution={selected} />\n ) : (\n <ExecutionSummary execution={selected} />\n )}\n <Icon name=\"arrowDownSLine\" className=\"size-14 shrink-0 text-foreground-neutral-muted\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\" size=\"lg\" className=\"max-h-[320px] overflow-y-auto\">\n <DropdownMenuLabel>\n {executions.length} execution{executions.length === 1 ? '' : 's'}\n </DropdownMenuLabel>\n {executions.map((jobExecution) => {\n const isSelected = jobExecution.id === selected.id;\n\n return (\n <DropdownMenuItem\n key={jobExecution.id}\n asChild\n onSelect={() => onSelectedJobExecutionChange(jobExecution.id)}\n >\n <button\n type=\"button\"\n aria-current={isSelected ? 'true' : undefined}\n className=\"w-full text-left\"\n >\n <WorkflowStatusIcon status={jobExecution.status} size={14} tooltip={false} />\n <span className=\"font-code text-xs leading-20 text-foreground-neutral-base tabular-nums\">\n #{jobExecution.sequence}\n </span>\n <span className=\"min-w-0 truncate text-xs leading-20 text-foreground-neutral-base\">\n {job.displayName}\n </span>\n {!isSelected && jobExecution.statusReason ? (\n <span className=\"min-w-0 flex-1 truncate text-xs leading-20 text-foreground-neutral-muted\">\n {jobExecution.statusReason}\n </span>\n ) : (\n <span className=\"min-w-0 flex-1\" />\n )}\n {isSelected ? (\n <Icon name=\"check\" className=\"size-14 shrink-0 text-foreground-neutral-base\" />\n ) : null}\n <JobExecutionDuration\n execution={jobExecution}\n className=\"ml-auto shrink-0 font-code text-xs leading-20 text-foreground-neutral-muted tabular-nums\"\n />\n </button>\n </DropdownMenuItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\nfunction TitleExecutionSummary({job, execution}: {job: Job; execution: JobExecution}) {\n return (\n <span className=\"flex min-w-0 items-center gap-8\">\n <Text as=\"span\" size=\"sm\" bold className=\"shrink-0 text-foreground-neutral-base\">\n #{execution.sequence}\n </Text>\n <Text as=\"span\" size=\"sm\" bold className=\"min-w-0 truncate text-foreground-neutral-base\">\n {job.displayName}\n </Text>\n </span>\n );\n}\n\nfunction ExecutionSummary({execution}: {execution: JobExecution}) {\n return (\n <span className=\"flex min-w-0 items-center gap-6\">\n <WorkflowStatusIcon status={execution.status} size={14} tooltip={false} />\n <span className=\"shrink-0 font-code text-xs leading-20 text-foreground-neutral-base tabular-nums\">\n Execution #{execution.sequence}\n </span>\n {execution.statusReason ? (\n <Text as=\"span\" size=\"xs\" className=\"min-w-0 truncate text-foreground-neutral-muted\">\n · {execution.statusReason}\n </Text>\n ) : null}\n <JobExecutionDuration\n execution={execution}\n className=\"shrink-0 font-code text-xs leading-20 text-foreground-neutral-muted tabular-nums\"\n />\n </span>\n );\n}\n\nfunction JobExecutionDuration({\n execution,\n className,\n}: {\n execution: JobExecution;\n className?: string | undefined;\n}) {\n const duration = execution.displayDuration;\n if (!duration) return null;\n\n return (\n <span className={className}>\n <JobExecutionTimeText time={duration} />\n </span>\n );\n}\n"],"names":["DropdownMenu","DropdownMenuContent","DropdownMenuItem","DropdownMenuLabel","DropdownMenuTrigger","Icon","Text","cn","useMemo","WorkflowStatusIcon","JobExecutionTimeText","JobExecutionSwitcher","job","selectedJobExecution","onSelectedJobExecutionChange","variant","className","executions","jobExecutions","sort","left","right","sequence","selected","find","jobExecution","id","executionCountVisible","div","ExecutionSummary","execution","aria-label","TitleExecutionSummary","name","align","size","length","map","isSelected","asChild","onSelect","button","type","aria-current","undefined","status","tooltip","span","displayName","statusReason","JobExecutionDuration","as","bold","duration","displayDuration","time"],"mappings":";AAAA,SACEA,YAAY,EACZC,mBAAmB,EACnBC,gBAAgB,EACh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AAQ;;;YAE/BQ,UAAUmB,YAAY,iBACrB,MAAC3C;gBAAK6C,IAAG;gBAAOhB,MAAK;gBAAKnB,WAAU;;oBAAiD;oBAChFc,UAAUmB,YAAY;;iBAEzB;0BACJ,KAACC;gBACCpB,WAAWA;gBACXd,WAAU;;;;AAIlB;AAEA,SAASkC,qBAAqB,EAC5BpB,SAAS,EACTd,SAAS,EAIV;IACC,MAAMqC,WAAWvB,UAAUwB,eAAe;IAC1C,IAAI,CAACD,UAAU,OAAO;IAEtB,qBACE,KAACN;QAAK/B,WAAWA;kBACf,cAAA,KAACN;YAAqB6C,MAAMF;;;AAGlC"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/workflow-run-view/job-execution-switcher.tsx"],"sourcesContent":["import {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuLabel,\n DropdownMenuTrigger,\n} from '@shipfox/react-ui/dropdown-menu';\nimport {Icon} from '@shipfox/react-ui/icon';\nimport {Text} from '@shipfox/react-ui/typography';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {useMemo} from 'react';\nimport {getWorkflowStatusVisual} from '#components/workflow-status/status-visuals.js';\nimport {WorkflowStatusIcon} from '#components/workflow-status/workflow-status-icon.js';\nimport {deriveJobExecutionDisplayStatus, type Job, type JobExecution} from '#core/workflow-run.js';\nimport {formatJobExecutionTime, JobExecutionTimeText} from './job-execution-time-text.js';\n\nexport interface JobExecutionSwitcherProps {\n job: Job;\n selectedJobExecution: string | null;\n onSelectedJobExecutionChange: (jobExecutionId: string) => void;\n variant?: 'compact' | 'title' | undefined;\n className?: string | undefined;\n}\n\nexport function JobExecutionSwitcher({\n job,\n selectedJobExecution,\n onSelectedJobExecutionChange,\n variant = 'compact',\n className,\n}: JobExecutionSwitcherProps) {\n const executions = useMemo(\n () => [...job.jobExecutions].sort((left, right) => right.sequence - left.sequence),\n [job.jobExecutions],\n );\n const selected =\n executions.find((jobExecution) => jobExecution.id === selectedJobExecution) ??\n executions[0] ??\n null;\n\n if (selected === null) return null;\n\n if (!job.executionCountVisible) {\n return (\n <div\n className={cn(\n 'flex min-w-0 items-center gap-6 text-sm leading-20 text-foreground-neutral-subtle',\n className,\n )}\n >\n <ExecutionSummary execution={selected} />\n </div>\n );\n }\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger\n className={cn(\n 'inline-flex min-w-0 max-w-full items-center rounded-6 text-left transition-colors focus-visible:shadow-border-interactive-with-active focus-visible:outline-none',\n variant === 'title'\n ? '-mx-6 -my-4 gap-8 px-6 py-4 hover:bg-background-components-hover'\n : 'min-h-28 gap-6 px-8 py-4 text-sm leading-20 text-foreground-neutral-subtle hover:bg-background-components-hover',\n className,\n )}\n aria-label={`Switch job execution, currently execution ${selected.sequence}: ${selected.displayName}`}\n >\n {variant === 'title' ? (\n <TitleExecutionSummary execution={selected} />\n ) : (\n <ExecutionSummary execution={selected} />\n )}\n <Icon name=\"arrowDownSLine\" className=\"size-14 shrink-0 text-foreground-neutral-muted\" />\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"start\" size=\"lg\" className=\"max-h-[320px] overflow-y-auto\">\n <DropdownMenuLabel>\n {executions.length} execution{executions.length === 1 ? '' : 's'}\n </DropdownMenuLabel>\n {executions.map((jobExecution) => {\n const isSelected = jobExecution.id === selected.id;\n\n return (\n <DropdownMenuItem\n key={jobExecution.id}\n asChild\n onSelect={() => onSelectedJobExecutionChange(jobExecution.id)}\n >\n <button\n type=\"button\"\n aria-current={isSelected ? 'true' : undefined}\n aria-label={executionAccessibleLabel(jobExecution)}\n className=\"w-full text-left\"\n >\n <WorkflowStatusIcon\n status={deriveJobExecutionDisplayStatus(jobExecution)}\n size={14}\n tooltip={false}\n />\n <span className=\"font-code text-xs leading-20 text-foreground-neutral-base tabular-nums\">\n #{jobExecution.sequence}\n </span>\n <span className=\"min-w-0 truncate text-xs leading-20 text-foreground-neutral-base\">\n {jobExecution.displayName}\n </span>\n {!isSelected && jobExecution.statusReason ? (\n <span className=\"min-w-0 flex-1 truncate text-xs leading-20 text-foreground-neutral-muted\">\n {jobExecution.statusReason}\n </span>\n ) : (\n <span className=\"min-w-0 flex-1\" />\n )}\n {isSelected ? (\n <Icon name=\"check\" className=\"size-14 shrink-0 text-foreground-neutral-base\" />\n ) : null}\n <JobExecutionDuration\n execution={jobExecution}\n className=\"ml-auto shrink-0 font-code text-xs leading-20 text-foreground-neutral-muted tabular-nums\"\n />\n </button>\n </DropdownMenuItem>\n );\n })}\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\nfunction executionAccessibleLabel(execution: JobExecution): string {\n const status = getWorkflowStatusVisual(deriveJobExecutionDisplayStatus(execution));\n return [\n `Execution #${execution.sequence}: ${execution.displayName}`,\n status.label,\n execution.statusReason ?? undefined,\n execution.displayDuration\n ? `duration ${formatJobExecutionTime(execution.displayDuration)}`\n : undefined,\n ]\n .filter((part): part is string => Boolean(part))\n .join(', ');\n}\n\nfunction TitleExecutionSummary({execution}: {execution: JobExecution}) {\n return (\n <span className=\"flex min-w-0 items-center gap-8\">\n <Text as=\"span\" size=\"sm\" bold className=\"shrink-0 text-foreground-neutral-base\">\n #{execution.sequence}\n </Text>\n <Text as=\"span\" size=\"sm\" bold className=\"min-w-0 truncate text-foreground-neutral-base\">\n {execution.displayName}\n </Text>\n </span>\n );\n}\n\nfunction ExecutionSummary({execution}: {execution: JobExecution}) {\n const displayStatus = deriveJobExecutionDisplayStatus(execution);\n\n return (\n <span className=\"flex min-w-0 items-center gap-6\">\n <WorkflowStatusIcon status={displayStatus} size={14} tooltip={false} />\n <span className=\"shrink-0 font-code text-xs leading-20 text-foreground-neutral-base tabular-nums\">\n Execution #{execution.sequence}\n </span>\n {execution.statusReason ? (\n <Text as=\"span\" size=\"xs\" className=\"min-w-0 truncate text-foreground-neutral-muted\">\n · {execution.statusReason}\n </Text>\n ) : null}\n <JobExecutionDuration\n execution={execution}\n className=\"shrink-0 font-code text-xs leading-20 text-foreground-neutral-muted tabular-nums\"\n />\n </span>\n );\n}\n\nfunction JobExecutionDuration({\n execution,\n className,\n}: {\n execution: JobExecution;\n className?: string | undefined;\n}) {\n const duration = execution.displayDuration;\n if (!duration) return null;\n\n return (\n <span className={className}>\n <JobExecutionTimeText time={duration} />\n </span>\n );\n}\n"],"names":["DropdownMenu","DropdownMenuContent","DropdownMenuItem","DropdownMenuLabel","DropdownMenuTrigger","Icon","Text","cn","useMemo","getWorkflowStatusVisual","WorkflowStatusIcon","deriveJobExecutionDisplayStatus","formatJobExecutionTime","JobExecutionTimeText","JobExecutionSwitcher","job","selectedJobExecution","onSelectedJobExecutionChange","variant","className","executions","jobExecutions","sort","left","right","sequence","selected","find","jobExecution","id","executionCountVisible","div","ExecutionSummary","execution","aria-label","displayName","TitleExecutionSummary","name","align","size","length","map","isSelected","asChild","onSelect","button","type","aria-current","undefined","executionAccessibleLabel","status","tooltip","span","statusReason","JobExecutionDuration","label","displayDuration","filter","part","Boolean","join","as","bold","displayStatus","duration","time"],"mappings":";AAAA,SACEA,YAAY,EACZC,mBAAmB,EACnBC,gBAAgB,EAChBC,iBAAiB,EACjBC,mBAAmB,QACd,kCAAkC;AACzC,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SAAQC,IAAI,QAAO,+BAA+B;AAClD,SAAQC,EAAE,QAAO,0BAA0B;AAC3C,SAAQC,OAAO,QAAO,QAAQ;AAC9B,SAAQC,uBAAuB,QAAO,gDAAgD;AACtF,SAAQC,kBAAkB,QAAO,sDAAsD;AACvF,SAAQC,+BAA+B,QAAoC,wBAAwB;AACnG,SAAQC,sBAAsB,EAAEC,oBAAoB,QAAO,+BAA+B;AAU1F,OAAO,SAASC,qBAAqB,EACnCC,GAAG,EACHC,oBAAoB,EACpBC,4BAA4B,EAC5BC,UAAU,SAAS,EACnBC,SAAS,EACiB;IAC1B,MAAMC,aAAaZ,QACjB,IAAM;eAAIO,IAAIM,aAAa;SAAC,CAACC,IAAI,CAAC,CAACC,MAAMC,QAAUA,MAAMC,QAAQ,GAAGF,KAAK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OtB,MAAK;gBAAKpB,WAAU;;oBAAiD;oBAChFc,UAAUoB,YAAY;;iBAEzB;0BACJ,KAACC;gBACCrB,WAAWA;gBACXd,WAAU;;;;AAIlB;AAEA,SAASmC,qBAAqB,EAC5BrB,SAAS,EACTd,SAAS,EAIV;IACC,MAAM6C,WAAW/B,UAAUuB,eAAe;IAC1C,IAAI,CAACQ,UAAU,OAAO;IAEtB,qBACE,KAACZ;QAAKjC,WAAWA;kBACf,cAAA,KAACN;YAAqBoD,MAAMD;;;AAGlC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-run-selection.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-view/workflow-run-selection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EACR,KAAK,YAAY,EAEjB,KAAK,IAAI,EACT,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,iCAAiC,CAAC;AAE/E,MAAM,WAAW,4BAA4B;IAC3C,GAAG,EAAE,GAAG,GAAG,SAAS,CAAC;IACrB,YAAY,EAAE,YAAY,GAAG,SAAS,CAAC;IACvC,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC;IACvB,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC;IACjC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,GAAG,EACH,SAAS,GACV,EAAE;IACD,GAAG,EAAE,iBAAiB,CAAC;IACvB,SAAS,EAAE,yBAAyB,CAAC;CACtC,GAAG,4BAA4B,
|
|
1
|
+
{"version":3,"file":"workflow-run-selection.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-view/workflow-run-selection.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,KAAK,GAAG,EACR,KAAK,YAAY,EAEjB,KAAK,IAAI,EACT,KAAK,WAAW,EAChB,KAAK,iBAAiB,EACvB,MAAM,uBAAuB,CAAC;AAC/B,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,iCAAiC,CAAC;AAE/E,MAAM,WAAW,4BAA4B;IAC3C,GAAG,EAAE,GAAG,GAAG,SAAS,CAAC;IACrB,YAAY,EAAE,YAAY,GAAG,SAAS,CAAC;IACvC,IAAI,EAAE,IAAI,GAAG,SAAS,CAAC;IACvB,OAAO,EAAE,WAAW,GAAG,SAAS,CAAC;IACjC,iBAAiB,EAAE,MAAM,GAAG,IAAI,CAAC;CAClC;AAED,wBAAgB,2BAA2B,CAAC,EAC1C,GAAG,EACH,SAAS,GACV,EAAE;IACD,GAAG,EAAE,iBAAiB,CAAC;IACvB,SAAS,EAAE,yBAAyB,CAAC;CACtC,GAAG,4BAA4B,CAwC/B"}
|
|
@@ -5,6 +5,8 @@ export function resolveWorkflowRunSelection({ run, selection }) {
|
|
|
5
5
|
job
|
|
6
6
|
]));
|
|
7
7
|
const stepMatch = findStep(run, selection.stepId);
|
|
8
|
+
const jobExecutionMatch = findJobExecution(run, selection.jobExecutionId);
|
|
9
|
+
const stepAttemptMatch = findStepAttempt(run, selection.stepAttemptId);
|
|
8
10
|
if (stepMatch) {
|
|
9
11
|
const attempt = resolveStepAttempt(stepMatch.step, selection.stepAttemptId);
|
|
10
12
|
return {
|
|
@@ -15,7 +17,16 @@ export function resolveWorkflowRunSelection({ run, selection }) {
|
|
|
15
17
|
selectedAttemptId: attempt?.id ?? null
|
|
16
18
|
};
|
|
17
19
|
}
|
|
18
|
-
|
|
20
|
+
if (stepAttemptMatch) {
|
|
21
|
+
return {
|
|
22
|
+
job: stepAttemptMatch.job,
|
|
23
|
+
jobExecution: stepAttemptMatch.jobExecution,
|
|
24
|
+
step: stepAttemptMatch.step,
|
|
25
|
+
attempt: stepAttemptMatch.attempt,
|
|
26
|
+
selectedAttemptId: stepAttemptMatch.attempt.id
|
|
27
|
+
};
|
|
28
|
+
}
|
|
29
|
+
const job = (selection.jobId ? jobById.get(selection.jobId) : undefined) ?? jobExecutionMatch?.job ?? run.jobs.at(0);
|
|
19
30
|
const jobExecution = job ? resolveJobExecution(job, selection.jobExecutionId) : undefined;
|
|
20
31
|
return {
|
|
21
32
|
job,
|
|
@@ -25,6 +36,34 @@ export function resolveWorkflowRunSelection({ run, selection }) {
|
|
|
25
36
|
selectedAttemptId: null
|
|
26
37
|
};
|
|
27
38
|
}
|
|
39
|
+
function findJobExecution(run, jobExecutionId) {
|
|
40
|
+
if (!jobExecutionId) return undefined;
|
|
41
|
+
for (const job of run.jobs){
|
|
42
|
+
const jobExecution = job.jobExecutions.find((candidate)=>candidate.id === jobExecutionId);
|
|
43
|
+
if (jobExecution) return {
|
|
44
|
+
job,
|
|
45
|
+
jobExecution
|
|
46
|
+
};
|
|
47
|
+
}
|
|
48
|
+
return undefined;
|
|
49
|
+
}
|
|
50
|
+
function findStepAttempt(run, stepAttemptId) {
|
|
51
|
+
if (!stepAttemptId) return undefined;
|
|
52
|
+
for (const job of run.jobs){
|
|
53
|
+
for (const jobExecution of job.jobExecutions){
|
|
54
|
+
for (const step of jobExecution.steps){
|
|
55
|
+
const attempt = step.attempts.find((candidate)=>candidate.id === stepAttemptId);
|
|
56
|
+
if (attempt) return {
|
|
57
|
+
job,
|
|
58
|
+
jobExecution,
|
|
59
|
+
step,
|
|
60
|
+
attempt
|
|
61
|
+
};
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
return undefined;
|
|
66
|
+
}
|
|
28
67
|
function findStep(run, stepId) {
|
|
29
68
|
if (!stepId) return undefined;
|
|
30
69
|
for (const job of run.jobs){
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/workflow-run-view/workflow-run-selection.ts"],"sourcesContent":["import {\n type Job,\n type JobExecution,\n resolveJobExecution,\n type Step,\n type StepAttempt,\n type WorkflowRunDetail,\n} from '#core/workflow-run.js';\nimport type {WorkflowRunSelectionInput} from '#core/workflow-run-url-state.js';\n\nexport interface ResolvedWorkflowRunSelection {\n job: Job | undefined;\n jobExecution: JobExecution | undefined;\n step: Step | undefined;\n attempt: StepAttempt | undefined;\n selectedAttemptId: string | null;\n}\n\nexport function resolveWorkflowRunSelection({\n run,\n selection,\n}: {\n run: WorkflowRunDetail;\n selection: WorkflowRunSelectionInput;\n}): ResolvedWorkflowRunSelection {\n const jobById = new Map(run.jobs.map((job) => [job.id, job]));\n const stepMatch = findStep(run, selection.stepId);\n\n if (stepMatch) {\n const attempt = resolveStepAttempt(stepMatch.step, selection.stepAttemptId);\n return {\n job: stepMatch.job,\n jobExecution: stepMatch.jobExecution,\n step: stepMatch.step,\n attempt,\n selectedAttemptId: attempt?.id ?? null,\n };\n }\n\n const job
|
|
1
|
+
{"version":3,"sources":["../../../src/components/workflow-run-view/workflow-run-selection.ts"],"sourcesContent":["import {\n type Job,\n type JobExecution,\n resolveJobExecution,\n type Step,\n type StepAttempt,\n type WorkflowRunDetail,\n} from '#core/workflow-run.js';\nimport type {WorkflowRunSelectionInput} from '#core/workflow-run-url-state.js';\n\nexport interface ResolvedWorkflowRunSelection {\n job: Job | undefined;\n jobExecution: JobExecution | undefined;\n step: Step | undefined;\n attempt: StepAttempt | undefined;\n selectedAttemptId: string | null;\n}\n\nexport function resolveWorkflowRunSelection({\n run,\n selection,\n}: {\n run: WorkflowRunDetail;\n selection: WorkflowRunSelectionInput;\n}): ResolvedWorkflowRunSelection {\n const jobById = new Map(run.jobs.map((job) => [job.id, job]));\n const stepMatch = findStep(run, selection.stepId);\n const jobExecutionMatch = findJobExecution(run, selection.jobExecutionId);\n const stepAttemptMatch = findStepAttempt(run, selection.stepAttemptId);\n\n if (stepMatch) {\n const attempt = resolveStepAttempt(stepMatch.step, selection.stepAttemptId);\n return {\n job: stepMatch.job,\n jobExecution: stepMatch.jobExecution,\n step: stepMatch.step,\n attempt,\n selectedAttemptId: attempt?.id ?? null,\n };\n }\n\n if (stepAttemptMatch) {\n return {\n job: stepAttemptMatch.job,\n jobExecution: stepAttemptMatch.jobExecution,\n step: stepAttemptMatch.step,\n attempt: stepAttemptMatch.attempt,\n selectedAttemptId: stepAttemptMatch.attempt.id,\n };\n }\n\n const job =\n (selection.jobId ? jobById.get(selection.jobId) : undefined) ??\n jobExecutionMatch?.job ??\n run.jobs.at(0);\n const jobExecution = job ? resolveJobExecution(job, selection.jobExecutionId) : undefined;\n\n return {\n job,\n jobExecution,\n step: undefined,\n attempt: undefined,\n selectedAttemptId: null,\n };\n}\n\nfunction findJobExecution(\n run: WorkflowRunDetail,\n jobExecutionId: string | undefined,\n): {job: Job; jobExecution: JobExecution} | undefined {\n if (!jobExecutionId) return undefined;\n\n for (const job of run.jobs) {\n const jobExecution = job.jobExecutions.find((candidate) => candidate.id === jobExecutionId);\n if (jobExecution) return {job, jobExecution};\n }\n\n return undefined;\n}\n\nfunction findStepAttempt(\n run: WorkflowRunDetail,\n stepAttemptId: string | undefined,\n): {job: Job; jobExecution: JobExecution; step: Step; attempt: StepAttempt} | undefined {\n if (!stepAttemptId) return undefined;\n\n for (const job of run.jobs) {\n for (const jobExecution of job.jobExecutions) {\n for (const step of jobExecution.steps) {\n const attempt = step.attempts.find((candidate) => candidate.id === stepAttemptId);\n if (attempt) return {job, jobExecution, step, attempt};\n }\n }\n }\n\n return undefined;\n}\n\nfunction findStep(\n run: WorkflowRunDetail,\n stepId: string | undefined,\n): {job: Job; jobExecution: JobExecution; step: Step} | undefined {\n if (!stepId) return undefined;\n\n for (const job of run.jobs) {\n for (const jobExecution of job.jobExecutions) {\n const step = jobExecution.steps.find((candidate) => candidate.id === stepId);\n if (step) return {job, jobExecution, step};\n }\n }\n\n return undefined;\n}\n\nfunction resolveStepAttempt(step: Step, attemptId: string | undefined): StepAttempt | undefined {\n const attemptById = attemptId\n ? step.attempts.find((attempt) => attempt.id === attemptId)\n : undefined;\n if (attemptById) return attemptById;\n\n const currentAttempt = step.attempts.find((attempt) => attempt.attempt === step.currentAttempt);\n if (currentAttempt) return currentAttempt;\n\n return step.attempts.reduce<StepAttempt | undefined>((latest, attempt) => {\n if (!latest) return attempt;\n return compareAttempts(attempt, latest) > 0 ? attempt : latest;\n }, undefined);\n}\n\nfunction compareAttempts(left: StepAttempt, right: StepAttempt): number {\n return (\n left.attempt - right.attempt ||\n left.executionOrder - right.executionOrder ||\n left.id.localeCompare(right.id)\n );\n}\n"],"names":["resolveJobExecution","resolveWorkflowRunSelection","run","selection","jobById","Map","jobs","map","job","id","stepMatch","findStep","stepId","jobExecutionMatch","findJobExecution","jobExecutionId","stepAttemptMatch","findStepAttempt","stepAttemptId","attempt","resolveStepAttempt","step","jobExecution","selectedAttemptId","jobId","get","undefined","at","jobExecutions","find","candidate","steps","attempts","attemptId","attemptById","currentAttempt","reduce","latest","compareAttempts","left","right","executionOrder","localeCompare"],"mappings":"AAAA,SAGEA,mBAAmB,QAId,wBAAwB;AAW/B,OAAO,SAASC,4BAA4B,EAC1CC,GAAG,EACHC,SAAS,EAIV;IACC,MAAMC,UAAU,IAAIC,IAAIH,IAAII,IAAI,CAACC,GAAG,CAAC,CAACC,MAAQ;YAACA,IAAIC,EAAE;YAAED;SAAI;IAC3D,MAAME,YAAYC,SAAST,KAAKC,UAAUS,MAAM;IAChD,MAAMC,oBAAoBC,iBAAiBZ,KAAKC,UAAUY,cAAc;IACxE,MAAMC,mBAAmBC,gBAAgBf,KAAKC,UAAUe,aAAa;IAErE,IAAIR,WAAW;QACb,MAAMS,UAAUC,mBAAmBV,UAAUW,IAAI,EAAElB,UAAUe,aAAa;QAC1E,OAAO;YACLV,KAAKE,UAAUF,GAAG;YAClBc,cAAcZ,UAAUY,YAAY;YACpCD,MAAMX,UAAUW,IAAI;YACpBF;YACAI,mBAAmBJ,SAASV,MAAM;QACpC;IACF;IAEA,IAAIO,kBAAkB;QACpB,OAAO;YACLR,KAAKQ,iBAAiBR,GAAG;YACzBc,cAAcN,iBAAiBM,YAAY;YAC3CD,MAAML,iBAAiBK,IAAI;YAC3BF,SAASH,iB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;YAC5C,MAAMP,OAAOC,aAAaS,KAAK,CAACF,IAAI,CAAC,CAACC,YAAcA,UAAUrB,EAAE,KAAKG;YACrE,IAAIS,MAAM,OAAO;gBAACb;gBAAKc;gBAAcD;YAAI;QAC3C;IACF;IAEA,OAAOK;AACT;AAEA,SAASN,mBAAmBC,IAAU,EAAEY,SAA6B;IACnE,MAAMC,cAAcD,YAChBZ,KAAKW,QAAQ,CAACH,IAAI,CAAC,CAACV,UAAYA,QAAQV,EAAE,KAAKwB,aAC/CP;IACJ,IAAIQ,aAAa,OAAOA;IAExB,MAAMC,iBAAiBd,KAAKW,QAAQ,CAACH,IAAI,CAAC,CAACV,UAAYA,QAAQA,OAAO,KAAKE,KAAKc,cAAc;IAC9F,IAAIA,gBAAgB,OAAOA;IAE3B,OAAOd,KAAKW,QAAQ,CAACI,MAAM,CAA0B,CAACC,QAAQlB;QAC5D,IAAI,CAACkB,QAAQ,OAAOlB;QACpB,OAAOmB,gBAAgBnB,SAASkB,UAAU,IAAIlB,UAAUkB;IAC1D,GAAGX;AACL;AAEA,SAASY,gBAAgBC,IAAiB,EAAEC,KAAkB;IAC5D,OACED,KAAKpB,OAAO,GAAGqB,MAAMrB,OAAO,IAC5BoB,KAAKE,cAAc,GAAGD,MAAMC,cAAc,IAC1CF,KAAK9B,EAAE,CAACiC,aAAa,CAACF,MAAM/B,EAAE;AAElC"}
|
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import type { QueryLoadErrorQuery } from '@shipfox/client-ui';
|
|
2
2
|
export declare function WorkflowRunSkeleton(): import("react").JSX.Element;
|
|
3
|
+
export declare function WorkflowRunContentSkeleton(): import("react").JSX.Element;
|
|
3
4
|
export declare function WorkflowRunNotFound(): import("react").JSX.Element;
|
|
4
5
|
/**
|
|
5
6
|
* Slim non-blocking banner shown when a background refetch fails after the run already
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-run-states.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-view/workflow-run-states.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAO5D,wBAAgB,mBAAmB,gCAwBlC;AAED,wBAAgB,mBAAmB,gCAQlC;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,EAAC,KAAK,EAAC,EAAE;IAAC,KAAK,EAAE,mBAAmB,CAAA;CAAC,+BAqB1E"}
|
|
1
|
+
{"version":3,"file":"workflow-run-states.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-view/workflow-run-states.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAO5D,wBAAgB,mBAAmB,gCAwBlC;AAED,wBAAgB,0BAA0B,gCASzC;AAED,wBAAgB,mBAAmB,gCAQlC;AAED;;;;GAIG;AACH,wBAAgB,qBAAqB,CAAC,EAAC,KAAK,EAAC,EAAE;IAAC,KAAK,EAAE,mBAAmB,CAAA;CAAC,+BAqB1E"}
|
|
@@ -7,7 +7,7 @@ import { Text } from '@shipfox/react-ui/typography';
|
|
|
7
7
|
export function WorkflowRunSkeleton() {
|
|
8
8
|
return /*#__PURE__*/ _jsx("section", {
|
|
9
9
|
"aria-label": "Loading workflow run",
|
|
10
|
-
className: "
|
|
10
|
+
className: "bg-background-neutral-background px-16 py-12",
|
|
11
11
|
children: /*#__PURE__*/ _jsxs("div", {
|
|
12
12
|
className: "flex min-w-0 flex-wrap items-center gap-x-12 gap-y-8",
|
|
13
13
|
children: [
|
|
@@ -48,6 +48,15 @@ export function WorkflowRunSkeleton() {
|
|
|
48
48
|
})
|
|
49
49
|
});
|
|
50
50
|
}
|
|
51
|
+
export function WorkflowRunContentSkeleton() {
|
|
52
|
+
return /*#__PURE__*/ _jsx("section", {
|
|
53
|
+
"aria-label": "Loading workflow run content",
|
|
54
|
+
className: "min-h-160 rounded-8 border border-border-neutral-base bg-background-components-base p-16",
|
|
55
|
+
children: /*#__PURE__*/ _jsx(Skeleton, {
|
|
56
|
+
className: "h-160 w-full rounded-6"
|
|
57
|
+
})
|
|
58
|
+
});
|
|
59
|
+
}
|
|
51
60
|
export function WorkflowRunNotFound() {
|
|
52
61
|
return /*#__PURE__*/ _jsx(EmptyState, {
|
|
53
62
|
icon: "pulseLine",
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/workflow-run-view/workflow-run-states.tsx"],"sourcesContent":["import type {QueryLoadErrorQuery} from '@shipfox/client-ui';\nimport {Button} from '@shipfox/react-ui/button';\nimport {Callout} from '@shipfox/react-ui/callout';\nimport {EmptyState} from '@shipfox/react-ui/empty-state';\nimport {Skeleton} from '@shipfox/react-ui/skeleton';\nimport {Text} from '@shipfox/react-ui/typography';\n\nexport function WorkflowRunSkeleton() {\n return (\n <section\n aria-label=\"Loading workflow run\"\n className=\"
|
|
1
|
+
{"version":3,"sources":["../../../src/components/workflow-run-view/workflow-run-states.tsx"],"sourcesContent":["import type {QueryLoadErrorQuery} from '@shipfox/client-ui';\nimport {Button} from '@shipfox/react-ui/button';\nimport {Callout} from '@shipfox/react-ui/callout';\nimport {EmptyState} from '@shipfox/react-ui/empty-state';\nimport {Skeleton} from '@shipfox/react-ui/skeleton';\nimport {Text} from '@shipfox/react-ui/typography';\n\nexport function WorkflowRunSkeleton() {\n return (\n <section\n aria-label=\"Loading workflow run\"\n className=\"bg-background-neutral-background px-16 py-12\"\n >\n <div className=\"flex min-w-0 flex-wrap items-center gap-x-12 gap-y-8\">\n <div className=\"flex min-w-0 items-center gap-8\">\n <Skeleton className=\"size-8 rounded-full\" />\n <Skeleton className=\"h-24 w-180 rounded-6\" />\n </div>\n <Skeleton className=\"h-24 w-88 rounded-6\" />\n <span\n aria-hidden=\"true\"\n className=\"hidden h-20 w-px shrink-0 bg-border-neutral-base sm:block\"\n />\n <Skeleton className=\"h-20 w-64 rounded-4\" />\n <Skeleton className=\"h-20 w-112 rounded-4\" />\n <span className=\"min-w-0 flex-1\" />\n <Skeleton className=\"h-20 w-88 rounded-4\" />\n <Skeleton className=\"h-20 w-88 rounded-4\" />\n </div>\n </section>\n );\n}\n\nexport function WorkflowRunContentSkeleton() {\n return (\n <section\n aria-label=\"Loading workflow run content\"\n className=\"min-h-160 rounded-8 border border-border-neutral-base bg-background-components-base p-16\"\n >\n <Skeleton className=\"h-160 w-full rounded-6\" />\n </section>\n );\n}\n\nexport function WorkflowRunNotFound() {\n return (\n <EmptyState\n icon=\"pulseLine\"\n title=\"Run not found\"\n description=\"This run does not exist or is no longer available.\"\n />\n );\n}\n\n/**\n * Slim non-blocking banner shown when a background refetch fails after the run already\n * loaded (active-run polling can hit a transient API error), so the loaded run stays on\n * screen with an inline retry instead of being wiped by a full error placeholder.\n */\nexport function WorkflowRunStaleError({query}: {query: QueryLoadErrorQuery}) {\n return (\n <div className=\"border-b border-border-neutral-base p-8\">\n <Callout role=\"alert\" type=\"error\">\n <div className=\"flex items-center justify-between gap-8\">\n <Text size=\"xs\">Could not refresh this run.</Text>\n <Button\n type=\"button\"\n size=\"2xs\"\n variant=\"secondary\"\n isLoading={query.isFetching}\n onClick={() => {\n void query.refetch();\n }}\n >\n Retry\n </Button>\n </div>\n </Callout>\n </div>\n );\n}\n"],"names":["Button","Callout","EmptyState","Skeleton","Text","WorkflowRunSkeleton","section","aria-label","className","div","span","aria-hidden","WorkflowRunContentSkeleton","WorkflowRunNotFound","icon","title","description","WorkflowRunStaleError","query","role","type","size","variant","isLoading","isFetching","onClick","refetch"],"mappings":";AACA,SAAQA,MAAM,QAAO,2BAA2B;AAChD,SAAQC,OAAO,QAAO,4BAA4B;AAClD,SAAQC,UAAU,QAAO,gCAAgC;AACzD,SAAQC,QAAQ,QAAO,6BAA6B;AACpD,SAAQC,IAAI,QAAO,+BAA+B;AAElD,OAAO,SAASC;IACd,qBACE,KAACC;QACCC,cAAW;QACXC,WAAU;kBAEV,cAAA,MAACC;YAAID,WAAU;;8BACb,MAACC;oBAAID,WAAU;;sCACb,KAACL;4BAASK,WAAU;;sCACpB,KAACL;4BAASK,WAAU;;;;8BAEtB,KAACL;oBAASK,WAAU;;8BACpB,KAACE;oBACCC,eAAY;oBACZH,WAAU;;8BAEZ,KAACL;oBAASK,WAAU;;8BACpB,KAACL;oBAASK,WAAU;;8BACpB,KAACE;oBAAKF,WAAU;;8BAChB,KAACL;oBAASK,WAAU;;8BACpB,KAACL;oBAASK,WAAU;;;;;AAI5B;AAEA,OAAO,SAASI;IACd,qBACE,KAACN;QACCC,cAAW;QACXC,WAAU;kBAEV,cAAA,KAACL;YAASK,WAAU;;;AAG1B;AAEA,OAAO,SAASK;IACd,qBACE,KAACX;QACCY,MAAK;QACLC,OAAM;QACNC,aAAY;;AAGlB;AAEA;;;;CAIC,GACD,OAAO,SAASC,sBAAsB,EAACC,KAAK,EAA+B;IACzE,qBACE,KAACT;QAAID,WAAU;kBACb,cAAA,KAACP;YAAQkB,MAAK;YAAQC,MAAK;sBACzB,cAAA,MAACX;gBAAID,WAAU;;kCACb,KAACJ;wBAAKiB,MAAK;kCAAK;;kCAChB,KAACrB;wBACCoB,MAAK;wBACLC,MAAK;wBACLC,SAAQ;wBACRC,WAAWL,MAAMM,UAAU;wBAC3BC,SAAS;4BACP,KAAKP,MAAMQ,OAAO;wBACpB;kCACD;;;;;;AAOX"}
|
|
@@ -1,15 +1,20 @@
|
|
|
1
|
+
import type { RunAnnotationSummary } from '#core/workflow-run-tabs.js';
|
|
1
2
|
import { type WorkflowRunSelectionInput } from '#core/workflow-run-url-state.js';
|
|
3
|
+
import { type WorkflowRunTab } from '#routes/inputs.js';
|
|
2
4
|
export interface WorkflowRunViewProps {
|
|
3
|
-
workspaceId: string;
|
|
4
5
|
projectId: string;
|
|
6
|
+
workspaceSlug?: string | undefined;
|
|
7
|
+
projectSlug?: string | undefined;
|
|
5
8
|
workflowRunId?: string | undefined;
|
|
6
9
|
selection?: WorkflowRunSelectionInput | undefined;
|
|
7
10
|
onSelectionChange?: ((selection: WorkflowRunSelectionInput) => void) | undefined;
|
|
11
|
+
tab?: WorkflowRunTab | undefined;
|
|
12
|
+
onTabChange?: ((tab: WorkflowRunTab) => void) | undefined;
|
|
13
|
+
annotationSummary?: RunAnnotationSummary | undefined;
|
|
8
14
|
}
|
|
9
15
|
/**
|
|
10
|
-
* Renders the run for `workflowRunId`,
|
|
11
|
-
*
|
|
12
|
-
* loading state itself.
|
|
16
|
+
* Renders the run for `workflowRunId`, keeping the local tab strip mounted while the run
|
|
17
|
+
* request is pending so polling never inserts navigation under the user's cursor.
|
|
13
18
|
*/
|
|
14
|
-
export declare function WorkflowRunView({
|
|
19
|
+
export declare function WorkflowRunView({ projectId, workspaceSlug, projectSlug, workflowRunId, selection, onSelectionChange, tab, onTabChange, annotationSummary, }: WorkflowRunViewProps): import("react").JSX.Element;
|
|
15
20
|
//# sourceMappingURL=workflow-run-view.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-run-view.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-view/workflow-run-view.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow-run-view.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-view/workflow-run-view.tsx"],"names":[],"mappings":"AAcA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,4BAA4B,CAAC;AACrE,OAAO,EACL,KAAK,yBAAyB,EAE/B,MAAM,iCAAiC,CAAC;AAMzC,OAAO,EAAoB,KAAK,cAAc,EAAC,MAAM,mBAAmB,CAAC;AAwBzE,MAAM,WAAW,oBAAoB;IACnC,SAAS,EAAE,MAAM,CAAC;IAClB,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,SAAS,CAAC,EAAE,yBAAyB,GAAG,SAAS,CAAC;IAClD,iBAAiB,CAAC,EAAE,CAAC,CAAC,SAAS,EAAE,yBAAyB,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IACjF,GAAG,CAAC,EAAE,cAAc,GAAG,SAAS,CAAC;IACjC,WAAW,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,cAAc,KAAK,IAAI,CAAC,GAAG,SAAS,CAAC;IAC1D,iBAAiB,CAAC,EAAE,oBAAoB,GAAG,SAAS,CAAC;CACtD;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAAC,EAC9B,SAAS,EACT,aAAa,EACb,WAAW,EACX,aAAa,EACb,SAAS,EACT,iBAAiB,EACjB,GAAG,EACH,WAAW,EACX,iBAAiB,GAClB,EAAE,oBAAoB,+BAqBtB"}
|