@shipfox/client-workflows 15.0.0 → 17.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.
Files changed (225) hide show
  1. package/.storybook/preview.css +4 -0
  2. package/.turbo/turbo-build.log +1 -1
  3. package/.turbo/turbo-type.log +1 -0
  4. package/CHANGELOG.md +41 -0
  5. package/dist/components/identifier/identifier.js +2 -2
  6. package/dist/components/identifier/identifier.js.map +1 -1
  7. package/dist/components/job-detail/agent-config-failure-callout.d.ts.map +1 -1
  8. package/dist/components/job-detail/agent-config-failure-callout.js +1 -1
  9. package/dist/components/job-detail/agent-config-failure-callout.js.map +1 -1
  10. package/dist/components/job-detail/job-context-panel.d.ts +6 -0
  11. package/dist/components/job-detail/job-context-panel.d.ts.map +1 -0
  12. package/dist/components/job-detail/job-context-panel.js +224 -0
  13. package/dist/components/job-detail/job-context-panel.js.map +1 -0
  14. package/dist/components/job-detail/job-detail-header.d.ts +10 -1
  15. package/dist/components/job-detail/job-detail-header.d.ts.map +1 -1
  16. package/dist/components/job-detail/job-detail-header.js +58 -39
  17. package/dist/components/job-detail/job-detail-header.js.map +1 -1
  18. package/dist/components/job-detail/job-detail-view.d.ts +1 -1
  19. package/dist/components/job-detail/job-detail-view.d.ts.map +1 -1
  20. package/dist/components/job-detail/job-detail-view.js +92 -41
  21. package/dist/components/job-detail/job-detail-view.js.map +1 -1
  22. package/dist/components/job-detail/job-empty-states.d.ts.map +1 -1
  23. package/dist/components/job-detail/job-empty-states.js +19 -10
  24. package/dist/components/job-detail/job-empty-states.js.map +1 -1
  25. package/dist/components/job-detail/job-execution-switcher.js +4 -4
  26. package/dist/components/job-detail/job-execution-switcher.js.map +1 -1
  27. package/dist/components/job-detail/json-code.d.ts +14 -0
  28. package/dist/components/job-detail/json-code.d.ts.map +1 -0
  29. package/dist/components/job-detail/json-code.js +93 -0
  30. package/dist/components/job-detail/json-code.js.map +1 -0
  31. package/dist/components/job-detail/step-attempt-log-panel.d.ts.map +1 -1
  32. package/dist/components/job-detail/step-attempt-log-panel.js +9 -6
  33. package/dist/components/job-detail/step-attempt-log-panel.js.map +1 -1
  34. package/dist/components/job-detail/step-troubleshooting.d.ts +18 -0
  35. package/dist/components/job-detail/step-troubleshooting.d.ts.map +1 -0
  36. package/dist/components/job-detail/step-troubleshooting.js +493 -0
  37. package/dist/components/job-detail/step-troubleshooting.js.map +1 -0
  38. package/dist/components/job-graph/job-graph-content.d.ts.map +1 -1
  39. package/dist/components/job-graph/job-graph-content.js +5 -4
  40. package/dist/components/job-graph/job-graph-content.js.map +1 -1
  41. package/dist/components/job-graph/job-node.js +3 -3
  42. package/dist/components/job-graph/job-node.js.map +1 -1
  43. package/dist/components/step-list/index.d.ts +1 -0
  44. package/dist/components/step-list/index.d.ts.map +1 -1
  45. package/dist/components/step-list/index.js.map +1 -1
  46. package/dist/components/step-list/step-list-model.d.ts.map +1 -1
  47. package/dist/components/step-list/step-list-model.js +5 -0
  48. package/dist/components/step-list/step-list-model.js.map +1 -1
  49. package/dist/components/step-list/step-list.d.ts +5 -1
  50. package/dist/components/step-list/step-list.d.ts.map +1 -1
  51. package/dist/components/step-list/step-list.js +117 -82
  52. package/dist/components/step-list/step-list.js.map +1 -1
  53. package/dist/components/workflow-run-duration-label.js +1 -1
  54. package/dist/components/workflow-run-duration-label.js.map +1 -1
  55. package/dist/components/workflow-run-list/job-status-strip.js +6 -6
  56. package/dist/components/workflow-run-list/job-status-strip.js.map +1 -1
  57. package/dist/components/workflow-run-list/workflow-run-filter-menu.js +1 -1
  58. package/dist/components/workflow-run-list/workflow-run-filter-menu.js.map +1 -1
  59. package/dist/components/workflow-run-list/workflow-run-filters.js +4 -4
  60. package/dist/components/workflow-run-list/workflow-run-filters.js.map +1 -1
  61. package/dist/components/workflow-run-list/workflow-run-list-states.js +6 -6
  62. package/dist/components/workflow-run-list/workflow-run-list-states.js.map +1 -1
  63. package/dist/components/workflow-run-list/workflow-run-list-view.js +1 -1
  64. package/dist/components/workflow-run-list/workflow-run-list-view.js.map +1 -1
  65. package/dist/components/workflow-run-list/workflow-run-row.js +7 -7
  66. package/dist/components/workflow-run-list/workflow-run-row.js.map +1 -1
  67. package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.js +1 -1
  68. package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.js.map +1 -1
  69. package/dist/components/workflow-run-summary/workflow-run-summary.d.ts +0 -1
  70. package/dist/components/workflow-run-summary/workflow-run-summary.d.ts.map +1 -1
  71. package/dist/components/workflow-run-summary/workflow-run-summary.js +9 -13
  72. package/dist/components/workflow-run-summary/workflow-run-summary.js.map +1 -1
  73. package/dist/components/workflow-run-tabs/index.d.ts +3 -0
  74. package/dist/components/workflow-run-tabs/index.d.ts.map +1 -1
  75. package/dist/components/workflow-run-tabs/index.js +3 -0
  76. package/dist/components/workflow-run-tabs/index.js.map +1 -1
  77. package/dist/components/workflow-run-tabs/run-annotation-count-chip.d.ts +16 -0
  78. package/dist/components/workflow-run-tabs/run-annotation-count-chip.d.ts.map +1 -0
  79. package/dist/components/workflow-run-tabs/run-annotation-count-chip.js +50 -0
  80. package/dist/components/workflow-run-tabs/run-annotation-count-chip.js.map +1 -0
  81. package/dist/components/workflow-run-tabs/run-annotation-item.d.ts +20 -0
  82. package/dist/components/workflow-run-tabs/run-annotation-item.d.ts.map +1 -0
  83. package/dist/components/workflow-run-tabs/run-annotation-item.js +102 -0
  84. package/dist/components/workflow-run-tabs/run-annotation-item.js.map +1 -0
  85. package/dist/components/workflow-run-tabs/run-annotation-list.d.ts +39 -0
  86. package/dist/components/workflow-run-tabs/run-annotation-list.d.ts.map +1 -0
  87. package/dist/components/workflow-run-tabs/run-annotation-list.js +211 -0
  88. package/dist/components/workflow-run-tabs/run-annotation-list.js.map +1 -0
  89. package/dist/components/workflow-run-tabs/run-annotation-summary-line.d.ts +1 -1
  90. package/dist/components/workflow-run-tabs/run-annotation-summary-line.d.ts.map +1 -1
  91. package/dist/components/workflow-run-tabs/run-annotation-summary-line.js +90 -25
  92. package/dist/components/workflow-run-tabs/run-annotation-summary-line.js.map +1 -1
  93. package/dist/components/workflow-run-tabs/severity-visuals.d.ts +20 -0
  94. package/dist/components/workflow-run-tabs/severity-visuals.d.ts.map +1 -0
  95. package/dist/components/workflow-run-tabs/severity-visuals.js +31 -0
  96. package/dist/components/workflow-run-tabs/severity-visuals.js.map +1 -0
  97. package/dist/components/workflow-run-view/run-workspace-nav.d.ts +1 -1
  98. package/dist/components/workflow-run-view/run-workspace-nav.d.ts.map +1 -1
  99. package/dist/components/workflow-run-view/run-workspace-nav.js +16 -10
  100. package/dist/components/workflow-run-view/run-workspace-nav.js.map +1 -1
  101. package/dist/components/workflow-run-view/workflow-run-states.js +6 -6
  102. package/dist/components/workflow-run-view/workflow-run-states.js.map +1 -1
  103. package/dist/components/workflow-run-view/workflow-run-view.d.ts +1 -3
  104. package/dist/components/workflow-run-view/workflow-run-view.d.ts.map +1 -1
  105. package/dist/components/workflow-run-view/workflow-run-view.js +217 -59
  106. package/dist/components/workflow-run-view/workflow-run-view.js.map +1 -1
  107. package/dist/core/entities/job-execution.d.ts +7 -0
  108. package/dist/core/entities/job-execution.d.ts.map +1 -1
  109. package/dist/core/entities/job-execution.js.map +1 -1
  110. package/dist/core/entities/job.d.ts +9 -0
  111. package/dist/core/entities/job.d.ts.map +1 -1
  112. package/dist/core/entities/job.js.map +1 -1
  113. package/dist/core/entities/step-attempt.d.ts +29 -0
  114. package/dist/core/entities/step-attempt.d.ts.map +1 -1
  115. package/dist/core/entities/step-attempt.js.map +1 -1
  116. package/dist/core/entities/step.d.ts +3 -1
  117. package/dist/core/entities/step.d.ts.map +1 -1
  118. package/dist/core/entities/step.js.map +1 -1
  119. package/dist/core/run-annotation.d.ts +79 -0
  120. package/dist/core/run-annotation.d.ts.map +1 -0
  121. package/dist/core/run-annotation.js +125 -0
  122. package/dist/core/run-annotation.js.map +1 -0
  123. package/dist/core/workflow-run.d.ts +1 -1
  124. package/dist/core/workflow-run.d.ts.map +1 -1
  125. package/dist/core/workflow-run.js.map +1 -1
  126. package/dist/hooks/api/annotations.d.ts +63 -0
  127. package/dist/hooks/api/annotations.d.ts.map +1 -0
  128. package/dist/hooks/api/annotations.js +145 -0
  129. package/dist/hooks/api/annotations.js.map +1 -0
  130. package/dist/hooks/api/run-annotation-mapper.d.ts +10 -0
  131. package/dist/hooks/api/run-annotation-mapper.d.ts.map +1 -0
  132. package/dist/hooks/api/run-annotation-mapper.js +22 -0
  133. package/dist/hooks/api/run-annotation-mapper.js.map +1 -0
  134. package/dist/hooks/api/run-annotations.d.ts +25 -0
  135. package/dist/hooks/api/run-annotations.d.ts.map +1 -0
  136. package/dist/hooks/api/run-annotations.js +78 -0
  137. package/dist/hooks/api/run-annotations.js.map +1 -0
  138. package/dist/hooks/api/step-attempt-detail.d.ts +14 -0
  139. package/dist/hooks/api/step-attempt-detail.d.ts.map +1 -0
  140. package/dist/hooks/api/step-attempt-detail.js +43 -0
  141. package/dist/hooks/api/step-attempt-detail.js.map +1 -0
  142. package/dist/hooks/api/workflow-run-mapper.d.ts +9 -2
  143. package/dist/hooks/api/workflow-run-mapper.d.ts.map +1 -1
  144. package/dist/hooks/api/workflow-run-mapper.js +47 -0
  145. package/dist/hooks/api/workflow-run-mapper.js.map +1 -1
  146. package/dist/pages/project-workflows-page.js +19 -19
  147. package/dist/pages/project-workflows-page.js.map +1 -1
  148. package/dist/pages/workflow-run-list-page.js +1 -1
  149. package/dist/pages/workflow-run-list-page.js.map +1 -1
  150. package/dist/routes/inputs.d.ts +7 -2
  151. package/dist/routes/inputs.d.ts.map +1 -1
  152. package/dist/routes/inputs.js +5 -6
  153. package/dist/routes/inputs.js.map +1 -1
  154. package/dist/tsconfig.test.tsbuildinfo +1 -1
  155. package/package.json +10 -9
  156. package/src/components/identifier/identifier.tsx +2 -2
  157. package/src/components/job-detail/agent-config-failure-callout.tsx +5 -1
  158. package/src/components/job-detail/job-context-panel.test.tsx +72 -0
  159. package/src/components/job-detail/job-context-panel.tsx +237 -0
  160. package/src/components/job-detail/job-detail-header.test.tsx +3 -0
  161. package/src/components/job-detail/job-detail-header.tsx +65 -34
  162. package/src/components/job-detail/job-detail-view.stories.tsx +555 -48
  163. package/src/components/job-detail/job-detail-view.tsx +101 -42
  164. package/src/components/job-detail/job-empty-states.tsx +23 -10
  165. package/src/components/job-detail/job-execution-switcher.tsx +5 -5
  166. package/src/components/job-detail/json-code.tsx +120 -0
  167. package/src/components/job-detail/step-attempt-log-panel.test.tsx +1 -0
  168. package/src/components/job-detail/step-attempt-log-panel.tsx +17 -6
  169. package/src/components/job-detail/step-troubleshooting.stories.tsx +120 -0
  170. package/src/components/job-detail/step-troubleshooting.test.tsx +337 -0
  171. package/src/components/job-detail/step-troubleshooting.tsx +537 -0
  172. package/src/components/job-graph/job-graph-content.tsx +4 -3
  173. package/src/components/job-graph/job-node.tsx +3 -3
  174. package/src/components/step-list/index.ts +1 -0
  175. package/src/components/step-list/step-list-model.ts +5 -0
  176. package/src/components/step-list/step-list.test.tsx +75 -2
  177. package/src/components/step-list/step-list.tsx +73 -20
  178. package/src/components/workflow-run-duration-label.tsx +1 -1
  179. package/src/components/workflow-run-list/job-status-strip.tsx +6 -6
  180. package/src/components/workflow-run-list/workflow-run-filter-menu.tsx +1 -1
  181. package/src/components/workflow-run-list/workflow-run-filters.tsx +4 -4
  182. package/src/components/workflow-run-list/workflow-run-list-states.tsx +6 -6
  183. package/src/components/workflow-run-list/workflow-run-list-view.tsx +1 -1
  184. package/src/components/workflow-run-list/workflow-run-row.tsx +7 -7
  185. package/src/components/workflow-run-summary/workflow-run-attempt-switcher.tsx +1 -1
  186. package/src/components/workflow-run-summary/workflow-run-summary.test.tsx +1 -1
  187. package/src/components/workflow-run-summary/workflow-run-summary.tsx +12 -12
  188. package/src/components/workflow-run-tabs/index.ts +7 -0
  189. package/src/components/workflow-run-tabs/run-annotation-count-chip.tsx +63 -0
  190. package/src/components/workflow-run-tabs/run-annotation-item.tsx +123 -0
  191. package/src/components/workflow-run-tabs/run-annotation-list.tsx +273 -0
  192. package/src/components/workflow-run-tabs/run-annotation-summary-line.test.tsx +77 -3
  193. package/src/components/workflow-run-tabs/run-annotation-summary-line.tsx +95 -20
  194. package/src/components/workflow-run-tabs/run-annotations.stories.tsx +293 -0
  195. package/src/components/workflow-run-tabs/severity-visuals.ts +37 -0
  196. package/src/components/workflow-run-view/run-workspace-nav.test.tsx +44 -0
  197. package/src/components/workflow-run-view/run-workspace-nav.tsx +22 -9
  198. package/src/components/workflow-run-view/workflow-run-states.tsx +6 -6
  199. package/src/components/workflow-run-view/workflow-run-view.test.tsx +246 -20
  200. package/src/components/workflow-run-view/workflow-run-view.tsx +255 -37
  201. package/src/core/entities/job-execution.ts +7 -0
  202. package/src/core/entities/job.ts +9 -0
  203. package/src/core/entities/step-attempt.ts +33 -0
  204. package/src/core/entities/step.ts +3 -1
  205. package/src/core/run-annotation.test.ts +315 -0
  206. package/src/core/run-annotation.ts +244 -0
  207. package/src/core/workflow-run.ts +4 -0
  208. package/src/hooks/api/annotations.test.ts +84 -0
  209. package/src/hooks/api/annotations.ts +240 -0
  210. package/src/hooks/api/run-annotation-mapper.ts +30 -0
  211. package/src/hooks/api/run-annotations.ts +137 -0
  212. package/src/hooks/api/step-attempt-detail.ts +67 -0
  213. package/src/hooks/api/workflow-run-mapper.ts +46 -0
  214. package/src/hooks/api/workflow-runs.test.tsx +61 -1
  215. package/src/pages/project-workflows-page.tsx +19 -19
  216. package/src/pages/workflow-job-detail-page.test.tsx +118 -1
  217. package/src/pages/workflow-run-list-page.tsx +1 -1
  218. package/src/routes/inputs.ts +7 -2
  219. package/test/fixtures/workflow-run.ts +7 -0
  220. package/tsconfig.build.tsbuildinfo +1 -1
  221. package/dist/core/workflow-run-tabs.d.ts +0 -9
  222. package/dist/core/workflow-run-tabs.d.ts.map +0 -1
  223. package/dist/core/workflow-run-tabs.js +0 -3
  224. package/dist/core/workflow-run-tabs.js.map +0 -1
  225. package/src/core/workflow-run-tabs.ts +0 -8
