@shipfox/client-workflows 12.0.2 → 13.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 (232) hide show
  1. package/.storybook/preview.tsx +3 -3
  2. package/.turbo/turbo-build.log +1 -1
  3. package/CHANGELOG.md +56 -0
  4. package/dist/components/job-graph/job-duration-format.d.ts +2 -2
  5. package/dist/components/job-graph/job-duration-format.d.ts.map +1 -1
  6. package/dist/components/job-graph/job-duration-format.js +4 -2
  7. package/dist/components/job-graph/job-duration-format.js.map +1 -1
  8. package/dist/components/job-graph/job-node.d.ts +1 -1
  9. package/dist/components/job-graph/job-node.d.ts.map +1 -1
  10. package/dist/components/job-graph/job-node.js +5 -4
  11. package/dist/components/job-graph/job-node.js.map +1 -1
  12. package/dist/components/step-list/step-list.d.ts +2 -2
  13. package/dist/components/step-list/step-list.d.ts.map +1 -1
  14. package/dist/components/step-list/step-list.js.map +1 -1
  15. package/dist/components/workflow-run-list/job-status-strip.d.ts +21 -0
  16. package/dist/components/workflow-run-list/job-status-strip.d.ts.map +1 -0
  17. package/dist/components/workflow-run-list/job-status-strip.js +185 -0
  18. package/dist/components/workflow-run-list/job-status-strip.js.map +1 -0
  19. package/dist/components/workflow-run-list/run-display.d.ts +27 -3
  20. package/dist/components/workflow-run-list/run-display.d.ts.map +1 -1
  21. package/dist/components/workflow-run-list/run-display.js +78 -7
  22. package/dist/components/workflow-run-list/run-display.js.map +1 -1
  23. package/dist/components/workflow-run-list/types.d.ts +23 -24
  24. package/dist/components/workflow-run-list/types.d.ts.map +1 -1
  25. package/dist/components/workflow-run-list/types.js.map +1 -1
  26. package/dist/components/workflow-run-list/workflow-run-filter-menu.d.ts +22 -0
  27. package/dist/components/workflow-run-list/workflow-run-filter-menu.d.ts.map +1 -0
  28. package/dist/components/workflow-run-list/workflow-run-filter-menu.js +68 -0
  29. package/dist/components/workflow-run-list/workflow-run-filter-menu.js.map +1 -0
  30. package/dist/components/workflow-run-list/workflow-run-filters.d.ts +18 -0
  31. package/dist/components/workflow-run-list/workflow-run-filters.d.ts.map +1 -0
  32. package/dist/components/workflow-run-list/workflow-run-filters.js +236 -0
  33. package/dist/components/workflow-run-list/workflow-run-filters.js.map +1 -0
  34. package/dist/components/workflow-run-list/workflow-run-list-content.d.ts +8 -4
  35. package/dist/components/workflow-run-list/workflow-run-list-content.d.ts.map +1 -1
  36. package/dist/components/workflow-run-list/workflow-run-list-content.js +40 -12
  37. package/dist/components/workflow-run-list/workflow-run-list-content.js.map +1 -1
  38. package/dist/components/workflow-run-list/workflow-run-list-states.d.ts +29 -2
  39. package/dist/components/workflow-run-list/workflow-run-list-states.d.ts.map +1 -1
  40. package/dist/components/workflow-run-list/workflow-run-list-states.js +103 -44
  41. package/dist/components/workflow-run-list/workflow-run-list-states.js.map +1 -1
  42. package/dist/components/workflow-run-list/workflow-run-list-view.d.ts +1 -1
  43. package/dist/components/workflow-run-list/workflow-run-list-view.d.ts.map +1 -1
  44. package/dist/components/workflow-run-list/workflow-run-list-view.js +60 -43
  45. package/dist/components/workflow-run-list/workflow-run-list-view.js.map +1 -1
  46. package/dist/components/workflow-run-list/workflow-run-list.d.ts +1 -1
  47. package/dist/components/workflow-run-list/workflow-run-list.d.ts.map +1 -1
  48. package/dist/components/workflow-run-list/workflow-run-list.js +20 -8
  49. package/dist/components/workflow-run-list/workflow-run-list.js.map +1 -1
  50. package/dist/components/workflow-run-list/workflow-run-row.d.ts +19 -9
  51. package/dist/components/workflow-run-list/workflow-run-row.d.ts.map +1 -1
  52. package/dist/components/workflow-run-list/workflow-run-row.js +179 -112
  53. package/dist/components/workflow-run-list/workflow-run-row.js.map +1 -1
  54. package/dist/components/workflow-run-number-label.d.ts +15 -0
  55. package/dist/components/workflow-run-number-label.d.ts.map +1 -0
  56. package/dist/components/workflow-run-number-label.js +41 -0
  57. package/dist/components/workflow-run-number-label.js.map +1 -0
  58. package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.d.ts +3 -3
  59. package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.d.ts.map +1 -1
  60. package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.js +8 -7
  61. package/dist/components/workflow-run-summary/workflow-run-attempt-switcher.js.map +1 -1
  62. package/dist/components/workflow-run-summary/workflow-run-summary.d.ts +3 -3
  63. package/dist/components/workflow-run-summary/workflow-run-summary.d.ts.map +1 -1
  64. package/dist/components/workflow-run-summary/workflow-run-summary.js +16 -7
  65. package/dist/components/workflow-run-summary/workflow-run-summary.js.map +1 -1
  66. package/dist/components/workflow-run-view/agent-config-failure-callout.d.ts +2 -2
  67. package/dist/components/workflow-run-view/agent-config-failure-callout.d.ts.map +1 -1
  68. package/dist/components/workflow-run-view/agent-config-failure-callout.js +4 -4
  69. package/dist/components/workflow-run-view/agent-config-failure-callout.js.map +1 -1
  70. package/dist/components/workflow-run-view/job-card.d.ts +2 -2
  71. package/dist/components/workflow-run-view/job-card.d.ts.map +1 -1
  72. package/dist/components/workflow-run-view/job-card.js +51 -32
  73. package/dist/components/workflow-run-view/job-card.js.map +1 -1
  74. package/dist/components/workflow-run-view/job-execution-switcher.d.ts +1 -1
  75. package/dist/components/workflow-run-view/job-execution-switcher.d.ts.map +1 -1
  76. package/dist/components/workflow-run-view/job-execution-switcher.js +20 -8
  77. package/dist/components/workflow-run-view/job-execution-switcher.js.map +1 -1
  78. package/dist/components/workflow-run-view/workflow-run-view.d.ts +3 -2
  79. package/dist/components/workflow-run-view/workflow-run-view.d.ts.map +1 -1
  80. package/dist/components/workflow-run-view/workflow-run-view.js +15 -11
  81. package/dist/components/workflow-run-view/workflow-run-view.js.map +1 -1
  82. package/dist/components/workflow-status/status-visuals.d.ts +4 -4
  83. package/dist/components/workflow-status/status-visuals.d.ts.map +1 -1
  84. package/dist/components/workflow-status/status-visuals.js +7 -0
  85. package/dist/components/workflow-status/status-visuals.js.map +1 -1
  86. package/dist/components/workflow-status/workflow-status-icon.d.ts +3 -4
  87. package/dist/components/workflow-status/workflow-status-icon.d.ts.map +1 -1
  88. package/dist/components/workflow-status/workflow-status-icon.js +6 -4
  89. package/dist/components/workflow-status/workflow-status-icon.js.map +1 -1
  90. package/dist/core/entities/job-execution.d.ts +10 -0
  91. package/dist/core/entities/job-execution.d.ts.map +1 -1
  92. package/dist/core/entities/job-execution.js +11 -0
  93. package/dist/core/entities/job-execution.js.map +1 -1
  94. package/dist/core/entities/job.d.ts +4 -2
  95. package/dist/core/entities/job.d.ts.map +1 -1
  96. package/dist/core/entities/job.js +8 -1
  97. package/dist/core/entities/job.js.map +1 -1
  98. package/dist/core/entities/workflow-run.d.ts +52 -4
  99. package/dist/core/entities/workflow-run.d.ts.map +1 -1
  100. package/dist/core/entities/workflow-run.js +22 -3
  101. package/dist/core/entities/workflow-run.js.map +1 -1
  102. package/dist/core/workflow-run.d.ts +6 -6
  103. package/dist/core/workflow-run.d.ts.map +1 -1
  104. package/dist/core/workflow-run.js +3 -3
  105. package/dist/core/workflow-run.js.map +1 -1
  106. package/dist/feature.d.ts +7 -7
  107. package/dist/feature.js +5 -5
  108. package/dist/feature.js.map +1 -1
  109. package/dist/hooks/api/workflow-run-mapper.d.ts +4 -3
  110. package/dist/hooks/api/workflow-run-mapper.d.ts.map +1 -1
  111. package/dist/hooks/api/workflow-run-mapper.js +31 -3
  112. package/dist/hooks/api/workflow-run-mapper.js.map +1 -1
  113. package/dist/hooks/api/workflow-runs.d.ts +4 -4
  114. package/dist/hooks/api/workflow-runs.d.ts.map +1 -1
  115. package/dist/hooks/api/workflow-runs.js +12 -4
  116. package/dist/hooks/api/workflow-runs.js.map +1 -1
  117. package/dist/index.d.ts +4 -3
  118. package/dist/index.d.ts.map +1 -1
  119. package/dist/index.js +3 -2
  120. package/dist/index.js.map +1 -1
  121. package/dist/pages/project-workflows-page.js +46 -1
  122. package/dist/pages/project-workflows-page.js.map +1 -1
  123. package/dist/pages/workflow-run-detail-page.d.ts +11 -0
  124. package/dist/pages/workflow-run-detail-page.d.ts.map +1 -0
  125. package/dist/pages/workflow-run-detail-page.js +30 -0
  126. package/dist/pages/workflow-run-detail-page.js.map +1 -0
  127. package/dist/pages/workflow-run-list-page.d.ts +10 -0
  128. package/dist/pages/workflow-run-list-page.d.ts.map +1 -0
  129. package/dist/pages/workflow-run-list-page.js +43 -0
  130. package/dist/pages/workflow-run-list-page.js.map +1 -0
  131. package/dist/routes/inputs.d.ts +61 -5
  132. package/dist/routes/inputs.d.ts.map +1 -1
  133. package/dist/routes/inputs.js +150 -13
  134. package/dist/routes/inputs.js.map +1 -1
  135. package/dist/routes/project-route.d.ts +6 -0
  136. package/dist/routes/project-route.d.ts.map +1 -0
  137. package/dist/routes/project-route.js +25 -0
  138. package/dist/routes/project-route.js.map +1 -0
  139. package/dist/routes/run-detail.d.ts.map +1 -1
  140. package/dist/routes/run-detail.js +12 -7
  141. package/dist/routes/run-detail.js.map +1 -1
  142. package/dist/routes/runs.d.ts.map +1 -1
  143. package/dist/routes/runs.js +11 -6
  144. package/dist/routes/runs.js.map +1 -1
  145. package/dist/routes/workflows.d.ts.map +1 -1
  146. package/dist/routes/workflows.js +6 -5
  147. package/dist/routes/workflows.js.map +1 -1
  148. package/dist/tsconfig.test.tsbuildinfo +1 -1
  149. package/package.json +9 -9
  150. package/src/components/job-graph/job-duration-format.ts +11 -2
  151. package/src/components/job-graph/job-graph-view.test.tsx +19 -8
  152. package/src/components/job-graph/job-graph.stories.tsx +23 -19
  153. package/src/components/job-graph/job-node.stories.tsx +10 -5
  154. package/src/components/job-graph/job-node.test.tsx +55 -10
  155. package/src/components/job-graph/job-node.tsx +16 -9
  156. package/src/components/step-list/step-list.stories.tsx +2 -3
  157. package/src/components/step-list/step-list.tsx +3 -2
  158. package/src/components/workflow-run-list/job-status-strip.tsx +189 -0
  159. package/src/components/workflow-run-list/run-display.test.ts +169 -30
  160. package/src/components/workflow-run-list/run-display.ts +116 -9
  161. package/src/components/workflow-run-list/types.ts +21 -17
  162. package/src/components/workflow-run-list/workflow-run-filter-menu.tsx +100 -0
  163. package/src/components/workflow-run-list/workflow-run-filters.tsx +243 -0
  164. package/src/components/workflow-run-list/workflow-run-list-content.tsx +44 -16
  165. package/src/components/workflow-run-list/workflow-run-list-states.tsx +128 -27
  166. package/src/components/workflow-run-list/workflow-run-list-view.test.tsx +441 -104
  167. package/src/components/workflow-run-list/workflow-run-list-view.tsx +73 -43
  168. package/src/components/workflow-run-list/workflow-run-list.stories.tsx +140 -20
  169. package/src/components/workflow-run-list/workflow-run-list.tsx +20 -10
  170. package/src/components/workflow-run-list/workflow-run-row.tsx +173 -106
  171. package/src/components/workflow-run-number-label.test.tsx +45 -0
  172. package/src/components/workflow-run-number-label.tsx +47 -0
  173. package/src/components/workflow-run-summary/workflow-run-attempt-switcher.test.tsx +7 -8
  174. package/src/components/workflow-run-summary/workflow-run-attempt-switcher.tsx +13 -12
  175. package/src/components/workflow-run-summary/workflow-run-summary.stories.tsx +6 -8
  176. package/src/components/workflow-run-summary/workflow-run-summary.test.tsx +27 -2
  177. package/src/components/workflow-run-summary/workflow-run-summary.tsx +19 -9
  178. package/src/components/workflow-run-view/agent-config-failure-callout.stories.tsx +2 -3
  179. package/src/components/workflow-run-view/agent-config-failure-callout.tsx +4 -4
  180. package/src/components/workflow-run-view/job-card.stories.tsx +11 -10
  181. package/src/components/workflow-run-view/job-card.test.tsx +115 -0
  182. package/src/components/workflow-run-view/job-card.tsx +74 -35
  183. package/src/components/workflow-run-view/job-execution-switcher.tsx +31 -9
  184. package/src/components/workflow-run-view/workflow-run-view.test.tsx +88 -30
  185. package/src/components/workflow-run-view/workflow-run-view.tsx +24 -14
  186. package/src/components/workflow-status/status-visuals.test.ts +9 -0
  187. package/src/components/workflow-status/status-visuals.ts +6 -4
  188. package/src/components/workflow-status/workflow-status-icon.stories.tsx +10 -2
  189. package/src/components/workflow-status/workflow-status-icon.test.tsx +18 -0
  190. package/src/components/workflow-status/workflow-status-icon.tsx +17 -24
  191. package/src/core/entities/job-execution.ts +22 -0
  192. package/src/core/entities/job-status.test.ts +104 -0
  193. package/src/core/entities/job.ts +18 -3
  194. package/src/core/entities/workflow-run.ts +76 -7
  195. package/src/core/workflow-run.test.ts +24 -9
  196. package/src/core/workflow-run.ts +17 -2
  197. package/src/feature.ts +5 -5
  198. package/src/hooks/api/workflow-run-mapper.ts +30 -3
  199. package/src/hooks/api/workflow-runs.test.tsx +2 -0
  200. package/src/hooks/api/workflow-runs.ts +12 -7
  201. package/src/index.ts +7 -2
  202. package/src/page-harness-budget.test.ts +1 -1
  203. package/src/pages/project-workflows-page.test.tsx +59 -5
  204. package/src/pages/project-workflows-page.tsx +34 -1
  205. package/src/pages/workflow-run-detail-page.tsx +45 -0
  206. package/src/pages/workflow-run-list-page.tsx +65 -0
  207. package/src/pages/{workflow-run-page.test.tsx → workflow-run-pages.test.tsx} +211 -47
  208. package/src/routes/inputs.test.ts +193 -12
  209. package/src/routes/inputs.ts +170 -11
  210. package/src/routes/project-route.tsx +25 -0
  211. package/src/routes/run-detail.tsx +15 -8
  212. package/src/routes/runs.tsx +14 -7
  213. package/src/routes/workflows.tsx +5 -4
  214. package/test/fixtures/workflow-run.ts +76 -7
  215. package/test/pages.tsx +18 -8
  216. package/test/render.tsx +8 -2
  217. package/tsconfig.build.tsbuildinfo +1 -1
  218. package/dist/components/workflow-run-list/workflow-run-list-header.d.ts +0 -10
  219. package/dist/components/workflow-run-list/workflow-run-list-header.d.ts.map +0 -1
  220. package/dist/components/workflow-run-list/workflow-run-list-header.js +0 -55
  221. package/dist/components/workflow-run-list/workflow-run-list-header.js.map +0 -1
  222. package/dist/pages/workflow-run-first-time-use.d.ts +0 -6
  223. package/dist/pages/workflow-run-first-time-use.d.ts.map +0 -1
  224. package/dist/pages/workflow-run-first-time-use.js +0 -17
  225. package/dist/pages/workflow-run-first-time-use.js.map +0 -1
  226. package/dist/pages/workflow-run-page.d.ts +0 -10
  227. package/dist/pages/workflow-run-page.d.ts.map +0 -1
  228. package/dist/pages/workflow-run-page.js +0 -90
  229. package/dist/pages/workflow-run-page.js.map +0 -1
  230. package/src/components/workflow-run-list/workflow-run-list-header.tsx +0 -53
  231. package/src/pages/workflow-run-first-time-use.tsx +0 -17
  232. package/src/pages/workflow-run-page.tsx +0 -94
