@piwitests/server 0.23.0 → 0.25.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (619) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{DZECGgZm.js → 5nOoVJzL.js} +1 -1
  3. package/.output/public/_nuxt/6DSY_93j.js +1 -0
  4. package/.output/public/_nuxt/7vRR5W2L.js +1 -0
  5. package/.output/public/_nuxt/{CC8wk-N0.js → 9Dtlg-K4.js} +1 -1
  6. package/.output/public/_nuxt/9Yziijlb.js +1 -0
  7. package/.output/public/_nuxt/{DAhv9aNg.js → B-onBCAB.js} +1 -1
  8. package/.output/public/_nuxt/B2bK5uNR.js +1 -0
  9. package/.output/public/_nuxt/{B2L0-Lzp.js → B63B19Iv.js} +2 -2
  10. package/.output/public/_nuxt/{oSLbl-p0.js → B77w1Eib.js} +1 -1
  11. package/.output/public/_nuxt/{pZbe82l5.js → BC5bqlfM.js} +1 -1
  12. package/.output/public/_nuxt/{jR2xm3_t.js → BF5JDf9_.js} +1 -1
  13. package/.output/public/_nuxt/BFVrl1ss.js +1 -0
  14. package/.output/public/_nuxt/{Bj_v57Zu.js → BIHMeNW-.js} +1 -1
  15. package/.output/public/_nuxt/BKqOGcst.js +1 -0
  16. package/.output/public/_nuxt/{Bsc11YIJ.js → BLqooxh5.js} +1 -1
  17. package/.output/public/_nuxt/{Ce_j5NtN.js → BMfTUMYy.js} +1 -1
  18. package/.output/public/_nuxt/{CmTzxoQt.js → BOrnSpTA.js} +1 -1
  19. package/.output/public/_nuxt/{Bq4_kqIp.js → BPQNVV4M.js} +1 -1
  20. package/.output/public/_nuxt/{FJTsZ5Aa.js → BSKLNgre.js} +1 -1
  21. package/.output/public/_nuxt/BTCWUyBX.js +1 -0
  22. package/.output/public/_nuxt/BUYmGTVP.js +1 -0
  23. package/.output/public/_nuxt/{mi22nGUC.js → BWddBCom.js} +1 -1
  24. package/.output/public/_nuxt/{axj2iIDK.js → BYQ9lXQb.js} +1 -1
  25. package/.output/public/_nuxt/BYWQ47QQ.js +5 -0
  26. package/.output/public/_nuxt/{Bag08cIY.js → BYnqoVCE.js} +1 -1
  27. package/.output/public/_nuxt/{Clg2Qx0r.js → BaU2hm4B.js} +1 -1
  28. package/.output/public/_nuxt/{roaTZkYi.js → BbXvpkBp.js} +1 -1
  29. package/.output/public/_nuxt/Bb_925DD.js +1 -0
  30. package/.output/public/_nuxt/BcHU1KNK.js +1 -0
  31. package/.output/public/_nuxt/BdUGUwvE.js +1 -0
  32. package/.output/public/_nuxt/{D1Ucra3E.js → BeQq85yJ.js} +2 -2
  33. package/.output/public/_nuxt/Bg8yOdSf.js +1 -0
  34. package/.output/public/_nuxt/BhzfJaPC.js +1 -0
  35. package/.output/public/_nuxt/{499RbBSX.js → Bkb-0yS0.js} +4 -4
  36. package/.output/public/_nuxt/BmweLu9g.js +2 -0
  37. package/.output/public/_nuxt/Boyv6hLW.js +1 -0
  38. package/.output/public/_nuxt/{DXkFgrsT.js → Bq4xEWLF.js} +4 -4
  39. package/.output/public/_nuxt/{7_9fts7T.js → BraJd4EA.js} +1 -1
  40. package/.output/public/_nuxt/BvXrhZ8k.js +1 -0
  41. package/.output/public/_nuxt/{DNKZmhbX.js → Bw4oIhct.js} +1 -1
  42. package/.output/public/_nuxt/BxSrScjV.js +1 -0
  43. package/.output/public/_nuxt/Byqt8JHG.js +1 -0
  44. package/.output/public/_nuxt/{CNu3kken.js → BzBaMPgu.js} +4 -4
  45. package/.output/public/_nuxt/{PDSNX4Te.js → C1-8_6cB.js} +1 -1
  46. package/.output/public/_nuxt/{Ce89VyHE.js → C7SG50jD.js} +1 -1
  47. package/.output/public/_nuxt/{CBJFORiZ.js → C8WgBDU1.js} +1 -1
  48. package/.output/public/_nuxt/C8uZoJVq.js +1 -0
  49. package/.output/public/_nuxt/{D3SJGdl4.js → CBQXv4bU.js} +2 -2
  50. package/.output/public/_nuxt/CDEmotIt.js +1 -0
  51. package/.output/public/_nuxt/CIBOv3Ge.js +2 -0
  52. package/.output/public/_nuxt/CO7j4p5r.js +1 -0
  53. package/.output/public/_nuxt/COMhp7lz.js +1 -0
  54. package/.output/public/_nuxt/{jxc14CqP.js → CPiLUjjx.js} +1 -1
  55. package/.output/public/_nuxt/{DZ-KbUZi.js → CTYlay1H.js} +1 -1
  56. package/.output/public/_nuxt/{5QBnDbs_.js → CVEk4D8I.js} +1 -1
  57. package/.output/public/_nuxt/{LTMoFvEY.js → CbuK1HIv.js} +1 -1
  58. package/.output/public/_nuxt/{2yLW7WU0.js → CdLqOMvN.js} +1 -1
  59. package/.output/public/_nuxt/CdM2qNYM.js +2 -0
  60. package/.output/public/_nuxt/Ch8sGLqE.js +1 -0
  61. package/.output/public/_nuxt/CkdznmkX.js +1 -0
  62. package/.output/public/_nuxt/{DJzFYrBt.js → Cmuwgbf4.js} +1 -1
  63. package/.output/public/_nuxt/{C9I1Dp3S.js → CnRNwiuE.js} +1 -1
  64. package/.output/public/_nuxt/{Bb2mDqKr.js → CnsaoeEq.js} +1 -1
  65. package/.output/public/_nuxt/{DgEa6_av.js → Cp0V2FeW.js} +1 -1
  66. package/.output/public/_nuxt/Cvw4EFTy.js +17 -0
  67. package/.output/public/_nuxt/CwDej2Lz.js +1 -0
  68. package/.output/public/_nuxt/D-wlhH6J.js +1 -0
  69. package/.output/public/_nuxt/D5Mhpp98.js +1 -0
  70. package/.output/public/_nuxt/{CTTmX4gy.js → D8ixf-ZR.js} +5 -5
  71. package/.output/public/_nuxt/{HbnAkiyK.js → DBvdRbTA.js} +2 -2
  72. package/.output/public/_nuxt/DDho3MJD.js +1 -0
  73. package/.output/public/_nuxt/DEGHW4pO.js +1 -0
  74. package/.output/public/_nuxt/{C77tM5Hz.js → DHSYRMJp.js} +1 -1
  75. package/.output/public/_nuxt/DH_LEqhd.js +2 -0
  76. package/.output/public/_nuxt/{CUOS6S13.js → DIqik40e.js} +1 -1
  77. package/.output/public/_nuxt/DLwuL-qR.js +1 -0
  78. package/.output/public/_nuxt/{AQ86C4c2.js → DPDFGVb_.js} +2 -2
  79. package/.output/public/_nuxt/DRNHuVn4.js +2 -0
  80. package/.output/public/_nuxt/{B_MVJP17.js → DUtYU4Sb.js} +1 -1
  81. package/.output/public/_nuxt/{CAoQUDI4.js → DWl73MJR.js} +1 -1
  82. package/.output/public/_nuxt/{BZFiz2UB.js → DWz_bHNP.js} +1 -1
  83. package/.output/public/_nuxt/{CGDPUNcO.js → D_SCB-z2.js} +1 -1
  84. package/.output/public/_nuxt/{Ce47NgZw.js → D_j436ND.js} +1 -1
  85. package/.output/public/_nuxt/DamzjN7l.js +1 -0
  86. package/.output/public/_nuxt/Db5xe__T.js +1 -0
  87. package/.output/public/_nuxt/{BuGAn4f7.js → DcUBmKKE.js} +1 -1
  88. package/.output/public/_nuxt/DiP18sFE.js +1 -0
  89. package/.output/public/_nuxt/Die1200X.js +1 -0
  90. package/.output/public/_nuxt/DihSeDlY.js +9 -0
  91. package/.output/public/_nuxt/{BAbrtVp3.js → DkGXOZRW.js} +1 -1
  92. package/.output/public/_nuxt/{ZLfZolDM.js → DnOtRv65.js} +1 -1
  93. package/.output/public/_nuxt/DnV-BkUA.js +1 -0
  94. package/.output/public/_nuxt/DpeRrg68.js +1 -0
  95. package/.output/public/_nuxt/Dq6_-84R.js +1 -0
  96. package/.output/public/_nuxt/DqKFKS1b.js +1 -0
  97. package/.output/public/_nuxt/DrbO0dl5.js +6 -0
  98. package/.output/public/_nuxt/{B3G-TIoP.js → Ds8_6Fzl.js} +1 -1
  99. package/.output/public/_nuxt/{QZYo3ErV.js → DvewDI9t.js} +1 -1
  100. package/.output/public/_nuxt/E26Y1NWH.js +1 -0
  101. package/.output/public/_nuxt/Hp-_W7z4.js +1 -0
  102. package/.output/public/_nuxt/OanUGF_v.js +1 -0
  103. package/.output/public/_nuxt/{9_aJhhcm.js → RSS6R9Te.js} +12 -12
  104. package/.output/public/_nuxt/{BfcMJBTf.js → VqLetC2g.js} +1 -1
  105. package/.output/public/_nuxt/WCZdf9Ln.js +1 -0
  106. package/.output/public/_nuxt/{DBWM_xs-.js → Yl6iqHwK.js} +4 -4
  107. package/.output/public/_nuxt/builds/latest.json +1 -1
  108. package/.output/public/_nuxt/builds/meta/03f2d81b-8c58-4ea8-9a9d-7553c8ca4af6.json +1 -0
  109. package/.output/public/_nuxt/entry.DVKh2Fd6.css +1 -0
  110. package/.output/public/_nuxt/iUf7K_JR.js +1 -0
  111. package/.output/public/_nuxt/{B_JSV0yG.js → kDEwM7SQ.js} +1 -1
  112. package/.output/public/_nuxt/{BDUfBn3i.js → knaDbxMJ.js} +1 -1
  113. package/.output/public/_nuxt/lnpLc047.js +1 -0
  114. package/.output/public/_nuxt/{C2_7XZo0.js → mhvG7mu8.js} +1 -1
  115. package/.output/public/_nuxt/{Ck_fTH5z.js → qUaN2ZW8.js} +4 -4
  116. package/.output/public/_nuxt/qeqzb80l.js +1 -0
  117. package/.output/public/_nuxt/{BwwfasRt.js → uj92NYTx.js} +2 -2
  118. package/.output/public/_nuxt/vOZZ2cLi.js +1 -0
  119. package/.output/public/_nuxt/{CLWMETf9.js → zAFiz2Mg.js} +1 -1
  120. package/.output/public/demo/seed.version.json +2 -2
  121. package/.output/server/chunks/_/collect.mjs +1 -1
  122. package/.output/server/chunks/_/markers.mjs +1 -1
  123. package/.output/server/chunks/_/quarantine.mjs +1 -1
  124. package/.output/server/chunks/_/users.mjs +1 -1
  125. package/.output/server/chunks/build/{Alert-He-UxEt6.mjs → Alert-BhTWQzM5.mjs} +2 -2
  126. package/.output/server/chunks/build/Alert-BhTWQzM5.mjs.map +1 -0
  127. package/.output/server/chunks/build/{Breadcrumb-DEP2dVCZ.mjs → Breadcrumb-BJnPB2AW.mjs} +3 -3
  128. package/.output/server/chunks/build/Breadcrumb-BJnPB2AW.mjs.map +1 -0
  129. package/.output/server/chunks/build/{BreadcrumbNav-y6nMDYcR.mjs → BreadcrumbNav-C6Cun6tF.mjs} +3 -3
  130. package/.output/server/chunks/build/BreadcrumbNav-C6Cun6tF.mjs.map +1 -0
  131. package/.output/server/chunks/build/{BrowserBadge-DIASU8Gf.mjs → BrowserBadge-T1KRMIXA.mjs} +4 -4
  132. package/.output/server/chunks/build/BrowserBadge-T1KRMIXA.mjs.map +1 -0
  133. package/.output/server/chunks/build/{ChartCard-ZTsCvItQ.mjs → ChartCard-D_asI_WF.mjs} +2 -2
  134. package/.output/server/chunks/build/ChartCard-D_asI_WF.mjs.map +1 -0
  135. package/.output/server/chunks/build/{ChartMarkerTooltip-u_1DUHh-.mjs → ChartMarkerTooltip-DscESDg7.mjs} +3 -3
  136. package/.output/server/chunks/build/ChartMarkerTooltip-DscESDg7.mjs.map +1 -0
  137. package/.output/server/chunks/build/{Checkbox-BisdHf8n.mjs → Checkbox-Y9ZiIRkJ.mjs} +7 -7
  138. package/.output/server/chunks/build/Checkbox-Y9ZiIRkJ.mjs.map +1 -0
  139. package/.output/server/chunks/build/{CodeBlock-B8BNtZAe.mjs → CodeBlock-Bnn_ps9O.mjs} +5 -5
  140. package/.output/server/chunks/build/CodeBlock-Bnn_ps9O.mjs.map +1 -0
  141. package/.output/server/chunks/build/{DashboardNavbar-D7-3zBUU.mjs → DashboardNavbar-D37dPEtR.mjs} +3 -3
  142. package/.output/server/chunks/build/DashboardNavbar-D37dPEtR.mjs.map +1 -0
  143. package/.output/server/chunks/build/{DashboardSidebarToggle-C3HdHvlE.mjs → DashboardSidebarToggle-DzwsZHVx.mjs} +3 -3
  144. package/.output/server/chunks/build/DashboardSidebarToggle-DzwsZHVx.mjs.map +1 -0
  145. package/.output/server/chunks/build/{DataLocationCard-CC2-lHiP.mjs → DataLocationCard-CUXgZQEs.mjs} +4 -4
  146. package/.output/server/chunks/build/DataLocationCard-CUXgZQEs.mjs.map +1 -0
  147. package/.output/server/chunks/build/{DesktopRunLocallyButton-iNzrDsEs.mjs → DesktopRunLocallyButton-BCmQklj6.mjs} +15 -76
  148. package/.output/server/chunks/build/DesktopRunLocallyButton-BCmQklj6.mjs.map +1 -0
  149. package/.output/server/chunks/build/{DiagnosisPanel-BVb2LgHu.mjs → DiagnosisPanel-haHS2azn.mjs} +8 -8
  150. package/.output/server/chunks/build/DiagnosisPanel-haHS2azn.mjs.map +1 -0
  151. package/.output/server/chunks/build/{DiagnosisResult-xVgZlfKK.mjs → DiagnosisResult-DqTIOelM.mjs} +11 -11
  152. package/.output/server/chunks/build/DiagnosisResult-DqTIOelM.mjs.map +1 -0
  153. package/.output/server/chunks/build/{DurationValue-UX9uajQJ.mjs → DurationValue-D6fQEi5S.mjs} +2 -2
  154. package/.output/server/chunks/build/DurationValue-D6fQEi5S.mjs.map +1 -0
  155. package/.output/server/chunks/build/{EmptyState-DC2q_7TD.mjs → EmptyState-C-mCzGhO.mjs} +2 -2
  156. package/.output/server/chunks/build/EmptyState-C-mCzGhO.mjs.map +1 -0
  157. package/.output/server/chunks/build/{EntityLinks-Dzn73fbq.mjs → EntityLinks-CRJQM9Vy.mjs} +4 -4
  158. package/.output/server/chunks/build/EntityLinks-CRJQM9Vy.mjs.map +1 -0
  159. package/.output/server/chunks/build/{EnvManagedBadge-C-agmABK.mjs → EnvManagedBadge-hyelwXrw.mjs} +4 -4
  160. package/.output/server/chunks/build/EnvManagedBadge-hyelwXrw.mjs.map +1 -0
  161. package/.output/server/chunks/build/{ErrorState-CktYyeEZ.mjs → ErrorState-9UPssp7w.mjs} +2 -2
  162. package/.output/server/chunks/build/ErrorState-9UPssp7w.mjs.map +1 -0
  163. package/.output/server/chunks/build/{FeatureUnavailable-DHFkwI7t.mjs → FeatureUnavailable-CDw3__eq.mjs} +3 -3
  164. package/.output/server/chunks/build/FeatureUnavailable-CDw3__eq.mjs.map +1 -0
  165. package/.output/server/chunks/build/{FormField-GYHKiSI6.mjs → FormField-8vSc-3mb.mjs} +2 -2
  166. package/.output/server/chunks/build/FormField-8vSc-3mb.mjs.map +1 -0
  167. package/.output/server/chunks/build/{GetStartedWizard-BpcGYsm2.mjs → GetStartedWizard-Dp_tjhry.mjs} +4 -4
  168. package/.output/server/chunks/build/GetStartedWizard-Dp_tjhry.mjs.map +1 -0
  169. package/.output/server/chunks/build/{HelpHint-plioHKA0.mjs → HelpHint-Bfyo3ar6.mjs} +31 -4
  170. package/.output/server/chunks/build/HelpHint-Bfyo3ar6.mjs.map +1 -0
  171. package/.output/server/chunks/build/{LoadingState-CwpfmI0W.mjs → LoadingState-CxfFwac9.mjs} +2 -2
  172. package/.output/server/chunks/build/LoadingState-CxfFwac9.mjs.map +1 -0
  173. package/.output/server/chunks/build/{MarkerBadge-Biz5--h2.mjs → MarkerBadge-DmubzeuF.mjs} +2 -2
  174. package/.output/server/chunks/build/MarkerBadge-DmubzeuF.mjs.map +1 -0
  175. package/.output/server/chunks/build/{MetaStripGroup-A0a72vt5.mjs → MetaStripGroup-C-cNBfC9.mjs} +6 -6
  176. package/.output/server/chunks/build/MetaStripGroup-C-cNBfC9.mjs.map +1 -0
  177. package/.output/server/chunks/build/{Modal-hKLvVFNp.mjs → Modal-DcNzjvnm.mjs} +2 -2
  178. package/.output/server/chunks/build/Modal-DcNzjvnm.mjs.map +1 -0
  179. package/.output/server/chunks/build/{NavbarActions-_YjrSUat.mjs → NavbarActions-VCHW0u67.mjs} +2 -2
  180. package/.output/server/chunks/build/NavbarActions-VCHW0u67.mjs.map +1 -0
  181. package/.output/server/chunks/build/{NavigationMenu-RfBOyS32.mjs → NavigationMenu-DG6V0R9Y.mjs} +5 -5
  182. package/.output/server/chunks/build/NavigationMenu-DG6V0R9Y.mjs.map +1 -0
  183. package/.output/server/chunks/build/{OpenInIdeLink-Jp6SzEtD.mjs → OpenInIdeLink-CLj2cTkc.mjs} +6 -6
  184. package/.output/server/chunks/build/{OpenInIdeLink-Jp6SzEtD.mjs.map → OpenInIdeLink-CLj2cTkc.mjs.map} +1 -1
  185. package/.output/server/chunks/build/{ProjectTestCasesTable-DxOTfhi4.mjs → ProjectTestCasesTable-BNd5Fn_G.mjs} +15 -15
  186. package/.output/server/chunks/build/{ProjectTestCasesTable-DxOTfhi4.mjs.map → ProjectTestCasesTable-BNd5Fn_G.mjs.map} +1 -1
  187. package/.output/server/chunks/build/{RovingFocusItem-BOSx1Z9Z.mjs → RovingFocusItem-DkZadRuK.mjs} +2 -2
  188. package/.output/server/chunks/build/RovingFocusItem-DkZadRuK.mjs.map +1 -0
  189. package/.output/server/chunks/build/{RunReports-nuLb-Nm3.mjs → RunReports-CnyGcU8K.mjs} +4 -4
  190. package/.output/server/chunks/build/RunReports-CnyGcU8K.mjs.map +1 -0
  191. package/.output/server/chunks/build/{RunStatusBadge-CvWmcFYM.mjs → RunStatusBadge-DTqX18X-.mjs} +3 -3
  192. package/.output/server/chunks/build/RunStatusBadge-DTqX18X-.mjs.map +1 -0
  193. package/.output/server/chunks/build/{SectionCard-DHAFvJxm.mjs → SectionCard-taTpPtua.mjs} +3 -3
  194. package/.output/server/chunks/build/SectionCard-taTpPtua.mjs.map +1 -0
  195. package/.output/server/chunks/build/{Select-CEyw7HGK.mjs → Select-BChKOOsc.mjs} +4 -4
  196. package/.output/server/chunks/build/Select-BChKOOsc.mjs.map +1 -0
  197. package/.output/server/chunks/build/{SelectMenu-C02Hs2_F.mjs → SelectMenu-DLkMyBsW.mjs} +5 -5
  198. package/.output/server/chunks/build/{SelectMenu-C02Hs2_F.mjs.map → SelectMenu-DLkMyBsW.mjs.map} +1 -1
  199. package/.output/server/chunks/build/{Separator-lrN70ODV.mjs → Separator-Dn-4PN3P.mjs} +2 -2
  200. package/.output/server/chunks/build/Separator-Dn-4PN3P.mjs.map +1 -0
  201. package/.output/server/chunks/build/{SettingsField-tRmytcEJ.mjs → SettingsField-BLO1C7uY.mjs} +6 -6
  202. package/.output/server/chunks/build/SettingsField-BLO1C7uY.mjs.map +1 -0
  203. package/.output/server/chunks/build/{Slideover-D6cRIqch.mjs → Slideover-BiDJaQrt.mjs} +3 -3
  204. package/.output/server/chunks/build/Slideover-BiDJaQrt.mjs.map +1 -0
  205. package/.output/server/chunks/build/{Switch-R2n82ncQ.mjs → Switch-Ca3fYrSH.mjs} +4 -4
  206. package/.output/server/chunks/build/Switch-Ca3fYrSH.mjs.map +1 -0
  207. package/.output/server/chunks/build/{Table-qZdnm9t2.mjs → Table-DQb34a0A.mjs} +3 -3
  208. package/.output/server/chunks/build/Table-DQb34a0A.mjs.map +1 -0
  209. package/.output/server/chunks/build/{Tabs-BDP7MWl4.mjs → Tabs-_ALhm_oG.mjs} +3 -3
  210. package/.output/server/chunks/build/Tabs-_ALhm_oG.mjs.map +1 -0
  211. package/.output/server/chunks/build/{TestCaseHistoryChart-CKDXQ2GI.mjs → TestCaseHistoryChart-D-TEUsZ8.mjs} +3 -3
  212. package/.output/server/chunks/build/TestCaseHistoryChart-D-TEUsZ8.mjs.map +1 -0
  213. package/.output/server/chunks/build/{TestMetaBadges-BlyKmfeP.mjs → TestMetaBadges-G2dAHnT-.mjs} +2 -2
  214. package/.output/server/chunks/build/TestMetaBadges-G2dAHnT-.mjs.map +1 -0
  215. package/.output/server/chunks/build/{TestStatusBar-CvsmKJ4D.mjs → TestStatusBar-CseETAdn.mjs} +2 -2
  216. package/.output/server/chunks/build/TestStatusBar-CseETAdn.mjs.map +1 -0
  217. package/.output/server/chunks/build/{Textarea-DpmpM-lN.mjs → Textarea-CXOoRq7y.mjs} +2 -2
  218. package/.output/server/chunks/build/Textarea-CXOoRq7y.mjs.map +1 -0
  219. package/.output/server/chunks/build/{Tooltip-BI3WQErw.mjs → Tooltip-trltUr5c.mjs} +3 -3
  220. package/.output/server/chunks/build/Tooltip-trltUr5c.mjs.map +1 -0
  221. package/.output/server/chunks/build/{VisuallyHiddenInput-D4E5aJCQ.mjs → VisuallyHiddenInput-CGURvg3N.mjs} +2 -2
  222. package/.output/server/chunks/build/VisuallyHiddenInput-CGURvg3N.mjs.map +1 -0
  223. package/.output/server/chunks/build/{_id_-CrGTZymJ.mjs → _id_-B-G4eG5U.mjs} +40 -40
  224. package/.output/server/chunks/build/{_id_-CrGTZymJ.mjs.map → _id_-B-G4eG5U.mjs.map} +1 -1
  225. package/.output/server/chunks/build/{_id_-T965GKYC.mjs → _id_-Cnzg8n21.mjs} +41 -38
  226. package/.output/server/chunks/build/_id_-Cnzg8n21.mjs.map +1 -0
  227. package/.output/server/chunks/build/{_id_-wiULjAVc.mjs → _id_-Dp_d6gT7.mjs} +63 -55
  228. package/.output/server/chunks/build/{_id_-wiULjAVc.mjs.map → _id_-Dp_d6gT7.mjs.map} +1 -1
  229. package/.output/server/chunks/build/{_id_-D7UtAIPR.mjs → _id_-t2AWaYuK.mjs} +59 -52
  230. package/.output/server/chunks/build/{_id_-D7UtAIPR.mjs.map → _id_-t2AWaYuK.mjs.map} +1 -1
  231. package/.output/server/chunks/build/{about-B3V_OEiu.mjs → about-BFsHkJwE.mjs} +8 -8
  232. package/.output/server/chunks/build/about-BFsHkJwE.mjs.map +1 -0
  233. package/.output/server/chunks/build/{account-DpBdYE46.mjs → account-CZAq8kVg.mjs} +8 -8
  234. package/.output/server/chunks/build/account-CZAq8kVg.mjs.map +1 -0
  235. package/.output/server/chunks/build/{ai-DYhpzbqp.mjs → ai-BGP3GcCR.mjs} +21 -21
  236. package/.output/server/chunks/build/{ai-DYhpzbqp.mjs.map → ai-BGP3GcCR.mjs.map} +1 -1
  237. package/.output/server/chunks/build/{analytics-CZJEU0an.mjs → analytics-CXl5OWV-.mjs} +25 -25
  238. package/.output/server/chunks/build/{analytics-CZJEU0an.mjs.map → analytics-CXl5OWV-.mjs.map} +1 -1
  239. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  240. package/.output/server/chunks/build/{db.client-Bdqk_eYQ.mjs → db.client-DijpEH6i.mjs} +3 -1
  241. package/.output/server/chunks/build/db.client-DijpEH6i.mjs.map +1 -0
  242. package/.output/server/chunks/build/{default-DO1izI2V.mjs → default-4ixAePum.mjs} +209 -77
  243. package/.output/server/chunks/build/default-4ixAePum.mjs.map +1 -0
  244. package/.output/server/chunks/build/{docs-C8bndVXg.mjs → docs-Cgsd01H9.mjs} +16 -16
  245. package/.output/server/chunks/build/{docs-C8bndVXg.mjs.map → docs-Cgsd01H9.mjs.map} +1 -1
  246. package/.output/server/chunks/build/{edit-BdfF9er2.mjs → edit-BEQ-ozj9.mjs} +436 -40
  247. package/.output/server/chunks/build/edit-BEQ-ozj9.mjs.map +1 -0
  248. package/.output/server/chunks/build/{fetch-tkz5_OA-.mjs → fetch-B5TVXZ1s.mjs} +3 -3
  249. package/.output/server/chunks/build/fetch-B5TVXZ1s.mjs.map +1 -0
  250. package/.output/server/chunks/build/{forgot-password-swZRcvXE.mjs → forgot-password-mqE1mpDI.mjs} +4 -4
  251. package/.output/server/chunks/build/forgot-password-mqE1mpDI.mjs.map +1 -0
  252. package/.output/server/chunks/build/{help-content-C876a9WD.mjs → help-content-Bc99BajS.mjs} +6 -1
  253. package/.output/server/chunks/build/help-content-Bc99BajS.mjs.map +1 -0
  254. package/.output/server/chunks/build/{import-B27Sv7h5.mjs → import-DqDDTcSc.mjs} +15 -15
  255. package/.output/server/chunks/build/import-DqDDTcSc.mjs.map +1 -0
  256. package/.output/server/chunks/build/{index-ID913tUa.mjs → index-Bpdj6TXV.mjs} +5 -5
  257. package/.output/server/chunks/build/index-Bpdj6TXV.mjs.map +1 -0
  258. package/.output/server/chunks/build/{index-vRwzDXLs.mjs → index-DBFsIsjA.mjs} +534 -262
  259. package/.output/server/chunks/build/index-DBFsIsjA.mjs.map +1 -0
  260. package/.output/server/chunks/build/{index-C7m32bRI.mjs → index-DSufXCZq.mjs} +22 -18
  261. package/.output/server/chunks/build/index-DSufXCZq.mjs.map +1 -0
  262. package/.output/server/chunks/build/{index-BdZmxLtC.mjs → index-WXE60AXk.mjs} +24 -24
  263. package/.output/server/chunks/build/{index-BdZmxLtC.mjs.map → index-WXE60AXk.mjs.map} +1 -1
  264. package/.output/server/chunks/build/{index-ByWTzqF6.mjs → index-okKjrRhL.mjs} +15 -4
  265. package/.output/server/chunks/build/index-okKjrRhL.mjs.map +1 -0
  266. package/.output/server/chunks/build/{isValueEqualOrExist-D4lZ8uRY.mjs → isValueEqualOrExist-C-9DzL4K.mjs} +3 -3
  267. package/.output/server/chunks/build/isValueEqualOrExist-C-9DzL4K.mjs.map +1 -0
  268. package/.output/server/chunks/build/{login-hxCF06JT.mjs → login-eQ88UoBW.mjs} +7 -7
  269. package/.output/server/chunks/build/login-eQ88UoBW.mjs.map +1 -0
  270. package/.output/server/chunks/build/{mcp-BVW1llyW.mjs → mcp-frcSP2Zg.mjs} +14 -14
  271. package/.output/server/chunks/build/mcp-frcSP2Zg.mjs.map +1 -0
  272. package/.output/server/chunks/build/{notifications-Dn-evqXM.mjs → notifications-DAtRd5V6.mjs} +14 -14
  273. package/.output/server/chunks/build/notifications-DAtRd5V6.mjs.map +1 -0
  274. package/.output/server/chunks/build/{performance-CV8qm94u.mjs → performance-BcQzGXE7.mjs} +13 -13
  275. package/.output/server/chunks/build/performance-BcQzGXE7.mjs.map +1 -0
  276. package/.output/server/chunks/build/{pr-feedback-gKDz8LyA.mjs → pr-feedback-BHtgvegy.mjs} +11 -11
  277. package/.output/server/chunks/build/pr-feedback-BHtgvegy.mjs.map +1 -0
  278. package/.output/server/chunks/build/{reset-password-DtEISa1I.mjs → reset-password-DMHrp14-.mjs} +4 -4
  279. package/.output/server/chunks/build/reset-password-DMHrp14-.mjs.map +1 -0
  280. package/.output/server/chunks/build/server.mjs +34 -34
  281. package/.output/server/chunks/build/{settings-BJDnuLpc.mjs → settings-Bo5OETop.mjs} +11 -11
  282. package/.output/server/chunks/build/settings-Bo5OETop.mjs.map +1 -0
  283. package/.output/server/chunks/build/{settings-metadata-DnAK4Rzg.mjs → settings-metadata-BHbsWQ2g.mjs} +3 -3
  284. package/.output/server/chunks/build/settings-metadata-BHbsWQ2g.mjs.map +1 -0
  285. package/.output/server/chunks/build/{setup-BO9tXa_G.mjs → setup-DAXcxuNY.mjs} +18 -18
  286. package/.output/server/chunks/build/{setup-BO9tXa_G.mjs.map → setup-DAXcxuNY.mjs.map} +1 -1
  287. package/.output/server/chunks/build/{storage-zN92cA9q.mjs → storage-BPK0fVwx.mjs} +13 -13
  288. package/.output/server/chunks/build/storage-BPK0fVwx.mjs.map +1 -0
  289. package/.output/server/chunks/build/{tags-CJFnoyQc.mjs → tags-CoxErA5m.mjs} +8 -8
  290. package/.output/server/chunks/build/tags-CoxErA5m.mjs.map +1 -0
  291. package/.output/server/chunks/build/{test-cases-0Q6rT73d.mjs → test-cases-D8rn-0le.mjs} +27 -27
  292. package/.output/server/chunks/build/test-cases-D8rn-0le.mjs.map +1 -0
  293. package/.output/server/chunks/build/{test-functions-DVRJgiWo.mjs → test-functions-pWs9mhbJ.mjs} +13 -13
  294. package/.output/server/chunks/build/test-functions-pWs9mhbJ.mjs.map +1 -0
  295. package/.output/server/chunks/build/{useCopyRich-CZxJ7IY_.mjs → useCopyRich-BqVfhnoH.mjs} +90 -33
  296. package/.output/server/chunks/build/{useCopyRich-CZxJ7IY_.mjs.map → useCopyRich-BqVfhnoH.mjs.map} +1 -1
  297. package/.output/server/chunks/build/{useDesktopDownload-Dyf0fR47.mjs → useDesktopDownload-l80DQJ9e.mjs} +2 -2
  298. package/.output/server/chunks/build/useDesktopDownload-l80DQJ9e.mjs.map +1 -0
  299. package/.output/server/chunks/build/{useDesktopLocalRuns-k7Gw3Fv3.mjs → useDesktopLocalRuns-Dil3YzyU.mjs} +68 -6
  300. package/.output/server/chunks/build/useDesktopLocalRuns-Dil3YzyU.mjs.map +1 -0
  301. package/.output/server/chunks/build/{useDesktopProjectLink-WwLte59P.mjs → useDesktopProjectLink-BnIONB--.mjs} +21 -4
  302. package/.output/server/chunks/build/useDesktopProjectLink-BnIONB--.mjs.map +1 -0
  303. package/.output/server/chunks/build/{useFormControl-8skMOTIf.mjs → useFormControl-CXKztoWk.mjs} +2 -2
  304. package/.output/server/chunks/build/useFormControl-CXKztoWk.mjs.map +1 -0
  305. package/.output/server/chunks/build/{useOpenInIde-D74FmDNg.mjs → useOpenInIde-CbbYW3pd.mjs} +2 -2
  306. package/.output/server/chunks/build/useOpenInIde-CbbYW3pd.mjs.map +1 -0
  307. package/.output/server/chunks/build/{useSettingsNav-BLTHducV.mjs → useSettingsNav-C6NpD4Ab.mjs} +2 -2
  308. package/.output/server/chunks/build/useSettingsNav-C6NpD4Ab.mjs.map +1 -0
  309. package/.output/server/chunks/build/{users-C9bjOBde.mjs → users-C2MuCf5G.mjs} +9 -9
  310. package/.output/server/chunks/build/users-C2MuCf5G.mjs.map +1 -0
  311. package/.output/server/chunks/nitro/nitro.mjs +1032 -721
  312. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  313. package/.output/server/chunks/routes/__piwi/session.get.mjs +1 -1
  314. package/.output/server/chunks/routes/api/ai/step-resolution.post.mjs +88 -0
  315. package/.output/server/chunks/routes/api/ai/step-resolution.post.mjs.map +1 -0
  316. package/.output/server/chunks/routes/api/analytics/_widget_.get.mjs +1 -1
  317. package/.output/server/chunks/routes/api/auth/change-password.post.mjs +1 -1
  318. package/.output/server/chunks/routes/api/auth/forgot-password.post.mjs +1 -1
  319. package/.output/server/chunks/routes/api/auth/login.post.mjs +1 -1
  320. package/.output/server/chunks/routes/api/auth/logout.post.mjs +1 -1
  321. package/.output/server/chunks/routes/api/auth/me.get.mjs +1 -1
  322. package/.output/server/chunks/routes/api/auth/oauth/_provider/callback.get.mjs +1 -1
  323. package/.output/server/chunks/routes/api/auth/oauth/_provider/login.get.mjs +1 -1
  324. package/.output/server/chunks/routes/api/auth/oauth/_provider/unlink.post.mjs +1 -1
  325. package/.output/server/chunks/routes/api/auth/reset-password.post.mjs +1 -1
  326. package/.output/server/chunks/routes/api/auth/send-verify-email.post.mjs +1 -1
  327. package/.output/server/chunks/routes/api/auth/setup.get.mjs +1 -1
  328. package/.output/server/chunks/routes/api/auth/setup.post.mjs +1 -1
  329. package/.output/server/chunks/routes/api/auth/verify-email.get.mjs +1 -1
  330. package/.output/server/chunks/routes/api/channels/_id/test.post.mjs +1 -1
  331. package/.output/server/chunks/routes/api/channels/_id_.delete.mjs +1 -1
  332. package/.output/server/chunks/routes/api/cluster-merge-suggestions/_id/approve.post.mjs +1 -1
  333. package/.output/server/chunks/routes/api/cluster-merge-suggestions/_id/reject.post.mjs +1 -1
  334. package/.output/server/chunks/routes/api/desktop/import-local.post.mjs +1 -1
  335. package/.output/server/chunks/routes/api/failure-clusters/_id/base-commit.patch.mjs +1 -1
  336. package/.output/server/chunks/routes/api/failure-clusters/_id/branches.get.mjs +1 -1
  337. package/.output/server/chunks/routes/api/failure-clusters/_id/commit-diff.get.mjs +1 -1
  338. package/.output/server/chunks/routes/api/failure-clusters/_id/commits.get.mjs +1 -1
  339. package/.output/server/chunks/routes/api/failure-clusters/_id/context.get.mjs +1 -1
  340. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose/stream.post.mjs +1 -1
  341. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose.post.mjs +1 -1
  342. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnoses.get.mjs +1 -1
  343. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnosis.get.mjs +1 -1
  344. package/.output/server/chunks/routes/api/failure-clusters/_id/export.get.mjs +1 -1
  345. package/.output/server/chunks/routes/api/failure-clusters/_id/extract-cases.post.mjs +1 -1
  346. package/.output/server/chunks/routes/api/failure-clusters/_id/fix-plan.get.mjs +1 -1
  347. package/.output/server/chunks/routes/api/failure-clusters/_id/status.patch.mjs +1 -1
  348. package/.output/server/chunks/routes/api/failure-clusters/_id_.get.mjs +1 -1
  349. package/.output/server/chunks/routes/api/failure-diagnoses/_id/feedback.patch.mjs +1 -1
  350. package/.output/server/chunks/routes/api/files/_...path_.get.mjs +1 -1
  351. package/.output/server/chunks/routes/api/health.get.mjs +1 -1
  352. package/.output/server/chunks/routes/api/index.get.mjs +1 -1
  353. package/.output/server/chunks/routes/api/index.get2.mjs +1 -1
  354. package/.output/server/chunks/routes/api/index.get3.mjs +1 -1
  355. package/.output/server/chunks/routes/api/index.get4.mjs +1 -1
  356. package/.output/server/chunks/routes/api/index.get5.mjs +1 -1
  357. package/.output/server/chunks/routes/api/index.post.mjs +1 -1
  358. package/.output/server/chunks/routes/api/index.post2.mjs +1 -1
  359. package/.output/server/chunks/routes/api/index.post3.mjs +1 -1
  360. package/.output/server/chunks/routes/api/index.post4.mjs +1 -1
  361. package/.output/server/chunks/routes/api/index.post5.mjs +1 -1
  362. package/.output/server/chunks/routes/api/index.post6.mjs +1 -1
  363. package/.output/server/chunks/routes/api/links/_id/refresh.post.mjs +1 -1
  364. package/.output/server/chunks/routes/api/links/_id_.delete.mjs +1 -1
  365. package/.output/server/chunks/routes/api/links/_id_.patch.mjs +1 -1
  366. package/.output/server/chunks/routes/api/markers/_id_.delete.mjs +1 -1
  367. package/.output/server/chunks/routes/api/markers/_id_.put.mjs +1 -1
  368. package/.output/server/chunks/routes/api/notifications/stream.get.mjs +1 -1
  369. package/.output/server/chunks/routes/api/projects/_id/ai-steps.get.mjs +63 -0
  370. package/.output/server/chunks/routes/api/projects/_id/ai-steps.get.mjs.map +1 -0
  371. package/.output/server/chunks/routes/api/projects/_id/cluster-merge-suggestions.get.mjs +1 -1
  372. package/.output/server/chunks/routes/api/projects/_id/failure-clusters.get.mjs +1 -1
  373. package/.output/server/chunks/routes/api/projects/_id/flaky-classify.post.mjs +1 -1
  374. package/.output/server/chunks/routes/api/projects/_id/flaky-tests.get.mjs +1 -1
  375. package/.output/server/chunks/routes/api/projects/_id/latest-run.get.mjs +1 -1
  376. package/.output/server/chunks/routes/api/projects/_id/markers.get.mjs +1 -1
  377. package/.output/server/chunks/routes/api/projects/_id/markers.post.mjs +1 -1
  378. package/.output/server/chunks/routes/api/projects/_id/members.get.mjs +1 -1
  379. package/.output/server/chunks/routes/api/projects/_id/members.put.mjs +1 -1
  380. package/.output/server/chunks/routes/api/projects/_id/performance.get.mjs +1 -1
  381. package/.output/server/chunks/routes/api/projects/_id/quarantine/_testCaseId_.delete.mjs +1 -1
  382. package/.output/server/chunks/routes/api/projects/_id/quarantine.get.mjs +1 -1
  383. package/.output/server/chunks/routes/api/projects/_id/quarantine.post.mjs +1 -1
  384. package/.output/server/chunks/routes/api/projects/_id/slow-tests.get.mjs +1 -1
  385. package/.output/server/chunks/routes/api/projects/_id/spec-health.get.mjs +1 -1
  386. package/.output/server/chunks/routes/api/projects/_id/test-cases.get.mjs +1 -1
  387. package/.output/server/chunks/routes/api/projects/_id/test-functions/extract.post.mjs +1 -1
  388. package/.output/server/chunks/routes/api/projects/_id/test-functions/validate-proposal.post.mjs +1 -1
  389. package/.output/server/chunks/routes/api/projects/_id/test-functions.get.mjs +1 -1
  390. package/.output/server/chunks/routes/api/projects/_id/test-functions.post.mjs +1 -1
  391. package/.output/server/chunks/routes/api/projects/_id/timeout-opportunities.get.mjs +1 -1
  392. package/.output/server/chunks/routes/api/projects/_id_.delete.mjs +1 -1
  393. package/.output/server/chunks/routes/api/projects/_id_.get.mjs +1 -1
  394. package/.output/server/chunks/routes/api/projects/_id_.put.mjs +1 -1
  395. package/.output/server/chunks/routes/api/projects/menu.get.mjs +1 -1
  396. package/.output/server/chunks/routes/api/projects/overview.get.mjs +1 -1
  397. package/.output/server/chunks/routes/api/projects.get.mjs +1 -1
  398. package/.output/server/chunks/routes/api/search.get.mjs +1 -1
  399. package/.output/server/chunks/routes/api/settings/ai/limits.get.mjs +1 -1
  400. package/.output/server/chunks/routes/api/settings/ai/limits.put.mjs +1 -1
  401. package/.output/server/chunks/routes/api/settings/ai/test.post.mjs +1 -1
  402. package/.output/server/chunks/routes/api/settings/ai/usage.get.mjs +1 -1
  403. package/.output/server/chunks/routes/api/settings/ai.get.mjs +1 -1
  404. package/.output/server/chunks/routes/api/settings/ai.put.mjs +1 -1
  405. package/.output/server/chunks/routes/api/settings/pr-feedback.get.mjs +1 -1
  406. package/.output/server/chunks/routes/api/settings/pr-feedback.put.mjs +1 -1
  407. package/.output/server/chunks/routes/api/settings/smtp/test.post.mjs +1 -1
  408. package/.output/server/chunks/routes/api/settings/smtp.get.mjs +1 -1
  409. package/.output/server/chunks/routes/api/settings/timeout-hygiene.get.mjs +1 -1
  410. package/.output/server/chunks/routes/api/settings/timeout-hygiene.put.mjs +1 -1
  411. package/.output/server/chunks/routes/api/settings/wasted-waits.get.mjs +1 -1
  412. package/.output/server/chunks/routes/api/settings/wasted-waits.put.mjs +1 -1
  413. package/.output/server/chunks/routes/api/setup-status.get.mjs +1 -1
  414. package/.output/server/chunks/routes/api/stream.get.mjs +1 -1
  415. package/.output/server/chunks/routes/api/subscriptions/_id_.delete.mjs +1 -1
  416. package/.output/server/chunks/routes/api/subscriptions/_id_.patch.mjs +1 -1
  417. package/.output/server/chunks/routes/api/tags/_id_.delete.mjs +1 -1
  418. package/.output/server/chunks/routes/api/tags/_id_.put.mjs +1 -1
  419. package/.output/server/chunks/routes/api/test-cases/_id/history.get.mjs +1 -1
  420. package/.output/server/chunks/routes/api/test-cases/_id/stability-trend.get.mjs +1 -1
  421. package/.output/server/chunks/routes/api/test-cases/_id_.get.mjs +1 -1
  422. package/.output/server/chunks/routes/api/test-functions/_id_.delete.mjs +1 -1
  423. package/.output/server/chunks/routes/api/test-functions/_id_.put.mjs +1 -1
  424. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnose.post.mjs +1 -1
  425. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis-context.get.mjs +1 -1
  426. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis.get.mjs +1 -1
  427. package/.output/server/chunks/routes/api/test-run-cases/_id/export.get.mjs +1 -1
  428. package/.output/server/chunks/routes/api/test-run-cases/_id/traces.get.mjs +1 -1
  429. package/.output/server/chunks/routes/api/test-run-cases/_id_.get.mjs +1 -1
  430. package/.output/server/chunks/routes/api/test-runs/_id/begin.post.mjs +1 -1
  431. package/.output/server/chunks/routes/api/test-runs/_id/case-files.post.mjs +1 -1
  432. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/dom-snapshot.get.mjs +1 -1
  433. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/environment-diff.get.mjs +1 -1
  434. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-healing.get.mjs +1 -1
  435. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-pick.post.mjs +1 -1
  436. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network-body.get.mjs +1 -1
  437. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network.get.mjs +1 -1
  438. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-stacks.get.mjs +1 -1
  439. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/visual-diff.get.mjs +1 -1
  440. package/.output/server/chunks/routes/api/test-runs/_id/events.post.mjs +1 -1
  441. package/.output/server/chunks/routes/api/test-runs/_id/failure-groups.get.mjs +1 -1
  442. package/.output/server/chunks/routes/api/test-runs/_id/finish.post.mjs +1 -1
  443. package/.output/server/chunks/routes/api/test-runs/_id/gate.post.mjs +1 -1
  444. package/.output/server/chunks/routes/api/test-runs/_id/heartbeat.post.mjs +1 -1
  445. package/.output/server/chunks/routes/api/test-runs/_id/insights.get.mjs +1 -1
  446. package/.output/server/chunks/routes/api/test-runs/_id/network-requests.get.mjs +1 -1
  447. package/.output/server/chunks/routes/api/test-runs/_id/regression-context.get.mjs +1 -1
  448. package/.output/server/chunks/routes/api/test-runs/_id/stream.get.mjs +1 -1
  449. package/.output/server/chunks/routes/api/test-runs/_id/summary.get.mjs +1 -1
  450. package/.output/server/chunks/routes/api/test-runs/_id_.delete.mjs +1 -1
  451. package/.output/server/chunks/routes/api/test-runs/_id_.get.mjs +1 -1
  452. package/.output/server/chunks/routes/api/test-runs/_id_.patch.mjs +1 -1
  453. package/.output/server/chunks/routes/api/test-runs/import/check.post.mjs +1 -1
  454. package/.output/server/chunks/routes/api/test-runs/import.post.mjs +1 -1
  455. package/.output/server/chunks/routes/api/test-runs/recent.get.mjs +1 -1
  456. package/.output/server/chunks/routes/api/test-runs/setup.post.mjs +1 -1
  457. package/.output/server/chunks/routes/api/test-runs/start.post.mjs +1 -1
  458. package/.output/server/chunks/routes/api/test-runs/submit.post.mjs +3 -1
  459. package/.output/server/chunks/routes/api/test-runs/submit.post.mjs.map +1 -1
  460. package/.output/server/chunks/routes/api/test-runs/upload.post.mjs +2 -1
  461. package/.output/server/chunks/routes/api/test-runs/upload.post.mjs.map +1 -1
  462. package/.output/server/chunks/routes/api/tests/cleanup.delete.mjs +2 -1
  463. package/.output/server/chunks/routes/api/tests/cleanup.delete.mjs.map +1 -1
  464. package/.output/server/chunks/routes/api/traces/check.post.mjs +1 -1
  465. package/.output/server/chunks/routes/api/users/_id/api-keys/_keyId_.delete.mjs +1 -1
  466. package/.output/server/chunks/routes/api/users/_id/index.get.mjs +1 -1
  467. package/.output/server/chunks/routes/api/users/_id/index.post.mjs +1 -1
  468. package/.output/server/chunks/routes/api/users/_id/invite.post.mjs +1 -1
  469. package/.output/server/chunks/routes/api/users/_id/projects.get.mjs +1 -1
  470. package/.output/server/chunks/routes/api/users/_id/projects.put.mjs +1 -1
  471. package/.output/server/chunks/routes/api/users/_id_.delete.mjs +1 -1
  472. package/.output/server/chunks/routes/api/users/_id_.patch.mjs +1 -1
  473. package/.output/server/chunks/routes/api/version.get.mjs +1 -1
  474. package/.output/server/chunks/routes/mcp.post.mjs +1 -1
  475. package/.output/server/chunks/routes/renderer.mjs +1 -1
  476. package/.output/server/database/migrations/0045_productive_stingray.sql +1 -0
  477. package/.output/server/database/migrations/meta/0045_snapshot.json +3779 -0
  478. package/.output/server/database/migrations/meta/_journal.json +7 -0
  479. package/.output/server/database/migrations-pg/0046_gorgeous_hercules.sql +1 -0
  480. package/.output/server/database/migrations-pg/meta/0046_snapshot.json +4486 -0
  481. package/.output/server/database/migrations-pg/meta/_journal.json +7 -0
  482. package/.output/server/index.mjs +1 -1
  483. package/.output/server/package.json +1 -1
  484. package/package.json +1 -1
  485. package/.output/public/_nuxt/5SkLJHl8.js +0 -1
  486. package/.output/public/_nuxt/6sA-GK37.js +0 -1
  487. package/.output/public/_nuxt/6vX5JdHr.js +0 -1
  488. package/.output/public/_nuxt/B070fjS-.js +0 -1
  489. package/.output/public/_nuxt/B0tmRAhY.js +0 -1
  490. package/.output/public/_nuxt/B3AG2m76.js +0 -1
  491. package/.output/public/_nuxt/B4mZElvM.js +0 -1
  492. package/.output/public/_nuxt/B7tiBVLW.js +0 -1
  493. package/.output/public/_nuxt/BFYkWpPx.js +0 -1
  494. package/.output/public/_nuxt/BM5BPKlc.js +0 -1
  495. package/.output/public/_nuxt/BNyTWIad.js +0 -9
  496. package/.output/public/_nuxt/BOvtXn3m.js +0 -1
  497. package/.output/public/_nuxt/BVyjw9Bi.js +0 -1
  498. package/.output/public/_nuxt/BZOykMLD.js +0 -1
  499. package/.output/public/_nuxt/BjMo2tKC.js +0 -6
  500. package/.output/public/_nuxt/BjOFxi54.js +0 -1
  501. package/.output/public/_nuxt/BjaRappk.js +0 -1
  502. package/.output/public/_nuxt/BtZNYmZO.js +0 -1
  503. package/.output/public/_nuxt/C6t4kxaa.js +0 -1
  504. package/.output/public/_nuxt/CEai-PWF.js +0 -1
  505. package/.output/public/_nuxt/CF_eDZHu.js +0 -1
  506. package/.output/public/_nuxt/CIQeRUSy.js +0 -17
  507. package/.output/public/_nuxt/CPQRQqXU.js +0 -1
  508. package/.output/public/_nuxt/CYhm2FBS.js +0 -5
  509. package/.output/public/_nuxt/CdEzDaDI.js +0 -1
  510. package/.output/public/_nuxt/CfhOanaF.js +0 -1
  511. package/.output/public/_nuxt/CvVbKrcH.js +0 -1
  512. package/.output/public/_nuxt/Cz7SCzdW.js +0 -1
  513. package/.output/public/_nuxt/D7fxV-UA.js +0 -1
  514. package/.output/public/_nuxt/D7t0Dn3h.js +0 -1
  515. package/.output/public/_nuxt/DCE2_MKD.js +0 -2
  516. package/.output/public/_nuxt/DFfqRQxk.js +0 -1
  517. package/.output/public/_nuxt/DNqm5cWU.js +0 -1
  518. package/.output/public/_nuxt/DTrPCv7R.js +0 -1
  519. package/.output/public/_nuxt/DYjxDsYC.js +0 -1
  520. package/.output/public/_nuxt/Dbf8eT28.js +0 -1
  521. package/.output/public/_nuxt/DeewM3Wg.js +0 -2
  522. package/.output/public/_nuxt/DiWxW-w3.js +0 -2
  523. package/.output/public/_nuxt/DmqCquDx.js +0 -1
  524. package/.output/public/_nuxt/DnxrNGE_.js +0 -1
  525. package/.output/public/_nuxt/DprkT7rM.js +0 -1
  526. package/.output/public/_nuxt/DuBtaw3j.js +0 -1
  527. package/.output/public/_nuxt/DylyATWU.js +0 -2
  528. package/.output/public/_nuxt/HIGGZ_c-.js +0 -1
  529. package/.output/public/_nuxt/RkNtgoTD.js +0 -1
  530. package/.output/public/_nuxt/Wk7ZKG4B.js +0 -1
  531. package/.output/public/_nuxt/Ya8ZzWuY.js +0 -1
  532. package/.output/public/_nuxt/a8Z6VC7V.js +0 -2
  533. package/.output/public/_nuxt/builds/meta/6d1766a0-0aba-46b8-9d97-7dd174130359.json +0 -1
  534. package/.output/public/_nuxt/dUPMBJ4f.js +0 -1
  535. package/.output/public/_nuxt/eT2oObCh.js +0 -1
  536. package/.output/public/_nuxt/entry.D_eWXrnD.css +0 -1
  537. package/.output/public/_nuxt/kWnH8yJq.js +0 -1
  538. package/.output/public/_nuxt/sqqg4oXL.js +0 -1
  539. package/.output/public/_nuxt/xZQGtnVA.js +0 -1
  540. package/.output/server/chunks/build/Alert-He-UxEt6.mjs.map +0 -1
  541. package/.output/server/chunks/build/Breadcrumb-DEP2dVCZ.mjs.map +0 -1
  542. package/.output/server/chunks/build/BreadcrumbNav-y6nMDYcR.mjs.map +0 -1
  543. package/.output/server/chunks/build/BrowserBadge-DIASU8Gf.mjs.map +0 -1
  544. package/.output/server/chunks/build/ChartCard-ZTsCvItQ.mjs.map +0 -1
  545. package/.output/server/chunks/build/ChartMarkerTooltip-u_1DUHh-.mjs.map +0 -1
  546. package/.output/server/chunks/build/Checkbox-BisdHf8n.mjs.map +0 -1
  547. package/.output/server/chunks/build/CodeBlock-B8BNtZAe.mjs.map +0 -1
  548. package/.output/server/chunks/build/DashboardNavbar-D7-3zBUU.mjs.map +0 -1
  549. package/.output/server/chunks/build/DashboardSidebarToggle-C3HdHvlE.mjs.map +0 -1
  550. package/.output/server/chunks/build/DataLocationCard-CC2-lHiP.mjs.map +0 -1
  551. package/.output/server/chunks/build/DesktopRunLocallyButton-iNzrDsEs.mjs.map +0 -1
  552. package/.output/server/chunks/build/DiagnosisPanel-BVb2LgHu.mjs.map +0 -1
  553. package/.output/server/chunks/build/DiagnosisResult-xVgZlfKK.mjs.map +0 -1
  554. package/.output/server/chunks/build/DurationValue-UX9uajQJ.mjs.map +0 -1
  555. package/.output/server/chunks/build/EmptyState-DC2q_7TD.mjs.map +0 -1
  556. package/.output/server/chunks/build/EntityLinks-Dzn73fbq.mjs.map +0 -1
  557. package/.output/server/chunks/build/EnvManagedBadge-C-agmABK.mjs.map +0 -1
  558. package/.output/server/chunks/build/ErrorState-CktYyeEZ.mjs.map +0 -1
  559. package/.output/server/chunks/build/FeatureUnavailable-DHFkwI7t.mjs.map +0 -1
  560. package/.output/server/chunks/build/FormField-GYHKiSI6.mjs.map +0 -1
  561. package/.output/server/chunks/build/GetStartedWizard-BpcGYsm2.mjs.map +0 -1
  562. package/.output/server/chunks/build/HelpHint-plioHKA0.mjs.map +0 -1
  563. package/.output/server/chunks/build/LoadingState-CwpfmI0W.mjs.map +0 -1
  564. package/.output/server/chunks/build/MarkerBadge-Biz5--h2.mjs.map +0 -1
  565. package/.output/server/chunks/build/MetaStripGroup-A0a72vt5.mjs.map +0 -1
  566. package/.output/server/chunks/build/Modal-hKLvVFNp.mjs.map +0 -1
  567. package/.output/server/chunks/build/NavbarActions-_YjrSUat.mjs.map +0 -1
  568. package/.output/server/chunks/build/NavigationMenu-RfBOyS32.mjs.map +0 -1
  569. package/.output/server/chunks/build/RovingFocusItem-BOSx1Z9Z.mjs.map +0 -1
  570. package/.output/server/chunks/build/RunReports-nuLb-Nm3.mjs.map +0 -1
  571. package/.output/server/chunks/build/RunStatusBadge-CvWmcFYM.mjs.map +0 -1
  572. package/.output/server/chunks/build/SectionCard-DHAFvJxm.mjs.map +0 -1
  573. package/.output/server/chunks/build/Select-CEyw7HGK.mjs.map +0 -1
  574. package/.output/server/chunks/build/Separator-lrN70ODV.mjs.map +0 -1
  575. package/.output/server/chunks/build/SettingsField-tRmytcEJ.mjs.map +0 -1
  576. package/.output/server/chunks/build/Slideover-D6cRIqch.mjs.map +0 -1
  577. package/.output/server/chunks/build/Switch-R2n82ncQ.mjs.map +0 -1
  578. package/.output/server/chunks/build/Table-qZdnm9t2.mjs.map +0 -1
  579. package/.output/server/chunks/build/Tabs-BDP7MWl4.mjs.map +0 -1
  580. package/.output/server/chunks/build/TestCaseHistoryChart-CKDXQ2GI.mjs.map +0 -1
  581. package/.output/server/chunks/build/TestMetaBadges-BlyKmfeP.mjs.map +0 -1
  582. package/.output/server/chunks/build/TestStatusBar-CvsmKJ4D.mjs.map +0 -1
  583. package/.output/server/chunks/build/Textarea-DpmpM-lN.mjs.map +0 -1
  584. package/.output/server/chunks/build/Tooltip-BI3WQErw.mjs.map +0 -1
  585. package/.output/server/chunks/build/VisuallyHiddenInput-D4E5aJCQ.mjs.map +0 -1
  586. package/.output/server/chunks/build/_id_-T965GKYC.mjs.map +0 -1
  587. package/.output/server/chunks/build/about-B3V_OEiu.mjs.map +0 -1
  588. package/.output/server/chunks/build/account-DpBdYE46.mjs.map +0 -1
  589. package/.output/server/chunks/build/db.client-Bdqk_eYQ.mjs.map +0 -1
  590. package/.output/server/chunks/build/default-DO1izI2V.mjs.map +0 -1
  591. package/.output/server/chunks/build/edit-BdfF9er2.mjs.map +0 -1
  592. package/.output/server/chunks/build/fetch-tkz5_OA-.mjs.map +0 -1
  593. package/.output/server/chunks/build/forgot-password-swZRcvXE.mjs.map +0 -1
  594. package/.output/server/chunks/build/help-content-C876a9WD.mjs.map +0 -1
  595. package/.output/server/chunks/build/import-B27Sv7h5.mjs.map +0 -1
  596. package/.output/server/chunks/build/index-ByWTzqF6.mjs.map +0 -1
  597. package/.output/server/chunks/build/index-C7m32bRI.mjs.map +0 -1
  598. package/.output/server/chunks/build/index-ID913tUa.mjs.map +0 -1
  599. package/.output/server/chunks/build/index-vRwzDXLs.mjs.map +0 -1
  600. package/.output/server/chunks/build/isValueEqualOrExist-D4lZ8uRY.mjs.map +0 -1
  601. package/.output/server/chunks/build/login-hxCF06JT.mjs.map +0 -1
  602. package/.output/server/chunks/build/mcp-BVW1llyW.mjs.map +0 -1
  603. package/.output/server/chunks/build/notifications-Dn-evqXM.mjs.map +0 -1
  604. package/.output/server/chunks/build/performance-CV8qm94u.mjs.map +0 -1
  605. package/.output/server/chunks/build/pr-feedback-gKDz8LyA.mjs.map +0 -1
  606. package/.output/server/chunks/build/reset-password-DtEISa1I.mjs.map +0 -1
  607. package/.output/server/chunks/build/settings-BJDnuLpc.mjs.map +0 -1
  608. package/.output/server/chunks/build/settings-metadata-DnAK4Rzg.mjs.map +0 -1
  609. package/.output/server/chunks/build/storage-zN92cA9q.mjs.map +0 -1
  610. package/.output/server/chunks/build/tags-CJFnoyQc.mjs.map +0 -1
  611. package/.output/server/chunks/build/test-cases-0Q6rT73d.mjs.map +0 -1
  612. package/.output/server/chunks/build/test-functions-DVRJgiWo.mjs.map +0 -1
  613. package/.output/server/chunks/build/useDesktopDownload-Dyf0fR47.mjs.map +0 -1
  614. package/.output/server/chunks/build/useDesktopLocalRuns-k7Gw3Fv3.mjs.map +0 -1
  615. package/.output/server/chunks/build/useDesktopProjectLink-WwLte59P.mjs.map +0 -1
  616. package/.output/server/chunks/build/useFormControl-8skMOTIf.mjs.map +0 -1
  617. package/.output/server/chunks/build/useOpenInIde-D74FmDNg.mjs.map +0 -1
  618. package/.output/server/chunks/build/useSettingsNav-BLTHducV.mjs.map +0 -1
  619. package/.output/server/chunks/build/users-C9bjOBde.mjs.map +0 -1
