@piwitests/server 0.26.0 → 0.26.1

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 (382) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{BdQ7kfxJ.js → 1QWBzxLM.js} +4 -4
  3. package/.output/public/_nuxt/{CY1UsEbI.js → 4hW9LHwA.js} +1 -1
  4. package/.output/public/_nuxt/96uxfdYT.js +1 -0
  5. package/.output/public/_nuxt/{HGYIpJtg.js → AbnDY6Zr.js} +1 -1
  6. package/.output/public/_nuxt/{CZ6WR7uw.js → B-1zt4pp.js} +1 -1
  7. package/.output/public/_nuxt/{Sx5-c-bZ.js → B1iYmAt_.js} +1 -1
  8. package/.output/public/_nuxt/{CbzgEkmW.js → B2bxEmbR.js} +1 -1
  9. package/.output/public/_nuxt/B3hAvaCe.js +4 -0
  10. package/.output/public/_nuxt/{CyWOerIG.js → B4lvHjBe.js} +1 -1
  11. package/.output/public/_nuxt/B5S7BkC3.js +1 -0
  12. package/.output/public/_nuxt/{Bb_1uAHn.js → B6j5Ornu.js} +1 -1
  13. package/.output/public/_nuxt/{CrsaY0R_.js → B82vqOZe.js} +1 -1
  14. package/.output/public/_nuxt/{CTFUlsXp.js → B9oXlGro.js} +1 -1
  15. package/.output/public/_nuxt/{CsJ9Ce4U.js → BABCH5kE.js} +1 -1
  16. package/.output/public/_nuxt/{Gn1Ns00e.js → BF5qB58w.js} +1 -1
  17. package/.output/public/_nuxt/{CsGsLxHg.js → BFLa9ZEP.js} +1 -1
  18. package/.output/public/_nuxt/BIlohx1E.js +1 -0
  19. package/.output/public/_nuxt/{B6djubIK.js → BM5C-Oec.js} +1 -1
  20. package/.output/public/_nuxt/{CrZhoZuI.js → BOA-I6S9.js} +1 -1
  21. package/.output/public/_nuxt/{Bp2zrrkV.js → BQUhoGCh.js} +1 -1
  22. package/.output/public/_nuxt/{DUC3QnqW.js → BQYLGX9o.js} +1 -1
  23. package/.output/public/_nuxt/{CUjzhXN1.js → BRMeEHXd.js} +1 -1
  24. package/.output/public/_nuxt/{Cf_a8ynB.js → BRtaKOKv.js} +2 -2
  25. package/.output/public/_nuxt/{B7uPoZ7T.js → BS91Og__.js} +1 -1
  26. package/.output/public/_nuxt/{DKgbchez.js → BTGAvMoT.js} +1 -1
  27. package/.output/public/_nuxt/{BIamiwb7.js → BaLX92Wz.js} +1 -1
  28. package/.output/public/_nuxt/{LWIyaZKe.js → Bc6Zr-Xn.js} +1 -1
  29. package/.output/public/_nuxt/{R7AVOWi_.js → BceMEnJt.js} +1 -1
  30. package/.output/public/_nuxt/{Q2oJNyXL.js → BeCAVtCK.js} +1 -1
  31. package/.output/public/_nuxt/{D_SD71Qf.js → Bf119e7x.js} +1 -1
  32. package/.output/public/_nuxt/BfRcdz11.js +9 -0
  33. package/.output/public/_nuxt/{CxwnFFD0.js → Bl0xzETD.js} +1 -1
  34. package/.output/public/_nuxt/{C_eXufkv.js → BnUQ3i5l.js} +1 -1
  35. package/.output/public/_nuxt/{rPG7kzfL.js → Bp1WeQ0_.js} +1 -1
  36. package/.output/public/_nuxt/{BL8cYWsR.js → Bp31ZRcA.js} +1 -1
  37. package/.output/public/_nuxt/{Drh1_ASq.js → BrxUH8qL.js} +1 -1
  38. package/.output/public/_nuxt/{D72Ce8Ff.js → BsdfEbVC.js} +1 -1
  39. package/.output/public/_nuxt/BtGI4ZbP.js +1 -0
  40. package/.output/public/_nuxt/{BV8EzO8q.js → BuMX-4RF.js} +1 -1
  41. package/.output/public/_nuxt/{DPPhFZOr.js → BuXJR5tn.js} +1 -1
  42. package/.output/public/_nuxt/{Bh2WA4IJ.js → Bx_lfKHl.js} +1 -1
  43. package/.output/public/_nuxt/{vcSKeWsW.js → C4UKyPQn.js} +1 -1
  44. package/.output/public/_nuxt/{IoE3eJ9F.js → C9XCTbtQ.js} +1 -1
  45. package/.output/public/_nuxt/{BilJoEne.js → CEPU6VkU.js} +1 -1
  46. package/.output/public/_nuxt/CHz7LJIX.js +1 -0
  47. package/.output/public/_nuxt/{BPhGDGAR.js → CMhd8IBr.js} +1 -1
  48. package/.output/public/_nuxt/{C5X_N4R7.js → CN1M6i4K.js} +33 -33
  49. package/.output/public/_nuxt/CQLkowA3.js +1 -0
  50. package/.output/public/_nuxt/{DTtizz85.js → CU_2YLhT.js} +1 -1
  51. package/.output/public/_nuxt/{CMVTTE_g.js → CXkXHtcx.js} +1 -1
  52. package/.output/public/_nuxt/{igDJCTgt.js → CZeKW-zP.js} +1 -1
  53. package/.output/public/_nuxt/{9oKY4Zb7.js → CapSEET7.js} +1 -1
  54. package/.output/public/_nuxt/{j2eGYaRa.js → CeExxGSu.js} +1 -1
  55. package/.output/public/_nuxt/{CEgRB8H9.js → CfwpqSe7.js} +1 -1
  56. package/.output/public/_nuxt/{CFKbXp6V.js → ChOtLYkd.js} +1 -1
  57. package/.output/public/_nuxt/ChuJzPWz.js +1 -0
  58. package/.output/public/_nuxt/{Bo73sAu8.js → CiCUZGFZ.js} +1 -1
  59. package/.output/public/_nuxt/{C6R4tyud.js → CkL_oDa8.js} +1 -1
  60. package/.output/public/_nuxt/{DtGJeysS.js → CkhOMiiO.js} +1 -1
  61. package/.output/public/_nuxt/ClmHMP65.js +2 -0
  62. package/.output/public/_nuxt/{BtcDY0Du.js → Cnm0d_7S.js} +1 -1
  63. package/.output/public/_nuxt/{CK2AMqz_.js → CtQMagSz.js} +1 -1
  64. package/.output/public/_nuxt/{B1KjIR-q.js → Ctnn3S3-.js} +1 -1
  65. package/.output/public/_nuxt/{DCeZxpxe.js → CywiLuOD.js} +4 -4
  66. package/.output/public/_nuxt/{oA84LLqO.js → CzRkZLB4.js} +1 -1
  67. package/.output/public/_nuxt/CzyCEdYP.js +1 -0
  68. package/.output/public/_nuxt/{D56yp7m9.js → D-F0Rhjj.js} +1 -1
  69. package/.output/public/_nuxt/D4mPjHHR.js +2 -0
  70. package/.output/public/_nuxt/{BsGvSoPC.js → D4v7lLm3.js} +1 -1
  71. package/.output/public/_nuxt/{CxRTKV-K.js → D6B0WKO0.js} +1 -1
  72. package/.output/public/_nuxt/{jv8U_Tup.js → DAg6jtav.js} +1 -1
  73. package/.output/public/_nuxt/DBXXb0w8.js +1 -0
  74. package/.output/public/_nuxt/{ChlP20A5.js → DHN2t5Vt.js} +1 -1
  75. package/.output/public/_nuxt/{B8tezsWe.js → DJKHXfNS.js} +1 -1
  76. package/.output/public/_nuxt/{CFg5qdS0.js → DMqAUHFN.js} +1 -1
  77. package/.output/public/_nuxt/{C9A3sPDo.js → DURme_kn.js} +1 -1
  78. package/.output/public/_nuxt/{C2hIM5f9.js → DVo_e_uj.js} +1 -1
  79. package/.output/public/_nuxt/{DKhqIou2.js → DXh8q5KY.js} +1 -1
  80. package/.output/public/_nuxt/{CZXeJs2k.js → DXz1Kb4-.js} +1 -1
  81. package/.output/public/_nuxt/{CPrVhXJk.js → DYdwHaco.js} +1 -1
  82. package/.output/public/_nuxt/{WZXZeGYt.js → D_ZAGxCQ.js} +1 -1
  83. package/.output/public/_nuxt/{D5SN7rPK.js → D_dhjJvR.js} +1 -1
  84. package/.output/public/_nuxt/{DR1jFptD.js → DamZHy5M.js} +1 -1
  85. package/.output/public/_nuxt/{xKX9IHe3.js → DbtjJCra.js} +1 -1
  86. package/.output/public/_nuxt/{r6zkA1SE.js → DcOlL-oi.js} +1 -1
  87. package/.output/public/_nuxt/{CxspCKpR.js → DeQ9sIia.js} +1 -1
  88. package/.output/public/_nuxt/{BkHJoHpc.js → DjX1bLZD.js} +1 -1
  89. package/.output/public/_nuxt/{Be0bwdsi.js → Dly7wCCl.js} +1 -1
  90. package/.output/public/_nuxt/DmeogbGY.js +1 -0
  91. package/.output/public/_nuxt/{CfV2N201.js → Dn_-RkxP.js} +1 -1
  92. package/.output/public/_nuxt/{dg6uXTyR.js → DoDo3VF2.js} +1 -1
  93. package/.output/public/_nuxt/{BMlKQMjM.js → DoVHTl-K.js} +1 -1
  94. package/.output/public/_nuxt/DpM8IgHL.js +1 -0
  95. package/.output/public/_nuxt/{B4NjylBn.js → Dpwj_1H5.js} +1 -1
  96. package/.output/public/_nuxt/{DzJa19LG.js → DvSHenmZ.js} +1 -1
  97. package/.output/public/_nuxt/DvYU87_a.js +1 -0
  98. package/.output/public/_nuxt/{G2J1dVVb.js → Dx41arC8.js} +1 -1
  99. package/.output/public/_nuxt/DxBrlj7b.js +1 -0
  100. package/.output/public/_nuxt/{r-HZNbp3.js → JNpNdV-o.js} +1 -1
  101. package/.output/public/_nuxt/Lz9MmwKY.js +1 -0
  102. package/.output/public/_nuxt/OMI0cmZ0.js +1 -0
  103. package/.output/public/_nuxt/{CUWrUpTl.js → UAmyrRCI.js} +1 -1
  104. package/.output/public/_nuxt/{EJllK0wm.js → VBTxfbqU.js} +1 -1
  105. package/.output/public/_nuxt/VbedPPFH.js +1 -0
  106. package/.output/public/_nuxt/{BY9A1aOT.js → _okd7MfH.js} +1 -1
  107. package/.output/public/_nuxt/{BOn5q0rT.js → bmAf49LT.js} +1 -1
  108. package/.output/public/_nuxt/builds/latest.json +1 -1
  109. package/.output/public/_nuxt/builds/meta/0174ebd8-8fa5-4698-aa79-7a8dd2f6527f.json +1 -0
  110. package/.output/public/_nuxt/{D0XWJGhG.js → e-GZmCeP.js} +1 -1
  111. package/.output/public/_nuxt/entry.Dv52uAyn.css +1 -0
  112. package/.output/public/_nuxt/{DVIIj6Vv.js → f9TbT3AM.js} +1 -1
  113. package/.output/public/_nuxt/gdlHFfN6.js +1 -0
  114. package/.output/public/_nuxt/{BTG_PmM5.js → huBoAZeM.js} +1 -1
  115. package/.output/public/_nuxt/{DadksxQ9.js → mYw4b7uY.js} +1 -1
  116. package/.output/public/_nuxt/{B0eHOux4.js → mi7tdFxN.js} +1 -1
  117. package/.output/public/_nuxt/sFe4Zr5j.js +1 -0
  118. package/.output/public/_nuxt/{CLrLFf3s.js → uspGXbik.js} +1 -1
  119. package/.output/public/_nuxt/{DLN-CQXF.js → w7KxwWEv.js} +1 -1
  120. package/.output/public/_nuxt/{Bp55g9gr.js → wa4k1aDz.js} +1 -1
  121. package/.output/public/_nuxt/{C2yZcDch.js → xuB8n0QL.js} +1 -1
  122. package/.output/public/favicon.ico +0 -0
  123. package/.output/public/trace-viewer/assets/codeMirrorModule-LEHpjmcn.js +32 -0
  124. package/.output/public/trace-viewer/assets/defaultSettingsView-BNmKHKpQ.js +264 -0
  125. package/.output/public/trace-viewer/assets/urlMatch-BYQrIQwR.js +1 -0
  126. package/.output/public/trace-viewer/assets/xtermModule-CsJ4vdCR.js +9 -0
  127. package/.output/public/trace-viewer/codeMirrorModule.DYBRYzYX.css +1 -0
  128. package/.output/public/trace-viewer/codicon.DCmgc-ay.ttf +0 -0
  129. package/.output/public/trace-viewer/defaultSettingsView.CjdS-WJx.css +1 -0
  130. package/.output/public/trace-viewer/index.CzXZzn5A.css +1 -0
  131. package/.output/public/trace-viewer/index.DMMX1gXU.js +2 -0
  132. package/.output/public/trace-viewer/index.html +44 -0
  133. package/.output/public/trace-viewer/manifest.webmanifest +16 -0
  134. package/.output/public/trace-viewer/playwright-logo.svg +9 -0
  135. package/.output/public/trace-viewer/snapshot.html +10 -0
  136. package/.output/public/trace-viewer/snapshot.v8KI4P3m.js +2 -0
  137. package/.output/public/trace-viewer/sw.bundle.js +5 -0
  138. package/.output/public/trace-viewer/uiMode.BZQ54Kgt.css +1 -0
  139. package/.output/public/trace-viewer/uiMode.Ut8wwJNp.js +6 -0
  140. package/.output/public/trace-viewer/uiMode.html +18 -0
  141. package/.output/public/trace-viewer/xtermModule.DYP7pi_n.css +32 -0
  142. package/.output/server/chunks/_/users.mjs +1 -1
  143. package/.output/server/chunks/build/{BreadcrumbNav-DBnGj5Jq.mjs → BreadcrumbNav-Bg4QGX0k.mjs} +11 -4
  144. package/.output/server/chunks/build/BreadcrumbNav-Bg4QGX0k.mjs.map +1 -0
  145. package/.output/server/chunks/build/{BrowserBadge-vFb1ERG_.mjs → BrowserBadge-yMgLTBUu.mjs} +17 -9
  146. package/.output/server/chunks/build/BrowserBadge-yMgLTBUu.mjs.map +1 -0
  147. package/.output/server/chunks/build/{ChartMarkerLines-BXqUpUcs.mjs → ChartMarkerLines-D0cTRlxF.mjs} +3 -3
  148. package/.output/server/chunks/build/ChartMarkerLines-D0cTRlxF.mjs.map +1 -0
  149. package/.output/server/chunks/build/{ChartTooltip-DoF6Smyc.mjs → ChartTooltip-B2t6VYYH.mjs} +3 -3
  150. package/.output/server/chunks/build/ChartTooltip-B2t6VYYH.mjs.map +1 -0
  151. package/.output/server/chunks/build/Checkbox-ChSYhiUz.mjs +1 -1
  152. package/.output/server/chunks/build/ClientDate-U97Z1p6-.mjs +32 -0
  153. package/.output/server/chunks/build/ClientDate-U97Z1p6-.mjs.map +1 -0
  154. package/.output/server/chunks/build/{CodeBlock-CmvKHaq8.mjs → CodeBlock-DuWhmcI2.mjs} +3 -3
  155. package/.output/server/chunks/build/CodeBlock-DuWhmcI2.mjs.map +1 -0
  156. package/.output/server/chunks/build/DashboardSidebarToggle-a5KYecZ0.mjs +1 -1
  157. package/.output/server/chunks/build/DashboardToolbar-BZoGc0ri.mjs +72 -0
  158. package/.output/server/chunks/build/DashboardToolbar-BZoGc0ri.mjs.map +1 -0
  159. package/.output/server/chunks/build/{DataLocationCard-ChV02QJj.mjs → DataLocationCard-DCdhQBIY.mjs} +2 -2
  160. package/.output/server/chunks/build/DataLocationCard-DCdhQBIY.mjs.map +1 -0
  161. package/.output/server/chunks/build/{DesktopRunLocallyButton-BfmbZpiL.mjs → DesktopRunLocallyButton-ChHg3GqK.mjs} +5 -5
  162. package/.output/server/chunks/build/{DesktopRunLocallyButton-BfmbZpiL.mjs.map → DesktopRunLocallyButton-ChHg3GqK.mjs.map} +1 -1
  163. package/.output/server/chunks/build/{DiagnosisPanel-C_ndadzP.mjs → DiagnosisPanel-DE-r2UV8.mjs} +5 -5
  164. package/.output/server/chunks/build/DiagnosisPanel-DE-r2UV8.mjs.map +1 -0
  165. package/.output/server/chunks/build/{DiagnosisResult-GAjo6Lt3.mjs → DiagnosisResult-CrGK--xh.mjs} +16 -10
  166. package/.output/server/chunks/build/DiagnosisResult-CrGK--xh.mjs.map +1 -0
  167. package/.output/server/chunks/build/{DurationValue-CObiBDnH.mjs → DurationValue-Dn06XQk3.mjs} +2 -2
  168. package/.output/server/chunks/build/DurationValue-Dn06XQk3.mjs.map +1 -0
  169. package/.output/server/chunks/build/EntityLinks-BcpvMt_V.mjs +1 -1
  170. package/.output/server/chunks/build/EnvManagedBadge-_8GfjWjE.mjs +1 -1
  171. package/.output/server/chunks/build/{FeatureUnavailable-Buoyoqx1.mjs → FeatureUnavailable-IaBjVCqQ.mjs} +2 -2
  172. package/.output/server/chunks/build/FeatureUnavailable-IaBjVCqQ.mjs.map +1 -0
  173. package/.output/server/chunks/build/{GetStartedWizard-tL3U_qM1.mjs → GetStartedWizard-BiyxEXWP.mjs} +3 -3
  174. package/.output/server/chunks/build/GetStartedWizard-BiyxEXWP.mjs.map +1 -0
  175. package/.output/server/chunks/build/{HelpHint-C96TlqxY.mjs → HelpHint-CdBz6deq.mjs} +2 -2
  176. package/.output/server/chunks/build/HelpHint-CdBz6deq.mjs.map +1 -0
  177. package/.output/server/chunks/build/{MetaStripGroup-Cp2WCQf7.mjs → MetaStripGroup-CDyGlsNt.mjs} +94 -21
  178. package/.output/server/chunks/build/MetaStripGroup-CDyGlsNt.mjs.map +1 -0
  179. package/.output/server/chunks/build/{NavbarActions-VCHW0u67.mjs → NavbarActions-BTWxKCVI.mjs} +2 -2
  180. package/.output/server/chunks/build/NavbarActions-BTWxKCVI.mjs.map +1 -0
  181. package/.output/server/chunks/build/NavigationMenu-D4ZpdCm_.mjs +1 -1
  182. package/.output/server/chunks/build/OpenInIdeLink-Bnl-_som.mjs +1 -1
  183. package/.output/server/chunks/build/{ProjectTestCasesTable-saHYJoyQ.mjs → ProjectTestCasesTable-DJDAZ9NQ.mjs} +9 -9
  184. package/.output/server/chunks/build/ProjectTestCasesTable-DJDAZ9NQ.mjs.map +1 -0
  185. package/.output/server/chunks/build/{RunReports-CKYYRC59.mjs → RunReports-BSo2cCNx.mjs} +4 -4
  186. package/.output/server/chunks/build/RunReports-BSo2cCNx.mjs.map +1 -0
  187. package/.output/server/chunks/build/{RunStatusBadge-CWhmAmKb.mjs → RunStatusBadge-zfeSwcTx.mjs} +2 -2
  188. package/.output/server/chunks/build/RunStatusBadge-zfeSwcTx.mjs.map +1 -0
  189. package/.output/server/chunks/build/{SectionCard-BB1O3uXd.mjs → SectionCard-CKD1s0eF.mjs} +2 -2
  190. package/.output/server/chunks/build/SectionCard-CKD1s0eF.mjs.map +1 -0
  191. package/.output/server/chunks/build/Select-COU8NARj.mjs +1 -1
  192. package/.output/server/chunks/build/SelectMenu-BUwwc3Qt.mjs +1 -1
  193. package/.output/server/chunks/build/{SettingsField-CEasBHu3.mjs → SettingsField-CDnUtiCM.mjs} +3 -3
  194. package/.output/server/chunks/build/SettingsField-CDnUtiCM.mjs.map +1 -0
  195. package/.output/server/chunks/build/Table-BET-DOtX.mjs +1 -1
  196. package/.output/server/chunks/build/{TestCaseHistoryChart-BgI6P_zS.mjs → TestCaseHistoryChart-Do7WK-ZY.mjs} +16 -17
  197. package/.output/server/chunks/build/TestCaseHistoryChart-Do7WK-ZY.mjs.map +1 -0
  198. package/.output/server/chunks/build/{TestStatusBar-DR8jM5th.mjs → TestStatusBar-BipoEOzd.mjs} +15 -6
  199. package/.output/server/chunks/build/TestStatusBar-BipoEOzd.mjs.map +1 -0
  200. package/.output/server/chunks/build/Tooltip-CK0ucuXC.mjs +1 -1
  201. package/.output/server/chunks/build/{_id_-rQhFY0fN.mjs → _id_-BLPB189b.mjs} +16 -16
  202. package/.output/server/chunks/build/{_id_-rQhFY0fN.mjs.map → _id_-BLPB189b.mjs.map} +1 -1
  203. package/.output/server/chunks/build/{_id_-kkexEH_q.mjs → _id_-BeGJOSxY.mjs} +16 -16
  204. package/.output/server/chunks/build/_id_-BeGJOSxY.mjs.map +1 -0
  205. package/.output/server/chunks/build/{_id_-B7Dw490u.mjs → _id_-CfLEW45H.mjs} +472 -304
  206. package/.output/server/chunks/build/_id_-CfLEW45H.mjs.map +1 -0
  207. package/.output/server/chunks/build/{_id_-DVPb1S93.mjs → _id_-DxHe32cW.mjs} +654 -453
  208. package/.output/server/chunks/build/_id_-DxHe32cW.mjs.map +1 -0
  209. package/.output/server/chunks/build/{about-C4AbyQ4q.mjs → about-FLAssVsA.mjs} +5 -5
  210. package/.output/server/chunks/build/about-FLAssVsA.mjs.map +1 -0
  211. package/.output/server/chunks/build/{account-B45bYZd1.mjs → account-Cvz6KkYu.mjs} +4 -4
  212. package/.output/server/chunks/build/account-Cvz6KkYu.mjs.map +1 -0
  213. package/.output/server/chunks/build/{ai-CgN9xXFf.mjs → ai-DR9Zry7B.mjs} +8 -8
  214. package/.output/server/chunks/build/{ai-CgN9xXFf.mjs.map → ai-DR9Zry7B.mjs.map} +1 -1
  215. package/.output/server/chunks/build/{analytics-BRkiUpwa.mjs → analytics-CCAQayhv.mjs} +9 -9
  216. package/.output/server/chunks/build/{analytics-BRkiUpwa.mjs.map → analytics-CCAQayhv.mjs.map} +1 -1
  217. package/.output/server/chunks/build/{auto-heal-BnTdKHQq.mjs → auto-heal-ngiiiVmq.mjs} +4 -4
  218. package/.output/server/chunks/build/auto-heal-ngiiiVmq.mjs.map +1 -0
  219. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  220. package/.output/server/chunks/build/{default-BGOdM_zA.mjs → default-wYpdMMvh.mjs} +15 -13
  221. package/.output/server/chunks/build/{default-BGOdM_zA.mjs.map → default-wYpdMMvh.mjs.map} +1 -1
  222. package/.output/server/chunks/build/{docs-D7R5eJ1Z.mjs → docs-BX9DoKOI.mjs} +4 -4
  223. package/.output/server/chunks/build/{docs-D7R5eJ1Z.mjs.map → docs-BX9DoKOI.mjs.map} +1 -1
  224. package/.output/server/chunks/build/{edit-BbL3k6c3.mjs → edit-DnyBC4uC.mjs} +7 -7
  225. package/.output/server/chunks/build/{edit-BbL3k6c3.mjs.map → edit-DnyBC4uC.mjs.map} +1 -1
  226. package/.output/server/chunks/build/fetch-DOcN2mHf.mjs +1 -1
  227. package/.output/server/chunks/build/{help-content-BK3jcgLw.mjs → help-content-3QLSe6Vd.mjs} +3 -3
  228. package/.output/server/chunks/build/help-content-3QLSe6Vd.mjs.map +1 -0
  229. package/.output/server/chunks/build/{import-ibAn_HB9.mjs → import-S-w3MXez.mjs} +8 -8
  230. package/.output/server/chunks/build/import-S-w3MXez.mjs.map +1 -0
  231. package/.output/server/chunks/build/{index-D5A0DW7Y.mjs → index-BFr7JW_2.mjs} +4 -4
  232. package/.output/server/chunks/build/index-BFr7JW_2.mjs.map +1 -0
  233. package/.output/server/chunks/build/{index-CqinXTVs.mjs → index-CdzYiYiu.mjs} +9 -9
  234. package/.output/server/chunks/build/{index-CqinXTVs.mjs.map → index-CdzYiYiu.mjs.map} +1 -1
  235. package/.output/server/chunks/build/{index-DreB_S-d.mjs → index-CgYJur1z.mjs} +31 -23
  236. package/.output/server/chunks/build/index-CgYJur1z.mjs.map +1 -0
  237. package/.output/server/chunks/build/{index-2GmuPNF-.mjs → index-CjnZ521K.mjs} +22 -4
  238. package/.output/server/chunks/build/index-CjnZ521K.mjs.map +1 -0
  239. package/.output/server/chunks/build/{index-KsRegEjT.mjs → index-xgA4P1ht.mjs} +3218 -4087
  240. package/.output/server/chunks/build/index-xgA4P1ht.mjs.map +1 -0
  241. package/.output/server/chunks/build/isValueEqualOrExist-D4lZ8uRY.mjs +1 -1
  242. package/.output/server/chunks/build/login-DueFS2RU.mjs +1 -1
  243. package/.output/server/chunks/build/{mcp-Dwj29-uG.mjs → mcp-DlZzubUF.mjs} +7 -7
  244. package/.output/server/chunks/build/mcp-DlZzubUF.mjs.map +1 -0
  245. package/.output/server/chunks/build/{notifications-CjAn5FJj.mjs → notifications-ByPVhyPX.mjs} +6 -6
  246. package/.output/server/chunks/build/notifications-ByPVhyPX.mjs.map +1 -0
  247. package/.output/server/chunks/build/{performance-DRzcu_c7.mjs → performance-Dc9FhaJr.mjs} +6 -6
  248. package/.output/server/chunks/build/performance-Dc9FhaJr.mjs.map +1 -0
  249. package/.output/server/chunks/build/{pr-feedback-DR60oGBf.mjs → pr-feedback-5kC_UmKG.mjs} +4 -4
  250. package/.output/server/chunks/build/pr-feedback-5kC_UmKG.mjs.map +1 -0
  251. package/.output/server/chunks/build/{selections-BjjolRZ9.mjs → selections-C6J9mI0s.mjs} +9 -9
  252. package/.output/server/chunks/build/selections-C6J9mI0s.mjs.map +1 -0
  253. package/.output/server/chunks/build/server.mjs +33 -33
  254. package/.output/server/chunks/build/{settings-B3NWV9tu.mjs → settings-DcCAv0U4.mjs} +17 -81
  255. package/.output/server/chunks/build/settings-DcCAv0U4.mjs.map +1 -0
  256. package/.output/server/chunks/build/{settings-metadata-DwJk8uSt.mjs → settings-metadata-B684YiW4.mjs} +2 -2
  257. package/.output/server/chunks/build/settings-metadata-B684YiW4.mjs.map +1 -0
  258. package/.output/server/chunks/build/{setup-BlgFTixN.mjs → setup-Cf3Mzf-W.mjs} +8 -8
  259. package/.output/server/chunks/build/{setup-BlgFTixN.mjs.map → setup-Cf3Mzf-W.mjs.map} +1 -1
  260. package/.output/server/chunks/build/{storage-C1O-FC0U.mjs → storage-B4VySiv3.mjs} +7 -7
  261. package/.output/server/chunks/build/storage-B4VySiv3.mjs.map +1 -0
  262. package/.output/server/chunks/build/{tags-dsvYrnii.mjs → tags-BvWdsd1F.mjs} +25 -11
  263. package/.output/server/chunks/build/tags-BvWdsd1F.mjs.map +1 -0
  264. package/.output/server/chunks/build/{test-cases-CFiOuyK6.mjs → test-cases-LIIu7dMu.mjs} +11 -11
  265. package/.output/server/chunks/build/test-cases-LIIu7dMu.mjs.map +1 -0
  266. package/.output/server/chunks/build/{test-functions-CbmBi6az.mjs → test-functions-Dv8nezrM.mjs} +8 -8
  267. package/.output/server/chunks/build/test-functions-Dv8nezrM.mjs.map +1 -0
  268. package/.output/server/chunks/build/{useCopyRich-DPKZKHvZ.mjs → useCopyRich-DRRKIts2.mjs} +17 -14
  269. package/.output/server/chunks/build/{useCopyRich-DPKZKHvZ.mjs.map → useCopyRich-DRRKIts2.mjs.map} +1 -1
  270. package/.output/server/chunks/build/{useDesktopDownload-R_RWSgUV.mjs → useDesktopDownload-CK-5nATq.mjs} +2 -2
  271. package/.output/server/chunks/build/useDesktopDownload-CK-5nATq.mjs.map +1 -0
  272. package/.output/server/chunks/build/{useDesktopLocalRuns-BdELBy0Y.mjs → useDesktopLocalRuns-BHZic4MJ.mjs} +3 -3
  273. package/.output/server/chunks/build/useDesktopLocalRuns-BHZic4MJ.mjs.map +1 -0
  274. package/.output/server/chunks/build/{useDesktopProjectLink-IUN7SIP2.mjs → useDesktopProjectLink-CqBvnXwG.mjs} +2 -2
  275. package/.output/server/chunks/build/useDesktopProjectLink-CqBvnXwG.mjs.map +1 -0
  276. package/.output/server/chunks/build/useOpenInIde-DS4YXevu.mjs +1 -1
  277. package/.output/server/chunks/build/{useSettingsNav-Dg87E7kY.mjs → useSettingsNav-dyHz-2Bz.mjs} +2 -2
  278. package/.output/server/chunks/build/useSettingsNav-dyHz-2Bz.mjs.map +1 -0
  279. package/.output/server/chunks/build/{users-DgsoiXxQ.mjs → users-CluLB8DL.mjs} +31 -13
  280. package/.output/server/chunks/build/users-CluLB8DL.mjs.map +1 -0
  281. package/.output/server/chunks/nitro/nitro.mjs +839 -680
  282. package/.output/server/chunks/routes/__piwi/session.get.mjs +1 -1
  283. package/.output/server/chunks/routes/api/test-runs/_id/case-files.post.mjs +5 -2
  284. package/.output/server/chunks/routes/api/test-runs/_id/case-files.post.mjs.map +1 -1
  285. package/.output/server/chunks/routes/api/test-runs/_id/events.post.mjs +1 -1
  286. package/.output/server/chunks/routes/api/test-runs/_id/failure-groups.get.mjs +1 -1
  287. package/.output/server/chunks/routes/api/test-runs/_id/finish.post.mjs +42 -26
  288. package/.output/server/chunks/routes/api/test-runs/_id/finish.post.mjs.map +1 -1
  289. package/.output/server/chunks/routes/api/test-runs/_id/gate.post.mjs +1 -1
  290. package/.output/server/chunks/routes/api/test-runs/_id/heartbeat.post.mjs +1 -1
  291. package/.output/server/chunks/routes/api/test-runs/_id/insights.get.mjs +1 -1
  292. package/.output/server/chunks/routes/api/test-runs/_id/network-requests.get.mjs +1 -1
  293. package/.output/server/chunks/routes/api/test-runs/_id/regression-context.get.mjs +1 -1
  294. package/.output/server/chunks/routes/api/test-runs/_id/summary.get.mjs +1 -1
  295. package/.output/server/chunks/routes/api/test-runs/import/check.post.mjs +1 -1
  296. package/.output/server/chunks/routes/api/test-runs/recent.get.mjs +1 -1
  297. package/.output/server/chunks/routes/api/test-runs/submit.post.mjs +1 -1
  298. package/.output/server/chunks/routes/api/test-runs/upload.post.mjs +1 -1
  299. package/.output/server/chunks/routes/api/tests/cleanup.delete.mjs +1 -0
  300. package/.output/server/chunks/routes/api/tests/cleanup.delete.mjs.map +1 -1
  301. package/.output/server/chunks/routes/api/traces/check.post.mjs +1 -1
  302. package/.output/server/chunks/routes/api/users/_id/index.post.mjs +1 -1
  303. package/.output/server/chunks/routes/api/users/_id/invite.post.mjs +1 -1
  304. package/.output/server/chunks/routes/api/users/_id/projects.get.mjs +1 -1
  305. package/.output/server/chunks/routes/api/users/_id/projects.put.mjs +1 -1
  306. package/.output/server/chunks/routes/mcp.post.mjs +1 -1
  307. package/.output/server/chunks/routes/renderer.mjs +1 -1
  308. package/.output/server/chunks/routes/share/_token_.get.mjs +1 -1
  309. package/.output/server/index.mjs +1 -1
  310. package/.output/server/package.json +1 -1
  311. package/package.json +1 -1
  312. package/.output/public/_nuxt/3HmftUHT.js +0 -1
  313. package/.output/public/_nuxt/B7zo6PK8.js +0 -1
  314. package/.output/public/_nuxt/BO4sfkbw.js +0 -1
  315. package/.output/public/_nuxt/BdyXNI2_.js +0 -1
  316. package/.output/public/_nuxt/Bg63qh8W.js +0 -1
  317. package/.output/public/_nuxt/BnhWd06P.js +0 -1
  318. package/.output/public/_nuxt/CHWW6xiX.js +0 -1
  319. package/.output/public/_nuxt/CIPvUOic.js +0 -2
  320. package/.output/public/_nuxt/CVcFbORW.js +0 -9
  321. package/.output/public/_nuxt/CZlz5y13.js +0 -1
  322. package/.output/public/_nuxt/CkV_UG8j.js +0 -1
  323. package/.output/public/_nuxt/D0TpBpCc.js +0 -1
  324. package/.output/public/_nuxt/D3LyIeiJ.js +0 -1
  325. package/.output/public/_nuxt/DcccidY5.js +0 -4
  326. package/.output/public/_nuxt/DqkCbAzo.js +0 -1
  327. package/.output/public/_nuxt/DwH4SIZE.js +0 -1
  328. package/.output/public/_nuxt/DwZS0oRm.js +0 -2
  329. package/.output/public/_nuxt/DxPZIuWy.js +0 -1
  330. package/.output/public/_nuxt/Dyb1FouX.js +0 -1
  331. package/.output/public/_nuxt/builds/meta/a5fb24cc-65e3-4e55-aa12-038fe2de4754.json +0 -1
  332. package/.output/public/_nuxt/entry.BFe0Ua9k.css +0 -1
  333. package/.output/public/_nuxt/i7znB42v.js +0 -1
  334. package/.output/server/chunks/build/BreadcrumbNav-DBnGj5Jq.mjs.map +0 -1
  335. package/.output/server/chunks/build/BrowserBadge-vFb1ERG_.mjs.map +0 -1
  336. package/.output/server/chunks/build/ChartMarkerLines-BXqUpUcs.mjs.map +0 -1
  337. package/.output/server/chunks/build/ChartTooltip-DoF6Smyc.mjs.map +0 -1
  338. package/.output/server/chunks/build/CodeBlock-CmvKHaq8.mjs.map +0 -1
  339. package/.output/server/chunks/build/DataLocationCard-ChV02QJj.mjs.map +0 -1
  340. package/.output/server/chunks/build/DiagnosisPanel-C_ndadzP.mjs.map +0 -1
  341. package/.output/server/chunks/build/DiagnosisResult-GAjo6Lt3.mjs.map +0 -1
  342. package/.output/server/chunks/build/DurationValue-CObiBDnH.mjs.map +0 -1
  343. package/.output/server/chunks/build/FeatureUnavailable-Buoyoqx1.mjs.map +0 -1
  344. package/.output/server/chunks/build/GetStartedWizard-tL3U_qM1.mjs.map +0 -1
  345. package/.output/server/chunks/build/HelpHint-C96TlqxY.mjs.map +0 -1
  346. package/.output/server/chunks/build/MetaStripGroup-Cp2WCQf7.mjs.map +0 -1
  347. package/.output/server/chunks/build/NavbarActions-VCHW0u67.mjs.map +0 -1
  348. package/.output/server/chunks/build/ProjectTestCasesTable-saHYJoyQ.mjs.map +0 -1
  349. package/.output/server/chunks/build/RunReports-CKYYRC59.mjs.map +0 -1
  350. package/.output/server/chunks/build/RunStatusBadge-CWhmAmKb.mjs.map +0 -1
  351. package/.output/server/chunks/build/SectionCard-BB1O3uXd.mjs.map +0 -1
  352. package/.output/server/chunks/build/SettingsField-CEasBHu3.mjs.map +0 -1
  353. package/.output/server/chunks/build/TestCaseHistoryChart-BgI6P_zS.mjs.map +0 -1
  354. package/.output/server/chunks/build/TestStatusBar-DR8jM5th.mjs.map +0 -1
  355. package/.output/server/chunks/build/_id_-B7Dw490u.mjs.map +0 -1
  356. package/.output/server/chunks/build/_id_-DVPb1S93.mjs.map +0 -1
  357. package/.output/server/chunks/build/_id_-kkexEH_q.mjs.map +0 -1
  358. package/.output/server/chunks/build/about-C4AbyQ4q.mjs.map +0 -1
  359. package/.output/server/chunks/build/account-B45bYZd1.mjs.map +0 -1
  360. package/.output/server/chunks/build/auto-heal-BnTdKHQq.mjs.map +0 -1
  361. package/.output/server/chunks/build/help-content-BK3jcgLw.mjs.map +0 -1
  362. package/.output/server/chunks/build/import-ibAn_HB9.mjs.map +0 -1
  363. package/.output/server/chunks/build/index-2GmuPNF-.mjs.map +0 -1
  364. package/.output/server/chunks/build/index-D5A0DW7Y.mjs.map +0 -1
  365. package/.output/server/chunks/build/index-DreB_S-d.mjs.map +0 -1
  366. package/.output/server/chunks/build/index-KsRegEjT.mjs.map +0 -1
  367. package/.output/server/chunks/build/mcp-Dwj29-uG.mjs.map +0 -1
  368. package/.output/server/chunks/build/notifications-CjAn5FJj.mjs.map +0 -1
  369. package/.output/server/chunks/build/performance-DRzcu_c7.mjs.map +0 -1
  370. package/.output/server/chunks/build/pr-feedback-DR60oGBf.mjs.map +0 -1
  371. package/.output/server/chunks/build/selections-BjjolRZ9.mjs.map +0 -1
  372. package/.output/server/chunks/build/settings-B3NWV9tu.mjs.map +0 -1
  373. package/.output/server/chunks/build/settings-metadata-DwJk8uSt.mjs.map +0 -1
  374. package/.output/server/chunks/build/storage-C1O-FC0U.mjs.map +0 -1
  375. package/.output/server/chunks/build/tags-dsvYrnii.mjs.map +0 -1
  376. package/.output/server/chunks/build/test-cases-CFiOuyK6.mjs.map +0 -1
  377. package/.output/server/chunks/build/test-functions-CbmBi6az.mjs.map +0 -1
  378. package/.output/server/chunks/build/useDesktopDownload-R_RWSgUV.mjs.map +0 -1
  379. package/.output/server/chunks/build/useDesktopLocalRuns-BdELBy0Y.mjs.map +0 -1
  380. package/.output/server/chunks/build/useDesktopProjectLink-IUN7SIP2.mjs.map +0 -1
  381. package/.output/server/chunks/build/useSettingsNav-Dg87E7kY.mjs.map +0 -1
  382. package/.output/server/chunks/build/users-DgsoiXxQ.mjs.map +0 -1