package/dist/feature.d.ts CHANGED
@@ -2,27 +2,27 @@ export declare const workflowsNavigation: readonly [{
2
2
  readonly id: "nav.runs";
3
3
  readonly scope: "project";
4
4
  readonly label: "Runs";
5
- readonly to: "/workspaces/$wid/projects/$pid/runs";
5
+ readonly to: "/w/$workspaceSlug/p/$projectSlug/runs";
6
6
  readonly order: 100;
7
7
  }, {
8
8
  readonly id: "nav.workflows";
9
9
  readonly scope: "project";
10
10
  readonly label: "Workflows";
11
- readonly to: "/workspaces/$wid/projects/$pid/workflows";
11
+ readonly to: "/w/$workspaceSlug/p/$projectSlug/workflows";
12
12
  readonly order: 200;
13
13
  }];
14
14
  export declare const workflowsFeature: {
15
15
  readonly id: "shipfox.workflows";
16
16
  readonly routes: readonly [{
17
- readonly path: "/workspaces/$wid/projects/$pid/workflows";
17
+ readonly path: "/w/$workspaceSlug/p/$projectSlug/workflows";
18
18
  readonly parent: "projectLayout";
19
19
  readonly impl: "@shipfox/client-workflows/routes/workflows";
20
20
  }, {
21
- readonly path: "/workspaces/$wid/projects/$pid/runs";
21
+ readonly path: "/w/$workspaceSlug/p/$projectSlug/runs";
22
22
  readonly parent: "projectLayout";
23
23
  readonly impl: "@shipfox/client-workflows/routes/runs";
24
24
  }, {
25
- readonly path: "/workspaces/$wid/projects/$pid/runs/$workflowRunId";
25
+ readonly path: "/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId";
26
26
  readonly parent: "projectLayout";
27
27
  readonly impl: "@shipfox/client-workflows/routes/run-detail";
28
28
  }];
@@ -30,13 +30,13 @@ export declare const workflowsFeature: {
30
30
  readonly id: "nav.runs";
31
31
  readonly scope: "project";
32
32
  readonly label: "Runs";
33
- readonly to: "/workspaces/$wid/projects/$pid/runs";
33
+ readonly to: "/w/$workspaceSlug/p/$projectSlug/runs";
34
34
  readonly order: 100;
35
35
  }, {
36
36
  readonly id: "nav.workflows";
37
37
  readonly scope: "project";
38
38
  readonly label: "Workflows";
39
- readonly to: "/workspaces/$wid/projects/$pid/workflows";
39
+ readonly to: "/w/$workspaceSlug/p/$projectSlug/workflows";
40
40
  readonly order: 200;
41
41
  }];
42
42
  };
package/dist/feature.js CHANGED
@@ -4,14 +4,14 @@ export const workflowsNavigation = [
4
4
  id: 'nav.runs',
5
5
  scope: 'project',
6
6
  label: 'Runs',
7
- to: '/workspaces/$wid/projects/$pid/runs',
7
+ to: '/w/$workspaceSlug/p/$projectSlug/runs',
8
8
  order: 100
9
9
  },
10
10
  {
11
11
  id: 'nav.workflows',
12
12
  scope: 'project',
13
13
  label: 'Workflows',
14
- to: '/workspaces/$wid/projects/$pid/workflows',
14
+ to: '/w/$workspaceSlug/p/$projectSlug/workflows',
15
15
  order: 200
16
16
  }
17
17
  ];
