@shipfox/client-workflows 0.2.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 +1 -0
- package/.storybook/preview.css +10 -0
- package/.storybook/preview.tsx +97 -0
- package/.swcrc +42 -0
- package/.turbo/turbo-build.log +2 -0
- package/.turbo/turbo-type$colon$emit.log +1 -0
- package/.turbo/turbo-type.log +1 -0
- package/CHANGELOG.md +162 -0
- package/LICENSE +21 -0
- package/dist/components/identifier/identifier.d.ts +6 -0
- package/dist/components/identifier/identifier.d.ts.map +1 -0
- package/dist/components/identifier/identifier.js +144 -0
- package/dist/components/identifier/identifier.js.map +1 -0
- package/dist/components/identifier/index.d.ts +2 -0
- package/dist/components/identifier/index.d.ts.map +1 -0
- package/dist/components/identifier/index.js +3 -0
- package/dist/components/identifier/index.js.map +1 -0
- package/dist/components/job-graph/graph-model.d.ts +27 -0
- package/dist/components/job-graph/graph-model.d.ts.map +1 -0
- package/dist/components/job-graph/graph-model.js +107 -0
- package/dist/components/job-graph/graph-model.js.map +1 -0
- package/dist/components/job-graph/index.d.ts +3 -0
- package/dist/components/job-graph/index.d.ts.map +1 -0
- package/dist/components/job-graph/index.js +3 -0
- package/dist/components/job-graph/index.js.map +1 -0
- package/dist/components/job-graph/job-duration-format.d.ts +4 -0
- package/dist/components/job-graph/job-duration-format.d.ts.map +1 -0
- package/dist/components/job-graph/job-duration-format.js +41 -0
- package/dist/components/job-graph/job-duration-format.js.map +1 -0
- package/dist/components/job-graph/job-duration-label.d.ts +5 -0
- package/dist/components/job-graph/job-duration-label.d.ts.map +1 -0
- package/dist/components/job-graph/job-duration-label.js +33 -0
- package/dist/components/job-graph/job-duration-label.js.map +1 -0
- package/dist/components/job-graph/job-graph-content.d.ts +9 -0
- package/dist/components/job-graph/job-graph-content.d.ts.map +1 -0
- package/dist/components/job-graph/job-graph-content.js +181 -0
- package/dist/components/job-graph/job-graph-content.js.map +1 -0
- package/dist/components/job-graph/job-graph-view.d.ts +11 -0
- package/dist/components/job-graph/job-graph-view.d.ts.map +1 -0
- package/dist/components/job-graph/job-graph-view.js +24 -0
- package/dist/components/job-graph/job-graph-view.js.map +1 -0
- package/dist/components/job-graph/job-graph.d.ts +3 -0
- package/dist/components/job-graph/job-graph.d.ts.map +1 -0
- package/dist/components/job-graph/job-graph.js +21 -0
- package/dist/components/job-graph/job-graph.js.map +1 -0
- package/dist/components/job-graph/job-node.d.ts +16 -0
- package/dist/components/job-graph/job-node.d.ts.map +1 -0
- package/dist/components/job-graph/job-node.js +196 -0
- package/dist/components/job-graph/job-node.js.map +1 -0
- package/dist/components/job-graph/types.d.ts +9 -0
- package/dist/components/job-graph/types.d.ts.map +1 -0
- package/dist/components/job-graph/types.js +3 -0
- package/dist/components/job-graph/types.js.map +1 -0
- package/dist/components/step-list/index.d.ts +3 -0
- package/dist/components/step-list/index.d.ts.map +1 -0
- package/dist/components/step-list/index.js +3 -0
- package/dist/components/step-list/index.js.map +1 -0
- package/dist/components/step-list/step-list-model.d.ts +36 -0
- package/dist/components/step-list/step-list-model.d.ts.map +1 -0
- package/dist/components/step-list/step-list-model.js +135 -0
- package/dist/components/step-list/step-list-model.js.map +1 -0
- package/dist/components/step-list/step-list.d.ts +32 -0
- package/dist/components/step-list/step-list.d.ts.map +1 -0
- package/dist/components/step-list/step-list.js +409 -0
- package/dist/components/step-list/step-list.js.map +1 -0
- package/dist/components/workflow-run-duration-label.d.ts +8 -0
- package/dist/components/workflow-run-duration-label.d.ts.map +1 -0
- package/dist/components/workflow-run-duration-label.js +84 -0
- package/dist/components/workflow-run-duration-label.js.map +1 -0
- package/dist/components/workflow-run-list/index.d.ts +2 -0
- package/dist/components/workflow-run-list/index.d.ts.map +1 -0
- package/dist/components/workflow-run-list/index.js +3 -0
- package/dist/components/workflow-run-list/index.js.map +1 -0
- package/dist/components/workflow-run-list/run-display.d.ts +5 -0
- package/dist/components/workflow-run-list/run-display.d.ts.map +1 -0
- package/dist/components/workflow-run-list/run-display.js +19 -0
- package/dist/components/workflow-run-list/run-display.js.map +1 -0
- package/dist/components/workflow-run-list/types.d.ts +21 -0
- package/dist/components/workflow-run-list/types.d.ts.map +1 -0
- package/dist/components/workflow-run-list/types.js +3 -0
- package/dist/components/workflow-run-list/types.js.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-list-content.d.ts +14 -0
- package/dist/components/workflow-run-list/workflow-run-list-content.d.ts.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-list-content.js +37 -0
- package/dist/components/workflow-run-list/workflow-run-list-content.js.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-list-header.d.ts +10 -0
- package/dist/components/workflow-run-list/workflow-run-list-header.d.ts.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-list-header.js +55 -0
- package/dist/components/workflow-run-list/workflow-run-list-header.js.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-list-states.d.ts +15 -0
- package/dist/components/workflow-run-list/workflow-run-list-states.d.ts.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-list-states.js +103 -0
- package/dist/components/workflow-run-list/workflow-run-list-states.js.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-list-view.d.ts +3 -0
- package/dist/components/workflow-run-list/workflow-run-list-view.d.ts.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-list-view.js +46 -0
- package/dist/components/workflow-run-list/workflow-run-list-view.js.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-list.d.ts +3 -0
- package/dist/components/workflow-run-list/workflow-run-list.d.ts.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-list.js +20 -0
- package/dist/components/workflow-run-list/workflow-run-list.js.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-row.d.ts +14 -0
- package/dist/components/workflow-run-list/workflow-run-row.d.ts.map +1 -0
- package/dist/components/workflow-run-list/workflow-run-row.js +172 -0
- package/dist/components/workflow-run-list/workflow-run-row.js.map +1 -0
- package/dist/components/workflow-run-summary/index.d.ts +2 -0
- package/dist/components/workflow-run-summary/index.d.ts.map +1 -0
- package/dist/components/workflow-run-summary/index.js +3 -0
- package/dist/components/workflow-run-summary/index.js.map +1 -0
- package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.d.ts +9 -0
- package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.d.ts.map +1 -0
- package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.js +138 -0
- package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.js.map +1 -0
- package/dist/components/workflow-run-summary/workflow-run-summary.d.ts +20 -0
- package/dist/components/workflow-run-summary/workflow-run-summary.d.ts.map +1 -0
- package/dist/components/workflow-run-summary/workflow-run-summary.js +252 -0
- package/dist/components/workflow-run-summary/workflow-run-summary.js.map +1 -0
- package/dist/components/workflow-run-view/agent-config-failure-callout.d.ts +7 -0
- package/dist/components/workflow-run-view/agent-config-failure-callout.d.ts.map +1 -0
- package/dist/components/workflow-run-view/agent-config-failure-callout.js +84 -0
- package/dist/components/workflow-run-view/agent-config-failure-callout.js.map +1 -0
- package/dist/components/workflow-run-view/index.d.ts +3 -0
- package/dist/components/workflow-run-view/index.d.ts.map +1 -0
- package/dist/components/workflow-run-view/index.js +4 -0
- package/dist/components/workflow-run-view/index.js.map +1 -0
- package/dist/components/workflow-run-view/job-card.d.ts +17 -0
- package/dist/components/workflow-run-view/job-card.d.ts.map +1 -0
- package/dist/components/workflow-run-view/job-card.js +476 -0
- package/dist/components/workflow-run-view/job-card.js.map +1 -0
- package/dist/components/workflow-run-view/job-execution-switcher.d.ts +10 -0
- package/dist/components/workflow-run-view/job-execution-switcher.d.ts.map +1 -0
- package/dist/components/workflow-run-view/job-execution-switcher.js +171 -0
- package/dist/components/workflow-run-view/job-execution-switcher.js.map +1 -0
- package/dist/components/workflow-run-view/job-execution-time-text.d.ts +6 -0
- package/dist/components/workflow-run-view/job-execution-time-text.d.ts.map +1 -0
- package/dist/components/workflow-run-view/job-execution-time-text.js +24 -0
- package/dist/components/workflow-run-view/job-execution-time-text.js.map +1 -0
- package/dist/components/workflow-run-view/step-attempt-log-panel.d.ts +9 -0
- package/dist/components/workflow-run-view/step-attempt-log-panel.d.ts.map +1 -0
- package/dist/components/workflow-run-view/step-attempt-log-panel.js +152 -0
- package/dist/components/workflow-run-view/step-attempt-log-panel.js.map +1 -0
- package/dist/components/workflow-run-view/workflow-run-selection.d.ts +14 -0
- package/dist/components/workflow-run-view/workflow-run-selection.d.ts.map +1 -0
- package/dist/components/workflow-run-view/workflow-run-selection.js +56 -0
- package/dist/components/workflow-run-view/workflow-run-selection.js.map +1 -0
- package/dist/components/workflow-run-view/workflow-run-states.d.ts +12 -0
- package/dist/components/workflow-run-view/workflow-run-states.d.ts.map +1 -0
- package/dist/components/workflow-run-view/workflow-run-states.js +91 -0
- package/dist/components/workflow-run-view/workflow-run-states.js.map +1 -0
- package/dist/components/workflow-run-view/workflow-run-view.d.ts +15 -0
- package/dist/components/workflow-run-view/workflow-run-view.d.ts.map +1 -0
- package/dist/components/workflow-run-view/workflow-run-view.js +285 -0
- package/dist/components/workflow-run-view/workflow-run-view.js.map +1 -0
- package/dist/components/workflow-source-panel/index.d.ts +2 -0
- package/dist/components/workflow-source-panel/index.d.ts.map +1 -0
- package/dist/components/workflow-source-panel/index.js +3 -0
- package/dist/components/workflow-source-panel/index.js.map +1 -0
- package/dist/components/workflow-source-panel/workflow-source-panel.d.ts +13 -0
- package/dist/components/workflow-source-panel/workflow-source-panel.d.ts.map +1 -0
- package/dist/components/workflow-source-panel/workflow-source-panel.js +91 -0
- package/dist/components/workflow-source-panel/workflow-source-panel.js.map +1 -0
- package/dist/components/workflow-status/status-visuals.d.ts +12 -0
- package/dist/components/workflow-status/status-visuals.d.ts.map +1 -0
- package/dist/components/workflow-status/status-visuals.js +54 -0
- package/dist/components/workflow-status/status-visuals.js.map +1 -0
- package/dist/components/workflow-status/workflow-status-icon.d.ts +22 -0
- package/dist/components/workflow-status/workflow-status-icon.d.ts.map +1 -0
- package/dist/components/workflow-status/workflow-status-icon.js +100 -0
- package/dist/components/workflow-status/workflow-status-icon.js.map +1 -0
- package/dist/core/entities/job-execution.d.ts +69 -0
- package/dist/core/entities/job-execution.d.ts.map +1 -0
- package/dist/core/entities/job-execution.js +83 -0
- package/dist/core/entities/job-execution.js.map +1 -0
- package/dist/core/entities/job.d.ts +56 -0
- package/dist/core/entities/job.d.ts.map +1 -0
- package/dist/core/entities/job.js +71 -0
- package/dist/core/entities/job.js.map +1 -0
- package/dist/core/entities/step-attempt.d.ts +49 -0
- package/dist/core/entities/step-attempt.d.ts.map +1 -0
- package/dist/core/entities/step-attempt.js +48 -0
- package/dist/core/entities/step-attempt.js.map +1 -0
- package/dist/core/entities/step.d.ts +41 -0
- package/dist/core/entities/step.d.ts.map +1 -0
- package/dist/core/entities/step.js +51 -0
- package/dist/core/entities/step.js.map +1 -0
- package/dist/core/entities/workflow-run-attempt.d.ts +44 -0
- package/dist/core/entities/workflow-run-attempt.d.ts.map +1 -0
- package/dist/core/entities/workflow-run-attempt.js +51 -0
- package/dist/core/entities/workflow-run-attempt.js.map +1 -0
- package/dist/core/entities/workflow-run.d.ts +61 -0
- package/dist/core/entities/workflow-run.d.ts.map +1 -0
- package/dist/core/entities/workflow-run.js +104 -0
- package/dist/core/entities/workflow-run.js.map +1 -0
- package/dist/core/workflow-run-url-state.d.ts +13 -0
- package/dist/core/workflow-run-url-state.d.ts.map +1 -0
- package/dist/core/workflow-run-url-state.js +43 -0
- package/dist/core/workflow-run-url-state.js.map +1 -0
- package/dist/core/workflow-run.d.ts +13 -0
- package/dist/core/workflow-run.d.ts.map +1 -0
- package/dist/core/workflow-run.js +8 -0
- package/dist/core/workflow-run.js.map +1 -0
- package/dist/env.d.js +2 -0
- package/dist/env.d.js.map +1 -0
- package/dist/feature.d.ts +20 -0
- package/dist/feature.d.ts.map +1 -0
- package/dist/feature.js +27 -0
- package/dist/feature.js.map +1 -0
- package/dist/hooks/api/workflow-runs.d.ts +109 -0
- package/dist/hooks/api/workflow-runs.d.ts.map +1 -0
- package/dist/hooks/api/workflow-runs.js +394 -0
- package/dist/hooks/api/workflow-runs.js.map +1 -0
- package/dist/index.d.ts +5 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +5 -0
- package/dist/index.js.map +1 -0
- package/dist/pages/workflow-run-first-time-use.d.ts +6 -0
- package/dist/pages/workflow-run-first-time-use.d.ts.map +1 -0
- package/dist/pages/workflow-run-first-time-use.js +17 -0
- package/dist/pages/workflow-run-first-time-use.js.map +1 -0
- package/dist/pages/workflow-run-page.d.ts +8 -0
- package/dist/pages/workflow-run-page.d.ts.map +1 -0
- package/dist/pages/workflow-run-page.js +83 -0
- package/dist/pages/workflow-run-page.js.map +1 -0
- package/dist/routes/run-detail.d.ts +8 -0
- package/dist/routes/run-detail.d.ts.map +1 -0
- package/dist/routes/run-detail.js +21 -0
- package/dist/routes/run-detail.js.map +1 -0
- package/dist/routes/runs.d.ts +8 -0
- package/dist/routes/runs.d.ts.map +1 -0
- package/dist/routes/runs.js +20 -0
- package/dist/routes/runs.js.map +1 -0
- package/dist/tsconfig.test.tsbuildinfo +1 -0
- package/package.json +114 -0
- package/src/components/identifier/identifier.tsx +178 -0
- package/src/components/identifier/index.ts +1 -0
- package/src/components/job-graph/graph-model.test.ts +189 -0
- package/src/components/job-graph/graph-model.ts +178 -0
- package/src/components/job-graph/index.ts +2 -0
- package/src/components/job-graph/job-duration-format.ts +54 -0
- package/src/components/job-graph/job-duration-label.tsx +29 -0
- package/src/components/job-graph/job-graph-content.tsx +225 -0
- package/src/components/job-graph/job-graph-view.test.tsx +298 -0
- package/src/components/job-graph/job-graph-view.tsx +45 -0
- package/src/components/job-graph/job-graph.stories.tsx +182 -0
- package/src/components/job-graph/job-graph.tsx +24 -0
- package/src/components/job-graph/job-node.stories.tsx +364 -0
- package/src/components/job-graph/job-node.test.tsx +347 -0
- package/src/components/job-graph/job-node.tsx +202 -0
- package/src/components/job-graph/types.ts +9 -0
- package/src/components/step-list/index.ts +6 -0
- package/src/components/step-list/step-list-model.test.ts +369 -0
- package/src/components/step-list/step-list-model.ts +205 -0
- package/src/components/step-list/step-list.stories.tsx +419 -0
- package/src/components/step-list/step-list.test.tsx +566 -0
- package/src/components/step-list/step-list.tsx +494 -0
- package/src/components/workflow-run-duration-label.tsx +118 -0
- package/src/components/workflow-run-list/index.ts +1 -0
- package/src/components/workflow-run-list/run-display.test.ts +53 -0
- package/src/components/workflow-run-list/run-display.ts +22 -0
- package/src/components/workflow-run-list/types.ts +22 -0
- package/src/components/workflow-run-list/workflow-run-list-content.tsx +58 -0
- package/src/components/workflow-run-list/workflow-run-list-header.tsx +53 -0
- package/src/components/workflow-run-list/workflow-run-list-states.tsx +86 -0
- package/src/components/workflow-run-list/workflow-run-list-view.test.tsx +178 -0
- package/src/components/workflow-run-list/workflow-run-list-view.tsx +57 -0
- package/src/components/workflow-run-list/workflow-run-list.stories.tsx +111 -0
- package/src/components/workflow-run-list/workflow-run-list.tsx +29 -0
- package/src/components/workflow-run-list/workflow-run-row.tsx +176 -0
- package/src/components/workflow-run-summary/index.ts +1 -0
- package/src/components/workflow-run-summary/workflow-run-attempt-switcher.test.tsx +230 -0
- package/src/components/workflow-run-summary/workflow-run-attempt-switcher.tsx +146 -0
- package/src/components/workflow-run-summary/workflow-run-summary.stories.tsx +414 -0
- package/src/components/workflow-run-summary/workflow-run-summary.test.tsx +354 -0
- package/src/components/workflow-run-summary/workflow-run-summary.tsx +295 -0
- package/src/components/workflow-run-view/agent-config-failure-callout.stories.tsx +140 -0
- package/src/components/workflow-run-view/agent-config-failure-callout.tsx +93 -0
- package/src/components/workflow-run-view/index.ts +2 -0
- package/src/components/workflow-run-view/job-card.stories.tsx +788 -0
- package/src/components/workflow-run-view/job-card.tsx +566 -0
- package/src/components/workflow-run-view/job-execution-switcher.tsx +170 -0
- package/src/components/workflow-run-view/job-execution-time-text.tsx +34 -0
- package/src/components/workflow-run-view/step-attempt-log-panel.test.tsx +290 -0
- package/src/components/workflow-run-view/step-attempt-log-panel.tsx +152 -0
- package/src/components/workflow-run-view/workflow-run-selection.test.ts +280 -0
- package/src/components/workflow-run-view/workflow-run-selection.ts +89 -0
- package/src/components/workflow-run-view/workflow-run-states.tsx +70 -0
- package/src/components/workflow-run-view/workflow-run-view.test.tsx +1214 -0
- package/src/components/workflow-run-view/workflow-run-view.tsx +341 -0
- package/src/components/workflow-source-panel/index.ts +1 -0
- package/src/components/workflow-source-panel/workflow-source-panel.stories.tsx +110 -0
- package/src/components/workflow-source-panel/workflow-source-panel.test.tsx +96 -0
- package/src/components/workflow-source-panel/workflow-source-panel.tsx +136 -0
- package/src/components/workflow-status/status-visuals.test.ts +38 -0
- package/src/components/workflow-status/status-visuals.ts +36 -0
- package/src/components/workflow-status/workflow-status-icon.stories.tsx +90 -0
- package/src/components/workflow-status/workflow-status-icon.tsx +135 -0
- package/src/core/entities/job-execution.ts +139 -0
- package/src/core/entities/job.ts +149 -0
- package/src/core/entities/step-attempt.ts +89 -0
- package/src/core/entities/step.ts +105 -0
- package/src/core/entities/workflow-run-attempt.ts +87 -0
- package/src/core/entities/workflow-run.ts +183 -0
- package/src/core/workflow-run-url-state.ts +61 -0
- package/src/core/workflow-run.test.ts +640 -0
- package/src/core/workflow-run.ts +66 -0
- package/src/env.d.ts +8 -0
- package/src/feature.ts +26 -0
- package/src/hooks/api/workflow-runs.test.tsx +410 -0
- package/src/hooks/api/workflow-runs.ts +485 -0
- package/src/index.ts +45 -0
- package/src/page-harness-budget.test.ts +33 -0
- package/src/pages/workflow-run-first-time-use.tsx +17 -0
- package/src/pages/workflow-run-page.test.tsx +517 -0
- package/src/pages/workflow-run-page.tsx +89 -0
- package/src/routes/run-detail.tsx +15 -0
- package/src/routes/runs.tsx +11 -0
- package/test/fixtures/logs.ts +13 -0
- package/test/fixtures/workflow-run.ts +311 -0
- package/test/pages.tsx +79 -0
- package/test/render.tsx +40 -0
- package/test/setup.ts +3 -0
- package/tsconfig.build.json +9 -0
- package/tsconfig.build.tsbuildinfo +1 -0
- package/tsconfig.json +3 -0
- package/tsconfig.test.json +8 -0
- package/vercel.json +8 -0
- package/vitest.config.ts +70 -0
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
import type { QueryLoadErrorQuery } from '@shipfox/client-ui';
|
|
2
|
+
import type { WorkflowRunListItem } from '#core/workflow-run.js';
|
|
3
|
+
export type WorkflowRunListStatusFilter = 'all' | 'failed' | 'running';
|
|
4
|
+
export interface WorkflowRunListProps {
|
|
5
|
+
workspaceId: string;
|
|
6
|
+
projectId: string;
|
|
7
|
+
selectedWorkflowRunId?: string | undefined;
|
|
8
|
+
className?: string | undefined;
|
|
9
|
+
}
|
|
10
|
+
export type WorkflowRunListQuery = QueryLoadErrorQuery & {
|
|
11
|
+
isPending: boolean;
|
|
12
|
+
};
|
|
13
|
+
export interface WorkflowRunListViewProps {
|
|
14
|
+
runs: WorkflowRunListItem[];
|
|
15
|
+
query: WorkflowRunListQuery;
|
|
16
|
+
workspaceId: string;
|
|
17
|
+
projectId: string;
|
|
18
|
+
selectedWorkflowRunId?: string | undefined;
|
|
19
|
+
className?: string | undefined;
|
|
20
|
+
}
|
|
21
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-list/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAC5D,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAE/D,MAAM,MAAM,2BAA2B,GAAG,KAAK,GAAG,QAAQ,GAAG,SAAS,CAAC;AAEvE,MAAM,WAAW,oBAAoB;IACnC,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC;AAED,MAAM,MAAM,oBAAoB,GAAG,mBAAmB,GAAG;IAAC,SAAS,EAAE,OAAO,CAAA;CAAC,CAAC;AAE9E,MAAM,WAAW,wBAAwB;IACvC,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,KAAK,EAAE,oBAAoB,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,SAAS,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/workflow-run-list/types.ts"],"sourcesContent":["import type {QueryLoadErrorQuery} from '@shipfox/client-ui';\nimport type {WorkflowRunListItem} from '#core/workflow-run.js';\n\nexport type WorkflowRunListStatusFilter = 'all' | 'failed' | 'running';\n\nexport interface WorkflowRunListProps {\n workspaceId: string;\n projectId: string;\n selectedWorkflowRunId?: string | undefined;\n className?: string | undefined;\n}\n\nexport type WorkflowRunListQuery = QueryLoadErrorQuery & {isPending: boolean};\n\nexport interface WorkflowRunListViewProps {\n runs: WorkflowRunListItem[];\n query: WorkflowRunListQuery;\n workspaceId: string;\n projectId: string;\n selectedWorkflowRunId?: string | undefined;\n className?: string | undefined;\n}\n"],"names":[],"mappings":"AAcA,WAOC"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WorkflowRunListItem } from '#core/workflow-run.js';
|
|
2
|
+
import type { WorkflowRunListQuery } from './types.js';
|
|
3
|
+
interface WorkflowRunListContentProps {
|
|
4
|
+
query: WorkflowRunListQuery;
|
|
5
|
+
totalRuns: number;
|
|
6
|
+
runs: WorkflowRunListItem[];
|
|
7
|
+
workspaceId: string;
|
|
8
|
+
projectId: string;
|
|
9
|
+
selectedWorkflowRunId?: string | undefined;
|
|
10
|
+
onClearFilters: () => void;
|
|
11
|
+
}
|
|
12
|
+
export declare function WorkflowRunListContent({ query, totalRuns, runs, workspaceId, projectId, selectedWorkflowRunId, onClearFilters, }: WorkflowRunListContentProps): import("react").JSX.Element;
|
|
13
|
+
export {};
|
|
14
|
+
//# sourceMappingURL=workflow-run-list-content.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-run-list-content.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-list/workflow-run-list-content.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAC/D,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,YAAY,CAAC;AASrD,UAAU,2BAA2B;IACnC,KAAK,EAAE,oBAAoB,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3C,cAAc,EAAE,MAAM,IAAI,CAAC;CAC5B;AAED,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,SAAS,EACT,IAAI,EACJ,WAAW,EACX,SAAS,EACT,qBAAqB,EACrB,cAAc,GACf,EAAE,2BAA2B,+BA4B7B"}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { QueryLoadError } from '@shipfox/client-ui';
|
|
3
|
+
import { WorkflowRunListEmpty, WorkflowRunListNoMatches, WorkflowRunListSkeleton, WorkflowRunListStaleError } from './workflow-run-list-states.js';
|
|
4
|
+
import { WorkflowRunRowList } from './workflow-run-row.js';
|
|
5
|
+
export function WorkflowRunListContent({ query, totalRuns, runs, workspaceId, projectId, selectedWorkflowRunId, onClearFilters }) {
|
|
6
|
+
const { isPending, isError } = query;
|
|
7
|
+
// A refetch that fails after a prior success keeps the rows on screen behind a slim
|
|
8
|
+
// banner. QueryLoadError owns the inverse case (errored before anything loaded) and
|
|
9
|
+
// self-gates to nothing here once data exists.
|
|
10
|
+
const refreshFailed = isError && query.data !== undefined;
|
|
11
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
12
|
+
className: "min-h-0 flex-1 overflow-y-auto",
|
|
13
|
+
children: [
|
|
14
|
+
isPending ? /*#__PURE__*/ _jsx(WorkflowRunListSkeleton, {}) : null,
|
|
15
|
+
!isPending ? /*#__PURE__*/ _jsx(QueryLoadError, {
|
|
16
|
+
query: query,
|
|
17
|
+
subject: "workflow runs",
|
|
18
|
+
icon: "pulseLine"
|
|
19
|
+
}) : null,
|
|
20
|
+
!isPending && refreshFailed ? /*#__PURE__*/ _jsx(WorkflowRunListStaleError, {
|
|
21
|
+
query: query
|
|
22
|
+
}) : null,
|
|
23
|
+
!isPending && !isError && totalRuns === 0 ? /*#__PURE__*/ _jsx(WorkflowRunListEmpty, {}) : null,
|
|
24
|
+
!isPending && totalRuns > 0 && runs.length === 0 ? /*#__PURE__*/ _jsx(WorkflowRunListNoMatches, {
|
|
25
|
+
onClear: onClearFilters
|
|
26
|
+
}) : null,
|
|
27
|
+
!isPending && runs.length > 0 ? /*#__PURE__*/ _jsx(WorkflowRunRowList, {
|
|
28
|
+
runs: runs,
|
|
29
|
+
workspaceId: workspaceId,
|
|
30
|
+
projectId: projectId,
|
|
31
|
+
selectedWorkflowRunId: selectedWorkflowRunId
|
|
32
|
+
}) : null
|
|
33
|
+
]
|
|
34
|
+
});
|
|
35
|
+
}
|
|
36
|
+
|
|
37
|
+
//# sourceMappingURL=workflow-run-list-content.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-list-content.tsx"],"sourcesContent":["import {QueryLoadError} from '@shipfox/client-ui';\nimport type {WorkflowRunListItem} from '#core/workflow-run.js';\nimport type {WorkflowRunListQuery} from './types.js';\nimport {\n WorkflowRunListEmpty,\n WorkflowRunListNoMatches,\n WorkflowRunListSkeleton,\n WorkflowRunListStaleError,\n} from './workflow-run-list-states.js';\nimport {WorkflowRunRowList} from './workflow-run-row.js';\n\ninterface WorkflowRunListContentProps {\n query: WorkflowRunListQuery;\n totalRuns: number;\n runs: WorkflowRunListItem[];\n workspaceId: string;\n projectId: string;\n selectedWorkflowRunId?: string | undefined;\n onClearFilters: () => void;\n}\n\nexport function WorkflowRunListContent({\n query,\n totalRuns,\n runs,\n workspaceId,\n projectId,\n selectedWorkflowRunId,\n onClearFilters,\n}: WorkflowRunListContentProps) {\n const {isPending, isError} = query;\n // A refetch that fails after a prior success keeps the rows on screen behind a slim\n // banner. QueryLoadError owns the inverse case (errored before anything loaded) and\n // self-gates to nothing here once data exists.\n const refreshFailed = isError && query.data !== undefined;\n\n return (\n <div className=\"min-h-0 flex-1 overflow-y-auto\">\n {isPending ? <WorkflowRunListSkeleton /> : null}\n {!isPending ? (\n <QueryLoadError query={query} subject=\"workflow runs\" icon=\"pulseLine\" />\n ) : null}\n {!isPending && refreshFailed ? <WorkflowRunListStaleError query={query} /> : null}\n {!isPending && !isError && totalRuns === 0 ? <WorkflowRunListEmpty /> : null}\n {!isPending && totalRuns > 0 && runs.length === 0 ? (\n <WorkflowRunListNoMatches onClear={onClearFilters} />\n ) : null}\n {!isPending && runs.length > 0 ? (\n <WorkflowRunRowList\n runs={runs}\n workspaceId={workspaceId}\n projectId={projectId}\n selectedWorkflowRunId={selectedWorkflowRunId}\n />\n ) : null}\n </div>\n );\n}\n"],"names":["QueryLoadError","WorkflowRunListEmpty","WorkflowRunListNoMatches","WorkflowRunListSkeleton","WorkflowRunListStaleError","WorkflowRunRowList","WorkflowRunListContent","query","totalRuns","runs","workspaceId","projectId","selectedWorkflowRunId","onClearFilters","isPending","isError","refreshFailed","data","undefined","div","className","subject","icon","length","onClear"],"mappings":";AAAA,SAAQA,cAAc,QAAO,qBAAqB;AAGlD,SACEC,oBAAoB,EACpBC,wBAAwB,EACxBC,uBAAuB,EACvBC,yBAAyB,QACpB,gCAAgC;AACvC,SAAQC,kBAAkB,QAAO,wBAAwB;AAYzD,OAAO,SAASC,uBAAuB,EACrCC,KAAK,EACLC,SAAS,EACTC,IAAI,EACJC,WAAW,EACXC,SAAS,EACTC,qBAAqB,EACrBC,cAAc,EACc;IAC5B,MAAM,EAACC,SAAS,EAAEC,OAAO,EAAC,GAAGR;IAC7B,oFAAoF;IACpF,oFAAoF;IACpF,+CAA+C;IAC/C,MAAMS,gBAAgBD,WAAWR,MAAMU,IAAI,KAAKC;IAEhD,qBACE,MAACC;QAAIC,WAAU;;YACZN,0BAAY,KAACX,+BAA6B;YAC1C,CAACW,0BACA,KAACd;gBAAeO,OAAOA;gBAAOc,SAAQ;gBAAgBC,MAAK;iBACzD;YACH,CAACR,aAAaE,8BAAgB,KAACZ;gBAA0BG,OAAOA;iBAAY;YAC5E,CAACO,aAAa,CAACC,WAAWP,cAAc,kBAAI,KAACP,4BAA0B;YACvE,CAACa,aAAaN,YAAY,KAAKC,KAAKc,MAAM,KAAK,kBAC9C,KAACrB;gBAAyBsB,SAASX;iBACjC;YACH,CAACC,aAAaL,KAAKc,MAAM,GAAG,kBAC3B,KAAClB;gBACCI,MAAMA;gBACNC,aAAaA;gBACbC,WAAWA;gBACXC,uBAAuBA;iBAEvB;;;AAGV"}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { WorkflowRunListStatusFilter } from './types.js';
|
|
2
|
+
interface WorkflowRunListHeaderProps {
|
|
3
|
+
query: string;
|
|
4
|
+
onQueryChange: (value: string) => void;
|
|
5
|
+
statusFilter: WorkflowRunListStatusFilter;
|
|
6
|
+
onStatusFilterChange: (value: WorkflowRunListStatusFilter) => void;
|
|
7
|
+
}
|
|
8
|
+
export declare function WorkflowRunListHeader({ query, onQueryChange, statusFilter, onStatusFilterChange, }: WorkflowRunListHeaderProps): import("react").JSX.Element;
|
|
9
|
+
export {};
|
|
10
|
+
//# sourceMappingURL=workflow-run-list-header.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-run-list-header.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-list/workflow-run-list-header.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,2BAA2B,EAAC,MAAM,YAAY,CAAC;AAQ5D,UAAU,0BAA0B;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,CAAC,KAAK,EAAE,MAAM,KAAK,IAAI,CAAC;IACvC,YAAY,EAAE,2BAA2B,CAAC;IAC1C,oBAAoB,EAAE,CAAC,KAAK,EAAE,2BAA2B,KAAK,IAAI,CAAC;CACpE;AAED,wBAAgB,qBAAqB,CAAC,EACpC,KAAK,EACL,aAAa,EACb,YAAY,EACZ,oBAAoB,GACrB,EAAE,0BAA0B,+BA6B5B"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '@shipfox/react-ui/button';
|
|
3
|
+
import { Icon } from '@shipfox/react-ui/icon';
|
|
4
|
+
import { Input } from '@shipfox/react-ui/input';
|
|
5
|
+
const STATUS_FILTERS = [
|
|
6
|
+
{
|
|
7
|
+
value: 'all',
|
|
8
|
+
label: 'All'
|
|
9
|
+
},
|
|
10
|
+
{
|
|
11
|
+
value: 'failed',
|
|
12
|
+
label: 'Failed'
|
|
13
|
+
},
|
|
14
|
+
{
|
|
15
|
+
value: 'running',
|
|
16
|
+
label: 'Running'
|
|
17
|
+
}
|
|
18
|
+
];
|
|
19
|
+
export function WorkflowRunListHeader({ query, onQueryChange, statusFilter, onStatusFilterChange }) {
|
|
20
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
21
|
+
className: "flex flex-col gap-8 border-b border-border-neutral-base px-12 py-12",
|
|
22
|
+
children: [
|
|
23
|
+
/*#__PURE__*/ _jsx(Input, {
|
|
24
|
+
value: query,
|
|
25
|
+
onChange: (event)=>onQueryChange(event.target.value),
|
|
26
|
+
placeholder: "Run id or trigger...",
|
|
27
|
+
"aria-label": "Search runs",
|
|
28
|
+
size: "small",
|
|
29
|
+
iconLeft: /*#__PURE__*/ _jsx(Icon, {
|
|
30
|
+
name: "searchLine",
|
|
31
|
+
className: "size-14 text-foreground-neutral-muted"
|
|
32
|
+
})
|
|
33
|
+
}),
|
|
34
|
+
/*#__PURE__*/ _jsxs("fieldset", {
|
|
35
|
+
className: "flex items-center gap-8",
|
|
36
|
+
children: [
|
|
37
|
+
/*#__PURE__*/ _jsx("legend", {
|
|
38
|
+
className: "sr-only",
|
|
39
|
+
children: "Run status filter"
|
|
40
|
+
}),
|
|
41
|
+
STATUS_FILTERS.map((filter)=>/*#__PURE__*/ _jsx(Button, {
|
|
42
|
+
type: "button",
|
|
43
|
+
size: "2xs",
|
|
44
|
+
variant: statusFilter === filter.value ? 'primary' : 'transparent',
|
|
45
|
+
"aria-pressed": statusFilter === filter.value,
|
|
46
|
+
onClick: ()=>onStatusFilterChange(filter.value),
|
|
47
|
+
children: filter.label
|
|
48
|
+
}, filter.value))
|
|
49
|
+
]
|
|
50
|
+
})
|
|
51
|
+
]
|
|
52
|
+
});
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
//# sourceMappingURL=workflow-run-list-header.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-list-header.tsx"],"sourcesContent":["import {Button} from '@shipfox/react-ui/button';\nimport {Icon} from '@shipfox/react-ui/icon';\nimport {Input} from '@shipfox/react-ui/input';\nimport type {WorkflowRunListStatusFilter} from './types.js';\n\nconst STATUS_FILTERS: Array<{value: WorkflowRunListStatusFilter; label: string}> = [\n {value: 'all', label: 'All'},\n {value: 'failed', label: 'Failed'},\n {value: 'running', label: 'Running'},\n];\n\ninterface WorkflowRunListHeaderProps {\n query: string;\n onQueryChange: (value: string) => void;\n statusFilter: WorkflowRunListStatusFilter;\n onStatusFilterChange: (value: WorkflowRunListStatusFilter) => void;\n}\n\nexport function WorkflowRunListHeader({\n query,\n onQueryChange,\n statusFilter,\n onStatusFilterChange,\n}: WorkflowRunListHeaderProps) {\n return (\n <div className=\"flex flex-col gap-8 border-b border-border-neutral-base px-12 py-12\">\n <Input\n value={query}\n onChange={(event) => onQueryChange(event.target.value)}\n placeholder=\"Run id or trigger...\"\n aria-label=\"Search runs\"\n size=\"small\"\n iconLeft={<Icon name=\"searchLine\" className=\"size-14 text-foreground-neutral-muted\" />}\n />\n\n <fieldset className=\"flex items-center gap-8\">\n <legend className=\"sr-only\">Run status filter</legend>\n {STATUS_FILTERS.map((filter) => (\n <Button\n key={filter.value}\n type=\"button\"\n size=\"2xs\"\n variant={statusFilter === filter.value ? 'primary' : 'transparent'}\n aria-pressed={statusFilter === filter.value}\n onClick={() => onStatusFilterChange(filter.value)}\n >\n {filter.label}\n </Button>\n ))}\n </fieldset>\n </div>\n );\n}\n"],"names":["Button","Icon","Input","STATUS_FILTERS","value","label","WorkflowRunListHeader","query","onQueryChange","statusFilter","onStatusFilterChange","div","className","onChange","event","target","placeholder","aria-label","size","iconLeft","name","fieldset","legend","map","filter","type","variant","aria-pressed","onClick"],"mappings":";AAAA,SAAQA,MAAM,QAAO,2BAA2B;AAChD,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SAAQC,KAAK,QAAO,0BAA0B;AAG9C,MAAMC,iBAA6E;IACjF;QAACC,OAAO;QAAOC,OAAO;IAAK;IAC3B;QAACD,OAAO;QAAUC,OAAO;IAAQ;IACjC;QAACD,OAAO;QAAWC,OAAO;IAAS;CACpC;AASD,OAAO,SAASC,sBAAsB,EACpCC,KAAK,EACLC,aAAa,EACbC,YAAY,EACZC,oBAAoB,EACO;IAC3B,qBACE,MAACC;QAAIC,WAAU;;0BACb,KAACV;gBACCE,OAAOG;gBACPM,UAAU,CAACC,QAAUN,cAAcM,MAAMC,MAAM,CAACX,KAAK;gBACrDY,aAAY;gBACZC,cAAW;gBACXC,MAAK;gBACLC,wBAAU,KAAClB;oBAAKmB,MAAK;oBAAaR,WAAU;;;0BAG9C,MAACS;gBAAST,WAAU;;kCAClB,KAACU;wBAAOV,WAAU;kCAAU;;oBAC3BT,eAAeoB,GAAG,CAAC,CAACC,uBACnB,KAACxB;4BAECyB,MAAK;4BACLP,MAAK;4BACLQ,SAASjB,iBAAiBe,OAAOpB,KAAK,GAAG,YAAY;4BACrDuB,gBAAclB,iBAAiBe,OAAOpB,KAAK;4BAC3CwB,SAAS,IAAMlB,qBAAqBc,OAAOpB,KAAK;sCAE/CoB,OAAOnB,KAAK;2BAPRmB,OAAOpB,KAAK;;;;;AAa7B"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
import type { QueryLoadErrorQuery } from '@shipfox/client-ui';
|
|
2
|
+
export declare function WorkflowRunListSkeleton(): import("react").JSX.Element;
|
|
3
|
+
/**
|
|
4
|
+
* Slim non-blocking banner shown when a background refetch fails after a prior success,
|
|
5
|
+
* so the already-loaded rows stay on screen with the retry inline rather than being
|
|
6
|
+
* replaced by a full-placeholder error.
|
|
7
|
+
*/
|
|
8
|
+
export declare function WorkflowRunListStaleError({ query }: {
|
|
9
|
+
query: QueryLoadErrorQuery;
|
|
10
|
+
}): import("react").JSX.Element;
|
|
11
|
+
export declare function WorkflowRunListEmpty(): import("react").JSX.Element;
|
|
12
|
+
export declare function WorkflowRunListNoMatches({ onClear }: {
|
|
13
|
+
onClear: () => void;
|
|
14
|
+
}): import("react").JSX.Element;
|
|
15
|
+
//# sourceMappingURL=workflow-run-list-states.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-run-list-states.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-list/workflow-run-list-states.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAO5D,wBAAgB,uBAAuB,gCAqBtC;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,EAAC,KAAK,EAAC,EAAE;IAAC,KAAK,EAAE,mBAAmB,CAAA;CAAC,+BAqB9E;AAED,wBAAgB,oBAAoB,gCAUnC;AAED,wBAAgB,wBAAwB,CAAC,EAAC,OAAO,EAAC,EAAE;IAAC,OAAO,EAAE,MAAM,IAAI,CAAA;CAAC,+BAexE"}
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { Button } from '@shipfox/react-ui/button';
|
|
3
|
+
import { Callout } from '@shipfox/react-ui/callout';
|
|
4
|
+
import { EmptyState } from '@shipfox/react-ui/empty-state';
|
|
5
|
+
import { Skeleton } from '@shipfox/react-ui/skeleton';
|
|
6
|
+
import { Text } from '@shipfox/react-ui/typography';
|
|
7
|
+
export function WorkflowRunListSkeleton() {
|
|
8
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
9
|
+
className: "flex flex-col gap-4 p-8",
|
|
10
|
+
role: "status",
|
|
11
|
+
"aria-label": "Loading runs",
|
|
12
|
+
children: Array.from({
|
|
13
|
+
length: 6
|
|
14
|
+
}).map((_, index)=>/*#__PURE__*/ _jsxs("div", {
|
|
15
|
+
className: "flex flex-col gap-3 rounded-8 border border-transparent px-10 py-7",
|
|
16
|
+
children: [
|
|
17
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
18
|
+
className: "flex h-20 items-center gap-7",
|
|
19
|
+
children: [
|
|
20
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
21
|
+
className: "size-6 shrink-0 rounded-full"
|
|
22
|
+
}),
|
|
23
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
24
|
+
className: "h-12 w-1/3"
|
|
25
|
+
})
|
|
26
|
+
]
|
|
27
|
+
}),
|
|
28
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
29
|
+
className: "flex h-20 items-center gap-6 pl-13",
|
|
30
|
+
children: [
|
|
31
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
32
|
+
className: "h-12 flex-1"
|
|
33
|
+
}),
|
|
34
|
+
/*#__PURE__*/ _jsx(Skeleton, {
|
|
35
|
+
className: "h-12 w-40"
|
|
36
|
+
})
|
|
37
|
+
]
|
|
38
|
+
})
|
|
39
|
+
]
|
|
40
|
+
}, index))
|
|
41
|
+
});
|
|
42
|
+
}
|
|
43
|
+
/**
|
|
44
|
+
* Slim non-blocking banner shown when a background refetch fails after a prior success,
|
|
45
|
+
* so the already-loaded rows stay on screen with the retry inline rather than being
|
|
46
|
+
* replaced by a full-placeholder error.
|
|
47
|
+
*/ export function WorkflowRunListStaleError({ query }) {
|
|
48
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
49
|
+
className: "border-b border-border-neutral-base p-8",
|
|
50
|
+
children: /*#__PURE__*/ _jsx(Callout, {
|
|
51
|
+
role: "alert",
|
|
52
|
+
type: "error",
|
|
53
|
+
children: /*#__PURE__*/ _jsxs("div", {
|
|
54
|
+
className: "flex items-center justify-between gap-8",
|
|
55
|
+
children: [
|
|
56
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
57
|
+
size: "xs",
|
|
58
|
+
children: "Could not refresh workflow runs."
|
|
59
|
+
}),
|
|
60
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
61
|
+
type: "button",
|
|
62
|
+
size: "2xs",
|
|
63
|
+
variant: "secondary",
|
|
64
|
+
isLoading: query.isFetching,
|
|
65
|
+
onClick: ()=>{
|
|
66
|
+
void query.refetch();
|
|
67
|
+
},
|
|
68
|
+
children: "Retry"
|
|
69
|
+
})
|
|
70
|
+
]
|
|
71
|
+
})
|
|
72
|
+
})
|
|
73
|
+
});
|
|
74
|
+
}
|
|
75
|
+
export function WorkflowRunListEmpty() {
|
|
76
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
77
|
+
className: "p-16",
|
|
78
|
+
children: /*#__PURE__*/ _jsx(EmptyState, {
|
|
79
|
+
icon: "pulseLine",
|
|
80
|
+
title: "No runs yet",
|
|
81
|
+
description: "Runs from this project's workflows will appear here as soon as one is launched."
|
|
82
|
+
})
|
|
83
|
+
});
|
|
84
|
+
}
|
|
85
|
+
export function WorkflowRunListNoMatches({ onClear }) {
|
|
86
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
87
|
+
className: "p-16",
|
|
88
|
+
children: /*#__PURE__*/ _jsx(EmptyState, {
|
|
89
|
+
icon: "filterOffLine",
|
|
90
|
+
title: "No matching runs",
|
|
91
|
+
description: "No runs match your current search or status filter.",
|
|
92
|
+
action: /*#__PURE__*/ _jsx(Button, {
|
|
93
|
+
type: "button",
|
|
94
|
+
size: "sm",
|
|
95
|
+
variant: "secondary",
|
|
96
|
+
onClick: onClear,
|
|
97
|
+
children: "Clear filters"
|
|
98
|
+
})
|
|
99
|
+
})
|
|
100
|
+
});
|
|
101
|
+
}
|
|
102
|
+
|
|
103
|
+
//# sourceMappingURL=workflow-run-list-states.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-list-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 WorkflowRunListSkeleton() {\n return (\n <div className=\"flex flex-col gap-4 p-8\" role=\"status\" aria-label=\"Loading runs\">\n {Array.from({length: 6}).map((_, index) => (\n <div\n // biome-ignore lint/suspicious/noArrayIndexKey: skeleton row, stable position\n key={index}\n className=\"flex flex-col gap-3 rounded-8 border border-transparent px-10 py-7\"\n >\n <div className=\"flex h-20 items-center gap-7\">\n <Skeleton className=\"size-6 shrink-0 rounded-full\" />\n <Skeleton className=\"h-12 w-1/3\" />\n </div>\n <div className=\"flex h-20 items-center gap-6 pl-13\">\n <Skeleton className=\"h-12 flex-1\" />\n <Skeleton className=\"h-12 w-40\" />\n </div>\n </div>\n ))}\n </div>\n );\n}\n\n/**\n * Slim non-blocking banner shown when a background refetch fails after a prior success,\n * so the already-loaded rows stay on screen with the retry inline rather than being\n * replaced by a full-placeholder error.\n */\nexport function WorkflowRunListStaleError({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 workflow runs.</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\nexport function WorkflowRunListEmpty() {\n return (\n <div className=\"p-16\">\n <EmptyState\n icon=\"pulseLine\"\n title=\"No runs yet\"\n description=\"Runs from this project's workflows will appear here as soon as one is launched.\"\n />\n </div>\n );\n}\n\nexport function WorkflowRunListNoMatches({onClear}: {onClear: () => void}) {\n return (\n <div className=\"p-16\">\n <EmptyState\n icon=\"filterOffLine\"\n title=\"No matching runs\"\n description=\"No runs match your current search or status filter.\"\n action={\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" onClick={onClear}>\n Clear filters\n </Button>\n }\n />\n </div>\n );\n}\n"],"names":["Button","Callout","EmptyState","Skeleton","Text","WorkflowRunListSkeleton","div","className","role","aria-label","Array","from","length","map","_","index","WorkflowRunListStaleError","query","type","size","variant","isLoading","isFetching","onClick","refetch","WorkflowRunListEmpty","icon","title","description","WorkflowRunListNoMatches","onClear","action"],"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;QAAIC,WAAU;QAA0BC,MAAK;QAASC,cAAW;kBAC/DC,MAAMC,IAAI,CAAC;YAACC,QAAQ;QAAC,GAAGC,GAAG,CAAC,CAACC,GAAGC,sBAC/B,MAACT;gBAGCC,WAAU;;kCAEV,MAACD;wBAAIC,WAAU;;0CACb,KAACJ;gCAASI,WAAU;;0CACpB,KAACJ;gCAASI,WAAU;;;;kCAEtB,MAACD;wBAAIC,WAAU;;0CACb,KAACJ;gCAASI,WAAU;;0CACpB,KAACJ;gCAASI,WAAU;;;;;eATjBQ;;AAef;AAEA;;;;CAIC,GACD,OAAO,SAASC,0BAA0B,EAACC,KAAK,EAA+B;IAC7E,qBACE,KAACX;QAAIC,WAAU;kBACb,cAAA,KAACN;YAAQO,MAAK;YAAQU,MAAK;sBACzB,cAAA,MAACZ;gBAAIC,WAAU;;kCACb,KAACH;wBAAKe,MAAK;kCAAK;;kCAChB,KAACnB;wBACCkB,MAAK;wBACLC,MAAK;wBACLC,SAAQ;wBACRC,WAAWJ,MAAMK,UAAU;wBAC3BC,SAAS;4BACP,KAAKN,MAAMO,OAAO;wBACpB;kCACD;;;;;;AAOX;AAEA,OAAO,SAASC;IACd,qBACE,KAACnB;QAAIC,WAAU;kBACb,cAAA,KAACL;YACCwB,MAAK;YACLC,OAAM;YACNC,aAAY;;;AAIpB;AAEA,OAAO,SAASC,yBAAyB,EAACC,OAAO,EAAwB;IACvE,qBACE,KAACxB;QAAIC,WAAU;kBACb,cAAA,KAACL;YACCwB,MAAK;YACLC,OAAM;YACNC,aAAY;YACZG,sBACE,KAAC/B;gBAAOkB,MAAK;gBAASC,MAAK;gBAAKC,SAAQ;gBAAYG,SAASO;0BAAS;;;;AAOhF"}
|
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
import type { WorkflowRunListViewProps } from './types.js';
|
|
2
|
+
export declare function WorkflowRunListView({ runs, query, workspaceId, projectId, selectedWorkflowRunId, className, }: WorkflowRunListViewProps): import("react").JSX.Element;
|
|
3
|
+
//# sourceMappingURL=workflow-run-list-view.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-run-list-view.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-list/workflow-run-list-view.tsx"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAA8B,wBAAwB,EAAC,MAAM,YAAY,CAAC;AAItF,wBAAgB,mBAAmB,CAAC,EAClC,IAAI,EACJ,KAAK,EACL,WAAW,EACX,SAAS,EACT,qBAAqB,EACrB,SAAS,GACV,EAAE,wBAAwB,+BAyC1B"}
|
|
@@ -0,0 +1,46 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
2
|
+
import { TimeTickerProvider } from '@shipfox/react-ui/time-ticker';
|
|
3
|
+
import { cn } from '@shipfox/react-ui/utils';
|
|
4
|
+
import { useState } from 'react';
|
|
5
|
+
import { runMatchesSearch, runMatchesStatusFilter } from './run-display.js';
|
|
6
|
+
import { WorkflowRunListContent } from './workflow-run-list-content.js';
|
|
7
|
+
import { WorkflowRunListHeader } from './workflow-run-list-header.js';
|
|
8
|
+
export function WorkflowRunListView({ runs, query, workspaceId, projectId, selectedWorkflowRunId, className }) {
|
|
9
|
+
const [search, setSearch] = useState('');
|
|
10
|
+
const [statusFilter, setStatusFilter] = useState('all');
|
|
11
|
+
const filteredRuns = runs.filter((run)=>{
|
|
12
|
+
if (!runMatchesStatusFilter(run.status, statusFilter)) return false;
|
|
13
|
+
return runMatchesSearch(run, search);
|
|
14
|
+
});
|
|
15
|
+
function handleClearFilters() {
|
|
16
|
+
setSearch('');
|
|
17
|
+
setStatusFilter('all');
|
|
18
|
+
}
|
|
19
|
+
return /*#__PURE__*/ _jsx(TimeTickerProvider, {
|
|
20
|
+
intervalMs: 1000,
|
|
21
|
+
reducedMotionIntervalMs: 10_000,
|
|
22
|
+
children: /*#__PURE__*/ _jsxs("aside", {
|
|
23
|
+
className: cn('flex w-304 shrink-0 flex-col border-r border-border-neutral-base bg-background-subtle-base', className),
|
|
24
|
+
"aria-label": "Workflow runs",
|
|
25
|
+
children: [
|
|
26
|
+
/*#__PURE__*/ _jsx(WorkflowRunListHeader, {
|
|
27
|
+
query: search,
|
|
28
|
+
onQueryChange: setSearch,
|
|
29
|
+
statusFilter: statusFilter,
|
|
30
|
+
onStatusFilterChange: setStatusFilter
|
|
31
|
+
}),
|
|
32
|
+
/*#__PURE__*/ _jsx(WorkflowRunListContent, {
|
|
33
|
+
query: query,
|
|
34
|
+
totalRuns: runs.length,
|
|
35
|
+
runs: filteredRuns,
|
|
36
|
+
workspaceId: workspaceId,
|
|
37
|
+
projectId: projectId,
|
|
38
|
+
selectedWorkflowRunId: selectedWorkflowRunId,
|
|
39
|
+
onClearFilters: handleClearFilters
|
|
40
|
+
})
|
|
41
|
+
]
|
|
42
|
+
})
|
|
43
|
+
});
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
//# sourceMappingURL=workflow-run-list-view.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-list-view.tsx"],"sourcesContent":["import {TimeTickerProvider} from '@shipfox/react-ui/time-ticker';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {useState} from 'react';\nimport {runMatchesSearch, runMatchesStatusFilter} from './run-display.js';\nimport type {WorkflowRunListStatusFilter, WorkflowRunListViewProps} from './types.js';\nimport {WorkflowRunListContent} from './workflow-run-list-content.js';\nimport {WorkflowRunListHeader} from './workflow-run-list-header.js';\n\nexport function WorkflowRunListView({\n runs,\n query,\n workspaceId,\n projectId,\n selectedWorkflowRunId,\n className,\n}: WorkflowRunListViewProps) {\n const [search, setSearch] = useState('');\n const [statusFilter, setStatusFilter] = useState<WorkflowRunListStatusFilter>('all');\n\n const filteredRuns = runs.filter((run) => {\n if (!runMatchesStatusFilter(run.status, statusFilter)) return false;\n return runMatchesSearch(run, search);\n });\n\n function handleClearFilters() {\n setSearch('');\n setStatusFilter('all');\n }\n\n return (\n <TimeTickerProvider intervalMs={1000} reducedMotionIntervalMs={10_000}>\n <aside\n className={cn(\n 'flex w-304 shrink-0 flex-col border-r border-border-neutral-base bg-background-subtle-base',\n className,\n )}\n aria-label=\"Workflow runs\"\n >\n <WorkflowRunListHeader\n query={search}\n onQueryChange={setSearch}\n statusFilter={statusFilter}\n onStatusFilterChange={setStatusFilter}\n />\n <WorkflowRunListContent\n query={query}\n totalRuns={runs.length}\n runs={filteredRuns}\n workspaceId={workspaceId}\n projectId={projectId}\n selectedWorkflowRunId={selectedWorkflowRunId}\n onClearFilters={handleClearFilters}\n />\n </aside>\n </TimeTickerProvider>\n );\n}\n"],"names":["TimeTickerProvider","cn","useState","runMatchesSearch","runMatchesStatusFilter","WorkflowRunListContent","WorkflowRunListHeader","WorkflowRunListView","runs","query","workspaceId","projectId","selectedWorkflowRunId","className","search","setSearch","statusFilter","setStatusFilter","filteredRuns","filter","run","status","handleClearFilters","intervalMs","reducedMotionIntervalMs","aside","aria-label","onQueryChange","onStatusFilterChange","totalRuns","length","onClearFilters"],"mappings":";AAAA,SAAQA,kBAAkB,QAAO,gCAAgC;AACjE,SAAQC,EAAE,QAAO,0BAA0B;AAC3C,SAAQC,QAAQ,QAAO,QAAQ;AAC/B,SAAQC,gBAAgB,EAAEC,sBAAsB,QAAO,mBAAmB;AAE1E,SAAQC,sBAAsB,QAAO,iCAAiC;AACtE,SAAQC,qBAAqB,QAAO,gCAAgC;AAEpE,OAAO,SAASC,oBAAoB,EAClCC,IAAI,EACJC,KAAK,EACLC,WAAW,EACXC,SAAS,EACTC,qBAAqB,EACrBC,SAAS,EACgB;IACzB,MAAM,CAACC,QAAQC,UAAU,GAAGb,SAAS;IACrC,MAAM,CAACc,cAAcC,gBAAgB,GAAGf,SAAsC;IAE9E,MAAMgB,eAAeV,KAAKW,MAAM,CAAC,CAACC;QAChC,IAAI,CAAChB,uBAAuBgB,IAAIC,MAAM,EAAEL,eAAe,OAAO;QAC9D,OAAOb,iBAAiBiB,KAAKN;IAC/B;IAEA,SAASQ;QACPP,UAAU;QACVE,gBAAgB;IAClB;IAEA,qBACE,KAACjB;QAAmBuB,YAAY;QAAMC,yBAAyB;kBAC7D,cAAA,MAACC;YACCZ,WAAWZ,GACT,8FACAY;YAEFa,cAAW;;8BAEX,KAACpB;oBACCG,OAAOK;oBACPa,eAAeZ;oBACfC,cAAcA;oBACdY,sBAAsBX;;8BAExB,KAACZ;oBACCI,OAAOA;oBACPoB,WAAWrB,KAAKsB,MAAM;oBACtBtB,MAAMU;oBACNR,aAAaA;oBACbC,WAAWA;oBACXC,uBAAuBA;oBACvBmB,gBAAgBT;;;;;AAK1B"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-run-list.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-list/workflow-run-list.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAC,oBAAoB,EAAC,MAAM,YAAY,CAAC;AAGrD,wBAAgB,eAAe,CAAC,EAC9B,WAAW,EACX,SAAS,EACT,qBAAqB,EACrB,SAAS,GACV,EAAE,oBAAoB,+BAiBtB"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { jsx as _jsx } from "react/jsx-runtime";
|
|
2
|
+
import { useMemo } from 'react';
|
|
3
|
+
import { useWorkflowRunsInfiniteQuery } from '#hooks/api/workflow-runs.js';
|
|
4
|
+
import { WorkflowRunListView } from './workflow-run-list-view.js';
|
|
5
|
+
export function WorkflowRunList({ workspaceId, projectId, selectedWorkflowRunId, className }) {
|
|
6
|
+
const query = useWorkflowRunsInfiniteQuery(projectId, {});
|
|
7
|
+
const runs = useMemo(()=>query.data?.pages.flatMap((page)=>page.runs) ?? [], [
|
|
8
|
+
query.data
|
|
9
|
+
]);
|
|
10
|
+
return /*#__PURE__*/ _jsx(WorkflowRunListView, {
|
|
11
|
+
runs: runs,
|
|
12
|
+
query: query,
|
|
13
|
+
workspaceId: workspaceId,
|
|
14
|
+
projectId: projectId,
|
|
15
|
+
selectedWorkflowRunId: selectedWorkflowRunId,
|
|
16
|
+
className: className
|
|
17
|
+
});
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
//# sourceMappingURL=workflow-run-list.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-list.tsx"],"sourcesContent":["import {useMemo} from 'react';\nimport type {WorkflowRunListItem} from '#core/workflow-run.js';\nimport {useWorkflowRunsInfiniteQuery} from '#hooks/api/workflow-runs.js';\nimport type {WorkflowRunListProps} from './types.js';\nimport {WorkflowRunListView} from './workflow-run-list-view.js';\n\nexport function WorkflowRunList({\n workspaceId,\n projectId,\n selectedWorkflowRunId,\n className,\n}: WorkflowRunListProps) {\n const query = useWorkflowRunsInfiniteQuery(projectId, {});\n const runs = useMemo<WorkflowRunListItem[]>(\n () => query.data?.pages.flatMap((page) => page.runs) ?? [],\n [query.data],\n );\n\n return (\n <WorkflowRunListView\n runs={runs}\n query={query}\n workspaceId={workspaceId}\n projectId={projectId}\n selectedWorkflowRunId={selectedWorkflowRunId}\n className={className}\n />\n );\n}\n"],"names":["useMemo","useWorkflowRunsInfiniteQuery","WorkflowRunListView","WorkflowRunList","workspaceId","projectId","selectedWorkflowRunId","className","query","runs","data","pages","flatMap","page"],"mappings":";AAAA,SAAQA,OAAO,QAAO,QAAQ;AAE9B,SAAQC,4BAA4B,QAAO,8BAA8B;AAEzE,SAAQC,mBAAmB,QAAO,8BAA8B;AAEhE,OAAO,SAASC,gBAAgB,EAC9BC,WAAW,EACXC,SAAS,EACTC,qBAAqB,EACrBC,SAAS,EACY;IACrB,MAAMC,QAAQP,6BAA6BI,WAAW,CAAC;IACvD,MAAMI,OAAOT,QACX,IAAMQ,MAAME,IAAI,EAAEC,MAAMC,QAAQ,CAACC,OAASA,KAAKJ,IAAI,KAAK,EAAE,EAC1D;QAACD,MAAME,IAAI;KAAC;IAGd,qBACE,KAACR;QACCO,MAAMA;QACND,OAAOA;QACPJ,aAAaA;QACbC,WAAWA;QACXC,uBAAuBA;QACvBC,WAAWA;;AAGjB"}
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
import type { WorkflowRunListItem } from '#core/workflow-run.js';
|
|
2
|
+
export declare function WorkflowRunRowList({ runs, workspaceId, projectId, selectedWorkflowRunId, }: {
|
|
3
|
+
runs: WorkflowRunListItem[];
|
|
4
|
+
workspaceId: string;
|
|
5
|
+
projectId: string;
|
|
6
|
+
selectedWorkflowRunId?: string | undefined;
|
|
7
|
+
}): import("react").JSX.Element;
|
|
8
|
+
export declare function WorkflowRunRow({ run, workspaceId, projectId, selected, }: {
|
|
9
|
+
run: WorkflowRunListItem;
|
|
10
|
+
workspaceId: string;
|
|
11
|
+
projectId: string;
|
|
12
|
+
selected: boolean;
|
|
13
|
+
}): import("react").JSX.Element;
|
|
14
|
+
//# sourceMappingURL=workflow-run-row.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"workflow-run-row.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-list/workflow-run-row.tsx"],"names":[],"mappings":"AAYA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,uBAAuB,CAAC;AAG/D,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,WAAW,EACX,SAAS,EACT,qBAAqB,GACtB,EAAE;IACD,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,qBAAqB,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5C,+BAiBA;AAED,wBAAgB,cAAc,CAAC,EAC7B,GAAG,EACH,WAAW,EACX,SAAS,EACT,QAAQ,GACT,EAAE;IACD,GAAG,EAAE,mBAAmB,CAAC;IACzB,WAAW,EAAE,MAAM,CAAC;IACpB,SAAS,EAAE,MAAM,CAAC;IAClB,QAAQ,EAAE,OAAO,CAAC;CACnB,+BA2EA"}
|
|
@@ -0,0 +1,172 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
import { TriggerSourceIcon } from '@shipfox/client-triggers';
|
|
3
|
+
import { RelativeTime } from '@shipfox/react-ui/relative-time';
|
|
4
|
+
import { Tooltip, TooltipContent, TooltipTrigger } from '@shipfox/react-ui/tooltip';
|
|
5
|
+
import { Code, Text } from '@shipfox/react-ui/typography';
|
|
6
|
+
import { cn } from '@shipfox/react-ui/utils';
|
|
7
|
+
import { Link } from '@tanstack/react-router';
|
|
8
|
+
import { useWorkflowRunDurationAccessibleLabel, WorkflowRunDurationLabel } from '#components/workflow-run-duration-label.js';
|
|
9
|
+
import { getWorkflowStatusVisual } from '#components/workflow-status/status-visuals.js';
|
|
10
|
+
import { WorkflowStatusIcon } from '#components/workflow-status/workflow-status-icon.js';
|
|
11
|
+
import { withoutWorkflowRunSelectionSearch } from '#core/workflow-run-url-state.js';
|
|
12
|
+
export function WorkflowRunRowList({ runs, workspaceId, projectId, selectedWorkflowRunId }) {
|
|
13
|
+
return /*#__PURE__*/ _jsx("nav", {
|
|
14
|
+
"aria-label": "Run history",
|
|
15
|
+
children: /*#__PURE__*/ _jsx("ul", {
|
|
16
|
+
className: "flex flex-col gap-4 p-8",
|
|
17
|
+
children: runs.map((run)=>/*#__PURE__*/ _jsx("li", {
|
|
18
|
+
children: /*#__PURE__*/ _jsx(WorkflowRunRow, {
|
|
19
|
+
run: run,
|
|
20
|
+
workspaceId: workspaceId,
|
|
21
|
+
projectId: projectId,
|
|
22
|
+
selected: run.id === selectedWorkflowRunId
|
|
23
|
+
})
|
|
24
|
+
}, run.id))
|
|
25
|
+
})
|
|
26
|
+
});
|
|
27
|
+
}
|
|
28
|
+
export function WorkflowRunRow({ run, workspaceId, projectId, selected }) {
|
|
29
|
+
const durationLabel = useWorkflowRunDurationAccessibleLabel(run.runAttempt.displayDuration);
|
|
30
|
+
const statusLabel = getWorkflowStatusVisual(run.status).label;
|
|
31
|
+
const body = /*#__PURE__*/ _jsxs(_Fragment, {
|
|
32
|
+
children: [
|
|
33
|
+
selected ? /*#__PURE__*/ _jsx("span", {
|
|
34
|
+
"aria-hidden": "true",
|
|
35
|
+
className: "absolute inset-y-8 left-0 w-3 rounded-full bg-border-highlights-interactive"
|
|
36
|
+
}) : null,
|
|
37
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
38
|
+
className: "flex min-w-0 items-center gap-8",
|
|
39
|
+
children: [
|
|
40
|
+
/*#__PURE__*/ _jsx(WorkflowStatusIcon, {
|
|
41
|
+
status: run.status,
|
|
42
|
+
size: 14
|
|
43
|
+
}),
|
|
44
|
+
/*#__PURE__*/ _jsx(Code, {
|
|
45
|
+
variant: "label",
|
|
46
|
+
bold: true,
|
|
47
|
+
className: "truncate text-foreground-neutral-base",
|
|
48
|
+
children: run.name
|
|
49
|
+
})
|
|
50
|
+
]
|
|
51
|
+
}),
|
|
52
|
+
/*#__PURE__*/ _jsxs("div", {
|
|
53
|
+
className: "flex min-w-0 items-center gap-8",
|
|
54
|
+
children: [
|
|
55
|
+
run.triggerDisplayLabel ? /*#__PURE__*/ _jsx(TriggerLabel, {
|
|
56
|
+
run: run
|
|
57
|
+
}) : /*#__PURE__*/ _jsxs("span", {
|
|
58
|
+
className: "flex min-w-0 flex-1 items-center gap-8 truncate text-foreground-neutral-muted",
|
|
59
|
+
children: [
|
|
60
|
+
/*#__PURE__*/ _jsx("span", {
|
|
61
|
+
"aria-hidden": "true",
|
|
62
|
+
className: "size-14 shrink-0"
|
|
63
|
+
}),
|
|
64
|
+
/*#__PURE__*/ _jsx("span", {
|
|
65
|
+
className: "sr-only",
|
|
66
|
+
children: "Run updated "
|
|
67
|
+
})
|
|
68
|
+
]
|
|
69
|
+
}),
|
|
70
|
+
/*#__PURE__*/ _jsxs("span", {
|
|
71
|
+
className: "ml-auto flex shrink-0 items-center gap-6",
|
|
72
|
+
children: [
|
|
73
|
+
/*#__PURE__*/ _jsx(WorkflowRunDurationLabel, {
|
|
74
|
+
duration: run.runAttempt.displayDuration,
|
|
75
|
+
className: "text-foreground-neutral-disabled"
|
|
76
|
+
}),
|
|
77
|
+
durationLabel ? /*#__PURE__*/ _jsx(RunMetadataSeparator, {}) : null,
|
|
78
|
+
/*#__PURE__*/ _jsx(Code, {
|
|
79
|
+
variant: "label",
|
|
80
|
+
className: "shrink-0 text-foreground-neutral-disabled",
|
|
81
|
+
children: /*#__PURE__*/ _jsx(RelativeTime, {
|
|
82
|
+
value: run.updatedAt
|
|
83
|
+
})
|
|
84
|
+
})
|
|
85
|
+
]
|
|
86
|
+
})
|
|
87
|
+
]
|
|
88
|
+
})
|
|
89
|
+
]
|
|
90
|
+
});
|
|
91
|
+
// Optimistic manual runs (temp-<uuid>) have no detail page until the canonical row
|
|
92
|
+
// replaces them on the next poll, so they render non-interactively instead of as a link
|
|
93
|
+
// that would navigate to a workflow run id the detail route rejects.
|
|
94
|
+
if (run.isTemporary) {
|
|
95
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
96
|
+
className: "relative flex w-full flex-col gap-4 rounded-8 border border-transparent px-10 py-8 text-left",
|
|
97
|
+
children: body
|
|
98
|
+
});
|
|
99
|
+
}
|
|
100
|
+
const runLink = /*#__PURE__*/ _jsx(Link, {
|
|
101
|
+
to: "/workspaces/$wid/projects/$pid/runs/$workflowRunId",
|
|
102
|
+
params: {
|
|
103
|
+
wid: workspaceId,
|
|
104
|
+
pid: projectId,
|
|
105
|
+
workflowRunId: run.id
|
|
106
|
+
},
|
|
107
|
+
search: (previous)=>withoutWorkflowRunSelectionSearch(previous),
|
|
108
|
+
"aria-current": selected ? 'page' : undefined,
|
|
109
|
+
"aria-label": [
|
|
110
|
+
run.name,
|
|
111
|
+
statusLabel,
|
|
112
|
+
durationLabel,
|
|
113
|
+
run.triggerLabel
|
|
114
|
+
].filter((part)=>Boolean(part)).join(', '),
|
|
115
|
+
className: cn('group relative flex w-full flex-col gap-4 rounded-8 border border-transparent px-10 py-8 text-left transition-colors hover:bg-background-components-hover focus-visible:shadow-border-interactive-with-active focus-visible:outline-none', selected && 'bg-background-components-hover'),
|
|
116
|
+
children: body
|
|
117
|
+
});
|
|
118
|
+
return runLink;
|
|
119
|
+
}
|
|
120
|
+
function TriggerLabel({ run }) {
|
|
121
|
+
return /*#__PURE__*/ _jsx("span", {
|
|
122
|
+
className: "flex min-w-0 flex-1 items-center",
|
|
123
|
+
children: /*#__PURE__*/ _jsxs(Tooltip, {
|
|
124
|
+
children: [
|
|
125
|
+
/*#__PURE__*/ _jsx(TooltipTrigger, {
|
|
126
|
+
asChild: true,
|
|
127
|
+
children: /*#__PURE__*/ _jsxs("span", {
|
|
128
|
+
className: "flex w-fit max-w-full min-w-0 items-center gap-8 rounded-6 outline-none",
|
|
129
|
+
children: [
|
|
130
|
+
/*#__PURE__*/ _jsx(TriggerSourceIcon, {
|
|
131
|
+
provider: run.triggerProvider,
|
|
132
|
+
source: run.triggerSource,
|
|
133
|
+
"aria-hidden": true,
|
|
134
|
+
className: "size-14 shrink-0 text-foreground-neutral-muted"
|
|
135
|
+
}),
|
|
136
|
+
/*#__PURE__*/ _jsx(Text, {
|
|
137
|
+
as: "span",
|
|
138
|
+
size: "xs",
|
|
139
|
+
className: "min-w-0 truncate text-foreground-neutral-subtle",
|
|
140
|
+
children: run.triggerDisplayLabel
|
|
141
|
+
})
|
|
142
|
+
]
|
|
143
|
+
})
|
|
144
|
+
}),
|
|
145
|
+
/*#__PURE__*/ _jsx(TriggerTooltip, {
|
|
146
|
+
label: run.triggerLabel
|
|
147
|
+
})
|
|
148
|
+
]
|
|
149
|
+
})
|
|
150
|
+
});
|
|
151
|
+
}
|
|
152
|
+
function TriggerTooltip({ label }) {
|
|
153
|
+
return /*#__PURE__*/ _jsx(TooltipContent, {
|
|
154
|
+
children: /*#__PURE__*/ _jsx(Text, {
|
|
155
|
+
as: "span",
|
|
156
|
+
size: "xs",
|
|
157
|
+
className: "block max-w-[360px] break-words",
|
|
158
|
+
children: label
|
|
159
|
+
})
|
|
160
|
+
});
|
|
161
|
+
}
|
|
162
|
+
function RunMetadataSeparator() {
|
|
163
|
+
return /*#__PURE__*/ _jsx(Code, {
|
|
164
|
+
as: "span",
|
|
165
|
+
variant: "label",
|
|
166
|
+
"aria-hidden": "true",
|
|
167
|
+
className: "shrink-0 text-foreground-neutral-disabled",
|
|
168
|
+
children: "·"
|
|
169
|
+
});
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
//# sourceMappingURL=workflow-run-row.js.map
|