@shipfox/client-workflows 22.0.0 → 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 +24 -0
- package/dist/components/job-detail/job-execution-time-text.d.ts.map +1 -1
- package/dist/components/job-detail/job-execution-time-text.js +2 -15
- package/dist/components/job-detail/job-execution-time-text.js.map +1 -1
- package/dist/components/job-graph/job-duration-format.js +1 -1
- package/dist/components/job-graph/job-duration-format.js.map +1 -1
- 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/pages/project-workflows-page.js +11 -14
- package/dist/pages/project-workflows-page.js.map +1 -1
- package/dist/tsconfig.test.tsbuildinfo +1 -1
- package/package.json +7 -7
- package/src/components/job-detail/job-execution-time-text.test.ts +46 -0
- package/src/components/job-detail/job-execution-time-text.tsx +2 -23
- package/src/components/job-graph/job-duration-format.ts +1 -1
- 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/src/pages/project-workflows-page.test.tsx +14 -4
- package/src/pages/project-workflows-page.tsx +7 -10
- package/tsconfig.build.tsbuildinfo +1 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
$ shipfox-swc
|
|
2
|
-
Successfully compiled: 86 files with swc (
|
|
2
|
+
Successfully compiled: 86 files with swc (222.63ms)
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @shipfox/client-workflows
|
|
2
2
|
|
|
3
|
+
## 22.0.2
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- 383b9dd: Remove nested panel borders from workflow run list content and states.
|
|
8
|
+
- Updated dependencies [87d9bd8]
|
|
9
|
+
- @shipfox/react-ui@2.1.1
|
|
10
|
+
- @shipfox/client-logs@22.0.2
|
|
11
|
+
- @shipfox/client-projects@22.0.2
|
|
12
|
+
- @shipfox/client-shell@22.0.2
|
|
13
|
+
- @shipfox/client-triggers@22.0.2
|
|
14
|
+
- @shipfox/client-ui@22.0.2
|
|
15
|
+
|
|
16
|
+
## 22.0.1
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- 50adc12: Displays live job duration timers in whole seconds.
|
|
21
|
+
- e99205b: Removes the redundant page heading and description from the workflows page.
|
|
22
|
+
- Updated dependencies [e92517f]
|
|
23
|
+
- @shipfox/client-shell@22.0.1
|
|
24
|
+
- @shipfox/client-triggers@22.0.1
|
|
25
|
+
- @shipfox/client-projects@22.0.1
|
|
26
|
+
|
|
3
27
|
## 22.0.0
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"job-execution-time-text.d.ts","sourceRoot":"","sources":["../../../src/components/job-detail/job-execution-time-text.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"job-execution-time-text.d.ts","sourceRoot":"","sources":["../../../src/components/job-detail/job-execution-time-text.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAC,gBAAgB,EAAC,MAAM,uBAAuB,CAAC;AAG5D,wBAAgB,oBAAoB,CAAC,EAAC,IAAI,EAAC,EAAE;IAAC,IAAI,EAAE,gBAAgB,CAAA;CAAC,UAIpE;AAED,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,gBAAgB,GAAG,MAAM,CAErE"}
|
|
@@ -1,24 +1,11 @@
|
|
|
1
1
|
import { useTimeTick } from '@shipfox/react-ui/time-ticker';
|
|
2
|
-
import {
|
|
2
|
+
import { formatJobExecutionTimeLabel } from '../job-graph/job-duration-format.js';
|
|
3
3
|
export function JobExecutionTimeText({ time }) {
|
|
4
4
|
useTimeTick();
|
|
5
5
|
return formatJobExecutionTime(time);
|
|
6
6
|
}
|
|
7
7
|
export function formatJobExecutionTime(time) {
|
|
8
|
-
|
|
9
|
-
return formatDuration(Date.now() - Date.parse(time.fromIso));
|
|
10
|
-
}
|
|
11
|
-
return formatElapsedDuration(time.elapsed);
|
|
12
|
-
}
|
|
13
|
-
function formatElapsedDuration(duration) {
|
|
14
|
-
const days = duration.days ?? 0;
|
|
15
|
-
const hours = duration.hours ?? 0;
|
|
16
|
-
const minutes = duration.minutes ?? 0;
|
|
17
|
-
const seconds = duration.seconds ?? 0;
|
|
18
|
-
if (days > 0) return hours > 0 ? `${days}d ${hours}h` : `${days}d`;
|
|
19
|
-
if (hours > 0) return minutes > 0 ? `${hours}h ${minutes}m` : `${hours}h`;
|
|
20
|
-
if (minutes > 0) return seconds > 0 ? `${minutes}m ${seconds}s` : `${minutes}m`;
|
|
21
|
-
return `${seconds}s`;
|
|
8
|
+
return formatJobExecutionTimeLabel(time);
|
|
22
9
|
}
|
|
23
10
|
|
|
24
11
|
//# sourceMappingURL=job-execution-time-text.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/job-detail/job-execution-time-text.tsx"],"sourcesContent":["import {useTimeTick} from '@shipfox/react-ui/time-ticker';\nimport {
|
|
1
|
+
{"version":3,"sources":["../../../src/components/job-detail/job-execution-time-text.tsx"],"sourcesContent":["import {useTimeTick} from '@shipfox/react-ui/time-ticker';\nimport type {JobExecutionTime} from '#core/workflow-run.js';\nimport {formatJobExecutionTimeLabel} from '../job-graph/job-duration-format.js';\n\nexport function JobExecutionTimeText({time}: {time: JobExecutionTime}) {\n useTimeTick();\n\n return formatJobExecutionTime(time);\n}\n\nexport function formatJobExecutionTime(time: JobExecutionTime): string {\n return formatJobExecutionTimeLabel(time);\n}\n"],"names":["useTimeTick","formatJobExecutionTimeLabel","JobExecutionTimeText","time","formatJobExecutionTime"],"mappings":"AAAA,SAAQA,WAAW,QAAO,gCAAgC;AAE1D,SAAQC,2BAA2B,QAAO,sCAAsC;AAEhF,OAAO,SAASC,qBAAqB,EAACC,IAAI,EAA2B;IACnEH;IAEA,OAAOI,uBAAuBD;AAChC;AAEA,OAAO,SAASC,uBAAuBD,IAAsB;IAC3D,OAAOF,4BAA4BE;AACrC"}
|
|
@@ -2,7 +2,7 @@ import { humanDuration } from '@shipfox/react-ui/utils';
|
|
|
2
2
|
export function formatJobExecutionTimeLabel(time) {
|
|
3
3
|
switch(time.state){
|
|
4
4
|
case 'live':
|
|
5
|
-
return humanDuration(time.fromIso);
|
|
5
|
+
return humanDuration(time.fromIso) || '0s';
|
|
6
6
|
case 'fixed':
|
|
7
7
|
return formatFixedDurationLabel(time.elapsed);
|
|
8
8
|
default:
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/job-graph/job-duration-format.ts"],"sourcesContent":["import {humanDuration} from '@shipfox/react-ui/utils';\nimport type {\n JobDisplayDuration,\n JobExecutionDisplayStatus,\n JobExecutionTime,\n} from '#core/workflow-run.js';\n\nexport function formatJobExecutionTimeLabel(time: JobExecutionTime): string {\n switch (time.state) {\n case 'live':\n return humanDuration(time.fromIso);\n case 'fixed':\n return formatFixedDurationLabel(time.elapsed);\n default: {\n const exhaustive: never = time;\n return exhaustive;\n }\n }\n}\n\nexport function formatJobDurationAccessibleLabel(\n duration: JobDisplayDuration | null,\n displayStatus?: JobExecutionDisplayStatus,\n): string | undefined {\n if (duration === null) return undefined;\n\n const label = formatJobExecutionTimeLabel(duration);\n switch (duration.kind) {\n case 'queue':\n return duration.state === 'live' ? `queueing ${label}` : `queued ${label}`;\n case 'run':\n if (duration.state !== 'live') return `ran ${label}`;\n if (displayStatus === 'running') return `running ${label}`;\n return displayStatus === 'pending'\n ? `runner assigned ${label}`\n : `execution elapsed ${label}`;\n default: {\n const exhaustive: never = duration;\n return exhaustive;\n }\n }\n}\n\nfunction formatFixedDurationLabel({\n years = 0,\n months = 0,\n weeks = 0,\n days = 0,\n hours = 0,\n minutes = 0,\n seconds = 0,\n}: Extract<JobExecutionTime, {state: 'fixed'}>['elapsed']): string {\n const totalDays = years * 365 + months * 30 + weeks * 7 + days;\n const totalHours = totalDays * 24 + hours;\n\n if (totalHours > 0) return `${totalHours}h ${pad2(minutes)}m`;\n if (minutes > 0) return `${minutes}m ${pad2(seconds)}s`;\n return `${seconds}s`;\n}\n\nfunction pad2(value: number): string {\n return value.toString().padStart(2, '0');\n}\n"],"names":["humanDuration","formatJobExecutionTimeLabel","time","state","fromIso","formatFixedDurationLabel","elapsed","exhaustive","formatJobDurationAccessibleLabel","duration","displayStatus","undefined","label","kind","years","months","weeks","days","hours","minutes","seconds","totalDays","totalHours","pad2","value","toString","padStart"],"mappings":"AAAA,SAAQA,aAAa,QAAO,0BAA0B;AAOtD,OAAO,SAASC,4BAA4BC,IAAsB;IAChE,OAAQA,KAAKC,KAAK;QAChB,KAAK;YACH,OAAOH,cAAcE,KAAKE,OAAO;
|
|
1
|
+
{"version":3,"sources":["../../../src/components/job-graph/job-duration-format.ts"],"sourcesContent":["import {humanDuration} from '@shipfox/react-ui/utils';\nimport type {\n JobDisplayDuration,\n JobExecutionDisplayStatus,\n JobExecutionTime,\n} from '#core/workflow-run.js';\n\nexport function formatJobExecutionTimeLabel(time: JobExecutionTime): string {\n switch (time.state) {\n case 'live':\n return humanDuration(time.fromIso) || '0s';\n case 'fixed':\n return formatFixedDurationLabel(time.elapsed);\n default: {\n const exhaustive: never = time;\n return exhaustive;\n }\n }\n}\n\nexport function formatJobDurationAccessibleLabel(\n duration: JobDisplayDuration | null,\n displayStatus?: JobExecutionDisplayStatus,\n): string | undefined {\n if (duration === null) return undefined;\n\n const label = formatJobExecutionTimeLabel(duration);\n switch (duration.kind) {\n case 'queue':\n return duration.state === 'live' ? `queueing ${label}` : `queued ${label}`;\n case 'run':\n if (duration.state !== 'live') return `ran ${label}`;\n if (displayStatus === 'running') return `running ${label}`;\n return displayStatus === 'pending'\n ? `runner assigned ${label}`\n : `execution elapsed ${label}`;\n default: {\n const exhaustive: never = duration;\n return exhaustive;\n }\n }\n}\n\nfunction formatFixedDurationLabel({\n years = 0,\n months = 0,\n weeks = 0,\n days = 0,\n hours = 0,\n minutes = 0,\n seconds = 0,\n}: Extract<JobExecutionTime, {state: 'fixed'}>['elapsed']): string {\n const totalDays = years * 365 + months * 30 + weeks * 7 + days;\n const totalHours = totalDays * 24 + hours;\n\n if (totalHours > 0) return `${totalHours}h ${pad2(minutes)}m`;\n if (minutes > 0) return `${minutes}m ${pad2(seconds)}s`;\n return `${seconds}s`;\n}\n\nfunction pad2(value: number): string {\n return value.toString().padStart(2, '0');\n}\n"],"names":["humanDuration","formatJobExecutionTimeLabel","time","state","fromIso","formatFixedDurationLabel","elapsed","exhaustive","formatJobDurationAccessibleLabel","duration","displayStatus","undefined","label","kind","years","months","weeks","days","hours","minutes","seconds","totalDays","totalHours","pad2","value","toString","padStart"],"mappings":"AAAA,SAAQA,aAAa,QAAO,0BAA0B;AAOtD,OAAO,SAASC,4BAA4BC,IAAsB;IAChE,OAAQA,KAAKC,KAAK;QAChB,KAAK;YACH,OAAOH,cAAcE,KAAKE,OAAO,KAAK;QACxC,KAAK;YACH,OAAOC,yBAAyBH,KAAKI,OAAO;QAC9C;YAAS;gBAC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workflow-run-list/workflow-run-list-content.tsx"],"names":[],"mappings":"
|
|
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;AAUrD,UAAU,2BAA2B;IACnC,KAAK,EAAE,oBAAoB,CAAC;IAC5B,SAAS,EAAE,MAAM,CAAC;IAClB,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,gBAAgB,EAAE,OAAO,CAAC;IAC1B,cAAc,EAAE,MAAM,IAAI,CAAC;IAC3B,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB;AAED,wBAAgB,sBAAsB,CAAC,EACrC,KAAK,EACL,SAAS,EACT,IAAI,EACJ,aAAa,EACb,WAAW,EACX,gBAAgB,EAChB,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,GACX,EAAE,2BAA2B,+BA+C7B"}
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { QueryLoadError } from '@shipfox/client-ui';
|
|
3
|
-
import { Panel } from '@shipfox/react-ui/panel';
|
|
4
3
|
import { WorkflowRunListEmpty, WorkflowRunListLoadMore, WorkflowRunListNoMatches, WorkflowRunListSkeleton, WorkflowRunListStaleError } from './workflow-run-list-states.js';
|
|
5
4
|
import { WorkflowRunRowList } from './workflow-run-row.js';
|
|
6
5
|
export function WorkflowRunListContent({ query, totalRuns, runs, workspaceSlug, projectSlug, hasActiveFilters, onClearFilters, hasNextPage, isFetchingNextPage, isFetchNextPageError, onLoadMore }) {
|
|
@@ -17,26 +16,21 @@ export function WorkflowRunListContent({ query, totalRuns, runs, workspaceSlug,
|
|
|
17
16
|
// no-matches state even at zero loaded runs, so the way out is clearing them.
|
|
18
17
|
const showEmptyState = hasLoaded && totalRuns === 0 && !hasActiveFilters;
|
|
19
18
|
const showNoMatches = hasLoaded && runs.length === 0 && !showEmptyState;
|
|
20
|
-
return /*#__PURE__*/ _jsxs(
|
|
21
|
-
className: "min-h-0 flex-1 overflow-y-auto",
|
|
19
|
+
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
22
20
|
children: [
|
|
23
21
|
isPending ? /*#__PURE__*/ _jsx(WorkflowRunListSkeleton, {}) : null,
|
|
24
|
-
!isPending ? /*#__PURE__*/ _jsx(
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
variant: "panel"
|
|
30
|
-
})
|
|
22
|
+
!isPending ? /*#__PURE__*/ _jsx(QueryLoadError, {
|
|
23
|
+
query: query,
|
|
24
|
+
subject: "workflow runs",
|
|
25
|
+
icon: "pulseLine",
|
|
26
|
+
variant: "panel"
|
|
31
27
|
}) : null,
|
|
32
28
|
!isPending && refreshFailed ? /*#__PURE__*/ _jsx(WorkflowRunListStaleError, {
|
|
33
29
|
query: query
|
|
34
30
|
}) : null,
|
|
35
|
-
showEmptyState ? /*#__PURE__*/ _jsx(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
projectSlug: projectSlug
|
|
39
|
-
})
|
|
31
|
+
showEmptyState ? /*#__PURE__*/ _jsx(WorkflowRunListEmpty, {
|
|
32
|
+
workspaceSlug: workspaceSlug,
|
|
33
|
+
projectSlug: projectSlug
|
|
40
34
|
}) : null,
|
|
41
35
|
showNoMatches ? /*#__PURE__*/ _jsx(WorkflowRunListNoMatches, {
|
|
42
36
|
onClear: onClearFilters,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-list-content.tsx"],"sourcesContent":["import {QueryLoadError} from '@shipfox/client-ui';\nimport
|
|
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 WorkflowRunListLoadMore,\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 workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n hasActiveFilters: boolean;\n onClearFilters: () => void;\n hasNextPage: boolean;\n isFetchingNextPage: boolean;\n isFetchNextPageError: boolean;\n onLoadMore?: () => void;\n}\n\nexport function WorkflowRunListContent({\n query,\n totalRuns,\n runs,\n workspaceSlug,\n projectSlug,\n hasActiveFilters,\n onClearFilters,\n hasNextPage,\n isFetchingNextPage,\n isFetchNextPageError,\n onLoadMore,\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. A failed fetch never renders as an empty\n // list: \"nothing here\" and \"we could not find out\" are different answers.\n const refreshFailed = isError && query.data !== undefined;\n // Keyed off \"we have an answer\" rather than \"no error\", so a stale refresh still reports\n // whether the filters match anything instead of leaving the list blank under the banner.\n const hasLoaded = !isPending && query.data !== undefined;\n // An empty result is only an empty *list* when no filter is on. With filters active it is a\n // no-matches state even at zero loaded runs, so the way out is clearing them.\n const showEmptyState = hasLoaded && totalRuns === 0 && !hasActiveFilters;\n const showNoMatches = hasLoaded && runs.length === 0 && !showEmptyState;\n\n return (\n <>\n {isPending ? <WorkflowRunListSkeleton /> : null}\n {!isPending ? (\n <QueryLoadError query={query} subject=\"workflow runs\" icon=\"pulseLine\" variant=\"panel\" />\n ) : null}\n {!isPending && refreshFailed ? <WorkflowRunListStaleError query={query} /> : null}\n {showEmptyState ? (\n <WorkflowRunListEmpty workspaceSlug={workspaceSlug} projectSlug={projectSlug} />\n ) : null}\n {showNoMatches ? (\n <WorkflowRunListNoMatches\n onClear={onClearFilters}\n hasNextPage={hasNextPage}\n isFetchingNextPage={isFetchingNextPage}\n isFetchNextPageError={isFetchNextPageError}\n {...(onLoadMore ? {onLoadMore} : {})}\n />\n ) : null}\n {!isPending && runs.length > 0 ? (\n <>\n <WorkflowRunRowList runs={runs} workspaceSlug={workspaceSlug} projectSlug={projectSlug} />\n <WorkflowRunListLoadMore\n hasNextPage={hasNextPage}\n isFetchingNextPage={isFetchingNextPage}\n isFetchNextPageError={isFetchNextPageError}\n {...(onLoadMore ? {onLoadMore} : {})}\n />\n </>\n ) : null}\n </>\n );\n}\n"],"names":["QueryLoadError","WorkflowRunListEmpty","WorkflowRunListLoadMore","WorkflowRunListNoMatches","WorkflowRunListSkeleton","WorkflowRunListStaleError","WorkflowRunRowList","WorkflowRunListContent","query","totalRuns","runs","workspaceSlug","projectSlug","hasActiveFilters","onClearFilters","hasNextPage","isFetchingNextPage","isFetchNextPageError","onLoadMore","isPending","isError","refreshFailed","data","undefined","hasLoaded","showEmptyState","showNoMatches","length","subject","icon","variant","onClear"],"mappings":";AAAA,SAAQA,cAAc,QAAO,qBAAqB;AAGlD,SACEC,oBAAoB,EACpBC,uBAAuB,EACvBC,wBAAwB,EACxBC,uBAAuB,EACvBC,yBAAyB,QACpB,gCAAgC;AACvC,SAAQC,kBAAkB,QAAO,wBAAwB;AAgBzD,OAAO,SAASC,uBAAuB,EACrCC,KAAK,EACLC,SAAS,EACTC,IAAI,EAC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ources":["../../../src/components/workflow-run-list/workflow-run-list-states.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;
|
|
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;AAU5D;;;;GAIG;AACH,wBAAgB,uBAAuB,gCAkBtC;AAED;;;;GAIG;AACH,wBAAgB,yBAAyB,CAAC,EAAC,KAAK,EAAC,EAAE;IAAC,KAAK,EAAE,mBAAmB,CAAA;CAAC,+BAqB9E;AAED,wBAAgB,oBAAoB,CAAC,EACnC,aAAa,EACb,WAAW,GACZ,EAAE;IACD,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,+BAqBA;AAED;;;;;;;;GAQG;AACH,wBAAgB,wBAAwB,CAAC,EACvC,OAAO,EACP,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,GACX,EAAE;IACD,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB,+BAsCA;AAED,wBAAgB,uBAAuB,CAAC,EACtC,WAAW,EACX,kBAAkB,EAClB,oBAAoB,EACpB,UAAU,GACX,EAAE;IACD,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,oBAAoB,EAAE,OAAO,CAAC;IAC9B,UAAU,CAAC,EAAE,MAAM,IAAI,CAAC;CACzB,sCAqBA"}
|
|
@@ -2,7 +2,6 @@ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
|
|
|
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';
|
|
@@ -12,7 +11,7 @@ const SKELETON_ROW_COUNT = 8;
|
|
|
12
11
|
* the first page lands. Only the initial load renders these: a refetch keeps the rows it has,
|
|
13
12
|
* per the design system's rule against animating frequently-updating data.
|
|
14
13
|
*/ export function WorkflowRunListSkeleton() {
|
|
15
|
-
return /*#__PURE__*/ _jsx(
|
|
14
|
+
return /*#__PURE__*/ _jsx("div", {
|
|
16
15
|
role: "status",
|
|
17
16
|
"aria-label": "Loading runs",
|
|
18
17
|
className: "@container divide-y",
|
|
@@ -103,43 +102,41 @@ export function WorkflowRunListEmpty({ workspaceSlug, projectSlug }) {
|
|
|
103
102
|
* different ones. It is also the only reset within reach below `md`, where the toolbar's
|
|
104
103
|
* lives inside the filter sheet.
|
|
105
104
|
*/ export function WorkflowRunListNoMatches({ onClear, hasNextPage, isFetchingNextPage, isFetchNextPageError, onLoadMore }) {
|
|
106
|
-
return /*#__PURE__*/
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
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
|
-
})
|
|
105
|
+
return /*#__PURE__*/ _jsxs("div", {
|
|
106
|
+
className: "flex flex-col gap-inline",
|
|
107
|
+
children: [
|
|
108
|
+
isFetchNextPageError ? /*#__PURE__*/ _jsx(Callout, {
|
|
109
|
+
role: "alert",
|
|
110
|
+
type: "error",
|
|
111
|
+
children: "Could not load more workflow runs. Try again to continue searching older runs."
|
|
112
|
+
}) : null,
|
|
113
|
+
/*#__PURE__*/ _jsx(EmptyState, {
|
|
114
|
+
icon: "filterOffLine",
|
|
115
|
+
title: hasNextPage ? 'No matches in loaded history' : 'No matching runs',
|
|
116
|
+
description: hasNextPage ? 'No loaded run matches these filters. Load more to search further back.' : 'No run matches these filters.',
|
|
117
|
+
action: /*#__PURE__*/ _jsxs("div", {
|
|
118
|
+
className: "flex flex-wrap justify-center gap-inline",
|
|
119
|
+
children: [
|
|
120
|
+
hasNextPage && onLoadMore ? /*#__PURE__*/ _jsx(Button, {
|
|
121
|
+
type: "button",
|
|
122
|
+
size: "sm",
|
|
123
|
+
variant: "primary",
|
|
124
|
+
isLoading: isFetchingNextPage,
|
|
125
|
+
onClick: onLoadMore,
|
|
126
|
+
children: "Load more runs"
|
|
127
|
+
}) : null,
|
|
128
|
+
/*#__PURE__*/ _jsx(Button, {
|
|
129
|
+
type: "button",
|
|
130
|
+
size: "sm",
|
|
131
|
+
variant: "secondary",
|
|
132
|
+
onClick: onClear,
|
|
133
|
+
children: "Show all runs"
|
|
134
|
+
})
|
|
135
|
+
]
|
|
136
|
+
}),
|
|
137
|
+
variant: "panel"
|
|
138
|
+
})
|
|
139
|
+
]
|
|
143
140
|
});
|
|
144
141
|
}
|
|
145
142
|
export function WorkflowRunListLoadMore({ hasNextPage, isFetchingNextPage, isFetchNextPageError, onLoadMore }) {
|
|
@@ -1 +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 {
|
|
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';\nimport {Link} from '@tanstack/react-router';\n\nconst SKELETON_ROW_COUNT = 8;\n\n/**\n * Placeholder rows at the real row height, so the list does not resize under the cursor when\n * the first page lands. Only the initial load renders these: a refetch keeps the rows it has,\n * per the design system's rule against animating frequently-updating data.\n */\nexport function WorkflowRunListSkeleton() {\n return (\n <div role=\"status\" aria-label=\"Loading runs\" className=\"@container divide-y\">\n {Array.from({length: SKELETON_ROW_COUNT}).map((_, index) => (\n <div\n // biome-ignore lint/suspicious/noArrayIndexKey: skeleton row, stable position\n key={index}\n className=\"flex min-h-44 items-center gap-inline px-row py-row @min-[976px]:h-44 @min-[976px]:py-0\"\n >\n <Skeleton className=\"size-14 shrink-0 rounded-full\" />\n <Skeleton className=\"h-12 w-[220px] max-w-[40%]\" />\n <Skeleton className=\"ml-auto hidden h-12 w-96 @min-[1200px]:block\" />\n <Skeleton className=\"h-12 w-48\" />\n <Skeleton className=\"h-12 w-48\" />\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=\"pb-[8px]\">\n <Callout role=\"alert\" type=\"error\">\n <div className=\"flex items-center justify-between gap-inline\">\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 workspaceSlug,\n projectSlug,\n}: {\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n}) {\n return (\n <EmptyState\n icon=\"pulseLine\"\n title=\"No runs yet\"\n description=\"Runs from this project's workflows appear here the moment one is launched.\"\n action={\n workspaceSlug && projectSlug ? (\n <Button asChild type=\"button\" size=\"sm\" variant=\"primary\">\n <Link\n to=\"/w/$workspaceSlug/p/$projectSlug/workflows\"\n params={{workspaceSlug, projectSlug}}\n >\n View workflows\n </Link>\n </Button>\n ) : null\n }\n variant=\"panel\"\n />\n );\n}\n\n/**\n * The filtered-empty state, deliberately distinct from the unfiltered one: someone who\n * filtered their way to nothing needs a way back out, not an onboarding call to action.\n *\n * Its reset is worded as its outcome rather than repeating the toolbar's \"Clear filters\"\n * verbatim, so the two controls on screen read as one action offered twice rather than two\n * different ones. It is also the only reset within reach below `md`, where the toolbar's\n * lives inside the filter sheet.\n */\nexport function WorkflowRunListNoMatches({\n onClear,\n hasNextPage,\n isFetchingNextPage,\n isFetchNextPageError,\n onLoadMore,\n}: {\n onClear: () => void;\n hasNextPage: boolean;\n isFetchingNextPage: boolean;\n isFetchNextPageError: boolean;\n onLoadMore?: () => void;\n}) {\n return (\n <div className=\"flex flex-col gap-inline\">\n {isFetchNextPageError ? (\n <Callout role=\"alert\" type=\"error\">\n Could not load more workflow runs. Try again to continue searching older runs.\n </Callout>\n ) : null}\n <EmptyState\n icon=\"filterOffLine\"\n title={hasNextPage ? 'No matches in loaded history' : 'No matching runs'}\n description={\n hasNextPage\n ? 'No loaded run matches these filters. Load more to search further back.'\n : 'No run matches these filters.'\n }\n action={\n <div className=\"flex flex-wrap justify-center gap-inline\">\n {hasNextPage && onLoadMore ? (\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"primary\"\n isLoading={isFetchingNextPage}\n onClick={onLoadMore}\n >\n Load more runs\n </Button>\n ) : null}\n <Button type=\"button\" size=\"sm\" variant=\"secondary\" onClick={onClear}>\n Show all runs\n </Button>\n </div>\n }\n variant=\"panel\"\n />\n </div>\n );\n}\n\nexport function WorkflowRunListLoadMore({\n hasNextPage,\n isFetchingNextPage,\n isFetchNextPageError,\n onLoadMore,\n}: {\n hasNextPage: boolean;\n isFetchingNextPage: boolean;\n isFetchNextPageError: boolean;\n onLoadMore?: () => void;\n}) {\n if (!hasNextPage || !onLoadMore) return null;\n\n return (\n <div className=\"flex flex-col items-center gap-inline border-t border-border-neutral-base py-row\">\n {isFetchNextPageError ? (\n <Callout role=\"alert\" type=\"error\">\n Could not load more workflow runs. Try again.\n </Callout>\n ) : null}\n <Button\n type=\"button\"\n size=\"sm\"\n variant=\"secondary\"\n isLoading={isFetchingNextPage}\n onClick={onLoadMore}\n >\n Load more runs\n </Button>\n </div>\n );\n}\n"],"names":["Button","Callout","EmptyState","Skeleton","Text","Link","SKELETON_ROW_COUNT","WorkflowRunListSkeleton","div","role","aria-label","className","Array","from","length","map","_","index","WorkflowRunListStaleError","query","type","size","variant","isLoading","isFetching","onClick","refetch","WorkflowRunListEmpty","workspaceSlug","projectSlug","icon","title","description","action","asChild","to","params","WorkflowRunListNoMatches","onClear","hasNextPage","isFetchingNextPage","isFetchNextPageError","onLoadMore","WorkflowRunListLoadMore"],"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;AAClD,SAAQC,IAAI,QAAO,yBAAyB;AAE5C,MAAMC,qBAAqB;AAE3B;;;;CAIC,GACD,OAAO,SAASC;IACd,qBACE,KAACC;QAAIC,MAAK;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Q,cAAc,iCAAiC;gBACtDP,aACEO,cACI,2EACA;gBAENN,sBACE,MAACzB;oBAAIG,WAAU;;wBACZ4B,eAAeG,2BACd,KAAC1C;4BACCoB,MAAK;4BACLC,MAAK;4BACLC,SAAQ;4BACRC,WAAWiB;4BACXf,SAASiB;sCACV;6BAGC;sCACJ,KAAC1C;4BAAOoB,MAAK;4BAASC,MAAK;4BAAKC,SAAQ;4BAAYG,SAASa;sCAAS;;;;gBAK1EhB,SAAQ;;;;AAIhB;AAEA,OAAO,SAASqB,wBAAwB,EACtCJ,WAAW,EACXC,kBAAkB,EAClBC,oBAAoB,EACpBC,UAAU,EAMX;IACC,IAAI,CAACH,eAAe,CAACG,YAAY,OAAO;IAExC,qBACE,MAAClC;QAAIG,WAAU;;YACZ8B,qCACC,KAACxC;gBAAQQ,MAAK;gBAAQW,MAAK;0BAAQ;iBAGjC;0BACJ,KAACpB;gBACCoB,MAAK;gBACLC,MAAK;gBACLC,SAAQ;gBACRC,WAAWiB;gBACXf,SAASiB;0BACV;;;;AAKP"}
|
|
@@ -60,7 +60,7 @@ export function WorkflowRunListView({ runs, query, workspaceSlug, projectSlug, c
|
|
|
60
60
|
})
|
|
61
61
|
}),
|
|
62
62
|
/*#__PURE__*/ _jsx(PanelBody, {
|
|
63
|
-
className: "min-h-0 flex-1",
|
|
63
|
+
className: "min-h-0 flex-1 overflow-y-auto",
|
|
64
64
|
children: /*#__PURE__*/ _jsx(WorkflowRunListContent, {
|
|
65
65
|
query: query,
|
|
66
66
|
totalRuns: runs.length,
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-list-view.tsx"],"sourcesContent":["import {Panel, PanelBody, PanelHeader} from '@shipfox/react-ui/panel';\nimport {TimeTickerProvider} from '@shipfox/react-ui/time-ticker';\nimport {Header} from '@shipfox/react-ui/typography';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {useId, useMemo, useState} from 'react';\nimport {\n applyWorkflowRunFilterPatch,\n clearWorkflowRunFilters,\n hasWorkflowRunFilters,\n type WorkflowRunFilterPatch,\n type WorkflowRunsSearch,\n} from '#routes/inputs.js';\nimport {runMatchesFilters, workflowRunFacets} from './run-display.js';\nimport type {WorkflowRunListViewProps} from './types.js';\nimport {WorkflowRunFilters} from './workflow-run-filters.js';\nimport {WorkflowRunListContent} from './workflow-run-list-content.js';\n\nconst EMPTY_SEARCH: WorkflowRunsSearch = {};\n\nexport function WorkflowRunListView({\n runs,\n query,\n workspaceSlug,\n projectSlug,\n className,\n search = EMPTY_SEARCH,\n onFiltersChange,\n onClearFilters,\n hasNextPage = false,\n isFetchingNextPage = false,\n isFetchNextPageError = false,\n onLoadMore,\n}: WorkflowRunListViewProps) {\n const headingId = useId();\n const [localSearch, setLocalSearch] = useState<WorkflowRunsSearch>(search);\n const currentSearch = onFiltersChange ? search : localSearch;\n\n const filteredRuns = useMemo(\n () => runs.filter((run) => runMatchesFilters(run, currentSearch)),\n [runs, currentSearch],\n );\n const facets = useMemo(() => workflowRunFacets(runs, currentSearch), [runs, currentSearch]);\n const hasActiveFilters = hasWorkflowRunFilters(currentSearch);\n\n function handleFiltersChange(patch: WorkflowRunFilterPatch) {\n if (onFiltersChange) onFiltersChange(patch);\n else setLocalSearch((previous) => applyWorkflowRunFilterPatch(previous, patch));\n }\n\n function handleClearFilters() {\n // Uncontrolled, the view owns the filters, so it clears them itself and still reports the\n // change; a caller that passes only `onClearFilters` would otherwise see nothing happen.\n if (!onFiltersChange) setLocalSearch(clearWorkflowRunFilters);\n else if (!onClearFilters) onFiltersChange(CLEAR_ALL_FILTERS);\n onClearFilters?.();\n }\n\n return (\n <TimeTickerProvider intervalMs={1000} reducedMotionIntervalMs={10_000}>\n <section\n aria-labelledby={headingId}\n className={cn('flex min-h-0 min-w-0 flex-1 flex-col', className)}\n >\n {/* The tab strip above already reads \"Runs\", so the page heading is for structure and\n assistive tech rather than a second visible title competing with it. */}\n <Header id={headingId} variant=\"h1\" className=\"sr-only\">\n Workflow runs\n </Header>\n\n <Panel className=\"min-h-0 flex-1\">\n <PanelHeader className=\"flex-wrap\">\n <WorkflowRunFilters\n search={currentSearch}\n facets={facets}\n onChange={handleFiltersChange}\n onClear={handleClearFilters}\n hasActiveFilters={hasActiveFilters}\n />\n </PanelHeader>\n <PanelBody className=\"min-h-0 flex-1\">\n <WorkflowRunListContent\n query={query}\n totalRuns={runs.length}\n runs={filteredRuns}\n workspaceSlug={workspaceSlug}\n projectSlug={projectSlug}\n hasActiveFilters={hasActiveFilters}\n onClearFilters={handleClearFilters}\n hasNextPage={hasNextPage}\n isFetchingNextPage={isFetchingNextPage}\n isFetchNextPageError={isFetchNextPageError}\n {...(onLoadMore ? {onLoadMore} : {})}\n />\n </PanelBody>\n </Panel>\n </section>\n </TimeTickerProvider>\n );\n}\n\nconst CLEAR_ALL_FILTERS: WorkflowRunFilterPatch = {\n search: undefined,\n status: undefined,\n branch: undefined,\n actor: undefined,\n event: undefined,\n after: undefined,\n before: undefined,\n};\n"],"names":["Panel","PanelBody","PanelHeader","TimeTickerProvider","Header","cn","useId","useMemo","useState","applyWorkflowRunFilterPatch","clearWorkflowRunFilters","hasWorkflowRunFilters","runMatchesFilters","workflowRunFacets","WorkflowRunFilters","WorkflowRunListContent","EMPTY_SEARCH","WorkflowRunListView","runs","query","workspaceSlug","projectSlug","className","search","onFiltersChange","onClearFilters","hasNextPage","isFetchingNextPage","isFetchNextPageError","onLoadMore","headingId","localSearch","setLocalSearch","currentSearch","filteredRuns","filter","run","facets","hasActiveFilters","handleFiltersChange","patch","previous","handleClearFilters","CLEAR_ALL_FILTERS","intervalMs","reducedMotionIntervalMs","section","aria-labelledby","id","variant","onChange","onClear","totalRuns","length","undefined","status","branch","actor","event","after","before"],"mappings":";AAAA,SAAQA,KAAK,EAAEC,SAAS,EAAEC,WAAW,QAAO,0BAA0B;AACtE,SAAQC,kBAAkB,QAAO,gCAAgC;AACjE,SAAQC,MAAM,QAAO,+BAA+B;AACpD,SAAQ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iB;;8BAItD,KAAClB;oBAAO4C,IAAIlB;oBAAWmB,SAAQ;oBAAK3B,WAAU;8BAAU;;8BAIxD,MAACtB;oBAAMsB,WAAU;;sCACf,KAACpB;4BAAYoB,WAAU;sCACrB,cAAA,KAACR;gCACCS,QAAQU;gCACRI,QAAQA;gCACRa,UAAUX;gCACVY,SAAST;gCACTJ,kBAAkBA;;;sCAGtB,KAACrC;4BAAUqB,WAAU;sCACnB,cAAA,KAACP;gCACCI,OAAOA;gCACPiC,WAAWlC,KAAKmC,MAAM;gCACtBnC,MAAMgB;gCACNd,eAAeA;gCACfC,aAAaA;gCACbiB,kBAAkBA;gCAClBb,gBAAgBiB;gCAChBhB,aAAaA;gCACbC,oBAAoBA;gCACpBC,sBAAsBA;gCACrB,GAAIC,aAAa;oCAACA;gCAAU,IAAI,CAAC,CAAC;;;;;;;;AAOjD;AAEA,MAAMc,oBAA4C;IAChDpB,QAAQ+B;IACRC,QAAQD;IACRE,QAAQF;IACRG,OAAOH;IACPI,OAAOJ;IACPK,OAAOL;IACPM,QAAQN;AACV"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-list-view.tsx"],"sourcesContent":["import {Panel, PanelBody, PanelHeader} from '@shipfox/react-ui/panel';\nimport {TimeTickerProvider} from '@shipfox/react-ui/time-ticker';\nimport {Header} from '@shipfox/react-ui/typography';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {useId, useMemo, useState} from 'react';\nimport {\n applyWorkflowRunFilterPatch,\n clearWorkflowRunFilters,\n hasWorkflowRunFilters,\n type WorkflowRunFilterPatch,\n type WorkflowRunsSearch,\n} from '#routes/inputs.js';\nimport {runMatchesFilters, workflowRunFacets} from './run-display.js';\nimport type {WorkflowRunListViewProps} from './types.js';\nimport {WorkflowRunFilters} from './workflow-run-filters.js';\nimport {WorkflowRunListContent} from './workflow-run-list-content.js';\n\nconst EMPTY_SEARCH: WorkflowRunsSearch = {};\n\nexport function WorkflowRunListView({\n runs,\n query,\n workspaceSlug,\n projectSlug,\n className,\n search = EMPTY_SEARCH,\n onFiltersChange,\n onClearFilters,\n hasNextPage = false,\n isFetchingNextPage = false,\n isFetchNextPageError = false,\n onLoadMore,\n}: WorkflowRunListViewProps) {\n const headingId = useId();\n const [localSearch, setLocalSearch] = useState<WorkflowRunsSearch>(search);\n const currentSearch = onFiltersChange ? search : localSearch;\n\n const filteredRuns = useMemo(\n () => runs.filter((run) => runMatchesFilters(run, currentSearch)),\n [runs, currentSearch],\n );\n const facets = useMemo(() => workflowRunFacets(runs, currentSearch), [runs, currentSearch]);\n const hasActiveFilters = hasWorkflowRunFilters(currentSearch);\n\n function handleFiltersChange(patch: WorkflowRunFilterPatch) {\n if (onFiltersChange) onFiltersChange(patch);\n else setLocalSearch((previous) => applyWorkflowRunFilterPatch(previous, patch));\n }\n\n function handleClearFilters() {\n // Uncontrolled, the view owns the filters, so it clears them itself and still reports the\n // change; a caller that passes only `onClearFilters` would otherwise see nothing happen.\n if (!onFiltersChange) setLocalSearch(clearWorkflowRunFilters);\n else if (!onClearFilters) onFiltersChange(CLEAR_ALL_FILTERS);\n onClearFilters?.();\n }\n\n return (\n <TimeTickerProvider intervalMs={1000} reducedMotionIntervalMs={10_000}>\n <section\n aria-labelledby={headingId}\n className={cn('flex min-h-0 min-w-0 flex-1 flex-col', className)}\n >\n {/* The tab strip above already reads \"Runs\", so the page heading is for structure and\n assistive tech rather than a second visible title competing with it. */}\n <Header id={headingId} variant=\"h1\" className=\"sr-only\">\n Workflow runs\n </Header>\n\n <Panel className=\"min-h-0 flex-1\">\n <PanelHeader className=\"flex-wrap\">\n <WorkflowRunFilters\n search={currentSearch}\n facets={facets}\n onChange={handleFiltersChange}\n onClear={handleClearFilters}\n hasActiveFilters={hasActiveFilters}\n />\n </PanelHeader>\n <PanelBody className=\"min-h-0 flex-1 overflow-y-auto\">\n <WorkflowRunListContent\n query={query}\n totalRuns={runs.length}\n runs={filteredRuns}\n workspaceSlug={workspaceSlug}\n projectSlug={projectSlug}\n hasActiveFilters={hasActiveFilters}\n onClearFilters={handleClearFilters}\n hasNextPage={hasNextPage}\n isFetchingNextPage={isFetchingNextPage}\n isFetchNextPageError={isFetchNextPageError}\n {...(onLoadMore ? {onLoadMore} : {})}\n />\n </PanelBody>\n </Panel>\n </section>\n </TimeTickerProvider>\n );\n}\n\nconst CLEAR_ALL_FILTERS: WorkflowRunFilterPatch = {\n search: undefined,\n status: undefined,\n branch: undefined,\n actor: undefined,\n event: undefined,\n after: undefined,\n before: undefined,\n};\n"],"names":["Panel","PanelBody","PanelHeader","TimeTickerProvider","Header","cn","useId","useMemo","useState","applyWorkflowRunFilterPatch","clearWorkflowRunFilters","hasWorkflowRunFilters","runMatchesFilters","workflowRunFacets","WorkflowRunFilters","WorkflowRunListContent","EMPTY_SEARCH","WorkflowRunListView","runs","query","workspaceSlug","projectSlug","className","search","onFiltersChange","onClearFilters","hasNextPage","isFetchingNextPage","isFetchNextPageError","onLoadMore","headingId","localSearch","setLocalSearch","currentSearch","filteredRuns","filter","run","facets","hasActiveFilters","handleFiltersChange","patch","previous","handleClearFilters","CLEAR_ALL_FILTERS","intervalMs","reducedMotionIntervalMs","section","aria-labelledby","id","variant","onChange","onClear","totalRuns","length","undefined","status","branch","actor","event","after","before"],"mappings":";AAAA,SAAQA,KAAK,EAAEC,SAAS,EAAEC,WAAW,QAAO,0BAA0B;AACtE,SAAQC,kBAAkB,QAAO,gCAAgC;AACjE,SAAQC,MAAM,QAAO,+BAA+B;AACpD,SAAQC,EAAE,QAAO,0BAA0B;AAC3C,SAAQC,KAAK,EAAEC,OAAO,EAAEC,QAAQ,QAAO,QAAQ;AAC/C,SACEC,2BAA2B,EAC3BC,uBAAuB,EACvBC,qBAAqB,QAGhB,oBAAoB;AAC3B,SAAQC,iBAAiB,EAAEC,iBAAiB,QAAO,mBAAmB;AAEtE,SAAQC,kBAAkB,QAAO,4BAA4B;AAC7D,SAAQC,sBAAsB,QAAO,iCAAiC;AAEtE,MAAMC,eAA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;gCACPiC,WAAWlC,KAAKmC,MAAM;gCACtBnC,MAAMgB;gCACNd,eAAeA;gCACfC,aAAaA;gCACbiB,kBAAkBA;gCAClBb,gBAAgBiB;gCAChBhB,aAAaA;gCACbC,oBAAoBA;gCACpBC,sBAAsBA;gCACrB,GAAIC,aAAa;oCAACA;gCAAU,IAAI,CAAC,CAAC;;;;;;;;AAOjD;AAEA,MAAMc,oBAA4C;IAChDpB,QAAQ+B;IACRC,QAAQD;IACRE,QAAQF;IACRG,OAAOH;IACPI,OAAOJ;IACPK,OAAOL;IACPM,QAAQN;AACV"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"workflow-run-row.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-list/workflow-run-row.tsx"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"workflow-run-row.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-list/workflow-run-row.tsx"],"names":[],"mappings":"AAiBA,OAAO,EACL,KAAK,mBAAmB,EAIzB,MAAM,uBAAuB,CAAC;AAI/B,wBAAgB,kBAAkB,CAAC,EACjC,IAAI,EACJ,aAAa,EACb,WAAW,GACZ,EAAE;IACD,IAAI,EAAE,mBAAmB,EAAE,CAAC;IAC5B,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,+BAaA;AAED;;;;;;;;;;;GAWG;AACH,wBAAgB,cAAc,CAAC,EAC7B,GAAG,EACH,aAAa,EACb,WAAW,GACZ,EAAE;IACD,GAAG,EAAE,mBAAmB,CAAC;IACzB,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAClC,+BAgGA"}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
2
|
import { TriggerSourceIcon } from '@shipfox/client-triggers';
|
|
3
3
|
import { Icon } from '@shipfox/react-ui/icon';
|
|
4
|
-
import { Panel } from '@shipfox/react-ui/panel';
|
|
5
4
|
import { RelativeTime } from '@shipfox/react-ui/relative-time';
|
|
6
5
|
import { Tooltip, TooltipContent, TooltipTrigger } from '@shipfox/react-ui/tooltip';
|
|
7
6
|
import { Code, Text } from '@shipfox/react-ui/typography';
|
|
@@ -18,18 +17,15 @@ export function WorkflowRunRowList({ runs, workspaceSlug, projectSlug }) {
|
|
|
18
17
|
return(// A container, not the viewport, drives the row's breakpoints. What a row can afford is its
|
|
19
18
|
// own width; keying off the viewport would keep the job strip hidden on a wide screen or
|
|
20
19
|
// crush it on a narrow one.
|
|
21
|
-
/*#__PURE__*/ _jsx(
|
|
22
|
-
className: "@container",
|
|
23
|
-
children:
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
})
|
|
31
|
-
}, run.id))
|
|
32
|
-
})
|
|
20
|
+
/*#__PURE__*/ _jsx("ul", {
|
|
21
|
+
className: "@container divide-y divide-border-neutral-base",
|
|
22
|
+
children: runs.map((run)=>/*#__PURE__*/ _jsx("li", {
|
|
23
|
+
children: /*#__PURE__*/ _jsx(WorkflowRunRow, {
|
|
24
|
+
run: run,
|
|
25
|
+
workspaceSlug: workspaceSlug,
|
|
26
|
+
projectSlug: projectSlug
|
|
27
|
+
})
|
|
28
|
+
}, run.id))
|
|
33
29
|
}));
|
|
34
30
|
}
|
|
35
31
|
/**
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-row.tsx"],"sourcesContent":["import {TriggerSourceIcon} from '@shipfox/client-triggers';\nimport {Icon, type IconName} from '@shipfox/react-ui/icon';\nimport {Panel} from '@shipfox/react-ui/panel';\nimport {RelativeTime} from '@shipfox/react-ui/relative-time';\nimport {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {Code, Text} from '@shipfox/react-ui/typography';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {Link} from '@tanstack/react-router';\nimport {\n useWorkflowRunDurationAccessibleLabel,\n WorkflowRunDurationLabel,\n} from '#components/workflow-run-duration-label.js';\nimport {\n formatWorkflowRunNumberLabel,\n WorkflowRunNumberLabel,\n} from '#components/workflow-run-number-label.js';\nimport {getWorkflowStatusVisual} from '#components/workflow-status/status-visuals.js';\nimport {WorkflowStatusIcon} from '#components/workflow-status/workflow-status-icon.js';\nimport {\n type WorkflowRunListItem,\n workflowRunActor,\n workflowRunBranchLabel,\n workflowRunCommitLabel,\n} from '#core/workflow-run.js';\nimport {withoutWorkflowRunSelectionSearch} from '#core/workflow-run-url-state.js';\nimport {JOB_STATUS_STRIP_WIDTH, JobStatusStrip, jobStatusSummary} from './job-status-strip.js';\n\nexport function WorkflowRunRowList({\n runs,\n workspaceSlug,\n projectSlug,\n}: {\n runs: WorkflowRunListItem[];\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n}) {\n return (\n // A container, not the viewport, drives the row's breakpoints. What a row can afford is its\n // own width; keying off the viewport would keep the job strip hidden on a wide screen or\n // crush it on a narrow one.\n <Panel className=\"@container\">\n <ul className=\"divide-y divide-border-neutral-base\">\n {runs.map((run) => (\n <li key={run.id}>\n <WorkflowRunRow run={run} workspaceSlug={workspaceSlug} projectSlug={projectSlug} />\n </li>\n ))}\n </ul>\n </Panel>\n );\n}\n\n/**\n * One run at full width.\n *\n * A single 44px line once the list is at least 976px wide, reflowing to two lines below that:\n * the identity and the numerics keep their places on line one, and the provenance metadata\n * drops beneath. The numeric columns are fixed-width so duration and time form real columns\n * down the list rather than tracking each row's name length.\n *\n * The 976px threshold keeps identity and provenance on one line; below it, provenance drops\n * beneath the identity. The 1200px threshold keeps the full job preview and numeric columns\n * readable together; below it, the strip is hidden so the numeric columns remain aligned.\n */\nexport function WorkflowRunRow({\n run,\n workspaceSlug,\n projectSlug,\n}: {\n run: WorkflowRunListItem;\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n}) {\n const duration = run.runAttempt.displayDuration;\n const hasStarted = run.jobs.hasStartedJobExecution;\n const durationLabel = useWorkflowRunDurationAccessibleLabel(duration, hasStarted);\n const status = run.runAttempt.status;\n const statusLabel = getWorkflowStatusVisual(status).label;\n const runNumberLabel = formatWorkflowRunNumberLabel(run);\n const branch = workflowRunBranchLabel(run);\n const commit = workflowRunCommitLabel(run);\n const actor = workflowRunActor(run);\n\n const body = (\n <>\n <WorkflowStatusIcon status={status} size={14} className=\"shrink-0\" />\n\n <div className=\"flex min-w-0 flex-1 flex-col gap-tight @min-[976px]:flex-row @min-[976px]:items-center @min-[976px]:gap-cluster\">\n <span className=\"flex min-w-0 items-center gap-inline @min-[976px]:flex-1\">\n <Code variant=\"label\" bold className=\"truncate text-foreground-neutral-base\">\n {run.name}\n </Code>\n {run.number !== null ? <WorkflowRunNumberLabel run={run} /> : null}\n </span>\n\n <span className=\"flex min-w-0 flex-wrap items-center gap-inline text-foreground-neutral-subtle @min-[976px]:flex-nowrap @min-[976px]:shrink-0\">\n {run.triggerDisplayLabel ? <TriggerLabel run={run} /> : null}\n {branch ? <BranchLabel branch={branch} isPullRequest={branch.startsWith('#')} /> : null}\n {commit ? <CommitLabel commit={commit} /> : null}\n {actor ? <ActorLabel actor={actor} /> : null}\n </span>\n </div>\n\n <span className=\"flex shrink-0 items-center gap-cluster\">\n {/* Reserve the API preview's full width so the overflow count cannot paint over the\n duration, and keep it even when a run has no jobs planned yet so the numerics stay in\n line down the list instead of stepping in and out. The max-content width expands if\n the payload ever exceeds the current API preview bound. */}\n <span\n className=\"hidden w-max shrink-0 @min-[1200px]:flex\"\n style={{minWidth: JOB_STATUS_STRIP_WIDTH}}\n >\n <JobStatusStrip jobs={run.jobs} />\n </span>\n <span className=\"flex w-64 justify-end\">\n <WorkflowRunDurationLabel duration={duration} hasStarted={hasStarted} />\n </span>\n <Code\n variant=\"label\"\n className=\"w-64 shrink-0 text-right tabular-nums text-foreground-neutral-muted\"\n >\n <RelativeTime value={run.createdAt} />\n </Code>\n </span>\n </>\n );\n\n // Rows run edge to edge inside the list's scroll container, which would clip the standard\n // outset focus ring, so this one is inset per the design system's focus-ring rule.\n const rowClassName =\n 'flex w-full min-w-0 items-center gap-inline px-row py-row text-left transition-colors hover:bg-background-neutral-hover focus-visible:shadow-focus-inset focus-visible:outline-none @min-[976px]:h-44 @min-[976px]:py-0';\n\n // Optimistic manual runs (temp-<uuid>) have no detail page until the canonical row\n // replaces them on the next poll, so they render non-interactively instead of as a link\n // that would navigate to a workflow run id the detail route rejects.\n if (run.isTemporary || !workspaceSlug || !projectSlug) {\n return <div className={rowClassName}>{body}</div>;\n }\n\n return (\n <Link\n to=\"/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId\"\n params={{workspaceSlug, projectSlug, workflowRunId: run.id}}\n search={\n ((previous: Record<string, unknown>) =>\n withoutWorkflowRunSelectionSearch(previous)) as never\n }\n // An aria-label is the link's whole accessible name, so anything inside the row that\n // carries its own label (the status glyph, the job strip) goes unspoken unless it is\n // curated in here. The job breakdown is the reason this list is worth its width, so it\n // belongs in what a tabbing user hears, not only in browse mode.\n aria-label={[\n run.name,\n runNumberLabel,\n statusLabel,\n durationLabel,\n run.triggerLabel,\n branch ? `branch ${branch}` : undefined,\n actor ? `by ${actor}` : undefined,\n run.jobs.total > 0 ? jobStatusSummary(run.jobs) : undefined,\n ]\n .filter((part): part is string => Boolean(part))\n .join(', ')}\n className={rowClassName}\n >\n {body}\n </Link>\n );\n}\n\nfunction TriggerLabel({run}: {run: WorkflowRunListItem}) {\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <span className=\"flex min-w-0 max-w-[140px] items-center gap-tight outline-none\">\n <TriggerSourceIcon\n provider={run.triggerProvider}\n source={run.triggerSource}\n aria-hidden=\"true\"\n className=\"size-12 shrink-0 text-foreground-neutral-muted\"\n />\n <Text as=\"span\" size=\"xs\" className=\"min-w-0 truncate\">\n {run.triggerDisplayLabel}\n </Text>\n </span>\n </TooltipTrigger>\n <TooltipContent>\n <Text as=\"span\" size=\"xs\" className=\"block max-w-[360px] break-words\">\n {run.triggerLabel}\n </Text>\n </TooltipContent>\n </Tooltip>\n );\n}\n\nfunction BranchLabel({branch, isPullRequest}: {branch: string; isPullRequest: boolean}) {\n return (\n <MetadataChip\n icon={isPullRequest ? 'gitPullRequestLine' : 'gitBranchLine'}\n title={isPullRequest ? `Pull request ${branch}` : `Branch ${branch}`}\n className=\"max-w-[180px]\"\n >\n {branch}\n </MetadataChip>\n );\n}\n\nfunction CommitLabel({commit}: {commit: string}) {\n return (\n <MetadataChip icon=\"gitCommitLine\" title={`Commit ${commit}`}>\n {commit}\n </MetadataChip>\n );\n}\n\nfunction ActorLabel({actor}: {actor: string}) {\n return (\n <MetadataChip\n icon=\"userLine\"\n title={`Triggered by ${actor}`}\n // Dropped once the row is two lines, where the provenance line has to stay readable on\n // a phone.\n className=\"hidden max-w-[120px] @min-[976px]:flex\"\n >\n {actor}\n </MetadataChip>\n );\n}\n\n/**\n * A ref, SHA, or handle: monospace because it is content a user copies or pattern-matches,\n * with the icon carrying the kind so the value itself never needs a written label.\n */\nfunction MetadataChip({\n icon,\n title,\n className,\n children,\n}: {\n icon: IconName;\n title: string;\n className?: string | undefined;\n children: string;\n}) {\n return (\n <span className={cn('flex min-w-0 shrink-0 items-center gap-tight', className)} title={title}>\n <Icon name={icon} className=\"size-12 shrink-0 text-foreground-neutral-muted\" aria-hidden />\n <Code as=\"span\" variant=\"label\" className=\"min-w-0 truncate\">\n {children}\n </Code>\n </span>\n );\n}\n"],"names":["TriggerSourceIcon","Icon","Panel","RelativeTime","Tooltip","TooltipContent","TooltipTrigger","Code","Text","cn","Link","useWorkflowRunDurationAccessibleLabel","WorkflowRunDurationLabel","formatWorkflowRunNumberLabel","WorkflowRunNumberLabel","getWorkflowStatusVisual","WorkflowStatusIcon","workflowRunActor","workflowRunBranchLabel","workflowRunCommitLabel","withoutWorkflowRunSelectionSearch","JOB_STATUS_STRIP_WIDTH","JobStatusStrip","jobStatusSummary","WorkflowRunRowList","runs","workspaceSlug","projectSlug","className","ul","map","run","li","WorkflowRunRow","id","duration","runAttempt","displayDuration","hasStarted","jobs","hasStartedJobExecution","durationLabel","status","statusLabel","label","runNumberLabel","branch","commit","actor","body","size","div","span","variant","bold","name","number","triggerDisplayLabel","TriggerLabel","BranchLabel","isPullRequest","startsWith","CommitLabel","ActorLabel","style","minWidth","value","createdAt","rowClassName","isTemporary","to","params","workflowRunId","search","previous","aria-label","triggerLabel","undefined","total","filter","part","Boolean","join","asChild","provider","triggerProvider","source","triggerSource","aria-hidden","as","MetadataChip","icon","title","children"],"mappings":";AAAA,SAAQA,iBAAiB,QAAO,2BAA2B;AAC3D,SAAQC,IAAI,QAAsB,yBAAyB;AAC3D,SAAQC,KAAK,QAAO,0BAA0B;AAC9C,SAAQC,YAAY,QAAO,kCAAkC;AAC7D,SAAQC,OAAO,EAAEC,cAAc,EAAEC,cAAc,QAAO,4BAA4B;AAClF,SAAQC,IAAI,EAAEC,IAAI,QAAO,+BAA+B;AACxD,SAAQC,EAAE,QAAO,0BAA0B;AAC3C,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SACEC,qCAAqC,EACrCC,wBAAwB,QACnB,6CAA6C;AACpD,SACEC,4BAA4B,EAC5BC,sBAAsB,QACjB,2CAA2C;AAClD,SAAQC,uBAAuB,QAAO,gDAAgD;AACtF,SAAQC,kBAAkB,QAAO,sDAAsD;AACvF,SAEEC,gBAAgB,EAChBC,sBAAsB,EACtBC,sBAAsB,QACjB,wBAAwB;AAC/B,SAAQC,iCAAiC,QAAO,kCAAkC;AAClF,SAAQC,sBAAsB,EAAEC,cAAc,EAAEC,gBAAgB,QAAO,wBAAwB;AAE/F,OAAO,SAASC,mBAAmB,EACjCC,IAAI,EACJC,aAAa,EACbC,WAAW,EAKZ;IACC,OACE,4FAA4F;IAC5F,yFAAyF;IACz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xB,WAAU;;sCACd,KAAC5B;4BACCoF,UAAUrD,IAAIsD,eAAe;4BAC7BC,QAAQvD,IAAIwD,aAAa;4BACzBC,eAAY;4BACZ5D,WAAU;;sCAEZ,KAACpB;4BAAKiF,IAAG;4BAAOvC,MAAK;4BAAKtB,WAAU;sCACjCG,IAAI0B,mBAAmB;;;;;0BAI9B,KAACpD;0BACC,cAAA,KAACG;oBAAKiF,IAAG;oBAAOvC,MAAK;oBAAKtB,WAAU;8BACjCG,IAAI6C,YAAY;;;;;AAK3B;AAEA,SAASjB,YAAY,EAACb,MAAM,EAAEc,aAAa,EAA2C;IACpF,qBACE,KAAC8B;QACCC,MAAM/B,gBAAgB,uBAAuB;QAC7CgC,OAAOhC,gBAAgB,CAAC,aAAa,EAAEd,QAAQ,GAAG,CAAC,OAAO,EAAEA,QAAQ;QACpElB,WAAU;kBAETkB;;AAGP;AAEA,SAASgB,YAAY,EAACf,MAAM,EAAmB;IAC7C,qBACE,KAAC2C;QAAaC,MAAK;QAAgBC,OAAO,CAAC,OAAO,EAAE7C,QAAQ;kBACzDA;;AAGP;AAEA,SAASgB,WAAW,EAACf,KAAK,EAAkB;IAC1C,qBACE,KAAC0C;QACCC,MAAK;QACLC,OAAO,CAAC,aAAa,EAAE5C,OAAO;QAC9B,uFAAuF;QACvF,WAAW;QACXpB,WAAU;kBAEToB;;AAGP;AAEA;;;CAGC,GACD,SAAS0C,aAAa,EACpBC,IAAI,EACJC,KAAK,EACLhE,SAAS,EACTiE,QAAQ,EAMT;IACC,qBACE,MAACzC;QAAKxB,WAAWnB,GAAG,gDAAgDmB;QAAYgE,OAAOA;;0BACrF,KAAC3F;gBAAKsD,MAAMoC;gBAAM/D,WAAU;gBAAiD4D,aAAW;;0BACxF,KAACjF;gBAAKkF,IAAG;gBAAOpC,SAAQ;gBAAQzB,WAAU;0BACvCiE;;;;AAIT"}
|
|
1
|
+
{"version":3,"sources":["../../../src/components/workflow-run-list/workflow-run-row.tsx"],"sourcesContent":["import {TriggerSourceIcon} from '@shipfox/client-triggers';\nimport {Icon, type IconName} from '@shipfox/react-ui/icon';\nimport {RelativeTime} from '@shipfox/react-ui/relative-time';\nimport {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {Code, Text} from '@shipfox/react-ui/typography';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {Link} from '@tanstack/react-router';\nimport {\n useWorkflowRunDurationAccessibleLabel,\n WorkflowRunDurationLabel,\n} from '#components/workflow-run-duration-label.js';\nimport {\n formatWorkflowRunNumberLabel,\n WorkflowRunNumberLabel,\n} from '#components/workflow-run-number-label.js';\nimport {getWorkflowStatusVisual} from '#components/workflow-status/status-visuals.js';\nimport {WorkflowStatusIcon} from '#components/workflow-status/workflow-status-icon.js';\nimport {\n type WorkflowRunListItem,\n workflowRunActor,\n workflowRunBranchLabel,\n workflowRunCommitLabel,\n} from '#core/workflow-run.js';\nimport {withoutWorkflowRunSelectionSearch} from '#core/workflow-run-url-state.js';\nimport {JOB_STATUS_STRIP_WIDTH, JobStatusStrip, jobStatusSummary} from './job-status-strip.js';\n\nexport function WorkflowRunRowList({\n runs,\n workspaceSlug,\n projectSlug,\n}: {\n runs: WorkflowRunListItem[];\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n}) {\n return (\n // A container, not the viewport, drives the row's breakpoints. What a row can afford is its\n // own width; keying off the viewport would keep the job strip hidden on a wide screen or\n // crush it on a narrow one.\n <ul className=\"@container divide-y divide-border-neutral-base\">\n {runs.map((run) => (\n <li key={run.id}>\n <WorkflowRunRow run={run} workspaceSlug={workspaceSlug} projectSlug={projectSlug} />\n </li>\n ))}\n </ul>\n );\n}\n\n/**\n * One run at full width.\n *\n * A single 44px line once the list is at least 976px wide, reflowing to two lines below that:\n * the identity and the numerics keep their places on line one, and the provenance metadata\n * drops beneath. The numeric columns are fixed-width so duration and time form real columns\n * down the list rather than tracking each row's name length.\n *\n * The 976px threshold keeps identity and provenance on one line; below it, provenance drops\n * beneath the identity. The 1200px threshold keeps the full job preview and numeric columns\n * readable together; below it, the strip is hidden so the numeric columns remain aligned.\n */\nexport function WorkflowRunRow({\n run,\n workspaceSlug,\n projectSlug,\n}: {\n run: WorkflowRunListItem;\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n}) {\n const duration = run.runAttempt.displayDuration;\n const hasStarted = run.jobs.hasStartedJobExecution;\n const durationLabel = useWorkflowRunDurationAccessibleLabel(duration, hasStarted);\n const status = run.runAttempt.status;\n const statusLabel = getWorkflowStatusVisual(status).label;\n const runNumberLabel = formatWorkflowRunNumberLabel(run);\n const branch = workflowRunBranchLabel(run);\n const commit = workflowRunCommitLabel(run);\n const actor = workflowRunActor(run);\n\n const body = (\n <>\n <WorkflowStatusIcon status={status} size={14} className=\"shrink-0\" />\n\n <div className=\"flex min-w-0 flex-1 flex-col gap-tight @min-[976px]:flex-row @min-[976px]:items-center @min-[976px]:gap-cluster\">\n <span className=\"flex min-w-0 items-center gap-inline @min-[976px]:flex-1\">\n <Code variant=\"label\" bold className=\"truncate text-foreground-neutral-base\">\n {run.name}\n </Code>\n {run.number !== null ? <WorkflowRunNumberLabel run={run} /> : null}\n </span>\n\n <span className=\"flex min-w-0 flex-wrap items-center gap-inline text-foreground-neutral-subtle @min-[976px]:flex-nowrap @min-[976px]:shrink-0\">\n {run.triggerDisplayLabel ? <TriggerLabel run={run} /> : null}\n {branch ? <BranchLabel branch={branch} isPullRequest={branch.startsWith('#')} /> : null}\n {commit ? <CommitLabel commit={commit} /> : null}\n {actor ? <ActorLabel actor={actor} /> : null}\n </span>\n </div>\n\n <span className=\"flex shrink-0 items-center gap-cluster\">\n {/* Reserve the API preview's full width so the overflow count cannot paint over the\n duration, and keep it even when a run has no jobs planned yet so the numerics stay in\n line down the list instead of stepping in and out. The max-content width expands if\n the payload ever exceeds the current API preview bound. */}\n <span\n className=\"hidden w-max shrink-0 @min-[1200px]:flex\"\n style={{minWidth: JOB_STATUS_STRIP_WIDTH}}\n >\n <JobStatusStrip jobs={run.jobs} />\n </span>\n <span className=\"flex w-64 justify-end\">\n <WorkflowRunDurationLabel duration={duration} hasStarted={hasStarted} />\n </span>\n <Code\n variant=\"label\"\n className=\"w-64 shrink-0 text-right tabular-nums text-foreground-neutral-muted\"\n >\n <RelativeTime value={run.createdAt} />\n </Code>\n </span>\n </>\n );\n\n // Rows run edge to edge inside the list's scroll container, which would clip the standard\n // outset focus ring, so this one is inset per the design system's focus-ring rule.\n const rowClassName =\n 'flex w-full min-w-0 items-center gap-inline px-row py-row text-left transition-colors hover:bg-background-neutral-hover focus-visible:shadow-focus-inset focus-visible:outline-none @min-[976px]:h-44 @min-[976px]:py-0';\n\n // Optimistic manual runs (temp-<uuid>) have no detail page until the canonical row\n // replaces them on the next poll, so they render non-interactively instead of as a link\n // that would navigate to a workflow run id the detail route rejects.\n if (run.isTemporary || !workspaceSlug || !projectSlug) {\n return <div className={rowClassName}>{body}</div>;\n }\n\n return (\n <Link\n to=\"/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId\"\n params={{workspaceSlug, projectSlug, workflowRunId: run.id}}\n search={\n ((previous: Record<string, unknown>) =>\n withoutWorkflowRunSelectionSearch(previous)) as never\n }\n // An aria-label is the link's whole accessible name, so anything inside the row that\n // carries its own label (the status glyph, the job strip) goes unspoken unless it is\n // curated in here. The job breakdown is the reason this list is worth its width, so it\n // belongs in what a tabbing user hears, not only in browse mode.\n aria-label={[\n run.name,\n runNumberLabel,\n statusLabel,\n durationLabel,\n run.triggerLabel,\n branch ? `branch ${branch}` : undefined,\n actor ? `by ${actor}` : undefined,\n run.jobs.total > 0 ? jobStatusSummary(run.jobs) : undefined,\n ]\n .filter((part): part is string => Boolean(part))\n .join(', ')}\n className={rowClassName}\n >\n {body}\n </Link>\n );\n}\n\nfunction TriggerLabel({run}: {run: WorkflowRunListItem}) {\n return (\n <Tooltip>\n <TooltipTrigger asChild>\n <span className=\"flex min-w-0 max-w-[140px] items-center gap-tight outline-none\">\n <TriggerSourceIcon\n provider={run.triggerProvider}\n source={run.triggerSource}\n aria-hidden=\"true\"\n className=\"size-12 shrink-0 text-foreground-neutral-muted\"\n />\n <Text as=\"span\" size=\"xs\" className=\"min-w-0 truncate\">\n {run.triggerDisplayLabel}\n </Text>\n </span>\n </TooltipTrigger>\n <TooltipContent>\n <Text as=\"span\" size=\"xs\" className=\"block max-w-[360px] break-words\">\n {run.triggerLabel}\n </Text>\n </TooltipContent>\n </Tooltip>\n );\n}\n\nfunction BranchLabel({branch, isPullRequest}: {branch: string; isPullRequest: boolean}) {\n return (\n <MetadataChip\n icon={isPullRequest ? 'gitPullRequestLine' : 'gitBranchLine'}\n title={isPullRequest ? `Pull request ${branch}` : `Branch ${branch}`}\n className=\"max-w-[180px]\"\n >\n {branch}\n </MetadataChip>\n );\n}\n\nfunction CommitLabel({commit}: {commit: string}) {\n return (\n <MetadataChip icon=\"gitCommitLine\" title={`Commit ${commit}`}>\n {commit}\n </MetadataChip>\n );\n}\n\nfunction ActorLabel({actor}: {actor: string}) {\n return (\n <MetadataChip\n icon=\"userLine\"\n title={`Triggered by ${actor}`}\n // Dropped once the row is two lines, where the provenance line has to stay readable on\n // a phone.\n className=\"hidden max-w-[120px] @min-[976px]:flex\"\n >\n {actor}\n </MetadataChip>\n );\n}\n\n/**\n * A ref, SHA, or handle: monospace because it is content a user copies or pattern-matches,\n * with the icon carrying the kind so the value itself never needs a written label.\n */\nfunction MetadataChip({\n icon,\n title,\n className,\n children,\n}: {\n icon: IconName;\n title: string;\n className?: string | undefined;\n children: string;\n}) {\n return (\n <span className={cn('flex min-w-0 shrink-0 items-center gap-tight', className)} title={title}>\n <Icon name={icon} className=\"size-12 shrink-0 text-foreground-neutral-muted\" aria-hidden />\n <Code as=\"span\" variant=\"label\" className=\"min-w-0 truncate\">\n {children}\n </Code>\n </span>\n );\n}\n"],"names":["TriggerSourceIcon","Icon","RelativeTime","Tooltip","TooltipContent","TooltipTrigger","Code","Text","cn","Link","useWorkflowRunDurationAccessibleLabel","WorkflowRunDurationLabel","formatWorkflowRunNumberLabel","WorkflowRunNumberLabel","getWorkflowStatusVisual","WorkflowStatusIcon","workflowRunActor","workflowRunBranchLabel","workflowRunCommitLabel","withoutWorkflowRunSelectionSearch","JOB_STATUS_STRIP_WIDTH","JobStatusStrip","jobStatusSummary","WorkflowRunRowList","runs","workspaceSlug","projectSlug","ul","className","map","run","li","WorkflowRunRow","id","duration","runAttempt","displayDuration","hasStarted","jobs","hasStartedJobExecution","durationLabel","status","statusLabel","label","runNumberLabel","branch","commit","actor","body","size","div","span","variant","bold","name","number","triggerDisplayLabel","TriggerLabel","BranchLabel","isPullRequest","startsWith","CommitLabel","ActorLabel","style","minWidth","value","createdAt","rowClassName","isTemporary","to","params","workflowRunId","search","previous","aria-label","triggerLabel","undefined","total","filter","part","Boolean","join","asChild","provider","triggerProvider","source","triggerSource","aria-hidden","as","MetadataChip","icon","title","children"],"mappings":";AAAA,SAAQA,iBAAiB,QAAO,2BAA2B;AAC3D,SAAQC,IAAI,QAAsB,yBAAyB;AAC3D,SAAQC,YAAY,QAAO,kCAAkC;AAC7D,SAAQC,OAAO,EAAEC,cAAc,EAAEC,cAAc,QAAO,4BAA4B;AAClF,SAAQC,IAAI,EAAEC,IAAI,QAAO,+BAA+B;AACxD,SAAQC,EAAE,QAAO,0BAA0B;AAC3C,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SACEC,qCAAqC,EACrCC,wBAAwB,QACnB,6CAA6C;AACpD,SACEC,4BAA4B,EAC5BC,sBAAsB,QACjB,2CAA2C;AAClD,SAAQC,uBAAuB,QAAO,gDAAgD;AACtF,SAAQC,kBAAkB,QAAO,sDAAsD;AACvF,SAEEC,gBAAgB,EAChBC,sBAAsB,EACtBC,sBAAsB,QACjB,wBAAwB;AAC/B,SAAQC,iCAAiC,QAAO,kCAAkC;AAClF,SAAQC,sBAAsB,EAAEC,cAAc,EAAEC,gBAAgB,QAAO,wBAAwB;AAE/F,OAAO,SAASC,mBAAmB,EACjC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kflowsPageInner({ projectId }) {
|
|
|
52
52
|
return /*#__PURE__*/ _jsxs("div", {
|
|
53
53
|
className: "flex w-full flex-col gap-section",
|
|
54
54
|
children: [
|
|
55
|
+
/*#__PURE__*/ _jsx(Header, {
|
|
56
|
+
variant: "h1",
|
|
57
|
+
className: "sr-only",
|
|
58
|
+
children: "Workflows"
|
|
59
|
+
}),
|
|
55
60
|
projectQuery.isPending ? /*#__PURE__*/ _jsxs("div", {
|
|
56
61
|
className: "flex flex-col gap-cluster",
|
|
57
62
|
children: [
|
|
@@ -73,20 +78,6 @@ function ProjectWorkflowsPageInner({ projectId }) {
|
|
|
73
78
|
}) : null,
|
|
74
79
|
projectQuery.data ? /*#__PURE__*/ _jsxs(_Fragment, {
|
|
75
80
|
children: [
|
|
76
|
-
/*#__PURE__*/ _jsxs("header", {
|
|
77
|
-
className: "flex flex-col gap-tight",
|
|
78
|
-
children: [
|
|
79
|
-
/*#__PURE__*/ _jsx(Header, {
|
|
80
|
-
variant: "h2",
|
|
81
|
-
children: "Workflows"
|
|
82
|
-
}),
|
|
83
|
-
/*#__PURE__*/ _jsx(Text, {
|
|
84
|
-
size: "sm",
|
|
85
|
-
className: "text-foreground-neutral-muted",
|
|
86
|
-
children: "Synced workflow definitions for this project source."
|
|
87
|
-
})
|
|
88
|
-
]
|
|
89
|
-
}),
|
|
90
81
|
/*#__PURE__*/ _jsx(SourceStrip, {
|
|
91
82
|
connectionId: projectQuery.data.source.connectionId,
|
|
92
83
|
externalRepositoryId: projectQuery.data.source.externalRepositoryId,
|
|
@@ -148,6 +139,8 @@ function WorkflowDefinitionsList({ definitions, isPending, isError, sync, runErr
|
|
|
148
139
|
}
|
|
149
140
|
if (isError && definitions.length === 0) {
|
|
150
141
|
return /*#__PURE__*/ _jsx(Panel, {
|
|
142
|
+
role: "region",
|
|
143
|
+
"aria-label": "Workflow definitions",
|
|
151
144
|
children: /*#__PURE__*/ _jsx(LoadErrorState, {
|
|
152
145
|
title: "Couldn't load workflows",
|
|
153
146
|
description: "Definitions could not be loaded. Source metadata remains visible.",
|
|
@@ -159,6 +152,8 @@ function WorkflowDefinitionsList({ definitions, isPending, isError, sync, runErr
|
|
|
159
152
|
}
|
|
160
153
|
if (definitions.length === 0) {
|
|
161
154
|
return /*#__PURE__*/ _jsx(Panel, {
|
|
155
|
+
role: "region",
|
|
156
|
+
"aria-label": "Workflow definitions",
|
|
162
157
|
children: /*#__PURE__*/ _jsx(WorkflowEmptyState, {
|
|
163
158
|
sync: sync
|
|
164
159
|
})
|
|
@@ -167,6 +162,8 @@ function WorkflowDefinitionsList({ definitions, isPending, isError, sync, runErr
|
|
|
167
162
|
return /*#__PURE__*/ _jsxs(_Fragment, {
|
|
168
163
|
children: [
|
|
169
164
|
/*#__PURE__*/ _jsxs(Panel, {
|
|
165
|
+
role: "region",
|
|
166
|
+
"aria-label": "Workflow definitions",
|
|
170
167
|
children: [
|
|
171
168
|
/*#__PURE__*/ _jsx("div", {
|
|
172
169
|
className: "hidden md:block",
|