@flanksource/clicky-ui 0.3.49 → 0.3.50

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 (384) hide show
  1. package/dist/connections/ConnectionsPage.cjs +219 -0
  2. package/dist/connections/ConnectionsPage.cjs.map +1 -0
  3. package/dist/connections/ConnectionsPage.d.ts +23 -0
  4. package/dist/connections/ConnectionsPage.d.ts.map +1 -0
  5. package/dist/connections/ConnectionsPage.js +219 -0
  6. package/dist/connections/ConnectionsPage.js.map +1 -0
  7. package/dist/connections/connectionActionStatus.cjs +43 -0
  8. package/dist/connections/connectionActionStatus.cjs.map +1 -0
  9. package/dist/connections/connectionActionStatus.d.ts +5 -0
  10. package/dist/connections/connectionActionStatus.d.ts.map +1 -0
  11. package/dist/connections/connectionActionStatus.js +43 -0
  12. package/dist/connections/connectionActionStatus.js.map +1 -0
  13. package/dist/connections/connectionActionTypes.cjs +24 -0
  14. package/dist/connections/connectionActionTypes.cjs.map +1 -0
  15. package/dist/connections/connectionActionTypes.d.ts +36 -0
  16. package/dist/connections/connectionActionTypes.d.ts.map +1 -0
  17. package/dist/connections/connectionActionTypes.js +24 -0
  18. package/dist/connections/connectionActionTypes.js.map +1 -0
  19. package/dist/connections/connectionActions.cjs +11 -0
  20. package/dist/connections/connectionActions.cjs.map +1 -0
  21. package/dist/connections/connectionActions.d.ts +15 -0
  22. package/dist/connections/connectionActions.d.ts.map +1 -0
  23. package/dist/connections/connectionActions.js +11 -0
  24. package/dist/connections/connectionActions.js.map +1 -0
  25. package/dist/connections/connectionDashboard.cjs +185 -0
  26. package/dist/connections/connectionDashboard.cjs.map +1 -0
  27. package/dist/connections/connectionDashboard.d.ts +25 -0
  28. package/dist/connections/connectionDashboard.d.ts.map +1 -0
  29. package/dist/connections/connectionDashboard.js +185 -0
  30. package/dist/connections/connectionDashboard.js.map +1 -0
  31. package/dist/connections/connectionDashboardModel.cjs +43 -0
  32. package/dist/connections/connectionDashboardModel.cjs.map +1 -0
  33. package/dist/connections/connectionDashboardModel.d.ts +75 -0
  34. package/dist/connections/connectionDashboardModel.d.ts.map +1 -0
  35. package/dist/connections/connectionDashboardModel.js +43 -0
  36. package/dist/connections/connectionDashboardModel.js.map +1 -0
  37. package/dist/connections/connectionDashboardRenderer.cjs +21 -0
  38. package/dist/connections/connectionDashboardRenderer.cjs.map +1 -0
  39. package/dist/connections/connectionDashboardRenderer.d.ts +15 -0
  40. package/dist/connections/connectionDashboardRenderer.d.ts.map +1 -0
  41. package/dist/connections/connectionDashboardRenderer.js +21 -0
  42. package/dist/connections/connectionDashboardRenderer.js.map +1 -0
  43. package/dist/connections/connectionDashboardRow.cjs +169 -0
  44. package/dist/connections/connectionDashboardRow.cjs.map +1 -0
  45. package/dist/connections/connectionDashboardRow.d.ts +12 -0
  46. package/dist/connections/connectionDashboardRow.d.ts.map +1 -0
  47. package/dist/connections/connectionDashboardRow.js +169 -0
  48. package/dist/connections/connectionDashboardRow.js.map +1 -0
  49. package/dist/connections/connectionErrorView.cjs +8 -0
  50. package/dist/connections/connectionErrorView.cjs.map +1 -0
  51. package/dist/connections/connectionErrorView.d.ts +4 -0
  52. package/dist/connections/connectionErrorView.d.ts.map +1 -0
  53. package/dist/connections/connectionErrorView.js +8 -0
  54. package/dist/connections/connectionErrorView.js.map +1 -0
  55. package/dist/connections/connectionHealth.cjs +82 -0
  56. package/dist/connections/connectionHealth.cjs.map +1 -0
  57. package/dist/connections/connectionHealth.d.ts +33 -0
  58. package/dist/connections/connectionHealth.d.ts.map +1 -0
  59. package/dist/connections/connectionHealth.js +82 -0
  60. package/dist/connections/connectionHealth.js.map +1 -0
  61. package/dist/connections/connectionLogging.cjs +29 -0
  62. package/dist/connections/connectionLogging.cjs.map +1 -0
  63. package/dist/connections/connectionLogging.d.ts +11 -0
  64. package/dist/connections/connectionLogging.d.ts.map +1 -0
  65. package/dist/connections/connectionLogging.js +29 -0
  66. package/dist/connections/connectionLogging.js.map +1 -0
  67. package/dist/connections/connectionLoggingField.cjs +37 -0
  68. package/dist/connections/connectionLoggingField.cjs.map +1 -0
  69. package/dist/connections/connectionLoggingField.d.ts +12 -0
  70. package/dist/connections/connectionLoggingField.d.ts.map +1 -0
  71. package/dist/connections/connectionLoggingField.js +37 -0
  72. package/dist/connections/connectionLoggingField.js.map +1 -0
  73. package/dist/connections/connectionLoggingModel.cjs +16 -0
  74. package/dist/connections/connectionLoggingModel.cjs.map +1 -0
  75. package/dist/connections/connectionLoggingModel.d.ts +6 -0
  76. package/dist/connections/connectionLoggingModel.d.ts.map +1 -0
  77. package/dist/connections/connectionLoggingModel.js +16 -0
  78. package/dist/connections/connectionLoggingModel.js.map +1 -0
  79. package/dist/connections/connectionResolveView.cjs +24 -0
  80. package/dist/connections/connectionResolveView.cjs.map +1 -0
  81. package/dist/connections/connectionResolveView.d.ts +5 -0
  82. package/dist/connections/connectionResolveView.d.ts.map +1 -0
  83. package/dist/connections/connectionResolveView.js +24 -0
  84. package/dist/connections/connectionResolveView.js.map +1 -0
  85. package/dist/connections/connectionTestButton.cjs +58 -0
  86. package/dist/connections/connectionTestButton.cjs.map +1 -0
  87. package/dist/connections/connectionTestButton.d.ts +6 -0
  88. package/dist/connections/connectionTestButton.d.ts.map +1 -0
  89. package/dist/connections/connectionTestButton.js +58 -0
  90. package/dist/connections/connectionTestButton.js.map +1 -0
  91. package/dist/connections/connectionTestView.cjs +12 -0
  92. package/dist/connections/connectionTestView.cjs.map +1 -0
  93. package/dist/connections/connectionTestView.d.ts +5 -0
  94. package/dist/connections/connectionTestView.d.ts.map +1 -0
  95. package/dist/connections/connectionTestView.js +12 -0
  96. package/dist/connections/connectionTestView.js.map +1 -0
  97. package/dist/connections/connectionsPageModel.cjs +33 -0
  98. package/dist/connections/connectionsPageModel.cjs.map +1 -0
  99. package/dist/connections/connectionsPageModel.d.ts +24 -0
  100. package/dist/connections/connectionsPageModel.d.ts.map +1 -0
  101. package/dist/connections/connectionsPageModel.js +33 -0
  102. package/dist/connections/connectionsPageModel.js.map +1 -0
  103. package/dist/connections/iconProvider.cjs +20 -0
  104. package/dist/connections/iconProvider.cjs.map +1 -0
  105. package/dist/connections/iconProvider.d.ts +7 -0
  106. package/dist/connections/iconProvider.d.ts.map +1 -0
  107. package/dist/connections/iconProvider.js +20 -0
  108. package/dist/connections/iconProvider.js.map +1 -0
  109. package/dist/connections.cjs +45 -0
  110. package/dist/connections.cjs.map +1 -0
  111. package/dist/connections.d.ts +34 -0
  112. package/dist/connections.d.ts.map +1 -0
  113. package/dist/connections.js +45 -0
  114. package/dist/connections.js.map +1 -0
  115. package/dist/data/diagnostics/DiagnosticsDetailPanel.cjs +52 -295
  116. package/dist/data/diagnostics/DiagnosticsDetailPanel.cjs.map +1 -1
  117. package/dist/data/diagnostics/DiagnosticsDetailPanel.d.ts.map +1 -1
  118. package/dist/data/diagnostics/DiagnosticsDetailPanel.js +47 -290
  119. package/dist/data/diagnostics/DiagnosticsDetailPanel.js.map +1 -1
  120. package/dist/data/diagnostics/MetricTile.cjs +44 -0
  121. package/dist/data/diagnostics/MetricTile.cjs.map +1 -0
  122. package/dist/data/diagnostics/MetricTile.d.ts +13 -0
  123. package/dist/data/diagnostics/MetricTile.d.ts.map +1 -0
  124. package/dist/data/diagnostics/MetricTile.js +44 -0
  125. package/dist/data/diagnostics/MetricTile.js.map +1 -0
  126. package/dist/data/diagnostics/StackDumpView.cjs +227 -0
  127. package/dist/data/diagnostics/StackDumpView.cjs.map +1 -0
  128. package/dist/data/diagnostics/StackDumpView.d.ts +53 -0
  129. package/dist/data/diagnostics/StackDumpView.d.ts.map +1 -0
  130. package/dist/data/diagnostics/StackDumpView.js +227 -0
  131. package/dist/data/diagnostics/StackDumpView.js.map +1 -0
  132. package/dist/data/diagnostics/fixtures.d.ts +1 -0
  133. package/dist/data/diagnostics/fixtures.d.ts.map +1 -1
  134. package/dist/data/diagnostics/metric-tone.cjs +18 -0
  135. package/dist/data/diagnostics/metric-tone.cjs.map +1 -0
  136. package/dist/data/diagnostics/metric-tone.d.ts +6 -0
  137. package/dist/data/diagnostics/metric-tone.d.ts.map +1 -0
  138. package/dist/data/diagnostics/metric-tone.js +18 -0
  139. package/dist/data/diagnostics/metric-tone.js.map +1 -0
  140. package/dist/data/diagnostics/stacktrace.cjs +44 -0
  141. package/dist/data/diagnostics/stacktrace.cjs.map +1 -1
  142. package/dist/data/diagnostics/stacktrace.d.ts +7 -0
  143. package/dist/data/diagnostics/stacktrace.d.ts.map +1 -1
  144. package/dist/data/diagnostics/stacktrace.js +44 -0
  145. package/dist/data/diagnostics/stacktrace.js.map +1 -1
  146. package/dist/data/diagnostics/types.d.ts +2 -8
  147. package/dist/data/diagnostics/types.d.ts.map +1 -1
  148. package/dist/data/lint/LintDetail.cjs +339 -0
  149. package/dist/data/lint/LintDetail.cjs.map +1 -0
  150. package/dist/data/lint/LintDetail.d.ts +17 -0
  151. package/dist/data/lint/LintDetail.d.ts.map +1 -0
  152. package/dist/data/lint/LintDetail.js +339 -0
  153. package/dist/data/lint/LintDetail.js.map +1 -0
  154. package/dist/data/lint/LintFilterBar.cjs +103 -0
  155. package/dist/data/lint/LintFilterBar.cjs.map +1 -0
  156. package/dist/data/lint/LintFilterBar.d.ts +16 -0
  157. package/dist/data/lint/LintFilterBar.d.ts.map +1 -0
  158. package/dist/data/lint/LintFilterBar.js +103 -0
  159. package/dist/data/lint/LintFilterBar.js.map +1 -0
  160. package/dist/data/lint/LintResults.cjs +144 -0
  161. package/dist/data/lint/LintResults.cjs.map +1 -0
  162. package/dist/data/lint/LintResults.d.ts +39 -0
  163. package/dist/data/lint/LintResults.d.ts.map +1 -0
  164. package/dist/data/lint/LintResults.fixtures.d.ts +10 -0
  165. package/dist/data/lint/LintResults.fixtures.d.ts.map +1 -0
  166. package/dist/data/lint/LintResults.js +144 -0
  167. package/dist/data/lint/LintResults.js.map +1 -0
  168. package/dist/data/lint/LintTreeNode.cjs +66 -0
  169. package/dist/data/lint/LintTreeNode.cjs.map +1 -0
  170. package/dist/data/lint/LintTreeNode.d.ts +7 -0
  171. package/dist/data/lint/LintTreeNode.d.ts.map +1 -0
  172. package/dist/data/lint/LintTreeNode.js +66 -0
  173. package/dist/data/lint/LintTreeNode.js.map +1 -0
  174. package/dist/data/lint/actions.cjs +195 -0
  175. package/dist/data/lint/actions.cjs.map +1 -0
  176. package/dist/data/lint/actions.d.ts +29 -0
  177. package/dist/data/lint/actions.d.ts.map +1 -0
  178. package/dist/data/lint/actions.js +195 -0
  179. package/dist/data/lint/actions.js.map +1 -0
  180. package/dist/data/lint/grouping-options.cjs +14 -0
  181. package/dist/data/lint/grouping-options.cjs.map +1 -0
  182. package/dist/data/lint/grouping-options.d.ts +9 -0
  183. package/dist/data/lint/grouping-options.d.ts.map +1 -0
  184. package/dist/data/lint/grouping-options.js +14 -0
  185. package/dist/data/lint/grouping-options.js.map +1 -0
  186. package/dist/data/lint/grouping.cjs +450 -0
  187. package/dist/data/lint/grouping.cjs.map +1 -0
  188. package/dist/data/lint/grouping.d.ts +10 -0
  189. package/dist/data/lint/grouping.d.ts.map +1 -0
  190. package/dist/data/lint/grouping.js +450 -0
  191. package/dist/data/lint/grouping.js.map +1 -0
  192. package/dist/data/lint/index.d.ts +10 -0
  193. package/dist/data/lint/index.d.ts.map +1 -0
  194. package/dist/data/lint/paths.cjs +35 -0
  195. package/dist/data/lint/paths.cjs.map +1 -0
  196. package/dist/data/lint/paths.d.ts +13 -0
  197. package/dist/data/lint/paths.d.ts.map +1 -0
  198. package/dist/data/lint/paths.js +35 -0
  199. package/dist/data/lint/paths.js.map +1 -0
  200. package/dist/data/lint/stats.cjs +76 -0
  201. package/dist/data/lint/stats.cjs.map +1 -0
  202. package/dist/data/lint/stats.d.ts +19 -0
  203. package/dist/data/lint/stats.d.ts.map +1 -0
  204. package/dist/data/lint/stats.js +76 -0
  205. package/dist/data/lint/stats.js.map +1 -0
  206. package/dist/data/lint/types.cjs +16 -0
  207. package/dist/data/lint/types.cjs.map +1 -0
  208. package/dist/data/lint/types.d.ts +93 -0
  209. package/dist/data/lint/types.d.ts.map +1 -0
  210. package/dist/data/lint/types.js +16 -0
  211. package/dist/data/lint/types.js.map +1 -0
  212. package/dist/data/test-runner/TestAttemptDetail.cjs +113 -0
  213. package/dist/data/test-runner/TestAttemptDetail.cjs.map +1 -0
  214. package/dist/data/test-runner/TestAttemptDetail.d.ts +19 -0
  215. package/dist/data/test-runner/TestAttemptDetail.d.ts.map +1 -0
  216. package/dist/data/test-runner/TestAttemptDetail.js +113 -0
  217. package/dist/data/test-runner/TestAttemptDetail.js.map +1 -0
  218. package/dist/data/test-runner/TestAttempts.cjs +36 -0
  219. package/dist/data/test-runner/TestAttempts.cjs.map +1 -0
  220. package/dist/data/test-runner/TestAttempts.d.ts +5 -0
  221. package/dist/data/test-runner/TestAttempts.d.ts.map +1 -0
  222. package/dist/data/test-runner/TestAttempts.js +36 -0
  223. package/dist/data/test-runner/TestAttempts.js.map +1 -0
  224. package/dist/data/test-runner/TestDetailPanel.cjs +13 -3
  225. package/dist/data/test-runner/TestDetailPanel.cjs.map +1 -1
  226. package/dist/data/test-runner/TestDetailPanel.d.ts.map +1 -1
  227. package/dist/data/test-runner/TestDetailPanel.js +14 -4
  228. package/dist/data/test-runner/TestDetailPanel.js.map +1 -1
  229. package/dist/data/test-runner/TestFailureDetail.cjs +9 -29
  230. package/dist/data/test-runner/TestFailureDetail.cjs.map +1 -1
  231. package/dist/data/test-runner/TestFailureDetail.d.ts +6 -6
  232. package/dist/data/test-runner/TestFailureDetail.d.ts.map +1 -1
  233. package/dist/data/test-runner/TestFailureDetail.js +9 -29
  234. package/dist/data/test-runner/TestFailureDetail.js.map +1 -1
  235. package/dist/data/test-runner/TestRunSummary.cjs +33 -0
  236. package/dist/data/test-runner/TestRunSummary.cjs.map +1 -1
  237. package/dist/data/test-runner/TestRunSummary.d.ts.map +1 -1
  238. package/dist/data/test-runner/TestRunSummary.js +34 -1
  239. package/dist/data/test-runner/TestRunSummary.js.map +1 -1
  240. package/dist/data/test-runner/TestRunner.cjs +3 -0
  241. package/dist/data/test-runner/TestRunner.cjs.map +1 -1
  242. package/dist/data/test-runner/TestRunner.d.ts +8 -1
  243. package/dist/data/test-runner/TestRunner.d.ts.map +1 -1
  244. package/dist/data/test-runner/TestRunner.js +3 -0
  245. package/dist/data/test-runner/TestRunner.js.map +1 -1
  246. package/dist/data/test-runner/TestTreeNode.cjs +3 -1
  247. package/dist/data/test-runner/TestTreeNode.cjs.map +1 -1
  248. package/dist/data/test-runner/TestTreeNode.d.ts.map +1 -1
  249. package/dist/data/test-runner/TestTreeNode.js +3 -1
  250. package/dist/data/test-runner/TestTreeNode.js.map +1 -1
  251. package/dist/data/test-runner/adapter.cjs +9 -1
  252. package/dist/data/test-runner/adapter.cjs.map +1 -1
  253. package/dist/data/test-runner/adapter.d.ts +5 -0
  254. package/dist/data/test-runner/adapter.d.ts.map +1 -1
  255. package/dist/data/test-runner/adapter.js +9 -1
  256. package/dist/data/test-runner/adapter.js.map +1 -1
  257. package/dist/data/test-runner/attempts.cjs +62 -0
  258. package/dist/data/test-runner/attempts.cjs.map +1 -0
  259. package/dist/data/test-runner/attempts.d.ts +13 -0
  260. package/dist/data/test-runner/attempts.d.ts.map +1 -0
  261. package/dist/data/test-runner/attempts.js +62 -0
  262. package/dist/data/test-runner/attempts.js.map +1 -0
  263. package/dist/data/test-runner/context.cjs.map +1 -1
  264. package/dist/data/test-runner/context.d.ts +6 -0
  265. package/dist/data/test-runner/context.d.ts.map +1 -1
  266. package/dist/data/test-runner/context.js.map +1 -1
  267. package/dist/data/test-runner/index.d.ts +5 -1
  268. package/dist/data/test-runner/index.d.ts.map +1 -1
  269. package/dist/data/test-runner/marks.cjs +2 -0
  270. package/dist/data/test-runner/marks.cjs.map +1 -1
  271. package/dist/data/test-runner/marks.d.ts.map +1 -1
  272. package/dist/data/test-runner/marks.js +2 -0
  273. package/dist/data/test-runner/marks.js.map +1 -1
  274. package/dist/data/test-runner/process-metrics.cjs +15 -0
  275. package/dist/data/test-runner/process-metrics.cjs.map +1 -0
  276. package/dist/data/test-runner/process-metrics.d.ts +22 -0
  277. package/dist/data/test-runner/process-metrics.d.ts.map +1 -0
  278. package/dist/data/test-runner/process-metrics.js +15 -0
  279. package/dist/data/test-runner/process-metrics.js.map +1 -0
  280. package/dist/data/test-runner/status.cjs +11 -3
  281. package/dist/data/test-runner/status.cjs.map +1 -1
  282. package/dist/data/test-runner/status.d.ts +3 -1
  283. package/dist/data/test-runner/status.d.ts.map +1 -1
  284. package/dist/data/test-runner/status.js +11 -3
  285. package/dist/data/test-runner/status.js.map +1 -1
  286. package/dist/data/test-runner/types.d.ts +14 -0
  287. package/dist/data/test-runner/types.d.ts.map +1 -1
  288. package/dist/data/traces/GoProfileView.cjs +176 -0
  289. package/dist/data/traces/GoProfileView.cjs.map +1 -0
  290. package/dist/data/traces/GoProfileView.d.ts +30 -0
  291. package/dist/data/traces/GoProfileView.d.ts.map +1 -0
  292. package/dist/data/traces/GoProfileView.js +176 -0
  293. package/dist/data/traces/GoProfileView.js.map +1 -0
  294. package/dist/data/traces/ProcessFacetTable.cjs +79 -0
  295. package/dist/data/traces/ProcessFacetTable.cjs.map +1 -0
  296. package/dist/data/traces/ProcessFacetTable.d.ts +21 -0
  297. package/dist/data/traces/ProcessFacetTable.d.ts.map +1 -0
  298. package/dist/data/traces/ProcessFacetTable.js +79 -0
  299. package/dist/data/traces/ProcessFacetTable.js.map +1 -0
  300. package/dist/data/traces/ProcessRecordViews.cjs +41 -0
  301. package/dist/data/traces/ProcessRecordViews.cjs.map +1 -0
  302. package/dist/data/traces/ProcessRecordViews.d.ts +16 -0
  303. package/dist/data/traces/ProcessRecordViews.d.ts.map +1 -0
  304. package/dist/data/traces/ProcessRecordViews.js +41 -0
  305. package/dist/data/traces/ProcessRecordViews.js.map +1 -0
  306. package/dist/data/traces/ProcessTraceDetail.cjs +316 -0
  307. package/dist/data/traces/ProcessTraceDetail.cjs.map +1 -0
  308. package/dist/data/traces/ProcessTraceDetail.d.ts +39 -0
  309. package/dist/data/traces/ProcessTraceDetail.d.ts.map +1 -0
  310. package/dist/data/traces/ProcessTraceDetail.js +316 -0
  311. package/dist/data/traces/ProcessTraceDetail.js.map +1 -0
  312. package/dist/data/traces/ProcessTraceTree.cjs +76 -34
  313. package/dist/data/traces/ProcessTraceTree.cjs.map +1 -1
  314. package/dist/data/traces/ProcessTraceTree.d.ts +21 -4
  315. package/dist/data/traces/ProcessTraceTree.d.ts.map +1 -1
  316. package/dist/data/traces/ProcessTraceTree.js +72 -30
  317. package/dist/data/traces/ProcessTraceTree.js.map +1 -1
  318. package/dist/data/traces/Sparkline.cjs +27 -5
  319. package/dist/data/traces/Sparkline.cjs.map +1 -1
  320. package/dist/data/traces/Sparkline.d.ts +17 -1
  321. package/dist/data/traces/Sparkline.d.ts.map +1 -1
  322. package/dist/data/traces/Sparkline.js +28 -6
  323. package/dist/data/traces/Sparkline.js.map +1 -1
  324. package/dist/data/traces/TraceView.cjs +9 -0
  325. package/dist/data/traces/TraceView.cjs.map +1 -1
  326. package/dist/data/traces/TraceView.d.ts +4 -2
  327. package/dist/data/traces/TraceView.d.ts.map +1 -1
  328. package/dist/data/traces/TraceView.js +9 -0
  329. package/dist/data/traces/TraceView.js.map +1 -1
  330. package/dist/data/traces/TraceWindowList.cjs +117 -0
  331. package/dist/data/traces/TraceWindowList.cjs.map +1 -0
  332. package/dist/data/traces/TraceWindowList.d.ts +48 -0
  333. package/dist/data/traces/TraceWindowList.d.ts.map +1 -0
  334. package/dist/data/traces/TraceWindowList.js +117 -0
  335. package/dist/data/traces/TraceWindowList.js.map +1 -0
  336. package/dist/data/traces/fixtures.d.ts +25 -1
  337. package/dist/data/traces/fixtures.d.ts.map +1 -1
  338. package/dist/data/traces/index.d.ts +10 -3
  339. package/dist/data/traces/index.d.ts.map +1 -1
  340. package/dist/data/traces/process-facets.cjs +48 -0
  341. package/dist/data/traces/process-facets.cjs.map +1 -0
  342. package/dist/data/traces/process-facets.d.ts +38 -0
  343. package/dist/data/traces/process-facets.d.ts.map +1 -0
  344. package/dist/data/traces/process-facets.js +48 -0
  345. package/dist/data/traces/process-facets.js.map +1 -0
  346. package/dist/data/traces/process-tree.cjs +36 -4
  347. package/dist/data/traces/process-tree.cjs.map +1 -1
  348. package/dist/data/traces/process-tree.d.ts +20 -1
  349. package/dist/data/traces/process-tree.d.ts.map +1 -1
  350. package/dist/data/traces/process-tree.js +36 -4
  351. package/dist/data/traces/process-tree.js.map +1 -1
  352. package/dist/data/traces/profile-aggregate.cjs +78 -0
  353. package/dist/data/traces/profile-aggregate.cjs.map +1 -0
  354. package/dist/data/traces/profile-aggregate.d.ts +41 -0
  355. package/dist/data/traces/profile-aggregate.d.ts.map +1 -0
  356. package/dist/data/traces/profile-aggregate.js +78 -0
  357. package/dist/data/traces/profile-aggregate.js.map +1 -0
  358. package/dist/data/traces/stack-checkpoints.cjs +22 -0
  359. package/dist/data/traces/stack-checkpoints.cjs.map +1 -0
  360. package/dist/data/traces/stack-checkpoints.d.ts +18 -0
  361. package/dist/data/traces/stack-checkpoints.d.ts.map +1 -0
  362. package/dist/data/traces/stack-checkpoints.js +22 -0
  363. package/dist/data/traces/stack-checkpoints.js.map +1 -0
  364. package/dist/data/traces/types.d.ts +120 -5
  365. package/dist/data/traces/types.d.ts.map +1 -1
  366. package/dist/data/verification/adapters.cjs +1 -0
  367. package/dist/data/verification/adapters.cjs.map +1 -1
  368. package/dist/data/verification/adapters.d.ts.map +1 -1
  369. package/dist/data/verification/adapters.js +1 -0
  370. package/dist/data/verification/adapters.js.map +1 -1
  371. package/dist/data/version-info.cjs +3 -3
  372. package/dist/data/version-info.js +3 -3
  373. package/dist/data.cjs +85 -7
  374. package/dist/data.cjs.map +1 -1
  375. package/dist/data.d.ts +4 -0
  376. package/dist/data.d.ts.map +1 -1
  377. package/dist/data.js +81 -3
  378. package/dist/data.js.map +1 -1
  379. package/dist/index.cjs +87 -9
  380. package/dist/index.cjs.map +1 -1
  381. package/dist/index.js +81 -3
  382. package/dist/index.js.map +1 -1
  383. package/dist/styles.css +1 -1
  384. package/package.json +6 -1
