@shipfox/client-workflows 19.0.0 → 21.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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +43 -0
- package/dist/components/job-detail/job-detail-view.d.ts.map +1 -1
- package/dist/components/job-detail/job-detail-view.js +231 -42
- package/dist/components/job-detail/job-detail-view.js.map +1 -1
- package/dist/components/job-detail/step-attempt-log-panel.d.ts +7 -1
- package/dist/components/job-detail/step-attempt-log-panel.d.ts.map +1 -1
- package/dist/components/job-detail/step-attempt-log-panel.js +37 -10
- package/dist/components/job-detail/step-attempt-log-panel.js.map +1 -1
- package/dist/components/step-list/step-list-model.d.ts +1 -0
- package/dist/components/step-list/step-list-model.d.ts.map +1 -1
- package/dist/components/step-list/step-list-model.js +1 -1
- package/dist/components/step-list/step-list-model.js.map +1 -1
- package/dist/components/step-list/step-list.d.ts +2 -1
- package/dist/components/step-list/step-list.d.ts.map +1 -1
- package/dist/components/step-list/step-list.js +24 -7
- package/dist/components/step-list/step-list.js.map +1 -1
- package/dist/components/workflow-run-duration-label.d.ts +8 -7
- package/dist/components/workflow-run-duration-label.d.ts.map +1 -1
- package/dist/components/workflow-run-duration-label.js +15 -31
- package/dist/components/workflow-run-duration-label.js.map +1 -1
- package/dist/components/workflow-run-list/job-status-strip.d.ts +9 -1
- package/dist/components/workflow-run-list/job-status-strip.d.ts.map +1 -1
- package/dist/components/workflow-run-list/job-status-strip.js +22 -11
- package/dist/components/workflow-run-list/job-status-strip.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-filters.js +1 -1
- package/dist/components/workflow-run-list/workflow-run-filters.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-states.js +2 -2
- 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.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-view.js +34 -22
- package/dist/components/workflow-run-list/workflow-run-list-view.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-row.d.ts +3 -3
- package/dist/components/workflow-run-list/workflow-run-row.d.ts.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-row.js +22 -16
- package/dist/components/workflow-run-list/workflow-run-row.js.map +1 -1
- package/dist/components/workflow-run-summary/workflow-run-summary.d.ts.map +1 -1
- package/dist/components/workflow-run-summary/workflow-run-summary.js +8 -35
- package/dist/components/workflow-run-summary/workflow-run-summary.js.map +1 -1
- package/dist/components/workflow-run-view/run-workspace-nav.js +1 -1
- package/dist/components/workflow-run-view/run-workspace-nav.js.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-states.d.ts.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-states.js +1 -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.map +1 -1
- package/dist/components/workflow-run-view/workflow-run-view.js +43 -36
- package/dist/components/workflow-run-view/workflow-run-view.js.map +1 -1
- package/dist/components/workflow-source-panel/workflow-source-content.js +1 -1
- package/dist/components/workflow-source-panel/workflow-source-content.js.map +1 -1
- package/dist/components/workflow-status/status-visuals.d.ts.map +1 -1
- package/dist/components/workflow-status/status-visuals.js +0 -9
- package/dist/components/workflow-status/status-visuals.js.map +1 -1
- package/dist/components/workflow-status/workflow-status-icon.d.ts.map +1 -1
- package/dist/components/workflow-status/workflow-status-icon.js +0 -11
- package/dist/components/workflow-status/workflow-status-icon.js.map +1 -1
- package/dist/core/entities/workflow-run.d.ts +10 -55
- package/dist/core/entities/workflow-run.d.ts.map +1 -1
- package/dist/core/entities/workflow-run.js +1 -94
- package/dist/core/entities/workflow-run.js.map +1 -1
- package/dist/core/workflow-run.d.ts +2 -2
- package/dist/core/workflow-run.d.ts.map +1 -1
- package/dist/core/workflow-run.js +1 -1
- package/dist/core/workflow-run.js.map +1 -1
- package/dist/hooks/api/workflow-run-mapper.d.ts.map +1 -1
- package/dist/hooks/api/workflow-run-mapper.js +3 -1
- package/dist/hooks/api/workflow-run-mapper.js.map +1 -1
- package/dist/hooks/api/workflow-runs.js +1 -0
- package/dist/hooks/api/workflow-runs.js.map +1 -1
- package/dist/pages/project-workflows-page.d.ts.map +1 -1
- package/dist/pages/project-workflows-page.js +3 -2
- package/dist/pages/project-workflows-page.js.map +1 -1
- package/dist/pages/workflow-job-detail-page.d.ts.map +1 -1
- package/dist/pages/workflow-job-detail-page.js +3 -2
- package/dist/pages/workflow-job-detail-page.js.map +1 -1
- package/dist/pages/workflow-run-detail-page.js +2 -1
- package/dist/pages/workflow-run-detail-page.js.map +1 -1
- package/dist/pages/workflow-run-list-page.d.ts.map +1 -1
- package/dist/pages/workflow-run-list-page.js +9 -11
- package/dist/pages/workflow-run-list-page.js.map +1 -1
- package/dist/routes/job-detail.d.ts +1 -1
- package/dist/routes/job-detail.js +1 -1
- package/dist/routes/job-detail.js.map +1 -1
- package/dist/routes/run-detail.d.ts +1 -1
- package/dist/routes/run-detail.js +1 -1
- package/dist/routes/run-detail.js.map +1 -1
- package/dist/routes/runs.d.ts +1 -1
- package/dist/routes/runs.js +1 -1
- package/dist/routes/runs.js.map +1 -1
- package/dist/routes/workflows.d.ts +3 -0
- package/dist/routes/workflows.js +3 -0
- package/dist/routes/workflows.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +8 -8
- package/src/components/job-detail/job-detail-view.tsx +263 -47
- package/src/components/job-detail/step-attempt-log-panel.test.tsx +30 -12
- package/src/components/job-detail/step-attempt-log-panel.tsx +68 -10
- package/src/components/job-graph/job-graph.stories.tsx +1 -1
- package/src/components/job-graph/job-node.stories.tsx +1 -1
- package/src/components/step-list/step-list-model.ts +1 -1
- package/src/components/step-list/step-list.test.tsx +29 -1
- package/src/components/step-list/step-list.tsx +28 -9
- package/src/components/workflow-run-duration-label.tsx +21 -44
- package/src/components/workflow-run-list/job-status-strip.tsx +25 -12
- package/src/components/workflow-run-list/workflow-run-filters.tsx +1 -1
- package/src/components/workflow-run-list/workflow-run-list-states.tsx +2 -2
- package/src/components/workflow-run-list/workflow-run-list-view.test.tsx +101 -4
- package/src/components/workflow-run-list/workflow-run-list-view.tsx +28 -22
- package/src/components/workflow-run-list/workflow-run-list.stories.tsx +9 -20
- package/src/components/workflow-run-list/workflow-run-row.tsx +24 -19
- package/src/components/workflow-run-summary/workflow-run-summary.stories.tsx +2 -40
- package/src/components/workflow-run-summary/workflow-run-summary.test.tsx +75 -22
- package/src/components/workflow-run-summary/workflow-run-summary.tsx +7 -31
- package/src/components/workflow-run-view/run-workspace-nav.tsx +1 -1
- package/src/components/workflow-run-view/workflow-run-states.tsx +1 -4
- package/src/components/workflow-run-view/workflow-run-view.stories.tsx +140 -0
- package/src/components/workflow-run-view/workflow-run-view.test.tsx +38 -7
- package/src/components/workflow-run-view/workflow-run-view.tsx +45 -37
- package/src/components/workflow-source-panel/workflow-source-content.tsx +2 -2
- package/src/components/workflow-status/status-visuals.ts +0 -4
- package/src/components/workflow-status/workflow-status-icon.stories.tsx +0 -1
- package/src/components/workflow-status/workflow-status-icon.tsx +0 -18
- package/src/core/entities/workflow-run.ts +9 -136
- package/src/core/workflow-run.test.ts +2 -0
- package/src/core/workflow-run.ts +0 -8
- package/src/hooks/api/workflow-run-mapper.ts +2 -0
- package/src/hooks/api/workflow-runs.ts +1 -1
- package/src/pages/project-workflows-page.tsx +3 -2
- package/src/pages/workflow-job-detail-page.test.tsx +32 -0
- package/src/pages/workflow-job-detail-page.tsx +5 -1
- package/src/pages/workflow-run-detail-page.tsx +1 -1
- package/src/pages/workflow-run-list-page.tsx +9 -11
- package/src/pages/workflow-run-pages.test.tsx +26 -0
- package/src/routes/job-detail.tsx +1 -1
- package/src/routes/run-detail.tsx +1 -1
- package/src/routes/runs.tsx +1 -1
- package/src/routes/workflows.tsx +1 -0
- package/test/fixtures/workflow-run.ts +30 -3
- package/tsconfig.build.tsbuildinfo +1 -1
- package/src/core/entities/workflow-run-display.test.ts +0 -187
|
@@ -49,17 +49,15 @@ export function WorkflowRunsPage({
|
|
|
49
49
|
);
|
|
50
50
|
|
|
51
51
|
return (
|
|
52
|
-
<div className="flex min-h-0 flex-1 overflow-hidden
|
|
53
|
-
<
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
/>
|
|
62
|
-
</div>
|
|
52
|
+
<div data-workflow-page-root="runs" className="flex min-h-0 flex-1 flex-col overflow-hidden">
|
|
53
|
+
<WorkflowRunList
|
|
54
|
+
projectId={projectId}
|
|
55
|
+
workspaceSlug={workspaceSlug}
|
|
56
|
+
projectSlug={projectSlug}
|
|
57
|
+
search={search}
|
|
58
|
+
onFiltersChange={onFiltersChange}
|
|
59
|
+
onClearFilters={onClearFilters}
|
|
60
|
+
/>
|
|
63
61
|
</div>
|
|
64
62
|
);
|
|
65
63
|
}
|
|
@@ -72,6 +72,19 @@ describe('WorkflowRunPages', () => {
|
|
|
72
72
|
expect(screen.queryByLabelText('Loading workflow run')).not.toBeInTheDocument();
|
|
73
73
|
});
|
|
74
74
|
|
|
75
|
+
test('lets the list route inherit its shell canvas and width', async () => {
|
|
76
|
+
configureApiClient({fetchImpl: vi.fn(() => new Promise<Response>(() => undefined))});
|
|
77
|
+
|
|
78
|
+
const {container} = renderRunsPath();
|
|
79
|
+
|
|
80
|
+
await screen.findByLabelText('Workflow runs');
|
|
81
|
+
const pageRoot = container.querySelector('[data-workflow-page-root="runs"]');
|
|
82
|
+
|
|
83
|
+
expect(pageRoot).not.toBeNull();
|
|
84
|
+
expect(pageRoot).not.toHaveClass('bg-background-neutral-base');
|
|
85
|
+
expect(pageRoot).not.toHaveClass('max-w-[1120px]');
|
|
86
|
+
});
|
|
87
|
+
|
|
75
88
|
test('keeps the list route and filters in place instead of redirecting to a run', async () => {
|
|
76
89
|
configureApiClient({fetchImpl: createRunsListFetch()});
|
|
77
90
|
|
|
@@ -184,6 +197,19 @@ describe('WorkflowRunPages', () => {
|
|
|
184
197
|
expect(currentSearch(router).tab).toBeUndefined();
|
|
185
198
|
});
|
|
186
199
|
|
|
200
|
+
test('lets the run detail route inherit its shell canvas', async () => {
|
|
201
|
+
configureApiClient({fetchImpl: vi.fn(() => new Promise<Response>(() => undefined))});
|
|
202
|
+
|
|
203
|
+
const {container} = renderRunPath();
|
|
204
|
+
|
|
205
|
+
expect(await screen.findByRole('region', {name: 'Loading workflow run'})).toBeInTheDocument();
|
|
206
|
+
|
|
207
|
+
const pageRoot = container.querySelector('[data-workflow-page-root="run-detail"]');
|
|
208
|
+
|
|
209
|
+
expect(pageRoot).not.toBeNull();
|
|
210
|
+
expect(pageRoot).not.toHaveClass('bg-background-subtle-base');
|
|
211
|
+
});
|
|
212
|
+
|
|
187
213
|
test('maps the removed Jobs tab URL to the graph Summary', async () => {
|
|
188
214
|
configureApiClient({fetchImpl: createRunDetailFetch()});
|
|
189
215
|
|
|
@@ -4,7 +4,7 @@ import {validateWorkflowJobSearch, workflowJobRouteParams} from './inputs.js';
|
|
|
4
4
|
import {ProjectRoute} from './project-route.js';
|
|
5
5
|
|
|
6
6
|
export default defineRoute({
|
|
7
|
-
staticData: {
|
|
7
|
+
staticData: {frame: 'data'},
|
|
8
8
|
validateSearch: validateWorkflowJobSearch,
|
|
9
9
|
component: () => {
|
|
10
10
|
const {workspaceSlug, projectSlug, workflowRunId, jobId} =
|
|
@@ -4,7 +4,7 @@ import {validateWorkflowRunsSearch, workflowRouteParams} from './inputs.js';
|
|
|
4
4
|
import {ProjectRoute} from './project-route.js';
|
|
5
5
|
|
|
6
6
|
export default defineRoute({
|
|
7
|
-
staticData: {
|
|
7
|
+
staticData: {frame: 'data'},
|
|
8
8
|
validateSearch: validateWorkflowRunsSearch,
|
|
9
9
|
component: () => {
|
|
10
10
|
const {workspaceSlug, projectSlug, workflowRunId} = useRouteParams(workflowRouteParams);
|
package/src/routes/runs.tsx
CHANGED
|
@@ -4,7 +4,7 @@ import {validateWorkflowRunsSearch, workflowRouteParams} from './inputs.js';
|
|
|
4
4
|
import {ProjectRoute} from './project-route.js';
|
|
5
5
|
|
|
6
6
|
export default defineRoute({
|
|
7
|
-
staticData: {
|
|
7
|
+
staticData: {frame: 'data'},
|
|
8
8
|
validateSearch: validateWorkflowRunsSearch,
|
|
9
9
|
component: () => {
|
|
10
10
|
const {workspaceSlug, projectSlug} = useRouteParams(workflowRouteParams);
|
package/src/routes/workflows.tsx
CHANGED
|
@@ -3,6 +3,7 @@ import {ProjectWorkflowsPage} from '#pages/project-workflows-page.js';
|
|
|
3
3
|
import {ProjectRoute} from './project-route.js';
|
|
4
4
|
|
|
5
5
|
export default defineRoute({
|
|
6
|
+
staticData: {frame: 'data'},
|
|
6
7
|
component: () => {
|
|
7
8
|
return (
|
|
8
9
|
<ProjectRoute>{(project) => <ProjectWorkflowsPage projectId={project.id} />}</ProjectRoute>
|
|
@@ -82,6 +82,7 @@ export function workflowRunDto(
|
|
|
82
82
|
jobs: [],
|
|
83
83
|
job_status_counts: [],
|
|
84
84
|
job_display_status_counts: [],
|
|
85
|
+
has_started_job_execution: false,
|
|
85
86
|
...overrides,
|
|
86
87
|
};
|
|
87
88
|
}
|
|
@@ -136,10 +137,18 @@ function executionStatusForFixtureStatus(
|
|
|
136
137
|
*
|
|
137
138
|
* Built from one list so the two can never disagree. A fixture whose counts contradicted its
|
|
138
139
|
* preview would hide exactly the bug the split exists to prevent.
|
|
140
|
+
*
|
|
141
|
+
* `has_started_job_execution` follows the statuses where they settle it: `succeeded` and `failed`
|
|
142
|
+
* cannot be reached without running. `pending`, `skipped`, and `cancelled` leave it open, which is
|
|
143
|
+
* the ambiguity the server flag exists to resolve, so those default to not started and a case that
|
|
144
|
+
* needs the other reading overrides it.
|
|
139
145
|
*/
|
|
140
146
|
export function workflowRunJobsFixture(
|
|
141
147
|
statuses: readonly JobStatusDto[],
|
|
142
|
-
): Pick<
|
|
148
|
+
): Pick<
|
|
149
|
+
WorkflowRunListItemDto,
|
|
150
|
+
'jobs' | 'job_status_counts' | 'job_display_status_counts' | 'has_started_job_execution'
|
|
151
|
+
> {
|
|
143
152
|
const counts = new Map<JobStatusDto, number>();
|
|
144
153
|
for (const status of statuses) counts.set(status, (counts.get(status) ?? 0) + 1);
|
|
145
154
|
|
|
@@ -152,6 +161,9 @@ export function workflowRunJobsFixture(
|
|
|
152
161
|
jobs: preview,
|
|
153
162
|
job_status_counts: [...counts.entries()].map(([status, count]) => ({status, count})),
|
|
154
163
|
job_display_status_counts: [...counts.entries()].map(([status, count]) => ({status, count})),
|
|
164
|
+
has_started_job_execution: statuses.some(
|
|
165
|
+
(status) => status === 'running' || status === 'succeeded' || status === 'failed',
|
|
166
|
+
),
|
|
155
167
|
};
|
|
156
168
|
}
|
|
157
169
|
|
|
@@ -159,7 +171,10 @@ export function workflowRunJobsFixture(
|
|
|
159
171
|
export function workflowRunJobsOfStatus(
|
|
160
172
|
count: number,
|
|
161
173
|
status: JobStatusDto = 'succeeded',
|
|
162
|
-
): Pick<
|
|
174
|
+
): Pick<
|
|
175
|
+
WorkflowRunListItemDto,
|
|
176
|
+
'jobs' | 'job_status_counts' | 'job_display_status_counts' | 'has_started_job_execution'
|
|
177
|
+
> {
|
|
163
178
|
return workflowRunJobsFixture(Array.from({length: count}, () => status));
|
|
164
179
|
}
|
|
165
180
|
|
|
@@ -189,7 +204,12 @@ export function workflowRunListPage(
|
|
|
189
204
|
export function workflowRunDetailDto(
|
|
190
205
|
overrides: Partial<WorkflowRunDetailResponseDto> = {},
|
|
191
206
|
): WorkflowRunDetailResponseDto {
|
|
192
|
-
const {
|
|
207
|
+
const {
|
|
208
|
+
jobs,
|
|
209
|
+
run_attempt: runAttemptOverride,
|
|
210
|
+
has_started_job_execution: hasStartedOverride,
|
|
211
|
+
...runOverrides
|
|
212
|
+
} = overrides;
|
|
193
213
|
const run = workflowRunDto(runOverrides);
|
|
194
214
|
|
|
195
215
|
return {
|
|
@@ -205,6 +225,13 @@ export function workflowRunDetailDto(
|
|
|
205
225
|
finished_at: run.finished_at,
|
|
206
226
|
}),
|
|
207
227
|
jobs: jobs ?? [],
|
|
228
|
+
// Follows the executions the case actually built, so the fixture cannot claim a run started
|
|
229
|
+
// while carrying no execution that did.
|
|
230
|
+
has_started_job_execution:
|
|
231
|
+
hasStartedOverride ??
|
|
232
|
+
(jobs ?? []).some((job) =>
|
|
233
|
+
job.job_executions.some((execution) => execution.started_at != null),
|
|
234
|
+
),
|
|
208
235
|
};
|
|
209
236
|
}
|
|
210
237
|
|