@@ -1,7 +1,7 @@
1
- import{_ as ee,a as te}from"./2yLW7WU0.js";import{_ as se}from"./Ya8ZzWuY.js";import{d as B,b as re,B as oe,ak as D,k as o,o as r,f as w,g as d,c as a,j as c,p as E,m as s,F as _,y as O,q as ie,i as t,t as l,s as ne,v as g,_ as F,r as U,w as ae,e as ce,A as pe,h as x}from"./CNu3kken.js";import{_ as G}from"./Ce47NgZw.js";import{e as N}from"./DeewM3Wg.js";import{_ as de}from"./DJzFYrBt.js";import{_ as le}from"./DNqm5cWU.js";import{E as ue}from"./DWwiVTZX.js";import{u as me}from"./DFfqRQxk.js";import{a as ge,u as fe}from"./DprkT7rM.js";import"./BZFiz2UB.js";import"./CfhOanaF.js";import"./BjaRappk.js";import"./B_JSV0yG.js";import"./Bq4_kqIp.js";import"./DGnQ69wW.js";const ye={key:0,class:"flex items-center gap-2 text-sm text-muted"},he={key:1,class:"space-y-2"},be=["data-testid"],xe={class:"min-w-0 flex-1"},_e={class:"flex items-center gap-2"},ve={class:"text-sm font-medium"},ke={key:0,class:"text-xs text-muted truncate"},we={key:1,class:"text-xs text-warning"},je={class:"flex items-center gap-1.5 shrink-0"},Ie=B({__name:"DesktopMcpClientsCard",setup(M){const v=re(),C=U(!1),S=U(!0),j=U([]),f=U(null);async function A(){const n=D();if(n)try{j.value=await n.invoke("desktop_mcp_clients"),C.value=!0}catch{C.value=!1}finally{S.value=!1}}oe(()=>{D()?A():S.value=!1});async function y(n,p){const h=D();if(h){f.value=n.id;try{const k=await h.invoke(p?"desktop_mcp_connect":"desktop_mcp_disconnect",{clientId:n.id});j.value=j.value.map(b=>b.id===k.id?k:b),v.add({title:p?`${n.label} connected`:`${n.label} disconnected`,description:p?`Restart ${n.label} to pick up the new server.`:void 0,color:"success",icon:"i-lucide-plug"})}catch(k){v.add({title:`Could not update ${n.label}`,description:N(k),color:"error"})}finally{f.value=null}}}async function u(n){const p=D();if(p)try{await p.invoke("desktop_mcp_reveal",{clientId:n.id})}catch(h){v.add({title:"Could not open the file",description:N(h),color:"error"})}}function q(n){switch(n.status){case"connected":return{label:"Connected",color:"success"};case"stale":return{label:"Needs update",color:"warning"};case"manual":return{label:"Manual setup",color:"warning"};case"not_installed":return{label:"Not detected",color:"neutral"};default:return null}}return(n,p)=>{const h=E,k=ne,b=F,$=G;return o(C)?(r(),w($,{key:0,icon:"i-lucide-plug-zap",title:"Connect a client on this machine"},{subtitle:d(()=>[...p[0]||(p[0]=[s(" One click writes the ",-1),t("code",null,"piwi",-1),s(" entry into the client's own config file (a backup is kept next to it), and entries are kept current when this app's address changes. Restart the client after connecting. ",-1)])]),default:d(()=>[o(S)?(r(),a("div",ye,[c(h,{name:"i-lucide-loader-2",class:"size-4 animate-spin"}),p[1]||(p[1]=s(" Detecting clients… ",-1))])):(r(),a("div",he,[(r(!0),a(_,null,O(o(j),i=>(r(),a("div",{key:i.id,"data-testid":`mcp-client-${i.id}`,class:ie(["flex items-center gap-3 rounded-md border border-default p-2.5",i.status==="not_installed"?"opacity-60":""])},[c(h,{name:"i-lucide-bot",class:"size-4 text-gray-400 shrink-0"}),t("div",xe,[t("div",_e,[t("p",ve,l(i.label),1),q(i)?(r(),w(k,{key:0,color:q(i).color,variant:"subtle",size:"sm"},{default:d(()=>[s(l(q(i).label),1)]),_:2},1032,["color"])):g("",!0)]),i.config_path?(r(),a("p",ke,l(i.config_path),1)):g("",!0),i.detail?(r(),a("p",we,l(i.detail),1)):g("",!0)]),t("div",je,[i.status==="not_connected"?(r(),w(b,{key:0,size:"xs",icon:"i-lucide-plug",loading:o(f)===i.id,onClick:P=>y(i,!0)},{default:d(()=>[...p[2]||(p[2]=[s(" Connect ",-1)])]),_:1},8,["loading","onClick"])):i.status==="stale"?(r(),w(b,{key:1,size:"xs",color:"warning",icon:"i-lucide-refresh-cw",loading:o(f)===i.id,onClick:P=>y(i,!0)},{default:d(()=>[...p[3]||(p[3]=[s(" Update ",-1)])]),_:1},8,["loading","onClick"])):g("",!0),i.status==="connected"||i.status==="stale"?(r(),w(b,{key:2,size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-unplug",loading:o(f)===i.id,onClick:P=>y(i,!1)},{default:d(()=>[...p[4]||(p[4]=[s(" Disconnect ",-1)])]),_:1},8,["loading","onClick"])):g("",!0),i.status!=="not_installed"&&i.config_path?(r(),w(b,{key:3,size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-folder-open","aria-label":"Reveal config file",title:"Reveal config file",onClick:P=>u(i)},null,8,["onClick"])):g("",!0)])],10,be))),128)),p[5]||(p[5]=t("p",{class:"text-xs text-muted"}," A client that is not listed — or marked manual — can always be connected with the snippets below. ",-1))]))]),_:1})):g("",!0)}}}),Ce=Object.assign(Ie,{__name:"DesktopMcpClientsCard"}),Se=[{name:"list_projects",description:"List all projects with stats: total runs, test cases, latest run status and branch. Use this first to discover available projects and their IDs.",inputSchema:{type:"object",properties:{}}},{name:"get_project",description:"Get project details and its recent test runs with pass/fail counts. Results are paginated — use pageSize and cursor for the runs list.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Project ID from list_projects"},pageSize:{type:"number",description:"Runs per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page of runs"}},required:["id"]}},{name:"list_runs",description:"List test runs for a project with filters.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},status:{type:"string",enum:["passed","failed","running","initialising","aborted"],description:"Filter by status"},branch:{type:"string",description:"Filter by branch name (exact match against SCM metadata)"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"}},required:["projectId"]}},{name:"get_run",description:"Get a test run summary plus its test cases (paginated), with status, truncated error text, and failure cluster IDs. Filter by status and page with pageSize/cursor.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run ID"},status_filter:{type:"string",enum:["failed","flaky","all"],description:'Which test cases to include (default: "failed" — only failed+timedOut; "flaky" — only flaky; "all" — every case)'},pageSize:{type:"number",description:"Cases per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response for the next page of cases"}},required:["id"]}},{name:"list_failed_cases",description:"List failed and timed-out test cases across recent runs for a project.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"},runId:{type:"number",description:"Optional: restrict to a specific run"}},required:["projectId"]}},{name:"list_flaky_tests",description:"List flaky tests for a project with flakiness scores.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},runs:{type:"number",description:"Number of recent runs to analyze (default 50, max 200)"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response. Cursor is the flakyScore value (descending)."}},required:["projectId"]}},{name:"get_test_case",description:"Get test case details including aggregated pass/fail stats, flakiness metrics, and recent executions (paginated). Use testCaseId (stable identity), not the per-run caseId.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test case ID (testCaseId from list_failed_cases or list_flaky_tests)"},pageSize:{type:"number",description:"Executions per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page of executions"}},required:["id"]}},{name:"list_clusters",description:"List failure clusters for a project. Each cluster groups similar failures by error fingerprint.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},status:{type:"string",enum:["open","resolved","ignored"],description:"Filter by triage status (default: all statuses)"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"}},required:["projectId"]}},{name:"get_cluster",description:"Get full details for a failure cluster including all affected test cases, a compact diagnosis summary, and locator healing suggestions for up to 5 affected cases. Each healing entry includes the failing locator, the recommended fix, and the number of alternatives available. Use get_cluster_diagnosis for the full diagnosis text, or get_cluster_context for the raw AI evidence.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID from list_clusters"}},required:["id"]}},{name:"get_fix_plan",description:"Everything needed to fix one failure cluster, in a single answer: the diagnosis and its validated patch, ranked locator replacements with the exact file and line to edit, the failing tests, the owning team, and the command that verifies the work. `verify.expectation` states what the dashboard records once those tests pass, so you can confirm the fix landed rather than guessing. Prefer this over assembling get_cluster + get_cluster_diagnosis + get_locator_healing yourself.",inputSchema:{type:"object",properties:{clusterId:{type:"number",description:"Cluster ID from list_clusters or list_open_clusters"}},required:["clusterId"]}},{name:"get_cluster_diagnosis",description:"Get the stored AI diagnosis for a failure cluster. Returns category, confidence, root cause, evidence, and suggested fix. Returns null if no diagnosis has been run yet.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID"}},required:["id"]}},{name:"get_test_case_context",description:"Get the AI evidence context for a specific test-run-case (execution scope). Use this when debugging a single test failure — it provides the execution-scoped evidence including steps, console, network, and SCM diff.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run case ID"}},required:["id"]}},{name:"get_case_screenshots",description:"Get screenshots for a test-run-case. By default returns metadata only (name, type, size). Set content=true to include base64-encoded image data (max 3, capped at ~100 KB each). Call metadata-only first to discover what exists, then request content for the ones you need.",inputSchema:{type:"object",properties:{testRunsCaseId:{type:"number",description:"Test run case ID"},content:{type:"boolean",description:"Include base64 image data (default false — metadata only)"}},required:["testRunsCaseId"]}},{name:"get_cluster_context",description:"Get the full AI evidence context for a failure cluster — the same data sent to the diagnosis AI. Includes error samples, stack traces, test steps, console logs, network failures, ARIA snapshots, SCM diff (changed files since last green run), and a per-section breakdown with char counts and truncation flags. This is the richest available evidence for debugging a failure.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID"},baseCommit:{type:"string",description:"Optional: override the baseline commit SHA for SCM diff comparison"},selectedCommitShas:{type:"array",items:{type:"string"},description:"Optional: specific commit SHAs to include in the diff context (max 10)"}},required:["id"]}},{name:"search_test_cases",description:"Search test cases by title or file path within a project. Accepts a free-text query and returns matching test cases with basic stats. Use this to find a test case when you don't know its ID.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},q:{type:"string",description:"Search query — matched against title and file path (case-insensitive)"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"}},required:["projectId","q"]}},{name:"get_test_run_case",description:"Get a single test-run-case execution record with full (untruncated) error text plus steps, console logs, web vitals, and ARIA snapshot. Use include to fetch only the blobs you need. The ID is the executionId from get_run.cases or testRunsCaseId from get_cluster.affectedTestCases.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run case ID (executionId from get_run.cases or testRunsCaseId from get_cluster.affectedTestCases)"},include:{type:"array",items:{type:"string",enum:["steps","console","webVitals","aria","source"]},description:"Optional: which heavy blobs to include (default: all). The error, status, and summary are always returned."}},required:["id"]}},{name:"list_recent_activity",description:"List the most recent test runs across all projects. No projectId required — returns a cross-project view of recent CI activity. Paginated by startTime descending.",inputSchema:{type:"object",properties:{pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"}}}},{name:"get_repo_commits",description:"List recent commits for a project's repository. Requires SCM token configuration (per-project or global). Returns commit details (SHA, message, author, date).",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},branch:{type:"string",description:"Branch name (default: repository default branch)"},limit:{type:"number",description:"Max commits (default 20, max 100)"}},required:["projectId"]}},{name:"get_repo_diff",description:"Get the diff (changed files with patches) for a single commit in a project's repository. Requires SCM token configuration (per-project or global). Useful for inspecting what code changed in a specific commit suspected of causing a failure.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},sha:{type:"string",description:"Full commit SHA"}},required:["projectId","sha"]}},{name:"get_run_insights",description:'Compare a run to its last green baseline: pass-rate delta, new regressions, recurrences, recovered tests, new flaky tests, biggest perf improvements/regressions, worker imbalance, and newly opened clusters. Use this to answer "what changed?" and "did my fix work?".',inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run ID"}},required:["id"]}},{name:"get_spec_health",description:"Per-spec-file health for a project: pass rate, flaky rate, failure count, test count, and average duration grouped by spec-file prefix over the last N days. Use to find which areas of the suite are unhealthy.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},days:{type:"number",description:"Lookback window in days (default 30, max 90)"}},required:["projectId"]}},{name:"get_slow_tests",description:"Slowest test cases in a project by average duration, with max/min and trend direction across recent runs. Use to target performance work.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},runs:{type:"number",description:"Recent runs to analyze (default 50, max 100)"}},required:["projectId"]}},{name:"get_performance_trend",description:'Time series of run duration, average test duration, and p90 test duration for a project. Use to answer "is the suite getting slower?".',inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},limit:{type:"number",description:"Number of recent runs (default 30, max 100)"}},required:["projectId"]}},{name:"get_test_stability_trend",description:'Time-series stability for a single test case: flaky rate, pass rate, and average duration bucketed over its recent execution history. Use to answer "is this test getting flakier?".',inputSchema:{type:"object",properties:{id:{type:"number",description:"Test case ID (stable testCaseId)"},buckets:{type:"number",description:"Number of time buckets (default 20, 5–50)"}},required:["id"]}},{name:"get_network_requests",description:"A run's network requests aggregated by method + normalized route, sorted by average duration, with status codes and captured backend server logs. Use to pin a UI failure on a slow or failing endpoint.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run ID"}},required:["id"]}},{name:"get_failure_groups",description:"One run's failures grouped by failure cluster, with per-group affected cases and worker correlation. Run-scoped counterpart to list_clusters.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run ID"}},required:["id"]}},{name:"get_locator_healing",description:"Ranked alternative locators for a failing test-run-case: the failing locator, the recommended durable fix, and the full alternative lists (from prior success, element match, and ARIA snapshot). Use when fixing a broken selector.",inputSchema:{type:"object",properties:{testRunsCaseId:{type:"number",description:"Test run case ID (executionId)"}},required:["testRunsCaseId"]}},{name:"search",description:"Global search across all in-scope projects, runs (by label or numeric id), and test cases (by title). Use to find a run by its label or locate an entity across projects.",inputSchema:{type:"object",properties:{q:{type:"string",description:"Search query (min 2 chars)"}},required:["q"]}},{name:"list_case_traces",description:"List Playwright trace files for a test-run-case, with a download path for each. Fetch the bytes via GET /api/files/<path>.",inputSchema:{type:"object",properties:{testRunsCaseId:{type:"number",description:"Test run case ID (executionId)"}},required:["testRunsCaseId"]}},{name:"list_links",description:"List external entity links (Jira, GitHub PR/issue, etc.) attached to a run, test-run-case, or test case, with provider and unfurled status.",inputSchema:{type:"object",properties:{entityType:{type:"string",enum:["test_run","test_runs_case","test_case"],description:"Which entity the links are attached to"},id:{type:"number",description:"The entity ID matching entityType"}},required:["entityType","id"]}},{name:"list_tags",description:"List the project tag catalog (id, text, color).",inputSchema:{type:"object",properties:{}}},{name:"get_project_test_catalog",description:"The full test-case catalog for a project with aggregated pass/fail/flaky counts, average duration, and last status per test. Offset-paginated bulk companion to get_test_case.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},offset:{type:"number",description:"Row offset for paging (default 0)"},query:{type:"string",description:"Optional case-insensitive substring filter on title or file path"},tags:{type:"string",description:"Comma-separated tags; a test must carry every one of them. A leading @ is optional."},owner:{type:"string",description:"Exact owner declared via the piwi:owner annotation"},priority:{type:"string",enum:["critical","high","medium","low"],description:"Priority declared via the piwi:priority annotation"}},required:["projectId"]}},{name:"list_open_clusters",description:"Open failure clusters across all in-scope projects, ranked by occurrences — a cross-project triage queue. Filter by status; paginate with pageSize/cursor.",inputSchema:{type:"object",properties:{status:{type:"string",enum:["open","resolved","ignored"],description:"Triage status (default: open)"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"}}}},{name:"get_instance_stats",description:"Instance-wide counts (projects, runs, test cases, executions, files) and total storage size. Admin only.",inputSchema:{type:"object",properties:{}}},{name:"explain_failure",description:"One-call evidence bundle for a single failing execution: error, steps, console, ARIA snapshot, the recommended locator fix, a screenshot count, and the AI diagnosis context. Prefer this over chaining get_test_run_case + get_locator_healing + get_test_case_context.",inputSchema:{type:"object",properties:{testRunsCaseId:{type:"number",description:"Test run case ID (executionId)"}},required:["testRunsCaseId"]}},{name:"set_cluster_status",description:"Triage a failure cluster: set its status to open, resolved, or ignored with an optional note. Requires reporter or admin access. Use after fixing the underlying issue.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID"},status:{type:"string",enum:["open","resolved","ignored"],description:"New triage status"},triageNote:{type:"string",description:"Optional note explaining the status change"}},required:["id","status"]}},{name:"set_cluster_base_commit",description:'Pin the baseline commit SHA a cluster uses for its SCM-diff diagnosis context, so "what changed since green" is accurate. Requires reporter or admin access.',inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID"},commit:{type:"string",description:"Baseline commit SHA (empty to clear)"}},required:["id","commit"]}},{name:"submit_diagnosis_feedback",description:"Record thumbs up/down feedback on a stored diagnosis, with an optional note. Requires reporter or admin access.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Diagnosis ID"},feedback:{type:"string",enum:["up","down"],description:"Rating (omit to clear)"},feedbackNote:{type:"string",description:"Optional note"}},required:["id"]}},{name:"run_cluster_diagnosis",description:"Trigger an AI diagnosis for a failure cluster and return the result (category, confidence, root cause, suggested fix). Returns the existing completed diagnosis unless force is set. Requires reporter or admin access and a configured AI provider.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID"},force:{type:"boolean",description:"Re-run even if a completed diagnosis exists (default false)"},baseCommit:{type:"string",description:"Optional baseline commit SHA for SCM-diff context"}},required:["id"]}},{name:"create_test_function",description:`Register a page-object method or helper in a project's test-function catalog, so the Piwi Picker browser extension (and its recorder) can match a live page or a recorded session against it and substitute a call to your own code instead of raw locator lines. This tool does not call an AI itself — you (the calling agent) read the function's real source in your own context and fill in these fields directly; the tool only validates the shape and persists it. Follow these extraction rules when deciding the field values:
1
+ import{_ as ee,a as te}from"./CdLqOMvN.js";import{_ as se}from"./Db5xe__T.js";import{d as B,q as re,C as oe,ak as D,b as o,o as r,e as w,f as d,c as a,h as c,_ as E,k as s,F as _,z as O,i as ie,g as t,t as l,m as ne,l as g,j as F,r as U,w as ae,s as ce,B as pe,v as x}from"./BzBaMPgu.js";import{_ as G}from"./D_j436ND.js";import{e as N}from"./CdM2qNYM.js";import{_ as de}from"./Cmuwgbf4.js";import{_ as le}from"./Dq6_-84R.js";import{E as ue}from"./DWwiVTZX.js";import{u as me}from"./E26Y1NWH.js";import{a as ge,u as fe}from"./CDEmotIt.js";import"./DWz_bHNP.js";import"./qeqzb80l.js";import"./BcHU1KNK.js";import"./kDEwM7SQ.js";import"./BPQNVV4M.js";import"./DGnQ69wW.js";const ye={key:0,class:"flex items-center gap-2 text-sm text-muted"},he={key:1,class:"space-y-2"},be=["data-testid"],xe={class:"min-w-0 flex-1"},_e={class:"flex items-center gap-2"},ve={class:"text-sm font-medium"},ke={key:0,class:"text-xs text-muted truncate"},we={key:1,class:"text-xs text-warning"},je={class:"flex items-center gap-1.5 shrink-0"},Ie=B({__name:"DesktopMcpClientsCard",setup(M){const v=re(),C=U(!1),S=U(!0),j=U([]),f=U(null);async function A(){const n=D();if(n)try{j.value=await n.invoke("desktop_mcp_clients"),C.value=!0}catch{C.value=!1}finally{S.value=!1}}oe(()=>{D()?A():S.value=!1});async function y(n,p){const h=D();if(h){f.value=n.id;try{const k=await h.invoke(p?"desktop_mcp_connect":"desktop_mcp_disconnect",{clientId:n.id});j.value=j.value.map(b=>b.id===k.id?k:b),v.add({title:p?`${n.label} connected`:`${n.label} disconnected`,description:p?`Restart ${n.label} to pick up the new server.`:void 0,color:"success",icon:"i-lucide-plug"})}catch(k){v.add({title:`Could not update ${n.label}`,description:N(k),color:"error"})}finally{f.value=null}}}async function u(n){const p=D();if(p)try{await p.invoke("desktop_mcp_reveal",{clientId:n.id})}catch(h){v.add({title:"Could not open the file",description:N(h),color:"error"})}}function q(n){switch(n.status){case"connected":return{label:"Connected",color:"success"};case"stale":return{label:"Needs update",color:"warning"};case"manual":return{label:"Manual setup",color:"warning"};case"not_installed":return{label:"Not detected",color:"neutral"};default:return null}}return(n,p)=>{const h=E,k=ne,b=F,z=G;return o(C)?(r(),w(z,{key:0,icon:"i-lucide-plug-zap",title:"Connect a client on this machine"},{subtitle:d(()=>[...p[0]||(p[0]=[s(" One click writes the ",-1),t("code",null,"piwi",-1),s(" entry into the client's own config file (a backup is kept next to it), and entries are kept current when this app's address changes. Restart the client after connecting. ",-1)])]),default:d(()=>[o(S)?(r(),a("div",ye,[c(h,{name:"i-lucide-loader-2",class:"size-4 animate-spin"}),p[1]||(p[1]=s(" Detecting clients… ",-1))])):(r(),a("div",he,[(r(!0),a(_,null,O(o(j),i=>(r(),a("div",{key:i.id,"data-testid":`mcp-client-${i.id}`,class:ie(["flex items-center gap-3 rounded-md border border-default p-2.5",i.status==="not_installed"?"opacity-60":""])},[c(h,{name:"i-lucide-bot",class:"size-4 text-gray-400 shrink-0"}),t("div",xe,[t("div",_e,[t("p",ve,l(i.label),1),q(i)?(r(),w(k,{key:0,color:q(i).color,variant:"subtle",size:"sm"},{default:d(()=>[s(l(q(i).label),1)]),_:2},1032,["color"])):g("",!0)]),i.config_path?(r(),a("p",ke,l(i.config_path),1)):g("",!0),i.detail?(r(),a("p",we,l(i.detail),1)):g("",!0)]),t("div",je,[i.status==="not_connected"?(r(),w(b,{key:0,size:"xs",icon:"i-lucide-plug",loading:o(f)===i.id,onClick:P=>y(i,!0)},{default:d(()=>[...p[2]||(p[2]=[s(" Connect ",-1)])]),_:1},8,["loading","onClick"])):i.status==="stale"?(r(),w(b,{key:1,size:"xs",color:"warning",icon:"i-lucide-refresh-cw",loading:o(f)===i.id,onClick:P=>y(i,!0)},{default:d(()=>[...p[3]||(p[3]=[s(" Update ",-1)])]),_:1},8,["loading","onClick"])):g("",!0),i.status==="connected"||i.status==="stale"?(r(),w(b,{key:2,size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-unplug",loading:o(f)===i.id,onClick:P=>y(i,!1)},{default:d(()=>[...p[4]||(p[4]=[s(" Disconnect ",-1)])]),_:1},8,["loading","onClick"])):g("",!0),i.status!=="not_installed"&&i.config_path?(r(),w(b,{key:3,size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-folder-open","aria-label":"Reveal config file",title:"Reveal config file",onClick:P=>u(i)},null,8,["onClick"])):g("",!0)])],10,be))),128)),p[5]||(p[5]=t("p",{class:"text-xs text-muted"}," A client that is not listed — or marked manual — can always be connected with the snippets below. ",-1))]))]),_:1})):g("",!0)}}}),Ce=Object.assign(Ie,{__name:"DesktopMcpClientsCard"}),Se=[{name:"list_projects",description:"List all projects with stats: total runs, test cases, latest run status and branch. Use this first to discover available projects and their IDs.",inputSchema:{type:"object",properties:{}}},{name:"get_project",description:"Get project details and its recent test runs with pass/fail counts. Results are paginated — use pageSize and cursor for the runs list.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Project ID from list_projects"},pageSize:{type:"number",description:"Runs per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page of runs"}},required:["id"]}},{name:"list_runs",description:"List test runs for a project with filters.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},status:{type:"string",enum:["passed","failed","running","initialising","aborted"],description:"Filter by status"},branch:{type:"string",description:"Filter by branch name (exact match against SCM metadata)"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"}},required:["projectId"]}},{name:"get_run",description:"Get a test run summary plus its test cases (paginated), with status, truncated error text, and failure cluster IDs. Filter by status and page with pageSize/cursor.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run ID"},status_filter:{type:"string",enum:["failed","flaky","all"],description:'Which test cases to include (default: "failed" — only failed+timedOut; "flaky" — only flaky; "all" — every case)'},pageSize:{type:"number",description:"Cases per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response for the next page of cases"}},required:["id"]}},{name:"list_failed_cases",description:"List failed and timed-out test cases across recent runs for a project.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"},runId:{type:"number",description:"Optional: restrict to a specific run"}},required:["projectId"]}},{name:"list_flaky_tests",description:"List flaky tests for a project with flakiness scores.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},runs:{type:"number",description:"Number of recent runs to analyze (default 50, max 200)"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response. Cursor is the flakyScore value (descending)."}},required:["projectId"]}},{name:"get_test_case",description:"Get test case details including aggregated pass/fail stats, flakiness metrics, and recent executions (paginated). Use testCaseId (stable identity), not the per-run caseId.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test case ID (testCaseId from list_failed_cases or list_flaky_tests)"},pageSize:{type:"number",description:"Executions per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page of executions"}},required:["id"]}},{name:"list_clusters",description:"List failure clusters for a project. Each cluster groups similar failures by error fingerprint.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},status:{type:"string",enum:["open","resolved","ignored"],description:"Filter by triage status (default: all statuses)"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"}},required:["projectId"]}},{name:"get_cluster",description:"Get full details for a failure cluster including all affected test cases, a compact diagnosis summary, and locator healing suggestions for up to 5 affected cases. Each healing entry includes the failing locator, the recommended fix, and the number of alternatives available. Use get_cluster_diagnosis for the full diagnosis text, or get_cluster_context for the raw AI evidence.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID from list_clusters"}},required:["id"]}},{name:"get_fix_plan",description:"Everything needed to fix one failure cluster, in a single answer: the diagnosis and its validated patch, ranked locator replacements with the exact file and line to edit, the failing tests, the owning team, and the command that verifies the work. `verify.expectation` states what the dashboard records once those tests pass, so you can confirm the fix landed rather than guessing. Prefer this over assembling get_cluster + get_cluster_diagnosis + get_locator_healing yourself.",inputSchema:{type:"object",properties:{clusterId:{type:"number",description:"Cluster ID from list_clusters or list_open_clusters"}},required:["clusterId"]}},{name:"get_cluster_diagnosis",description:"Get the stored AI diagnosis for a failure cluster. Returns category, confidence, root cause, evidence, and suggested fix. Returns null if no diagnosis has been run yet.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID"}},required:["id"]}},{name:"get_test_case_context",description:"Get the AI evidence context for a specific test-run-case (execution scope). Use this when debugging a single test failure — it provides the execution-scoped evidence including steps, console, network, and SCM diff.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run case ID"}},required:["id"]}},{name:"get_case_screenshots",description:"Get screenshots for a test-run-case. By default returns metadata only (name, type, size). Set content=true to include base64-encoded image data (max 3, capped at ~100 KB each). Call metadata-only first to discover what exists, then request content for the ones you need.",inputSchema:{type:"object",properties:{testRunsCaseId:{type:"number",description:"Test run case ID"},content:{type:"boolean",description:"Include base64 image data (default false — metadata only)"}},required:["testRunsCaseId"]}},{name:"get_cluster_context",description:"Get the full AI evidence context for a failure cluster — the same data sent to the diagnosis AI. Includes error samples, stack traces, test steps, console logs, network failures, ARIA snapshots, SCM diff (changed files since last green run), and a per-section breakdown with char counts and truncation flags. This is the richest available evidence for debugging a failure.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID"},baseCommit:{type:"string",description:"Optional: override the baseline commit SHA for SCM diff comparison"},selectedCommitShas:{type:"array",items:{type:"string"},description:"Optional: specific commit SHAs to include in the diff context (max 10)"}},required:["id"]}},{name:"search_test_cases",description:"Search test cases by title or file path within a project. Accepts a free-text query and returns matching test cases with basic stats. Use this to find a test case when you don't know its ID.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},q:{type:"string",description:"Search query — matched against title and file path (case-insensitive)"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"}},required:["projectId","q"]}},{name:"get_test_run_case",description:"Get a single test-run-case execution record with full (untruncated) error text plus steps, console logs, web vitals, and ARIA snapshot. Use include to fetch only the blobs you need. The ID is the executionId from get_run.cases or testRunsCaseId from get_cluster.affectedTestCases.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run case ID (executionId from get_run.cases or testRunsCaseId from get_cluster.affectedTestCases)"},include:{type:"array",items:{type:"string",enum:["steps","console","webVitals","aria","source"]},description:"Optional: which heavy blobs to include (default: all). The error, status, and summary are always returned."}},required:["id"]}},{name:"list_recent_activity",description:"List the most recent test runs across all projects. No projectId required — returns a cross-project view of recent CI activity. Paginated by startTime descending.",inputSchema:{type:"object",properties:{pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"}}}},{name:"get_repo_commits",description:"List recent commits for a project's repository. Requires SCM token configuration (per-project or global). Returns commit details (SHA, message, author, date).",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},branch:{type:"string",description:"Branch name (default: repository default branch)"},limit:{type:"number",description:"Max commits (default 20, max 100)"}},required:["projectId"]}},{name:"get_repo_diff",description:"Get the diff (changed files with patches) for a single commit in a project's repository. Requires SCM token configuration (per-project or global). Useful for inspecting what code changed in a specific commit suspected of causing a failure.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},sha:{type:"string",description:"Full commit SHA"}},required:["projectId","sha"]}},{name:"get_run_insights",description:'Compare a run to its last green baseline: pass-rate delta, new regressions, recurrences, recovered tests, new flaky tests, biggest perf improvements/regressions, worker imbalance, and newly opened clusters. Use this to answer "what changed?" and "did my fix work?".',inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run ID"}},required:["id"]}},{name:"get_spec_health",description:"Per-spec-file health for a project: pass rate, flaky rate, failure count, test count, and average duration grouped by spec-file prefix over the last N days. Use to find which areas of the suite are unhealthy.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},days:{type:"number",description:"Lookback window in days (default 30, max 90)"}},required:["projectId"]}},{name:"get_slow_tests",description:"Slowest test cases in a project by average duration, with max/min and trend direction across recent runs. Use to target performance work.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},runs:{type:"number",description:"Recent runs to analyze (default 50, max 100)"}},required:["projectId"]}},{name:"get_performance_trend",description:'Time series of run duration, average test duration, and p90 test duration for a project. Use to answer "is the suite getting slower?".',inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},limit:{type:"number",description:"Number of recent runs (default 30, max 100)"}},required:["projectId"]}},{name:"get_test_stability_trend",description:'Time-series stability for a single test case: flaky rate, pass rate, and average duration bucketed over its recent execution history. Use to answer "is this test getting flakier?".',inputSchema:{type:"object",properties:{id:{type:"number",description:"Test case ID (stable testCaseId)"},buckets:{type:"number",description:"Number of time buckets (default 20, 5–50)"}},required:["id"]}},{name:"get_network_requests",description:"A run's network requests aggregated by method + normalized route, sorted by average duration, with status codes and captured backend server logs. Use to pin a UI failure on a slow or failing endpoint.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run ID"}},required:["id"]}},{name:"get_failure_groups",description:"One run's failures grouped by failure cluster, with per-group affected cases and worker correlation. Run-scoped counterpart to list_clusters.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run ID"}},required:["id"]}},{name:"get_locator_healing",description:"Ranked alternative locators for a failing test-run-case: the failing locator, the recommended durable fix, and the full alternative lists (from prior success, element match, and ARIA snapshot). Use when fixing a broken selector.",inputSchema:{type:"object",properties:{testRunsCaseId:{type:"number",description:"Test run case ID (executionId)"}},required:["testRunsCaseId"]}},{name:"search",description:"Global search across all in-scope projects, runs (by label or numeric id), and test cases (by title). Use to find a run by its label or locate an entity across projects.",inputSchema:{type:"object",properties:{q:{type:"string",description:"Search query (min 2 chars)"}},required:["q"]}},{name:"list_case_traces",description:"List Playwright trace files for a test-run-case, with a download path for each. Fetch the bytes via GET /api/files/<path>.",inputSchema:{type:"object",properties:{testRunsCaseId:{type:"number",description:"Test run case ID (executionId)"}},required:["testRunsCaseId"]}},{name:"list_links",description:"List external entity links (Jira, GitHub PR/issue, etc.) attached to a run, test-run-case, or test case, with provider and unfurled status.",inputSchema:{type:"object",properties:{entityType:{type:"string",enum:["test_run","test_runs_case","test_case"],description:"Which entity the links are attached to"},id:{type:"number",description:"The entity ID matching entityType"}},required:["entityType","id"]}},{name:"list_tags",description:"List the project tag catalog (id, text, color).",inputSchema:{type:"object",properties:{}}},{name:"get_project_test_catalog",description:"The full test-case catalog for a project with aggregated pass/fail/flaky counts, average duration, and last status per test. Offset-paginated bulk companion to get_test_case.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},offset:{type:"number",description:"Row offset for paging (default 0)"},query:{type:"string",description:"Optional case-insensitive substring filter on title or file path"},tags:{type:"string",description:"Comma-separated tags; a test must carry every one of them. A leading @ is optional."},owner:{type:"string",description:"Exact owner declared via the piwi:owner annotation"},priority:{type:"string",enum:["critical","high","medium","low"],description:"Priority declared via the piwi:priority annotation"}},required:["projectId"]}},{name:"list_open_clusters",description:"Open failure clusters across all in-scope projects, ranked by occurrences — a cross-project triage queue. Filter by status; paginate with pageSize/cursor.",inputSchema:{type:"object",properties:{status:{type:"string",enum:["open","resolved","ignored"],description:"Triage status (default: open)"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"}}}},{name:"get_instance_stats",description:"Instance-wide counts (projects, runs, test cases, executions, files) and total storage size. Admin only.",inputSchema:{type:"object",properties:{}}},{name:"explain_failure",description:"One-call evidence bundle for a single failing execution: error, steps, console, ARIA snapshot, the recommended locator fix, a screenshot count, and the AI diagnosis context. Prefer this over chaining get_test_run_case + get_locator_healing + get_test_case_context.",inputSchema:{type:"object",properties:{testRunsCaseId:{type:"number",description:"Test run case ID (executionId)"}},required:["testRunsCaseId"]}},{name:"set_cluster_status",description:"Triage a failure cluster: set its status to open, resolved, or ignored with an optional note. Requires reporter or admin access. Use after fixing the underlying issue.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID"},status:{type:"string",enum:["open","resolved","ignored"],description:"New triage status"},triageNote:{type:"string",description:"Optional note explaining the status change"}},required:["id","status"]}},{name:"set_cluster_base_commit",description:'Pin the baseline commit SHA a cluster uses for its SCM-diff diagnosis context, so "what changed since green" is accurate. Requires reporter or admin access.',inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID"},commit:{type:"string",description:"Baseline commit SHA (empty to clear)"}},required:["id","commit"]}},{name:"submit_diagnosis_feedback",description:"Record thumbs up/down feedback on a stored diagnosis, with an optional note. Requires reporter or admin access.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Diagnosis ID"},feedback:{type:"string",enum:["up","down"],description:"Rating (omit to clear)"},feedbackNote:{type:"string",description:"Optional note"}},required:["id"]}},{name:"run_cluster_diagnosis",description:"Trigger an AI diagnosis for a failure cluster and return the result (category, confidence, root cause, suggested fix). Returns the existing completed diagnosis unless force is set. Requires reporter or admin access and a configured AI provider.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID"},force:{type:"boolean",description:"Re-run even if a completed diagnosis exists (default false)"},baseCommit:{type:"string",description:"Optional baseline commit SHA for SCM-diff context"}},required:["id"]}},{name:"create_test_function",description:`Register a page-object method or helper in a project's test-function catalog, so the Piwi Picker browser extension (and its recorder) can match a live page or a recorded session against it and substitute a call to your own code instead of raw locator lines. This tool does not call an AI itself — you (the calling agent) read the function's real source in your own context and fill in these fields directly; the tool only validates the shape and persists it. Follow these extraction rules when deciding the field values:
2
2
 
3
3
  ${ue}
4
4
 
5
- The fields below map onto that guidance one-for-one, plus "module" and "urlPattern", which no amount of code-reading can infer — supply them from where the function actually lives and, optionally, which page it applies to. Requires reporter or administrator access.`,inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID from list_projects"},name:{type:"string",description:"Becomes the called method/function name — must be a valid JS identifier"},kind:{type:"string",enum:["page-object-method","helper","fixture"],description:'"page-object-method" for a class method acting on this.page; "helper" for a standalone function taking page as its first parameter; "fixture" only for Playwright fixture setup'},module:{type:"string",description:"Import specifier for where this function lives, e.g. './pages/CartPage'"},receiver:{type:["string","null"],description:"page-object-method only: instance variable name, e.g. cartPage (null for a helper/fixture)"},importName:{type:["string","null"],description:"page-object-method only: the class name to import, e.g. CartPage (null for a helper/fixture)"},params:{type:"array",description:"The function's own parameters, excluding the leading Playwright handle (page/locator/this). An options-bag parameter must be type 'object' with its property names in 'fields' — never flattened to a string.",items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["string","number","boolean","object"]},fields:{type:"array",items:{type:"string"},description:"For type 'object': the bag's property names, e.g. ['label', 'testId']"}},required:["name","type"]}},returnsPage:{type:"boolean",description:"True if the function returns/navigates to a new Page (default false)"},urlPattern:{type:["string","null"],description:'Optional glob (** crosses path segments, * does not, e.g. "**/cart") gating which page this applies to'},steps:{type:"array",description:"The ordered sequence of page interactions the function performs — at least one required",items:{type:"object",properties:{action:{type:"string",enum:["goto","click","fill","check","uncheck","selectOption","press","assertVisible"]},target:{type:"object",properties:{role:{type:["string","null"]},name:{type:["string","null"]},testId:{type:["string","null"]}}}},required:["action","target"]}},paramSources:{type:"array",description:"Maps a step's argument back to a function parameter, when that argument IS the parameter",items:{type:"object",properties:{param:{type:"string"},path:{type:["string","null"],description:"For an 'object' param: which of its fields this fills (e.g. 'label'). Omit for a scalar param."},stepIndex:{type:"integer"},from:{type:"string",enum:["text","value","testId"]}},required:["param","stepIndex","from"]}}},required:["projectId","name","kind","module","params","steps"]}}],qe=[{name:"setup_piwi",description:"Set up the current Playwright project to report to this Piwi Dashboard: install the reporter, wrap the config, add the capture fixtures, and verify a run lands. Server-aware — fills in this dashboard's URL, whether authentication is required, and the projects that already exist.",arguments:[{name:"projectName",description:"Name to report runs under. Omit to reuse an existing project or derive one from the repository.",required:!1}]}];function Pe(M){return new URL(globalThis.location.href)}const Re={class:"max-w-3xl mx-auto p-6 space-y-6"},Ae={key:0,class:"mb-4 space-y-3 rounded-md border border-default bg-elevated/50 p-3"},Te={class:"space-y-1"},De={class:"flex items-start gap-2"},Ue={class:"text-xs break-all flex-1"},Oe={class:"space-y-1"},$e={class:"flex items-start gap-2"},ze={class:"text-xs break-all flex-1"},Me={class:"text-sm text-gray-500 dark:text-gray-400 mb-4"},Le={class:"space-y-3"},Ne={class:"space-y-3"},Be={class:"space-y-3"},Ee={class:"space-y-3"},Fe={class:"space-y-3"},Ge={class:"text-xs text-gray-400"},He={class:"space-y-3"},We={class:"space-y-3"},Je={class:"flex flex-col gap-1.5"},Ve={class:"min-w-0"},Ye={class:"text-sm font-mono font-semibold text-foreground"},Ke={class:"text-xs text-gray-500 dark:text-gray-400 mt-0.5"},Xe={class:"flex flex-col gap-1.5"},Qe={class:"min-w-0"},Ze={class:"text-sm font-mono font-semibold text-foreground"},et={class:"text-xs text-gray-500 dark:text-gray-400 mt-0.5"},tt={key:0,class:"flex flex-wrap gap-1.5 mt-1.5"},st=["title"],rt={class:"space-y-3 text-sm text-gray-600 dark:text-gray-400"},ot={key:0},it={key:1},nt={key:2,class:"text-xs text-gray-400"},at={key:3,class:"text-xs text-gray-400"},ct={class:"space-y-2"},pt={class:"flex items-center gap-2"},dt={class:"flex-1 px-3 py-2 bg-muted rounded-md text-sm font-mono break-all"},lt={class:"text-xs text-gray-400"},ut="pd_YOUR_API_KEY",Pt=B({__name:"mcp",async setup(M){let v,C;const S=pe(),j=S.public.demoMode,f=me(),{copy:A}=ge(),{data:y}=([v,C]=ae(()=>fe("/api/desktop/reporter-config",{immediate:f,default:()=>null},"$vt7OJTNW5l")),v=await v,C(),v),u=x(()=>y.value?.token??ut),q=Pe(),n=x(()=>`${y.value?.url??S.public.siteUrl??q.origin}/mcp`);ce({title:"MCP server — Piwi Dashboard"});const p=Se,h=qe,k=[{label:"Claude Code",slot:"claude-code"},{label:"Opencode",slot:"opencode"},{label:"Cursor",slot:"cursor"},{label:"VS Code",slot:"vscode"},{label:"Claude Desktop",slot:"claude-desktop"},{label:"Gemini CLI",slot:"gemini"},{label:"Windsurf / Continue",slot:"windsurf"}],b=x(()=>`claude mcp add --transport http piwi ${n.value} \\
6
- --header "Authorization: Bearer ${u.value}"`),$=x(()=>JSON.stringify({mcp:{piwi:{type:"remote",url:n.value,headers:{Authorization:`Bearer ${u.value}`}}}},null,2)),i=x(()=>JSON.stringify({mcpServers:{piwi:{url:n.value,headers:{Authorization:`Bearer ${u.value}`}}}},null,2)),P=x(()=>JSON.stringify({servers:{piwi:{type:"http",url:n.value,headers:{Authorization:`Bearer ${u.value}`}}}},null,2)),H=x(()=>JSON.stringify({mcpServers:{piwi:{command:"npx",args:["-y","mcp-remote",n.value,"--transport","http-only","--header","Authorization:${AUTH_HEADER}"],env:{AUTH_HEADER:`Bearer ${u.value}`}}}},null,2)),W=x(()=>`gemini mcp add --transport http piwi ${n.value} \\
7
- --header "Authorization: Bearer ${u.value}"`),J=x(()=>JSON.stringify({mcpServers:{piwi:{serverUrl:n.value,headers:{Authorization:`Bearer ${u.value}`}}}},null,2));return(V,e)=>{const Y=te,K=se,X=Ce,z=F,I=de,Q=le,R=G,L=E,Z=ee;return r(),w(Z,null,{header:d(()=>[c(Y,{title:"MCP server"})]),body:d(()=>[t("div",Re,[o(j)?(r(),w(K,{key:0,color:"info",icon:"i-lucide-bot",title:"Feature preview",description:"The MCP endpoint is not active in this demo — it requires a real Piwi backend. The tools and client setup shown below reflect what your own deployment exposes."})):g("",!0),c(X),c(R,{icon:"i-lucide-settings-2",title:"Client setup",help:"mcp.client-setup"},{default:d(()=>[o(y)?(r(),a("div",Ae,[t("div",Te,[e[2]||(e[2]=t("div",{class:"text-xs text-muted"},"MCP URL",-1)),t("div",De,[t("code",Ue,l(o(n)),1),c(z,{icon:"i-lucide-copy",color:"neutral",variant:"ghost",size:"xs","aria-label":"Copy MCP URL",onClick:e[0]||(e[0]=m=>o(A)(o(n),{toast:!0}))})])]),t("div",Oe,[e[3]||(e[3]=t("div",{class:"text-xs text-muted"},"Access token",-1)),t("div",$e,[t("code",ze,l(o(u)),1),c(z,{icon:"i-lucide-copy",color:"neutral",variant:"ghost",size:"xs","aria-label":"Copy access token",onClick:e[1]||(e[1]=m=>o(A)(o(u),{toast:!0}))})])]),e[4]||(e[4]=t("p",{class:"text-xs text-muted"},[s(" This app authenticates with a local access token even though sign-in is off — it is the "),t("code",{class:"font-mono"},"Bearer"),s(" value, already filled into the snippets below. ")],-1))])):g("",!0),t("p",Me,[o(y)?(r(),a(_,{key:0},[s("Pick your client below — the URL and access token above are already baked into each snippet.")],64)):(r(),a(_,{key:1},[e[5]||(e[5]=s("Replace ",-1)),e[6]||(e[6]=t("code",{class:"px-1 py-0.5 bg-muted rounded text-xs font-mono"},"pd_YOUR_API_KEY",-1)),e[7]||(e[7]=s(" with your actual API key. The MCP URL shown in the snippets is auto-detected from your current browser origin.",-1))],64))]),c(Q,{items:k,ui:{list:"mb-4"}},{"claude-code":d(()=>[t("div",Le,[e[8]||(e[8]=t("p",{class:"text-sm text-gray-600 dark:text-gray-400"}," Run once in any terminal. Claude Code stores the server in your global MCP config. ",-1)),c(I,{code:o(b),lang:"sh"},null,8,["code"]),e[9]||(e[9]=t("p",{class:"text-xs text-gray-400"},[s(" After adding, restart Claude Code and use "),t("code",{class:"font-mono"},"/mcp"),s(" to verify "),t("strong",null,"piwi"),s(" is connected. Claude will call the tools automatically when you ask about test results or failures. ")],-1))])]),opencode:d(()=>[t("div",Ne,[e[10]||(e[10]=t("p",{class:"text-sm text-gray-600 dark:text-gray-400"},[s(" Add to "),t("code",{class:"font-mono text-xs"},"~/.config/opencode/opencode.json"),s(" (global config): ")],-1)),c(I,{code:o($),lang:"json"},null,8,["code"]),e[11]||(e[11]=t("p",{class:"text-xs text-gray-400"}," Restart Opencode to pick up the new MCP server. Tools become available automatically in the next session. ",-1))])]),cursor:d(()=>[t("div",Be,[e[12]||(e[12]=t("p",{class:"text-sm text-gray-600 dark:text-gray-400"},[s(" Add to "),t("code",{class:"font-mono text-xs"},"~/.cursor/mcp.json"),s(" (global) or "),t("code",{class:"font-mono text-xs"},".cursor/mcp.json"),s(" in your project root: ")],-1)),c(I,{code:o(i),lang:"json"},null,8,["code"]),e[13]||(e[13]=t("p",{class:"text-xs text-gray-400"}," Restart Cursor, then enable the MCP server in Cursor Settings → MCP. ",-1))])]),vscode:d(()=>[t("div",Ee,[e[14]||(e[14]=t("p",{class:"text-sm text-gray-600 dark:text-gray-400"},[s(" Add to "),t("code",{class:"font-mono text-xs"},".vscode/mcp.json"),s(" in your workspace (VS Code Copilot agent mode, version 1.99+): ")],-1)),c(I,{code:o(P),lang:"json"},null,8,["code"]),e[15]||(e[15]=t("p",{class:"text-xs text-gray-400"}," The server appears in the Copilot chat agent drop-down once the file is saved. ",-1))])]),"claude-desktop":d(()=>[t("div",Fe,[e[24]||(e[24]=t("p",{class:"text-sm text-gray-600 dark:text-gray-400"},"Add to your Claude Desktop config file:",-1)),e[25]||(e[25]=t("ul",{class:"text-xs text-gray-400 space-y-0.5 mb-2"},[t("li",null,[t("strong",null,"macOS:"),t("code",{class:"font-mono"},"~/Library/Application Support/Claude/claude_desktop_config.json")]),t("li",null,[t("strong",null,"Windows:"),t("code",{class:"font-mono"},"%APPDATA%\\Claude\\claude_desktop_config.json")])],-1)),c(I,{code:o(H),lang:"json"},null,8,["code"]),t("p",Ge,[e[19]||(e[19]=s(" That file only accepts servers started as a local command — pasting a ",-1)),e[20]||(e[20]=t("code",{class:"font-mono"},"url",-1)),e[21]||(e[21]=s(" entry there makes Claude Desktop report it as invalid and ignore it. ",-1)),e[22]||(e[22]=t("code",{class:"font-mono"},"mcp-remote",-1)),e[23]||(e[23]=s(" (needs Node) bridges the HTTP endpoint to that shape. Restart Claude Desktop after saving. ",-1)),o(y)?(r(),a(_,{key:0},[e[16]||(e[16]=s("On this machine, ",-1)),e[17]||(e[17]=t("strong",null,"Connect",-1)),e[18]||(e[18]=s(" above does it without Node — it points Claude Desktop at this app's own bridge.",-1))],64)):g("",!0)])])]),gemini:d(()=>[t("div",He,[e[26]||(e[26]=t("p",{class:"text-sm text-gray-600 dark:text-gray-400"},"Run once to register the server with Gemini CLI:",-1)),c(I,{code:o(W),lang:"sh"},null,8,["code"]),e[27]||(e[27]=t("p",{class:"text-xs text-gray-400"}," Gemini CLI fetches the tool list on startup and makes them available in agent mode. ",-1))])]),windsurf:d(()=>[t("div",We,[e[28]||(e[28]=t("p",{class:"text-sm text-gray-600 dark:text-gray-400"},[s(" Add to your Windsurf or Continue MCP config. For Windsurf: "),t("code",{class:"font-mono text-xs"},"~/.codeium/windsurf/mcp_config.json"),s(". For Continue: "),t("code",{class:"font-mono text-xs"},"~/.continue/config.json"),s(" under "),t("code",{class:"font-mono text-xs"},"mcpServers"),s(". ")],-1)),c(I,{code:o(J),lang:"json"},null,8,["code"])])]),_:1})]),_:1}),c(R,{icon:"i-lucide-bot",title:"What it provides",help:"mcp.tools"},{default:d(()=>[t("div",Je,[(r(!0),a(_,null,O(o(p),m=>(r(),a("div",{key:m.name,class:"flex items-start gap-3 px-3 py-2.5 rounded-md bg-elevated/50 border border-default hover:bg-elevated transition-colors"},[c(L,{name:"i-lucide-wrench",class:"size-4 mt-0.5 shrink-0 text-primary"}),t("div",Ve,[t("p",Ye,l(m.name),1),t("p",Ke,l(m.description),1)])]))),128))])]),_:1}),c(R,{icon:"i-lucide-sparkles",title:"Prompts"},{default:d(()=>[e[29]||(e[29]=t("p",{class:"text-sm text-gray-500 dark:text-gray-400 mb-4"},[s(" Prompts are ready-made instructions your MCP client offers as a slash command — nothing to install. "),t("code",{class:"font-mono"},"setup_piwi"),s(" is "),t("strong",null,"server-aware"),s(": it fills in this instance's URL, whether authentication is required, and the projects that already exist, then hands your agent a ready-to-run setup for a Playwright project that is not yet reporting here. ")],-1)),t("div",Xe,[(r(!0),a(_,null,O(o(h),m=>(r(),a("div",{key:m.name,class:"flex items-start gap-3 px-3 py-2.5 rounded-md bg-elevated/50 border border-default hover:bg-elevated transition-colors"},[c(L,{name:"i-lucide-square-slash",class:"size-4 mt-0.5 shrink-0 text-primary"}),t("div",Qe,[t("p",Ze,l(m.name),1),t("p",et,l(m.description),1),m.arguments?.length?(r(),a("div",tt,[(r(!0),a(_,null,O(m.arguments,T=>(r(),a("code",{key:T.name,class:"px-1.5 py-0.5 rounded bg-muted text-[11px] font-mono",title:T.description},l(T.name)+l(T.required?"":"?"),9,st))),128))])):g("",!0)])]))),128))])]),_:1}),c(R,{icon:"i-lucide-key",title:"Authentication",help:"mcp.auth"},{default:d(()=>[t("div",rt,[e[34]||(e[34]=t("p",null,[s(" MCP requests are authenticated with the same API keys used by the REST API. API keys start with "),t("code",{class:"px-1 py-0.5 bg-muted rounded text-xs font-mono"},"pd_"),s(". ")],-1)),o(f)?(r(),a("p",it,[...e[31]||(e[31]=[s(" This app provides a local access token automatically — shown in ",-1),t("strong",null,"Client setup",-1),s(" above and already filled into every snippet, so there is nothing to replace. ",-1)])])):(r(),a("p",ot,[...e[30]||(e[30]=[s(" Generate a key in ",-1),t("strong",null,"Settings → Users → [your account] → API keys",-1),s(", then replace ",-1),t("code",{class:"px-1 py-0.5 bg-muted rounded text-xs font-mono"},"pd_YOUR_API_KEY",-1),s(" in the snippets above. ",-1)])])),o(f)?(r(),a("p",at,[...e[33]||(e[33]=[s(" This desktop app keeps sign-in off but still requires its own local access token on every request — it is the ",-1),t("code",{class:"font-mono"},"Bearer",-1),s(" value. The endpoint is not open. ",-1)])])):(r(),a("p",nt,[...e[32]||(e[32]=[s(" When authentication is disabled (",-1),t("code",{class:"font-mono"},"PIWI_AUTH_ENABLED",-1),s(" not set), any request is accepted without a key. ",-1)])]))])]),_:1}),c(R,{icon:"i-lucide-link",title:"Server URL"},{default:d(()=>[t("div",ct,[t("div",pt,[t("code",dt,l(o(n)),1),c(z,{icon:"i-lucide-external-link",size:"sm",color:"neutral",variant:"outline",title:"Open API docs",to:"/docs",external:!o(j)},{default:d(()=>[...e[35]||(e[35]=[s(" REST API docs ",-1)])]),_:1},8,["external"])]),t("p",lt,[e[42]||(e[42]=s(" This is your Piwi instance's MCP endpoint. It is also the server URL to paste into client configs above. ",-1)),o(f)?(r(),a(_,{key:0},[e[36]||(e[36]=s("This desktop app requires its local access token as the ",-1)),e[37]||(e[37]=t("code",{class:"font-mono"},"Bearer",-1)),e[38]||(e[38]=s(" value on every request.",-1))],64)):(r(),a(_,{key:1},[e[39]||(e[39]=s("The server requires a valid Bearer token (or no auth if ",-1)),e[40]||(e[40]=t("code",{class:"font-mono"},"PIWI_AUTH_ENABLED",-1)),e[41]||(e[41]=s(" is not set).",-1))],64))])])]),_:1})])]),_:1})}}});export{Pt as default};
5
+ The fields below map onto that guidance one-for-one, plus "module" and "urlPattern", which no amount of code-reading can infer — supply them from where the function actually lives and, optionally, which page it applies to. Requires reporter or administrator access.`,inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID from list_projects"},name:{type:"string",description:"Becomes the called method/function name — must be a valid JS identifier"},kind:{type:"string",enum:["page-object-method","helper","fixture"],description:'"page-object-method" for a class method acting on this.page; "helper" for a standalone function taking page as its first parameter; "fixture" only for Playwright fixture setup'},module:{type:"string",description:"Import specifier for where this function lives, e.g. './pages/CartPage'"},receiver:{type:["string","null"],description:"page-object-method only: instance variable name, e.g. cartPage (null for a helper/fixture)"},importName:{type:["string","null"],description:"page-object-method only: the class name to import, e.g. CartPage (null for a helper/fixture)"},params:{type:"array",description:"The function's own parameters, excluding the leading Playwright handle (page/locator/this). An options-bag parameter must be type 'object' with its property names in 'fields' — never flattened to a string.",items:{type:"object",properties:{name:{type:"string"},type:{type:"string",enum:["string","number","boolean","object"]},fields:{type:"array",items:{type:"string"},description:"For type 'object': the bag's property names, e.g. ['label', 'testId']"}},required:["name","type"]}},returnsPage:{type:"boolean",description:"True if the function returns/navigates to a new Page (default false)"},urlPattern:{type:["string","null"],description:'Optional glob (** crosses path segments, * does not, e.g. "**/cart") gating which page this applies to'},steps:{type:"array",description:"The ordered sequence of page interactions the function performs — at least one required",items:{type:"object",properties:{action:{type:"string",enum:["goto","click","fill","check","uncheck","selectOption","press","assertVisible"]},target:{type:"object",properties:{role:{type:["string","null"]},name:{type:["string","null"]},testId:{type:["string","null"]}}}},required:["action","target"]}},paramSources:{type:"array",description:"Maps a step's argument back to a function parameter, when that argument IS the parameter",items:{type:"object",properties:{param:{type:"string"},path:{type:["string","null"],description:"For an 'object' param: which of its fields this fills (e.g. 'label'). Omit for a scalar param."},stepIndex:{type:"integer"},from:{type:"string",enum:["text","value","testId"]}},required:["param","stepIndex","from"]}}},required:["projectId","name","kind","module","params","steps"]}}],qe=[{name:"setup_piwi",description:"Set up the current Playwright project to report to this Piwi Dashboard: install the reporter, wrap the config, add the capture fixtures, and verify a run lands. Server-aware — fills in this dashboard's URL, whether authentication is required, and the projects that already exist.",arguments:[{name:"projectName",description:"Name to report runs under. Omit to reuse an existing project or derive one from the repository.",required:!1}]}];function Pe(M){return new URL(globalThis.location.href)}const Re={class:"max-w-3xl mx-auto p-6 space-y-6"},Ae={key:0,class:"mb-4 space-y-3 rounded-md border border-default bg-elevated/50 p-3"},Te={class:"space-y-1"},De={class:"flex items-start gap-2"},Ue={class:"text-xs break-all flex-1"},Oe={class:"space-y-1"},ze={class:"flex items-start gap-2"},$e={class:"text-xs break-all flex-1"},Me={class:"text-sm text-gray-500 dark:text-gray-400 mb-4"},Le={class:"space-y-3"},Ne={class:"space-y-3"},Be={class:"space-y-3"},Ee={class:"space-y-3"},Fe={class:"space-y-3"},Ge={class:"text-xs text-gray-400"},He={class:"space-y-3"},We={class:"space-y-3"},Je={class:"flex flex-col gap-1.5"},Ve={class:"min-w-0"},Ye={class:"text-sm font-mono font-semibold text-foreground"},Ke={class:"text-xs text-gray-500 dark:text-gray-400 mt-0.5"},Xe={class:"flex flex-col gap-1.5"},Qe={class:"min-w-0"},Ze={class:"text-sm font-mono font-semibold text-foreground"},et={class:"text-xs text-gray-500 dark:text-gray-400 mt-0.5"},tt={key:0,class:"flex flex-wrap gap-1.5 mt-1.5"},st=["title"],rt={class:"space-y-3 text-sm text-gray-600 dark:text-gray-400"},ot={key:0},it={key:1},nt={key:2,class:"text-xs text-gray-400"},at={key:3,class:"text-xs text-gray-400"},ct={class:"space-y-2"},pt={class:"flex items-center gap-2"},dt={class:"flex-1 px-3 py-2 bg-muted rounded-md text-sm font-mono break-all"},lt={class:"text-xs text-gray-400"},ut="pd_YOUR_API_KEY",Pt=B({__name:"mcp",async setup(M){let v,C;const S=pe(),j=S.public.demoMode,f=me(),{copy:A}=ge(),{data:y}=([v,C]=ae(()=>fe("/api/desktop/reporter-config",{immediate:f,default:()=>null},"$vt7OJTNW5l")),v=await v,C(),v),u=x(()=>y.value?.token??ut),q=Pe(),n=x(()=>`${y.value?.url??S.public.siteUrl??q.origin}/mcp`);ce({title:"MCP server — Piwi Dashboard"});const p=Se,h=qe,k=[{label:"Claude Code",slot:"claude-code"},{label:"Opencode",slot:"opencode"},{label:"Cursor",slot:"cursor"},{label:"VS Code",slot:"vscode"},{label:"Claude Desktop",slot:"claude-desktop"},{label:"Gemini CLI",slot:"gemini"},{label:"Windsurf / Continue",slot:"windsurf"}],b=x(()=>`claude mcp add --transport http piwi ${n.value} \\
6
+ --header "Authorization: Bearer ${u.value}"`),z=x(()=>JSON.stringify({mcp:{piwi:{type:"remote",url:n.value,headers:{Authorization:`Bearer ${u.value}`}}}},null,2)),i=x(()=>JSON.stringify({mcpServers:{piwi:{url:n.value,headers:{Authorization:`Bearer ${u.value}`}}}},null,2)),P=x(()=>JSON.stringify({servers:{piwi:{type:"http",url:n.value,headers:{Authorization:`Bearer ${u.value}`}}}},null,2)),H=x(()=>JSON.stringify({mcpServers:{piwi:{command:"npx",args:["-y","mcp-remote",n.value,"--transport","http-only","--header","Authorization:${AUTH_HEADER}"],env:{AUTH_HEADER:`Bearer ${u.value}`}}}},null,2)),W=x(()=>`gemini mcp add --transport http piwi ${n.value} \\
7
+ --header "Authorization: Bearer ${u.value}"`),J=x(()=>JSON.stringify({mcpServers:{piwi:{serverUrl:n.value,headers:{Authorization:`Bearer ${u.value}`}}}},null,2));return(V,e)=>{const Y=te,K=se,X=Ce,$=F,I=de,Q=le,R=G,L=E,Z=ee;return r(),w(Z,null,{header:d(()=>[c(Y,{title:"MCP server"})]),body:d(()=>[t("div",Re,[o(j)?(r(),w(K,{key:0,color:"info",icon:"i-lucide-bot",title:"Feature preview",description:"The MCP endpoint is not active in this demo — it requires a real Piwi backend. The tools and client setup shown below reflect what your own deployment exposes."})):g("",!0),c(X),c(R,{icon:"i-lucide-settings-2",title:"Client setup",help:"mcp.client-setup"},{default:d(()=>[o(y)?(r(),a("div",Ae,[t("div",Te,[e[2]||(e[2]=t("div",{class:"text-xs text-muted"},"MCP URL",-1)),t("div",De,[t("code",Ue,l(o(n)),1),c($,{icon:"i-lucide-copy",color:"neutral",variant:"ghost",size:"xs","aria-label":"Copy MCP URL",onClick:e[0]||(e[0]=m=>o(A)(o(n),{toast:!0}))})])]),t("div",Oe,[e[3]||(e[3]=t("div",{class:"text-xs text-muted"},"Access token",-1)),t("div",ze,[t("code",$e,l(o(u)),1),c($,{icon:"i-lucide-copy",color:"neutral",variant:"ghost",size:"xs","aria-label":"Copy access token",onClick:e[1]||(e[1]=m=>o(A)(o(u),{toast:!0}))})])]),e[4]||(e[4]=t("p",{class:"text-xs text-muted"},[s(" This app authenticates with a local access token even though sign-in is off — it is the "),t("code",{class:"font-mono"},"Bearer"),s(" value, already filled into the snippets below. ")],-1))])):g("",!0),t("p",Me,[o(y)?(r(),a(_,{key:0},[s("Pick your client below — the URL and access token above are already baked into each snippet.")],64)):(r(),a(_,{key:1},[e[5]||(e[5]=s("Replace ",-1)),e[6]||(e[6]=t("code",{class:"px-1 py-0.5 bg-muted rounded text-xs font-mono"},"pd_YOUR_API_KEY",-1)),e[7]||(e[7]=s(" with your actual API key. The MCP URL shown in the snippets is auto-detected from your current browser origin.",-1))],64))]),c(Q,{items:k,ui:{list:"mb-4"}},{"claude-code":d(()=>[t("div",Le,[e[8]||(e[8]=t("p",{class:"text-sm text-gray-600 dark:text-gray-400"}," Run once in any terminal. Claude Code stores the server in your global MCP config. ",-1)),c(I,{code:o(b),lang:"sh"},null,8,["code"]),e[9]||(e[9]=t("p",{class:"text-xs text-gray-400"},[s(" After adding, restart Claude Code and use "),t("code",{class:"font-mono"},"/mcp"),s(" to verify "),t("strong",null,"piwi"),s(" is connected. Claude will call the tools automatically when you ask about test results or failures. ")],-1))])]),opencode:d(()=>[t("div",Ne,[e[10]||(e[10]=t("p",{class:"text-sm text-gray-600 dark:text-gray-400"},[s(" Add to "),t("code",{class:"font-mono text-xs"},"~/.config/opencode/opencode.json"),s(" (global config): ")],-1)),c(I,{code:o(z),lang:"json"},null,8,["code"]),e[11]||(e[11]=t("p",{class:"text-xs text-gray-400"}," Restart Opencode to pick up the new MCP server. Tools become available automatically in the next session. ",-1))])]),cursor:d(()=>[t("div",Be,[e[12]||(e[12]=t("p",{class:"text-sm text-gray-600 dark:text-gray-400"},[s(" Add to "),t("code",{class:"font-mono text-xs"},"~/.cursor/mcp.json"),s(" (global) or "),t("code",{class:"font-mono text-xs"},".cursor/mcp.json"),s(" in your project root: ")],-1)),c(I,{code:o(i),lang:"json"},null,8,["code"]),e[13]||(e[13]=t("p",{class:"text-xs text-gray-400"}," Restart Cursor, then enable the MCP server in Cursor Settings → MCP. ",-1))])]),vscode:d(()=>[t("div",Ee,[e[14]||(e[14]=t("p",{class:"text-sm text-gray-600 dark:text-gray-400"},[s(" Add to "),t("code",{class:"font-mono text-xs"},".vscode/mcp.json"),s(" in your workspace (VS Code Copilot agent mode, version 1.99+): ")],-1)),c(I,{code:o(P),lang:"json"},null,8,["code"]),e[15]||(e[15]=t("p",{class:"text-xs text-gray-400"}," The server appears in the Copilot chat agent drop-down once the file is saved. ",-1))])]),"claude-desktop":d(()=>[t("div",Fe,[e[24]||(e[24]=t("p",{class:"text-sm text-gray-600 dark:text-gray-400"},"Add to your Claude Desktop config file:",-1)),e[25]||(e[25]=t("ul",{class:"text-xs text-gray-400 space-y-0.5 mb-2"},[t("li",null,[t("strong",null,"macOS:"),t("code",{class:"font-mono"},"~/Library/Application Support/Claude/claude_desktop_config.json")]),t("li",null,[t("strong",null,"Windows:"),t("code",{class:"font-mono"},"%APPDATA%\\Claude\\claude_desktop_config.json")])],-1)),c(I,{code:o(H),lang:"json"},null,8,["code"]),t("p",Ge,[e[19]||(e[19]=s(" That file only accepts servers started as a local command — pasting a ",-1)),e[20]||(e[20]=t("code",{class:"font-mono"},"url",-1)),e[21]||(e[21]=s(" entry there makes Claude Desktop report it as invalid and ignore it. ",-1)),e[22]||(e[22]=t("code",{class:"font-mono"},"mcp-remote",-1)),e[23]||(e[23]=s(" (needs Node) bridges the HTTP endpoint to that shape. Restart Claude Desktop after saving. ",-1)),o(y)?(r(),a(_,{key:0},[e[16]||(e[16]=s("On this machine, ",-1)),e[17]||(e[17]=t("strong",null,"Connect",-1)),e[18]||(e[18]=s(" above does it without Node — it points Claude Desktop at this app's own bridge.",-1))],64)):g("",!0)])])]),gemini:d(()=>[t("div",He,[e[26]||(e[26]=t("p",{class:"text-sm text-gray-600 dark:text-gray-400"},"Run once to register the server with Gemini CLI:",-1)),c(I,{code:o(W),lang:"sh"},null,8,["code"]),e[27]||(e[27]=t("p",{class:"text-xs text-gray-400"}," Gemini CLI fetches the tool list on startup and makes them available in agent mode. ",-1))])]),windsurf:d(()=>[t("div",We,[e[28]||(e[28]=t("p",{class:"text-sm text-gray-600 dark:text-gray-400"},[s(" Add to your Windsurf or Continue MCP config. For Windsurf: "),t("code",{class:"font-mono text-xs"},"~/.codeium/windsurf/mcp_config.json"),s(". For Continue: "),t("code",{class:"font-mono text-xs"},"~/.continue/config.json"),s(" under "),t("code",{class:"font-mono text-xs"},"mcpServers"),s(". ")],-1)),c(I,{code:o(J),lang:"json"},null,8,["code"])])]),_:1})]),_:1}),c(R,{icon:"i-lucide-bot",title:"What it provides",help:"mcp.tools"},{default:d(()=>[t("div",Je,[(r(!0),a(_,null,O(o(p),m=>(r(),a("div",{key:m.name,class:"flex items-start gap-3 px-3 py-2.5 rounded-md bg-elevated/50 border border-default hover:bg-elevated transition-colors"},[c(L,{name:"i-lucide-wrench",class:"size-4 mt-0.5 shrink-0 text-primary"}),t("div",Ve,[t("p",Ye,l(m.name),1),t("p",Ke,l(m.description),1)])]))),128))])]),_:1}),c(R,{icon:"i-lucide-sparkles",title:"Prompts"},{default:d(()=>[e[29]||(e[29]=t("p",{class:"text-sm text-gray-500 dark:text-gray-400 mb-4"},[s(" Prompts are ready-made instructions your MCP client offers as a slash command — nothing to install. "),t("code",{class:"font-mono"},"setup_piwi"),s(" is "),t("strong",null,"server-aware"),s(": it fills in this instance's URL, whether authentication is required, and the projects that already exist, then hands your agent a ready-to-run setup for a Playwright project that is not yet reporting here. ")],-1)),t("div",Xe,[(r(!0),a(_,null,O(o(h),m=>(r(),a("div",{key:m.name,class:"flex items-start gap-3 px-3 py-2.5 rounded-md bg-elevated/50 border border-default hover:bg-elevated transition-colors"},[c(L,{name:"i-lucide-square-slash",class:"size-4 mt-0.5 shrink-0 text-primary"}),t("div",Qe,[t("p",Ze,l(m.name),1),t("p",et,l(m.description),1),m.arguments?.length?(r(),a("div",tt,[(r(!0),a(_,null,O(m.arguments,T=>(r(),a("code",{key:T.name,class:"px-1.5 py-0.5 rounded bg-muted text-[11px] font-mono",title:T.description},l(T.name)+l(T.required?"":"?"),9,st))),128))])):g("",!0)])]))),128))])]),_:1}),c(R,{icon:"i-lucide-key",title:"Authentication",help:"mcp.auth"},{default:d(()=>[t("div",rt,[e[34]||(e[34]=t("p",null,[s(" MCP requests are authenticated with the same API keys used by the REST API. API keys start with "),t("code",{class:"px-1 py-0.5 bg-muted rounded text-xs font-mono"},"pd_"),s(". ")],-1)),o(f)?(r(),a("p",it,[...e[31]||(e[31]=[s(" This app provides a local access token automatically — shown in ",-1),t("strong",null,"Client setup",-1),s(" above and already filled into every snippet, so there is nothing to replace. ",-1)])])):(r(),a("p",ot,[...e[30]||(e[30]=[s(" Generate a key in ",-1),t("strong",null,"Settings → Users → [your account] → API keys",-1),s(", then replace ",-1),t("code",{class:"px-1 py-0.5 bg-muted rounded text-xs font-mono"},"pd_YOUR_API_KEY",-1),s(" in the snippets above. ",-1)])])),o(f)?(r(),a("p",at,[...e[33]||(e[33]=[s(" This desktop app keeps sign-in off but still requires its own local access token on every request — it is the ",-1),t("code",{class:"font-mono"},"Bearer",-1),s(" value. The endpoint is not open. ",-1)])])):(r(),a("p",nt,[...e[32]||(e[32]=[s(" When authentication is disabled (",-1),t("code",{class:"font-mono"},"PIWI_AUTH_ENABLED",-1),s(" not set), any request is accepted without a key. ",-1)])]))])]),_:1}),c(R,{icon:"i-lucide-link",title:"Server URL"},{default:d(()=>[t("div",ct,[t("div",pt,[t("code",dt,l(o(n)),1),c($,{icon:"i-lucide-external-link",size:"sm",color:"neutral",variant:"outline",title:"Open API docs",to:"/docs",external:!o(j)},{default:d(()=>[...e[35]||(e[35]=[s(" REST API docs ",-1)])]),_:1},8,["external"])]),t("p",lt,[e[42]||(e[42]=s(" This is your Piwi instance's MCP endpoint. It is also the server URL to paste into client configs above. ",-1)),o(f)?(r(),a(_,{key:0},[e[36]||(e[36]=s("This desktop app requires its local access token as the ",-1)),e[37]||(e[37]=t("code",{class:"font-mono"},"Bearer",-1)),e[38]||(e[38]=s(" value on every request.",-1))],64)):(r(),a(_,{key:1},[e[39]||(e[39]=s("The server requires a valid Bearer token (or no auth if ",-1)),e[40]||(e[40]=t("code",{class:"font-mono"},"PIWI_AUTH_ENABLED",-1)),e[41]||(e[41]=s(" is not set).",-1))],64))])])]),_:1})])]),_:1})}}});export{Pt as default};
@@ -0,0 +1,2 @@
1
+ import{_ as ss}from"./D5Mhpp98.js";import{d as me,o as s,c as a,h as l,_ as ke,g as n,A as ns,e as w,K as at,f as i,k as _,t as o,b as e,z as oe,j as Ce,F as O,l as g,B as ot,q as vt,C as kt,ak as as,P as pt,x as Pe,al as gt,m as _e,H as Oe,E as lt,i as Y,v as I,r as W,L as Ne,R as we,D as Ue,n as Xe,I as Qe,a as de,am as xt,G as os,J as ls,u as Ke,w as Le,ah as is,ad as bt,p as rs,s as us}from"./BzBaMPgu.js";import{_ as wt}from"./BSKLNgre.js";import{_ as cs}from"./Ds8_6Fzl.js";import{_ as ds}from"./BC5bqlfM.js";import{_ as ms,a as fs}from"./CdLqOMvN.js";import{_ as ps,a as gs,b as xs,c as ys}from"./iUf7K_JR.js";import{_ as hs}from"./CVEk4D8I.js";import{_ as We}from"./Ch8sGLqE.js";import{_ as Ie}from"./qeqzb80l.js";import{_ as _t}from"./BYnqoVCE.js";import{_ as vs}from"./DH_LEqhd.js";import{_ as ks}from"./B-onBCAB.js";import{z as $t,n as Ct,p as Tt,f as it,u as bs,h as Rt,m as ws,A as tt,B as st,k as De,C as zt,j as nt,b as _s,c as $s,i as ue}from"./CdM2qNYM.js";import{f as Ge}from"./D-c8ZSws.js";import{_ as Cs}from"./DLwuL-qR.js";import{_ as rt}from"./kDEwM7SQ.js";import{_ as Ts}from"./RSS6R9Te.js";import{b as St}from"./7vRR5W2L.js";import{a as ut,u as Ee}from"./CDEmotIt.js";import{_ as Rs}from"./CnRNwiuE.js";import{_ as It}from"./6DSY_93j.js";import{_ as zs}from"./Bw4oIhct.js";import{_ as Ft}from"./BMfTUMYy.js";import{_ as Ss}from"./BraJd4EA.js";import{_ as Pt}from"./OanUGF_v.js";import{u as Is}from"./DkGXOZRW.js";import{_ as Fs}from"./DUtYU4Sb.js";import{_ as jt}from"./Hp-_W7z4.js";import{_ as Dt}from"./B77w1Eib.js";import{_ as Ps}from"./D_j436ND.js";import{_ as ct}from"./CBQXv4bU.js";import{_ as Nt}from"./5nOoVJzL.js";import{_ as js}from"./Cvw4EFTy.js";import{_ as Bt}from"./BbXvpkBp.js";import{_ as Ds}from"./BUYmGTVP.js";import{_ as Ns}from"./BvXrhZ8k.js";import{_ as Bs}from"./Db5xe__T.js";import{u as Ms}from"./DnV-BkUA.js";import{_ as As}from"./mhvG7mu8.js";import{u as Us,s as Ls}from"./BLqooxh5.js";import"./DWz_bHNP.js";import"./Dq6_-84R.js";import"./BPQNVV4M.js";import"./BcHU1KNK.js";import"./D7W_4Sqc.js";import"./BFVrl1ss.js";import"./Bg8yOdSf.js";import"./CTYlay1H.js";import"./C8uZoJVq.js";import"./DDho3MJD.js";import"./WCZdf9Ln.js";import"./Boyv6hLW.js";import"./Cmuwgbf4.js";import"./vOZZ2cLi.js";import"./Die1200X.js";import"./DcUBmKKE.js";import"./BTCWUyBX.js";import"./BOrnSpTA.js";import"./zAFiz2Mg.js";import"./DWl73MJR.js";const Es={key:0,class:"inline-flex items-center gap-2 text-info"},Os={type:"button",class:"inline-flex items-center gap-1.5 rounded-md px-1.5 py-0.5 -my-0.5 -ml-1.5 text-muted hover:text-default hover:bg-elevated/60 transition-colors cursor-pointer",title:"Stored reports & artifacts"},Ks={class:"tabular-nums whitespace-nowrap"},Ws={class:"text-dimmed"},Hs={class:"p-3 w-72 space-y-2"},Vs={class:"text-xs font-medium text-muted inline-flex items-center gap-1"},Gs={class:"text-xs tabular-nums text-dimmed shrink-0"},Xs={key:0,class:"flex items-center justify-between gap-2 text-sm border-t border-default pt-2"},qs={class:"truncate"},Ys={class:"text-xs tabular-nums text-dimmed shrink-0"},Js=me({__name:"RunStorageChip",props:{storageStats:{},reports:{},finalizing:{type:Boolean}},setup(t){const y=ot();return(v,z)=>{const T=ke,m=ns,R=Ie,u=Ce,h=at;return t.finalizing?(s(),a("div",Es,[l(T,{name:"i-lucide-upload",class:"size-3.5 shrink-0 animate-pulse"}),z[0]||(z[0]=n("span",{class:"text-xs font-medium whitespace-nowrap"},"Uploading reports & traces…",-1)),l(m,{value:null,size:"sm",color:"info",class:"w-24 rounded-full animate-pulse"})])):t.storageStats?.totalFiles?(s(),w(h,{key:1},{content:i(()=>[n("div",Hs,[n("p",Vs,[z[1]||(z[1]=_(" Stored artifacts ",-1)),l(R,{topic:"run.reports"})]),(s(!0),a(O,null,oe(t.reports,N=>(s(),a("div",{key:`${N.type}-${N.path}`,class:"flex items-center justify-between gap-2 min-w-0"},[l(u,{href:("fileApiUrl"in v?v.fileApiUrl:e(Ct))(N.path,null,e(y).app?.baseURL),icon:("reportIcon"in v?v.reportIcon:e($t))(N.type),target:"_blank",size:"xs",variant:"outline",class:"min-w-0",ui:{label:"truncate"}},{default:i(()=>[_(o(N.label),1)]),_:2},1032,["href","icon"]),n("span",Gs,o(("formatBytes"in v?v.formatBytes:e(Ge))(N.size)),1)]))),128)),t.storageStats.testCaseFilesCount>0?(s(),a("div",Xs,[n("span",qs,"Test files ("+o(t.storageStats.testCaseFilesCount)+")",1),n("span",Ys,o(("formatBytes"in v?v.formatBytes:e(Ge))(t.storageStats.testCaseFilesSize)),1)])):g("",!0)])]),default:i(()=>[n("button",Os,[l(T,{name:"i-lucide-database",class:"size-3.5 text-dimmed shrink-0"}),n("span",Ks,[_(o(("formatBytes"in v?v.formatBytes:e(Ge))(t.storageStats.totalSize))+" ",1),n("span",Ws,"· "+o(t.storageStats.totalFiles)+" file"+o(t.storageStats.totalFiles===1?"":"s"),1)]),l(T,{name:"i-lucide-chevron-down",class:"size-3 text-dimmed shrink-0"})])]),_:1})):g("",!0)}}}),Zs=Object.assign(Js,{__name:"RunStorageChip"}),Qs={class:"flex items-center gap-3 flex-1 min-w-0 justify-between"},en={class:"flex items-center gap-3 min-w-0"},tn={class:"text-sm font-semibold truncate flex items-center gap-1"},sn={class:"flex items-center gap-3 shrink-0 max-sm:hidden"},nn={class:"text-xs text-zinc-500 tabular-nums whitespace-nowrap"},an={class:"text-zinc-700 dark:text-zinc-300"},on={class:"text-xs text-emerald-600 dark:text-emerald-400 tabular-nums whitespace-nowrap"},ln={class:"text-xs text-rose-600 dark:text-rose-400 tabular-nums whitespace-nowrap"},rn={class:"text-xs text-zinc-500 tabular-nums whitespace-nowrap"},un={class:"text-xs text-amber-600 dark:text-amber-400 tabular-nums whitespace-nowrap",title:"Tests that never ran (maxFailures cutoff or a serial-group failure)"},cn={class:"text-xs text-orange-600 dark:text-orange-400 tabular-nums whitespace-nowrap"},dn={class:"@container"},mn={class:"space-y-3"},fn={class:"flex items-start justify-between gap-x-3 gap-y-2 flex-wrap pr-8"},pn={class:"min-w-0 flex-1 basis-64"},gn={class:"flex items-center gap-2 flex-wrap"},xn={class:"text-base font-bold shrink-0 flex items-center gap-1"},yn={class:"mt-1 text-xs text-muted flex items-center gap-1.5 flex-wrap"},hn={class:"text-dimmed"},vn={class:"flex items-center gap-1.5 shrink-0"},kn={class:"p-2 space-y-1 min-w-32"},bn=["onClick"],wn={class:"hidden @2xl:inline"},_n={class:"text-xl font-bold mt-0.5"},$n={class:"relative"},Cn={class:"text-xl font-bold mt-0.5 text-emerald-600 dark:text-emerald-400"},Tn={class:"text-xl font-bold mt-0.5 text-rose-600 dark:text-rose-400"},Rn={class:"text-xl font-bold mt-0.5 text-zinc-600 dark:text-zinc-400"},zn={class:"text-xl font-bold mt-0.5 text-amber-600 dark:text-amber-400"},Sn={key:0,class:"flex items-center gap-x-4 gap-y-1.5 flex-wrap"},In={class:"flex-1 basis-60 min-w-44 max-w-xl"},Fn={class:"flex items-center flex-wrap gap-x-3 gap-y-1 text-xs shrink-0"},Pn={class:"flex items-center gap-1"},jn={key:0,class:"flex items-center gap-1"},Dn={key:1,class:"flex items-center gap-1"},Nn={key:2,class:"flex items-center gap-1"},Bn={key:0,class:"rounded-full border border-default px-2 py-0.5 text-xs bg-elevated/60"},Mn={key:1},An=["href"],Un={key:1},Ln={class:"text-muted"},En={key:0,class:"font-medium"},On=["title"],Kn={key:2,class:"text-muted"},Wn=["title"],Hn={class:"text-muted whitespace-nowrap"},Vn={class:"text-muted"},Gn={key:0,class:"mt-2"},Xn={class:"bg-zinc-50 dark:bg-zinc-900 p-2.5 rounded text-xs font-mono overflow-x-auto max-h-48 overflow-y-auto"},qn={class:"m-0"},Yn=me({__name:"RunSummary",props:{testRun:{},displayProgress:{},allReports:{},showCustomData:{type:Boolean},finalizing:{type:Boolean},activeFilter:{},totalWastedTime:{}},emits:["update:showCustomData","filter-status","label-updated"],setup(t,{emit:y}){const v=t,z=y,T=vt(),m=ot(),R=I(()=>v.testRun?.storageStats),u=I(()=>v.testRun?.metadata?.ci),h=I(()=>v.testRun?.metadata?.scm),N=I(()=>v.testRun?.metadata?.tags),B=I(()=>v.testRun?.metadata?.customData),P=I(()=>!!(u.value||v.testRun?.environment)),F=I(()=>!!(v.testRun?.playwrightVersion||v.testRun?.reporterVersion)),j=I(()=>!!(R.value?.totalFiles||v.finalizing)),K=I(()=>v.allReports[0]??null),{copy:U,copied:p}=ut(),S=W("file-line"),$=W(!1),c=W(!1);kt(()=>{c.value=!!as()});const f=I(()=>v.testRun?.testCases?v.testRun.testCases.filter(r=>r.status==="failed"||r.status==="timedout").map(r=>({filePath:(r.filePath||r.location?.split(":")[0])??"",title:r.title,line:r.location&&parseInt(r.location.split(":")[1]??"",10)||null,projectName:r.browser?.projectName||null})):[]);function M(){return St(f.value,{mode:S.value})}async function C(){const r=M();r&&($.value=!0,await U(r,{toast:"Retry command copied"}),setTimeout(()=>{$.value=!1},2e3))}const L=I(()=>$.value?"Copied!":Rt(M()));function k(){const r=v.testRun;if(!r)return"";const d=r.status==="passed"?"✅":r.status==="failed"?"❌":r.status==="running"?"🔄":"⚠️",X=r.label?` — ${r.label}`:"",te=r.project?.label??r.project?.name??"",J=r.totalTests??0,b=r.passedTests??0,H=r.failedTests??0,ne=r.skippedTests??0,ee=r.didNotRunTests??0,xe=r.flakyTests??0,be=bs(r.duration),ae=xe>0?` · ${xe} flaky`:"",he=ee>0?` · ${ee} didn't run`:"";return[`*Run #${r.id}*${X}`,`Status: ${d} ${r.status} | Project: ${te}`,`Tests: ${J} total · ${b} passed · ${H} failed · ${ne} skipped${he}${ae}`,`Duration: ${be}`].join(`
2
+ `)}const G=W(""),Z=W(!1),se=W(!1);let Q=!1;const le=W(null);function E(){Q=!1,G.value=v.testRun?.label??"",Z.value=!0,Ne(()=>le.value?.focus())}async function D(){if(se.value)return;if(Q){Q=!1;return}const r=v.testRun;if(r){se.value=!0;try{await $fetch(`/api/test-runs/${r.id}`,{method:"PATCH",body:{label:G.value||null}}),Z.value=!1,z("label-updated")}catch(d){const X=d&&typeof d=="object"&&"data"in d?d.data?.message:"Failed to save label";T.add({title:"Error",description:X||"Failed to save label",color:"error"})}finally{se.value=!1}}}function ve(){Q=!0,Z.value=!1}function fe(r){r.key==="Enter"?D():r.key==="Escape"&&ve()}return(r,d)=>{const X=ps,te=ke,J=_e,b=hs,H=We,ne=Ie,ee=_t,xe=Oe,be=wt,ae=lt,he=Ce,Te=at,pe=vs,Re=ks,ge=xs,Se=Zs,x=Cs,$e=gs,Be=rt,Fe=Ts;return s(),w(Fe,{"storage-key":"test-run"},{folded:i(()=>[n("div",Qs,[n("div",en,[l(X,{status:t.testRun?.status??"",size:"sm"},null,8,["status"]),n("span",tn,[_(" Run #"+o(t.testRun?.id)+" ",1),e(Z)?(s(),a(O,{key:0},[pt(n("input",{ref_key:"labelInputRef",ref:le,"onUpdate:modelValue":d[0]||(d[0]=ie=>Pe(G)?G.value=ie:null),type:"text",placeholder:"Add a label...",class:"inline-block w-40 text-sm font-normal border-b border-dashed border-zinc-400 bg-transparent outline-none focus:border-primary px-0.5 py-0",onKeydown:fe,onBlur:D},null,544),[[gt,e(G)]]),e(se)?(s(),w(te,{key:0,name:"i-lucide-loader-circle",class:"size-3.5 text-zinc-400 animate-spin shrink-0"})):g("",!0)],64)):(s(),a(O,{key:1},[t.testRun?.label?(s(),a("span",{key:0,class:"font-normal text-zinc-500 ml-1.5 cursor-pointer hover:text-zinc-700 dark:hover:text-zinc-300 border-b border-dashed border-transparent hover:border-zinc-400",onClick:E},"— "+o(t.testRun.label),1)):(s(),a("button",{key:1,class:"text-xs text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 border-b border-dashed border-transparent hover:border-zinc-400 ml-1",title:"Add a label",onClick:E}," + label "))],64))]),t.testRun?.shardTotal&&t.testRun.shardTotal>1?(s(),w(J,{key:0,color:"neutral",variant:"soft",size:"sm",class:"shrink-0",title:`Shard ${t.testRun.shardsFinished??0}/${t.testRun.shardTotal}`},{default:i(()=>[l(te,{name:"i-lucide-layout-grid",class:"size-3 mr-1"}),_(" "+o(t.testRun.shardsFinished??0)+"/"+o(t.testRun.shardTotal),1)]),_:1},8,["title"])):g("",!0)]),n("div",sn,[n("span",nn,[d[12]||(d[12]=_(" T: ",-1)),n("strong",an,o(t.displayProgress?.totalTests??t.testRun?.totalTests??0),1)]),n("span",on,[d[13]||(d[13]=_(" P: ",-1)),n("strong",null,o(t.displayProgress?.passedTests??t.testRun?.passedTests??0),1)]),n("span",ln,[d[14]||(d[14]=_(" F: ",-1)),n("strong",null,o(t.displayProgress?.failedTests??t.testRun?.failedTests??0),1)]),n("span",rn,[d[15]||(d[15]=_(" S: ",-1)),n("strong",null,o(t.displayProgress?.skippedTests??t.testRun?.skippedTests??0),1)]),n("span",un,[d[16]||(d[16]=_(" DNR: ",-1)),n("strong",null,o(t.testRun?.didNotRunTests??0),1)]),n("span",cn,[d[17]||(d[17]=_(" Fl: ",-1)),n("strong",null,o(t.testRun?.flakyTests??0),1)]),l(b,{passed:t.displayProgress?.passedTests??t.testRun?.passedTests??0,failed:t.displayProgress?.failedTests??t.testRun?.failedTests??0,skipped:t.displayProgress?.skippedTests??t.testRun?.skippedTests??0,flaky:t.testRun?.flakyTests??0,"did-not-run":t.testRun?.didNotRunTests??0,total:t.displayProgress?.totalTests??t.testRun?.totalTests??0},null,8,["passed","failed","skipped","flaky","did-not-run","total"]),l(H,{ms:t.testRun?.duration,class:"text-xs text-zinc-400"},null,8,["ms"])])])]),default:i(()=>[n("div",dn,[l(Be,{class:"shadow-xs",ui:{footer:"px-4 py-2.5 sm:px-4 bg-muted/30"}},{footer:i(()=>[l($e,null,{default:i(()=>[e(P)?(s(),w(ge,{key:0,label:"CI & environment",icon:"i-lucide-cloud",help:"run.ci-env"},{default:i(()=>[t.testRun?.environment?(s(),a("span",Bn,o(t.testRun.environment),1)):g("",!0),e(u)?.provider?(s(),a("span",Mn,o(e(u).provider),1)):g("",!0),e(u)?.buildNumber||e(u)?.buildUrl?(s(),a(O,{key:2},[d[29]||(d[29]=n("span",{class:"text-dimmed"},"·",-1)),e(u)?.buildUrl?(s(),a("a",{key:0,href:e(u).buildUrl,target:"_blank",class:"text-primary hover:underline"},o(e(u)?.buildNumber?`Build #${e(u).buildNumber}`:"View build"),9,An)):(s(),a("span",Un,"Build #"+o(e(u).buildNumber),1))],64)):g("",!0),e(u)?.workflow||e(u)?.jobName?(s(),a(O,{key:3},[d[30]||(d[30]=n("span",{class:"text-dimmed"},"·",-1)),n("span",Ln,[e(u)?.workflow?(s(),a(O,{key:0},[_(o(e(u).workflow),1)],64)):g("",!0),e(u)?.workflow&&e(u)?.jobName?(s(),a(O,{key:1},[_(" · ")],64)):g("",!0),e(u)?.jobName?(s(),a(O,{key:2},[_(o(e(u).jobName),1)],64)):g("",!0)])],64)):g("",!0)]),_:1})):g("",!0),e(h)?(s(),w(ge,{key:1,label:"Source",icon:"i-lucide-git-branch"},{default:i(()=>[e(h).branch?(s(),a("span",En,o(e(h).branch),1)):g("",!0),e(h).commit?(s(),a("code",{key:1,class:"text-xs font-mono bg-zinc-100 dark:bg-zinc-800 px-1 py-0.5 rounded",title:e(h).commit},o(e(h).commit.length>=8?e(h).commit.substring(0,8):e(h).commit),9,On)):g("",!0),e(h).author?(s(),a("span",Kn,o(e(h).author),1)):g("",!0),e(h).commitMessage?(s(),a("span",{key:3,class:"text-xs text-dimmed truncate max-w-[40ch]",title:e(h).commitMessage},o(e(h).commitMessage),9,Wn)):g("",!0)]),_:1})):g("",!0),e(F)?(s(),w(ge,{key:2,label:"Tooling versions",icon:"i-lucide-tag"},{default:i(()=>[n("span",Hn,[t.testRun?.playwrightVersion?(s(),a(O,{key:0},[_("Playwright v"+o(t.testRun.playwrightVersion),1)],64)):g("",!0),t.testRun?.playwrightVersion&&t.testRun?.reporterVersion?(s(),a(O,{key:1},[_(" · ")],64)):g("",!0),t.testRun?.reporterVersion?(s(),a(O,{key:2},[_("Piwi v"+o(t.testRun.reporterVersion),1)],64)):g("",!0)])]),_:1})):g("",!0),e(N)?.length?(s(),w(ge,{key:3,label:"Tags",icon:"i-lucide-tags"},{default:i(()=>[(s(!0),a(O,null,oe(e(N),ie=>(s(),w(J,{key:ie,color:"neutral",variant:"soft",size:"sm"},{default:i(()=>[_(o(ie),1)]),_:2},1024))),128))]),_:1})):g("",!0),t.testRun?.metadata?.relatedIssue?(s(),w(ge,{key:4,label:"Related issue",icon:"i-lucide-bookmark"},{default:i(()=>[n("span",Vn,o(t.testRun.metadata.relatedIssue),1)]),_:1})):g("",!0),e(j)?(s(),w(ge,{key:5,label:"Storage"},{default:i(()=>[l(Se,{"storage-stats":e(R),reports:t.allReports,finalizing:t.finalizing},null,8,["storage-stats","reports","finalizing"])]),_:1})):g("",!0),l(ge,{label:"Links",icon:"i-lucide-link",help:"run.metadata"},{default:i(()=>[l(x,{"entity-type":"test_run","entity-id":t.testRun.id,links:t.testRun.links??null,onUpdated:d[10]||(d[10]=ie=>r.$emit("label-updated"))},null,8,["entity-id","links"])]),_:1}),e(B)?(s(),w(ge,{key:6,label:"Custom data"},{default:i(()=>[l(he,{size:"xs",variant:"ghost",color:"neutral",icon:t.showCustomData?"i-lucide-chevron-up":"i-lucide-chevron-down",onClick:d[11]||(d[11]=ie=>z("update:showCustomData",!t.showCustomData))},{default:i(()=>[...d[31]||(d[31]=[_(" Custom data ",-1)])]),_:1},8,["icon"])]),_:1})):g("",!0)]),_:1}),t.showCustomData&&e(B)?(s(),a("div",Gn,[n("div",Xn,[n("pre",qn,o(JSON.stringify(e(B),null,2)),1)])])):g("",!0)]),default:i(()=>[n("div",mn,[n("div",fn,[n("div",pn,[n("div",gn,[l(X,{status:t.testRun?.status??""},null,8,["status"]),n("h2",xn,[_(" Run #"+o(t.testRun?.id)+" ",1),e(Z)?(s(),a(O,{key:0},[pt(n("input",{ref_key:"labelInputRef",ref:le,"onUpdate:modelValue":d[1]||(d[1]=ie=>Pe(G)?G.value=ie:null),type:"text",placeholder:"Add a label...",class:"inline-block w-48 text-sm font-normal border-b border-dashed border-zinc-400 bg-transparent outline-none focus:border-primary px-0.5 py-0",onKeydown:fe,onBlur:D},null,544),[[gt,e(G)]]),e(se)?(s(),w(te,{key:0,name:"i-lucide-loader-circle",class:"size-3.5 text-zinc-400 animate-spin shrink-0"})):g("",!0)],64)):(s(),a(O,{key:1},[t.testRun?.label?(s(),a("span",{key:0,class:"font-normal text-zinc-500 ml-1.5 cursor-pointer hover:text-zinc-700 dark:hover:text-zinc-300 border-b border-dashed border-transparent hover:border-zinc-400",onClick:E},"— "+o(t.testRun.label),1)):(s(),a("button",{key:1,class:"text-xs text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 border-b border-dashed border-transparent hover:border-zinc-400 ml-1.5",title:"Add a label",onClick:E}," + label "))],64)),l(ne,{topic:"run.summary"})]),t.testRun?.shardTotal&&t.testRun.shardTotal>1?(s(),w(J,{key:0,color:"neutral",variant:"soft",size:"sm",class:"shrink-0",title:`Shard ${t.testRun.shardsFinished??0}/${t.testRun.shardTotal}`},{default:i(()=>[l(te,{name:"i-lucide-layout-grid",class:"size-3 mr-1"}),_(" "+o(t.testRun.shardsFinished??0)+"/"+o(t.testRun.shardTotal),1)]),_:1},8,["title"])):g("",!0),t.testRun?.precedingMarker?(s(),w(be,{key:1,text:`This run started after: ${t.testRun.precedingMarker.label}`},{default:i(()=>[l(xe,{to:`/projects/${t.testRun.projectId}?tab=timeline`,class:"shrink-0 inline-flex items-center gap-1"},{default:i(()=>[d[18]||(d[18]=n("span",{class:"text-xs text-muted"},"After",-1)),l(ee,{marker:t.testRun.precedingMarker,size:"xs"},null,8,["marker"])]),_:1},8,["to"])]),_:1},8,["text"])):g("",!0)]),n("p",yn,[n("span",null,"Started "+o(("prettyDateFormat"in r?r.prettyDateFormat:e(Tt))(t.testRun?.startTime)),1),l(ae,null,{default:i(()=>[n("span",hn,"· "+o(("formatRelativeTime"in r?r.formatRelativeTime:e(it))(t.testRun?.startTime)),1)]),_:1})])]),n("div",vn,[l(be,{text:e(p)?"Copied!":"Copy run summary"},{default:i(()=>[l(he,{size:"xs",variant:"ghost",color:"neutral",icon:e(p)?"i-lucide-check":"i-lucide-clipboard","aria-label":"Copy run summary",class:"text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300",onClick:d[2]||(d[2]=ie=>e(U)(k(),{toast:"Run summary copied"}))},null,8,["icon"])]),_:1},8,["text"]),e(f).length>0&&!e(c)?(s(),w(Te,{key:0},{content:i(()=>[n("div",kn,[d[20]||(d[20]=n("p",{class:"text-xs font-medium text-zinc-500 px-2 py-1"},"Mode",-1)),(s(),a(O,null,oe(["file-line","grep","file"],ie=>n("button",{key:ie,class:Y(["w-full text-left px-2 py-1 text-sm rounded hover:bg-zinc-100 dark:hover:bg-zinc-800",e(S)===ie?"bg-primary/10 text-primary":""]),onClick:dt=>S.value=ie},o(ie==="file-line"?"File:line":ie==="grep"?"Title (grep)":"File only"),11,bn)),64))])]),default:i(()=>[l(he,{size:"xs",color:"warning",variant:"subtle",icon:e($)?"i-lucide-check":"i-lucide-play",title:e(L),"aria-label":"Retry",onClick:d[3]||(d[3]=ie=>C())},{default:i(()=>[...d[19]||(d[19]=[n("span",{class:"hidden @2xl:inline"},"Retry",-1)])]),_:1},8,["icon","title"])]),_:1})):g("",!0),e(f).length>0?(s(),w(pe,{key:1,"project-id":t.testRun?.project?.id,"project-label":t.testRun?.project?.label??t.testRun?.project?.name,cases:e(f)},null,8,["project-id","project-label","cases"])):g("",!0),e(K)?(s(),w(he,{key:2,href:("fileApiUrl"in r?r.fileApiUrl:e(Ct))(e(K).path,null,e(m).app?.baseURL),icon:("reportIcon"in r?r.reportIcon:e($t))(e(K).type),target:"_blank",size:"xs",color:"primary",variant:"outline","aria-label":e(K).label,title:e(K).size?`${e(K).label} · ${("formatBytes"in r?r.formatBytes:e(Ge))(e(K).size)}`:e(K).label},{default:i(()=>[n("span",wn,o(e(K).label),1)]),_:1},8,["href","icon","aria-label","title"])):g("",!0)])]),l(Re,{"min-tile-width":"7.5rem"},{default:i(()=>[n("button",{class:Y(["rounded-lg p-3 text-left w-full transition-colors cursor-pointer",t.activeFilter==="all"?"bg-accented ring-2 ring-zinc-400 dark:ring-zinc-500":"bg-elevated/60 hover:bg-elevated"]),onClick:d[4]||(d[4]=ie=>z("filter-status","all"))},[d[21]||(d[21]=n("p",{class:"text-xs font-medium text-zinc-500 uppercase tracking-wider"},"Total",-1)),n("p",_n,o(t.displayProgress?.totalTests??t.testRun?.totalTests??0),1)],2),n("div",$n,[n("button",{class:Y(["rounded-lg p-3 text-left w-full h-full transition-colors cursor-pointer",t.activeFilter==="passed"?"bg-emerald-100 dark:bg-emerald-900/30 ring-2 ring-emerald-400 dark:ring-emerald-600":"bg-emerald-50 dark:bg-emerald-900/20 hover:bg-emerald-100 dark:hover:bg-emerald-900/30"]),onClick:d[5]||(d[5]=ie=>z("filter-status","passed"))},[d[22]||(d[22]=n("p",{class:"text-xs font-medium text-emerald-700 dark:text-emerald-400 uppercase tracking-wider"}," Passed ",-1)),n("p",Cn,o(t.displayProgress?.passedTests??t.testRun?.passedTests??0),1)],2),(t.testRun?.flakyTests??0)>0?(s(),a("button",{key:0,class:Y(["absolute top-1.5 right-1.5 inline-flex items-center gap-0.5 rounded-full px-1.5 py-0.5 text-xs font-semibold leading-none tabular-nums transition-colors cursor-pointer",t.activeFilter==="flaky"?"bg-orange-200 dark:bg-orange-800/60 text-orange-800 dark:text-orange-200 ring-2 ring-orange-400 dark:ring-orange-600":"bg-orange-100 dark:bg-orange-900/40 text-orange-700 dark:text-orange-300 hover:bg-orange-200 dark:hover:bg-orange-800/60"]),title:"Flaky — passed only after a retry (a subset of passed). Click to filter.",onClick:d[6]||(d[6]=ie=>z("filter-status","flaky"))},[l(te,{name:"i-lucide-shuffle",class:"size-3"}),_(" "+o(t.testRun?.flakyTests??0),1)],2)):g("",!0)]),n("button",{class:Y(["rounded-lg p-3 text-left w-full transition-colors cursor-pointer",t.activeFilter==="failed"?"bg-rose-100 dark:bg-rose-900/30 ring-2 ring-rose-400 dark:ring-rose-600":"bg-rose-50 dark:bg-rose-900/20 hover:bg-rose-100 dark:hover:bg-rose-900/30"]),onClick:d[7]||(d[7]=ie=>z("filter-status","failed"))},[d[23]||(d[23]=n("p",{class:"text-xs font-medium text-rose-700 dark:text-rose-400 uppercase tracking-wider"},"Failed",-1)),n("p",Tn,o(t.displayProgress?.failedTests??t.testRun?.failedTests??0),1)],2),n("button",{class:Y(["rounded-lg p-3 text-left w-full transition-colors cursor-pointer",t.activeFilter==="skipped"?"bg-accented ring-2 ring-zinc-400 dark:ring-zinc-500":"bg-elevated/60 hover:bg-elevated"]),onClick:d[8]||(d[8]=ie=>z("filter-status","skipped"))},[d[24]||(d[24]=n("p",{class:"text-xs font-medium text-zinc-500 uppercase tracking-wider"},"Skipped",-1)),n("p",Rn,o(t.displayProgress?.skippedTests??t.testRun?.skippedTests??0),1)],2),n("button",{class:Y(["rounded-lg p-3 text-left w-full transition-colors cursor-pointer",t.activeFilter==="didnotrun"?"bg-amber-100 dark:bg-amber-900/30 ring-2 ring-amber-400 dark:ring-amber-600":"bg-amber-50 dark:bg-amber-900/20 hover:bg-amber-100 dark:hover:bg-amber-900/30"]),title:"Tests that never ran (maxFailures cutoff or a serial-group failure)",onClick:d[9]||(d[9]=ie=>z("filter-status","didnotrun"))},[d[25]||(d[25]=n("p",{class:"text-xs font-medium text-amber-700 dark:text-amber-400 uppercase tracking-wider"},"Didn't run",-1)),n("p",zn,o(t.testRun?.didNotRunTests??0),1)],2)]),_:1}),t.testRun?(s(),a("div",Sn,[n("div",In,[l(b,{passed:t.displayProgress?.passedTests??t.testRun?.passedTests??0,failed:t.displayProgress?.failedTests??t.testRun?.failedTests??0,skipped:t.displayProgress?.skippedTests??t.testRun?.skippedTests??0,flaky:t.testRun?.flakyTests??0,"did-not-run":t.testRun?.didNotRunTests??0,total:t.displayProgress?.totalTests??t.testRun?.totalTests??0},null,8,["passed","failed","skipped","flaky","did-not-run","total"])]),n("div",Fn,[n("div",Pn,[l(te,{name:"i-lucide-clock",class:"size-3.5 text-zinc-400"}),l(H,{ms:t.testRun?.duration,class:"font-medium"},null,8,["ms"])]),t.testRun?.avgTestDuration?(s(),a("div",jn,[l(te,{name:"i-lucide-gauge",class:"size-3.5 text-zinc-400"}),d[26]||(d[26]=n("span",{class:"text-zinc-500"},"Avg",-1)),l(H,{ms:t.testRun.avgTestDuration,class:"font-medium"},null,8,["ms"])])):g("",!0),t.testRun?.p90TestDuration?(s(),a("div",Dn,[l(te,{name:"i-lucide-arrow-up-right",class:"size-3.5 text-orange-500"}),d[27]||(d[27]=n("span",{class:"text-zinc-500"},"P90",-1)),l(H,{ms:t.testRun.p90TestDuration,class:"font-medium text-orange-600 dark:text-orange-400","unit-class":"opacity-60"},null,8,["ms"])])):g("",!0),t.totalWastedTime&&t.totalWastedTime>0?(s(),a("div",Nn,[l(te,{name:"i-lucide-clock",class:"size-3.5 text-amber-500"}),d[28]||(d[28]=n("span",{class:"text-zinc-500"},"Wasted",-1)),l(H,{ms:t.totalWastedTime,class:"font-medium text-amber-600 dark:text-amber-400","unit-class":"opacity-60"},null,8,["ms"])])):g("",!0)])])):g("",!0)])]),_:1})])]),_:1})}}}),Jn=Object.assign(Yn,{__name:"RunSummary"}),Zn={key:0,class:"inline-flex items-center gap-1 flex-wrap"},Qn=me({__name:"TestRowBadges",props:{mode:{default:null},isNewRegression:{type:[Boolean,null],default:!1},isNewFlaky:{type:[Boolean,null],default:!1},annotations:{default:null},tags:{default:null},meta:{default:null},maxTags:{default:0}},setup(t){const y=t;function v(h){return h==="fixme"||h==="slow"?"warning":h==="fail"?"error":h==="skip"?"neutral":h==="tag"?"primary":"info"}function z(h){switch(h){case"fixme":return"i-lucide-wrench";case"skip":return"i-lucide-skip-forward";case"slow":return"i-lucide-timer";case"fail":return"i-lucide-x-circle";case"tag":return"i-lucide-tag";default:return null}}function T(h){return h.type==="tag"?h.description??h.type:h.type}const m=I(()=>(y.annotations??[]).filter(h=>!ws(h.type))),R=I(()=>!!((y.tags?.length??0)>0||y.meta?.owner||y.meta?.priority||y.meta?.feature||y.meta?.link)),u=I(()=>y.mode==="parallel"||y.mode==="serial"||!!y.isNewRegression||!!y.isNewFlaky||m.value.length>0||R.value);return(h,N)=>{const B=_e,P=ke,F=Ss;return e(u)?(s(),a("div",Zn,[t.mode==="parallel"?(s(),w(B,{key:0,color:"success",variant:"soft",size:"xs",class:"shrink-0"},{default:i(()=>[...N[0]||(N[0]=[_("parallel",-1)])]),_:1})):g("",!0),t.mode==="serial"?(s(),w(B,{key:1,color:"warning",variant:"soft",size:"xs",class:"shrink-0"},{default:i(()=>[...N[1]||(N[1]=[_("serial",-1)])]),_:1})):g("",!0),t.isNewRegression?(s(),w(B,{key:2,color:"error",variant:"solid",size:"xs",class:"uppercase tracking-wider shrink-0",title:"First run in which this test failed"},{default:i(()=>[...N[2]||(N[2]=[_(" NEW ",-1)])]),_:1})):g("",!0),t.isNewFlaky?(s(),w(B,{key:3,color:"info",variant:"solid",size:"xs",class:"uppercase tracking-wider shrink-0",title:"First run in which this test was flaky"},{default:i(()=>[...N[3]||(N[3]=[_(" FLAKY ",-1)])]),_:1})):g("",!0),(s(!0),a(O,null,oe(e(m),j=>(s(),w(B,{key:`${j.type}:${j.description??""}`,color:v(j.type),variant:"soft",size:"xs",title:j.type!=="tag"?j.description??void 0:void 0,class:"shrink-0 gap-1"},{default:i(()=>[z(j.type)?(s(),w(P,{key:0,name:z(j.type),class:"size-2.5 shrink-0"},null,8,["name"])):g("",!0),_(" "+o(T(j)),1)]),_:2},1032,["color","title"]))),128)),l(F,{tags:t.tags,meta:t.meta,"max-tags":t.maxTags},null,8,["tags","meta","max-tags"])])):g("",!0)}}}),Mt=Object.assign(Qn,{__name:"TestRowBadges"}),ea={class:"rounded-lg border border-default bg-default text-sm flex flex-col flex-1 min-h-0"},ta={class:"flex items-center justify-end px-3 py-1.5 border-b border-default bg-elevated shrink-0"},sa=["disabled","title"],na={class:"overflow-y-auto flex-1 min-h-0"},aa=["onClick"],oa={key:1,class:"font-medium truncate min-w-0 text-muted"},la={class:"flex items-center gap-1.5 sm:gap-2 shrink-0 tabular-nums"},ia=["title"],ra={class:"max-sm:sr-only"},ua=["href","title","onClick"],ca={class:"truncate"},da={class:"flex items-center gap-1.5 sm:gap-2 shrink-0 ml-auto"},ma={key:0,class:"text-xs text-info"},fa={key:4,class:"inline-flex items-center gap-0.5 text-xs text-amber-600 dark:text-amber-400",title:"Wasted in fixed waits"},pa={key:0,class:"text-center py-8 text-muted"},ga=me({__name:"TestCasesTree",props:{testCases:{},suites:{},hasFilter:{type:Boolean},highlightedCaseId:{},projectKey:{},projectName:{}},setup(t){const y=t,v=I(()=>{const p=new Map;for(const S of y.suites)p.set(`${S.filePath}${S.suitePath.join("")}`,S);return p});function z(p){return p==="timedOut"||p==="timedout"?"failed":p}const T=["failed","passed","skipped","didnotrun","running"];function m(p){return T.filter(S=>p[S]>0).map(S=>({key:S,count:p[S],label:De(S)}))}function R(p){const S={passed:0,failed:0,skipped:0,didnotrun:0,running:0,total:0};for(const $ of p){const c=z($.status);c in S&&S[c]++,S.total++}return S}const u=W(new Set),h=I(()=>u.value.size===0);function N(p){return y.hasFilter?!0:!u.value.has(p)}function B(p){if(y.hasFilter)return;const S=new Set(u.value);S.has(p)?S.delete(p):S.add(p),u.value=S}function P(){const p=[],S=new Map;for(const $ of y.testCases){const c=$.filePath??"unknown";S.has(c)||S.set(c,[]),S.get(c).push($)}for(const[$,c]of S){p.push(`file:${$}`);const f=new Set;for(const M of c){const C=M.suitePath??[];for(let L=1;L<=C.length;L++)f.add(`group:${$}${C.slice(0,L).join("")}`)}for(const M of f)p.push(M)}return p}function F(){u.value=new Set(P())}function j(){u.value=new Set}function K(p,S,$,c,f){const M=S.filter(k=>(k.suitePath??[]).length===c.length),C=S.filter(k=>(k.suitePath??[]).length>c.length),L=new Map;for(const k of C){const G=(k.suitePath??[])[c.length];L.has(G)||L.set(G,[]),L.get(G).push(k)}for(const[k,G]of L){const Z=[...c,k],se=`group:${$}${Z.join("")}`,Q=v.value.get(`${$}${Z.join("")}`);p.push({kind:"group",depth:f,key:se,label:k,stats:R(G),mode:Q?.mode??"default",annotations:Q?.annotations??[]}),N(se)&&K(p,G,$,Z,f+1)}for(const k of M)p.push({kind:"test",depth:f,key:`test:${k.id}`,test:k})}const U=I(()=>{const p=[],S=new Map;for(const $ of y.testCases){const c=$.filePath??"unknown";S.has(c)||S.set(c,[]),S.get(c).push($)}for(const[$,c]of[...S.entries()].sort(([f],[M])=>f.localeCompare(M))){const f=`file:${$}`;p.push({kind:"group",depth:0,key:f,label:$,stats:R(c)}),N(f)&&K(p,c,$,[],1)}return p});return(p,S)=>{const $=ke,c=Ft,f=Mt,M=Pt,C=We,L=_e;return s(),a("div",ea,[n("div",ta,[n("button",{class:Y(["flex items-center gap-1 text-xs transition-colors",t.hasFilter?"text-muted cursor-not-allowed opacity-50":"text-muted hover:text-default"]),disabled:t.hasFilter,title:t.hasFilter?"Clear filters to collapse/expand":h.value?"Collapse all":"Expand all",onClick:S[0]||(S[0]=k=>h.value?F():j())},[l($,{name:h.value?"i-lucide-fold-vertical":"i-lucide-unfold-vertical",class:"size-3.5"},null,8,["name"]),_(" "+o(h.value?"Collapse all":"Expand all"),1)],10,sa)]),n("div",na,[(s(!0),a(O,null,oe(U.value,k=>(s(),a(O,{key:k.key},[k.kind==="group"?(s(),a("div",{key:0,class:Y(["flex items-center gap-2 py-2 pr-4 border-b border-default last:border-b-0 select-none sticky",[k.depth===0?"bg-elevated":"bg-default",!t.hasFilter&&"cursor-pointer"]]),style:we({paddingLeft:`${k.depth*20+12}px`,top:`${k.depth*36}px`,zIndex:20-k.depth}),onClick:G=>B(k.key)},[l($,{name:N(k.key)?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"size-3.5 text-muted shrink-0"},null,8,["name"]),l($,{name:k.depth===0?"i-lucide-file-code-2":"i-lucide-folder-open",class:Y(["size-4 shrink-0",k.depth===0?"text-blue-500":"text-amber-500"])},null,8,["name","class"]),k.depth===0?(s(),a("span",{key:0,class:"min-w-0",onClick:S[1]||(S[1]=Ue(()=>{},["stop"]))},[l(c,{"file-path":k.label,"project-key":t.projectKey,"project-name":t.projectName,class:"font-medium text-default"},null,8,["file-path","project-key","project-name"])])):(s(),a("span",oa,o(k.label),1)),k.depth>0?(s(),w(f,{key:2,mode:k.mode,annotations:k.annotations,class:"shrink-0"},null,8,["mode","annotations"])):g("",!0),S[2]||(S[2]=n("div",{class:"flex-1"},null,-1)),n("div",la,[(s(!0),a(O,null,oe(m(k.stats),G=>(s(),a("span",{key:G.key,class:Y(["text-xs inline-flex items-center gap-0.5",[("getStatusTextClass"in p?p.getStatusTextClass:e(tt))(G.key),G.key==="failed"?"font-medium":""]]),title:`${G.count} ${G.label}`},[l($,{name:("getStatusIcon"in p?p.getStatusIcon:e(st))(G.key),class:"size-3 shrink-0 sm:hidden"},null,8,["name"]),_(" "+o(G.count),1),n("span",ra,o(G.label),1)],10,ia))),128))])],14,aa)):(s(),a("div",{key:1,class:Y(["flex flex-wrap items-center gap-x-2 gap-y-1 pr-3 py-2 sm:py-1.5 border-b border-default last:border-b-0 hover:bg-zinc-50 dark:hover:bg-zinc-900/40 transition-colors",t.highlightedCaseId===k.test.id?"animate-pulse bg-yellow-100 dark:bg-yellow-900/30":""]),style:we({paddingLeft:`${k.depth*20+12}px`})},[l(M,{browser:k.test.browser,size:"sm"},null,8,["browser"]),l($,{name:("getStatusIcon"in p?p.getStatusIcon:e(st))(k.test.status),class:Y(["size-4 shrink-0",[("getStatusTextClass"in p?p.getStatusTextClass:e(tt))(k.test.status),("isStatusInFlight"in p?p.isStatusInFlight:e(zt))(k.test.status)?"animate-spin":""]]),role:"img","aria-label":`Status: ${("formatStatusLabel"in p?p.formatStatusLabel:e(De))(k.test.status)}`,title:("formatStatusLabel"in p?p.formatStatusLabel:e(De))(k.test.status)},null,8,["name","class","aria-label","title"]),n("a",{href:`/test-run-cases/${k.test.id}`,class:"text-highlighted hover:text-primary hover:underline min-w-32 self-stretch flex items-center",title:k.test.title,onClick:Ue(G=>("navigateTo"in p?p.navigateTo:e(Xe))(`/test-run-cases/${k.test.id}`),["prevent"])},[n("span",ca,o(k.test.title),1)],8,ua),l(f,{"is-new-regression":!!k.test.isNewRegression,"is-new-flaky":!!k.test.isNewFlaky,annotations:k.test.testAnnotations,tags:k.test.tags,meta:k.test.testMeta,"max-tags":3,class:"shrink-0"},null,8,["is-new-regression","is-new-flaky","annotations","tags","meta"]),n("div",da,[k.test.status==="running"?(s(),a("span",ma,"In progress...")):k.test.duration?(s(),w(C,{key:1,ms:k.test.duration,class:"text-xs text-muted"},null,8,["ms"])):g("",!0),k.test.workerIndex!=null?(s(),w(L,{key:2,color:"neutral",variant:"soft",size:"xs",class:"font-mono",title:`Worker ${k.test.workerIndex}`},{default:i(()=>[_(" w"+o(k.test.workerIndex),1)]),_:2},1032,["title"])):g("",!0),(k.test.retries??0)>0?(s(),w(L,{key:3,color:"warning",variant:"soft",size:"xs"},{default:i(()=>[_(o(k.test.retries)+"x ",1)]),_:2},1024)):g("",!0),k.test.wastedTimeMs?(s(),a("span",fa,[l($,{name:"i-lucide-hourglass",class:"size-3 shrink-0"}),l(C,{ms:k.test.wastedTimeMs,"unit-class":"opacity-60","no-title":""},null,8,["ms"])])):g("",!0)])],6))],64))),128)),U.value.length===0?(s(),a("div",pa,[l($,{name:"i-lucide-search-x",class:"size-6 mx-auto mb-2 text-zinc-300 dark:text-zinc-600"}),S[3]||(S[3]=n("p",{class:"text-sm"},"No test cases match your filters.",-1))])):g("",!0)])])}}}),xa=Object.assign(ga,{__name:"TestCasesTree"}),ya={class:"flex flex-col min-h-0"},ha={class:"flex items-center rounded-md border border-default overflow-hidden"},va={key:0,class:"text-sm text-zinc-500 tabular-nums inline-flex items-center gap-1"},ka={key:1,class:"text-sm text-zinc-500 tabular-nums inline-flex items-center gap-1"},ba={class:"flex flex-wrap items-center gap-1"},wa=["onClick"],_a={key:2,class:"flex items-center gap-1 md:hidden"},$a={key:0,class:"flex-1 min-h-0 max-lg:h-[70dvh] md:overflow-x-auto overflow-y-hidden rounded-lg border border-default bg-default"},Ca=["aria-rowcount"],Ta=["aria-sort","aria-label","title","onClick"],Ra={key:1,class:"truncate"},za={class:"flex items-start gap-2"},Sa=["href","onClick"],Ia={class:"pl-6 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted"},Fa={key:0,class:"text-info"},Pa={key:4,class:"inline-flex items-center gap-0.5 text-amber-600 dark:text-amber-400",title:"Wasted in fixed waits"},ja={class:"px-3 py-2 flex items-center min-w-0",role:"cell"},Da={class:"px-3 py-2 min-w-0 space-y-0.5",role:"cell"},Na={class:"flex items-center gap-1.5 min-w-0"},Ba=["href","title","onClick"],Ma={class:"px-3 py-2 flex items-center",role:"cell"},Aa={class:"px-3 py-2 flex items-center whitespace-nowrap",role:"cell"},Ua={key:0,class:"text-info text-xs"},La={class:"px-3 py-2 flex items-center",role:"cell"},Ea={class:"px-3 py-2 flex items-center tabular-nums",role:"cell"},Oa={key:0,class:"px-3 py-2 flex items-center whitespace-nowrap",role:"cell"},Ka={key:1,class:"text-zinc-400"},Wa={class:"flex-1 min-h-0 flex items-center justify-center py-10 text-sm text-zinc-500"},Ha={key:1,class:"text-center py-10 text-zinc-500"},Va={key:2,class:"text-center py-10 text-zinc-500"},He="natural",Ga=me({__name:"TestCasesList",props:ls({testCases:{},suites:{},isLive:{type:Boolean},failureClusterFilter:{},projectKey:{},projectName:{}},{search:{default:""},searchModifiers:{},activeStatuses:{default:()=>[]},activeStatusesModifiers:{},browserFilter:{default:"all"},browserFilterModifiers:{}}),emits:["update:search","update:activeStatuses","update:browserFilter"],setup(t,{expose:y}){const{treeView:v,setTreeView:z}=Is("test-cases"),T=t,m=Qe(t,"search"),R=Qe(t,"activeStatuses"),u=Qe(t,"browserFilter"),h=W(!1),N=W(!1),B=[{label:"Passed",value:"passed",color:"green"},{label:"Failed",value:"failed",color:"red"},{label:"Skipped",value:"skipped",color:"gray"},{label:"Didn't run",value:"didnotrun",color:"amber"},{label:"Flaky",value:"flaky",color:"orange"}];function P(r){R.value.indexOf(r)>=0?R.value=R.value.filter(X=>X!==r):R.value=[...R.value,r]}const F=I(()=>{const r=new Set;for(const X of T.testCases){const te=X.browser?.projectName;te&&r.add(te)}const d=[{label:"All browsers",value:"all"}];for(const X of[...r].sort())d.push({label:X,value:X});return d});function j(r,d){return d==="failed"?r.status==="failed"||r.status==="timedOut"||r.status==="timedout":d==="flaky"?(r.retries??0)>0:r.status===d}const K=I(()=>{let r=T.testCases;if(T.failureClusterFilter!=null&&(r=r.filter(d=>d.failureClusterId===T.failureClusterFilter)),R.value.length>0&&(r=r.filter(d=>R.value.some(X=>j(d,X)))),u.value!=="all"&&(r=r.filter(d=>d.browser?.projectName===u.value)),m.value){const d=m.value.toLowerCase();r=r.filter(X=>X.title.toLowerCase().includes(d)||X.location&&X.location.toLowerCase().includes(d))}return h.value&&(r=r.filter(d=>d.isNewRegression)),N.value&&(r=r.filter(d=>d.isNewFlaky)),r}),U=W(null),p=W("asc");function S(r){U.value!==r?(U.value=r,p.value="asc"):p.value==="asc"?p.value="desc":U.value=null}function $(r){return U.value!==r?"i-lucide-chevrons-up-down":p.value==="asc"?"i-lucide-chevron-up":"i-lucide-chevron-down"}function c(r,d){switch(d){case"browser":return r.browser?.projectName??"";case"title":return r.title??"";case"status":return r.status??"";case"duration":return r.duration??0;case"workerIndex":return r.workerIndex??-1;case"retries":return r.retries??0;case"wastedTimeMs":return r.wastedTimeMs??0;default:return""}}const f=I(()=>{const r=K.value,d=U.value;if(!d)return r;const X=p.value==="asc"?1:-1;return[...r].sort((te,J)=>{const b=c(te,d),H=c(J,d);return typeof b=="number"&&typeof H=="number"?(b-H)*X:String(b).localeCompare(String(H))*X})}),M=I(()=>T.testCases.some(r=>(r.wastedTimeMs??0)>0)),C=I(()=>{const r=[{key:"browser",label:"Browser",sortable:!0,width:"3.25rem",align:"left",icon:"i-lucide-monitor"},{key:"title",label:"Test case",sortable:!0,width:"minmax(12rem, 3fr)",align:"left"},{key:"status",label:"Status",sortable:!0,width:"6rem",align:"left"},{key:"duration",label:"Duration",sortable:!0,width:"7rem",align:"left"},{key:"workerIndex",label:"Worker",sortable:!0,width:"6rem",align:"left"},{key:"retries",label:"Retries",sortable:!0,width:"6.5rem",align:"left"}];return M.value&&r.push({key:"wastedTimeMs",label:"Wasted",sortable:!0,width:"6rem",align:"left"}),r}),L=I(()=>[{label:"Run order",value:He},...C.value.map(r=>({label:r.label,value:r.key}))]),k=I({get:()=>U.value??He,set:r=>{U.value=r===He?null:r,r!==He&&(p.value="asc")}}),G=I(()=>C.value.map(r=>r.width).join(" ")),Z=I(()=>M.value?"47.5rem":"41.5rem"),se=I(()=>m.value!==""||R.value.length>0||u.value!=="all"||T.failureClusterFilter!=null),Q=W(null),le=W(!1),E=W(null);function D(r){return r.scrollHeight-r.scrollTop-r.clientHeight<50}function ve(r){const d=r.target;d&&(le.value=!D(d))}de(()=>T.isLive,r=>{r||(le.value=!1)}),de(()=>f.value.length,()=>{!T.isLive||le.value||Ne(()=>Q.value?.scrollToBottom())});function fe(r){z(!1),E.value=r;const d=()=>{const X=f.value.findIndex(te=>te.id===r);X>=0&&Q.value?.scrollToItem(X,{behavior:"smooth"})};Ne(()=>{Q.value?d():setTimeout(d,60),setTimeout(()=>{E.value=null},3e3)})}return y({scrollToCase:fe}),(r,d)=>{const X=ke,te=Ie,J=os,b=Rs,H=It,ne=Ce,ee=zs,xe=xa,be=Pt,ae=Ft,he=Mt,Te=We,pe=_e,Re=xt("DynamicScrollerItem"),ge=xt("DynamicScroller"),Se=lt;return s(),a("div",ya,[l(ee,{class:"mb-4 shrink-0"},{start:i(()=>[n("div",ha,[n("button",{class:Y(["px-2 py-1 text-xs transition-colors",e(v)?"text-muted hover:bg-elevated/60":"bg-primary text-white dark:text-white"]),title:"Flat list",onClick:d[0]||(d[0]=x=>e(z)(!1))},[l(X,{name:"i-lucide-list",class:"size-3.5"})],2),n("button",{class:Y(["px-2 py-1 text-xs transition-colors",e(v)?"bg-primary text-white dark:text-white":"text-muted hover:bg-elevated/60"]),title:"Tree view",onClick:d[1]||(d[1]=x=>e(z)(!0))},[l(X,{name:"i-lucide-folder-tree",class:"size-3.5"})],2)]),t.isLive?(s(),a("span",va,[_(o(t.testCases.length)+" completed ",1),l(te,{topic:"run.live"})])):(s(),a("span",ka,[_(o(f.value.length)+o(f.value.length!==t.testCases.length?` / ${t.testCases.length}`:"")+" cases ",1),l(te,{topic:"run.test-cases"})]))]),default:i(()=>[l(J,{modelValue:m.value,"onUpdate:modelValue":d[2]||(d[2]=x=>m.value=x),placeholder:"Search test cases...",icon:"i-lucide-search",size:"sm",class:"min-w-48 max-sm:flex-1"},null,8,["modelValue"]),n("div",ba,[(s(),a(O,null,oe(B,x=>n("button",{key:x.value,class:Y(["inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium transition-colors whitespace-nowrap",R.value.includes(x.value)?x.color==="green"?"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400":x.color==="red"?"bg-rose-100 text-rose-700 dark:bg-rose-900/30 dark:text-rose-400":x.color==="orange"?"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400":"bg-zinc-200 text-zinc-700 dark:bg-zinc-700 dark:text-zinc-300":"bg-zinc-100 text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400 hover:bg-zinc-200 dark:hover:bg-zinc-700"]),onClick:$e=>P(x.value)},[n("span",{class:Y(["size-2 rounded-full shrink-0",x.color==="green"?"bg-emerald-500":x.color==="red"?"bg-rose-500":x.color==="orange"?"bg-orange-500":"bg-zinc-400"])},null,2),_(" "+o(x.label),1)],10,wa)),64))]),l(b,{modelValue:u.value,"onUpdate:modelValue":d[3]||(d[3]=x=>u.value=x),items:F.value,size:"sm",class:"w-36"},null,8,["modelValue","items"]),t.isLive?g("",!0):(s(),w(H,{key:0,modelValue:h.value,"onUpdate:modelValue":d[4]||(d[4]=x=>h.value=x),label:"New regressions",size:"sm"},null,8,["modelValue"])),t.isLive?g("",!0):(s(),w(H,{key:1,modelValue:N.value,"onUpdate:modelValue":d[5]||(d[5]=x=>N.value=x),label:"New flaky",size:"sm"},null,8,["modelValue"])),e(v)?g("",!0):(s(),a("div",_a,[l(b,{modelValue:k.value,"onUpdate:modelValue":d[6]||(d[6]=x=>k.value=x),items:L.value,size:"sm",class:"w-32","aria-label":"Sort cases by"},null,8,["modelValue","items"]),l(ne,{size:"sm",variant:"outline",color:"neutral",disabled:U.value===null,icon:p.value==="asc"?"i-lucide-arrow-up-narrow-wide":"i-lucide-arrow-down-wide-narrow",title:p.value==="asc"?"Sorted ascending":"Sorted descending","aria-label":p.value==="asc"?"Sorted ascending":"Sorted descending",onClick:d[7]||(d[7]=x=>p.value=p.value==="asc"?"desc":"asc")},null,8,["disabled","icon","title","aria-label"])]))]),_:1}),e(v)&&t.testCases.length>0?(s(),w(xe,{key:0,"test-cases":f.value,suites:t.suites,"has-filter":se.value,"highlighted-case-id":E.value,"project-key":t.projectKey,"project-name":t.projectName,class:"flex-1 min-h-0"},null,8,["test-cases","suites","has-filter","highlighted-case-id","project-key","project-name"])):e(v)?g("",!0):(s(),a(O,{key:1},[f.value.length>0?(s(),a("div",$a,[n("div",{class:"flex flex-col h-full md:min-w-(--grid-min-width)",role:"table","aria-label":"Test cases","aria-rowcount":f.value.length+1,style:we({"--grid-min-width":Z.value})},[n("div",{class:"hidden md:grid shrink-0 bg-elevated/50 border-b border-default",role:"row",style:we({gridTemplateColumns:G.value})},[(s(!0),a(O,null,oe(C.value,x=>(s(),a(O,{key:x.key},[x.sortable?(s(),a("button",{key:0,type:"button",role:"columnheader","aria-sort":U.value===x.key?p.value==="asc"?"ascending":"descending":"none","aria-label":x.icon?x.label:void 0,title:x.icon?x.label:void 0,class:Y(["flex items-center gap-1 min-w-0 px-3 py-2 text-sm font-semibold select-none cursor-pointer hover:text-highlighted transition-colors",x.align==="right"?"justify-end":""]),onClick:$e=>S(x.key)},[x.icon?(s(),w(X,{key:0,name:x.icon,class:"shrink-0 size-4"},null,8,["name"])):(s(),a("span",Ra,o(x.label),1)),l(X,{name:$(x.key),class:Y(["shrink-0 size-3.5",U.value===x.key?"":"opacity-40"])},null,8,["name","class"])],10,Ta)):(s(),a("div",{key:1,role:"columnheader",class:Y(["px-3 py-2 text-sm font-semibold",x.align==="right"?"text-right":""])},o(x.label),3))],64))),128))],4),l(Se,null,{fallback:i(()=>[n("div",Wa,[l(X,{name:"i-lucide-loader-circle",class:"size-4 mr-2 animate-spin"}),d[8]||(d[8]=_(" Loading test cases… ",-1))])]),default:i(()=>[l(ge,{ref_key:"scrollerRef",ref:Q,items:f.value,"min-item-size":44,"key-field":"id",role:"rowgroup",class:"flex-1 min-h-0",onScrollPassive:ve},{default:i(({item:x,index:$e,active:Be})=>[l(Re,{item:x,active:Be,"size-dependencies":[x.title,x.location,x.isNewRegression,x.isNewFlaky,x.testAnnotations,x.tags],"data-index":$e},{default:i(()=>[n("div",{class:Y(["md:hidden border-b border-default px-3 py-2.5 space-y-1.5 text-sm transition-colors",E.value===x.id?"animate-pulse bg-yellow-100 dark:bg-yellow-900/30":""]),role:"row"},[n("div",za,[l(X,{name:("getStatusIcon"in r?r.getStatusIcon:e(st))(x.status),class:Y(["size-4 shrink-0 mt-0.5",[("getStatusTextClass"in r?r.getStatusTextClass:e(tt))(x.status),("isStatusInFlight"in r?r.isStatusInFlight:e(zt))(x.status)?"animate-spin":""]]),role:"img","aria-label":`Status: ${("formatStatusLabel"in r?r.formatStatusLabel:e(De))(x.status)}`,title:("formatStatusLabel"in r?r.formatStatusLabel:e(De))(x.status)},null,8,["name","class","aria-label","title"]),n("a",{href:`/test-run-cases/${x.id}`,class:"text-highlighted hover:text-primary hover:underline font-medium flex-1 min-w-0",onClick:Ue(Fe=>("navigateTo"in r?r.navigateTo:e(Xe))(`/test-run-cases/${x.id}`),["prevent"])},o(x.title),9,Sa),l(be,{browser:x.browser,size:"sm",class:"mt-0.5"},null,8,["browser"])]),x.location?(s(),w(ae,{key:0,location:x.location,"project-key":t.projectKey,"project-name":t.projectName,class:"block pl-6 text-xs text-gray-400 dark:text-gray-500"},null,8,["location","project-key","project-name"])):g("",!0),l(he,{"is-new-regression":!!x.isNewRegression,"is-new-flaky":!!x.isNewFlaky,annotations:x.testAnnotations,tags:x.tags,meta:x.testMeta,"max-tags":3,class:"pl-6"},null,8,["is-new-regression","is-new-flaky","annotations","tags","meta"]),n("div",Ia,[x.status==="running"?(s(),a("span",Fa,"In progress...")):x.duration?(s(),w(Te,{key:1,ms:x.duration},null,8,["ms"])):g("",!0),x.workerIndex!=null?(s(),w(pe,{key:2,color:"neutral",variant:"soft",size:"xs",class:"font-mono",title:`Worker ${x.workerIndex}`},{default:i(()=>[_(" w"+o(x.workerIndex),1)]),_:2},1032,["title"])):g("",!0),(x.retries??0)>0?(s(),w(pe,{key:3,color:"warning",variant:"soft",size:"xs"},{default:i(()=>[_(o(x.retries)+"x ",1)]),_:2},1024)):g("",!0),x.wastedTimeMs?(s(),a("span",Pa,[l(X,{name:"i-lucide-hourglass",class:"size-3 shrink-0"}),l(Te,{ms:x.wastedTimeMs,"unit-class":"opacity-60","no-title":""},null,8,["ms"])])):g("",!0)])],2),n("div",{class:Y(["hidden md:grid items-center border-b border-default text-sm transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-900/50",E.value===x.id?"animate-pulse bg-yellow-100 dark:bg-yellow-900/30":""]),role:"row",style:we({gridTemplateColumns:G.value})},[n("div",ja,[l(be,{browser:x.browser},null,8,["browser"])]),n("div",Da,[n("div",Na,[n("a",{href:`/test-run-cases/${x.id}`,class:"text-highlighted hover:text-primary hover:underline font-medium truncate",title:x.title,onClick:Ue(Fe=>("navigateTo"in r?r.navigateTo:e(Xe))(`/test-run-cases/${x.id}`),["prevent"])},o(x.title),9,Ba),l(he,{"is-new-regression":!!x.isNewRegression,"is-new-flaky":!!x.isNewFlaky,annotations:x.testAnnotations,tags:x.tags,meta:x.testMeta,"max-tags":3,class:"shrink-0"},null,8,["is-new-regression","is-new-flaky","annotations","tags","meta"])]),x.location?(s(),w(ae,{key:0,location:x.location,"project-key":t.projectKey,"project-name":t.projectName,class:"text-xs text-zinc-400 dark:text-zinc-500"},null,8,["location","project-key","project-name"])):g("",!0)]),n("div",Ma,[l(pe,{color:("getStatusColor"in r?r.getStatusColor:e(nt))(x.status==="timedOut"||x.status==="timedout"?"failed":x.status),variant:"subtle",class:"capitalize"},{default:i(()=>[_(o(("formatStatusLabel"in r?r.formatStatusLabel:e(De))(x.status)),1)]),_:2},1032,["color"])]),n("div",Aa,[x.status==="running"?(s(),a("span",Ua,"In progress...")):(s(),w(Te,{key:1,ms:x.duration,fallback:""},null,8,["ms"]))]),n("div",La,[x.workerIndex!=null?(s(),w(pe,{key:0,color:"neutral",variant:"soft",class:"font-mono text-xs"},{default:i(()=>[_(o(x.workerIndex),1)]),_:2},1024)):g("",!0)]),n("div",Ea,o(x.retries&&x.retries>0?x.retries:""),1),M.value?(s(),a("div",Oa,[x.wastedTimeMs?(s(),w(Te,{key:0,ms:x.wastedTimeMs,class:"text-amber-600 dark:text-amber-400","unit-class":"opacity-60"},null,8,["ms"])):(s(),a("span",Ka,"—"))])):g("",!0)],6)]),_:2},1032,["item","active","size-dependencies","data-index"])]),_:1},8,["items"])]),_:1})],12,Ca)])):t.testCases.length===0?(s(),a("div",Ha,[l(X,{name:"i-lucide-beaker",class:"size-8 mx-auto mb-2 text-zinc-300 dark:text-zinc-600"}),d[9]||(d[9]=n("p",null,"No test cases recorded for this run.",-1))])):(s(),a("div",Va,[l(X,{name:"i-lucide-search-x",class:"size-8 mx-auto mb-2 text-zinc-300 dark:text-zinc-600"}),d[10]||(d[10]=n("p",null,"No test cases match your filters.",-1))]))],64))])}}}),Xa=Object.assign(Ga,{__name:"TestCasesList"}),qa={key:2,class:"p-4"},Ya={key:3,class:"p-4"},Ja={key:4,class:"p-4"},Za={key:5,class:"space-y-6 p-4","data-shot":"run-insights"},Qa={class:"flex items-center gap-1.5 text-sm text-muted"},eo={class:"grid grid-cols-1 sm:grid-cols-3 gap-4"},to={class:"space-y-1","data-shot":"pass-rate"},so={class:"text-xl font-semibold"},no={key:0},ao={key:1},oo={class:"space-y-1"},lo={key:1,class:"text-xl font-semibold text-muted"},io={class:"space-y-1"},ro={class:"space-y-0.5 text-sm"},uo={key:0,class:"text-red-500"},co={key:1,class:"text-green-600"},mo={key:2,class:"text-purple-500"},fo={key:3,class:"text-muted"},po={class:"space-y-1"},go={class:"font-medium text-primary hover:underline truncate"},xo={class:"text-gray-400 text-xs ml-auto shrink-0"},yo={class:"space-y-1"},ho={class:"font-medium text-primary hover:underline truncate"},vo={class:"space-y-1"},ko={class:"font-medium text-primary hover:underline truncate"},bo={class:"space-y-1"},wo={class:"font-medium text-primary hover:underline truncate"},_o={class:"text-gray-400 text-xs ml-auto shrink-0"},$o={class:"space-y-1"},Co={class:"font-medium text-primary hover:underline truncate"},To={class:"grid grid-cols-2 gap-4"},Ro={key:0},zo={class:"space-y-1"},So={class:"text-red-500 font-mono shrink-0"},Io={class:"truncate text-primary hover:underline"},Fo={key:1},Po={class:"space-y-1"},jo={class:"text-green-500 font-mono shrink-0"},Do={class:"truncate text-primary hover:underline"},No={class:"space-y-1"},Bo={class:"flex-1 truncate text-primary hover:underline"},Mo={class:"text-gray-500 font-mono text-xs shrink-0"},Ao={class:"w-24 h-2 rounded-full bg-gray-100 shrink-0"},Uo={key:0,class:"flex items-center gap-1.5 text-xs text-amber-600 mb-3"},Lo={class:"flex items-end gap-2 h-20"},Eo={class:"text-xs text-gray-500"},Oo={class:"text-xs text-gray-400"},Ko={class:"space-y-1"},Wo={class:"truncate"},Ho=me({__name:"RunInsights",props:{testRunId:{},runStatus:{},refreshKey:{}},setup(t){const y=t,v=I(()=>{if(!m.value)return"";const P=m.value.passRateDelta;return P>0?"text-green-600":P<0?"text-red-600":"text-muted"}),z=I(()=>{if(!m.value)return"";const P=m.value.passRateDelta;return P>0?"i-lucide-trending-up":P<0?"i-lucide-trending-down":"i-lucide-minus"}),T=I(()=>m.value?.avgDurationDelta==null?"":m.value.avgDurationDelta>0?"text-red-600":"text-green-600"),m=W(null),R=W(!1),u=W(null),h=I(()=>y.runStatus==="running"||y.runStatus==="initialising"||y.runStatus==="finalizing");async function N(){if(!y.testRunId||h.value){m.value=null;return}R.value=!0,u.value=null;try{m.value=await $fetch(`/api/test-runs/${y.testRunId}/insights`)}catch(P){console.error("[RunInsights] failed to load",P),u.value=P?.data?.message||P?.message||"Failed to load insights"}finally{R.value=!1}}de(()=>y.testRunId,N,{immediate:!0}),de(()=>y.refreshKey,(P,F)=>{P!==F&&P!==void 0&&N()});function B(P){return P==null?"—":P<1e3?`${P}ms`:`${(P/1e3).toFixed(1)}s`}return(P,F)=>{const j=Ce,K=Fs,U=jt,p=Dt,S=ke,$=Ie,c=Ps,f=_e,M=Oe;return e(u)?(s(),w(K,{key:0,text:e(u),padded:""},{action:i(()=>[l(j,{size:"sm",onClick:N},{default:i(()=>[...F[0]||(F[0]=[_("Retry",-1)])]),_:1})]),_:1},8,["text"])):e(R)?(s(),w(U,{key:1,padded:""})):e(h)?(s(),a("div",qa,[l(p,{icon:"i-lucide-loader-circle",text:"Run in progress"},{default:i(()=>[...F[1]||(F[1]=[n("p",{class:"text-sm text-muted max-w-sm text-center"}," Insights are computed once the run finishes. Switch back here when the run completes. ",-1)])]),_:1})])):e(m)?e(m).hasBaseline?(s(),a("div",Za,[n("div",Qa,[l(S,{name:"i-lucide-sparkles",class:"size-4 shrink-0 text-primary/70"}),F[3]||(F[3]=n("span",null,"Automatic highlights from this run",-1)),l($,{topic:"run.insights"})]),l(c,{icon:"i-lucide-bar-chart-3","icon-class":"text-blue-500",title:"Run summary","data-shot":"run-summary"},{default:i(()=>[n("div",eo,[n("div",to,[F[4]||(F[4]=n("p",{class:"text-xs text-muted"},"Pass rate",-1)),n("p",so,o(e(m).passRate)+"%",1),n("div",{class:Y(["flex items-center gap-1 text-xs",e(v)])},[l(S,{name:e(z),class:"size-3.5"},null,8,["name"]),e(m).passRateDelta!==0?(s(),a("span",no,o(e(m).passRateDelta>0?"+":"")+o(e(m).passRateDelta)+"pp vs baseline",1)):(s(),a("span",ao,"Same as baseline"))],2)]),n("div",oo,[F[5]||(F[5]=n("p",{class:"text-xs text-muted"},"Avg duration",-1)),e(m).avgDurationDelta!==null?(s(),a("p",{key:0,class:Y(["text-xl font-semibold",e(T)])},o(e(m).avgDurationDelta>0?"+":"")+o(e(m).avgDurationDelta)+"% ",3)):(s(),a("p",lo,"—")),F[6]||(F[6]=n("p",{class:"text-xs text-muted"},"vs baseline (passing tests)",-1))]),n("div",io,[F[7]||(F[7]=n("p",{class:"text-xs text-muted"},"Changes",-1)),n("div",ro,[e(m).newRegressions.length>0?(s(),a("p",uo," +"+o(e(m).newRegressions.length)+" regressed ",1)):g("",!0),e(m).recovered.length>0?(s(),a("p",co,"+"+o(e(m).recovered.length)+" fixed",1)):g("",!0),e(m).newFlaky.length>0?(s(),a("p",mo,"+"+o(e(m).newFlaky.length)+" flaky",1)):g("",!0),!e(m).newRegressions.length&&!e(m).recovered.length&&!e(m).newFlaky.length?(s(),a("p",fo," No status changes ")):g("",!0)])])])]),_:1}),e(m).newRegressions.length>0?(s(),w(c,{key:0,icon:"i-lucide-alert-circle","icon-class":"text-red-500",title:"New regressions",count:e(m).newRegressions.length,"data-shot":"new-regressions"},{default:i(()=>[n("div",po,[(s(!0),a(O,null,oe(e(m).newRegressions,C=>(s(),w(M,{key:C.testRunsCaseId,to:`/test-run-cases/${C.testRunsCaseId}`,class:"flex items-center gap-2 text-sm hover:bg-red-50 dark:hover:bg-red-900/10 rounded px-1 -mx-1 transition-colors"},{default:i(()=>[l(f,{color:"error",variant:"solid",size:"xs"},{default:i(()=>[...F[8]||(F[8]=[_("NEW",-1)])]),_:1}),n("span",go,o(C.title),1),n("span",xo,o(B(C.duration)),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):g("",!0),e(m).recurrences.length>0?(s(),w(c,{key:1,icon:"i-lucide-refresh-cw","icon-class":"text-amber-500",title:"Recurring failures",count:e(m).recurrences.length},{default:i(()=>[n("div",yo,[(s(!0),a(O,null,oe(e(m).recurrences,C=>(s(),w(M,{key:C.testRunsCaseId,to:`/test-run-cases/${C.testRunsCaseId}`,class:"flex items-center gap-2 text-sm hover:bg-amber-50 dark:hover:bg-amber-900/10 rounded px-1 -mx-1 transition-colors"},{default:i(()=>[l(f,{color:"warning",variant:"solid",size:"xs"},{default:i(()=>[...F[9]||(F[9]=[_("RECURRING",-1)])]),_:1}),n("span",ho,o(C.title),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):g("",!0),e(m).recovered.length>0?(s(),w(c,{key:2,icon:"i-lucide-check-circle","icon-class":"text-green-500",title:"Fixed tests",count:e(m).recovered.length},{default:i(()=>[n("div",vo,[(s(!0),a(O,null,oe(e(m).recovered,C=>(s(),w(M,{key:C.testRunsCaseId,to:`/test-run-cases/${C.testRunsCaseId}`,class:"flex items-center gap-2 text-sm hover:bg-green-50 dark:hover:bg-green-900/10 rounded px-1 -mx-1 transition-colors"},{default:i(()=>[l(f,{color:"success",variant:"solid",size:"xs"},{default:i(()=>[...F[10]||(F[10]=[_("FIXED",-1)])]),_:1}),n("span",ko,o(C.title),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):g("",!0),e(m).newFlaky.length>0?(s(),w(c,{key:3,icon:"i-lucide-flask","icon-class":"text-purple-500",title:"New flaky tests",count:e(m).newFlaky.length},{default:i(()=>[n("div",bo,[(s(!0),a(O,null,oe(e(m).newFlaky,C=>(s(),w(M,{key:C.testRunsCaseId,to:`/test-run-cases/${C.testRunsCaseId}?tab=history`,class:"flex items-center gap-2 text-sm hover:bg-purple-50 dark:hover:bg-purple-900/10 rounded px-1 -mx-1 transition-colors"},{default:i(()=>[l(f,{color:"info",variant:"solid",size:"xs"},{default:i(()=>[...F[11]||(F[11]=[_("FLAKY",-1)])]),_:1}),n("span",wo,o(C.title),1),n("span",_o,o(B(C.duration)),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):g("",!0),e(m).flakyOnRetry.length>0?(s(),w(c,{key:4,icon:"i-lucide-repeat","icon-class":"text-orange-500",title:"Passed on retry",count:e(m).flakyOnRetry.length,subtitle:"Tests that passed but needed one or more retries"},{default:i(()=>[n("div",$o,[(s(!0),a(O,null,oe(e(m).flakyOnRetry,C=>(s(),w(M,{key:C.testRunsCaseId,to:`/test-run-cases/${C.testRunsCaseId}?tab=history`,class:"flex items-center gap-2 text-sm hover:bg-orange-50 dark:hover:bg-orange-900/10 rounded px-1 -mx-1 transition-colors"},{default:i(()=>[l(f,{color:"warning",variant:"subtle",size:"xs"},{default:i(()=>[_("×"+o(C.retries),1)]),_:2},1024),n("span",Co,o(C.title),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):g("",!0),e(m).mostRegressed.length>0||e(m).mostImproved.length>0?(s(),w(c,{key:5,icon:"i-lucide-trending-up","icon-class":"text-blue-500",title:"Performance changes"},{default:i(()=>[n("div",To,[e(m).mostRegressed.length>0?(s(),a("div",Ro,[F[12]||(F[12]=n("p",{class:"text-xs font-medium text-red-500 mb-2"},"Most regressed",-1)),n("div",zo,[(s(!0),a(O,null,oe(e(m).mostRegressed,C=>(s(),w(M,{key:C.testRunsCaseId,to:`/test-run-cases/${C.testRunsCaseId}?tab=performance`,class:"flex items-center gap-2 text-sm hover:bg-red-50 dark:hover:bg-red-900/10 rounded px-1 -mx-1 transition-colors"},{default:i(()=>[n("span",So,"+"+o(C.pctChange)+"%",1),n("span",Io,o(C.title),1)]),_:2},1032,["to"]))),128))])])):g("",!0),e(m).mostImproved.length>0?(s(),a("div",Fo,[F[13]||(F[13]=n("p",{class:"text-xs font-medium text-green-500 mb-2"},"Most improved",-1)),n("div",Po,[(s(!0),a(O,null,oe(e(m).mostImproved,C=>(s(),w(M,{key:C.testRunsCaseId,to:`/test-run-cases/${C.testRunsCaseId}?tab=performance`,class:"flex items-center gap-2 text-sm hover:bg-green-50 dark:hover:bg-green-900/10 rounded px-1 -mx-1 transition-colors"},{default:i(()=>[n("span",jo,o(C.pctChange)+"%",1),n("span",Do,o(C.title),1)]),_:2},1032,["to"]))),128))])])):g("",!0)])]),_:1})):g("",!0),e(m).slowestTests.length>0?(s(),w(c,{key:6,icon:"i-lucide-clock","icon-class":"text-amber-500",title:"Slowest tests"},{default:i(()=>[n("div",No,[(s(!0),a(O,null,oe(e(m).slowestTests,C=>(s(),w(M,{key:C.testRunsCaseId,to:`/test-run-cases/${C.testRunsCaseId}?tab=performance`,class:"flex items-center gap-2 text-sm hover:bg-amber-50 dark:hover:bg-amber-900/10 rounded px-1 -mx-1 transition-colors"},{default:i(()=>[n("div",Bo,o(C.title),1),n("div",Mo,o(B(C.duration)),1),n("div",Ao,[n("div",{class:"h-full rounded-full bg-amber-400",style:we({width:Math.min(100,C.duration/(e(m).slowestTests[0]?.duration||1)*100)+"%"})},null,4)])]),_:2},1032,["to"]))),128))])]),_:1})):g("",!0),e(m).workerImbalance.length>1?(s(),w(c,{key:7,icon:"i-lucide-users","icon-class":"text-gray-500",title:"Worker distribution"},{default:i(()=>[e(m).workerImbalanceWarning?(s(),a("div",Uo,[l(S,{name:"i-lucide-alert-triangle",class:"size-3.5 shrink-0"}),n("span",null,o(e(m).workerImbalanceWarning),1)])):g("",!0),n("div",Lo,[(s(!0),a(O,null,oe(e(m).workerImbalance,C=>(s(),a("div",{key:C.workerIndex,class:"flex-1 flex flex-col items-center gap-1"},[n("span",Eo,o(C.count),1),n("div",{class:"w-full bg-blue-400 rounded-t",style:we({height:Math.max(4,C.count/Math.max(...e(m).workerImbalance.map(L=>L.count))*60)+"px"})},null,4),n("span",Oo,"W"+o(C.workerIndex),1)]))),128))])]),_:1})):g("",!0),e(m).clusterNew.length>0?(s(),w(c,{key:8,icon:"i-lucide-layers","icon-class":"text-purple-500",title:"New failure clusters",count:e(m).clusterNew.length},{default:i(()=>[n("div",Ko,[(s(!0),a(O,null,oe(e(m).clusterNew,C=>(s(),w(M,{key:C.clusterId,to:`/failure-clusters/${C.clusterId}`,class:"flex items-center gap-2 text-sm text-primary hover:underline"},{default:i(()=>[n("span",Wo,o(C.signature),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):g("",!0)])):(s(),a("div",Ja,[l(p,{icon:"i-lucide-git-compare-arrows",text:"No baseline run found"},{default:i(()=>[...F[2]||(F[2]=[n("p",{class:"text-sm text-muted max-w-sm text-center"}," Insights compare this run against the most recent passing run in the same project. No previous passing run exists yet — once you have at least two completed runs, comparisons will appear here automatically. ",-1)])]),_:1})])):(s(),a("div",Ya,[l(p,{text:"No insights yet"})]))}}}),Vo=Object.assign(Ho,{__name:"RunInsights"}),Go=me({__name:"ClusterDiagnosis",props:{clusterId:{}},setup(t){return(y,v)=>{const z=js;return s(),w(z,{"cluster-id":t.clusterId},null,8,["cluster-id"])}}}),Xo=Object.assign(Go,{__name:"ClusterDiagnosis"}),qo={class:"pt-4 space-y-3"},Yo={key:0,class:"flex items-center justify-center py-8 text-gray-500 gap-2"},Jo={class:"flex items-center justify-between gap-3"},Zo={class:"text-sm text-gray-500 dark:text-gray-400 inline-flex items-center gap-1"},Qo={class:"min-w-0 space-y-0.5"},el=["title"],tl={key:0,class:"text-xs text-gray-500 truncate block"},sl={class:"font-mono"},nl={key:1,class:"text-gray-400 text-xs"},al={key:1,class:"text-gray-400 text-xs"},ol={class:"text-sm tabular-nums"},ll={key:0,class:"flex flex-wrap gap-1"},il={key:1,class:"text-gray-400 text-xs"},rl={key:0,class:"flex items-center gap-1 text-xs text-gray-500"},ul={key:2,class:"text-gray-400 text-xs"},cl={key:0,class:"text-xs font-medium text-warning-500"},dl={key:1,class:"text-sm text-gray-500 whitespace-nowrap"},ml={key:0,class:"ml-1 text-xs text-gray-400"},fl={class:"flex justify-end gap-2"},pl={key:2,class:"flex flex-col items-center justify-center py-8 text-gray-500 gap-2"},gl=me({__name:"FailureGroups",props:{refreshKey:{}},emits:["selectCluster"],async setup(t,{emit:y}){let v,z;const T=y,m=t,u=Ke().params.id,{data:h,pending:N,refresh:B}=([v,z]=Le(()=>Ee(`/api/test-runs/${u}/failure-groups`,{lazy:!0,server:!1},"$MjXpKokGLu")),v=await v,z(),v);de(()=>m.refreshKey,(c,f)=>{c!==f&&c!==void 0&&B()});const P=W(null),{copy:F,copied:j}=ut(),K=I(()=>h.value?h.value.flatMap(c=>c.cases.filter(f=>!f.passedOnRetry).map(f=>({filePath:f.filePath,title:f.title,line:null,projectName:null}))):[]),U=I(()=>St(K.value));function p(){const c=U.value;c&&F(c,{toast:"Retry command copied"})}const S=[{accessorKey:"signature",header:ue("Signature")},{accessorKey:"errorType",header:ue("Type")},{accessorKey:"status",header:ue("Status")},{accessorKey:"caseCount",header:ue("Tests")},{accessorKey:"signals",header:"Signals"},{accessorKey:"diagnosis",header:"AI"},{accessorKey:"firstSeenRunId",header:ue("Known since")},{id:"actions",header:"Actions"}],$=I(()=>h.value?.reduce((c,f)=>c+f.caseCount,0)??0);return(c,f)=>{const M=ke,C=Ie,L=Ce,k=_e,G=Oe,Z=ct,se=Nt,Q=rt,le=Xo,E=Bt;return s(),a(O,null,[n("div",qo,[e(N)?(s(),a("div",Yo,[l(M,{name:"i-lucide-loader-2",class:"size-4 animate-spin"}),f[2]||(f[2]=n("span",null,"Grouping failures...",-1))])):e(h)&&e(h).length?(s(),a(O,{key:1},[n("div",Jo,[n("p",Zo,[_(o(e($))+" failing "+o(e($)===1?"test":"tests")+" across "+o(e(h).length)+" "+o(e(h).length===1?"group":"groups")+" ",1),l(C,{topic:"cluster.concept"})]),e(K).length>0?(s(),w(L,{key:0,size:"xs",variant:"outline",color:"neutral",icon:e(j)?"i-lucide-check":"i-lucide-play",title:e(j)?"Copied!":("copyPreview"in c?c.copyPreview:e(Rt))(e(U)),onClick:f[0]||(f[0]=D=>p())},{default:i(()=>[...f[3]||(f[3]=[_(" Copy retry command ",-1)])]),_:1},8,["icon","title"])):g("",!0)]),l(Q,{ui:{body:"p-0 sm:p-0"}},{default:i(()=>[l(se,{"min-width":"46rem",bleed:!1},{default:i(()=>[l(Z,{data:e(h),columns:S},{"actions-header":i(()=>[...f[4]||(f[4]=[n("div",{class:"text-right"},"Actions",-1)])]),"signature-cell":i(({row:D})=>[n("div",Qo,[n("span",{class:Y(["text-sm block truncate",D.original.title?"":"font-mono"]),title:D.original.signature},o(D.original.title||D.original.signature),11,el),D.original.selector?(s(),a("span",tl,[f[5]||(f[5]=_(" Locator: ",-1)),n("code",sl,o(D.original.selector),1)])):g("",!0)])]),"errorType-cell":i(({row:D})=>[D.original.errorType?(s(),w(k,{key:0,color:("clusterErrorTypeColor"in c?c.clusterErrorTypeColor:e($s))(D.original.errorType),variant:"subtle",size:"sm"},{default:i(()=>[_(o(D.original.errorType),1)]),_:2},1032,["color"])):(s(),a("span",nl,"—"))]),"status-cell":i(({row:D})=>[D.original.status?(s(),w(k,{key:0,color:("clusterStatusColor"in c?c.clusterStatusColor:e(_s))(D.original.status),variant:"subtle",size:"sm"},{default:i(()=>[_(o(D.original.status),1)]),_:2},1032,["color"])):(s(),a("span",al,"—"))]),"caseCount-cell":i(({row:D})=>[n("span",ol,o(D.original.caseCount),1)]),"signals-cell":i(({row:D})=>[D.original.isNew||D.original.flaky||D.original.workerCorrelated||D.original.locatorHealing?(s(),a("div",ll,[D.original.isNew?(s(),w(k,{key:0,color:"warning",variant:"subtle",size:"sm"},{default:i(()=>[...f[6]||(f[6]=[_(" New ",-1)])]),_:1})):g("",!0),D.original.flaky?(s(),w(k,{key:1,color:"warning",variant:"outline",size:"sm"},{default:i(()=>[...f[7]||(f[7]=[_(" Flaky ",-1)])]),_:1})):g("",!0),D.original.workerCorrelated?(s(),w(k,{key:2,color:"info",variant:"outline",size:"sm",title:"All failures ran on the same worker"},{default:i(()=>[...f[8]||(f[8]=[_(" Same worker ",-1)])]),_:1})):g("",!0),D.original.locatorHealing?.healed?(s(),w(k,{key:3,color:"success",variant:"subtle",size:"sm",icon:"i-lucide-circle-check",title:"The recommended locator already passes at this call site in a later run"},{default:i(()=>[...f[9]||(f[9]=[_(" Healed ",-1)])]),_:1})):D.original.locatorHealing?(s(),w(k,{key:4,color:"success",variant:"outline",size:"sm",icon:"i-lucide-bandage",title:`Locator fix available: ${D.original.locatorHealing.recommended} — open the cluster to apply it`},{default:i(()=>[...f[10]||(f[10]=[_(" Locator fix ",-1)])]),_:1},8,["title"])):g("",!0)])):(s(),a("span",il,"—"))]),"diagnosis-cell":i(({row:D})=>[D.original.diagnosis?.status==="running"?(s(),a("div",rl,[l(M,{name:"i-lucide-loader-2",class:"size-3 animate-spin"}),f[11]||(f[11]=_(" Running ",-1))])):D.original.diagnosis?.status==="completed"&&D.original.diagnosis.category?(s(),w(k,{key:1,color:"neutral",variant:"subtle",size:"sm",class:"gap-1"},{default:i(()=>[l(M,{name:"i-lucide-sparkles",class:"size-3"}),_(" "+o(D.original.diagnosis.category),1)]),_:2},1024)):(s(),a("span",ul,"—"))]),"firstSeenRunId-cell":i(({row:D})=>[D.original.isNew?(s(),a("span",cl,"New in this run")):(s(),a("div",dl,[l(G,{to:`/test-runs/${D.original.firstSeenRunId}`,class:"text-primary hover:underline"},{default:i(()=>[_(" run #"+o(D.original.firstSeenRunId),1)]),_:2},1032,["to"]),D.original.firstSeenAt?(s(),a("span",ml," ("+o(("formatRelativeTime"in c?c.formatRelativeTime:e(it))(D.original.firstSeenAt))+") ",1)):g("",!0)]))]),"actions-cell":i(({row:D})=>[n("div",fl,[l(L,{size:"sm",color:"primary",variant:"soft",onClick:ve=>T("selectCluster",D.original.clusterId)},{default:i(()=>[...f[12]||(f[12]=[_(" Filter ",-1)])]),_:1},8,["onClick"]),l(L,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-sparkles",onClick:ve=>P.value=D.original.clusterId},{default:i(()=>[...f[13]||(f[13]=[_(" Diagnose ",-1)])]),_:1},8,["onClick"]),l(L,{to:`/failure-clusters/${D.original.clusterId}`,size:"sm",variant:"outline","trailing-icon":"i-lucide-arrow-right"},{default:i(()=>[...f[14]||(f[14]=[_(" View ",-1)])]),_:1},8,["to"])])]),_:1},8,["data"])]),_:1})]),_:1})],64)):(s(),a("div",pl,[l(M,{name:"i-lucide-party-popper",class:"size-6"}),f[15]||(f[15]=n("span",null,"No failure groups — failed tests without error details are not grouped",-1))]))]),l(E,{open:e(P)!==null,title:"AI Diagnosis",ui:{content:"max-w-2xl"},"onUpdate:open":f[1]||(f[1]=D=>{D||(P.value=null)})},{body:i(()=>[e(P)!==null?(s(),w(le,{key:0,"cluster-id":e(P)},null,8,["cluster-id"])):g("",!0)]),_:1},8,["open"])],64)}}}),xl=Object.assign(gl,{__name:"FailureGroups"}),yl={class:"pt-4"},hl={key:2,class:"space-y-4"},vl={class:"flex flex-wrap items-center gap-2 text-sm"},kl={class:"text-gray-500 inline-flex items-center gap-1"},bl={key:0,class:"text-gray-400"},wl={key:0,class:"flex flex-wrap items-center gap-2"},_l={class:"text-sm text-gray-500"},$l={key:1,class:"flex items-center gap-2"},Cl={class:"text-sm text-gray-500"},Tl={class:"space-y-3"},Rl={class:"flex items-center gap-2 text-sm font-medium"},zl={class:"flex flex-wrap items-center gap-2 text-sm font-mono"},Sl={key:0,class:"text-xs text-gray-400 font-sans"},Il={class:"flex flex-wrap items-center gap-2"},Fl={class:"flex items-center gap-1.5 flex-1 min-w-0"},Pl={class:"flex-1 text-xs bg-gray-100 dark:bg-gray-800 px-3 py-1.5 rounded font-mono truncate select-all"},jl={key:3,class:"text-sm text-gray-500 flex items-center gap-2"},Dl={class:"px-4 py-3 text-sm font-medium flex items-center gap-2 border-b border-default"},Nl={class:"overflow-x-auto"},Bl={class:"w-full min-w-[36rem] text-sm"},Ml={class:"px-4 py-2 text-gray-500"},Al={class:"px-4 py-2 font-mono text-xs"},Ul={key:0,class:"text-green-700 dark:text-green-400"},Ll={key:1,class:"text-gray-400"},El={class:"px-4 py-2 font-mono text-xs"},Ol={key:0,class:"text-red-700 dark:text-red-400"},Kl={key:1,class:"text-gray-400"},Wl=me({__name:"RegressionContext",props:{refreshKey:{}},async setup(t){let y,v;const T=Ke().params.id,m=t,{data:R,pending:u,refresh:h}=([y,v]=Le(()=>Ee(`/api/test-runs/${T}/regression-context`,{lazy:!0,server:!1},"$bK54nhbSza")),y=await y,v(),y);de(()=>m.refreshKey,(F,j)=>{F!==j&&F!==void 0&&h()});const{copy:N,copied:B}=ut();function P(){N(R.value?.commitRange?.gitCommand)}return(F,j)=>{const K=jt,U=Dt,p=ke,S=Ie,$=Oe,c=_e,f=Ce,M=rt;return s(),a("div",yl,[e(u)?(s(),w(K,{key:0,text:"Looking for last passing run…"})):e(R)?.hasGreen?(s(),a("div",hl,[n("div",vl,[l(p,{name:"i-lucide-circle-check",class:"size-4 text-green-500 shrink-0"}),n("span",kl,[j[0]||(j[0]=_("Last passing run: ",-1)),l(S,{topic:"run.regression"})]),l($,{to:`/test-runs/${e(R).lastGreenRunId}`,class:"font-medium text-primary hover:underline"},{default:i(()=>[_(" Run #"+o(e(R).lastGreenRunId),1)]),_:1},8,["to"]),e(R).lastGreenRunAt?(s(),a("span",bl," ("+o(("formatRelativeTime"in F?F.formatRelativeTime:e(it))(e(R).lastGreenRunAt))+") ",1)):g("",!0)]),(e(R).newFailures??0)>0?(s(),a("div",wl,[l(c,{color:"error",variant:"soft",size:"lg"},{default:i(()=>[_(o(e(R).newFailures)+" new "+o(e(R).newFailures===1?"failure":"failures"),1)]),_:1}),n("span",_l,o(e(R).newFailures===1?"test":"tests")+" that "+o((e(R).newFailures===1,"passed"))+" in run #"+o(e(R).lastGreenRunId)+" but "+o(e(R).newFailures===1?"fails":"fail")+" here ",1)])):(s(),a("div",$l,[l(c,{color:"warning",variant:"soft",size:"lg"},{default:i(()=>[...j[1]||(j[1]=[_(" No new regressions ",-1)])]),_:1}),n("span",Cl,"All failing tests were also failing before run #"+o(e(R).lastGreenRunId),1)])),e(R).commitRange?(s(),w(M,{key:2,ui:{body:"p-4 sm:p-4"}},{default:i(()=>[n("div",Tl,[n("div",Rl,[l(p,{name:"i-lucide-git-commit-horizontal",class:"size-4"}),j[2]||(j[2]=_(" Commits introduced since last passing run ",-1))]),n("div",zl,[l(c,{color:"success",variant:"soft",size:"sm"},{default:i(()=>[_(o(e(R).commitRange.fromShort),1)]),_:1}),l(p,{name:"i-lucide-arrow-right",class:"size-3 text-gray-400"}),l(c,{color:"error",variant:"soft",size:"sm"},{default:i(()=>[_(o(e(R).commitRange.toShort),1)]),_:1}),e(R).currentBranch||e(R).lastGreenBranch?(s(),a("span",Sl," on "+o(e(R).currentBranch||e(R).lastGreenBranch),1)):g("",!0)]),n("div",Il,[e(R).commitRange.compareUrl?(s(),w(f,{key:0,to:e(R).commitRange.compareUrl,target:"_blank",external:"",icon:"i-lucide-external-link",size:"sm",variant:"soft",color:"primary"},{default:i(()=>[...j[3]||(j[3]=[_(" View commits ",-1)])]),_:1},8,["to"])):g("",!0),n("div",Fl,[n("code",Pl,o(e(R).commitRange.gitCommand),1),l(f,{icon:e(B)?"i-lucide-check":"i-lucide-clipboard",size:"xs",color:"neutral",variant:"ghost",title:e(B)?"Copied!":"Copy git command",onClick:P},null,8,["icon","title"])])])])]),_:1})):!e(R).currentCommit||!e(R).lastGreenCommit?(s(),a("div",jl,[l(p,{name:"i-lucide-git-branch",class:"size-4 shrink-0"}),j[4]||(j[4]=_(" No commit info available — enable ",-1)),j[5]||(j[5]=n("code",{class:"font-mono text-xs"},"collectScmInfo: true",-1)),j[6]||(j[6]=_(" in the reporter to see commit ranges ",-1))])):g("",!0),e(R).metadataDiff&&e(R).metadataDiff.length>0?(s(),w(M,{key:4,ui:{body:"p-0 sm:p-0"}},{default:i(()=>[n("div",Dl,[l(p,{name:"i-lucide-sliders-horizontal",class:"size-4"}),j[7]||(j[7]=_(" What changed between runs ",-1))]),n("div",Nl,[n("table",Bl,[j[8]||(j[8]=n("thead",null,[n("tr",{class:"text-xs text-gray-500 uppercase tracking-wider border-b border-default"},[n("th",{class:"text-left px-4 py-2 font-medium w-32"},"Field"),n("th",{class:"text-left px-4 py-2 font-medium"},"Last passing"),n("th",{class:"text-left px-4 py-2 font-medium"},"This run")])],-1)),n("tbody",null,[(s(!0),a(O,null,oe(e(R).metadataDiff,C=>(s(),a("tr",{key:C.key,class:"border-b last:border-b-0 border-default"},[n("td",Ml,o(C.label),1),n("td",Al,[C.before?(s(),a("span",Ul,o(C.before),1)):(s(),a("span",Ll,"—"))]),n("td",El,[C.after?(s(),a("span",Ol,o(C.after),1)):(s(),a("span",Kl,"—"))])]))),128))])])])]),_:1})):g("",!0)])):(s(),w(U,{key:1,icon:"i-lucide-history",text:"No previous passing run found for this project"}))])}}}),Hl=Object.assign(Wl,{__name:"RegressionContext"}),Vl={class:"flex items-center justify-between mb-2"},Gl={class:"text-xs text-gray-500 inline-flex items-center gap-1"},Xl={class:"flex items-center gap-1"},ql={class:"p-2 flex flex-col gap-2 min-w-56"},Yl=me({__name:"TimelineHeader",props:{workerCount:{},shardTotal:{},testCount:{},hookCount:{},waitCount:{},spanTypes:{},live:{type:Boolean}},emits:["reset","toggleSpan"],setup(t){return(y,v)=>{const z=Ie,T=Ce,m=It,R=at;return s(),a("div",Vl,[n("span",Gl,[n("span",null,[_(o(t.workerCount)+" worker"+o(t.workerCount>1?"s":"")+" ",1),t.shardTotal&&t.shardTotal>1?(s(),a(O,{key:0},[_(" · "+o(t.shardTotal)+" shard"+o(t.shardTotal>1?"s":""),1)],64)):g("",!0),_(" · "+o(t.testCount)+" tests ",1),t.hookCount>0?(s(),a(O,{key:1},[_(" · "+o(t.hookCount)+" hooks ",1)],64)):g("",!0),t.waitCount>0?(s(),a(O,{key:2},[_(" · "+o(t.waitCount)+" waits ",1)],64)):g("",!0)]),l(z,{topic:"run.timeline"})]),n("div",Xl,[t.spanTypes.length>1?(s(),w(R,{key:0,content:{align:"end"}},{content:i(()=>[n("div",ql,[(s(!0),a(O,null,oe(t.spanTypes,u=>(s(),w(m,{key:u.key,"model-value":u.checked,label:u.label,"onUpdate:modelValue":h=>y.$emit("toggleSpan",u.key,h===!0)},null,8,["model-value","label","onUpdate:modelValue"]))),128))])]),default:i(()=>[l(T,{size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-list-filter","trailing-icon":"i-lucide-chevron-down",title:"Show or hide span types"},{default:i(()=>[...v[1]||(v[1]=[_(" Span types ",-1)])]),_:1})]),_:1})):g("",!0),t.live?g("",!0):(s(),w(T,{key:1,size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-rotate-ccw",onClick:v[0]||(v[0]=u=>y.$emit("reset"))},{default:i(()=>[...v[2]||(v[2]=[_(" Reset view ",-1)])]),_:1}))])])}}}),Jl=Object.assign(Yl,{__name:"TimelineHeader"}),qe={barHeight:24,rowGap:8,labelWidth:80,sidePadding:16,axisHeight:28,get rowHeight(){return this.barHeight+this.rowGap}},Zl={passed:"#16a34a",failed:"#dc2626",timedOut:"#ea580c",running:"#2563eb",initialising:"#2563eb",skipped:"#9ca3af",cancelled:"#a1a1aa",interrupted:"#ea580c",flaky:"#ca8a04"},je={fill:"#facc15",stroke:"#ca8a04",swatch:"#f59e0b"};function Je(t){return Zl[t]||"#a1a1aa"}function At(t){return Je(t)+"66"}function Ut(t){return Je(t)}function Ye(t){return t<1e3?`${t}ms`:t<6e4?`${(t/1e3).toFixed(1)}s`:`${Math.floor(t/6e4)}m ${Math.floor(t%6e4/1e3)}s`}const Ql=["y","width","height"],ei=["y1","x2","y2"],ti=["x1","y1","x2","y2"],si=["x1","y1","x2","y2"],ni=["x","y"],ai=["y"],oi=me({__name:"TimelineGrid",props:{workerRows:{},shardGroups:{},tickMarks:{},contentWidth:{},shardTotal:{}},setup(t){const{barHeight:y,rowGap:v,axisHeight:z,rowHeight:T}=qe;return(m,R)=>(s(),a("g",null,[(s(!0),a(O,null,oe(t.workerRows,(u,h)=>(s(),a("rect",{key:"bg-"+h,x:0,y:h*e(T)+e(z),width:t.contentWidth,height:e(T),class:Y(h%2===1?"fill-black/[0.03] dark:fill-white/[0.03]":"fill-transparent")},null,10,Ql))),128)),(s(!0),a(O,null,oe(t.shardGroups.slice(1),u=>(s(),a("line",{key:"shard-sep-"+u.rowRange[0],x1:0,y1:u.rowRange[0]*e(T)+e(z)-e(v)/2,x2:t.contentWidth,y2:u.rowRange[0]*e(T)+e(z)-e(v)/2,stroke:"currentColor","stroke-dasharray":"4,3",class:"stroke-gray-400 dark:stroke-gray-500"},null,8,ei))),128)),n("line",{x1:e(qe).labelWidth,y1:e(z),x2:t.contentWidth,y2:e(z),stroke:"currentColor",class:"stroke-gray-300 dark:stroke-gray-600"},null,8,ti),(s(!0),a(O,null,oe(t.tickMarks,u=>(s(),a("g",{key:u.ms},[n("line",{x1:u.x,y1:e(z)-4,x2:u.x,y2:e(z),stroke:"currentColor",class:"stroke-gray-300 dark:stroke-gray-600"},null,8,si),n("text",{x:u.x,y:e(z)-8,"text-anchor":"middle",class:"fill-gray-400 text-[10px]"},o(u.label),9,ni)]))),128)),(s(!0),a(O,null,oe(t.workerRows,(u,h)=>(s(),a("text",{key:"label-"+h,x:6,y:h*e(T)+e(z)+e(y)/2+4,class:"fill-gray-500 text-[11px] font-medium"},o(u.shardIndex!=null&&t.shardTotal&&t.shardTotal>1?`S${u.shardIndex} W${u.workerIndex}`:`Worker ${u.workerIndex}`),9,ai))),128))]))}}),li=Object.assign(oi,{__name:"TimelineGrid"}),ii=["x","y","width","height","fill","stroke"],ri=["x","y"],ui=["x","y","width","height","fill","stroke"],ci=["x1","y1","x2","y2","stroke"],di=["x1","y1","x2","y2","stroke"],mi=["x","y"],fi=["cx","cy"],pi=["cx","cy"],gi=["x","y","width","height","fill"],xi=["x","y"],yi=me({__name:"TimelineBar",props:{item:{},x:{},y:{},width:{}},emits:["select","hover","move","leave"],setup(t,{emit:y}){const v=t,z=y,{barHeight:T}=qe,m=I(()=>["setup","hook","fixture"].includes(v.item.kind)),R=I(()=>v.item.testCaseId!=null),u=I(()=>R.value?"cursor-pointer":"cursor-default");function h(){v.item.testCaseId!=null&&z("select",v.item.testCaseId)}return(N,B)=>(s(),a("g",{class:"timeline-bar-group",onMouseenter:B[0]||(B[0]=P=>z("hover",t.item,P)),onMousemove:B[1]||(B[1]=P=>z("move",P)),onMouseleave:B[2]||(B[2]=P=>z("leave"))},[m.value?(s(),a(O,{key:0},[n("rect",{x:t.x,y:t.y,width:t.width,height:e(T),rx:3,ry:3,fill:e(At)(t.item.status),stroke:e(Ut)(t.item.status),"stroke-width":"1","stroke-dasharray":"3,2",class:Y(["timeline-bar-shape transition-opacity duration-100 opacity-80",u.value]),onClick:h},null,10,ii),t.width>60?(s(),a("text",{key:0,x:t.x+4,y:t.y+e(T)/2+4,class:"fill-gray-600 dark:fill-gray-300 text-[9px] font-medium pointer-events-none"},o(t.item.title),9,ri)):g("",!0)],64)):t.item.kind==="wait"?(s(),a(O,{key:1},[n("rect",{x:t.x,y:t.y-3,width:t.width,height:e(T)+6,rx:2,ry:2,fill:e(je).fill,"fill-opacity":"0.28",stroke:e(je).stroke,"stroke-width":"1.5",class:Y(["timeline-bar-shape transition-opacity duration-100 opacity-90",u.value]),onClick:h},null,10,ui),t.width>4?(s(),a("line",{key:0,x1:t.x+1,y1:t.y-3,x2:t.x+t.width-1,y2:t.y+e(T)+3,stroke:e(je).stroke,"stroke-width":"1","stroke-opacity":"0.25",class:"pointer-events-none"},null,8,ci)):g("",!0),t.width>4?(s(),a("line",{key:1,x1:t.x+t.width-1,y1:t.y-3,x2:t.x+1,y2:t.y+e(T)+3,stroke:e(je).stroke,"stroke-width":"1","stroke-opacity":"0.25",class:"pointer-events-none"},null,8,di)):g("",!0),t.width>50?(s(),a("text",{key:2,x:t.x+4,y:t.y+e(T)/2+4,class:"fill-yellow-800 dark:fill-yellow-200 text-[9px] font-bold pointer-events-none"}," wasted "+o(e(Ye)(t.item.duration)),9,mi)):g("",!0)],64)):t.item.status==="running"?(s(),a(O,{key:2},[n("circle",{cx:t.x+6,cy:t.y+e(T)/2,r:"3",fill:"#2563eb",filter:"url(#glow)",class:"timeline-bar-shape transition-opacity duration-100 cursor-pointer opacity-90",onClick:h},null,8,fi),n("circle",{cx:t.x+6,cy:t.y+e(T)/2,r:"5",fill:"none",stroke:"#2563eb","stroke-width":"1.5","stroke-opacity":"0.4",filter:"url(#glow)",class:"timeline-bar-shape transition-opacity duration-100 cursor-pointer opacity-90",onClick:h},null,8,pi)],64)):(s(),a(O,{key:3},[n("rect",{x:t.x,y:t.y,width:t.width,height:e(T),rx:3,ry:3,fill:e(Je)(t.item.status),class:"timeline-bar-shape transition-opacity duration-100 cursor-pointer opacity-90",onClick:h},null,8,gi),t.width>40?(s(),a("text",{key:0,x:t.x+4,y:t.y+e(T)/2+4,class:"fill-white text-[10px] font-medium pointer-events-none"},o(e(Ye)(t.item.duration)),9,xi)):g("",!0)],64))],32))}}),hi=Object.assign(yi,{__name:"TimelineBar"}),vi={class:"flex items-center gap-2 mb-1"},ki={class:"font-medium text-gray-900 dark:text-white max-w-64 truncate"},bi={class:"flex items-center gap-3 text-gray-500"},wi={class:"capitalize"},_i={key:0,class:"italic truncate max-w-48"},$i=340,Ci=me({__name:"TimelineTooltip",props:{item:{},pos:{}},setup(t){const y=t,v=I(()=>{const T=y.item;return T?T.kind==="test"?{backgroundColor:Je(T.status)}:T.kind==="wait"?{backgroundColor:je.swatch+"66",borderColor:je.swatch}:{backgroundColor:At(T.status),borderColor:Ut(T.status)}:{}}),z=I(()=>{const{x:T,y:m}=y.pos;if(typeof window>"u")return{left:`${T+12}px`,top:`${m-10}px`};const R=T+12+$i>window.innerWidth,u=m+90>window.innerHeight;return{left:R?void 0:`${T+12}px`,right:R?`${window.innerWidth-T+12}px`:void 0,top:u?void 0:`${m-10}px`,bottom:u?`${window.innerHeight-m+10}px`:void 0}});return(T,m)=>(s(),w(is,{to:"body"},[t.item?(s(),a("div",{key:0,class:"fixed z-[9999] pointer-events-none rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 px-3 py-2 text-xs shadow-lg",style:we(z.value)},[n("div",vi,[n("span",{class:Y(["inline-block size-2.5 rounded-full shrink-0",{"border border-dashed":t.item.kind!=="test"}]),style:we(v.value)},null,6),n("span",ki,[t.item.kind!=="test"?(s(),a("span",{key:0,class:Y(["uppercase text-[10px] tracking-wider mr-1",t.item.kind==="wait"?"text-amber-500":"text-gray-500"])},o(t.item.kind),3)):g("",!0),_(" "+o(t.item.title),1)])]),n("div",bi,[n("span",wi,o(t.item.status),1),n("span",null,o(e(Ye)(t.item.duration)),1),n("span",null,"Worker "+o(t.item.workerIndex),1),t.item.parentTitle?(s(),a("span",_i," for "+o(t.item.parentTitle),1)):g("",!0)])],4)):g("",!0)]))}}),Ti=Object.assign(Ci,{__name:"TimelineTooltip"}),Ri=["Wait for timeout*","*waitForTimeout*"];function zi(t){const y=t.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp(`^${y}$`,"i")}const yt=new Map;function Si(t){let y=yt.get(t);return y||(y=zi(t),yt.set(t,y)),y}function Ii(t,y){if(!y||y.length===0)return!1;const v=t.title??"",z=t.location??"";for(const T of y){const m=Si(T);if(m.test(v)||z&&m.test(z))return!0}return!1}function Fi(t){const y=new Map;for(const v of t){const z=v.workerIndex;if(z==null||z<0)continue;const T=v.shardIndex??null,m=`${T??"null"}|${z}`;let R=y.get(m);R||(R={shardIndex:T,workerIndex:z,cases:[]},y.set(m,R)),R.cases.push(v)}return[...y.values()].sort((v,z)=>{const T=v.shardIndex??1/0,m=z.shardIndex??1/0;return T!==m?T-m:v.workerIndex-z.workerIndex})}function Ve(t){if(t==null)return null;if(typeof t=="number")return Number.isFinite(t)?t:null;if(t instanceof Date)return t.getTime();const y=new Date(t).getTime();return Number.isNaN(y)?null:y}function Pi(t,y){return t.category==="wait"?Ii(t,y)?"wait":null:t.category==="hook"||t.category==="fixture"?t.category:null}function ji(t){const y=I(()=>t.wastedPatterns&&t.wastedPatterns.length>0?t.wastedPatterns:Ri),v=I(()=>Fi(t.testCases)),z=I(()=>{const u=v.value,h=y.value;let N=1/0;for(const K of u)for(const U of K.cases){const p=Ve(U.startedAt);p!=null&&p>0&&(N=Math.min(N,p))}const B=Number.isFinite(N),P=K=>Math.max(0,(Ve(K)??N)-N),F=[],j=new Map;if(u.forEach((K,U)=>{const p=[],S=B?K.cases:[...K.cases].sort((c,f)=>(Ve(c.startedAt)??0)-(Ve(f.startedAt)??0));let $=0;for(const c of S){const f=c.duration??1e3,M=B?P(c.startedAt):$;p.push({key:`t${c.id}`,kind:"test",testCaseId:c.id,title:c.title,status:c.status,workerIndex:K.workerIndex,start:M,duration:f,rowIndex:U}),$=M+f,(c.stepEvents??[]).forEach((L,k)=>{const G=Pi(L,h);if(!G)return;const Z=L.duration||0,se=B?P(L.startedAt):$;p.push({key:`s${c.id}:${k}`,kind:G,testCaseId:c.id,title:L.title,status:L.status||"passed",workerIndex:K.workerIndex,start:se,duration:Z,rowIndex:U,parentTitle:c.title}),$=se+Z})}p.sort((c,f)=>c.start-f.start),F.push(...p),j.has(K.workerIndex)||j.set(K.workerIndex,$)}),t.setupSteps&&t.setupSteps.length>0){const K=new Map;u.forEach((U,p)=>{K.has(U.workerIndex)||K.set(U.workerIndex,p)}),t.setupSteps.forEach((U,p)=>{const S=U.workerIndex;if(S==null||S<0)return;const $=K.get(S);if($==null)return;const c=U.duration||0;let f;B?f=P(U.startedAt):(f=j.get(S)??0,j.set(S,f+c)),F.push({key:`setup${S}:${p}`,kind:"setup",testCaseId:null,title:`[Setup] ${U.title}`,status:U.status||"passed",workerIndex:S,start:f,duration:c,rowIndex:$,parentTitle:null})})}return F}),T=I(()=>v.value.map(u=>({shardIndex:u.shardIndex,workerIndex:u.workerIndex}))),m=I(()=>{const u=[];for(let h=0;h<T.value.length;h++){const N=T.value[h],B=u[u.length-1];!B||B.shardIndex!==N.shardIndex?u.push({shardIndex:N.shardIndex,rowRange:[h,h]}):B.rowRange[1]=h}return u}),R=I(()=>{let u=0;for(const h of z.value)u=Math.max(u,h.start+h.duration);return u||6e4});return{timelineData:z,workerRows:T,shardGroups:m,maxTime:R}}const ht=1.12,Di=10,Ni=100,et=[10,20,50,100,200,500,1e3,2e3,5e3,1e4,15e3,3e4,6e4,12e4,3e5,6e5,9e5,18e5,36e5];function Bi(t){const{containerRef:y,maxTime:v,rowCount:z,hasData:T,live:m}=t,{labelWidth:R,sidePadding:u,axisHeight:h,rowHeight:N}=qe,B=W(1),P=W(0),F=W(!1),j=W(0),K=W(0),U=I(()=>.5*B.value),p=I(()=>v.value*U.value+R+u),S=I(()=>z.value*N+h);function $(b){return b.start*U.value+R}function c(b){return Math.max(b.duration*U.value,3)}function f(b){return b.rowIndex*N+h}function M(){const b=y.value?.clientWidth;if(!b||v.value<=0)return 1;const H=(b-R)/v.value;return Math.min(1,H/.5)}function C(){const b=M();b>0&&(B.value=b,P.value=0)}function L(b){if(!y.value)return b;const H=y.value.clientWidth;return p.value<=H?0:Math.max(H-p.value,Math.min(0,b))}function k(b,H){const ne=Math.max(M(),Math.min(Di,b)),ee=ne/B.value;B.value=ne,P.value=L(H-(H-P.value)*ee)}const G=I(()=>{const b=Ni/U.value;let H=et.find(ee=>ee>=b)??et[et.length-1];for(;v.value/H>1e3;)H*=2;const ne=[];for(let ee=0;ee<=v.value;ee+=H)ne.push({ms:ee,x:ee*U.value+R,label:Ye(ee)});return ne});function Z(b){if(m())return;const H=b.deltaY>0?1/ht:ht,ne=y.value?.getBoundingClientRect();k(B.value*H,ne?b.clientX-ne.left:0)}const se=4,Q=new Map;let le=null,E=0,D=1,ve=0;function fe(b,H){le=b,j.value=H,K.value=P.value}function r(b){if(!m()&&!(b.pointerType==="mouse"&&b.button!==0)){if(Q.set(b.pointerId,{x:b.clientX,y:b.clientY}),Q.size===1)fe(b.pointerId,b.clientX);else if(Q.size===2){le=null,F.value=!1;for(const xe of Q.keys())y.value?.setPointerCapture?.(xe);const[H,ne]=[...Q.values()];E=Math.hypot(H.x-ne.x,H.y-ne.y)||1,D=B.value;const ee=y.value?.getBoundingClientRect();ve=(H.x+ne.x)/2-(ee?.left??0)}b.preventDefault()}}function d(b){if(!(m()||!Q.has(b.pointerId))){if(Q.set(b.pointerId,{x:b.clientX,y:b.clientY}),Q.size>=2){const[H,ne]=[...Q.values()],ee=Math.hypot(H.x-ne.x,H.y-ne.y)||1;k(D*(ee/E),ve);return}F.value?P.value=L(K.value+(b.clientX-j.value)):le===b.pointerId&&Math.abs(b.clientX-j.value)>se&&(y.value?.setPointerCapture?.(b.pointerId),F.value=!0,P.value=L(K.value+(b.clientX-j.value)))}}function X(b){if(Q.delete(b.pointerId),le===b.pointerId&&(le=null),y.value?.releasePointerCapture?.(b.pointerId),Q.size===1){const[H]=[...Q.entries()];fe(H[0],H[1].x)}else Q.size===0&&(F.value=!1)}function te(){C()}let J=null;return kt(()=>{Ne(C),y.value&&(J=new ResizeObserver(()=>C()),J.observe(y.value))}),bt(()=>{J?.disconnect()}),de(()=>[m(),T.value,v.value,z.value],([b,H])=>{b&&H&&Ne(C)}),{panX:P,isPanning:F,pxPerMs:U,contentWidth:p,contentHeight:S,getBarX:$,getBarWidth:c,getBarTop:f,tickMarks:G,onWheel:Z,onPointerDown:r,onPointerMove:d,onPointerUp:X,resetView:te}}const Mi={key:0,class:"relative select-none"},Ai=["width","height"],Ui={key:1,class:"text-center py-10 text-gray-500"},Li=me({__name:"WorkersTimeline",props:{testCases:{},setupSteps:{},shardTotal:{},live:{type:Boolean},wastedPatterns:{}},emits:["selectTestCase"],setup(t,{emit:y}){const v=t,z=y,{timelineData:T,workerRows:m,shardGroups:R,maxTime:u}=ji(v),h=W(null),N=I(()=>m.value.length),B=I(()=>T.value.length>0),{panX:P,isPanning:F,contentWidth:j,contentHeight:K,getBarX:U,getBarWidth:p,getBarTop:S,tickMarks:$,onWheel:c,onPointerDown:f,onPointerMove:M,onPointerUp:C,resetView:L}=Bi({containerRef:h,maxTime:u,rowCount:N,hasData:B,live:()=>v.live}),k=I(()=>T.value.filter(J=>J.kind==="test").length),G=I(()=>T.value.filter(J=>J.kind!=="test"&&J.kind!=="wait").length),Z=I(()=>T.value.filter(J=>J.kind==="wait").length),se=["test","setup","hook","fixture","wait"],Q={test:"Tests",setup:"Setup (beforeAll/afterAll)",hook:"Hooks",fixture:"Fixtures",wait:"Wasted waits"},le=W({}),E=I(()=>T.value.filter(J=>!le.value[J.kind])),D=I(()=>{const J=new Set(T.value.map(b=>b.kind));return se.filter(b=>J.has(b)).map(b=>({key:b,label:Q[b],checked:!le.value[b]}))});function ve(J,b){le.value={...le.value,[J]:!b}}const fe=W(null),r=W({x:0,y:0});de(E,J=>{fe.value&&(fe.value=J.find(b=>b.key===fe.value.key)??null)});function d(J,b){fe.value=J,r.value={x:b.clientX,y:b.clientY}}function X(J){r.value={x:J.clientX,y:J.clientY}}function te(){fe.value=null}return(J,b)=>{const H=Jl,ne=li,ee=hi,xe=Ti,be=ke;return e(T).length>0?(s(),a("div",Mi,[l(H,{"worker-count":e(m).length,"shard-total":t.shardTotal,"test-count":k.value,"hook-count":G.value,"wait-count":Z.value,"span-types":D.value,live:t.live,onToggleSpan:ve,onReset:e(L)},null,8,["worker-count","shard-total","test-count","hook-count","wait-count","span-types","live","onReset"]),n("div",{ref_key:"containerRef",ref:h,class:Y(["relative overflow-hidden rounded-lg border border-gray-200 dark:border-gray-700 touch-pan-y",{"cursor-grab":!e(F),"cursor-grabbing":e(F)}]),style:we({height:e(K)+"px"}),onWheel:b[1]||(b[1]=Ue((...ae)=>e(c)&&e(c)(...ae),["prevent"])),onPointerdown:b[2]||(b[2]=(...ae)=>e(f)&&e(f)(...ae)),onPointermove:b[3]||(b[3]=(...ae)=>e(M)&&e(M)(...ae)),onPointerup:b[4]||(b[4]=(...ae)=>e(C)&&e(C)(...ae)),onPointercancel:b[5]||(b[5]=(...ae)=>e(C)&&e(C)(...ae)),onPointerleave:b[6]||(b[6]=(...ae)=>e(C)&&e(C)(...ae))},[(s(),a("svg",{class:"overflow-visible",style:we({transform:`translateX(${e(P)}px)`}),width:e(j),height:e(K)},[b[7]||(b[7]=n("defs",null,[n("filter",{id:"glow"},[n("feGaussianBlur",{stdDeviation:"2.5",result:"blur"}),n("feMerge",null,[n("feMergeNode",{in:"blur"}),n("feMergeNode",{in:"SourceGraphic"})])])],-1)),l(ne,{"worker-rows":e(m),"shard-groups":e(R),"tick-marks":e($),"content-width":e(j),"shard-total":t.shardTotal},null,8,["worker-rows","shard-groups","tick-marks","content-width","shard-total"]),(s(!0),a(O,null,oe(E.value,ae=>(s(),w(ee,{key:ae.key,item:ae,x:e(U)(ae),y:e(S)(ae),width:e(p)(ae),onSelect:b[0]||(b[0]=he=>z("selectTestCase",he)),onHover:d,onMove:X,onLeave:te},null,8,["item","x","y","width"]))),128))],12,Ai))],38),l(xe,{item:fe.value,pos:r.value},null,8,["item","pos"])])):(s(),a("div",Ui,[l(be,{name:"i-lucide-rows-3",class:"size-8 mx-auto mb-2 text-gray-300 dark:text-gray-600"}),b[8]||(b[8]=n("p",null,"No worker data available for this run.",-1))]))}}}),Ei=Object.assign(Li,{__name:"WorkersTimeline"}),Oi={key:0,class:"space-y-4"},Ki={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Wi={class:"flex items-center gap-2 py-1.5"},Hi={class:"font-medium"},Vi={key:0,class:"flex"},Gi={key:1,class:"flex items-center justify-center py-6 text-gray-500 gap-2"},Xi={class:"flex flex-wrap gap-2 mt-1"},qi={class:"flex flex-wrap gap-4 text-sm"},Yi={key:3,class:"text-sm text-gray-500"},Ji={class:"flex flex-wrap gap-4 text-sm"},Zi={key:0,class:"text-gray-400"},Qi={key:0,class:"text-gray-400"},er={key:1,class:"text-gray-400"},tr={key:1,class:"text-gray-400"},sr={key:0,class:"text-gray-400"},nr={key:0,class:"text-gray-400"},ar={key:4,class:"text-center py-8 text-gray-500"},or={key:5,class:"text-center py-8 text-gray-500"},lr={key:1,class:"text-center py-10 text-gray-500"},ir=me({__name:"RunCompare",props:{testRun:{}},setup(t){const y=t,z=Ke().params.id,T=W(null),m=W([]),R=I(()=>y.testRun?.status==="running"||y.testRun?.status==="finalizing");de(()=>y.testRun?.projectId,async $=>{if(!(!$||R.value)){try{T.value=await $fetch(`/api/projects/${$}`)}catch(c){console.error("Failed to fetch project for RunCompare",c)}try{const c=await $fetch(`/api/projects/${$}/markers`);m.value=c.markers??[]}catch{}}},{immediate:!0});const u=I(()=>{if(!P.value||!y.testRun)return[];const $=new Date(P.value.startTime).getTime(),c=new Date(y.testRun.startTime).getTime(),f=Math.min($,c),M=Math.max($,c),C=new Set([P.value.environment,y.testRun.environment].filter(L=>L!=null));return m.value.filter(L=>{const k=new Date(L.occurredAt).getTime();return k<=f||k>=M?!1:L.environment==null||C.has(L.environment)})}),h=I(()=>T.value?.testRuns?T.value.testRuns.filter($=>$.id!==Number(z)).slice(0,50).map($=>({label:`Run #${$.id} — ${Tt($.startTime,{dateOnly:!0})} (${$.status})`,value:$.id})):[]),N=I(()=>{if(!T.value?.testRuns)return null;const $=[...T.value.testRuns].sort((f,M)=>new Date(M.startTime).getTime()-new Date(f.startTime).getTime()),c=$.findIndex(f=>f.id===Number(z));return c>=0&&c<$.length-1?$[c+1].id:null}),B=W(void 0),P=W(null),F=W(!1);de(B,async $=>{if(!$?.value){P.value=null;return}F.value=!0;try{P.value=await $fetch(`/api/test-runs/${$.value}`)}catch{}finally{F.value=!1}});function j(){if(N.value){const $=h.value.find(c=>c.value===N.value);$&&(B.value=$)}}const K=I(()=>y.testRun??null),{comparisonData:U,comparisonSummary:p}=Ms(P,K),S=[{accessorKey:"title",header:ue("Test case")},{accessorKey:"statusA",header:ue("Status A")},{accessorKey:"statusB",header:ue("Status B")},{accessorKey:"durationA",header:ue("Duration A")},{accessorKey:"durationB",header:ue("Duration B")},{accessorKey:"delta",header:ue("Delta")},{accessorKey:"percentChange",header:ue("Change")}];return($,c)=>{const f=Ds,M=Ns,C=Ce,L=ke,k=_t,G=Bs,Z=_e,se=We,Q=ct,le=Nt;return s(),a("div",null,[t.testRun&&!R.value?(s(),a("div",Oi,[n("div",Ki,[n("div",null,[c[1]||(c[1]=n("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Run A (baseline)",-1)),l(f,{modelValue:B.value,"onUpdate:modelValue":c[0]||(c[0]=E=>B.value=E),items:h.value,placeholder:"Select a baseline run..."},null,8,["modelValue","items"])]),n("div",null,[c[2]||(c[2]=n("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Run B (this run)",-1)),n("div",Wi,[l(M,{status:t.testRun.status},null,8,["status"]),n("span",Hi,"#"+o(t.testRun.id),1)])])]),N.value?(s(),a("div",Vi,[l(C,{icon:"i-lucide-arrow-left-right",size:"sm",variant:"outline",label:"Compare with previous run",onClick:j})])):g("",!0),F.value?(s(),a("div",Gi,[l(L,{name:"i-lucide-loader-2",class:"size-4 animate-spin"}),c[3]||(c[3]=n("span",null,"Loading baseline data...",-1))])):u.value.length>0?(s(),w(G,{key:2,color:"warning",variant:"subtle",icon:"i-lucide-milestone",title:`${u.value.length} timeline marker${u.value.length>1?"s":""} between these runs`},{description:i(()=>[n("div",Xi,[(s(!0),a(O,null,oe(u.value,E=>(s(),w(k,{key:E.id,marker:E,size:"sm"},null,8,["marker"]))),128))])]),_:1},8,["title"])):P.value&&e(U).length>0?(s(),a(O,{key:3},[n("div",qi,[c[4]||(c[4]=n("span",{class:"text-xs font-semibold text-gray-500 uppercase tracking-wider mr-1"},"Status",-1)),e(p).newFailures>0?(s(),w(Z,{key:0,color:"error",variant:"soft",size:"lg"},{default:i(()=>[_(o(e(p).newFailures)+" new failure"+o(e(p).newFailures>1?"s":""),1)]),_:1})):g("",!0),e(p).recovered>0?(s(),w(Z,{key:1,color:"success",variant:"soft",size:"lg"},{default:i(()=>[_(o(e(p).recovered)+" recovered ",1)]),_:1})):g("",!0),e(p).stillFailing>0?(s(),w(Z,{key:2,color:"warning",variant:"soft",size:"lg"},{default:i(()=>[_(o(e(p).stillFailing)+" still failing ",1)]),_:1})):g("",!0),e(p).newFailures===0&&e(p).recovered===0&&e(p).stillFailing===0?(s(),a("span",Yi,"No status changes")):g("",!0)]),n("div",Ji,[c[5]||(c[5]=n("span",{class:"text-xs font-semibold text-gray-500 uppercase tracking-wider mr-1"},"Duration changes",-1)),e(p).regressed>0?(s(),w(Z,{key:0,color:"error",variant:"soft",size:"lg"},{default:i(()=>[_(o(e(p).regressed)+" regressed ",1)]),_:1})):g("",!0),e(p).improved>0?(s(),w(Z,{key:1,color:"success",variant:"soft",size:"lg"},{default:i(()=>[_(o(e(p).improved)+" improved ",1)]),_:1})):g("",!0),l(Z,{color:"neutral",variant:"soft",size:"lg"},{default:i(()=>[_(o(e(p).unchanged)+" unchanged ",1)]),_:1})]),l(le,{"min-width":"48rem",bleed:!1},{default:i(()=>[l(Q,{data:e(U),columns:S,ui:{base:"table-fixed border-separate border-spacing-0 min-w-[48rem]",thead:"[&>tr]:bg-elevated/50 [&>tr]:after:content-none",tbody:"[&>tr]:last:[&>td]:border-b-0",th:"first:rounded-l-lg last:rounded-r-lg border-y border-default first:border-l last:border-r",td:"border-b border-default"}},{"statusA-cell":i(({row:E})=>[E.original.statusA?(s(),w(Z,{key:1,color:("getStatusColor"in $?$.getStatusColor:e(nt))(E.original.statusA),variant:"subtle",class:"capitalize"},{default:i(()=>[_(o(E.original.statusA),1)]),_:2},1032,["color"])):(s(),a("span",Zi,"—"))]),"statusB-cell":i(({row:E})=>[E.original.statusB?(s(),w(Z,{key:1,color:("getStatusColor"in $?$.getStatusColor:e(nt))(E.original.statusB),variant:"subtle",class:"capitalize"},{default:i(()=>[_(o(E.original.statusB),1)]),_:2},1032,["color"])):(s(),a("span",Qi,"—"))]),"durationA-cell":i(({row:E})=>[E.original.durationA!==null?(s(),w(se,{key:0,ms:E.original.durationA},null,8,["ms"])):(s(),a("span",er,"—"))]),"durationB-cell":i(({row:E})=>[E.original.durationB!==null?(s(),w(se,{key:0,ms:E.original.durationB},null,8,["ms"])):(s(),a("span",tr,"—"))]),"delta-cell":i(({row:E})=>[E.original.delta===null?(s(),a("span",sr,"—")):(s(),a("span",{key:1,class:Y(E.original.delta>0?"text-red-600":E.original.delta<0?"text-green-600":"text-gray-500")},[_(o(E.original.delta>0?"+":""),1),l(se,{ms:E.original.delta,"unit-class":"opacity-60"},null,8,["ms"])],2))]),"percentChange-cell":i(({row:E})=>[E.original.percentChange===null?(s(),a("span",nr,"—")):(s(),a("span",{key:1,class:Y(E.original.percentChange>10?"text-red-600 font-medium":E.original.percentChange<-10?"text-green-600 font-medium":"text-gray-500")},o(E.original.percentChange>0?"+":"")+o(E.original.percentChange)+"% ",3))]),_:1},8,["data"])]),_:1})],64)):B.value&&!F.value?(s(),a("div",ar,[l(L,{name:"i-lucide-git-compare-arrows",class:"size-8 mx-auto mb-2 text-gray-300 dark:text-gray-600"}),c[6]||(c[6]=n("p",null,"No comparison data available.",-1))])):(s(),a("div",or,[l(L,{name:"i-lucide-arrow-left-right",class:"size-8 mx-auto mb-2 text-gray-300 dark:text-gray-600"}),c[7]||(c[7]=n("p",null,"Select a baseline run to compare.",-1))]))])):R.value?(s(),a("div",lr,[l(L,{name:"i-lucide-git-compare-arrows",class:"size-8 mx-auto mb-2 text-gray-300 dark:text-gray-600"}),c[8]||(c[8]=n("p",null,"Comparison is available after the run finishes.",-1))])):g("",!0)])}}}),rr=Object.assign(ir,{__name:"RunCompare"}),ur={class:"flex flex-col overflow-hidden"},cr={key:0,class:"flex-1 flex items-center justify-center text-gray-500 gap-2"},dr={class:"text-xs font-mono break-all"},mr={key:0,class:"text-gray-400"},fr={key:1,class:"text-red-600 font-medium"},pr=me({__name:"SlowEndpoints",props:{refreshKey:{}},emits:["endpointsCount"],async setup(t,{emit:y}){let v,z;const m=Ke().params.id,R=t,u=y,{data:h,pending:N,refresh:B}=([v,z]=Le(()=>Ee(`/api/test-runs/${m}/network-requests`,{lazy:!0,server:!1},"$QlrRz6EqI4")),v=await v,z(),v);de(h,F=>{u("endpointsCount",F?.length??0)}),de(()=>R.refreshKey,(F,j)=>{F!==j&&F!==void 0&&B()});const P=[{accessorKey:"method",header:ue("Method")},{accessorKey:"route",header:ue("Route")},{accessorKey:"count",header:ue("Calls")},{accessorKey:"avgDuration",header:ue("Avg")},{accessorKey:"p90Duration",header:ue("P90")},{accessorKey:"maxDuration",header:ue("Max")},{accessorKey:"errorRate",header:ue("Errors")}];return(F,j)=>{const K=ke,U=_e,p=We,S=ct,$=As;return s(),a("div",ur,[e(N)?(s(),a("div",cr,[l(K,{name:"i-lucide-loader-2",class:"size-4 animate-spin"}),j[0]||(j[0]=n("span",null,"Loading network data...",-1))])):e(h)&&e(h).length>0?(s(),w(S,{key:1,sticky:"",data:e(h),columns:P,class:"flex-1 min-h-0",ui:{base:"table-fixed border-separate border-spacing-0 min-w-[44rem]",thead:"[&>tr]:bg-elevated/50 [&>tr]:after:content-none",tbody:"[&>tr]:last:[&>td]:border-b-0 [&>tr]:hover:bg-gray-50 dark:[&>tr]:hover:bg-gray-900/50",th:"first:rounded-l-lg last:rounded-r-lg border-y border-default first:border-l last:border-r",td:"border-b border-default"}},{"method-cell":i(({row:c})=>[l(U,{color:c.original.method==="GET"?"info":c.original.method==="POST"?"success":c.original.method==="PUT"||c.original.method==="PATCH"?"warning":c.original.method==="DELETE"?"error":"neutral",variant:"soft",class:"font-mono text-xs"},{default:i(()=>[_(o(c.original.method),1)]),_:2},1032,["color"])]),"route-cell":i(({row:c})=>[n("code",dr,o(c.original.route),1)]),"avgDuration-cell":i(({row:c})=>[n("span",{class:Y(c.original.avgDuration>1e3?"text-red-600 font-medium":c.original.avgDuration>500?"text-orange-500 font-medium":"")},[l(p,{ms:c.original.avgDuration,"unit-class":"opacity-60"},null,8,["ms"])],2)]),"p90Duration-cell":i(({row:c})=>[n("span",{class:Y(c.original.p90Duration>2e3?"text-red-600 font-medium":c.original.p90Duration>1e3?"text-orange-500":"")},[l(p,{ms:c.original.p90Duration,"unit-class":"opacity-60"},null,8,["ms"])],2)]),"errorRate-cell":i(({row:c})=>[c.original.errorRate===0?(s(),a("span",mr,"0%")):(s(),a("span",fr,o(c.original.errorRate)+"%",1))]),_:1},8,["data"])):(s(),w($,{key:2,class:"flex-1",icon:"i-lucide-wifi-off",title:"No network requests captured",text:"Slow endpoints need the Piwi capture fixtures — extend your Playwright test with piwiFixtures and request timing rides along with every run.",doc:"capture-fixtures"}))])}}}),gr=Object.assign(pr,{__name:"SlowEndpoints"}),xr={class:"inline-flex items-center justify-center w-5 h-5 rounded-full bg-blue-500/10 hover:bg-blue-500/20 transition-colors ml-1"},yr={key:0,class:"flex items-center gap-2 mb-3 shrink-0"},Cu=me({__name:"[id]",async setup(t){let y,v;const z=Ke(),T=rs(),m=z.params.id,R=!!ot().public.demoMode,{data:u,refresh:h}=([y,v]=Le(()=>Ee(`/api/test-runs/${m}`,"$JCybzNzO0T")),y=await y,v(),y),N=u.value?.projectId,{data:B,refresh:P}=N?([y,v]=Le(()=>Ee(`/api/projects/${N}/latest-run`,{key:`latest-run-${N}`},"$26uPrJhWGK")),y=await y,v(),y):{data:W(null),refresh:async()=>{}};Us(P);const F=I(()=>B.value?.id??u.value?.project?.latestRunId??null),j=I(()=>B.value?.status??u.value?.project?.latestRunStatus??null),K=I(()=>j.value==="running"||j.value==="finalizing");us(I(()=>({title:`Test run #${m}${u.value?.project?` — ${u.value.project.name}`:""} — Piwi Dashboard`})));const U=vt(),p=W(!1),S=W(!1),$=I(()=>u.value?.status==="running"||u.value?.status==="finalizing"),c=W(!1),f=W([]),M=new Map,C=W(null);let L=null;const k=W([]);de([$,u],()=>{$.value&&f.value.length>0?k.value=[...f.value]:u.value?.testCases?k.value=u.value.testCases:k.value=[]},{immediate:!0});function G(A){for(const V of A){const re=`${V.title}@@${V.location}@@${JSON.stringify(V.browser)}`;M.has(re)||(M.set(re,!0),f.value=[...f.value,V])}k.value=[...f.value]}let Z=[],se=null;function Q(){if(Z.length===0)return;const A=Z;Z=[];for(const V of A){const re=V.data;if(V.type==="init")C.value={totalTests:re.totalTests,passedTests:re.passedTests,failedTests:re.failedTests,skippedTests:re.skippedTests};else if(V.type==="test-begin"){const q=re;if(q.stepCategory)continue;const ze=`${q.title}@@${q.location}@@${JSON.stringify(q.browser)}`;M.has(ze)||(M.set(ze,!0),f.value=[...f.value,{id:f.value.length+1,title:q.title,filePath:q.filePath,suitePath:q.suitePath??void 0,status:"running",location:q.location,workerIndex:q.workerIndex??null,startedAt:q.startedAt??Date.now(),browser:q.browser??null}],k.value=[...f.value])}else if(V.type==="test-completed"){const q=re;if(q.stepCategory)continue;const ze=`${q.title}@@${q.location}@@${JSON.stringify(q.browser)}`;if(M.has(ze)){const Me=f.value.findIndex(ye=>`${ye.title}@@${ye.location}@@${JSON.stringify(ye.browser)}`===ze);if(Me>=0){const ye=f.value[Me],Ae=[...f.value];Ae[Me]={...ye,filePath:q.filePath??ye.filePath,suitePath:q.suitePath??ye.suitePath,status:q.status,duration:q.duration,error:q.error,stepEvents:q.stepEvents??ye.stepEvents,wastedTimeMs:q.wastedTimeMs??ye.wastedTimeMs,workerIndex:q.workerIndex??ye.workerIndex,startedAt:q.startedAt?q.startedAt:ye.startedAt,browser:q.browser??ye.browser},f.value=Ae,k.value=[...Ae]}}else M.set(ze,!0),f.value=[...f.value,{id:f.value.length+1,title:q.title,filePath:q.filePath,suitePath:q.suitePath??void 0,status:q.status,duration:q.duration,location:q.location,error:q.error,stepEvents:q.stepEvents??null,wastedTimeMs:q.wastedTimeMs??null,workerIndex:q.workerIndex??null,startedAt:q.startedAt??void 0,browser:q.browser??null}],k.value=[...f.value]}else V.type==="run-progress"?C.value=re:V.type==="run-finalizing"?(c.value=!0,C.value=re):V.type==="run-finished"&&(c.value=!1,r(),h(),ge.value++,le())}}function le(A=0){R||A>=5||setTimeout(async()=>{await h(),le(A+1)},1500*(A+1))}function E(A){Z.push(A),se&&clearTimeout(se),se=setTimeout(Q,200)}let D=null;function ve(){D||(u.value?.testCases?.length&&G(u.value.testCases),D=Ls(A=>{A.scope==="run"&&A.runId===Number(m)?E(A.event):A.scope==="global"&&A.event.runId===Number(m)&&A.event.type==="run-started"&&h()}))}function fe(){if(R){ve();return}L||$.value&&(u.value?.testCases?.length&&G(u.value.testCases),L=new EventSource(`/api/test-runs/${m}/stream`),L.onmessage=A=>{try{E(JSON.parse(A.data))}catch{}},L.onerror=()=>{})}function r(){L&&(L.close(),L=null),D&&(D(),D=null)}const d=I(()=>$.value||R&&u.value?.status==="initialising");de(d,A=>{A?fe():r()},{immediate:!0}),bt(()=>{r()});let X=null;const te=W([]);de(k,A=>{X===null&&(X=requestAnimationFrame(()=>{te.value=A,X=null}))},{immediate:!0});const J=I(()=>$.value&&C.value?C.value:u.value?{totalTests:u.value.totalTests,passedTests:u.value.passedTests,failedTests:u.value.failedTests,skippedTests:u.value.skippedTests}:null);async function b(){p.value=!1,S.value=!0;try{await $fetch(`/api/test-runs/${m}`,{method:"DELETE"}),U.add({title:"Test run deleted",color:"success"}),await Xe(`/projects/${u.value?.project?.id}`)}catch(A){const V=A&&typeof A=="object"&&"data"in A?A.data?.message:void 0;U.add({title:"Delete failed",description:V||"An error occurred",color:"error"})}finally{S.value=!1}}const H=W(!1),ne=W(""),ee=W([]),xe=W("all"),be=I(()=>ee.value.length===1?ee.value[0]:"all");function ae(A){ee.value=!A||A==="all"?[]:[A]}const he=I(()=>u.value?.reports||[]),Te=I(()=>{const A=k.value;return A?A.reduce((V,re)=>V+(re.wastedTimeMs??0),0):0}),pe=W("test-cases"),Re=W(null),ge=W(0),Se=W(0);function x(){Re.value=null}const $e=I(()=>u.value&&u.value.failedTests>0),Be=I(()=>{if(!u.value?.testCases)return 0;const A=new Set;for(const V of u.value.testCases)V.failureClusterId!=null&&A.add(V.failureClusterId);return A.size}),Fe=I(()=>{const A=$.value?k.value:u.value?.testCases;if(!A||A.length===0)return 0;const V=new Set;for(const re of A)re.workerIndex!=null&&re.workerIndex>=0&&V.add(re.workerIndex);return V.size}),ie=I(()=>[{label:`Test cases (${k.value.length})`,icon:"i-lucide-beaker",value:"test-cases",slot:"test-cases"},{label:"Insights",icon:"i-lucide-sparkles",value:"insights",slot:"insights"},{label:$e.value?`Failure groups (${Be.value})`:"Failure groups",icon:"i-lucide-layers",value:"failure-groups",slot:"failure-groups",disabled:!$e.value},{label:"Regression",icon:"i-lucide-git-pull-request-arrow",value:"regression",slot:"regression",disabled:!$e.value},{label:`Timeline${Fe.value>0?` (${Fe.value})`:""}`,icon:"i-lucide-timeline",value:"workers",slot:"workers"},{label:"Compare",icon:"i-lucide-git-compare-arrows",value:"compare",slot:"compare"},{label:`Slow endpoints${Se.value>0?` (${Se.value})`:""}`,icon:"i-lucide-network",value:"endpoints",slot:"endpoints"}]),dt={"test-cases":"overflow-hidden flex flex-col",endpoints:"overflow-hidden flex flex-col"},mt=I(()=>ie.value.filter(A=>!A.disabled).map(A=>A.value));typeof z.query.tab=="string"&&mt.value.includes(z.query.tab)&&(pe.value=z.query.tab),de(mt,A=>{A.includes(pe.value)||(pe.value="test-cases")}),de(pe,A=>{z.query.tab!==A&&T.replace({query:{...z.query,tab:A}})});const ft=W(null);function Lt(A){pe.value="test-cases",Ne(()=>{ft.value?.scrollToCase(A)})}function Et(A){Re.value=A,pe.value="test-cases"}return(A,V)=>{const re=ss,q=Oe,ze=ke,Me=wt,ye=cs,Ae=ds,Ot=fs,Kt=Jn,Wt=_e,Ze=Ce,Ht=Xa,Vt=Vo,Gt=xl,Xt=Hl,qt=Ei,Yt=rr,Jt=gr,Zt=ys,Qt=ms,es=Bt,ts=lt;return s(),a(O,null,[l(Qt,{id:"test-run-detail"},{header:i(()=>[l(Ot,null,{leading:i(()=>[l(re),l(ye,{items:[{label:"Home",icon:"i-lucide-house",to:"/"},{label:"Projects",to:"/projects"},...e(u)?.project?.id?[{label:e(u).project.label||e(u).project.name||"Project",to:`/projects/${e(u).project.id}`,slot:"project"}]:[{label:"Project"}],{label:`Run #${e(m)}`+(e(u)?.label?` — ${e(u).label}`:"")}]},{project:i(({item:ce})=>[l(q,{to:ce?.to,class:"text-sm font-medium text-[var(--ui-text-muted)] hover:text-[var(--ui-text)] transition-colors"},{default:i(()=>[_(o(ce?.label),1)]),_:2},1032,["to"]),F.value&&F.value!==Number(e(m))?(s(),w(Me,{key:0,text:K.value?"Go to running run":"Go to latest run"},{default:i(()=>[l(q,{to:`/test-runs/${F.value}`},{default:i(()=>[n("span",xr,[l(ze,{name:"i-lucide-circle-play",class:Y(["w-3.5 h-3.5 text-blue-500",{"animate-pulse":K.value}])},null,8,["class"])])]),_:1},8,["to"])]),_:1},8,["text"])):g("",!0)]),_:1},8,["items"])]),right:i(()=>[l(Ae,{actions:[{label:"Refresh",icon:"i-lucide-refresh-cw",onClick:()=>e(h)()},{label:"Delete",icon:"i-lucide-trash-2",color:"error",variant:"soft",loading:e(S),onClick:()=>p.value=!0}]},null,8,["actions"])]),_:1})]),body:i(()=>[l(Zt,{modelValue:e(pe),"onUpdate:modelValue":V[5]||(V[5]=ce=>Pe(pe)?pe.value=ce:null),"tab-items":ie.value,"tab-panel-class":dt},{summary:i(()=>[e(u)?(s(),w(Kt,{key:0,"test-run":e(u),"display-progress":J.value,"all-reports":he.value,"show-custom-data":e(H),finalizing:e(c),"active-filter":be.value,"total-wasted-time":Te.value,"onUpdate:showCustomData":V[0]||(V[0]=ce=>H.value=ce),onFilterStatus:ae,onLabelUpdated:e(h)},null,8,["test-run","display-progress","all-reports","show-custom-data","finalizing","active-filter","total-wasted-time","onLabelUpdated"])):g("",!0)]),"tab-test-cases":i(()=>[e(Re)!=null?(s(),a("div",yr,[l(Wt,{color:"info",variant:"subtle",size:"sm"},{default:i(()=>[...V[8]||(V[8]=[_(" Filtered by failure group ",-1)])]),_:1}),l(Ze,{size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-x",label:"Clear filter",onClick:x})])):g("",!0),l(Ht,{ref_key:"testCasesListRef",ref:ft,search:e(ne),"onUpdate:search":V[1]||(V[1]=ce=>Pe(ne)?ne.value=ce:null),"active-statuses":e(ee),"onUpdate:activeStatuses":V[2]||(V[2]=ce=>Pe(ee)?ee.value=ce:null),"browser-filter":e(xe),"onUpdate:browserFilter":V[3]||(V[3]=ce=>Pe(xe)?xe.value=ce:null),"test-cases":e(k),suites:e(u)?.suites??[],"is-live":$.value,"failure-cluster-filter":e(Re),"project-key":e(u)?.projectId,"project-name":e(u)?.project?.name,class:"flex-1 min-h-0"},null,8,["search","active-statuses","browser-filter","test-cases","suites","is-live","failure-cluster-filter","project-key","project-name"])]),"tab-insights":i(()=>[l(Vt,{"test-run-id":Number(e(m)),"run-status":e(u)?.status??"","refresh-key":e(ge),class:"flex-1 min-h-0 p-4"},null,8,["test-run-id","run-status","refresh-key"])]),"tab-failure-groups":i(()=>[l(Gt,{"refresh-key":e(ge),onSelectCluster:Et},null,8,["refresh-key"])]),"tab-regression":i(()=>[l(Xt,{"refresh-key":e(ge)},null,8,["refresh-key"])]),"tab-workers":i(()=>[l(qt,{"test-cases":e(te),"setup-steps":e(u)?.setupSteps??null,"shard-total":e(u)?.shardTotal??null,live:$.value,"wasted-patterns":e(u)?.wastedWaitPatterns??null,onSelectTestCase:Lt},null,8,["test-cases","setup-steps","shard-total","live","wasted-patterns"])]),"tab-compare":i(()=>[l(Yt,{"test-run":e(u)},null,8,["test-run"])]),"tab-endpoints":i(()=>[l(Jt,{"refresh-key":e(ge),class:"flex-1 min-h-0",onEndpointsCount:V[4]||(V[4]=ce=>Se.value=ce)},null,8,["refresh-key"])]),_:1},8,["modelValue","tab-items"])]),_:1}),l(ts,null,{default:i(()=>[l(es,{open:e(p),title:"Delete test run","onUpdate:open":V[7]||(V[7]=ce=>p.value=ce)},{body:i(()=>[n("p",null,[V[9]||(V[9]=_(" Are you sure you want to delete ",-1)),n("strong",null,"Test Run #"+o(e(u)?.id),1),V[10]||(V[10]=_("? This will also remove all associated test results, reports, and traces. This action cannot be undone. ",-1))])]),footer:i(()=>[l(Ze,{color:"neutral",variant:"ghost",label:"Cancel",onClick:V[6]||(V[6]=ce=>p.value=!1)}),l(Ze,{color:"error",label:"Delete",icon:"i-lucide-trash-2",loading:e(S),onClick:b},null,8,["loading"])]),_:1},8,["open"])]),_:1})],64)}}});export{Cu as default};
@@ -0,0 +1 @@
1
+ import{d as m,a as h,o as l,e as p,W as o,bX as g,bp as E,v as d,c,l as B,F as f,z as V}from"./BzBaMPgu.js";var k=m({inheritAttrs:!1,__name:"VisuallyHiddenInputBubble",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(i){const e=i,{primitiveElement:s,currentElement:n}=E(),t=d(()=>e.checked??e.value);return h(t,(a,r)=>{if(!n.value)return;const u=n.value,b=window.HTMLInputElement.prototype,v=Object.getOwnPropertyDescriptor(b,"value").set;if(v&&a!==r){const _=new Event("input",{bubbles:!0}),q=new Event("change",{bubbles:!0});v.call(u,a),u.dispatchEvent(_),u.dispatchEvent(q)}}),(a,r)=>(l(),p(g,o({ref_key:"primitiveElement",ref:s},{...e,...a.$attrs},{as:"input"}),null,16))}}),y=k,A=m({inheritAttrs:!1,__name:"VisuallyHiddenInput",props:{name:{type:String,required:!0},value:{type:null,required:!0},checked:{type:Boolean,required:!1,default:void 0},required:{type:Boolean,required:!1},disabled:{type:Boolean,required:!1},feature:{type:String,required:!1,default:"fully-hidden"}},setup(i){const e=i,s=d(()=>typeof e.value=="object"&&Array.isArray(e.value)&&e.value.length===0&&e.required),n=d(()=>typeof e.value=="string"||typeof e.value=="number"||typeof e.value=="boolean"||e.value===null||e.value===void 0?[{name:e.name,value:e.value}]:typeof e.value=="object"&&Array.isArray(e.value)?e.value.flatMap((t,a)=>typeof t=="object"?Object.entries(t).map(([r,u])=>({name:`${e.name}[${a}][${r}]`,value:u})):{name:`${e.name}[${a}]`,value:t}):e.value!==null&&typeof e.value=="object"&&!Array.isArray(e.value)?Object.entries(e.value).map(([t,a])=>({name:`${e.name}[${t}]`,value:a})):[]);return(t,a)=>(l(),c(f,null,[B(" We render single input if it's required "),s.value?(l(),p(y,o({key:t.name},{...e,...t.$attrs},{name:t.name,value:t.value}),null,16,["name","value"])):(l(!0),c(f,{key:1},V(n.value,r=>(l(),p(y,o({key:r.name},{ref_for:!0},{...e,...t.$attrs},{name:r.name,value:r.value}),null,16,["name","value"]))),128))],2112))}}),I=A;export{I as V};