@@ -19,17 +19,17 @@ export const workflowsFeature = defineClientFeature({
19
19
  id: 'shipfox.workflows',
20
20
  routes: [
21
21
  {
22
- path: '/workspaces/$wid/projects/$pid/workflows',
22
+ path: '/w/$workspaceSlug/p/$projectSlug/workflows',
23
23
  parent: 'projectLayout',
24
24
  impl: '@shipfox/client-workflows/routes/workflows'
25
25
  },
26
26
  {
27
- path: '/workspaces/$wid/projects/$pid/runs',
27
+ path: '/w/$workspaceSlug/p/$projectSlug/runs',
28
28
  parent: 'projectLayout',
29
29
  impl: '@shipfox/client-workflows/routes/runs'
30
30
  },
31
31
  {
32
- path: '/workspaces/$wid/projects/$pid/runs/$workflowRunId',
32
+ path: '/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId',
33
33
  parent: 'projectLayout',
34
34
  impl: '@shipfox/client-workflows/routes/run-detail'
35
35
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/feature.ts"],"sourcesContent":["import {defineClientFeature, type NavTabEntry} from '@shipfox/client-shell';\n\nexport const workflowsNavigation = [\n {\n id: 'nav.runs',\n scope: 'project',\n label: 'Runs',\n to: '/workspaces/$wid/projects/$pid/runs',\n order: 100,\n },\n {\n id: 'nav.workflows',\n scope: 'project',\n label: 'Workflows',\n to: '/workspaces/$wid/projects/$pid/workflows',\n order: 200,\n },\n] as const satisfies readonly NavTabEntry[];\n\nexport const workflowsFeature = defineClientFeature({\n id: 'shipfox.workflows',\n routes: [\n {\n path: '/workspaces/$wid/projects/$pid/workflows',\n parent: 'projectLayout',\n impl: '@shipfox/client-workflows/routes/workflows',\n },\n {\n path: '/workspaces/$wid/projects/$pid/runs',\n parent: 'projectLayout',\n impl: '@shipfox/client-workflows/routes/runs',\n },\n {\n path: '/workspaces/$wid/projects/$pid/runs/$workflowRunId',\n parent: 'projectLayout',\n impl: '@shipfox/client-workflows/routes/run-detail',\n },\n ],\n navigation: workflowsNavigation,\n});\n"],"names":["defineClientFeature","workflowsNavigation","id","scope","label","to","order","workflowsFeature","routes","path","parent","impl","navigation"],"mappings":"AAAA,SAAQA,mBAAmB,QAAyB,wBAAwB;AAE5E,OAAO,MAAMC,sBAAsB;IACjC;QACEC,IAAI;QACJC,OAAO;QACPC,OAAO;QACPC,IAAI;QACJC,OAAO;IACT;IACA;QACEJ,IAAI;QACJC,OAAO;QACPC,OAAO;QACPC,IAAI;QACJC,OAAO;IACT;CACD,CAA2C;AAE5C,OAAO,MAAMC,mBAAmBP,oBAAoB;IAClDE,IAAI;IACJM,QAAQ;QACN;YACEC,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;QACA;YACEF,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;QACA;YACEF,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;KACD;IACDC,YAAYX;AACd,GAAG"}
1
+ {"version":3,"sources":["../src/feature.ts"],"sourcesContent":["import {defineClientFeature, type NavTabEntry} from '@shipfox/client-shell';\n\nexport const workflowsNavigation = [\n {\n id: 'nav.runs',\n scope: 'project',\n label: 'Runs',\n to: '/w/$workspaceSlug/p/$projectSlug/runs',\n order: 100,\n },\n {\n id: 'nav.workflows',\n scope: 'project',\n label: 'Workflows',\n to: '/w/$workspaceSlug/p/$projectSlug/workflows',\n order: 200,\n },\n] as const satisfies readonly NavTabEntry[];\n\nexport const workflowsFeature = defineClientFeature({\n id: 'shipfox.workflows',\n routes: [\n {\n path: '/w/$workspaceSlug/p/$projectSlug/workflows',\n parent: 'projectLayout',\n impl: '@shipfox/client-workflows/routes/workflows',\n },\n {\n path: '/w/$workspaceSlug/p/$projectSlug/runs',\n parent: 'projectLayout',\n impl: '@shipfox/client-workflows/routes/runs',\n },\n {\n path: '/w/$workspaceSlug/p/$projectSlug/runs/$workflowRunId',\n parent: 'projectLayout',\n impl: '@shipfox/client-workflows/routes/run-detail',\n },\n ],\n navigation: workflowsNavigation,\n});\n"],"names":["defineClientFeature","workflowsNavigation","id","scope","label","to","order","workflowsFeature","routes","path","parent","impl","navigation"],"mappings":"AAAA,SAAQA,mBAAmB,QAAyB,wBAAwB;AAE5E,OAAO,MAAMC,sBAAsB;IACjC;QACEC,IAAI;QACJC,OAAO;QACPC,OAAO;QACPC,IAAI;QACJC,OAAO;IACT;IACA;QACEJ,IAAI;QACJC,OAAO;QACPC,OAAO;QACPC,IAAI;QACJC,OAAO;IACT;CACD,CAA2C;AAE5C,OAAO,MAAMC,mBAAmBP,oBAAoB;IAClDE,IAAI;IACJM,QAAQ;QACN;YACEC,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;QACA;YACEF,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;QACA;YACEF,MAAM;YACNC,QAAQ;YACRC,MAAM;QACR;KACD;IACDC,YAAYX;AACd,GAAG"}
@@ -1,8 +1,9 @@
1
- import type { StepAttemptDto, WorkflowRunAttemptDto, WorkflowRunDetailResponseDto, WorkflowRunJobDetailDto, WorkflowRunJobExecutionDetailDto, WorkflowRunListResponseDto, WorkflowRunResponseDto, WorkflowRunStepDetailDto } from '@shipfox/api-workflows-dto';
2
- import { Job, JobExecution, type Step, StepAttempt, type WorkflowRun, WorkflowRunAttempt, type WorkflowRunDetail, type WorkflowRunListItem, type WorkflowRunListPage } from '#core/workflow-run.js';
1
+ import type { StepAttemptDto, WorkflowRunAttemptDto, WorkflowRunDetailResponseDto, WorkflowRunJobDetailDto, WorkflowRunJobExecutionDetailDto, WorkflowRunListItemDto, WorkflowRunListResponseDto, WorkflowRunResponseDto, WorkflowRunStepDetailDto } from '@shipfox/api-workflows-dto';
2
+ import { Job, JobExecution, type Step, StepAttempt, type WorkflowRun, WorkflowRunAttempt, type WorkflowRunDetail, type WorkflowRunListItem, type WorkflowRunListPage, type WorkflowRunRecord } from '#core/workflow-run.js';
3
3
  export declare function toWorkflowRun(dto: WorkflowRunResponseDto): WorkflowRun;
4
4
  export declare function toWorkflowRunAttempt(dto: WorkflowRunAttemptDto): WorkflowRunAttempt;
5
- export declare function toWorkflowRunListItem(dto: WorkflowRunResponseDto): WorkflowRunListItem;
5
+ export declare function toWorkflowRunRecord(dto: WorkflowRunResponseDto): WorkflowRunRecord;
6
+ export declare function toWorkflowRunListItem(dto: WorkflowRunListItemDto): WorkflowRunListItem;
6
7
  export declare function toWorkflowRunListPage(dto: WorkflowRunListResponseDto): WorkflowRunListPage;
7
8
  export declare function toWorkflowRunDetail(dto: WorkflowRunDetailResponseDto): WorkflowRunDetail;
8
9
  export declare function toJob(dto: WorkflowRunJobDetailDto): Job;
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-run-mapper.d.ts","sourceRoot":"","sources":["../../../src/hooks/api/workflow-run-mapper.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAEV,cAAc,EAGd,qBAAqB,EACrB,4BAA4B,EAC5B,uBAAuB,EACvB,gCAAgC,EAChC,0BAA0B,EAC1B,sBAAsB,EACtB,wBAAwB,EACzB,MAAM,4BAA4B,CAAC;AACpC,OAAO,EACL,GAAG,EACH,YAAY,EAEZ,KAAK,IAAI,EACT,WAAW,EAGX,KAAK,WAAW,EAChB,kBAAkB,EAElB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sBAAsB,GAAG,WAAW,CA8BtE;AAED,wBAAgB,oBAAoB,CAAC,GAAG,EAAE,qBAAqB,GAAG,kBAAkB,CAWnF;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,sBAAsB,GAAG,iBAAiB,CAclF;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,sBAAsB,GAAG,mBAAmB,CAkBtF;AAED,wBAAgB,qBAAqB,CAAC,GAAG,EAAE,0BAA0B,GAAG,mBAAmB,CAM1F;AAED,wBAAgB,mBAAmB,CAAC,GAAG,EAAE,4BAA4B,GAAG,iBAAiB,CAOxF;AAED,wBAAgB,KAAK,CAAC,GAAG,EAAE,uBAAuB,GAAG,GAAG,CAmBvD;AAED,wBAAgB,cAAc,CAAC,GAAG,EAAE,gCAAgC,GAAG,YAAY,CAiBlF;AAED,wBAAgB,MAAM,CAAC,GAAG,EAAE,wBAAwB,GAAG,IAAI,CA6B1D;AAED,wBAAgB,aAAa,CAAC,GAAG,EAAE,cAAc,EAAE,cAAc,EAAE,MAAM,GAAG,WAAW,CAgBtF"}
@@ -1,10 +1,12 @@
1
- import { Job, JobExecution, StepAttempt, WorkflowRunAttempt, WorkflowRunAttemptSummary, workflowRunShortId, workflowRunTriggerDisplayLabel, workflowRunTriggerLabel } from '#core/workflow-run.js';
1
+ import { Job, JobExecution, StepAttempt, WorkflowRunAttempt, WorkflowRunAttemptSummary, workflowRunTriggerDisplayLabel, workflowRunTriggerLabel } from '#core/workflow-run.js';
2
2
  export function toWorkflowRun(dto) {
3
3
  return {
4
4
  id: dto.id,
5
5
  projectId: dto.project_id,
6
6
  definitionId: dto.definition_id,
7
+ number: dto.number,
7
8
  name: dto.name,
9
+ workflowName: dto.workflow_name,
8
10
  currentAttempt: dto.current_attempt,
9
11
  triggerProvider: dto.trigger_provider,
10
12
  triggerSource: dto.trigger_source,
@@ -18,6 +20,7 @@ export function toWorkflowRun(dto) {
18
20
  triggerEvent: dto.trigger_event
19
21
  }),
20
22
  triggerPayload: dto.trigger_payload,
23
+ triggerReference: dto.trigger_reference,
21
24
  inputs: dto.inputs ?? null,
22
25
  sourceSnapshot: dto.source_snapshot ? {
23
26
  content: dto.source_snapshot.content,
@@ -25,7 +28,6 @@ export function toWorkflowRun(dto) {
25
28
  } : null,
26
29
  createdAt: dto.created_at,
27
30
  updatedAt: dto.updated_at,
28
- shortId: workflowRunShortId(dto.id),
29
31
  isTemporary: dto.id.startsWith('temp-')
30
32
  };
31
33
  }
@@ -41,7 +43,7 @@ export function toWorkflowRunAttempt(dto) {
41
43
  rerunMode: dto.rerun_mode
42
44
  });
43
45
  }
44
- export function toWorkflowRunListItem(dto) {
46
+ export function toWorkflowRunRecord(dto) {
45
47
  return {
46
48
  ...toWorkflowRun(dto),
47
49
  status: dto.status,
@@ -56,6 +58,28 @@ export function toWorkflowRunListItem(dto) {
56
58
  })
57
59
  };
58
60
  }
61
+ export function toWorkflowRunListItem(dto) {
62
+ const statusCounts = dto.job_status_counts.map(({ status, count })=>({
63
+ status,
64
+ count
65
+ }));
66
+ return {
67
+ ...toWorkflowRunRecord(dto),
68
+ jobs: {
69
+ preview: dto.jobs.map((job)=>({
70
+ id: job.id,
71
+ key: job.key,
72
+ name: job.name,
73
+ status: job.status,
74
+ position: job.position
75
+ })),
76
+ statusCounts,
77
+ // Derived rather than sent: the counts already cover every job, and a separate total
78
+ // would be a second source of truth that could disagree with them.
79
+ total: statusCounts.reduce((sum, entry)=>sum + entry.count, 0)
80
+ }
81
+ };
82
+ }
59
83
  export function toWorkflowRunListPage(dto) {
60
84
  return {
61
85
  runs: dto.runs.map(toWorkflowRunListItem),
@@ -177,6 +201,10 @@ function toWorkflowExecutionEvent(dto) {
177
201
  event: dto.event,
178
202
  deliveryId: dto.delivery_id,
179
203
  receivedAt: dto.received_at,
204
+ project: dto.project,
205
+ repository: dto.repository,
206
+ ref: dto.ref,
207
+ commit: dto.commit,
180
208
  data: dto.data
181
209
  };
182
210
  }
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/hooks/api/workflow-run-mapper.ts"],"sourcesContent":["import type {\n JobListeningDto,\n StepAttemptDto,\n StepGateResultDto,\n WorkflowExecutionEventDto,\n WorkflowRunAttemptDto,\n WorkflowRunDetailResponseDto,\n WorkflowRunJobDetailDto,\n WorkflowRunJobExecutionDetailDto,\n WorkflowRunListResponseDto,\n WorkflowRunResponseDto,\n WorkflowRunStepDetailDto,\n} from '@shipfox/api-workflows-dto';\nimport {\n Job,\n JobExecution,\n type JobListening,\n type Step,\n StepAttempt,\n type StepGateResult,\n type WorkflowExecutionEvent,\n type WorkflowRun,\n WorkflowRunAttempt,\n WorkflowRunAttemptSummary,\n type WorkflowRunDetail,\n type WorkflowRunListItem,\n type WorkflowRunListPage,\n workflowRunShortId,\n workflowRunTriggerDisplayLabel,\n workflowRunTriggerLabel,\n} from '#core/workflow-run.js';\n\nexport function toWorkflowRun(dto: WorkflowRunResponseDto): WorkflowRun {\n return {\n id: dto.id,\n projectId: dto.project_id,\n definitionId: dto.definition_id,\n name: dto.name,\n currentAttempt: dto.current_attempt,\n triggerProvider: dto.trigger_provider,\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n triggerDisplayLabel: workflowRunTriggerDisplayLabel({\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n }),\n triggerLabel: workflowRunTriggerLabel({\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n }),\n triggerPayload: dto.trigger_payload,\n inputs: dto.inputs ?? null,\n sourceSnapshot: dto.source_snapshot\n ? {content: dto.source_snapshot.content, format: dto.source_snapshot.format}\n : null,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n shortId: workflowRunShortId(dto.id),\n isTemporary: dto.id.startsWith('temp-'),\n };\n}\n\nexport function toWorkflowRunAttempt(dto: WorkflowRunAttemptDto): WorkflowRunAttempt {\n return new WorkflowRunAttempt({\n id: dto.id,\n workflowRunId: dto.workflow_run_id,\n attempt: dto.attempt,\n status: dto.status,\n createdAt: dto.created_at,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n rerunMode: dto.rerun_mode,\n });\n}\n\nexport function toWorkflowRunListItem(dto: WorkflowRunResponseDto): WorkflowRunListItem {\n return {\n ...toWorkflowRun(dto),\n status: dto.status,\n latestAttempt: dto.latest_attempt,\n runAttempt: new WorkflowRunAttemptSummary({\n workflowRunId: dto.id,\n attempt: dto.current_attempt,\n status: dto.status,\n createdAt: dto.created_at,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n }),\n };\n}\n\nexport function toWorkflowRunListPage(dto: WorkflowRunListResponseDto): WorkflowRunListPage {\n return {\n runs: dto.runs.map(toWorkflowRunListItem),\n nextCursor: dto.next_cursor,\n filteredTotalCount: dto.filtered_total_count,\n };\n}\n\nexport function toWorkflowRunDetail(dto: WorkflowRunDetailResponseDto): WorkflowRunDetail {\n return {\n ...toWorkflowRun(dto),\n latestAttempt: dto.latest_attempt,\n runAttempt: toWorkflowRunAttempt(dto.run_attempt),\n jobs: dto.jobs.map(toJob),\n };\n}\n\nexport function toJob(dto: WorkflowRunJobDetailDto): Job {\n return new Job({\n id: dto.id,\n runAttemptId: dto.run_attempt_id,\n key: dto.key,\n name: dto.name,\n mode: dto.mode,\n status: dto.status,\n statusReason: dto.status_reason,\n carriedOver: dto.carried_over,\n listening: dto.listening ? toJobListening(dto.listening) : null,\n listenerStatus: dto.listener_status,\n resolutionReason: dto.resolution_reason,\n dependencies: dto.dependencies,\n position: dto.position,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n jobExecutions: dto.job_executions.map(toJobExecution),\n });\n}\n\nexport function toJobExecution(dto: WorkflowRunJobExecutionDetailDto): JobExecution {\n return new JobExecution({\n id: dto.id,\n jobId: dto.job_id,\n sequence: dto.sequence,\n name: dto.name,\n status: dto.status,\n statusReason: dto.status_reason,\n triggerEvents: (dto.trigger_events ?? []).map(toWorkflowExecutionEvent),\n queuedAt: dto.queued_at ?? null,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n timedOutAt: dto.timed_out_at ?? null,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n steps: dto.steps.map(toStep),\n });\n}\n\nexport function toStep(dto: WorkflowRunStepDetailDto): Step {\n return {\n id: dto.id,\n jobExecutionId: dto.job_execution_id,\n key: dto.key,\n name: dto.name,\n sourceLocation: dto.source_location\n ? {startLine: dto.source_location.start_line, endLine: dto.source_location.end_line}\n : null,\n status: dto.status,\n type: dto.type,\n config: dto.config,\n agentConfig: toAgentStepConfig(dto),\n error: dto.error\n ? {\n message: dto.error.message,\n exitCode: dto.error.exit_code ?? null,\n signal: dto.error.signal,\n reason: dto.error.reason,\n agentConfigIssue: dto.error.agent_config_issue,\n category: dto.error.category,\n }\n : null,\n position: dto.position,\n currentAttempt: dto.current_attempt,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n attempts: dto.attempts.map((attempt) => toStepAttempt(attempt, dto.job_execution_id)),\n };\n}\n\nexport function toStepAttempt(dto: StepAttemptDto, jobExecutionId: string): StepAttempt {\n return new StepAttempt({\n id: dto.id,\n stepId: dto.step_id,\n jobExecutionId,\n attempt: dto.attempt,\n executionOrder: dto.execution_order,\n status: dto.status,\n exitCode: dto.exit_code ?? null,\n output: dto.output ?? null,\n error: dto.error ?? null,\n gateResult: toStepGateResult(dto.gate_result),\n restartFeedback: dto.restart_feedback ?? null,\n startedAt: dto.started_at,\n finishedAt: dto.finished_at ?? null,\n });\n}\n\nfunction toJobListening(dto: JobListeningDto): JobListening {\n return {\n on: dto.on,\n until: dto.until,\n timeoutMs: dto.timeout_ms,\n maxExecutions: dto.max_executions,\n batch: dto.batch\n ? {\n debounceMs: dto.batch.debounce_ms,\n maxSize: dto.batch.max_size,\n maxWaitMs: dto.batch.max_wait_ms,\n }\n : null,\n onResolve: dto.on_resolve,\n executionTimeoutMs: dto.execution_timeout_ms,\n name: dto.name,\n };\n}\n\nfunction toWorkflowExecutionEvent(dto: WorkflowExecutionEventDto): WorkflowExecutionEvent {\n return {\n source: dto.source,\n event: dto.event,\n deliveryId: dto.delivery_id,\n receivedAt: dto.received_at,\n data: dto.data,\n };\n}\n\nfunction toStepGateResult(dto: StepGateResultDto): StepGateResult {\n if (dto === null || dto.kind === 'none' || dto.kind === 'not_evaluated') return dto;\n if (dto.kind === 'passed' || dto.kind === 'failed') return {...dto, exitCode: dto.exit_code};\n if (dto.kind === 'uncheckable' || dto.kind === 'evaluation_error')\n return {...dto, exitCode: dto.exit_code};\n return dto;\n}\n\nfunction toAgentStepConfig(dto: WorkflowRunStepDetailDto): Step['agentConfig'] {\n if (dto.type !== 'agent') return null;\n return {\n provider: stringConfigValue(dto.config.provider),\n model: stringConfigValue(dto.config.model),\n thinking: stringConfigValue(dto.config.thinking),\n };\n}\n\nfunction stringConfigValue(value: unknown): string | null {\n return typeof value === 'string' && value.trim() ? value.trim() : null;\n}\n"],"names":["Job","JobExecution","StepAttempt","WorkflowRunAttempt","WorkflowRunAttemptSummary","workflowRunShortId","workflowRunTriggerDisplayLabel","workflowRunTriggerLabel","toWorkflowRun","dto","id","projectId","project_id","definitionId","definition_id","name","currentAttempt","current_attempt","triggerProvider","trigger_provider","triggerSource","trigger_source","triggerEvent","trigger_event","triggerDisplayLabel","triggerLabel","triggerPayload","trigger_payload","inputs","sourceSnapshot","source_snapshot","content","format","createdAt","created_at","updatedAt","updated_at","shortId","isTemporary","startsWith","toWorkflowRunAttempt","workflowRunId","workflow_run_id","attempt","status","startedAt","started_at","finishedAt","finished_at","rerunMode","rerun_mode","toWorkflowRunListItem","latestAttempt","latest_attempt","runAttempt","toWorkflowRunListPage","runs","map","nextCursor","next_cursor","filteredTotalCount","filtered_total_count","toWorkflowRunDetail","run_attempt","jobs","toJob","runAttemptId","run_attempt_id","key","mode","statusReason","status_reason","carriedOver","carried_over","listening","toJobListening","listenerStatus","listener_status","resolutionReason","resolution_reason","dependencies","position","jobExecutions","job_executions","toJobExecution","jobId","job_id","sequence","triggerEvents","trigger_events","toWorkflowExecutionEvent","queuedAt","queued_at","timedOutAt","timed_out_at","steps","toStep","jobExecutionId","job_execution_id","sourceLocation","source_location","startLine","start_line","endLine","end_line","type","config","agentConfig","toAgentStepConfig","error","message","exitCode","exit_code","signal","reason","agentConfigIssue","agent_config_issue","category","attempts","toStepAttempt","stepId","step_id","executionOrder","execution_order","output","gateResult","toStepGateResult","gate_result","restartFeedback","restart_feedback","on","until","timeoutMs","timeout_ms","maxExecutions","max_executions","batch","debounceMs","debounce_ms","maxSize","max_size","maxWaitMs","max_wait_ms","onResolve","on_resolve","executionTimeoutMs","execution_timeout_ms","source","event","deliveryId","delivery_id","receivedAt","received_at","data","kind","provider","stringConfigValue","model","thinking","value","trim"],"mappings":"AAaA,SACEA,GAAG,EACHC,YAAY,EAGZC,WAAW,EAIXC,kBAAkB,EAClBC,yBAAyB,EAIzBC,kBAAkB,EAClBC,8BAA8B,EAC9BC,uBAAuB,QAClB,wBAAwB;AAE/B,OAAO,SAASC,cAAcC,GAA2B;IACvD,OAAO;QACLC,IAAID,IAAIC,EAAE;QACVC,WAAWF,IAAIG,UAAU;QACzBC,cAAcJ,IAAIK,aAAa;QAC/BC,MAAMN,IAAIM,IAAI;QACdC,gBAAgBP,IAAIQ,eAAe;QACnCC,iBAAiBT,IAAIU,gBAAgB;QACrCC,eAAeX,IAAIY,cAAc;QACjCC,cAAcb,IAAIc,aAAa;QAC/BC,qBAAqBlB,+BAA+B;YAClDc,eAAeX,IAAIY,cAAc;YACjCC,cAAcb,IAAIc,aAAa;QACjC;QACAE,cAAclB,wBAAwB;YACpCa,eAAeX,IAAIY,cAAc;YACjCC,cAAcb,IAAIc,aAAa;QACjC;QACAG,gBAAgBjB,IAAIkB,eAAe;QACnCC,QAAQnB,IAAImB,MAAM,IAAI;QACtBC,gBAAgBpB,IAAIqB,eAAe,GAC/B;YAACC,SAAStB,IAAIqB,eAAe,CAACC,OAAO;YAAEC,QAAQvB,IAAIqB,eAAe,CAACE,MA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AAK,oBAC7C,OAAO;QAAC,GAAGjJ,GAAG;QAAEsG,UAAUtG,IAAIuG,SAAS;IAAA;IACzC,OAAOvG;AACT;AAEA,SAASmG,kBAAkBnG,GAA6B;IACtD,IAAIA,IAAIgG,IAAI,KAAK,SAAS,OAAO;IACjC,OAAO;QACLkD,UAAUC,kBAAkBnJ,IAAIiG,MAAM,CAACiD,QAAQ;QAC/CE,OAAOD,kBAAkBnJ,IAAIiG,MAAM,CAACmD,KAAK;QACzCC,UAAUF,kBAAkBnJ,IAAIiG,MAAM,CAACoD,QAAQ;IACjD;AACF;AAEA,SAASF,kBAAkBG,KAAc;IACvC,OAAO,OAAOA,UAAU,YAAYA,MAAMC,IAAI,KAAKD,MAAMC,IAAI,KAAK;AACpE"}
1
+ {"version":3,"sources":["../../../src/hooks/api/workflow-run-mapper.ts"],"sourcesContent":["import type {\n JobListeningDto,\n StepAttemptDto,\n StepGateResultDto,\n WorkflowExecutionEventDto,\n WorkflowRunAttemptDto,\n WorkflowRunDetailResponseDto,\n WorkflowRunJobDetailDto,\n WorkflowRunJobExecutionDetailDto,\n WorkflowRunListItemDto,\n WorkflowRunListResponseDto,\n WorkflowRunResponseDto,\n WorkflowRunStepDetailDto,\n} from '@shipfox/api-workflows-dto';\nimport {\n Job,\n JobExecution,\n type JobListening,\n type Step,\n StepAttempt,\n type StepGateResult,\n type WorkflowExecutionEvent,\n type WorkflowRun,\n WorkflowRunAttempt,\n WorkflowRunAttemptSummary,\n type WorkflowRunDetail,\n type WorkflowRunListItem,\n type WorkflowRunListPage,\n type WorkflowRunRecord,\n workflowRunTriggerDisplayLabel,\n workflowRunTriggerLabel,\n} from '#core/workflow-run.js';\n\nexport function toWorkflowRun(dto: WorkflowRunResponseDto): WorkflowRun {\n return {\n id: dto.id,\n projectId: dto.project_id,\n definitionId: dto.definition_id,\n number: dto.number,\n name: dto.name,\n workflowName: dto.workflow_name,\n currentAttempt: dto.current_attempt,\n triggerProvider: dto.trigger_provider,\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n triggerDisplayLabel: workflowRunTriggerDisplayLabel({\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n }),\n triggerLabel: workflowRunTriggerLabel({\n triggerSource: dto.trigger_source,\n triggerEvent: dto.trigger_event,\n }),\n triggerPayload: dto.trigger_payload,\n triggerReference: dto.trigger_reference,\n inputs: dto.inputs ?? null,\n sourceSnapshot: dto.source_snapshot\n ? {content: dto.source_snapshot.content, format: dto.source_snapshot.format}\n : null,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n isTemporary: dto.id.startsWith('temp-'),\n };\n}\n\nexport function toWorkflowRunAttempt(dto: WorkflowRunAttemptDto): WorkflowRunAttempt {\n return new WorkflowRunAttempt({\n id: dto.id,\n workflowRunId: dto.workflow_run_id,\n attempt: dto.attempt,\n status: dto.status,\n createdAt: dto.created_at,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n rerunMode: dto.rerun_mode,\n });\n}\n\nexport function toWorkflowRunRecord(dto: WorkflowRunResponseDto): WorkflowRunRecord {\n return {\n ...toWorkflowRun(dto),\n status: dto.status,\n latestAttempt: dto.latest_attempt,\n runAttempt: new WorkflowRunAttemptSummary({\n workflowRunId: dto.id,\n attempt: dto.current_attempt,\n status: dto.status,\n createdAt: dto.created_at,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n }),\n };\n}\n\nexport function toWorkflowRunListItem(dto: WorkflowRunListItemDto): WorkflowRunListItem {\n const statusCounts = dto.job_status_counts.map(({status, count}) => ({status, count}));\n return {\n ...toWorkflowRunRecord(dto),\n jobs: {\n preview: dto.jobs.map((job) => ({\n id: job.id,\n key: job.key,\n name: job.name,\n status: job.status,\n position: job.position,\n })),\n statusCounts,\n // Derived rather than sent: the counts already cover every job, and a separate total\n // would be a second source of truth that could disagree with them.\n total: statusCounts.reduce((sum, entry) => sum + entry.count, 0),\n },\n };\n}\n\nexport function toWorkflowRunListPage(dto: WorkflowRunListResponseDto): WorkflowRunListPage {\n return {\n runs: dto.runs.map(toWorkflowRunListItem),\n nextCursor: dto.next_cursor,\n filteredTotalCount: dto.filtered_total_count,\n };\n}\n\nexport function toWorkflowRunDetail(dto: WorkflowRunDetailResponseDto): WorkflowRunDetail {\n return {\n ...toWorkflowRun(dto),\n latestAttempt: dto.latest_attempt,\n runAttempt: toWorkflowRunAttempt(dto.run_attempt),\n jobs: dto.jobs.map(toJob),\n };\n}\n\nexport function toJob(dto: WorkflowRunJobDetailDto): Job {\n return new Job({\n id: dto.id,\n runAttemptId: dto.run_attempt_id,\n key: dto.key,\n name: dto.name,\n mode: dto.mode,\n status: dto.status,\n statusReason: dto.status_reason,\n carriedOver: dto.carried_over,\n listening: dto.listening ? toJobListening(dto.listening) : null,\n listenerStatus: dto.listener_status,\n resolutionReason: dto.resolution_reason,\n dependencies: dto.dependencies,\n position: dto.position,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n jobExecutions: dto.job_executions.map(toJobExecution),\n });\n}\n\nexport function toJobExecution(dto: WorkflowRunJobExecutionDetailDto): JobExecution {\n return new JobExecution({\n id: dto.id,\n jobId: dto.job_id,\n sequence: dto.sequence,\n name: dto.name,\n status: dto.status,\n statusReason: dto.status_reason,\n triggerEvents: (dto.trigger_events ?? []).map(toWorkflowExecutionEvent),\n queuedAt: dto.queued_at ?? null,\n startedAt: dto.started_at ?? null,\n finishedAt: dto.finished_at ?? null,\n timedOutAt: dto.timed_out_at ?? null,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n steps: dto.steps.map(toStep),\n });\n}\n\nexport function toStep(dto: WorkflowRunStepDetailDto): Step {\n return {\n id: dto.id,\n jobExecutionId: dto.job_execution_id,\n key: dto.key,\n name: dto.name,\n sourceLocation: dto.source_location\n ? {startLine: dto.source_location.start_line, endLine: dto.source_location.end_line}\n : null,\n status: dto.status,\n type: dto.type,\n config: dto.config,\n agentConfig: toAgentStepConfig(dto),\n error: dto.error\n ? {\n message: dto.error.message,\n exitCode: dto.error.exit_code ?? null,\n signal: dto.error.signal,\n reason: dto.error.reason,\n agentConfigIssue: dto.error.agent_config_issue,\n category: dto.error.category,\n }\n : null,\n position: dto.position,\n currentAttempt: dto.current_attempt,\n createdAt: dto.created_at,\n updatedAt: dto.updated_at,\n attempts: dto.attempts.map((attempt) => toStepAttempt(attempt, dto.job_execution_id)),\n };\n}\n\nexport function toStepAttempt(dto: StepAttemptDto, jobExecutionId: string): StepAttempt {\n return new StepAttempt({\n id: dto.id,\n stepId: dto.step_id,\n jobExecutionId,\n attempt: dto.attempt,\n executionOrder: dto.execution_order,\n status: dto.status,\n exitCode: dto.exit_code ?? null,\n output: dto.output ?? null,\n error: dto.error ?? null,\n gateResult: toStepGateResult(dto.gate_result),\n restartFeedback: dto.restart_feedback ?? null,\n startedAt: dto.started_at,\n finishedAt: dto.finished_at ?? null,\n });\n}\n\nfunction toJobListening(dto: JobListeningDto): JobListening {\n return {\n on: dto.on,\n until: dto.until,\n timeoutMs: dto.timeout_ms,\n maxExecutions: dto.max_executions,\n batch: dto.batch\n ? {\n debounceMs: dto.batch.debounce_ms,\n maxSize: dto.batch.max_size,\n maxWaitMs: dto.batch.max_wait_ms,\n }\n : null,\n onResolve: dto.on_resolve,\n executionTimeoutMs: dto.execution_timeout_ms,\n name: dto.name,\n };\n}\n\nfunction toWorkflowExecutionEvent(dto: WorkflowExecutionEventDto): WorkflowExecutionEvent {\n return {\n source: dto.source,\n event: dto.event,\n deliveryId: dto.delivery_id,\n receivedAt: dto.received_at,\n project: dto.project,\n repository: dto.repository,\n ref: dto.ref,\n commit: dto.commit,\n data: dto.data,\n };\n}\n\nfunction toStepGateResult(dto: StepGateResultDto): StepGateResult {\n if (dto === null || dto.kind === 'none' || dto.kind === 'not_evaluated') return dto;\n if (dto.kind === 'passed' || dto.kind === 'failed') return {...dto, exitCode: dto.exit_code};\n if (dto.kind === 'uncheckable' || dto.kind === 'evaluation_error')\n return {...dto, exitCode: dto.exit_code};\n return dto;\n}\n\nfunction toAgentStepConfig(dto: WorkflowRunStepDetailDto): Step['agentConfig'] {\n if (dto.type !== 'agent') return null;\n return {\n provider: stringConfigValue(dto.config.provider),\n model: stringConfigValue(dto.config.model),\n thinking: stringConfigValue(dto.config.thinking),\n };\n}\n\nfunction stringConfigValue(value: unknown): string | null {\n return typeof value === 'string' && value.trim() ? value.trim() : null;\n}\n"],"names":["Job","JobExecution","StepAttempt","WorkflowRunAttempt","WorkflowRunAttemptSummary","workflowRunTriggerDisplayLabel","workflowRunTriggerLabel","toWorkflowRun","dto","id","projectId","project_id","definitionId","definition_id","number","name","workflowName","workflow_name","currentAttempt","current_attempt","triggerProvider","trigger_provider","triggerSource","trigger_source","triggerEvent","trigger_event","triggerDisplayLabel","triggerLabel","triggerPayload","trigger_payload","triggerReference","trigger_reference","inputs","sourceSnapshot","source_snapshot","content","format","createdAt","created_at","updatedAt","updated_at","isTemporary","startsWith","toWorkflowRunAttempt","workflowRunId","workflow_run_id","attempt","status","startedAt","started_at","finishedAt","finished_at","rerunMode","rerun_mode","toWorkflowRunRecord","latestAttempt","latest_attempt","runAttempt","toWorkflowRunListItem","statusCounts","job_status_counts","map","count","jobs","preview","job","key","position","total","reduce","sum","entry","toWorkflowRunListPage","runs","nextCursor","next_cursor","filteredTotalCount","filtered_total_count","toWorkflowRunDetail","run_attempt","toJob","runAttemptId","run_attempt_id","mode","statusReason","status_reason","carriedOver","carried_over","listening","toJobListening","listenerStatus","listener_status","resolutionReason","resolution_reason","dependencies","jobExecutions","job_executions","toJobExecution","jobId","job_id","sequence","triggerEvents","trigger_events","toWorkflowExecutionEvent","queuedAt","queued_at","timedOutAt","timed_out_at","steps","toStep","jobExecutionId","job_execution_id","sourceLocation","source_location","startLine","start_line","endLine","end_line","type","config","agentConfig","toAgentStepConfig","error","message","exitCode","exit_code","signal","reason","agentConfigIssue","agent_config_issue","category","attempts","toStepAttempt","stepId","step_id","executionOrder","execution_order","output","gateResult","toStepGateResult","gate_result","restartFeedback","restart_feedback","on","until","timeoutMs","timeout_ms","maxExecutions","max_executions","batch","debounceMs","debounce_ms","maxSize","max_size","maxWaitMs","max_wait_ms","onResolve","on_resolve","executionTimeoutMs","execution_timeout_ms","source","event","deliveryId","delivery_id","receivedAt","received_at","project","repository","ref","commit","data","kind","provider","stringConfigValue","model","thinking","value","trim"],"mappings":"AAcA,SACEA,GAAG,EACHC,YAAY,EAGZC,WAAW,EAIXC,kBAAkB,EAClBC,yBAAyB,EAKzBC,8BAA8B,EAC9BC,uBAAuB,QAClB,wBAAwB;AAE/B,OAAO,SAASC,cAAcC,GAA2B;IACvD,OAAO;QACLC,IAAID,IAAIC,EAAE;QACVC,WAAWF,IAAIG,UAAU;QACzBC,cAAcJ,IAAIK,aAAa;QAC/BC,QAAQN,IAAIM,MAAM;QAClBC,MAAMP,IAAIO,IAAI;QACdC,cAAcR,IAAIS,aAAa;QAC/BC,gBAAgBV,IAAIW,eAAe;QACnCC,iBAAiBZ,IAAIa,gBAAgB;QACrCC,eAAed,IAAIe,cAAc;QACjCC,cAAchB,IAAIiB,aAAa;QAC/BC,qBAAqBrB,+BAA+B;YAClDiB,eAAed,IAAIe,cAAc;YACjCC,cAAchB,IAAIiB,aAAa;QACjC;QACAE,cAAcrB,wBAAwB;YACpCgB,eAAed,IAAIe,cAAc;YACjCC,cAAchB,IAAIiB,aAAa;QACjC;QACAG,gBAAgBpB,IAAIqB,eAAe;QACnCC,kBAAkBtB,IAAIuB,iBAAiB;QACvCC,QAAQxB,IAAIwB,MAAM,IAAI;QACtBC,gBAAgBzB,IAAI0B,eAAe,GAC/B;YAACC,SAAS3B,IAAI0B,eAAe,CAACC,OAAO;YAAEC,QAAQ5B,IAAI0B,eAAe,CAACE,MAAM;QAAA,IACzE;QACJC,WAAW7B,IAAI8B,UAAU;QACzBC,WAAW/B,IAAIgC,UAAU;QACzBC,aAAajC,IAAIC,EAAE,CAACiC,UAAU,CAAC;IACjC;AACF;AAEA,OAAO,SAASC,qBAAqB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AAY5J,IAAI6J,WAAW;QAC3BC,SAAS9J,IAAI8J,OAAO;QACpBC,YAAY/J,IAAI+J,UAAU;QAC1BC,KAAKhK,IAAIgK,GAAG;QACZC,QAAQjK,IAAIiK,MAAM;QAClBC,MAAMlK,IAAIkK,IAAI;IAChB;AACF;AAEA,SAAS/B,iBAAiBnI,GAAsB;IAC9C,IAAIA,QAAQ,QAAQA,IAAImK,IAAI,KAAK,UAAUnK,IAAImK,IAAI,KAAK,iBAAiB,OAAOnK;IAChF,IAAIA,IAAImK,IAAI,KAAK,YAAYnK,IAAImK,IAAI,KAAK,UAAU,OAAO;QAAC,GAAGnK,GAAG;QAAEoH,UAAUpH,IAAIqH,SAAS;IAAA;IAC3F,IAAIrH,IAAImK,IAAI,KAAK,iBAAiBnK,IAAImK,IAAI,KAAK,oBAC7C,OAAO;QAAC,GAAGnK,GAAG;QAAEoH,UAAUpH,IAAIqH,SAAS;IAAA;IACzC,OAAOrH;AACT;AAEA,SAASiH,kBAAkBjH,GAA6B;IACtD,IAAIA,IAAI8G,IAAI,KAAK,SAAS,OAAO;IACjC,OAAO;QACLsD,UAAUC,kBAAkBrK,IAAI+G,MAAM,CAACqD,QAAQ;QAC/CE,OAAOD,kBAAkBrK,IAAI+G,MAAM,CAACuD,KAAK;QACzCC,UAAUF,kBAAkBrK,IAAI+G,MAAM,CAACwD,QAAQ;IACjD;AACF;AAEA,SAASF,kBAAkBG,KAAc;IACvC,OAAO,OAAOA,UAAU,YAAYA,MAAMC,IAAI,KAAKD,MAAMC,IAAI,KAAK;AACpE"}
@@ -1,6 +1,6 @@
1
1
  import { type WorkflowRunRerunModeDto } from '@shipfox/api-workflows-dto';
2
2
  import { type InfiniteData, type UseInfiniteQueryOptions, type UseQueryOptions } from '@tanstack/react-query';
3
- import { type ManualWorkflowLaunch, type WorkflowRun, type WorkflowRunAttempt, type WorkflowRunDetail, type WorkflowRunListItem, type WorkflowRunListPage, type WorkflowRunStatus } from '#core/workflow-run.js';
3
+ import { type ManualWorkflowLaunch, type WorkflowRun, type WorkflowRunAttempt, type WorkflowRunDetail, type WorkflowRunListPage, type WorkflowRunRecord, type WorkflowRunStatus } from '#core/workflow-run.js';
4
4
  export interface WorkflowRunFilters {
5
5
  status?: WorkflowRunStatus | undefined;
6
6
  definitionId?: string | undefined;
@@ -43,8 +43,8 @@ export declare function workflowRunsInfiniteQueryOptions(projectId: string | und
43
43
  export declare function rerunWorkflowRun({ workflowRunId, mode, }: {
44
44
  workflowRunId: string;
45
45
  mode: WorkflowRunRerunModeDto;
46
- }): Promise<WorkflowRunListItem>;
47
- export declare function useRerunWorkflowRunMutation(projectId: string): import("@tanstack/react-query").UseMutationResult<WorkflowRunListItem, Error, {
46
+ }): Promise<WorkflowRunRecord>;
47
+ export declare function useRerunWorkflowRunMutation(projectId: string): import("@tanstack/react-query").UseMutationResult<WorkflowRunRecord, Error, {
48
48
  workflowRunId: string;
49
49
  mode: WorkflowRunRerunModeDto;
50
50
  }, unknown>;
@@ -74,6 +74,6 @@ export declare function workflowRunAttemptsQueryOptions({ workflowRunId, enabled
74
74
  workflowRunId: string | undefined;
75
75
  enabled: boolean;
76
76
  }): WorkflowRunAttemptsQueryOptions;
77
- export declare function useCancelWorkflowRunMutation(run: WorkflowRun | undefined): import("@tanstack/react-query").UseMutationResult<WorkflowRunListItem, Error, void, unknown>;
77
+ export declare function useCancelWorkflowRunMutation(run: WorkflowRun | undefined): import("@tanstack/react-query").UseMutationResult<WorkflowRunRecord, Error, void, unknown>;
78
78
  export {};
79
79
  //# sourceMappingURL=workflow-runs.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"workflow-runs.d.ts","sourceRoot":"","sources":["../../../src/hooks/api/workflow-runs.ts"],"names":[],"mappings":"AAAA,OAAO,EAEL,KAAK,uBAAuB,EAM7B,MAAM,4BAA4B,CAAC;AAEpC,OAAO,EACL,KAAK,YAAY,EAIjB,KAAK,uBAAuB,EAC5B,KAAK,eAAe,EAKrB,MAAM,uBAAuB,CAAC;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EAAE;IACD,aAAa,EAAE,MAAM,GAAG,SAAS,CAAC;IAClC,OAAO,EAAE,OAAO,CAAC;CAClB,GAAG,+BAA+B,CAWlC;AAED,wBAAgB,4BAA4B,CAAC,GAAG,EAAE,WAAW,GAAG,SAAS,8FAgBxE"}
@@ -2,7 +2,7 @@ import { workflowRunAttemptsResponseSchema, workflowRunDetailResponseSchema, wor
2
2
  import { checkedApiRequest } from '@shipfox/client-api';
3
3
  import { infiniteQueryOptions, keepPreviousData, queryOptions, useInfiniteQuery, useMutation, useQuery, useQueryClient } from '@tanstack/react-query';
4
4
  import { isWorkflowRunTerminal, WorkflowRunAttemptSummary } from '#core/workflow-run.js';
5
- import { toWorkflowRunAttempt, toWorkflowRunDetail, toWorkflowRunListItem, toWorkflowRunListPage } from './workflow-run-mapper.js';
5
+ import { toWorkflowRunAttempt, toWorkflowRunDetail, toWorkflowRunListPage, toWorkflowRunRecord } from './workflow-run-mapper.js';
6
6
  export const workflowRunsQueryKeys = {
7
7
  all: [
8
8
  'workflow-runs'
@@ -132,12 +132,12 @@ async function getWorkflowRunAttempts({ workflowRunId, signal }) {
132
132
  return response.attempts.map(toWorkflowRunAttempt);
133
133
  }
134
134
  async function cancelWorkflowRun({ workflowRunId }) {
135
- return toWorkflowRunListItem(await checkedApiRequest(workflowRunDtoSchema, `/workflows/runs/${workflowRunId}/cancel`, {
135
+ return toWorkflowRunRecord(await checkedApiRequest(workflowRunDtoSchema, `/workflows/runs/${workflowRunId}/cancel`, {
136
136
  method: 'POST'
137
137
  }));
138
138
  }
139
139
  export async function rerunWorkflowRun({ workflowRunId, mode }) {
140
- return toWorkflowRunListItem(await checkedApiRequest(workflowRunResponseSchema, `/workflows/runs/${workflowRunId}/rerun`, {
140
+ return toWorkflowRunRecord(await checkedApiRequest(workflowRunResponseSchema, `/workflows/runs/${workflowRunId}/rerun`, {
141
141
  method: 'POST',
142
142
  body: {
143
143
  mode
@@ -197,7 +197,9 @@ function buildTempRun({ projectId, definitionId, name, createdAt }) {
197
197
  id,
198
198
  projectId,
199
199
  definitionId,
200
+ number: null,
200
201
  name,
202
+ workflowName: name,
201
203
  status: 'pending',
202
204
  currentAttempt: 1,
203
205
  latestAttempt: 1,
@@ -210,12 +212,18 @@ function buildTempRun({ projectId, definitionId, name, createdAt }) {
210
212
  },
211
213
  triggerDisplayLabel: 'fire',
212
214
  triggerLabel: 'manual · fire',
215
+ triggerReference: null,
213
216
  inputs: null,
214
217
  sourceSnapshot: null,
215
218
  createdAt,
216
219
  updatedAt: createdAt,
217
- shortId: id.slice(0, 8),
218
220
  isTemporary: true,
221
+ // The optimistic row genuinely has no jobs yet: the server has not planned the graph.
222
+ jobs: {
223
+ preview: [],
224
+ statusCounts: [],
225
+ total: 0
226
+ },
219
227
  runAttempt: new WorkflowRunAttemptSummary({
220
228
  workflowRunId: id,
221
229
  attempt: 1,
@@ -1 +1 @@
1
- {"version":3,"sources":["../../../src/hooks/api/workflow-runs.ts"],"sourcesContent":["import {\n type RerunWorkflowRunBodyDto,\n type WorkflowRunRerunModeDto,\n workflowRunAttemptsResponseSchema,\n workflowRunDetailResponseSchema,\n workflowRunDtoSchema,\n workflowRunListResponseSchema,\n workflowRunResponseSchema,\n} from '@shipfox/api-workflows-dto';\nimport {checkedApiRequest, type StandardSchema} from '@shipfox/client-api';\nimport {\n type InfiniteData,\n infiniteQueryOptions,\n keepPreviousData,\n queryOptions,\n type UseInfiniteQueryOptions,\n type UseQueryOptions,\n useInfiniteQuery,\n useMutation,\n useQuery,\n useQueryClient,\n} from '@tanstack/react-query';\nimport {\n isWorkflowRunTerminal,\n type ManualWorkflowLaunch,\n type WorkflowRun,\n type WorkflowRunAttempt,\n WorkflowRunAttemptSummary,\n type WorkflowRunDetail,\n type WorkflowRunListItem,\n type WorkflowRunListPage,\n type WorkflowRunStatus,\n} from '#core/workflow-run.js';\nimport {\n toWorkflowRunAttempt,\n toWorkflowRunDetail,\n toWorkflowRunListItem,\n toWorkflowRunListPage,\n} from './workflow-run-mapper.js';\n\nexport interface WorkflowRunFilters {\n status?: WorkflowRunStatus | undefined;\n definitionId?: string | undefined;\n triggerSource?: string | undefined;\n createdFrom?: string | undefined;\n createdTo?: string | undefined;\n}\n\nexport const workflowRunsQueryKeys = {\n all: ['workflow-runs'] as const,\n lists: (projectId: string) => [...workflowRunsQueryKeys.all, 'list', projectId] as const,\n list: (projectId: string, filters: WorkflowRunFilters) =>\n [...workflowRunsQueryKeys.lists(projectId), normalizeFilters(filters)] as const,\n detail: (workflowRunId: string, runAttempt?: number | undefined) =>\n [...workflowRunsQueryKeys.all, 'detail', workflowRunId, runAttempt ?? null] as const,\n attempts: (workflowRunId: string) =>\n [...workflowRunsQueryKeys.all, 'attempts', workflowRunId] as const,\n};\n\ntype WorkflowRunsListQueryKey =\n | ReturnType<typeof workflowRunsQueryKeys.list>\n | readonly ['workflow-runs', 'list'];\ntype WorkflowRunDetailQueryKey =\n | ReturnType<typeof workflowRunsQueryKeys.detail>\n | readonly ['workflow-runs', 'detail'];\ntype WorkflowRunAttemptsQueryKey =\n | ReturnType<typeof workflowRunsQueryKeys.attempts>\n | readonly ['workflow-runs', 'attempts'];\ntype WorkflowRunsInfiniteQueryOptions = UseInfiniteQueryOptions<\n WorkflowRunListPage,\n Error,\n InfiniteData<WorkflowRunListPage, string | undefined>,\n WorkflowRunsListQueryKey,\n string | undefined\n>;\ntype WorkflowRunDetailQueryOptions = UseQueryOptions<\n WorkflowRunDetail,\n Error,\n WorkflowRunDetail,\n WorkflowRunDetailQueryKey\n>;\ntype WorkflowRunAttemptsQueryOptions = UseQueryOptions<\n WorkflowRunAttempt[],\n Error,\n WorkflowRunAttempt[],\n WorkflowRunAttemptsQueryKey\n>;\n\nfunction normalizeFilters(filters: WorkflowRunFilters) {\n return {\n status: filters.status ?? null,\n definitionId: filters.definitionId ?? null,\n triggerSource: filters.triggerSource ?? null,\n createdFrom: filters.createdFrom ?? null,\n createdTo: filters.createdTo ?? null,\n };\n}\n\nfunction appendFilters(params: URLSearchParams, filters: WorkflowRunFilters) {\n if (filters.status) params.set('status', filters.status);\n if (filters.definitionId) params.set('definition_id', filters.definitionId);\n if (filters.triggerSource) params.set('trigger_source', filters.triggerSource);\n if (filters.createdFrom) params.set('created_from', filters.createdFrom);\n if (filters.createdTo) params.set('created_to', filters.createdTo);\n}\n\nasync function listWorkflowRuns({\n projectId,\n filters,\n limit = 50,\n cursor,\n signal,\n}: {\n projectId: string;\n filters: WorkflowRunFilters;\n limit?: number;\n cursor?: string | undefined;\n signal?: AbortSignal;\n}): Promise<WorkflowRunListPage> {\n const params = new URLSearchParams({project_id: projectId, limit: String(limit)});\n if (cursor) params.set('cursor', cursor);\n appendFilters(params, filters);\n const response = await checkedApiRequest(\n workflowRunListResponseSchema,\n `/workflows/runs?${params.toString()}`,\n {signal},\n );\n return toWorkflowRunListPage(response);\n}\n\n/**\n * Fire the manual trigger of a workflow definition.\n *\n * The server resolves the manual subscription by definition id (workflows\n * may declare at most one manual trigger). `inputs` are forwarded to the\n * run when provided.\n */\nexport async function fireManualWorkflow({\n definitionId,\n inputs,\n}: {\n definitionId: string;\n inputs?: Record<string, unknown>;\n}): Promise<ManualWorkflowLaunch> {\n const response = await checkedApiRequest(\n manualWorkflowResponseSchema,\n `/workflow-definitions/${definitionId}/fire-manual`,\n {\n method: 'POST',\n body: inputs ? {inputs} : {},\n },\n );\n return {workflowRunId: response.workflow_run_id};\n}\n\nconst ACTIVE_POLL_MS = 4_000;\nconst IDLE_POLL_MS = 30_000;\n\ntype RunListInfinite = InfiniteData<WorkflowRunListPage, string | undefined>;\n\nexport function useWorkflowRunsInfiniteQuery(\n projectId: string | undefined,\n filters: WorkflowRunFilters,\n limit = 50,\n) {\n return useInfiniteQuery(workflowRunsInfiniteQueryOptions(projectId, filters, limit));\n}\n\nexport function workflowRunsInfiniteQueryOptions(\n projectId: string | undefined,\n filters: WorkflowRunFilters,\n limit = 50,\n): WorkflowRunsInfiniteQueryOptions {\n // Polling is owned by react-query, not the page. Polling fast (4s) while\n // any non-terminal run is visible covers state transitions; polling slow\n // (30s) when idle covers brand-new external runs (webhook/schedule\n // triggers) without leaving the list stale.\n //\n // We disable polling once the user has loaded more than one page. With\n // cursor pagination the cursor that bounds page 1 was computed from\n // page 0's last row; if a refetch shifts that boundary, a small range\n // of rows can drop into a between-pages gap. Users who scrolled into\n // history opted into \"reading mode\": pause until they refocus, filter,\n // or scroll back.\n return infiniteQueryOptions({\n queryKey: projectId\n ? workflowRunsQueryKeys.list(projectId, filters)\n : ([...workflowRunsQueryKeys.all, 'list'] as const),\n enabled: Boolean(projectId),\n initialPageParam: undefined as string | undefined,\n queryFn: ({pageParam, signal}) =>\n listWorkflowRuns({projectId: projectId ?? '', filters, limit, cursor: pageParam, signal}),\n getNextPageParam: (lastPage) => lastPage.nextCursor ?? undefined,\n placeholderData: keepPreviousData,\n staleTime: 2_000,\n refetchOnWindowFocus: true,\n refetchInterval: (query) => {\n const data = query.state.data;\n if (!data || data.pages.length > 1) return false;\n const hasActive = data.pages.some((page) =>\n page.runs.some((run) => !isWorkflowRunTerminal(run.status)),\n );\n return hasActive ? ACTIVE_POLL_MS : IDLE_POLL_MS;\n },\n refetchIntervalInBackground: false,\n });\n}\n\nasync function getWorkflowRun({\n workflowRunId,\n runAttempt,\n signal,\n}: {\n workflowRunId: string;\n runAttempt?: number | undefined;\n signal?: AbortSignal;\n}): Promise<WorkflowRunDetail> {\n const params = new URLSearchParams();\n if (runAttempt) params.set('attempt', String(runAttempt));\n const query = params.size > 0 ? `?${params.toString()}` : '';\n return toWorkflowRunDetail(\n await checkedApiRequest(\n workflowRunDetailResponseSchema,\n `/workflows/runs/${workflowRunId}${query}`,\n {\n signal,\n },\n ),\n );\n}\n\nasync function getWorkflowRunAttempts({\n workflowRunId,\n signal,\n}: {\n workflowRunId: string;\n signal?: AbortSignal;\n}): Promise<WorkflowRunAttempt[]> {\n const response = await checkedApiRequest(\n workflowRunAttemptsResponseSchema,\n `/workflows/runs/${workflowRunId}/attempts`,\n {\n signal,\n },\n );\n return response.attempts.map(toWorkflowRunAttempt);\n}\n\nasync function cancelWorkflowRun({\n workflowRunId,\n}: {\n workflowRunId: string;\n}): Promise<WorkflowRunListItem> {\n return toWorkflowRunListItem(\n await checkedApiRequest(workflowRunDtoSchema, `/workflows/runs/${workflowRunId}/cancel`, {\n method: 'POST',\n }),\n );\n}\n\nexport async function rerunWorkflowRun({\n workflowRunId,\n mode,\n}: {\n workflowRunId: string;\n mode: WorkflowRunRerunModeDto;\n}): Promise<WorkflowRunListItem> {\n return toWorkflowRunListItem(\n await checkedApiRequest(workflowRunResponseSchema, `/workflows/runs/${workflowRunId}/rerun`, {\n method: 'POST',\n body: {mode} satisfies RerunWorkflowRunBodyDto,\n }),\n );\n}\n\nconst manualWorkflowResponseSchema: StandardSchema<unknown, {workflow_run_id: string}> = {\n '~standard': {\n version: 1,\n vendor: 'client-workflows',\n validate: (value) => {\n if (\n typeof value === 'object' &&\n value !== null &&\n 'workflow_run_id' in value &&\n typeof value.workflow_run_id === 'string'\n )\n return {value: {workflow_run_id: value.workflow_run_id}};\n return {issues: [{message: 'Expected workflow_run_id.'}]};\n },\n },\n};\n\nexport function useRerunWorkflowRunMutation(projectId: string) {\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: rerunWorkflowRun,\n onSuccess: async (_run, variables) => {\n await Promise.all([\n queryClient.invalidateQueries({queryKey: workflowRunsQueryKeys.lists(projectId)}),\n queryClient.invalidateQueries({\n queryKey: workflowRunsQueryKeys.detail(variables.workflowRunId),\n }),\n queryClient.invalidateQueries({\n queryKey: workflowRunsQueryKeys.attempts(variables.workflowRunId),\n }),\n ]);\n },\n });\n}\n\nfunction filtersAcceptManualPendingRun(\n filters: WorkflowRunFilters,\n definitionId: string,\n now: Date,\n): boolean {\n if (filters.status && filters.status !== 'pending') return false;\n if (filters.definitionId && filters.definitionId !== definitionId) return false;\n if (filters.triggerSource && filters.triggerSource !== 'manual') return false;\n if (filters.createdFrom && Date.parse(filters.createdFrom) > now.getTime()) return false;\n if (filters.createdTo && Date.parse(filters.createdTo) < now.getTime()) return false;\n return true;\n}\n\nfunction buildTempRun({\n projectId,\n definitionId,\n name,\n createdAt,\n}: {\n projectId: string;\n definitionId: string;\n name: string;\n createdAt: string;\n}): WorkflowRunListItem {\n const id = `temp-${cryptoRandomId()}`;\n return {\n id,\n projectId,\n definitionId,\n name,\n status: 'pending',\n currentAttempt: 1,\n latestAttempt: 1,\n triggerProvider: null,\n triggerSource: 'manual',\n triggerEvent: 'fire',\n triggerPayload: {source: 'manual', event: 'fire'},\n triggerDisplayLabel: 'fire',\n triggerLabel: 'manual · fire',\n inputs: null,\n sourceSnapshot: null,\n createdAt,\n updatedAt: createdAt,\n shortId: id.slice(0, 8),\n isTemporary: true,\n runAttempt: new WorkflowRunAttemptSummary({\n workflowRunId: id,\n attempt: 1,\n status: 'pending',\n createdAt,\n startedAt: null,\n finishedAt: null,\n }),\n };\n}\n\nfunction cryptoRandomId(): string {\n if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {\n return crypto.randomUUID();\n }\n return `${Date.now()}-${Math.random().toString(36).slice(2)}`;\n}\n\nexport interface FireManualWorkflowVariables {\n projectId: string;\n definitionId: string;\n inputs?: Record<string, unknown>;\n}\n\nexport function useFireManualWorkflowMutation() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (variables: FireManualWorkflowVariables) =>\n fireManualWorkflow(\n variables.inputs\n ? {definitionId: variables.definitionId, inputs: variables.inputs}\n : {definitionId: variables.definitionId},\n ),\n onMutate: (variables) => {\n const definitionName = lookupDefinitionName(\n queryClient,\n variables.projectId,\n variables.definitionId,\n );\n const createdAt = new Date().toISOString();\n const tempRun = buildTempRun({\n projectId: variables.projectId,\n definitionId: variables.definitionId,\n name: definitionName ?? 'New run',\n createdAt,\n });\n\n const listsKey = workflowRunsQueryKeys.lists(variables.projectId);\n const touchedQueryKeys: Array<readonly unknown[]> = [];\n\n const entries = queryClient.getQueriesData<RunListInfinite>({queryKey: listsKey});\n const now = new Date(createdAt);\n for (const [queryKey] of entries) {\n const filters = readFiltersFromKey(queryKey);\n if (!filters) continue;\n if (!filtersAcceptManualPendingRun(filters, variables.definitionId, now)) continue;\n\n touchedQueryKeys.push(queryKey);\n queryClient.setQueryData<RunListInfinite>(queryKey, (current) => {\n if (!current || current.pages.length === 0) return current;\n const firstPage = current.pages[0];\n if (!firstPage) return current;\n const nextFirstPage: WorkflowRunListPage = {\n ...firstPage,\n runs: [tempRun, ...firstPage.runs],\n filteredTotalCount:\n firstPage.filteredTotalCount != null ? firstPage.filteredTotalCount + 1 : null,\n };\n return {...current, pages: [nextFirstPage, ...current.pages.slice(1)]};\n });\n }\n\n return {tempWorkflowRunId: tempRun.id, touchedQueryKeys};\n },\n onError: (_error, _variables, context) => {\n if (!context) return;\n for (const queryKey of context.touchedQueryKeys) {\n queryClient.setQueryData<RunListInfinite>(queryKey, (current) => {\n if (!current) return current;\n let removedCount = 0;\n const pages = current.pages.map((page) => {\n const runs = page.runs.filter((run) => {\n if (run.id !== context.tempWorkflowRunId) return true;\n removedCount += 1;\n return false;\n });\n if (runs.length === page.runs.length) return page;\n return {\n ...page,\n runs,\n filteredTotalCount:\n page.filteredTotalCount != null\n ? Math.max(0, page.filteredTotalCount - removedCount)\n : null,\n };\n });\n if (removedCount === 0) return current;\n return {...current, pages};\n });\n }\n },\n onSuccess: (_data, variables) => {\n void queryClient.invalidateQueries({\n queryKey: workflowRunsQueryKeys.lists(variables.projectId),\n });\n },\n });\n}\n\nfunction readFiltersFromKey(queryKey: readonly unknown[]): WorkflowRunFilters | null {\n if (queryKey.length < 4) return null;\n const normalized = queryKey[3];\n if (!normalized || typeof normalized !== 'object') return null;\n const obj = normalized as Record<string, unknown>;\n return {\n status: (obj.status as WorkflowRunStatus | null) ?? undefined,\n definitionId: (obj.definitionId as string | null) ?? undefined,\n triggerSource: (obj.triggerSource as string | null) ?? undefined,\n createdFrom: (obj.createdFrom as string | null) ?? undefined,\n createdTo: (obj.createdTo as string | null) ?? undefined,\n };\n}\n\nfunction lookupDefinitionName(\n queryClient: ReturnType<typeof useQueryClient>,\n projectId: string,\n definitionId: string,\n): string | undefined {\n const entries = queryClient.getQueriesData<\n InfiniteData<{definitions: Array<{id: string; name: string}>}>\n >({queryKey: ['definitions', 'list', projectId]});\n for (const [, data] of entries) {\n if (!data) continue;\n for (const page of data.pages) {\n const match = page.definitions.find((d) => d.id === definitionId);\n if (match) return match.name;\n }\n }\n return undefined;\n}\n\nexport function useWorkflowRunQuery(workflowRunId: string | undefined) {\n return useWorkflowRunAttemptQuery({workflowRunId, runAttempt: undefined});\n}\n\nexport function useWorkflowRunAttemptQuery({\n workflowRunId,\n runAttempt,\n}: {\n workflowRunId: string | undefined;\n runAttempt?: number | undefined;\n}) {\n return useQuery(workflowRunQueryOptions({workflowRunId, runAttempt}));\n}\n\nexport function workflowRunQueryOptions({\n workflowRunId,\n runAttempt,\n}: {\n workflowRunId: string | undefined;\n runAttempt?: number | undefined;\n}): WorkflowRunDetailQueryOptions {\n // Poll a non-terminal run so the open run detail stays live (same cadence as the run\n // list); stop once the run is terminal.\n return queryOptions({\n queryKey: workflowRunId\n ? workflowRunsQueryKeys.detail(workflowRunId, runAttempt)\n : ([...workflowRunsQueryKeys.all, 'detail'] as const),\n enabled: Boolean(workflowRunId),\n queryFn: ({signal}) => getWorkflowRun({workflowRunId: workflowRunId ?? '', runAttempt, signal}),\n staleTime: 2_000,\n refetchOnWindowFocus: true,\n refetchInterval: (query) => {\n const status: WorkflowRunDetail['runAttempt']['status'] | undefined =\n query.state.data?.runAttempt.status;\n if (!status) return false;\n return isWorkflowRunTerminal(status) ? false : ACTIVE_POLL_MS;\n },\n refetchIntervalInBackground: false,\n });\n}\n\nexport function useWorkflowRunAttemptsQuery({\n workflowRunId,\n enabled,\n}: {\n workflowRunId: string | undefined;\n enabled: boolean;\n}) {\n return useQuery(workflowRunAttemptsQueryOptions({workflowRunId, enabled}));\n}\n\nexport function workflowRunAttemptsQueryOptions({\n workflowRunId,\n enabled,\n}: {\n workflowRunId: string | undefined;\n enabled: boolean;\n}): WorkflowRunAttemptsQueryOptions {\n return queryOptions({\n queryKey: workflowRunId\n ? workflowRunsQueryKeys.attempts(workflowRunId)\n : ([...workflowRunsQueryKeys.all, 'attempts'] as const),\n enabled: Boolean(workflowRunId) && enabled,\n queryFn: ({signal}) => getWorkflowRunAttempts({workflowRunId: workflowRunId ?? '', signal}),\n staleTime: 0,\n refetchOnMount: true,\n refetchOnWindowFocus: false,\n });\n}\n\nexport function useCancelWorkflowRunMutation(run: WorkflowRun | undefined) {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: async (): Promise<WorkflowRunListItem> => {\n if (!run) throw new Error('Workflow run is not loaded');\n return await cancelWorkflowRun({workflowRunId: run.id});\n },\n onSuccess: async () => {\n if (!run) return;\n await Promise.all([\n queryClient.invalidateQueries({queryKey: workflowRunsQueryKeys.detail(run.id)}),\n queryClient.invalidateQueries({queryKey: workflowRunsQueryKeys.lists(run.projectId)}),\n queryClient.invalidateQueries({queryKey: workflowRunsQueryKeys.attempts(run.id)}),\n ]);\n },\n });\n}\n"],"names":["workflowRunAttemptsResponseSchema","workflowRunDetailResponseSchema","workflowRunDtoSchema","workflowRunListResponseSchema","workflowRunResponseSchema","checkedApiRequest","infiniteQueryOptions","keepPreviousData","queryOptions","useInfiniteQuery","useMutation","useQuery","useQueryClient","isWorkflowRunTerminal","WorkflowRunAttemptSummary","toWorkflowRunAttempt","toWorkflowRunDetail","toWorkflowRunListItem","toWorkflowRunListPage","workflowRunsQueryKeys","all","lists","projectId","list","filters","normalizeFilters","detail","workflowRunId","runAttempt","attempts","status","definitionId","triggerSource","createdFrom","createdTo","appendFilters","params","set","listWorkflowRuns","limit","cursor","signal","URLSearchParams","project_id","String","response","toString","fireManualWorkflow","inputs","manualWorkflowResponseSchema","method","body","workflow_run_id","ACTIVE_POLL_MS","IDLE_POLL_MS","useWorkflowRunsInfiniteQuery","workflowRunsInfiniteQueryOptions","queryKey","enabled","Boolean","initialPageParam","undefined","queryFn","pageParam","getNextPageParam","lastPage","nextCursor","placeholderData","staleTime","refetchOnWindowFocus","refetchInterval","query","data","state","pages","length","hasActive","some","page","runs","run","refetchIntervalInBackground","getWorkflowRun","size","getWorkflowRunAttempts","map","cancelWorkflowRun","rerunWorkflowRun","mode","version","vendor","validate","value","issues","message","useRerunWorkflowRunMutation","queryClient","mutationFn","onSuccess","_run","variables","Promise","invalidateQueries","filtersAcceptManualPendingRun","now","Date","parse","getTime","buildTempRun","name","createdAt","id","cryptoRandomId","currentAttempt","latestAttempt","triggerProvider","triggerEvent","triggerPayload","source","event","triggerDisplayLabel","triggerLabel","sourceSnapshot","updatedAt","shortId","slice","isTemporary","attempt","startedAt","finishedAt","crypto","randomUUID","Math","random","useFireManualWorkflowMutation","onMutate","definitionName","lookupDefinitionName","toISOString","tempRun","listsKey","touchedQueryKeys","entries","getQueriesData","readFiltersFromKey","push","setQueryData","current","firstPage","nextFirstPage","filteredTotalCount","tempWorkflowRunId","onError","_error","_variables","context","removedCount","filter","max","_data","normalized","obj","match","definitions","find","d","useWorkflowRunQuery","useWorkflowRunAttemptQuery","workflowRunQueryOptions","useWorkflowRunAttemptsQuery","workflowRunAttemptsQueryOptions","refetchOnMount","useCancelWorkflowRunMutation","Error"],"mappings":"AAAA,SAGEA,iCAAiC,EACjCC,+BAA+B,EAC/BC,oBAAoB,EACpBC,6BAA6B,EAC7BC,yBAAyB,QACpB,6BAA6B;AACpC,SAAQC,iBAAiB,QAA4B,sBAAsB;AAC3E,SAEEC,oBAAoB,EACpBC,gBAAgB,EAChBC,YAAY,EAGZC,gBAAgB,EAChBC,WAAW,EACXC,QAAQ,EACRC,cAAc,QACT,wBAAwB;AAC/B,SACEC,qBAAqB,EAIrBC,yBAAyB,QAKpB,wBAAwB;AAC/B,SACEC,oBAAoB,EACpBC,mBAAmB,EACnBC,qBAAqB,EACrBC,qBAAqB,QAChB,2BAA2B;AAUlC,OAAO,MAAM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BAA4B,EAC1C9I,aAAa,EACb+B,OAAO,EAIR;IACC,OAAO/C,SAAS+J,gCAAgC;QAAC/I;QAAe+B;IAAO;AACzE;AAEA,OAAO,SAASgH,gCAAgC,EAC9C/I,aAAa,EACb+B,OAAO,EAIR;IACC,OAAOlD,aAAa;QAClBiD,UAAU9B,gBACNR,sBAAsBU,QAAQ,CAACF,iBAC9B;eAAIR,sBAAsBC,GAAG;YAAE;SAAW;QAC/CsC,SAASC,QAAQhC,kBAAkB+B;QACnCI,SAAS,CAAC,EAACrB,MAAM,EAAC,GAAK2C,uBAAuB;gBAACzD,eAAeA,iBAAiB;gBAAIc;YAAM;QACzF2B,WAAW;QACXuG,gBAAgB;QAChBtG,sBAAsB;IACxB;AACF;AAEA,OAAO,SAASuG,6BAA6B5F,GAA4B;IACvE,MAAMgB,cAAcpF;IACpB,OAAOF,YAAY;QACjBuF,YAAY;YACV,IAAI,CAACjB,KAAK,MAAM,IAAI6F,MAAM;YAC1B,OAAO,MAAMvF,kBAAkB;gBAAC3D,eAAeqD,IAAI+B,EAAE;YAAA;QACvD;QACAb,WAAW;YACT,IAAI,CAAClB,KAAK;YACV,MAAMqB,QAAQjF,GAAG,CAAC;gBAChB4E,YAAYM,iBAAiB,CAAC;oBAAC7C,UAAUtC,sBAAsBO,MAAM,CAACsD,IAAI+B,EAAE;gBAAC;gBAC7Ef,YAAYM,iBAAiB,CAAC;oBAAC7C,UAAUtC,sBAAsBE,KAAK,CAAC2D,IAAI1D,SAAS;gBAAC;gBACnF0E,YAAYM,iBAAiB,CAAC;oBAAC7C,UAAUtC,sBAAsBU,QAAQ,CAACmD,IAAI+B,EAAE;gBAAC;aAChF;QACH;IACF;AACF"}
1
+ {"version":3,"sources":["../../../src/hooks/api/workflow-runs.ts"],"sourcesContent":["import {\n type RerunWorkflowRunBodyDto,\n type WorkflowRunRerunModeDto,\n workflowRunAttemptsResponseSchema,\n workflowRunDetailResponseSchema,\n workflowRunDtoSchema,\n workflowRunListResponseSchema,\n workflowRunResponseSchema,\n} from '@shipfox/api-workflows-dto';\nimport {checkedApiRequest, type StandardSchema} from '@shipfox/client-api';\nimport {\n type InfiniteData,\n infiniteQueryOptions,\n keepPreviousData,\n queryOptions,\n type UseInfiniteQueryOptions,\n type UseQueryOptions,\n useInfiniteQuery,\n useMutation,\n useQuery,\n useQueryClient,\n} from '@tanstack/react-query';\nimport {\n isWorkflowRunTerminal,\n type ManualWorkflowLaunch,\n type WorkflowRun,\n type WorkflowRunAttempt,\n WorkflowRunAttemptSummary,\n type WorkflowRunDetail,\n type WorkflowRunListItem,\n type WorkflowRunListPage,\n type WorkflowRunRecord,\n type WorkflowRunStatus,\n} from '#core/workflow-run.js';\nimport {\n toWorkflowRunAttempt,\n toWorkflowRunDetail,\n toWorkflowRunListPage,\n toWorkflowRunRecord,\n} from './workflow-run-mapper.js';\n\nexport interface WorkflowRunFilters {\n status?: WorkflowRunStatus | undefined;\n definitionId?: string | undefined;\n triggerSource?: string | undefined;\n createdFrom?: string | undefined;\n createdTo?: string | undefined;\n}\n\nexport const workflowRunsQueryKeys = {\n all: ['workflow-runs'] as const,\n lists: (projectId: string) => [...workflowRunsQueryKeys.all, 'list', projectId] as const,\n list: (projectId: string, filters: WorkflowRunFilters) =>\n [...workflowRunsQueryKeys.lists(projectId), normalizeFilters(filters)] as const,\n detail: (workflowRunId: string, runAttempt?: number | undefined) =>\n [...workflowRunsQueryKeys.all, 'detail', workflowRunId, runAttempt ?? null] as const,\n attempts: (workflowRunId: string) =>\n [...workflowRunsQueryKeys.all, 'attempts', workflowRunId] as const,\n};\n\ntype WorkflowRunsListQueryKey =\n | ReturnType<typeof workflowRunsQueryKeys.list>\n | readonly ['workflow-runs', 'list'];\ntype WorkflowRunDetailQueryKey =\n | ReturnType<typeof workflowRunsQueryKeys.detail>\n | readonly ['workflow-runs', 'detail'];\ntype WorkflowRunAttemptsQueryKey =\n | ReturnType<typeof workflowRunsQueryKeys.attempts>\n | readonly ['workflow-runs', 'attempts'];\ntype WorkflowRunsInfiniteQueryOptions = UseInfiniteQueryOptions<\n WorkflowRunListPage,\n Error,\n InfiniteData<WorkflowRunListPage, string | undefined>,\n WorkflowRunsListQueryKey,\n string | undefined\n>;\ntype WorkflowRunDetailQueryOptions = UseQueryOptions<\n WorkflowRunDetail,\n Error,\n WorkflowRunDetail,\n WorkflowRunDetailQueryKey\n>;\ntype WorkflowRunAttemptsQueryOptions = UseQueryOptions<\n WorkflowRunAttempt[],\n Error,\n WorkflowRunAttempt[],\n WorkflowRunAttemptsQueryKey\n>;\n\nfunction normalizeFilters(filters: WorkflowRunFilters) {\n return {\n status: filters.status ?? null,\n definitionId: filters.definitionId ?? null,\n triggerSource: filters.triggerSource ?? null,\n createdFrom: filters.createdFrom ?? null,\n createdTo: filters.createdTo ?? null,\n };\n}\n\nfunction appendFilters(params: URLSearchParams, filters: WorkflowRunFilters) {\n if (filters.status) params.set('status', filters.status);\n if (filters.definitionId) params.set('definition_id', filters.definitionId);\n if (filters.triggerSource) params.set('trigger_source', filters.triggerSource);\n if (filters.createdFrom) params.set('created_from', filters.createdFrom);\n if (filters.createdTo) params.set('created_to', filters.createdTo);\n}\n\nasync function listWorkflowRuns({\n projectId,\n filters,\n limit = 50,\n cursor,\n signal,\n}: {\n projectId: string;\n filters: WorkflowRunFilters;\n limit?: number;\n cursor?: string | undefined;\n signal?: AbortSignal;\n}): Promise<WorkflowRunListPage> {\n const params = new URLSearchParams({project_id: projectId, limit: String(limit)});\n if (cursor) params.set('cursor', cursor);\n appendFilters(params, filters);\n const response = await checkedApiRequest(\n workflowRunListResponseSchema,\n `/workflows/runs?${params.toString()}`,\n {signal},\n );\n return toWorkflowRunListPage(response);\n}\n\n/**\n * Fire the manual trigger of a workflow definition.\n *\n * The server resolves the manual subscription by definition id (workflows\n * may declare at most one manual trigger). `inputs` are forwarded to the\n * run when provided.\n */\nexport async function fireManualWorkflow({\n definitionId,\n inputs,\n}: {\n definitionId: string;\n inputs?: Record<string, unknown>;\n}): Promise<ManualWorkflowLaunch> {\n const response = await checkedApiRequest(\n manualWorkflowResponseSchema,\n `/workflow-definitions/${definitionId}/fire-manual`,\n {\n method: 'POST',\n body: inputs ? {inputs} : {},\n },\n );\n return {workflowRunId: response.workflow_run_id};\n}\n\nconst ACTIVE_POLL_MS = 4_000;\nconst IDLE_POLL_MS = 30_000;\n\ntype RunListInfinite = InfiniteData<WorkflowRunListPage, string | undefined>;\n\nexport function useWorkflowRunsInfiniteQuery(\n projectId: string | undefined,\n filters: WorkflowRunFilters,\n limit = 50,\n) {\n return useInfiniteQuery(workflowRunsInfiniteQueryOptions(projectId, filters, limit));\n}\n\nexport function workflowRunsInfiniteQueryOptions(\n projectId: string | undefined,\n filters: WorkflowRunFilters,\n limit = 50,\n): WorkflowRunsInfiniteQueryOptions {\n // Polling is owned by react-query, not the page. Polling fast (4s) while\n // any non-terminal run is visible covers state transitions; polling slow\n // (30s) when idle covers brand-new external runs (webhook/schedule\n // triggers) without leaving the list stale.\n //\n // We disable polling once the user has loaded more than one page. With\n // cursor pagination the cursor that bounds page 1 was computed from\n // page 0's last row; if a refetch shifts that boundary, a small range\n // of rows can drop into a between-pages gap. Users who scrolled into\n // history opted into \"reading mode\": pause until they refocus, filter,\n // or scroll back.\n return infiniteQueryOptions({\n queryKey: projectId\n ? workflowRunsQueryKeys.list(projectId, filters)\n : ([...workflowRunsQueryKeys.all, 'list'] as const),\n enabled: Boolean(projectId),\n initialPageParam: undefined as string | undefined,\n queryFn: ({pageParam, signal}) =>\n listWorkflowRuns({projectId: projectId ?? '', filters, limit, cursor: pageParam, signal}),\n getNextPageParam: (lastPage) => lastPage.nextCursor ?? undefined,\n placeholderData: keepPreviousData,\n staleTime: 2_000,\n refetchOnWindowFocus: true,\n refetchInterval: (query) => {\n const data = query.state.data;\n if (!data || data.pages.length > 1) return false;\n const hasActive = data.pages.some((page) =>\n page.runs.some((run) => !isWorkflowRunTerminal(run.status)),\n );\n return hasActive ? ACTIVE_POLL_MS : IDLE_POLL_MS;\n },\n refetchIntervalInBackground: false,\n });\n}\n\nasync function getWorkflowRun({\n workflowRunId,\n runAttempt,\n signal,\n}: {\n workflowRunId: string;\n runAttempt?: number | undefined;\n signal?: AbortSignal;\n}): Promise<WorkflowRunDetail> {\n const params = new URLSearchParams();\n if (runAttempt) params.set('attempt', String(runAttempt));\n const query = params.size > 0 ? `?${params.toString()}` : '';\n return toWorkflowRunDetail(\n await checkedApiRequest(\n workflowRunDetailResponseSchema,\n `/workflows/runs/${workflowRunId}${query}`,\n {\n signal,\n },\n ),\n );\n}\n\nasync function getWorkflowRunAttempts({\n workflowRunId,\n signal,\n}: {\n workflowRunId: string;\n signal?: AbortSignal;\n}): Promise<WorkflowRunAttempt[]> {\n const response = await checkedApiRequest(\n workflowRunAttemptsResponseSchema,\n `/workflows/runs/${workflowRunId}/attempts`,\n {\n signal,\n },\n );\n return response.attempts.map(toWorkflowRunAttempt);\n}\n\nasync function cancelWorkflowRun({\n workflowRunId,\n}: {\n workflowRunId: string;\n}): Promise<WorkflowRunRecord> {\n return toWorkflowRunRecord(\n await checkedApiRequest(workflowRunDtoSchema, `/workflows/runs/${workflowRunId}/cancel`, {\n method: 'POST',\n }),\n );\n}\n\nexport async function rerunWorkflowRun({\n workflowRunId,\n mode,\n}: {\n workflowRunId: string;\n mode: WorkflowRunRerunModeDto;\n}): Promise<WorkflowRunRecord> {\n return toWorkflowRunRecord(\n await checkedApiRequest(workflowRunResponseSchema, `/workflows/runs/${workflowRunId}/rerun`, {\n method: 'POST',\n body: {mode} satisfies RerunWorkflowRunBodyDto,\n }),\n );\n}\n\nconst manualWorkflowResponseSchema: StandardSchema<unknown, {workflow_run_id: string}> = {\n '~standard': {\n version: 1,\n vendor: 'client-workflows',\n validate: (value) => {\n if (\n typeof value === 'object' &&\n value !== null &&\n 'workflow_run_id' in value &&\n typeof value.workflow_run_id === 'string'\n )\n return {value: {workflow_run_id: value.workflow_run_id}};\n return {issues: [{message: 'Expected workflow_run_id.'}]};\n },\n },\n};\n\nexport function useRerunWorkflowRunMutation(projectId: string) {\n const queryClient = useQueryClient();\n\n return useMutation({\n mutationFn: rerunWorkflowRun,\n onSuccess: async (_run, variables) => {\n await Promise.all([\n queryClient.invalidateQueries({queryKey: workflowRunsQueryKeys.lists(projectId)}),\n queryClient.invalidateQueries({\n queryKey: workflowRunsQueryKeys.detail(variables.workflowRunId),\n }),\n queryClient.invalidateQueries({\n queryKey: workflowRunsQueryKeys.attempts(variables.workflowRunId),\n }),\n ]);\n },\n });\n}\n\nfunction filtersAcceptManualPendingRun(\n filters: WorkflowRunFilters,\n definitionId: string,\n now: Date,\n): boolean {\n if (filters.status && filters.status !== 'pending') return false;\n if (filters.definitionId && filters.definitionId !== definitionId) return false;\n if (filters.triggerSource && filters.triggerSource !== 'manual') return false;\n if (filters.createdFrom && Date.parse(filters.createdFrom) > now.getTime()) return false;\n if (filters.createdTo && Date.parse(filters.createdTo) < now.getTime()) return false;\n return true;\n}\n\nfunction buildTempRun({\n projectId,\n definitionId,\n name,\n createdAt,\n}: {\n projectId: string;\n definitionId: string;\n name: string;\n createdAt: string;\n}): WorkflowRunListItem {\n const id = `temp-${cryptoRandomId()}`;\n return {\n id,\n projectId,\n definitionId,\n number: null,\n name,\n workflowName: name,\n status: 'pending',\n currentAttempt: 1,\n latestAttempt: 1,\n triggerProvider: null,\n triggerSource: 'manual',\n triggerEvent: 'fire',\n triggerPayload: {source: 'manual', event: 'fire'},\n triggerDisplayLabel: 'fire',\n triggerLabel: 'manual · fire',\n triggerReference: null,\n inputs: null,\n sourceSnapshot: null,\n createdAt,\n updatedAt: createdAt,\n isTemporary: true,\n // The optimistic row genuinely has no jobs yet: the server has not planned the graph.\n jobs: {preview: [], statusCounts: [], total: 0},\n runAttempt: new WorkflowRunAttemptSummary({\n workflowRunId: id,\n attempt: 1,\n status: 'pending',\n createdAt,\n startedAt: null,\n finishedAt: null,\n }),\n };\n}\n\nfunction cryptoRandomId(): string {\n if (typeof crypto !== 'undefined' && typeof crypto.randomUUID === 'function') {\n return crypto.randomUUID();\n }\n return `${Date.now()}-${Math.random().toString(36).slice(2)}`;\n}\n\nexport interface FireManualWorkflowVariables {\n projectId: string;\n definitionId: string;\n inputs?: Record<string, unknown>;\n}\n\nexport function useFireManualWorkflowMutation() {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: (variables: FireManualWorkflowVariables) =>\n fireManualWorkflow(\n variables.inputs\n ? {definitionId: variables.definitionId, inputs: variables.inputs}\n : {definitionId: variables.definitionId},\n ),\n onMutate: (variables) => {\n const definitionName = lookupDefinitionName(\n queryClient,\n variables.projectId,\n variables.definitionId,\n );\n const createdAt = new Date().toISOString();\n const tempRun = buildTempRun({\n projectId: variables.projectId,\n definitionId: variables.definitionId,\n name: definitionName ?? 'New run',\n createdAt,\n });\n\n const listsKey = workflowRunsQueryKeys.lists(variables.projectId);\n const touchedQueryKeys: Array<readonly unknown[]> = [];\n\n const entries = queryClient.getQueriesData<RunListInfinite>({queryKey: listsKey});\n const now = new Date(createdAt);\n for (const [queryKey] of entries) {\n const filters = readFiltersFromKey(queryKey);\n if (!filters) continue;\n if (!filtersAcceptManualPendingRun(filters, variables.definitionId, now)) continue;\n\n touchedQueryKeys.push(queryKey);\n queryClient.setQueryData<RunListInfinite>(queryKey, (current) => {\n if (!current || current.pages.length === 0) return current;\n const firstPage = current.pages[0];\n if (!firstPage) return current;\n const nextFirstPage: WorkflowRunListPage = {\n ...firstPage,\n runs: [tempRun, ...firstPage.runs],\n filteredTotalCount:\n firstPage.filteredTotalCount != null ? firstPage.filteredTotalCount + 1 : null,\n };\n return {...current, pages: [nextFirstPage, ...current.pages.slice(1)]};\n });\n }\n\n return {tempWorkflowRunId: tempRun.id, touchedQueryKeys};\n },\n onError: (_error, _variables, context) => {\n if (!context) return;\n for (const queryKey of context.touchedQueryKeys) {\n queryClient.setQueryData<RunListInfinite>(queryKey, (current) => {\n if (!current) return current;\n let removedCount = 0;\n const pages = current.pages.map((page) => {\n const runs = page.runs.filter((run) => {\n if (run.id !== context.tempWorkflowRunId) return true;\n removedCount += 1;\n return false;\n });\n if (runs.length === page.runs.length) return page;\n return {\n ...page,\n runs,\n filteredTotalCount:\n page.filteredTotalCount != null\n ? Math.max(0, page.filteredTotalCount - removedCount)\n : null,\n };\n });\n if (removedCount === 0) return current;\n return {...current, pages};\n });\n }\n },\n onSuccess: (_data, variables) => {\n void queryClient.invalidateQueries({\n queryKey: workflowRunsQueryKeys.lists(variables.projectId),\n });\n },\n });\n}\n\nfunction readFiltersFromKey(queryKey: readonly unknown[]): WorkflowRunFilters | null {\n if (queryKey.length < 4) return null;\n const normalized = queryKey[3];\n if (!normalized || typeof normalized !== 'object') return null;\n const obj = normalized as Record<string, unknown>;\n return {\n status: (obj.status as WorkflowRunStatus | null) ?? undefined,\n definitionId: (obj.definitionId as string | null) ?? undefined,\n triggerSource: (obj.triggerSource as string | null) ?? undefined,\n createdFrom: (obj.createdFrom as string | null) ?? undefined,\n createdTo: (obj.createdTo as string | null) ?? undefined,\n };\n}\n\nfunction lookupDefinitionName(\n queryClient: ReturnType<typeof useQueryClient>,\n projectId: string,\n definitionId: string,\n): string | undefined {\n const entries = queryClient.getQueriesData<\n InfiniteData<{definitions: Array<{id: string; name: string}>}>\n >({queryKey: ['definitions', 'list', projectId]});\n for (const [, data] of entries) {\n if (!data) continue;\n for (const page of data.pages) {\n const match = page.definitions.find((d) => d.id === definitionId);\n if (match) return match.name;\n }\n }\n return undefined;\n}\n\nexport function useWorkflowRunQuery(workflowRunId: string | undefined) {\n return useWorkflowRunAttemptQuery({workflowRunId, runAttempt: undefined});\n}\n\nexport function useWorkflowRunAttemptQuery({\n workflowRunId,\n runAttempt,\n}: {\n workflowRunId: string | undefined;\n runAttempt?: number | undefined;\n}) {\n return useQuery(workflowRunQueryOptions({workflowRunId, runAttempt}));\n}\n\nexport function workflowRunQueryOptions({\n workflowRunId,\n runAttempt,\n}: {\n workflowRunId: string | undefined;\n runAttempt?: number | undefined;\n}): WorkflowRunDetailQueryOptions {\n // Poll a non-terminal run so the open run detail stays live (same cadence as the run\n // list); stop once the run is terminal.\n return queryOptions({\n queryKey: workflowRunId\n ? workflowRunsQueryKeys.detail(workflowRunId, runAttempt)\n : ([...workflowRunsQueryKeys.all, 'detail'] as const),\n enabled: Boolean(workflowRunId),\n queryFn: ({signal}) => getWorkflowRun({workflowRunId: workflowRunId ?? '', runAttempt, signal}),\n staleTime: 2_000,\n refetchOnWindowFocus: true,\n refetchInterval: (query) => {\n const status: WorkflowRunDetail['runAttempt']['status'] | undefined =\n query.state.data?.runAttempt.status;\n if (!status) return false;\n return isWorkflowRunTerminal(status) ? false : ACTIVE_POLL_MS;\n },\n refetchIntervalInBackground: false,\n });\n}\n\nexport function useWorkflowRunAttemptsQuery({\n workflowRunId,\n enabled,\n}: {\n workflowRunId: string | undefined;\n enabled: boolean;\n}) {\n return useQuery(workflowRunAttemptsQueryOptions({workflowRunId, enabled}));\n}\n\nexport function workflowRunAttemptsQueryOptions({\n workflowRunId,\n enabled,\n}: {\n workflowRunId: string | undefined;\n enabled: boolean;\n}): WorkflowRunAttemptsQueryOptions {\n return queryOptions({\n queryKey: workflowRunId\n ? workflowRunsQueryKeys.attempts(workflowRunId)\n : ([...workflowRunsQueryKeys.all, 'attempts'] as const),\n enabled: Boolean(workflowRunId) && enabled,\n queryFn: ({signal}) => getWorkflowRunAttempts({workflowRunId: workflowRunId ?? '', signal}),\n staleTime: 0,\n refetchOnMount: true,\n refetchOnWindowFocus: false,\n });\n}\n\nexport function useCancelWorkflowRunMutation(run: WorkflowRun | undefined) {\n const queryClient = useQueryClient();\n return useMutation({\n mutationFn: async (): Promise<WorkflowRunRecord> => {\n if (!run) throw new Error('Workflow run is not loaded');\n return await cancelWorkflowRun({workflowRunId: run.id});\n },\n onSuccess: async () => {\n if (!run) return;\n await Promise.all([\n queryClient.invalidateQueries({queryKey: workflowRunsQueryKeys.detail(run.id)}),\n queryClient.invalidateQueries({queryKey: workflowRunsQueryKeys.lists(run.projectId)}),\n queryClient.invalidateQueries({queryKey: workflowRunsQueryKeys.attempts(run.id)}),\n ]);\n },\n });\n}\n"],"names":["workflowRunAttemptsResponseSchema","workflowRunDetailResponseSchema","workflowRunDtoSchema","workflowRunListResponseSchema","workflowRunResponseSchema","checkedApiRequest","infiniteQueryOptions","keepPreviousData","queryOptions","useInfiniteQuery","useMutation","useQuery","useQueryClient","isWorkflowRunTerminal","WorkflowRunAttemptSummary","toWorkflowRunAttempt","toWorkflowRunDetail","toWorkflowRunListPage","toWorkflowRunRecord","workflowRunsQueryKeys","all","lists","projectId","list","filters","normalizeFilters","detail","workflowRunId","runAttempt","attempts","status","definitionId","triggerSource","createdFrom","createdTo","appendFilters","params","set","listWorkflowRuns","limit","cursor","signal","URLSearchParams","project_id","String","response","toString","fireManualWorkflow","inputs","manualWorkflowResponseSchema","method","body","workflow_run_id","ACTIVE_POLL_MS","IDLE_POLL_MS","useWorkflowRunsInfiniteQuery","workflowRunsInfiniteQueryOptions","queryKey","enabled","Boolean","initialPageParam","undefined","queryFn","pageParam","getNextPageParam","lastPage","nextCursor","placeholderData","staleTime","refetchOnWindowFocus","refetchInterval","query","data","state","pages","length","hasActive","some","page","runs","run","refetchIntervalInBackground","getWorkflowRun","size","getWorkflowRunAttempts","map","cancelWorkflowRun","rerunWorkflowRun","mode","version","vendor","validate","value","issues","message","useRerunWorkflowRunMutation","queryClient","mutationFn","onSuccess","_run","variables","Promise","invalidateQueries","filtersAcceptManualPendingRun","now","Date","parse","getTime","buildTempRun","name","createdAt","id","cryptoRandomId","number","workflowName","currentAttempt","latestAttempt","triggerProvider","triggerEvent","triggerPayload","source","event","triggerDisplayLabel","triggerLabel","triggerReference","sourceSnapshot","updatedAt","isTemporary","jobs","preview","statusCounts","total","attempt","startedAt","finishedAt","crypto","randomUUID","Math","random","slice","useFireManualWorkflowMutation","onMutate","definitionName","lookupDefinitionName","toISOString","tempRun","listsKey","touchedQueryKeys","entries","getQueriesData","readFiltersFromKey","push","setQueryData","current","firstPage","nextFirstPage","filteredTotalCount","tempWorkflowRunId","onError","_error","_variables","context","removedCount","filter","max","_data","normalized","obj","match","definitions","find","d","useWorkflowRunQuery","useWorkflowRunAttemptQuery","workflowRunQueryOptions","useWorkflowRunAttemptsQuery","workflowRunAttemptsQueryOptions","refetchOnMount","useCancelWorkflowRunMutation","Error"],"mappings":"AAAA,SAGEA,iCAAiC,EACjCC,+BAA+B,EAC/BC,oBAAoB,EACpBC,6BAA6B,EAC7BC,yBAAyB,QACpB,6BAA6B;AACpC,SAAQC,iBAAiB,QAA4B,sBAAsB;AAC3E,SAEEC,oBAAoB,EACpBC,gBAAgB,EAChBC,YAAY,EAGZC,gBAAgB,EAChBC,WAAW,EACXC,QAAQ,EACRC,cAAc,QACT,wBAAwB;AAC/B,SACEC,qBAAqB,EAIrBC,yBAAyB,QAMpB,wBAAwB;AAC/B,SACEC,oBAAoB,EACpBC,mBAAmB,EACnBC,qBAAqB,EACrBC,mBAAmB,QACd,2BAA2B;AAUlC,OAAO,MAAMC,wBAAwB;IACnCC,KAAK;QAAC;KAAgB;IACtBC,OAAO,CAACC,YAAsB;eAAIH,sBAAsBC,GAAG;YAAE;YAAQE;SAAU;IAC/EC,MAAM,CAACD,WAAmBE,UACxB;eAAIL,sBAAsBE,KAAK,CAACC;YAAYG,iBAAiBD;SAAS;IACxEE,QAAQ,CAACC,eAAuBC,aAC9B;eAAIT,sBAAsBC,GAAG;YAAE;YAAUO;YAAeC,cAAc;SAAK;IAC7EC,UAAU,CAACF,gBACT;eAAIR,sBAAsBC,GAAG;YAAE;YAAYO;SAAc;AAC7D,EAAE;AA+BF,SAASF,iBAAiBD,OAA2B;IACnD,OAAO;QACLM,QAAQN,QAAQM,MAAM,IAAI;QAC1BC,cAAcP,QAAQO,YAAY,IAAI;QACtCC,eAAeR,QAAQQ,aAAa,IAAI;QACxCC,aAAaT,QAAQS,WAAW,IAAI;QACpCC,WAAWV,QAAQU,SAAS,IAAI;IAClC;AACF;AAEA,SAASC,cAAc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MgB,cAAcpF;IACpB,OAAOF,YAAY;QACjBuF,YAAY;YACV,IAAI,CAACjB,KAAK,MAAM,IAAImG,MAAM;YAC1B,OAAO,MAAM7F,kBAAkB;gBAAC3D,eAAeqD,IAAI+B,EAAE;YAAA;QACvD;QACAb,WAAW;YACT,IAAI,CAAClB,KAAK;YACV,MAAMqB,QAAQjF,GAAG,CAAC;gBAChB4E,YAAYM,iBAAiB,CAAC;oBAAC7C,UAAUtC,sBAAsBO,MAAM,CAACsD,IAAI+B,EAAE;gBAAC;gBAC7Ef,YAAYM,iBAAiB,CAAC;oBAAC7C,UAAUtC,sBAAsBE,KAAK,CAAC2D,IAAI1D,SAAS;gBAAC;gBACnF0E,YAAYM,iBAAiB,CAAC;oBAAC7C,UAAUtC,sBAAsBU,QAAQ,CAACmD,IAAI+B,EAAE;gBAAC;aAChF;QACH;IACF;AACF"}
package/dist/index.d.ts CHANGED
@@ -1,6 +1,7 @@
1
- export type { AgentConfigIssue, JobDisplayDuration, JobExecutionDisplayDuration, JobExecutionStatus, JobExecutionTime, JobStatus, ManualWorkflowLaunch, Step, StepAttempt, StepAttemptDisplayDuration, StepError, StepErrorCategory, StepErrorReason, StepGateResult, StepSourceLocation, WorkflowRun, WorkflowRunAttempt, WorkflowRunDetail, WorkflowRunListPage, WorkflowRunStatus, WorkflowSourceSnapshot, WorkflowStatus, } from '#core/workflow-run.js';
2
- export { isWorkflowRunTerminal, isWorkflowStatus, Job, JobExecution, TERMINAL_WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_STATUSES, workflowRunShortId, workflowRunTriggerLabel, } from '#core/workflow-run.js';
1
+ export type { AgentConfigIssue, JobDisplayDuration, JobDisplayStatus, JobExecutionDisplayDuration, JobExecutionDisplayStatus, JobExecutionStatus, JobExecutionTime, JobStatus, ManualWorkflowLaunch, Step, StepAttempt, StepAttemptDisplayDuration, StepError, StepErrorCategory, StepErrorReason, StepGateResult, StepSourceLocation, WorkflowDisplayStatus, WorkflowRun, WorkflowRunAttempt, WorkflowRunDetail, WorkflowRunListPage, WorkflowRunStatus, WorkflowSourceSnapshot, WorkflowStatus, } from '#core/workflow-run.js';
2
+ export { deriveJobDisplayStatus, deriveJobExecutionDisplayStatus, isWorkflowRunTerminal, isWorkflowStatus, Job, JobExecution, TERMINAL_WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_STATUSES, workflowRunTriggerLabel, } from '#core/workflow-run.js';
3
3
  export { type FireManualWorkflowVariables, fireManualWorkflow, useCancelWorkflowRunMutation, useFireManualWorkflowMutation, useWorkflowRunAttemptsQuery, useWorkflowRunQuery, useWorkflowRunsInfiniteQuery, type WorkflowRunFilters, workflowRunAttemptsQueryOptions, workflowRunQueryOptions, workflowRunsInfiniteQueryOptions, workflowRunsQueryKeys, } from './hooks/api/workflow-runs.js';
4
4
  export { ProjectWorkflowsPage } from './pages/project-workflows-page.js';
5
- export { WorkflowRunPage } from './pages/workflow-run-page.js';
5
+ export { WorkflowRunDetailPage } from './pages/workflow-run-detail-page.js';
6
+ export { WorkflowRunsPage } from './pages/workflow-run-list-page.js';
6
7
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../src/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,gBAAgB,EAChB,kBAAkB,EAClB,2BAA2B,EAC3B,kBAAkB,EAClB,gBAAgB,EAChB,SAAS,EACT,oBAAoB,EACpB,IAAI,EACJ,WAAW,EACX,0BAA0B,EAC1B,SAAS,EACT,iBAAiB,EACjB,eAAe,EACf,cAAc,EACd,kBAAkB,EAClB,WAAW,EACX,kBAAkB,EAClB,iBAAiB,EACjB,mBAAmB,EACnB,iBAAiB,EACjB,sBAAsB,EACtB,cAAc,GACf,MAAM,uBAAuB,CAAC;AAC/B,OAAO,EACL,qBAAqB,EACrB,gBAAgB,EAChB,GAAG,EACH,YAAY,EACZ,8BAA8B,EAC9B,qBAAqB,EACrB,kBAAkB,EAClB,uBAAuB,GACxB,M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C,CAAC;AACvE,OAAO,EAAC,qBAAqB,EAAC,MAAM,qCAAqC,CAAC;AAC1E,OAAO,EAAC,gBAAgB,EAAC,MAAM,mCAAmC,CAAC"}
package/dist/index.js CHANGED
@@ -1,6 +1,7 @@
1
- export { isWorkflowRunTerminal, isWorkflowStatus, Job, JobExecution, TERMINAL_WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_STATUSES, workflowRunShortId, workflowRunTriggerLabel } from '#core/workflow-run.js';
1
+ export { deriveJobDisplayStatus, deriveJobExecutionDisplayStatus, isWorkflowRunTerminal, isWorkflowStatus, Job, JobExecution, TERMINAL_WORKFLOW_RUN_STATUSES, WORKFLOW_RUN_STATUSES, workflowRunTriggerLabel } from '#core/workflow-run.js';
2
2
  export { fireManualWorkflow, useCancelWorkflowRunMutation, useFireManualWorkflowMutation, useWorkflowRunAttemptsQuery, useWorkflowRunQuery, useWorkflowRunsInfiniteQuery, workflowRunAttemptsQueryOptions, workflowRunQueryOptions, workflowRunsInfiniteQueryOptions, workflowRunsQueryKeys } from './hooks/api/workflow-runs.js';
3
3
  export { ProjectWorkflowsPage } from './pages/project-workflows-page.js';
4
- export { WorkflowRunPage } from './pages/workflow-run-page.js';
4
+ export { WorkflowRunDetailPage } from './pages/workflow-run-detail-page.js';
5
+ export { WorkflowRunsPage } from './pages/workflow-run-list-page.js';
5
6
 
6
7
  //# sourceMappingURL=index.js.map
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export type {\n AgentConfigIssue,\n JobDisplayDuration,\n JobExecutionDisplayDuration,\n JobExecutionStatus,\n JobExecutionTime,\n JobStatus,\n ManualWorkflowLaunch,\n Step,\n StepAttempt,\n StepAttemptDisplayDuration,\n StepError,\n StepErrorCategory,\n StepErrorReason,\n StepGateResult,\n StepSourceLocation,\n WorkflowRun,\n WorkflowRunAttempt,\n WorkflowRunDetail,\n WorkflowRunListPage,\n WorkflowRunStatus,\n WorkflowSourceSnapshot,\n WorkflowStatus,\n} from '#core/workflow-run.js';\nexport {\n isWorkflowRunTerminal,\n isWorkflowStatus,\n Job,\n JobExecution,\n TERMINAL_WORKFLOW_RUN_STATUSES,\n WORKFLOW_RUN_STATUSES,\n workflowRunShortId,\n workflowRunTriggerLabel,\n} from '#core/workflow-run.js';\nexport {\n type FireManualWorkflowVariables,\n fireManualWorkflow,\n useCancelWorkflowRunMutation,\n useFireManualWorkflowMutation,\n useWorkflowRunAttemptsQuery,\n useWorkflowRunQuery,\n useWorkflowRunsInfiniteQuery,\n type WorkflowRunFilters,\n workflowRunAttemptsQueryOptions,\n workflowRunQueryOptions,\n workflowRunsInfiniteQueryOptions,\n workflowRunsQueryKeys,\n} from './hooks/api/workflow-runs.js';\nexport {ProjectWorkflowsPage} from './pages/project-workflows-page.js';\nexport {WorkflowRunPage} from './pages/workflow-run-page.js';\n"],"names":["isWorkflowRunTerminal","isWorkflowStatus","Job","JobExecution","TERMINAL_WORKFLOW_RUN_STATUSES","WORKFLOW_RUN_STATUSES","workflowRunShortId","workflowRunTriggerLabel","fireManualWorkflow","useCancelWorkflowRunMutation","useFireManualWorkflowMutation","useWorkflowRunAttemptsQuery","useWorkflowRunQuery","useWorkflowRunsInfiniteQuery","workflowRunAttemptsQueryOptions","workflowRunQueryOptions","workflowRunsInfiniteQueryOptions","workflowRunsQueryKeys","ProjectWorkflowsPage","WorkflowRunPage"],"mappings":"AAwBA,SACEA,qBAAqB,EACrBC,gBAAgB,EAChBC,GAAG,EACHC,YAAY,EACZC,8BAA8B,EAC9BC,qBAAqB,EACrBC,kBAAkB,EAClBC,uBAAuB,QAClB,wBAAwB;AAC/B,SAEEC,kBAAkB,EAClBC,4BAA4B,EAC5BC,6BAA6B,EAC7BC,2BAA2B,EAC3BC,mBAAmB,EACnBC,4BAA4B,EAE5BC,+BAA+B,EAC/BC,uBAAuB,EACvBC,gCAAgC,EAChCC,qBAAqB,QAChB,+BAA+B;AACtC,SAAQC,oBAAoB,QAAO,oCAAoC;AACvE,SAAQC,eAAe,QAAO,+BAA+B"}
1
+ {"version":3,"sources":["../src/index.ts"],"sourcesContent":["export type {\n AgentConfigIssue,\n JobDisplayDuration,\n JobDisplayStatus,\n JobExecutionDisplayDuration,\n JobExecutionDisplayStatus,\n JobExecutionStatus,\n JobExecutionTime,\n JobStatus,\n ManualWorkflowLaunch,\n Step,\n StepAttempt,\n StepAttemptDisplayDuration,\n StepError,\n StepErrorCategory,\n StepErrorReason,\n StepGateResult,\n StepSourceLocation,\n WorkflowDisplayStatus,\n WorkflowRun,\n WorkflowRunAttempt,\n WorkflowRunDetail,\n WorkflowRunListPage,\n WorkflowRunStatus,\n WorkflowSourceSnapshot,\n WorkflowStatus,\n} from '#core/workflow-run.js';\nexport {\n deriveJobDisplayStatus,\n deriveJobExecutionDisplayStatus,\n isWorkflowRunTerminal,\n isWorkflowStatus,\n Job,\n JobExecution,\n TERMINAL_WORKFLOW_RUN_STATUSES,\n WORKFLOW_RUN_STATUSES,\n workflowRunTriggerLabel,\n} from '#core/workflow-run.js';\nexport {\n type FireManualWorkflowVariables,\n fireManualWorkflow,\n useCancelWorkflowRunMutation,\n useFireManualWorkflowMutation,\n useWorkflowRunAttemptsQuery,\n useWorkflowRunQuery,\n useWorkflowRunsInfiniteQuery,\n type WorkflowRunFilters,\n workflowRunAttemptsQueryOptions,\n workflowRunQueryOptions,\n workflowRunsInfiniteQueryOptions,\n workflowRunsQueryKeys,\n} from './hooks/api/workflow-runs.js';\nexport {ProjectWorkflowsPage} from './pages/project-workflows-page.js';\nexport {WorkflowRunDetailPage} from './pages/workflow-run-detail-page.js';\nexport {WorkflowRunsPage} from './pages/workflow-run-list-page.js';\n"],"names":["deriveJobDisplayStatus","deriveJobExecutionDisplayStatus","isWorkflowRunTerminal","isWorkflowStatus","Job","JobExecution","TERMINAL_WORKFLOW_RUN_STATUSES","WORKFLOW_RUN_STATUSES","workflowRunTriggerLabel","fireManualWorkflow","useCancelWorkflowRunMutation","useFireManualWorkflowMutation","useWorkflowRunAttemptsQuery","useWorkflowRunQuery","useWorkflowRunsInfiniteQuery","workflowRunAttemptsQueryOptions","workflowRunQueryOptions","workflowRunsInfiniteQueryOptions","workflowRunsQueryKeys","ProjectWorkflowsPage","WorkflowRunDetailPage","WorkflowRunsPage"],"mappings":"AA2BA,SACEA,sBAAsB,EACtBC,+BAA+B,EAC/BC,qBAAqB,EACrBC,gBAAgB,EAChBC,GAAG,EACHC,YAAY,EACZC,8BAA8B,EAC9BC,qBAAqB,EACrBC,uBAAuB,QAClB,wBAAwB;AAC/B,SAEEC,kBAAkB,EAClBC,4BAA4B,EAC5BC,6BAA6B,EAC7BC,2BAA2B,EAC3BC,mBAAmB,EACnBC,4BAA4B,EAE5BC,+BAA+B,EAC/BC,uBAAuB,EACvBC,gCAAgC,EAChCC,qBAAqB,QAChB,+BAA+B;AACtC,SAAQC,oBAAoB,QAAO,oCAAoC;AACvE,SAAQC,qBAAqB,QAAO,sCAAsC;AAC1E,SAAQC,gBAAgB,QAAO,oCAAoC"}