@flanksource/clicky-ui 0.3.83 → 0.3.85

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 (344) hide show
  1. package/dist/components/Combobox.cjs +8 -6
  2. package/dist/components/Combobox.cjs.map +1 -1
  3. package/dist/components/Combobox.d.ts.map +1 -1
  4. package/dist/components/Combobox.js +8 -6
  5. package/dist/components/Combobox.js.map +1 -1
  6. package/dist/components/ComboboxMenu.cjs +7 -4
  7. package/dist/components/ComboboxMenu.cjs.map +1 -1
  8. package/dist/components/ComboboxMenu.d.ts +3 -2
  9. package/dist/components/ComboboxMenu.d.ts.map +1 -1
  10. package/dist/components/ComboboxMenu.js +7 -4
  11. package/dist/components/ComboboxMenu.js.map +1 -1
  12. package/dist/components/DateField.cjs.map +1 -1
  13. package/dist/components/DateField.d.ts +3 -2
  14. package/dist/components/DateField.d.ts.map +1 -1
  15. package/dist/components/DateField.js.map +1 -1
  16. package/dist/components/DatePicker.cjs +9 -61
  17. package/dist/components/DatePicker.cjs.map +1 -1
  18. package/dist/components/DatePicker.d.ts +5 -19
  19. package/dist/components/DatePicker.d.ts.map +1 -1
  20. package/dist/components/DatePicker.js +11 -63
  21. package/dist/components/DatePicker.js.map +1 -1
  22. package/dist/components/DateTimePicker.cjs +9 -78
  23. package/dist/components/DateTimePicker.cjs.map +1 -1
  24. package/dist/components/DateTimePicker.d.ts +5 -19
  25. package/dist/components/DateTimePicker.d.ts.map +1 -1
  26. package/dist/components/DateTimePicker.js +11 -80
  27. package/dist/components/DateTimePicker.js.map +1 -1
  28. package/dist/components/FilterBar.cjs +64 -47
  29. package/dist/components/FilterBar.cjs.map +1 -1
  30. package/dist/components/FilterBar.d.ts +20 -2
  31. package/dist/components/FilterBar.d.ts.map +1 -1
  32. package/dist/components/FilterBar.js +63 -46
  33. package/dist/components/FilterBar.js.map +1 -1
  34. package/dist/components/TimeRange.cjs +156 -128
  35. package/dist/components/TimeRange.cjs.map +1 -1
  36. package/dist/components/TimeRange.d.ts +8 -1
  37. package/dist/components/TimeRange.d.ts.map +1 -1
  38. package/dist/components/TimeRange.js +156 -128
  39. package/dist/components/TimeRange.js.map +1 -1
  40. package/dist/components/calendar-grid.cjs +83 -0
  41. package/dist/components/calendar-grid.cjs.map +1 -0
  42. package/dist/components/calendar-grid.d.ts +9 -0
  43. package/dist/components/calendar-grid.d.ts.map +1 -0
  44. package/dist/components/calendar-grid.js +83 -0
  45. package/dist/components/calendar-grid.js.map +1 -0
  46. package/dist/components/combobox-types.d.ts +5 -0
  47. package/dist/components/combobox-types.d.ts.map +1 -1
  48. package/dist/components/date-input-field.cjs +88 -0
  49. package/dist/components/date-input-field.cjs.map +1 -0
  50. package/dist/components/date-input-field.d.ts +37 -0
  51. package/dist/components/date-input-field.d.ts.map +1 -0
  52. package/dist/components/date-input-field.js +88 -0
  53. package/dist/components/date-input-field.js.map +1 -0
  54. package/dist/components/date-math.cjs +67 -0
  55. package/dist/components/date-math.cjs.map +1 -0
  56. package/dist/components/date-math.d.ts +33 -0
  57. package/dist/components/date-math.d.ts.map +1 -0
  58. package/dist/components/date-math.js +60 -0
  59. package/dist/components/date-math.js.map +1 -0
  60. package/dist/components/date-picker-menu.cjs +129 -0
  61. package/dist/components/date-picker-menu.cjs.map +1 -0
  62. package/dist/components/date-picker-menu.d.ts +18 -0
  63. package/dist/components/date-picker-menu.d.ts.map +1 -0
  64. package/dist/components/date-picker-menu.js +129 -0
  65. package/dist/components/date-picker-menu.js.map +1 -0
  66. package/dist/components/filter-bar-context.cjs.map +1 -1
  67. package/dist/components/filter-bar-context.d.ts +2 -0
  68. package/dist/components/filter-bar-context.d.ts.map +1 -1
  69. package/dist/components/filter-bar-context.js.map +1 -1
  70. package/dist/components/filter-bar-field-utils.cjs +18 -4
  71. package/dist/components/filter-bar-field-utils.cjs.map +1 -1
  72. package/dist/components/filter-bar-field-utils.d.ts +3 -2
  73. package/dist/components/filter-bar-field-utils.d.ts.map +1 -1
  74. package/dist/components/filter-bar-field-utils.js +19 -5
  75. package/dist/components/filter-bar-field-utils.js.map +1 -1
  76. package/dist/components/filter-bar-menu.cjs +189 -0
  77. package/dist/components/filter-bar-menu.cjs.map +1 -0
  78. package/dist/components/filter-bar-menu.d.ts +25 -0
  79. package/dist/components/filter-bar-menu.d.ts.map +1 -0
  80. package/dist/components/filter-bar-menu.js +189 -0
  81. package/dist/components/filter-bar-menu.js.map +1 -0
  82. package/dist/components/filter-bar-multi.cjs +1 -1
  83. package/dist/components/filter-bar-multi.cjs.map +1 -1
  84. package/dist/components/filter-bar-multi.js +2 -2
  85. package/dist/components/filter-bar-multi.js.map +1 -1
  86. package/dist/components/filter-bar-popup.cjs +37 -0
  87. package/dist/components/filter-bar-popup.cjs.map +1 -0
  88. package/dist/components/filter-bar-popup.d.ts +32 -0
  89. package/dist/components/filter-bar-popup.d.ts.map +1 -0
  90. package/dist/components/filter-bar-popup.js +37 -0
  91. package/dist/components/filter-bar-popup.js.map +1 -0
  92. package/dist/components/filter-bar-tree.cjs +1 -1
  93. package/dist/components/filter-bar-tree.cjs.map +1 -1
  94. package/dist/components/filter-bar-tree.js +2 -2
  95. package/dist/components/filter-bar-tree.js.map +1 -1
  96. package/dist/components/json-schema-form-date-math.cjs +15 -11
  97. package/dist/components/json-schema-form-date-math.cjs.map +1 -1
  98. package/dist/components/json-schema-form-date-math.d.ts +3 -0
  99. package/dist/components/json-schema-form-date-math.d.ts.map +1 -1
  100. package/dist/components/json-schema-form-date-math.js +15 -12
  101. package/dist/components/json-schema-form-date-math.js.map +1 -1
  102. package/dist/components/json-schema-form-table-array.cjs +5 -3
  103. package/dist/components/json-schema-form-table-array.cjs.map +1 -1
  104. package/dist/components/json-schema-form-table-array.d.ts.map +1 -1
  105. package/dist/components/json-schema-form-table-array.js +5 -3
  106. package/dist/components/json-schema-form-table-array.js.map +1 -1
  107. package/dist/components.cjs +1 -1
  108. package/dist/components.d.ts +1 -0
  109. package/dist/components.d.ts.map +1 -1
  110. package/dist/components.js +1 -1
  111. package/dist/connections/ConnectionPicker.cjs +6 -2
  112. package/dist/connections/ConnectionPicker.cjs.map +1 -1
  113. package/dist/connections/ConnectionPicker.d.ts.map +1 -1
  114. package/dist/connections/ConnectionPicker.js +6 -2
  115. package/dist/connections/ConnectionPicker.js.map +1 -1
  116. package/dist/connections/CreateConnectionDialog.cjs +8 -21
  117. package/dist/connections/CreateConnectionDialog.cjs.map +1 -1
  118. package/dist/connections/CreateConnectionDialog.d.ts +2 -1
  119. package/dist/connections/CreateConnectionDialog.d.ts.map +1 -1
  120. package/dist/connections/CreateConnectionDialog.js +8 -21
  121. package/dist/connections/CreateConnectionDialog.js.map +1 -1
  122. package/dist/data/ExpandableMarkdown.cjs +59 -0
  123. package/dist/data/ExpandableMarkdown.cjs.map +1 -0
  124. package/dist/data/ExpandableMarkdown.d.ts +17 -0
  125. package/dist/data/ExpandableMarkdown.d.ts.map +1 -0
  126. package/dist/data/ExpandableMarkdown.js +59 -0
  127. package/dist/data/ExpandableMarkdown.js.map +1 -0
  128. package/dist/data/MultiGaugeBar.cjs +49 -21
  129. package/dist/data/MultiGaugeBar.cjs.map +1 -1
  130. package/dist/data/MultiGaugeBar.d.ts +5 -2
  131. package/dist/data/MultiGaugeBar.d.ts.map +1 -1
  132. package/dist/data/MultiGaugeBar.js +49 -21
  133. package/dist/data/MultiGaugeBar.js.map +1 -1
  134. package/dist/data/PromptDialog.cjs +19 -5
  135. package/dist/data/PromptDialog.cjs.map +1 -1
  136. package/dist/data/PromptDialog.d.ts +15 -1
  137. package/dist/data/PromptDialog.d.ts.map +1 -1
  138. package/dist/data/PromptDialog.js +19 -5
  139. package/dist/data/PromptDialog.js.map +1 -1
  140. package/dist/data/PromptIndicator.cjs +3 -2
  141. package/dist/data/PromptIndicator.cjs.map +1 -1
  142. package/dist/data/PromptIndicator.d.ts +4 -1
  143. package/dist/data/PromptIndicator.d.ts.map +1 -1
  144. package/dist/data/PromptIndicator.js +3 -2
  145. package/dist/data/PromptIndicator.js.map +1 -1
  146. package/dist/data/diagnostics/ErrorDetails.cjs +155 -110
  147. package/dist/data/diagnostics/ErrorDetails.cjs.map +1 -1
  148. package/dist/data/diagnostics/ErrorDetails.d.ts.map +1 -1
  149. package/dist/data/diagnostics/ErrorDetails.js +155 -110
  150. package/dist/data/diagnostics/ErrorDetails.js.map +1 -1
  151. package/dist/data/flow-node/BoxNode.cjs +45 -0
  152. package/dist/data/flow-node/BoxNode.cjs.map +1 -0
  153. package/dist/data/flow-node/BoxNode.d.ts +28 -0
  154. package/dist/data/flow-node/BoxNode.d.ts.map +1 -0
  155. package/dist/data/flow-node/BoxNode.js +45 -0
  156. package/dist/data/flow-node/BoxNode.js.map +1 -0
  157. package/dist/data/flow-node/FlowMetrics.cjs +208 -0
  158. package/dist/data/flow-node/FlowMetrics.cjs.map +1 -0
  159. package/dist/data/flow-node/FlowMetrics.d.ts +60 -0
  160. package/dist/data/flow-node/FlowMetrics.d.ts.map +1 -0
  161. package/dist/data/flow-node/FlowMetrics.js +206 -0
  162. package/dist/data/flow-node/FlowMetrics.js.map +1 -0
  163. package/dist/data/flow-node/WorkloadNode.cjs +63 -0
  164. package/dist/data/flow-node/WorkloadNode.cjs.map +1 -0
  165. package/dist/data/flow-node/WorkloadNode.d.ts +42 -0
  166. package/dist/data/flow-node/WorkloadNode.d.ts.map +1 -0
  167. package/dist/data/flow-node/WorkloadNode.js +63 -0
  168. package/dist/data/flow-node/WorkloadNode.js.map +1 -0
  169. package/dist/data/flow-node/index.d.ts +5 -0
  170. package/dist/data/flow-node/index.d.ts.map +1 -0
  171. package/dist/data/flow-node/latency.cjs +37 -0
  172. package/dist/data/flow-node/latency.cjs.map +1 -0
  173. package/dist/data/flow-node/latency.d.ts +13 -0
  174. package/dist/data/flow-node/latency.d.ts.map +1 -0
  175. package/dist/data/flow-node/latency.js +35 -0
  176. package/dist/data/flow-node/latency.js.map +1 -0
  177. package/dist/data/test-runner/TestDetailPanel.cjs +109 -46
  178. package/dist/data/test-runner/TestDetailPanel.cjs.map +1 -1
  179. package/dist/data/test-runner/TestDetailPanel.d.ts.map +1 -1
  180. package/dist/data/test-runner/TestDetailPanel.js +110 -47
  181. package/dist/data/test-runner/TestDetailPanel.js.map +1 -1
  182. package/dist/data/test-runner/TestTreeNode.cjs +84 -63
  183. package/dist/data/test-runner/TestTreeNode.cjs.map +1 -1
  184. package/dist/data/test-runner/TestTreeNode.d.ts.map +1 -1
  185. package/dist/data/test-runner/TestTreeNode.js +84 -63
  186. package/dist/data/test-runner/TestTreeNode.js.map +1 -1
  187. package/dist/data/test-runner/adapter.cjs.map +1 -1
  188. package/dist/data/test-runner/adapter.d.ts +2 -2
  189. package/dist/data/test-runner/adapter.d.ts.map +1 -1
  190. package/dist/data/test-runner/adapter.js.map +1 -1
  191. package/dist/data/test-runner/copy.cjs +62 -10
  192. package/dist/data/test-runner/copy.cjs.map +1 -1
  193. package/dist/data/test-runner/copy.d.ts +52 -9
  194. package/dist/data/test-runner/copy.d.ts.map +1 -1
  195. package/dist/data/test-runner/copy.js +60 -11
  196. package/dist/data/test-runner/copy.js.map +1 -1
  197. package/dist/data/test-runner/index.d.ts +1 -1
  198. package/dist/data/test-runner/index.d.ts.map +1 -1
  199. package/dist/data/traces/index.d.ts +1 -0
  200. package/dist/data/traces/index.d.ts.map +1 -1
  201. package/dist/data/traces/otel/OtelTraceDetail.cjs +4 -7
  202. package/dist/data/traces/otel/OtelTraceDetail.cjs.map +1 -1
  203. package/dist/data/traces/otel/OtelTraceDetail.js +4 -7
  204. package/dist/data/traces/otel/OtelTraceDetail.js.map +1 -1
  205. package/dist/data/traces/otel/OtelTraceSearch.cjs +90 -56
  206. package/dist/data/traces/otel/OtelTraceSearch.cjs.map +1 -1
  207. package/dist/data/traces/otel/OtelTraceSearch.d.ts.map +1 -1
  208. package/dist/data/traces/otel/OtelTraceSearch.js +91 -57
  209. package/dist/data/traces/otel/OtelTraceSearch.js.map +1 -1
  210. package/dist/data/traces/otel/QueryBar.cjs +83 -10
  211. package/dist/data/traces/otel/QueryBar.cjs.map +1 -1
  212. package/dist/data/traces/otel/QueryBar.d.ts.map +1 -1
  213. package/dist/data/traces/otel/QueryBar.js +83 -10
  214. package/dist/data/traces/otel/QueryBar.js.map +1 -1
  215. package/dist/data/traces/otel/TraceResults.cjs +81 -13
  216. package/dist/data/traces/otel/TraceResults.cjs.map +1 -1
  217. package/dist/data/traces/otel/TraceResults.d.ts +11 -3
  218. package/dist/data/traces/otel/TraceResults.d.ts.map +1 -1
  219. package/dist/data/traces/otel/TraceResults.js +81 -13
  220. package/dist/data/traces/otel/TraceResults.js.map +1 -1
  221. package/dist/data/traces/otel/api.cjs.map +1 -1
  222. package/dist/data/traces/otel/api.d.ts +14 -0
  223. package/dist/data/traces/otel/api.d.ts.map +1 -1
  224. package/dist/data/traces/otel/api.js.map +1 -1
  225. package/dist/data/traces/otel/query.cjs +2 -2
  226. package/dist/data/traces/otel/query.cjs.map +1 -1
  227. package/dist/data/traces/otel/query.d.ts +1 -1
  228. package/dist/data/traces/otel/query.d.ts.map +1 -1
  229. package/dist/data/traces/otel/query.js +2 -2
  230. package/dist/data/traces/otel/query.js.map +1 -1
  231. package/dist/data/verification/StepFilesView.cjs +90 -0
  232. package/dist/data/verification/StepFilesView.cjs.map +1 -0
  233. package/dist/data/verification/StepFilesView.d.ts +9 -0
  234. package/dist/data/verification/StepFilesView.d.ts.map +1 -0
  235. package/dist/data/verification/StepFilesView.js +90 -0
  236. package/dist/data/verification/StepFilesView.js.map +1 -0
  237. package/dist/data/verification/adapterViews.cjs +129 -69
  238. package/dist/data/verification/adapterViews.cjs.map +1 -1
  239. package/dist/data/verification/adapterViews.d.ts +3 -1
  240. package/dist/data/verification/adapterViews.d.ts.map +1 -1
  241. package/dist/data/verification/adapterViews.js +130 -70
  242. package/dist/data/verification/adapterViews.js.map +1 -1
  243. package/dist/data/verification/adapters.cjs +9 -0
  244. package/dist/data/verification/adapters.cjs.map +1 -1
  245. package/dist/data/verification/adapters.d.ts +2 -0
  246. package/dist/data/verification/adapters.d.ts.map +1 -1
  247. package/dist/data/verification/adapters.js +11 -2
  248. package/dist/data/verification/adapters.js.map +1 -1
  249. package/dist/data/verification/index.d.ts +2 -1
  250. package/dist/data/verification/index.d.ts.map +1 -1
  251. package/dist/data/verification/stepKind.cjs +63 -7
  252. package/dist/data/verification/stepKind.cjs.map +1 -1
  253. package/dist/data/verification/stepKind.d.ts +55 -6
  254. package/dist/data/verification/stepKind.d.ts.map +1 -1
  255. package/dist/data/verification/stepKind.js +62 -8
  256. package/dist/data/verification/stepKind.js.map +1 -1
  257. package/dist/data/verification/stepKindViews.cjs +318 -106
  258. package/dist/data/verification/stepKindViews.cjs.map +1 -1
  259. package/dist/data/verification/stepKindViews.d.ts +17 -6
  260. package/dist/data/verification/stepKindViews.d.ts.map +1 -1
  261. package/dist/data/verification/stepKindViews.js +319 -108
  262. package/dist/data/verification/stepKindViews.js.map +1 -1
  263. package/dist/data/version-info.cjs +3 -3
  264. package/dist/data/version-info.cjs.map +1 -1
  265. package/dist/data/version-info.js +3 -3
  266. package/dist/data/version-info.js.map +1 -1
  267. package/dist/data/workload-panel/MemoryStack.cjs +38 -1
  268. package/dist/data/workload-panel/MemoryStack.cjs.map +1 -1
  269. package/dist/data/workload-panel/MemoryStack.d.ts.map +1 -1
  270. package/dist/data/workload-panel/MemoryStack.js +38 -1
  271. package/dist/data/workload-panel/MemoryStack.js.map +1 -1
  272. package/dist/data.cjs +22 -1
  273. package/dist/data.d.ts +3 -1
  274. package/dist/data.d.ts.map +1 -1
  275. package/dist/data.js +10 -3
  276. package/dist/file-findings/AnnotatedCode.cjs +18 -2
  277. package/dist/file-findings/AnnotatedCode.cjs.map +1 -1
  278. package/dist/file-findings/AnnotatedCode.d.ts +2 -0
  279. package/dist/file-findings/AnnotatedCode.d.ts.map +1 -1
  280. package/dist/file-findings/AnnotatedCode.js +18 -2
  281. package/dist/file-findings/AnnotatedCode.js.map +1 -1
  282. package/dist/file-findings/FileFindingsView.cjs.map +1 -1
  283. package/dist/file-findings/FileFindingsView.d.ts +2 -0
  284. package/dist/file-findings/FileFindingsView.d.ts.map +1 -1
  285. package/dist/file-findings/FileFindingsView.js.map +1 -1
  286. package/dist/file-findings/file-review/FileReview.cjs +2 -1
  287. package/dist/file-findings/file-review/FileReview.cjs.map +1 -1
  288. package/dist/file-findings/file-review/FileReview.d.ts +3 -1
  289. package/dist/file-findings/file-review/FileReview.d.ts.map +1 -1
  290. package/dist/file-findings/file-review/FileReview.js +2 -1
  291. package/dist/file-findings/file-review/FileReview.js.map +1 -1
  292. package/dist/hooks/use-prompts.cjs +52 -30
  293. package/dist/hooks/use-prompts.cjs.map +1 -1
  294. package/dist/hooks/use-prompts.d.ts +6 -0
  295. package/dist/hooks/use-prompts.d.ts.map +1 -1
  296. package/dist/hooks/use-prompts.js +52 -30
  297. package/dist/hooks/use-prompts.js.map +1 -1
  298. package/dist/index.cjs +23 -2
  299. package/dist/index.js +11 -4
  300. package/dist/profiles/editor/profileEditor.cjs +29 -30
  301. package/dist/profiles/editor/profileEditor.cjs.map +1 -1
  302. package/dist/profiles/editor/profileEditor.d.ts.map +1 -1
  303. package/dist/profiles/editor/profileEditor.js +29 -30
  304. package/dist/profiles/editor/profileEditor.js.map +1 -1
  305. package/dist/profiles/editor/profileEditorPreview.cjs +44 -43
  306. package/dist/profiles/editor/profileEditorPreview.cjs.map +1 -1
  307. package/dist/profiles/editor/profileEditorPreview.d.ts +10 -5
  308. package/dist/profiles/editor/profileEditorPreview.d.ts.map +1 -1
  309. package/dist/profiles/editor/profileEditorPreview.js +44 -43
  310. package/dist/profiles/editor/profileEditorPreview.js.map +1 -1
  311. package/dist/profiles/editor/profileMappingPreview.cjs +153 -48
  312. package/dist/profiles/editor/profileMappingPreview.cjs.map +1 -1
  313. package/dist/profiles/editor/profileMappingPreview.d.ts +16 -2
  314. package/dist/profiles/editor/profileMappingPreview.d.ts.map +1 -1
  315. package/dist/profiles/editor/profileMappingPreview.js +155 -50
  316. package/dist/profiles/editor/profileMappingPreview.js.map +1 -1
  317. package/dist/profiles/editor/sampleError.cjs +29 -0
  318. package/dist/profiles/editor/sampleError.cjs.map +1 -0
  319. package/dist/profiles/editor/sampleError.d.ts +16 -0
  320. package/dist/profiles/editor/sampleError.d.ts.map +1 -0
  321. package/dist/profiles/editor/sampleError.js +27 -0
  322. package/dist/profiles/editor/sampleError.js.map +1 -0
  323. package/dist/profiles/query/profileSampleResult.cjs.map +1 -1
  324. package/dist/profiles/query/profileSampleResult.d.ts +2 -0
  325. package/dist/profiles/query/profileSampleResult.d.ts.map +1 -1
  326. package/dist/profiles/query/profileSampleResult.js.map +1 -1
  327. package/dist/profiles/wizard/profileWizardQueryStep.cjs +1 -0
  328. package/dist/profiles/wizard/profileWizardQueryStep.cjs.map +1 -1
  329. package/dist/profiles/wizard/profileWizardQueryStep.d.ts +2 -0
  330. package/dist/profiles/wizard/profileWizardQueryStep.d.ts.map +1 -1
  331. package/dist/profiles/wizard/profileWizardQueryStep.js +1 -0
  332. package/dist/profiles/wizard/profileWizardQueryStep.js.map +1 -1
  333. package/dist/react-grab/core/index.js +1 -1
  334. package/dist/react-grab/{core-BERtFDWh.js → core-BK5CU6Lb.js} +2 -2
  335. package/dist/react-grab/index.js +1 -1
  336. package/dist/react-grab/{renderer-KT3FY3K2.js → renderer-DcHrsQ8k.js} +1 -1
  337. package/dist/rpc/apiClient.cjs +12 -15
  338. package/dist/rpc/apiClient.cjs.map +1 -1
  339. package/dist/rpc/apiClient.js +12 -15
  340. package/dist/rpc/apiClient.js.map +1 -1
  341. package/dist/runtime/barrels.json +6507 -6460
  342. package/dist/runtime/importmap.json +2198 -2185
  343. package/dist/styles.css +1 -1
  344. package/package.json +1 -1