@@ -1,9 +0,0 @@
1
- import{_ as ns}from"./BV8EzO8q.js";import{_ as as}from"./B7zo6PK8.js";import{d as oe,o as t,e as b,f as c,g as o,h as r,t as l,c as a,F as P,z as X,b as e,m as me,k as d,l as i,E as yt,i as Z,_ as le,v,H as Ie,j as Re,q as os,C as ht,x as ye,r as U,ab as we,a as ke,ac as rs,B as He,a1 as $e,u as is,p as ls,w as Oe,s as cs,ad as us,ae as ds,N as ms}from"./BdQ7kfxJ.js";import{d as fs,e as ps,h as Ke,a as gs,b as ys,c as hs,_ as xs,o as vs,p as _s,q as ks,u as bs,f as ws,i as $s,j as Cs,k as Ts,l as Ss,m as Is,n as Rs}from"./DCeZxpxe.js";import{_ as Ls}from"./xKX9IHe3.js";import{_ as zs}from"./DxPZIuWy.js";import{_ as js,a as Ns}from"./B7uPoZ7T.js";import{_ as Ms,a as Ds,b as As,c as Ps}from"./BdyXNI2_.js";import{_ as Le}from"./LWIyaZKe.js";import{_ as Us}from"./D0TpBpCc.js";import{_ as Bs}from"./CsGsLxHg.js";import{_ as xt}from"./CPrVhXJk.js";import{_ as vt}from"./C9A3sPDo.js";import{_ as _t}from"./D56yp7m9.js";import{_ as kt,a as bt}from"./CrsaY0R_.js";import{_ as Fs}from"./BsGvSoPC.js";import{_ as Vs}from"./HGYIpJtg.js";import{_ as Es,d as Os,e as Hs,f as Ks,g as Ws,h as qs,a as wt,i as Te,b as Ae,c as Gs}from"./C5X_N4R7.js";import{a as Se,n as Js,o as Qs,c as Zs,e as Xs,q as $t,u as We,v as qe,f as Ys,k as en,r as pt}from"./DwZS0oRm.js";import{_ as fe}from"./BOn5q0rT.js";import{_ as Ct}from"./C_eXufkv.js";import{_ as tn}from"./dg6uXTyR.js";import{u as sn}from"./Sx5-c-bZ.js";import{_ as Ge}from"./DadksxQ9.js";import{_ as Je}from"./Bh2WA4IJ.js";import{_ as Tt}from"./vcSKeWsW.js";import{f as be}from"./D-c8ZSws.js";import{_ as nn}from"./Gn1Ns00e.js";import{_ as an}from"./BPhGDGAR.js";import{_ as on}from"./CLrLFf3s.js";import{_ as rn}from"./DPPhFZOr.js";import{_ as ln}from"./CfV2N201.js";import{_ as cn}from"./D72Ce8Ff.js";import{e as un,l as dn,C as mn}from"./DtGJeysS.js";import{b as fn}from"./CrZhoZuI.js";import{a as pn,u as gt}from"./DTtizz85.js";import"./Bo73sAu8.js";import"./CZ6WR7uw.js";import"./D0XWJGhG.js";import"./i7znB42v.js";import"./CyWOerIG.js";import"./CxwnFFD0.js";import"./CK2AMqz_.js";import"./B4NjylBn.js";import"./CsJ9Ce4U.js";import"./DqkCbAzo.js";import"./BilJoEne.js";import"./9oKY4Zb7.js";import"./BO4sfkbw.js";import"./rPG7kzfL.js";import"./BL8cYWsR.js";import"./Bg63qh8W.js";import"./WZXZeGYt.js";import"./EJllK0wm.js";import"./Drh1_ASq.js";import"./G2J1dVVb.js";const gn={class:"text-sm font-semibold truncate min-w-0"},yn={class:"flex items-center gap-3 ml-auto max-sm:hidden"},hn={class:"text-xs text-gray-500 tabular-nums whitespace-nowrap"},xn={class:"text-xs text-gray-500 tabular-nums whitespace-nowrap"},vn={class:"text-gray-700 dark:text-gray-300"},_n={class:"text-xs text-gray-500 tabular-nums whitespace-nowrap"},kn={class:"text-gray-700 dark:text-gray-300"},bn={class:"text-xs text-gray-500 tabular-nums whitespace-nowrap"},wn={class:"text-gray-700 dark:text-gray-300"},$n={key:0,class:"text-xs text-gray-500 tabular-nums whitespace-nowrap"},Cn={class:"text-gray-700 dark:text-gray-300"},Tn={class:"@container"},Sn={class:"space-y-3"},In={class:"flex items-start gap-2.5 pr-8"},Rn={class:"min-w-0 flex-1"},Ln={class:"flex items-center gap-2 flex-wrap"},zn={class:"text-base font-bold truncate max-w-full"},jn={class:"text-xs text-gray-500 mt-0.5 flex items-center gap-x-2 gap-y-0.5 flex-wrap"},Nn=["title"],Mn={key:1},Dn={key:0,class:"flex items-center gap-1 flex-wrap"},An={key:0,class:"flex items-center gap-2 text-sm"},Pn={class:"text-gray-700 dark:text-gray-300 truncate"},Un={key:0,class:"text-gray-500 shrink-0"},Bn={key:1,class:"flex items-center gap-1.5 text-sm"},Fn={key:0,class:"font-medium"},Vn=["title"],En={key:2,class:"text-muted"},On=["title"],Hn={key:0,class:"rounded-full border border-default px-2 py-0.5 text-xs bg-elevated/60"},Kn={key:1},Wn=["href"],qn={key:1},Gn={class:"text-muted"},Jn={key:0,class:"tabular-nums text-muted"},Qn={key:0,class:"text-dimmed"},Zn=oe({__name:"TestCaseSummary",props:{testCase:{},scmInfo:{},ciInfo:{},browser:{},environment:{},stepsCount:{},historicalTiming:{},stableLinks:{},projectKey:{},projectName:{}},emits:["refresh"],setup(s){const y=s,x=v(()=>{const T=y.testCase;if(!T)return[];const g=[];return T.isNewRegression&&g.push({label:"New regression",color:"error",title:"Passed in the baseline run, failing here"}),T.isNewFlaky&&g.push({label:"New flaky",color:"warning",title:"Newly started passing only on retry"}),T.status==="passed"&&(T.retries??0)>0&&g.push({label:"Passed on retry",color:"warning",title:"This test failed then passed on a retry"}),g}),w=v(()=>(y.testCase?.testAnnotations??[]).filter(T=>!Js(T.type))),C=v(()=>y.testCase?.startedAt??null),p=v(()=>!!(y.ciInfo||y.environment)),n=v(()=>y.testCase?.attempts??null);function m(T){return T==="passed"?"success":T==="failed"||T==="timedout"||T==="timedOut"?"error":"neutral"}function u(T){const g=T.startedAt?` at ${new Date(T.startedAt).toLocaleString()}`:"";return`Attempt ${T.retry+1}: ${T.status} (${Math.round(T.duration)} ms)${g}`}return(T,g)=>{const S=Ms,j=Le,F=Us,_=me,f=Bs,M=xt,V=yt,B=vt,z=le,q=_t,J=kt,A=As,se=Fs,O=Ds,ue=Vs,$=Es;return t(),b($,{"storage-key":"test-case"},{folded:c(()=>[r(S,{status:s.testCase?.status??"",size:"sm"},null,8,["status"]),o("span",gn,l(s.testCase?.title),1),o("div",yn,[o("span",hn,[g[1]||(g[1]=d(" Dur: ",-1)),r(j,{ms:s.testCase?.duration,class:"font-bold text-gray-700 dark:text-gray-300"},null,8,["ms"])]),o("span",xn,[g[2]||(g[2]=d(" Retries: ",-1)),o("strong",vn,l(s.testCase?.retries??0),1)]),o("span",_n,[g[3]||(g[3]=d(" Steps: ",-1)),o("strong",kn,l(s.stepsCount),1)]),o("span",bn,[g[4]||(g[4]=d(" Worker: ",-1)),o("strong",wn,l(s.testCase?.workerIndex??"—"),1)]),s.testCase?.shardIndex!=null?(t(),a("span",$n,[g[5]||(g[5]=d(" Shard: ",-1)),o("strong",Cn,l(s.testCase.shardIndex),1)])):i("",!0)]),s.browser?(t(),b(F,{key:0,browser:s.browser,size:"sm",class:"shrink-0 max-sm:hidden"},null,8,["browser"])):i("",!0)]),default:c(()=>[o("div",Tn,[r(ue,{class:"shadow-xs",ui:{footer:"px-4 py-2.5 sm:px-4 bg-muted/30"}},{footer:c(()=>[r(O,null,{default:c(()=>[s.scmInfo?(t(),b(A,{key:0,label:"Source",icon:"i-lucide-git-branch"},{default:c(()=>[s.scmInfo.branch?(t(),a("span",Fn,l(s.scmInfo.branch),1)):i("",!0),s.scmInfo.commit?(t(),a("code",{key:1,class:"text-xs font-mono bg-zinc-100 dark:bg-zinc-800 px-1 py-0.5 rounded",title:s.scmInfo.commit},l(s.scmInfo.commit.length>=8?s.scmInfo.commit.substring(0,8):s.scmInfo.commit),9,Vn)):i("",!0),s.scmInfo.author?(t(),a("span",En,l(s.scmInfo.author),1)):i("",!0),s.scmInfo.commitMessage?(t(),a("span",{key:3,class:"text-xs text-dimmed truncate max-w-[40ch]",title:s.scmInfo.commitMessage},l(s.scmInfo.commitMessage),9,On)):i("",!0)]),_:1})):i("",!0),e(p)?(t(),b(A,{key:1,label:"CI & environment",icon:"i-lucide-cloud",help:"run.ci-env"},{default:c(()=>[s.environment?(t(),a("span",Hn,l(s.environment),1)):i("",!0),s.ciInfo?.provider?(t(),a("span",Kn,l(s.ciInfo.provider),1)):i("",!0),s.ciInfo?.buildNumber||s.ciInfo?.buildUrl?(t(),a(P,{key:2},[g[12]||(g[12]=o("span",{class:"text-dimmed"},"·",-1)),s.ciInfo?.buildUrl?(t(),a("a",{key:0,href:s.ciInfo.buildUrl,target:"_blank",class:"text-primary hover:underline"},l(s.ciInfo?.buildNumber?`Build #${s.ciInfo.buildNumber}`:"View build"),9,Wn)):(t(),a("span",qn,"Build #"+l(s.ciInfo.buildNumber),1))],64)):i("",!0),s.ciInfo?.workflow||s.ciInfo?.jobName?(t(),a(P,{key:3},[g[13]||(g[13]=o("span",{class:"text-dimmed"},"·",-1)),o("span",Gn,[s.ciInfo?.workflow?(t(),a(P,{key:0},[d(l(s.ciInfo.workflow),1)],64)):i("",!0),s.ciInfo?.workflow&&s.ciInfo?.jobName?(t(),a(P,{key:1},[d(" · ")],64)):i("",!0),s.ciInfo?.jobName?(t(),a(P,{key:2},[d(l(s.ciInfo.jobName),1)],64)):i("",!0)])],64)):i("",!0)]),_:1})):i("",!0),s.browser?(t(),b(A,{key:2,label:"Browser"},{default:c(()=>[r(F,{browser:{...s.browser,viewport:void 0},size:"sm"},null,8,["browser"]),s.browser.viewport?(t(),a("span",Jn,[d(l(s.browser.viewport.width)+"×"+l(s.browser.viewport.height)+" ",1),s.browser.deviceScaleFactor&&s.browser.deviceScaleFactor!==1?(t(),a("span",Qn,"@"+l(s.browser.deviceScaleFactor)+"x",1)):i("",!0)])):i("",!0)]),_:1})):i("",!0),r(A,{label:"Links",icon:"i-lucide-link"},{default:c(()=>[s.testCase?.executionId?(t(),b(se,{key:0,"entity-type":"test_case","entity-id":s.testCase.executionId,links:s.stableLinks??null,onUpdated:g[0]||(g[0]=I=>T.$emit("refresh"))},null,8,["entity-id","links"])):i("",!0)]),_:1})]),_:1})]),default:c(()=>[o("div",Sn,[o("div",In,[r(S,{status:s.testCase?.status??"",class:"mt-0.5"},null,8,["status"]),o("div",Rn,[o("div",Ln,[o("h2",zn,l(s.testCase?.title),1),(t(!0),a(P,null,X(e(x),I=>(t(),b(_,{key:I.label,color:I.color,variant:"subtle",size:"xs",title:I.title},{default:c(()=>[d(l(I.label),1)]),_:2},1032,["color","title"]))),128)),(t(!0),a(P,null,X(e(w),(I,ne)=>(t(),b(_,{key:`ann-${ne}`,color:"neutral",variant:"soft",size:"xs",class:"font-mono",title:I.description||I.type},{default:c(()=>[d(" @"+l(I.type),1)]),_:2},1032,["title"]))),128)),r(f,{tags:s.testCase?.tags,meta:s.testCase?.testMeta},null,8,["tags","meta"])]),o("p",jn,[s.testCase?.location?(t(),b(M,{key:0,location:s.testCase.location,"project-key":s.projectKey,"project-name":s.projectName},null,8,["location","project-key","project-name"])):i("",!0),r(V,null,{default:c(()=>[e(C)?(t(),a("span",{key:0,class:"text-gray-400",title:new Date(e(C)).toLocaleString()}," started "+l(("formatRelativeTime"in T?T.formatRelativeTime:e(Se))(e(C))),9,Nn)):i("",!0)]),_:1}),s.historicalTiming?(t(),a("span",Mn,[g[6]||(g[6]=d(" Avg ",-1)),r(j,{ms:s.historicalTiming.avg},null,8,["ms"]),g[7]||(g[7]=d(" · ",-1)),o("span",{class:Z(s.historicalTiming.diff>0?"text-red-600":"text-green-600")},l(s.historicalTiming.diff>0?"+":"")+l(s.historicalTiming.pct)+"% ",3)])):i("",!0)])])]),r(q,null,{default:c(()=>[r(B,{label:"Duration"},{default:c(()=>[r(j,{ms:s.testCase?.duration},null,8,["ms"])]),_:1}),r(B,{label:"Attempts",size:"sm"},{default:c(()=>[e(n)&&e(n).length>1?(t(),a("div",Dn,[(t(!0),a(P,null,X(e(n),I=>(t(),b(_,{key:I.retry,color:m(I.status),variant:"soft",size:"sm",class:"font-mono",title:u(I)},{default:c(()=>[d(l(I.retry+1)+"/"+l(e(n).length)+" ",1),r(z,{name:I.status==="passed"?"i-lucide-check":"i-lucide-x",class:"w-3 h-3"},null,8,["name"])]),_:2},1032,["color","title"]))),128))])):(t(),a(P,{key:1},[d(l(e(n)?.length??(s.testCase?.retries??0)+1),1)],64))]),_:1}),r(B,{label:"Steps",value:s.stepsCount},null,8,["value"]),r(B,{label:"Worker",value:s.testCase?.workerIndex??"—"},null,8,["value"])]),_:1}),s.testCase?.slowestStep?(t(),a("div",An,[r(z,{name:"i-lucide-zap",class:"size-4 text-amber-500 shrink-0"}),g[10]||(g[10]=o("span",{class:"font-medium text-amber-700 dark:text-amber-300"},"Slowest step:",-1)),o("span",Pn,l(s.testCase.slowestStep),1),s.testCase.slowestStepDuration?(t(),a("span",Un,[g[8]||(g[8]=d("(",-1)),r(j,{ms:s.testCase.slowestStepDuration},null,8,["ms"]),g[9]||(g[9]=d(")",-1))])):i("",!0)])):i("",!0),(s.testCase?.wastedTimeMs??0)>0?(t(),a("div",Bn,[r(z,{name:"i-lucide-hourglass",class:"size-4 text-amber-500 shrink-0"}),g[11]||(g[11]=o("span",{class:"font-medium text-amber-700 dark:text-amber-300"},"Wasted in fixed waits:",-1)),r(j,{ms:s.testCase?.wastedTimeMs,class:"text-gray-700 dark:text-gray-300"},null,8,["ms"]),r(J,{topic:"case.wasted-time"})])):i("",!0)])]),_:1})])]),_:1})}}}),Xn=Object.assign(Zn,{__name:"TestCaseSummary"}),Yn={class:"space-y-4 text-sm"},ea={class:"flex items-center gap-2"},ta={key:0,class:"text-gray-600 dark:text-gray-400"},sa={key:1,class:"text-gray-600 dark:text-gray-400"},na={key:2,class:"text-gray-600 dark:text-gray-400"},aa={key:1},oa={class:"text-gray-600 dark:text-gray-400 mb-2"},ra={class:"text-gray-800 dark:text-gray-200"},ia={class:"space-y-1"},la=oe({__name:"DidNotRunCard",props:{status:{},reason:{},blockedByCase:{},blockedTests:{}},setup(s){const y=s,x=v(()=>y.status==="didnotrun"),w=v(()=>y.blockedTests??[]),C=v(()=>w.value.length>0),p=v(()=>x.value||C.value),n=v(()=>Qs(y.reason)),m=v(()=>{switch(y.reason){case"global-timeout":return"The run hit its global timeout before this test could start, so Playwright stopped launching new tests.";case"max-failures":return"The run reached its configured maximum number of failures and stopped before this test could start.";case"interrupted":return"The run was interrupted (a worker crashed or it was cancelled) before this test could start.";default:return null}});return(u,T)=>{const g=le,S=me,j=Ie,F=fe;return e(p)?(t(),b(F,{key:0,icon:"i-lucide-circle-slash","icon-class":"text-amber-500",title:e(x)?"Did not run":"Blocked tests"},{default:c(()=>[o("div",Yn,[e(x)?(t(),a(P,{key:0},[o("div",ea,[r(S,{color:"warning",variant:"subtle",size:"sm",class:"inline-flex items-center gap-1"},{default:c(()=>[r(g,{name:"i-lucide-circle-slash",class:"size-3 shrink-0"}),d(" "+l(e(n)),1)]),_:1})]),s.blockedByCase?(t(),a("p",ta,[T[0]||(T[0]=d(" Skipped after ",-1)),r(j,{to:`/test-run-cases/${s.blockedByCase.id}`,class:"text-primary hover:underline font-medium"},{default:c(()=>[d(l(s.blockedByCase.title),1)]),_:1},8,["to"]),T[1]||(T[1]=d(" failed earlier in the same serial group. ",-1))])):e(m)?(t(),a("p",sa,l(e(m)),1)):s.reason==="previous-failure"?(t(),a("p",na," Skipped because an earlier step in its serial group failed. ")):i("",!0)],64)):i("",!0),e(C)?(t(),a("div",aa,[o("p",oa,[T[2]||(T[2]=d(" This failure stopped ",-1)),o("strong",ra,l(e(w).length),1),d(" later test"+l(e(w).length===1?"":"s")+" in the same serial group from running: ",1)]),o("ul",ia,[(t(!0),a(P,null,X(e(w),_=>(t(),a("li",{key:_.id,class:"flex items-center gap-2 min-w-0"},[r(g,{name:"i-lucide-circle-slash",class:"size-3.5 shrink-0 text-amber-500"}),r(j,{to:`/test-run-cases/${_.id}`,class:"text-primary hover:underline truncate"},{default:c(()=>[d(l(_.title),1)]),_:2},1032,["to"])]))),128))])])):i("",!0)])]),_:1},8,["title"])):i("",!0)}}}),ca=Object.assign(la,{__name:"DidNotRunCard"}),ua={class:"space-y-3"},da={key:0,class:"flex flex-wrap gap-1.5"},ma={key:0,class:"text-sm text-gray-600 dark:text-gray-400"},fa={class:"text-gray-800 dark:text-gray-200"},pa={key:1},ga={class:"flex items-center gap-1 flex-wrap"},ya=oe({__name:"TestCaseVerdictCard",props:{testCase:{},history:{},currentId:{}},setup(s){const y=s,x=m=>m==="failed"||m==="timedOut"||m==="timedout",w=v(()=>{const m=y.testCase;if(!m)return[];const u=[];return m.isNewRegression&&u.push({label:"New regression",color:"error",icon:"i-lucide-git-pull-request-arrow",title:"Passed in the baseline run, failing here — likely fallout from the latest change"}),m.isNewFlaky&&u.push({label:"New flaky",color:"warning",icon:"i-lucide-shuffle",title:"Newly started passing only on retry — intermittent failure"}),(m.status==="timedOut"||m.status==="timedout")&&u.push({label:"Timed out",color:"warning",icon:"i-lucide-timer-off",title:"The test exceeded its timeout"}),(m.retries??0)>0&&u.push({label:m.status==="passed"?`Passed on retry ${m.retries}`:`Retried ${m.retries}×`,color:m.status==="passed"?"warning":"neutral",icon:"i-lucide-refresh-cw",title:`This execution retried ${m.retries} time${m.retries===1?"":"s"}`}),u}),C=v(()=>y.history.slice(0,24).slice().reverse()),p=v(()=>{const m=y.history;if(!m.length)return null;const u=Math.max(0,m.findIndex(S=>S.id===y.currentId));let T=0;for(let S=u;S<m.length&&x(m[S].status);S++)T++;let g=null;for(let S=u+1;S<m.length;S++)if(m[S].status==="passed"){g=m[S];break}return{streak:T,lastPass:g,total:m.length,anchorFailing:x(m[u]?.status)}}),n=m=>({"bg-red-500 hover:bg-red-600":x(m),"bg-green-500 hover:bg-green-600":m==="passed","bg-yellow-500 hover:bg-yellow-600":m==="skipped","bg-gray-400 hover:bg-gray-500":!x(m)&&!["passed","skipped"].includes(m)});return(m,u)=>{const T=le,g=me,S=Ie,j=Ct,F=yt,_=fe;return t(),b(_,{icon:"i-lucide-clipboard-check","icon-class":"text-amber-500",title:"Verdict",help:"case.verdict"},{default:c(()=>[o("div",ua,[e(w).length?(t(),a("div",da,[(t(!0),a(P,null,X(e(w),f=>(t(),b(g,{key:f.label,color:f.color,variant:"subtle",size:"sm",title:f.title,class:"inline-flex items-center gap-1"},{default:c(()=>[r(T,{name:f.icon,class:"size-3 shrink-0"},null,8,["name"]),d(" "+l(f.label),1)]),_:2},1032,["color","title"]))),128))])):i("",!0),r(F,null,{default:c(()=>[e(p)?(t(),a("p",ma,[e(p).streak>=1?(t(),a(P,{key:0},[u[1]||(u[1]=d(" Failing for ",-1)),o("strong",fa,l(e(p).streak),1),d(" consecutive run"+l(e(p).streak===1?"":"s")+". ",1),e(p).lastPass?(t(),a(P,{key:0},[u[0]||(u[0]=d(" Last passed in ",-1)),r(S,{to:`/test-run-cases/${e(p).lastPass.id}`,class:"text-primary hover:underline"},{default:c(()=>[d(" run #"+l(e(p).lastPass.runId),1)]),_:1},8,["to"]),d(" ("+l(("formatRelativeTime"in m?m.formatRelativeTime:e(Se))(e(p).lastPass.startTime))+"). ",1)],64)):e(p).total>1?(t(),a(P,{key:1},[d(" No passing run in the last "+l(e(p).total)+" recorded. ",1)],64)):(t(),a(P,{key:2},[d(" First recorded run of this test. ")],64))],64)):s.testCase?.status==="passed"?(t(),a(P,{key:1},[d(" This execution passed. ")],64)):i("",!0)])):i("",!0),e(C).length>1?(t(),a("div",pa,[u[2]||(u[2]=o("p",{class:"text-xs text-gray-400 mb-1"},"Recent runs (oldest → newest)",-1)),o("div",ga,[(t(!0),a(P,null,X(e(C),f=>(t(),b(j,{key:f.id,text:`Run #${f.runId}: ${f.status}`},{default:c(()=>[r(S,{to:`/test-run-cases/${f.id}`,class:Z(["size-3.5 rounded-sm inline-block transition-colors",[n(f.status),f.id===s.currentId?"ring-2 ring-offset-1 ring-primary":""]])},null,8,["to","class"])]),_:2},1032,["text"]))),128))])])):i("",!0)]),_:1})])]),_:1})}}}),ha=Object.assign(ya,{__name:"TestCaseVerdictCard"}),xa={class:"space-y-3"},va={class:"space-y-1.5"},_a={class:"flex items-center gap-2 flex-wrap"},ka={class:"text-xs text-gray-500"},ba=["title"],wa={class:"text-xs text-gray-500 dark:text-gray-400"},$a={key:0,class:"rounded-lg border border-default bg-elevated/40 p-2.5 space-y-1"},Ca={class:"flex items-center gap-1.5 flex-wrap"},Ta={class:"text-xs text-gray-600 dark:text-gray-400 line-clamp-3"},Sa=["title"],Ia=oe({__name:"FailureClusterCard",props:{cluster:{}},setup(s){const y=s,x=v(()=>Math.max(0,y.cluster.sameRunCaseCount-1)),w=v(()=>{const p=y.cluster.diagnosis;return p&&p.status==="completed"&&p.summary?p:null}),C=p=>p==="high"?"success":p==="medium"?"warning":"neutral";return(p,n)=>{const m=me,u=Ie,T=le,g=Re,S=fe;return t(),b(S,{icon:"i-lucide-layers","icon-class":"text-primary",title:"Failure cluster",help:"cluster.concept"},{actions:c(()=>[s.cluster.isNew?(t(),b(m,{key:0,color:"warning",variant:"subtle",size:"sm"},{default:c(()=>[...n[0]||(n[0]=[d("New",-1)])]),_:1})):i("",!0),s.cluster.status&&s.cluster.status!=="open"?(t(),b(m,{key:1,color:s.cluster.status==="resolved"?"success":"neutral",variant:"subtle",size:"sm",class:"capitalize"},{default:c(()=>[d(l(s.cluster.status),1)]),_:1},8,["color"])):i("",!0)]),default:c(()=>[o("div",xa,[o("div",va,[o("div",_a,[s.cluster.errorType?(t(),b(m,{key:0,color:e(Zs)(s.cluster.errorType),variant:"soft",size:"sm"},{default:c(()=>[d(l(s.cluster.errorType),1)]),_:1},8,["color"])):i("",!0),o("span",ka,l(s.cluster.occurrences??0)+" occurrence"+l((s.cluster.occurrences??0)===1?"":"s"),1)]),o("p",{class:"font-mono text-xs text-gray-600 dark:text-gray-400 break-all line-clamp-2",title:s.cluster.signature},l(s.cluster.signature),9,ba)]),o("p",wa,[e(x)>0?(t(),a(P,{key:0},[d(" Matches "+l(e(x))+" other failing "+l(e(x)===1?"test":"tests")+" in this run. ",1)],64)):i("",!0),s.cluster.isNew?(t(),a(P,{key:2},[d("Opened a new cluster in this run.")],64)):(t(),a(P,{key:1},[n[1]||(n[1]=d(" Known failure — first seen in ",-1)),r(u,{to:`/test-runs/${s.cluster.firstSeenRunId}`,class:"text-primary hover:underline"},{default:c(()=>[d(" run #"+l(s.cluster.firstSeenRunId),1)]),_:1},8,["to"]),s.cluster.firstSeenAt?(t(),a(P,{key:0},[d(" ("+l(("formatRelativeTime"in p?p.formatRelativeTime:e(Se))(s.cluster.firstSeenAt))+")",1)],64)):i("",!0),n[2]||(n[2]=d(". ",-1))],64))]),e(w)?(t(),a("div",$a,[o("div",Ca,[r(T,{name:"i-lucide-sparkles",class:"size-3.5 text-primary shrink-0"}),n[3]||(n[3]=o("span",{class:"text-xs font-medium"},"AI verdict",-1)),e(w).category?(t(),b(m,{key:0,color:"neutral",variant:"soft",size:"xs"},{default:c(()=>[d(l(e(w).category),1)]),_:1})):i("",!0),e(w).confidence?(t(),b(m,{key:1,color:C(e(w).confidence),variant:"soft",size:"xs"},{default:c(()=>[d(l(e(w).confidence)+" confidence ",1)]),_:1},8,["color"])):i("",!0)]),o("p",Ta,l(e(w).summary),1)])):i("",!0),s.cluster.triageNote?(t(),a("p",{key:1,class:"text-xs italic text-gray-500 dark:text-gray-400",title:s.cluster.triageNote}," “"+l(s.cluster.triageNote)+"” ",9,Sa)):i("",!0),r(g,{to:`/failure-clusters/${s.cluster.id}`,size:"sm",color:"primary",variant:"solid",block:"","trailing-icon":"i-lucide-arrow-right"},{default:c(()=>[...n[4]||(n[4]=[d(" Open cluster investigation ",-1)])]),_:1},8,["to"])])]),_:1})}}}),Ra=Object.assign(Ia,{__name:"FailureClusterCard"}),La={class:"space-y-3"},za={class:"text-xs text-gray-400 inline-flex items-center gap-1"},ja={key:0,class:"text-primary"},Na={key:0,class:"flex items-center justify-between gap-2 rounded-lg border border-default bg-elevated/40 p-2.5"},Ma={class:"inline-flex items-center gap-2 text-sm text-gray-500"},Da={key:1,class:"flex items-center gap-2"},Aa={key:2,class:"rounded-lg border border-dashed border-default p-4 text-center text-gray-400"},Pa={class:"text-sm inline-flex items-center gap-1 justify-center"},Ua={class:"pt-1 text-center"},Ba=oe({__name:"TestCaseAiCard",props:{testRunsCaseId:{}},setup(s){const y=s,{aiStatus:x}=sn(),w=os(),C=U(null),p=U(!1),n=U(null),m=U([]),u=U(0),T=U(0),g=U(null),S=U(!1),j=U(!1),F=U(null),_=U(!1),f=U("");async function M(){S.value=!0;try{const $=await $fetch(`/api/test-run-cases/${y.testRunsCaseId}/diagnosis-context`,{query:{format:"json"}});n.value=$.text,m.value=$.sections,u.value=$.tokenEstimate,T.value=$.imageTokenEstimate??0,g.value=$.coverage}catch{n.value=null,m.value=[],u.value=0,g.value=null}finally{S.value=!1}}async function V(){try{const $=await $fetch(`/api/test-run-cases/${y.testRunsCaseId}/diagnosis`);C.value=$.diagnosis}catch{}}ht(()=>{V(),M()});const B=v(()=>{const $=C.value?.details;if(!$)return[];const I=[];if(Array.isArray($.evidence)&&I.push(...$.evidence),Array.isArray($.hypotheses))for(const ne of $.hypotheses)Array.isArray(ne?.evidence)&&I.push(...ne.evidence);return qs(I)});function z($){F.value=$,j.value=!0}function q($){f.value=f.value?`${f.value}
2
-
3
- ${$}`:$,_.value=!0}async function J($=!1){p.value=!0;try{const I=$?`/api/test-run-cases/${y.testRunsCaseId}/diagnose?force=true`:`/api/test-run-cases/${y.testRunsCaseId}/diagnose`,ne=f.value.trim()?{additionalContext:f.value.trim()}:void 0;C.value=await $fetch(I,{method:"POST",body:ne})}catch(I){const ne=I?.statusCode;ne===409?(w.add({title:"Diagnosis already running",color:"warning"}),V()):ne===503?w.add({title:"AI diagnosis is not configured",color:"warning"}):w.add({title:"Diagnosis failed",description:Xs(I),color:"error"})}finally{p.value=!1}}function A($){return $.status==="running"&&Date.now()-new Date($.updatedAt).getTime()>300*1e3}const se=v(()=>C.value&&(C.value.status==="completed"||C.value.status==="failed")),O=v(()=>!C.value||C.value.status==="failed"||C.value.status==="running"&&A(C.value)),ue=v(()=>C.value?.status==="running"&&!A(C.value)&&!p.value);return($,I)=>{const ne=Ws,k=le,R=Os,H=tn,G=Re,Y=Hs,ee=kt,K=Ks,Q=Ie,te=fe;return t(),b(te,{icon:"i-lucide-sparkles","icon-class":"text-primary",title:"AI diagnosis",help:"case.ai"},{actions:c(()=>[r(ne,{"context-endpoint":`/api/test-run-cases/${s.testRunsCaseId}/diagnosis-context`},null,8,["context-endpoint"])]),default:c(()=>[o("div",La,[o("p",za,[r(k,{name:"i-lucide-triangle-alert",class:"size-3 shrink-0"}),I[6]||(I[6]=d(" AI-generated — verify before applying. ",-1))]),e(x)?.configured?(t(),b(R,{key:0,sections:e(m),"not-applicable":e(g)?.notApplicable,"token-estimate":e(u),loading:e(S),onViewSection:z,onOpen:I[0]||(I[0]=ae=>j.value=!0)},null,8,["sections","not-applicable","token-estimate","loading"])):i("",!0),e(x)?.configured?(t(),a(P,{key:1},[o("div",null,[o("button",{class:"flex items-center gap-1.5 text-xs font-medium text-gray-500 hover:text-gray-700 dark:hover:text-gray-300",onClick:I[1]||(I[1]=ae=>_.value=!e(_))},[r(k,{name:e(_)?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"size-3.5"},null,8,["name"]),I[7]||(I[7]=d(" Additional context ",-1)),e(f).trim()?(t(),a("span",ja,"(1)")):i("",!0)]),e(_)?(t(),b(H,{key:0,modelValue:e(f),"onUpdate:modelValue":I[2]||(I[2]=ae=>ye(f)?f.value=ae:null),placeholder:"e.g. We deployed a new auth middleware yesterday…",rows:3,class:"w-full text-sm mt-1"},null,8,["modelValue"])):i("",!0)]),e(ue)?(t(),a("div",Na,[o("span",Ma,[r(k,{name:"i-lucide-loader-circle",class:"size-4 animate-spin text-primary shrink-0"}),I[8]||(I[8]=d(" Diagnosis in progress… ",-1))]),r(G,{size:"xs",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",loading:e(p),onClick:V},{default:c(()=>[...I[9]||(I[9]=[d(" Refresh ",-1)])]),_:1},8,["loading"])])):(t(),a("div",Da,[e(O)?(t(),b(G,{key:0,icon:"i-lucide-sparkles",size:"sm",color:"primary",variant:"solid",loading:e(p),onClick:I[3]||(I[3]=ae=>J(e(C)?.status==="running"))},{default:c(()=>[d(l(e(C)?.status==="running"?"Restart diagnosis":"Diagnose with AI"),1)]),_:1},8,["loading"])):e(C)?.status==="completed"?(t(),b(G,{key:1,icon:"i-lucide-refresh-cw",size:"xs",color:"primary",variant:"soft",loading:e(p),onClick:I[4]||(I[4]=ae=>J(!0))},{default:c(()=>[...I[10]||(I[10]=[d(" Re-diagnose ",-1)])]),_:1},8,["loading"])):i("",!0)])),e(se)?(t(),b(Y,{key:2,diagnosis:e(C),onViewSection:z,onPrefillContext:q},null,8,["diagnosis"])):i("",!0)],64)):(t(),a("div",Aa,[o("p",Pa,[I[11]||(I[11]=d(" AI diagnosis is not configured ",-1)),r(ee,{topic:"cluster.ai-setup"})]),I[13]||(I[13]=o("p",{class:"text-xs mt-2 max-w-xs mx-auto"},[d(" Use "),o("strong",null,"Export → AI context"),d(" in the header to grab the full evidence bundle for your own AI tool, or configure a provider. ")],-1)),r(G,{to:"/settings/ai",size:"xs",color:"neutral",variant:"outline",class:"mt-3"},{default:c(()=>[...I[12]||(I[12]=[d(" Configure in Settings ",-1)])]),_:1})])),r(K,{open:e(j),sections:e(m),"token-estimate":e(u),"image-token-estimate":e(T),loading:e(S),"focus-section":e(F),"cited-sections":e(B),"not-applicable-sections":e(g)?.notApplicable,"onUpdate:open":I[5]||(I[5]=ae=>{j.value=ae,ae||(F.value=null)}),onRefresh:M},null,8,["open","sections","token-estimate","image-token-estimate","loading","focus-section","cited-sections","not-applicable-sections"]),o("div",Ua,[r(Q,{to:"/mcp",class:"inline-flex items-center gap-1 text-xs text-gray-400 hover:text-primary transition-colors"},{default:c(()=>[r(k,{name:"i-lucide-bot",class:"size-3"}),I[14]||(I[14]=d(" Query this failure from your AI agent via MCP ",-1))]),_:1})])])]),_:1})}}}),Fa=Object.assign(Ba,{__name:"TestCaseAiCard"});function St(s,y,x){const w=U(null),C=U(!1),p=U(!1);async function n(){const m=s();if(!(!m||!we(y)||C.value)){p.value=!0,C.value=!0;try{w.value=await $fetch(m)}catch{w.value=null}finally{C.value=!1}}}return ht(()=>{ke(()=>we(y),m=>{m&&(x||p.value)&&!w.value&&n()},{immediate:!0})}),{data:w,pending:C,load:n}}function Va(s,y,x,w={}){return St(()=>{const C=we(s),p=we(y);return C&&p?`/api/test-run-cases/${p}/trace-stacks`:null},x,w.auto??!0)}function Ea(s,y,x,w={}){return St(()=>{const C=we(s),p=we(y);return C&&p?`/api/test-run-cases/${p}/trace-network`:null},x,w.auto??!1)}const Oa={class:"max-h-[32rem] overflow-y-auto"},Ha={key:0,class:"mb-2 flex items-center gap-1.5 text-xs text-gray-400 dark:text-gray-500"},Ka={key:0,class:"mt-3 flex items-center gap-1.5 text-xs text-gray-400 dark:text-gray-500"},Wa=oe({__name:"TestSourceCard",props:{frames:{},testSource:{},runId:{},testRunsCaseId:{},hasTrace:{type:Boolean},projectKey:{},projectName:{},storageKey:{}},setup(s,{expose:y}){const x=s,{data:w,pending:C}=Va(()=>x.runId,()=>x.testRunsCaseId,()=>x.hasTrace,{auto:!0}),p=v(()=>w.value?.status==="ok"?w.value.frames??[]:[]),n=v(()=>p.value.length>0),m=v(()=>x.frames?.length??0),u=v(()=>m.value>0||!!x.testSource),T=U(null),g=v({get:()=>T.value??(n.value?"trace":"captured"),set:_=>{T.value=_}}),S=v(()=>[{label:`Full stack (${p.value.length})`,value:"trace"},{label:`Captured (${m.value||1})`,value:"captured"}]),j=v(()=>g.value==="trace"&&n.value?p.value.length:m.value||null),F=U(null);return y({reveal:()=>F.value?.reveal()}),(_,f)=>{const M=Ge,V=le,B=fs,z=ps,q=wt,J=Je,A=bt,se=Ke;return t(),b(se,{ref_key:"card",ref:F,"storage-key":s.storageKey,icon:"i-lucide-code",count:e(j),title:"Test source",help:"case.test-source"},rs({folded:c(()=>[e(g)==="trace"&&e(n)?(t(),a(P,{key:0},[d(" Full call stack from the trace"+l(e(w)?.hasSources===!1?" (recorded without sources)":""),1)],64)):e(m)>1?(t(),a(P,{key:1},[d(" The failing line and "+l(e(m)-1)+" caller"+l(e(m)-1===1?"":"s"),1)],64)):(t(),a(P,{key:2},[d("Source around the failing assertion")],64))]),default:c(()=>[o("div",Oa,[e(g)==="trace"&&e(n)?(t(),a(P,{key:0},[e(w)?.hasSources===!1?(t(),a("p",Ha,[r(V,{name:"i-lucide-info",class:"size-3.5 shrink-0"}),f[1]||(f[1]=d(" Trace recorded without sources — frame list only. ",-1))])):i("",!0),r(B,{frames:e(p),"project-key":s.projectKey,"project-name":s.projectName},null,8,["frames","project-key","project-name"])],64)):(t(),a(P,{key:1},[s.frames?.length?(t(),b(z,{key:0,frames:s.frames,"project-key":s.projectKey,"project-name":s.projectName},null,8,["frames","project-key","project-name"])):s.testSource?(t(),b(q,{key:1,text:"```typescript\n"+s.testSource+"\n```"},null,8,["text"])):s.hasTrace&&e(C)?(t(),b(J,{key:2,text:"Loading call stack from trace…"})):i("",!0)],64))]),s.hasTrace?i("",!0):(t(),a("p",Ka,[r(V,{name:"i-lucide-info",class:"size-3.5 shrink-0"}),o("span",null,[f[3]||(f[3]=d(" Want to go deeper? Record traces (",-1)),f[4]||(f[4]=o("code",null,"trace: 'retain-on-failure'",-1)),f[5]||(f[5]=d(") to see the full call stack with source here. ",-1)),r(A,{to:"evidence#trace-powered-deep-views","no-icon":"",class:"underline"},{default:c(()=>[...f[2]||(f[2]=[d("Learn more",-1)])]),_:1})])]))]),_:2},[e(n)&&e(u)?{name:"actions",fn:c(()=>[r(M,{modelValue:e(g),"onUpdate:modelValue":f[0]||(f[0]=O=>ye(g)?g.value=O:null),items:e(S),size:"xs",variant:"link",ui:{list:"gap-2",trigger:"px-1.5"}},null,8,["modelValue","items"])]),key:"0"}:void 0]),1032,["storage-key","count"])}}}),qa=Object.assign(Wa,{__name:"TestSourceCard"}),Ga={class:"space-y-3"},Ja={class:"divide-y divide-default"},Qa={class:"flex items-center gap-2 min-w-0"},Za={class:"text-sm truncate"},Xa={key:0,class:"text-xs text-gray-400 shrink-0"},Ya=oe({__name:"TestCaseEvidenceCard",props:{attachments:{},traces:{},storageKey:{}},setup(s,{expose:y}){const x=s,w=He(),C=v(()=>Array.isArray(x.attachments)?x.attachments:[]),p=v(()=>Array.isArray(x.traces)?x.traces:[]),n=v(()=>C.value.filter(_=>Te(_.path,_.contentType)).length),m=v(()=>C.value.filter(_=>Ae(_.path,_.contentType)).length),u=v(()=>C.value.filter(_=>!Te(_.path,_.contentType)&&!Ae(_.path,_.contentType))),T=v(()=>n.value+m.value+p.value.length+u.value.length),g=v(()=>{const _=[];return n.value&&_.push(`${n.value} screenshot${n.value===1?"":"s"}`),m.value&&_.push(`${m.value} video${m.value===1?"":"s"}`),p.value.length&&_.push(`${p.value.length} trace${p.value.length===1?"":"s"}`),u.value.length&&_.push(`${u.value.length} file${u.value.length===1?"":"s"}`),_.join(" · ")||"No evidence captured"});function S(_,f){return $t(_,f,w.app?.baseURL)}function j(_){return _.split("/").pop()||_}const F=U(null);return y({reveal:()=>F.value?.reveal?.()}),(_,f)=>{const M=gs,V=ys,B=hs,z=le,q=Re,J=xs,A=Tt,se=Ke;return t(),b(se,{ref_key:"card",ref:F,"storage-key":s.storageKey,icon:"i-lucide-camera",title:"Failure evidence",count:e(T),help:"case.evidence"},{folded:c(()=>[d(l(e(g)),1)]),default:c(()=>[o("div",Ga,[r(M,{attachments:e(C)},null,8,["attachments"]),r(V,{attachments:e(C)},null,8,["attachments"]),r(B,{traces:e(p)},null,8,["traces"]),e(u).length?(t(),b(J,{key:0,icon:"i-lucide-paperclip",label:"Attachments",count:e(u).length,collapsible:!1},{default:c(()=>[o("div",Ja,[(t(!0),a(P,null,X(e(u),O=>(t(),a("div",{key:O.id,class:"flex items-center justify-between gap-2 px-3 py-2"},[o("div",Qa,[r(z,{name:"i-lucide-file",class:"size-4 text-gray-400 shrink-0"}),o("span",Za,l(j(O.path)),1),O.size?(t(),a("span",Xa,l(("formatBytes"in _?_.formatBytes:e(be))(O.size)),1)):i("",!0)]),r(q,{to:S(O.path,O.contentType),target:"_blank",icon:"i-lucide-external-link",size:"xs",color:"neutral",variant:"soft",label:"Open"},null,8,["to"])]))),128))])]),_:1},8,["count"])):i("",!0),e(T)===0?(t(),b(A,{key:1,icon:"i-lucide-camera-off",title:"No screenshots, video or traces captured",text:"Evidence comes from Playwright's own capture settings — set trace, screenshot and video in your config (trace: 'retain-on-failure' is the usual starting point).",doc:"reporter"})):i("",!0)])]),_:1},8,["storage-key","count"])}}}),eo=Object.assign(Ya,{__name:"TestCaseEvidenceCard"}),to={class:"space-y-1 max-h-80 overflow-y-auto"},so={class:"min-w-0 flex-1"},no={class:"flex items-center gap-2"},ao={class:"truncate"},oo={key:0,class:"text-xs text-gray-400 mt-0.5 ml-0"},ro=oe({__name:"TestCaseConsoleCard",props:{entries:{}},setup(s){function y(w){switch(w){case"error":return"error";case"warning":return"warning";case"assert":return"error";default:return"neutral"}}function x(w){switch(w){case"error":return"i-lucide-octagon-x";case"warning":return"i-lucide-alert-triangle";case"assert":return"i-lucide-octagon-x";default:return"i-lucide-message-square"}}return(w,C)=>{const p=le,n=me,m=fe;return s.entries.length>0?(t(),b(m,{key:0,icon:"i-lucide-terminal",title:"Console output",count:s.entries.length,help:"case.console"},{default:c(()=>[o("div",to,[(t(!0),a(P,null,X(s.entries,(u,T)=>(t(),a("div",{key:T,class:"flex items-start gap-2 py-1.5 px-2 rounded hover:bg-gray-50 dark:hover:bg-gray-800 text-sm"},[r(p,{name:x(u.type),class:Z([u.type==="error"||u.type==="assert"?"text-red-500":u.type==="warning"?"text-amber-500":"text-gray-400","size-4 mt-0.5 shrink-0"])},null,8,["name","class"]),o("div",so,[o("div",no,[r(n,{color:y(u.type),variant:"soft",size:"xs",class:"shrink-0"},{default:c(()=>[d(l(u.type),1)]),_:2},1032,["color"]),o("span",ao,l(u.text),1)]),u.location?(t(),a("div",oo,l(u.location),1)):i("",!0)])]))),128))])]),_:1},8,["count"])):i("",!0)}}}),io=Object.assign(ro,{__name:"TestCaseConsoleCard"}),lo={key:0,class:"space-y-4 text-sm"},co={class:"space-y-1.5"},uo={class:"flex items-center gap-2"},mo={key:0,class:"text-xs text-gray-500"},fo={class:"block text-xs break-all text-gray-700 dark:text-gray-300"},po={key:0,class:"text-xs text-red-600 dark:text-red-400 font-mono"},go={class:"flex flex-wrap items-center gap-x-3 gap-y-1 text-xs text-gray-400"},yo={key:0,class:"font-mono"},ho={key:1,class:"font-mono"},xo={key:2},vo={key:3,title:"Bytes on the wire"},_o={key:0},ko={class:"flex h-2 rounded overflow-hidden bg-gray-100 dark:bg-gray-800"},bo=["title"],wo={class:"flex flex-wrap gap-x-3 gap-y-1 mt-1.5 text-xs text-gray-500"},$o={class:"text-xs font-medium text-gray-500 dark:text-gray-400 mb-1.5 capitalize"},Co={key:0,class:"rounded border border-default divide-y divide-default max-h-48 overflow-y-auto"},To={class:"text-gray-500 dark:text-gray-400 shrink-0"},So={class:"break-all text-gray-700 dark:text-gray-300"},Io={key:1,class:"text-xs text-gray-400"},Ro={key:1},Lo={key:0,class:"rounded border border-default p-2"},zo=["src","alt"],jo={key:1,class:"max-h-96 overflow-y-auto"},No={key:0,class:"mt-1 text-xs text-gray-400"},Mo={key:2,class:"text-xs text-gray-400"},Do={key:2,class:"text-xs text-gray-400"},Ao=oe({__name:"TraceNetworkDrawer",props:{open:{type:Boolean},entry:{},runId:{},testRunsCaseId:{}},emits:["update:open"],setup(s,{emit:y}){const x=s,w=y,C=[{key:"dns",label:"DNS",color:"bg-sky-400"},{key:"connect",label:"Connect",color:"bg-violet-400"},{key:"ssl",label:"TLS",color:"bg-rose-400"},{key:"send",label:"Send",color:"bg-amber-400"},{key:"wait",label:"Wait",color:"bg-blue-400"},{key:"receive",label:"Receive",color:"bg-emerald-400"}],p=v(()=>{const S=x.entry?.timings;return S?C.map(j=>({...j,value:S[j.key]??-1})).filter(j=>typeof j.value=="number"&&j.value>=0):[]}),n=v(()=>p.value.reduce((S,j)=>S+j.value,0)),m=v(()=>{const S=x.entry?.requestPostData??"";return S.startsWith("{")||S.startsWith("[")}),u=U(null),T=U(!1),g=new Map;return ke(()=>[x.open,x.entry?.bodySha1],async([S,j])=>{if(u.value=null,!S||!j||!x.runId)return;const F=g.get(j);if(F){u.value=F;return}T.value=!0;try{const _=await $fetch(`/api/test-run-cases/${x.testRunsCaseId}/trace-network-body`,{query:{sha1:j}});g.set(j,_),u.value=_}catch{u.value={status:"not-found"}}finally{T.value=!1}},{immediate:!0}),(S,j)=>{const F=me,_=Le,f=nn,M=Je,V=an;return t(),b(V,{open:s.open,title:"Request detail",ui:{content:"max-w-xl"},"onUpdate:open":j[0]||(j[0]=B=>w("update:open",B))},{body:c(()=>[s.entry?(t(),a("div",lo,[o("div",co,[o("div",uo,[r(F,{color:("httpMethodColor"in S?S.httpMethodColor:e(We))(s.entry.method),variant:"soft",size:"sm",class:"font-mono shrink-0"},{default:c(()=>[d(l(s.entry.method),1)]),_:1},8,["color"]),r(F,{color:("httpStatusColor"in S?S.httpStatusColor:e(qe))(s.entry.status),variant:"soft",size:"sm",class:"font-mono shrink-0 tabular-nums"},{default:c(()=>[d(l(s.entry.status>0?s.entry.status:"—"),1)]),_:1},8,["color"]),s.entry.statusText?(t(),a("span",mo,l(s.entry.statusText),1)):i("",!0)]),o("code",fo,l(s.entry.url),1),s.entry.failureText?(t(),a("p",po,l(s.entry.failureText),1)):i("",!0),o("div",go,[s.entry.resourceType?(t(),a("span",yo,l(s.entry.resourceType),1)):i("",!0),s.entry.mimeType?(t(),a("span",ho,l(s.entry.mimeType),1)):i("",!0),s.entry.responseBodySize!=null?(t(),a("span",xo,l(("formatBytes"in S?S.formatBytes:e(be))(s.entry.responseBodySize)),1)):i("",!0),s.entry.transferSize!=null?(t(),a("span",vo,l(("formatBytes"in S?S.formatBytes:e(be))(s.entry.transferSize))+" transferred",1)):i("",!0),r(_,{ms:s.entry.duration},null,8,["ms"]),s.entry.duringFailure?(t(),b(F,{key:4,color:"error",variant:"subtle",size:"xs"},{default:c(()=>[...j[1]||(j[1]=[d("During failing action",-1)])]),_:1})):i("",!0)])]),e(p).length>0&&e(n)>0?(t(),a("div",_o,[j[2]||(j[2]=o("p",{class:"text-xs font-medium text-gray-500 dark:text-gray-400 mb-1.5"},"Timing",-1)),o("div",ko,[(t(!0),a(P,null,X(e(p),B=>(t(),a("div",{key:B.key,class:Z(B.color),style:$e({width:`${Math.max(.5,B.value/e(n)*100)}%`}),title:`${B.label}: ${("formatDuration"in S?S.formatDuration:e(Ys))(B.value)}`},null,14,bo))),128))]),o("div",wo,[(t(!0),a(P,null,X(e(p),B=>(t(),a("span",{key:B.key,class:"inline-flex items-center gap-1"},[o("span",{class:Z(["size-2 rounded-full",B.color])},null,2),d(" "+l(B.label)+" ",1),r(_,{ms:B.value,"no-title":""},null,8,["ms"])]))),128))])])):i("",!0),(t(),a(P,null,X(["request","response"],B=>o("div",{key:B},[o("p",$o,l(B)+" headers",1),(B==="request"?s.entry.requestHeaders:s.entry.responseHeaders).length>0?(t(),a("div",Co,[(t(!0),a(P,null,X(B==="request"?s.entry.requestHeaders:s.entry.responseHeaders,z=>(t(),a("div",{key:`${B}-${z.name}`,class:"px-2 py-1 text-xs font-mono flex gap-2"},[o("span",To,l(z.name)+":",1),o("span",So,l(z.value),1)]))),128))])):(t(),a("p",Io,"None recorded."))])),64)),s.entry.requestPostData?(t(),a("div",Ro,[j[3]||(j[3]=o("p",{class:"text-xs font-medium text-gray-500 dark:text-gray-400 mb-1.5"},"Request body",-1)),r(f,{code:s.entry.requestPostData,lang:e(m)?"json":"text"},null,8,["code","lang"])])):i("",!0),o("div",null,[j[4]||(j[4]=o("p",{class:"text-xs font-medium text-gray-500 dark:text-gray-400 mb-1.5"},"Response body",-1)),e(T)?(t(),b(M,{key:0,text:"Loading body…",padded:!1})):e(u)?(t(),a(P,{key:1},[e(u).status==="ok"&&e(u).kind==="image"?(t(),a("div",Lo,[o("img",{src:e(u).dataUri,alt:s.entry.url,class:"max-w-full max-h-96"},null,8,zo)])):e(u).status==="ok"?(t(),a("div",jo,[r(f,{code:e(u).content??"",lang:e(u).kind==="json"?"json":"text"},null,8,["code","lang"]),e(u).truncated?(t(),a("p",No,"Preview truncated.")):i("",!0)])):(t(),a("p",Mo,l(e(u).status==="too-large"?`Body too large to preview (${("formatBytes"in S?S.formatBytes:e(be))(e(u).size??0)}) — open the trace viewer to inspect it.`:e(u).status==="unsupported"?`No preview for ${e(u).mimeType||"this content type"} — open the trace viewer to inspect it.`:"Body not stored in the trace."),1))],64)):s.entry.bodySha1?i("",!0):(t(),a("p",Do,"No body captured for this request."))])])):i("",!0)]),_:1},8,["open"])}}}),Po=Object.assign(Ao,{__name:"TraceNetworkDrawer"}),Uo={class:"flex items-center justify-between gap-2 mb-2"},Bo={key:0,class:"hidden sm:flex items-center gap-1.5 text-xs text-gray-400"},Fo={class:"space-y-1 max-h-[28rem] overflow-y-auto"},Vo=["title","onClick"],Eo={class:"flex items-center gap-2 text-sm min-w-0"},Oo={class:"truncate text-xs flex-1 min-w-0"},Ho={key:0,class:"shrink-0 text-xs text-gray-400 font-mono hidden md:inline"},Ko={key:1,class:"shrink-0 text-xs text-gray-400 tabular-nums hidden sm:inline"},Wo={class:"relative h-1.5 mt-1 rounded bg-gray-100 dark:bg-gray-800 overflow-hidden"},qo={key:0,class:"mt-2 text-xs text-gray-400 dark:text-gray-500"},Go=oe({__name:"TraceNetworkList",props:{data:{},runId:{},testRunsCaseId:{}},setup(s){const y=s,x=U("all"),w=v(()=>y.data.requests??[]),C=v(()=>({total:w.value.length,failed:w.value.filter(M=>M.failed).length,duringFailure:w.value.filter(M=>M.duringFailure).length})),p=v(()=>[{label:`All (${C.value.total})`,value:"all"},{label:`Failed (${C.value.failed})`,value:"failed",disabled:C.value.failed===0},{label:`During failure (${C.value.duringFailure})`,value:"duringFailure",disabled:C.value.duringFailure===0}]),n=v(()=>x.value==="failed"?w.value.filter(M=>M.failed):x.value==="duringFailure"?w.value.filter(M=>M.duringFailure):w.value);function m(M){try{return new URL(M).pathname||M}catch{return M}}const u=v(()=>Math.max(1,y.data.timelineDuration??1));function T(M){const V=Math.max(0,Math.min(100,M.start/u.value*100)),B=Math.min(100-V,Math.max(1.5,M.duration/u.value*100));return{left:`${V}%`,width:`${B}%`}}const g=v(()=>{const M=y.data.failingWindow;if(!M||M.end<=M.start)return null;const V=Math.max(0,Math.min(100,M.start/u.value*100)),B=Math.max(.5,Math.min(100-V,(M.end-M.start)/u.value*100));return{left:`${V}%`,width:`${B}%`}});function S(M){return M.failed?"bg-red-500":M.duration>1e3?"bg-orange-400":"bg-gray-400 dark:bg-gray-500"}function j(M){return M.failed?"border-l-2 border-l-red-400 dark:border-l-red-600":M.duringFailure?"border-l-2 border-l-amber-400 dark:border-l-amber-600":"border-l-2 border-l-transparent"}const F=U(null),_=U(!1);function f(M){F.value=M,_.value=!0}return(M,V)=>{const B=Ge,z=me,q=Le,J=Po;return t(),a("div",null,[o("div",Uo,[r(B,{modelValue:e(x),"onUpdate:modelValue":V[0]||(V[0]=A=>ye(x)?x.value=A:null),items:e(p),size:"xs",variant:"link",ui:{list:"gap-2",trigger:"px-1.5"}},null,8,["modelValue","items"]),s.data.failingWindow?(t(),a("span",Bo,[...V[2]||(V[2]=[o("span",{class:"inline-block w-3 h-2 rounded-sm bg-red-500/10 border border-red-300 dark:border-red-800"},null,-1),d(" failing action ",-1)])])):i("",!0)]),o("div",Fo,[(t(!0),a(P,null,X(e(n),A=>(t(),a("button",{key:A.index,type:"button",class:Z([j(A),"w-full rounded bg-gray-50/60 dark:bg-gray-800/40 py-1.5 px-2 text-left cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800"]),title:A.url,onClick:se=>f(A)},[o("div",Eo,[r(z,{color:("httpMethodColor"in M?M.httpMethodColor:e(We))(A.method),variant:"soft",size:"xs",class:"font-mono shrink-0"},{default:c(()=>[d(l(A.method),1)]),_:2},1032,["color"]),r(z,{color:("httpStatusColor"in M?M.httpStatusColor:e(qe))(A.status),variant:"soft",size:"xs",class:"font-mono shrink-0 tabular-nums",title:A.failureText||A.statusText},{default:c(()=>[d(l(A.status>0?A.status:"—"),1)]),_:2},1032,["color","title"]),o("code",Oo,l(m(A.url)),1),A.resourceType?(t(),a("span",Ho,l(A.resourceType),1)):i("",!0),A.responseBodySize!=null?(t(),a("span",Ko,l(("formatBytes"in M?M.formatBytes:e(be))(A.responseBodySize)),1)):i("",!0),o("span",{class:Z(["ml-1 shrink-0 text-xs tabular-nums",A.duration>1e3?"text-red-600 font-medium":A.duration>500?"text-orange-500":"text-gray-500"])},[r(q,{ms:A.duration,"unit-class":"opacity-60"},null,8,["ms"])],2)]),o("div",Wo,[e(g)?(t(),a("div",{key:0,class:"absolute inset-y-0 bg-red-500/10 border-x border-red-300/60 dark:border-red-800/60",style:$e(e(g))},null,4)):i("",!0),o("div",{class:Z(["absolute inset-y-0 rounded-full",S(A)]),style:$e(T(A))},null,6)])],10,Vo))),128))]),s.data.truncated?(t(),a("p",qo," Showing the first "+l(e(w).length)+" of "+l(s.data.totalBeforeCap)+" requests recorded in the trace. ",1)):i("",!0),r(J,{open:e(_),"onUpdate:open":V[1]||(V[1]=A=>ye(_)?_.value=A:null),entry:e(F),"run-id":s.runId,"test-runs-case-id":s.testRunsCaseId},null,8,["open","entry","run-id","test-runs-case-id"])])}}}),Jo=Object.assign(Go,{__name:"TraceNetworkList"}),Qo={class:"flex flex-wrap items-center gap-x-3 gap-y-1"},Zo={key:0,class:"flex items-center gap-2 text-xs"},Xo={key:0,class:"flex items-center gap-1 text-red-600 dark:text-red-400"},Yo={key:1,class:"flex items-center gap-1 text-amber-600 dark:text-amber-400"},er={key:2,class:"text-xs text-gray-400 py-2"},tr={key:1,class:"space-y-1 max-h-[28rem] overflow-y-auto"},sr=["disabled","onClick"],nr={key:1,class:"size-3.5 shrink-0"},ar=["title"],or=["title"],rr=["title"],ir=["title"],lr=["title"],cr=["title"],ur={key:0,class:"px-2 pt-1.5 pb-2 pl-7 space-y-1"},dr={class:"flex items-center gap-1.5 text-[11px] uppercase tracking-wide text-gray-400"},mr=["title"],fr={key:0,class:"shrink-0 text-[10px] uppercase text-gray-400 font-mono hidden sm:inline"},pr={class:"relative flex-1 h-3 rounded bg-gray-100 dark:bg-gray-800 min-w-0"},gr={key:1,class:"px-2 pb-2 pl-7 space-y-1.5"},yr={class:"flex items-start gap-2"},hr={key:0,class:"text-gray-400 shrink-0 font-mono"},xr={class:"font-mono break-all text-gray-700 dark:text-gray-300 flex-1 min-w-0"},vr=["title"],_r={key:0,class:"mt-1.5"},kr=["onClick"],br={key:0,class:"mt-1 whitespace-pre-wrap break-all font-mono text-[11px] leading-relaxed text-gray-500 dark:text-gray-400 max-h-48 overflow-y-auto"},wr={key:2,class:"mt-3 flex items-center gap-1.5 text-xs text-gray-400 dark:text-gray-500"},$r={key:3,class:"mt-3 flex items-center gap-1.5 text-xs text-gray-400 dark:text-gray-500"},Cr=oe({__name:"TestCaseNetworkRequests",props:{requests:{},runId:{},testRunsCaseId:{},hasTrace:{type:Boolean}},setup(s,{expose:y}){const x=s,w=U("all"),{data:C,pending:p,load:n}=Ea(()=>x.runId,()=>x.testRunsCaseId,()=>!!x.hasTrace),m=U(null),u=v({get:()=>m.value??(x.requests.length===0&&x.hasTrace?"trace":"captured"),set:k=>{m.value=k}});ke(()=>u.value==="trace",k=>{k&&n()},{immediate:!0});const T=v(()=>C.value?.status==="ok"?C.value.requests?.length??0:null),g=v(()=>[{label:`Captured (${x.requests.length})`,value:"captured",disabled:x.requests.length===0},{label:T.value!=null?`Full trace (${T.value})`:"Full trace",value:"trace"}]);function S(){x.hasTrace&&(m.value="trace")}y({showTraceMode:S});const j=U(new Set);function F(k){const R=new Set(j.value);R.has(k)?R.delete(k):R.add(k),j.value=R}const _=U(new Set);function f(k){const R=new Set(_.value);R.has(k)?R.delete(k):R.add(k),_.value=R}function M(k){if(k.length===0)return[];const R=Math.min(...k.map(K=>K.startMs)),H=Math.max(...k.map(K=>K.startMs+K.durMs)),G=Math.max(1,H-R),Y=new Map(k.map(K=>[K.id,K])),ee=K=>{let Q=0,te=K;const ae=new Set;for(;te?.parentId&&Y.has(te.parentId)&&!ae.has(te.id)&&(ae.add(te.id),te=Y.get(te.parentId),Q++,!(Q>8)););return Q};return[...k].sort((K,Q)=>K.startMs-Q.startMs||Q.durMs-K.durMs).map(K=>({...K,offsetPct:(K.startMs-R)/G*100,widthPct:Math.max(1.5,K.durMs/G*100),depth:ee(K)}))}function V(k){return k.status==="error"?"bg-red-400 dark:bg-red-500":k.kind==="db"?"bg-violet-400 dark:bg-violet-500":k.kind==="client"?"bg-sky-400 dark:bg-sky-500":k.kind==="internal"?"bg-gray-400 dark:bg-gray-500":"bg-emerald-400 dark:bg-emerald-500"}function B(k){const R=k.toLowerCase();return R==="critical"||R==="fatal"?3:R==="error"?2:R==="warning"||R==="warn"?1:0}function z(k){const R=B(k);if(R>=2)return"error";if(R===1)return"warning";const H=k.toLowerCase();return H==="info"||H==="information"?"info":"neutral"}function q(k){try{return new URL(k).pathname||k}catch{return k}}function J(k){return(k.split("/")[1]??k).replace(/^vnd\.[^+]*\+?/,"").replace(/^x-/,"")||k}function A(k){return k?new Date(k).toLocaleString():""}const se=v(()=>x.requests.map((k,R)=>{const H=Array.isArray(k.serverLogs)?k.serverLogs:[],G=Array.isArray(k.serverTraces)?k.serverTraces:[];let Y=0,ee=0;for(const Q of H){const te=B(Q.level);te>=2?Y++:te===1&&ee++}const K=G.find(Q=>!Q.parentId)??G[0];return{...k,_index:R,logs:[...H].sort((Q,te)=>Q.timestamp-te.timestamp),spans:G,serverMs:K?K.durMs:null,errorLogCount:Y,warnLogCount:ee,failed:k.status>=400,hasDetail:H.length>0||G.length>0,path:q(k.url)}})),O=v(()=>{let k=0,R=0,H=0,G=0,Y=0;for(const ee of se.value)ee.failed&&k++,ee.logs.length>0&&R++,ee.spans.length>0&&H++,G+=ee.errorLogCount,Y+=ee.warnLogCount;return{total:se.value.length,failed:k,withLogs:R,withSpans:H,errorLogs:G,warnLogs:Y}}),ue=v(()=>{let k=se.value;return w.value==="failed"?k=k.filter(R=>R.failed):w.value==="logs"&&(k=k.filter(R=>R.logs.length>0)),[...k].sort((R,H)=>{const G=Y=>(Y.errorLogCount>0?3:0)+(Y.failed?2:0)+(Y.logs.length>0?1:0);return G(H)-G(R)||R._index-H._index})}),$=v(()=>[{label:`All (${O.value.total})`,value:"all"},{label:`Failed (${O.value.failed})`,value:"failed",disabled:O.value.failed===0},{label:`With logs (${O.value.withLogs})`,value:"logs",disabled:O.value.withLogs===0}]),I=v(()=>O.value.withLogs>0);function ne(k){return k.errorLogCount>0||k.status>=500?"border-l-2 border-l-red-400 dark:border-l-red-600":k.failed||k.warnLogCount>0?"border-l-2 border-l-amber-400 dark:border-l-amber-600":"border-l-2 border-l-transparent"}return(k,R)=>{const H=le,G=Ge,Y=Je,ee=Jo,K=me,Q=Le,te=bt,ae=fe;return t(),b(ae,{icon:"i-lucide-network",title:"Network & backend logs",count:e(u)==="trace"?e(T):e(O).total,help:"case.network"},{actions:c(()=>[o("div",Qo,[e(u)==="captured"?(t(),a(P,{key:0},[e(O).errorLogs>0||e(O).warnLogs>0?(t(),a("div",Zo,[e(O).errorLogs>0?(t(),a("span",Xo,[r(H,{name:"i-lucide-octagon-alert",class:"size-3.5"}),d(l(e(O).errorLogs),1)])):i("",!0),e(O).warnLogs>0?(t(),a("span",Yo,[r(H,{name:"i-lucide-triangle-alert",class:"size-3.5"}),d(l(e(O).warnLogs),1)])):i("",!0)])):i("",!0),r(G,{modelValue:e(w),"onUpdate:modelValue":R[0]||(R[0]=D=>ye(w)?w.value=D:null),items:e($),size:"xs",variant:"link",ui:{list:"gap-2",trigger:"px-1.5"}},null,8,["modelValue","items"])],64)):i("",!0),s.hasTrace?(t(),b(G,{key:1,modelValue:e(u),"onUpdate:modelValue":R[1]||(R[1]=D=>ye(u)?u.value=D:null),items:e(g),size:"xs",variant:"pill",ui:{list:"gap-1 p-0.5",trigger:"px-2"}},null,8,["modelValue","items"])):i("",!0)])]),default:c(()=>[e(u)==="trace"?(t(),a(P,{key:0},[e(p)||!e(C)?(t(),b(Y,{key:0,text:"Parsing trace network stream…"})):e(C).status==="ok"?(t(),b(ee,{key:1,data:e(C),"run-id":s.runId??null,"test-runs-case-id":s.testRunsCaseId??0},null,8,["data","run-id","test-runs-case-id"])):(t(),a("p",er,"No network activity recorded in this trace."))],64)):(t(),a("div",tr,[(t(!0),a(P,null,X(e(ue),D=>(t(),a("div",{key:D._index,class:Z([ne(D),"rounded bg-gray-50/60 dark:bg-gray-800/40"])},[o("button",{type:"button",class:Z(["w-full flex items-center gap-2 py-1.5 px-2 text-sm text-left",D.hasDetail?"cursor-pointer hover:bg-gray-100 dark:hover:bg-gray-800":"cursor-default"]),disabled:!D.hasDetail,onClick:W=>D.hasDetail&&F(D._index)},[D.hasDetail?(t(),b(H,{key:0,name:e(j).has(D._index)?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"size-3.5 shrink-0 text-gray-400"},null,8,["name"])):(t(),a("span",nr)),r(K,{color:("httpMethodColor"in k?k.httpMethodColor:e(We))(D.method),variant:"soft",size:"xs",class:"font-mono shrink-0"},{default:c(()=>[d(l(D.method),1)]),_:2},1032,["color"]),r(K,{color:("httpStatusColor"in k?k.httpStatusColor:e(qe))(D.status),variant:"soft",size:"xs",class:"font-mono shrink-0 tabular-nums"},{default:c(()=>[d(l(D.status||"—"),1)]),_:2},1032,["color"]),o("code",{class:"truncate text-xs flex-1 min-w-0",title:D.url},l(D.path),9,ar),D.contentType?(t(),a("span",{key:2,class:"shrink-0 text-xs text-gray-400 font-mono hidden md:inline",title:`Response content type: ${D.contentType}`},l(J(D.contentType)),9,or)):i("",!0),D.errorLogCount>0?(t(),a("span",{key:3,class:"shrink-0 inline-flex items-center gap-1 text-xs text-red-600 dark:text-red-400",title:`${D.errorLogCount} backend error log(s)`},[r(H,{name:"i-lucide-octagon-alert",class:"size-3.5"}),d(l(D.errorLogCount),1)],8,rr)):i("",!0),D.warnLogCount>0?(t(),a("span",{key:4,class:"shrink-0 inline-flex items-center gap-1 text-xs text-amber-600 dark:text-amber-400",title:`${D.warnLogCount} backend warning log(s)`},[r(H,{name:"i-lucide-triangle-alert",class:"size-3.5"}),d(l(D.warnLogCount),1)],8,ir)):i("",!0),D.serverMs!=null?(t(),a("span",{key:5,class:"shrink-0 inline-flex items-center gap-1 text-xs text-emerald-600 dark:text-emerald-400 tabular-nums",title:`Server-side processing time (${D.spans.length} span${D.spans.length===1?"":"s"})`},[r(H,{name:"i-lucide-server",class:"size-3.5"}),r(Q,{ms:D.serverMs,"no-title":""},null,8,["ms"])],8,lr)):i("",!0),D.startTime?(t(),a("span",{key:6,class:"shrink-0 text-xs text-gray-400 hidden sm:inline",title:A(D.startTime)},l(("formatRelativeTime"in k?k.formatRelativeTime:e(Se))(D.startTime)),9,cr)):i("",!0),o("span",{class:Z(["ml-1 shrink-0 text-xs tabular-nums",(D.duration??0)>1e3?"text-red-600 font-medium":(D.duration??0)>500?"text-orange-500":"text-gray-500"])},[r(Q,{ms:D.duration,"unit-class":"opacity-60"},null,8,["ms"])],2)],10,sr),D.spans.length>0&&e(j).has(D._index)?(t(),a("div",ur,[o("div",dr,[r(H,{name:"i-lucide-waypoints",class:"size-3.5"}),R[2]||(R[2]=d("Server trace ",-1))]),(t(!0),a(P,null,X(M(D.spans),W=>(t(),a("div",{key:W.id,class:"flex items-center gap-2 text-xs",title:W.status==="error"?`${W.name} (error)`:W.name},[o("div",{class:"w-40 sm:w-56 shrink-0 flex items-center gap-1 min-w-0",style:$e({paddingLeft:`${W.depth*12}px`})},[W.kind?(t(),a("span",fr,l(W.kind),1)):i("",!0),o("span",{class:Z(["truncate font-mono",W.status==="error"?"text-red-600 dark:text-red-400":"text-gray-600 dark:text-gray-300"])},l(W.name),3)],4),o("div",pr,[o("div",{class:Z(["absolute top-0 h-3 rounded",V(W)]),style:$e({left:`${W.offsetPct}%`,width:`${W.widthPct}%`})},null,6)]),r(Q,{ms:W.durMs,class:"w-12 shrink-0 text-right text-gray-500"},null,8,["ms"])],8,mr))),128))])):i("",!0),D.logs.length>0&&e(j).has(D._index)?(t(),a("div",gr,[(t(!0),a(P,null,X(D.logs,(W,xe)=>(t(),a("div",{key:xe,class:"rounded border border-default bg-white dark:bg-gray-900/60 p-2 text-xs"},[o("div",yr,[r(K,{color:z(W.level),variant:"soft",size:"xs",class:"shrink-0 capitalize"},{default:c(()=>[d(l(W.level),1)]),_:2},1032,["color"]),W.category?(t(),a("span",hr,"["+l(W.category)+"]",1)):i("",!0),o("span",xr,l(W.message),1),W.timestamp?(t(),a("span",{key:1,class:"shrink-0 text-gray-400 tabular-nums",title:A(W.timestamp)},l(("formatRelativeTime"in k?k.formatRelativeTime:e(Se))(W.timestamp)),9,vr)):i("",!0)]),W.stack?(t(),a("div",_r,[o("button",{type:"button",class:"inline-flex items-center gap-1 text-gray-400 hover:text-gray-600 dark:hover:text-gray-200",onClick:Pe=>f(`${D._index}:${xe}`)},[r(H,{name:e(_).has(`${D._index}:${xe}`)?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"size-3"},null,8,["name"]),R[3]||(R[3]=d(" Stack trace ",-1))],8,kr),e(_).has(`${D._index}:${xe}`)?(t(),a("pre",br,l(W.stack),1)):i("",!0)])):i("",!0)]))),128))])):i("",!0)],2))),128))])),e(u)==="captured"&&!e(I)?(t(),a("p",wr,[r(H,{name:"i-lucide-info",class:"size-3.5 shrink-0"}),R[5]||(R[5]=d(" No backend server logs captured — install ",-1)),r(te,{to:"backend-logs","no-icon":"",class:"underline"},{default:c(()=>[...R[4]||(R[4]=[d("a Piwi backend integration",-1)])]),_:1}),R[6]||(R[6]=d(" to see server-side warnings and errors under each request. ",-1))])):i("",!0),s.hasTrace?i("",!0):(t(),a("p",$r,[r(H,{name:"i-lucide-info",class:"size-3.5 shrink-0"}),o("span",null,[R[8]||(R[8]=d(" Want to go deeper? Record traces (",-1)),R[9]||(R[9]=o("code",null,"trace: 'retain-on-failure'",-1)),R[10]||(R[10]=d(") to see every request with headers, timing and bodies here. ",-1)),r(te,{to:"evidence#trace-powered-deep-views","no-icon":"",class:"underline"},{default:c(()=>[...R[7]||(R[7]=[d("Learn more",-1)])]),_:1})])]))]),_:1},8,["count"])}}}),Tr=Object.assign(Cr,{__name:"TestCaseNetworkRequests"}),Sr={class:"space-y-2"},Ir=oe({__name:"TestCaseTracesCard",props:{traces:{}},setup(s){return(y,x)=>{const w=vs,C=fe;return s.traces.length>0?(t(),b(C,{key:0,icon:"i-lucide-bug-play",title:"Traces",count:s.traces.length,help:"case.traces"},{default:c(()=>[o("div",Sr,[(t(!0),a(P,null,X(s.traces,p=>(t(),b(w,{key:p.id,trace:p,class:"py-2 px-3 rounded-lg border"},null,8,["trace"]))),128))])]),_:1},8,["count"])):i("",!0)}}}),Rr=Object.assign(Ir,{__name:"TestCaseTracesCard"}),Lr={class:"space-y-3"},zr={class:"flex items-center justify-between px-3 py-2 bg-gray-50 dark:bg-gray-800/50 border-b"},jr={class:"flex items-center gap-2 min-w-0"},Nr={class:"text-sm font-medium truncate"},Mr={key:0,class:"text-xs text-gray-400 shrink-0"},Dr={class:"text-xs text-gray-400"},Ar={class:"flex items-center gap-1 shrink-0"},Pr=["href"],Ur={key:0,class:"bg-gray-100 dark:bg-gray-900"},Br=["src","alt","onClick"],Fr={key:1,class:"bg-black"},Vr={key:2,class:"bg-gray-50 dark:bg-gray-900"},Er={key:0,class:"flex items-center justify-center py-8"},Or={key:1,class:"p-4 text-red-500 text-sm"},Hr={key:2,class:"p-4 overflow-auto max-h-96"},Kr={class:"text-sm whitespace-pre-wrap font-sans leading-relaxed"},Wr=oe({__name:"TestCaseAttachmentsCard",props:{attachments:{}},setup(s){const y=s,x=He(),w=U(null),C=v(()=>y.attachments.filter(z=>Te(z.path,z.contentType)).map(z=>({src:g(z.path,z.contentType),name:z.name||S(z.path)})));function p(z){w.value=z}const n=new Set([".md",".mdx",".markdown"]),m=new Set(["text/markdown","text/x-markdown"]);function u(z){return z.toLowerCase().split(".").pop()||""}function T(z,q){return!!(n.has(u(z))||q&&m.has(q.toLowerCase()))}function g(z,q){return $t(z,q,x.app?.baseURL)}function S(z){return z.split("/").pop()||z}function j(z){return z==null?"":be(z)}const F=U({}),_=U({}),f=U({}),M=U(new Set);async function V(z){if(F.value[z.id]===void 0&&!f.value[z.id]){f.value[z.id]=!0,_.value[z.id]=null;try{const q=await $fetch(g(z.path,z.contentType),{responseType:"text"});F.value[z.id]=q}catch{_.value[z.id]="Failed to load preview"}finally{f.value[z.id]=!1}}}function B(z,q){const J=new Set(M.value);J.has(z)?J.delete(z):(J.add(z),V(q)),M.value=J}return(z,q)=>{const J=le,A=Re,se=_s,O=ks,ue=fe;return s.attachments.length>0?(t(),b(ue,{key:0,icon:"i-lucide-paperclip",title:"Attachments",count:s.attachments.length},{default:c(()=>[o("div",Lr,[(t(!0),a(P,null,X(s.attachments,$=>(t(),a("div",{key:$.id,class:"rounded-lg border overflow-hidden"},[o("div",zr,[o("div",jr,[r(J,{name:e(Te)($.path,$.contentType)?"i-lucide-image":e(Ae)($.path,$.contentType)?"i-lucide-video":T($.path,$.contentType)?"i-lucide-file-text":"i-lucide-file",class:"size-4 text-gray-400 shrink-0"},null,8,["name"]),o("span",Nr,l(S($.path)),1),$.name&&$.name!==S($.path)?(t(),a("span",Mr,l($.name),1)):i("",!0),o("span",Dr,l(j($.size)),1)]),o("div",Ar,[T($.path,$.contentType)?(t(),b(A,{key:0,size:"xs",color:"neutral",variant:"soft",onClick:I=>B($.id,$)},{default:c(()=>[d(l(e(M).has($.id)?"Hide preview":"Preview"),1)]),_:2},1032,["onClick"])):i("",!0),o("a",{href:g($.path,$.contentType),target:"_blank",class:"text-primary hover:underline text-xs shrink-0"},"Open",8,Pr)])]),e(Te)($.path,$.contentType)?(t(),a("div",Ur,[o("img",{src:g($.path,$.contentType),alt:$.name||"Screenshot",class:"max-w-full max-h-96 object-contain mx-auto cursor-pointer hover:opacity-90 transition-opacity",loading:"lazy",onClick:I=>p(e(C).findIndex(ne=>ne.src===g($.path,$.contentType)))},null,8,Br)])):e(Ae)($.path,$.contentType)?(t(),a("div",Fr,[r(se,{src:g($.path,$.contentType)},null,8,["src"])])):T($.path,$.contentType)&&e(M).has($.id)?(t(),a("div",Vr,[e(f)[$.id]?(t(),a("div",Er,[r(J,{name:"i-lucide-loader-circle",class:"size-5 animate-spin text-gray-400"})])):e(_)[$.id]?(t(),a("div",Or,l(e(_)[$.id]),1)):e(F)[$.id]?(t(),a("div",Hr,[o("pre",Kr,l(e(F)[$.id]),1)])):i("",!0)])):i("",!0)]))),128))]),r(O,{modelValue:e(w),"onUpdate:modelValue":q[0]||(q[0]=$=>ye(w)?w.value=$:null),images:e(C)},null,8,["modelValue","images"])]),_:1},8,["count"])):i("",!0)}}}),qr=Object.assign(Wr,{__name:"TestCaseAttachmentsCard"});function Gr(s){return Array.isArray(s)?s.some(y=>y&&typeof y.type=="string"&&y.type.toLowerCase()==="slow"):!1}function Jr(s){const y=[];if(!s)return y;const x=s.steps||[],C=x.filter(n=>n.category==="navigation").filter(n=>n.duration>3e3);if(C.length>0){const n=C.sort((m,u)=>u.duration-m.duration)[0];y.push({type:"warning",message:"Slow navigation detected",details:`"${n.title}" took ${(n.duration/1e3).toFixed(1)}s. The tested page may have performance issues (slow server response, heavy JS bundles, etc.).`})}x.length>20&&y.push({type:"info",message:"Many sequential actions",details:`This test has ${x.length} steps. Consider splitting it into smaller, focused tests for better isolation and faster feedback.`}),s.status==="passed"&&(s.retries||0)>0&&y.push({type:"warning",message:"Flaky test — passed after retries",details:`This test needed ${s.retries} ${s.retries===1?"retry":"retries"} to pass. Consider reviewing locator strategies, adding explicit waits, or checking for race conditions.`});const p=x.filter(n=>n.category==="assertion"&&n.duration>2e3);if(p.length>0){const n=p.sort((m,u)=>u.duration-m.duration)[0];y.push({type:"info",message:"Slow assertions detected",details:`"${n.title}" took ${(n.duration/1e3).toFixed(1)}s. The UI may be slow to render or the assertion timeout may need tuning.`})}return Gr(s.testAnnotations)&&typeof s.duration=="number"&&s.duration<1e4&&y.push({type:"info",message:"test.slow() may be unnecessary",details:`This run finished in ${(s.duration/1e3).toFixed(1)}s, yet the test is marked test.slow(), which triples its timeout budget. If it is consistently this fast, removing test.slow() lets a failure surface sooner.`}),typeof s.timeout=="number"&&s.timeout>0&&typeof s.duration=="number"&&s.duration>0&&s.timeout>=4*s.duration&&s.timeout-s.duration>=3e4&&y.push({type:"info",message:"Oversized timeout",details:`The timeout is ${(s.timeout/1e3).toFixed(0)}s but this run took ${(s.duration/1e3).toFixed(1)}s. A large timeout means a hang or failure waits far longer than necessary — consider lowering it toward the test's real duration.`}),y}function Qr(s,y){const x=s.search(/\n at /);if(x===-1)return y!==void 0&&s.length>y?s.slice(0,y)+`
4
- [truncated]`:s;const w=s.slice(0,x),p=s.slice(x).split(`
5
- `),n=[];let m=0;const u=()=>{m>0&&(n.push(`… (${m} internal frame${m>1?"s":""})`),m=0)};for(const g of p){const S=g.trimStart();S.startsWith("at ")?g.includes("node_modules")||S.startsWith("at node:")?m++:(u(),n.push(g)):(S===""||u(),n.push(g))}u();let T=w+`
6
- `+n.join(`
7
- `);return y!==void 0&&T.length>y&&(T=T.slice(0,y)+`
8
- [truncated]`),T}const Zr={class:"space-y-4"},Xr=["innerHTML"],Yr={class:"grid grid-cols-1 xl:grid-cols-[3fr_2fr] gap-4"},ei={class:"space-y-4 xl:order-2"},ti={class:"space-y-4 xl:order-1 min-w-0"},si={class:"max-h-96 overflow-y-auto"},ni={class:"space-y-3"},ai={key:0},oi={class:"flex flex-wrap items-center gap-x-3 gap-y-1.5 text-xs mb-3"},ri={class:"font-medium text-gray-600 dark:text-gray-300"},ii={class:"tabular-nums text-gray-500 dark:text-gray-400"},li={class:"text-xs tabular-nums text-gray-400 dark:text-gray-500"},ci={key:0,class:"inline-flex items-center justify-center size-5 rounded-full bg-red-100 dark:bg-red-900/30 text-red-600 dark:text-red-400 text-xs leading-none",title:"Step failed"},ui={key:1,class:"inline-flex items-center justify-center size-5 rounded-full bg-green-100 dark:bg-green-900/30 text-green-600 dark:text-green-400 text-xs leading-none",title:"Step passed"},di={class:"flex items-center gap-2"},mi={key:0,class:"text-xs text-red-500 mt-1 whitespace-pre-wrap break-words font-mono"},fi={class:"min-w-[6rem]"},pi={class:"flex items-center justify-between gap-2"},gi={key:0,class:"text-xs tabular-nums text-gray-400 dark:text-gray-500"},yi={class:"relative mt-1 h-1.5 w-full overflow-hidden rounded-full bg-gray-100 dark:bg-gray-800"},hi={class:"space-y-4 pt-4"},xi={key:3,class:"flex flex-col items-center justify-center py-12 text-gray-400"},vi={class:"space-y-4 pt-1"},_i={key:0,class:"space-y-2"},ki={class:"flex items-start gap-2"},bi={class:"space-y-4"},wi={key:3,class:"text-xs text-gray-400 pt-1"},$i={class:"bg-gray-100 dark:bg-gray-800 px-1 rounded"},Ci={class:"space-y-4 pt-4","data-shot":"execution-history"},Ti={key:0,class:"space-y-4"},Si={class:"text-xs whitespace-nowrap"},Ii={class:"text-gray-500"},Ri={class:"text-gray-400 ml-1"},Li={key:1,class:"text-gray-400"},zi=["title"],Ml=oe({__name:"[id]",async setup(s){let y,x;const w=is(),C=ls(),p=w.params.id,{data:n,refresh:m}=([y,x]=Oe(()=>gt(`/api/test-run-cases/${p}`,"$rX1OuZQOSq")),y=await y,x(),y),{data:u}=([y,x]=Oe(()=>ds(`test-run-case-history-${p}`,()=>{const h=n.value?.testCaseId;return h?$fetch(`/api/test-cases/${h}/history`).then(L=>L.items):Promise.resolve([])},{default:()=>[],watch:[()=>n.value?.testCaseId]})),y=await y,x(),y),{data:T,refresh:g}=([y,x]=Oe(()=>gt(`/api/test-run-cases/${p}/traces`,"$bq3dlhiM5e")),y=await y,x(),y),S=v(()=>(T.value?.length??0)>0);cs(v(()=>({title:n.value?.title?`${n.value.title} — execution — Piwi Dashboard`:`Execution #${p} — Piwi Dashboard`})));const j=v(()=>!!n.value?.error),F=v(()=>n.value?Jr(n.value):[]),_=v(()=>n.value?.steps?n.value.steps:[]),f=v(()=>n.value?.webVitals??null),M=v(()=>n.value?.aiUsage?.intents??null),V=v(()=>n.value?.networkRequests??[]),B=v(()=>{if(!u.value||u.value.length<2||!n.value?.duration)return null;const h=u.value.filter(ce=>ce.duration!==null&&ce.id!==n.value?.id);if(h.length===0)return null;const L=h.reduce((ce,ge)=>ce+(ge.duration||0),0)/h.length,E=n.value.duration,re=E-L,pe=L>0?Math.round(re/L*100):0;return{avg:Math.round(L),current:E,diff:Math.round(re),pct:pe}}),z=v(()=>n.value?.testRun?.metadata),q=v(()=>{const h=z.value;return h?.scm?h.scm:null}),J=v(()=>{const h=z.value;return h?.ci?h.ci:null}),A=v(()=>n.value?.failureCluster??null),se=v(()=>{const h=[];return j.value&&h.push({label:"Diagnosis",icon:"i-lucide-stethoscope",value:"diagnosis",slot:"diagnosis"}),h.push({label:`Steps (${_.value.length})`,icon:"i-lucide-list-checks",value:"steps",slot:"steps"}),j.value||h.push({label:"Artifacts",icon:"i-lucide-paperclip",value:"artifacts",slot:"artifacts"}),h.push({label:"Performance",icon:"i-lucide-gauge",value:"performance",slot:"performance"}),h.push({label:`History${u.value?.length?` (${u.value.length})`:""}`,icon:"i-lucide-trending-up",value:"history",slot:"history"}),h}),O=v(()=>se.value.map(h=>h.value));function ue(){return j.value?"diagnosis":"steps"}function $(h){let L=typeof h=="string"?h:"";return L==="error"&&(L="diagnosis"),L==="traces"&&(L=j.value?"diagnosis":"artifacts"),O.value.includes(L)?L:ue()}const I=U($(w.query.tab));ke(O,h=>{h.includes(I.value)||(I.value=$(w.query.tab))}),ke(I,h=>{w.query.tab!==h&&C.replace({query:{...w.query,tab:h}})},{immediate:!0});const ne=[{accessorKey:"startTime",header:"Date"},{accessorKey:"status",header:"Status"},{accessorKey:"duration",header:"Duration"},{accessorKey:"retries",header:"Retries"},{accessorKey:"runId",header:"Run"},{accessorKey:"error",header:"Error"}],k={navigation:"info",assertion:"success",action:"warning",input:"warning",api:"info",wait:"neutral",hook:"neutral",fixture:"neutral"},R=[{id:"index",header:"#",meta:{class:{th:"w-12",td:"w-12"}}},{id:"status",header:"",meta:{class:{th:"w-10",td:"w-10"}}},{accessorKey:"category",header:"Category",meta:{class:{th:"w-28",td:"w-28"}}},{accessorKey:"title",header:"Step"},{accessorKey:"duration",header:"Duration",meta:{class:{th:"w-44",td:"w-44"}}}],H=v(()=>{const h=new Map;for(const L of _.value){const E=h.get(L.category)??{count:0,duration:0};E.count+=1,E.duration+=L.duration||0,h.set(L.category,E)}return Array.from(h,([L,E])=>({category:L,...E})).sort((L,E)=>E.duration-L.duration)}),G=v(()=>{let h=-1,L=-1;return _.value.forEach((E,re)=>{(E.duration||0)>L&&(L=E.duration||0,h=re)}),h}),Y=v(()=>_.value.reduce((h,L)=>Math.max(h,L.duration||0),0)),ee=v(()=>_.value.length>0&&_.value.every(h=>typeof h.startTime=="number")),K=v(()=>n.value?.startedAt??(ee.value?Math.min(..._.value.map(h=>h.startTime)):0)),Q=v(()=>{const h=n.value?.duration??0;if(h>0)return h;if(ee.value){const L=Math.max(..._.value.map(E=>E.startTime+(E.duration||0)));return Math.max(1,L-K.value)}return 0});function te(h){if(ee.value&&Q.value>0){const E=Math.max(0,Math.min(100,(h.startTime-K.value)/Q.value*100)),re=Math.min(100-E,Math.max(1.5,(h.duration||0)/Q.value*100));return{left:`${E}%`,width:`${re}%`}}return{left:"0%",width:`${Y.value>0?Math.max(2,(h.duration||0)/Y.value*100):0}%`}}function ae(h){const L=n.value?.duration??0;if(L<=0)return"";const E=h/L*100;return E>0&&E<1?"<1%":`${Math.round(E)}%`}function D(h){return h>2e3?"text-red-600 font-medium":h>500?"text-orange-500":"text-gray-500"}function W(h){return h>2e3?"bg-red-500":h>500?"bg-orange-400":"bg-gray-400 dark:bg-gray-500"}const xe=v(()=>n.value?.testRun?.environment),Pe=v(()=>[{filePath:n.value?.filePath??"",title:n.value?.title??"",line:n.value?.line??null,projectName:n.value?.browser?.projectName??null}]),It=v(()=>fn(Pe.value)),{copy:Rt,copied:Qe}=pn(),Lt=v(()=>[{label:Qe.value?"Copied":"Retry command",icon:Qe.value?"i-lucide-check":"i-lucide-play",onClick:()=>Rt(It.value,{toast:"Retry command copied"})},{label:"Refresh",icon:"i-lucide-refresh-cw",onClick:()=>m()}]),zt=!!He().public.demoMode;let he=null;const Ze=v(()=>{const h=n.value?.testRun?.status;return h==="running"||h==="finalizing"});function jt(){if(zt||he)return;const h=n.value?.testRun?.id;h&&(he=new EventSource(`/api/test-runs/${h}/stream`),he.onmessage=L=>{try{const E=JSON.parse(L.data);E.type==="case-files"&&E.data?.executionId===Number(p)?(m(),g()):E.type==="run-finished"&&(m(),g(),Ue())}catch{}},he.onerror=()=>{})}function Ue(){he&&(he.close(),he=null)}ke(Ze,h=>{h?jt():Ue()},{immediate:!0}),us(Ue);const{copyRich:Nt,copied:Xe}=bs();function Mt(){const h=n.value;if(!h?.error)return;const L=window.location.origin,E=h.title??"Unknown test",re=h.location??"",pe=h.error.replace(/\x1b\[[0-9;]*[a-zA-Z]/g,""),ce=Ce=>Ce.replace(/&/g,"&amp;").replace(/</g,"&lt;").replace(/>/g,"&gt;"),ge=A.value?`${L}/failure-clusters/${A.value.id}`:null,Me=`${L}/test-run-cases/${p}?tab=diagnosis`,_e=n.value?.testCaseId?`${L}/test-cases/${n.value.testCaseId}`:null,Fe=[`❌ Test failed: ${E}`,re?`Location: ${re}`:null,"","Error:",pe,"",ge?`Failure cluster: ${ge}`:null,`Execution: ${Me}`,_e?`History: ${_e}`:null].filter(Ce=>Ce!==null).join(`
9
- `),Ve=[`<p><strong>❌ Test failed: ${ce(E)}</strong>${re?`<br><code>${ce(re)}</code>`:""}</p>`,`<p><strong>Error:</strong></p><pre>${pt(h.error)}</pre>`,`<p>🔗 ${ge?`<a href="${ge}">View failure cluster</a> · `:""}<a href="${Me}">Execution details</a>${_e?` · <a href="${_e}">Test history</a>`:""}</p>`].join("");Nt(Fe,Ve,{toast:"Failure copied"})}const Be=U(null),Ye=U(null),ze=U(null),je=U(null),et=U(null),Ne=U(null),tt=U(null),st=U(null),nt=U(null),at=U(null);function ve(h){h?.scrollIntoView({behavior:"smooth",block:"start"})}const ot={sampleError:()=>ve(Be.value),executionError:()=>ve(Be.value),testSource:()=>je.value?.reveal(),sourceFiles:()=>je.value?.reveal(),environmentDiff:()=>tt.value?.reveal(),visualDiff:()=>st.value?.reveal(),domSnapshot:()=>nt.value?.reveal(),ariaSnapshot:()=>at.value?.reveal(),screenshots:()=>Ne.value?.reveal(),tracePointers:()=>Ne.value?.reveal(),artifacts:()=>Ne.value?.reveal(),console:()=>ve(Ye.value),networkRequests:()=>ve(ze.value),serverTraces:()=>ve(ze.value),traceCallStack:()=>je.value?.reveal(),traceNetwork:()=>{et.value?.showTraceMode(),ve(ze.value)},steps:()=>{I.value="steps"},failingSteps:()=>{I.value="steps"}};return ms(Gs,{canLocate:h=>h in ot,open:h=>ot[h]?.()}),(h,L)=>{const E=ns,re=as,pe=le,ce=Ie,ge=Is,Me=Rs,_e=Ls,Fe=zs,Ve=Ns,Ce=Xn,Dt=ca,rt=Re,At=Ct,it=fe,Pt=ha,Ut=Ra,Bt=Fa,Ft=qa,Vt=eo,Et=$s,Ot=Cs,Ht=Ts,lt=io,ct=Tr,ut=ws,Kt=wt,Wt=Ke,qt=Ss,De=me,ie=Le,Gt=xt,dt=on,mt=rn,ft=ln,Jt=Rr,Qt=qr,de=vt,Ee=_t,Zt=Tt,Xt=cn,Yt=un,es=Ps,ts=js;return t(),b(ts,{id:"test-run-case-detail"},{header:c(()=>[r(Ve,null,{leading:c(()=>[r(E),r(re,{items:[{label:"Home",icon:"i-lucide-house",to:"/"},{label:"Projects",to:"/projects"},...e(n)?.testRun?.project?.id?[{label:e(n).testRun.project.name||"Project",to:`/projects/${e(n).testRun.project.id}`}]:[{label:"Project"}],...e(n)?.testRun?.id?[{label:`Run #${e(n).testRun.id}`+(e(n).testRun.label?` — ${e(n).testRun.label}`:""),to:`/test-runs/${e(n).testRun.id}`}]:[{label:"Test run"}],{label:e(n)?.title||`Execution #${e(p)}`}]},null,8,["items"])]),right:c(()=>[e(n)?.testCaseId?(t(),b(ce,{key:0,to:`/test-cases/${e(n).testCaseId}`,class:"text-xs text-gray-500 hover:text-primary mr-2 flex items-center gap-1",title:"View test case evolution and history"},{default:c(()=>[r(pe,{name:"i-lucide-trending-up",class:"size-3.5"}),L[2]||(L[2]=o("span",{class:"hidden sm:inline"},"Evolution",-1))]),_:1},8,["to"])):i("",!0),e(n)?(t(),b(ge,{key:1,endpoint:`/api/test-run-cases/${e(n).id}/share-links`},null,8,["endpoint"])):i("",!0),e(n)?(t(),b(Me,{key:2,endpoint:`/api/test-run-cases/${e(n).id}/export`,"base-name":`piwi-execution-${e(n).id}`,class:"mr-2"},null,8,["endpoint","base-name"])):i("",!0),r(_e,{"project-id":e(n)?.testRun?.project?.id,"project-label":e(n)?.testRun?.project?.label??e(n)?.testRun?.project?.name,cases:e(Pe),class:"mr-2"},null,8,["project-id","project-label","cases"]),r(Fe,{actions:e(Lt)},null,8,["actions"])]),_:1})]),body:c(()=>[r(es,{modelValue:e(I),"onUpdate:modelValue":L[1]||(L[1]=N=>ye(I)?I.value=N:null),"tab-items":e(se)},{summary:c(()=>[r(Ce,{"test-case":e(n)??null,"scm-info":e(q),"ci-info":e(J),browser:e(n)?.browser??null,environment:e(xe),"steps-count":e(_).length,"historical-timing":e(B),"stable-links":e(n)?.stableLinks??null,"project-key":e(n)?.testRun?.project?.id,"project-name":e(n)?.testRun?.project?.name,onRefresh:L[0]||(L[0]=N=>e(m)())},null,8,["test-case","scm-info","ci-info","browser","environment","steps-count","historical-timing","stable-links","project-key","project-name"]),r(Dt,{status:e(n)?.status,reason:e(n)?.didNotRunReason??null,"blocked-by-case":e(n)?.blockedByCase??null,"blocked-tests":e(n)?.blockedTests??null,class:"mt-4"},null,8,["status","reason","blocked-by-case","blocked-tests"])]),"tab-diagnosis":c(()=>[o("div",Zr,[o("div",{ref_key:"errorEl",ref:Be,class:"scroll-mt-4"},[e(n)?.error?(t(),b(it,{key:0,icon:"i-lucide-circle-x","icon-class":"text-red-500",title:"Error"},{actions:c(()=>[r(At,{text:e(Xe)?"Copied!":"Copy failure"},{default:c(()=>[r(rt,{size:"xs",variant:"ghost",color:"neutral",icon:e(Xe)?"i-lucide-check":"i-lucide-clipboard",onClick:Mt},null,8,["icon"])]),_:1},8,["text"])]),default:c(()=>[o("div",{class:"text-xs font-mono whitespace-pre-wrap break-words max-h-96 overflow-y-auto rounded bg-red-50 dark:bg-red-950/20 p-3",innerHTML:e(pt)(e(Qr)(e(n).error))},null,8,Xr)]),_:1})):i("",!0)],512),o("div",Yr,[o("div",ei,[r(Pt,{"test-case":e(n)??null,history:e(u),"current-id":Number(e(p))},null,8,["test-case","history","current-id"]),e(A)?(t(),b(Ut,{key:0,cluster:e(A)},null,8,["cluster"])):i("",!0),r(Bt,{"test-runs-case-id":Number(e(p))},null,8,["test-runs-case-id"])]),o("div",ti,[e(n)?.testSourceFrames?.length||e(n)?.testSource||e(S)?(t(),b(Ft,{key:0,ref_key:"testSourceCard",ref:je,"storage-key":"case-test-source",frames:e(n)?.testSourceFrames??null,"test-source":e(n)?.testSource??null,"run-id":e(n)?.testRun?.id??null,"test-runs-case-id":Number(e(p)),"has-trace":e(S),"project-key":e(n)?.testRun?.project?.id,"project-name":e(n)?.testRun?.project?.name},null,8,["frames","test-source","run-id","test-runs-case-id","has-trace","project-key","project-name"])):i("",!0),r(Vt,{ref_key:"evidenceCard",ref:Ne,"storage-key":"case-evidence",attachments:e(n)?.attachments??[],traces:e(T)??[]},null,8,["attachments","traces"]),e(n)?.testRun?.id?(t(),b(Et,{key:1,"storage-key":"case-locators","run-id":e(n).testRun.id,"test-runs-case-id":Number(e(p)),"ai-intents":e(M)},null,8,["run-id","test-runs-case-id","ai-intents"])):i("",!0),e(n)?.testRun?.id?(t(),b(Ot,{key:2,ref_key:"envDiffCard",ref:tt,"storage-key":"case-env-diff","run-id":e(n).testRun.id,"test-runs-case-id":Number(e(p))},null,8,["run-id","test-runs-case-id"])):i("",!0),e(n)?.testRun?.id?(t(),b(Ht,{key:3,ref_key:"visualDiffCard",ref:st,"storage-key":"case-visual-diff","run-id":e(n).testRun.id,"test-runs-case-id":Number(e(p))},null,8,["run-id","test-runs-case-id"])):i("",!0),e(n)?.consoleLogs?.length?(t(),a("div",{key:4,ref_key:"consoleEl",ref:Ye,class:"scroll-mt-4"},[r(lt,{entries:e(n)?.consoleLogs??[]},null,8,["entries"])],512)):i("",!0),e(V).length>0||e(S)?(t(),a("div",{key:5,ref_key:"networkEl",ref:ze,class:"scroll-mt-4"},[r(ct,{ref_key:"networkCard",ref:et,requests:e(V),"run-id":e(n)?.testRun?.id??null,"test-runs-case-id":Number(e(p)),"has-trace":e(S)},null,8,["requests","run-id","test-runs-case-id","has-trace"])],512)):i("",!0),e(n)?.pageState?(t(),b(ut,{key:6,"storage-key":"case-page-state","page-state":e(n).pageState},null,8,["page-state"])):i("",!0),e(n)?.ariaSnapshot?(t(),b(Wt,{key:7,ref_key:"ariaCard",ref:at,"storage-key":"case-aria",icon:"i-lucide-scan-text",title:"ARIA snapshot",help:"case.aria"},{folded:c(()=>[...L[3]||(L[3]=[d("Accessibility tree captured at the moment of failure",-1)])]),default:c(()=>[o("div",si,[r(Kt,{text:"```yaml\n"+e(n).ariaSnapshot+"\n```"},null,8,["text"])])]),_:1},512)):i("",!0),e(n)?.testRun?.id?(t(),b(qt,{key:8,ref_key:"domSnapshotCard",ref:nt,"storage-key":"case-dom-snapshot","run-id":e(n).testRun.id,"test-runs-case-id":Number(e(p))},null,8,["run-id","test-runs-case-id"])):i("",!0)])])])]),"tab-steps":c(()=>[o("div",ni,[e(_).length>0?(t(),a("div",ai,[o("div",oi,[o("span",ri,l(e(_).length)+" steps",1),L[4]||(L[4]=o("span",{class:"text-gray-300 dark:text-gray-600"},"·",-1)),(t(!0),a(P,null,X(e(H),N=>(t(),a("span",{key:N.category,class:"inline-flex items-center gap-1"},[r(De,{color:k[N.category]||"neutral",variant:"soft",size:"xs"},{default:c(()=>[d(l(N.category),1)]),_:2},1032,["color"]),o("span",ii,[d("×"+l(N.count)+" · ",1),r(ie,{ms:N.duration},null,8,["ms"])])]))),128))]),r(mt,{"min-width":"40rem",bleed:!1},{default:c(()=>[r(dt,{data:e(_),columns:R,ui:{base:"table-fixed w-full border-separate border-spacing-0 min-w-[40rem]",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 align-top"}},{"index-cell":c(({row:N})=>[o("span",li,l(N.index+1),1)]),"status-cell":c(({row:N})=>[N.original.failed?(t(),a("span",ci,"✗")):(t(),a("span",ui,"✓"))]),"category-cell":c(({row:N})=>[r(De,{color:k[N.original.category]||"neutral",variant:"soft",size:"xs"},{default:c(()=>[d(l(N.original.category),1)]),_:2},1032,["color"])]),"title-cell":c(({row:N})=>[o("div",di,[o("span",{class:Z(N.original.failed?"text-red-600 dark:text-red-400 font-medium":"")},l(N.original.title),3),N.index===e(G)?(t(),b(De,{key:0,color:"warning",variant:"subtle",size:"xs",class:"shrink-0",title:"Slowest step in this test"},{default:c(()=>[...L[5]||(L[5]=[d(" slowest ",-1)])]),_:1})):i("",!0)]),N.original.failed&&N.original.error?.message?(t(),a("p",mi,l(N.original.error.message),1)):i("",!0),N.original.location?(t(),b(Gt,{key:1,location:N.original.location,"project-key":e(n)?.testRun?.project?.id,"project-name":e(n)?.testRun?.project?.name,class:"text-xs text-gray-400 dark:text-gray-500 mt-0.5"},null,8,["location","project-key","project-name"])):i("",!0)]),"duration-cell":c(({row:N})=>[o("div",fi,[o("div",pi,[r(ie,{ms:N.original.duration,class:Z(`text-sm ${D(N.original.duration)}`),"unit-class":"opacity-60"},null,8,["ms","class"]),ae(N.original.duration)?(t(),a("span",gi,l(ae(N.original.duration)),1)):i("",!0)]),o("div",yi,[o("div",{class:Z(["absolute inset-y-0 rounded-full",W(N.original.duration)]),style:$e(te(N.original))},null,6)])])]),_:1},8,["data"])]),_:1})])):(t(),b(ft,{key:1,icon:"i-lucide-list-checks",text:"No steps recorded for this execution"}))])]),"tab-artifacts":c(()=>[o("div",hi,[r(Jt,{traces:e(T)||[]},null,8,["traces"]),r(Qt,{attachments:e(n)?.attachments??[]},null,8,["attachments"]),e(n)?.pageState?(t(),b(ut,{key:0,"storage-key":"case-page-state","page-state":e(n).pageState},null,8,["page-state"])):i("",!0),e(n)?.consoleLogs?.length?(t(),b(lt,{key:1,entries:e(n)?.consoleLogs??[]},null,8,["entries"])):i("",!0),e(V).length>0||e(S)?(t(),b(ct,{key:2,requests:e(V),"run-id":e(n)?.testRun?.id??null,"test-runs-case-id":Number(e(p)),"has-trace":e(S)},null,8,["requests","run-id","test-runs-case-id","has-trace"])):i("",!0),!e(T)?.length&&!e(n)?.attachments?.length&&!e(n)?.consoleLogs?.length&&!e(V).length?(t(),a("div",xi,[e(Ze)?(t(),a(P,{key:0},[r(pe,{name:"i-lucide-loader-circle",class:"size-8 mb-2 animate-spin"}),L[6]||(L[6]=o("p",{class:"text-sm"}," Run in progress — traces and attachments appear here as soon as they are uploaded. ",-1))],64)):(t(),a(P,{key:1},[r(pe,{name:"i-lucide-inbox",class:"size-8 mb-2"}),L[7]||(L[7]=o("p",{class:"text-sm"},"No traces, console logs, or network requests captured for this test case.",-1))],64))])):i("",!0)])]),"tab-performance":c(()=>[o("div",vi,[e(F).length>0?(t(),a("div",_i,[(t(!0),a(P,null,X(e(F),(N,ss)=>(t(),a("div",{key:ss,class:Z(["p-3 rounded-lg border",N.type==="warning"?"bg-amber-50 dark:bg-amber-900/20 border-amber-200 dark:border-amber-800":"bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800"])},[o("div",ki,[r(pe,{name:N.type==="warning"?"i-lucide-alert-triangle":"i-lucide-lightbulb",class:Z([N.type==="warning"?"text-amber-600":"text-blue-600","size-4 mt-0.5 shrink-0"])},null,8,["name","class"]),o("div",null,[o("p",{class:Z(N.type==="warning"?"text-amber-800 dark:text-amber-200 font-medium":"text-blue-800 dark:text-blue-200 font-medium")},l(N.message),3),o("p",{class:Z([N.type==="warning"?"text-amber-700 dark:text-amber-300":"text-blue-700 dark:text-blue-300","mt-1"])},l(N.details),3)])])],2))),128))])):i("",!0),e(f)?(t(),b(it,{key:1,icon:"i-lucide-gauge",title:"Browser performance (Web Vitals)",help:"case.web-vitals"},{default:c(()=>[o("div",bi,[e(f).navigation?(t(),b(Ee,{key:0,"min-tile-width":"10rem"},{default:c(()=>[r(de,{label:"TTFB",hint:"Time to first byte","value-class":e(f).navigation.ttfb>600?"text-red-600":e(f).navigation.ttfb>200?"text-orange-500":"text-green-600"},{default:c(()=>[r(ie,{ms:e(f).navigation.ttfb},null,8,["ms"])]),_:1},8,["value-class"]),r(de,{label:"DOM Interactive",hint:"DOM interactive","value-class":e(f).navigation.domInteractive>3e3?"text-red-600":e(f).navigation.domInteractive>1500?"text-orange-500":"text-green-600"},{default:c(()=>[r(ie,{ms:e(f).navigation.domInteractive},null,8,["ms"])]),_:1},8,["value-class"]),r(de,{label:"DOMContentLoaded",hint:"DOMContentLoaded","value-class":e(f).navigation.domContentLoaded>3e3?"text-red-600":e(f).navigation.domContentLoaded>1500?"text-orange-500":"text-green-600"},{default:c(()=>[r(ie,{ms:e(f).navigation.domContentLoaded},null,8,["ms"])]),_:1},8,["value-class"]),r(de,{label:"Load Complete",hint:"Page fully loaded","value-class":e(f).navigation.loadComplete>5e3?"text-red-600":e(f).navigation.loadComplete>3e3?"text-orange-500":"text-green-600"},{default:c(()=>[r(ie,{ms:e(f).navigation.loadComplete},null,8,["ms"])]),_:1},8,["value-class"])]),_:1})):i("",!0),e(f).paint&&(e(f).paint.firstPaint||e(f).paint.firstContentfulPaint)?(t(),b(Ee,{key:1,"min-tile-width":"10rem",class:"pt-2 border-t"},{default:c(()=>[e(f).paint.firstPaint!==void 0?(t(),b(de,{key:0,label:"First Paint (FP)"},{default:c(()=>[r(ie,{ms:e(f).paint.firstPaint},null,8,["ms"])]),_:1})):i("",!0),e(f).paint.firstContentfulPaint!==void 0?(t(),b(de,{key:1,label:"First Contentful Paint (FCP)","value-class":e(f).paint.firstContentfulPaint>3e3?"text-red-600":e(f).paint.firstContentfulPaint>1800?"text-orange-500":"text-green-600"},{default:c(()=>[r(ie,{ms:e(f).paint.firstContentfulPaint},null,8,["ms"])]),_:1},8,["value-class"])):i("",!0)]),_:1})):i("",!0),e(f).vitals?(t(),b(Ee,{key:2,"min-tile-width":"10rem",class:"pt-2 border-t"},{default:c(()=>[r(de,{label:"Largest Contentful Paint (LCP)","value-class":e(f).vitals.lcp==null?"text-gray-400":e(f).vitals.lcp>4e3?"text-red-600":e(f).vitals.lcp>2500?"text-orange-500":"text-green-600"},{default:c(()=>[r(ie,{ms:e(f).vitals.lcp,fallback:"n/a"},null,8,["ms"])]),_:1},8,["value-class"]),r(de,{label:"Cumulative Layout Shift (CLS)",value:e(f).vitals.cls!=null?String(e(f).vitals.cls):"n/a","value-class":e(f).vitals.cls==null?"text-gray-400":e(f).vitals.cls>.25?"text-red-600":e(f).vitals.cls>.1?"text-orange-500":"text-green-600"},null,8,["value","value-class"]),r(de,{label:"Interaction to Next Paint (INP)","value-class":e(f).vitals.inp==null?"text-gray-400":e(f).vitals.inp>500?"text-red-600":e(f).vitals.inp>200?"text-orange-500":"text-green-600"},{default:c(()=>[r(ie,{ms:e(f).vitals.inp,fallback:"n/a"},null,8,["ms"])]),_:1},8,["value-class"])]),_:1})):i("",!0),e(f).navigation?.url?(t(),a("div",wi,[L[8]||(L[8]=d(" Page: ",-1)),o("code",$i,l(e(f).navigation.url),1)])):i("",!0)])]),_:1})):i("",!0),e(F).length===0&&!e(f)?(t(),b(Zt,{key:2,icon:"i-lucide-gauge",title:"No performance hints or Web Vitals for this execution",text:"Web Vitals and step timing come from the Piwi capture fixtures — extend your Playwright test with piwiFixtures to collect them.",doc:"capture-fixtures"})):i("",!0)])]),"tab-history":c(()=>[o("div",Ci,[e(u)&&e(u).length>0?(t(),a("div",Ti,[r(Yt,{title:"Duration trend",icon:"i-lucide-trending-up",legend:e(dn)(e(mn))},{actions:c(()=>[e(n)?.testCaseId?(t(),b(rt,{key:0,to:`/test-cases/${e(n).testCaseId}`,size:"xs",variant:"outline",color:"neutral","trailing-icon":"i-lucide-arrow-right"},{default:c(()=>[...L[9]||(L[9]=[d(" View full test history ",-1)])]),_:1},8,["to"])):i("",!0)]),default:c(()=>[r(Xt,{data:e(u),height:200},null,8,["data"])]),_:1},8,["legend"]),r(mt,{"min-width":"44rem",bleed:!1},{default:c(()=>[r(dt,{data:e(u),columns:ne,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",th:"first:rounded-l-lg last:rounded-r-lg border-y border-default first:border-l last:border-r",td:"border-b border-default"}},{"startTime-cell":c(({row:N})=>[o("span",Si,[o("span",Ii,l(new Date(N.original.startTime).toLocaleDateString("en-US",{month:"short",day:"numeric"})),1),o("span",Ri,l(new Date(N.original.startTime).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})),1)])]),"status-cell":c(({row:N})=>[r(De,{color:("getStatusColor"in h?h.getStatusColor:e(en))(N.original.status),variant:"subtle",class:"capitalize"},{default:c(()=>[d(l(N.original.status),1)]),_:2},1032,["color"])]),"duration-cell":c(({row:N})=>[N.original.duration!==null?(t(),b(ie,{key:0,ms:N.original.duration},null,8,["ms"])):(t(),a("span",Li,"—"))]),"runId-cell":c(({row:N})=>[r(ce,{to:`/test-runs/${N.original.runId}`,class:"text-primary hover:underline"},{default:c(()=>[d(" #"+l(N.original.runId),1)]),_:2},1032,["to"])]),"error-cell":c(({row:N})=>[N.original.error?(t(),a("span",{key:0,class:"text-red-600 text-xs truncate max-w-xs block",title:N.original.error},l(N.original.error.length>80?`${N.original.error.substring(0,80)}…`:N.original.error),9,zi)):i("",!0)]),_:1},8,["data"])]),_:1})])):(t(),b(ft,{key:1,icon:"i-lucide-trending-up",text:"No prior executions of this test yet."},{default:c(()=>[...L[10]||(L[10]=[o("p",{class:"text-xs text-gray-400"}," This is the first recorded run. Once it runs again, its status and duration trend appear here. ",-1)])]),_:1}))])]),_:1},8,["modelValue","tab-items"])]),_:1})}}});export{Ml as default};
@@ -1 +0,0 @@
1
- import{d as I,q as N,o as i,e as T,f as r,g as f,a1 as D,c,F as $,z as U,K as k,h as t,I as A,l as w,k as v,L as P,i as S,_ as L,t as V,b as h,j as z,v as C}from"./BdQ7kfxJ.js";import{_ as O}from"./CyWOerIG.js";import{_ as H}from"./dg6uXTyR.js";import{_ as q,a as E}from"./CrsaY0R_.js";import{_ as G}from"./B0eHOux4.js";import{_ as R}from"./CUWrUpTl.js";import{G as K}from"./DwZS0oRm.js";import{a as J}from"./DTtizz85.js";const Q={key:0,class:"flex flex-wrap gap-1 py-0.5"},W={key:1,class:"text-[var(--ui-text-muted)]"},X=I({__name:"TagsSelect",props:{modelValue:{},allTags:{}},emits:["update:modelValue","tagCreated"],setup(a,{emit:g}){const p=a,m=g,x=N();async function y(s){const o=s.trim();if(!o)return;const d=p.allTags.find(l=>l.text.toLowerCase()===o.toLowerCase());if(d){p.modelValue.some(l=>l.id===d.id)||m("update:modelValue",[...p.modelValue,d]);return}try{const l=await $fetch("/api/tags",{method:"POST",body:{text:o,color:K()}});m("tagCreated",l.tag),m("update:modelValue",[...p.modelValue,l.tag])}catch(l){const u=l&&typeof l=="object"&&"data"in l?l.data?.message:void 0;x.add({title:"Failed to create tag",description:u||"An error occurred",color:"error"})}}return(s,o)=>{const d=G,l=R;return i(),T(l,{"model-value":a.modelValue,items:a.allTags,multiple:"","create-item":"always","label-key":"text",by:"id",placeholder:"Select or create tags…",class:"w-full","onUpdate:modelValue":o[0]||(o[0]=u=>m("update:modelValue",u)),onCreate:y},{default:r(({modelValue:u})=>[u.length?(i(),c("div",Q,[(i(!0),c($,null,U(u,e=>(i(),T(d,{key:e.id,text:e.text,color:e.color},null,8,["text","color"]))),128))])):(i(),c("span",W,"Select or create tags…"))]),"item-leading":r(({item:u})=>[f("span",{class:"inline-block size-2 rounded-full shrink-0",style:D({backgroundColor:u.color})},null,4)]),_:1},8,["model-value","items"])}}}),Y=Object.assign(X,{__name:"TagsSelect"}),Z={class:"space-y-5"},ee={class:"inline-flex items-center gap-1"},te={class:"inline-flex items-center gap-1"},ae=I({__name:"ProjectFormFields",props:P({mode:{},allTags:{},hasToken:{type:Boolean,default:!1}},{name:{default:""},nameModifiers:{},label:{default:""},labelModifiers:{},description:{default:""},descriptionModifiers:{},diagnosisInstructions:{default:""},diagnosisInstructionsModifiers:{},scmToken:{default:""},scmTokenModifiers:{},defaultBranch:{default:""},defaultBranchModifiers:{},tags:{default:()=>[]},tagsModifiers:{}}),emits:P(["tag-created"],["update:name","update:label","update:description","update:diagnosisInstructions","update:scmToken","update:defaultBranch","update:tags"]),setup(a,{emit:g}){const p=g,m=k(a,"name"),x=k(a,"label"),y=k(a,"description"),s=k(a,"diagnosisInstructions"),o=k(a,"scmToken"),d=k(a,"defaultBranch"),l=k(a,"tags");return(u,e)=>{const b=A,_=O,j=H,M=q,F=Y;return i(),c("div",Z,[a.mode==="create"?(i(),T(_,{key:0,label:"Project name",name:"name",required:"",description:"A unique identifier used to match test results from the reporter."},{default:r(()=>[t(b,{modelValue:m.value,"onUpdate:modelValue":e[0]||(e[0]=n=>m.value=n),placeholder:"e.g. my-app",class:"w-full"},null,8,["modelValue"])]),_:1})):w("",!0),t(_,{label:"Display label",name:"label",description:"A friendly name shown in the UI (defaults to project name if not set)."},{default:r(()=>[t(b,{modelValue:x.value,"onUpdate:modelValue":e[1]||(e[1]=n=>x.value=n),placeholder:"e.g. My Application",class:"w-full"},null,8,["modelValue"])]),_:1}),t(_,{label:"Description",name:"description",description:"Optional description of this project."},{default:r(()=>[t(j,{modelValue:y.value,"onUpdate:modelValue":e[2]||(e[2]=n=>y.value=n),placeholder:"Enter project description",rows:3,class:"w-full"},null,8,["modelValue"])]),_:1}),a.mode==="edit"?(i(),c($,{key:1},[t(_,{name:"diagnosisInstructions",description:"Combined with the global instructions from Settings → AI."},{label:r(()=>[f("span",ee,[e[8]||(e[8]=v(" AI diagnosis instructions ",-1)),t(M,{topic:"project.ai-instructions"})])]),default:r(()=>[t(j,{modelValue:s.value,"onUpdate:modelValue":e[3]||(e[3]=n=>s.value=n),placeholder:"e.g. This project tests the payment checkout flow. The backend uses Stripe for payments and the payment API is at /api/v2/payments. Database errors are usually caused by connection pool exhaustion under load.",rows:5,class:"w-full font-mono text-sm"},null,8,["modelValue"])]),_:1}),t(_,{name:"scmToken",description:a.hasToken?"Leave empty to keep the stored token, enter a new value to replace it, or save empty to remove it":"For GitHub, GitLab, or Bitbucket. Falls back to the global SCM token if not set."},{label:r(()=>[f("span",te,[e[9]||(e[9]=v("SCM token ",-1)),t(M,{topic:"project.scm-token"})])]),default:r(()=>[t(b,{modelValue:o.value,"onUpdate:modelValue":e[4]||(e[4]=n=>o.value=n),type:"password",placeholder:a.hasToken?"•••••••• (unchanged)":"ghp_..., glpat-..., or bitbucket token",class:"w-full font-mono"},null,8,["modelValue","placeholder"])]),_:1},8,["description"]),t(_,{label:"Default branch",name:"defaultBranch",description:"Baselines, flakiness and trends fall back to this branch. Leave empty to resolve it from the SCM provider (else 'main')."},{default:r(()=>[t(b,{modelValue:d.value,"onUpdate:modelValue":e[5]||(e[5]=n=>d.value=n),placeholder:"e.g. main",class:"w-full font-mono"},null,8,["modelValue"])]),_:1})],64)):w("",!0),t(_,{label:"Tags",name:"tags",description:"Select existing tags or type a new name and press Enter to create one."},{default:r(()=>[t(F,{modelValue:l.value,"onUpdate:modelValue":e[6]||(e[6]=n=>l.value=n),"all-tags":a.allTags,class:"w-full",onTagCreated:e[7]||(e[7]=n=>p("tag-created"))},null,8,["modelValue","all-tags"])]),_:1})])}}}),xe=Object.assign(ae,{__name:"ProjectFormFields"}),oe={class:"space-y-2"},le={class:"space-y-1.5"},se=["title"],ne={key:0,class:"flex flex-wrap items-center gap-1.5 text-xs text-muted"},ie={class:"inline-flex items-center gap-0.5"},re={key:1,class:"flex items-center gap-1.5 text-xs text-muted"},B="npx @piwitests/reporter init",de=I({__name:"DesktopFolderChecklist",props:{inspection:{}},setup(a){const g=a,{copy:p}=J(),m=C(()=>{const s=g.inspection;return[s.playwrightConfig?{ok:!0,label:"Playwright config found",detail:s.playwrightConfig}:{ok:!1,label:"No Playwright config at the folder root"},s.playwrightInstalled?{ok:!0,label:"Playwright is installed"}:{ok:!1,label:"Playwright is not installed",detail:"run your package manager’s install first"},s.reporterInstalled?{ok:!0,label:"Piwi reporter is installed",detail:"@piwitests/reporter"}:{ok:!1,label:"Piwi reporter is not installed"},s.reporterConfigured?{ok:!0,label:"Config sends results to Piwi",detail:s.configuredProjectName?`projectName: ${s.configuredProjectName}`:void 0}:{ok:!1,label:"Config does not use the Piwi reporter"}]}),x=C(()=>m.value.every(s=>s.ok)),y=C(()=>!g.inspection.reporterInstalled||!g.inspection.reporterConfigured);return(s,o)=>{const d=L,l=z,u=E;return i(),c("div",oe,[f("ul",le,[(i(!0),c($,null,U(h(m),e=>(i(),c("li",{key:e.label,class:"flex items-center gap-2 text-sm"},[t(d,{name:e.ok?"i-lucide-circle-check-big":"i-lucide-triangle-alert",class:S(["size-4 shrink-0",e.ok?"text-success":"text-warning"])},null,8,["name","class"]),f("span",{class:S(e.ok?"":"text-warning")},V(e.label),3),e.detail?(i(),c("span",{key:0,class:"text-xs text-muted truncate",title:e.detail},V(e.detail),9,se)):w("",!0)]))),128))]),h(y)?(i(),c("p",ne,[o[2]||(o[2]=f("span",null,"Set it up from a terminal in that folder:",-1)),f("span",ie,[f("code",{class:"px-1.5 py-0.5 rounded bg-elevated font-mono"},V(B)),t(l,{icon:"i-lucide-copy",color:"neutral",variant:"ghost",size:"xs","aria-label":"Copy setup command",onClick:o[0]||(o[0]=e=>h(p)(B,{toast:!0}))})]),t(u,{to:"reporter",class:"text-xs"},{default:r(()=>[...o[1]||(o[1]=[v("Reporter docs",-1)])]),_:1})])):h(x)?(i(),c("p",re,[t(d,{name:"i-lucide-sparkles",class:"size-3.5 text-success"}),o[3]||(o[3]=v(" Runs from this folder will report to Piwi. ",-1))])):w("",!0)])}}}),ye=Object.assign(de,{__name:"DesktopFolderChecklist"});export{ye as _,xe as a};
@@ -1 +0,0 @@
1
- import{_ as Os}from"./BV8EzO8q.js";import{_ as Ks}from"./B7zo6PK8.js";import{q as Ue,B as Ft,d as ue,O as Wt,w as ye,a as ge,b as e,o as t,e as y,f as s,h as l,j as Te,c as r,g as n,k as d,t as i,l as j,F as q,z as Y,i as se,_ as Le,H as Oe,x as ee,P as Dt,Q as zt,v as P,r as F,G as qs,m as Ae,n as Bt,E as Et,I as Zt,J as Hs,u as Qs,p as Xs,s as Gs,D as Jt,R as Js,S as Ys}from"./BdQ7kfxJ.js";import{_ as Ws}from"./B4NjylBn.js";import{_ as et,a as Zs}from"./CrsaY0R_.js";import{_ as Fe}from"./D0XWJGhG.js";import{_ as es}from"./CyWOerIG.js";import{u as en}from"./igDJCTgt.js";import{u as he}from"./DTtizz85.js";import{_ as tn}from"./DxPZIuWy.js";import{_ as sn,a as nn}from"./B7uPoZ7T.js";import{_ as ts}from"./B0eHOux4.js";import{_ as Be}from"./HGYIpJtg.js";import{u as an,a as on,i as ln}from"./BL8cYWsR.js";import{_ as rn}from"./9oKY4Zb7.js";import{_ as ss}from"./Drh1_ASq.js";import{b as Ze,s as cn,R as ns,d as as,f as os,t as ls,u as rs,_ as is,a as cs,c as Ut,e as un,l as Yt}from"./DtGJeysS.js";import{_ as je}from"./CfV2N201.js";import{_ as dn}from"./DzJa19LG.js";import{_ as us}from"./C_eXufkv.js";import{_ as mn}from"./D0TpBpCc.js";import{_ as pn}from"./BnhWd06P.js";import{_ as gn}from"./LWIyaZKe.js";import{_ as fn}from"./D5SN7rPK.js";import{_ as Ee}from"./CLrLFf3s.js";import{_ as Pt}from"./BOn5q0rT.js";import{_ as Ke}from"./DPPhFZOr.js";import{a as Nt,d as _n,c as vn,g as yn,j as L,t as hn,e as ds,p as gt,k as dt}from"./DwZS0oRm.js";import{_ as ms}from"./CsGsLxHg.js";import{_ as ft}from"./CPrVhXJk.js";import{_ as tt}from"./Bh2WA4IJ.js";import{_ as xn}from"./CUWrUpTl.js";import{_ as bn}from"./B6djubIK.js";import{_ as kn}from"./C2hIM5f9.js";import{_ as $n}from"./C9A3sPDo.js";import{_ as Cn}from"./D56yp7m9.js";import{_ as Tn}from"./Bp2zrrkV.js";import{M as jn,D as Mt,_ as Sn,g as It}from"./G2J1dVVb.js";import{_ as wn}from"./dg6uXTyR.js";import{_ as Vt}from"./CK2AMqz_.js";import{_ as Rn}from"./DadksxQ9.js";import{u as An}from"./DR1jFptD.js";import{u as Dn}from"./BY9A1aOT.js";import"./Bo73sAu8.js";import"./Bg63qh8W.js";import"./i7znB42v.js";import"./CxwnFFD0.js";import"./BO4sfkbw.js";import"./rPG7kzfL.js";import"./D-c8ZSws.js";import"./EJllK0wm.js";import"./CrZhoZuI.js";import"./r6zkA1SE.js";import"./CZ6WR7uw.js";import"./Bb_1uAHn.js";import"./DKgbchez.js";import"./WZXZeGYt.js";const zn=["run.finished","run.failed","run.failed.default_branch","cluster.new","flakiness.spike","perf.regression","diagnosis.completed","auto_heal.pr_opened"],mt=new Map,pt=new Map;function Mn(D,T){const S=[{event:"run.failed",scenario:{title:`Test run failed — ${D}`,description:"3 of 12 tests failed on main — checkout › applies discount code +2 more",icon:"i-lucide-circle-x",color:"error"}},{event:"run.failed.default_branch",scenario:{title:`Test run failed on main — ${D}`,description:"2 of 12 tests failed · main — auth › logs in with valid credentials +1 more",icon:"i-lucide-circle-x",color:"error"}},{event:"cluster.new",scenario:{title:`New failure cluster — ${D}`,description:"TimeoutError: locator.click: Timeout 30000ms exceeded",icon:"i-lucide-layers",color:"warning"}},{event:"flakiness.spike",scenario:{title:`Flakiness spike — ${D}`,description:"3 tests became flaky (8.3% rate)",icon:"i-lucide-shuffle",color:"warning"}},{event:"perf.regression",scenario:{title:`Performance regression — ${D}`,description:"p90 duration increased by 42% vs last week",icon:"i-lucide-trending-down",color:"warning"}},{event:"run.finished",scenario:{title:`Test run recovered — ${D}`,description:"All 12 tests passed on main",icon:"i-lucide-circle-check",color:"success"}},{event:"diagnosis.completed",scenario:{title:`Diagnosis complete — ${D}`,description:"Root cause: test bug — confidence: high",icon:"i-lucide-sparkles",color:"info"}}],x=S.filter(g=>T.length===0||T.includes(g.event)).map(g=>g.scenario);return x.length===0?[S[0].scenario,S[S.length-1].scenario]:x}function In(){if(!Ft().public.demoMode)return null;const T=Ue();function S(g,f,u){x(g);const z=Mn(f,u);pt.set(g,0);function O(){const M=(pt.get(g)??0)%z.length;pt.set(g,M+1);const h=z[M];T.add({title:h.title,description:h.description,icon:h.icon,color:h.color,duration:7e3});const A=25e3+Math.random()*1e4;mt.set(g,setTimeout(O,A))}mt.set(g,setTimeout(O,8e3))}function x(g){const f=mt.get(g);f!==void 0&&(clearTimeout(f),mt.delete(g)),pt.delete(g)}return{scheduleFor:S,cancelFor:x}}const Un={key:0,class:"p-3 space-y-3"},Fn={key:0,class:"text-xs text-gray-500"},Bn={key:1,class:"text-xs text-gray-500"},En={key:2,class:"text-xs text-gray-500"},Pn={class:"space-y-1"},Nn=["checked","onChange"],Vn={class:"flex items-center justify-between"},Ln={class:"font-medium text-sm inline-flex items-center gap-1"},On={key:0,class:"text-xs text-muted bg-primary/5 rounded px-2 py-1.5"},Kn={key:1,class:"text-xs text-muted text-center py-2"},qn={key:2,class:"space-y-1.5"},Hn={key:0,class:"space-y-2 rounded border border-primary/30 bg-primary/5 px-2 py-2"},Qn={class:"space-y-1"},Xn=["value"],Gn={class:"flex gap-1.5 justify-end"},Jn={class:"flex-1 font-medium truncate"},Yn={key:0,class:"text-primary"},Wn={key:3,class:"text-xs text-muted text-center py-1"},Zn={key:4,class:"space-y-2 border-t border-default pt-2"},ea={class:"space-y-1"},ta=["value"],sa={key:0,class:"flex items-center gap-1.5 text-xs cursor-pointer",title:"Deliver to this channel for everyone, not tied to your account"},na={class:"flex gap-1.5 justify-end"},aa=ue({__name:"SubscribeBell",props:{projectId:{},projectLabel:{}},async setup(D){let T,S;const x=D,g=Ft(),f=g.public.demoMode,u=P(()=>g.public.authEnabled),{authState:z,canSeeAdmin:O}=Wt(),M=P(()=>z.value.authenticated),h=Ue(),A=F(!1),w=f?In():null,U=!u.value&&!f?en():null,m=F("default"),p=P(()=>"Notification"in window);"Notification"in window&&(m.value=Notification.permission);const _=P(()=>U?.getProject(x.projectId).events??[]),v=P(()=>U?.isSubscribed(x.projectId)??!1);async function R(){!p.value||m.value!=="default"||(m.value=await Notification.requestPermission())}function I(N){return _.value.includes(N)}function B(N){U?.toggleEvent(x.projectId,N)}const K=f||!u.value||M.value,k=f?{server:!1}:{},{data:X,refresh:$}=([T,S]=ye(()=>he(`/api/subscriptions?projectId=${x.projectId}`,{immediate:K,...k},"$APDuK86tlj")),T=await T,S(),T),H=P(()=>X.value?.items??[]),G=P(()=>H.value.length>0),{data:b}=([T,S]=ye(()=>he("/api/channels",{immediate:K,...k},"$uK3f0xlELn")),T=await T,S(),T),C=P(()=>b.value?.items??[]),J=F(!1),de=F(void 0),fe=F(["run.failed"]),xe=F(!1),qe=F(!1),st=P(()=>C.value.find(N=>N.id===de.value)),He=P(()=>u.value&&O.value&&st.value?.userId===null);function _t(N){return N.userId===null?O.value:!0}const be=F(null),W=F(void 0),ke=F([]),Qe=F(!1);function Xe(N){be.value=N,W.value=N.channel.id,ke.value=[...N.events]}function vt(){be.value=null}async function re(){if(!(!be.value||!W.value||ke.value.length===0)){Qe.value=!0;try{await $fetch(`/api/subscriptions/${be.value.id}`,{method:"PATCH",body:{channelId:W.value,events:ke.value}}),await $(),be.value=null}catch(N){h.add({title:"Update failed",description:String(N?.message??N),color:"error"})}finally{Qe.value=!1}}}const $e=P(()=>C.value.map(N=>({label:N.type==="personal_email"?`${N.name} (${N.config.address})`:N.name,value:N.id}))),De=zn.map(N=>({label:N==="auto_heal.pr_opened"?"Auto-heal › PR opened":N.replace(/\./g," › "),value:N}));ge(A,N=>{N?(K&&$(),C.value.length>0&&!de.value&&(de.value=C.value[0].id)):(J.value=!1,be.value=null)});async function yt(){if(!(!de.value||fe.value.length===0)){qe.value=!0;try{await $fetch("/api/subscriptions",{method:"POST",body:{channelId:de.value,projectId:x.projectId,events:fe.value,mode:"realtime",...He.value&&xe.value?{global:!0}:{}}}),await $(),J.value=!1,xe.value=!1,h.add({title:"Subscribed",color:"success"}),f&&w?.scheduleFor(x.projectId,x.projectLabel||"this project",fe.value)}catch(N){h.add({title:"Subscribe failed",description:String(N?.message??N),color:"error"})}finally{qe.value=!1}}}async function ht(N){try{await $fetch(`/api/subscriptions/${N}`,{method:"DELETE"}),await $(),h.add({title:"Unsubscribed",color:"success"}),f&&H.value.length===0&&w?.cancelFor(x.projectId)}catch(V){h.add({title:"Failed",description:String(V?.message??V),color:"error"})}}async function _e(N){const V=N.mutedUntil&&new Date(N.mutedUntil)>new Date;try{await $fetch(`/api/subscriptions/${N.id}`,{method:"PATCH",body:{mutedUntil:V?null:new Date(Date.now()+10080*60*1e3).toISOString()}}),await $()}catch(ne){h.add({title:"Failed",description:String(ne?.message??ne),color:"error"})}}function ie(N){return N.mutedUntil&&new Date(N.mutedUntil)>new Date}function nt(N){return N==="personal_email"?"i-lucide-user-round":N==="email"?"i-lucide-mail":N==="slack"?"i-lucide-slack":"i-lucide-webhook"}const at=P(()=>f||u.value&&M.value||U!=null),Pe=P(()=>f||u.value?G.value:v.value||G.value);return(N,V)=>{const ne=Te,xt=Ws,bt=et,Se=Le,kt=Oe,Ge=Fe,we=es,ot=qs;return e(at)?(t(),y(ot,{key:0,open:e(A),"onUpdate:open":V[7]||(V[7]=Q=>ee(A)?A.value=Q:null),ui:{content:"w-72"}},{content:s(()=>[e(U)?(t(),r("div",Un,[V[10]||(V[10]=n("div",{class:"flex items-center justify-between"},[n("span",{class:"font-medium text-sm"},"Browser notifications")],-1)),e(p)&&e(m)==="default"?(t(),r("p",Fn,[l(ne,{variant:"link",size:"xs",class:"p-0",onClick:R},{default:s(()=>[...V[8]||(V[8]=[d(" Allow notifications ",-1)])]),_:1}),V[9]||(V[9]=d(" "+i(" ")+"in your browser to get alerts for this project. ",-1))])):e(p)&&e(m)==="denied"?(t(),r("p",Bn," Notifications are blocked. Check your browser settings to allow them. ")):e(p)?j("",!0):(t(),r("p",En,"Notifications are not supported in this browser.")),e(p)&&e(m)==="granted"?(t(),r(q,{key:3},[l(xt),n("div",Pn,[(t(!0),r(q,null,Y(e(De),Q=>(t(),r("label",{key:Q.value,class:"flex items-center gap-1.5 text-xs cursor-pointer"},[n("input",{type:"checkbox",checked:I(Q.value),class:"accent-primary size-3",onChange:me=>B(Q.value)},null,40,Nn),d(" "+i(Q.label),1)]))),128))])],64)):j("",!0)])):j("",!0),e(K)?(t(),r("div",{key:1,class:se(["p-3 space-y-3",e(U)?"border-t border-default":""])},[n("div",Vn,[n("span",Ln,[d(i(e(U)?"Channel subscriptions":"Notifications")+" ",1),l(bt,{topic:"notifications.subscribe"})]),e(J)?j("",!0):(t(),y(ne,{key:0,size:"xs",icon:"i-lucide-plus",variant:"ghost",color:"neutral",disabled:e(C).length===0,onClick:V[0]||(V[0]=Q=>J.value=!0)},{default:s(()=>[...V[11]||(V[11]=[d(" Add ",-1)])]),_:1},8,["disabled"]))]),e(f)?(t(),r("div",On,[l(Se,{name:"i-lucide-sparkles",class:"size-3 inline-block mr-1 text-primary"}),V[12]||(V[12]=d(" Demo — notifications will appear as toasts in ~8 s. ",-1))])):e(C).length===0?(t(),r("div",Kn,[V[14]||(V[14]=d(" No channels configured.",-1)),V[15]||(V[15]=n("br",null,null,-1)),l(kt,{to:"/settings/notifications",class:"text-primary underline"},{default:s(()=>[...V[13]||(V[13]=[d("Add one in Settings",-1)])]),_:1})])):j("",!0),e(H).length>0?(t(),r("div",qn,[(t(!0),r(q,null,Y(e(H),Q=>(t(),r(q,{key:Q.id},[e(be)?.id===Q.id?(t(),r("div",Hn,[l(we,{label:"Channel",size:"xs"},{default:s(()=>[l(Ge,{modelValue:e(W),"onUpdate:modelValue":V[1]||(V[1]=me=>ee(W)?W.value=me:null),items:e($e),"value-key":"value",class:"w-full text-xs",size:"xs"},null,8,["modelValue","items"])]),_:1}),l(we,{label:"Events",size:"xs"},{default:s(()=>[n("div",Qn,[(t(!0),r(q,null,Y(e(De),me=>(t(),r("label",{key:me.value,class:"flex items-center gap-1.5 text-xs cursor-pointer"},[Dt(n("input",{type:"checkbox",value:me.value,"onUpdate:modelValue":V[2]||(V[2]=Je=>ee(ke)?ke.value=Je:null),class:"accent-primary size-3"},null,8,Xn),[[zt,e(ke)]]),d(" "+i(me.label),1)]))),128))])]),_:1}),n("div",Gn,[l(ne,{size:"xs",color:"neutral",variant:"ghost",onClick:vt},{default:s(()=>[...V[16]||(V[16]=[d("Cancel",-1)])]),_:1}),l(ne,{size:"xs",color:"primary",loading:e(Qe),disabled:!e(W)||e(ke).length===0,onClick:re},{default:s(()=>[...V[17]||(V[17]=[d(" Save ",-1)])]),_:1},8,["loading","disabled"])])])):(t(),r("div",{key:1,class:se(["flex items-center gap-2 rounded px-2 py-1.5 text-xs",ie(Q)?"opacity-60":""])},[l(Se,{name:nt(Q.channel.type),class:"size-3.5 text-muted shrink-0"},null,8,["name"]),n("span",Jn,[d(i(Q.channel.name)+" ",1),Q.userId===null&&e(u)?(t(),r("span",Yn,"(global)")):j("",!0)]),_t(Q)?(t(),r(q,{key:0},[l(ne,{icon:"i-lucide-pencil",color:"neutral",variant:"ghost",size:"xs",title:"Edit subscription",onClick:me=>Xe(Q)},null,8,["onClick"]),l(ne,{icon:ie(Q)?"i-lucide-bell":"i-lucide-bell-off",color:"neutral",variant:"ghost",size:"xs",title:ie(Q)?"Unmute":"Mute 7 days",onClick:me=>_e(Q)},null,8,["icon","title","onClick"]),l(ne,{icon:"i-lucide-x",color:"error",variant:"ghost",size:"xs",title:"Unsubscribe",onClick:me=>ht(Q.id)},null,8,["onClick"])],64)):j("",!0)],2))],64))),128))])):!e(J)&&e(C).length>0?(t(),r("div",Wn," Not subscribed to this project. ")):j("",!0),e(J)?(t(),r("div",Zn,[l(we,{label:"Channel",size:"xs"},{default:s(()=>[l(Ge,{modelValue:e(de),"onUpdate:modelValue":V[3]||(V[3]=Q=>ee(de)?de.value=Q:null),items:e($e),"value-key":"value",class:"w-full text-xs",size:"xs"},null,8,["modelValue","items"])]),_:1}),l(we,{label:"Events",size:"xs"},{default:s(()=>[n("div",ea,[(t(!0),r(q,null,Y(e(De),Q=>(t(),r("label",{key:Q.value,class:"flex items-center gap-1.5 text-xs cursor-pointer"},[Dt(n("input",{type:"checkbox",value:Q.value,"onUpdate:modelValue":V[4]||(V[4]=me=>ee(fe)?fe.value=me:null),class:"accent-primary size-3"},null,8,ta),[[zt,e(fe)]]),d(" "+i(Q.label),1)]))),128))])]),_:1}),e(He)?(t(),r("label",sa,[Dt(n("input",{type:"checkbox","onUpdate:modelValue":V[5]||(V[5]=Q=>ee(xe)?xe.value=Q:null),class:"accent-primary size-3"},null,512),[[zt,e(xe)]]),V[18]||(V[18]=d(" Instance-wide (global) ",-1))])):j("",!0),n("div",na,[l(ne,{size:"xs",color:"neutral",variant:"ghost",onClick:V[6]||(V[6]=Q=>J.value=!1)},{default:s(()=>[...V[19]||(V[19]=[d("Cancel",-1)])]),_:1}),l(ne,{size:"xs",color:"primary",loading:e(qe),disabled:!e(de)||e(fe).length===0,onClick:yt},{default:s(()=>[...V[20]||(V[20]=[d(" Subscribe ",-1)])]),_:1},8,["loading","disabled"])])])):j("",!0)],2)):j("",!0)]),default:s(()=>[l(ne,{icon:e(Pe)?"i-lucide-bell-ring":"i-lucide-bell",size:"sm",color:e(Pe)?"primary":"neutral",variant:e(Pe)?"soft":"outline",title:"Notification subscriptions for this project"},null,8,["icon","color","variant"])]),_:1},8,["open"])):j("",!0)}}}),oa=Object.assign(aa,{__name:"SubscribeBell"}),la={class:"flex flex-wrap items-center justify-between gap-3"},ra={class:"flex items-center gap-2 min-w-0 text-sm"},ia={class:"text-xs break-all"},ca={key:1,class:"text-muted"},ua=ue({__name:"DesktopProjectLinkCard",props:{projectId:{}},setup(D){const T=D,{available:S,link:x}=an(()=>T.projectId),g=F(null);ge(()=>x.value?.path,async u=>{g.value=u&&x.value?.exists?await on(u):null},{immediate:!0});const f=P(()=>ln(g.value));return(u,z)=>{const O=Le,M=Ae,h=Te,A=Be;return e(S)?(t(),y(A,{key:0,class:"shrink-0",ui:{body:"p-3 sm:p-3"}},{default:s(()=>[n("div",la,[n("div",ra,[l(O,{name:e(x)?e(x).exists?"i-lucide-folder-check":"i-lucide-folder-x":"i-lucide-folder-symlink",class:se(["size-4 shrink-0",e(x)?e(x).exists?"text-success":"text-warning":"text-muted"])},null,8,["name","class"]),e(x)?(t(),r(q,{key:0},[n("code",ia,i(e(x).path),1),e(x).exists?e(f)?(t(),y(M,{key:1,color:"success",variant:"subtle",size:"sm"},{default:s(()=>[...z[1]||(z[1]=[d("ready",-1)])]),_:1})):e(g)?(t(),y(M,{key:2,color:"warning",variant:"subtle",size:"sm"},{default:s(()=>[...z[2]||(z[2]=[d("needs setup",-1)])]),_:1})):j("",!0):(t(),y(M,{key:0,color:"warning",variant:"subtle",size:"sm"},{default:s(()=>[...z[0]||(z[0]=[d("missing",-1)])]),_:1}))],64)):(t(),r("span",ca," No local folder linked — link this project’s checkout to run tests from here and open files in your IDE. "))]),l(h,{size:"xs",color:"neutral",variant:"soft",icon:e(x)?"i-lucide-settings-2":"i-lucide-folder-plus",to:`/projects/${D.projectId}/edit#local-folder`,title:e(x)?"Manage the linked folder in project settings":"Link a folder in project settings"},{default:s(()=>[d(i(e(x)?"Manage":"Link folder"),1)]),_:1},8,["icon","to","title"])])]),_:1})):j("",!0)}}}),da=Object.assign(ua,{__name:"DesktopProjectLinkCard"}),ma={class:"w-full"},pa=["x","y","width","height","fill"],ga=["x","y"],fa=["x","width","height","fill","onClick","onMouseenter"],_a={class:"font-semibold mb-1"},va={class:"capitalize mb-1"},ya={class:"space-y-0.5"},ha={class:"font-medium mt-1"},xa=ue({__name:"TestRunsChart",props:{testRuns:{},height:{default:150},markers:{default:()=>[]}},emits:["marker-click"],setup(D,{emit:T}){const S=D,x=T,g=P(()=>!S.testRuns||S.testRuns.length===0?[]:[...S.testRuns].sort((_,v)=>new Date(_.startTime).getTime()-new Date(v.startTime).getTime()).slice(-30).map(_=>{const v=_.flakyTests||0,R=_.passedTests||0;return{id:_.id,date:new Date(_.startTime),passed:Math.max(0,R-v),failed:_.failedTests||0,skipped:_.skippedTests||0,flaky:v,total:_.totalTests||0,status:_.status}})),f=P(()=>Math.max(1,...g.value.map(p=>p.passed+p.failed+p.skipped+p.flaky))),u=P(()=>g.value.map(p=>p.date));function z(p,_,v){const R=Ze(g.value.length,p);return g.value.map((I,B)=>({d:I,slotX:B*R.slotWidth,slotWidth:R.slotWidth,barX:R.xOf(B),barWidth:R.barWidth,segments:cn(ns.map(K=>({color:K.color,value:I[K.key]})),_,v)}))}function O(p){const{centerOf:_}=Ze(g.value.length,p);return as(u.value,Math.max(2,Math.floor(p/80))).map(v=>({x:_(v),label:os(u.value[v])}))}function M(p,_){const{centerOf:v}=Ze(g.value.length,p),R=g.value.map((I,B)=>v(B));return ls(u.value,R,new Date(_).getTime())}const{data:h,pos:A,show:w,move:U,hide:m}=rs();return(p,_)=>{const v=ss,R=is,I=je,B=cs;return t(),r("div",ma,[e(g).length>0?(t(),y(R,{key:0,height:D.height,"y-max":e(f)},{default:s(({plotWidth:K,plotHeight:k,yScale:X})=>[(t(!0),r(q,null,Y(z(K,k,X),$=>(t(),r(q,{key:$.d.id},[(t(!0),r(q,null,Y($.segments,H=>(t(),r("rect",{key:H.color,x:$.barX,y:H.y,width:$.barWidth,height:H.height,fill:H.color},null,8,pa))),128))],64))),128)),(t(!0),r(q,null,Y(O(K),$=>(t(),r("text",{key:$.x,x:$.x,y:k+14,"text-anchor":"middle",class:"fill-gray-400 dark:fill-gray-500 text-[10px]"},i($.label),9,ga))),128)),l(v,{markers:D.markers,"x-of":$=>M(K,$),"plot-height":k,onMarkerClick:_[0]||(_[0]=$=>x("marker-click",$))},null,8,["markers","x-of","plot-height"]),(t(!0),r(q,null,Y(z(K,k,X),$=>(t(),r("rect",{key:`hover-${$.d.id}`,x:$.slotX,y:0,width:$.slotWidth,height:k,fill:e(h)?.id===$.d.id?"rgb(148 163 184 / 0.15)":"transparent",class:"cursor-pointer",onClick:H=>("navigateTo"in p?p.navigateTo:e(Bt))(`/test-runs/${$.d.id}`),onMouseenter:H=>e(w)(H,$.d),onMousemove:_[1]||(_[1]=H=>e(U)(H)),onMouseleave:_[2]||(_[2]=H=>e(m)())},null,40,fa))),128))]),_:1},8,["height","y-max"])):(t(),y(I,{key:1,text:"No test run data available to display chart"})),e(h)?(t(),y(B,{key:2,pos:e(A)},{default:s(()=>[n("div",_a,i(e(h).date.toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})),1),n("div",va,"Status: "+i(e(h).status),1),n("div",ya,[n("div",null,[_[3]||(_[3]=n("span",{class:"text-red-500 dark:text-red-400"},"●",-1)),d(" Failed: "+i(e(h).failed),1)]),n("div",null,[_[4]||(_[4]=n("span",{class:"text-purple-500 dark:text-purple-400"},"●",-1)),d(" Flaky: "+i(e(h).flaky),1)]),n("div",null,[_[5]||(_[5]=n("span",{class:"text-orange-500 dark:text-orange-400"},"●",-1)),d(" Skipped: "+i(e(h).skipped),1)]),n("div",null,[_[6]||(_[6]=n("span",{class:"text-green-500 dark:text-green-400"},"●",-1)),d(" Passed: "+i(e(h).passed),1)]),n("div",ha,"Total: "+i(e(h).total),1)]),_[7]||(_[7]=n("div",{class:"text-gray-400 dark:text-gray-500 text-xs mt-1"},"Click to view run details",-1))]),_:1},8,["pos"])):j("",!0)])}}}),ba=Object.assign(xa,{__name:"TestRunsChart"}),ka={class:"space-y-3"},$a={class:"min-w-0 space-y-1"},Ca={class:"flex items-center gap-2 flex-wrap text-sm"},Ta={key:0,class:"text-gray-500"},ja=["title"],Sa=["title"],wa={key:0,class:"text-xs text-gray-500 italic"},Ra={class:"flex items-center gap-2 shrink-0"},Aa=ue({__name:"ClusterMergeSuggestions",props:{projectId:{}},emits:["merged"],setup(D,{emit:T}){const S=D,x=T,g=Ue(),f=F([]),u=F(null);async function z(){try{f.value=(await $fetch(`/api/projects/${S.projectId}/cluster-merge-suggestions`)).items}catch{f.value=[]}}ge(()=>S.projectId,z,{immediate:!0});async function O(h,A){u.value=h;try{await $fetch(`/api/cluster-merge-suggestions/${h}/${A}`,{method:"POST"}),g.add({title:A==="approve"?"Clusters merged":"Suggestion dismissed",color:"success"}),await z(),A==="approve"&&x("merged")}catch(w){g.add({title:"Action failed",description:String(w?.message??w),color:"error"})}finally{u.value=null}}const M=h=>h==null?"":`${Math.round(h*100)}% similar`;return(h,A)=>{const w=Ae,U=Te,m=Pt;return e(f).length?(t(),y(m,{key:0,icon:"i-lucide-git-merge",title:"Suggested merges",count:e(f).length,class:"mb-4"},{subtitle:s(()=>[...A[0]||(A[0]=[d(" Likely-duplicate clusters found by semantic analysis. Approving merges them into the older cluster. ",-1)])]),default:s(()=>[n("div",ka,[(t(!0),r(q,null,Y(e(f),p=>(t(),r("div",{key:p.id,class:"rounded-lg border border-default p-3 flex items-start justify-between gap-4"},[n("div",$a,[n("div",Ca,[l(w,{color:p.method==="llm"?"primary":"neutral",variant:"subtle",size:"sm"},{default:s(()=>[d(i(p.method==="llm"?`AI · ${p.llmConfidence??""}`:"similarity"),1)]),_:2},1032,["color"]),M(p.score)?(t(),r("span",Ta,i(M(p.score)),1)):j("",!0)]),n("p",{class:"text-sm truncate",title:p.clusterA?.signature||""},[A[1]||(A[1]=n("span",{class:"text-gray-400"},"A:",-1)),d(" "+i(p.clusterA?.signature||`#${p.id}`),1)],8,ja),n("p",{class:"text-sm truncate",title:p.clusterB?.signature||""},[A[2]||(A[2]=n("span",{class:"text-gray-400"},"B:",-1)),d(" "+i(p.clusterB?.signature||""),1)],8,Sa),p.llmReason?(t(),r("p",wa,i(p.llmReason),1)):j("",!0)]),n("div",Ra,[l(U,{size:"sm",color:"primary",icon:"i-lucide-git-merge",loading:e(u)===p.id,onClick:_=>O(p.id,"approve")},{default:s(()=>[...A[3]||(A[3]=[d(" Merge ",-1)])]),_:1},8,["loading","onClick"]),l(U,{size:"sm",color:"neutral",variant:"ghost",icon:"i-lucide-x",disabled:e(u)===p.id,onClick:_=>O(p.id,"reject")},{default:s(()=>[...A[4]||(A[4]=[d(" Dismiss ",-1)])]),_:1},8,["disabled","onClick"])])]))),128))])]),_:1},8,["count"])):j("",!0)}}}),Da=Object.assign(Aa,{__name:"ClusterMergeSuggestions"}),za={class:"flex items-center justify-between"},Ma={class:"text-sm text-gray-500 inline-flex items-center gap-1"},Ia={class:"min-w-0 space-y-0.5"},Ua={key:0,class:"text-xs text-gray-500 italic truncate"},Fa={key:1,class:"text-gray-400 text-xs"},Ba={class:"space-y-1"},Ea={class:"text-sm tabular-nums"},Pa={class:"text-sm tabular-nums"},Na={key:1,class:"text-gray-400 text-xs"},Va={class:"text-sm text-gray-500 whitespace-nowrap"},La={key:0,class:"ml-1 text-xs text-gray-400"},Oa={class:"flex justify-end"},Ka=ue({__name:"FailureClustersList",props:{projectId:{}},async setup(D){let T,S;const x=D,g=F(void 0),{data:f,pending:u}=([T,S]=ye(()=>he(()=>{const M=new URLSearchParams;g.value&&M.set("status",g.value);const h=M.toString();return`/api/projects/${x.projectId}/failure-clusters${h?`?${h}`:""}`},{lazy:!0,server:!1,watch:[g],transform:M=>M.items},"$fqv4nq7Mtw")),T=await T,S(),T),z=M=>yn(M.fixVerification),O=[{accessorKey:"signature",header:L("Signature")},{accessorKey:"errorType",header:L("Type")},{accessorKey:"status",header:L("Status")},{accessorKey:"affectedTests",header:L("Tests")},{accessorKey:"occurrences",header:L("Occurrences")},{accessorKey:"diagnosis",header:"AI"},{accessorKey:"lastSeenAt",header:L("Last seen")},{id:"actions",header:"Actions"}];return(M,h)=>{const A=et,w=Fe,U=Oe,m=Ae,p=Le,_=us,v=Te,R=Ee,I=Ke,B=je,K=Be;return t(),y(K,{"data-shot":"failure-clusters"},{header:s(()=>[n("div",za,[n("p",Ma,[h[1]||(h[1]=d(" Ongoing failure signatures grouped by normalized error. ",-1)),l(A,{topic:"cluster.concept"})]),l(w,{modelValue:e(g),"onUpdate:modelValue":h[0]||(h[0]=k=>ee(g)?g.value=k:null),items:[{label:"All",value:void 0},{label:"Open",value:"open"},{label:"Resolved",value:"resolved"},{label:"Ignored",value:"ignored"}],size:"xs",class:"w-32"},null,8,["modelValue"])])]),default:s(()=>[l(I,{"min-width":"48rem",bleed:!1},{default:s(()=>[l(R,{data:e(f)??[],columns:O,loading:e(u)},{"actions-header":s(()=>[...h[2]||(h[2]=[n("div",{class:"text-right"},"Actions",-1)])]),"signature-cell":s(({row:k})=>[n("div",Ia,[l(U,{to:`/failure-clusters/${k.original.id}`,class:se(["text-sm text-primary hover:underline truncate block",k.original.title?"":"font-mono"]),title:k.original.signature},{default:s(()=>[d(i(k.original.title||k.original.signature),1)]),_:2},1032,["to","class","title"]),k.original.triageNote?(t(),r("p",Ua,i(k.original.triageNote),1)):j("",!0)])]),"errorType-cell":s(({row:k})=>[k.original.errorType?(t(),y(m,{key:0,color:("clusterErrorTypeColor"in M?M.clusterErrorTypeColor:e(vn))(k.original.errorType),variant:"subtle",size:"sm"},{default:s(()=>[d(i(k.original.errorType),1)]),_:2},1032,["color"])):(t(),r("span",Fa,"—"))]),"status-cell":s(({row:k})=>[n("div",Ba,[l(m,{color:("clusterStatusColor"in M?M.clusterStatusColor:e(_n))(k.original.status),variant:"subtle",size:"sm"},{default:s(()=>[d(i(k.original.status),1)]),_:2},1032,["color"]),z(k.original)?(t(),y(_,{key:0,text:z(k.original).hint},{default:s(()=>[l(m,{color:z(k.original).color,variant:"subtle",size:"sm",class:"gap-1"},{default:s(()=>[l(p,{name:z(k.original).icon,class:"size-3"},null,8,["name"]),d(" "+i(z(k.original).label),1)]),_:2},1032,["color"])]),_:2},1032,["text"])):j("",!0)])]),"affectedTests-cell":s(({row:k})=>[n("span",Ea,i(k.original.affectedTests),1)]),"occurrences-cell":s(({row:k})=>[n("span",Pa,i(k.original.occurrences),1)]),"diagnosis-cell":s(({row:k})=>[k.original.diagnosis?.status==="completed"&&k.original.diagnosis.category?(t(),y(m,{key:0,color:"neutral",variant:"subtle",size:"sm",class:"gap-1"},{default:s(()=>[l(p,{name:"i-lucide-sparkles",class:"size-3"}),d(" "+i(k.original.diagnosis.category),1)]),_:2},1024)):(t(),r("span",Na,"—"))]),"lastSeenAt-cell":s(({row:k})=>[n("div",Va,[l(U,{to:`/test-runs/${k.original.lastSeenRunId}`,class:"text-primary hover:underline"},{default:s(()=>[d(" run #"+i(k.original.lastSeenRunId),1)]),_:2},1032,["to"]),k.original.lastSeenAt?(t(),r("span",La," ("+i(("formatRelativeTime"in M?M.formatRelativeTime:e(Nt))(k.original.lastSeenAt))+") ",1)):j("",!0)])]),"actions-cell":s(({row:k})=>[n("div",Oa,[l(v,{to:`/failure-clusters/${k.original.id}`,size:"sm",variant:"outline","trailing-icon":"i-lucide-arrow-right"},{default:s(()=>[...h[3]||(h[3]=[d(" View ",-1)])]),_:1},8,["to"])])]),_:1},8,["data","loading"])]),_:1}),!e(u)&&e(f)&&e(f).length===0?(t(),y(B,{key:0,text:"No failure clusters recorded for this project.",padded:!1,class:"py-4"})):j("",!0)]),_:1})}}}),qa=Object.assign(Ka,{__name:"FailureClustersList"}),Ha={class:"flex items-center justify-between"},Qa={class:"flex items-center gap-3"},Xa={class:"text-sm text-gray-500 inline-flex items-center gap-1"},Ga={class:"flex items-center gap-1.5"},Ja={class:"min-w-0 space-y-0.5"},Ya={class:"flex items-center gap-2"},Wa={class:"text-sm tabular-nums"},Za={class:"text-sm tabular-nums"},eo={key:1,class:"text-gray-400 text-xs"},to={key:1,class:"text-gray-400 text-xs"},so={key:1,class:"text-gray-400 text-xs"},no={key:0,class:"text-sm text-gray-500"},ao={key:1,class:"text-gray-400 text-xs"},oo={class:"flex justify-end"},lo={key:0,class:"text-sm text-gray-500 py-4 text-center"},ro=ue({__name:"FlakyTestsList",props:{projectId:{},environment:{},branch:{},projectName:{}},async setup(D){let T,S;const x=D,g=F(50),f=F([]),{data:u,pending:z}=([T,S]=ye(()=>he(()=>{const m=new URLSearchParams({runs:String(g.value)});return x.environment&&m.set("environment",x.environment),x.branch&&m.set("branch",x.branch),`/api/projects/${x.projectId}/flaky-tests?${m.toString()}`},{lazy:!0,server:!1,watch:[g,()=>x.environment,()=>x.branch],transform:m=>m.items},"$BbmtLKIPAB")),T=await T,S(),T),O=P(()=>f.value.length===0?u.value??[]:(u.value??[]).filter(m=>f.value.includes(m.rootCause??"")));function M(m){return m>=60?"error":m>=30?"warning":"neutral"}function h(m){switch(m){case"timing":return"amber";case"network":return"red";case"assertion":return"blue";case"environment":return"purple";default:return"gray"}}function A(m){f.value.indexOf(m)>=0?f.value=f.value.filter(_=>_!==m):f.value=[...f.value,m]}const w=[{label:"Timing",value:"timing"},{label:"Network",value:"network"},{label:"Assertion",value:"assertion"},{label:"Environment",value:"environment"},{label:"Other",value:"other"}],U=[{accessorKey:"title",header:L("Test")},{accessorKey:"impact",header:L("Impact")},{accessorKey:"score",header:L("Score")},{accessorKey:"failureRate",header:L("Failure rate")},{accessorKey:"retryPassRuns",header:L("Retry passes")},{accessorKey:"alternations",header:L("Flips")},{accessorKey:"rootCause",header:"Root cause"},{accessorKey:"lastFlakeAt",header:L("Last flake")},{id:"actions",header:"Actions"}];return(m,p)=>{const _=et,v=Le,R=Ae,I=Te,B=Fe,K=Oe,k=ms,X=ft,$=ts,H=Ee,G=Ke,b=Be;return t(),y(b,{"data-shot":"flaky-table"},{header:s(()=>[n("div",Ha,[n("div",Qa,[n("p",Xa,[p[1]||(p[1]=d(" Tests that fail intermittently — detected by retry passes and status alternations ",-1)),l(_,{topic:"project.flaky-tests"})]),D.environment?(t(),y(R,{key:0,color:"neutral",variant:"subtle",size:"sm",class:"gap-1"},{default:s(()=>[l(v,{name:"i-lucide-layers",class:"size-3"}),d(" "+i(D.environment),1)]),_:1})):j("",!0),n("div",Ga,[(t(),r(q,null,Y(w,C=>l(I,{key:C.value,size:"xs",variant:e(f).includes(C.value)?"solid":"outline",color:(e(f).includes(C.value),"neutral"),onClick:J=>A(C.value)},{default:s(()=>[d(i(C.label),1)]),_:2},1032,["variant","color","onClick"])),64))])]),l(B,{modelValue:e(g),"onUpdate:modelValue":p[0]||(p[0]=C=>ee(g)?g.value=C:null),items:[{label:"Last 20 runs",value:20},{label:"Last 50 runs",value:50},{label:"Last 100 runs",value:100}],size:"xs",class:"w-36"},null,8,["modelValue"])])]),default:s(()=>[l(G,{"min-width":"52rem",bleed:!1},{default:s(()=>[l(H,{data:e(O),columns:U,loading:e(z),sticky:"",class:"max-h-[32rem]"},{"actions-header":s(()=>[...p[2]||(p[2]=[n("div",{class:"text-right"},"Actions",-1)])]),"title-cell":s(({row:C})=>[n("div",Ja,[l(K,{to:`/test-run-cases/${C.original.latestRunsCaseId}`,class:"text-sm font-medium text-primary hover:underline truncate block",title:C.original.title},{default:s(()=>[d(i(C.original.title),1)]),_:2},1032,["to","title"]),l(k,{tags:C.original.tags,meta:{owner:C.original.owner??void 0,priority:("toTestPriority"in m?m.toTestPriority:e(hn))(C.original.priority)},"max-tags":3},null,8,["tags","meta"]),l(X,{"file-path":C.original.filePath,"project-key":D.projectId,"project-name":D.projectName,class:"text-xs text-gray-400"},null,8,["file-path","project-key","project-name"])])]),"impact-cell":s(({row:C})=>[n("div",Ya,[n("span",{class:se(["inline-block w-2 h-2 rounded-full shrink-0",{"bg-red-500":C.original.wastedCiMinutes>=30,"bg-amber-500":C.original.wastedCiMinutes>=5&&C.original.wastedCiMinutes<30,"bg-green-500":C.original.wastedCiMinutes>=0&&C.original.wastedCiMinutes<5}])},null,2),n("span",Wa,i(Math.round(C.original.wastedCiMinutes))+" min wasted",1)])]),"score-cell":s(({row:C})=>[l(R,{color:M(C.original.score),variant:"subtle",size:"sm"},{default:s(()=>[d(i(C.original.score),1)]),_:2},1032,["color"])]),"failureRate-cell":s(({row:C})=>[n("span",Za,i(Math.round(C.original.failureRate*100))+"%",1)]),"retryPassRuns-cell":s(({row:C})=>[C.original.retryPassRuns?(t(),y(R,{key:0,color:"warning",variant:"outline",size:"sm"},{default:s(()=>[d(i(C.original.retryPassRuns)+" run"+i(C.original.retryPassRuns===1?"":"s"),1)]),_:2},1024)):(t(),r("span",eo,"—"))]),"alternations-cell":s(({row:C})=>[C.original.alternations>=2?(t(),y(R,{key:0,color:"neutral",variant:"outline",size:"sm"},{default:s(()=>[d(i(C.original.alternations),1)]),_:2},1024)):(t(),r("span",to,"—"))]),"rootCause-cell":s(({row:C})=>[C.original.rootCause?(t(),y($,{key:0,text:C.original.rootCause,color:h(C.original.rootCause)},null,8,["text","color"])):(t(),r("span",so,"—"))]),"lastFlakeAt-cell":s(({row:C})=>[C.original.lastFlakeAt?(t(),r("span",no,i(("formatRelativeTime"in m?m.formatRelativeTime:e(Nt))(C.original.lastFlakeAt)),1)):(t(),r("span",ao,"—"))]),"actions-cell":s(({row:C})=>[n("div",oo,[l(I,{to:`/test-run-cases/${C.original.latestRunsCaseId}`,size:"sm",variant:"outline","trailing-icon":"i-lucide-arrow-right"},{default:s(()=>[...p[3]||(p[3]=[d(" View ",-1)])]),_:1},8,["to"])])]),_:1},8,["data","loading"])]),_:1}),!e(z)&&e(O).length===0?(t(),r("p",lo," No flaky tests detected in the last "+i(e(g))+" runs. ",1)):j("",!0)]),_:1})}}}),io=Object.assign(ro,{__name:"FlakyTestsList"}),co={class:"w-full"},uo=["d","stroke"],mo=["cx","cy","fill"],po=["x","y"],go=["x","width","height","fill","onClick","onMouseenter"],fo={class:"font-semibold mb-1"},_o={class:"capitalize mb-1"},vo={class:"space-y-0.5"},yo={class:"mt-1"},ho={key:0,class:"text-gray-400 dark:text-gray-500 text-xs"},xo=ue({__name:"PerformanceTrendChart",props:{data:{},height:{default:260},markers:{default:()=>[]}},emits:["marker-click"],setup(D,{emit:T}){const S=D,x=T,g=P(()=>!S.data||S.data.length===0?[]:S.data.map(v=>({id:v.id,date:new Date(v.startTime),duration:v.duration?Math.round(v.duration/1e3):null,avgTestDuration:v.avgTestDuration?Math.round(v.avgTestDuration/1e3):null,p90TestDuration:v.p90TestDuration?Math.round(v.p90TestDuration/1e3):null,commit:v.commit?v.commit.substring(0,7):null,status:v.status,totalTests:v.totalTests}))),f=P(()=>Math.max(1,...g.value.flatMap(v=>Ut.map(R=>v[R.key]??0)))),u=P(()=>g.value.map(v=>v.date));function z(v){const{centerOf:R}=Ze(g.value.length,v);return g.value.map((I,B)=>R(B))}function O(v,R,I){const B=z(R);let K="",k=!1;return g.value.forEach((X,$)=>{const H=X[v];if(H==null){k=!1;return}K+=`${k?"L":"M"}${B[$]},${I(H)}`,k=!0}),K}function M(v,R,I){const B=z(R);return g.value.flatMap((K,k)=>{const X=K[v];return X==null?[]:[{id:K.id,x:B[k],y:I(X)}]})}function h(v){const{centerOf:R}=Ze(g.value.length,v);return as(u.value,Math.max(2,Math.floor(v/80))).map(I=>({x:R(I),label:os(u.value[I])}))}function A(v,R){return ls(u.value,z(v),new Date(R).getTime())}const{data:w,pos:U,show:m,move:p,hide:_}=rs();return(v,R)=>{const I=ss,B=is,K=je,k=cs;return t(),r("div",co,[e(g).length>0?(t(),y(B,{key:0,height:D.height,"y-max":e(f),"y-format":X=>`${X}s`},{default:s(({plotWidth:X,plotHeight:$,yScale:H})=>[(t(!0),r(q,null,Y(e(Ut),G=>(t(),r(q,{key:G.key},[n("path",{d:O(G.key,X,H),fill:"none",stroke:G.color,"stroke-width":"2"},null,8,uo),(t(!0),r(q,null,Y(M(G.key,X,H),b=>(t(),r("circle",{key:b.id,cx:b.x,cy:b.y,r:"3",fill:G.color},null,8,mo))),128))],64))),128)),(t(!0),r(q,null,Y(h(X),G=>(t(),r("text",{key:G.x,x:G.x,y:$+14,"text-anchor":"middle",class:"fill-gray-400 dark:fill-gray-500 text-[10px]"},i(G.label),9,po))),128)),l(I,{markers:D.markers,"x-of":G=>A(X,G),"plot-height":$,onMarkerClick:R[0]||(R[0]=G=>x("marker-click",G))},null,8,["markers","x-of","plot-height"]),(t(!0),r(q,null,Y(e(g),(G,b)=>(t(),r("rect",{key:`hover-${G.id}`,x:b*(X/e(g).length),y:0,width:X/e(g).length,height:$,fill:e(w)?.id===G.id?"rgb(148 163 184 / 0.15)":"transparent",class:"cursor-pointer",onClick:C=>("navigateTo"in v?v.navigateTo:e(Bt))(`/test-runs/${G.id}`),onMouseenter:C=>e(m)(C,G),onMousemove:R[1]||(R[1]=C=>e(p)(C)),onMouseleave:R[2]||(R[2]=C=>e(_)())},null,40,go))),128))]),_:1},8,["height","y-max","y-format"])):(t(),y(K,{key:1,text:"No performance data available to display chart"})),e(w)?(t(),y(k,{key:2,pos:e(U)},{default:s(()=>[n("div",fo,i(e(w).date.toLocaleDateString("en-US",{month:"short",day:"numeric",hour:"2-digit",minute:"2-digit"})),1),n("div",_o,"Status: "+i(e(w).status),1),n("div",vo,[n("div",null,[R[3]||(R[3]=n("span",{class:"text-blue-500 dark:text-blue-400"},"●",-1)),d(" Total: "+i(e(w).duration??"-")+"s ",1)]),n("div",null,[R[4]||(R[4]=n("span",{class:"text-green-500 dark:text-green-400"},"●",-1)),d(" Avg: "+i(e(w).avgTestDuration??"-")+"s ",1)]),n("div",null,[R[5]||(R[5]=n("span",{class:"text-orange-500 dark:text-orange-400"},"●",-1)),d(" P90: "+i(e(w).p90TestDuration??"-")+"s ",1)]),n("div",yo,"Tests: "+i(e(w).totalTests),1),e(w).commit?(t(),r("div",ho," Commit: "+i(e(w).commit),1)):j("",!0)]),R[6]||(R[6]=n("div",{class:"text-gray-400 dark:text-gray-500 text-xs mt-1"},"Click to view run details",-1))]),_:1},8,["pos"])):j("",!0)])}}}),bo=Object.assign(xo,{__name:"PerformanceTrendChart"}),ko={class:"min-w-0"},$o={class:"mt-1"},Co={class:"tabular-nums"},To={key:0,class:"ml-1 text-xs text-gray-500",title:"timeout ÷ p95"},jo={class:"tabular-nums text-gray-500"},So={key:0,class:"text-sm"},wo={key:1,class:"tabular-nums"},Ro={class:"tabular-nums font-medium text-green-600 dark:text-green-400"},Ao={class:"tabular-nums text-gray-500"},Do=ue({__name:"TimeoutOpportunitiesTable",props:{projectId:{},projectName:{}},async setup(D){let T,S;const x=D,{data:g,pending:f}=([T,S]=ye(()=>he(()=>`/api/projects/${x.projectId}/timeout-opportunities`,{lazy:!0,server:!1,transform:M=>M.items},"$zikJNhkkxJ")),T=await T,S(),T),u=P(()=>g.value??[]);function z(M){return M==null?"—":M<1e3?`${M}ms`:`${(M/1e3).toFixed(1)}s`}const O=[{accessorKey:"title",header:L("Test case")},{accessorKey:"kind",header:"Type"},{accessorKey:"timeout",header:L("Timeout")},{accessorKey:"p95",header:L("p95")},{accessorKey:"recommendedTimeout",header:"Recommendation"},{accessorKey:"estimatedSavingMs",header:L("Est. saving / failure")},{accessorKey:"runCount",header:L("Runs")}];return(M,h)=>{const A=tt,w=je,U=Oe,m=ft,p=Ae,_=Ee,v=Ke,R=Be;return t(),y(R,null,{header:s(()=>[...h[0]||(h[0]=[n("h2",{class:"text-xl font-semibold"},"Timeout opportunities",-1),n("p",{class:"text-sm text-gray-600 mt-1"},[d(" Tests whose configured timeout far exceeds their real duration, or that still carry a stale "),n("code",{class:"text-xs"},"test.slow()"),d(" mark — tightening these makes failures surface sooner. ")],-1)])]),default:s(()=>[e(f)?(t(),y(A,{key:0})):e(u).length===0?(t(),y(w,{key:1,text:"No timeout opportunities",description:"No oversized timeouts or stale test.slow() marks were found for this project."})):(t(),y(v,{key:2,"min-width":"52rem",bleed:!1},{default:s(()=>[l(_,{data:e(u),columns:O,sticky:"",class:"max-h-[32rem]"},{"title-cell":s(({row:I})=>[n("div",ko,[l(U,{to:`/test-cases/${I.original.testCaseId}`,class:"font-medium truncate block hover:text-primary hover:underline"},{default:s(()=>[d(i(I.original.title),1)]),_:2},1032,["to"]),n("div",$o,[l(m,{"file-path":I.original.filePath,"project-key":D.projectId,"project-name":D.projectName,class:"text-xs"},null,8,["file-path","project-key","project-name"])])])]),"kind-cell":s(({row:I})=>[l(p,{color:I.original.kind==="oversized-timeout"?"warning":"info",variant:"subtle",size:"sm"},{default:s(()=>[d(i(I.original.kind==="oversized-timeout"?"Oversized timeout":"Stale test.slow()"),1)]),_:2},1032,["color"])]),"timeout-cell":s(({row:I})=>[n("span",Co,i(z(I.original.timeout)),1),I.original.headroomRatio!=null?(t(),r("span",To," ("+i(I.original.headroomRatio)+"×) ",1)):j("",!0)]),"p95-cell":s(({row:I})=>[n("span",jo,i(z(I.original.p95)),1)]),"recommendedTimeout-cell":s(({row:I})=>[I.original.kind==="stale-slow"?(t(),r("span",So,[...h[1]||(h[1]=[d("Remove ",-1),n("code",{class:"text-xs"},"test.slow()",-1)])])):(t(),r("span",wo,"Lower to ~"+i(z(I.original.recommendedTimeout)),1))]),"estimatedSavingMs-cell":s(({row:I})=>[n("span",Ro,i(z(I.original.estimatedSavingMs)),1)]),"runCount-cell":s(({row:I})=>[n("span",Ao,i(I.original.runCount),1)]),_:1},8,["data"])]),_:1}))]),_:1})}}}),zo=Object.assign(Do,{__name:"TimeoutOpportunitiesTable"}),Mo={class:"flex items-center justify-between"},Io={class:"text-sm text-gray-500 inline-flex items-center gap-1"},Uo={class:"truncate font-mono text-xs"},Fo={class:"tabular-nums"},Bo={class:"tabular-nums text-gray-500"},Eo={class:"tabular-nums text-gray-500"},Po=ue({__name:"SpecHealthTable",props:{projectId:{}},async setup(D){let T,S;const x=D,g=F(30),{data:f,pending:u}=([T,S]=ye(()=>he(()=>`/api/projects/${x.projectId}/spec-health?days=${g.value}`,{lazy:!0,server:!1,watch:[g]},"$SX5aqvhtuX")),T=await T,S(),T),z=P(()=>f.value?.specs??[]);function O(m){return m>=.9?"bg-green-500":m>=.7?"bg-amber-500":m>0?"bg-red-500":"bg-gray-300 dark:bg-gray-600"}function M(m){return m>=.9?"text-green-600 dark:text-green-400":m>=.7?"text-amber-600 dark:text-amber-400":m>0?"text-red-600 dark:text-red-400":"text-gray-500"}function h(m){return`${Math.round(m*100)}%`}function A(m){return m<1e3?`${m}ms`:`${(m/1e3).toFixed(1)}s`}const w=[{label:"Last 7 days",value:7},{label:"Last 30 days",value:30},{label:"Last 90 days",value:90}],U=[{accessorKey:"prefix",header:L("Spec prefix")},{accessorKey:"passRate",header:L("Pass rate")},{accessorKey:"flakyRate",header:L("Flaky")},{accessorKey:"failureCount",header:L("Failures")},{accessorKey:"testCount",header:L("Tests")},{accessorKey:"avgDuration",header:L("Avg time")}];return(m,p)=>{const _=et,v=Fe,R=tt,I=je,B=Oe,K=Ee,k=Ke,X=Be;return t(),y(X,null,{header:s(()=>[n("div",Mo,[n("p",Io,[p[1]||(p[1]=d(" Spec-file health overview — pass rate, flaky rate, and failure count per spec prefix ",-1)),l(_,{topic:"project.spec-health"})]),l(v,{modelValue:e(g),"onUpdate:modelValue":p[0]||(p[0]=$=>ee(g)?g.value=$:null),items:w,size:"xs",class:"w-32"},null,8,["modelValue"])])]),default:s(()=>[e(u)?(t(),y(R,{key:0})):e(z).length===0?(t(),y(I,{key:1,text:"No data",description:"No spec health data available for the selected period."})):(t(),y(k,{key:2,"min-width":"46rem",bleed:!1},{default:s(()=>[l(K,{data:e(z),columns:U,sticky:"",class:"max-h-[32rem]"},{"prefix-cell":s(({row:$})=>[l(B,{to:`/projects/${D.projectId}/test-cases?file=${encodeURIComponent($.original.prefix)}`,class:"flex items-center gap-2 min-w-0 text-primary hover:underline",title:$.original.prefix},{default:s(()=>[n("span",{class:se(["inline-block size-3 rounded shrink-0",O($.original.passRate)])},null,2),n("span",Uo,i($.original.prefix),1)]),_:2},1032,["to","title"])]),"passRate-cell":s(({row:$})=>[n("span",{class:se(["font-medium tabular-nums",M($.original.passRate)])},i(h($.original.passRate)),3)]),"flakyRate-cell":s(({row:$})=>[n("span",Fo,i(Math.round($.original.flakyRate*100))+"%",1)]),"failureCount-cell":s(({row:$})=>[n("span",{class:se(["tabular-nums",$.original.failureCount>0?"text-red-600 dark:text-red-400":""])},i($.original.failureCount),3)]),"testCount-cell":s(({row:$})=>[n("span",Bo,i($.original.testCount),1)]),"avgDuration-cell":s(({row:$})=>[n("span",Eo,i(A($.original.avgDuration)),1)]),_:1},8,["data"])]),_:1}))]),_:1})}}}),No=Object.assign(Po,{__name:"SpecHealthTable"}),Vo={class:"flex items-center justify-between"},Lo={key:2},Oo={class:"grid grid-cols-3 gap-3 mb-4"},Ko={class:"rounded-lg border border-gray-200 dark:border-gray-800 p-3"},qo={class:"text-2xl font-semibold tabular-nums"},Ho={class:"rounded-lg border border-gray-200 dark:border-gray-800 p-3"},Qo={class:"text-2xl font-semibold tabular-nums"},Xo={class:"rounded-lg border border-gray-200 dark:border-gray-800 p-3"},Go={class:"text-2xl font-semibold tabular-nums"},Jo=["title"],Yo={class:"tabular-nums"},Wo={class:"tabular-nums text-gray-500"},Zo=["title"],el=ue({__name:"AiStepCoverage",props:{projectId:{}},async setup(D){let T,S;const x=D,g=F(30),{data:f,pending:u}=([T,S]=ye(()=>he(()=>`/api/projects/${x.projectId}/ai-steps?days=${g.value}`,{lazy:!0,server:!1,watch:[g]},"$XNuZ38B1nb")),T=await T,S(),T),z=P(()=>f.value?.artifacts??[]),O=P(()=>f.value?.summary??{artifactCount:0,testCount:0,runCount:0,replayCount:0});function M(U){const m=U.split(/[\\/]/);return m[m.length-1]||U}function h(U){if(!U)return"—";const m=new Date(U).getTime();if(!Number.isFinite(m))return"—";const p=Math.max(0,Math.round((Date.now()-m)/1e3));if(p<60)return"just now";const _=Math.round(p/60);if(_<60)return`${_}m ago`;const v=Math.round(_/60);return v<24?`${v}h ago`:`${Math.round(v/24)}d ago`}const A=[{label:"Last 7 days",value:7},{label:"Last 30 days",value:30},{label:"Last 90 days",value:90}],w=[{accessorKey:"entry",header:L("Artifact")},{accessorKey:"testCount",header:L("Tests")},{accessorKey:"replayCount",header:L("Replays")},{accessorKey:"lastSeen",header:L("Last seen")}];return(U,m)=>{const p=Fe,_=tt,v=je,R=Ee,I=Ke,B=Be;return t(),y(B,null,{header:s(()=>[n("div",Vo,[m[1]||(m[1]=n("p",{class:"text-sm text-gray-500"},[d(" AI-step liveness — which committed "),n("code",{class:"text-xs"},"piwiLocator"),d(" / "),n("code",{class:"text-xs"},"piwiRun"),d(" artifacts were replayed, and when they were last seen ")],-1)),l(p,{modelValue:e(g),"onUpdate:modelValue":m[0]||(m[0]=K=>ee(g)?g.value=K:null),items:A,size:"xs",class:"w-32"},null,8,["modelValue"])])]),default:s(()=>[e(u)?(t(),y(_,{key:0})):e(z).length===0?(t(),y(v,{key:1,text:"No AI steps",description:"No committed AI-step artifacts were replayed in the selected period. Author them with page.piwiLocator / page.piwiRun in resolve mode."})):(t(),r("div",Lo,[n("div",Oo,[n("div",Ko,[n("div",qo,i(e(O).artifactCount),1),m[2]||(m[2]=n("div",{class:"text-xs text-gray-500"},"Artifacts replayed",-1))]),n("div",Ho,[n("div",Qo,i(e(O).testCount),1),m[3]||(m[3]=n("div",{class:"text-xs text-gray-500"},"Tests using AI steps",-1))]),n("div",Xo,[n("div",Go,i(e(O).replayCount),1),m[4]||(m[4]=n("div",{class:"text-xs text-gray-500"},"Total replays",-1))])]),l(I,{"min-width":"40rem",bleed:!1},{default:s(()=>[l(R,{data:e(z),columns:w,sticky:"",class:"max-h-[32rem]"},{"entry-cell":s(({row:K})=>[n("span",{class:"font-mono text-xs truncate block max-w-[28rem]",title:K.original.entry},i(M(K.original.entry)),9,Jo)]),"testCount-cell":s(({row:K})=>[n("span",Yo,i(K.original.testCount),1)]),"replayCount-cell":s(({row:K})=>[n("span",Wo,i(K.original.replayCount),1)]),"lastSeen-cell":s(({row:K})=>[n("span",{class:"tabular-nums text-gray-500",title:K.original.lastSeen||""},i(h(K.original.lastSeen)),9,Zo)]),_:1},8,["data"])]),_:1})]))]),_:1})}}}),tl=Object.assign(el,{__name:"AiStepCoverage"}),sl={class:"space-y-6"},nl={class:"w-full text-sm"},al={class:"px-3 py-2 min-w-0"},ol={class:"text-xs text-muted"},ll={class:"px-3 py-2 text-muted"},rl={class:"px-3 py-2 whitespace-nowrap"},il={key:1,class:"text-xs text-muted"},cl={key:2,class:"text-xs"},ul={class:"px-3 py-2 whitespace-nowrap text-muted"},dl={class:"px-3 py-2 text-right"},ml={class:"w-full text-sm"},pl={class:"px-3 py-2 min-w-0"},gl={class:"text-xs text-muted"},fl={class:"px-3 py-2 text-right whitespace-nowrap"},_l=ue({__name:"QuarantineTable",props:{projectId:{},projectName:{}},async setup(D){let T,S;const x=D,g=Ue(),f=F(null),{data:u,status:z,error:O,refresh:M}=([T,S]=ye(()=>he(()=>`/api/projects/${x.projectId}/quarantine`,"$BSyDdCMaDx")),T=await T,S(),T);function h(U){const m=Math.round(U/36e5);return m<48?`${Math.max(1,m)}h`:`${Math.round(m/24)}d`}async function A(U,m){f.value=U;try{await $fetch(`/api/projects/${x.projectId}/quarantine`,{method:"POST",body:{testCaseId:U,reason:m,source:"proposed"}}),g.add({title:"Quarantined",color:"success"}),await M()}catch{g.add({title:"Could not quarantine that test",color:"error"})}finally{f.value=null}}async function w(U){f.value=U;try{await $fetch(`/api/projects/${x.projectId}/quarantine/${U}`,{method:"DELETE"}),g.add({title:"Released",color:"success"}),await M()}catch{g.add({title:"Could not release that test",color:"error"})}finally{f.value=null}}return(U,m)=>{const p=tt,_=kn,v=$n,R=Cn,I=je,B=Oe,K=ms,k=ft,X=Ae,$=Te,H=Ke,G=Pt;return t(),r("div",sl,[l(G,{title:"Quarantine",icon:"i-lucide-shield-alert",count:e(u)?.debt.active,help:"project.quarantine"},{subtitle:s(()=>[...m[0]||(m[0]=[d(" A quarantined test keeps running and keeps reporting — it is excluded from the CI gate's verdict and nothing else. That is what lets it earn its way back out. ",-1)])]),default:s(()=>[e(z)==="pending"?(t(),y(p,{key:0})):e(O)?(t(),y(_,{key:1,text:String(e(O))},null,8,["text"])):(t(),r(q,{key:2},[e(u)&&e(u).debt.active>0?(t(),y(R,{key:0,class:"mb-4"},{default:s(()=>[l(v,{label:"Quarantined",value:e(u).debt.active},null,8,["value"]),l(v,{label:"Ready to release",value:e(u).debt.readyToRelease,"value-class":e(u).debt.readyToRelease>0?"text-green-600 dark:text-green-400":"",hint:"earned their way out"},null,8,["value","value-class"]),l(v,{label:"Still failing",value:e(u).debt.stillFailing,hint:"no passing streak"},null,8,["value"]),l(v,{label:"Oldest",value:h(e(u).debt.oldestAgeMs),size:"sm"},null,8,["value"])]),_:1})):j("",!0),!e(u)||e(u).entries.length===0?(t(),y(I,{key:1,icon:"i-lucide-shield-check",text:"Nothing quarantined. Tests you quarantine appear here with their progress back out."})):(t(),y(H,{key:2},{default:s(()=>[n("table",nl,[m[2]||(m[2]=n("thead",{class:"text-left text-xs text-muted"},[n("tr",null,[n("th",{class:"px-3 py-2"},"Test"),n("th",{class:"px-3 py-2"},"Reason"),n("th",{class:"px-3 py-2 whitespace-nowrap"},"Streak"),n("th",{class:"px-3 py-2 whitespace-nowrap"},"Age"),n("th",{class:"px-3 py-2 text-right"},"Actions")])],-1)),n("tbody",null,[(t(!0),r(q,null,Y(e(u).entries,b=>(t(),r("tr",{key:b.id,class:"border-t border-default"},[n("td",al,[l(B,{to:`/test-cases/${b.testCaseId}`,class:"text-primary hover:underline font-medium"},{default:s(()=>[d(i(b.title),1)]),_:2},1032,["to"]),l(K,{tags:b.tags,meta:{owner:b.owner??void 0},"max-tags":3,class:"ml-1"},null,8,["tags","meta"]),n("div",ol,[l(k,{"file-path":b.filePath,"project-key":D.projectId,"project-name":D.projectName},null,8,["file-path","project-key","project-name"])])]),n("td",ll,i(b.reason||"—"),1),n("td",rl,[b.releaseProposed?(t(),y(X,{key:0,color:"success",variant:"soft",size:"xs"},{default:s(()=>[d(i(b.consecutivePasses)+" green — ready ",1)]),_:2},1024)):b.runsSinceQuarantine===0?(t(),r("span",il,"not run yet")):(t(),r("span",cl,i(b.consecutivePasses)+" / "+i(e(u).releaseAfterConsecutivePasses),1))]),n("td",ul,i(h(b.ageMs)),1),n("td",dl,[l($,{size:"xs",color:b.releaseProposed?"primary":"neutral",variant:"soft",loading:e(f)===b.testCaseId,onClick:C=>w(b.testCaseId)},{default:s(()=>[...m[1]||(m[1]=[d(" Release ",-1)])]),_:1},8,["color","loading","onClick"])])]))),128))])])]),_:1}))],64))]),_:1},8,["count"]),e(u)&&e(u).candidates.length>0?(t(),y(G,{key:0,title:"Worth quarantining",icon:"i-lucide-lightbulb",count:e(u).candidates.length},{subtitle:s(()=>[...m[3]||(m[3]=[d(" Ranked by the CI minutes their flakiness wastes, not by how often they flake — a test that flakes constantly but finishes instantly costs nothing. ",-1)])]),default:s(()=>[l(H,null,{default:s(()=>[n("table",ml,[n("tbody",null,[(t(!0),r(q,null,Y(e(u).candidates,b=>(t(),r("tr",{key:b.testCaseId,class:"border-t border-default"},[n("td",pl,[l(B,{to:`/test-cases/${b.testCaseId}`,class:"text-primary hover:underline font-medium"},{default:s(()=>[d(i(b.title),1)]),_:2},1032,["to"]),n("div",gl,i(b.rationale),1)]),n("td",fl,[l($,{size:"xs",color:"neutral",variant:"soft",loading:e(f)===b.testCaseId,onClick:C=>A(b.testCaseId,b.rationale)},{default:s(()=>[...m[4]||(m[4]=[d(" Quarantine ",-1)])]),_:1},8,["loading","onClick"])])]))),128))])])]),_:1})]),_:1},8,["count"])):j("",!0)])}}}),vl=Object.assign(_l,{__name:"QuarantineTable"}),yl={class:"space-y-4"},hl={class:"grid grid-cols-1 sm:grid-cols-2 gap-4"},xl={id:"marker-environments"},bl=["value"],kl=ue({__name:"MarkerFormModal",props:{open:{type:Boolean},projectId:{},marker:{},environments:{}},emits:["update:open","saved"],setup(D,{emit:T}){const S=D,x=T,g=Ue(),f=jn.map(A=>({label:A.label,value:A.id,icon:A.icon})),u=Hs({label:"",occurredAt:"",category:Mt,environment:"",description:""}),z=P(()=>!!S.marker),O=F(!1);function M(A){const w=new Date(A),U=m=>String(m).padStart(2,"0");return`${w.getFullYear()}-${U(w.getMonth()+1)}-${U(w.getDate())}T${U(w.getHours())}:${U(w.getMinutes())}`}ge(()=>S.open,A=>{A&&(S.marker?(u.label=S.marker.label,u.occurredAt=M(S.marker.occurredAt),u.category=S.marker.category||Mt,u.environment=S.marker.environment??"",u.description=S.marker.description??""):(u.label="",u.occurredAt=M(new Date),u.category=Mt,u.environment="",u.description=""))});async function h(){if(!u.label.trim()){g.add({title:"Label is required",color:"error"});return}if(!u.occurredAt){g.add({title:"Date is required",color:"error"});return}O.value=!0;const A={label:u.label.trim(),occurredAt:new Date(u.occurredAt).toISOString(),category:u.category,environment:u.environment.trim()||null,description:u.description.trim()||null};try{S.marker?(await $fetch(`/api/markers/${S.marker.id}`,{method:"PATCH",body:A}),g.add({title:"Marker updated",color:"success"})):(await $fetch(`/api/projects/${S.projectId}/markers`,{method:"POST",body:A}),g.add({title:"Marker created",color:"success"})),x("update:open",!1),x("saved")}catch(w){g.add({title:z.value?"Failed to update marker":"Failed to create marker",description:ds(w),color:"error"})}finally{O.value=!1}}return(A,w)=>{const U=Zt,m=es,p=Fe,_=wn,v=Te,R=Vt,I=Et;return t(),y(I,null,{default:s(()=>[l(R,{open:D.open,title:e(z)?"Edit marker":"Add marker","onUpdate:open":w[6]||(w[6]=B=>x("update:open",B))},{body:s(()=>[n("div",yl,[l(m,{label:"Label",name:"label",required:""},{default:s(()=>[l(U,{modelValue:e(u).label,"onUpdate:modelValue":w[0]||(w[0]=B=>e(u).label=B),placeholder:"e.g. Migrated CI to new runners",class:"w-full"},null,8,["modelValue"])]),_:1}),n("div",hl,[l(m,{label:"Date & time",name:"occurredAt",required:""},{default:s(()=>[l(U,{modelValue:e(u).occurredAt,"onUpdate:modelValue":w[1]||(w[1]=B=>e(u).occurredAt=B),type:"datetime-local",class:"w-full"},null,8,["modelValue"])]),_:1}),l(m,{label:"Category",name:"category"},{default:s(()=>[l(p,{modelValue:e(u).category,"onUpdate:modelValue":w[2]||(w[2]=B=>e(u).category=B),items:e(f),class:"w-full"},null,8,["modelValue","items"])]),_:1})]),l(m,{label:"Environment",name:"environment",help:"Optional. Leave empty to apply to all environments."},{default:s(()=>[l(U,{modelValue:e(u).environment,"onUpdate:modelValue":w[3]||(w[3]=B=>e(u).environment=B),list:"marker-environments",placeholder:"e.g. production",class:"w-full"},null,8,["modelValue"]),n("datalist",xl,[(t(!0),r(q,null,Y(D.environments||[],B=>(t(),r("option",{key:B,value:B},null,8,bl))),128))])]),_:1}),l(m,{label:"Description",name:"description"},{default:s(()=>[l(_,{modelValue:e(u).description,"onUpdate:modelValue":w[4]||(w[4]=B=>e(u).description=B),rows:3,placeholder:"Optional details",class:"w-full"},null,8,["modelValue"])]),_:1})])]),footer:s(()=>[l(v,{color:"neutral",variant:"ghost",label:"Cancel",onClick:w[5]||(w[5]=B=>x("update:open",!1))}),l(v,{label:e(z)?"Save changes":"Add marker",icon:e(z)?"i-lucide-check":"i-lucide-plus",loading:e(O),onClick:h},null,8,["label","icon","loading"])]),_:1},8,["open","title"])]),_:1})}}}),$l=Object.assign(kl,{__name:"MarkerFormModal"}),Cl={class:"md:hidden space-y-3"},Tl={class:"flex items-start justify-between gap-2"},jl={key:0,class:"flex gap-1 shrink-0"},Sl={class:"text-sm text-muted"},wl={key:0,class:"text-xs"},Rl={key:1,class:"text-sm text-muted"},Al={class:"whitespace-nowrap"},Dl={class:"text-sm"},zl={class:"text-xs text-muted"},Ml={class:"font-medium flex items-center gap-1"},Il={key:0,class:"text-xs text-muted line-clamp-1"},Ul={key:1,class:"text-xs text-muted"},Fl={key:0,class:"flex gap-1 justify-end"},Bl=ue({__name:"ProjectTimeline",props:{projectId:{},markers:{},environments:{},canEdit:{type:Boolean},focusMarkerId:{}},emits:["changed","clear-focus"],setup(D,{emit:T}){const S=D,x=T,g=Ue(),f=P(()=>[...S.markers].sort((p,_)=>+new Date(_.occurredAt)-+new Date(p.occurredAt))),u=[{accessorKey:"occurredAt",header:"When"},{accessorKey:"category",header:"Category"},{accessorKey:"label",header:"Label"},{accessorKey:"environment",header:"Environment"},{accessorKey:"actions",header:""}],z=F(!1),O=F(null);function M(){O.value=null,z.value=!0}function h(p){O.value=p,z.value=!0}ge(()=>S.focusMarkerId,p=>{if(p==null)return;const _=S.markers.find(v=>v.id===p);_&&h(_),x("clear-focus")},{immediate:!0});const A=F(!1),w=F(null);function U(p){w.value=p,A.value=!0}async function m(){const p=w.value;if(A.value=!1,w.value=null,!!p)try{await $fetch(`/api/markers/${p.id}`,{method:"DELETE"}),g.add({title:"Marker deleted",color:"success"}),x("changed")}catch(_){g.add({title:"Failed to delete marker",description:ds(_),color:"error"})}}return(p,_)=>{const v=Te,R=je,I=Sn,B=Ae,K=Le,k=Ee,X=$l,$=Vt,H=Et,G=Pt;return t(),y(G,{title:"Timeline markers",count:D.markers.length,icon:"i-lucide-milestone",help:"project.timeline",subtitle:"Dated events overlaid on the analytics charts"},{actions:s(()=>[D.canEdit?(t(),y(v,{key:0,label:"Add marker",icon:"i-lucide-plus",size:"sm",onClick:M})):j("",!0)]),default:s(()=>[D.markers.length===0?(t(),y(R,{key:0,icon:"i-lucide-milestone",text:"No markers yet. Add a deploy, config change, or incident to see it on the charts."})):(t(),r(q,{key:1},[n("div",Cl,[(t(!0),r(q,null,Y(e(f),b=>(t(),r("div",{key:b.id,class:"rounded-lg border border-default p-3 space-y-2"},[n("div",Tl,[l(I,{marker:b},null,8,["marker"]),D.canEdit?(t(),r("div",jl,[l(v,{icon:"i-lucide-pencil",color:"neutral",variant:"ghost",size:"xs",onClick:C=>h(b)},null,8,["onClick"]),l(v,{icon:"i-lucide-trash-2",color:"error",variant:"ghost",size:"xs",onClick:C=>U(b)},null,8,["onClick"])])):j("",!0)]),n("div",Sl,i(("prettyDateFormat"in p?p.prettyDateFormat:e(gt))(b.occurredAt)),1),b.environment?(t(),r("div",wl,[l(B,{color:"neutral",variant:"subtle",size:"xs"},{default:s(()=>[d(i(b.environment),1)]),_:2},1024)])):j("",!0),b.description?(t(),r("p",Rl,i(b.description),1)):j("",!0)]))),128))]),l(k,{data:e(f),columns:u,class:"hidden md:block"},{"occurredAt-cell":s(({row:b})=>[n("div",Al,[n("div",Dl,i(("prettyDateFormat"in p?p.prettyDateFormat:e(gt))(b.original.occurredAt)),1),n("div",zl,i(("formatRelativeTime"in p?p.formatRelativeTime:e(Nt))(b.original.occurredAt)),1)])]),"category-cell":s(({row:b})=>[l(B,{color:e(It)(b.original.category).color,variant:"subtle",size:"sm",class:"gap-1"},{default:s(()=>[l(K,{name:e(It)(b.original.category).icon,class:"size-3"},null,8,["name"]),d(" "+i(e(It)(b.original.category).label),1)]),_:2},1032,["color"])]),"label-cell":s(({row:b})=>[n("div",null,[n("div",Ml,[d(i(b.original.label)+" ",1),b.original.source==="auto"?(t(),y(K,{key:0,name:"i-lucide-sparkles",class:"size-3 text-muted",title:"Automatically detected"})):j("",!0)]),b.original.description?(t(),r("div",Il,i(b.original.description),1)):j("",!0)])]),"environment-cell":s(({row:b})=>[b.original.environment?(t(),y(B,{key:0,color:"neutral",variant:"subtle",size:"xs"},{default:s(()=>[d(i(b.original.environment),1)]),_:2},1024)):(t(),r("span",Ul,"All"))]),"actions-cell":s(({row:b})=>[D.canEdit?(t(),r("div",Fl,[l(v,{icon:"i-lucide-pencil",color:"neutral",variant:"ghost",size:"sm",onClick:C=>h(b.original)},null,8,["onClick"]),l(v,{icon:"i-lucide-trash-2",color:"error",variant:"ghost",size:"sm",onClick:C=>U(b.original)},null,8,["onClick"])])):j("",!0)]),_:1},8,["data"])],64)),l(X,{open:e(z),"onUpdate:open":_[0]||(_[0]=b=>ee(z)?z.value=b:null),"project-id":D.projectId,marker:e(O),environments:D.environments,onSaved:_[1]||(_[1]=b=>x("changed"))},null,8,["open","project-id","marker","environments"]),l(H,null,{default:s(()=>[l($,{open:e(A),title:"Delete marker","onUpdate:open":_[3]||(_[3]=b=>A.value=b)},{body:s(()=>[n("p",null,[_[4]||(_[4]=d(" Delete marker ",-1)),e(w)?(t(),y(I,{key:0,marker:e(w),class:"inline-flex align-middle"},null,8,["marker"])):j("",!0),_[5]||(_[5]=d("? This can't be undone. ",-1))])]),footer:s(()=>[l(v,{color:"neutral",variant:"ghost",label:"Cancel",onClick:_[2]||(_[2]=b=>A.value=!1)}),l(v,{color:"error",label:"Delete",icon:"i-lucide-trash-2",onClick:m})]),_:1},8,["open"])]),_:1})]),_:1},8,["count"])}}}),El=Object.assign(Bl,{__name:"ProjectTimeline"}),Pl={class:"flex flex-col h-full overflow-y-auto gap-4"},Nl={key:0,class:"pb-0 space-y-4"},Vl={key:0,class:"text-gray-600"},Ll={key:1,class:"flex flex-wrap gap-1 mt-2"},Ol={class:"flex flex-wrap items-center gap-3 mb-4"},Kl={class:"inline-flex items-center gap-1"},ql=["onClick"],Hl=["title","onClick"],Ql={key:0,class:"flex items-center gap-3 px-3 py-2 mb-3 rounded-lg bg-primary-50 dark:bg-primary-900/20 border border-primary-200 dark:border-primary-800"},Xl={class:"text-sm text-primary-700 dark:text-primary-300"},Gl={key:1,class:"text-xs text-primary-500"},Jl=["checked","onClick"],Yl={class:"flex items-center gap-2"},Wl=["href","onClick"],Zl={key:0,class:"text-xs text-gray-500 dark:text-gray-400 truncate max-w-32"},er={class:"inline-flex items-center gap-1"},tr={key:0,class:"flex items-center gap-1"},sr={class:"text-xs text-gray-600"},nr={key:0,class:"flex items-center gap-1 flex-wrap"},ar=["title","onClick"],or={key:1,class:"text-xs text-gray-500"},lr={class:"space-y-1"},rr={class:"flex justify-end gap-2"},ir={key:2,class:"text-center py-8 text-gray-500"},cr={class:"text-xs text-gray-400 max-w-sm"},ur={class:"bg-gray-100 dark:bg-gray-800 px-1 rounded"},dr={class:"flex flex-wrap items-center gap-3"},mr={class:"text-xl font-semibold inline-flex items-center gap-1"},pr={class:"font-medium"},gr={class:"mt-1"},fr={key:0,class:"text-red-600 font-medium"},_r={key:1,class:"text-green-600 font-medium"},vr={key:2,class:"text-gray-500"},yr={key:2,class:"text-center py-8 text-red-500"},hr={key:3,class:"text-center py-8 text-gray-500"},xr={class:"flex items-center justify-between"},br={class:"text-xl font-semibold inline-flex items-center gap-1"},kr={class:"space-y-4"},$r={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Cr={key:0,class:"text-center py-4 text-gray-500"},Tr={key:1,class:"space-y-4"},jr={class:"flex gap-4 text-sm"},Sr={key:0,class:"text-gray-400"},wr={key:0,class:"text-gray-400"},Rr={key:1,class:"text-gray-400"},Ar={key:1,class:"text-gray-400"},Dr={key:0,class:"text-gray-400"},zr={key:0,class:"text-gray-400"},Mr={key:2,class:"text-center py-8 text-gray-500"},Ir={key:3,class:"text-center py-8 text-gray-500"},Ur={class:"flex items-center justify-between"},Fr={class:"text-sm text-gray-600 inline-flex items-center gap-1"},Br={class:"space-y-4"},Er={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Pr={key:0,class:"text-center py-8 text-gray-500"},Nr={key:1,class:"space-y-4"},Vr={class:"space-y-2"},Lr={class:"flex flex-wrap gap-4 text-sm"},Or={key:3,class:"text-sm text-gray-500"},Kr={class:"flex flex-wrap gap-4 text-sm"},qr={key:0,class:"text-gray-400"},Hr={key:0,class:"text-gray-400"},Qr={key:1,class:"text-gray-400"},Xr={key:1,class:"text-gray-400"},Gr={key:0,class:"text-gray-400"},Jr={key:0,class:"text-gray-400"},Yr={key:2,class:"text-center py-8 text-gray-500"},Wr={key:3,class:"text-center py-8 text-gray-500"},Zr={class:"flex items-center justify-between"},ei={class:"text-sm text-gray-600 inline-flex items-center gap-1"},ti={key:0,class:"space-y-2"},si={class:"font-medium text-sm"},ni={class:"text-xs text-muted flex items-center gap-2"},ai={key:0,class:"italic"},oi={key:1,class:"text-xs text-muted italic"},li={key:1,class:"text-center py-8 text-muted text-sm"},ri={class:"space-y-4"},ii={class:"text-sm text-gray-600 dark:text-gray-400"},ci={class:"block text-sm font-medium mb-1"},ui={class:"bg-gray-100 dark:bg-gray-800 px-1 rounded"},gc=ue({__name:"index",async setup(D){let T,S;const x=Qs(),g=Xs(),f=x.params.id,{data:u,refresh:z}=([T,S]=ye(()=>he(`/api/projects/${f}`,"$F60FKvNOBL")),T=await T,S(),T);Gs(P(()=>({title:`${u.value?.label||u.value?.name||"Project"} — Piwi Dashboard`})));const O=Ue(),M=F(null),h=F(null),{isAdmin:A,isReporter:w}=Wt(),U=Ft(),m=P(()=>!U.public.authEnabled||A.value),p=m,_=F(!1),v=F(""),R=F(!1),I=P(()=>v.value===u.value?.name);async function B(){if(I.value){R.value=!0;try{await $fetch(`/api/projects/${f}`,{method:"DELETE"}),O.add({title:"Project deleted",color:"success"}),await Ys(),await g.push("/")}catch(c){const a=c&&typeof c=="object"&&"data"in c?c.data?.message:void 0;O.add({title:"Delete failed",description:a||"An error occurred",color:"error"}),R.value=!1}}}Dn(z);async function K(c){h.value=null,M.value=c;try{await $fetch(`/api/test-runs/${c}`,{method:"DELETE"}),O.add({title:"Test run deleted",color:"success"}),await z()}catch(a){const E=a&&typeof a=="object"&&"data"in a?a.data?.message:void 0;O.add({title:"Delete failed",description:E||"An error occurred",color:"error"})}finally{M.value=null}}const k=F([]),X=F([]),$=F([]),H=P(()=>{const c=new Map(k.value.map(E=>[E.id,E])),a=[];for(const E of X.value){if(E.role==="administrator")continue;const Z=c.get(E.id);a.push({id:E.id,username:E.username,name:E.name??null,role:E.role,global:Z?.global??!1,hasAccess:!!Z})}for(const E of k.value)E.role==="administrator"&&a.push({...E,hasAccess:!0});return a}),G=P(()=>{const c=k.value.filter(E=>E.role!=="administrator"&&!E.global).map(E=>E.id).sort(),a=[...$.value].sort();return JSON.stringify(c)!==JSON.stringify(a)});ge(()=>u.value?.id,async c=>{if(!(!c||!A.value))try{const[a,E]=await Promise.all([$fetch(`/api/projects/${f}/members`),$fetch("/api/users")]);k.value=a.items,X.value=E.items,$.value=a.items.filter(Z=>Z.role!=="administrator"&&!Z.global).map(Z=>Z.id)}catch{k.value=[],X.value=[],$.value=[]}},{immediate:!0});function b(c){const a=$.value.indexOf(c);a>=0?$.value.splice(a,1):$.value.push(c)}async function C(){try{await $fetch(`/api/projects/${f}/members`,{method:"PUT",body:{userIds:$.value}}),O.add({title:"Members updated",color:"success"});const c=await $fetch(`/api/projects/${f}/members`);k.value=c.items}catch(c){const a=c&&typeof c=="object"&&"data"in c?c.data?.message:void 0;O.add({title:"Update failed",description:a||"An error occurred",color:"error"})}}const J=F("test-runs"),de=F(0),fe=["test-runs","failure-clusters","flaky-tests","performance","test-cases","compare","spec-health","ai-steps","quarantine","timeline","members"],xe=x.query.tab;typeof xe=="string"&&fe.includes(xe)&&(J.value=xe),ge(J,c=>{x.query.tab!==c&&fe.includes(c)&&g.replace({query:{...x.query,tab:c}})});const qe=P(()=>u.value?.testRuns?.some(c=>c.failedTests>0)??!1),st=P(()=>[{label:"Results",items:[{label:`Test runs (${N.value.length})`,icon:"i-lucide-play-circle",value:"test-runs",slot:"test-runs"},{label:`Test cases${Je.value!=null?` (${Je.value})`:""}`,icon:"i-lucide-list-checks",value:"test-cases",slot:"test-cases"},{label:"Compare",icon:"i-lucide-git-compare-arrows",value:"compare",slot:"compare"}]},{label:"Failures",items:[...qe.value?[{label:"Failure clusters",icon:"i-lucide-layers",value:"failure-clusters",slot:"failure-clusters"}]:[],{label:"Flaky tests",icon:"i-lucide-shuffle",value:"flaky-tests",slot:"flaky-tests"},{label:"Quarantine",icon:"i-lucide-shield-alert",value:"quarantine",slot:"quarantine"}]},{label:"Health",items:[{label:"Spec health",icon:"i-lucide-table-2",value:"spec-health",slot:"spec-health"},{label:"AI steps",icon:"i-lucide-wand-sparkles",value:"ai-steps",slot:"ai-steps"},{label:"Performance",icon:"i-lucide-trending-up",value:"performance",slot:"performance"},{label:`Timeline${Se.value.length?` (${Se.value.length})`:""}`,icon:"i-lucide-milestone",value:"timeline",slot:"timeline"}]},...A.value?[{label:"Admin",items:[{label:"Members",icon:"i-lucide-users",value:"members",slot:"members"}]}]:[]]),He=P(()=>st.value.flatMap(c=>c.items)),_t=P(()=>st.value.map(c=>c.items).filter(c=>c.length>0)),be=P(()=>He.value.find(c=>c.value===J.value)?.icon),W=F([]),ke=c=>W.value.includes(c);function Qe(c){const a=W.value.indexOf(c);if(a>=0)W.value.splice(a,1);else{if(W.value.length>=2){O.add({title:"Maximum 2 runs",description:"Select at most 2 runs to compare. Deselect one first.",color:"warning"});return}W.value.push(c)}}const Xe=F(null);function vt(){W.value.length===2&&(Xe.value=[W.value[0],W.value[1]],J.value="compare")}const re=F([]),$e=F(!0),De=P(()=>{const c=new Set;for(const a of u.value?.testRuns||[])a.environment&&c.add(a.environment);return[...c].sort()});function yt(c){const a=re.value.indexOf(c);a===-1?re.value.push(c):re.value.splice(a,1)}function ht(c){return re.value.includes(c)}function _e(c){return c.branch??c.metadata?.scm?.branch??null}const ie=F([]),nt=P(()=>{const c=new Set;for(const a of u.value?.testRuns||[]){const E=_e(a);E&&c.add(E)}return[...c].sort()});function at(c){const a=ie.value.indexOf(c);a===-1?ie.value.push(c):ie.value.splice(a,1)}function Pe(c){return ie.value.includes(c)}const N=P(()=>{let c=u.value?.testRuns||[];return $e.value&&(c=c.filter(a=>a.isFullRun!==!1)),re.value.length>0&&(c=c.filter(a=>a.environment&&re.value.includes(a.environment))),ie.value.length>0&&(c=c.filter(a=>{const E=_e(a);return E!==null&&ie.value.includes(E)})),c}),V=P(()=>re.value.length===1?re.value[0]:void 0),ne=P(()=>ie.value.length===1?ie.value[0]:void 0),{data:xt,refresh:bt}=([T,S]=ye(()=>he(`/api/projects/${f}/markers`,{default:()=>({items:[]})},"$jubPXy8o3y")),T=await T,S(),T),Se=P(()=>xt.value?.items??[]),kt=P(()=>!U.public.authEnabled||A.value||w.value),Ge=P(()=>re.value.length===0?Se.value:Se.value.filter(c=>c.environment==null||re.value.includes(c.environment))),we=F(null);function ot(c){we.value=c,J.value="timeline"}function Q(c){if(c.isFullRun!==!1)return"Full run — the complete test suite ran";const a=[],E=c.filterDetails?.grep?.trim(),Z=c.filterDetails?.grepInvert?.trim(),ve=c.filterDetails?.files;return E&&E!==".*"&&a.push(`grep: ${E}`),Z&&a.push(`grep-invert: ${Z}`),ve?.length&&a.push(`files: ${ve.join(", ")}`),a.length?`Partial run — ${a.join(" · ")}`:"Partial run — only a filtered subset of tests ran (grep, file, or line filter)"}const me=[{accessorKey:"select",header:""},{accessorKey:"id",header:L("Run")},{accessorKey:"status",header:L("Status")},{accessorKey:"isFullRun",header:"Scope"},{id:"browsers",accessorFn:c=>c.browsers,header:""},{accessorKey:"startTime",header:L("Started")},{accessorKey:"environment",header:L("Environment")},{accessorKey:"metadata",header:"Branch / Commit"},{accessorKey:"duration",header:L("Test status / Dur.")},{accessorKey:"reports",header:"Reports"},{id:"actions",header:"Actions"}],Je=F(null),ze=F(""),Me=F(""),ps=P(()=>{const c={};return ze.value&&(c.from=ze.value),Me.value&&(c.to=Me.value),c}),$t=F(null),Ct=F(!1),Ne=F(null),Tt=F(!1),lt=F(!1),gs=P(()=>Ct.value&&$t.value===null);ge([J,ps,$e],async([c,a])=>{if(c!=="performance")return;Ct.value=!0,Ne.value||(lt.value=!0);const E=new URLSearchParams(a).toString(),Z=$e.value?`${E?"&":""}fullRunsOnly=true`:"",ve=E||Z?`?${E}${Z}`:"",Re=await $fetch(`/api/projects/${f}/performance${ve}`).catch(Ye=>(console.warn("[PerformanceTab] Failed to fetch performance trend:",Ye),null));if($t.value=Re?.items??null,Ct.value=!1,lt.value){Tt.value=!1;const Ye=await $fetch(`/api/projects/${f}/slow-tests`).catch(wt=>(Tt.value=!0,console.warn("[PerformanceTab] Failed to fetch slow tests:",wt),null));Ne.value=Ye?.items??null,lt.value=!1}},{immediate:!0});const fs=[{accessorKey:"title",header:L("Test case")},{accessorKey:"avgDuration",header:L("Avg duration")},{accessorKey:"maxDuration",header:L("Max")},{accessorKey:"minDuration",header:L("Min")},{accessorKey:"latestDuration",header:L("Latest")},{accessorKey:"trend",header:L("Trend")},{accessorKey:"runCount",header:L("Runs")}];function _s(c){const a=gt(c.startTime,{dateOnly:!0}),E=c.metadata?.scm?.commit?` (${c.metadata.scm.commit.substring(0,7)})`:"";return`Run #${c.id} — ${a}${E}`}const pe=P(()=>u.value?.testRuns?[...u.value.testRuns].reverse().map(c=>({label:_s(c),value:c.id})):[]),ae=F(void 0),oe=F(void 0),Lt=P(()=>x.query.runA?Number(x.query.runA):null),Ot=P(()=>x.query.runB?Number(x.query.runB):null);ge(pe,c=>{if(Lt.value){const a=c.find(E=>E.value===Lt.value);a&&(ae.value=a)}if(Ot.value){const a=c.find(E=>E.value===Ot.value);a&&(oe.value=a)}},{immediate:!0}),ge(Xe,c=>{if(c){const a=pe.value.find(Z=>Z.value===c[0]),E=pe.value.find(Z=>Z.value===c[1]);a&&(ae.value=a),E&&(oe.value=E),Xe.value=null}});function Kt(){pe.value.length>=2&&(ae.value=pe.value[1],oe.value=pe.value[0])}const jt=F(null),St=F(null),rt=F(!1);async function vs(){const c=ae.value,a=oe.value;if(!(!c?.value&&!a?.value)){rt.value=!0;try{const E=[];c?.value&&E.push(c.value),a?.value&&E.push(a.value);const Z=await Promise.all(E.map(Re=>$fetch(`/api/test-runs/${Re}/summary`))),ve=new Map;for(const Re of Z)ve.set(Re.id,Re);jt.value=c?.value?ve.get(c.value)??null:null,St.value=a?.value?ve.get(a.value)??null:null}catch{jt.value=null,St.value=null}finally{rt.value=!1}}}ge([ae,oe],()=>{vs()});const{comparisonData:it,comparisonSummary:te}=An(jt,St),qt=[{accessorKey:"title",header:L("Test case")},{accessorKey:"statusA",header:L("Status A")},{accessorKey:"statusB",header:L("Status B")},{accessorKey:"durationA",header:L("Duration A")},{accessorKey:"durationB",header:L("Duration B")},{accessorKey:"delta",header:L("Delta")},{accessorKey:"percentChange",header:L("Change")}];return(c,a)=>{const E=Os,Z=Ks,ve=oa,Re=tn,Ye=nn,wt=ts,ys=da,hs=Fe,xs=rn,Ve=et,ce=Te,bs=ba,Ht=un,ks=dn,Rt=Le,$s=us,Cs=mn,le=Ae,Ts=pn,Ie=gn,js=fn,ct=Ee,Ss=Zs,ws=je,We=Be,Rs=Da,As=qa,Ds=io,At=Zt,Qt=tt,zs=bo,Ms=ft,Is=zo,ut=xn,Us=bn,Fs=No,Bs=tl,Es=vl,Ps=Tn,Ns=El,Vs=Rn,Ls=sn,Xt=Vt,Gt=Et;return t(),r(q,null,[l(Ls,{id:"project-detail"},{header:s(()=>[l(Ye,null,{leading:s(()=>[l(E),l(Z,{items:[{label:"Home",icon:"i-lucide-house",to:"/"},{label:"Projects",to:"/projects"},{label:e(u)?.label||e(u)?.name||"Project"}]},null,8,["items"])]),right:s(()=>[l(Re,{size:"sm",actions:[...e(m)?[{label:"Delete",icon:"i-lucide-trash-2",color:"error",variant:"ghost",onClick:()=>{v.value="",_.value=!0}}]:[],...e(p)?[{label:"Import",icon:"i-lucide-import",variant:"outline",to:`/projects/${e(f)}/import`}]:[],{label:"Test functions",icon:"i-lucide-function-square",variant:"outline",to:`/projects/${e(f)}/test-functions`},{label:"Selections",icon:"i-lucide-list-filter",variant:"outline",to:`/projects/${e(f)}/selections`},{label:"Edit",icon:"i-lucide-pencil",variant:"outline",to:`/projects/${e(f)}/edit`},{label:"Refresh",icon:"i-lucide-refresh-cw",variant:"outline",onClick:()=>e(z)()}]},{leading:s(()=>[l(ve,{"project-id":parseInt(e(f)),"project-label":e(u)?.label||e(u)?.name},null,8,["project-id","project-label"])]),_:1},8,["actions"])]),_:1})]),body:s(()=>[n("div",Pl,[e(u)?.description||e(u)?.tags&&e(u).tags.length>0?(t(),r("div",Nl,[e(u)?.description?(t(),r("p",Vl,i(e(u).description),1)):j("",!0),e(u)?.tags&&e(u).tags.length>0?(t(),r("div",Ll,[(t(!0),r(q,null,Y(e(u).tags,o=>(t(),y(wt,{key:o.id,text:o.text,color:o.color},null,8,["text","color"]))),128))])):j("",!0)])):j("",!0),l(ys,{"project-id":e(f)},null,8,["project-id"]),l(hs,{modelValue:e(J),"onUpdate:modelValue":a[0]||(a[0]=o=>ee(J)?J.value=o:null),items:e(_t),icon:e(be),size:"md",class:"w-full mx-1 mb-1 sm:hidden"},null,8,["modelValue","items","icon"]),l(Vs,{modelValue:e(J),"onUpdate:modelValue":a[15]||(a[15]=o=>ee(J)?J.value=o:null),items:e(He),size:"sm",class:"p-1",ui:{list:"max-sm:hidden overflow-x-auto",trigger:"shrink-0"}},{"test-runs":s(()=>[n("div",Ol,[n("div",Kl,[l(xs,{modelValue:e($e),"onUpdate:modelValue":a[1]||(a[1]=o=>ee($e)?$e.value=o:null),label:"Full runs only",ui:{label:"text-sm"}},null,8,["modelValue"]),l(Ve,{topic:"project.run-scope"})]),e(De).length>0?(t(),r(q,{key:0},[a[22]||(a[22]=n("span",{class:"text-sm text-muted shrink-0"},"Environment:",-1)),(t(!0),r(q,null,Y(e(De),o=>(t(),r("button",{key:o,type:"button",class:se(["text-xs font-medium px-2 py-1 rounded border cursor-pointer focus:outline-none transition-colors",ht(o)?"bg-blue-100 text-blue-700 border-blue-300 dark:bg-blue-900/40 dark:text-blue-300 dark:border-blue-700":"bg-zinc-100 text-zinc-500 border-zinc-200 hover:bg-zinc-200 dark:bg-zinc-800 dark:text-zinc-400 dark:border-zinc-700 dark:hover:bg-zinc-700"]),onClick:Ce=>yt(o)},i(o),11,ql))),128)),e(re).length>0?(t(),y(ce,{key:0,size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-x",label:"Clear filter",onClick:a[2]||(a[2]=o=>re.value=[])})):j("",!0)],64)):j("",!0),e(nt).length>0?(t(),r(q,{key:1},[a[23]||(a[23]=n("span",{class:"text-sm text-muted shrink-0"},"Branch:",-1)),(t(!0),r(q,null,Y(e(nt),o=>(t(),r("button",{key:o,type:"button",title:o,class:se(["text-xs font-medium px-2 py-1 rounded border cursor-pointer focus:outline-none transition-colors max-w-[12rem] truncate",Pe(o)?"bg-blue-100 text-blue-700 border-blue-300 dark:bg-blue-900/40 dark:text-blue-300 dark:border-blue-700":"bg-zinc-100 text-zinc-500 border-zinc-200 hover:bg-zinc-200 dark:bg-zinc-800 dark:text-zinc-400 dark:border-zinc-700 dark:hover:bg-zinc-700"]),onClick:Ce=>at(o)},i(o),11,Hl))),128)),e(ie).length>0?(t(),y(ce,{key:0,size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-x",label:"Clear filter",onClick:a[3]||(a[3]=o=>ie.value=[])})):j("",!0)],64)):j("",!0)]),e(N).length>0?(t(),y(Ht,{key:0,title:"Run trend",subtitle:"One bar per run, newest on the right",help:"project.runs-trend",legend:e(Yt)(e(ns)),"data-shot":"run-trend"},{default:s(()=>[l(bs,{"test-runs":e(N),markers:e(Ge),onMarkerClick:ot},null,8,["test-runs","markers"])]),_:1},8,["legend"])):j("",!0),l(We,{class:"mt-4"},{default:s(()=>[e(W).length>0?(t(),r("div",Ql,[n("span",Xl,i(e(W).length)+" run"+i(e(W).length>1?"s":"")+" selected ",1),e(W).length===2?(t(),y(ce,{key:0,icon:"i-lucide-git-compare-arrows",size:"sm",color:"primary",label:"Compare selected runs",onClick:vt})):(t(),r("span",Gl," Select another run to compare ")),l(ce,{size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-x",label:"Clear",onClick:a[4]||(a[4]=o=>W.value=[])})])):j("",!0),e(N).length>0?(t(),y(ct,{key:1,data:e(N),columns:me,ui:{base:"table-fixed border-separate border-spacing-0",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"}},{"select-cell":s(({row:o})=>[n("input",{type:"checkbox",checked:ke(o.original.id),class:"cursor-pointer size-4 accent-primary",onClick:Jt(Ce=>Qe(o.original.id),["stop"])},null,8,Jl)]),"id-cell":s(({row:o})=>[n("div",Yl,[n("a",{href:`/test-runs/${o.original.id}`,class:"text-primary hover:underline font-medium",onClick:Jt(Ce=>("navigateTo"in c?c.navigateTo:e(Bt))(`/test-runs/${o.original.id}`),["prevent"])}," Run #"+i(o.original.id),9,Wl),o.original.label?(t(),r("span",Zl,i(o.original.label),1)):j("",!0)])]),"status-cell":s(({row:o})=>[l(ks,{status:o.original.status},null,8,["status"])]),"isFullRun-header":s(()=>[n("span",er,[a[24]||(a[24]=d("Scope ",-1)),l(Ve,{topic:"run.partial"})])]),"isFullRun-cell":s(({row:o})=>[l($s,{text:Q(o.original)},{default:s(()=>[l(Rt,{name:o.original.isFullRun===!1?"i-lucide-list-filter":"i-lucide-list-checks",class:se(["size-4 shrink-0 cursor-help",o.original.isFullRun===!1?"text-amber-500":"text-green-500"])},null,8,["name","class"])]),_:2},1032,["text"])]),"browsers-cell":s(({row:o})=>[o.original.browsers?.length?(t(),r("div",tr,[(t(!0),r(q,null,Y(o.original.browsers,Ce=>(t(),y(Cs,{key:Ce,browser:{projectName:Ce},size:"sm"},null,8,["browser"]))),128))])):j("",!0)]),"startTime-cell":s(({row:o})=>[n("span",sr,i(("prettyDateFormat"in c?c.prettyDateFormat:e(gt))(o.original.startTime)),1)]),"environment-cell":s(({row:o})=>[o.original.environment?(t(),y(le,{key:0,color:"info",variant:"subtle",size:"sm"},{default:s(()=>[d(i(o.original.environment),1)]),_:2},1024)):j("",!0)]),"metadata-cell":s(({row:o})=>[_e(o.original)||o.original.metadata?.scm?.commit?(t(),r("div",nr,[_e(o.original)?(t(),r("button",{key:0,type:"button",title:`Filter runs on ${_e(o.original)}`,class:se(["text-xs font-medium px-1.5 py-0.5 rounded cursor-pointer transition-colors max-w-[12rem] truncate",Pe(_e(o.original))?"bg-blue-100 text-blue-700 dark:bg-blue-900/40 dark:text-blue-300":"bg-gray-100 dark:bg-gray-800 hover:bg-gray-200 dark:hover:bg-gray-700"]),onClick:Ce=>at(_e(o.original))},i(_e(o.original)),11,ar)):j("",!0),o.original.metadata?.scm?.commit?(t(),r("code",or,i(o.original.metadata.scm.commit.substring(0,7)),1)):j("",!0)])):j("",!0)]),"duration-cell":s(({row:o})=>[n("div",lr,[l(Ts,{passed:o.original.passedTests,failed:o.original.failedTests,skipped:o.original.skippedTests,flaky:o.original.flakyTests,"did-not-run":o.original.didNotRunTests??0,total:o.original.totalTests},null,8,["passed","failed","skipped","flaky","did-not-run","total"]),l(Ie,{ms:o.original.duration,class:"text-xs text-gray-500"},null,8,["ms"])])]),"reports-cell":s(({row:o})=>[l(js,{reports:o.original.reports},null,8,["reports"])]),"actions-header":s(()=>[...a[25]||(a[25]=[n("div",{class:"text-right"},"Actions",-1)])]),"actions-cell":s(({row:o})=>[n("div",rr,[l(ce,{to:`/test-runs/${o.original.id}`,size:"sm",variant:"outline"},{default:s(()=>[...a[26]||(a[26]=[d(" View ",-1)])]),_:1},8,["to"]),l(ce,{size:"sm",color:"error",variant:"soft",icon:"i-lucide-trash-2",loading:e(M)===o.original.id,onClick:Ce=>h.value=o.original.id},{default:s(()=>[...a[27]||(a[27]=[d(" Delete ",-1)])]),_:1},8,["loading","onClick"])])]),_:1},8,["data"])):e(u)?.testRuns&&e(u).testRuns.length>0?(t(),r("div",ir," No test runs match the selected environment filter. ")):(t(),y(ws,{key:3,icon:"i-lucide-rocket",text:"No test runs yet for this project."},{default:s(()=>[n("p",cr,[a[29]||(a[29]=d(" Point the reporter's ",-1)),a[30]||(a[30]=n("code",{class:"bg-gray-100 dark:bg-gray-800 px-1 rounded"},"projectName",-1)),a[31]||(a[31]=d(" at ",-1)),n("code",ur,i(e(u)?.name),1),a[32]||(a[32]=d(" to send results here — see the ",-1)),l(Ss,{to:"reporter","no-icon":"",class:"text-primary hover:underline"},{default:s(()=>[...a[28]||(a[28]=[d("reporter docs",-1)])]),_:1}),a[33]||(a[33]=d(" for setup instructions. ",-1))])]),_:1}))]),_:1})]),"failure-clusters":s(()=>[e(J)==="failure-clusters"?(t(),r(q,{key:0},[(t(),y(Rs,{key:`sug-${e(de)}`,"project-id":String(e(f)),onMerged:a[5]||(a[5]=o=>de.value++)},null,8,["project-id"])),(t(),y(As,{key:e(de),"project-id":String(e(f))},null,8,["project-id"]))],64)):j("",!0)]),"flaky-tests":s(()=>[e(J)==="flaky-tests"?(t(),y(Ds,{key:0,"project-id":String(e(f)),environment:e(V),branch:e(ne),"project-name":e(u)?.name},null,8,["project-id","environment","branch","project-name"])):j("",!0)]),performance:s(()=>[n("div",dr,[a[34]||(a[34]=n("span",{class:"text-sm text-muted shrink-0"},"Date range:",-1)),l(At,{modelValue:e(ze),"onUpdate:modelValue":a[6]||(a[6]=o=>ee(ze)?ze.value=o:null),type:"date",size:"sm",placeholder:"From",class:"w-40"},null,8,["modelValue"]),a[35]||(a[35]=n("span",{class:"text-sm text-muted"},"to",-1)),l(At,{modelValue:e(Me),"onUpdate:modelValue":a[7]||(a[7]=o=>ee(Me)?Me.value=o:null),type:"date",size:"sm",placeholder:"To",class:"w-40"},null,8,["modelValue"]),e(ze)||e(Me)?(t(),y(ce,{key:0,size:"xs",variant:"ghost",color:"neutral",icon:"i-lucide-x",label:"Clear",onClick:a[8]||(a[8]=o=>{ze.value="",Me.value=""})})):j("",!0)]),l(Ht,{title:"Performance trend",subtitle:"Duration metrics per run, newest on the right",help:"project.performance",legend:e(Yt)(e(Ut)),"data-shot":"performance-trend"},{default:s(()=>[e(gs)?(t(),y(Qt,{key:0,text:"Loading chart…"})):(t(),y(zs,{key:1,data:e($t)||[],markers:e(Ge),onMarkerClick:ot},null,8,["data","markers"]))]),_:1},8,["legend"]),l(We,{"data-shot":"slowest-tests"},{header:s(()=>[n("h2",mr,[a[36]||(a[36]=d(" Slowest tests ",-1)),l(Ve,{topic:"project.slowest-tests"})]),a[37]||(a[37]=n("p",{class:"text-sm text-gray-600 mt-1"},"Top 20 slowest test cases across recent runs",-1))]),default:s(()=>[e(lt)&&e(Ne)===null?(t(),y(Qt,{key:0,text:"Loading…"})):e(Ne)&&e(Ne).length>0?(t(),y(ct,{key:1,data:e(Ne),columns:fs,ui:{base:"table-fixed border-separate border-spacing-0",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"}},{"title-cell":s(({row:o})=>[n("div",null,[n("div",pr,i(o.original.title),1),n("div",gr,[l(Ms,{"file-path":o.original.filePath,"project-key":e(f),"project-name":e(u)?.name,class:"text-xs"},null,8,["file-path","project-key","project-name"])])])]),"trend-cell":s(({row:o})=>[o.original.trend==="slower"?(t(),r("span",fr,"▲ Slower")):o.original.trend==="faster"?(t(),r("span",_r,"▼ Faster")):(t(),r("span",vr,"— Stable"))]),_:1},8,["data"])):e(Tt)?(t(),r("div",yr," Couldn't load the slowest tests — try refreshing. ")):(t(),r("div",hr,"No slow test data available yet."))]),_:1}),l(Is,{"project-id":String(e(f)),"project-name":e(u)?.name},null,8,["project-id","project-name"]),l(We,null,{header:s(()=>[n("div",xr,[n("div",null,[n("h2",br,[a[38]||(a[38]=d(" Run comparison ",-1)),l(Ve,{topic:"project.run-compare"})]),a[39]||(a[39]=n("p",{class:"text-sm text-gray-600 mt-1"},"Compare duration changes between two runs",-1))]),e(pe).length>=2?(t(),y(ce,{key:0,icon:"i-lucide-git-compare-arrows",size:"sm",variant:"outline",label:"Compare latest vs previous",onClick:Kt})):j("",!0)])]),default:s(()=>[n("div",kr,[n("div",$r,[n("div",null,[a[40]||(a[40]=n("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Run A (baseline)",-1)),l(ut,{modelValue:e(ae),"onUpdate:modelValue":a[9]||(a[9]=o=>ee(ae)?ae.value=o:null),items:e(pe),placeholder:"Select run A..."},null,8,["modelValue","items"])]),n("div",null,[a[41]||(a[41]=n("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Run B (comparison)",-1)),l(ut,{modelValue:e(oe),"onUpdate:modelValue":a[10]||(a[10]=o=>ee(oe)?oe.value=o:null),items:e(pe),placeholder:"Select run B..."},null,8,["modelValue","items"])])]),e(rt)?(t(),r("div",Cr,[l(Rt,{name:"i-lucide-loader-2",class:"animate-spin mr-2"}),a[42]||(a[42]=d(" Loading run data… ",-1))])):e(ae)&&e(oe)&&e(it).length>0?(t(),r("div",Tr,[n("div",jr,[l(le,{color:"success",variant:"soft",size:"lg"},{default:s(()=>[d(i(e(te).improved)+" improved",1)]),_:1}),l(le,{color:"error",variant:"soft",size:"lg"},{default:s(()=>[d(i(e(te).regressed)+" regressed",1)]),_:1}),l(le,{color:"neutral",variant:"soft",size:"lg"},{default:s(()=>[d(i(e(te).unchanged)+" unchanged",1)]),_:1})]),l(ct,{data:e(it),columns:qt,ui:{base:"table-fixed border-separate border-spacing-0",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":s(({row:o})=>[o.original.statusA?(t(),y(le,{key:1,color:("getStatusColor"in c?c.getStatusColor:e(dt))(o.original.statusA),variant:"subtle",class:"capitalize"},{default:s(()=>[d(i(o.original.statusA),1)]),_:2},1032,["color"])):(t(),r("span",Sr,"—"))]),"statusB-cell":s(({row:o})=>[o.original.statusB?(t(),y(le,{key:1,color:("getStatusColor"in c?c.getStatusColor:e(dt))(o.original.statusB),variant:"subtle",class:"capitalize"},{default:s(()=>[d(i(o.original.statusB),1)]),_:2},1032,["color"])):(t(),r("span",wr,"—"))]),"durationA-cell":s(({row:o})=>[o.original.durationA!==null?(t(),y(Ie,{key:0,ms:o.original.durationA},null,8,["ms"])):(t(),r("span",Rr,"—"))]),"durationB-cell":s(({row:o})=>[o.original.durationB!==null?(t(),y(Ie,{key:0,ms:o.original.durationB},null,8,["ms"])):(t(),r("span",Ar,"—"))]),"delta-cell":s(({row:o})=>[o.original.delta===null?(t(),r("span",Dr,"—")):(t(),r("span",{key:1,class:se(o.original.delta>0?"text-red-600":o.original.delta<0?"text-green-600":"text-gray-500")},[d(i(o.original.delta>0?"+":""),1),l(Ie,{ms:o.original.delta,"unit-class":"opacity-60"},null,8,["ms"])],2))]),"percentChange-cell":s(({row:o})=>[o.original.percentChange===null?(t(),r("span",zr,"—")):(t(),r("span",{key:1,class:se(o.original.percentChange>10?"text-red-600 font-medium":o.original.percentChange<-10?"text-green-600 font-medium":"text-gray-500")},i(o.original.percentChange>0?"+":"")+i(o.original.percentChange)+"% ",3))]),_:1},8,["data"])])):!e(ae)||!e(oe)?(t(),r("div",Mr," Select two runs to compare their performance. ")):(t(),r("div",Ir," No overlapping test cases found between the selected runs. "))])]),_:1})]),"test-cases":s(()=>[l(Us,{"project-id":e(f),"project-name":e(u)?.name,"sync-query":"",onTotal:a[11]||(a[11]=o=>Je.value=o)},null,8,["project-id","project-name"])]),compare:s(()=>[l(We,null,{header:s(()=>[n("div",Ur,[n("p",Fr,[a[43]||(a[43]=d(" Compare two test runs side-by-side — status changes and duration deltas ",-1)),l(Ve,{topic:"project.compare"})]),e(pe).length>=2?(t(),y(ce,{key:0,icon:"i-lucide-git-compare-arrows",size:"sm",variant:"outline",label:"Latest vs previous",onClick:Kt})):j("",!0)])]),default:s(()=>[n("div",Br,[n("div",Er,[n("div",null,[a[44]||(a[44]=n("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Run A (baseline)",-1)),l(ut,{modelValue:e(ae),"onUpdate:modelValue":a[12]||(a[12]=o=>ee(ae)?ae.value=o:null),items:e(pe),placeholder:"Select run A..."},null,8,["modelValue","items"])]),n("div",null,[a[45]||(a[45]=n("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Run B (comparison)",-1)),l(ut,{modelValue:e(oe),"onUpdate:modelValue":a[13]||(a[13]=o=>ee(oe)?oe.value=o:null),items:e(pe),placeholder:"Select run B..."},null,8,["modelValue","items"])])]),e(rt)?(t(),r("div",Pr,[l(Rt,{name:"i-lucide-loader-2",class:"animate-spin mr-2"}),a[46]||(a[46]=d(" Loading run data… ",-1))])):e(ae)&&e(oe)&&e(it).length>0?(t(),r("div",Nr,[n("div",Vr,[n("div",Lr,[a[47]||(a[47]=n("span",{class:"text-xs font-semibold text-gray-500 uppercase tracking-wider mr-1"},"Status changes",-1)),e(te).newFailures>0?(t(),y(le,{key:0,color:"error",variant:"soft",size:"lg"},{default:s(()=>[d(i(e(te).newFailures)+" new failure"+i(e(te).newFailures>1?"s":""),1)]),_:1})):j("",!0),e(te).recovered>0?(t(),y(le,{key:1,color:"success",variant:"soft",size:"lg"},{default:s(()=>[d(i(e(te).recovered)+" recovered ",1)]),_:1})):j("",!0),e(te).stillFailing>0?(t(),y(le,{key:2,color:"warning",variant:"soft",size:"lg"},{default:s(()=>[d(i(e(te).stillFailing)+" still failing ",1)]),_:1})):j("",!0),e(te).newFailures===0&&e(te).recovered===0&&e(te).stillFailing===0?(t(),r("span",Or,"No status changes")):j("",!0)]),n("div",Kr,[a[48]||(a[48]=n("span",{class:"text-xs font-semibold text-gray-500 uppercase tracking-wider mr-1"},"Duration changes",-1)),e(te).regressed>0?(t(),y(le,{key:0,color:"error",variant:"soft",size:"lg"},{default:s(()=>[d(i(e(te).regressed)+" regressed ",1)]),_:1})):j("",!0),e(te).improved>0?(t(),y(le,{key:1,color:"success",variant:"soft",size:"lg"},{default:s(()=>[d(i(e(te).improved)+" improved ",1)]),_:1})):j("",!0),l(le,{color:"neutral",variant:"soft",size:"lg"},{default:s(()=>[d(i(e(te).unchanged)+" unchanged ",1)]),_:1})])]),l(ct,{data:e(it),columns:qt,ui:{base:"table-fixed border-separate border-spacing-0",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":s(({row:o})=>[o.original.statusA?(t(),y(le,{key:1,color:("getStatusColor"in c?c.getStatusColor:e(dt))(o.original.statusA),variant:"subtle",class:"capitalize"},{default:s(()=>[d(i(o.original.statusA),1)]),_:2},1032,["color"])):(t(),r("span",qr,"—"))]),"statusB-cell":s(({row:o})=>[o.original.statusB?(t(),y(le,{key:1,color:("getStatusColor"in c?c.getStatusColor:e(dt))(o.original.statusB),variant:"subtle",class:"capitalize"},{default:s(()=>[d(i(o.original.statusB),1)]),_:2},1032,["color"])):(t(),r("span",Hr,"—"))]),"durationA-cell":s(({row:o})=>[o.original.durationA!==null?(t(),y(Ie,{key:0,ms:o.original.durationA},null,8,["ms"])):(t(),r("span",Qr,"—"))]),"durationB-cell":s(({row:o})=>[o.original.durationB!==null?(t(),y(Ie,{key:0,ms:o.original.durationB},null,8,["ms"])):(t(),r("span",Xr,"—"))]),"delta-cell":s(({row:o})=>[o.original.delta===null?(t(),r("span",Gr,"—")):(t(),r("span",{key:1,class:se(o.original.delta>0?"text-red-600":o.original.delta<0?"text-green-600":"text-gray-500")},[d(i(o.original.delta>0?"+":""),1),l(Ie,{ms:o.original.delta,"unit-class":"opacity-60"},null,8,["ms"])],2))]),"percentChange-cell":s(({row:o})=>[o.original.percentChange===null?(t(),r("span",Jr,"—")):(t(),r("span",{key:1,class:se(o.original.percentChange>10?"text-red-600 font-medium":o.original.percentChange<-10?"text-green-600 font-medium":"text-gray-500")},i(o.original.percentChange>0?"+":"")+i(o.original.percentChange)+"% ",3))]),_:1},8,["data"])])):!e(ae)||!e(oe)?(t(),r("div",Yr," Select two runs to compare test results. ")):(t(),r("div",Wr," No overlapping test cases found between the selected runs. "))])]),_:1})]),"spec-health":s(()=>[l(Fs,{"project-id":String(e(f))},null,8,["project-id"])]),"ai-steps":s(()=>[l(Bs,{"project-id":String(e(f))},null,8,["project-id"])]),quarantine:s(()=>[l(Es,{"project-id":String(e(f)),"project-name":e(u)?.name},null,8,["project-id","project-name"])]),members:s(()=>[l(We,null,{header:s(()=>[n("div",Zr,[n("p",ei,[a[49]||(a[49]=d(" Users with access to this project ",-1)),l(Ve,{topic:"project.members"})]),l(ce,{label:"Save changes",icon:"i-lucide-check",size:"sm",disabled:!e(G),onClick:C},null,8,["disabled"])])]),default:s(()=>[e(H).length>0?(t(),r("div",ti,[(t(!0),r(q,null,Y(e(H),o=>(t(),r("div",{key:o.id,class:"flex items-center justify-between rounded-lg border border-default px-4 py-3"},[n("div",null,[n("div",si,i(o.name||o.username),1),n("div",ni,[n("span",null,"@"+i(o.username),1),l(le,{color:o.role==="administrator"?"primary":o.role==="reporter"?"info":"neutral",variant:"subtle",size:"xs"},{default:s(()=>[d(i(o.role),1)]),_:2},1032,["color"]),o.global?(t(),r("span",ai,"Global access")):j("",!0)])]),o.role!=="administrator"?(t(),y(Ps,{key:0,"model-value":e($).includes(o.id),disabled:o.global,title:o.global?"Has global access — remove global assignment first":"",onChange:Ce=>b(o.id)},null,8,["model-value","disabled","title","onChange"])):(t(),r("span",oi,"Admin"))]))),128))])):(t(),r("div",li,"Loading members…"))]),_:1})]),timeline:s(()=>[l(Ns,{"project-id":Number(e(f)),markers:e(Se),environments:e(De),"can-edit":e(kt),"focus-marker-id":e(we),onChanged:e(bt),onClearFocus:a[14]||(a[14]=o=>we.value=null)},null,8,["project-id","markers","environments","can-edit","focus-marker-id","onChanged"])]),_:1},8,["modelValue","items"])])]),_:1}),l(Gt,null,{default:s(()=>[l(Xt,{open:e(_),title:"Delete project","onUpdate:open":a[18]||(a[18]=o=>{o||(_.value=!1)})},{body:s(()=>[n("div",ri,[n("p",ii,[a[50]||(a[50]=d(" This will permanently delete ",-1)),n("strong",null,i(e(u)?.label||e(u)?.name),1),a[51]||(a[51]=d(" and all its test runs, reports, traces, and failure clusters. This action cannot be undone. ",-1))]),n("div",null,[n("label",ci,[a[52]||(a[52]=d(" Type the project key ",-1)),n("code",ui,i(e(u)?.name),1),a[53]||(a[53]=d(" to confirm: ",-1))]),l(At,{modelValue:e(v),"onUpdate:modelValue":a[16]||(a[16]=o=>ee(v)?v.value=o:null),placeholder:e(u)?.name,autofocus:"",onKeydown:Js(B,["enter"])},null,8,["modelValue","placeholder"])])])]),footer:s(()=>[l(ce,{color:"neutral",variant:"ghost",label:"Cancel",onClick:a[17]||(a[17]=o=>_.value=!1)}),l(ce,{color:"error",label:"Delete project",icon:"i-lucide-trash-2",disabled:!e(I),loading:e(R),onClick:B},null,8,["disabled","loading"])]),_:1},8,["open"])]),_:1}),l(Gt,null,{default:s(()=>[l(Xt,{open:e(h)!==null,title:"Delete test run","onUpdate:open":a[21]||(a[21]=o=>{o||(h.value=null)})},{body:s(()=>[n("p",null,[a[54]||(a[54]=d(" Are you sure you want to delete ",-1)),n("strong",null,"Run #"+i(e(h)),1),a[55]||(a[55]=d("? This will also remove all associated test results, reports, and traces. This action cannot be undone. ",-1))])]),footer:s(()=>[l(ce,{color:"neutral",variant:"ghost",label:"Cancel",onClick:a[19]||(a[19]=o=>h.value=null)}),l(ce,{color:"error",label:"Delete",icon:"i-lucide-trash-2",loading:e(M)===e(h),onClick:a[20]||(a[20]=o=>K(e(h)))},null,8,["loading"])]),_:1},8,["open"])]),_:1})],64)}}});export{gc as default};
@@ -1 +0,0 @@
1
- import{d as m,b as r,o as a,e as _,f as g,h as b,_ as v,a1 as w,i as x,c as $,v as t}from"./BdQ7kfxJ.js";import{_ as S}from"./C_eXufkv.js";import{E as C,F as z}from"./DwZS0oRm.js";const k={key:1,class:"text-xs text-gray-400 dark:text-gray-500 italic"},B=m({__name:"BrowserBadge",props:{browser:{},size:{}},setup(c){const n=c,s=t(()=>n.browser?.projectName??null),l=t(()=>C(s.value)),p=t(()=>z(s.value)),u=t(()=>n.size==="sm"?"size-3.5":n.size==="lg"?"size-5":"size-4"),i=t(()=>{const e=n.browser;if(!e)return[];const o=[];return e.browserName&&e.browserName!==s.value&&o.push(`Browser: ${e.browserName}`),e.channel&&o.push(`Channel: ${e.channel}`),e.viewport&&o.push(`Viewport: ${e.viewport.width}×${e.viewport.height}`),e.deviceScaleFactor&&e.deviceScaleFactor!==1&&o.push(`Scale: ${e.deviceScaleFactor}x`),e.isMobile&&o.push("Mobile"),e.hasTouch&&!e.isMobile&&o.push("Touch"),e.locale&&o.push(`Locale: ${e.locale}`),e.timezoneId&&o.push(`TZ: ${e.timezoneId}`),e.colorScheme&&e.colorScheme!=="light"&&o.push(`Color: ${e.colorScheme}`),e.reducedMotion&&e.reducedMotion!=="no-preference"&&o.push(`Motion: ${e.reducedMotion}`),e.forcedColors&&e.forcedColors!=="none"&&o.push("Colors: forced"),e.offline&&o.push("Offline"),e.bypassCSP&&o.push("CSP bypassed"),e.javaScriptEnabled===!1&&o.push("JS disabled"),e.serviceWorkers==="block"&&o.push("SW blocked"),e.geolocation&&o.push(`Geo: ${e.geolocation.latitude.toFixed(2)},${e.geolocation.longitude.toFixed(2)}`),e.userAgent&&o.push(`UA: ${e.userAgent.length>60?e.userAgent.slice(0,60)+"…":e.userAgent}`),o}),h=t(()=>s.value?i.value.length?`${s.value} · ${i.value.join(" · ")}`:s.value:"");return(e,o)=>{const f=v,d=S;return r(s)?(a(),_(d,{key:0,text:r(h),popper:{placement:"top"}},{default:g(()=>[b(f,{name:r(l),class:x(["shrink-0 cursor-help",r(u)]),style:w({color:r(p)})},null,8,["name","class","style"])]),_:1},8,["text"])):(a(),$("span",k,"—"))}}}),A=Object.assign(B,{__name:"BrowserBadge"});export{A as _};