@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
@@ -0,0 +1,43 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useNavigate } from '@tanstack/react-router';
3
+ import { useCallback } from 'react';
4
+ import { WorkflowRunList } from '#components/workflow-run-list/workflow-run-list.js';
5
+ import { applyWorkflowRunFilterPatch, clearWorkflowRunFilters, workflowRunSearchParams } from '#routes/inputs.js';
6
+ const EMPTY_SEARCH = {};
7
+ export function WorkflowRunsPage({ projectId, workspaceSlug, projectSlug, search = EMPTY_SEARCH }) {
8
+ const navigate = useNavigate();
9
+ // Filter changes replace history instead of pushing it, so Back leaves the list rather than
10
+ // walking every keystroke of a search box.
11
+ const commitSearch = useCallback((next)=>{
12
+ navigate({
13
+ search: workflowRunSearchParams(next, {}),
14
+ replace: true
15
+ });
16
+ }, [
17
+ navigate
18
+ ]);
19
+ const onFiltersChange = useCallback((patch)=>commitSearch(applyWorkflowRunFilterPatch(search, patch)), [
20
+ commitSearch,
21
+ search
22
+ ]);
23
+ const onClearFilters = useCallback(()=>commitSearch(clearWorkflowRunFilters(search)), [
24
+ commitSearch,
25
+ search
26
+ ]);
27
+ return /*#__PURE__*/ _jsx("div", {
28
+ className: "flex min-h-0 flex-1 overflow-hidden bg-background-neutral-base",
29
+ children: /*#__PURE__*/ _jsx("div", {
30
+ className: "mx-auto flex min-h-0 w-full max-w-[1120px] flex-1 flex-col px-24 py-24",
31
+ children: /*#__PURE__*/ _jsx(WorkflowRunList, {
32
+ projectId: projectId,
33
+ workspaceSlug: workspaceSlug,
34
+ projectSlug: projectSlug,
35
+ search: search,
36
+ onFiltersChange: onFiltersChange,
37
+ onClearFilters: onClearFilters
38
+ })
39
+ })
40
+ });
41
+ }
42
+
43
+ //# sourceMappingURL=workflow-run-list-page.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/pages/workflow-run-list-page.tsx"],"sourcesContent":["import {useNavigate} from '@tanstack/react-router';\nimport {useCallback} from 'react';\nimport {WorkflowRunList} from '#components/workflow-run-list/workflow-run-list.js';\nimport {\n applyWorkflowRunFilterPatch,\n clearWorkflowRunFilters,\n type WorkflowRunFilterPatch,\n type WorkflowRunsSearch,\n workflowRunSearchParams,\n} from '#routes/inputs.js';\n\ninterface WorkflowRunsPageProps {\n projectId: string;\n workspaceSlug: string;\n projectSlug: string;\n search?: WorkflowRunsSearch;\n}\n\nconst EMPTY_SEARCH: WorkflowRunsSearch = {};\n\nexport function WorkflowRunsPage({\n projectId,\n workspaceSlug,\n projectSlug,\n search = EMPTY_SEARCH,\n}: WorkflowRunsPageProps) {\n const navigate = useNavigate();\n\n // Filter changes replace history instead of pushing it, so Back leaves the list rather than\n // walking every keystroke of a search box.\n const commitSearch = useCallback(\n (next: WorkflowRunsSearch) => {\n navigate({\n search: workflowRunSearchParams(next, {}) as never,\n replace: true,\n });\n },\n [navigate],\n );\n\n const onFiltersChange = useCallback(\n (patch: WorkflowRunFilterPatch) => commitSearch(applyWorkflowRunFilterPatch(search, patch)),\n [commitSearch, search],\n );\n\n const onClearFilters = useCallback(\n () => commitSearch(clearWorkflowRunFilters(search)),\n [commitSearch, search],\n );\n\n return (\n <div className=\"flex min-h-0 flex-1 overflow-hidden bg-background-neutral-base\">\n <div className=\"mx-auto flex min-h-0 w-full max-w-[1120px] flex-1 flex-col px-24 py-24\">\n <WorkflowRunList\n projectId={projectId}\n workspaceSlug={workspaceSlug}\n projectSlug={projectSlug}\n search={search}\n onFiltersChange={onFiltersChange}\n onClearFilters={onClearFilters}\n />\n </div>\n </div>\n );\n}\n"],"names":["useNavigate","useCallback","WorkflowRunList","applyWorkflowRunFilterPatch","clearWorkflowRunFilters","workflowRunSearchParams","EMPTY_SEARCH","WorkflowRunsPage","projectId","workspaceSlug","projectSlug","search","navigate","commitSearch","next","replace","onFiltersChange","patch","onClearFilters","div","className"],"mappings":";AAAA,SAAQA,WAAW,QAAO,yBAAyB;AACnD,SAAQC,WAAW,QAAO,QAAQ;AAClC,SAAQC,eAAe,QAAO,qDAAqD;AACnF,SACEC,2BAA2B,EAC3BC,uBAAuB,EAGvBC,uBAAuB,QAClB,oBAAoB;AAS3B,MAAMC,eAAmC,CAAC;AAE1C,OAAO,SAASC,iBAAiB,EAC/BC,SAAS,EACTC,aAAa,EACbC,WAAW,EACXC,SAASL,YAAY,EACC;IACtB,MAAMM,WAAWZ;IAEjB,4FAA4F;IAC5F,2CAA2C;IAC3C,MAAMa,eAAeZ,YACnB,CAACa;QACCF,SAAS;YACPD,QAAQN,wBAAwBS,MAAM,CAAC;YACvCC,SAAS;QACX;IACF,GACA;QAACH;KAAS;IAGZ,MAAMI,kBAAkBf,YACtB,CAACgB,QAAkCJ,aAAaV,4BAA4BQ,QAAQM,SACpF;QAACJ;QAAcF;KAAO;IAGxB,MAAMO,iBAAiBjB,YACrB,IAAMY,aAAaT,wBAAwBO,UAC3C;QAACE;QAAcF;KAAO;IAGxB,qBACE,KAACQ;QAAIC,WAAU;kBACb,cAAA,KAACD;YAAIC,WAAU;sBACb,cAAA,KAAClB;gBACCM,WAAWA;gBACXC,eAAeA;gBACfC,aAAaA;gBACbC,QAAQA;gBACRK,iBAAiBA;gBACjBE,gBAAgBA;;;;AAK1B"}
@@ -1,22 +1,111 @@
1
- import type { WorkflowRunListStatusFilter } from '#components/workflow-run-list/types.js';
2
1
  import type { WorkflowRunSelectionInput } from '#core/workflow-run-url-state.js';
2
+ /**
3
+ * Statuses the run list can filter by. Absent means all; there is deliberately no `all`
4
+ * value, so "no filter" and "every filter" are the same URL rather than two.
5
+ */
6
+ export declare const WORKFLOW_RUN_LIST_STATUSES: readonly ["succeeded", "failed", "running", "cancelled"];
7
+ export type WorkflowRunListStatus = (typeof WORKFLOW_RUN_LIST_STATUSES)[number];
8
+ export declare const WORKFLOW_RUN_TABS: readonly ["summary", "jobs", "annotations", "source"];
9
+ export type WorkflowRunTab = (typeof WORKFLOW_RUN_TABS)[number];
10
+ export declare const WORKFLOW_RUN_ANNOTATION_SEVERITIES: readonly ["error", "warning", "info", "success"];
11
+ export type WorkflowRunAnnotationSeverity = (typeof WORKFLOW_RUN_ANNOTATION_SEVERITIES)[number];
3
12
  export interface WorkflowRunsSearch extends WorkflowRunSelectionInput {
4
13
  search?: string;
5
- status?: WorkflowRunListStatusFilter;
14
+ status?: WorkflowRunListStatus[];
15
+ branch?: string[];
16
+ actor?: string[];
17
+ event?: string[];
18
+ /** Inclusive lower bound on the run's local calendar date, `YYYY-MM-DD`. */
19
+ after?: string;
20
+ /** Inclusive upper bound on the run's local calendar date, `YYYY-MM-DD`. */
21
+ before?: string;
22
+ tab?: WorkflowRunTab;
23
+ annotation?: string;
24
+ severity?: WorkflowRunAnnotationSeverity;
6
25
  }