@@ -14,6 +14,8 @@ export type FixtureDetailProps = {
14
14
  renderWait?: (wait: WaitDetail) => ReactNode;
15
15
  /** The answerable form of a step waiting on a person (`node.waiting`); the host owns the prompt it answers. */
16
16
  renderPendingPrompt?: (node: Test) => ReactNode;
17
+ /** Where the host serves a file the step attached (`detail.files[].path`); required to preview them. */
18
+ fileUrl?: (path: string) => string;
17
19
  };
18
- export declare function FixtureDetail({ node, renderWait, renderPendingPrompt }: FixtureDetailProps): import("react").JSX.Element;
20
+ export declare function FixtureDetail({ node, renderWait, renderPendingPrompt, fileUrl }: FixtureDetailProps): import("react").JSX.Element;
19
21
  //# sourceMappingURL=adapterViews.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"adapterViews.d.ts","sourceRoot":"","sources":["../../../src/data/verification/adapterViews.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAiH,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAa5J,OAAO,EAKL,KAAK,IAAI,EAEV,MAAM,gBAAgB,CAAC;AAwBxB;qEACqE;AACrE,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,+BAevD;AA2BD,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,sCAsBlD;AAoBD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS,CAAC;IAC7C,+GAA+G;IAC/G,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,SAAS,CAAC;CACjD,CAAC;AAEF,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,mBAAmB,EAAE,EAAE,kBAAkB,+BA+D1F"}
