@shipfox/client-workflows 12.0.2 → 14.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 (325) hide show
  1. package/.storybook/main.ts +16 -1
  2. package/.storybook/preview.tsx +3 -3
  3. package/.storybook/workspace-source.ts +31 -0
  4. package/.turbo/turbo-build.log +1 -1
  5. package/CHANGELOG.md +79 -0
  6. package/dist/components/job-graph/job-duration-format.d.ts +2 -2
  7. package/dist/components/job-graph/job-duration-format.d.ts.map +1 -1
  8. package/dist/components/job-graph/job-duration-format.js +4 -2
  9. package/dist/components/job-graph/job-duration-format.js.map +1 -1
  10. package/dist/components/job-graph/job-duration-label.js +1 -1
  11. package/dist/components/job-graph/job-duration-label.js.map +1 -1
  12. package/dist/components/job-graph/job-graph-content.d.ts +2 -1
  13. package/dist/components/job-graph/job-graph-content.d.ts.map +1 -1
  14. package/dist/components/job-graph/job-graph-content.js +3 -3
  15. package/dist/components/job-graph/job-graph-content.js.map +1 -1
  16. package/dist/components/job-graph/job-graph-view.d.ts +2 -1
  17. package/dist/components/job-graph/job-graph-view.d.ts.map +1 -1
  18. package/dist/components/job-graph/job-graph-view.js +2 -2
  19. package/dist/components/job-graph/job-graph-view.js.map +1 -1
  20. package/dist/components/job-graph/job-node.d.ts +1 -1
  21. package/dist/components/job-graph/job-node.d.ts.map +1 -1
  22. package/dist/components/job-graph/job-node.js +10 -9
  23. package/dist/components/job-graph/job-node.js.map +1 -1
  24. package/dist/components/job-graph/types.d.ts +2 -1
  25. package/dist/components/job-graph/types.d.ts.map +1 -1
  26. package/dist/components/job-graph/types.js.map +1 -1
  27. package/dist/components/step-list/step-list.d.ts +2 -2
  28. package/dist/components/step-list/step-list.d.ts.map +1 -1
  29. package/dist/components/step-list/step-list.js.map +1 -1
  30. package/dist/components/workflow-run-duration-label.js +1 -1
  31. package/dist/components/workflow-run-duration-label.js.map +1 -1
  32. package/dist/components/workflow-run-list/job-status-strip.d.ts +21 -0
  33. package/dist/components/workflow-run-list/job-status-strip.d.ts.map +1 -0
  34. package/dist/components/workflow-run-list/job-status-strip.js +185 -0
  35. package/dist/components/workflow-run-list/job-status-strip.js.map +1 -0
  36. package/dist/components/workflow-run-list/run-display.d.ts +27 -3
  37. package/dist/components/workflow-run-list/run-display.d.ts.map +1 -1
  38. package/dist/components/workflow-run-list/run-display.js +78 -7
  39. package/dist/components/workflow-run-list/run-display.js.map +1 -1
  40. package/dist/components/workflow-run-list/types.d.ts +23 -24
  41. package/dist/components/workflow-run-list/types.d.ts.map +1 -1
  42. package/dist/components/workflow-run-list/types.js.map +1 -1
  43. package/dist/components/workflow-run-list/workflow-run-filter-menu.d.ts +22 -0
  44. package/dist/components/workflow-run-list/workflow-run-filter-menu.d.ts.map +1 -0
  45. package/dist/components/workflow-run-list/workflow-run-filter-menu.js +68 -0
  46. package/dist/components/workflow-run-list/workflow-run-filter-menu.js.map +1 -0
  47. package/dist/components/workflow-run-list/workflow-run-filters.d.ts +18 -0
  48. package/dist/components/workflow-run-list/workflow-run-filters.d.ts.map +1 -0
  49. package/dist/components/workflow-run-list/workflow-run-filters.js +236 -0
  50. package/dist/components/workflow-run-list/workflow-run-filters.js.map +1 -0
  51. package/dist/components/workflow-run-list/workflow-run-list-content.d.ts +8 -4
  52. package/dist/components/workflow-run-list/workflow-run-list-content.d.ts.map +1 -1
  53. package/dist/components/workflow-run-list/workflow-run-list-content.js +40 -12
  54. package/dist/components/workflow-run-list/workflow-run-list-content.js.map +1 -1
  55. package/dist/components/workflow-run-list/workflow-run-list-states.d.ts +29 -2
  56. package/dist/components/workflow-run-list/workflow-run-list-states.d.ts.map +1 -1
  57. package/dist/components/workflow-run-list/workflow-run-list-states.js +103 -44
  58. package/dist/components/workflow-run-list/workflow-run-list-states.js.map +1 -1
  59. package/dist/components/workflow-run-list/workflow-run-list-view.d.ts +1 -1
  60. package/dist/components/workflow-run-list/workflow-run-list-view.d.ts.map +1 -1
  61. package/dist/components/workflow-run-list/workflow-run-list-view.js +60 -43
  62. package/dist/components/workflow-run-list/workflow-run-list-view.js.map +1 -1
  63. package/dist/components/workflow-run-list/workflow-run-list.d.ts +1 -1
  64. package/dist/components/workflow-run-list/workflow-run-list.d.ts.map +1 -1
  65. package/dist/components/workflow-run-list/workflow-run-list.js +20 -8
  66. package/dist/components/workflow-run-list/workflow-run-list.js.map +1 -1
  67. package/dist/components/workflow-run-list/workflow-run-row.d.ts +19 -9
  68. package/dist/components/workflow-run-list/workflow-run-row.d.ts.map +1 -1
  69. package/dist/components/workflow-run-list/workflow-run-row.js +179 -112
  70. package/dist/components/workflow-run-list/workflow-run-row.js.map +1 -1
  71. package/dist/components/workflow-run-number-label.d.ts +15 -0
  72. package/dist/components/workflow-run-number-label.d.ts.map +1 -0
  73. package/dist/components/workflow-run-number-label.js +41 -0
  74. package/dist/components/workflow-run-number-label.js.map +1 -0
  75. package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.d.ts +3 -3
  76. package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.d.ts.map +1 -1
  77. package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.js +10 -9
  78. package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.js.map +1 -1
  79. package/dist/components/workflow-run-summary/workflow-run-summary.d.ts +4 -9
  80. package/dist/components/workflow-run-summary/workflow-run-summary.d.ts.map +1 -1
  81. package/dist/components/workflow-run-summary/workflow-run-summary.js +107 -74
  82. package/dist/components/workflow-run-summary/workflow-run-summary.js.map +1 -1
  83. package/dist/components/workflow-run-tabs/index.d.ts +6 -0
  84. package/dist/components/workflow-run-tabs/index.d.ts.map +1 -0
  85. package/dist/components/workflow-run-tabs/index.js +7 -0
  86. package/dist/components/workflow-run-tabs/index.js.map +1 -0
  87. package/dist/components/workflow-run-tabs/run-annotation-summary-line.d.ts +11 -0
  88. package/dist/components/workflow-run-tabs/run-annotation-summary-line.d.ts.map +1 -0
  89. package/dist/components/workflow-run-tabs/run-annotation-summary-line.js +71 -0
  90. package/dist/components/workflow-run-tabs/run-annotation-summary-line.js.map +1 -0
  91. package/dist/components/workflow-run-tabs/run-annotations-empty.d.ts +2 -0
  92. package/dist/components/workflow-run-tabs/run-annotations-empty.d.ts.map +1 -0
  93. package/dist/components/workflow-run-tabs/run-annotations-empty.js +11 -0
  94. package/dist/components/workflow-run-tabs/run-annotations-empty.js.map +1 -0
  95. package/dist/components/workflow-run-tabs/run-jobs-list.d.ts +18 -0
  96. package/dist/components/workflow-run-tabs/run-jobs-list.d.ts.map +1 -0
  97. package/dist/components/workflow-run-tabs/run-jobs-list.js +107 -0
  98. package/dist/components/workflow-run-tabs/run-jobs-list.js.map +1 -0
  99. package/dist/components/workflow-run-tabs/run-tab-count.d.ts +6 -0
  100. package/dist/components/workflow-run-tabs/run-tab-count.d.ts.map +1 -0
  101. package/dist/components/workflow-run-tabs/run-tab-count.js +27 -0
  102. package/dist/components/workflow-run-tabs/run-tab-count.js.map +1 -0
  103. package/dist/components/workflow-run-tabs/run-tab-strip.d.ts +8 -0
  104. package/dist/components/workflow-run-tabs/run-tab-strip.d.ts.map +1 -0
  105. package/dist/components/workflow-run-tabs/run-tab-strip.js +82 -0
  106. package/dist/components/workflow-run-tabs/run-tab-strip.js.map +1 -0
  107. package/dist/components/workflow-run-view/agent-config-failure-callout.d.ts +2 -2
  108. package/dist/components/workflow-run-view/agent-config-failure-callout.d.ts.map +1 -1
  109. package/dist/components/workflow-run-view/agent-config-failure-callout.js +4 -4
  110. package/dist/components/workflow-run-view/agent-config-failure-callout.js.map +1 -1
  111. package/dist/components/workflow-run-view/job-card.d.ts +2 -2
  112. package/dist/components/workflow-run-view/job-card.d.ts.map +1 -1
  113. package/dist/components/workflow-run-view/job-card.js +51 -32
  114. package/dist/components/workflow-run-view/job-card.js.map +1 -1
  115. package/dist/components/workflow-run-view/job-execution-switcher.d.ts +1 -1
  116. package/dist/components/workflow-run-view/job-execution-switcher.d.ts.map +1 -1
  117. package/dist/components/workflow-run-view/job-execution-switcher.js +20 -8
  118. package/dist/components/workflow-run-view/job-execution-switcher.js.map +1 -1
  119. package/dist/components/workflow-run-view/workflow-run-selection.d.ts.map +1 -1
  120. package/dist/components/workflow-run-view/workflow-run-selection.js +40 -1
  121. package/dist/components/workflow-run-view/workflow-run-selection.js.map +1 -1
  122. package/dist/components/workflow-run-view/workflow-run-states.d.ts +1 -0
  123. package/dist/components/workflow-run-view/workflow-run-states.d.ts.map +1 -1
  124. package/dist/components/workflow-run-view/workflow-run-states.js +10 -1
  125. package/dist/components/workflow-run-view/workflow-run-states.js.map +1 -1
  126. package/dist/components/workflow-run-view/workflow-run-view.d.ts +10 -5
  127. package/dist/components/workflow-run-view/workflow-run-view.d.ts.map +1 -1
  128. package/dist/components/workflow-run-view/workflow-run-view.js +136 -85
  129. package/dist/components/workflow-run-view/workflow-run-view.js.map +1 -1
  130. package/dist/components/workflow-source-panel/index.d.ts +1 -0
  131. package/dist/components/workflow-source-panel/index.d.ts.map +1 -1
  132. package/dist/components/workflow-source-panel/index.js +1 -0
  133. package/dist/components/workflow-source-panel/index.js.map +1 -1
  134. package/dist/components/workflow-source-panel/workflow-source-content.d.ts +12 -0
  135. package/dist/components/workflow-source-panel/workflow-source-content.d.ts.map +1 -0
  136. package/dist/components/workflow-source-panel/workflow-source-content.js +53 -0
  137. package/dist/components/workflow-source-panel/workflow-source-content.js.map +1 -0
  138. package/dist/components/workflow-source-panel/workflow-source-panel.d.ts +1 -1
  139. package/dist/components/workflow-source-panel/workflow-source-panel.d.ts.map +1 -1
  140. package/dist/components/workflow-source-panel/workflow-source-panel.js +7 -54
  141. package/dist/components/workflow-source-panel/workflow-source-panel.js.map +1 -1
  142. package/dist/components/workflow-status/status-visuals.d.ts +4 -4
  143. package/dist/components/workflow-status/status-visuals.d.ts.map +1 -1
  144. package/dist/components/workflow-status/status-visuals.js +7 -0
  145. package/dist/components/workflow-status/status-visuals.js.map +1 -1
  146. package/dist/components/workflow-status/workflow-status-icon.d.ts +3 -4
  147. package/dist/components/workflow-status/workflow-status-icon.d.ts.map +1 -1
  148. package/dist/components/workflow-status/workflow-status-icon.js +6 -4
  149. package/dist/components/workflow-status/workflow-status-icon.js.map +1 -1
  150. package/dist/core/entities/job-execution.d.ts +10 -0
  151. package/dist/core/entities/job-execution.d.ts.map +1 -1
  152. package/dist/core/entities/job-execution.js +11 -0
  153. package/dist/core/entities/job-execution.js.map +1 -1
  154. package/dist/core/entities/job.d.ts +4 -2
  155. package/dist/core/entities/job.d.ts.map +1 -1
  156. package/dist/core/entities/job.js +8 -1
  157. package/dist/core/entities/job.js.map +1 -1
  158. package/dist/core/entities/step.d.ts +1 -1
  159. package/dist/core/entities/step.d.ts.map +1 -1
  160. package/dist/core/entities/step.js +2 -0
  161. package/dist/core/entities/step.js.map +1 -1
  162. package/dist/core/entities/workflow-run.d.ts +52 -4
  163. package/dist/core/entities/workflow-run.d.ts.map +1 -1
  164. package/dist/core/entities/workflow-run.js +22 -3
  165. package/dist/core/entities/workflow-run.js.map +1 -1
  166. package/dist/core/workflow-run-tabs.d.ts +9 -0
  167. package/dist/core/workflow-run-tabs.d.ts.map +1 -0
  168. package/dist/core/workflow-run-tabs.js +3 -0
  169. package/dist/core/workflow-run-tabs.js.map +1 -0
  170. package/dist/core/workflow-run.d.ts +6 -6
  171. package/dist/core/workflow-run.d.ts.map +1 -1
  172. package/dist/core/workflow-run.js +3 -3
  173. package/dist/core/workflow-run.js.map +1 -1
  174. package/dist/feature.d.ts +7 -7
  175. package/dist/feature.js +5 -5
  176. package/dist/feature.js.map +1 -1
  177. package/dist/hooks/api/workflow-run-mapper.d.ts +4 -3
  178. package/dist/hooks/api/workflow-run-mapper.d.ts.map +1 -1
  179. package/dist/hooks/api/workflow-run-mapper.js +31 -3
  180. package/dist/hooks/api/workflow-run-mapper.js.map +1 -1
  181. package/dist/hooks/api/workflow-runs.d.ts +4 -4
  182. package/dist/hooks/api/workflow-runs.d.ts.map +1 -1
  183. package/dist/hooks/api/workflow-runs.js +12 -4
  184. package/dist/hooks/api/workflow-runs.js.map +1 -1
  185. package/dist/index.d.ts +4 -3
  186. package/dist/index.d.ts.map +1 -1
  187. package/dist/index.js +3 -2
  188. package/dist/index.js.map +1 -1
  189. package/dist/pages/project-workflows-page.js +46 -1
  190. package/dist/pages/project-workflows-page.js.map +1 -1
  191. package/dist/pages/workflow-run-detail-page.d.ts +11 -0
  192. package/dist/pages/workflow-run-detail-page.d.ts.map +1 -0
  193. package/dist/pages/workflow-run-detail-page.js +52 -0
  194. package/dist/pages/workflow-run-detail-page.js.map +1 -0
  195. package/dist/pages/workflow-run-list-page.d.ts +10 -0
  196. package/dist/pages/workflow-run-list-page.d.ts.map +1 -0
  197. package/dist/pages/workflow-run-list-page.js +43 -0
  198. package/dist/pages/workflow-run-list-page.js.map +1 -0
  199. package/dist/routes/inputs.d.ts +94 -5
  200. package/dist/routes/inputs.d.ts.map +1 -1
  201. package/dist/routes/inputs.js +199 -13
  202. package/dist/routes/inputs.js.map +1 -1
  203. package/dist/routes/project-route.d.ts +6 -0
  204. package/dist/routes/project-route.d.ts.map +1 -0
  205. package/dist/routes/project-route.js +25 -0
  206. package/dist/routes/project-route.js.map +1 -0
  207. package/dist/routes/run-detail.d.ts.map +1 -1
  208. package/dist/routes/run-detail.js +12 -7
  209. package/dist/routes/run-detail.js.map +1 -1
  210. package/dist/routes/runs.d.ts.map +1 -1
  211. package/dist/routes/runs.js +11 -6
  212. package/dist/routes/runs.js.map +1 -1
  213. package/dist/routes/workflows.d.ts.map +1 -1
  214. package/dist/routes/workflows.js +6 -5
  215. package/dist/routes/workflows.js.map +1 -1
  216. package/dist/tsconfig.test.tsbuildinfo +1 -1
  217. package/package.json +9 -9
  218. package/src/components/job-graph/job-duration-format.ts +11 -2
  219. package/src/components/job-graph/job-duration-label.tsx +5 -1
  220. package/src/components/job-graph/job-graph-content.tsx +7 -4
  221. package/src/components/job-graph/job-graph-view.test.tsx +19 -8
  222. package/src/components/job-graph/job-graph-view.tsx +6 -3
  223. package/src/components/job-graph/job-graph.stories.tsx +24 -20
  224. package/src/components/job-graph/job-node.stories.tsx +11 -6
  225. package/src/components/job-graph/job-node.test.tsx +82 -12
  226. package/src/components/job-graph/job-node.tsx +22 -15
  227. package/src/components/job-graph/types.ts +5 -1
  228. package/src/components/step-list/step-list.stories.tsx +2 -3
  229. package/src/components/step-list/step-list.tsx +3 -2
  230. package/src/components/workflow-run-duration-label.tsx +1 -1
  231. package/src/components/workflow-run-list/job-status-strip.tsx +189 -0
  232. package/src/components/workflow-run-list/run-display.test.ts +169 -30
  233. package/src/components/workflow-run-list/run-display.ts +116 -9
  234. package/src/components/workflow-run-list/types.ts +21 -17
  235. package/src/components/workflow-run-list/workflow-run-filter-menu.tsx +100 -0
  236. package/src/components/workflow-run-list/workflow-run-filters.tsx +243 -0
  237. package/src/components/workflow-run-list/workflow-run-list-content.tsx +44 -16
  238. package/src/components/workflow-run-list/workflow-run-list-states.tsx +128 -27
  239. package/src/components/workflow-run-list/workflow-run-list-view.test.tsx +441 -104
  240. package/src/components/workflow-run-list/workflow-run-list-view.tsx +73 -43
  241. package/src/components/workflow-run-list/workflow-run-list.stories.tsx +140 -20
  242. package/src/components/workflow-run-list/workflow-run-list.tsx +20 -10
  243. package/src/components/workflow-run-list/workflow-run-row.tsx +173 -106
  244. package/src/components/workflow-run-number-label.test.tsx +45 -0
  245. package/src/components/workflow-run-number-label.tsx +47 -0
  246. package/src/components/workflow-run-summary/workflow-run-attempt-switcher.test.tsx +7 -8
  247. package/src/components/workflow-run-summary/workflow-run-attempt-switcher.tsx +15 -14
  248. package/src/components/workflow-run-summary/workflow-run-summary.stories.tsx +29 -38
  249. package/src/components/workflow-run-summary/workflow-run-summary.test.tsx +30 -24
  250. package/src/components/workflow-run-summary/workflow-run-summary.tsx +102 -77
  251. package/src/components/workflow-run-tabs/index.ts +5 -0
  252. package/src/components/workflow-run-tabs/run-annotation-summary-line.test.tsx +69 -0
  253. package/src/components/workflow-run-tabs/run-annotation-summary-line.tsx +97 -0
  254. package/src/components/workflow-run-tabs/run-annotations-empty.tsx +11 -0
  255. package/src/components/workflow-run-tabs/run-jobs-list.tsx +151 -0
  256. package/src/components/workflow-run-tabs/run-tab-count.tsx +28 -0
  257. package/src/components/workflow-run-tabs/run-tab-strip.stories.tsx +52 -0
  258. package/src/components/workflow-run-tabs/run-tab-strip.test.tsx +117 -0
  259. package/src/components/workflow-run-tabs/run-tab-strip.tsx +97 -0
  260. package/src/components/workflow-run-view/agent-config-failure-callout.stories.tsx +2 -3
  261. package/src/components/workflow-run-view/agent-config-failure-callout.tsx +4 -4
  262. package/src/components/workflow-run-view/job-card.stories.tsx +11 -10
  263. package/src/components/workflow-run-view/job-card.test.tsx +115 -0
  264. package/src/components/workflow-run-view/job-card.tsx +74 -35
  265. package/src/components/workflow-run-view/job-execution-switcher.tsx +31 -9
  266. package/src/components/workflow-run-view/workflow-run-selection.test.ts +48 -0
  267. package/src/components/workflow-run-view/workflow-run-selection.ts +48 -1
  268. package/src/components/workflow-run-view/workflow-run-states.tsx +12 -1
  269. package/src/components/workflow-run-view/workflow-run-view.test.tsx +152 -94
  270. package/src/components/workflow-run-view/workflow-run-view.tsx +219 -95
  271. package/src/components/workflow-source-panel/index.ts +1 -0
  272. package/src/components/workflow-source-panel/workflow-source-content.tsx +84 -0
  273. package/src/components/workflow-source-panel/workflow-source-panel.tsx +14 -81
  274. package/src/components/workflow-status/status-visuals.test.ts +9 -0
  275. package/src/components/workflow-status/status-visuals.ts +6 -4
  276. package/src/components/workflow-status/workflow-status-icon.stories.tsx +10 -2
  277. package/src/components/workflow-status/workflow-status-icon.test.tsx +18 -0
  278. package/src/components/workflow-status/workflow-status-icon.tsx +17 -24
  279. package/src/core/entities/job-execution.ts +22 -0
  280. package/src/core/entities/job-status.test.ts +104 -0
  281. package/src/core/entities/job.ts +18 -3
  282. package/src/core/entities/step.ts +4 -0
  283. package/src/core/entities/workflow-run.ts +76 -7
  284. package/src/core/workflow-run-tabs.ts +8 -0
  285. package/src/core/workflow-run.test.ts +24 -9
  286. package/src/core/workflow-run.ts +17 -2
  287. package/src/feature.ts +5 -5
  288. package/src/hooks/api/workflow-run-mapper.ts +30 -3
  289. package/src/hooks/api/workflow-runs.test.tsx +2 -0
  290. package/src/hooks/api/workflow-runs.ts +12 -7
  291. package/src/index.ts +7 -2
  292. package/src/page-harness-budget.test.ts +1 -1
  293. package/src/pages/project-workflows-page.test.tsx +59 -5
  294. package/src/pages/project-workflows-page.tsx +34 -1
  295. package/src/pages/workflow-run-detail-page.tsx +72 -0
  296. package/src/pages/workflow-run-list-page.tsx +65 -0
  297. package/src/pages/workflow-run-pages.test.tsx +823 -0
  298. package/src/routes/inputs.test.ts +240 -12
  299. package/src/routes/inputs.ts +215 -11
  300. package/src/routes/project-route.tsx +25 -0
  301. package/src/routes/run-detail.tsx +15 -8
  302. package/src/routes/runs.tsx +14 -7
  303. package/src/routes/workflows.tsx +5 -4
  304. package/src/storybook-config.test.ts +27 -0
  305. package/test/fixtures/workflow-run.ts +76 -7
  306. package/test/pages.tsx +18 -8
  307. package/test/render.tsx +8 -2
  308. package/tsconfig.build.tsbuildinfo +1 -1
  309. package/tsconfig.test.json +7 -1
  310. package/dist/components/workflow-run-list/workflow-run-list-header.d.ts +0 -10
  311. package/dist/components/workflow-run-list/workflow-run-list-header.d.ts.map +0 -1
  312. package/dist/components/workflow-run-list/workflow-run-list-header.js +0 -55
  313. package/dist/components/workflow-run-list/workflow-run-list-header.js.map +0 -1
  314. package/dist/pages/workflow-run-first-time-use.d.ts +0 -6
  315. package/dist/pages/workflow-run-first-time-use.d.ts.map +0 -1
  316. package/dist/pages/workflow-run-first-time-use.js +0 -17
  317. package/dist/pages/workflow-run-first-time-use.js.map +0 -1
  318. package/dist/pages/workflow-run-page.d.ts +0 -10
  319. package/dist/pages/workflow-run-page.d.ts.map +0 -1
  320. package/dist/pages/workflow-run-page.js +0 -90
  321. package/dist/pages/workflow-run-page.js.map +0 -1
  322. package/src/components/workflow-run-list/workflow-run-list-header.tsx +0 -53
  323. package/src/pages/workflow-run-first-time-use.tsx +0 -17
  324. package/src/pages/workflow-run-page.test.tsx +0 -519
  325. package/src/pages/workflow-run-page.tsx +0 -94