@@ -1,7 +1,7 @@
1
- import { jsx } from "react/jsx-runtime";
1
+ import { jsxs, jsx } from "react/jsx-runtime";
2
2
  import { cn } from "../../lib/utils.js";
3
3
  import { sparklinePoints } from "./process-tree.js";
4
- function Sparkline({ values, label, width = 64, height = 16, className }) {
4
+ function Sparkline({ values, label, width = 64, height = 16, fill = false, className }) {
5
5
  const points = sparklinePoints(values, width, height);
6
6
  if (!points) return null;
7
7
  return /* @__PURE__ */ jsx(
@@ -10,14 +10,36 @@ function Sparkline({ values, label, width = 64, height = 16, className }) {
10
10
  role: "img",
11
11
  "aria-label": label,
12
12
  viewBox: `0 0 ${width} ${height}`,
13
- width,
14
- height,
15
- className: cn("shrink-0 overflow-visible text-primary", className),
16
- children: /* @__PURE__ */ jsx("polyline", { points, fill: "none", stroke: "currentColor", strokeWidth: 1.25, strokeLinejoin: "round" })
13
+ ...fill ? { preserveAspectRatio: "none" } : { width, height },
14
+ className: cn(fill ? "w-full" : "shrink-0", "overflow-visible text-primary", className),
15
+ style: fill ? { height } : void 0,
16
+ children: /* @__PURE__ */ jsx(
17
+ "polyline",
18
+ {
19
+ points,
20
+ fill: "none",
21
+ stroke: "currentColor",
22
+ strokeWidth: 1.25,
23
+ strokeLinejoin: "round",
24
+ ...fill ? { vectorEffect: "non-scaling-stroke" } : {}
25
+ }
26
+ )
17
27
  }
18
28
  );
19
29
  }
30
+ function LabeledSparkline({ label, values, format, className }) {
31
+ const max = Math.max(...values, 0);
32
+ const only = values[0];
33
+ return /* @__PURE__ */ jsxs("div", { className: cn("rounded-lg border border-border bg-muted/50 px-2.5 py-density-2", className), "data-sparkline": label, children: [
34
+ /* @__PURE__ */ jsxs("div", { className: "flex items-center justify-between text-[10px] uppercase tracking-wide text-muted-foreground", children: [
35
+ /* @__PURE__ */ jsx("span", { children: label }),
36
+ /* @__PURE__ */ jsx("span", { children: values.length > 0 ? `max ${format(max)}` : "" })
37
+ ] }),
38
+ values.length < 2 ? /* @__PURE__ */ jsx("div", { className: "mt-1 text-[11px] text-muted-foreground", children: only === void 0 ? "No samples" : `${format(only)} (1 sample)` }) : /* @__PURE__ */ jsx(Sparkline, { fill: true, values, label: `${label} over time`, width: 160, height: 36, className: "mt-1" })
39
+ ] });
40
+ }
20
41
  export {
42
+ LabeledSparkline,
21
43
  Sparkline
22
44
  };
23
45
  //# sourceMappingURL=Sparkline.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"Sparkline.js","sources":["../../../src/data/traces/Sparkline.tsx"],"sourcesContent":["import { cn } from \"../../lib/utils\";\nimport { sparklinePoints } from \"./process-tree\";\n\nexport type SparklineProps = {\n /** Values in order; at least two are needed to draw a line. */\n values: number[];\n /** Accessible description of what the line plots. */\n label: string;\n width?: number;\n height?: number;\n /** Classes applied to the svg; the stroke follows the text colour. */\n className?: string;\n};\n\n/** A dependency-free inline SVG line, scaled so the largest value touches the top. */\nexport function Sparkline({ values, label, width = 64, height = 16, className }: SparklineProps) {\n const points = sparklinePoints(values, width, height);\n if (!points) return null;\n return (\n <svg\n role=\"img\"\n aria-label={label}\n viewBox={`0 0 ${width} ${height}`}\n width={width}\n height={height}\n className={cn(\"shrink-0 overflow-visible text-primary\", className)}\n >\n <polyline points={points} fill=\"none\" stroke=\"currentColor\" strokeWidth={1.25} strokeLinejoin=\"round\" />\n </svg>\n );\n}\n"],"names":[],"mappings":";;;AAeO,SAAS,UAAU,EAAE,QAAQ,OAAO,QAAQ,IAAI,SAAS,IAAI,aAA6B;AAC/F,QAAM,SAAS,gBAAgB,QAAQ,OAAO,MAAM;AACpD,MAAI,CAAC,OAAQ,QAAO;AACpB,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAY;AAAA,MACZ,SAAS,OAAO,KAAK,IAAI,MAAM;AAAA,MAC/B;AAAA,MACA;AAAA,MACA,WAAW,GAAG,0CAA0C,SAAS;AAAA,MAEjE,UAAA,oBAAC,YAAA,EAAS,QAAgB,MAAK,QAAO,QAAO,gBAAe,aAAa,MAAM,gBAAe,QAAA,CAAQ;AAAA,IAAA;AAAA,EAAA;AAG5G;"}
1
+ {"version":3,"file":"Sparkline.js","sources":["../../../src/data/traces/Sparkline.tsx"],"sourcesContent":["import { cn } from \"../../lib/utils\";\nimport { sparklinePoints } from \"./process-tree\";\n\nexport type SparklineProps = {\n /** Values in order; at least two are needed to draw a line. */\n values: number[];\n /** Accessible description of what the line plots. */\n label: string;\n width?: number;\n height?: number;\n /** Stretch to the width of the container instead of the fixed pixel width. */\n fill?: boolean;\n /** Classes applied to the svg; the stroke follows the text colour. */\n className?: string;\n};\n\n/** A dependency-free inline SVG line, scaled so the largest value touches the top. */\nexport function Sparkline({ values, label, width = 64, height = 16, fill = false, className }: SparklineProps) {\n const points = sparklinePoints(values, width, height);\n if (!points) return null;\n return (\n <svg\n role=\"img\"\n aria-label={label}\n viewBox={`0 0 ${width} ${height}`}\n {...(fill ? { preserveAspectRatio: \"none\" } : { width, height })}\n className={cn(fill ? \"w-full\" : \"shrink-0\", \"overflow-visible text-primary\", className)}\n style={fill ? { height } : undefined}\n >\n <polyline\n points={points}\n fill=\"none\"\n stroke=\"currentColor\"\n strokeWidth={1.25}\n strokeLinejoin=\"round\"\n {...(fill ? { vectorEffect: \"non-scaling-stroke\" } : {})}\n />\n </svg>\n );\n}\n\nexport type LabeledSparklineProps = {\n /** What the line plots, for example \"CPU %\". */\n label: string;\n values: number[];\n /** Formats a value for the max label and the single-sample text. */\n format: (value: number) => string;\n className?: string;\n};\n\n/**\n * A sparkline in a labelled tile: the label and the series maximum above the\n * line, \"No samples\" for none and \"<value> (1 sample)\" for one, since a line\n * needs two points.\n */\nexport function LabeledSparkline({ label, values, format, className }: LabeledSparklineProps) {\n const max = Math.max(...values, 0);\n const only = values[0];\n return (\n <div className={cn(\"rounded-lg border border-border bg-muted/50 px-2.5 py-density-2\", className)} data-sparkline={label}>\n <div className=\"flex items-center justify-between text-[10px] uppercase tracking-wide text-muted-foreground\">\n <span>{label}</span>\n <span>{values.length > 0 ? `max ${format(max)}` : \"\"}</span>\n </div>\n {values.length < 2 ? (\n <div className=\"mt-1 text-[11px] text-muted-foreground\">\n {only === undefined ? \"No samples\" : `${format(only)} (1 sample)`}\n </div>\n ) : (\n <Sparkline fill values={values} label={`${label} over time`} width={160} height={36} className=\"mt-1\" />\n )}\n </div>\n );\n}\n"],"names":[],"mappings":";;;AAiBO,SAAS,UAAU,EAAE,QAAQ,OAAO,QAAQ,IAAI,SAAS,IAAI,OAAO,OAAO,UAAA,GAA6B;AAC7G,QAAM,SAAS,gBAAgB,QAAQ,OAAO,MAAM;AACpD,MAAI,CAAC,OAAQ,QAAO;AACpB,SACE;AAAA,IAAC;AAAA,IAAA;AAAA,MACC,MAAK;AAAA,MACL,cAAY;AAAA,MACZ,SAAS,OAAO,KAAK,IAAI,MAAM;AAAA,MAC9B,GAAI,OAAO,EAAE,qBAAqB,WAAW,EAAE,OAAO,OAAA;AAAA,MACvD,WAAW,GAAG,OAAO,WAAW,YAAY,iCAAiC,SAAS;AAAA,MACtF,OAAO,OAAO,EAAE,OAAA,IAAW;AAAA,MAE3B,UAAA;AAAA,QAAC;AAAA,QAAA;AAAA,UACC;AAAA,UACA,MAAK;AAAA,UACL,QAAO;AAAA,UACP,aAAa;AAAA,UACb,gBAAe;AAAA,UACd,GAAI,OAAO,EAAE,cAAc,yBAAyB,CAAA;AAAA,QAAC;AAAA,MAAA;AAAA,IACxD;AAAA,EAAA;AAGN;AAgBO,SAAS,iBAAiB,EAAE,OAAO,QAAQ,QAAQ,aAAoC;AAC5F,QAAM,MAAM,KAAK,IAAI,GAAG,QAAQ,CAAC;AACjC,QAAM,OAAO,OAAO,CAAC;AACrB,SACE,qBAAC,SAAI,WAAW,GAAG,mEAAmE,SAAS,GAAG,kBAAgB,OAChH,UAAA;AAAA,IAAA,qBAAC,OAAA,EAAI,WAAU,+FACb,UAAA;AAAA,MAAA,oBAAC,UAAM,UAAA,MAAA,CAAM;AAAA,MACb,oBAAC,QAAA,EAAM,UAAA,OAAO,SAAS,IAAI,OAAO,OAAO,GAAG,CAAC,KAAK,GAAA,CAAG;AAAA,IAAA,GACvD;AAAA,IACC,OAAO,SAAS,IACf,oBAAC,OAAA,EAAI,WAAU,0CACZ,UAAA,SAAS,SAAY,eAAe,GAAG,OAAO,IAAI,CAAC,cAAA,CACtD,IAEA,oBAAC,WAAA,EAAU,MAAI,MAAC,QAAgB,OAAO,GAAG,KAAK,cAAc,OAAO,KAAK,QAAQ,IAAI,WAAU,OAAA,CAAO;AAAA,EAAA,GAE1G;AAEJ;"}
@@ -5,6 +5,7 @@ const react = require("react");
5
5
  const utils = require("../../lib/utils.cjs");
6
6
  const dataTableUtils = require("../data-table-utils.cjs");
7
7
  const DataTable = require("../DataTable.cjs");
8
+ const ProcessRecordViews = require("./ProcessRecordViews.cjs");
8
9
  const ProcessTraceTree = require("./ProcessTraceTree.cjs");
9
10
  const SqlTraceTable = require("./SqlTraceTable.cjs");
10
11
  const TerminalCastPlayer = require("./TerminalCastPlayer.cjs");
@@ -44,6 +45,14 @@ function TraceView({ kind, rows, samples, className }) {
44
45
  requireField(kind, rows, "key");
45
46
  if (samples) requireField("process_samples", samples, "key");
46
47
  return /* @__PURE__ */ jsxRuntime.jsx(ProcessTraceView, { rows, samples });
48
+ case "goprof":
49
+ requireField(kind, rows, "key");
50
+ requireField(kind, rows, "checkpointId");
51
+ return /* @__PURE__ */ jsxRuntime.jsx(ProcessRecordViews.GoProfileTraceView, { rows });
52
+ case "stacks":
53
+ requireField(kind, rows, "key");
54
+ requireField(kind, rows, "checkpointId");
55
+ return /* @__PURE__ */ jsxRuntime.jsx(ProcessRecordViews.StackTraceView, { rows });
47
56
  default:
48
57
  return /* @__PURE__ */ jsxRuntime.jsx(GenericTraceTable, { kind, rows });
49
58
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TraceView.cjs","sources":["../../../src/data/traces/TraceView.tsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { inferColumns } from \"../data-table-utils\";\nimport { DataTable } from \"../DataTable\";\nimport { ProcessTraceTree } from \"./ProcessTraceTree\";\nimport { SqlTraceTable } from \"./SqlTraceTable\";\nimport { TerminalCastPlayer } from \"./TerminalCastPlayer\";\nimport { TraceHarView } from \"./TraceHarView\";\nimport type {\n HttpExchangeRow,\n ProcessNodeRow,\n ProcessSampleRow,\n SqlStatementRow,\n TerminalEvent,\n TraceRow,\n} from \"./types\";\n\nexport type TraceViewProps = {\n /** The record kind: `http`, `http_proxy`, `pg_proxy`, `sql_statements`, `terminal`, `process_tree`, or any other. */\n kind: string;\n /** The kind's records, as its stream stores them. */\n rows: TraceRow[];\n /** `process_samples` records of the same root; used by `process_tree` for CPU sparklines. */\n samples?: TraceRow[];\n /** Classes applied to the viewer root. */\n className?: string;\n};\n\n/** Each row of a kind with a dedicated viewer must carry the field that viewer cannot do without. */\nfunction requireField(kind: string, rows: TraceRow[], field: string): void {\n rows.forEach((row, index) => {\n if (row[field] === undefined || row[field] === null) {\n throw new Error(`trace kind \"${kind}\" row ${index} has no \"${field}\"`);\n }\n });\n}\n\nfunction GenericTraceTable({ kind, rows }: { kind: string; rows: TraceRow[] }) {\n const columns = useMemo(() => inferColumns(rows, { literalKeys: true }), [rows]);\n return <DataTable data={rows} columns={columns} autoFilter emptyMessage={`No ${kind} records`} />;\n}\n\nfunction ProcessTraceView({ rows, samples }: { rows: ProcessNodeRow[]; samples: ProcessSampleRow[] | undefined }) {\n const [selectedKey, setSelectedKey] = useState<string | null>(null);\n return <ProcessTraceTree nodes={rows} selectedKey={selectedKey} onSelect={setSelectedKey} {...(samples ? { samples } : {})} />;\n}\n\n/**\n * Renders a trace kind's records with its dedicated viewer: HTTP exchanges in\n * a HAR panel, SQL statements in a table, a terminal session in a cast player,\n * a process tree as a tree. Any other kind gets a table over the row keys.\n */\nexport function TraceView({ kind, rows, samples, className }: TraceViewProps) {\n const body = (() => {\n switch (kind) {\n case \"http\":\n case \"http_proxy\":\n requireField(kind, rows, \"request\");\n requireField(kind, rows, \"response\");\n return <TraceHarView rows={rows as HttpExchangeRow[]} />;\n case \"pg_proxy\":\n case \"sql_statements\":\n requireField(kind, rows, \"sql\");\n return <SqlTraceTable rows={rows as SqlStatementRow[]} />;\n case \"terminal\":\n requireField(kind, rows, \"kind\");\n requireField(kind, rows, \"offset\");\n return <TerminalCastPlayer events={rows as TerminalEvent[]} />;\n case \"process_tree\":\n requireField(kind, rows, \"key\");\n if (samples) requireField(\"process_samples\", samples, \"key\");\n return <ProcessTraceView rows={rows as ProcessNodeRow[]} samples={samples as ProcessSampleRow[] | undefined} />;\n default:\n return <GenericTraceTable kind={kind} rows={rows} />;\n }\n })();\n return <div className={cn(\"flex h-full min-h-0 flex-col\", className)}>{body}</div>;\n}\n"],"names":["useMemo","inferColumns","jsx","DataTable","useState","ProcessTraceTree","TraceHarView","SqlTraceTable","TerminalCastPlayer","cn"],"mappings":";;;;;;;;;;;AA6BA,SAAS,aAAa,MAAc,MAAkB,OAAqB;AACzE,OAAK,QAAQ,CAAC,KAAK,UAAU;AAC3B,QAAI,IAAI,KAAK,MAAM,UAAa,IAAI,KAAK,MAAM,MAAM;AACnD,YAAM,IAAI,MAAM,eAAe,IAAI,SAAS,KAAK,YAAY,KAAK,GAAG;AAAA,IACvE;AAAA,EACF,CAAC;AACH;AAEA,SAAS,kBAAkB,EAAE,MAAM,QAA4C;AAC7E,QAAM,UAAUA,MAAAA,QAAQ,MAAMC,eAAAA,aAAa,MAAM,EAAE,aAAa,KAAA,CAAM,GAAG,CAAC,IAAI,CAAC;AAC/E,SAAOC,2BAAAA,IAACC,UAAAA,WAAA,EAAU,MAAM,MAAM,SAAkB,YAAU,MAAC,cAAc,MAAM,IAAI,WAAA,CAAY;AACjG;AAEA,SAAS,iBAAiB,EAAE,MAAM,WAAgF;AAChH,QAAM,CAAC,aAAa,cAAc,IAAIC,MAAAA,SAAwB,IAAI;AAClE,SAAOF,2BAAAA,IAACG,iBAAAA,kBAAA,EAAiB,OAAO,MAAM,aAA0B,UAAU,gBAAiB,GAAI,UAAU,EAAE,QAAA,IAAY,CAAA,EAAC,CAAI;AAC9H;AAOO,SAAS,UAAU,EAAE,MAAM,MAAM,SAAS,aAA6B;AAC5E,QAAM,QAAQ,MAAM;AAClB,YAAQ,MAAA;AAAA,MACN,KAAK;AAAA,MACL,KAAK;AACH,qBAAa,MAAM,MAAM,SAAS;AAClC,qBAAa,MAAM,MAAM,UAAU;AACnC,eAAOH,+BAACI,aAAAA,gBAAa,MAAiC;AAAA,MACxD,KAAK;AAAA,MACL,KAAK;AACH,qBAAa,MAAM,MAAM,KAAK;AAC9B,eAAOJ,+BAACK,cAAAA,iBAAc,MAAiC;AAAA,MACzD,KAAK;AACH,qBAAa,MAAM,MAAM,MAAM;AAC/B,qBAAa,MAAM,MAAM,QAAQ;AACjC,eAAOL,2BAAAA,IAACM,mBAAAA,oBAAA,EAAmB,QAAQ,KAAA,CAAyB;AAAA,MAC9D,KAAK;AACH,qBAAa,MAAM,MAAM,KAAK;AAC9B,YAAI,QAAS,cAAa,mBAAmB,SAAS,KAAK;AAC3D,eAAON,2BAAAA,IAAC,kBAAA,EAAiB,MAAgC,QAAA,CAAoD;AAAA,MAC/G;AACE,eAAOA,2BAAAA,IAAC,mBAAA,EAAkB,MAAY,KAAA,CAAY;AAAA,IAAA;AAAA,EAExD,GAAA;AACA,wCAAQ,OAAA,EAAI,WAAWO,MAAAA,GAAG,gCAAgC,SAAS,GAAI,UAAA,MAAK;AAC9E;;"}
1
+ {"version":3,"file":"TraceView.cjs","sources":["../../../src/data/traces/TraceView.tsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { inferColumns } from \"../data-table-utils\";\nimport { DataTable } from \"../DataTable\";\nimport { GoProfileTraceView, StackTraceView } from \"./ProcessRecordViews\";\nimport { ProcessTraceTree } from \"./ProcessTraceTree\";\nimport { SqlTraceTable } from \"./SqlTraceTable\";\nimport { TerminalCastPlayer } from \"./TerminalCastPlayer\";\nimport { TraceHarView } from \"./TraceHarView\";\nimport type {\n GoProfileRecord,\n HttpExchangeRow,\n ProcessNodeRow,\n ProcessSampleRow,\n SqlStatementRow,\n StackRecord,\n TerminalEvent,\n TraceRow,\n} from \"./types\";\n\nexport type TraceViewProps = {\n /** The record kind: `http`, `http_proxy`, `pg_proxy`, `sql_statements`, `terminal`, `process_tree`, `goprof`, `stacks`, or any other. */\n kind: string;\n /** The kind's records, as its stream stores them. */\n rows: TraceRow[];\n /** `process_samples` records of the same root; used by `process_tree` for CPU sparklines. */\n samples?: TraceRow[];\n /** Classes applied to the viewer root. */\n className?: string;\n};\n\n/** Each row of a kind with a dedicated viewer must carry the field that viewer cannot do without. */\nfunction requireField(kind: string, rows: TraceRow[], field: string): void {\n rows.forEach((row, index) => {\n if (row[field] === undefined || row[field] === null) {\n throw new Error(`trace kind \"${kind}\" row ${index} has no \"${field}\"`);\n }\n });\n}\n\nfunction GenericTraceTable({ kind, rows }: { kind: string; rows: TraceRow[] }) {\n const columns = useMemo(() => inferColumns(rows, { literalKeys: true }), [rows]);\n return <DataTable data={rows} columns={columns} autoFilter emptyMessage={`No ${kind} records`} />;\n}\n\nfunction ProcessTraceView({ rows, samples }: { rows: ProcessNodeRow[]; samples: ProcessSampleRow[] | undefined }) {\n const [selectedKey, setSelectedKey] = useState<string | null>(null);\n return <ProcessTraceTree nodes={rows} selectedKey={selectedKey} onSelect={setSelectedKey} {...(samples ? { samples } : {})} />;\n}\n\n/**\n * Renders a trace kind's records with its dedicated viewer: HTTP exchanges in\n * a HAR panel, SQL statements in a table, a terminal session in a cast player,\n * a process tree as a tree, Go profiles as a top-functions profile view per\n * process, stack dumps as one dump per checkpoint per process. Any other kind\n * gets a table over the row keys.\n */\nexport function TraceView({ kind, rows, samples, className }: TraceViewProps) {\n const body = (() => {\n switch (kind) {\n case \"http\":\n case \"http_proxy\":\n requireField(kind, rows, \"request\");\n requireField(kind, rows, \"response\");\n return <TraceHarView rows={rows as HttpExchangeRow[]} />;\n case \"pg_proxy\":\n case \"sql_statements\":\n requireField(kind, rows, \"sql\");\n return <SqlTraceTable rows={rows as SqlStatementRow[]} />;\n case \"terminal\":\n requireField(kind, rows, \"kind\");\n requireField(kind, rows, \"offset\");\n return <TerminalCastPlayer events={rows as TerminalEvent[]} />;\n case \"process_tree\":\n requireField(kind, rows, \"key\");\n if (samples) requireField(\"process_samples\", samples, \"key\");\n return <ProcessTraceView rows={rows as ProcessNodeRow[]} samples={samples as ProcessSampleRow[] | undefined} />;\n case \"goprof\":\n requireField(kind, rows, \"key\");\n requireField(kind, rows, \"checkpointId\");\n return <GoProfileTraceView rows={rows as GoProfileRecord[]} />;\n case \"stacks\":\n requireField(kind, rows, \"key\");\n requireField(kind, rows, \"checkpointId\");\n return <StackTraceView rows={rows as StackRecord[]} />;\n default:\n return <GenericTraceTable kind={kind} rows={rows} />;\n }\n })();\n return <div className={cn(\"flex h-full min-h-0 flex-col\", className)}>{body}</div>;\n}\n"],"names":["useMemo","inferColumns","jsx","DataTable","useState","ProcessTraceTree","TraceHarView","SqlTraceTable","TerminalCastPlayer","GoProfileTraceView","StackTraceView","cn"],"mappings":";;;;;;;;;;;;AAgCA,SAAS,aAAa,MAAc,MAAkB,OAAqB;AACzE,OAAK,QAAQ,CAAC,KAAK,UAAU;AAC3B,QAAI,IAAI,KAAK,MAAM,UAAa,IAAI,KAAK,MAAM,MAAM;AACnD,YAAM,IAAI,MAAM,eAAe,IAAI,SAAS,KAAK,YAAY,KAAK,GAAG;AAAA,IACvE;AAAA,EACF,CAAC;AACH;AAEA,SAAS,kBAAkB,EAAE,MAAM,QAA4C;AAC7E,QAAM,UAAUA,MAAAA,QAAQ,MAAMC,eAAAA,aAAa,MAAM,EAAE,aAAa,KAAA,CAAM,GAAG,CAAC,IAAI,CAAC;AAC/E,SAAOC,2BAAAA,IAACC,UAAAA,WAAA,E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AOR,2BAAAA,IAAC,mBAAA,EAAkB,MAAY,KAAA,CAAY;AAAA,IAAA;AAAA,EAExD,GAAA;AACA,wCAAQ,OAAA,EAAI,WAAWS,MAAAA,GAAG,gCAAgC,SAAS,GAAI,UAAA,MAAK;AAC9E;;"}
@@ -1,6 +1,6 @@
1
1
  import { TraceRow } from './types.js';