1
+ {"version":3,"file":"adapterViews.d.ts","sourceRoot":"","sources":["../../../src/data/verification/adapterViews.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAIvC,OAAO,EAAiH,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAa5J,OAAO,EAOL,KAAK,IAAI,EAEV,MAAM,gBAAgB,CAAC;AAmCxB;qEACqE;AACrE,wBAAgB,eAAe,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,+BAevD;AAqCD,wBAAgB,UAAU,CAAC,EAAE,IAAI,EAAE,EAAE;IAAE,IAAI,EAAE,IAAI,CAAA;CAAE,sCAuBlD;AAmBD,MAAM,MAAM,kBAAkB,GAAG;IAC/B,IAAI,EAAE,IAAI,CAAC;IACX,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS,CAAC;IAC7C,+GAA+G;IAC/G,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,SAAS,CAAC;IAChD,wGAAwG;IACxG,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACpC,CAAC;AA6EF,wBAAgB,aAAa,CAAC,EAAE,IAAI,EAAE,UAAU,EAAE,mBAAmB,EAAE,OAAO,EAAE,EAAE,kBAAkB,+BA2BnG"}
@@ -4,10 +4,12 @@ import { ViolationLocations } from "../lint/ViolationLocations.js";
4
4
  import { readQuery, readStepDetail, readViolation, splitExecutionDetail, waitDecidedBy, withoutQuery, withoutViolation } from "./stepKind.js";
5
5
  import { ExecutionHeaderView, FailureCallout, MalformedStepDetail, StepFailedTestsSection, StepFormSection, StepKindSections, StepPendingFormSection, StepQuerySection, StepSourceSection } from "./stepKindViews.js";
6
6
  import { readStepSource, withoutSource } from "./stepSource.js";
7
+ import { copyReferences } from "../test-runner/copy.js";
7
8
  import { Expectation } from "../test-runner/Expectation.js";
8
9
  import { OutcomeIcon } from "../test-runner/MarkIcons.js";
9
10
  import { TestOutput } from "../test-runner/TestFailureDetail.js";
10
- import { jsx, jsxs } from "react/jsx-runtime";
11
+ import { useTestRunner } from "../test-runner/context.js";
12
+ import { Fragment, jsx, jsxs } from "react/jsx-runtime";
11
13
  // src/data/verification/adapterViews.tsx
12
14
  function checklistItemOutcome(item) {
13
15
  if (item.failed) return "failed";
@@ -36,6 +38,18 @@ function ChecklistItemRow({ item }) {
36
38
  })]
37
39
  });
38
40
  }
41
+ function keyChecklistItems(items) {
42
+ const seen = /* @__PURE__ */ new Map();
43
+ return items.map((item) => {
44
+ const base = item.task_id ?? `${item.name}:${item.message ?? ""}`;
45
+ const occurrence = seen.get(base) ?? 0;
46
+ seen.set(base, occurrence + 1);
47
+ return {
48
+ key: `${base}#${occurrence}`,
49
+ item
50
+ };
51
+ });
52
+ }
39
53
  /** Renders every checklist item for the "Acceptance criteria" parent, or the
40
54
  * single item itself when a leaf criterion is selected directly. */
41
55
  function ChecklistDetail({ node }) {
@@ -48,7 +62,7 @@ function ChecklistDetail({ node }) {
48
62
  className: "w-full border-collapse text-xs",
49
63
  children: /* @__PURE__ */ jsx("tbody", {
50
64
  className: "divide-y divide-border/60",
51
- children: items.map((item, index) => /* @__PURE__ */ jsx(ChecklistItemRow, { item }, item.task_id ?? index))
65
+ children: keyChecklistItems(items).map(({ key, item }) => /* @__PURE__ */ jsx(ChecklistItemRow, { item }, key))
52
66
  })
53
67
  })
54
68
  })
@@ -66,17 +80,24 @@ function comparisonValue(hasCelGate, value) {
66
80
  if (value !== null && typeof value === "object" && !Array.isArray(value)) return void 0;
67
81
  return value;
68
82
  }
