@shipfox/client-workflows 22.0.1 → 22.0.2
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 +13 -0
- 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 +9 -15
- 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.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-states.js +36 -39
- package/dist/components/workflow-run-list/workflow-run-list-states.js.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-list-view.js +1 -1
- 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.map +1 -1
- package/dist/components/workflow-run-list/workflow-run-row.js +9 -13
- package/dist/components/workflow-run-list/workflow-run-row.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/components/workflow-run-list/workflow-run-list-content.tsx +4 -9
- package/src/components/workflow-run-list/workflow-run-list-states.tsx +36 -39
- package/src/components/workflow-run-list/workflow-run-list-view.test.tsx +5 -0
- package/src/components/workflow-run-list/workflow-run-list-view.tsx +1 -1
- package/src/components/workflow-run-list/workflow-run-row.tsx +7 -10
- package/tsconfig.build.tsbuildinfo +1 -1
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@shipfox/client-workflows",
|
|
3
3
|
"license": "MIT",
|
|
4
|
-
"version": "22.0.
|
|
4
|
+
"version": "22.0.2",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
7
7
|
"url": "git+https://github.com/ShipfoxHQ/shipfox.git",
|
|
@@ -31,12 +31,12 @@
|
|
|
31
31
|
"@shipfox/api-definitions-dto": "12.3.0",
|
|
32
32
|
"@shipfox/api-workflows-dto": "13.0.0",
|
|
33
33
|
"@shipfox/client-api": "6.0.1",
|
|
34
|
-
"@shipfox/client-logs": "22.0.
|
|
35
|
-
"@shipfox/client-projects": "22.0.
|
|
36
|
-
"@shipfox/client-shell": "22.0.
|
|
37
|
-
"@shipfox/client-triggers": "22.0.
|
|
38
|
-
"@shipfox/
|
|
39
|
-
"@shipfox/
|
|
34
|
+
"@shipfox/client-logs": "22.0.2",
|
|
35
|
+
"@shipfox/client-projects": "22.0.2",
|
|
36
|
+
"@shipfox/client-shell": "22.0.2",
|
|
37
|
+
"@shipfox/client-triggers": "22.0.2",
|
|
38
|
+
"@shipfox/client-ui": "22.0.2",
|
|
39
|
+
"@shipfox/react-ui": "2.1.1"
|
|
40
40
|
},
|
|
41
41
|
"peerDependencies": {
|
|
42
42
|
"@tanstack/react-query": "^5.101.0",
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import {QueryLoadError} from '@shipfox/client-ui';
|
|
2
|
-
import {Panel} from '@shipfox/react-ui/panel';
|
|
3
2
|
import type {WorkflowRunListItem} from '#core/workflow-run.js';
|
|
4
3
|
import type {WorkflowRunListQuery} from './types.js';
|
|
5
4
|
import {
|
|
@@ -53,18 +52,14 @@ export function WorkflowRunListContent({
|
|
|
53
52
|
const showNoMatches = hasLoaded && runs.length === 0 && !showEmptyState;
|
|
54
53
|
|
|
55
54
|
return (
|
|
56
|
-
|
|
55
|
+
<>
|
|
57
56
|
{isPending ? <WorkflowRunListSkeleton /> : null}
|
|
58
57
|
{!isPending ? (
|
|
59
|
-
<
|
|
60
|
-
<QueryLoadError query={query} subject="workflow runs" icon="pulseLine" variant="panel" />
|
|
61
|
-
</Panel>
|
|
58
|
+
<QueryLoadError query={query} subject="workflow runs" icon="pulseLine" variant="panel" />
|
|
62
59
|
) : null}
|
|
63
60
|
{!isPending && refreshFailed ? <WorkflowRunListStaleError query={query} /> : null}
|
|
64
61
|
{showEmptyState ? (
|
|
65
|
-
<
|
|
66
|
-
<WorkflowRunListEmpty workspaceSlug={workspaceSlug} projectSlug={projectSlug} />
|
|
67
|
-
</Panel>
|
|
62
|
+
<WorkflowRunListEmpty workspaceSlug={workspaceSlug} projectSlug={projectSlug} />
|
|
68
63
|
) : null}
|
|
69
64
|
{showNoMatches ? (
|
|
70
65
|
<WorkflowRunListNoMatches
|
|
@@ -86,6 +81,6 @@ export function WorkflowRunListContent({
|
|
|
86
81
|
/>
|
|
87
82
|
</>
|
|
88
83
|
) : null}
|
|
89
|
-
|
|
84
|
+
</>
|
|
90
85
|
);
|
|
91
86
|
}
|
|
@@ -2,7 +2,6 @@ import type {QueryLoadErrorQuery} from '@shipfox/client-ui';
|
|
|
2
2
|
import {Button} from '@shipfox/react-ui/button';
|
|
3
3
|
import {Callout} from '@shipfox/react-ui/callout';
|
|
4
4
|
import {EmptyState} from '@shipfox/react-ui/empty-state';
|
|
5
|
-
import {Panel} from '@shipfox/react-ui/panel';
|
|
6
5
|
import {Skeleton} from '@shipfox/react-ui/skeleton';
|
|
7
6
|
import {Text} from '@shipfox/react-ui/typography';
|
|
8
7
|
import {Link} from '@tanstack/react-router';
|
|
@@ -16,7 +15,7 @@ const SKELETON_ROW_COUNT = 8;
|
|
|
16
15
|
*/
|
|
17
16
|
export function WorkflowRunListSkeleton() {
|
|
18
17
|
return (
|
|
19
|
-
<
|
|
18
|
+
<div role="status" aria-label="Loading runs" className="@container divide-y">
|
|
20
19
|
{Array.from({length: SKELETON_ROW_COUNT}).map((_, index) => (
|
|
21
20
|
<div
|
|
22
21
|
// biome-ignore lint/suspicious/noArrayIndexKey: skeleton row, stable position
|
|
@@ -30,7 +29,7 @@ export function WorkflowRunListSkeleton() {
|
|
|
30
29
|
<Skeleton className="h-12 w-48" />
|
|
31
30
|
</div>
|
|
32
31
|
))}
|
|
33
|
-
</
|
|
32
|
+
</div>
|
|
34
33
|
);
|
|
35
34
|
}
|
|
36
35
|
|
|
@@ -114,43 +113,41 @@ export function WorkflowRunListNoMatches({
|
|
|
114
113
|
onLoadMore?: () => void;
|
|
115
114
|
}) {
|
|
116
115
|
return (
|
|
117
|
-
<
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
Load more runs
|
|
143
|
-
</Button>
|
|
144
|
-
) : null}
|
|
145
|
-
<Button type="button" size="sm" variant="secondary" onClick={onClear}>
|
|
146
|
-
Show all runs
|
|
116
|
+
<div className="flex flex-col gap-inline">
|
|
117
|
+
{isFetchNextPageError ? (
|
|
118
|
+
<Callout role="alert" type="error">
|
|
119
|
+
Could not load more workflow runs. Try again to continue searching older runs.
|
|
120
|
+
</Callout>
|
|
121
|
+
) : null}
|
|
122
|
+
<EmptyState
|
|
123
|
+
icon="filterOffLine"
|
|
124
|
+
title={hasNextPage ? 'No matches in loaded history' : 'No matching runs'}
|
|
125
|
+
description={
|
|
126
|
+
hasNextPage
|
|
127
|
+
? 'No loaded run matches these filters. Load more to search further back.'
|
|
128
|
+
: 'No run matches these filters.'
|
|
129
|
+
}
|
|
130
|
+
action={
|
|
131
|
+
<div className="flex flex-wrap justify-center gap-inline">
|
|
132
|
+
{hasNextPage && onLoadMore ? (
|
|
133
|
+
<Button
|
|
134
|
+
type="button"
|
|
135
|
+
size="sm"
|
|
136
|
+
variant="primary"
|
|
137
|
+
isLoading={isFetchingNextPage}
|
|
138
|
+
onClick={onLoadMore}
|
|
139
|
+
>
|
|
140
|
+
Load more runs
|
|
147
141
|
</Button>
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
142
|
+
) : null}
|
|
143
|
+
<Button type="button" size="sm" variant="secondary" onClick={onClear}>
|
|
144
|
+
Show all runs
|
|
145
|
+
</Button>
|
|
146
|
+
</div>
|
|
147
|
+
}
|
|
148
|
+
variant="panel"
|
|
149
|
+
/>
|
|
150
|
+
</div>
|
|
154
151
|
);
|
|
155
152
|
}
|
|
156
153
|
|
|
@@ -48,6 +48,7 @@ describe('WorkflowRunListView', () => {
|
|
|
48
48
|
const body = panel?.querySelector<HTMLElement>('[data-slot="panel-body"]');
|
|
49
49
|
|
|
50
50
|
expect(panel).not.toBeNull();
|
|
51
|
+
expect(document.querySelectorAll('[data-slot="panel"]')).toHaveLength(1);
|
|
51
52
|
expect(header).not.toBeNull();
|
|
52
53
|
expect(body).not.toBeNull();
|
|
53
54
|
expect(within(header as HTMLElement).getByLabelText('Search runs')).toBeInTheDocument();
|
|
@@ -204,6 +205,7 @@ describe('WorkflowRunListView', () => {
|
|
|
204
205
|
renderListView([], {query: loadedQuery({isPending: true, data: undefined})});
|
|
205
206
|
|
|
206
207
|
expect(await screen.findByLabelText('Loading runs')).toBeInTheDocument();
|
|
208
|
+
expect(document.querySelectorAll('[data-slot="panel"]')).toHaveLength(1);
|
|
207
209
|
expect(screen.queryByText('No runs yet')).not.toBeInTheDocument();
|
|
208
210
|
});
|
|
209
211
|
|
|
@@ -217,6 +219,7 @@ describe('WorkflowRunListView', () => {
|
|
|
217
219
|
renderListView([]);
|
|
218
220
|
|
|
219
221
|
expect(await screen.findByText('No runs yet')).toBeInTheDocument();
|
|
222
|
+
expect(document.querySelectorAll('[data-slot="panel"]')).toHaveLength(1);
|
|
220
223
|
expect(screen.getByRole('link', {name: 'View workflows'})).toBeInTheDocument();
|
|
221
224
|
expect(screen.queryByRole('button', {name: 'Show all runs'})).not.toBeInTheDocument();
|
|
222
225
|
});
|
|
@@ -228,6 +231,7 @@ describe('WorkflowRunListView', () => {
|
|
|
228
231
|
await user.type(await screen.findByLabelText('Search runs'), 'no-such-run');
|
|
229
232
|
|
|
230
233
|
expect(screen.getByText('No matching runs')).toBeInTheDocument();
|
|
234
|
+
expect(document.querySelectorAll('[data-slot="panel"]')).toHaveLength(1);
|
|
231
235
|
expect(screen.queryByText('No runs yet')).not.toBeInTheDocument();
|
|
232
236
|
expect(screen.getByRole('button', {name: 'Show all runs'})).toBeInTheDocument();
|
|
233
237
|
});
|
|
@@ -248,6 +252,7 @@ describe('WorkflowRunListView', () => {
|
|
|
248
252
|
});
|
|
249
253
|
|
|
250
254
|
expect(await screen.findByLabelText('Search runs')).toBeInTheDocument();
|
|
255
|
+
expect(document.querySelectorAll('[data-slot="panel"]')).toHaveLength(1);
|
|
251
256
|
expect(screen.queryByText('No runs yet')).not.toBeInTheDocument();
|
|
252
257
|
expect(screen.queryByText('No matching runs')).not.toBeInTheDocument();
|
|
253
258
|
});
|
|
@@ -77,7 +77,7 @@ export function WorkflowRunListView({
|
|
|
77
77
|
hasActiveFilters={hasActiveFilters}
|
|
78
78
|
/>
|
|
79
79
|
</PanelHeader>
|
|
80
|
-
<PanelBody className="min-h-0 flex-1">
|
|
80
|
+
<PanelBody className="min-h-0 flex-1 overflow-y-auto">
|
|
81
81
|
<WorkflowRunListContent
|
|
82
82
|
query={query}
|
|
83
83
|
totalRuns={runs.length}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import {TriggerSourceIcon} from '@shipfox/client-triggers';
|
|
2
2
|
import {Icon, type IconName} from '@shipfox/react-ui/icon';
|
|
3
|
-
import {Panel} from '@shipfox/react-ui/panel';
|
|
4
3
|
import {RelativeTime} from '@shipfox/react-ui/relative-time';
|
|
5
4
|
import {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';
|
|
6
5
|
import {Code, Text} from '@shipfox/react-ui/typography';
|
|
@@ -38,15 +37,13 @@ export function WorkflowRunRowList({
|
|
|
38
37
|
// A container, not the viewport, drives the row's breakpoints. What a row can afford is its
|
|
39
38
|
// own width; keying off the viewport would keep the job strip hidden on a wide screen or
|
|
40
39
|
// crush it on a narrow one.
|
|
41
|
-
<
|
|
42
|
-
|
|
43
|
-
{
|
|
44
|
-
<
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
</ul>
|
|
49
|
-
</Panel>
|
|
40
|
+
<ul className="@container divide-y divide-border-neutral-base">
|
|
41
|
+
{runs.map((run) => (
|
|
42
|
+
<li key={run.id}>
|
|
43
|
+
<WorkflowRunRow run={run} workspaceSlug={workspaceSlug} projectSlug={projectSlug} />
|
|
44
|
+
</li>
|
|
45
|
+
))}
|
|
46
|
+
</ul>
|
|
50
47
|
);
|
|
51
48
|
}
|
|
52
49
|
|