26
+ /**
27
+ * Reads the run list and run detail query string.
28
+ *
29
+ * Every value is dropped rather than rejected when it does not fit: a truncated or
30
+ * hand-edited URL should degrade to a sensible page, never to an error screen. Unknown
31
+ * parameters are ignored for the same reason.
32
+ */
7
33
  export declare function validateWorkflowRunsSearch(input: Record<string, unknown>): WorkflowRunsSearch;
34
+ /**
35
+ * Writes the query string back.
36
+ *
37
+ * Array values reach the router as arrays and the app's `stringifySearch` expands each into
38
+ * repeated keys; joining them here would defeat that and break on branch names with commas.
39
+ */
8
40
  export declare function workflowRunSearchParams(search: WorkflowRunsSearch, selection?: WorkflowRunSelectionInput): {
9
41
  runAttempt?: string;
10
42
  stepAttempt?: string;
11
43
  step?: string;
12
44
  jobExecution?: string;
13
45
  job?: string;
14
- status?: "running" | "failed";
46
+ severity?: "error" | "success" | "warning" | "info";
47
+ annotation?: string;
48
+ tab?: "jobs" | "annotations" | "source";
49
+ before?: string;
50
+ after?: string;
51
+ event?: string[];
52
+ actor?: string[];
53
+ branch?: string[];
54
+ status?: ("running" | "succeeded" | "failed" | "cancelled")[];
15
55
  search?: string;
16
56
  };
57
+ /**
58
+ * Resolves the detail surface for a URL. Explicit tabs win; legacy selection-only URLs belong
59
+ * to Jobs so their selected detail remains visible instead of silently landing on Summary.
60
+ */
61
+ export declare function workflowRunTab(search: Pick<WorkflowRunsSearch, 'tab' | 'jobId' | 'jobExecutionId' | 'stepId' | 'stepAttemptId'>): WorkflowRunTab;
62
+ /** Serializes only list filters when leaving a run detail page for the run list. */
63
+ export declare function workflowRunListSearchParams(search: WorkflowRunsSearch): {
64
+ runAttempt?: string;
65
+ stepAttempt?: string;
66
+ step?: string;
67
+ jobExecution?: string;
68
+ job?: string;
69
+ severity?: "error" | "success" | "warning" | "info";
70
+ annotation?: string;
71
+ tab?: "jobs" | "annotations" | "source";
72
+ before?: string;
73
+ after?: string;
74
+ event?: string[];
75
+ actor?: string[];
76
+ branch?: string[];
77
+ status?: ("running" | "succeeded" | "failed" | "cancelled")[];
78
+ search?: string;
79
+ };
80
+ /**
81
+ * A filter change. Each member is explicitly optional-or-undefined so that "present and
82
+ * undefined" (clear this filter) stays distinguishable from "absent" (leave it alone) under
83
+ * `exactOptionalPropertyTypes`.
84
+ */
85
+ export interface WorkflowRunFilterPatch {
86
+ search?: string | undefined;
87
+ status?: WorkflowRunListStatus[] | undefined;
88
+ branch?: string[] | undefined;
89
+ actor?: string[] | undefined;
90
+ event?: string[] | undefined;
91
+ after?: string | undefined;
92
+ before?: string | undefined;
93
+ }
94
+ /**
95
+ * Applies a filter change.
96
+ *
97
+ * A key present with `undefined`, an empty string, or an empty array clears that filter; a
98
+ * key left out is untouched. Cleared filters are deleted rather than stored empty, so "no
99
+ * filter" is one URL instead of several that render the same list.
100
+ */
101
+ export declare function applyWorkflowRunFilterPatch(search: WorkflowRunsSearch, patch: WorkflowRunFilterPatch): WorkflowRunsSearch;
102
+ /** Drops every filter while keeping the run-selection parameters the detail route owns. */
103
+ export declare function clearWorkflowRunFilters(search: WorkflowRunsSearch): WorkflowRunsSearch;
104
+ /** True when any list filter is active, which separates "no matches" from "no runs". */
105
+ export declare function hasWorkflowRunFilters(search: WorkflowRunsSearch): boolean;
17
106
  export declare function workflowRouteParams(input: Record<string, unknown>): {
18
- wid: string;
19
- pid: string;
107
+ workspaceSlug: string;
108
+ projectSlug: string;
20
109
  workflowRunId?: string;
21
110
  };
22
111
  //# sourceMappingURL=inputs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../src/routes/inputs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,2BAA2B,EAAC,MAAM,wCAAwC,CAAC;AACxF,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,iCAAiC,CAAC;AAE/E,MAAM,WAAW,kBAAmB,SAAQ,yBAAyB;IACnE,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,MAAM,CAAC,EAAE,2BAA2B,CAAC;CACtC;AAED,wBAAgB,0BAA0B,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,kBAAkB,CAa7F;AAED,wBAAgB,uBAAuB,CACrC,MAAM,EAAE,kBAAkB,EAC1B,SAAS,GAAE,yBAAkC;;;;;;;;EAW9C;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACnE,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAMA"}