83
+ function varsShownInTabs(node, stepDetail) {
84
+ const shown = /* @__PURE__ */ new Set();
85
+ if (stepDetail.kind === "step" && stepDetail.step.outputs !== void 0) shown.add("outputs");
86
+ if (node.log || node.stdout || node.stderr) for (const name of ["stdout", "stderr"]) shown.add(name);
87
+ return shown;
88
+ }
69
89
  function CelDetails({ node }) {
70
90
  if (node.passed) return null;
71
91
  const context = node.context;
72
- const vars = context?.cel_vars ?? {};
92
+ const stepDetail = readStepDetail(node.detail);
93
+ const shown = varsShownInTabs(node, stepDetail);
94
+ const vars = Object.fromEntries(Object.entries(context?.cel_vars ?? {}).filter(([name]) => !shown.has(name)));
73
95
  const expression = readCelTrace(node.detail) || context?.cel_expression;
74
96
  const hasCelGate = !!expression;
75
97
  const expected = comparisonValue(hasCelGate, context?.expected);
76
98
  const actual = comparisonValue(hasCelGate, context?.actual);
77
99
  const hasComparison = expected !== void 0 || actual !== void 0;
78
100
  if (!expression && Object.keys(vars).length === 0 && !hasComparison) return null;
79
- const stepDetail = readStepDetail(node.detail);
80
101
  const wait = stepDetail.kind === "step" ? stepDetail.step.wait : void 0;
81
102
  const checkLabel = wait && wait.outcome !== "satisfied" ? waitDecidedBy(wait) : "expression";
82
103
  return /* @__PURE__ */ jsx(Expectation, {
@@ -92,26 +113,105 @@ function failureTexts(...candidates) {
92
113
  return texts.filter((text, i) => !texts.some((other, j) => j !== i && other.includes(text) && (other.length > text.length || j < i)));
93
114
  }
94
115
  function FailureMessage({ node, cause, error }) {
116
+ const runner = useTestRunner();
95
117
  const texts = failureTexts(cause, node.message, error);
96
118
  if (texts.length === 0) return null;
97
119
  if (!(node.failed || node.timed_out || cause)) return /* @__PURE__ */ jsx("p", {
98
120
  className: "whitespace-pre-wrap break-words text-sm",
99
121
  children: texts.join("\n")
100
122
  });
101
- return /* @__PURE__ */ jsx(FailureCallout, { children: texts.map((text, i) => /* @__PURE__ */ jsx("div", {
102
- className: i > 0 ? "mt-1 text-xs opacity-90" : void 0,
103
- children: text
104
- }, i)) });
123
+ const references = copyReferences(runner.adapters.resolveCopy(node, runner));
124
+ return /* @__PURE__ */ jsx(FailureCallout, {
125
+ title: node.timed_out ? "Step timed out" : "Step failed",
126
+ texts,
127
+ references
128
+ });
129
+ }
130
+ function CommandSection({ command, cwd, exitCode }) {
131
+ return /* @__PURE__ */ jsxs("div", {
132
+ className: "min-w-0 space-y-1",
133
+ "data-step-section": "command",
134
+ children: [
135
+ /* @__PURE__ */ jsx("div", {
136
+ className: "text-[10px] uppercase tracking-wide text-muted-foreground",
137
+ children: "Command"
138
+ }),
139
+ /* @__PURE__ */ jsx("code", {
140
+ className: "block overflow-x-auto whitespace-pre rounded bg-muted px-2 py-1.5 text-xs",
141
+ children: command
142
+ }),
143
+ /* @__PURE__ */ jsxs("div", {
144
+ className: "flex flex-wrap items-center gap-2 text-[10px] text-muted-foreground",
145
+ children: [cwd && /* @__PURE__ */ jsxs("span", { children: ["in ", cwd] }), typeof exitCode === "number" && /* @__PURE__ */ jsxs("span", {
146
+ className: exitCode === 0 ? void 0 : "text-red-600",
147
+ children: ["exit ", exitCode]
148
+ })]
149
+ })
150
+ ]
151
+ });
152
+ }
153
+ function QueryDetailSections({ query }) {
154
+ if (query.kind === "query") return /* @__PURE__ */ jsx(StepQuerySection, { query: query.query });
155
+ if (query.kind === "invalid") return /* @__PURE__ */ jsx(MalformedStepDetail, { error: query.error });
156
+ return null;
157
+ }
158
+ function ViolationDetailSections({ violation, workDir }) {
159
+ if (violation.kind === "invalid") return /* @__PURE__ */ jsx(MalformedStepDetail, { error: violation.error });
160
+ if (violation.kind !== "violation" || violation.violation.locations.length === 0) return null;
161
+ return /* @__PURE__ */ jsx("div", {
162
+ className: "min-w-0",
163
+ "data-step-section": "locations",
164
+ children: /* @__PURE__ */ jsx(ViolationLocations, {
165
+ locations: violation.violation.locations,
166
+ workDir
167
+ })
168
+ });
169
+ }
170
+ /** The typed step's response view and form. */
171
+ function StepResponseSections({ stepDetail }) {
172
+ if (stepDetail.kind !== "step") return null;
173
+ const { view, form } = stepDetail.step;
174
+ return /* @__PURE__ */ jsxs(Fragment, { children: [view && /* @__PURE__ */ jsxs("div", {
175
+ className: "min-w-0 space-y-1",
176
+ "data-step-section": "view",
177
+ children: [/* @__PURE__ */ jsx("div", {
178
+ className: "text-[10px] uppercase tracking-wide text-muted-foreground",
179
+ children: "Response"
180
+ }), /* @__PURE__ */ jsx(Clicky, { data: view })]
181
+ }), form && /* @__PURE__ */ jsx(StepFormSection, { form })] });
182
+ }
183
+ /** The step-kind specific sections, or the notice that the step detail was malformed. */
184
+ function StepKindDetail({ stepDetail, renderWait, fileUrl }) {
185
+ if (stepDetail.kind === "invalid") return /* @__PURE__ */ jsx(MalformedStepDetail, { error: stepDetail.error });
186
+ if (stepDetail.kind !== "step") return null;
187
+ return /* @__PURE__ */ jsx(StepKindSections, {
188
+ step: stepDetail.step,
189
+ ...renderWait ? { renderWait } : {},
190
+ ...fileUrl ? { fileUrl } : {}
191
+ });
192
+ }
193
+ function RawDetail({ data }) {
194
+ if (data == null) return null;
195
+ return /* @__PURE__ */ jsxs("details", {
196
+ className: "text-muted-foreground",
197
+ "data-raw-detail": "",
198
+ children: [/* @__PURE__ */ jsx("summary", {
199
+ className: "cursor-pointer text-[10px] uppercase tracking-wide",
200
+ children: "Raw detail"
201
+ }), /* @__PURE__ */ jsx("div", {
202
+ className: "mt-1 text-foreground",
203
+ children: /* @__PURE__ */ jsx(JsonView, { data })
204
+ })]
205
+ });
105
206
  }
106
- function FixtureDetail({ node, renderWait, renderPendingPrompt }) {
207
+ function FixtureDetail({ node, renderWait, renderPendingPrompt, fileUrl }) {
107
208
  const context = node.context;
108
- const command = context?.command ?? node.command;
109
- const cwd = context?.cwd ?? node.work_dir;
110
209
  const stepDetail = readStepDetail(node.detail);
111
- const violation = readViolation(node.detail);
210
+ const step = stepDetail.kind === "step" ? stepDetail.step : void 0;
112
211
  const query = readQuery(node.detail);
113
212
  const { header, rest } = splitExecutionDetail(node.detail);
114
- const rawDetail = withoutQuery(withoutViolation(withoutSource(stepDetail.kind === "step" ? splitExecutionDetail(stepDetail.step.rest).rest : rest)));
213
+ const command = context?.command ?? node.command;
214
+ const rawDetail = withoutQuery(withoutViolation(withoutSource(step ? splitExecutionDetail(step.rest).rest : rest)));
115
215
  const pendingForm = node.waiting === true && renderPendingPrompt ? renderPendingPrompt(node) : null;
116
216
  return /* @__PURE__ */ jsxs("div", {
117
217
  className: "space-y-4 p-density-4",
@@ -119,75 +219,35 @@ function FixtureDetail({ node, renderWait, renderPendingPrompt }) {
119
219
  children: [
120
220
  /* @__PURE__ */ jsx(ExecutionHeaderView, {
121
221
  header,
122
- ...stepDetail.kind === "step" ? { stepKind: stepDetail.step.step.kind } : {}
222
+ ...step ? { stepKind: step.step.kind } : {}
123
223
  }),
124
224
  pendingForm != null && /* @__PURE__ */ jsx(StepPendingFormSection, { children: pendingForm }),
125
225
  /* @__PURE__ */ jsx(FailureMessage, {
126
226
  node,
127
- cause: stepDetail.kind === "step" ? stepDetail.step.wait?.cause : void 0,
227
+ cause: step?.wait?.cause,
128
228
  error: header.error
129
229
  }),
130
- stepDetail.kind === "step" && stepDetail.step.step.kind === "test" && /* @__PURE__ */ jsx(StepFailedTestsSection, { node }),
131
- query.kind === "query" && /* @__PURE__ */ jsx(StepQuerySection, { query: query.query }),
132
- query.kind === "invalid" && /* @__PURE__ */ jsx(MalformedStepDetail, { error: query.error }),
133
- command && query.kind !== "query" && /* @__PURE__ */ jsxs("div", {
134
- className: "min-w-0 space-y-1",
135
- "data-step-section": "command",
136
- children: [
137
- /* @__PURE__ */ jsx("div", {
138
- className: "text-[10px] uppercase tracking-wide text-muted-foreground",
139
- children: "Command"
140
- }),
141
- /* @__PURE__ */ jsx("code", {
142
- className: "block overflow-x-auto whitespace-pre rounded bg-muted px-2 py-1.5 text-xs",
143
- children: command
144
- }),
145
- /* @__PURE__ */ jsxs("div", {
146
- className: "flex flex-wrap items-center gap-2 text-[10px] text-muted-foreground",
147
- children: [cwd && /* @__PURE__ */ jsxs("span", { children: ["in ", cwd] }), typeof context?.exit_code === "number" && /* @__PURE__ */ jsxs("span", {
148
- className: context.exit_code === 0 ? void 0 : "text-red-600",
149
- children: ["exit ", context.exit_code]
150
- })]
151
- })
152
- ]
230
+ step?.step.kind === "test" && /* @__PURE__ */ jsx(StepFailedTestsSection, { node }),
231
+ /* @__PURE__ */ jsx(QueryDetailSections, { query }),
232
+ command && query.kind !== "query" && /* @__PURE__ */ jsx(CommandSection, {
233
+ command,
234
+ cwd: context?.cwd ?? node.work_dir,
235
+ exitCode: context?.exit_code
153
236
  }),
154
- stepDetail.kind === "step" && stepDetail.step.view && /* @__PURE__ */ jsxs("div", {
155
- className: "min-w-0 space-y-1",
156
- "data-step-section": "view",
157
- children: [/* @__PURE__ */ jsx("div", {
158
- className: "text-[10px] uppercase tracking-wide text-muted-foreground",
159
- children: "Response"
160
- }), /* @__PURE__ */ jsx(Clicky, { data: stepDetail.step.view })]
237
+ /* @__PURE__ */ jsx(StepResponseSections, { stepDetail }),
238
+ /* @__PURE__ */ jsx(ViolationDetailSections, {
239
+ violation: readViolation(node.detail),
240
+ workDir: node.work_dir
161
241
  }),
162
- stepDetail.kind === "step" && stepDetail.step.form && /* @__PURE__ */ jsx(StepFormSection, { form: stepDetail.step.form }),
163
- violation.kind === "violation" && violation.violation.locations.length > 0 && /* @__PURE__ */ jsx("div", {
164
- className: "min-w-0",
165
- "data-step-section": "locations",
166
- children: /* @__PURE__ */ jsx(ViolationLocations, {
167
- locations: violation.violation.locations,
168
- workDir: node.work_dir
169
- })
170
- }),
171
- violation.kind === "invalid" && /* @__PURE__ */ jsx(MalformedStepDetail, { error: violation.error }),
172
242
  /* @__PURE__ */ jsx(TestOutput, { node }),
173
243
  /* @__PURE__ */ jsx(CelDetails, { node }),
174
244
  (node.failed || node.pending) && /* @__PURE__ */ jsx(StepSourceSection, { result: readStepSource(node.detail) }),
175
- stepDetail.kind === "step" && /* @__PURE__ */ jsx(StepKindSections, {
176
- step: stepDetail.step,
177
- ...renderWait ? { renderWait } : {}
245
+ /* @__PURE__ */ jsx(StepKindDetail, {
246
+ stepDetail,
247
+ renderWait,
248
+ fileUrl
178
249
  }),
179
- stepDetail.kind === "invalid" && /* @__PURE__ */ jsx(MalformedStepDetail, { error: stepDetail.error }),
180
- rawDetail != null && /* @__PURE__ */ jsxs("details", {
181
- className: "text-muted-foreground",
182
- "data-raw-detail": "",
183
- children: [/* @__PURE__ */ jsx("summary", {
184
- className: "cursor-pointer text-[10px] uppercase tracking-wide",
185
- children: "Raw detail"
186
- }), /* @__PURE__ */ jsx("div", {
187
- className: "mt-1 text-foreground",
188
- children: /* @__PURE__ */ jsx(JsonView, { data: rawDetail })
189
- })]
190
- })
250
+ /* @__PURE__ */ jsx(RawDetail, { data: rawDetail })
191
251
  ]
192
252
  });
193
253
  }
@@ -1 +1 @@
1
- {"version":3,"file":"adapterViews.js","names":[],"sources":["../../../src/data/verification/adapterViews.tsx"],"sourcesContent":["// Detail-body components for the verification node adapters. Split from\n// adapters.ts (react/only-export-components: a file mixing component\n// declarations with the plain TestNodeAdapter/registry exports loses Fast\n// Refresh). Ported from gavel's VerificationStepOutput.tsx (the checklist list\n// and the CelDetails block).\n\nimport type { ReactNode } from \"react\";\nimport { Clicky } from \"../Clicky\";\nimport { JsonView } from \"../JsonView\";\nimport { ViolationLocations } from \"../lint/ViolationLocations\";\nimport { readQuery, readStepDetail, readViolation, splitExecutionDetail, waitDecidedBy, withoutQuery, withoutViolation, type WaitDetail } from \"./stepKind\";\nimport {\n ExecutionHeaderView,\n FailureCallout,\n MalformedStepDetail,\n StepFailedTestsSection,\n StepFormSection,\n StepKindSections,\n StepPendingFormSection,\n StepQuerySection,\n StepSourceSection,\n} from \"./stepKindViews\";\nimport { readStepSource, withoutSource } from \"./stepSource\";\nimport {\n Expectation,\n OutcomeIcon,\n TestOutput,\n type FixtureContext,\n type Test,\n type TestOutcome,\n} from \"../test-runner\";\n\n// ── Checklist: the synthesized \"Acceptance criteria\" node and its items ────\n\nfunction checklistItemOutcome(item: Test): TestOutcome {\n if (item.failed) return \"failed\";\n if (item.passed) return \"passed\";\n return \"pending\";\n}\n\nfunction ChecklistItemRow({ item }: { item: Test }) {\n return (\n <tr className=\"align-top\" data-checklist-item=\"\">\n <td className=\"px-2 py-1.5\">\n <span className=\"flex items-start gap-1.5\">\n <OutcomeIcon outcome={checklistItemOutcome(item)} className=\"mt-0.5 text-sm\" />\n <span className=\"min-w-0\">{item.name}</span>\n </span>\n </td>\n <td className=\"px-2 py-1.5 text-muted-foreground\">{item.message}</td>\n </tr>\n );\n}\n\n/** Renders every checklist item for the \"Acceptance criteria\" parent, or the\n * single item itself when a leaf criterion is selected directly. */\nexport function ChecklistDetail({ node }: { node: Test }) {\n const items = node.children && node.children.length > 0 ? node.children : [node];\n return (\n <div className=\"p-density-4\">\n <div className=\"overflow-hidden rounded-md border border-border/60\">\n <table className=\"w-full border-collapse text-xs\">\n <tbody className=\"divide-y divide-border/60\">\n {items.map((item, index) => (\n <ChecklistItemRow key={item.task_id ?? index} item={item} />\n ))}\n </tbody>\n </table>\n </div>\n </div>\n );\n}\n\n// ── Fixture / CEL: the failing-step detail (command + CelDetails) ──────────\n\nfunction readCelTrace(detail: unknown): string | undefined {\n if (detail && typeof detail === \"object\" && !Array.isArray(detail)) {\n const value = (detail as Record<string, unknown>).cel_trace;\n if (typeof value === \"string\" && value.length > 0) return value;\n }\n return undefined;\n}\n\n// A command step with no CEL assertion stores the whole command result object\n// in `actual` — the command/output is already rendered above, so dumping it\n// again as JSON is noise. Anything a CEL expression compared is shown as-is,\n// structured values included. `hasCelGate` mirrors gavel's own gate: a plain\n// `context.cel_expression`, or a trace recorded in `node.detail` when the\n// expression itself wasn't preserved on `context`.\nfunction comparisonValue(hasCelGate: boolean, value: unknown): unknown {\n if (value === undefined) return undefined;\n if (hasCelGate) return value;\n if (value !== null && typeof value === \"object\" && !Array.isArray(value)) return undefined;\n return value;\n}\n\n// CEL detail is rendered only for a failing node: the expression and the\n// values it saw are what explain the verdict.\nexport function CelDetails({ node }: { node: Test }) {\n if (node.passed) return null;\n const context = node.context as FixtureContext | undefined;\n const vars = context?.cel_vars ?? {};\n const expression = readCelTrace(node.detail) || context?.cel_expression;\n const hasCelGate = !!expression;\n const expected = comparisonValue(hasCelGate, context?.expected);\n const actual = comparisonValue(hasCelGate, context?.actual);\n const hasComparison = expected !== undefined || actual !== undefined;\n if (!expression && Object.keys(vars).length === 0 && !hasComparison) return null;\n const stepDetail = readStepDetail(node.detail);\n const wait = stepDetail.kind === \"step\" ? stepDetail.step.wait : undefined;\n const checkLabel = wait && wait.outcome !== \"satisfied\" ? waitDecidedBy(wait) : \"expression\";\n return (\n <Expectation\n check={expression}\n checkLabel={checkLabel}\n vars={vars}\n expected={expected}\n actual={actual}\n />\n );\n}\n\n// The texts explaining a failure, most specific first. A text already contained\n// in another (a wait cause that the result message embeds) is not repeated.\nfunction failureTexts(...candidates: (string | undefined)[]): string[] {\n const texts = candidates.filter((text): text is string => !!text);\n return texts.filter((text, i) => !texts.some((other, j) => j !== i && other.includes(text) && (other.length > text.length || j < i)));\n}\n\nfunction FailureMessage({ node, cause, error }: { node: Test; cause: string | undefined; error: string | undefined }) {\n const texts = failureTexts(cause, node.message, error);\n if (texts.length === 0) return null;\n if (!(node.failed || node.timed_out || cause)) return <p className=\"whitespace-pre-wrap break-words text-sm\">{texts.join(\"\\n\")}</p>;\n return (\n <FailureCallout>\n {texts.map((text, i) => <div key={i} className={i > 0 ? \"mt-1 text-xs opacity-90\" : undefined}>{text}</div>)}\n </FailureCallout>\n );\n}\n\nexport type FixtureDetailProps = {\n node: Test;\n renderWait?: (wait: WaitDetail) => ReactNode;\n /** The answerable form of a step waiting on a person (`node.waiting`); the host owns the prompt it answers. */\n renderPendingPrompt?: (node: Test) => ReactNode;\n};\n\nexport function FixtureDetail({ node, renderWait, renderPendingPrompt }: FixtureDetailProps) {\n const context = node.context as FixtureContext | undefined;\n const command = context?.command ?? node.command;\n const cwd = context?.cwd ?? node.work_dir;\n const stepDetail = readStepDetail(node.detail);\n const violation = readViolation(node.detail);\n const query = readQuery(node.detail);\n const { header, rest } = splitExecutionDetail(node.detail);\n // A typed step shows its own sections, so the raw block keeps only what they don't cover.\n const rawDetail = withoutQuery(withoutViolation(withoutSource(stepDetail.kind === \"step\" ? splitExecutionDetail(stepDetail.step.rest).rest : rest)));\n const pendingForm = node.waiting === true && renderPendingPrompt ? renderPendingPrompt(node) : null;\n return (\n <div className=\"space-y-4 p-density-4\" data-fixture-detail=\"\">\n <ExecutionHeaderView header={header} {...(stepDetail.kind === \"step\" ? { stepKind: stepDetail.step.step.kind } : {})} />\n {pendingForm != null && <StepPendingFormSection>{pendingForm}</StepPendingFormSection>}\n <FailureMessage node={node} cause={stepDetail.kind === \"step\" ? stepDetail.step.wait?.cause : undefined} error={header.error} />\n {stepDetail.kind === \"step\" && stepDetail.step.step.kind === \"test\" && <StepFailedTestsSection node={node} />}\n {query.kind === \"query\" && <StepQuerySection query={query.query} />}\n {query.kind === \"invalid\" && <MalformedStepDetail error={query.error} />}\n {command && query.kind !== \"query\" && (\n <div className=\"min-w-0 space-y-1\" data-step-section=\"command\">\n <div className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">Command</div>\n <code className=\"block overflow-x-auto whitespace-pre rounded bg-muted px-2 py-1.5 text-xs\">\n {command}\n </code>\n <div className=\"flex flex-wrap items-center gap-2 text-[10px] text-muted-foreground\">\n {cwd && <span>in {cwd}</span>}\n {typeof context?.exit_code === \"number\" && (\n <span className={context.exit_code === 0 ? undefined : \"text-red-600\"}>\n exit {context.exit_code}\n </span>\n )}\n </div>\n </div>\n )}\n {stepDetail.kind === \"step\" && stepDetail.step.view && (\n <div className=\"min-w-0 space-y-1\" data-step-section=\"view\">\n <div className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">Response</div>\n <Clicky data={stepDetail.step.view} />\n </div>\n )}\n {stepDetail.kind === \"step\" && stepDetail.step.form && <StepFormSection form={stepDetail.step.form} />}\n {violation.kind === \"violation\" && violation.violation.locations.length > 0 && (\n <div className=\"min-w-0\" data-step-section=\"locations\">\n <ViolationLocations locations={violation.violation.locations} workDir={node.work_dir} />\n </div>\n )}\n {violation.kind === \"invalid\" && <MalformedStepDetail error={violation.error} />}\n <TestOutput node={node} />\n <CelDetails node={node} />\n {(node.failed || node.pending) && <StepSourceSection result={readStepSource(node.detail)} />}\n {stepDetail.kind === \"step\" && <StepKindSections step={stepDetail.step} {...(renderWait ? { renderWait } : {})} />}\n {stepDetail.kind === \"invalid\" && <MalformedStepDetail error={stepDetail.error} />}\n {rawDetail != null && (\n <details className=\"text-muted-foreground\" data-raw-detail=\"\">\n <summary className=\"cursor-pointer text-[10px] uppercase tracking-wide\">Raw detail</summary>\n <div className=\"mt-1 text-foreground\">\n <JsonView data={rawDetail} />\n </div>\n </details>\n )}\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;AAkCA,SAAS,qBAAqB,MAAyB;CACrD,IAAI,KAAK,QAAQ,OAAO;CACxB,IAAI,KAAK,QAAQ,OAAO;CACxB,OAAO;AACT;AAEA,SAAS,iBAAiB,EAAE,QAAwB;CAClD,OACE,qBAAC,MAAD;EAAI,WAAU;EAAY,uBAAoB;EAA9C,UAAA,CACE,oBAAC,MAAD;GAAI,WAAU;GACZ,UAAA,qBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CACE,oBAAC,aAAD;KAAa,SAAS,qBAAqB,IAAI;KAAG,WAAU;IAAkB,CAAA,GAC9E,oBAAC,QAAD;KAAM,WAAU;KAAW,UAAA,KAAK;IAAW,CAAA,CACvC;;EACJ,CAAA,GACJ,oBAAC,MAAD;GAAI,WAAU;GAAqC,UAAA,KAAK;EAAY,CAAA,CAClE;;AAER;;;AAIA,SAAgB,gBAAgB,EAAE,QAAwB;CACxD,MAAM,QAAQ,KAAK,YAAY,KAAK,SAAS,SAAS,IAAI,KAAK,WAAW,CAAC,IAAI;CAC/E,OACE,oBAAC,OAAD;EAAK,WAAU;EACb,UAAA,oBAAC,OAAD;GAAK,WAAU;GACb,UAAA,oBAAC,SAAD;IAAO,WAAU;IACf,UAAA,oBAAC,SAAD;KAAO,WAAU;KACd,UAAA,MAAM,KAAK,MAAM,UAChB,oBAAC,kBAAD,EAAoD,KAAO,GAApC,KAAK,WAAW,KAAoB,CAC5D;IACI,CAAA;GACF,CAAA;EACJ,CAAA;CACF,CAAA;AAET;AAIA,SAAS,aAAa,QAAqC;CACzD,IAAI,UAAU,OAAO,WAAW,YAAY,CAAC,MAAM,QAAQ,MAAM,GAAG;EAClE,MAAM,QAAS,OAAm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AAU,MAAQ,CAAA;GAC/E,oBAAC,YAAD,EAAkB,KAAO,CAAA;GACzB,oBAAC,YAAD,EAAkB,KAAO,CAAA;IACvB,KAAK,UAAU,KAAK,YAAY,oBAAC,mBAAD,EAAmB,QAAQ,eAAe,KAAK,MAAM,EAAI,CAAA;GAC1F,WAAW,SAAS,UAAU,oBAAC,kBAAD;IAAkB,MAAM,WAAW;IAAM,GAAK,aAAa,EAAE,WAAW,IAAI,CAAC;GAAK,CAAA;GAChH,WAAW,SAAS,aAAa,oBAAC,qBAAD,EAAqB,OAAO,WAAW,MAAQ,CAAA;GAChF,aAAa,QACZ,qBAAC,WAAD;IAAS,WAAU;IAAwB,mBAAgB;IAA3D,UAAA,CACE,oBAAC,WAAD;KAAS,WAAU;KAAqD,UAAA;IAAmB,CAAA,GAC3F,oBAAC,OAAD;KAAK,WAAU;KACb,UAAA,oBAAC,UAAD,EAAU,MAAM,UAAY,CAAA;IACzB,CAAA,CACE;;EAER;;AAET"}
1
+ {"version":3,"file":"adapterViews.js","names":["_Fragment"],"sources":["../../../src/data/verification/adapterViews.tsx"],"sourcesContent":["// Detail-body components for the verification node adapters. Split from\n// adapters.ts (react/only-export-components: a file mixing component\n// declarations with the plain TestNodeAdapter/registry exports loses Fast\n// Refresh). Ported from gavel's VerificationStepOutput.tsx (the checklist list\n// and the CelDetails block).\n\nimport type { ReactNode } from \"react\";\nimport { Clicky } from \"../Clicky\";\nimport { JsonView } from \"../JsonView\";\nimport { ViolationLocations } from \"../lint/ViolationLocations\";\nimport { readQuery, readStepDetail, readViolation, splitExecutionDetail, waitDecidedBy, withoutQuery, withoutViolation, type WaitDetail } from \"./stepKind\";\nimport {\n ExecutionHeaderView,\n FailureCallout,\n MalformedStepDetail,\n StepFailedTestsSection,\n StepFormSection,\n StepKindSections,\n StepPendingFormSection,\n StepQuerySection,\n StepSourceSection,\n} from \"./stepKindViews\";\nimport { readStepSource, withoutSource } from \"./stepSource\";\nimport {\n copyReferences,\n Expectation,\n OutcomeIcon,\n TestOutput,\n useTestRunner,\n type FixtureContext,\n type Test,\n type TestOutcome,\n} from \"../test-runner\";\n\n// ── Checklist: the synthesized \"Acceptance criteria\" node and its items ────\n\nfunction checklistItemOutcome(item: Test): TestOutcome {\n if (item.failed) return \"failed\";\n if (item.passed) return \"passed\";\n return \"pending\";\n}\n\nfunction ChecklistItemRow({ item }: { item: Test }) {\n return (\n <tr className=\"align-top\" data-checklist-item=\"\">\n <td className=\"px-2 py-1.5\">\n <span className=\"flex items-start gap-1.5\">\n <OutcomeIcon outcome={checklistItemOutcome(item)} className=\"mt-0.5 text-sm\" />\n <span className=\"min-w-0\">{item.name}</span>\n </span>\n </td>\n <td className=\"px-2 py-1.5 text-muted-foreground\">{item.message}</td>\n </tr>\n );\n}\n\n// Items without a task id (or with a repeated one) are keyed by name plus occurrence count, never the array index.\nfunction keyChecklistItems(items: Test[]) {\n const seen = new Map<string, number>();\n return items.map((item) => {\n const base = item.task_id ?? `${item.name}:${item.message ?? \"\"}`;\n const occurrence = seen.get(base) ?? 0;\n seen.set(base, occurrence + 1);\n return { key: `${base}#${occurrence}`, item };\n });\n}\n\n/** Renders every checklist item for the \"Acceptance criteria\" parent, or the\n * single item itself when a leaf criterion is selected directly. */\nexport function ChecklistDetail({ node }: { node: Test }) {\n const items = node.children && node.children.length > 0 ? node.children : [node];\n return (\n <div className=\"p-density-4\">\n <div className=\"overflow-hidden rounded-md border border-border/60\">\n <table className=\"w-full border-collapse text-xs\">\n <tbody className=\"divide-y divide-border/60\">\n {keyChecklistItems(items).map(({ key, item }) => (\n <ChecklistItemRow key={key} item={item} />\n ))}\n </tbody>\n </table>\n </div>\n </div>\n );\n}\n\n// ── Fixture / CEL: the failing-step detail (command + CelDetails) ──────────\n\nfunction readCelTrace(detail: unknown): string | undefined {\n if (detail && typeof detail === \"object\" && !Array.isArray(detail)) {\n const value = (detail as Record<string, unknown>).cel_trace;\n if (typeof value === \"string\" && value.length > 0) return value;\n }\n return undefined;\n}\n\n// A command step with no CEL assertion stores the whole command result object\n// in `actual` — the command/output is already rendered above, so dumping it\n// again as JSON is noise. Anything a CEL expression compared is shown as-is,\n// structured values included. `hasCelGate` mirrors gavel's own gate: a plain\n// `context.cel_expression`, or a trace recorded in `node.detail` when the\n// expression itself wasn't preserved on `context`.\nfunction comparisonValue(hasCelGate: boolean, value: unknown): unknown {\n if (value === undefined) return undefined;\n if (hasCelGate) return value;\n if (value !== null && typeof value === \"object\" && !Array.isArray(value)) return undefined;\n return value;\n}\n\n// The CEL variables a detail tab already shows in full: the step's outputs (the\n// Outputs tab) and its captured streams (the Stdout tab), so the variables grid\n// does not repeat them.\nfunction varsShownInTabs(node: Test, stepDetail: ReturnType<typeof readStepDetail>): Set<string> {\n const shown = new Set<string>();\n if (stepDetail.kind === \"step\" && stepDetail.step.outputs !== undefined) shown.add(\"outputs\");\n if (node.log || node.stdout || node.stderr) for (const name of [\"stdout\", \"stderr\"]) shown.add(name);\n return shown;\n}\n\n// CEL detail is rendered only for a failing node: the expression and the\n// values it saw are what explain the verdict.\nexport function CelDetails({ node }: { node: Test }) {\n if (node.passed) return null;\n const context = node.context as FixtureContext | undefined;\n const stepDetail = readStepDetail(node.detail);\n const shown = varsShownInTabs(node, stepDetail);\n const vars = Object.fromEntries(Object.entries(context?.cel_vars ?? {}).filter(([name]) => !shown.has(name)));\n const expression = readCelTrace(node.detail) || context?.cel_expression;\n const hasCelGate = !!expression;\n const expected = comparisonValue(hasCelGate, context?.expected);\n const actual = comparisonValue(hasCelGate, context?.actual);\n const hasComparison = expected !== undefined || actual !== undefined;\n if (!expression && Object.keys(vars).length === 0 && !hasComparison) return null;\n const wait = stepDetail.kind === \"step\" ? stepDetail.step.wait : undefined;\n const checkLabel = wait && wait.outcome !== \"satisfied\" ? waitDecidedBy(wait) : \"expression\";\n return (\n <Expectation\n check={expression}\n checkLabel={checkLabel}\n vars={vars}\n expected={expected}\n actual={actual}\n />\n );\n}\n\n// The texts explaining a failure, most specific first. A text already contained\n// in another (a wait cause that the result message embeds) is not repeated.\nfunction failureTexts(...candidates: (string | undefined)[]): string[] {\n const texts = candidates.filter((text): text is string => !!text);\n return texts.filter((text, i) => !texts.some((other, j) => j !== i && other.includes(text) && (other.length > text.length || j < i)));\n}\n\nfunction FailureMessage({ node, cause, error }: { node: Test; cause: string | undefined; error: string | undefined }) {\n const runner = useTestRunner();\n const texts = failureTexts(cause, node.message, error);\n if (texts.length === 0) return null;\n if (!(node.failed || node.timed_out || cause)) return <p className=\"whitespace-pre-wrap break-words text-sm\">{texts.join(\"\\n\")}</p>;\n // The same places on disk the Copy details brief cites, so the copied failure points at its evidence too.\n const references = copyReferences(runner.adapters.resolveCopy(node, runner));\n return <FailureCallout title={node.timed_out ? \"Step timed out\" : \"Step failed\"} texts={texts} references={references} />;\n}\n\nexport type FixtureDetailProps = {\n node: Test;\n renderWait?: (wait: WaitDetail) => ReactNode;\n /** The answerable form of a step waiting on a person (`node.waiting`); the host owns the prompt it answers. */\n renderPendingPrompt?: (node: Test) => ReactNode;\n /** Where the host serves a file the step attached (`detail.files[].path`); required to preview them. */\n fileUrl?: (path: string) => string;\n};\n\ntype StepDetailResult = ReturnType<typeof readStepDetail>;\ntype QueryResult = ReturnType<typeof readQuery>;\ntype ViolationResult = ReturnType<typeof readViolation>;\n\nfunction CommandSection({ command, cwd, exitCode }: { command: string; cwd: string | undefined; exitCode: unknown }) {\n return (\n <div className=\"min-w-0 space-y-1\" data-step-section=\"command\">\n <div className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">Command</div>\n <code className=\"block overflow-x-auto whitespace-pre rounded bg-muted px-2 py-1.5 text-xs\">\n {command}\n </code>\n <div className=\"flex flex-wrap items-center gap-2 text-[10px] text-muted-foreground\">\n {cwd && <span>in {cwd}</span>}\n {typeof exitCode === \"number\" && (\n <span className={exitCode === 0 ? undefined : \"text-red-600\"}>\n exit {exitCode}\n </span>\n )}\n </div>\n </div>\n );\n}\n\nfunction QueryDetailSections({ query }: { query: QueryResult }) {\n if (query.kind === \"query\") return <StepQuerySection query={query.query} />;\n if (query.kind === \"invalid\") return <MalformedStepDetail error={query.error} />;\n return null;\n}\n\nfunction ViolationDetailSections({ violation, workDir }: { violation: ViolationResult; workDir: Test[\"work_dir\"] }) {\n if (violation.kind === \"invalid\") return <MalformedStepDetail error={violation.error} />;\n if (violation.kind !== \"violation\" || violation.violation.locations.length === 0) return null;\n return (\n <div className=\"min-w-0\" data-step-section=\"locations\">\n <ViolationLocations locations={violation.violation.locations} workDir={workDir} />\n </div>\n );\n}\n\n/** The typed step's response view and form. */\nfunction StepResponseSections({ stepDetail }: { stepDetail: StepDetailResult }) {\n if (stepDetail.kind !== \"step\") return null;\n const { view, form } = stepDetail.step;\n return (\n <>\n {view && (\n <div className=\"min-w-0 space-y-1\" data-step-section=\"view\">\n <div className=\"text-[10px] uppercase tracking-wide text-muted-foreground\">Response</div>\n <Clicky data={view} />\n </div>\n )}\n {form && <StepFormSection form={form} />}\n </>\n );\n}\n\n/** The step-kind specific sections, or the notice that the step detail was malformed. */\nfunction StepKindDetail({ stepDetail, renderWait, fileUrl }: { stepDetail: StepDetailResult; renderWait: FixtureDetailProps[\"renderWait\"] | undefined; fileUrl: FixtureDetailProps[\"fileUrl\"] | undefined }) {\n if (stepDetail.kind === \"invalid\") return <MalformedStepDetail error={stepDetail.error} />;\n if (stepDetail.kind !== \"step\") return null;\n return <StepKindSections step={stepDetail.step} {...(renderWait ? { renderWait } : {})} {...(fileUrl ? { fileUrl } : {})} />;\n}\n\nfunction RawDetail({ data }: { data: unknown }) {\n if (data == null) return null;\n return (\n <details className=\"text-muted-foreground\" data-raw-detail=\"\">\n <summary className=\"cursor-pointer text-[10px] uppercase tracking-wide\">Raw detail</summary>\n <div className=\"mt-1 text-foreground\">\n <JsonView data={data} />\n </div>\n </details>\n );\n}\n\nexport function FixtureDetail({ node, renderWait, renderPendingPrompt, fileUrl }: FixtureDetailProps) {\n const context = node.context as FixtureContext | undefined;\n const stepDetail = readStepDetail(node.detail);\n const step = stepDetail.kind === \"step\" ? stepDetail.step : undefined;\n const query = readQuery(node.detail);\n const { header, rest } = splitExecutionDetail(node.detail);\n const command = context?.command ?? node.command;\n // A typed step shows its own sections, so the raw block keeps only what they don't cover.\n const rawDetail = withoutQuery(withoutViolation(withoutSource(step ? splitExecutionDetail(step.rest).rest : rest)));\n const pendingForm = node.waiting === true && renderPendingPrompt ? renderPendingPrompt(node) : null;\n return (\n <div className=\"space-y-4 p-density-4\" data-fixture-detail=\"\">\n <ExecutionHeaderView header={header} {...(step ? { stepKind: step.step.kind } : {})} />\n {pendingForm != null && <StepPendingFormSection>{pendingForm}</StepPendingFormSection>}\n <FailureMessage node={node} cause={step?.wait?.cause} error={header.error} />\n {step?.step.kind === \"test\" && <StepFailedTestsSection node={node} />}\n <QueryDetailSections query={query} />\n {command && query.kind !== \"query\" && <CommandSection command={command} cwd={context?.cwd ?? node.work_dir} exitCode={context?.exit_code} />}\n <StepResponseSections stepDetail={stepDetail} />\n <ViolationDetailSections violation={readViolation(node.detail)} workDir={node.work_dir} />\n <TestOutput node={node} />\n <CelDetails node={node} />\n {(node.failed || node.pending) && <StepSourceSection result={readStepSource(node.detail)} />}\n <StepKindDetail stepDetail={stepDetail} renderWait={renderWait} fileUrl={fileUrl} />\n <RawDetail data={rawDetail} />\n </div>\n );\n}\n"],"mappings":";;;;;;;;;;;;;AAoCA,SAAS,qBAAqB,MAAyB;CACrD,IAAI,KAAK,QAAQ,OAAO;CACxB,IAAI,KAAK,QAAQ,OAAO;CACxB,OAAO;AACT;AAEA,SAAS,iBAAiB,EAAE,QAAwB;CAClD,OACE,qBAAC,MAAD;EAAI,WAAU;EAAY,uBAAoB;EAA9C,UAAA,CACE,oBAAC,MAAD;GAAI,WAAU;GACZ,UAAA,qBAAC,QAAD;IAAM,WAAU;IAAhB,UAAA,CACE,oBAAC,aAAD;KAAa,SAAS,qBAAqB,IAAI;KAAG,WAAU;IAAkB,CAAA,GAC9E,oBAAC,QAAD;KAAM,WAAU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GACzB,oBAAC,YAAD,EAAkB,KAAO,CAAA;IACvB,KAAK,UAAU,KAAK,YAAY,oBAAC,mBAAD,EAAmB,QAAQ,eAAe,KAAK,MAAM,EAAI,CAAA;GAC3F,oBAAC,gBAAD;IAA4B;IAAwB;IAAqB;GAAU,CAAA;GACnF,oBAAC,WAAD,EAAW,MAAM,UAAY,CAAA;EAC1B;;AAET"}
@@ -224,6 +224,15 @@ function verificationAdapters(options = {}) {
224
224
  label: "Outputs",
225
225
  render: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_stepKindViews.StepOutputs, { outputs: detail.step.outputs })
226
226
  });
227
+ const pdfs = detail.kind === "step" ? (detail.step.files ?? []).filter(require_stepKind.isPdfFile) : [];
228
+ if (pdfs.length > 0) tabs.push({
229
+ id: "pdf",
230
+ label: "PDF",
231
+ render: () => /* @__PURE__ */ (0, react_jsx_runtime.jsx)(require_stepKindViews.StepPdfFiles, {
232
+ files: pdfs,
233
+ ...options.fileUrl ? { fileUrl: options.fileUrl } : {}
234
+ })
235
+ });
227
236
  const source = require_stepSource.readStepSource(node.detail);
228
237
  if (source.kind !== "none") tabs.push({
229
238
  id: "source",
@@ -1 +1 @@
1
- {"version":3,"file":"adapters.cjs","names":["ChecklistDetail","hasStepDetail","outcomeFor","readStepDetail","readStepSource","readQuery","stepQueryCopy","stepSourceCopy","stepKindCopy","UiTerminal","stepFormState","StepRowBadge","createTestRunnerRegistry","FixtureDetail","verifyNodeTest","StepOutputs","sourceTabLabel","StepSourceSection"],"sources":["../../../src/data/verification/adapters.tsx"],"sourcesContent":["// Domain node adapters for VerificationResults: a checklist adapter for the\n// synthesized \"Acceptance criteria\" node and its items, and a fixture/CEL\n// adapter for the failing-step detail. Rendering lives in adapterViews.tsx —\n// split out so this file's only exports are the registry (react/only-export-\n// components forbids mixing component declarations with plain exports).\n\nimport type { ReactNode } from \"react\";\nimport { ChecklistDetail, FixtureDetail } from \"./adapterViews\";\nimport { StepOutputs, StepRowBadge, StepSourceSection } from \"./stepKindViews\";\nimport { verifyNodeTest } from \"./verifyReportTests\";\nimport { UiTerminal } from \"../../icons\";\nimport { hasStepDetail, readQuery, readStepDetail, stepFormState, stepKindCopy, stepQueryCopy, type WaitDetail } from \"./stepKind\";\nimport { readStepSource, sourceTabLabel, stepSourceCopy } from \"./stepSource\";\nimport {\n createTestRunnerRegistry,\n outcomeFor,\n type BriefSection,\n type CopySections,\n type FixtureContext,\n type Test,\n type TestNodeAdapter,\n type TestNodeAdapterRegistry,\n type TestOutcome,\n type TestSummary,\n} from \"../test-runner\";\n\nfunction isChecklistNode(node: Test): boolean {\n return node.framework === \"checklist\";\n}\n\nfunction checklistMark(item: Test): string {\n if (item.failed) return \"[ ]\";\n if (item.passed) return \"[x]\";\n return \"[?]\";\n}\n\n/** `- [x]/[ ]/[?] criterion — reason` for each item, or the leaf itself. */\nfunction checklistCopy(node: Test): CopySections {\n const items = node.children && node.children.length > 0 ? node.children : [node];\n const lines = items.map(\n (item) => `- ${checklistMark(item)} ${item.name}${item.message ? ` — ${item.message}` : \"\"}`,\n );\n return { brief: [{ title: \"Criteria\", body: lines.join(\"\\n\") }] };\n}\n\nconst checklistAdapter: TestNodeAdapter = {\n id: \"verification-checklist\",\n match: isChecklistNode,\n renderDetail: ({ node }) => <ChecklistDetail node={node} />,\n copy: ({ node }) => checklistCopy(node),\n};\n\n// A typed step kind (services, todo, …) may report no command or CEL context at\n// all, so `detail.step` claims the node as well. A \"fixture\" leaf is a step whose\n// result has not arrived yet (a live or background step): it carries only the\n// execution node, which FixtureDetail renders as a header. Fixture parents\n// (markdown tables, runner steps) have children and stay with the default body.\nfunction isFixtureNode(node: Test): boolean {\n if (node.context !== undefined || hasStepDetail(node.detail)) return true;\n return node.framework === \"fixture\" && (node.children?.length ?? 0) === 0;\n}\n\n// ── Copy sections for fixture steps (exec / query / table / test / lint) ───\n\nfunction readCelTrace(detail: unknown): string | undefined {\n if (detail && typeof detail === \"object\" && !Array.isArray(detail)) {\n const value = (detail as Record<string, unknown>).cel_trace;\n if (typeof value === \"string\" && value.length > 0) return value;\n }\n return undefined;\n}\n\n// Mirrors CelDetails: without a CEL gate, a command step's `actual` is the whole\n// command result object, already covered by the Command section and output.\nfunction comparisonValue(hasCelGate: boolean, value: unknown): unknown {\n if (value === undefined) return undefined;\n if (hasCelGate) return value;\n if (value !== null && typeof value === \"object\" && !Array.isArray(value)) return undefined;\n return value;\n}\n\nfunction formatValue(value: unknown): string {\n return typeof value === \"string\" ? value : JSON.stringify(value, null, 2);\n}\n\nfunction commandSection(node: Test, context: FixtureContext | undefined): BriefSection[] {\n const command = context?.command ?? node.command;\n if (!command) return [];\n const cwd = context?.cwd ?? node.work_dir;\n const exit = context?.exit_code;\n const lines = [`$ ${command}`, cwd && `cwd: ${cwd}`, exit !== undefined && `exit: ${exit}`];\n return [{ title: \"Command\", lang: \"sh\", body: lines.filter(Boolean).join(\"\\n\") }];\n}\n\nfunction assertionSection(node: Test, context: FixtureContext | undefined): BriefSection[] {\n const expression = context?.cel_expression;\n const trace = readCelTrace(node.detail);\n const hasCelGate = !!(expression || trace);\n const vars = context?.cel_vars ?? {};\n const expected = comparisonValue(hasCelGate, context?.expected);\n const actual = comparisonValue(hasCelGate, context?.actual);\n const lines = [\n expression && `expression: ${expression}`,\n trace && `trace:\\n${trace}`,\n Object.keys(vars).length > 0 && `vars: ${formatValue(vars)}`,\n expected !== undefined && `expected: ${formatValue(expected)}`,\n actual !== undefined && `actual: ${formatValue(actual)}`,\n ].filter(Boolean);\n return lines.length > 0 ? [{ title: \"Assertion\", body: lines.join(\"\\n\") }] : [];\n}\n\nconst OUTCOME_GLYPH: Record<TestOutcome, string> = {\n passed: \"✓\",\n failed: \"✗\",\n errored: \"✗\",\n timedout: \"⏱\",\n warned: \"!\",\n aborted: \"■\",\n skipped: \"-\",\n pending: \"○\",\n running: \"…\",\n};\n\nfunction childLine(child: Test): string {\n const outcome = outcomeFor(child);\n const exit = (child.context as FixtureContext | undefined)?.exit_code;\n const reason = child.message ?? (exit ? `exit ${exit}` : undefined);\n return `${outcome ? OUTCOME_GLYPH[outcome] : \"·\"} ${child.name}${reason ? ` — ${reason}` : \"\"}`;\n}\n\nfunction summaryLine(summary: TestSummary): string {\n const counts: [number | undefined, string][] = [\n [summary.Passed, \"passed\"],\n [summary.Failed, \"failed\"],\n [summary.Warned, \"warned\"],\n [summary.Timedout, \"timed out\"],\n [summary.Skipped, \"skipped\"],\n [summary.Pending, \"pending\"],\n [summary.Running, \"running\"],\n ];\n const parts = counts.filter(([n]) => !!n).map(([n, label]) => `${n} ${label}`);\n return [`${summary.Total} total`, ...parts].join(\" · \");\n}\n\nfunction resultsSection(node: Test): BriefSection[] {\n const lines = [\n ...(node.summary ? [summaryLine(node.summary)] : []),\n ...(node.children ?? []).map(childLine),\n ];\n return lines.length > 0 ? [{ title: \"Results\", body: lines.join(\"\\n\") }] : [];\n}\n\n/** Command, CEL assertion and per-child verdicts for a fixture step or its parent. */\nfunction fixtureCopy(node: Test): CopySections {\n const context = node.context as FixtureContext | undefined;\n const command = context?.command ?? node.command;\n const stepDetail = readStepDetail(node.detail);\n const source = readStepSource(node.detail);\n const query = readQuery(node.detail);\n return {\n brief: [\n ...(query.kind === \"query\" ? stepQueryCopy(query.query) : commandSection(node, context)),\n ...assertionSection(node, context),\n ...(source.kind === \"source\" ? stepSourceCopy(source.source) : []),\n ...(stepDetail.kind === \"step\" ? stepKindCopy(stepDetail.step) : []),\n ...resultsSection(node),\n ],\n items: command ? [{ label: \"Copy command\", icon: UiTerminal, value: command }] : [],\n };\n}\n\n// gavel's FixtureResult.Type values plus \"fixture\" (a markdown table of rows)\n// and the typed step kinds. Table and runner-step parents carry no `context`,\n// so the fixture adapter never claims them; this copy-only adapter gives them\n// the same sections. \"playwright\" is also a test framework, so it counts as a\n// step only when the node carries `detail.step`.\nconst FIXTURE_STEP_FRAMEWORKS = new Set([\n \"exec\",\n \"query\",\n \"fixture\",\n \"test\",\n \"lint\",\n \"verify\",\n \"services\",\n \"todo\",\n \"todo_prompt\",\n \"ai\",\n \"browser\",\n \"playwright\",\n \"agent-browser\",\n]);\n\nfunction isFixtureStepNode(node: Test): boolean {\n const framework = node.framework ?? \"\";\n if (framework === \"playwright\") return hasStepDetail(node.detail);\n return FIXTURE_STEP_FRAMEWORKS.has(framework);\n}\n\nconst fixtureStepCopyAdapter: TestNodeAdapter = {\n id: \"verification-step-copy\",\n match: isFixtureStepNode,\n copy: ({ node }) => fixtureCopy(node),\n};\n\n// Claims only the rows it badges, so a host's own row decoration still wins for every other node.\nconst stepBadgeAdapter: TestNodeAdapter = {\n id: \"verification-step-badge\",\n match: (node) => node.waiting === true || stepFormState(node) !== undefined,\n renderRowLeading: ({ node }) => <StepRowBadge node={node} />,\n};\n\n/** Default node adapters for VerificationResults: checklist items and\n * fixture/CEL steps. Registration order matters only when a node could match\n * both — a checklist node never carries a `context`, so the two never race. */\nexport type VerificationAdapterOptions = {\n /** Override the wait section while retaining the fixture's other detail sections. */\n renderWait?: (wait: WaitDetail) => ReactNode;\n /**\n * The answerable form of a step waiting on a person (`node.waiting`), shown in\n * its own section at the top of the step's detail. The host resolves which\n * pending prompt belongs to the node and answers it (e.g. with PromptForm).\n */\n renderPendingPrompt?: (node: Test) => ReactNode;\n};\n\n// The attempt a step is waiting in: it carries the step's name and task id (the\n// host finds the step's prompt by them) and `waiting`, and, when its result has\n// nothing marking it a fixture step, the step reference, so the fixture detail\n// (and its pending form) still renders it.\nfunction liveAttemptNode(step: Test, attempt: Test, ref: { id: string; kind: string }): Test {\n const live: Test = { ...attempt, name: step.name, ...(step.task_id !== undefined ? { task_id: step.task_id } : {}), waiting: true };\n if (isFixtureNode(live)) return live;\n // readStepDetail has already checked that an attempt result's detail is an object.\n return { ...live, detail: { ...(attempt.detail as Record<string, unknown> | undefined), step: ref } };\n}\n\nexport function verificationAdapters(options: VerificationAdapterOptions = {}): TestNodeAdapterRegistry {\n const fixtureAdapter: TestNodeAdapter = {\n id: \"verification-fixture\",\n match: isFixtureNode,\n renderDetail: ({ node }) => <FixtureDetail node={node} {...options} />,\n detailAttempts: ({ node }) => {\n const detail = readStepDetail(node.detail);\n if (detail.kind !== \"step\") return [];\n const live = detail.step.attempts.length - 1;\n return detail.step.attempts.map((attempt, index) => {\n const attemptNode: Test = attempt.result ? verifyNodeTest(attempt.result) : {\n name: node.name, message: `Attempt ${attempt.attempt}: execution evidence was not stored in this report.`,\n detail: { step: detail.step.step },\n };\n // The step waits in its last attempt; that one keeps the step's identity so the host finds its prompt.\n const waiting = node.waiting === true && index === live;\n // A finished step's log is its last attempt's; a report's attempts carry none.\n if (index === live && node.log !== undefined && !node.running) attemptNode.log = node.log;\n return {\n id: attempt.attempt, status: attempt.status,\n ...(attempt.durationMs !== undefined ? { durationMs: attempt.durationMs } : {}),\n node: waiting ? liveAttemptNode(node, attemptNode, detail.step.step) : attemptNode,\n };\n });\n },\n detailTabs: ({ node }) => {\n const tabs = [];\n const detail = readStepDetail(node.detail);\n if (detail.kind === \"step\" && detail.step.outputs !== undefined) {\n tabs.push({ id: \"outputs\", label: \"Outputs\", render: () => <StepOutputs outputs={detail.step.outputs} /> });\n }\n const source = readStepSource(node.detail);\n if (source.kind !== \"none\") {\n tabs.push({ id: \"source\", label: sourceTabLabel(source), render: () => <StepSourceSection result={source} /> });\n }\n return tabs;\n },\n copy: ({ node }) => fixtureCopy(node),\n };\n return createTestRunnerRegistry([checklistAdapter, fixtureAdapter, fixtureStepCopyAdapter, stepBadgeAdapter]);\n}\n"],"mappings":";;;;;;;;;;AA0BA,SAAS,gBAAgB,MAAqB;CAC5C,OAAO,KAAK,cAAc;AAC5B;AAEA,SAAS,cAAc,MAAoB;CACzC,IAAI,KAAK,QAAQ,OAAO;CACxB,IAAI,KAAK,QAAQ,OAAO;CACxB,OAAO;AACT;;AAGA,SAAS,cAAc,MAA0B;CAK/C,OAAO,EAAE,OAAO,CAAC;EAAE,OAAO;EAAY,OAJxB,KAAK,YAAY,KAAK,SAAS,SAAS,IAAI,KAA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js","names":["ChecklistDetail","hasStepDetail","outcomeFor","readStepDetail","readStepSource","readQuery","stepQueryCopy","stepSourceCopy","stepKindCopy","UiTerminal","stepFormState","StepRowBadge","createTestRunnerRegistry","FixtureDetail","verifyNodeTest","StepOutputs","isPdfFile","StepPdfFiles","sourceTabLabel","StepSourceSection"],"sources":["../../../src/data/verification/adapters.tsx"],"sourcesContent":["// Domain node adapters for VerificationResults: a checklist adapter for the\n// synthesized \"Acceptance criteria\" node and its items, and a fixture/CEL\n// adapter for the failing-step detail. Rendering lives in adapterViews.tsx —\n// split out so this file's only exports are the registry (react/only-export-\n// components forbids mixing component declarations with plain exports).\n\nimport type { ReactNode } from \"react\";\nimport { ChecklistDetail, FixtureDetail } from \"./adapterViews\";\nimport { StepOutputs, StepPdfFiles, StepRowBadge, StepSourceSection } from \"./stepKindViews\";\nimport { verifyNodeTest } from \"./verifyReportTests\";\nimport { UiTerminal } from \"../../icons\";\nimport { hasStepDetail, isPdfFile, readQuery, readStepDetail, stepFormState, stepKindCopy, stepQueryCopy, type WaitDetail } from \"./stepKind\";\nimport { readStepSource, sourceTabLabel, stepSourceCopy } from \"./stepSource\";\nimport {\n createTestRunnerRegistry,\n outcomeFor,\n type BriefSection,\n type CopySections,\n type FixtureContext,\n type Test,\n type TestNodeAdapter,\n type TestNodeAdapterRegistry,\n type TestOutcome,\n type TestSummary,\n} from \"../test-runner\";\n\nfunction isChecklistNode(node: Test): boolean {\n return node.framework === \"checklist\";\n}\n\nfunction checklistMark(item: Test): string {\n if (item.failed) return \"[ ]\";\n if (item.passed) return \"[x]\";\n return \"[?]\";\n}\n\n/** `- [x]/[ ]/[?] criterion — reason` for each item, or the leaf itself. */\nfunction checklistCopy(node: Test): CopySections {\n const items = node.children && node.children.length > 0 ? node.children : [node];\n const lines = items.map(\n (item) => `- ${checklistMark(item)} ${item.name}${item.message ? ` — ${item.message}` : \"\"}`,\n );\n return { brief: [{ title: \"Criteria\", body: lines.join(\"\\n\") }] };\n}\n\nconst checklistAdapter: TestNodeAdapter = {\n id: \"verification-checklist\",\n match: isChecklistNode,\n renderDetail: ({ node }) => <ChecklistDetail node={node} />,\n copy: ({ node }) => checklistCopy(node),\n};\n\n// A typed step kind (services, todo, …) may report no command or CEL context at\n// all, so `detail.step` claims the node as well. A \"fixture\" leaf is a step whose\n// result has not arrived yet (a live or background step): it carries only the\n// execution node, which FixtureDetail renders as a header. Fixture parents\n// (markdown tables, runner steps) have children and stay with the default body.\nfunction isFixtureNode(node: Test): boolean {\n if (node.context !== undefined || hasStepDetail(node.detail)) return true;\n return node.framework === \"fixture\" && (node.children?.length ?? 0) === 0;\n}\n\n// ── Copy sections for fixture steps (exec / query / table / test / lint) ───\n\nfunction readCelTrace(detail: unknown): string | undefined {\n if (detail && typeof detail === \"object\" && !Array.isArray(detail)) {\n const value = (detail as Record<string, unknown>).cel_trace;\n if (typeof value === \"string\" && value.length > 0) return value;\n }\n return undefined;\n}\n\n// Mirrors CelDetails: without a CEL gate, a command step's `actual` is the whole\n// command result object, already covered by the Command section and output.\nfunction comparisonValue(hasCelGate: boolean, value: unknown): unknown {\n if (value === undefined) return undefined;\n if (hasCelGate) return value;\n if (value !== null && typeof value === \"object\" && !Array.isArray(value)) return undefined;\n return value;\n}\n\nfunction formatValue(value: unknown): string {\n return typeof value === \"string\" ? value : JSON.stringify(value, null, 2);\n}\n\nfunction commandSection(node: Test, context: FixtureContext | undefined): BriefSection[] {\n const command = context?.command ?? node.command;\n if (!command) return [];\n const cwd = context?.cwd ?? node.work_dir;\n const exit = context?.exit_code;\n const lines = [`$ ${command}`, cwd && `cwd: ${cwd}`, exit !== undefined && `exit: ${exit}`];\n return [{ title: \"Command\", lang: \"sh\", body: lines.filter(Boolean).join(\"\\n\") }];\n}\n\nfunction assertionSection(node: Test, context: FixtureContext | undefined): BriefSection[] {\n const expression = context?.cel_expression;\n const trace = readCelTrace(node.detail);\n const hasCelGate = !!(expression || trace);\n const vars = context?.cel_vars ?? {};\n const expected = comparisonValue(hasCelGate, context?.expected);\n const actual = comparisonValue(hasCelGate, context?.actual);\n const lines = [\n expression && `expression: ${expression}`,\n trace && `trace:\\n${trace}`,\n Object.keys(vars).length > 0 && `vars: ${formatValue(vars)}`,\n expected !== undefined && `expected: ${formatValue(expected)}`,\n actual !== undefined && `actual: ${formatValue(actual)}`,\n ].filter(Boolean);\n return lines.length > 0 ? [{ title: \"Assertion\", body: lines.join(\"\\n\") }] : [];\n}\n\nconst OUTCOME_GLYPH: Record<TestOutcome, string> = {\n passed: \"✓\",\n failed: \"✗\",\n errored: \"✗\",\n timedout: \"⏱\",\n warned: \"!\",\n aborted: \"■\",\n skipped: \"-\",\n pending: \"○\",\n running: \"…\",\n};\n\nfunction childLine(child: Test): string {\n const outcome = outcomeFor(child);\n const exit = (child.context as FixtureContext | undefined)?.exit_code;\n const reason = child.message ?? (exit ? `exit ${exit}` : undefined);\n return `${outcome ? OUTCOME_GLYPH[outcome] : \"·\"} ${child.name}${reason ? ` — ${reason}` : \"\"}`;\n}\n\nfunction summaryLine(summary: TestSummary): string {\n const counts: [number | undefined, string][] = [\n [summary.Passed, \"passed\"],\n [summary.Failed, \"failed\"],\n [summary.Warned, \"warned\"],\n [summary.Timedout, \"timed out\"],\n [summary.Skipped, \"skipped\"],\n [summary.Pending, \"pending\"],\n [summary.Running, \"running\"],\n ];\n const parts = counts.filter(([n]) => !!n).map(([n, label]) => `${n} ${label}`);\n return [`${summary.Total} total`, ...parts].join(\" · \");\n}\n\nfunction resultsSection(node: Test): BriefSection[] {\n const lines = [\n ...(node.summary ? [summaryLine(node.summary)] : []),\n ...(node.children ?? []).map(childLine),\n ];\n return lines.length > 0 ? [{ title: \"Results\", body: lines.join(\"\\n\") }] : [];\n}\n\n/** Command, CEL assertion and per-child verdicts for a fixture step or its parent. */\nfunction fixtureCopy(node: Test): CopySections {\n const context = node.context as FixtureContext | undefined;\n const command = context?.command ?? node.command;\n const stepDetail = readStepDetail(node.detail);\n const source = readStepSource(node.detail);\n const query = readQuery(node.detail);\n return {\n brief: [\n ...(query.kind === \"query\" ? stepQueryCopy(query.query) : commandSection(node, context)),\n ...assertionSection(node, context),\n ...(source.kind === \"source\" ? stepSourceCopy(source.source) : []),\n ...(stepDetail.kind === \"step\" ? stepKindCopy(stepDetail.step) : []),\n ...resultsSection(node),\n ],\n items: command ? [{ label: \"Copy command\", icon: UiTerminal, value: command }] : [],\n };\n}\n\n// gavel's FixtureResult.Type values plus \"fixture\" (a markdown table of rows)\n// and the typed step kinds. Table and runner-step parents carry no `context`,\n// so the fixture adapter never claims them; this copy-only adapter gives them\n// the same sections. \"playwright\" is also a test framework, so it counts as a\n// step only when the node carries `detail.step`.\nconst FIXTURE_STEP_FRAMEWORKS = new Set([\n \"exec\",\n \"query\",\n \"fixture\",\n \"test\",\n \"lint\",\n \"verify\",\n \"services\",\n \"todo\",\n \"todo_prompt\",\n \"ai\",\n \"browser\",\n \"playwright\",\n \"agent-browser\",\n]);\n\nfunction isFixtureStepNode(node: Test): boolean {\n const framework = node.framework ?? \"\";\n if (framework === \"playwright\") return hasStepDetail(node.detail);\n return FIXTURE_STEP_FRAMEWORKS.has(framework);\n}\n\nconst fixtureStepCopyAdapter: TestNodeAdapter = {\n id: \"verification-step-copy\",\n match: isFixtureStepNode,\n copy: ({ node }) => fixtureCopy(node),\n};\n\n// Claims only the rows it badges, so a host's own row decoration still wins for every other node.\nconst stepBadgeAdapter: TestNodeAdapter = {\n id: \"verification-step-badge\",\n match: (node) => node.waiting === true || stepFormState(node) !== undefined,\n renderRowLeading: ({ node }) => <StepRowBadge node={node} />,\n};\n\n/** Default node adapters for VerificationResults: checklist items and\n * fixture/CEL steps. Registration order matters only when a node could match\n * both — a checklist node never carries a `context`, so the two never race. */\nexport type VerificationAdapterOptions = {\n /** Override the wait section while retaining the fixture's other detail sections. */\n renderWait?: (wait: WaitDetail) => ReactNode;\n /**\n * The answerable form of a step waiting on a person (`node.waiting`), shown in\n * its own section at the top of the step's detail. The host resolves which\n * pending prompt belongs to the node and answers it (e.g. with PromptForm).\n */\n renderPendingPrompt?: (node: Test) => ReactNode;\n /** Where the host serves a file a step attached (`detail.files[].path`), e.g. `/api/step-files?path=…`. */\n fileUrl?: (path: string) => string;\n};\n\n// The attempt a step is waiting in: it carries the step's name and task id (the\n// host finds the step's prompt by them) and `waiting`, and, when its result has\n// nothing marking it a fixture step, the step reference, so the fixture detail\n// (and its pending form) still renders it.\nfunction liveAttemptNode(step: Test, attempt: Test, ref: { id: string; kind: string }): Test {\n const live: Test = { ...attempt, name: step.name, ...(step.task_id !== undefined ? { task_id: step.task_id } : {}), waiting: true };\n if (isFixtureNode(live)) return live;\n // readStepDetail has already checked that an attempt result's detail is an object.\n return { ...live, detail: { ...(attempt.detail as Record<string, unknown> | undefined), step: ref } };\n}\n\nexport function verificationAdapters(options: VerificationAdapterOptions = {}): TestNodeAdapterRegistry {\n const fixtureAdapter: TestNodeAdapter = {\n id: \"verification-fixture\",\n match: isFixtureNode,\n renderDetail: ({ node }) => <FixtureDetail node={node} {...options} />,\n detailAttempts: ({ node }) => {\n const detail = readStepDetail(node.detail);\n if (detail.kind !== \"step\") return [];\n const live = detail.step.attempts.length - 1;\n return detail.step.attempts.map((attempt, index) => {\n const attemptNode: Test = attempt.result ? verifyNodeTest(attempt.result) : {\n name: node.name, message: `Attempt ${attempt.attempt}: execution evidence was not stored in this report.`,\n detail: { step: detail.step.step },\n };\n // The step waits in its last attempt; that one keeps the step's identity so the host finds its prompt.\n const waiting = node.waiting === true && index === live;\n // A finished step's log is its last attempt's; a report's attempts carry none.\n if (index === live && node.log !== undefined && !node.running) attemptNode.log = node.log;\n return {\n id: attempt.attempt, status: attempt.status,\n ...(attempt.durationMs !== undefined ? { durationMs: attempt.durationMs } : {}),\n node: waiting ? liveAttemptNode(node, attemptNode, detail.step.step) : attemptNode,\n };\n });\n },\n detailTabs: ({ node }) => {\n const tabs = [];\n const detail = readStepDetail(node.detail);\n if (detail.kind === \"step\" && detail.step.outputs !== undefined) {\n tabs.push({ id: \"outputs\", label: \"Outputs\", render: () => <StepOutputs outputs={detail.step.outputs} /> });\n }\n const pdfs = detail.kind === \"step\" ? (detail.step.files ?? []).filter(isPdfFile) : [];\n if (pdfs.length > 0) {\n tabs.push({ id: \"pdf\", label: \"PDF\", render: () => <StepPdfFiles files={pdfs} {...(options.fileUrl ? { fileUrl: options.fileUrl } : {})} /> });\n }\n const source = readStepSource(node.detail);\n if (source.kind !== \"none\") {\n tabs.push({ id: \"source\", label: sourceTabLabel(source), render: () => <StepSourceSection result={source} /> });\n }\n return tabs;\n },\n copy: ({ node }) => fixtureCopy(node),\n };\n return createTestRunnerRegistry([checklistAdapter, fixtureAdapter, fixtureStepCopyAdapter, stepBadgeAdapter]);\n}\n"],"mappings":";;;;;;;;;;AA0BA,SAAS,gBAAgB,MAAqB;CAC5C,OAAO,KAAK,cAAc;AAC5B;AAEA,SAAS,cAAc,MAAoB;CACzC,IAAI,KAAK,QAAQ,OAAO;CACxB,IAAI,KAAK,QAAQ,OAAO;CACxB,OAAO;AACT;;AAGA,SAAS,cAAc,MAA0B;CAK/C,OAAO,EAAE,OAAO,CAAC;EAAE,OAAO;EAAY,OAJxB,KAAK,YAAY,KAAK,SAAS,SAAS,IAAI,KAAK,WAAW,CAAC,IAAI,EAAA,CAC3D,KACjB,SAAS,KAAK,cAAc,IAAI,EAAE,GAAG,KAAK,OAAO,KAAK,UAAU,MAAM,KAAK,YAAY,IAE9C,CAAA,CAAM,KAAK,IAAI;CAAE,CAAC,EAAE;AAClE;AAEA,IAAM,mBAAoC;CACxC,IAAI;CACJ,OAAO;CACP,eAAe,EAAE,WAAW,iBAAA,GAAA,kBAAA,IAAA,CAACA,qBAAAA,iBAAD,EAAuB,KAAO,CAAA;CAC1D,OAAO,EAAE,WAAW,cAAc,IAAI;AACxC;AAOA,SAAS,cAAc,MAAqB;CAC1C,IAAI,KAAK,YAAY,KAAA,KAAaC,iBAAAA,cAAc,KAAK,MAAM,GAAG,OAAO;CACrE,OAAO,KAAK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,YAAY,QAAQ,WAAW,IAAI,CAAC;MAC7E,MAAM,UAAU,gBAAgB,MAAM,aAAa,OAAO,KAAK,IAAI,IAAI;KACzE;IACF,CAAC;GACH;GACA,aAAa,EAAE,WAAW;IACxB,MAAM,OAAO,CAAC;IACd,MAAM,SAASX,iBAAAA,eAAe,KAAK,MAAM;IACzC,IAAI,OAAO,SAAS,UAAU,OAAO,KAAK,YAAY,KAAA,GACpD,KAAK,KAAK;KAAE,IAAI;KAAW,OAAO;KAAW,cAAc,iBAAA,GAAA,kBAAA,IAAA,CAACY,sBAAAA,aAAD,EAAa,SAAS,OAAO,KAAK,QAAU,CAAA;IAAE,CAAC;IAE5G,MAAM,OAAO,OAAO,SAAS,UAAU,OAAO,KAAK,SAAS,CAAC,EAAA,CAAG,OAAOC,iBAAAA,SAAS,IAAI,CAAC;IACrF,IAAI,KAAK,SAAS,GAChB,KAAK,KAAK;KAAE,IAAI;KAAO,OAAO;KAAO,cAAc,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,cAAD;MAAc,OAAO;MAAM,GAAK,QAAQ,UAAU,EAAE,SAAS,QAAQ,QAAQ,IAAI,CAAC;KAAK,CAAA;IAAE,CAAC;IAE/I,MAAM,SAASb,mBAAAA,eAAe,KAAK,MAAM;IACzC,IAAI,OAAO,SAAS,QAClB,KAAK,KAAK;KAAE,IAAI;KAAU,OAAOc,mBAAAA,eAAe,MAAM;KAAG,cAAc,iBAAA,GAAA,kBAAA,IAAA,CAACC,sBAAAA,mBAAD,EAAmB,QAAQ,OAAS,CAAA;IAAE,CAAC;IAEhH,OAAO;GACT;GACA,OAAO,EAAE,WAAW,YAAY,IAAI;EAEa;EAAgB;EAAwB;CAAgB,CAAC;AAC9G"}
@@ -13,6 +13,8 @@ export type VerificationAdapterOptions = {
13
13
  * pending prompt belongs to the node and answers it (e.g. with PromptForm).
14
14
  */
15
15
  renderPendingPrompt?: (node: Test) => ReactNode;
16
+ /** Where the host serves a file a step attached (`detail.files[].path`), e.g. `/api/step-files?path=…`. */
17
+ fileUrl?: (path: string) => string;
16
18
  };
17
19
  export declare function verificationAdapters(options?: VerificationAdapterOptions): TestNodeAdapterRegistry;
18
20
  //# sourceMappingURL=adapters.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../../src/data/verification/adapters.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAwF,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAEnI,OAAO,EAML,KAAK,IAAI,EAET,KAAK,uBAAuB,EAG7B,MAAM,gBAAgB,CAAC;AA2LxB;;gFAEgF;AAChF,MAAM,MAAM,0BAA0B,GAAG;IACvC,qFAAqF;IACrF,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS,CAAC;IAC7C;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,SAAS,CAAC;CACjD,CAAC;AAaF,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,0BAA+B,GAAG,uBAAuB,CAwCtG"}
1
+ {"version":3,"file":"adapters.d.ts","sourceRoot":"","sources":["../../../src/data/verification/adapters.tsx"],"names":[],"mappings":"AAMA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,OAAO,CAAC;AAKvC,OAAO,EAAmG,KAAK,UAAU,EAAE,MAAM,YAAY,CAAC;AAE9I,OAAO,EAML,KAAK,IAAI,EAET,KAAK,uBAAuB,EAG7B,MAAM,gBAAgB,CAAC;AA2LxB;;gFAEgF;AAChF,MAAM,MAAM,0BAA0B,GAAG;IACvC,qFAAqF;IACrF,UAAU,CAAC,EAAE,CAAC,IAAI,EAAE,UAAU,KAAK,SAAS,CAAC;IAC7C;;;;OAIG;IACH,mBAAmB,CAAC,EAAE,CAAC,IAAI,EAAE,IAAI,KAAK,SAAS,CAAC;IAChD,2GAA2G;IAC3G,OAAO,CAAC,EAAE,CAAC,IAAI,EAAE,MAAM,KAAK,MAAM,CAAC;CACpC,CAAC;AAaF,wBAAgB,oBAAoB,CAAC,OAAO,GAAE,0BAA+B,GAAG,uBAAuB,CA4CtG"}
@@ -1,8 +1,8 @@
1
1
  import { ChecklistDetail, FixtureDetail } from "./adapterViews.js";
2
- import { StepOutputs, StepRowBadge, StepSourceSection } from "./stepKindViews.js";
2
+ import { StepOutputs, StepPdfFiles, StepRowBadge, StepSourceSection } from "./stepKindViews.js";
3
3
  import { verifyNodeTest } from "./verifyReportTests.js";
4
4
  import { UiTerminal } from "../../icons/components/UiTerminal.js";
5
- import { hasStepDetail, readQuery, readStepDetail, stepFormState, stepKindCopy, stepQueryCopy } from "./stepKind.js";
5
+ import { hasStepDetail, isPdfFile, readQuery, readStepDetail, stepFormState, stepKindCopy, stepQueryCopy } from "./stepKind.js";
6
6
  import { readStepSource, sourceTabLabel, stepSourceCopy } from "./stepSource.js";
7
7
  import { createTestRunnerRegistry } from "../test-runner/adapter.js";
8
8
  import { outcomeFor } from "../test-runner/status.js";
@@ -224,6 +224,15 @@ function verificationAdapters(options = {}) {
224
224
  label: "Outputs",
225
225
  render: () => /* @__PURE__ */ jsx(StepOutputs, { outputs: detail.step.outputs })
226
226
  });
227
+ const pdfs = detail.kind === "step" ? (detail.step.files ?? []).filter(isPdfFile) : [];
228
+ if (pdfs.length > 0) tabs.push({
229
+ id: "pdf",
230
+ label: "PDF",
231
+ render: () => /* @__PURE__ */ jsx(StepPdfFiles, {
232
+ files: pdfs,
233
+ ...options.fileUrl ? { fileUrl: options.fileUrl } : {}
234
+ })
235
+ });
227
236
  const source = readStepSource(node.detail);
228
237
  if (source.kind !== "none") tabs.push({
229
238
  id: "source",