@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
@@ -6,11 +6,13 @@ import type {
6
6
  WorkflowRunDetailResponseDto,
7
7
  WorkflowRunJobDetailDto,
8
8
  WorkflowRunJobExecutionDetailDto,
9
+ WorkflowRunJobSummaryDto,
10
+ WorkflowRunListItemDto,
9
11
  WorkflowRunListResponseDto,
10
- WorkflowRunResponseDto,
11
12
  WorkflowRunStatusDto,
12
13
  WorkflowRunStepDetailDto,
13
14
  } from '@shipfox/api-workflows-dto';
15
+ import {WORKFLOW_RUN_JOB_PREVIEW_LIMIT} from '@shipfox/api-workflows-dto';
14
16
  import type {
15
17
  Job,
16
18
  Step,
@@ -35,9 +37,11 @@ const DEFINITION_ID = '33333333-3333-4333-8333-333333333333';
35
37
  const JOB_ID = '44444444-4444-4444-8444-000000000001';
36
38
  const JOB_EXECUTION_ID = '77777777-7777-4777-8777-000000000001';
37
39
  const STEP_ID = '55555555-5555-4555-8555-000000000001';
40
+ const JOB_SUMMARY_ID_PREFIX = '44444444-4444-4444-8444-1';
38
41
 
39
42
  let runSequence = 0;
40
43
  let jobSequence = 0;
44
+ let jobSummarySequence = 0;
41
45
  let jobExecutionSequence = 0;
42
46
  let stepSequence = 0;
43
47
  let attemptSequence = 0;
@@ -49,14 +53,18 @@ export type JobDtoOverrides = Partial<Omit<WorkflowRunJobDetailDto, 'job_executi
49
53
 
50
54
  type JobDtoBase = Omit<WorkflowRunJobDetailDto, 'job_executions'>;
51
55
 
56
+ // Built as a list item, the widest run shape, so one factory serves both the list endpoint
57
+ // and the single-run endpoints; the narrower response schemas drop the extra key.
52
58
  export function workflowRunDto(
53
- overrides: Partial<WorkflowRunResponseDto> = {},
54
- ): WorkflowRunResponseDto {
59
+ overrides: Partial<WorkflowRunListItemDto> = {},
60
+ ): WorkflowRunListItemDto {
55
61
  return {
56
62
  id: RUN_ID,
57
63
  project_id: PROJECT_ID,
58
64
  definition_id: DEFINITION_ID,
65
+ number: 1,
59
66
  name: 'deploy-web',
67
+ workflow_name: 'deploy-web',
60
68
  status: 'running',
61
69
  current_attempt: 1,
62
70
  latest_attempt: 1,
@@ -64,18 +72,79 @@ export function workflowRunDto(
64
72
  trigger_source: 'manual',
65
73
  trigger_event: 'fire',
66
74
  trigger_payload: {},
75
+ trigger_reference: null,
67
76
  inputs: null,
68
77
  source_snapshot: null,
69
78
  created_at: '2026-06-21T12:00:00.000Z',
70
79
  updated_at: '2026-06-21T12:01:00.000Z',
71
80
  started_at: null,
72
81
  finished_at: null,
82
+ jobs: [],
83
+ job_status_counts: [],
73
84
  ...overrides,
74
85
  };
75
86
  }
76
87
 
88
+ export function workflowRunJobSummaryDto(
89
+ overrides: Partial<WorkflowRunJobSummaryDto> = {},
90
+ ): WorkflowRunJobSummaryDto {
91
+ jobSummarySequence += 1;
92
+ return {
93
+ id: `${JOB_SUMMARY_ID_PREFIX}${String(jobSummarySequence).padStart(11, '0')}`,
94
+ key: `job-${jobSummarySequence}`,
95
+ name: null,
96
+ status: 'succeeded',
97
+ position: jobSummarySequence - 1,
98
+ ...overrides,
99
+ };
100
+ }
101
+
102
+ /** A strip of `count` job glyphs, with `statuses` applied from the left. */
103
+ export function workflowRunJobSummaryDtos(
104
+ count: number,
105
+ statuses: readonly JobStatusDto[] = [],
106
+ ): WorkflowRunJobSummaryDto[] {
107
+ return Array.from({length: count}, (_, index) =>
108
+ workflowRunJobSummaryDto({
109
+ key: `job-${index + 1}`,
110
+ position: index,
111
+ ...(statuses[index] ? {status: statuses[index]} : {}),
112
+ }),
113
+ );
114
+ }
115
+
116
+ /**
117
+ * A run's jobs as the API sends them: the preview truncated at the server's bound, and counts
118
+ * over every status given.
119
+ *
120
+ * Built from one list so the two can never disagree. A fixture whose counts contradicted its
121
+ * preview would hide exactly the bug the split exists to prevent.
122
+ */
123
+ export function workflowRunJobsFixture(
124
+ statuses: readonly JobStatusDto[],
125
+ ): Pick<WorkflowRunListItemDto, 'jobs' | 'job_status_counts'> {
126
+ const counts = new Map<JobStatusDto, number>();
127
+ for (const status of statuses) counts.set(status, (counts.get(status) ?? 0) + 1);
128
+
129
+ return {
130
+ jobs: workflowRunJobSummaryDtos(
131
+ Math.min(statuses.length, WORKFLOW_RUN_JOB_PREVIEW_LIMIT),
132
+ statuses,
133
+ ),
134
+ job_status_counts: [...counts.entries()].map(([status, count]) => ({status, count})),
135
+ };
136
+ }
137
+
138
+ /** `count` jobs that all share one status, for density cases where the mix does not matter. */
139
+ export function workflowRunJobsOfStatus(
140
+ count: number,
141
+ status: JobStatusDto = 'succeeded',
142
+ ): Pick<WorkflowRunListItemDto, 'jobs' | 'job_status_counts'> {
143
+ return workflowRunJobsFixture(Array.from({length: count}, () => status));
144
+ }
145
+
77
146
  export function workflowRunListItem(
78
- overrides: Partial<WorkflowRunResponseDto> = {},
147
+ overrides: Partial<WorkflowRunListItemDto> = {},
79
148
  ): WorkflowRunListItem {
80
149
  return toWorkflowRunListItem(workflowRunDto(overrides));
81
150
  }
@@ -276,8 +345,8 @@ export function sequencedWorkflowRunDto(
276
345
  status: WorkflowRunStatusDto,
277
346
  name: string,
278
347
  minutesAgo: number,
279
- overrides: Partial<WorkflowRunResponseDto> = {},
280
- ): WorkflowRunResponseDto {
348
+ overrides: Partial<WorkflowRunListItemDto> = {},
349
+ ): WorkflowRunListItemDto {
281
350
  runSequence += 1;
282
351
  return workflowRunDto({
283
352
  id: `run-${String(runSequence).padStart(8, '0')}`,
@@ -298,7 +367,7 @@ export function sequencedWorkflowRunListItem(
298
367
  status: WorkflowRunStatusDto,
299
368
  name: string,
300
369
  minutesAgo: number,
301
- overrides: Partial<WorkflowRunResponseDto> = {},
370
+ overrides: Partial<WorkflowRunListItemDto> = {},
302
371
  ): WorkflowRunListItem {
303
372
  return toWorkflowRunListItem(sequencedWorkflowRunDto(status, name, minutesAgo, overrides));
304
373
  }
package/test/pages.tsx CHANGED
@@ -1,5 +1,10 @@
1
1
  import {configureApiClient} from '@shipfox/client-api';
2
- import {type AuthState, authStateAtom} from '@shipfox/client-shell/runtime';
2
+ import {
3
+ type AuthState,
4
+ authStateAtom,
5
+ parseAppSearch,
6
+ stringifyAppSearch,
7
+ } from '@shipfox/client-shell/runtime';
3
8
  import {Toaster} from '@shipfox/react-ui/toast';
4
9
  import {QueryClient, QueryClientProvider} from '@tanstack/react-query';
5
10
  import {
@@ -19,18 +24,19 @@ import {validateWorkflowRunsSearch} from '#routes/inputs.js';
19
24
 
20
25
  // The workflow run page navigates with the router (run rows are links and the page redirects
21
26
  // to the first run), so the harness mounts the page under a memory router whose route tree
22
- // carries the `/workspaces/$wid/projects/$pid/runs/$workflowRunId` params the components read. The
27
+ // carries the `/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId` params the components read. The
23
28
  // page is supplied as a factory the detail route calls with the current `workflowRunId`, mirroring
24
29
  // the real route wiring so a redirect re-renders the page with the run it landed on.
25
30
  export const PROJECT_TEST_WID = '11111111-1111-4111-8111-111111111111';
31
+ export const PROJECT_TEST_WSLUG = 'acme';
26
32
 
27
33
  // Pages that render components depending on `useActiveWorkspace()` (e.g. the project source
28
- // strip) need an authenticated workspace matching `$wid` in the atom `client-shell/runtime`
34
+ // strip) need an authenticated workspace matching `$workspaceSlug` in the atom `client-shell/runtime`
29
35
  // reads. A fixed membership id is fine here: nothing in these tests asserts on it.
30
36
  const authState: AuthState = {
31
37
  status: 'authenticated',
32
38
  token: 'token',
33
- workspaces: [{id: PROJECT_TEST_WID, name: 'Acme', membershipId: 'm-1'}],
39
+ workspaces: [{id: PROJECT_TEST_WID, name: 'Acme', slug: PROJECT_TEST_WSLUG, membershipId: 'm-1'}],
34
40
  };
35
41
 
36
42
  export function jsonResponse(body: unknown, init: ResponseInit = {}) {
@@ -51,7 +57,7 @@ function createTestRouter(
51
57
  const rootRoute = createRootRoute({component: Outlet});
52
58
  const runsRoute = createRoute({
53
59
  getParentRoute: () => rootRoute,
54
- path: '/workspaces/$wid/projects/$pid/runs',
60
+ path: '/w/$workspaceSlug/p/$projectSlug/runs',
55
61
  component: function RunsRoute() {
56
62
  return renderPage({
57
63
  search: validateWorkflowRunsSearch(useSearch({strict: false}) as Record<string, unknown>),
@@ -60,7 +66,7 @@ function createTestRouter(
60
66
  });
61
67
  const runDetailRoute = createRoute({
62
68
  getParentRoute: () => rootRoute,
63
- path: '/workspaces/$wid/projects/$pid/runs/$workflowRunId',
69
+ path: '/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId',
64
70
  component: function RunDetailRoute() {
65
71
  const {workflowRunId} = useParams({strict: false}) as {workflowRunId?: string};
66
72
  return renderPage({
@@ -71,17 +77,21 @@ function createTestRouter(
71
77
  });
72
78
  const workflowsRoute = createRoute({
73
79
  getParentRoute: () => rootRoute,
74
- path: '/workspaces/$wid/projects/$pid/workflows',
80
+ path: '/w/$workspaceSlug/p/$projectSlug/workflows',
75
81
  component: () => renderPage({search: {}}),
76
82
  });
77
83
  const modelProviderSettingsRoute = createRoute({
78
84
  getParentRoute: () => rootRoute,
79
- path: '/workspaces/$wid/settings/agents',
85
+ path: '/w/$workspaceSlug/settings/agents',
80
86
  component: () => <div>Agent settings placeholder</div>,
81
87
  });
82
88
 
83
89
  return createRouter({
84
90
  history: createMemoryHistory({initialEntries: [path]}),
91
+ // Mirrors the generated app router so repeated search keys behave here as they do in
92
+ // production; the default encoder would JSON-encode a multi-select instead.
93
+ parseSearch: parseAppSearch,
94
+ stringifySearch: stringifyAppSearch,
85
95
  routeTree: rootRoute.addChildren([
86
96
  runsRoute,
87
97
  runDetailRoute,
package/test/render.tsx CHANGED
@@ -19,13 +19,19 @@ function createComponentRouter(element: ReactElement) {
19
19
  // Workflow run rows link here; TanStack Router needs the target route to build hrefs.
20
20
  const runDetailRoute = createRoute({
21
21
  getParentRoute: () => rootRoute,
22
- path: '/workspaces/$wid/projects/$pid/runs/$workflowRunId',
22
+ path: '/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId',
23
+ component: () => null,
24
+ });
25
+ // The unfiltered empty state links here.
26
+ const workflowsRoute = createRoute({
27
+ getParentRoute: () => rootRoute,
28
+ path: '/w/$workspaceSlug/p/$projectSlug/workflows',
23
29
  component: () => null,
24
30
  });
25
31
 
26
32
  return createRouter({
27
33
  history: createMemoryHistory({initialEntries: ['/']}),
28
- routeTree: rootRoute.addChildren([indexRoute, runDetailRoute]),
34
+ routeTree: rootRoute.addChildren([indexRoute, runDetailRoute, workflowsRoute]),
29
35
  });
30
36
  }
31
37