1
+ {"version":3,"file":"inputs.d.ts","sourceRoot":"","sources":["../../src/routes/inputs.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAC,yBAAyB,EAAC,MAAM,iCAAiC,CAAC;AAE/E;;;GAGG;AACH,eAAO,MAAM,0BAA0B,0DAA2D,CAAC;AAEnG,MAAM,MAAM,qBAAqB,GAAG,CAAC,OAAO,0BAA0B,CAAC,CAAC,MAAM,CAAC,CAAC;AAEhF,eAAO,MAAM,iBAAiB,uDAAwD,CAAC;AAEvF,MAAM,MAAM,cAAc,GAAG,CAAC,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,EAAE,qBAAqB,EAAE,GAAG,SAAS,CAAC;IAC7C,MAAM,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC9B,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC;IAC7B,KAAK,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;IAC3B,MAAM,CAAC,EAAE,MAAM,GAAG,SAAS,CAAC;CAC7B;AAED;;;;;;GAMG;AACH,wBAAgB,2BAA2B,CACzC,MAAM,EAAE,kBAAkB,EAC1B,KAAK,EAAE,sBAAsB,GAC5B,kBAAkB,CAUpB;AAED,2FAA2F;AAC3F,wBAAgB,uBAAuB,CAAC,MAAM,EAAE,kBAAkB,GAAG,kBAAkB,CAUtF;AAED,wFAAwF;AACxF,wBAAgB,qBAAqB,CAAC,MAAM,EAAE,kBAAkB,GAAG,OAAO,CAUzE;AAED,wBAAgB,mBAAmB,CAAC,KAAK,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG;IACnE,aAAa,EAAE,MAAM,CAAC;IACtB,WAAW,EAAE,MAAM,CAAC;IACpB,aAAa,CAAC,EAAE,MAAM,CAAC;CACxB,CAOA"}
@@ -1,14 +1,79 @@
1
- export function validateWorkflowRunsSearch(input) {
1
+ /**
2
+ * Statuses the run list can filter by. Absent means all; there is deliberately no `all`
3
+ * value, so "no filter" and "every filter" are the same URL rather than two.
4
+ */ export const WORKFLOW_RUN_LIST_STATUSES = [
5
+ 'succeeded',
6
+ 'failed',
7
+ 'running',
8
+ 'cancelled'
9
+ ];
10
+ export const WORKFLOW_RUN_TABS = [
11
+ 'summary',
12
+ 'jobs',
13
+ 'annotations',
14
+ 'source'
15
+ ];
16
+ export const WORKFLOW_RUN_ANNOTATION_SEVERITIES = [
17
+ 'error',
18
+ 'warning',
19
+ 'info',
20
+ 'success'
21
+ ];
22
+ const STATUS_VALUES = new Set(WORKFLOW_RUN_LIST_STATUSES);
23
+ const TAB_VALUES = new Set(WORKFLOW_RUN_TABS);
24
+ const ANNOTATION_SEVERITY_VALUES = new Set(WORKFLOW_RUN_ANNOTATION_SEVERITIES);
25
+ const CALENDAR_DATE_PATTERN = /^\d{4}-\d{2}-\d{2}$/u;
26
+ /**
27
+ * Reads the run list and run detail query string.
28
+ *
29
+ * Every value is dropped rather than rejected when it does not fit: a truncated or
30
+ * hand-edited URL should degrade to a sensible page, never to an error screen. Unknown
31
+ * parameters are ignored for the same reason.
32
+ */ export function validateWorkflowRunsSearch(input) {
2
33
  const search = string(input.search);
3
- const status = input.status === 'failed' || input.status === 'running' ? input.status : 'all';
34
+ const status = repeatable(input.status).filter(isWorkflowRunListStatus);
35
+ const branch = repeatable(input.branch);
36
+ const actor = repeatable(input.actor);
37
+ const event = repeatable(input.event);
38
+ const after = calendarDate(input.after);
39
+ const before = calendarDate(input.before);
4
40
  const runAttempt = positiveInteger(input.runAttempt);
41
+ const tabValue = string(input.tab);
42
+ const tab = tabValue && TAB_VALUES.has(tabValue) ? tabValue : undefined;
43
+ const annotation = string(input.annotation);
44
+ const severityValue = string(input.severity);
45
+ const severity = severityValue && ANNOTATION_SEVERITY_VALUES.has(severityValue) ? severityValue : undefined;
5
46
  return {
6
47
  ...search ? {
7
48
  search
8
49
  } : {},
9
- ...status === 'all' ? {} : {
50
+ ...status.length > 0 ? {
10
51
  status
11
- },
52
+ } : {},
53
+ ...branch.length > 0 ? {
54
+ branch
55
+ } : {},
56
+ ...actor.length > 0 ? {
57
+ actor
58
+ } : {},
59
+ ...event.length > 0 ? {
60
+ event
61
+ } : {},
62
+ ...after ? {
63
+ after
64
+ } : {},
65
+ ...before ? {
66
+ before
67
+ } : {},
68
+ ...tab ? {
69
+ tab
70
+ } : {},
71
+ ...annotation ? {
72
+ annotation
73
+ } : {},
74
+ ...severity ? {
75
+ severity
76
+ } : {},
12
77
  ...string(input.job) ? {
13
78
  jobId: string(input.job)
14
79
  } : {},
@@ -26,14 +91,43 @@ export function validateWorkflowRunsSearch(input) {
26
91
  } : {}
27
92
  };
28
93
  }
29
- export function workflowRunSearchParams(search, selection = search) {
94
+ /**
95
+ * Writes the query string back.
96
+ *
97
+ * Array values reach the router as arrays and the app's `stringifySearch` expands each into
98
+ * repeated keys; joining them here would defeat that and break on branch names with commas.
99
+ */ export function workflowRunSearchParams(search, selection = search) {
30
100
  return {
31
101
  ...search.search ? {
32
102
  search: search.search
33
103
  } : {},
34
- ...search.status && search.status !== 'all' ? {
104
+ ...search.status?.length ? {
35
105
  status: search.status
36
106
  } : {},
107
+ ...search.branch?.length ? {
108
+ branch: search.branch
109
+ } : {},
110
+ ...search.actor?.length ? {
111
+ actor: search.actor
112
+ } : {},
113
+ ...search.event?.length ? {
114
+ event: search.event
115
+ } : {},
116
+ ...search.after ? {
117
+ after: search.after
118
+ } : {},
119
+ ...search.before ? {
120
+ before: search.before
121
+ } : {},
122
+ ...search.tab && search.tab !== 'summary' ? {
123
+ tab: search.tab
124
+ } : {},
125
+ ...search.annotation ? {
126
+ annotation: search.annotation
127
+ } : {},
128
+ ...search.severity ? {
129
+ severity: search.severity
130
+ } : {},
37
131
  ...selection.jobId ? {
38
132
  job: selection.jobId
39
133
  } : {},
@@ -51,20 +145,112 @@ export function workflowRunSearchParams(search, selection = search) {
51
145
  } : {}
52
146
  };
53
147
  }
148
+ /**
149
+ * Resolves the detail surface for a URL. Explicit tabs win; legacy selection-only URLs belong
150
+ * to Jobs so their selected detail remains visible instead of silently landing on Summary.
151
+ */ export function workflowRunTab(search) {
152
+ if (search.tab) return search.tab;
153
+ if (search.jobId || search.jobExecutionId || search.stepId || search.stepAttemptId) return 'jobs';
154
+ return 'summary';
155
+ }
156
+ /** Serializes only list filters when leaving a run detail page for the run list. */ export function workflowRunListSearchParams(search) {
157
+ const { tab: _tab, annotation: _annotation, severity: _severity, ...listSearch } = search;
158
+ return workflowRunSearchParams(listSearch, {});
159
+ }
160
+ /**
161
+ * Applies a filter change.
162
+ *
163
+ * A key present with `undefined`, an empty string, or an empty array clears that filter; a
164
+ * key left out is untouched. Cleared filters are deleted rather than stored empty, so "no
165
+ * filter" is one URL instead of several that render the same list.
166
+ */ export function applyWorkflowRunFilterPatch(search, patch) {
167
+ const next = {
168
+ ...search
169
+ };
170
+ if ('search' in patch) setOrDelete(next, 'search', patch.search || undefined);
171
+ if ('status' in patch) setOrDelete(next, 'status', nonEmptyList(patch.status));
172
+ if ('branch' in patch) setOrDelete(next, 'branch', nonEmptyList(patch.branch));
173
+ if ('actor' in patch) setOrDelete(next, 'actor', nonEmptyList(patch.actor));
174
+ if ('event' in patch) setOrDelete(next, 'event', nonEmptyList(patch.event));
175
+ if ('after' in patch) setOrDelete(next, 'after', patch.after || undefined);
176
+ if ('before' in patch) setOrDelete(next, 'before', patch.before || undefined);
177
+ return next;
178
+ }
179
+ /** Drops every filter while keeping the run-selection parameters the detail route owns. */ export function clearWorkflowRunFilters(search) {
180
+ return applyWorkflowRunFilterPatch(search, {
181
+ search: undefined,
182
+ status: undefined,
183
+ branch: undefined,
184
+ actor: undefined,
185
+ event: undefined,
186
+ after: undefined,
187
+ before: undefined
188
+ });
189
+ }
190
+ /** True when any list filter is active, which separates "no matches" from "no runs". */ export function hasWorkflowRunFilters(search) {
191
+ return Boolean(search.search || search.status?.length || search.branch?.length || search.actor?.length || search.event?.length || search.after || search.before);
192
+ }
54
193
  export function workflowRouteParams(input) {
55
- const wid = string(input.wid);
56
- const pid = string(input.pid);
57
- if (!wid || !pid) throw new Error('Workflow route is missing required path parameters.');
194
+ const workspaceSlug = string(input.workspaceSlug);
195
+ const projectSlug = string(input.projectSlug);
196
+ if (!workspaceSlug || !projectSlug) throw new Error('Workflow route is missing required path parameters.');
58
197
  const workflowRunId = string(input.workflowRunId);
59
198
  return workflowRunId ? {
60
- wid,
61
- pid,
199
+ workspaceSlug,
200
+ projectSlug,
62
201
  workflowRunId
63
202
  } : {
64
- wid,
65
- pid
203
+ workspaceSlug,
204
+ projectSlug
66
205
  };
67
206
  }
207
+ function setOrDelete(target, key, value) {
208
+ if (value === undefined) delete target[key];
209
+ else target[key] = value;
210
+ }
211
+ function nonEmptyList(value) {
212
+ return value && value.length > 0 ? [
213
+ ...value
214
+ ] : undefined;
215
+ }
216
+ function isWorkflowRunListStatus(value) {
217
+ return STATUS_VALUES.has(value);
218
+ }
219
+ /**
220
+ * Normalizes a repeatable parameter into a deduplicated list.
221
+ *
222
+ * A single occurrence parses as a scalar rather than a one-element array, and the parser
223
+ * coerces bare digits to numbers, so `?branch=2024` has to survive as the string `"2024"`.
224
+ */ function repeatable(value) {
225
+ const values = Array.isArray(value) ? value : [
226
+ value
227
+ ];
228
+ const normalized = values.flatMap((entry)=>{
229
+ if (typeof entry === 'string') return entry.length > 0 ? [
230
+ entry
231
+ ] : [];
232
+ if (typeof entry === 'number' && Number.isFinite(entry)) return [
233
+ String(entry)
234
+ ];
235
+ if (typeof entry === 'boolean') return [
236
+ String(entry)
237
+ ];
238
+ return [];
239
+ });
240
+ return [
241
+ ...new Set(normalized)
242
+ ];
243
+ }
244
+ function calendarDate(value) {
245
+ if (typeof value !== 'string' || !CALENDAR_DATE_PATTERN.test(value)) return undefined;
246
+ // Rejects a well-shaped but impossible date such as 2026-02-31, which Date rolls forward.
247
+ // Parsed as UTC: whether `2026-05-01` is a real date does not depend on the reader's zone,
248
+ // and a local-time parse would reject a day the reader's zone skipped outright.
249
+ const [year, month, day] = value.split('-').map(Number);
250
+ const parsed = new Date(`${value}T00:00:00.000Z`);
251
+ const isRealDate = !Number.isNaN(parsed.getTime()) && parsed.getUTCFullYear() === year && parsed.getUTCMonth() === month - 1 && parsed.getUTCDate() === day;
252
+ return isRealDate ? value : undefined;
253
+ }
68
254
  function string(value) {
69
255
  return typeof value === 'string' && value.length > 0 ? value : undefined;
70
256
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/routes/inputs.ts"],"sourcesContent":["import type {WorkflowRunListStatusFilter} from '#components/workflow-run-list/types.js';\nimport type {WorkflowRunSelectionInput} from '#core/workflow-run-url-state.js';\n\nexport interface WorkflowRunsSearch extends WorkflowRunSelectionInput {\n search?: string;\n status?: WorkflowRunListStatusFilter;\n}\n\nexport function validateWorkflowRunsSearch(input: Record<string, unknown>): WorkflowRunsSearch {\n const search = string(input.search);\n const status = input.status === 'failed' || input.status === 'running' ? input.status : 'all';\n const runAttempt = positiveInteger(input.runAttempt);\n return {\n ...(search ? {search} : {}),\n ...(status === 'all' ? {} : {status}),\n ...(string(input.job) ? {jobId: string(input.job)} : {}),\n ...(string(input.jobExecution) ? {jobExecutionId: string(input.jobExecution)} : {}),\n ...(string(input.step) ? {stepId: string(input.step)} : {}),\n ...(string(input.stepAttempt) ? {stepAttemptId: string(input.stepAttempt)} : {}),\n ...(runAttempt ? {runAttempt} : {}),\n };\n}\n\nexport function workflowRunSearchParams(\n search: WorkflowRunsSearch,\n selection: WorkflowRunSelectionInput = search,\n) {\n return {\n ...(search.search ? {search: search.search} : {}),\n ...(search.status && search.status !== 'all' ? {status: search.status} : {}),\n ...(selection.jobId ? {job: selection.jobId} : {}),\n ...(selection.jobExecutionId ? {jobExecution: selection.jobExecutionId} : {}),\n ...(selection.stepId ? {step: selection.stepId} : {}),\n ...(selection.stepAttemptId ? {stepAttempt: selection.stepAttemptId} : {}),\n ...(selection.runAttempt ? {runAttempt: String(selection.runAttempt)} : {}),\n };\n}\n\nexport function workflowRouteParams(input: Record<string, unknown>): {\n wid: string;\n pid: string;\n workflowRunId?: string;\n} {\n const wid = string(input.wid);\n const pid = string(input.pid);\n if (!wid || !pid) throw new Error('Workflow route is missing required path parameters.');\n const workflowRunId = string(input.workflowRunId);\n return workflowRunId ? {wid, pid, workflowRunId} : {wid, pid};\n}\n\nfunction string(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n}\n\nfunction positiveInteger(value: unknown): number | undefined {\n const number = typeof value === 'string' ? Number(value) : value;\n return typeof number === 'number' && Number.isInteger(number) && number > 0 ? number : undefined;\n}\n"],"names":["validateWorkflowRunsSearch","input","search","string","status","runAttempt","positiveInteger","job","jobId","jobExecution","jobExecutionId","step","stepId","stepAttempt","stepAttemptId","workflowRunSearchParams","selection","String","workflowRouteParams","wid","pid","Error","workflowRunId","value","length","undefined","number","Number","isInteger"],"mappings":"AAQA,OAAO,SAASA,2BAA2BC,KAA8B;IACvE,MAAMC,SAASC,OAAOF,MAAMC,MAAM;IAClC,MAAME,SAASH,MAAMG,MAAM,KAAK,YAAYH,MAAMG,MAAM,KAAK,YAAYH,MAAMG,MAAM,GAAG;IACxF,MAAMC,aAAaC,gBAAgBL,MAAMI,UAAU;IACnD,OAAO;QACL,GAAIH,SAAS;YAACA;QAAM,IAAI,CAAC,CAAC;QAC1B,GAAIE,WAAW,QAAQ,CAAC,IAAI;YAACA;QAAM,CAAC;QACpC,GAAID,OAAOF,MAAMM,GAAG,IAAI;YAACC,OAAOL,OAAOF,MAAMM,GAAG;QAAC,IAAI,CAAC,CAAC;QACvD,GAAIJ,OAAOF,MAAMQ,YAAY,IAAI;YAACC,gBAAgBP,OAAOF,MAAMQ,YAAY;QAAC,IAAI,CAAC,CAAC;QAClF,GAAIN,OAAOF,MAAMU,IAAI,IAAI;YAACC,QAAQT,OAAOF,MAAMU,IAAI;QAAC,IAAI,CAAC,CAAC;QAC1D,GAAIR,OAAOF,MAAMY,WAAW,IAAI;YAACC,eAAeX,OAAOF,MAAMY,WAAW;QAAC,IAAI,CAAC,CAAC;QAC/E,GAAIR,aAAa;YAACA;QAAU,IAAI,CAAC,CAAC;IACpC;AACF;AAEA,OAAO,SAASU,wBACdb,MAA0B,EAC1Bc,YAAuCd,MAAM;IAE7C,OAAO;QACL,GAAIA,OAAOA,MAAM,GAAG;YAACA,QAAQA,OAAOA,MAAM;QAAA,IAAI,CAAC,CAAC;QAChD,GAAIA,OAAOE,MAAM,IAAIF,OAAOE,MAAM,KAAK,QAAQ;YAACA,QAAQF,OAAOE,MAAM;QAAA,IAAI,CAAC,CAAC;QAC3E,GAAIY,UAAUR,KAAK,GAAG;YAACD,KAAKS,UAAUR,KAAK;QAAA,IAAI,CAAC,CAAC;QACjD,GAAIQ,UAAUN,cAAc,GAAG;YAACD,cAAcO,UAAUN,cAAc;QAAA,IAAI,CAAC,CAAC;QAC5E,GAAIM,UAAUJ,MAAM,GAAG;YAACD,MAAMK,UAAUJ,MAAM;QAAA,IAAI,CAAC,CAAC;QACpD,GAAII,UAAUF,aAAa,GAAG;YAACD,aAAaG,UAAUF,aAAa;QAAA,IAAI,CAAC,CAAC;QACzE,GAAIE,UAAUX,UAAU,GAAG;YAACA,YAAYY,OAAOD,UAAUX,UAAU;QAAC,IAAI,CAAC,CAAC;IAC5E;AACF;AAEA,OAAO,SAASa,oBAAoBjB,KAA8B;IAKhE,MAAMkB,MAAMhB,OAAOF,MAAMkB,GAAG;IAC5B,MAAMC,MAAMjB,OAAOF,MAAMmB,GAAG;IAC5B,IAAI,CAACD,OAAO,CAACC,KAAK,MAAM,IAAIC,MAAM;IAClC,MAAMC,gBAAgBnB,OAAOF,MAAMqB,aAAa;IAChD,OAAOA,gBAAgB;QAACH;QAAKC;QAAKE;IAAa,IAAI;QAACH;QAAKC;IAAG;AAC9D;AAEA,SAASjB,OAAOoB,KAAc;IAC5B,OAAO,OAAOA,UAAU,YAAYA,MAAMC,MAAM,GAAG,IAAID,QAAQE;AACjE;AAEA,SAASnB,gBAAgBiB,KAAc;IACrC,MAAMG,SAAS,OAAOH,UAAU,WAAWI,OAAOJ,SAASA;IAC3D,OAAO,OAAOG,WAAW,YAAYC,OAAOC,SAAS,CAACF,WAAWA,SAAS,IAAIA,SAASD;AACzF"}
1
+ {"version":3,"sources":["../../src/routes/inputs.ts"],"sourcesContent":["import type {WorkflowRunSelectionInput} from '#core/workflow-run-url-state.js';\n\n/**\n * Statuses the run list can filter by. Absent means all; there is deliberately no `all`\n * value, so \"no filter\" and \"every filter\" are the same URL rather than two.\n */\nexport const WORKFLOW_RUN_LIST_STATUSES = ['succeeded', 'failed', 'running', 'cancelled'] as const;\n\nexport type WorkflowRunListStatus = (typeof WORKFLOW_RUN_LIST_STATUSES)[number];\n\nexport const WORKFLOW_RUN_TABS = ['summary', 'jobs', 'annotations', 'source'] as const;\n\nexport type WorkflowRunTab = (typeof WORKFLOW_RUN_TABS)[number];\n\nexport const WORKFLOW_RUN_ANNOTATION_SEVERITIES = ['error', 'warning', 'info', 'success'] as const;\n\nexport type WorkflowRunAnnotationSeverity = (typeof WORKFLOW_RUN_ANNOTATION_SEVERITIES)[number];\n\nexport interface WorkflowRunsSearch extends WorkflowRunSelectionInput {\n search?: string;\n status?: WorkflowRunListStatus[];\n branch?: string[];\n actor?: string[];\n event?: string[];\n /** Inclusive lower bound on the run's local calendar date, `YYYY-MM-DD`. */\n after?: string;\n /** Inclusive upper bound on the run's local calendar date, `YYYY-MM-DD`. */\n before?: string;\n tab?: WorkflowRunTab;\n annotation?: string;\n severity?: WorkflowRunAnnotationSeverity;\n}\n\nconst STATUS_VALUES = new Set<string>(WORKFLOW_RUN_LIST_STATUSES);\nconst TAB_VALUES = new Set<string>(WORKFLOW_RUN_TABS);\nconst ANNOTATION_SEVERITY_VALUES = new Set<string>(WORKFLOW_RUN_ANNOTATION_SEVERITIES);\nconst CALENDAR_DATE_PATTERN = /^\\d{4}-\\d{2}-\\d{2}$/u;\n\n/**\n * Reads the run list and run detail query string.\n *\n * Every value is dropped rather than rejected when it does not fit: a truncated or\n * hand-edited URL should degrade to a sensible page, never to an error screen. Unknown\n * parameters are ignored for the same reason.\n */\nexport function validateWorkflowRunsSearch(input: Record<string, unknown>): WorkflowRunsSearch {\n const search = string(input.search);\n const status = repeatable(input.status).filter(isWorkflowRunListStatus);\n const branch = repeatable(input.branch);\n const actor = repeatable(input.actor);\n const event = repeatable(input.event);\n const after = calendarDate(input.after);\n const before = calendarDate(input.before);\n const runAttempt = positiveInteger(input.runAttempt);\n const tabValue = string(input.tab);\n const tab = tabValue && TAB_VALUES.has(tabValue) ? (tabValue as WorkflowRunTab) : undefined;\n const annotation = string(input.annotation);\n const severityValue = string(input.severity);\n const severity =\n severityValue && ANNOTATION_SEVERITY_VALUES.has(severityValue)\n ? (severityValue as WorkflowRunAnnotationSeverity)\n : undefined;\n\n return {\n ...(search ? {search} : {}),\n ...(status.length > 0 ? {status} : {}),\n ...(branch.length > 0 ? {branch} : {}),\n ...(actor.length > 0 ? {actor} : {}),\n ...(event.length > 0 ? {event} : {}),\n ...(after ? {after} : {}),\n ...(before ? {before} : {}),\n ...(tab ? {tab} : {}),\n ...(annotation ? {annotation} : {}),\n ...(severity ? {severity} : {}),\n ...(string(input.job) ? {jobId: string(input.job)} : {}),\n ...(string(input.jobExecution) ? {jobExecutionId: string(input.jobExecution)} : {}),\n ...(string(input.step) ? {stepId: string(input.step)} : {}),\n ...(string(input.stepAttempt) ? {stepAttemptId: string(input.stepAttempt)} : {}),\n ...(runAttempt ? {runAttempt} : {}),\n };\n}\n\n/**\n * Writes the query string back.\n *\n * Array values reach the router as arrays and the app's `stringifySearch` expands each into\n * repeated keys; joining them here would defeat that and break on branch names with commas.\n */\nexport function workflowRunSearchParams(\n search: WorkflowRunsSearch,\n selection: WorkflowRunSelectionInput = search,\n) {\n return {\n ...(search.search ? {search: search.search} : {}),\n ...(search.status?.length ? {status: search.status} : {}),\n ...(search.branch?.length ? {branch: search.branch} : {}),\n ...(search.actor?.length ? {actor: search.actor} : {}),\n ...(search.event?.length ? {event: search.event} : {}),\n ...(search.after ? {after: search.after} : {}),\n ...(search.before ? {before: search.before} : {}),\n ...(search.tab && search.tab !== 'summary' ? {tab: search.tab} : {}),\n ...(search.annotation ? {annotation: search.annotation} : {}),\n ...(search.severity ? {severity: search.severity} : {}),\n ...(selection.jobId ? {job: selection.jobId} : {}),\n ...(selection.jobExecutionId ? {jobExecution: selection.jobExecutionId} : {}),\n ...(selection.stepId ? {step: selection.stepId} : {}),\n ...(selection.stepAttemptId ? {stepAttempt: selection.stepAttemptId} : {}),\n ...(selection.runAttempt ? {runAttempt: String(selection.runAttempt)} : {}),\n };\n}\n\n/**\n * Resolves the detail surface for a URL. Explicit tabs win; legacy selection-only URLs belong\n * to Jobs so their selected detail remains visible instead of silently landing on Summary.\n */\nexport function workflowRunTab(\n search: Pick<WorkflowRunsSearch, 'tab' | 'jobId' | 'jobExecutionId' | 'stepId' | 'stepAttemptId'>,\n): WorkflowRunTab {\n if (search.tab) return search.tab;\n if (search.jobId || search.jobExecutionId || search.stepId || search.stepAttemptId) return 'jobs';\n return 'summary';\n}\n\n/** Serializes only list filters when leaving a run detail page for the run list. */\nexport function workflowRunListSearchParams(search: WorkflowRunsSearch) {\n const {tab: _tab, annotation: _annotation, severity: _severity, ...listSearch} = search;\n return workflowRunSearchParams(listSearch, {});\n}\n\n/**\n * A filter change. Each member is explicitly optional-or-undefined so that \"present and\n * undefined\" (clear this filter) stays distinguishable from \"absent\" (leave it alone) under\n * `exactOptionalPropertyTypes`.\n */\nexport interface WorkflowRunFilterPatch {\n search?: string | undefined;\n status?: WorkflowRunListStatus[] | undefined;\n branch?: string[] | undefined;\n actor?: string[] | undefined;\n event?: string[] | undefined;\n after?: string | undefined;\n before?: string | undefined;\n}\n\n/**\n * Applies a filter change.\n *\n * A key present with `undefined`, an empty string, or an empty array clears that filter; a\n * key left out is untouched. Cleared filters are deleted rather than stored empty, so \"no\n * filter\" is one URL instead of several that render the same list.\n */\nexport function applyWorkflowRunFilterPatch(\n search: WorkflowRunsSearch,\n patch: WorkflowRunFilterPatch,\n): WorkflowRunsSearch {\n const next: WorkflowRunsSearch = {...search};\n if ('search' in patch) setOrDelete(next, 'search', patch.search || undefined);\n if ('status' in patch) setOrDelete(next, 'status', nonEmptyList(patch.status));\n if ('branch' in patch) setOrDelete(next, 'branch', nonEmptyList(patch.branch));\n if ('actor' in patch) setOrDelete(next, 'actor', nonEmptyList(patch.actor));\n if ('event' in patch) setOrDelete(next, 'event', nonEmptyList(patch.event));\n if ('after' in patch) setOrDelete(next, 'after', patch.after || undefined);\n if ('before' in patch) setOrDelete(next, 'before', patch.before || undefined);\n return next;\n}\n\n/** Drops every filter while keeping the run-selection parameters the detail route owns. */\nexport function clearWorkflowRunFilters(search: WorkflowRunsSearch): WorkflowRunsSearch {\n return applyWorkflowRunFilterPatch(search, {\n search: undefined,\n status: undefined,\n branch: undefined,\n actor: undefined,\n event: undefined,\n after: undefined,\n before: undefined,\n });\n}\n\n/** True when any list filter is active, which separates \"no matches\" from \"no runs\". */\nexport function hasWorkflowRunFilters(search: WorkflowRunsSearch): boolean {\n return Boolean(\n search.search ||\n search.status?.length ||\n search.branch?.length ||\n search.actor?.length ||\n search.event?.length ||\n search.after ||\n search.before,\n );\n}\n\nexport function workflowRouteParams(input: Record<string, unknown>): {\n workspaceSlug: string;\n projectSlug: string;\n workflowRunId?: string;\n} {\n const workspaceSlug = string(input.workspaceSlug);\n const projectSlug = string(input.projectSlug);\n if (!workspaceSlug || !projectSlug)\n throw new Error('Workflow route is missing required path parameters.');\n const workflowRunId = string(input.workflowRunId);\n return workflowRunId ? {workspaceSlug, projectSlug, workflowRunId} : {workspaceSlug, projectSlug};\n}\n\nfunction setOrDelete<TKey extends keyof WorkflowRunsSearch>(\n target: WorkflowRunsSearch,\n key: TKey,\n value: WorkflowRunsSearch[TKey] | undefined,\n): void {\n if (value === undefined) delete target[key];\n else target[key] = value;\n}\n\nfunction nonEmptyList<TValue>(value: readonly TValue[] | undefined): TValue[] | undefined {\n return value && value.length > 0 ? [...value] : undefined;\n}\n\nfunction isWorkflowRunListStatus(value: string): value is WorkflowRunListStatus {\n return STATUS_VALUES.has(value);\n}\n\n/**\n * Normalizes a repeatable parameter into a deduplicated list.\n *\n * A single occurrence parses as a scalar rather than a one-element array, and the parser\n * coerces bare digits to numbers, so `?branch=2024` has to survive as the string `\"2024\"`.\n */\nfunction repeatable(value: unknown): string[] {\n const values = Array.isArray(value) ? value : [value];\n const normalized = values.flatMap((entry) => {\n if (typeof entry === 'string') return entry.length > 0 ? [entry] : [];\n if (typeof entry === 'number' && Number.isFinite(entry)) return [String(entry)];\n if (typeof entry === 'boolean') return [String(entry)];\n return [];\n });\n return [...new Set(normalized)];\n}\n\nfunction calendarDate(value: unknown): string | undefined {\n if (typeof value !== 'string' || !CALENDAR_DATE_PATTERN.test(value)) return undefined;\n // Rejects a well-shaped but impossible date such as 2026-02-31, which Date rolls forward.\n // Parsed as UTC: whether `2026-05-01` is a real date does not depend on the reader's zone,\n // and a local-time parse would reject a day the reader's zone skipped outright.\n const [year, month, day] = value.split('-').map(Number) as [number, number, number];\n const parsed = new Date(`${value}T00:00:00.000Z`);\n const isRealDate =\n !Number.isNaN(parsed.getTime()) &&\n parsed.getUTCFullYear() === year &&\n parsed.getUTCMonth() === month - 1 &&\n parsed.getUTCDate() === day;\n return isRealDate ? value : undefined;\n}\n\nfunction string(value: unknown): string | undefined {\n return typeof value === 'string' && value.length > 0 ? value : undefined;\n}\n\nfunction positiveInteger(value: unknown): number | undefined {\n const number = typeof value === 'string' ? Number(value) : value;\n return typeof number === 'number' && Number.isInteger(number) && number > 0 ? number : undefined;\n}\n"],"names":["WORKFLOW_RUN_LIST_STATUSES","WORKFLOW_RUN_TABS","WORKFLOW_RUN_ANNOTATION_SEVERITIES","STATUS_VALUES","Set","TAB_VALUES","ANNOTATION_SEVERITY_VALUES","CALENDAR_DATE_PATTERN","validateWorkflowRunsSearch","input","search","string","status","repeatable","filter","isWorkflowRunListStatus","branch","actor","event","after","calendarDate","before","runAttempt","positiveInteger","tabValue","tab","has","undefined","annotation","severityValue","severity","length","job","jobId","jobExecution","jobExecutionId","step","stepId","stepAttempt","stepAttemptId","workflowRunSearchParams","selection","String","workflowRunTab","workflowRunListSearchParams","_tab","_annotation","_severity","listSearch","applyWorkflowRunFilterPatch","patch","next","setOrDelete","nonEmptyList","clearWorkflowRunFilters","hasWorkflowRunFilters","Boolean","workflowRouteParams","workspaceSlug","projectSlug","Error","workflowRunId","target","key","value","values","Array","isArray","normalized","flatMap","entry","Number","isFinite","test","year","month","day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KAAY;AACjC;AAEA,SAAShD,aAAa4C,KAAc;IAClC,IAAI,OAAOA,UAAU,YAAY,CAACzD,sBAAsBkE,IAAI,CAACT,QAAQ,OAAOrC;IAC5E,0FAA0F;IAC1F,2FAA2F;IAC3F,gFAAgF;IAChF,MAAM,CAAC+C,MAAMC,OAAOC,IAAI,GAAGZ,MAAMa,KAAK,CAAC,KAAKC,GAAG,CAACP;IAChD,MAAMQ,SAAS,IAAIC,KAAK,GAAGhB,MAAM,cAAc,CAAC;IAChD,MAAMiB,aACJ,CAACV,OAAOW,KAAK,CAACH,OAAOI,OAAO,OAC5BJ,OAAOK,cAAc,OAAOV,QAC5BK,OAAOM,WAAW,OAAOV,QAAQ,KACjCI,OAAOO,UAAU,OAAOV;IAC1B,OAAOK,aAAajB,QAAQrC;AAC9B;AAEA,SAAShB,OAAOqD,KAAc;IAC5B,OAAO,OAAOA,UAAU,YAAYA,MAAMjC,MAAM,GAAG,IAAIiC,QAAQrC;AACjE;AAEA,SAASJ,gBAAgByC,KAAc;IACrC,MAAMuB,SAAS,OAAOvB,UAAU,WAAWO,OAAOP,SAASA;IAC3D,OAAO,OAAOuB,WAAW,YAAYhB,OAAOiB,SAAS,CAACD,WAAWA,SAAS,IAAIA,SAAS5D;AACzF"}
@@ -0,0 +1,6 @@
1
+ import { type Project } from '@shipfox/client-projects';
2
+ import type { ReactNode } from 'react';
3
+ export declare function ProjectRoute({ children }: {
4
+ children: (project: Project) => ReactNode;
5
+ }): string | number | bigint | boolean | import("react").JSX.Element | Iterable<ReactNode> | Promise<string | number | bigint | boolean | import("react").ReactPortal | import("react").ReactElement<unknown, string | import("react").JSXElementConstructor<any>> | Iterable<ReactNode> | null | undefined> | null | undefined;
6
+ //# sourceMappingURL=project-route.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"project-route.d.ts","sourceRoot":"","sources":["../../src/routes/project-route.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAC,KAAK,OAAO,EAA6B,MAAM,0BAA0B,CAAC;AAIlF,OAAO,KAAK,EAAC,SAAS,EAAC,MAAM,OAAO,CAAC;AAErC,wBAAgB,YAAY,CAAC,EAAC,QAAQ,EAAC,EAAE;IAAC,QAAQ,EAAE,CAAC,OAAO,EAAE,OAAO,KAAK,SAAS,CAAA;CAAC,+TAkBnF"}
@@ -0,0 +1,25 @@
1
+ import { jsx as _jsx } from "react/jsx-runtime";
2
+ import { useMaybeActiveProjectQuery } from '@shipfox/client-projects';
3
+ import { QueryLoadError } from '@shipfox/client-ui';
4
+ import { EmptyState } from '@shipfox/react-ui/empty-state';
5
+ import { FullPageLoader } from '@shipfox/react-ui/loader';
6
+ export function ProjectRoute({ children }) {
7
+ const projectQuery = useMaybeActiveProjectQuery();
8
+ if (projectQuery.isPending) return /*#__PURE__*/ _jsx(FullPageLoader, {});
9
+ if (projectQuery.isError && projectQuery.data === undefined) {
10
+ return /*#__PURE__*/ _jsx(QueryLoadError, {
11
+ query: projectQuery,
12
+ subject: "project"
13
+ });
14
+ }
15
+ if (!projectQuery.data) {
16
+ return /*#__PURE__*/ _jsx(EmptyState, {
17
+ icon: "errorWarningLine",
18
+ title: "Project not found",
19
+ description: "This project doesn't exist, or you don't have access to it."
20
+ });
21
+ }
22
+ return children(projectQuery.data);
23
+ }
24
+
25
+ //# sourceMappingURL=project-route.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"sources":["../../src/routes/project-route.tsx"],"sourcesContent":["import {type Project, useMaybeActiveProjectQuery} from '@shipfox/client-projects';\nimport {QueryLoadError} from '@shipfox/client-ui';\nimport {EmptyState} from '@shipfox/react-ui/empty-state';\nimport {FullPageLoader} from '@shipfox/react-ui/loader';\nimport type {ReactNode} from 'react';\n\nexport function ProjectRoute({children}: {children: (project: Project) => ReactNode}) {\n const projectQuery = useMaybeActiveProjectQuery();\n\n if (projectQuery.isPending) return <FullPageLoader />;\n if (projectQuery.isError && projectQuery.data === undefined) {\n return <QueryLoadError query={projectQuery} subject=\"project\" />;\n }\n if (!projectQuery.data) {\n return (\n <EmptyState\n icon=\"errorWarningLine\"\n title=\"Project not found\"\n description=\"This project doesn't exist, or you don't have access to it.\"\n />\n );\n }\n\n return children(projectQuery.data);\n}\n"],"names":["useMaybeActiveProjectQuery","QueryLoadError","EmptyState","FullPageLoader","ProjectRoute","children","projectQuery","isPending","isError","data","undefined","query","subject","icon","title","description"],"mappings":";AAAA,SAAsBA,0BAA0B,QAAO,2BAA2B;AAClF,SAAQC,cAAc,QAAO,qBAAqB;AAClD,SAAQC,UAAU,QAAO,gCAAgC;AACzD,SAAQC,cAAc,QAAO,2BAA2B;AAGxD,OAAO,SAASC,aAAa,EAACC,QAAQ,EAA8C;IAClF,MAAMC,eAAeN;IAErB,IAAIM,aAAaC,SAAS,EAAE,qBAAO,KAACJ;IACpC,IAAIG,aAAaE,OAAO,IAAIF,aAAaG,IAAI,KAAKC,WAAW;QAC3D,qBAAO,KAACT;YAAeU,OAAOL;YAAcM,SAAQ;;IACtD;IACA,IAAI,CAACN,aAAaG,IAAI,EAAE;QACtB,qBACE,KAACP;YACCW,MAAK;YACLC,OAAM;YACNC,aAAY;;IAGlB;IAEA,OAAOV,SAASC,aAAaG,IAAI;AACnC"}
@@ -1 +1 @@
1
- {"version":3,"file":"run-detail.d.ts","sourceRoot":"","sources":["../../src/routes/run-detail.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,0BAA0B,EAAsB,MAAM,aAAa,CAAC;;;;;;;;AAE5E,wBAcG"}
1
+ {"version":3,"file":"run-detail.d.ts","sourceRoot":"","sources":["../../src/routes/run-detail.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,0BAA0B,EAAsB,MAAM,aAAa,CAAC;;;;;;;;AAG5E,wBAoBG"}
@@ -1,19 +1,24 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { defineRoute, useRouteParams, useRouteSearch } from '@shipfox/client-shell/runtime';
3
- import { WorkflowRunPage } from '#pages/workflow-run-page.js';
3
+ import { WorkflowRunDetailPage } from '#pages/workflow-run-detail-page.js';
4
4
  import { validateWorkflowRunsSearch, workflowRouteParams } from './inputs.js';
5
+ import { ProjectRoute } from './project-route.js';
5
6
  export default defineRoute({
6
7
  staticData: {
7
8
  layout: 'full-bleed'
8
9
  },
9
10
  validateSearch: validateWorkflowRunsSearch,
10
11
  component: ()=>{
11
- const { wid, pid, workflowRunId } = useRouteParams(workflowRouteParams);
12
- return /*#__PURE__*/ _jsx(WorkflowRunPage, {
13
- workspaceId: wid,
14
- projectId: pid,
15
- workflowRunId: workflowRunId,
16
- search: useRouteSearch(validateWorkflowRunsSearch)
12
+ const { workspaceSlug, projectSlug, workflowRunId } = useRouteParams(workflowRouteParams);
13
+ const search = useRouteSearch(validateWorkflowRunsSearch);
14
+ return /*#__PURE__*/ _jsx(ProjectRoute, {
15
+ children: (project)=>/*#__PURE__*/ _jsx(WorkflowRunDetailPage, {
16
+ projectId: project.id,
17
+ workspaceSlug: workspaceSlug,
18
+ projectSlug: projectSlug,
19
+ workflowRunId: workflowRunId,
20
+ search: search
21
+ })
17
22
  });
18
23
  }
19
24
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/routes/run-detail.tsx"],"sourcesContent":["import {defineRoute, useRouteParams, useRouteSearch} from '@shipfox/client-shell/runtime';\nimport {WorkflowRunPage} from '#pages/workflow-run-page.js';\nimport {validateWorkflowRunsSearch, workflowRouteParams} from './inputs.js';\n\nexport default defineRoute({\n staticData: {layout: 'full-bleed'},\n validateSearch: validateWorkflowRunsSearch,\n component: () => {\n const {wid, pid, workflowRunId} = useRouteParams(workflowRouteParams);\n return (\n <WorkflowRunPage\n workspaceId={wid}\n projectId={pid}\n workflowRunId={workflowRunId}\n search={useRouteSearch(validateWorkflowRunsSearch)}\n />\n );\n },\n});\n"],"names":["defineRoute","useRouteParams","useRouteSearch","WorkflowRunPage","validateWorkflowRunsSearch","workflowRouteParams","staticData","layout","validateSearch","component","wid","pid","workflowRunId","workspaceId","projectId","search"],"mappings":";AAAA,SAAQA,WAAW,EAAEC,cAAc,EAAEC,cAAc,QAAO,gCAAgC;AAC1F,SAAQC,eAAe,QAAO,8BAA8B;AAC5D,SAAQC,0BAA0B,EAAEC,mBAAmB,QAAO,cAAc;AAE5E,eAAeL,YAAY;IACzBM,YAAY;QAACC,QAAQ;IAAY;IACjCC,gBAAgBJ;IAChBK,WAAW;QACT,MAAM,EAACC,GAAG,EAAEC,GAAG,EAAEC,aAAa,EAAC,GAAGX,eAAeI;QACjD,qBACE,KAACF;YACCU,aAAaH;YACbI,WAAWH;YACXC,eAAeA;YACfG,QAAQb,eAAeE;;IAG7B;AACF,GAAG"}
1
+ {"version":3,"sources":["../../src/routes/run-detail.tsx"],"sourcesContent":["import {defineRoute, useRouteParams, useRouteSearch} from '@shipfox/client-shell/runtime';\nimport {WorkflowRunDetailPage} from '#pages/workflow-run-detail-page.js';\nimport {validateWorkflowRunsSearch, workflowRouteParams} from './inputs.js';\nimport {ProjectRoute} from './project-route.js';\n\nexport default defineRoute({\n staticData: {layout: 'full-bleed'},\n validateSearch: validateWorkflowRunsSearch,\n component: () => {\n const {workspaceSlug, projectSlug, workflowRunId} = useRouteParams(workflowRouteParams);\n const search = useRouteSearch(validateWorkflowRunsSearch);\n return (\n <ProjectRoute>\n {(project) => (\n <WorkflowRunDetailPage\n projectId={project.id}\n workspaceSlug={workspaceSlug}\n projectSlug={projectSlug}\n workflowRunId={workflowRunId}\n search={search}\n />\n )}\n </ProjectRoute>\n );\n },\n});\n"],"names":["defineRoute","useRouteParams","useRouteSearch","WorkflowRunDetailPage","validateWorkflowRunsSearch","workflowRouteParams","ProjectRoute","staticData","layout","validateSearch","component","workspaceSlug","projectSlug","workflowRunId","search","project","projectId","id"],"mappings":";AAAA,SAAQA,WAAW,EAAEC,cAAc,EAAEC,cAAc,QAAO,gCAAgC;AAC1F,SAAQC,qBAAqB,QAAO,qCAAqC;AACzE,SAAQC,0BAA0B,EAAEC,mBAAmB,QAAO,cAAc;AAC5E,SAAQC,YAAY,QAAO,qBAAqB;AAEhD,eAAeN,YAAY;IACzBO,YAAY;QAACC,QAAQ;IAAY;IACjCC,gBAAgBL;IAChBM,WAAW;QACT,MAAM,EAACC,aAAa,EAAEC,WAAW,EAAEC,aAAa,EAAC,GAAGZ,eAAeI;QACnE,MAAMS,SAASZ,eAAeE;QAC9B,qBACE,KAACE;sBACE,CAACS,wBACA,KAACZ;oBACCa,WAAWD,QAAQE,EAAE;oBACrBN,eAAeA;oBACfC,aAAaA;oBACbC,eAAeA;oBACfC,QAAQA;;;IAKlB;AACF,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/routes/runs.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,0BAA0B,EAAsB,MAAM,aAAa,CAAC;;;;;;;;AAE5E,wBAaG"}
1
+ {"version":3,"file":"runs.d.ts","sourceRoot":"","sources":["../../src/routes/runs.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAC,0BAA0B,EAAsB,MAAM,aAAa,CAAC;;;;;;;;AAG5E,wBAmBG"}
@@ -1,18 +1,23 @@
1
1
  import { jsx as _jsx } from "react/jsx-runtime";
2
2
  import { defineRoute, useRouteParams, useRouteSearch } from '@shipfox/client-shell/runtime';
3
- import { WorkflowRunPage } from '#pages/workflow-run-page.js';
3
+ import { WorkflowRunsPage } from '#pages/workflow-run-list-page.js';
4
4
  import { validateWorkflowRunsSearch, workflowRouteParams } from './inputs.js';
5
+ import { ProjectRoute } from './project-route.js';
5
6
  export default defineRoute({
6
7
  staticData: {
7
8
  layout: 'full-bleed'
8
9
  },
9
10
  validateSearch: validateWorkflowRunsSearch,
10
11
  component: ()=>{
11
- const { wid, pid } = useRouteParams(workflowRouteParams);
12
- return /*#__PURE__*/ _jsx(WorkflowRunPage, {
13
- workspaceId: wid,
14
- projectId: pid,
15
- search: useRouteSearch(validateWorkflowRunsSearch)
12
+ const { workspaceSlug, projectSlug } = useRouteParams(workflowRouteParams);
13
+ const search = useRouteSearch(validateWorkflowRunsSearch);
14
+ return /*#__PURE__*/ _jsx(ProjectRoute, {
15
+ children: (project)=>/*#__PURE__*/ _jsx(WorkflowRunsPage, {
16
+ projectId: project.id,
17
+ workspaceSlug: workspaceSlug,
18
+ projectSlug: projectSlug,
19
+ search: search
20
+ })
16
21
  });
17
22
  }
18
23
  });
@@ -1 +1 @@
1
- {"version":3,"sources":["../../src/routes/runs.tsx"],"sourcesContent":["import {defineRoute, useRouteParams, useRouteSearch} from '@shipfox/client-shell/runtime';\nimport {WorkflowRunPage} from '#pages/workflow-run-page.js';\nimport {validateWorkflowRunsSearch, workflowRouteParams} from './inputs.js';\n\nexport default defineRoute({\n staticData: {layout: 'full-bleed'},\n validateSearch: validateWorkflowRunsSearch,\n component: () => {\n const {wid, pid} = useRouteParams(workflowRouteParams);\n return (\n <WorkflowRunPage\n workspaceId={wid}\n projectId={pid}\n search={useRouteSearch(validateWorkflowRunsSearch)}\n />\n );\n },\n});\n"],"names":["defineRoute","useRouteParams","useRouteSearch","WorkflowRunPage","validateWorkflowRunsSearch","workflowRouteParams","staticData","layout","validateSearch","component","wid","pid","workspaceId","projectId","search"],"mappings":";AAAA,SAAQA,WAAW,EAAEC,cAAc,EAAEC,cAAc,QAAO,gCAAgC;AAC1F,SAAQC,eAAe,QAAO,8BAA8B;AAC5D,SAAQC,0BAA0B,EAAEC,mBAAmB,QAAO,cAAc;AAE5E,eAAeL,YAAY;IACzBM,YAAY;QAACC,QAAQ;IAAY;IACjCC,gBAAgBJ;IAChBK,WAAW;QACT,MAAM,EAACC,GAAG,EAAEC,GAAG,EAAC,GAAGV,eAAeI;QAClC,qBACE,KAACF;YACCS,aAAaF;YACbG,WAAWF;YACXG,QAAQZ,eAAeE;;IAG7B;AACF,GAAG"}
1
+ {"version":3,"sources":["../../src/routes/runs.tsx"],"sourcesContent":["import {defineRoute, useRouteParams, useRouteSearch} from '@shipfox/client-shell/runtime';\nimport {WorkflowRunsPage} from '#pages/workflow-run-list-page.js';\nimport {validateWorkflowRunsSearch, workflowRouteParams} from './inputs.js';\nimport {ProjectRoute} from './project-route.js';\n\nexport default defineRoute({\n staticData: {layout: 'full-bleed'},\n validateSearch: validateWorkflowRunsSearch,\n component: () => {\n const {workspaceSlug, projectSlug} = useRouteParams(workflowRouteParams);\n const search = useRouteSearch(validateWorkflowRunsSearch);\n return (\n <ProjectRoute>\n {(project) => (\n <WorkflowRunsPage\n projectId={project.id}\n workspaceSlug={workspaceSlug}\n projectSlug={projectSlug}\n search={search}\n />\n )}\n </ProjectRoute>\n );\n },\n});\n"],"names":["defineRoute","useRouteParams","useRouteSearch","WorkflowRunsPage","validateWorkflowRunsSearch","workflowRouteParams","ProjectRoute","staticData","layout","validateSearch","component","workspaceSlug","projectSlug","search","project","projectId","id"],"mappings":";AAAA,SAAQA,WAAW,EAAEC,cAAc,EAAEC,cAAc,QAAO,gCAAgC;AAC1F,SAAQC,gBAAgB,QAAO,mCAAmC;AAClE,SAAQC,0BAA0B,EAAEC,mBAAmB,QAAO,cAAc;AAC5E,SAAQC,YAAY,QAAO,qBAAqB;AAEhD,eAAeN,YAAY;IACzBO,YAAY;QAACC,QAAQ;IAAY;IACjCC,gBAAgBL;IAChBM,WAAW;QACT,MAAM,EAACC,aAAa,EAAEC,WAAW,EAAC,GAAGX,eAAeI;QACpD,MAAMQ,SAASX,eAAeE;QAC9B,qBACE,KAACE;sBACE,CAACQ,wBACA,KAACX;oBACCY,WAAWD,QAAQE,EAAE;oBACrBL,eAAeA;oBACfC,aAAaA;oBACbC,QAAQA;;;IAKlB;AACF,GAAG"}
@@ -1 +1 @@
1
- {"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/routes/workflows.tsx"],"names":[],"mappings":";;;AAIA,wBAKG"}
1
+ {"version":3,"file":"workflows.d.ts","sourceRoot":"","sources":["../../src/routes/workflows.tsx"],"names":[],"mappings":";;;AAIA,wBAMG"}