@@ -1,19 +1,56 @@
1
- import { type Job, WORKFLOW_JOB_STATUSES } from './job.js';
1
+ import { type Job, type JobStatus, WORKFLOW_JOB_STATUSES } from './job.js';
2
2
  import type { WorkflowRunAttempt, WorkflowRunAttemptSummary } from './workflow-run-attempt.js';
3
3
  export type WorkflowRunStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled';
4
4
  export type WorkflowRunRerunMode = 'all' | 'failed';
5
5
  export type WorkflowStatus = WorkflowRunStatus | (typeof WORKFLOW_JOB_STATUSES)[number];
6
+ export type WorkflowDisplayStatus = WorkflowStatus | 'listening';
6
7
  export declare const WORKFLOW_RUN_STATUSES: readonly ["pending", "running", "succeeded", "failed", "cancelled"];
7
8
  export declare const TERMINAL_WORKFLOW_RUN_STATUSES: readonly ["succeeded", "failed", "cancelled"];
8
9
  export interface WorkflowSourceSnapshot {
9
10
  content: string;
10
11
  format: 'yaml';
11
12
  }
13
+ /**
14
+ * Provider-neutral trigger facts. Every field is nullable: only source-control triggers
15
+ * resolve a reference at all, and a payload can name a ref without naming an actor.
16
+ */
17
+ export interface WorkflowRunTriggerReference {
18
+ repository: string | null;
19
+ ref: string | null;
20
+ commit: string | null;
21
+ actor: string | null;
22
+ }
23
+ /** One glyph in a run row's job status strip: enough to draw and label it, nothing more. */
24
+ export interface WorkflowRunJobSummary {
25
+ id: string;
26
+ key: string;
27
+ name: string | null;
28
+ status: JobStatus;
29
+ position: number;
30
+ }
31
+ export interface WorkflowRunJobStatusCount {
32
+ status: JobStatus;
33
+ count: number;
34
+ }
35
+ /**
36
+ * A run's jobs as the list receives them: a bounded slice to draw, plus totals covering all
37
+ * of them.
38
+ *
39
+ * `preview` is capped by the API, so `preview.length` is not the job count and the strip
40
+ * reads `total` and `statusCounts` for anything it says rather than anything it draws.
41
+ */
42
+ export interface WorkflowRunJobs {
43
+ preview: WorkflowRunJobSummary[];
44
+ statusCounts: WorkflowRunJobStatusCount[];
45
+ total: number;
46
+ }
12
47
  export interface WorkflowRun {
13
48
  id: string;
14
49
  projectId: string;
15
50
  definitionId: string;
51
+ number: number | null;
16
52
  name: string;
53
+ workflowName: string;
17
54
  currentAttempt: number;
18
55
  triggerProvider: string | null;
19
56
  triggerSource: string;
@@ -21,18 +58,22 @@ export interface WorkflowRun {
21
58
  triggerDisplayLabel: string;
22
59
  triggerLabel: string;
23
60
  triggerPayload: Record<string, unknown>;
61
+ triggerReference: WorkflowRunTriggerReference | null;
24
62
  inputs: Record<string, unknown> | null;
25
63
  sourceSnapshot: WorkflowSourceSnapshot | null;
26
64
  createdAt: string;
27
65
  updatedAt: string;
28
- shortId: string;
29
66
  isTemporary: boolean;
30
67
  }
31
- export interface WorkflowRunListItem extends WorkflowRun {
68
+ /** A run as the API returns it outside the list: no job strip, because none was fetched. */
69
+ export interface WorkflowRunRecord extends WorkflowRun {
32
70
  status: WorkflowRunStatus;
33
71
  latestAttempt: number;
34
72
  runAttempt: WorkflowRunAttemptSummary;
35
73
  }
74
+ export interface WorkflowRunListItem extends WorkflowRunRecord {
75
+ jobs: WorkflowRunJobs;
76
+ }
36
77
  export interface WorkflowRunDetail extends WorkflowRun {
37
78
  latestAttempt: number;
38
79
  runAttempt: WorkflowRunAttempt;
@@ -46,7 +87,6 @@ export interface WorkflowRunListPage {
46
87
  export interface ManualWorkflowLaunch {
47
88
  workflowRunId: string;
48
89
  }
49
- export declare function workflowRunShortId(id: string): string;
50
90
  export declare function workflowRunTriggerLabel({ triggerSource, triggerEvent, }: {
51
91
  triggerSource: string;
52
92
  triggerEvent: string;
@@ -55,6 +95,14 @@ export declare function workflowRunTriggerDisplayLabel({ triggerSource, triggerE
55
95
  triggerSource: string;
56
96
  triggerEvent: string;
57
97
  }): string;
98
+ /**
99
+ * The ref as a person names it: `main` for a branch, `#42` for a pull request, the tag for a
100
+ * tag. An unrecognized ref is shown verbatim rather than hidden, since a ref nobody can read
101
+ * is still better evidence than a blank cell.
102
+ */
103
+ export declare function workflowRunBranchLabel(run: Pick<WorkflowRun, 'triggerReference'>): string | null;
104
+ export declare function workflowRunCommitLabel(run: Pick<WorkflowRun, 'triggerReference'>): string | null;
105
+ export declare function workflowRunActor(run: Pick<WorkflowRun, 'triggerReference'>): string | null;
58
106
  export declare function isWorkflowRunTerminal(status: WorkflowRunStatus): boolean;
59
107
  export declare function isWorkflowStatus(status: string): status is WorkflowStatus;
60
108
  //# sourceMappingURL=workflow-run.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-run.d.ts","sourceRoot":"","sources":["../../../src/core/entities/workflow-run.ts"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,GAAG,EAAE,qBAAqB,EAAC,MAAM,UAAU,CAAC;AACzD,OAAO,KAAK,EAAC,kBAAkB,EAAE,yBAAyB,EAAC,MAAM,2BAA2B,CAAC;AAE7F,MAAM,MAAM,iBAAiB,GAAG,SAAS,GAAG,SAAS,GAAG,WAAW,GAAG,QAAQ,GAAG,WAAW,CAAC;AAC7F,MAAM,MAAM,oBAAoB,GAAG,KAAK,GAAG,QAAQ,CAAC;AACpD,MAAM,MAAM,cAAc,GAAG,iBAAiB,GAAG,CAAC,OAAO,qBAAqB,CAAC,CAAC,MAAM,CAAC,CAAC;AAExF,eAAO,MAAM,qBAAqB,qEAMe,CAAC;AAElD,eAAO,MAAM,8BAA8B,+CAIM,CAAC;AAQlD,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,MAAM,CAAC;IAChB,MAAM,EAAE,MAAM,CAAC;CAChB;AAED,MAAM,WAAW,WAAW;IAC1B,EAAE,EAAE,MAAM,CAAC;IACX,SAAS,EAAE,MAAM,CAAC;IAClB,YAAY,EAAE,MAAM,CAAC;IACrB,IAAI,EAAE,MAAM,CAAC;IACb,cAAc,EAAE,MAAM,CAAC;IACvB,eAAe,EAAE,MAAM,GAAG,IAA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,CAEzE"}
@@ -16,9 +16,6 @@ const WORKFLOW_STATUSES = new Set([
16
16
  ...WORKFLOW_JOB_STATUSES
17
17
  ]);
18
18
  const TERMINAL_WORKFLOW_RUN_STATUS_SET = new Set(TERMINAL_WORKFLOW_RUN_STATUSES);
19
- export function workflowRunShortId(id) {
20
- return id.length <= 8 ? id : id.slice(0, 8);
21
- }
22
19
  export function workflowRunTriggerLabel({ triggerSource, triggerEvent }) {
23
20
  return [
24
21
  triggerSource,
@@ -28,6 +25,28 @@ export function workflowRunTriggerLabel({ triggerSource, triggerEvent }) {
28
25
  export function workflowRunTriggerDisplayLabel({ triggerSource, triggerEvent }) {
29
26
  return triggerEvent || triggerSource;
30
27
  }
28
+ const SHORT_COMMIT_LENGTH = 7;
29
+ const PULL_REQUEST_REF_PATTERN = /^refs\/pull\/(\d+)\/head$/u;
30
+ /**
31
+ * The ref as a person names it: `main` for a branch, `#42` for a pull request, the tag for a
32
+ * tag. An unrecognized ref is shown verbatim rather than hidden, since a ref nobody can read
33
+ * is still better evidence than a blank cell.
34
+ */ export function workflowRunBranchLabel(run) {
35
+ const ref = run.triggerReference?.ref;
36
+ if (!ref) return null;
37
+ const pullRequest = PULL_REQUEST_REF_PATTERN.exec(ref);
38
+ if (pullRequest) return `#${pullRequest[1]}`;
39
+ if (ref.startsWith('refs/heads/')) return ref.slice('refs/heads/'.length);
40
+ if (ref.startsWith('refs/tags/')) return ref.slice('refs/tags/'.length);
41
+ return ref;
42
+ }
43
+ export function workflowRunCommitLabel(run) {
44
+ const commit = run.triggerReference?.commit;
45
+ return commit ? commit.slice(0, SHORT_COMMIT_LENGTH) : null;
46
+ }
47
+ export function workflowRunActor(run) {
48
+ return run.triggerReference?.actor ?? null;
49
+ }
31
50
  export function isWorkflowRunTerminal(status) {
32
51
  return TERMINAL_WORKFLOW_RUN_STATUS_SET.has(status);
33
52
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/core/entities/workflow-run.ts"],"sourcesContent":["import {type Job, WORKFLOW_JOB_STATUSES} from './job.js';\nimport type {WorkflowRunAttempt, WorkflowRunAttemptSummary} from './workflow-run-attempt.js';\n\nexport type WorkflowRunStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled';\nexport type WorkflowRunRerunMode = 'all' | 'failed';\nexport type WorkflowStatus = WorkflowRunStatus | (typeof WORKFLOW_JOB_STATUSES)[number];\n\nexport const WORKFLOW_RUN_STATUSES = [\n 'pending',\n 'running',\n 'succeeded',\n 'failed',\n 'cancelled',\n] as const satisfies readonly WorkflowRunStatus[];\n\nexport const TERMINAL_WORKFLOW_RUN_STATUSES = [\n 'succeeded',\n 'failed',\n 'cancelled',\n] as const satisfies readonly WorkflowRunStatus[];\n\nconst WORKFLOW_STATUSES = new Set<WorkflowStatus>([\n ...WORKFLOW_RUN_STATUSES,\n ...WORKFLOW_JOB_STATUSES,\n]);\nconst TERMINAL_WORKFLOW_RUN_STATUS_SET = new Set<WorkflowRunStatus>(TERMINAL_WORKFLOW_RUN_STATUSES);\n\nexport interface WorkflowSourceSnapshot {\n content: string;\n format: 'yaml';\n}\n\nexport interface WorkflowRun {\n id: string;\n projectId: string;\n definitionId: string;\n name: string;\n currentAttempt: number;\n triggerProvider: string | null;\n triggerSource: string;\n triggerEvent: string;\n triggerDisplayLabel: string;\n triggerLabel: string;\n triggerPayload: Record<string, unknown>;\n inputs: Record<string, unknown> | null;\n sourceSnapshot: WorkflowSourceSnapshot | null;\n createdAt: string;\n updatedAt: string;\n shortId: string;\n isTemporary: boolean;\n}\n\nexport interface WorkflowRunListItem extends WorkflowRun {\n status: WorkflowRunStatus;\n latestAttempt: number;\n runAttempt: WorkflowRunAttemptSummary;\n}\n\nexport interface WorkflowRunDetail extends WorkflowRun {\n latestAttempt: number;\n runAttempt: WorkflowRunAttempt;\n jobs: Job[];\n}\n\nexport interface WorkflowRunListPage {\n runs: WorkflowRunListItem[];\n nextCursor: string | null;\n filteredTotalCount: number | null;\n}\n\nexport interface ManualWorkflowLaunch {\n workflowRunId: string;\n}\n\nexport function workflowRunShortId(id: string): string {\n return id.length <= 8 ? id : id.slice(0, 8);\n}\n\nexport function workflowRunTriggerLabel({\n triggerSource,\n triggerEvent,\n}: {\n triggerSource: string;\n triggerEvent: string;\n}): string {\n return [triggerSource, triggerEvent].filter(Boolean).join(' · ');\n}\n\nexport function workflowRunTriggerDisplayLabel({\n triggerSource,\n triggerEvent,\n}: {\n triggerSource: string;\n triggerEvent: string;\n}): string {\n return triggerEvent || triggerSource;\n}\n\nexport function isWorkflowRunTerminal(status: WorkflowRunStatus): boolean {\n return TERMINAL_WORKFLOW_RUN_STATUS_SET.has(status);\n}\n\nexport function isWorkflowStatus(status: string): status is WorkflowStatus {\n return WORKFLOW_STATUSES.has(status as WorkflowStatus);\n}\n"],"names":["WORKFLOW_JOB_STATUSES","WORKFLOW_RUN_STATUSES","TERMINAL_WORKFLOW_RUN_STATUSES","WORKFLOW_STATUSES","Set","TERMINAL_WORKFLOW_RUN_STATUS_SET","workflowRunShortId","id","length","slice","workflowRunTriggerLabel","triggerSource","triggerEvent","filter","Boolean","join","workflowRunTriggerDisplayLabel","isWorkflowRunTerminal","status","has","isWorkflowStatus"],"mappings":"AAAA,SAAkBA,qBAAqB,QAAO,WAAW;AAOzD,OAAO,MAAMC,wBAAwB;IACnC;IACA;IACA;IACA;IACA;CACD,CAAiD;AAElD,OAAO,MAAMC,iCAAiC;IAC5C;IACA;IACA;CACD,CAAiD;AAElD,MAAMC,oBAAoB,IAAIC,IAAoB;OAC7CH;OACAD;CACJ;AACD,MAAMK,mCAAmC,IAAID,IAAuBF;AAiDpE,OAAO,SAASI,mBAAmBC,EAAU;IAC3C,OAAOA,GAAGC,MAAM,IAAI,IAAID,KAAKA,GAAGE,KAAK,CAAC,GAAG;AAC3C;AAEA,OAAO,SAASC,wBAAwB,EACtCC,aAAa,EACbC,YAAY,EAIb;IACC,OAAO;QAACD;QAAeC;KAAa,CAACC,MAAM,CAACC,SAASC,IAAI,CAAC;AAC5D;AAEA,OAAO,SAASC,+BAA+B,EAC7CL,aAAa,EACbC,YAAY,EAIb;IACC,OAAOA,gBAAgBD;AACzB;AAEA,OAAO,SAASM,sBAAsBC,MAAyB;IAC7D,OAAOb,iCAAiCc,GAAG,CAACD;AAC9C;AAEA,OAAO,SAASE,iBAAiBF,MAAc;IAC7C,OAAOf,kBAAkBgB,GAAG,CAACD;AAC/B"}
1
+ {"version":3,"sources":["../../../src/core/entities/workflow-run.ts"],"sourcesContent":["import {type Job, type JobStatus, WORKFLOW_JOB_STATUSES} from './job.js';\nimport type {WorkflowRunAttempt, WorkflowRunAttemptSummary} from './workflow-run-attempt.js';\n\nexport type WorkflowRunStatus = 'pending' | 'running' | 'succeeded' | 'failed' | 'cancelled';\nexport type WorkflowRunRerunMode = 'all' | 'failed';\nexport type WorkflowStatus = WorkflowRunStatus | (typeof WORKFLOW_JOB_STATUSES)[number];\nexport type WorkflowDisplayStatus = WorkflowStatus | 'listening';\n\nexport const WORKFLOW_RUN_STATUSES = [\n 'pending',\n 'running',\n 'succeeded',\n 'failed',\n 'cancelled',\n] as const satisfies readonly WorkflowRunStatus[];\n\nexport const TERMINAL_WORKFLOW_RUN_STATUSES = [\n 'succeeded',\n 'failed',\n 'cancelled',\n] as const satisfies readonly WorkflowRunStatus[];\n\nconst WORKFLOW_STATUSES = new Set<WorkflowStatus>([\n ...WORKFLOW_RUN_STATUSES,\n ...WORKFLOW_JOB_STATUSES,\n]);\nconst TERMINAL_WORKFLOW_RUN_STATUS_SET = new Set<WorkflowRunStatus>(TERMINAL_WORKFLOW_RUN_STATUSES);\n\nexport interface WorkflowSourceSnapshot {\n content: string;\n format: 'yaml';\n}\n\n/**\n * Provider-neutral trigger facts. Every field is nullable: only source-control triggers\n * resolve a reference at all, and a payload can name a ref without naming an actor.\n */\nexport interface WorkflowRunTriggerReference {\n repository: string | null;\n ref: string | null;\n commit: string | null;\n actor: string | null;\n}\n\n/** One glyph in a run row's job status strip: enough to draw and label it, nothing more. */\nexport interface WorkflowRunJobSummary {\n id: string;\n key: string;\n name: string | null;\n status: JobStatus;\n position: number;\n}\n\nexport interface WorkflowRunJobStatusCount {\n status: JobStatus;\n count: number;\n}\n\n/**\n * A run's jobs as the list receives them: a bounded slice to draw, plus totals covering all\n * of them.\n *\n * `preview` is capped by the API, so `preview.length` is not the job count and the strip\n * reads `total` and `statusCounts` for anything it says rather than anything it draws.\n */\nexport interface WorkflowRunJobs {\n preview: WorkflowRunJobSummary[];\n statusCounts: WorkflowRunJobStatusCount[];\n total: number;\n}\n\nexport interface WorkflowRun {\n id: string;\n projectId: string;\n definitionId: string;\n number: number | null;\n name: string;\n workflowName: string;\n currentAttempt: number;\n triggerProvider: string | null;\n triggerSource: string;\n triggerEvent: string;\n triggerDisplayLabel: string;\n triggerLabel: string;\n triggerPayload: Record<string, unknown>;\n triggerReference: WorkflowRunTriggerReference | null;\n inputs: Record<string, unknown> | null;\n sourceSnapshot: WorkflowSourceSnapshot | null;\n createdAt: string;\n updatedAt: string;\n isTemporary: boolean;\n}\n\n/** A run as the API returns it outside the list: no job strip, because none was fetched. */\nexport interface WorkflowRunRecord extends WorkflowRun {\n status: WorkflowRunStatus;\n latestAttempt: number;\n runAttempt: WorkflowRunAttemptSummary;\n}\n\nexport interface WorkflowRunListItem extends WorkflowRunRecord {\n jobs: WorkflowRunJobs;\n}\n\nexport interface WorkflowRunDetail extends WorkflowRun {\n latestAttempt: number;\n runAttempt: WorkflowRunAttempt;\n jobs: Job[];\n}\n\nexport interface WorkflowRunListPage {\n runs: WorkflowRunListItem[];\n nextCursor: string | null;\n filteredTotalCount: number | null;\n}\n\nexport interface ManualWorkflowLaunch {\n workflowRunId: string;\n}\n\nexport function workflowRunTriggerLabel({\n triggerSource,\n triggerEvent,\n}: {\n triggerSource: string;\n triggerEvent: string;\n}): string {\n return [triggerSource, triggerEvent].filter(Boolean).join(' · ');\n}\n\nexport function workflowRunTriggerDisplayLabel({\n triggerSource,\n triggerEvent,\n}: {\n triggerSource: string;\n triggerEvent: string;\n}): string {\n return triggerEvent || triggerSource;\n}\n\nconst SHORT_COMMIT_LENGTH = 7;\nconst PULL_REQUEST_REF_PATTERN = /^refs\\/pull\\/(\\d+)\\/head$/u;\n\n/**\n * The ref as a person names it: `main` for a branch, `#42` for a pull request, the tag for a\n * tag. An unrecognized ref is shown verbatim rather than hidden, since a ref nobody can read\n * is still better evidence than a blank cell.\n */\nexport function workflowRunBranchLabel(run: Pick<WorkflowRun, 'triggerReference'>): string | null {\n const ref = run.triggerReference?.ref;\n if (!ref) return null;\n const pullRequest = PULL_REQUEST_REF_PATTERN.exec(ref);\n if (pullRequest) return `#${pullRequest[1]}`;\n if (ref.startsWith('refs/heads/')) return ref.slice('refs/heads/'.length);\n if (ref.startsWith('refs/tags/')) return ref.slice('refs/tags/'.length);\n return ref;\n}\n\nexport function workflowRunCommitLabel(run: Pick<WorkflowRun, 'triggerReference'>): string | null {\n const commit = run.triggerReference?.commit;\n return commit ? commit.slice(0, SHORT_COMMIT_LENGTH) : null;\n}\n\nexport function workflowRunActor(run: Pick<WorkflowRun, 'triggerReference'>): string | null {\n return run.triggerReference?.actor ?? null;\n}\n\nexport function isWorkflowRunTerminal(status: WorkflowRunStatus): boolean {\n return TERMINAL_WORKFLOW_RUN_STATUS_SET.has(status);\n}\n\nexport function isWorkflowStatus(status: string): status is WorkflowStatus {\n return WORKFLOW_STATUSES.has(status as WorkflowStatus);\n}\n"],"names":["WORKFLOW_JOB_STATUSES","WORKFLOW_RUN_STATUSES","TERMINAL_WORKFLOW_RUN_STATUSES","WORKFLOW_STATUSES","Set","TERMINAL_WORKFLOW_RUN_STATUS_SET","workflowRunTriggerLabel","triggerSource","triggerEvent","filter","Boolean","join","workflowRunTriggerDisplayLabel","SHORT_COMMIT_LENGTH","PULL_REQUEST_REF_PATTERN","workflowRunBranchLabel","run","ref","triggerReference","pullRequest","exec","startsWith","slice","length","workflowRunCommitLabel","commit","workflowRunActor","actor","isWorkflowRunTerminal","status","has","isWork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;AAC9C;AAEA,OAAO,SAASE,iBAAiBF,MAAc;IAC7C,OAAO1B,kBAAkB2B,GAAG,CAACD;AAC/B"}
@@ -0,0 +1,9 @@
1
+ /** Counts used by the run detail tab strip before the annotations query owns the data. */
2
+ export interface RunAnnotationSummary {
3
+ total: number;
4
+ error: number;
5
+ warning: number;
6
+ info: number;
7
+ success: number;
8
+ }
9
+ //# sourceMappingURL=workflow-run-tabs.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"workflow-run-tabs.d.ts","sourceRoot":"","sources":["../../src/core/workflow-run-tabs.ts"],"names":[],"mappings":"AAAA,0FAA0F;AAC1F,MAAM,WAAW,oBAAoB;IACnC,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,MAAM,CAAC;CACjB"}
@@ -0,0 +1,3 @@
1
+ /** Counts used by the run detail tab strip before the annotations query owns the data. */ export { };
2
+
3
+ //# sourceMappingURL=workflow-run-tabs.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/core/workflow-run-tabs.ts"],"sourcesContent":["/** Counts used by the run detail tab strip before the annotations query owns the data. */\nexport interface RunAnnotationSummary {\n total: number;\n error: number;\n warning: number;\n info: number;\n success: number;\n}\n"],"names":[],"mappings":"AAAA,wFAAwF,GACxF,WAMC"}
@@ -1,13 +1,13 @@
1
- export type { JobDisplayDuration, JobListening, JobMode, JobStatus, JobStatusReason, ListenerStatus, ResolutionReason, } from './entities/job.js';
2
- export { defaultJobExecution, isTerminalJobStatus, Job, resolveJobExecution, TERMINAL_WORKFLOW_JOB_STATUSES, WORKFLOW_JOB_STATUSES, } from './entities/job.js';
3
- export type { JobExecutionDisplayDuration, JobExecutionStatus, JobExecutionTime, WorkflowExecutionEvent, } from './entities/job-execution.js';
4
- export { JobExecution } from './entities/job-execution.js';
1
+ export type { JobDisplayDuration, JobDisplayStatus, JobListening, JobMode, JobStatus, JobStatusReason, ListenerStatus, ResolutionReason, } from './entities/job.js';
2
+ export { defaultJobExecution, deriveJobDisplayStatus, isTerminalJobStatus, Job, resolveJobExecution, TERMINAL_WORKFLOW_JOB_STATUSES, WORKFLOW_JOB_STATUSES, } from './entities/job.js';
3
+ export type { JobExecutionDisplayDuration, JobExecutionDisplayStatus, JobExecutionStatus, JobExecutionTime, WorkflowExecutionEvent, } from './entities/job-execution.js';
4
+ export { deriveJobExecutionDisplayStatus, isTerminalJobExecutionStatus, JobExecution, } from './entities/job-execution.js';
5
5
  export type { AgentConfigIssue, AgentStepConfig, Step, StepError, StepErrorCategory, StepErrorReason, StepSourceLocation, } from './entities/step.js';
6
6
  export { AGENT_CONFIG_ISSUES, STEP_ERROR_REASONS } from './entities/step.js';
7
7
  export type { StepAttemptDisplayDuration, StepGateResult, } from './entities/step-attempt.js';
8
8
  export { StepAttempt } from './entities/step-attempt.js';
9
- export type { ManualWorkflowLaunch, WorkflowRun, WorkflowRunDetail, WorkflowRunListItem, WorkflowRunListPage, WorkflowRunRerunMode, WorkflowRunStatus, WorkflowSourceSnapshot, WorkflowStatus, } from './entities/workflow-run.js';
10
- export { isWorkflowRunTerminal, isWorkflowStatus, TERMINAL_WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_STATUSES, workflowRunShortId, workflowRunTriggerDisplayLabel, workflowRunTriggerLabel, } from './entities/workflow-run.js';
9
+ export type { ManualWorkflowLaunch, WorkflowDisplayStatus, WorkflowRun, WorkflowRunDetail, WorkflowRunJobStatusCount, WorkflowRunJobSummary, WorkflowRunJobs, WorkflowRunListItem, WorkflowRunListPage, WorkflowRunRecord, WorkflowRunRerunMode, WorkflowRunStatus, WorkflowRunTriggerReference, WorkflowSourceSnapshot, WorkflowStatus, } from './entities/workflow-run.js';
10
+ export { isWorkflowRunTerminal, isWorkflowStatus, TERMINAL_WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_STATUSES, workflowRunActor, workflowRunBranchLabel, workflowRunCommitLabel, workflowRunTriggerDisplayLabel, workflowRunTriggerLabel, } from './entities/workflow-run.js';
11
11
  export type { WorkflowRunAttemptDisplayDuration } from './entities/workflow-run-attempt.js';
12
12
  export { WorkflowRunAttempt, WorkflowRunAttemptSummary } from './entities/workflow-run-attempt.js';
13
13
  //# sourceMappingURL=workflow-run.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-run.d.ts","sourceRoot":"","sources":["../../src/core/workflow-run.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,YAAY,EACZ,OAAO,EACP,SAAS,EACT,eAAe,EACf,cAAc,EACd,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,mBAAmB,EACnB,GAAG,EACH,mBAAmB,EACnB,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,2BAA2B,EAC3B,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EAAC,YAAY,EAAC,MAAM,6BAA6B,CAAC;AACzD,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,IAAI,EACJ,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAC3E,YAAY,EACV,0BAA0B,EAC1B,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AACvD,YAAY,EACV,oBAAoB,EACpB,WAAW,EACX,iBAAiB,EACjB,mBAAmB,EACnB,mBAAmB,EACnB,oBAAoB,EACpB,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,8BAA8B,EAC9B,qBAAqB,EACrB,kBAAkB,EAClB,8BAA8B,EAC9B,uBAAuB,GACxB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAC,iCAAiC,EAAC,MAAM,oCAAoC,CAAC;AAC1F,OAAO,EAAC,kBAAkB,EAAE,yBAAyB,EAAC,MAAM,oCAAoC,CAAC"}
1
+ {"version":3,"file":"workflow-run.d.ts","sourceRoot":"","sources":["../../src/core/workflow-run.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,kBAAkB,EAClB,gBAAgB,EAChB,YAAY,EACZ,OAAO,EACP,SAAS,EACT,eAAe,EACf,cAAc,EACd,gBAAgB,GACjB,MAAM,mBAAmB,CAAC;AAC3B,OAAO,EACL,mBAAmB,EACnB,sBAAsB,EACtB,mBAAmB,EACnB,GAAG,EACH,mBAAmB,EACnB,8BAA8B,EAC9B,qBAAqB,GACtB,MAAM,mBAAmB,CAAC;AAC3B,YAAY,EACV,2BAA2B,EAC3B,yBAAyB,EACzB,kBAAkB,EAClB,gBAAgB,EAChB,sBAAsB,GACvB,MAAM,6BAA6B,CAAC;AACrC,OAAO,EACL,+BAA+B,EAC/B,4BAA4B,EAC5B,YAAY,GACb,MAAM,6BAA6B,CAAC;AACrC,YAAY,EACV,gBAAgB,EAChB,eAAe,EACf,IAAI,EACJ,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,kBAAkB,GACnB,MAAM,oBAAoB,CAAC;AAC5B,OAAO,EAAC,mBAAmB,EAAE,kBAAkB,EAAC,MAAM,oBAAoB,CAAC;AAC3E,YAAY,EACV,0BAA0B,EAC1B,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EAAC,WAAW,EAAC,MAAM,4BAA4B,CAAC;AACvD,YAAY,EACV,oBAAoB,EACpB,qBAAqB,EACrB,WAAW,EACX,iBAAiB,EACjB,yBAAyB,EACzB,qBAAqB,EACrB,eAAe,EACf,mBAAmB,EACnB,mBAAmB,EACnB,iBAAiB,EACjB,oBAAoB,EACpB,iBAAiB,EACjB,2BAA2B,EAC3B,sBAAsB,EACtB,cAAc,GACf,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,8BAA8B,EAC9B,qBAAqB,EACrB,gBAAgB,EAChB,sBAAsB,EACtB,sBAAsB,EACtB,8BAA8B,EAC9B,uBAAuB,GACxB,MAAM,4BAA4B,CAAC;AACpC,YAAY,EAAC,iCAAiC,EAAC,MAAM,oCAAoC,CAAC;AAC1F,OAAO,EAAC,kBAAkB,EAAE,yBAAyB,EAAC,MAAM,oCAAoC,CAAC"}
@@ -1,8 +1,8 @@
1
- export { defaultJobExecution, isTerminalJobStatus, Job, resolveJobExecution, TERMINAL_WORKFLOW_JOB_STATUSES, WORKFLOW_JOB_STATUSES } from './entities/job.js';
2
- export { JobExecution } from './entities/job-execution.js';
1
+ export { defaultJobExecution, deriveJobDisplayStatus, isTerminalJobStatus, Job, resolveJobExecution, TERMINAL_WORKFLOW_JOB_STATUSES, WORKFLOW_JOB_STATUSES } from './entities/job.js';
2
+ export { deriveJobExecutionDisplayStatus, isTerminalJobExecutionStatus, JobExecution } from './entities/job-execution.js';
3
3
  export { AGENT_CONFIG_ISSUES, STEP_ERROR_REASONS } from './entities/step.js';
4
4
  export { StepAttempt } from './entities/step-attempt.js';
5
- export { isWorkflowRunTerminal, isWorkflowStatus, TERMINAL_WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_STATUSES, workflowRunShortId, workflowRunTriggerDisplayLabel, workflowRunTriggerLabel } from './entities/workflow-run.js';
5
+ export { isWorkflowRunTerminal, isWorkflowStatus, TERMINAL_WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_STATUSES, workflowRunActor, workflowRunBranchLabel, workflowRunCommitLabel, workflowRunTriggerDisplayLabel, workflowRunTriggerLabel } from './entities/workflow-run.js';
6
6
  export { WorkflowRunAttempt, WorkflowRunAttemptSummary } from './entities/workflow-run-attempt.js';
7
7
 
8
8
  //# sourceMappingURL=workflow-run.js.map
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/core/workflow-run.ts"],"sourcesContent":["export type {\n JobDisplayDuration,\n JobListening,\n JobMode,\n JobStatus,\n JobStatusReason,\n ListenerStatus,\n ResolutionReason,\n} from './entities/job.js';\nexport {\n defaultJobExecution,\n isTerminalJobStatus,\n Job,\n resolveJobExecution,\n TERMINAL_WORKFLOW_JOB_STATUSES,\n WORKFLOW_JOB_STATUSES,\n} from './entities/job.js';\nexport type {\n JobExecutionDisplayDuration,\n JobExecutionStatus,\n JobExecutionTime,\n WorkflowExecutionEvent,\n} from './entities/job-execution.js';\nexport {JobExecution} from './entities/job-execution.js';\nexport type {\n AgentConfigIssue,\n AgentStepConfig,\n Step,\n StepError,\n StepErrorCategory,\n StepErrorReason,\n StepSourceLocation,\n} from './entities/step.js';\nexport {AGENT_CONFIG_ISSUES, STEP_ERROR_REASONS} from './entities/step.js';\nexport type {\n StepAttemptDisplayDuration,\n StepGateResult,\n} from './entities/step-attempt.js';\nexport {StepAttempt} from './entities/step-attempt.js';\nexport type {\n ManualWorkflowLaunch,\n WorkflowRun,\n WorkflowRunDetail,\n WorkflowRunListItem,\n WorkflowRunListPage,\n WorkflowRunRerunMode,\n WorkflowRunStatus,\n WorkflowSourceSnapshot,\n WorkflowStatus,\n} from './entities/workflow-run.js';\nexport {\n isWorkflowRunTerminal,\n isWorkflowStatus,\n TERMINAL_WORKFLOW_RUN_STATUSES,\n WORKFLOW_RUN_STATUSES,\n workflowRunShortId,\n workflowRunTriggerDisplayLabel,\n workflowRunTriggerLabel,\n} from './entities/workflow-run.js';\nexport type {WorkflowRunAttemptDisplayDuration} from './entities/workflow-run-attempt.js';\nexport {WorkflowRunAttempt, WorkflowRunAttemptSummary} from './entities/workflow-run-attempt.js';\n"],"names":["defaultJobExecution","isTerminalJobStatus","Job","resolveJobExecution","TERMINAL_WORKFLOW_JOB_STATUSES","WORKFLOW_JOB_STATUSES","JobExecution","AGENT_CONFIG_ISSUES","STEP_ERROR_REASONS","StepAttempt","isWorkflowRunTerminal","isWorkflowStatus","TERMINAL_WORKFLOW_RUN_STATUSES","WORKFLOW_RUN_STATUSES","workflowRunShortId","workflowRunTriggerDisplayLabel","workflowRunTriggerLabel","WorkflowRunAttempt","WorkflowRunAttemptSummary"],"mappings":"AASA,SACEA,mBAAmB,EACnBC,mBAAmB,EACnBC,GAAG,EACHC,mBAAmB,EACnBC,8BAA8B,EAC9BC,qBAAqB,QAChB,oBAAoB;AAO3B,SAAQC,YAAY,QAAO,8BAA8B;AAUzD,SAAQC,mBAAmB,EAAEC,kBAAkB,QAAO,qBAAqB;AAK3E,SAAQC,WAAW,QAAO,6BAA6B;AAYvD,SACEC,qBAAqB,EACrBC,gBAAgB,EAChBC,8BAA8B,EAC9BC,qBAAqB,EACrBC,kBAAkB,EAClBC,8BAA8B,EAC9BC,uBAAuB,QAClB,6BAA6B;AAEpC,SAAQC,kBAAkB,EAAEC,yBAAyB,QAAO,qCAAqC"}
1
+ {"version":3,"sources":["../../src/core/workflow-run.ts"],"sourcesContent":["export type {\n JobDisplayDuration,\n JobDisplayStatus,\n JobListening,\n JobMode,\n JobStatus,\n JobStatusReason,\n ListenerStatus,\n ResolutionReason,\n} from './entities/job.js';\nexport {\n defaultJobExecution,\n deriveJobDisplayStatus,\n isTerminalJobStatus,\n Job,\n resolveJobExecution,\n TERMINAL_WORKFLOW_JOB_STATUSES,\n WORKFLOW_JOB_STATUSES,\n} from './entities/job.js';\nexport type {\n JobExecutionDisplayDuration,\n JobExecutionDisplayStatus,\n JobExecutionStatus,\n JobExecutionTime,\n WorkflowExecutionEvent,\n} from './entities/job-execution.js';\nexport {\n deriveJobExecutionDisplayStatus,\n isTerminalJobExecutionStatus,\n JobExecution,\n} from './entities/job-execution.js';\nexport type {\n AgentConfigIssue,\n AgentStepConfig,\n Step,\n StepError,\n StepErrorCategory,\n StepErrorReason,\n StepSourceLocation,\n} from './entities/step.js';\nexport {AGENT_CONFIG_ISSUES, STEP_ERROR_REASONS} from './entities/step.js';\nexport type {\n StepAttemptDisplayDuration,\n StepGateResult,\n} from './entities/step-attempt.js';\nexport {StepAttempt} from './entities/step-attempt.js';\nexport type {\n ManualWorkflowLaunch,\n WorkflowDisplayStatus,\n WorkflowRun,\n WorkflowRunDetail,\n WorkflowRunJobStatusCount,\n WorkflowRunJobSummary,\n WorkflowRunJobs,\n WorkflowRunListItem,\n WorkflowRunListPage,\n WorkflowRunRecord,\n WorkflowRunRerunMode,\n WorkflowRunStatus,\n WorkflowRunTriggerReference,\n WorkflowSourceSnapshot,\n WorkflowStatus,\n} from './entities/workflow-run.js';\nexport {\n isWorkflowRunTerminal,\n isWorkflowStatus,\n TERMINAL_WORKFLOW_RUN_STATUSES,\n WORKFLOW_RUN_STATUSES,\n workflowRunActor,\n workflowRunBranchLabel,\n workflowRunCommitLabel,\n workflowRunTriggerDisplayLabel,\n workflowRunTriggerLabel,\n} from './entities/workflow-run.js';\nexport type {WorkflowRunAttemptDisplayDuration} from './entities/workflow-run-attempt.js';\nexport {WorkflowRunAttempt, WorkflowRunAttemptSummary} from './entities/workflow-run-attempt.js';\n"],"names":["defaultJobExecution","deriveJobDisplayStatus","isTerminalJobStatus","Job","resolveJobExecution","TERMINAL_WORKFLOW_JOB_STATUSES","WORKFLOW_JOB_STATUSES","deriveJobExecutionDisplayStatus","isTerminalJobExecutionStatus","JobExecution","AGENT_CONFIG_ISSUES","STEP_ERROR_REASONS","StepAttempt","isWorkflowRunTerminal","isWorkflowStatus","TERMINAL_WORKFLOW_RUN_STATUSES","WORKFLOW_RUN_STATUSES","workflowRunActor","workflowRunBranchLabel","workflowRunCommitLabel","workflowRunTriggerDisplayLabel","workflowRunTriggerLabel","WorkflowRunAttempt","WorkflowRunAttemptSummary"],"mappings":"AAUA,SACEA,mBAAmB,EACnBC,sBAAsB,EACtBC,mBAAmB,EACnBC,GAAG,EACHC,mBAAmB,EACnBC,8BAA8B,EAC9BC,qBAAqB,QAChB,oBAAoB;AAQ3B,SACEC,+BAA+B,EAC/BC,4BAA4B,EAC5BC,YAAY,QACP,8BAA8B;AAUrC,SAAQC,mBAAmB,EAAEC,kBAAkB,QAAO,qBAAqB;AAK3E,SAAQC,WAAW,QAAO,6BAA6B;AAkBvD,SACEC,qBAAqB,EACrBC,gBAAgB,EAChBC,8BAA8B,EAC9BC,qBAAqB,EACrBC,gBAAgB,EAChBC,sBAAsB,EACtBC,sBAAsB,EACtBC,8BAA8B,EAC9BC,uBAAuB,QAClB,6BAA6B;AAEpC,SAAQC,kBAAkB,EAAEC,yBAAyB,QAAO,qCAAqC"}
package/dist/feature.d.ts CHANGED
@@ -2,27 +2,27 @@ export declare const workflowsNavigation: readonly [{
2
2
  readonly id: "nav.runs";
3
3
  readonly scope: "project";
4
4
  readonly label: "Runs";
5
- readonly to: "/workspaces/$wid/projects/$pid/runs";
5
+ readonly to: "/w/$workspaceSlug/p/$projectSlug/runs";
6
6
  readonly order: 100;
7
7
  }, {
8
8
  readonly id: "nav.workflows";
9
9
  readonly scope: "project";
10
10
  readonly label: "Workflows";
11
- readonly to: "/workspaces/$wid/projects/$pid/workflows";
11
+ readonly to: "/w/$workspaceSlug/p/$projectSlug/workflows";
12
12
  readonly order: 200;
13
13
  }];
14
14
  export declare const workflowsFeature: {
15
15
  readonly id: "shipfox.workflows";
16
16
  readonly routes: readonly [{
17
- readonly path: "/workspaces/$wid/projects/$pid/workflows";
17
+ readonly path: "/w/$workspaceSlug/p/$projectSlug/workflows";
18
18
  readonly parent: "projectLayout";
19
19
  readonly impl: "@shipfox/client-workflows/routes/workflows";
20
20
  }, {
21
- readonly path: "/workspaces/$wid/projects/$pid/runs";
21
+ readonly path: "/w/$workspaceSlug/p/$projectSlug/runs";
22
22
  readonly parent: "projectLayout";
23
23
  readonly impl: "@shipfox/client-workflows/routes/runs";
24
24
  }, {
25
- readonly path: "/workspaces/$wid/projects/$pid/runs/$workflowRunId";
25
+ readonly path: "/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId";
26
26
  readonly parent: "projectLayout";
27
27
  readonly impl: "@shipfox/client-workflows/routes/run-detail";
28
28
  }];
@@ -30,13 +30,13 @@ export declare const workflowsFeature: {
30
30
  readonly id: "nav.runs";
31
31
  readonly scope: "project";
32
32
  readonly label: "Runs";
33
- readonly to: "/workspaces/$wid/projects/$pid/runs";
33
+ readonly to: "/w/$workspaceSlug/p/$projectSlug/runs";
34
34
  readonly order: 100;
35
35
  }, {
36
36
  readonly id: "nav.workflows";
37
37
  readonly scope: "project";
38
38
  readonly label: "Workflows";
39
- readonly to: "/workspaces/$wid/projects/$pid/workflows";
39
+ readonly to: "/w/$workspaceSlug/p/$projectSlug/workflows";
40
40
  readonly order: 200;
41
41
  }];
42
42
  };
package/dist/feature.js CHANGED
@@ -4,14 +4,14 @@ export const workflowsNavigation = [
4
4
  id: 'nav.runs',
5
5
  scope: 'project',
6
6
  label: 'Runs',
7
- to: '/workspaces/$wid/projects/$pid/runs',
7
+ to: '/w/$workspaceSlug/p/$projectSlug/runs',
8
8
  order: 100
9
9
  },
10
10
  {
11
11
  id: 'nav.workflows',
12
12
  scope: 'project',
13
13
  label: 'Workflows',
14
- to: '/workspaces/$wid/projects/$pid/workflows',
14
+ to: '/w/$workspaceSlug/p/$projectSlug/workflows',
15
15
  order: 200
16
16
  }
17
17
  ];
@@ -19,17 +19,17 @@ export const workflowsFeature = defineClientFeature({
19
19
  id: 'shipfox.workflows',
20
20
  routes: [
21
21
  {
22
- path: '/workspaces/$wid/projects/$pid/workflows',
22
+ path: '/w/$workspaceSlug/p/$projectSlug/workflows',
23
23
  parent: 'projectLayout',
24
24
  impl: '@shipfox/client-workflows/routes/workflows'
25
25
  },
26
26
  {
27
- path: '/workspaces/$wid/projects/$pid/runs',
27
+ path: '/w/$workspaceSlug/p/$projectSlug/runs',
28
28
  parent: 'projectLayout',
29
29
  impl: '@shipfox/client-workflows/routes/runs'
30
30
  },
31
31
  {
32
- path: '/workspaces/$wid/projects/$pid/runs/$workflowRunId',
32
+ path: '/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId',
33
33
  parent: 'projectLayout',
34
34
  impl: '@shipfox/client-workflows/routes/run-detail'
35
35
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/feature.ts"],"sourcesContent":["import {defineClientFeature, type NavTabEntry} from '@shipfox/client-shell';\n\nexport const workflowsNavigation = [\n {\n id: 'nav.runs',\n scope: 'project',\n label: 'Runs',\n to: '/workspaces/$wid/projects/$pid/runs',\n order: 100,\n },\n {\n id: 'nav.workflows',\n scope: 'project',\n label: 'Workflows',\n to: '/workspaces/$wid/projects/$pid/workflows',\n order: 200,\n },\n] as const satisfies readonly NavTabEntry[];\n\nexport const workflowsFeature = defineClientFeature({\n id: 'shipfox.workflows',\n routes: [\n {\n path: '/workspaces/$wid/projects/$pid/workflows',\n parent: 'projectLayout',\n impl: '@shipfox/client-workflows/routes/workflows',\n },\n {\n path: '/workspaces/$wid/projects/$pid/runs',\n parent: 'projectLayout',\n impl: '@shipfox/client-workflows/routes/runs',\n },\n {\n path: '/workspaces/$wid/projects/$pid/runs/$workflowRunId',\n parent: 'projectLayout',\n impl: '@shipfox/client-workflows/routes/run-detail',\n },\n ],\n navigation: workflowsNavigation,\n});\n"],"names":["defineClientFeature","workflowsNavigation","id","scope","label","to","order","workflowsFeature","routes","path","parent","impl","navigation"],"mappings":"AAAA,SAAQA,mBAAmB,QAAyB,wBAAwB;AAE5E,OAAO,MAAMC,sBAAsB;IACjC;QACEC,IAAI;QACJC,OAAO;QACPC,OAAO;QACPC,IAAI;QACJC,OAAO;IACT;IACA;QACEJ,IAAI;QACJC,OAAO;QACPC,OAAO;QACPC,IAAI;QACJC,OAAO;IACT;CACD,CAA2C;AAE5C,OAAO,MAAMC,mBAAmBP,oBAAoB;IAClDE,IAAI;IACJM,QAAQ;QACN;YACEC,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;QACA;YACEF,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;QACA;YACEF,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;KACD;IACDC,YAAYX;AACd,GAAG"}
1
+ {"version":3,"sources":["../src/feature.ts"],"sourcesContent":["import {defineClientFeature, type NavTabEntry} from '@shipfox/client-shell';\n\nexport const workflowsNavigation = [\n {\n id: 'nav.runs',\n scope: 'project',\n label: 'Runs',\n to: '/w/$workspaceSlug/p/$projectSlug/runs',\n order: 100,\n },\n {\n id: 'nav.workflows',\n scope: 'project',\n label: 'Workflows',\n to: '/w/$workspaceSlug/p/$projectSlug/workflows',\n order: 200,\n },\n] as const satisfies readonly NavTabEntry[];\n\nexport const workflowsFeature = defineClientFeature({\n id: 'shipfox.workflows',\n routes: [\n {\n path: '/w/$workspaceSlug/p/$projectSlug/workflows',\n parent: 'projectLayout',\n impl: '@shipfox/client-workflows/routes/workflows',\n },\n {\n path: '/w/$workspaceSlug/p/$projectSlug/runs',\n parent: 'projectLayout',\n impl: '@shipfox/client-workflows/routes/runs',\n },\n {\n path: '/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId',\n parent: 'projectLayout',\n impl: '@shipfox/client-workflows/routes/run-detail',\n },\n ],\n navigation: workflowsNavigation,\n});\n"],"names":["defineClientFeature","workflowsNavigation","id","scope","label","to","order","workflowsFeature","routes","path","parent","impl","navigation"],"mappings":"AAAA,SAAQA,mBAAmB,QAAyB,wBAAwB;AAE5E,OAAO,MAAMC,sBAAsB;IACjC;QACEC,IAAI;QACJC,OAAO;QACPC,OAAO;QACPC,IAAI;QACJC,OAAO;IACT;IACA;QACEJ,IAAI;QACJC,OAAO;QACPC,OAAO;QACPC,IAAI;QACJC,OAAO;IACT;CACD,CAA2C;AAE5C,OAAO,MAAMC,mBAAmBP,oBAAoB;IAClDE,IAAI;IACJM,QAAQ;QACN;YACEC,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;QACA;YACEF,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;QACA;YACEF,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;KACD;IACDC,YAAYX;AACd,GAAG"}
@@ -1,8 +1,9 @@
1
- import type { StepAttemptDto, WorkflowRunAttemptDto, WorkflowRunDetailResponseDto, WorkflowRunJobDetailDto, WorkflowRunJobExecutionDetailDto, WorkflowRunListResponseDto, WorkflowRunResponseDto, WorkflowRunStepDetailDto } from '@shipfox/api-workflows-dto';
2
- import { Job, JobExecution, type Step, StepAttempt, type WorkflowRun, WorkflowRunAttempt, type WorkflowRunDetail, type WorkflowRunListItem, type WorkflowRunListPage } from '#core/workflow-run.js';
1
+ import type { StepAttemptDto, WorkflowRunAttemptDto, WorkflowRunDetailResponseDto, WorkflowRunJobDetailDto, WorkflowRunJobExecutionDetailDto, WorkflowRunListItemDto, WorkflowRunListResponseDto, WorkflowRunResponseDto, WorkflowRunStepDetailDto } from '@shipfox/api-workflows-dto';
2
+ import { Job, JobExecution, type Step, StepAttempt, type WorkflowRun, WorkflowRunAttempt, type WorkflowRunDetail, type WorkflowRunListItem, type WorkflowRunListPage, type WorkflowRunRecord } from '#core/workflow-run.js';
3
3
  export declare function toWorkflowRun(dto: WorkflowRunResponseDto): WorkflowRun;
4
4
  export declare function toWorkflowRunAttempt(dto: WorkflowRunAttemptDto): WorkflowRunAttempt;
5
- export declare function toWorkflowRunListItem(dto: WorkflowRunResponseDto): WorkflowRunListItem;
5
+ export declare function toWorkflowRunRecord(dto: WorkflowRunResponseDto): WorkflowRunRecord;
6
+ export declare function toWorkflowRunListItem(dto: WorkflowRunListItemDto): WorkflowRunListItem;
6
7
  export declare function toWorkflowRunListPage(dto: WorkflowRunListResponseDto): WorkflowRunListPage;
7
8
  export declare function toWorkflowRunDetail(dto: WorkflowRunDetailResponseDto): WorkflowRunDetail;
8
9
  export declare function toJob(dto: WorkflowRunJobDetailDto): Job;
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-run-mapper.d.ts","sourceRoot":"","sources":["../../../src/hooks/api/workflow-run-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EAGd,qBAAqB,EACrB,4BAA4B,EAC5B,uBAAuB,EACvB,gCAAgC,EAChC,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,GAAG,EACH,YAAY,EAEZ,KAAK,IAAI,EACT,WAAW,EAGX,KAAK,WAAW,EAChB,kBAAkB,EAElB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EAIzB,MAAM,uBAAuB,CAAC;AAE/B,wBAAgB,aAAa,CAAC,GAAG,EAAE,sBAAsB,GAAG,WAAW,CA4BtE;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,qBAAqB,GAAG,kBAAkB,CAWnF;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,sBAAsB,GAAG,mBAAmB,CActF;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,0BAA0B,GAAG,mBAAmB,CAM1F;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,4BAA4B,GAAG,iBAAiB,CAOxF;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,uBAAuB,GAAG,GAAG,CAmBvD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,gCAAgC,GAAG,YAAY,CAiBlF;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,wBAAwB,GAAG,IAAI,CA6B1D;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,GAAG,WAAW,CAgBtF"}
1
+ {"version":3,"file":"workflow-run-mapper.d.ts","sourceRoot":"","sources":["../../../src/hooks/api/workflow-run-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EAGd,qBAAqB,EACrB,4BAA4B,EAC5B,uBAAuB,EACvB,gCAAgC,EAChC,sBAAsB,EACtB,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,GAAG,EACH,YAAY,EAEZ,KAAK,IAAI,EACT,WAAW,EAGX,KAAK,WAAW,EAChB,kBAAkB,EAElB,KAAK,iBAAiB,EACtB,KAAK,mBAAmB,EACxB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EAGvB,MAAM,uBAAuB,CAAC;AAE/B,wBAAgB,aAAa,CAAC,GAAG,EAAE,sBAAsB,GAAG,WAAW,CA8BtE;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,qBAAqB,GAAG,kBAAkB,CAWnF;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,sBAAsB,GAAG,iBAAiB,CAclF;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,sBAAsB,GAAG,mBAAmB,CAkBtF;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,0BAA0B,GAAG,mBAAmB,CAM1F;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,4BAA4B,GAAG,iBAAiB,CAOxF;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,uBAAuB,GAAG,GAAG,CAmBvD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,gCAAgC,GAAG,YAAY,CAiBlF;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,wBAAwB,GAAG,IAAI,CA6B1D;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,GAAG,WAAW,CAgBtF"}
@@ -1,10 +1,12 @@
1
- import { Job, JobExecution, StepAttempt, WorkflowRunAttempt, WorkflowRunAttemptSummary, workflowRunShortId, workflowRunTriggerDisplayLabel, workflowRunTriggerLabel } from '#core/workflow-run.js';
1
+ import { Job, JobExecution, StepAttempt, WorkflowRunAttempt, WorkflowRunAttemptSummary, workflowRunTriggerDisplayLabel, workflowRunTriggerLabel } from '#core/workflow-run.js';
2
2
  export function toWorkflowRun(dto) {
3
3
  return {
4
4
  id: dto.id,
5
5
  projectId: dto.project_id,
6
6
  definitionId: dto.definition_id,
7
+ number: dto.number,
7
8
  name: dto.name,
9
+ workflowName: dto.workflow_name,
8
10
  currentAttempt: dto.current_attempt,
9
11
  triggerProvider: dto.trigger_provider,
10
12
  triggerSource: dto.trigger_source,
@@ -18,6 +20,7 @@ export function toWorkflowRun(dto) {
18
20
  triggerEvent: dto.trigger_event
19
21
  }),
20
22
  triggerPayload: dto.trigger_payload,
23
+ triggerReference: dto.trigger_reference,
21
24
  inputs: dto.inputs ?? null,
22
25
  sourceSnapshot: dto.source_snapshot ? {
23
26
  content: dto.source_snapshot.content,
@@ -25,7 +28,6 @@ export function toWorkflowRun(dto) {
25
28
  } : null,
26
29
  createdAt: dto.created_at,
27
30
  updatedAt: dto.updated_at,
28
- shortId: workflowRunShortId(dto.id),
29
31
  isTemporary: dto.id.startsWith('temp-')
30
32
  };
31
33
  }
@@ -41,7 +43,7 @@ export function toWorkflowRunAttempt(dto) {
41
43
  rerunMode: dto.rerun_mode
42
44
  });
43
45
  }
44
- export function toWorkflowRunListItem(dto) {
46
+ export function toWorkflowRunRecord(dto) {
45
47
  return {
46
48
  ...toWorkflowRun(dto),
47
49
  status: dto.status,
@@ -56,6 +58,28 @@ export function toWorkflowRunListItem(dto) {
56
58
  })
57
59
  };
58
60
  }
61
+ export function toWorkflowRunListItem(dto) {
62
+ const statusCounts = dto.job_status_counts.map(({ status, count })=>({
63
+ status,
64
+ count
65
+ }));
66
+ return {
67
+ ...toWorkflowRunRecord(dto),
68
+ jobs: {
69
+ preview: dto.jobs.map((job)=>({
70
+ id: job.id,
71
+ key: job.key,
72
+ name: job.name,
73
+ status: job.status,
74
+ position: job.position
75
+ })),
76
+ statusCounts,
77
+ // Derived rather than sent: the counts already cover every job, and a separate total
78
+ // would be a second source of truth that could disagree with them.
79
+ total: statusCounts.reduce((sum, entry)=>sum + entry.count, 0)
80
+ }
81
+ };
82
+ }
59
83
  export function toWorkflowRunListPage(dto) {
60
84
  return {
61
85
  runs: dto.runs.map(toWorkflowRunListItem),
@@ -177,6 +201,10 @@ function toWorkflowExecutionEvent(dto) {
177
201
  event: dto.event,
178
202
  deliveryId: dto.delivery_id,
179
203
  receivedAt: dto.received_at,
204
+ project: dto.project,
205
+ repository: dto.repository,
206
+ ref: dto.ref,
207
+ commit: dto.commit,
180
208
  data: dto.data
181
209
  };
182
210
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/hooks/api/workflow-run-mapper.ts"],"sourcesContent":["import type {\n JobListeningDto,\n StepAttemptDto,\n StepGateResultDto,\n WorkflowExecutionEventDto,\n WorkflowRunAttemptDto,\n WorkflowRunDetailResponseDto,\n WorkflowRunJobDetailDto,\n WorkflowRunJobExecutionDetailDto,\n WorkflowRunListResponseDto,\n WorkflowRunResponseDto,\n WorkflowRunStepDetailDto,\n} from '@shipfox/api-workflows-dto';\nimport {\n Job,\n JobExecution,\n type JobListening,\n type Step,\n StepAttempt,\n type StepGateResult,\n type WorkflowExecutionEvent,\n type WorkflowRun,\n WorkflowRunAttempt,\n WorkflowRunAttemptSummary,\n type WorkflowRunDetail,\n type WorkflowRunListItem,\n type WorkflowRunListPage,\n workflowRunShortId,\n workflowRunTriggerDisplayLabel,\n workflowRunTriggerLabel,\n} from '#core/workflow-run.js';\n\nexport function toWorkflowRun(dto: WorkflowRunResponseDto): WorkflowRun {\n return {\n id: dto.id,\n projectId: dto.project_id,\n definitionId: dto.definition_id,\n name: dto.name,\n currentAttempt: dto.current_attempt,\n triggerProvider: dto.trigger_provider,\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n triggerDisplayLabel: workflowRunTriggerDisplayLabel({\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n }),\n triggerLabel: workflowRunTriggerLabel({\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n }),\n triggerPayload: dto.trigger_payload,\n inputs: dto.inputs ?? null,\n sourceSnapshot: dto.source_snapshot\n ? {content: dto.source_snapshot.content, format: dto.source_snapshot.format}\n : null,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n shortId: workflowRunShortId(dto.id),\n isTemporary: dto.id.startsWith('temp-'),\n };\n}\n\nexport function toWorkflowRunAttempt(dto: WorkflowRunAttemptDto): WorkflowRunAttempt {\n return new WorkflowRunAttempt({\n id: dto.id,\n workflowRunId: dto.workflow_run_id,\n attempt: dto.attempt,\n status: dto.status,\n createdAt: dto.created_at,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n rerunMode: dto.rerun_mode,\n });\n}\n\nexport function toWorkflowRunListItem(dto: WorkflowRunResponseDto): WorkflowRunListItem {\n return {\n ...toWorkflowRun(dto),\n status: dto.status,\n latestAttempt: dto.latest_attempt,\n runAttempt: new WorkflowRunAttemptSummary({\n workflowRunId: dto.id,\n attempt: dto.current_attempt,\n status: dto.status,\n createdAt: dto.created_at,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n }),\n };\n}\n\nexport function toWorkflowRunListPage(dto: WorkflowRunListResponseDto): WorkflowRunListPage {\n return {\n runs: dto.runs.map(toWorkflowRunListItem),\n nextCursor: dto.next_cursor,\n filteredTotalCount: dto.filtered_total_count,\n };\n}\n\nexport function toWorkflowRunDetail(dto: WorkflowRunDetailResponseDto): WorkflowRunDetail {\n return {\n ...toWorkflowRun(dto),\n latestAttempt: dto.latest_attempt,\n runAttempt: toWorkflowRunAttempt(dto.run_attempt),\n jobs: dto.jobs.map(toJob),\n };\n}\n\nexport function toJob(dto: WorkflowRunJobDetailDto): Job {\n return new Job({\n id: dto.id,\n runAttemptId: dto.run_attempt_id,\n key: dto.key,\n name: dto.name,\n mode: dto.mode,\n status: dto.status,\n statusReason: dto.status_reason,\n carriedOver: dto.carried_over,\n listening: dto.listening ? toJobListening(dto.listening) : null,\n listenerStatus: dto.listener_status,\n resolutionReason: dto.resolution_reason,\n dependencies: dto.dependencies,\n position: dto.position,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n jobExecutions: dto.job_executions.map(toJobExecution),\n });\n}\n\nexport function toJobExecution(dto: WorkflowRunJobExecutionDetailDto): JobExecution {\n return new JobExecution({\n id: dto.id,\n jobId: dto.job_id,\n sequence: dto.sequence,\n name: dto.name,\n status: dto.status,\n statusReason: dto.status_reason,\n triggerEvents: (dto.trigger_events ?? []).map(toWorkflowExecutionEvent),\n queuedAt: dto.queued_at ?? null,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n timedOutAt: dto.timed_out_at ?? null,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n steps: dto.steps.map(toStep),\n });\n}\n\nexport function toStep(dto: WorkflowRunStepDetailDto): Step {\n return {\n id: dto.id,\n jobExecutionId: dto.job_execution_id,\n key: dto.key,\n name: dto.name,\n sourceLocation: dto.source_location\n ? {startLine: dto.source_location.start_line, endLine: dto.source_location.end_line}\n : null,\n status: dto.status,\n type: dto.type,\n config: dto.config,\n agentConfig: toAgentStepConfig(dto),\n error: dto.error\n ? {\n message: dto.error.message,\n exitCode: dto.error.exit_code ?? null,\n signal: dto.error.signal,\n reason: dto.error.reason,\n agentConfigIssue: dto.error.agent_config_issue,\n category: dto.error.category,\n }\n : null,\n position: dto.position,\n currentAttempt: dto.current_attempt,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n attempts: dto.attempts.map((attempt) => toStepAttempt(attempt, dto.job_execution_id)),\n };\n}\n\nexport function toStepAttempt(dto: StepAttemptDto, jobExecutionId: string): StepAttempt {\n return new StepAttempt({\n id: dto.id,\n stepId: dto.step_id,\n jobExecutionId,\n attempt: dto.attempt,\n executionOrder: dto.execution_order,\n status: dto.status,\n exitCode: dto.exit_code ?? null,\n output: dto.output ?? null,\n error: dto.error ?? null,\n gateResult: toStepGateResult(dto.gate_result),\n restartFeedback: dto.restart_feedback ?? null,\n startedAt: dto.started_at,\n finishedAt: dto.finished_at ?? null,\n });\n}\n\nfunction toJobListening(dto: JobListeningDto): JobListening {\n return {\n on: dto.on,\n until: dto.until,\n timeoutMs: dto.timeout_ms,\n maxExecutions: dto.max_executions,\n batch: dto.batch\n ? {\n debounceMs: dto.batch.debounce_ms,\n maxSize: dto.batch.max_size,\n maxWaitMs: dto.batch.max_wait_ms,\n }\n : null,\n onResolve: dto.on_resolve,\n executionTimeoutMs: dto.execution_timeout_ms,\n name: dto.name,\n };\n}\n\nfunction toWorkflowExecutionEvent(dto: WorkflowExecutionEventDto): WorkflowExecutionEvent {\n return {\n source: dto.source,\n event: dto.event,\n deliveryId: dto.delivery_id,\n receivedAt: dto.received_at,\n data: dto.data,\n };\n}\n\nfunction toStepGateResult(dto: StepGateResultDto): StepGateResult {\n if (dto === null || dto.kind === 'none' || dto.kind === 'not_evaluated') return dto;\n if (dto.kind === 'passed' || dto.kind === 'failed') return {...dto, exitCode: dto.exit_code};\n if (dto.kind === 'uncheckable' || dto.kind === 'evaluation_error')\n return {...dto, exitCode: dto.exit_code};\n return dto;\n}\n\nfunction toAgentStepConfig(dto: WorkflowRunStepDetailDto): Step['agentConfig'] {\n if (dto.type !== 'agent') return null;\n return {\n provider: stringConfigValue(dto.config.provider),\n model: stringConfigValue(dto.config.model),\n thinking: stringConfigValue(dto.config.thinking),\n };\n}\n\nfunction stringConfigValue(value: unknown): string | null {\n return typeof value === 'string' && value.trim() ? value.trim() : null;\n}\n"],"names":["Job","JobExecution","StepAttempt","WorkflowRunAttempt","WorkflowRunAttemptSummary","workflowRunShortId","workflowRunTriggerDisplayLabel","workflowRunTriggerLabel","toWorkflowRun","dto","id","projectId","project_id","definitionId","definition_id","name","currentAttempt","current_attempt","triggerProvider","trigger_provider","triggerSource","trigger_source","triggerEvent","trigger_event","triggerDisplayLabel","triggerLabel","triggerPayload","trigger_payload","inputs","sourceSnapshot","source_snapshot","content","format","createdAt","created_at","updatedAt","updated_at","shortId","isTemporary","startsWith","toWorkflowRunAttempt","workflowRunId","workflow_run_id","attempt","status","startedAt","started_at","finishedAt","finished_at","rerunMode","rerun_mode","toWorkflowRunListItem","latestAttempt","latest_attempt","runAttempt","toWorkflowRunListPage","runs","map","nextCursor","next_cursor","filteredTotalCount","filtered_total_count","toWorkflowRunDetail","run_attempt","jobs","toJob","runAttemptId","run_attempt_id","key","mode","statusReason","status_reason","carriedOver","carried_over","listening","toJobListening","listenerStatus","listener_status","resolutionReason","resolution_reason","dependencies","position","jobExecutions","job_executions","toJobExecution","jobId","job_id","sequence","triggerEvents","trigger_events","toWorkflowExecutionEvent","queuedAt","queued_at","timedOutAt","timed_out_at","steps","toStep","jobExecutionId","job_execution_id","sourceLocation","source_location","startLine","start_line","endLine","end_line","type","config","agentConfig","toAgentStepConfig","error","message","exitCode","exit_code","signal","reason","agentConfigIssue","agent_config_issue","category","attempts","toStepAttempt","stepId","step_id","executionOrder","execution_order","output","gateResult","toStepGateResult","gate_result","restartFeedback","restart_feedback","on","until","timeoutMs","timeout_ms","maxExecutions","max_executions","batch","debounceMs","debounce_ms","maxSize","max_size","maxWaitMs","max_wait_ms","onResolve","on_resolve","executionTimeoutMs","execution_timeout_ms","source","event","deliveryId","delivery_id","receivedAt","received_at","data","kind","provider","stringConfigValue","model","thinking","value","trim"],"mappings":"AAaA,SACEA,GAAG,EACHC,YAAY,EAGZC,WAAW,EAIXC,kBAAkB,EAClBC,yBAAyB,EAIzBC,kBAAkB,EAClBC,8BAA8B,EAC9BC,uBAAuB,QAClB,wBAAwB;AAE/B,OAAO,SAASC,cAAcC,GAA2B;IACvD,OAAO;QACLC,IAAID,IAAIC,EAAE;QACVC,WAAWF,IAAIG,UAAU;QACzBC,cAAcJ,IAAIK,aAAa;QAC/BC,MAAMN,IAAIM,IAAI;QACdC,gBAAgBP,IAAIQ,eAAe;QACnCC,iBAAiBT,IAAIU,gBAAgB;QACrCC,eAAeX,IAAIY,cAAc;QACjCC,cAAcb,IAAIc,aAAa;QAC/BC,qBAAqBlB,+BAA+B;YAClDc,eAAeX,IAAIY,cAAc;YACjCC,cAAcb,IAAIc,aAAa;QACjC;QACAE,cAAclB,wBAAwB;YACpCa,eAAeX,IAAIY,cAA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BAAiB,OAAOjJ;IAChF,IAAIA,IAAIiJ,IAAI,KAAK,YAAYjJ,IAAIiJ,IAAI,KAAK,UAAU,OAAO;QAAC,GAAGjJ,GAAG;QAAEsG,UAAUtG,IAAIuG,SAAS;IAAA;IAC3F,IAAIvG,IAAIiJ,IAAI,KAAK,iBAAiBjJ,IAAIiJ,IAAI,KAAK,oBAC7C,OAAO;QAAC,GAAGjJ,GAAG;QAAEsG,UAAUtG,IAAIuG,SAAS;IAAA;IACzC,OAAOvG;AACT;AAEA,SAASmG,kBAAkBnG,GAA6B;IACtD,IAAIA,IAAIgG,IAAI,KAAK,SAAS,OAAO;IACjC,OAAO;QACLkD,UAAUC,kBAAkBnJ,IAAIiG,MAAM,CAACiD,QAAQ;QAC/CE,OAAOD,kBAAkBnJ,IAAIiG,MAAM,CAACmD,KAAK;QACzCC,UAAUF,kBAAkBnJ,IAAIiG,MAAM,CAACoD,QAAQ;IACjD;AACF;AAEA,SAASF,kBAAkBG,KAAc;IACvC,OAAO,OAAOA,UAAU,YAAYA,MAAMC,IAAI,KAAKD,MAAMC,IAAI,KAAK;AACpE"}
1
+ {"version":3,"sources":["../../../src/hooks/api/workflow-run-mapper.ts"],"sourcesContent":["import type {\n JobListeningDto,\n StepAttemptDto,\n StepGateResultDto,\n WorkflowExecutionEventDto,\n WorkflowRunAttemptDto,\n WorkflowRunDetailResponseDto,\n WorkflowRunJobDetailDto,\n WorkflowRunJobExecutionDetailDto,\n WorkflowRunListItemDto,\n WorkflowRunListResponseDto,\n WorkflowRunResponseDto,\n WorkflowRunStepDetailDto,\n} from '@shipfox/api-workflows-dto';\nimport {\n Job,\n JobExecution,\n type JobListening,\n type Step,\n StepAttempt,\n type StepGateResult,\n type WorkflowExecutionEvent,\n type WorkflowRun,\n WorkflowRunAttempt,\n WorkflowRunAttemptSummary,\n type WorkflowRunDetail,\n type WorkflowRunListItem,\n type WorkflowRunListPage,\n type WorkflowRunRecord,\n workflowRunTriggerDisplayLabel,\n workflowRunTriggerLabel,\n} from '#core/workflow-run.js';\n\nexport function toWorkflowRun(dto: WorkflowRunResponseDto): WorkflowRun {\n return {\n id: dto.id,\n projectId: dto.project_id,\n definitionId: dto.definition_id,\n number: dto.number,\n name: dto.name,\n workflowName: dto.workflow_name,\n currentAttempt: dto.current_attempt,\n triggerProvider: dto.trigger_provider,\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n triggerDisplayLabel: workflowRunTriggerDisplayLabel({\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n }),\n triggerLabel: workflowRunTriggerLabel({\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n }),\n triggerPayload: dto.trigger_payload,\n triggerReference: dto.trigger_reference,\n inputs: dto.inputs ?? null,\n sourceSnapshot: dto.source_snapshot\n ? {content: dto.source_snapshot.content, format: dto.source_snapshot.format}\n : null,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n isTemporary: dto.id.startsWith('temp-'),\n };\n}\n\nexport function toWorkflowRunAttempt(dto: WorkflowRunAttemptDto): WorkflowRunAttempt {\n return new WorkflowRunAttempt({\n id: dto.id,\n workflowRunId: dto.workflow_run_id,\n attempt: dto.attempt,\n status: dto.status,\n createdAt: dto.created_at,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n rerunMode: dto.rerun_mode,\n });\n}\n\nexport function toWorkflowRunRecord(dto: WorkflowRunResponseDto): WorkflowRunRecord {\n return {\n ...toWorkflowRun(dto),\n status: dto.status,\n latestAttempt: dto.latest_attempt,\n runAttempt: new WorkflowRunAttemptSummary({\n workflowRunId: dto.id,\n attempt: dto.current_attempt,\n status: dto.status,\n createdAt: dto.created_at,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n }),\n };\n}\n\nexport function toWorkflowRunListItem(dto: WorkflowRunListItemDto): WorkflowRunListItem {\n const statusCounts = dto.job_status_counts.map(({status, count}) => ({status, count}));\n return {\n ...toWorkflowRunRecord(dto),\n jobs: {\n preview: dto.jobs.map((job) => ({\n id: job.id,\n key: job.key,\n name: job.name,\n status: job.status,\n position: job.position,\n })),\n statusCounts,\n // Derived rather than sent: the counts already cover every job, and a separate total\n // would be a second source of truth that could disagree with them.\n total: statusCounts.reduce((sum, entry) => sum + entry.count, 0),\n },\n };\n}\n\nexport function toWorkflowRunListPage(dto: WorkflowRunListResponseDto): WorkflowRunListPage {\n return {\n runs: dto.runs.map(toWorkflowRunListItem),\n nextCursor: dto.next_cursor,\n filteredTotalCount: dto.filtered_total_count,\n };\n}\n\nexport function toWorkflowRunDetail(dto: WorkflowRunDetailResponseDto): WorkflowRunDetail {\n return {\n ...toWorkflowRun(dto),\n latestAttempt: dto.latest_attempt,\n runAttempt: toWorkflowRunAttempt(dto.run_attempt),\n jobs: dto.jobs.map(toJob),\n };\n}\n\nexport function toJob(dto: WorkflowRunJobDetailDto): Job {\n return new Job({\n id: dto.id,\n runAttemptId: dto.run_attempt_id,\n key: dto.key,\n name: dto.name,\n mode: dto.mode,\n status: dto.status,\n statusReason: dto.status_reason,\n carriedOver: dto.carried_over,\n listening: dto.listening ? toJobListening(dto.listening) : null,\n listenerStatus: dto.listener_status,\n resolutionReason: dto.resolution_reason,\n dependencies: dto.dependencies,\n position: dto.position,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n jobExecutions: dto.job_executions.map(toJobExecution),\n });\n}\n\nexport function toJobExecution(dto: WorkflowRunJobExecutionDetailDto): JobExecution {\n return new JobExecution({\n id: dto.id,\n jobId: dto.job_id,\n sequence: dto.sequence,\n name: dto.name,\n status: dto.status,\n statusReason: dto.status_reason,\n triggerEvents: (dto.trigger_events ?? []).map(toWorkflowExecutionEvent),\n queuedAt: dto.queued_at ?? null,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n timedOutAt: dto.timed_out_at ?? null,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n steps: dto.steps.map(toStep),\n });\n}\n\nexport function toStep(dto: WorkflowRunStepDetailDto): Step {\n return {\n id: dto.id,\n jobExecutionId: dto.job_execution_id,\n key: dto.key,\n name: dto.name,\n sourceLocation: dto.source_location\n ? {startLine: dto.source_location.start_line, endLine: dto.source_location.end_line}\n : null,\n status: dto.status,\n type: dto.type,\n config: dto.config,\n agentConfig: toAgentStepConfig(dto),\n error: dto.error\n ? {\n message: dto.error.message,\n exitCode: dto.error.exit_code ?? null,\n signal: dto.error.signal,\n reason: dto.error.reason,\n agentConfigIssue: dto.error.agent_config_issue,\n category: dto.error.category,\n }\n : null,\n position: dto.position,\n currentAttempt: dto.current_attempt,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n attempts: dto.attempts.map((attempt) => toStepAttempt(attempt, dto.job_execution_id)),\n };\n}\n\nexport function toStepAttempt(dto: StepAttemptDto, jobExecutionId: string): StepAttempt {\n return new StepAttempt({\n id: dto.id,\n stepId: dto.step_id,\n jobExecutionId,\n attempt: dto.attempt,\n executionOrder: dto.execution_order,\n status: dto.status,\n exitCode: dto.exit_code ?? null,\n output: dto.output ?? null,\n error: dto.error ?? null,\n gateResult: toStepGateResult(dto.gate_result),\n restartFeedback: dto.restart_feedback ?? null,\n startedAt: dto.started_at,\n finishedAt: dto.finished_at ?? null,\n });\n}\n\nfunction toJobListening(dto: JobListeningDto): JobListening {\n return {\n on: dto.on,\n until: dto.until,\n timeoutMs: dto.timeout_ms,\n maxExecutions: dto.max_executions,\n batch: dto.batch\n ? {\n debounceMs: dto.batch.debounce_ms,\n maxSize: dto.batch.max_size,\n maxWaitMs: dto.batch.max_wait_ms,\n }\n : null,\n onResolve: dto.on_resolve,\n executionTimeoutMs: dto.execution_timeout_ms,\n name: dto.name,\n };\n}\n\nfunction toWorkflowExecutionEvent(dto: WorkflowExecutionEventDto): WorkflowExecutionEvent {\n return {\n source: dto.source,\n event: dto.event,\n deliveryId: dto.delivery_id,\n receivedAt: dto.received_at,\n project: dto.project,\n repository: dto.repository,\n ref: dto.ref,\n commit: dto.commit,\n data: dto.data,\n };\n}\n\nfunction toStepGateResult(dto: StepGateResultDto): StepGateResult {\n if (dto === null || dto.kind === 'none' || dto.kind === 'not_evaluated') return dto;\n if (dto.kind === 'passed' || dto.kind === 'failed') return {...dto, exitCode: dto.exit_code};\n if (dto.kind === 'uncheckable' || dto.kind === 'evaluation_error')\n return {...dto, exitCode: dto.exit_code};\n return dto;\n}\n\nfunction toAgentStepConfig(dto: WorkflowRunStepDetailDto): Step['agentConfig'] {\n if (dto.type !== 'agent') return null;\n return {\n provider: stringConfigValue(dto.config.provider),\n model: stringConfigValue(dto.config.model),\n thinking: stringConfigValue(dto.config.thinking),\n };\n}\n\nfunction stringConfigValue(value: unknown): string | null {\n return typeof value === 'string' && value.trim() ? value.trim() : null;\n}\n"],"names":["Job","JobExecution","StepAttempt","WorkflowRunAttempt","WorkflowRunAttemptSummary","workflowRunTriggerDisplayLabel","workflowRunTriggerLabel","toWorkflowRun","dto","id","projectId","project_id","definitionId","definition_id","number","name","workflowName","workflow_name","currentAttempt","current_attempt","triggerProvider","trigger_provider","triggerSource","trigger_source","triggerEvent","trigger_event","triggerDisplayLabel","triggerLabel","triggerPayload","trigger_payload","triggerReference","trigger_reference","inputs","sourceSnapshot","source_snapshot","content","format","createdAt","created_at","updatedAt","updated_at","isTemporary","startsWith","toWorkflowRunAttempt","workflowRunId","workflow_run_id","attempt","status","startedAt","started_at","finishedAt","finished_at","rerunMode","rerun_mode","toWorkflowRunRecord","latestAttempt","latest_attempt","runAttempt","toWorkflowRunListItem","statusCounts","job_status_counts","map","count","jobs","preview","job","key","position","total","reduce","sum","entry","toWorkflowRunListPage","runs","nextCursor","next_cursor","filteredTotalCount","filtered_total_count","toWorkflowRunDetail","run_attempt","toJob","runAttemptId","run_attempt_id","mode","statusReason","status_reason","carriedOver","carried_over","listening","toJobListening","listenerStatus","listener_status","resolutionReason","resolution_reason","dependencies","jobExecutions","job_executions","toJobExecution","jobId","job_id","sequence","triggerEvents","trigger_events","toWorkflowExecutionEvent","queuedAt","queued_at","timedOutAt","timed_out_at","steps","toStep","jobExecutionId","job_execution_id","sourceLocation","source_location","startLine","start_line","endLine","end_line","type","config","agentConfig","toAgentStepConfig","error","message","exitCode","exit_code","signal","reason","agentConfigIssue","agent_config_issue","category","attempts","toStepAttempt","stepId","step_id","executionOrder","execution_order","output","gateResult","toStepGateResult","gate_result","restartFeedback","restart_feedback","on","until","timeoutMs","timeout_ms","maxExecutions","max_executions","batch","debounceMs","debounce_ms","maxSize","max_size","maxWaitMs","max_wait_ms","onResolve","on_resolve","executionTimeoutMs","execution_timeout_ms","source","event","deliveryId","delivery_id","receivedAt","received_at","project","repository","ref","commit","data","kind","provider","stringConfigValue","model","thinking","value","trim"],"mappings":"AAcA,SACEA,GAAG,EACHC,YAAY,EAGZC,WAAW,EAIXC,kBAAkB,EAClBC,yBAAyB,EAKzBC,8BAA8B,EAC9BC,uBAAuB,QAClB,wBAAwB;AAE/B,OAAO,SAASC,cAAcC,GAA2B;IACvD,OAAO;QACLC,IAAID,IAAIC,EAAE;QACVC,WAAWF,IAAIG,UAAU;QACzBC,cAAcJ,IAAIK,aAAa;QAC/BC,QAAQN,IAAIM,MAAM;QAClBC,MAAMP,IAAIO,IAAI;QACdC,cAAcR,IAAIS,aAAa;QAC/BC,gBAAgBV,IAAIW,eAAe;QACnCC,iBAAiBZ,IAAIa,gBAAgB;QACrCC,eAAed,IAAIe,cAAc;QACjCC,cAAchB,IAAIiB,aAAa;QAC/BC,qBAAqBrB,+BAA+B;YAClDiB,eAAed,IAAIe,cAAc;YACjCC,cAAchB,IAAIiB,aAAa;QACjC;QACAE,cAAcrB,wBAAwB;YACpCgB,eAAed,IAAIe,cAAc;YACjCC,cAAchB,IAAIiB,aAAa;QACjC;QACAG,gBAAgBpB,IAAIqB,eAAe;QACnCC,kBAAkBtB,IAAIuB,iBAAiB;QACvCC,QAAQxB,IAAIwB,MAAM,IAAI;QACtBC,gBAAgBzB,IAAI0B,eAAe,GAC/B;YAACC,SAAS3B,IAA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} from '@shipfox/api-workflows-dto';
2
2
  import { type InfiniteData, type UseInfiniteQueryOptions, type UseQueryOptions } from '@tanstack/react-query';
3
- import { type ManualWorkflowLaunch, type WorkflowRun, type WorkflowRunAttempt, type WorkflowRunDetail, type WorkflowRunListItem, type WorkflowRunListPage, type WorkflowRunStatus } from '#core/workflow-run.js';
3
+ import { type ManualWorkflowLaunch, type WorkflowRun, type WorkflowRunAttempt, type WorkflowRunDetail, type WorkflowRunListPage, type WorkflowRunRecord, type WorkflowRunStatus } from '#core/workflow-run.js';
4
4
  export interface WorkflowRunFilters {
5
5
  status?: WorkflowRunStatus | undefined;
6
6
  definitionId?: string | undefined;
@@ -43,8 +43,8 @@ export declare function workflowRunsInfiniteQueryOptions(projectId: string | und
43
43
  export declare function rerunWorkflowRun({ workflowRunId, mode, }: {
44
44
  workflowRunId: string;
45
45
  mode: WorkflowRunRerunModeDto;
46
- }): Promise<WorkflowRunListItem>;
47
- export declare function useRerunWorkflowRunMutation(projectId: string): import("@tanstack/react-query").UseMutationResult<WorkflowRunListItem, Error, {
46
+ }): Promise<WorkflowRunRecord>;
47
+ export declare function useRerunWorkflowRunMutation(projectId: string): import("@tanstack/react-query").UseMutationResult<WorkflowRunRecord, Error, {
48
48
  workflowRunId: string;
49
49
  mode: WorkflowRunRerunModeDto;
50
50
  }, unknown>;
@@ -74,6 +74,6 @@ export declare function workflowRunAttemptsQueryOptions({ workflowRunId, enabled
74
74
  workflowRunId: string | undefined;
75
75
  enabled: boolean;
76
76
  }): WorkflowRunAttemptsQueryOptions;
77
- export declare function useCancelWorkflowRunMutation(run: WorkflowRun | undefined): import("@tanstack/react-query").UseMutationResult<WorkflowRunListItem, Error, void, unknown>;
77
+ export declare function useCancelWorkflowRunMutation(run: WorkflowRun | undefined): import("@tanstack/react-query").UseMutationResult<WorkflowRunRecord, Error, void, unknown>;
78
78
  export {};
79
79
  //# sourceMappingURL=workflow-runs.d.ts.map