@@ -1,5 +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
+ import { MetadataSeparator } from '@shipfox/client-ui';
3
4
  import { Badge } from '@shipfox/react-ui/badge';
4
5
  import { Button } from '@shipfox/react-ui/button';
5
6
  import { DropdownMenu, DropdownMenuContent, DropdownMenuItem, DropdownMenuTrigger } from '@shipfox/react-ui/dropdown-menu';
@@ -40,14 +41,14 @@ export function WorkflowRunSummary({ workspaceSlug, projectSlug, run, cancelling
40
41
  reducedMotionIntervalMs: 10_000,
41
42
  children: /*#__PURE__*/ _jsx("section", {
42
43
  "aria-labelledby": headingId,
43
- className: "bg-background-neutral-background px-16 py-12",
44
+ className: "bg-background-neutral-background px-row py-row",
44
45
  children: /*#__PURE__*/ _jsxs("div", {
45
- className: "grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-12 gap-y-8 overflow-hidden max-[480px]:grid-cols-1",
46
+ className: "grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-cluster gap-y-inline overflow-hidden max-[480px]:grid-cols-1",
46
47
  children: [
47
48
  /*#__PURE__*/ _jsx("div", {
48
49
  className: "col-start-1 row-start-1 min-w-0 max-[480px]:col-start-auto max-[480px]:row-start-auto",
49
50
  children: /*#__PURE__*/ _jsxs("div", {
50
- className: "flex min-w-0 items-center gap-8",
51
+ className: "flex min-w-0 items-center gap-inline",
51
52
  children: [
52
53
  /*#__PURE__*/ _jsx(Badge, {
53
54
  variant: status.badge,
@@ -65,6 +66,7 @@ export function WorkflowRunSummary({ workspaceSlug, projectSlug, run, cancelling
65
66
  /*#__PURE__*/ _jsx(TooltipTrigger, {
66
67
  asChild: true,
67
68
  children: /*#__PURE__*/ _jsx(Header, {
69
+ as: "h1",
68
70
  id: headingId,
69
71
  variant: "h3",
70
72
  className: "min-w-0 truncate",
@@ -89,7 +91,7 @@ export function WorkflowRunSummary({ workspaceSlug, projectSlug, run, cancelling
89
91
  })
90
92
  }),
91
93
  hasAction ? /*#__PURE__*/ _jsx("div", {
92
- className: "col-start-2 row-start-1 flex min-w-max items-center gap-6 justify-self-end max-[480px]:col-start-auto max-[480px]:row-start-auto max-[480px]:justify-self-start",
94
+ className: "col-start-2 row-start-1 flex min-w-max items-center gap-inline justify-self-end max-[480px]:col-start-auto max-[480px]:row-start-auto max-[480px]:justify-self-start",
93
95
  children: /*#__PURE__*/ _jsx(WorkflowRunActionSlot, {
94
96
  action: action,
95
97
  cancelling: cancelling,
@@ -99,7 +101,7 @@ export function WorkflowRunSummary({ workspaceSlug, projectSlug, run, cancelling
99
101
  })
100
102
  }) : null,
101
103
  /*#__PURE__*/ _jsxs("div", {
102
- className: "col-span-2 row-start-2 flex min-w-0 items-center gap-12 overflow-hidden text-foreground-neutral-subtle max-[480px]:col-span-1 max-[480px]:row-start-auto",
104
+ className: "col-span-2 row-start-2 flex min-w-0 items-center gap-cluster overflow-hidden text-foreground-neutral-subtle max-[480px]:col-span-1 max-[480px]:row-start-auto",
103
105
  children: [
104
106
  run.number !== null ? /*#__PURE__*/ _jsxs(_Fragment, {
105
107
  children: [
@@ -127,7 +129,7 @@ export function WorkflowRunSummary({ workspaceSlug, projectSlug, run, cancelling
127
129
  children: /*#__PURE__*/ _jsxs("button", {
128
130
  type: "button",
129
131
  "aria-label": run.triggerLabel,
130
- className: "inline-flex max-w-full min-w-0 cursor-help items-center gap-4 rounded-6 border-0 bg-transparent p-0 text-left text-foreground-neutral-subtle outline-none focus-visible:shadow-button-neutral-focus",
132
+ className: "inline-flex max-w-full min-w-0 cursor-help items-center gap-tight rounded-6 border-0 bg-transparent p-0 text-left text-foreground-neutral-subtle outline-none focus-visible:shadow-button-neutral-focus",
131
133
  children: [
132
134
  /*#__PURE__*/ _jsx(TriggerSourceIcon, {
133
135
  provider: run.triggerProvider,
@@ -175,7 +177,7 @@ export function WorkflowRunSummary({ workspaceSlug, projectSlug, run, cancelling
175
177
  children: [
176
178
  /*#__PURE__*/ _jsx(MetadataSeparator, {}),
177
179
  /*#__PURE__*/ _jsxs("span", {
178
- className: "flex min-w-0 items-center gap-4",
180
+ className: "flex min-w-0 items-center gap-tight",
179
181
  children: [
180
182
  /*#__PURE__*/ _jsx(Text, {
181
183
  as: "span",
@@ -279,11 +281,5 @@ function hasFailedOrCancelledJobs(run) {
279
281
  function workflowRunHasJobs(run) {
280
282
  return 'jobs' in run && Array.isArray(run.jobs);
281
283
  }
282
- export function MetadataSeparator() {
283
- return /*#__PURE__*/ _jsx("span", {
284
- "aria-hidden": "true",
285
- className: "h-12 w-px shrink-0 bg-border-neutral-base"
286
- });
287
- }
288
284
 
289
285
  //# sourceMappingURL=workflow-run-summary.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/workflow-run-summary/workflow-run-summary.tsx"],"sourcesContent":["import {TriggerSourceIcon} from '@shipfox/client-triggers';\nimport {Badge} from '@shipfox/react-ui/badge';\nimport {Button} from '@shipfox/react-ui/button';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '@shipfox/react-ui/dropdown-menu';\nimport {useIsTextTruncated} from '@shipfox/react-ui/hooks';\nimport {RelativeTime} from '@shipfox/react-ui/relative-time';\nimport {TimeTickerProvider} from '@shipfox/react-ui/time-ticker';\nimport {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {Code, Header, Text} from '@shipfox/react-ui/typography';\nimport {useId} from 'react';\nimport {WorkflowRunNumberLabel} from '#components/workflow-run-number-label.js';\nimport {\n isWorkflowRunTerminal,\n type Job,\n WORKFLOW_RUN_STATUSES,\n type WorkflowRunDetail,\n type WorkflowRunRerunMode,\n workflowRunBlockingJob,\n workflowRunDetailDisplay,\n} from '#core/workflow-run.js';\nimport {WorkflowRunDurationLabel} from '../workflow-run-duration-label.js';\nimport {getWorkflowStatusVisual} from '../workflow-status/status-visuals.js';\nimport {WorkflowRunAttemptSwitcher} from './workflow-run-attempt-switcher.js';\n\nconst STATUS_BADGE_LABEL_WIDTH_CH = Math.max(\n ...[...WORKFLOW_RUN_STATUSES, 'queued' as const].map(\n (status) => getWorkflowStatusVisual(status).label.length,\n ),\n);\nconst RERUN_BUTTON_SURFACE_CLASS_NAME =\n 'bg-background-neutral-base hover:bg-background-neutral-hover active:bg-background-neutral-pressed';\n\ntype WorkflowRunAction = 'cancel' | 'rerun-all' | 'rerun-menu' | 'none';\n\nexport interface WorkflowRunSummaryProps {\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n run: WorkflowRunDetail;\n cancelling?: boolean | undefined;\n onCancel?: (() => void) | undefined;\n rerunPending?: boolean | undefined;\n onRerun?: ((mode: WorkflowRunRerunMode) => void) | undefined;\n latestAttempt?: number | undefined;\n}\n\nexport function WorkflowRunSummary({\n workspaceSlug,\n projectSlug,\n run,\n cancelling = false,\n onCancel,\n rerunPending = false,\n onRerun,\n latestAttempt,\n}: WorkflowRunSummaryProps) {\n const headingId = useId();\n const display = workflowRunDetailDisplay(run);\n const status = getWorkflowStatusVisual(display.status);\n const action = workflowRunActionForRun(run);\n const hasAction = canRenderWorkflowRunAction(action, onCancel, onRerun);\n const attemptSwitcher =\n latestAttempt && latestAttempt > 1 && workspaceSlug && projectSlug\n ? {workspaceSlug, projectSlug, latestAttempt}\n : null;\n const displayDuration = display.duration;\n // Named only while the run is waiting and has more than one job: with a single job the rail\n // and the graph already say which one it is.\n const blockingJob =\n display.status === 'queued' && run.jobs.length > 1 ? workflowRunBlockingJob(run.jobs) : null;\n const {ref: headingTextRef, isTruncated: isHeadingTruncated} =\n useIsTextTruncated<HTMLSpanElement>(run.name);\n\n return (\n <TimeTickerProvider intervalMs={1000} reducedMotionIntervalMs={10_000}>\n <section aria-labelledby={headingId} className=\"bg-background-neutral-background px-16 py-12\">\n <div className=\"grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-12 gap-y-8 overflow-hidden max-[480px]:grid-cols-1\">\n <div className=\"col-start-1 row-start-1 min-w-0 max-[480px]:col-start-auto max-[480px]:row-start-auto\">\n <div className=\"flex min-w-0 items-center gap-8\">\n <Badge variant={status.badge} size=\"xs\">\n <span className=\"text-center\" style={{width: `${STATUS_BADGE_LABEL_WIDTH_CH}ch`}}>\n {status.label}\n </span>\n </Badge>\n\n <Tooltip>\n <TooltipTrigger asChild>\n <Header id={headingId} variant=\"h3\" className=\"min-w-0 truncate\">\n <span ref={headingTextRef} className=\"block min-w-0 truncate\">\n {run.name}\n </span>\n </Header>\n </TooltipTrigger>\n {isHeadingTruncated ? (\n <TooltipContent>\n <Text as=\"span\" size=\"xs\" className=\"max-w-[360px] break-words\">\n {run.name}\n </Text>\n </TooltipContent>\n ) : null}\n </Tooltip>\n </div>\n </div>\n\n {hasAction ? (\n <div className=\"col-start-2 row-start-1 flex min-w-max items-center gap-6 justify-self-end max-[480px]:col-start-auto max-[480px]:row-start-auto max-[480px]:justify-self-start\">\n <WorkflowRunActionSlot\n action={action}\n cancelling={cancelling}\n onCancel={onCancel}\n rerunPending={rerunPending}\n onRerun={onRerun}\n />\n </div>\n ) : null}\n\n <div className=\"col-span-2 row-start-2 flex min-w-0 items-center gap-12 overflow-hidden text-foreground-neutral-subtle max-[480px]:col-span-1 max-[480px]:row-start-auto\">\n {run.number !== null ? (\n <>\n <WorkflowRunNumberLabel run={run} />\n {attemptSwitcher || run.triggerDisplayLabel ? <MetadataSeparator /> : null}\n </>\n ) : null}\n\n {attemptSwitcher ? (\n <WorkflowRunAttemptSwitcher\n workspaceSlug={attemptSwitcher.workspaceSlug}\n projectSlug={attemptSwitcher.projectSlug}\n run={run}\n latestAttempt={attemptSwitcher.latestAttempt}\n />\n ) : null}\n\n {run.triggerDisplayLabel ? (\n <>\n {attemptSwitcher ? <MetadataSeparator /> : null}\n <span className=\"min-w-0\">\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n aria-label={run.triggerLabel}\n className=\"inline-flex max-w-full min-w-0 cursor-help items-center gap-4 rounded-6 border-0 bg-transparent p-0 text-left text-foreground-neutral-subtle outline-none focus-visible:shadow-button-neutral-focus\"\n >\n <TriggerSourceIcon\n provider={run.triggerProvider}\n source={run.triggerSource}\n aria-hidden=\"true\"\n className=\"size-12 shrink-0\"\n />\n <Text as=\"span\" size=\"xs\" className=\"min-w-0 truncate\">\n {run.triggerDisplayLabel}\n </Text>\n </button>\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 </span>\n </>\n ) : null}\n\n {run.number !== null || attemptSwitcher || run.triggerDisplayLabel ? (\n <MetadataSeparator />\n ) : null}\n <RelativeTime\n value={run.runAttempt.createdAt}\n className=\"shrink-0 whitespace-nowrap text-xs leading-20 text-foreground-neutral-subtle\"\n />\n\n {displayDuration ? (\n <>\n <MetadataSeparator />\n <WorkflowRunDurationLabel\n duration={displayDuration}\n className=\"text-foreground-neutral-subtle\"\n />\n </>\n ) : null}\n\n {blockingJob ? (\n <>\n <MetadataSeparator />\n <span className=\"flex min-w-0 items-center gap-4\">\n <Text as=\"span\" size=\"xs\" className=\"shrink-0\">\n waiting on\n </Text>\n <Code as=\"span\" variant=\"label\" className=\"min-w-0 truncate\">\n {blockingJob.displayName}\n </Code>\n </span>\n </>\n ) : null}\n </div>\n </div>\n </section>\n </TimeTickerProvider>\n );\n}\n\nfunction WorkflowRunActionSlot({\n action,\n cancelling,\n onCancel,\n rerunPending,\n onRerun,\n}: {\n action: WorkflowRunAction;\n cancelling: boolean;\n onCancel?: (() => void) | undefined;\n rerunPending: boolean;\n onRerun?: ((mode: WorkflowRunRerunMode) => void) | undefined;\n}) {\n if (action === 'none') return null;\n\n if (action === 'cancel') {\n if (!onCancel) return null;\n\n return (\n <Button\n type=\"button\"\n variant=\"danger\"\n size=\"xs\"\n isLoading={cancelling}\n disabled={cancelling}\n onClick={onCancel}\n >\n Cancel workflow\n </Button>\n );\n }\n\n if (action === 'rerun-all') {\n if (!onRerun) return null;\n\n return (\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"xs\"\n className={RERUN_BUTTON_SURFACE_CLASS_NAME}\n isLoading={rerunPending}\n disabled={rerunPending}\n onClick={() => onRerun('all')}\n >\n Re-run workflow\n </Button>\n );\n }\n\n if (!onRerun) return null;\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"xs\"\n className={RERUN_BUTTON_SURFACE_CLASS_NAME}\n iconRight=\"arrowDownSLine\"\n isLoading={rerunPending}\n disabled={rerunPending}\n >\n Re-run jobs\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem disabled={rerunPending} onSelect={() => onRerun('all')}>\n Re-run all jobs\n </DropdownMenuItem>\n <DropdownMenuItem disabled={rerunPending} onSelect={() => onRerun('failed')}>\n Re-run failed jobs\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\nfunction workflowRunActionForRun(run: WorkflowRunDetail): WorkflowRunAction {\n if (run.runAttempt.attempt !== run.currentAttempt) return 'none';\n if (!isWorkflowRunTerminal(run.runAttempt.status)) return 'cancel';\n if (run.runAttempt.status === 'succeeded' || !hasFailedOrCancelledJobs(run)) return 'rerun-all';\n return 'rerun-menu';\n}\n\nfunction canRenderWorkflowRunAction(\n action: WorkflowRunAction,\n onCancel: (() => void) | undefined,\n onRerun: ((mode: WorkflowRunRerunMode) => void) | undefined,\n): boolean {\n if (action === 'cancel') return onCancel !== undefined;\n if (action === 'rerun-all' || action === 'rerun-menu') return onRerun !== undefined;\n return false;\n}\n\nfunction hasFailedOrCancelledJobs(run: WorkflowRunDetail): boolean {\n if (!workflowRunHasJobs(run)) return false;\n\n return run.jobs.some((job) => job.status === 'failed' || job.status === 'cancelled');\n}\n\nfunction workflowRunHasJobs(run: WorkflowRunDetail): run is WorkflowRunDetail & {jobs: Job[]} {\n return 'jobs' in run && Array.isArray(run.jobs);\n}\n\nexport function MetadataSeparator() {\n return <span aria-hidden=\"true\" className=\"h-12 w-px shrink-0 bg-border-neutral-base\" />;\n}\n"],"names":["TriggerSourceIcon","Badge","Button","DropdownMenu","DropdownMenuContent","DropdownMenuItem","DropdownMenuTrigger","useIsTextTruncated","RelativeTime","TimeTickerProvider","Tooltip","TooltipContent","TooltipTrigger","Code","Header","Text","useId","WorkflowRunNumberLabel","isWorkflowRunTerminal","WORKFLOW_RUN_STATUSES","workflowRunBlockingJob","workflowRunDetailDisplay","WorkflowRunDurationLabel","getWorkflowStatusVisual","WorkflowRunAttemptSwitcher","STATUS_BADGE_LABEL_WIDTH_CH","Math","max","map","status","label","length","RERUN_BUTTON_SURFACE_CLASS_NAME","WorkflowRunSummary","workspaceSlug","projectSlug","run","cancelling","onCancel","rerunPending","onRerun","latestAttempt","headingId","display","action","workflowRunActionForRun","hasAction","canRenderWorkflowRunAction","attemptSwitcher","displayDuration","duration","blockingJob","jobs","ref","headingTextRef","isTruncated","isHeadingTruncated","name","intervalMs","reducedMotionIntervalMs","section","aria-labelledby","className","div","variant","badge","size","span","style","width","asChild","id","as","WorkflowRunActionSlot","number","triggerDisplayLabel","MetadataSeparator","button","type","aria-label","triggerLabel","provider","triggerProvider","source","triggerSource","aria-hidden","value","runAttempt","createdAt","displayName","isLoading","disabled","onClick","iconRight","align","onSelect","attempt","currentAttempt","hasFailedOrCancelledJobs","undefined","workflowRunHasJobs","some","job","Array","isArray"],"mappings":";AAAA,SAAQA,iBAAiB,QAAO,2BAA2B;AAC3D,SAAQC,KAAK,QAAO,0BAA0B;AAC9C,SAAQC,MAAM,QAAO,2BAA2B;AAChD,SACEC,YAAY,EACZC,mBAAmB,EACnBC,gBAAgB,EAChBC,mBAAmB,QACd,kCAAkC;AACzC,SAAQC,kBAAkB,QAAO,0BAA0B;AAC3D,SAAQC,YAAY,QAAO,kCA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QA,IAAIzE,MAAM,KAAK,YAAYyE,IAAIzE,MAAM,KAAK;AAC1E;AAEA,SAASuE,mBAAmBhE,GAAsB;IAChD,OAAO,UAAUA,OAAOmE,MAAMC,OAAO,CAACpE,IAAIgB,IAAI;AAChD;AAEA,OAAO,SAASwB;IACd,qBAAO,KAACT;QAAKkB,eAAY;QAAOvB,WAAU;;AAC5C"}
1
+ {"version":3,"sources":["../../../src/components/workflow-run-summary/workflow-run-summary.tsx"],"sourcesContent":["import {TriggerSourceIcon} from '@shipfox/client-triggers';\nimport {MetadataSeparator} from '@shipfox/client-ui';\nimport {Badge} from '@shipfox/react-ui/badge';\nimport {Button} from '@shipfox/react-ui/button';\nimport {\n DropdownMenu,\n DropdownMenuContent,\n DropdownMenuItem,\n DropdownMenuTrigger,\n} from '@shipfox/react-ui/dropdown-menu';\nimport {useIsTextTruncated} from '@shipfox/react-ui/hooks';\nimport {RelativeTime} from '@shipfox/react-ui/relative-time';\nimport {TimeTickerProvider} from '@shipfox/react-ui/time-ticker';\nimport {Tooltip, TooltipContent, TooltipTrigger} from '@shipfox/react-ui/tooltip';\nimport {Code, Header, Text} from '@shipfox/react-ui/typography';\nimport {useId} from 'react';\nimport {WorkflowRunNumberLabel} from '#components/workflow-run-number-label.js';\nimport {\n isWorkflowRunTerminal,\n type Job,\n WORKFLOW_RUN_STATUSES,\n type WorkflowRunDetail,\n type WorkflowRunRerunMode,\n workflowRunBlockingJob,\n workflowRunDetailDisplay,\n} from '#core/workflow-run.js';\nimport {WorkflowRunDurationLabel} from '../workflow-run-duration-label.js';\nimport {getWorkflowStatusVisual} from '../workflow-status/status-visuals.js';\nimport {WorkflowRunAttemptSwitcher} from './workflow-run-attempt-switcher.js';\n\nconst STATUS_BADGE_LABEL_WIDTH_CH = Math.max(\n ...[...WORKFLOW_RUN_STATUSES, 'queued' as const].map(\n (status) => getWorkflowStatusVisual(status).label.length,\n ),\n);\nconst RERUN_BUTTON_SURFACE_CLASS_NAME =\n 'bg-background-neutral-base hover:bg-background-neutral-hover active:bg-background-neutral-pressed';\n\ntype WorkflowRunAction = 'cancel' | 'rerun-all' | 'rerun-menu' | 'none';\n\nexport interface WorkflowRunSummaryProps {\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n run: WorkflowRunDetail;\n cancelling?: boolean | undefined;\n onCancel?: (() => void) | undefined;\n rerunPending?: boolean | undefined;\n onRerun?: ((mode: WorkflowRunRerunMode) => void) | undefined;\n latestAttempt?: number | undefined;\n}\n\nexport function WorkflowRunSummary({\n workspaceSlug,\n projectSlug,\n run,\n cancelling = false,\n onCancel,\n rerunPending = false,\n onRerun,\n latestAttempt,\n}: WorkflowRunSummaryProps) {\n const headingId = useId();\n const display = workflowRunDetailDisplay(run);\n const status = getWorkflowStatusVisual(display.status);\n const action = workflowRunActionForRun(run);\n const hasAction = canRenderWorkflowRunAction(action, onCancel, onRerun);\n const attemptSwitcher =\n latestAttempt && latestAttempt > 1 && workspaceSlug && projectSlug\n ? {workspaceSlug, projectSlug, latestAttempt}\n : null;\n const displayDuration = display.duration;\n // Named only while the run is waiting and has more than one job: with a single job the rail\n // and the graph already say which one it is.\n const blockingJob =\n display.status === 'queued' && run.jobs.length > 1 ? workflowRunBlockingJob(run.jobs) : null;\n const {ref: headingTextRef, isTruncated: isHeadingTruncated} =\n useIsTextTruncated<HTMLSpanElement>(run.name);\n\n return (\n <TimeTickerProvider intervalMs={1000} reducedMotionIntervalMs={10_000}>\n <section\n aria-labelledby={headingId}\n className=\"bg-background-neutral-background px-row py-row\"\n >\n <div className=\"grid min-w-0 grid-cols-[minmax(0,1fr)_auto] items-center gap-x-cluster gap-y-inline overflow-hidden max-[480px]:grid-cols-1\">\n <div className=\"col-start-1 row-start-1 min-w-0 max-[480px]:col-start-auto max-[480px]:row-start-auto\">\n <div className=\"flex min-w-0 items-center gap-inline\">\n <Badge variant={status.badge} size=\"xs\">\n <span className=\"text-center\" style={{width: `${STATUS_BADGE_LABEL_WIDTH_CH}ch`}}>\n {status.label}\n </span>\n </Badge>\n\n <Tooltip>\n <TooltipTrigger asChild>\n <Header as=\"h1\" id={headingId} variant=\"h3\" className=\"min-w-0 truncate\">\n <span ref={headingTextRef} className=\"block min-w-0 truncate\">\n {run.name}\n </span>\n </Header>\n </TooltipTrigger>\n {isHeadingTruncated ? (\n <TooltipContent>\n <Text as=\"span\" size=\"xs\" className=\"max-w-[360px] break-words\">\n {run.name}\n </Text>\n </TooltipContent>\n ) : null}\n </Tooltip>\n </div>\n </div>\n\n {hasAction ? (\n <div className=\"col-start-2 row-start-1 flex min-w-max items-center gap-inline justify-self-end max-[480px]:col-start-auto max-[480px]:row-start-auto max-[480px]:justify-self-start\">\n <WorkflowRunActionSlot\n action={action}\n cancelling={cancelling}\n onCancel={onCancel}\n rerunPending={rerunPending}\n onRerun={onRerun}\n />\n </div>\n ) : null}\n\n <div className=\"col-span-2 row-start-2 flex min-w-0 items-center gap-cluster overflow-hidden text-foreground-neutral-subtle max-[480px]:col-span-1 max-[480px]:row-start-auto\">\n {run.number !== null ? (\n <>\n <WorkflowRunNumberLabel run={run} />\n {attemptSwitcher || run.triggerDisplayLabel ? <MetadataSeparator /> : null}\n </>\n ) : null}\n\n {attemptSwitcher ? (\n <WorkflowRunAttemptSwitcher\n workspaceSlug={attemptSwitcher.workspaceSlug}\n projectSlug={attemptSwitcher.projectSlug}\n run={run}\n latestAttempt={attemptSwitcher.latestAttempt}\n />\n ) : null}\n\n {run.triggerDisplayLabel ? (\n <>\n {attemptSwitcher ? <MetadataSeparator /> : null}\n <span className=\"min-w-0\">\n <Tooltip>\n <TooltipTrigger asChild>\n <button\n type=\"button\"\n aria-label={run.triggerLabel}\n className=\"inline-flex max-w-full min-w-0 cursor-help items-center gap-tight rounded-6 border-0 bg-transparent p-0 text-left text-foreground-neutral-subtle outline-none focus-visible:shadow-button-neutral-focus\"\n >\n <TriggerSourceIcon\n provider={run.triggerProvider}\n source={run.triggerSource}\n aria-hidden=\"true\"\n className=\"size-12 shrink-0\"\n />\n <Text as=\"span\" size=\"xs\" className=\"min-w-0 truncate\">\n {run.triggerDisplayLabel}\n </Text>\n </button>\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 </span>\n </>\n ) : null}\n\n {run.number !== null || attemptSwitcher || run.triggerDisplayLabel ? (\n <MetadataSeparator />\n ) : null}\n <RelativeTime\n value={run.runAttempt.createdAt}\n className=\"shrink-0 whitespace-nowrap text-xs leading-20 text-foreground-neutral-subtle\"\n />\n\n {displayDuration ? (\n <>\n <MetadataSeparator />\n <WorkflowRunDurationLabel\n duration={displayDuration}\n className=\"text-foreground-neutral-subtle\"\n />\n </>\n ) : null}\n\n {blockingJob ? (\n <>\n <MetadataSeparator />\n <span className=\"flex min-w-0 items-center gap-tight\">\n <Text as=\"span\" size=\"xs\" className=\"shrink-0\">\n waiting on\n </Text>\n <Code as=\"span\" variant=\"label\" className=\"min-w-0 truncate\">\n {blockingJob.displayName}\n </Code>\n </span>\n </>\n ) : null}\n </div>\n </div>\n </section>\n </TimeTickerProvider>\n );\n}\n\nfunction WorkflowRunActionSlot({\n action,\n cancelling,\n onCancel,\n rerunPending,\n onRerun,\n}: {\n action: WorkflowRunAction;\n cancelling: boolean;\n onCancel?: (() => void) | undefined;\n rerunPending: boolean;\n onRerun?: ((mode: WorkflowRunRerunMode) => void) | undefined;\n}) {\n if (action === 'none') return null;\n\n if (action === 'cancel') {\n if (!onCancel) return null;\n\n return (\n <Button\n type=\"button\"\n variant=\"danger\"\n size=\"xs\"\n isLoading={cancelling}\n disabled={cancelling}\n onClick={onCancel}\n >\n Cancel workflow\n </Button>\n );\n }\n\n if (action === 'rerun-all') {\n if (!onRerun) return null;\n\n return (\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"xs\"\n className={RERUN_BUTTON_SURFACE_CLASS_NAME}\n isLoading={rerunPending}\n disabled={rerunPending}\n onClick={() => onRerun('all')}\n >\n Re-run workflow\n </Button>\n );\n }\n\n if (!onRerun) return null;\n\n return (\n <DropdownMenu>\n <DropdownMenuTrigger asChild>\n <Button\n type=\"button\"\n variant=\"secondary\"\n size=\"xs\"\n className={RERUN_BUTTON_SURFACE_CLASS_NAME}\n iconRight=\"arrowDownSLine\"\n isLoading={rerunPending}\n disabled={rerunPending}\n >\n Re-run jobs\n </Button>\n </DropdownMenuTrigger>\n <DropdownMenuContent align=\"end\">\n <DropdownMenuItem disabled={rerunPending} onSelect={() => onRerun('all')}>\n Re-run all jobs\n </DropdownMenuItem>\n <DropdownMenuItem disabled={rerunPending} onSelect={() => onRerun('failed')}>\n Re-run failed jobs\n </DropdownMenuItem>\n </DropdownMenuContent>\n </DropdownMenu>\n );\n}\n\nfunction workflowRunActionForRun(run: WorkflowRunDetail): WorkflowRunAction {\n if (run.runAttempt.attempt !== run.currentAttempt) return 'none';\n if (!isWorkflowRunTerminal(run.runAttempt.status)) return 'cancel';\n if (run.runAttempt.status === 'succeeded' || !hasFailedOrCancelledJobs(run)) return 'rerun-all';\n return 'rerun-menu';\n}\n\nfunction canRenderWorkflowRunAction(\n action: WorkflowRunAction,\n onCancel: (() => void) | undefined,\n onRerun: ((mode: WorkflowRunRerunMode) => void) | undefined,\n): boolean {\n if (action === 'cancel') return onCancel !== undefined;\n if (action === 'rerun-all' || action === 'rerun-menu') return onRerun !== undefined;\n return false;\n}\n\nfunction hasFailedOrCancelledJobs(run: WorkflowRunDetail): boolean {\n if (!workflowRunHasJobs(run)) return false;\n\n return run.jobs.some((job) => job.status === 'failed' || job.status === 'cancelled');\n}\n\nfunction workflowRunHasJobs(run: WorkflowRunDetail): run is WorkflowRunDetail & {jobs: Job[]} {\n return 'jobs' in run && Array.isArray(run.jobs);\n}\n"],"names":["TriggerSourceIcon","MetadataSeparator","Badge","Button","DropdownMenu","DropdownMenuContent","DropdownMenuItem","DropdownMenuTrigger","useIsTextTruncated","RelativeTime","TimeTickerProvider","Tooltip","TooltipContent","TooltipTrigger","Code","Header","Text","useId","WorkflowRunNumberLabel","isWorkflowRunTerminal","WORKFLOW_RUN_STATUSES","workflowRunBlockingJob","workflowRunDetailDisplay","WorkflowRunDurationLabel","getWorkflowStatusVisual","WorkflowRunAttemptSwitcher","STATUS_BADGE_LABEL_WIDTH_CH","Math","max","map","status","label","length","RERUN_BUTTON_SURFACE_CLASS_NAME","WorkflowRunSummary","workspaceSlug","projectSlug","run","cancelling","onCancel","rerunPending","onRerun","latestAttempt","headingId","display","action","workflowRunActionForRun","hasAction","canRenderWorkflowRunAction","attemptSwitcher","displayDuration","duration","blockingJob","jobs","ref","headingTextRef","isTruncated","isHeadingTruncated","name","intervalMs","reducedMotionIntervalMs","section","aria-labelledby","className","div","variant","badge","size","span","style","width","asChild","as","id","WorkflowRunActionSlot","number","triggerDisplayLabel","button","type","aria-label","triggerLabel","provider","triggerProvider","source","triggerSource","aria-hidden","value","runAttempt","createdAt","displayName","isLoading","disabled","onClick","iconRight","align","onSelect","attempt","currentAttempt","hasFailedOrCancelledJobs","undefined","workflowRunHasJobs","some","job","Array","isArray"],"mappings":";AAAA,SAAQA,iBAAiB,QAAO,2BAA2B;AAC3D,SAAQC,iBAAiB,QAAO,qBAAqB;AACrD,SAAQC,KAAK,QAAO,0BAA0B;AAC9C,SAAQC,MAAM,QAAO,2BAA2B;AAChD,SACEC,YAAY,EACZC,mBAAmB,EACnBC,gBAAgB,EAChBC,mBAAmB,QACd,kCAAkC;AACzC,SAAQC,kBAAkB,QAAO,0BAA0B;AAC3D,SAAQC,YAAY,QAAO,kCAAkC;AAC7D,SAAQC,kBAAkB,QAAO,gCAAgC;AACjE,SAAQC,OAAO,EAAEC,cAAc,EAAEC,cAAc,QAAO,4BAA4B;AAClF,SAAQC,IAAI,EAAEC,MAAM,EAAEC,IAAI,QAAO,+BAA+B;AAChE,SAAQC,KAAK,QAAO,QAAQ;AAC5B,SAAQC,sBAAsB,QAAO,2CAA2C;AAChF,SACEC,qBAAqB,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ationElementId, RunAnnotationItem } from './run-annotation-item.js';
3
+ export { type DerivedRunAnnotation, RunAnnotationList, type RunAnnotationListQuery, } from './run-annotation-list.js';
1
4
  export { RunAnnotationSummaryLine } from './run-annotation-summary-line.js';
2
5
  export { RunAnnotationsEmpty } from './run-annotations-empty.js';
3
6
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-tabs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,wBAAwB,EAAC,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-tabs/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,sBAAsB,EAAC,MAAM,gCAAgC,CAAC;AACtE,OAAO,EAAC,mBAAmB,EAAE,iBAAiB,EAAC,MAAM,0BAA0B,CAAC;AAChF,OAAO,EACL,KAAK,oBAAoB,EACzB,iBAAiB,EACjB,KAAK,sBAAsB,GAC5B,MAAM,0BAA0B,CAAC;AAClC,OAAO,EAAC,wBAAwB,EAAC,MAAM,kCAAkC,CAAC;AAC1E,OAAO,EAAC,mBAAmB,EAAC,MAAM,4BAA4B,CAAC"}
@@ -1,3 +1,6 @@
1
+ export { RunAnnotationCountChip } from './run-annotation-count-chip.js';
2
+ export { annotationElementId, RunAnnotationItem } from './run-annotation-item.js';
3
+ export { RunAnnotationList } from './run-annotation-list.js';
1
4
  export { RunAnnotationSummaryLine } from './run-annotation-summary-line.js';
2
5
  export { RunAnnotationsEmpty } from './run-annotations-empty.js';
3
6
 
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/components/workflow-run-tabs/index.ts"],"sourcesContent":["export {RunAnnotationSummaryLine} from './run-annotation-summary-line.js';\nexport {RunAnnotationsEmpty} from './run-annotations-empty.js';\n"],"names":["RunAnnotationSummaryLine","RunAnnotationsEmpty"],"mappings":"AAAA,SAAQA,wBAAwB,QAAO,mCAAmC;AAC1E,SAAQC,mBAAmB,QAAO,6BAA6B"}
1
+ {"version":3,"sources":["../../../src/components/workflow-run-tabs/index.ts"],"sourcesContent":["export {RunAnnotationCountChip} from './run-annotation-count-chip.js';\nexport {annotationElementId, RunAnnotationItem} from './run-annotation-item.js';\nexport {\n type DerivedRunAnnotation,\n RunAnnotationList,\n type RunAnnotationListQuery,\n} from './run-annotation-list.js';\nexport {RunAnnotationSummaryLine} from './run-annotation-summary-line.js';\nexport {RunAnnotationsEmpty} from './run-annotations-empty.js';\n"],"names":["RunAnnotationCountChip","annotationElementId","RunAnnotationItem","RunAnnotationList","RunAnnotationSummaryLine","RunAnnotationsEmpty"],"mappings":"AAAA,SAAQA,sBAAsB,QAAO,iCAAiC;AACtE,SAAQC,mBAAmB,EAAEC,iBAAiB,QAAO,2BAA2B;AAChF,SAEEC,iBAAiB,QAEZ,2BAA2B;AAClC,SAAQC,wBAAwB,QAAO,mCAAmC;AAC1E,SAAQC,mBAAmB,QAAO,6BAA6B"}
@@ -0,0 +1,16 @@
1
+ import { type RunAnnotationSummary } from '#core/run-annotation.js';
2
+ export interface RunAnnotationCountChipProps {
3
+ summary: RunAnnotationSummary | undefined;
4
+ workspaceSlug: string;
5
+ projectSlug: string;
6
+ workflowRunId: string;
7
+ runAttempt?: number | undefined;
8
+ /** Scopes the destination list to one job. */
9
+ jobId?: string | undefined;
10
+ }
11
+ /**
12
+ * A bounded reference into the run's Annotations section: a count, its highest severity, and one
13
+ * link. Never a body, so an annotation is rendered exactly once per page.
14
+ */
15
+ export declare function RunAnnotationCountChip({ summary, workspaceSlug, projectSlug, workflowRunId, runAttempt, jobId, }: RunAnnotationCountChipProps): import("react").JSX.Element | null;
16
+ //# sourceMappingURL=run-annotation-count-chip.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-annotation-count-chip.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-tabs/run-annotation-count-chip.tsx"],"names":[],"mappings":"AAGA,OAAO,EAA+B,KAAK,oBAAoB,EAAC,MAAM,yBAAyB,CAAC;AAIhG,MAAM,WAAW,2BAA2B;IAC1C,OAAO,EAAE,oBAAoB,GAAG,SAAS,CAAC;IAC1C,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,8CAA8C;IAC9C,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC5B;AAED;;;GAGG;AACH,wBAAgB,sBAAsB,CAAC,EACrC,OAAO,EACP,aAAa,EACb,WAAW,EACX,aAAa,EACb,UAAU,EACV,KAAK,GACN,EAAE,2BAA2B,sCAkC7B"}
@@ -0,0 +1,50 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { Icon } from '@shipfox/react-ui/icon';
3
+ import { cn } from '@shipfox/react-ui/utils';
4
+ import { Link } from '@tanstack/react-router';
5
+ import { highestRunAnnotationSeverity } from '#core/run-annotation.js';
6
+ import { workflowRunSearchParams } from '#routes/inputs.js';
7
+ import { SEVERITY_CHIP_TONE, SEVERITY_ICON } from './severity-visuals.js';
8
+ /**
9
+ * A bounded reference into the run's Annotations section: a count, its highest severity, and one
10
+ * link. Never a body, so an annotation is rendered exactly once per page.
11
+ */ export function RunAnnotationCountChip({ summary, workspaceSlug, projectSlug, workflowRunId, runAttempt, jobId }) {
12
+ if (!summary || summary.total === 0) return null;
13
+ const severity = highestRunAnnotationSeverity(summary);
14
+ const count = `${summary.total}${summary.truncated ? '+' : ''}`;
15
+ const label = `${count} ${summary.total === 1 && !summary.truncated ? 'annotation' : 'annotations'}`;
16
+ const accessibleLabel = severity ? `View ${label}, highest severity ${severity}` : `View ${label}`;
17
+ const search = {
18
+ tab: 'annotations',
19
+ ...runAttempt ? {
20
+ runAttempt
21
+ } : {}
22
+ };
23
+ if (jobId) search.jobId = jobId;
24
+ return /*#__PURE__*/ _jsxs(Link, {
25
+ to: "/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId",
26
+ params: {
27
+ workspaceSlug,
28
+ projectSlug,
29
+ workflowRunId
30
+ },
31
+ search: workflowRunSearchParams(search, search),
32
+ "aria-label": accessibleLabel,
33
+ className: cn('inline-flex h-20 shrink-0 items-center gap-tight rounded-4 border px-tight font-code text-xs leading-16 tabular-nums outline-none transition-colors hover:bg-background-neutral-hover focus-visible:shadow-border-interactive-with-active', // The chip stays 20px optically so it sits level with the duration metadata beside it;
34
+ // the hit area grows to the 44px minimum only where the pointer is coarse.
35
+ '[@media(pointer:coarse)]:h-44 [@media(pointer:coarse)]:px-[10px]', severity ? SEVERITY_CHIP_TONE[severity] : 'border-border-neutral-base'),
36
+ children: [
37
+ /*#__PURE__*/ _jsx(Icon, {
38
+ name: severity ? SEVERITY_ICON[severity] : 'fileTextLine',
39
+ size: 12,
40
+ "aria-hidden": "true"
41
+ }),
42
+ /*#__PURE__*/ _jsx("span", {
43
+ className: "text-foreground-neutral-base",
44
+ children: count
45
+ })
46
+ ]
47
+ });
48
+ }
49
+
50
+ //# sourceMappingURL=run-annotation-count-chip.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/workflow-run-tabs/run-annotation-count-chip.tsx"],"sourcesContent":["import {Icon} from '@shipfox/react-ui/icon';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {Link} from '@tanstack/react-router';\nimport {highestRunAnnotationSeverity, type RunAnnotationSummary} from '#core/run-annotation.js';\nimport {type WorkflowRunsSearch, workflowRunSearchParams} from '#routes/inputs.js';\nimport {SEVERITY_CHIP_TONE, SEVERITY_ICON} from './severity-visuals.js';\n\nexport interface RunAnnotationCountChipProps {\n summary: RunAnnotationSummary | undefined;\n workspaceSlug: string;\n projectSlug: string;\n workflowRunId: string;\n runAttempt?: number | undefined;\n /** Scopes the destination list to one job. */\n jobId?: string | undefined;\n}\n\n/**\n * A bounded reference into the run's Annotations section: a count, its highest severity, and one\n * link. Never a body, so an annotation is rendered exactly once per page.\n */\nexport function RunAnnotationCountChip({\n summary,\n workspaceSlug,\n projectSlug,\n workflowRunId,\n runAttempt,\n jobId,\n}: RunAnnotationCountChipProps) {\n if (!summary || summary.total === 0) return null;\n\n const severity = highestRunAnnotationSeverity(summary);\n const count = `${summary.total}${summary.truncated ? '+' : ''}`;\n const label = `${count} ${summary.total === 1 && !summary.truncated ? 'annotation' : 'annotations'}`;\n const accessibleLabel = severity\n ? `View ${label}, highest severity ${severity}`\n : `View ${label}`;\n const search: WorkflowRunsSearch = {tab: 'annotations', ...(runAttempt ? {runAttempt} : {})};\n if (jobId) search.jobId = jobId;\n\n return (\n <Link\n to=\"/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId\"\n params={{workspaceSlug, projectSlug, workflowRunId}}\n search={workflowRunSearchParams(search, search) as never}\n aria-label={accessibleLabel}\n className={cn(\n 'inline-flex h-20 shrink-0 items-center gap-tight rounded-4 border px-tight font-code text-xs leading-16 tabular-nums outline-none transition-colors hover:bg-background-neutral-hover focus-visible:shadow-border-interactive-with-active',\n // The chip stays 20px optically so it sits level with the duration metadata beside it;\n // the hit area grows to the 44px minimum only where the pointer is coarse.\n '[@media(pointer:coarse)]:h-44 [@media(pointer:coarse)]:px-[10px]',\n severity ? SEVERITY_CHIP_TONE[severity] : 'border-border-neutral-base',\n )}\n >\n <Icon\n name={severity ? SEVERITY_ICON[severity] : 'fileTextLine'}\n size={12}\n aria-hidden=\"true\"\n />\n <span className=\"text-foreground-neutral-base\">{count}</span>\n </Link>\n );\n}\n"],"names":["Icon","cn","Link","highestRunAnnotationSeverity","workflowRunSearchParams","SEVERITY_CHIP_TONE","SEVERITY_ICON","RunAnnotationCountChip","summary","workspaceSlug","projectSlug","workflowRunId","runAttempt","jobId","total","severity","count","truncated","label","accessibleLabel","search","tab","to","params","aria-label","className","name","size","aria-hidden","span"],"mappings":";AAAA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 +1,20 @@
1
+ import type { RunAnnotationEntry } from '#core/run-annotation.js';
2
+ export interface RunAnnotationItemProps {
3
+ entry: RunAnnotationEntry;
4
+ workspaceSlug?: string | undefined;
5
+ projectSlug?: string | undefined;
6
+ workflowRunId: string;
7
+ runAttempt?: number | undefined;
8
+ /** Deep-link target from `?annotation=`, which takes focus rather than only being scrolled to. */
9
+ selected?: boolean | undefined;
10
+ }
11
+ /**
12
+ * One annotation, and the only place in the product that renders an annotation body.
13
+ *
14
+ * The title is the annotation's `context`, which is what the emitting step named the block.
15
+ * Everything below it exists so a reader can get from a diagnostic back to its cause.
16
+ */
17
+ export declare function RunAnnotationItem({ entry, workspaceSlug, projectSlug, workflowRunId, runAttempt, selected, }: RunAnnotationItemProps): import("react").JSX.Element;
18
+ /** Stable element id so `?annotation=<id>` can scroll to and highlight one annotation. */
19
+ export declare function annotationElementId(annotationId: string): string;
20
+ //# sourceMappingURL=run-annotation-item.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-annotation-item.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-tabs/run-annotation-item.tsx"],"names":[],"mappings":"AAOA,OAAO,KAAK,EAAC,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAGhE,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,kBAAkB,CAAC;IAC1B,aAAa,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACnC,WAAW,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,aAAa,EAAE,MAAM,CAAC;IACtB,UAAU,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAChC,kGAAkG;IAClG,QAAQ,CAAC,EAAE,OAAO,GAAG,SAAS,CAAC;CAChC;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAChC,KAAK,EACL,aAAa,EACb,WAAW,EACX,aAAa,EACb,UAAU,EACV,QAAgB,GACjB,EAAE,sBAAsB,+BAuExB;AAeD,0FAA0F;AAC1F,wBAAgB,mBAAmB,CAAC,YAAY,EAAE,MAAM,GAAG,MAAM,CAEhE"}
@@ -0,0 +1,102 @@
1
+ import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { AnnotationCard } from '@shipfox/client-ui';
3
+ import { Button } from '@shipfox/react-ui/button';
4
+ import { Icon } from '@shipfox/react-ui/icon';
5
+ import { Text } from '@shipfox/react-ui/typography';
6
+ import { cn } from '@shipfox/react-ui/utils';
7
+ import { Link } from '@tanstack/react-router';
8
+ import { useEffect, useRef } from 'react';
9
+ import { workflowJobSearchParams } from '#routes/inputs.js';
10
+ /**
11
+ * One annotation, and the only place in the product that renders an annotation body.
12
+ *
13
+ * The title is the annotation's `context`, which is what the emitting step named the block.
14
+ * Everything below it exists so a reader can get from a diagnostic back to its cause.
15
+ */ export function RunAnnotationItem({ entry, workspaceSlug, projectSlug, workflowRunId, runAttempt, selected = false }) {
16
+ const { annotation, origin } = entry;
17
+ const canLink = Boolean(origin && workspaceSlug && projectSlug);
18
+ const itemRef = useRef(null);
19
+ const focusedRef = useRef(false);
20
+ useEffect(()=>{
21
+ if (!selected) {
22
+ focusedRef.current = false;
23
+ return;
24
+ }
25
+ if (focusedRef.current) return;
26
+ // A deep link that only scrolls leaves a keyboard or screen-reader user at the document
27
+ // start while the page moves under them.
28
+ focusedRef.current = true;
29
+ itemRef.current?.focus({
30
+ preventScroll: true
31
+ });
32
+ itemRef.current?.scrollIntoView({
33
+ block: 'nearest'
34
+ });
35
+ }, [
36
+ selected
37
+ ]);
38
+ return /*#__PURE__*/ _jsx("li", {
39
+ ref: itemRef,
40
+ tabIndex: -1,
41
+ "aria-current": selected ? 'true' : undefined,
42
+ className: cn('rounded-8 outline-none focus-visible:shadow-border-interactive-with-active', selected && 'shadow-border-interactive-with-active'),
43
+ children: /*#__PURE__*/ _jsx(AnnotationCard, {
44
+ id: annotationElementId(annotation.id),
45
+ style: annotation.style,
46
+ title: annotation.context,
47
+ titleAs: "h3",
48
+ provenance: /*#__PURE__*/ _jsx(RunAnnotationProvenance, {
49
+ entry: entry
50
+ }),
51
+ body: annotation.body,
52
+ action: canLink && origin ? /*#__PURE__*/ _jsx(Button, {
53
+ asChild: true,
54
+ size: "xs",
55
+ variant: "transparent",
56
+ className: "[@media(pointer:coarse)]:min-h-44",
57
+ children: /*#__PURE__*/ _jsxs(Link, {
58
+ to: "/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId/jobs/$jobId",
59
+ params: {
60
+ workspaceSlug: workspaceSlug ?? '',
61
+ projectSlug: projectSlug ?? '',
62
+ workflowRunId,
63
+ jobId: origin.jobId
64
+ },
65
+ search: workflowJobSearchParams({
66
+ jobExecutionId: origin.jobExecutionId,
67
+ stepId: origin.stepId,
68
+ stepAttemptId: origin.stepAttemptId,
69
+ runAttempt
70
+ }),
71
+ children: [
72
+ "Open step",
73
+ /*#__PURE__*/ _jsx(Icon, {
74
+ name: "arrowRightLine",
75
+ size: 12,
76
+ "aria-hidden": "true"
77
+ })
78
+ ]
79
+ })
80
+ }) : null
81
+ })
82
+ });
83
+ }
84
+ /** `job · execution #2 · run tests · attempt 1`, dropping any part the run no longer resolves. */ function RunAnnotationProvenance({ entry }) {
85
+ const parts = [
86
+ entry.jobName,
87
+ entry.executionLabel,
88
+ entry.stepLabel,
89
+ entry.attemptLabel
90
+ ].filter((part)=>Boolean(part));
91
+ return /*#__PURE__*/ _jsx(Text, {
92
+ as: "p",
93
+ size: "xs",
94
+ className: "min-w-0 break-words font-code text-foreground-neutral-subtle",
95
+ children: parts.join(' · ')
96
+ });
97
+ }
98
+ /** Stable element id so `?annotation=<id>` can scroll to and highlight one annotation. */ export function annotationElementId(annotationId) {
99
+ return `run-annotation-${annotationId}`;
100
+ }
101
+
102
+ //# sourceMappingURL=run-annotation-item.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../../src/components/workflow-run-tabs/run-annotation-item.tsx"],"sourcesContent":["import {AnnotationCard} from '@shipfox/client-ui';\nimport {Button} from '@shipfox/react-ui/button';\nimport {Icon} from '@shipfox/react-ui/icon';\nimport {Text} from '@shipfox/react-ui/typography';\nimport {cn} from '@shipfox/react-ui/utils';\nimport {Link} from '@tanstack/react-router';\nimport {useEffect, useRef} from 'react';\nimport type {RunAnnotationEntry} from '#core/run-annotation.js';\nimport {workflowJobSearchParams} from '#routes/inputs.js';\n\nexport interface RunAnnotationItemProps {\n entry: RunAnnotationEntry;\n workspaceSlug?: string | undefined;\n projectSlug?: string | undefined;\n workflowRunId: string;\n runAttempt?: number | undefined;\n /** Deep-link target from `?annotation=`, which takes focus rather than only being scrolled to. */\n selected?: boolean | undefined;\n}\n\n/**\n * One annotation, and the only place in the product that renders an annotation body.\n *\n * The title is the annotation's `context`, which is what the emitting step named the block.\n * Everything below it exists so a reader can get from a diagnostic back to its cause.\n */\nexport function RunAnnotationItem({\n entry,\n workspaceSlug,\n projectSlug,\n workflowRunId,\n runAttempt,\n selected = false,\n}: RunAnnotationItemProps) {\n const {annotation, origin} = entry;\n const canLink = Boolean(origin && workspaceSlug && projectSlug);\n const itemRef = useRef<HTMLLIElement>(null);\n const focusedRef = useRef(false);\n\n useEffect(() => {\n if (!selected) {\n focusedRef.current = false;\n return;\n }\n if (focusedRef.current) return;\n\n // A deep link that only scrolls leaves a keyboard or screen-reader user at the document\n // start while the page moves under them.\n focusedRef.current = true;\n itemRef.current?.focus({preventScroll: true});\n itemRef.current?.scrollIntoView({block: 'nearest'});\n }, [selected]);\n\n return (\n <li\n ref={itemRef}\n tabIndex={-1}\n aria-current={selected ? 'true' : undefined}\n className={cn(\n 'rounded-8 outline-none focus-visible:shadow-border-interactive-with-active',\n selected && 'shadow-border-interactive-with-active',\n )}\n >\n <AnnotationCard\n id={annotationElementId(annotation.id)}\n style={annotation.style}\n title={annotation.context}\n titleAs=\"h3\"\n provenance={<RunAnnotationProvenance entry={entry} />}\n body={annotation.body}\n action={\n canLink && origin ? (\n <Button\n asChild\n size=\"xs\"\n variant=\"transparent\"\n className=\"[@media(pointer:coarse)]:min-h-44\"\n >\n <Link\n to=\"/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId/jobs/$jobId\"\n params={{\n workspaceSlug: workspaceSlug ?? '',\n projectSlug: projectSlug ?? '',\n workflowRunId,\n jobId: origin.jobId,\n }}\n search={\n workflowJobSearchParams({\n jobExecutionId: origin.jobExecutionId,\n stepId: origin.stepId,\n stepAttemptId: origin.stepAttemptId,\n runAttempt,\n }) as never\n }\n >\n Open step\n <Icon name=\"arrowRightLine\" size={12} aria-hidden=\"true\" />\n </Link>\n </Button>\n ) : null\n }\n />\n </li>\n );\n}\n\n/** `job · execution #2 · run tests · attempt 1`, dropping any part the run no longer resolves. */\nfunction RunAnnotationProvenance({entry}: {entry: RunAnnotationEntry}) {\n const parts = [entry.jobName, entry.executionLabel, entry.stepLabel, entry.attemptLabel].filter(\n (part): part is string => Boolean(part),\n );\n\n return (\n <Text as=\"p\" size=\"xs\" className=\"min-w-0 break-words font-code text-foreground-neutral-subtle\">\n {parts.join(' · ')}\n </Text>\n );\n}\n\n/** Stable element id so `?annotation=<id>` can scroll to and highlight one annotation. */\nexport function annotationElementId(annotationId: string): string {\n return `run-annotation-${annotationId}`;\n}\n"],"names":["AnnotationCard","Button","Icon","Text","cn","Link","useEffect","useRef","workflowJobSearchParams","RunAnnotationItem","entry","workspaceSlug","projectSlug","workflowRunId","runAttempt","selected","annotation","origin","canLink","Boolean","itemRef","focusedRef","current","focus","preventScroll","scrollIntoView","block","li","ref","tabIndex","aria-current","undefined","className","id","annotationElementId","style","title","context","titleAs","provenance","RunAnnotationProvenance","body","action","asChild","size","variant","to","params","jobId","search","jobExecutionId","stepId","stepAttemptId","name","aria-hidden","parts","jobName","executionLabel","stepLabel","attemptLabel","filter","part","as","join","annotationId"],"mappings":";AAAA,SAAQA,cAAc,QAAO,qBAAqB;AAClD,SAAQC,MAAM,QAAO,2BAA2B;AAChD,SAAQC,IAAI,QAAO,yBAAyB;AAC5C,SAAQC,IAAI,QAAO,+BA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C;wBACAmC,OAAO/B,OAAO+B,KAAK;oBACrB;oBACAC,QACEzC,wBAAwB;wBACtB0C,gBAAgBjC,OAAOiC,cAAc;wBACrCC,QAAQlC,OAAOkC,MAAM;wBACrBC,eAAenC,OAAOmC,aAAa;wBACnCtC;oBACF;;wBAEH;sCAEC,KAACZ;4BAAKmD,MAAK;4BAAiBT,MAAM;4BAAIU,eAAY;;;;iBAGpD;;;AAKd;AAEA,gGAAgG,GAChG,SAASd,wBAAwB,EAAC9B,KAAK,EAA8B;IACnE,MAAM6C,QAAQ;QAAC7C,MAAM8C,OAAO;QAAE9C,MAAM+C,cAAc;QAAE/C,MAAMgD,SAAS;QAAEhD,MAAMiD,YAAY;KAAC,CAACC,MAAM,CAC7F,CAACC,OAAyB1C,QAAQ0C;IAGpC,qBACE,KAAC1D;QAAK2D,IAAG;QAAIlB,MAAK;QAAKZ,WAAU;kBAC9BuB,MAAMQ,IAAI,CAAC;;AAGlB;AAEA,wFAAwF,GACxF,OAAO,SAAS7B,oBAAoB8B,YAAoB;IACtD,OAAO,CAAC,eAAe,EAAEA,cAAc;AACzC"}
@@ -0,0 +1,39 @@
1
+ import { type QueryLoadErrorQuery } from '@shipfox/client-ui';
2
+ import type { RunAnnotationEntry, RunAnnotationStyle } from '#core/run-annotation.js';
3
+ export interface RunAnnotationListQuery extends QueryLoadErrorQuery {
4
+ isPending: boolean;
5
+ hasNextPage: boolean;
6
+ isFetchingNextPage: boolean;
7
+ fetchNextPage: () => unknown;
8
+ }
9
+ export interface RunAnnotationListProps {
10
+ query: RunAnnotationListQuery;
11
+ entries: RunAnnotationEntry[] | undefined;
12
+ /** Synthetic terminal-job diagnostics for jobs that never created an execution record. */
13
+ derivedAnnotations?: readonly DerivedRunAnnotation[] | undefined;
14
+ workflowRunId: string;
15
+ workspaceSlug?: string | undefined;
16
+ projectSlug?: string | undefined;
17
+ runAttempt?: number | undefined;
18
+ /** Name of the job the list is filtered to, used only for empty-state copy. */
19
+ filteredJobName?: string | undefined;
20
+ /** Active severity filter, named in the empty state so the reader knows what to clear. */
21
+ filteredSeverity?: string | undefined;
22
+ filtered: boolean;
23
+ onClearFilters?: (() => void) | undefined;
24
+ /** Annotation id from `?annotation=`, which the matching card scrolls to and focuses. */
25
+ selectedAnnotationId?: string | undefined;
26
+ }
27
+ export interface DerivedRunAnnotation {
28
+ id: string;
29
+ style: RunAnnotationStyle;
30
+ body: string;
31
+ }
32
+ /**
33
+ * The annotations list.
34
+ *
35
+ * Loading, empty, error, and stale are four distinct renderings on purpose: coalescing a failed
36
+ * fetch into an empty result tells a reader their run is clean when the truth is unknown.
37
+ */
38
+ export declare function RunAnnotationList({ query, entries, derivedAnnotations, workflowRunId, workspaceSlug, projectSlug, runAttempt, filteredJobName, filteredSeverity, filtered, onClearFilters, selectedAnnotationId, }: RunAnnotationListProps): import("react").JSX.Element;
39
+ //# sourceMappingURL=run-annotation-list.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"run-annotation-list.d.ts","sourceRoot":"","sources":["../../../src/components/workflow-run-tabs/run-annotation-list.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAiC,KAAK,mBAAmB,EAAC,MAAM,oBAAoB,CAAC;AAO5F,OAAO,KAAK,EAAC,kBAAkB,EAAE,kBAAkB,EAAC,MAAM,yBAAyB,CAAC;AAIpF,MAAM,WAAW,sBAAuB,SAAQ,mBAAmB;IACjE,SAAS,EAAE,OAAO,CAAC;IACnB,WAAW,EAAE,OAAO,CAAC;IACrB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,aAAa,EAAE,MAAM,OAAO,CAAC;CAC9B;AAED,MAAM,WAAW,sBAAsB;IACrC,KAAK,EAAE,sBAAsB,CAAC;IAC9B,OAAO,EAAE,kBAAkB,EAAE,GAAG,SAAS,CAAC;IAC1C,0FAA0F;IAC1F,kBAAkB,CAAC,EAAE,SAAS,oBAAoB,EAAE,GAAG,SAAS,CAAC;IACjE,aAAa,EAAE,MAAM,CAAC;IACtB,aAAa,CAAC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