2
2
  export type TraceViewProps = {
3
- /** The record kind: `http`, `http_proxy`, `pg_proxy`, `sql_statements`, `terminal`, `process_tree`, or any other. */
3
+ /** The record kind: `http`, `http_proxy`, `pg_proxy`, `sql_statements`, `terminal`, `process_tree`, `goprof`, `stacks`, or any other. */
4
4
  kind: string;
5
5
  /** The kind's records, as its stream stores them. */
6
6
  rows: TraceRow[];
@@ -12,7 +12,9 @@ export type TraceViewProps = {
12
12
  /**
13
13
  * Renders a trace kind's records with its dedicated viewer: HTTP exchanges in
14
14
  * a HAR panel, SQL statements in a table, a terminal session in a cast player,
15
- * a process tree as a tree. Any other kind gets a table over the row keys.
15
+ * a process tree as a tree, Go profiles as a top-functions profile view per
16
+ * process, stack dumps as one dump per checkpoint per process. Any other kind
17
+ * gets a table over the row keys.
16
18
  */
17
19
  export declare function TraceView({ kind, rows, samples, className }: TraceViewProps): import("react").JSX.Element;
18
20
  //# sourceMappingURL=TraceView.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"TraceView.d.ts","sourceRoot":"","sources":["../../../src/data/traces/TraceView.tsx"],"names":[],"mappings":"AAQA,OAAO,KAAK,EAMV,QAAQ,EACT,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,cAAc,GAAG;IAC3B,qHAAqH;IACrH,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,6FAA6F;IAC7F,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC;IACrB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAqBF;;;;GAIG;AACH,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,cAAc,+BAyB3E"}
1
+ {"version":3,"file":"TraceView.d.ts","sourceRoot":"","sources":["../../../src/data/traces/TraceView.tsx"],"names":[],"mappings":"AASA,OAAO,KAAK,EAQV,QAAQ,EACT,MAAM,SAAS,CAAC;AAEjB,MAAM,MAAM,cAAc,GAAG;IAC3B,yIAAyI;IACzI,IAAI,EAAE,MAAM,CAAC;IACb,qDAAqD;IACrD,IAAI,EAAE,QAAQ,EAAE,CAAC;IACjB,6FAA6F;IAC7F,OAAO,CAAC,EAAE,QAAQ,EAAE,CAAC;IACrB,0CAA0C;IAC1C,SAAS,CAAC,EAAE,MAAM,CAAC;CACpB,CAAC;AAqBF;;;;;;GAMG;AACH,wBAAgB,SAAS,CAAC,EAAE,IAAI,EAAE,IAAI,EAAE,OAAO,EAAE,SAAS,EAAE,EAAE,cAAc,+BAiC3E"}
@@ -3,6 +3,7 @@ import { useMemo, useState } from "react";
3
3
  import { cn } from "../../lib/utils.js";
4
4
  import { inferColumns } from "../data-table-utils.js";
5
5
  import { DataTable } from "../DataTable.js";
6
+ import { StackTraceView, GoProfileTraceView } from "./ProcessRecordViews.js";
6
7
  import { ProcessTraceTree } from "./ProcessTraceTree.js";
7
8
  import { SqlTraceTable } from "./SqlTraceTable.js";
8
9
  import { TerminalCastPlayer } from "./TerminalCastPlayer.js";
@@ -42,6 +43,14 @@ function TraceView({ kind, rows, samples, className }) {
42
43
  requireField(kind, rows, "key");
43
44
  if (samples) requireField("process_samples", samples, "key");
44
45
  return /* @__PURE__ */ jsx(ProcessTraceView, { rows, samples });
46
+ case "goprof":
47
+ requireField(kind, rows, "key");
48
+ requireField(kind, rows, "checkpointId");
49
+ return /* @__PURE__ */ jsx(GoProfileTraceView, { rows });
50
+ case "stacks":
51
+ requireField(kind, rows, "key");
52
+ requireField(kind, rows, "checkpointId");
53
+ return /* @__PURE__ */ jsx(StackTraceView, { rows });
45
54
  default:
46
55
  return /* @__PURE__ */ jsx(GenericTraceTable, { kind, rows });
47
56
  }
@@ -1 +1 @@
1
- {"version":3,"file":"TraceView.js","sources":["../../../src/data/traces/TraceView.tsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { inferColumns } from \"../data-table-utils\";\nimport { DataTable } from \"../DataTable\";\nimport { ProcessTraceTree } from \"./ProcessTraceTree\";\nimport { SqlTraceTable } from \"./SqlTraceTable\";\nimport { TerminalCastPlayer } from \"./TerminalCastPlayer\";\nimport { TraceHarView } from \"./TraceHarView\";\nimport type {\n HttpExchangeRow,\n ProcessNodeRow,\n ProcessSampleRow,\n SqlStatementRow,\n TerminalEvent,\n TraceRow,\n} from \"./types\";\n\nexport type TraceViewProps = {\n /** The record kind: `http`, `http_proxy`, `pg_proxy`, `sql_statements`, `terminal`, `process_tree`, or any other. */\n kind: string;\n /** The kind's records, as its stream stores them. */\n rows: TraceRow[];\n /** `process_samples` records of the same root; used by `process_tree` for CPU sparklines. */\n samples?: TraceRow[];\n /** Classes applied to the viewer root. */\n className?: string;\n};\n\n/** Each row of a kind with a dedicated viewer must carry the field that viewer cannot do without. */\nfunction requireField(kind: string, rows: TraceRow[], field: string): void {\n rows.forEach((row, index) => {\n if (row[field] === undefined || row[field] === null) {\n throw new Error(`trace kind \"${kind}\" row ${index} has no \"${field}\"`);\n }\n });\n}\n\nfunction GenericTraceTable({ kind, rows }: { kind: string; rows: TraceRow[] }) {\n const columns = useMemo(() => inferColumns(rows, { literalKeys: true }), [rows]);\n return <DataTable data={rows} columns={columns} autoFilter emptyMessage={`No ${kind} records`} />;\n}\n\nfunction ProcessTraceView({ rows, samples }: { rows: ProcessNodeRow[]; samples: ProcessSampleRow[] | undefined }) {\n const [selectedKey, setSelectedKey] = useState<string | null>(null);\n return <ProcessTraceTree nodes={rows} selectedKey={selectedKey} onSelect={setSelectedKey} {...(samples ? { samples } : {})} />;\n}\n\n/**\n * Renders a trace kind's records with its dedicated viewer: HTTP exchanges in\n * a HAR panel, SQL statements in a table, a terminal session in a cast player,\n * a process tree as a tree. Any other kind gets a table over the row keys.\n */\nexport function TraceView({ kind, rows, samples, className }: TraceViewProps) {\n const body = (() => {\n switch (kind) {\n case \"http\":\n case \"http_proxy\":\n requireField(kind, rows, \"request\");\n requireField(kind, rows, \"response\");\n return <TraceHarView rows={rows as HttpExchangeRow[]} />;\n case \"pg_proxy\":\n case \"sql_statements\":\n requireField(kind, rows, \"sql\");\n return <SqlTraceTable rows={rows as SqlStatementRow[]} />;\n case \"terminal\":\n requireField(kind, rows, \"kind\");\n requireField(kind, rows, \"offset\");\n return <TerminalCastPlayer events={rows as TerminalEvent[]} />;\n case \"process_tree\":\n requireField(kind, rows, \"key\");\n if (samples) requireField(\"process_samples\", samples, \"key\");\n return <ProcessTraceView rows={rows as ProcessNodeRow[]} samples={samples as ProcessSampleRow[] | undefined} />;\n default:\n return <GenericTraceTable kind={kind} rows={rows} />;\n }\n })();\n return <div className={cn(\"flex h-full min-h-0 flex-col\", className)}>{body}</div>;\n}\n"],"names":[],"mappings":";;;;;;;;;AA6BA,SAAS,aAAa,MAAc,MAAkB,OAAqB;AACzE,OAAK,QAAQ,CAAC,KAAK,UAAU;AAC3B,QAAI,IAAI,KAAK,MAAM,UAAa,IAAI,KAAK,MAAM,MAAM;AACnD,YAAM,IAAI,MAAM,eAAe,IAAI,SAAS,KAAK,YAAY,KAAK,GAAG;AAAA,IACvE;AAAA,EACF,CAAC;AACH;AAEA,SAAS,kBAAkB,EAAE,MAAM,QAA4C;AAC7E,QAAM,UAAU,QAAQ,MAAM,aAAa,MAAM,EAAE,aAAa,KAAA,CAAM,GAAG,CAAC,IAAI,CAAC;AAC/E,SAAO,oBAAC,WAAA,EAAU,MAAM,MAAM,SAAkB,YAAU,MAAC,cAAc,MAAM,IAAI,WAAA,CAAY;AACjG;AAEA,SAAS,iBAAiB,EAAE,MAAM,WAAgF;AAChH,QAAM,CAAC,aAAa,cAAc,IAAI,SAAwB,IAAI;AAClE,SAAO,oBAAC,kBAAA,EAAiB,OAAO,MAAM,aAA0B,UAAU,gBAAiB,GAAI,UAAU,EAAE,QAAA,IAAY,CAAA,EAAC,CAAI;AAC9H;AAOO,SAAS,UAAU,EAAE,MAAM,MAAM,SAAS,aAA6B;AAC5E,QAAM,QAAQ,MAAM;AAClB,YAAQ,MAAA;AAAA,MACN,KAAK;AAAA,MACL,KAAK;AACH,qBAAa,MAAM,MAAM,SAAS;AAClC,qBAAa,MAAM,MAAM,UAAU;AACnC,eAAO,oBAAC,gBAAa,MAAiC;AAAA,MACxD,KAAK;AAAA,MACL,KAAK;AACH,qBAAa,MAAM,MAAM,KAAK;AAC9B,eAAO,oBAAC,iBAAc,MAAiC;AAAA,MACzD,KAAK;AACH,qBAAa,MAAM,MAAM,MAAM;AAC/B,qBAAa,MAAM,MAAM,QAAQ;AACjC,eAAO,oBAAC,oBAAA,EAAmB,QAAQ,KAAA,CAAyB;AAAA,MAC9D,KAAK;AACH,qBAAa,MAAM,MAAM,KAAK;AAC9B,YAAI,QAAS,cAAa,mBAAmB,SAAS,KAAK;AAC3D,eAAO,oBAAC,kBAAA,EAAiB,MAAgC,QAAA,CAAoD;AAAA,MAC/G;AACE,eAAO,oBAAC,mBAAA,EAAkB,MAAY,KAAA,CAAY;AAAA,IAAA;AAAA,EAExD,GAAA;AACA,6BAAQ,OAAA,EAAI,WAAW,GAAG,gCAAgC,SAAS,GAAI,UAAA,MAAK;AAC9E;"}
1
+ {"version":3,"file":"TraceView.js","sources":["../../../src/data/traces/TraceView.tsx"],"sourcesContent":["import { useMemo, useState } from \"react\";\nimport { cn } from \"../../lib/utils\";\nimport { inferColumns } from \"../data-table-utils\";\nimport { DataTable } from \"../DataTable\";\nimport { GoProfileTraceView, StackTraceView } from \"./ProcessRecordViews\";\nimport { ProcessTraceTree } from \"./ProcessTraceTree\";\nimport { SqlTraceTable } from \"./SqlTraceTable\";\nimport { TerminalCastPlayer } from \"./TerminalCastPlayer\";\nimport { TraceHarView } from \"./TraceHarView\";\nimport type {\n GoProfileRecord,\n HttpExchangeRow,\n ProcessNodeRow,\n ProcessSampleRow,\n SqlStatementRow,\n StackRecord,\n TerminalEvent,\n TraceRow,\n} from \"./types\";\n\nexport type TraceViewProps = {\n /** The record kind: `http`, `http_proxy`, `pg_proxy`, `sql_statements`, `terminal`, `process_tree`, `goprof`, `stacks`, or any other. */\n kind: string;\n /** The kind's records, as its stream stores them. */\n rows: TraceRow[];\n /** `process_samples` records of the same root; used by `process_tree` for CPU sparklines. */\n samples?: TraceRow[];\n /** Classes applied to the viewer root. */\n className?: string;\n};\n\n/** Each row of a kind with a dedicated viewer must carry the field that viewer cannot do without. */\nfunction requireField(kind: string, rows: TraceRow[], field: string): void {\n rows.forEach((row, index) => {\n if (row[field] === undefined || row[field] === null) {\n throw new Error(`trace kind \"${kind}\" row ${index} has no \"${field}\"`);\n }\n });\n}\n\nfunction GenericTraceTable({ kind, rows }: { kind: string; rows: TraceRow[] }) {\n const columns = useMemo(() => inferColumns(rows, { literalKeys: true }), [rows]);\n return <DataTable data={rows} columns={columns} autoFilter emptyMessage={`No ${kind} records`} />;\n}\n\nfunction ProcessTraceView({ rows, samples }: { rows: ProcessNodeRow[]; samples: ProcessSampleRow[] | undefined }) {\n const [selectedKey, setSelectedKey] = useState<string | null>(null);\n return <ProcessTraceTree nodes={rows} selectedKey={selectedKey} onSelect={setSelectedKey} {...(samples ? { samples } : {})} />;\n}\n\n/**\n * Renders a trace kind's records with its dedicated viewer: HTTP exchanges in\n * a HAR panel, SQL statements in a table, a terminal session in a cast player,\n * a process tree as a tree, Go profiles as a top-functions profile view per\n * process, stack dumps as one dump per checkpoint per process. Any other kind\n * gets a table over the row keys.\n */\nexport function TraceView({ kind, rows, samples, className }: TraceViewProps) {\n const body = (() => {\n switch (kind) {\n case \"http\":\n case \"http_proxy\":\n requireField(kind, rows, \"request\");\n requireField(kind, rows, \"response\");\n return <TraceHarView rows={rows as HttpExchangeRow[]} />;\n case \"pg_proxy\":\n case \"sql_statements\":\n requireField(kind, rows, \"sql\");\n return <SqlTraceTable rows={rows as SqlStatementRow[]} />;\n case \"terminal\":\n requireField(kind, rows, \"kind\");\n requireField(kind, rows, \"offset\");\n return <TerminalCastPlayer events={rows as TerminalEvent[]} />;\n case \"process_tree\":\n requireField(kind, rows, \"key\");\n if (samples) requireField(\"process_samples\", samples, \"key\");\n return <ProcessTraceView rows={rows as ProcessNodeRow[]} samples={samples as ProcessSampleRow[] | undefined} />;\n case \"goprof\":\n requireField(kind, rows, \"key\");\n requireField(kind, rows, \"checkpointId\");\n return <GoProfileTraceView rows={rows as GoProfileRecord[]} />;\n case \"stacks\":\n requireField(kind, rows, \"key\");\n requireField(kind, rows, \"checkpointId\");\n return <StackTraceView rows={rows as StackRecord[]} />;\n default:\n return <GenericTraceTable kind={kind} rows={rows} />;\n }\n })();\n return <div className={cn(\"flex h-full min-h-0 flex-col\", className)}>{body}</div>;\n}\n"],"names":[],"mappings":";;;;;;;;;;AAgCA,SAAS,aAAa,MAAc,MAAkB,OAAqB;AACzE,OAAK,QAAQ,CAAC,KAAK,UAAU;AAC3B,QAAI,IAAI,KAAK,MAAM,UAAa,IAAI,KAAK,MAAM,MAAM;AACnD,YAAM,IAAI,MAAM,eAAe,IAAI,SAAS,KAAK,YAAY,KAAK,GAAG;AAAA,IACvE;AAAA,EACF,CAAC;AACH;AAEA,SAAS,kBAAkB,EAAE,MAAM,QAA4C;AAC7E,QAAM,UAAU,QAAQ,MAAM,aAAa,MAAM,EAAE,aAAa,KAAA,CAAM,GAAG,CAAC,IAAI,CAAC;AAC/E,SAAO,oBAAC,WAAA,EAAU,MAAM,MAAM,SAAkB,YAAU,MAAC,cAAc,MAAM,IAAI,WAAA,CAAY;AACjG;AAEA,SAAS,iBAAiB,EAAE,MAAM,WAAgF;AAChH,QAAM,CAAC,aAAa,cAAc,IAAI,SAAwB,IAAI;AAClE,SAAO,oBAAC,kBAAA,EAAiB,OAAO,MAAM,aAA0B,UAAU,gBAAiB,GAAI,UAAU,EAAE,QAAA,IAAY,CAAA,EAAC,CAAI;AAC9H;AASO,SAAS,UAAU,EAAE,MAAM,MAAM,SAAS,aAA6B;AAC5E,QAAM,QAAQ,MAAM;AAClB,YAAQ,MAAA;AAAA,MACN,KAAK;AAAA,MACL,KAAK;AACH,qBAAa,MAAM,MAAM,SAAS;AAClC,qBAAa,MAAM,MAAM,UAAU;AACnC,eAAO,oBAAC,gBAAa,MAAiC;AAAA,MACxD,KAAK;AAAA,MACL,KAAK;AACH,qBAAa,MAAM,MAAM,KAAK;AAC9B,eAAO,oBAAC,iBAAc,MAAiC;AAAA,MACzD,KAAK;AACH,qBAAa,MAAM,MAAM,MAAM;AAC/B,qBAAa,MAAM,MAAM,QAAQ;AACjC,eAAO,oBAAC,oBAAA,EAAmB,QAAQ,KAAA,CAAyB;AAAA,MAC9D,KAAK;AACH,qBAAa,MAAM,MAAM,KAAK;AAC9B,YAAI,QAAS,cAAa,mBAAmB,SAAS,KAAK;AAC3D,eAAO,oBAAC,kBAAA,EAAiB,MAAgC,QAAA,CAAoD;AAAA,MAC/G,KAAK;AACH,qBAAa,MAAM,MAAM,KAAK;AAC9B,qBAAa,MAAM,MAAM,cAAc;AACvC,eAAO,oBAAC,sBAAmB,MAAiC;AAAA,MAC9D,KAAK;AACH,qBAAa,MAAM,MAAM,KAAK;AAC9B,qBAAa,MAAM,MAAM,cAAc;AACvC,eAAO,oBAAC,kBAAe,MAA6B;AAAA,MACtD;AACE,eAAO,oBAAC,mBAAA,EAAkB,MAAY,KAAA,CAAY;AAAA,IAAA;AAAA,EAExD,GAAA;AACA,6BAAQ,OAAA,EAAI,WAAW,GAAG,gCAAgC,SAAS,GAAI,UAAA,MAAK;AAC9E;"}
@@ -0,0 +1,117 @@
1
+ "use strict";
2
+ var __defProp = Object.defineProperty;
3
+ var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
4
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
5
+ Object.defineProperty(exports, Symbol.toStringTag, { value: "Module" });
6
+ const jsxRuntime = require("react/jsx-runtime");
7
+ const react = require("react");
8
+ const TraceView = require("./TraceView.cjs");
9
+ const UNSERVED = "This run's trace store is not served, so its windows cannot be opened.";
10
+ const MAX_SUMMARY_CHIPS = 6;
11
+ const windowKey = (window) => `${window.run_id}:${window.kind}:${window.stream}:${window.afterSeq ?? 0}`;
12
+ const isScalar = (value) => typeof value === "string" || typeof value === "number" || typeof value === "boolean";
13
+ function SummaryChips({ summary }) {
14
+ const entries = Object.entries(summary ?? {}).filter(([key, value]) => key !== "count" && isScalar(value)).slice(0, MAX_SUMMARY_CHIPS);
15
+ return /* @__PURE__ */ jsxRuntime.jsx(jsxRuntime.Fragment, { children: entries.map(([key, value]) => /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground", "data-summary-chip": key, children: [
16
+ key,
17
+ ": ",
18
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono", children: String(value) })
19
+ ] }, key)) });
20
+ }
21
+ class ViewerBoundary extends react.Component {
22
+ constructor() {
23
+ super(...arguments);
24
+ __publicField(this, "state", {});
25
+ }
26
+ static getDerivedStateFromError(error) {
27
+ return { error: error instanceof Error ? error.message : String(error) };
28
+ }
29
+ render() {
30
+ if (this.state.error) {
31
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "px-2 py-1.5 text-xs text-red-700 dark:text-red-400", role: "alert", children: this.state.error });
32
+ }
33
+ return this.props.children;
34
+ }
35
+ }
36
+ function WindowViewer({
37
+ window,
38
+ fetchRecords
39
+ }) {
40
+ const [rows, setRows] = react.useState(null);
41
+ const [error, setError] = react.useState(void 0);
42
+ react.useEffect(() => {
43
+ const abort = new AbortController();
44
+ fetchRecords(window, abort.signal).then(setRows, (reason) => {
45
+ if (!abort.signal.aborted) setError(reason instanceof Error ? reason.message : String(reason));
46
+ });
47
+ return () => abort.abort();
48
+ }, [window.run_id, window.kind, window.stream, window.afterSeq, window.toSeq]);
49
+ if (error) {
50
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "whitespace-pre-wrap border-t border-border px-2 py-1.5 text-xs text-red-700 dark:text-red-400", role: "alert", children: error });
51
+ }
52
+ if (!rows) return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border px-2 py-1.5 text-xs text-muted-foreground", children: "Loading records..." });
53
+ return /* @__PURE__ */ jsxRuntime.jsx("div", { className: "border-t border-border", style: { height: 420 }, children: /* @__PURE__ */ jsxRuntime.jsx(ViewerBoundary, { children: /* @__PURE__ */ jsxRuntime.jsx(TraceView.TraceView, { kind: window.kind, rows }) }) });
54
+ }
55
+ function WindowRow({
56
+ window,
57
+ mount,
58
+ formats,
59
+ fetchRecords,
60
+ exportUrl,
61
+ openUrl
62
+ }) {
63
+ const [open, setOpen] = react.useState(false);
64
+ const linkClass = "text-xs text-primary hover:underline";
65
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "rounded border border-border", "data-trace-kind": window.kind, children: [
66
+ /* @__PURE__ */ jsxRuntime.jsxs("div", { className: "flex flex-wrap items-center gap-2 px-2 py-1.5 text-sm", children: [
67
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "font-mono font-medium text-foreground", children: window.kind }),
68
+ /* @__PURE__ */ jsxRuntime.jsxs("span", { className: "text-xs text-muted-foreground", children: [
69
+ window.count,
70
+ " ",
71
+ window.count === 1 ? "record" : "records"
72
+ ] }),
73
+ /* @__PURE__ */ jsxRuntime.jsx(SummaryChips, { summary: window.summary }),
74
+ /* @__PURE__ */ jsxRuntime.jsx("span", { className: "flex-1" }),
75
+ mount && /* @__PURE__ */ jsxRuntime.jsxs(jsxRuntime.Fragment, { children: [
76
+ /* @__PURE__ */ jsxRuntime.jsx("a", { className: linkClass, href: openUrl(window), target: "_blank", rel: "noreferrer", children: "Open in query" }),
77
+ formats.map((format) => /* @__PURE__ */ jsxRuntime.jsx("a", { className: linkClass, href: exportUrl(window, format.name), download: true, children: format.name.toUpperCase() }, format.name)),
78
+ /* @__PURE__ */ jsxRuntime.jsx("button", { type: "button", className: linkClass, onClick: () => setOpen(!open), children: open ? "Hide" : "View" })
79
+ ] })
80
+ ] }),
81
+ window.error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "whitespace-pre-wrap px-2 pb-1.5 text-xs text-red-700 dark:text-red-400", children: window.error }),
82
+ open && mount && /* @__PURE__ */ jsxRuntime.jsx(WindowViewer, { window, fetchRecords })
83
+ ] });
84
+ }
85
+ function TraceWindowList({ windows, resolve, formats, fetchRecords, exportUrl, openUrl, error }) {
86
+ const sources = windows.map((window) => resolve(window));
87
+ const unavailable = [
88
+ ...new Set(sources.filter((source) => !source.mount).map((source) => source.unavailable || UNSERVED))
89
+ ];
90
+ return /* @__PURE__ */ jsxRuntime.jsxs("div", { children: [
91
+ /* @__PURE__ */ jsxRuntime.jsx("h3", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Traces" }),
92
+ unavailable.map((reason) => /* @__PURE__ */ jsxRuntime.jsx(
93
+ "div",
94
+ {
95
+ className: "mb-2 rounded border border-amber-300 bg-amber-50 px-2 py-1 text-xs text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-300",
96
+ role: "status",
97
+ children: reason
98
+ },
99
+ reason
100
+ )),
101
+ /* @__PURE__ */ jsxRuntime.jsx("div", { className: "space-y-2", children: windows.map((window, index) => /* @__PURE__ */ jsxRuntime.jsx(
102
+ WindowRow,
103
+ {
104
+ window,
105
+ mount: sources[index].mount,
106
+ formats: formats(window.kind),
107
+ fetchRecords,
108
+ exportUrl,
109
+ openUrl
110
+ },
111
+ windowKey(window)
112
+ )) }),
113
+ error && /* @__PURE__ */ jsxRuntime.jsx("div", { className: "mt-1 text-xs text-red-700 dark:text-red-400", children: error })
114
+ ] });
115
+ }
116
+ exports.TraceWindowList = TraceWindowList;
117
+ //# sourceMappingURL=TraceWindowList.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TraceWindowList.cjs","sources":["../../../src/data/traces/TraceWindowList.tsx"],"sourcesContent":["import { Component, useEffect, useState, type ReactNode } from \"react\";\nimport { TraceView } from \"./TraceView\";\nimport type { TraceRow } from \"./types\";\n\n/** A window of a trace stream a fixture armed: the records after `afterSeq` through `toSeq` (0 = unbounded) of one kind's stream. */\nexport type TraceWindow = {\n kind: string;\n stream: string;\n afterSeq?: number;\n toSeq?: number;\n /** The run whose trace store holds the window. */\n run_id: string;\n count: number;\n /** The kind's summary of the window, shown as chips. */\n summary?: Record<string, unknown>;\n /** Why the window could not be read. */\n error?: string;\n};\n\n/** Where a window's run serves its store, or why it does not. */\nexport type TraceWindowSource = {\n /** Where the store is served; absent when it is not. */\n mount?: string;\n /** Why a store that was kept is not served (for example pruned since). */\n unavailable?: string;\n};\n\nexport type TraceWindowListProps = {\n windows: TraceWindow[];\n /** Resolves the store of a window's run. */\n resolve: (window: TraceWindow) => TraceWindowSource;\n /** The export formats of a kind, for example `[{ name: \"har\" }]`. */\n formats: (kind: string) => Array<{ name: string }>;\n /** Reads a window's records for the inline viewer. Must reject on failure and honour `signal`. */\n fetchRecords: (window: TraceWindow, signal: AbortSignal) => Promise<TraceRow[]>;\n /** Download URL of a window in one export format. */\n exportUrl: (window: TraceWindow, format: string) => string;\n /** URL of the query app opened at exactly this window. */\n openUrl: (window: TraceWindow) => string;\n /** A failure that applies to the whole list, such as the export formats not loading. */\n error?: string;\n};\n\nconst UNSERVED = \"This run's trace store is not served, so its windows cannot be opened.\";\nconst MAX_SUMMARY_CHIPS = 6;\n\nconst windowKey = (window: TraceWindow) => `${window.run_id}:${window.kind}:${window.stream}:${window.afterSeq ?? 0}`;\n\nconst isScalar = (value: unknown) => typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\";\n\nfunction SummaryChips({ summary }: { summary: Record<string, unknown> | undefined }) {\n const entries = Object.entries(summary ?? {})\n .filter(([key, value]) => key !== \"count\" && isScalar(value))\n .slice(0, MAX_SUMMARY_CHIPS);\n return (\n <>\n {entries.map(([key, value]) => (\n <span key={key} className=\"rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground\" data-summary-chip={key}>\n {key}: <span className=\"font-mono\">{String(value)}</span>\n </span>\n ))}\n </>\n );\n}\n\n/** Keeps a viewer that refuses its records (TraceView throws on a row its kind's viewer cannot render) from taking the whole list down. */\nclass ViewerBoundary extends Component<{ children: ReactNode }, { error?: string }> {\n override state: { error?: string } = {};\n\n static getDerivedStateFromError(error: unknown) {\n return { error: error instanceof Error ? error.message : String(error) };\n }\n\n override render() {\n if (this.state.error) {\n return (\n <div className=\"px-2 py-1.5 text-xs text-red-700 dark:text-red-400\" role=\"alert\">\n {this.state.error}\n </div>\n );\n }\n return this.props.children;\n }\n}\n\nfunction WindowViewer({\n window,\n fetchRecords,\n}: {\n window: TraceWindow;\n fetchRecords: TraceWindowListProps[\"fetchRecords\"];\n}) {\n const [rows, setRows] = useState<TraceRow[] | null>(null);\n const [error, setError] = useState<string | undefined>(undefined);\n useEffect(() => {\n const abort = new AbortController();\n fetchRecords(window, abort.signal).then(setRows, (reason: unknown) => {\n if (!abort.signal.aborted) setError(reason instanceof Error ? reason.message : String(reason));\n });\n return () => abort.abort();\n // The window is identified by its coordinates; the host may rebuild the object each render.\n }, [window.run_id, window.kind, window.stream, window.afterSeq, window.toSeq]);\n if (error) {\n return (\n <div className=\"whitespace-pre-wrap border-t border-border px-2 py-1.5 text-xs text-red-700 dark:text-red-400\" role=\"alert\">\n {error}\n </div>\n );\n }\n if (!rows) return <div className=\"border-t border-border px-2 py-1.5 text-xs text-muted-foreground\">Loading records...</div>;\n return (\n <div className=\"border-t border-border\" style={{ height: 420 }}>\n <ViewerBoundary>\n <TraceView kind={window.kind} rows={rows} />\n </ViewerBoundary>\n </div>\n );\n}\n\nfunction WindowRow({\n window,\n mount,\n formats,\n fetchRecords,\n exportUrl,\n openUrl,\n}: {\n window: TraceWindow;\n mount: string | undefined;\n formats: Array<{ name: string }>;\n} & Pick<TraceWindowListProps, \"fetchRecords\" | \"exportUrl\" | \"openUrl\">) {\n const [open, setOpen] = useState(false);\n const linkClass = \"text-xs text-primary hover:underline\";\n return (\n <div className=\"rounded border border-border\" data-trace-kind={window.kind}>\n <div className=\"flex flex-wrap items-center gap-2 px-2 py-1.5 text-sm\">\n <span className=\"font-mono font-medium text-foreground\">{window.kind}</span>\n <span className=\"text-xs text-muted-foreground\">\n {window.count} {window.count === 1 ? \"record\" : \"records\"}\n </span>\n <SummaryChips summary={window.summary} />\n <span className=\"flex-1\" />\n {mount && (\n <>\n <a className={linkClass} href={openUrl(window)} target=\"_blank\" rel=\"noreferrer\">\n Open in query\n </a>\n {formats.map((format) => (\n <a key={format.name} className={linkClass} href={exportUrl(window, format.name)} download>\n {format.name.toUpperCase()}\n </a>\n ))}\n <button type=\"button\" className={linkClass} onClick={() => setOpen(!open)}>\n {open ? \"Hide\" : \"View\"}\n </button>\n </>\n )}\n </div>\n {window.error && (\n <div className=\"whitespace-pre-wrap px-2 pb-1.5 text-xs text-red-700 dark:text-red-400\">{window.error}</div>\n )}\n {open && mount && <WindowViewer window={window} fetchRecords={fetchRecords} />}\n </div>\n );\n}\n\n/**\n * One fixture's trace windows: what each captured (kind, record count, summary\n * chips), a link into the query app at exactly that window, per-format export\n * downloads and an inline viewer of its records. Windows of a run whose store\n * is not served say why, once per reason. Props-only: the host resolves stores\n * and builds the URLs.\n */\nexport function TraceWindowList({ windows, resolve, formats, fetchRecords, exportUrl, openUrl, error }: TraceWindowListProps) {\n const sources = windows.map((window) => resolve(window));\n const unavailable = [\n ...new Set(sources.filter((source) => !source.mount).map((source) => source.unavailable || UNSERVED)),\n ];\n return (\n <div>\n <h3 className=\"mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground\">Traces</h3>\n {unavailable.map((reason) => (\n <div\n key={reason}\n className=\"mb-2 rounded border border-amber-300 bg-amber-50 px-2 py-1 text-xs text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-300\"\n role=\"status\"\n >\n {reason}\n </div>\n ))}\n <div className=\"space-y-2\">\n {windows.map((window, index) => (\n <WindowRow\n key={windowKey(window)}\n window={window}\n mount={sources[index]!.mount}\n formats={formats(window.kind)}\n fetchRecords={fetchRecords}\n exportUrl={exportUrl}\n openUrl={openUrl}\n />\n ))}\n </div>\n {error && <div className=\"mt-1 text-xs text-red-700 dark:text-red-400\">{error}</div>}\n </div>\n );\n}\n"],"names":["jsx","Fragment","jsxs","Component","useState","useEffect","TraceView"],"mappings":";;;;;;;;AA2CA,MAAM,WAAW;AACjB,MAAM,oBAAoB;AAE1B,MAAM,YAAY,CAAC,WAAwB,GAAG,OAAO,MAAM,IAAI,OAAO,IAAI,IAAI,OAAO,MAAM,IAAI,OAAO,YAAY,CAAC;AAEnH,MAAM,WAAW,CAAC,UAAmB,OAAO,UAAU,YAAY,OAAO,UAAU,YAAY,OAAO,UAAU;AAEhH,SAAS,aAAa,EAAE,WAA6D;AACnF,QAAM,UAAU,OAAO,QAAQ,WAAW,CAAA,CAAE,EACzC,OAAO,CAAC,CAAC,KAAK,KAAK,MAAM,QAAQ,WAAW,SAAS,KAAK,CAAC,EAC3D,MAAM,GAAG,iBAAiB;AAC7B,SACEA,2BAAAA,IAAAC,WAAAA,UAAA,EACG,UAAA,QAAQ,IAAI,CAAC,CAAC,KAAK,KAAK,MACvBC,2BAAAA,KAAC,QAAA,EAAe,WAAU,gEAA+D,qBAAmB,KACzG,UAAA;AAAA,IAAA;AAAA,IAAI;AAAA,mCAAG,QAAA,EAAK,WAAU,aAAa,UAAA,OAAO,KAAK,EAAA,CAAE;AAAA,EAAA,KADzC,GAEX,CACD,GACH;AAEJ;AAGA,MAAM,uBAAuBC,MAAAA,UAAuD;AAAA,EAApF;AAAA;AACW,iCAA4B,CAAA;AAAA;AAAA,EAErC,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gB,EAAE,SAAS,SAAS,SAAS,cAAc,WAAW,SAAS,SAA+B;AAC5H,QAAM,UAAU,QAAQ,IAAI,CAAC,WAAW,QAAQ,MAAM,CAAC;AACvD,QAAM,cAAc;AAAA,IAClB,GAAG,IAAI,IAAI,QAAQ,OAAO,CAAC,WAAW,CAAC,OAAO,KAAK,EAAE,IAAI,CAAC,WAAW,OAAO,eAAe,QAAQ,CAAC;AAAA,EAAA;AAEtG,yCACG,OAAA,EACC,UAAA;AAAA,IAAAA,2BAAAA,IAAC,MAAA,EAAG,WAAU,4EAA2E,UAAA,UAAM;AAAA,IAC9F,YAAY,IAAI,CAAC,WAChBA,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QAEC,WAAU;AAAA,QACV,MAAK;AAAA,QAEJ,UAAA;AAAA,MAAA;AAAA,MAJI;AAAA,IAAA,CAMR;AAAA,IACDA,2BAAAA,IAAC,SAAI,WAAU,aACZ,kBAAQ,IAAI,CAAC,QAAQ,UACpBA,2BAAAA;AAAAA,MAAC;AAAA,MAAA;AAAA,QAEC;AAAA,QACA,OAAO,QAAQ,KAAK,EAAG;AAAA,QACvB,SAAS,QAAQ,OAAO,IAAI;AAAA,QAC5B;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MANK,UAAU,MAAM;AAAA,IAAA,CAQxB,GACH;AAAA,IACC,SAASA,2BAAAA,IAAC,OAAA,EAAI,WAAU,+CAA+C,UAAA,MAAA,CAAM;AAAA,EAAA,GAChF;AAEJ;;"}
@@ -0,0 +1,48 @@
1
+ import { TraceRow } from './types.js';
2
+ /** A window of a trace stream a fixture armed: the records after `afterSeq` through `toSeq` (0 = unbounded) of one kind's stream. */
3
+ export type TraceWindow = {
4
+ kind: string;
5
+ stream: string;
6
+ afterSeq?: number;
7
+ toSeq?: number;
8
+ /** The run whose trace store holds the window. */
9
+ run_id: string;
10
+ count: number;
11
+ /** The kind's summary of the window, shown as chips. */
12
+ summary?: Record<string, unknown>;
13
+ /** Why the window could not be read. */
14
+ error?: string;
15
+ };
16
+ /** Where a window's run serves its store, or why it does not. */
17
+ export type TraceWindowSource = {
18
+ /** Where the store is served; absent when it is not. */
19
+ mount?: string;
20
+ /** Why a store that was kept is not served (for example pruned since). */
21
+ unavailable?: string;
22
+ };
23
+ export type TraceWindowListProps = {
24
+ windows: TraceWindow[];
25
+ /** Resolves the store of a window's run. */
26
+ resolve: (window: TraceWindow) => TraceWindowSource;
27
+ /** The export formats of a kind, for example `[{ name: "har" }]`. */
28
+ formats: (kind: string) => Array<{
29
+ name: string;
30
+ }>;
31
+ /** Reads a window's records for the inline viewer. Must reject on failure and honour `signal`. */
32
+ fetchRecords: (window: TraceWindow, signal: AbortSignal) => Promise<TraceRow[]>;
33
+ /** Download URL of a window in one export format. */
34
+ exportUrl: (window: TraceWindow, format: string) => string;
35
+ /** URL of the query app opened at exactly this window. */
36
+ openUrl: (window: TraceWindow) => string;
37
+ /** A failure that applies to the whole list, such as the export formats not loading. */
38
+ error?: string;
39
+ };
40
+ /**
41
+ * One fixture's trace windows: what each captured (kind, record count, summary
42
+ * chips), a link into the query app at exactly that window, per-format export
43
+ * downloads and an inline viewer of its records. Windows of a run whose store
44
+ * is not served say why, once per reason. Props-only: the host resolves stores
45
+ * and builds the URLs.
46
+ */
47
+ export declare function TraceWindowList({ windows, resolve, formats, fetchRecords, exportUrl, openUrl, error }: TraceWindowListProps): import("react").JSX.Element;
48
+ //# sourceMappingURL=TraceWindowList.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TraceWindowList.d.ts","sourceRoot":"","sources":["../../../src/data/traces/TraceWindowList.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,SAAS,CAAC;AAExC,qIAAqI;AACrI,MAAM,MAAM,WAAW,GAAG;IACxB,IAAI,EAAE,MAAM,CAAC;IACb,MAAM,EAAE,MAAM,CAAC;IACf,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,KAAK,CAAC,EA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var __defNormalProp = (obj, key, value) => key in obj ? __defProp(obj, key, { enumerable: true, configurable: true, writable: true, value }) : obj[key] = value;
3
+ var __publicField = (obj, key, value) => __defNormalProp(obj, typeof key !== "symbol" ? key + "" : key, value);
4
+ import { jsxs, jsx, Fragment } from "react/jsx-runtime";
5
+ import { useState, useEffect, Component } from "react";
6
+ import { TraceView } from "./TraceView.js";
7
+ const UNSERVED = "This run's trace store is not served, so its windows cannot be opened.";
8
+ const MAX_SUMMARY_CHIPS = 6;
9
+ const windowKey = (window) => `${window.run_id}:${window.kind}:${window.stream}:${window.afterSeq ?? 0}`;
10
+ const isScalar = (value) => typeof value === "string" || typeof value === "number" || typeof value === "boolean";
11
+ function SummaryChips({ summary }) {
12
+ const entries = Object.entries(summary ?? {}).filter(([key, value]) => key !== "count" && isScalar(value)).slice(0, MAX_SUMMARY_CHIPS);
13
+ return /* @__PURE__ */ jsx(Fragment, { children: entries.map(([key, value]) => /* @__PURE__ */ jsxs("span", { className: "rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground", "data-summary-chip": key, children: [
14
+ key,
15
+ ": ",
16
+ /* @__PURE__ */ jsx("span", { className: "font-mono", children: String(value) })
17
+ ] }, key)) });
18
+ }
19
+ class ViewerBoundary extends Component {
20
+ constructor() {
21
+ super(...arguments);
22
+ __publicField(this, "state", {});
23
+ }
24
+ static getDerivedStateFromError(error) {
25
+ return { error: error instanceof Error ? error.message : String(error) };
26
+ }
27
+ render() {
28
+ if (this.state.error) {
29
+ return /* @__PURE__ */ jsx("div", { className: "px-2 py-1.5 text-xs text-red-700 dark:text-red-400", role: "alert", children: this.state.error });
30
+ }
31
+ return this.props.children;
32
+ }
33
+ }
34
+ function WindowViewer({
35
+ window,
36
+ fetchRecords
37
+ }) {
38
+ const [rows, setRows] = useState(null);
39
+ const [error, setError] = useState(void 0);
40
+ useEffect(() => {
41
+ const abort = new AbortController();
42
+ fetchRecords(window, abort.signal).then(setRows, (reason) => {
43
+ if (!abort.signal.aborted) setError(reason instanceof Error ? reason.message : String(reason));
44
+ });
45
+ return () => abort.abort();
46
+ }, [window.run_id, window.kind, window.stream, window.afterSeq, window.toSeq]);
47
+ if (error) {
48
+ return /* @__PURE__ */ jsx("div", { className: "whitespace-pre-wrap border-t border-border px-2 py-1.5 text-xs text-red-700 dark:text-red-400", role: "alert", children: error });
49
+ }
50
+ if (!rows) return /* @__PURE__ */ jsx("div", { className: "border-t border-border px-2 py-1.5 text-xs text-muted-foreground", children: "Loading records..." });
51
+ return /* @__PURE__ */ jsx("div", { className: "border-t border-border", style: { height: 420 }, children: /* @__PURE__ */ jsx(ViewerBoundary, { children: /* @__PURE__ */ jsx(TraceView, { kind: window.kind, rows }) }) });
52
+ }
53
+ function WindowRow({
54
+ window,
55
+ mount,
56
+ formats,
57
+ fetchRecords,
58
+ exportUrl,
59
+ openUrl
60
+ }) {
61
+ const [open, setOpen] = useState(false);
62
+ const linkClass = "text-xs text-primary hover:underline";
63
+ return /* @__PURE__ */ jsxs("div", { className: "rounded border border-border", "data-trace-kind": window.kind, children: [
64
+ /* @__PURE__ */ jsxs("div", { className: "flex flex-wrap items-center gap-2 px-2 py-1.5 text-sm", children: [
65
+ /* @__PURE__ */ jsx("span", { className: "font-mono font-medium text-foreground", children: window.kind }),
66
+ /* @__PURE__ */ jsxs("span", { className: "text-xs text-muted-foreground", children: [
67
+ window.count,
68
+ " ",
69
+ window.count === 1 ? "record" : "records"
70
+ ] }),
71
+ /* @__PURE__ */ jsx(SummaryChips, { summary: window.summary }),
72
+ /* @__PURE__ */ jsx("span", { className: "flex-1" }),
73
+ mount && /* @__PURE__ */ jsxs(Fragment, { children: [
74
+ /* @__PURE__ */ jsx("a", { className: linkClass, href: openUrl(window), target: "_blank", rel: "noreferrer", children: "Open in query" }),
75
+ formats.map((format) => /* @__PURE__ */ jsx("a", { className: linkClass, href: exportUrl(window, format.name), download: true, children: format.name.toUpperCase() }, format.name)),
76
+ /* @__PURE__ */ jsx("button", { type: "button", className: linkClass, onClick: () => setOpen(!open), children: open ? "Hide" : "View" })
77
+ ] })
78
+ ] }),
79
+ window.error && /* @__PURE__ */ jsx("div", { className: "whitespace-pre-wrap px-2 pb-1.5 text-xs text-red-700 dark:text-red-400", children: window.error }),
80
+ open && mount && /* @__PURE__ */ jsx(WindowViewer, { window, fetchRecords })
81
+ ] });
82
+ }
83
+ function TraceWindowList({ windows, resolve, formats, fetchRecords, exportUrl, openUrl, error }) {
84
+ const sources = windows.map((window) => resolve(window));
85
+ const unavailable = [
86
+ ...new Set(sources.filter((source) => !source.mount).map((source) => source.unavailable || UNSERVED))
87
+ ];
88
+ return /* @__PURE__ */ jsxs("div", { children: [
89
+ /* @__PURE__ */ jsx("h3", { className: "mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground", children: "Traces" }),
90
+ unavailable.map((reason) => /* @__PURE__ */ jsx(
91
+ "div",
92
+ {
93
+ className: "mb-2 rounded border border-amber-300 bg-amber-50 px-2 py-1 text-xs text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-300",
94
+ role: "status",
95
+ children: reason
96
+ },
97
+ reason
98
+ )),
99
+ /* @__PURE__ */ jsx("div", { className: "space-y-2", children: windows.map((window, index) => /* @__PURE__ */ jsx(
100
+ WindowRow,
101
+ {
102
+ window,
103
+ mount: sources[index].mount,
104
+ formats: formats(window.kind),
105
+ fetchRecords,
106
+ exportUrl,
107
+ openUrl
108
+ },
109
+ windowKey(window)
110
+ )) }),
111
+ error && /* @__PURE__ */ jsx("div", { className: "mt-1 text-xs text-red-700 dark:text-red-400", children: error })
112
+ ] });
113
+ }
114
+ export {
115
+ TraceWindowList
116
+ };
117
+ //# sourceMappingURL=TraceWindowList.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"TraceWindowList.js","sources":["../../../src/data/traces/TraceWindowList.tsx"],"sourcesContent":["import { Component, useEffect, useState, type ReactNode } from \"react\";\nimport { TraceView } from \"./TraceView\";\nimport type { TraceRow } from \"./types\";\n\n/** A window of a trace stream a fixture armed: the records after `afterSeq` through `toSeq` (0 = unbounded) of one kind's stream. */\nexport type TraceWindow = {\n kind: string;\n stream: string;\n afterSeq?: number;\n toSeq?: number;\n /** The run whose trace store holds the window. */\n run_id: string;\n count: number;\n /** The kind's summary of the window, shown as chips. */\n summary?: Record<string, unknown>;\n /** Why the window could not be read. */\n error?: string;\n};\n\n/** Where a window's run serves its store, or why it does not. */\nexport type TraceWindowSource = {\n /** Where the store is served; absent when it is not. */\n mount?: string;\n /** Why a store that was kept is not served (for example pruned since). */\n unavailable?: string;\n};\n\nexport type TraceWindowListProps = {\n windows: TraceWindow[];\n /** Resolves the store of a window's run. */\n resolve: (window: TraceWindow) => TraceWindowSource;\n /** The export formats of a kind, for example `[{ name: \"har\" }]`. */\n formats: (kind: string) => Array<{ name: string }>;\n /** Reads a window's records for the inline viewer. Must reject on failure and honour `signal`. */\n fetchRecords: (window: TraceWindow, signal: AbortSignal) => Promise<TraceRow[]>;\n /** Download URL of a window in one export format. */\n exportUrl: (window: TraceWindow, format: string) => string;\n /** URL of the query app opened at exactly this window. */\n openUrl: (window: TraceWindow) => string;\n /** A failure that applies to the whole list, such as the export formats not loading. */\n error?: string;\n};\n\nconst UNSERVED = \"This run's trace store is not served, so its windows cannot be opened.\";\nconst MAX_SUMMARY_CHIPS = 6;\n\nconst windowKey = (window: TraceWindow) => `${window.run_id}:${window.kind}:${window.stream}:${window.afterSeq ?? 0}`;\n\nconst isScalar = (value: unknown) => typeof value === \"string\" || typeof value === \"number\" || typeof value === \"boolean\";\n\nfunction SummaryChips({ summary }: { summary: Record<string, unknown> | undefined }) {\n const entries = Object.entries(summary ?? {})\n .filter(([key, value]) => key !== \"count\" && isScalar(value))\n .slice(0, MAX_SUMMARY_CHIPS);\n return (\n <>\n {entries.map(([key, value]) => (\n <span key={key} className=\"rounded bg-muted px-1.5 py-0.5 text-xs text-muted-foreground\" data-summary-chip={key}>\n {key}: <span className=\"font-mono\">{String(value)}</span>\n </span>\n ))}\n </>\n );\n}\n\n/** Keeps a viewer that refuses its records (TraceView throws on a row its kind's viewer cannot render) from taking the whole list down. */\nclass ViewerBoundary extends Component<{ children: ReactNode }, { error?: string }> {\n override state: { error?: string } = {};\n\n static getDerivedStateFromError(error: unknown) {\n return { error: error instanceof Error ? error.message : String(error) };\n }\n\n override render() {\n if (this.state.error) {\n return (\n <div className=\"px-2 py-1.5 text-xs text-red-700 dark:text-red-400\" role=\"alert\">\n {this.state.error}\n </div>\n );\n }\n return this.props.children;\n }\n}\n\nfunction WindowViewer({\n window,\n fetchRecords,\n}: {\n window: TraceWindow;\n fetchRecords: TraceWindowListProps[\"fetchRecords\"];\n}) {\n const [rows, setRows] = useState<TraceRow[] | null>(null);\n const [error, setError] = useState<string | undefined>(undefined);\n useEffect(() => {\n const abort = new AbortController();\n fetchRecords(window, abort.signal).then(setRows, (reason: unknown) => {\n if (!abort.signal.aborted) setError(reason instanceof Error ? reason.message : String(reason));\n });\n return () => abort.abort();\n // The window is identified by its coordinates; the host may rebuild the object each render.\n }, [window.run_id, window.kind, window.stream, window.afterSeq, window.toSeq]);\n if (error) {\n return (\n <div className=\"whitespace-pre-wrap border-t border-border px-2 py-1.5 text-xs text-red-700 dark:text-red-400\" role=\"alert\">\n {error}\n </div>\n );\n }\n if (!rows) return <div className=\"border-t border-border px-2 py-1.5 text-xs text-muted-foreground\">Loading records...</div>;\n return (\n <div className=\"border-t border-border\" style={{ height: 420 }}>\n <ViewerBoundary>\n <TraceView kind={window.kind} rows={rows} />\n </ViewerBoundary>\n </div>\n );\n}\n\nfunction WindowRow({\n window,\n mount,\n formats,\n fetchRecords,\n exportUrl,\n openUrl,\n}: {\n window: TraceWindow;\n mount: string | undefined;\n formats: Array<{ name: string }>;\n} & Pick<TraceWindowListProps, \"fetchRecords\" | \"exportUrl\" | \"openUrl\">) {\n const [open, setOpen] = useState(false);\n const linkClass = \"text-xs text-primary hover:underline\";\n return (\n <div className=\"rounded border border-border\" data-trace-kind={window.kind}>\n <div className=\"flex flex-wrap items-center gap-2 px-2 py-1.5 text-sm\">\n <span className=\"font-mono font-medium text-foreground\">{window.kind}</span>\n <span className=\"text-xs text-muted-foreground\">\n {window.count} {window.count === 1 ? \"record\" : \"records\"}\n </span>\n <SummaryChips summary={window.summary} />\n <span className=\"flex-1\" />\n {mount && (\n <>\n <a className={linkClass} href={openUrl(window)} target=\"_blank\" rel=\"noreferrer\">\n Open in query\n </a>\n {formats.map((format) => (\n <a key={format.name} className={linkClass} href={exportUrl(window, format.name)} download>\n {format.name.toUpperCase()}\n </a>\n ))}\n <button type=\"button\" className={linkClass} onClick={() => setOpen(!open)}>\n {open ? \"Hide\" : \"View\"}\n </button>\n </>\n )}\n </div>\n {window.error && (\n <div className=\"whitespace-pre-wrap px-2 pb-1.5 text-xs text-red-700 dark:text-red-400\">{window.error}</div>\n )}\n {open && mount && <WindowViewer window={window} fetchRecords={fetchRecords} />}\n </div>\n );\n}\n\n/**\n * One fixture's trace windows: what each captured (kind, record count, summary\n * chips), a link into the query app at exactly that window, per-format export\n * downloads and an inline viewer of its records. Windows of a run whose store\n * is not served say why, once per reason. Props-only: the host resolves stores\n * and builds the URLs.\n */\nexport function TraceWindowList({ windows, resolve, formats, fetchRecords, exportUrl, openUrl, error }: TraceWindowListProps) {\n const sources = windows.map((window) => resolve(window));\n const unavailable = [\n ...new Set(sources.filter((source) => !source.mount).map((source) => source.unavailable || UNSERVED)),\n ];\n return (\n <div>\n <h3 className=\"mb-1 text-xs font-semibold uppercase tracking-wide text-muted-foreground\">Traces</h3>\n {unavailable.map((reason) => (\n <div\n key={reason}\n className=\"mb-2 rounded border border-amber-300 bg-amber-50 px-2 py-1 text-xs text-amber-800 dark:border-amber-500/40 dark:bg-amber-500/10 dark:text-amber-300\"\n role=\"status\"\n >\n {reason}\n </div>\n ))}\n <div className=\"space-y-2\">\n {windows.map((window, index) => (\n <WindowRow\n key={windowKey(window)}\n window={window}\n mount={sources[index]!.mount}\n formats={formats(window.kind)}\n fetchRecords={fetchRecords}\n exportUrl={exportUrl}\n openUrl={openUrl}\n />\n ))}\n </div>\n {error && <div className=\"mt-1 text-xs text-red-700 dark:text-red-400\">{error}</div>}\n </div>\n );\n}\n"],"names":[],"mappings":";;;;;;AA2CA,MAAM,WAAW;AACjB,MAAM,oBAAoB;AAE1B,MAAM,YAAY,CAAC,WAAwB,GAAG,OAAO,MAAM,IAAI,OAAO,IAAI,IAAI,OAAO,MAAM,IAAI,OAAO,YAAY,CAAC;AAEnH,MAAM,WAAW,CAAC,UAAmB,OAAO,UAAU,YAAY,OAAO,UAAU,YAAY,OAAO,UAAU;AAEhH,SAAS,aAAa,EAAE,WAA6D;AACnF,QAAM,UAAU,OAAO,QAAQ,WAAW,CAAA,CAAE,EACzC,OAAO,CAAC,CAAC,KAAK,KAAK,MAAM,QAAQ,WAAW,SAAS,KAAK,CAAC,EAC3D,MAAM,GAAG,iBAAiB;AAC7B,SACE,oBAAA,UAAA,EACG,UAAA,QAAQ,IAAI,CAAC,CAAC,KAAK,KAAK,MACvB,qBAAC,QAAA,EAAe,WAAU,gEAA+D,qBAAmB,KACzG,UAAA;AAAA,IAAA;AAAA,IAAI;AAAA,wBAAG,QAAA,EAAK,WAAU,aAAa,UAAA,OAAO,KAAK,EAAA,CAAE;AAAA,EAAA,KADzC,GAEX,CACD,GACH;AAEJ;AAGA,MAAM,uBAAuB,UAAuD;AAAA,EAApF;AAAA;AACW,iCAA4B,CAAA;AAAA;AAAA,EAErC,OAAO,yBAAyB,OAAgB;AAC9C,WAAO,EAAE,OAAO,iBAAiB,QAAQ,MAAM,UAAU,OAAO,KAAK,EAAA;AAAA,EACvE;AAAA,EAES,SAAS;AAChB,QAAI,KAAK,MAAM,OAAO;AACpB,aACE,oBAAC,SAAI,WAAU,sDAAqD,MAAK,SACtE,UAAA,KAAK,MAAM,MAAA,CACd;AAAA,IAEJ;AACA,WAAO,KAAK,MAAM;AAAA,EACpB;AACF;AAEA,SAAS,aAAa;AAAA,EACpB;AAAA,EACA;AACF,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,UAAA;AAAA,MAAA;AAAA,MAJI;AAAA,IAAA,CAMR;AAAA,IACD,oBAAC,SAAI,WAAU,aACZ,kBAAQ,IAAI,CAAC,QAAQ,UACpB;AAAA,MAAC;AAAA,MAAA;AAAA,QAEC;AAAA,QACA,OAAO,QAAQ,KAAK,EAAG;AAAA,QACvB,SAAS,QAAQ,OAAO,IAAI;AAAA,QAC5B;AAAA,QACA;AAAA,QACA;AAAA,MAAA;AAAA,MANK,UAAU,MAAM;AAAA,IAAA,CAQxB,GACH;AAAA,IACC,SAAS,oBAAC,OAAA,EAAI,WAAU,+CAA+C,UAAA,MAAA,CAAM;AAAA,EAAA,GAChF;AAEJ;"}
@@ -1,8 +1,32 @@
1
- import { HttpExchangeRow, ProcessNodeRow, ProcessSampleRow, SqlStatementRow, TerminalEvent } from './types.js';
1
+ import { TraceWindow } from './TraceWindowList.js';
2
+ import { GoProfileRecord, HttpExchangeRow, ProcessEnv, ProcessNodeRow, ProcessSampleRow, SqlStatementRow, StackRecord, TerminalEvent } from './types.js';
2
3
  export declare const httpExchangeRows: HttpExchangeRow[];
3
4
  export declare const sqlStatementRows: SqlStatementRow[];
4
5
  /** A short build log: colour, a progress line redrawn with a carriage return, a resize, and a settled screen. */
5
6
  export declare const terminalEvents: TerminalEvent[];
6
7
  export declare const processNodeRows: ProcessNodeRow[];
7
8
  export declare const processSampleRows: ProcessSampleRow[];
9
+ export declare const processEnvFixture: ProcessEnv;
10
+ /** processNodeRows with a working directory, the stack transports each process offers, and the root's recorded environment. */
11
+ export declare const processDetailRows: ProcessNodeRow[];
12
+ /** A native stack sample, which the UI shows as raw text. */
13
+ export declare const nativeSample = "Sampling process 101 for 1 seconds\nCall graph:\n 12 Thread_1001 DispatchQueue_1: com.apple.main-thread (serial)\n 12 start (in dyld) + 6076\n 12 main (in go) + 88\n";
14
+ /**
15
+ * `stacks` records: the root dumped twice in-process (a periodic reading, then the watchdog
16
+ * timeout), a busy child sampled natively, and an exited child whose dump failed.
17
+ */
18
+ export declare const stackRecords: StackRecord[];
19
+ /**
20
+ * processSampleRows from a session that armed every facet and disk IO. Open files change at
21
+ * ticks 5 and 9, a socket and a connection appear at tick 6 and close at tick 10 (an empty list
22
+ * is not stored), and the listening port never changes, so only tick 1 stores its list.
23
+ */
24
+ export declare const processFacetSampleRows: ProcessSampleRow[];
25
+ /**
26
+ * `goprof` records: a CPU profile taken at the watchdog timeout (two sample types) and an
27
+ * earlier heap profile (in-use and allocated space).
28
+ */
29
+ export declare const goProfileRecords: GoProfileRecord[];
30
+ /** Two armed windows of one fixture step: an HTTP capture and a process capture, with chips beyond the six that fit. */
31
+ export declare const traceWindows: TraceWindow[];
8
32
  //# sourceMappingURL=fixtures.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/data/traces/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,eAAe,EACf,cAAc,EACd,gBAAgB,EAChB,eAAe,EACf,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,gBAAgB,EAAE,eAAe,EA8E7C,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAAe,EA4D7C,CAAC;AAIF,iHAAiH;AACjH,eAAO,MAAM,cAAc,EAAE,aAAa,EAiBzC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cAAc,EA+D3C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,EAQ7C,CAAC"}
1
+ {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../../src/data/traces/fixtures.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EACV,eAAe,EACf,eAAe,EAEf,UAAU,EACV,cAAc,EACd,gBAAgB,EAChB,eAAe,EAEf,WAAW,EACX,aAAa,EACd,MAAM,SAAS,CAAC;AAEjB,eAAO,MAAM,gBAAgB,EAAE,eAAe,EA8E7C,CAAC;AAEF,eAAO,MAAM,gBAAgB,EAAE,eAAe,EA4D7C,CAAC;AAIF,iHAAiH;AACjH,eAAO,MAAM,cAAc,EAAE,aAAa,EAiBzC,CAAC;AAEF,eAAO,MAAM,eAAe,EAAE,cAAc,EA+D3C,CAAC;AAEF,eAAO,MAAM,iBAAiB,EAAE,gBAAgB,EAQ7C,CAAC;AAEJ,eAAO,MAAM,iBAAiB,EAAE,UAK/B,CAAC;AAEF,+HAA+H;AAC/H,eAAO,MAAM,iBAAiB,EAAE,cAAc,EA0B5C,CAAC;AAmCH,6DAA6D;AAC7D,eAAO,MAAM,YAAY,6LAKxB,CAAC;AAEF;;;GAGG;AACH,eAAO,MAAM,YAAY,EAAE,WAAW,EA6DrC,CAAC;AAuCF;;;;GAIG;AACH,eAAO,MAAM,sBAAsB,EAAE,gBAAgB,EAcnD,CAAC;AAyDH;;;GAGG;AACH,eAAO,MAAM,gBAAgB,EAAE,eAAe,EAsC7C,CAAC;AAEF,wHAAwH;AACxH,eAAO,MAAM,YAAY,EAAE,WAAW,EAWrC,CAAC"}
@@ -6,7 +6,14 @@ export { groupStatements, formatStatementDuration, type SqlDisplayRow } from './
6
6
  export { TerminalCastPlayer, type TerminalCastPlayerProps } from './TerminalCastPlayer.js';
7
7
  export { parseCast } from './cast.js';
8
8
  export { ProcessTraceTree, type ProcessTraceTreeProps } from './ProcessTraceTree.js';
9
- export { buildProcessForest, flattenForest, type ProcessTreeNode } from './process-tree.js';
10
- export { Sparkline, type SparklineProps } from './Sparkline.js';
11
- export type { HttpExchangeRequest, HttpExchangeResponse, HttpExchangeRow, ProcessNodeRow, ProcessSampleRow, SqlStatementRow, TerminalEvent, TerminalEventKind, TraceBodyText, TraceRow, } from './types.js';
9
+ export { ProcessTraceDetail, type ProcessTraceDetailProps } from './ProcessTraceDetail.js';
10
+ export { ProcessFacetTable, type ProcessFacetTableProps } from './ProcessFacetTable.js';
11
+ export { GoProfileView, ProfileTopTable, type GoProfileViewProps, type ProfileTopTableProps } from './GoProfileView.js';
12
+ export { aggregateProfile, formatProfileValue, profileValueTypes, stacksThrough, type ProfileAggregate, type ProfileFunctionRow, type ProfileStack, type ProfileValueType, } from './profile-aggregate.js';
13
+ export { SAMPLE_FACETS, SAMPLE_FACET_ORDER, armedFacets, diskSeries, facetCountSeries, latestFacetReading, type FacetReading, } from './process-facets.js';
14
+ export { stackCheckpoints, type StackCheckpoint } from './stack-checkpoints.js';
15
+ export { TraceWindowList, type TraceWindow, type TraceWindowListProps, type TraceWindowSource, } from './TraceWindowList.js';
16
+ export { buildProcessForest, flattenForest, formatCpuPercent, formatProcessTimestamp, isProcessExited, processLifetimeMs, processSeries, pruneExitedProcesses, type ProcessTreeNode, } from './process-tree.js';
17
+ export { Sparkline, LabeledSparkline, type SparklineProps, type LabeledSparklineProps } from './Sparkline.js';
18
+ export type { HttpExchangeRequest, HttpExchangeResponse, GoProfileRecord, HttpExchangeRow, ProcessDescriptor, ProcessEnv, ProcessNodeRow, ProcessSampleFacet, ProcessSampleRow, ProcessStackTransport, ProfileSample, SqlStatementRow, StackFormat, StackFrame, StackRecord, TerminalEvent, TerminalEventKind, TraceBodyText, TraceRow, } from './types.js';
12
19
  //# sourceMappingURL=index.d.ts.map