@piwitests/server 0.15.0 → 0.17.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (479) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/{DCCMLWel.js → -9tk1FrT.js} +1 -1
  3. package/.output/public/_nuxt/26ll_vBr.js +1 -0
  4. package/.output/public/_nuxt/{BpepjHwc.js → 3QTorEhJ.js} +1 -1
  5. package/.output/public/_nuxt/{DKTDub7I.js → 3QTvYrZp.js} +1 -1
  6. package/.output/public/_nuxt/{CHSkT2s0.js → 73aPL7Ir.js} +1 -1
  7. package/.output/public/_nuxt/8jZmK2De.js +4 -0
  8. package/.output/public/_nuxt/8xyZSRSO.js +1 -0
  9. package/.output/public/_nuxt/{V1BQiRoh.js → 99tAfVF5.js} +1 -1
  10. package/.output/public/_nuxt/{BY0AkhJh.js → B1CUXGbl.js} +1 -1
  11. package/.output/public/_nuxt/B6hPf4UR.js +1 -0
  12. package/.output/public/_nuxt/{F07TcX0U.js → B6w76fJT.js} +1 -1
  13. package/.output/public/_nuxt/{B32-7cBF.js → BDcIWTTq.js} +1 -1
  14. package/.output/public/_nuxt/{OG2n3p77.js → BE8ykmwr.js} +1 -1
  15. package/.output/public/_nuxt/{rvaZFYoE.js → BEsJE07U.js} +1 -1
  16. package/.output/public/_nuxt/{DQpa8F03.js → BGZQONfm.js} +1 -1
  17. package/.output/public/_nuxt/{DZoSxwj6.js → BRdhP5lm.js} +1 -1
  18. package/.output/public/_nuxt/{n7Htv9PJ.js → BU6xjw05.js} +1 -1
  19. package/.output/public/_nuxt/{DvdOsTLb.js → BWFY2RuU.js} +1 -1
  20. package/.output/public/_nuxt/{60-Zii7v.js → B_QIrc7l.js} +1 -1
  21. package/.output/public/_nuxt/{CrFCPOnY.js → Ba4_ydKG.js} +1 -1
  22. package/.output/public/_nuxt/{BfshMo9k.js → BcLXUmKT.js} +2 -2
  23. package/.output/public/_nuxt/{CD-xwM9N.js → BciovqwK.js} +1 -1
  24. package/.output/public/_nuxt/{i38YGG9S.js → BgDEjrcz.js} +1 -1
  25. package/.output/public/_nuxt/{rWwWS3Kj.js → BoRJdCd4.js} +1 -1
  26. package/.output/public/_nuxt/{O1A-LRgV.js → Bpha13F_.js} +1 -1
  27. package/.output/public/_nuxt/{2PU-adwy.js → Bq0PQfQY.js} +1 -1
  28. package/.output/public/_nuxt/{B8fs6GU9.js → BrT_Sys2.js} +31 -31
  29. package/.output/public/_nuxt/{ETOCcsVw.js → Bua_L6p4.js} +1 -1
  30. package/.output/public/_nuxt/{nUsJV5qo.js → BwKwWgQe.js} +1 -1
  31. package/.output/public/_nuxt/{4fB15L_7.js → BxRsAYRS.js} +1 -1
  32. package/.output/public/_nuxt/{DVdOm5Bg.js → ByoIgYX_.js} +1 -1
  33. package/.output/public/_nuxt/{Bq2ZPvIH.js → C7nwFokE.js} +1 -1
  34. package/.output/public/_nuxt/CEuVRSr0.js +3 -0
  35. package/.output/public/_nuxt/{CokbKVE6.js → CHHqhAsw.js} +1 -1
  36. package/.output/public/_nuxt/{BBJ9Pu3M.js → CHIbdzqp.js} +1 -1
  37. package/.output/public/_nuxt/{C9jjVEQU.js → CMB-NkFa.js} +1 -1
  38. package/.output/public/_nuxt/{CU-OXXdh.js → CNULGfLp.js} +1 -1
  39. package/.output/public/_nuxt/{Surk4Lw-.js → COVRAesU.js} +1 -1
  40. package/.output/public/_nuxt/{h-e-Ca3f.js → CSAmL8XJ.js} +1 -1
  41. package/.output/public/_nuxt/{CHgsEM4U.js → CWmQcueG.js} +1 -1
  42. package/.output/public/_nuxt/{BgR7oL4p.js → CYuWAvXE.js} +1 -1
  43. package/.output/public/_nuxt/CbuWynGG.js +1 -0
  44. package/.output/public/_nuxt/{CIOQo6gB.js → Ce3tBrN7.js} +1 -1
  45. package/.output/public/_nuxt/{DNP5tTJo.js → Cf4h8qty.js} +1 -1
  46. package/.output/public/_nuxt/{B9Q_4Mjt.js → Cl96oI21.js} +1 -1
  47. package/.output/public/_nuxt/{PPFO8UVt.js → ClJkng9p.js} +1 -1
  48. package/.output/public/_nuxt/{B32ySRXg.js → CoKEjZX7.js} +1 -1
  49. package/.output/public/_nuxt/CvtYJHkY.js +1 -0
  50. package/.output/public/_nuxt/{BCK4f6Y3.js → CxLN5Tmq.js} +1 -1
  51. package/.output/public/_nuxt/{ChWPXucC.js → Cz2HhsB6.js} +1 -1
  52. package/.output/public/_nuxt/{B_80i5Ge.js → D0-HTQTD.js} +1 -1
  53. package/.output/public/_nuxt/{CHMpVLqo.js → D13ybpY3.js} +1 -1
  54. package/.output/public/_nuxt/{CvCF77E-.js → D7P0ML0H.js} +2 -2
  55. package/.output/public/_nuxt/{BW1UOxWn.js → D811X8KM.js} +1 -1
  56. package/.output/public/_nuxt/DATh_1DQ.js +1 -0
  57. package/.output/public/_nuxt/{BEKwVcvQ.js → DAeYmPfX.js} +1 -1
  58. package/.output/public/_nuxt/DCffDvxl.js +1 -0
  59. package/.output/public/_nuxt/DDPptydi.js +2 -0
  60. package/.output/public/_nuxt/{DkFbpSsi.js → DFM2jv9I.js} +1 -1
  61. package/.output/public/_nuxt/{D4nLD93c.js → DJHNEqb7.js} +1 -1
  62. package/.output/public/_nuxt/{DaKVSp-6.js → DPSOtRoz.js} +1 -1
  63. package/.output/public/_nuxt/{DYDGGqZ3.js → DRTxhZBV.js} +1 -1
  64. package/.output/public/_nuxt/{Cgr8IKY4.js → DS9yGVFL.js} +1 -1
  65. package/.output/public/_nuxt/{Cfk2_UCm.js → DT5rhzhJ.js} +1 -1
  66. package/.output/public/_nuxt/{DFw8I2FL.js → DTH2lteW.js} +1 -1
  67. package/.output/public/_nuxt/DUe6xuKQ.js +1 -0
  68. package/.output/public/_nuxt/D_A6axXa.js +1 -0
  69. package/.output/public/_nuxt/D_TbJDHY.js +1 -0
  70. package/.output/public/_nuxt/{B59-l1Cv.js → Df3QtbpW.js} +1 -1
  71. package/.output/public/_nuxt/{BkhdAGx0.js → DjRhouSr.js} +1 -1
  72. package/.output/public/_nuxt/Dn6cGVYB.js +1 -0
  73. package/.output/public/_nuxt/{0KrkW531.js → DpJrGwCr.js} +2 -2
  74. package/.output/public/_nuxt/DqsMiUoW.js +2 -0
  75. package/.output/public/_nuxt/{C7RarFGi.js → Ds2Y3oms.js} +1 -1
  76. package/.output/public/_nuxt/Ds4Lb1vi.js +7 -0
  77. package/.output/public/_nuxt/{DWzdeQ3Z.js → DtXREpk_.js} +1 -1
  78. package/.output/public/_nuxt/{Dejf0f7D.js → DvC5Adg1.js} +3 -3
  79. package/.output/public/_nuxt/{o5WQ5Z7k.js → DvXvJzFP.js} +1 -1
  80. package/.output/public/_nuxt/{DAeYEeCC.js → Dvc1aWpA.js} +1 -1
  81. package/.output/public/_nuxt/{DzbOHjZH.js → DwZiG9xH.js} +1 -1
  82. package/.output/public/_nuxt/Dx1oCMgy.js +47 -0
  83. package/.output/public/_nuxt/{BGsuOpiq.js → DxQq_L07.js} +1 -1
  84. package/.output/public/_nuxt/{CqA3gM8h.js → Dym66h3p.js} +1 -1
  85. package/.output/public/_nuxt/{CNzoIhwN.js → Dz3Wbekz.js} +1 -1
  86. package/.output/public/_nuxt/HCK35QD8.js +1 -0
  87. package/.output/public/_nuxt/{Cpquifvd.js → L6HlmmEa.js} +1 -1
  88. package/.output/public/_nuxt/{BMQIO38j.js → PxPbRVF-.js} +1 -1
  89. package/.output/public/_nuxt/{DiUGa0CT.js → QFMx1VKs.js} +1 -1
  90. package/.output/public/_nuxt/{DHVmXA9K.js → Sgf5OLhm.js} +1 -1
  91. package/.output/public/_nuxt/US3YSX4T.js +1 -0
  92. package/.output/public/_nuxt/{DZLrAp2i.js → Wfk1m0ni.js} +1 -1
  93. package/.output/public/_nuxt/builds/latest.json +1 -1
  94. package/.output/public/_nuxt/builds/meta/05a2dd95-d1c1-4e3a-8625-ac6bfea83837.json +1 -0
  95. package/.output/public/_nuxt/{too3WhRB.js → cBj9fai9.js} +1 -1
  96. package/.output/public/_nuxt/{DxXZN6ed.js → csqspBeX.js} +1 -1
  97. package/.output/public/_nuxt/entry.BaIGwMjT.css +1 -0
  98. package/.output/public/_nuxt/{__m3KqHO.js → jlBi8Byu.js} +1 -1
  99. package/.output/public/_nuxt/{Dv2B_nw_.js → lCkcEykv.js} +1 -1
  100. package/.output/public/_nuxt/qYFZH4Z8.js +34 -0
  101. package/.output/public/_nuxt/{3SnTawZW.js → r3SBLxtE.js} +1 -1
  102. package/.output/public/_nuxt/{DI_-kFec.js → r9WApUfF.js} +1 -1
  103. package/.output/public/_nuxt/{BC_Wu-fv.js → rw7Hdll3.js} +1 -1
  104. package/.output/public/_nuxt/{IdQR_Djw.js → sMFaPAAR.js} +1 -1
  105. package/.output/public/_nuxt/{CKZn0TUX.js → vzXhOO8R.js} +1 -1
  106. package/.output/public/_nuxt/{CFn3w5jn.js → yZ4LuI9d.js} +1 -1
  107. package/.output/public/_nuxt/{BtJkQ3to.js → z7PmsnBG.js} +1 -1
  108. package/.output/public/_nuxt/{lRMjXqiA.js → za5M7BGh.js} +1 -1
  109. package/.output/public/demo/seed.version.json +2 -2
  110. package/.output/public/sw.js +1 -1
  111. package/.output/server/chunks/_/markers.mjs +1 -1
  112. package/.output/server/chunks/_/users.mjs +1 -1
  113. package/.output/server/chunks/build/{BrowserBadge-BTA4QU_J.mjs → BrowserBadge-DNCp9pF-.mjs} +3 -3
  114. package/.output/server/chunks/build/BrowserBadge-DNCp9pF-.mjs.map +1 -0
  115. package/.output/server/chunks/build/{ChartCard-BqAhMip2.mjs → ChartCard-Fr557IbV.mjs} +2 -2
  116. package/.output/server/chunks/build/ChartCard-Fr557IbV.mjs.map +1 -0
  117. package/.output/server/chunks/build/{Checkbox-_1nGm_DR.mjs → Checkbox-cVOSIY93.mjs} +6 -6
  118. package/.output/server/chunks/build/Checkbox-cVOSIY93.mjs.map +1 -0
  119. package/.output/server/chunks/build/{CiEnvCard-DAufYuJw.mjs → CiEnvCard-DXPOhdSG.mjs} +5 -5
  120. package/.output/server/chunks/build/CiEnvCard-DXPOhdSG.mjs.map +1 -0
  121. package/.output/server/chunks/build/{CodeBlock-BVKHuYjU.mjs → CodeBlock-BGwNmJ8J.mjs} +2 -2
  122. package/.output/server/chunks/build/CodeBlock-BGwNmJ8J.mjs.map +1 -0
  123. package/.output/server/chunks/build/{DashboardNavbar-BR6j4VLd.mjs → DashboardNavbar-Bdp-OwTN.mjs} +2 -2
  124. package/.output/server/chunks/build/DashboardNavbar-Bdp-OwTN.mjs.map +1 -0
  125. package/.output/server/chunks/build/DashboardSidebarToggle-Ji6ADuqF.mjs +1 -1
  126. package/.output/server/chunks/build/DataLocationCard-D6xSOrme.mjs +102 -0
  127. package/.output/server/chunks/build/DataLocationCard-D6xSOrme.mjs.map +1 -0
  128. package/.output/server/chunks/build/DesktopMcpCard-B4JuUTKj.mjs +122 -0
  129. package/.output/server/chunks/build/DesktopMcpCard-B4JuUTKj.mjs.map +1 -0
  130. package/.output/server/chunks/build/{DiagnosisPanel-BnrdXDvd.mjs → DiagnosisPanel-DV1xwGu4.mjs} +6 -6
  131. package/.output/server/chunks/build/DiagnosisPanel-DV1xwGu4.mjs.map +1 -0
  132. package/.output/server/chunks/build/EntityLinks-DeOP13Kr.mjs +1 -1
  133. package/.output/server/chunks/build/{EnvManagedBadge-DdnEtjIl.mjs → EnvManagedBadge-Qpn58Nmr.mjs} +5 -5
  134. package/.output/server/chunks/build/EnvManagedBadge-Qpn58Nmr.mjs.map +1 -0
  135. package/.output/server/chunks/build/{HelpHint-D_GJzMpW.mjs → HelpHint-YEMWtKu1.mjs} +18 -2
  136. package/.output/server/chunks/build/HelpHint-YEMWtKu1.mjs.map +1 -0
  137. package/.output/server/chunks/build/{Modal-COIjm3js.mjs → Modal-CfA78Hm1.mjs} +2 -2
  138. package/.output/server/chunks/build/Modal-CfA78Hm1.mjs.map +1 -0
  139. package/.output/server/chunks/build/{OpenInIdeLink-D97W6On1.mjs → OpenInIdeLink-B92wosXu.mjs} +3 -3
  140. package/.output/server/chunks/build/{OpenInIdeLink-D97W6On1.mjs.map → OpenInIdeLink-B92wosXu.mjs.map} +1 -1
  141. package/.output/server/chunks/build/{PageStateCard-C1HFN4Nv.mjs → PageStateCard-Bwee6JTk.mjs} +10 -10
  142. package/.output/server/chunks/build/{PageStateCard-C1HFN4Nv.mjs.map → PageStateCard-Bwee6JTk.mjs.map} +1 -1
  143. package/.output/server/chunks/build/{ProjectTestCasesTable-XFBPQGIX.mjs → ProjectTestCasesTable-9Ia825h8.mjs} +9 -9
  144. package/.output/server/chunks/build/ProjectTestCasesTable-9Ia825h8.mjs.map +1 -0
  145. package/.output/server/chunks/build/{RunReports-ChNkmuWa.mjs → RunReports-BpJqLHY9.mjs} +2 -2
  146. package/.output/server/chunks/build/RunReports-BpJqLHY9.mjs.map +1 -0
  147. package/.output/server/chunks/build/{RunStatusBadge-CXpuCUGQ.mjs → RunStatusBadge-BhmJ_RKM.mjs} +2 -2
  148. package/.output/server/chunks/build/RunStatusBadge-BhmJ_RKM.mjs.map +1 -0
  149. package/.output/server/chunks/build/{SectionCard-zs9FDzps.mjs → SectionCard-COd9TuDq.mjs} +2 -2
  150. package/.output/server/chunks/build/SectionCard-COd9TuDq.mjs.map +1 -0
  151. package/.output/server/chunks/build/{Select-r3S5nkSY.mjs → Select-ppPz926C.mjs} +5 -4
  152. package/.output/server/chunks/build/Select-ppPz926C.mjs.map +1 -0
  153. package/.output/server/chunks/build/{SelectMenu-Dk6f8i9o.mjs → SelectMenu-799c_Ils.mjs} +4 -4
  154. package/.output/server/chunks/build/{SelectMenu-Dk6f8i9o.mjs.map → SelectMenu-799c_Ils.mjs.map} +1 -1
  155. package/.output/server/chunks/build/{Separator-pqpPG0up.mjs → Separator-CxZdx8kw.mjs} +2 -2
  156. package/.output/server/chunks/build/Separator-CxZdx8kw.mjs.map +1 -0
  157. package/.output/server/chunks/build/{SettingsField-Wdpzlt13.mjs → SettingsField-DDD4oqys.mjs} +5 -5
  158. package/.output/server/chunks/build/SettingsField-DDD4oqys.mjs.map +1 -0
  159. package/.output/server/chunks/build/{Slideover-02XjJjn0.mjs → Slideover-B95Rj237.mjs} +3 -3
  160. package/.output/server/chunks/build/Slideover-B95Rj237.mjs.map +1 -0
  161. package/.output/server/chunks/build/{Switch-gx_JXgCo.mjs → Switch-xQQ3_ME1.mjs} +3 -3
  162. package/.output/server/chunks/build/Switch-xQQ3_ME1.mjs.map +1 -0
  163. package/.output/server/chunks/build/{Table-C64RrBp3.mjs → Table-CPhhVzDv.mjs} +3 -3
  164. package/.output/server/chunks/build/Table-CPhhVzDv.mjs.map +1 -0
  165. package/.output/server/chunks/build/{TestStatusBar--u4VX_Xf.mjs → TestStatusBar-CEzt76wk.mjs} +2 -2
  166. package/.output/server/chunks/build/TestStatusBar-CEzt76wk.mjs.map +1 -0
  167. package/.output/server/chunks/build/{Tooltip-ui_BVvqr.mjs → Tooltip-7vwuDPrZ.mjs} +3 -3
  168. package/.output/server/chunks/build/Tooltip-7vwuDPrZ.mjs.map +1 -0
  169. package/.output/server/chunks/build/{VisuallyHiddenInput-mMsqmkjz.mjs → VisuallyHiddenInput-C9eJVpPW.mjs} +2 -2
  170. package/.output/server/chunks/build/VisuallyHiddenInput-C9eJVpPW.mjs.map +1 -0
  171. package/.output/server/chunks/build/{_id_-R6KGfZOC.mjs → _id_-B2yirIuA.mjs} +259 -85
  172. package/.output/server/chunks/build/_id_-B2yirIuA.mjs.map +1 -0
  173. package/.output/server/chunks/build/{_id_-CFVnSs8B.mjs → _id_-B4V5fop6.mjs} +21 -19
  174. package/.output/server/chunks/build/{_id_-CFVnSs8B.mjs.map → _id_-B4V5fop6.mjs.map} +1 -1
  175. package/.output/server/chunks/build/{_id_-pkxJKe17.mjs → _id_-CE0Gso6i.mjs} +11 -11
  176. package/.output/server/chunks/build/_id_-CE0Gso6i.mjs.map +1 -0
  177. package/.output/server/chunks/build/{_id_-DXJQABO8.mjs → _id_-bWcP2xFl.mjs} +27 -26
  178. package/.output/server/chunks/build/{_id_-DXJQABO8.mjs.map → _id_-bWcP2xFl.mjs.map} +1 -1
  179. package/.output/server/chunks/build/about-TuEZ9n1Q.mjs +625 -0
  180. package/.output/server/chunks/build/about-TuEZ9n1Q.mjs.map +1 -0
  181. package/.output/server/chunks/build/{account-AbLuwiZP.mjs → account-Cn-eZqXM.mjs} +4 -4
  182. package/.output/server/chunks/build/account-Cn-eZqXM.mjs.map +1 -0
  183. package/.output/server/chunks/build/{ai-DR_slopS.mjs → ai-7jdaPOmj.mjs} +19 -18
  184. package/.output/server/chunks/build/ai-7jdaPOmj.mjs.map +1 -0
  185. package/.output/server/chunks/build/{analytics-BbT2-Tr-.mjs → analytics-B276WPeU.mjs} +237 -65
  186. package/.output/server/chunks/build/analytics-B276WPeU.mjs.map +1 -0
  187. package/.output/server/chunks/build/client.precomputed.mjs +1 -1
  188. package/.output/server/chunks/build/{db.client-DlA_u5y9.mjs → db.client-aHcD0wyX.mjs} +47 -22
  189. package/.output/server/chunks/build/db.client-aHcD0wyX.mjs.map +1 -0
  190. package/.output/server/chunks/build/{default-D6diRCW0.mjs → default-BSzdkM_L.mjs} +20 -17
  191. package/.output/server/chunks/build/default-BSzdkM_L.mjs.map +1 -0
  192. package/.output/server/chunks/build/{docs-DbYoZafk.mjs → docs-EXhN3sqC.mjs} +7 -6
  193. package/.output/server/chunks/build/{docs-DbYoZafk.mjs.map → docs-EXhN3sqC.mjs.map} +1 -1
  194. package/.output/server/chunks/build/{edit-CNV4xdYj.mjs → edit-C9Z7oZeu.mjs} +10 -9
  195. package/.output/server/chunks/build/edit-C9Z7oZeu.mjs.map +1 -0
  196. package/.output/server/chunks/build/fetch-8kznMtBM.mjs +1 -1
  197. package/.output/server/chunks/build/handleAndDispatchCustomEvent-Bk_AVSSo.mjs +13 -0
  198. package/.output/server/chunks/build/handleAndDispatchCustomEvent-Bk_AVSSo.mjs.map +1 -0
  199. package/.output/server/chunks/build/{help-content-BMumoQQF.mjs → help-content-DmFnuhNu.mjs} +6 -1
  200. package/.output/server/chunks/build/help-content-DmFnuhNu.mjs.map +1 -0
  201. package/.output/server/chunks/build/{index-C3Ou18qD.mjs → index-BK9PTRpd.mjs} +34 -18
  202. package/.output/server/chunks/build/{index-C3Ou18qD.mjs.map → index-BK9PTRpd.mjs.map} +1 -1
  203. package/.output/server/chunks/build/{index-Dw526KXV.mjs → index-BR9hw6qk.mjs} +10 -10
  204. package/.output/server/chunks/build/index-BR9hw6qk.mjs.map +1 -0
  205. package/.output/server/chunks/build/{index-dwYB76GO.mjs → index-Ba-Fifra.mjs} +4 -4
  206. package/.output/server/chunks/build/index-Ba-Fifra.mjs.map +1 -0
  207. package/.output/server/chunks/build/{index-DmHBPf7T.mjs → index-CULN3-en.mjs} +11 -2
  208. package/.output/server/chunks/build/index-CULN3-en.mjs.map +1 -0
  209. package/.output/server/chunks/build/{index-rSHkKNna.mjs → index-DVUtBexc.mjs} +507 -85
  210. package/.output/server/chunks/build/index-DVUtBexc.mjs.map +1 -0
  211. package/.output/server/chunks/build/{isValueEqualOrExist-DTJ5ejZs.mjs → isValueEqualOrExist-DBZjbD_3.mjs} +3 -3
  212. package/.output/server/chunks/build/isValueEqualOrExist-DBZjbD_3.mjs.map +1 -0
  213. package/.output/server/chunks/build/{login-Da5C8jP2.mjs → login-D2XZDuek.mjs} +3 -3
  214. package/.output/server/chunks/build/login-D2XZDuek.mjs.map +1 -0
  215. package/.output/server/chunks/build/{mcp-DM1t-9L_.mjs → mcp-CQ-21rwc.mjs} +138 -31
  216. package/.output/server/chunks/build/mcp-CQ-21rwc.mjs.map +1 -0
  217. package/.output/server/chunks/build/{notifications-BTPF0xA7.mjs → notifications-Dzm9c0u_.mjs} +13 -12
  218. package/.output/server/chunks/build/notifications-Dzm9c0u_.mjs.map +1 -0
  219. package/.output/server/chunks/build/server.mjs +37 -28
  220. package/.output/server/chunks/build/{settings-metadata-CksLgMun.mjs → settings-metadata-B0wo5R-W.mjs} +14 -3
  221. package/.output/server/chunks/build/settings-metadata-B0wo5R-W.mjs.map +1 -0
  222. package/.output/server/chunks/build/{settings-Bmw_JdBS.mjs → settings-pNyPBXVa.mjs} +9 -7
  223. package/.output/server/chunks/build/settings-pNyPBXVa.mjs.map +1 -0
  224. package/.output/server/chunks/build/{storage-BqR4acgi.mjs → storage-XelzuyPy.mjs} +23 -12
  225. package/.output/server/chunks/build/storage-XelzuyPy.mjs.map +1 -0
  226. package/.output/server/chunks/build/{tags-miPAzIr3.mjs → tags-DrCQ7QSw.mjs} +6 -6
  227. package/.output/server/chunks/build/tags-DrCQ7QSw.mjs.map +1 -0
  228. package/.output/server/chunks/build/{test-cases-D-LqhLpk.mjs → test-cases-pmOxi-AN.mjs} +16 -15
  229. package/.output/server/chunks/build/test-cases-pmOxi-AN.mjs.map +1 -0
  230. package/.output/server/chunks/build/timeout-hygiene-CNs71Iah.mjs +318 -0
  231. package/.output/server/chunks/build/timeout-hygiene-CNs71Iah.mjs.map +1 -0
  232. package/.output/server/chunks/build/{useAiStatus-FwqbA4gz.mjs → useAiStatus-ZO987RY7.mjs} +8 -7
  233. package/.output/server/chunks/build/useAiStatus-ZO987RY7.mjs.map +1 -0
  234. package/.output/server/chunks/build/useFormControl-BLpq1s4O.mjs +9 -0
  235. package/.output/server/chunks/build/useFormControl-BLpq1s4O.mjs.map +1 -0
  236. package/.output/server/chunks/build/useIsDesktop-BS13spVj.mjs +9 -0
  237. package/.output/server/chunks/build/useIsDesktop-BS13spVj.mjs.map +1 -0
  238. package/.output/server/chunks/build/{useSettingsNav-v_dFuTw9.mjs → useSettingsNav-NjI2seBy.mjs} +9 -7
  239. package/.output/server/chunks/build/useSettingsNav-NjI2seBy.mjs.map +1 -0
  240. package/.output/server/chunks/build/{users-D-GDKZmZ.mjs → users-NmAUZs3i.mjs} +6 -6
  241. package/.output/server/chunks/build/users-NmAUZs3i.mjs.map +1 -0
  242. package/.output/server/chunks/build/{virtualizer-BcC1XuFf.mjs → virtualizer-ZaqK4guJ.mjs} +6 -5
  243. package/.output/server/chunks/build/virtualizer-ZaqK4guJ.mjs.map +1 -0
  244. package/.output/server/chunks/build/{wasted-time-CFmeT_e2.mjs → wasted-time-CguAF9zc.mjs} +8 -8
  245. package/.output/server/chunks/build/wasted-time-CguAF9zc.mjs.map +1 -0
  246. package/.output/server/chunks/nitro/nitro.mjs +1009 -722
  247. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  248. package/.output/server/chunks/routes/__piwi/session.get.mjs +51 -0
  249. package/.output/server/chunks/routes/__piwi/session.get.mjs.map +1 -0
  250. package/.output/server/chunks/routes/api/admin/stats.get.mjs +5 -1
  251. package/.output/server/chunks/routes/api/admin/stats.get.mjs.map +1 -1
  252. package/.output/server/chunks/routes/api/analytics/_widget_.get.mjs +75 -6
  253. package/.output/server/chunks/routes/api/analytics/_widget_.get.mjs.map +1 -1
  254. package/.output/server/chunks/routes/api/auth/change-password.post.mjs +1 -1
  255. package/.output/server/chunks/routes/api/auth/forgot-password.post.mjs +1 -1
  256. package/.output/server/chunks/routes/api/auth/login.post.mjs +1 -1
  257. package/.output/server/chunks/routes/api/auth/logout.post.mjs +1 -1
  258. package/.output/server/chunks/routes/api/auth/me.get.mjs +1 -1
  259. package/.output/server/chunks/routes/api/auth/oauth/_provider/callback.get.mjs +1 -1
  260. package/.output/server/chunks/routes/api/auth/oauth/_provider/login.get.mjs +1 -1
  261. package/.output/server/chunks/routes/api/auth/oauth/_provider/unlink.post.mjs +1 -1
  262. package/.output/server/chunks/routes/api/auth/reset-password.post.mjs +1 -1
  263. package/.output/server/chunks/routes/api/auth/send-verify-email.post.mjs +1 -1
  264. package/.output/server/chunks/routes/api/auth/setup.get.mjs +1 -1
  265. package/.output/server/chunks/routes/api/auth/setup.post.mjs +1 -1
  266. package/.output/server/chunks/routes/api/auth/verify-email.get.mjs +1 -1
  267. package/.output/server/chunks/routes/api/channels/_id/test.post.mjs +1 -1
  268. package/.output/server/chunks/routes/api/channels/_id_.delete.mjs +1 -1
  269. package/.output/server/chunks/routes/api/cluster-merge-suggestions/_id/approve.post.mjs +1 -1
  270. package/.output/server/chunks/routes/api/cluster-merge-suggestions/_id/reject.post.mjs +1 -1
  271. package/.output/server/chunks/routes/api/desktop/reporter-config.get.mjs +45 -0
  272. package/.output/server/chunks/routes/api/desktop/reporter-config.get.mjs.map +1 -0
  273. package/.output/server/chunks/routes/api/failure-clusters/_id/base-commit.patch.mjs +1 -1
  274. package/.output/server/chunks/routes/api/failure-clusters/_id/branches.get.mjs +1 -1
  275. package/.output/server/chunks/routes/api/failure-clusters/_id/commit-diff.get.mjs +1 -1
  276. package/.output/server/chunks/routes/api/failure-clusters/_id/commits.get.mjs +1 -1
  277. package/.output/server/chunks/routes/api/failure-clusters/_id/context.get.mjs +1 -1
  278. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose/stream.post.mjs +1 -1
  279. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnose.post.mjs +1 -1
  280. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnoses.get.mjs +1 -1
  281. package/.output/server/chunks/routes/api/failure-clusters/_id/diagnosis.get.mjs +1 -1
  282. package/.output/server/chunks/routes/api/failure-clusters/_id/extract-cases.post.mjs +1 -1
  283. package/.output/server/chunks/routes/api/failure-clusters/_id/status.patch.mjs +1 -1
  284. package/.output/server/chunks/routes/api/failure-clusters/_id_.get.mjs +1 -1
  285. package/.output/server/chunks/routes/api/failure-diagnoses/_id/feedback.patch.mjs +1 -1
  286. package/.output/server/chunks/routes/api/files/_...path_.get.mjs +1 -1
  287. package/.output/server/chunks/routes/api/health.get.mjs +1 -1
  288. package/.output/server/chunks/routes/api/index.get.mjs +1 -1
  289. package/.output/server/chunks/routes/api/index.get2.mjs +1 -1
  290. package/.output/server/chunks/routes/api/index.get3.mjs +1 -1
  291. package/.output/server/chunks/routes/api/index.get4.mjs +1 -1
  292. package/.output/server/chunks/routes/api/index.get5.mjs +1 -1
  293. package/.output/server/chunks/routes/api/index.post.mjs +1 -1
  294. package/.output/server/chunks/routes/api/index.post2.mjs +1 -1
  295. package/.output/server/chunks/routes/api/index.post3.mjs +1 -1
  296. package/.output/server/chunks/routes/api/index.post4.mjs +1 -1
  297. package/.output/server/chunks/routes/api/index.post5.mjs +1 -1
  298. package/.output/server/chunks/routes/api/index.post6.mjs +1 -1
  299. package/.output/server/chunks/routes/api/links/_id/refresh.post.mjs +1 -1
  300. package/.output/server/chunks/routes/api/links/_id_.delete.mjs +1 -1
  301. package/.output/server/chunks/routes/api/links/_id_.patch.mjs +1 -1
  302. package/.output/server/chunks/routes/api/markers/_id_.delete.mjs +1 -1
  303. package/.output/server/chunks/routes/api/markers/_id_.put.mjs +1 -1
  304. package/.output/server/chunks/routes/api/notifications/stream.get.mjs +1 -1
  305. package/.output/server/chunks/routes/api/projects/_id/cluster-merge-suggestions.get.mjs +1 -1
  306. package/.output/server/chunks/routes/api/projects/_id/failure-clusters.get.mjs +1 -1
  307. package/.output/server/chunks/routes/api/projects/_id/flaky-classify.post.mjs +1 -1
  308. package/.output/server/chunks/routes/api/projects/_id/flaky-tests.get.mjs +1 -1
  309. package/.output/server/chunks/routes/api/projects/_id/latest-run.get.mjs +1 -1
  310. package/.output/server/chunks/routes/api/projects/_id/markers.get.mjs +1 -1
  311. package/.output/server/chunks/routes/api/projects/_id/markers.post.mjs +1 -1
  312. package/.output/server/chunks/routes/api/projects/_id/members.get.mjs +1 -1
  313. package/.output/server/chunks/routes/api/projects/_id/members.put.mjs +1 -1
  314. package/.output/server/chunks/routes/api/projects/_id/performance.get.mjs +1 -1
  315. package/.output/server/chunks/routes/api/projects/_id/slow-tests.get.mjs +1 -1
  316. package/.output/server/chunks/routes/api/projects/_id/spec-health.get.mjs +1 -1
  317. package/.output/server/chunks/routes/api/projects/_id/test-cases.get.mjs +1 -1
  318. package/.output/server/chunks/routes/api/projects/_id/timeout-opportunities.get.mjs +50 -0
  319. package/.output/server/chunks/routes/api/projects/_id/timeout-opportunities.get.mjs.map +1 -0
  320. package/.output/server/chunks/routes/api/projects/_id_.delete.mjs +1 -1
  321. package/.output/server/chunks/routes/api/projects/_id_.get.mjs +1 -1
  322. package/.output/server/chunks/routes/api/projects/_id_.put.mjs +1 -1
  323. package/.output/server/chunks/routes/api/projects/menu.get.mjs +1 -1
  324. package/.output/server/chunks/routes/api/projects/overview.get.mjs +1 -1
  325. package/.output/server/chunks/routes/api/projects.get.mjs +1 -1
  326. package/.output/server/chunks/routes/api/search.get.mjs +1 -1
  327. package/.output/server/chunks/routes/api/settings/ai/limits.get.mjs +1 -1
  328. package/.output/server/chunks/routes/api/settings/ai/limits.put.mjs +1 -1
  329. package/.output/server/chunks/routes/api/settings/ai/test.post.mjs +1 -1
  330. package/.output/server/chunks/routes/api/settings/ai/usage.get.mjs +1 -1
  331. package/.output/server/chunks/routes/api/settings/ai.get.mjs +1 -1
  332. package/.output/server/chunks/routes/api/settings/ai.put.mjs +1 -1
  333. package/.output/server/chunks/routes/api/settings/smtp/test.post.mjs +1 -1
  334. package/.output/server/chunks/routes/api/settings/smtp.get.mjs +1 -1
  335. package/.output/server/chunks/routes/api/settings/timeout-hygiene.get.mjs +40 -0
  336. package/.output/server/chunks/routes/api/settings/timeout-hygiene.get.mjs.map +1 -0
  337. package/.output/server/chunks/routes/api/settings/timeout-hygiene.put.mjs +46 -0
  338. package/.output/server/chunks/routes/api/settings/timeout-hygiene.put.mjs.map +1 -0
  339. package/.output/server/chunks/routes/api/settings/wasted-waits.get.mjs +1 -1
  340. package/.output/server/chunks/routes/api/settings/wasted-waits.put.mjs +1 -1
  341. package/.output/server/chunks/routes/api/stream.get.mjs +1 -1
  342. package/.output/server/chunks/routes/api/subscriptions/_id_.delete.mjs +1 -1
  343. package/.output/server/chunks/routes/api/subscriptions/_id_.patch.mjs +1 -1
  344. package/.output/server/chunks/routes/api/tags/_id_.delete.mjs +1 -1
  345. package/.output/server/chunks/routes/api/tags/_id_.put.mjs +1 -1
  346. package/.output/server/chunks/routes/api/test-cases/_id/history.get.mjs +1 -1
  347. package/.output/server/chunks/routes/api/test-cases/_id/stability-trend.get.mjs +1 -1
  348. package/.output/server/chunks/routes/api/test-cases/_id_.get.mjs +1 -1
  349. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnose.post.mjs +1 -1
  350. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis-context.get.mjs +1 -1
  351. package/.output/server/chunks/routes/api/test-run-cases/_id/diagnosis.get.mjs +1 -1
  352. package/.output/server/chunks/routes/api/test-run-cases/_id/traces.get.mjs +1 -1
  353. package/.output/server/chunks/routes/api/test-run-cases/_id_.get.mjs +1 -1
  354. package/.output/server/chunks/routes/api/test-runs/_id/begin.post.mjs +1 -1
  355. package/.output/server/chunks/routes/api/test-runs/_id/case-files.post.mjs +1 -1
  356. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/dom-snapshot.get.mjs +1 -1
  357. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/environment-diff.get.mjs +1 -1
  358. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-healing.get.mjs +1 -1
  359. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/locator-pick.post.mjs +1 -1
  360. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network-body.get.mjs +1 -1
  361. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-network.get.mjs +1 -1
  362. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/trace-stacks.get.mjs +1 -1
  363. package/.output/server/chunks/routes/api/test-runs/_id/cases/_caseId/visual-diff.get.mjs +1 -1
  364. package/.output/server/chunks/routes/api/test-runs/_id/events.post.mjs +1 -1
  365. package/.output/server/chunks/routes/api/test-runs/_id/failure-groups.get.mjs +1 -1
  366. package/.output/server/chunks/routes/api/test-runs/_id/finish.post.mjs +1 -1
  367. package/.output/server/chunks/routes/api/test-runs/_id/heartbeat.post.mjs +1 -1
  368. package/.output/server/chunks/routes/api/test-runs/_id/insights.get.mjs +1 -1
  369. package/.output/server/chunks/routes/api/test-runs/_id/network-requests.get.mjs +1 -1
  370. package/.output/server/chunks/routes/api/test-runs/_id/regression-context.get.mjs +1 -1
  371. package/.output/server/chunks/routes/api/test-runs/_id/stream.get.mjs +1 -1
  372. package/.output/server/chunks/routes/api/test-runs/_id/summary.get.mjs +1 -1
  373. package/.output/server/chunks/routes/api/test-runs/_id_.delete.mjs +1 -1
  374. package/.output/server/chunks/routes/api/test-runs/_id_.get.mjs +1 -1
  375. package/.output/server/chunks/routes/api/test-runs/_id_.patch.mjs +1 -1
  376. package/.output/server/chunks/routes/api/test-runs/recent.get.mjs +1 -1
  377. package/.output/server/chunks/routes/api/test-runs/setup.post.mjs +1 -1
  378. package/.output/server/chunks/routes/api/test-runs/start.post.mjs +1 -1
  379. package/.output/server/chunks/routes/api/test-runs/submit.post.mjs +3 -1
  380. package/.output/server/chunks/routes/api/test-runs/submit.post.mjs.map +1 -1
  381. package/.output/server/chunks/routes/api/test-runs/upload.post.mjs +2 -1
  382. package/.output/server/chunks/routes/api/test-runs/upload.post.mjs.map +1 -1
  383. package/.output/server/chunks/routes/api/traces/check.post.mjs +1 -1
  384. package/.output/server/chunks/routes/api/users/_id/api-keys/_keyId_.delete.mjs +1 -1
  385. package/.output/server/chunks/routes/api/users/_id/index.get.mjs +1 -1
  386. package/.output/server/chunks/routes/api/users/_id/index.post.mjs +1 -1
  387. package/.output/server/chunks/routes/api/users/_id/invite.post.mjs +1 -1
  388. package/.output/server/chunks/routes/api/users/_id/projects.get.mjs +1 -1
  389. package/.output/server/chunks/routes/api/users/_id/projects.put.mjs +1 -1
  390. package/.output/server/chunks/routes/api/users/_id_.delete.mjs +1 -1
  391. package/.output/server/chunks/routes/api/users/_id_.patch.mjs +1 -1
  392. package/.output/server/chunks/routes/api/version.get.mjs +1 -1
  393. package/.output/server/chunks/routes/mcp.post.mjs +1 -1
  394. package/.output/server/chunks/routes/renderer.mjs +1 -1
  395. package/.output/server/database/migrations/0037_tired_hellion.sql +1 -0
  396. package/.output/server/database/migrations/0038_glamorous_ulik.sql +1 -0
  397. package/.output/server/database/migrations/meta/0037_snapshot.json +3384 -0
  398. package/.output/server/database/migrations/meta/0038_snapshot.json +3391 -0
  399. package/.output/server/database/migrations/meta/_journal.json +14 -0
  400. package/.output/server/database/migrations-pg/0038_tranquil_moira_mactaggert.sql +1 -0
  401. package/.output/server/database/migrations-pg/0039_fat_starjammers.sql +1 -0
  402. package/.output/server/database/migrations-pg/meta/0038_snapshot.json +4027 -0
  403. package/.output/server/database/migrations-pg/meta/0039_snapshot.json +4033 -0
  404. package/.output/server/database/migrations-pg/meta/_journal.json +14 -0
  405. package/.output/server/index.mjs +1 -1
  406. package/.output/server/package.json +1 -1
  407. package/package.json +1 -1
  408. package/.output/public/_nuxt/2kfkdDTz.js +0 -1
  409. package/.output/public/_nuxt/BXEDsEwG.js +0 -1
  410. package/.output/public/_nuxt/BbgBGuMG.js +0 -1
  411. package/.output/public/_nuxt/CBrCcDzR.js +0 -1
  412. package/.output/public/_nuxt/CFXonrwQ.js +0 -3
  413. package/.output/public/_nuxt/CJGJI2Of.js +0 -34
  414. package/.output/public/_nuxt/Ce4EdfL_.js +0 -4
  415. package/.output/public/_nuxt/Cf3RuiXF.js +0 -46
  416. package/.output/public/_nuxt/CkpB9oBr.js +0 -1
  417. package/.output/public/_nuxt/D1tZEdSi.js +0 -1
  418. package/.output/public/_nuxt/DK9uMTYX.js +0 -1
  419. package/.output/public/_nuxt/DgZlpN9l.js +0 -1
  420. package/.output/public/_nuxt/DjCfCT_5.js +0 -1
  421. package/.output/public/_nuxt/YDWXnWou.js +0 -1
  422. package/.output/public/_nuxt/builds/meta/f549de31-8db6-4504-b526-482778a55eba.json +0 -1
  423. package/.output/public/_nuxt/entry.BxXHl1Vy.css +0 -1
  424. package/.output/public/_nuxt/evCxpgbd.js +0 -2
  425. package/.output/public/_nuxt/wCQds5_f.js +0 -1
  426. package/.output/server/chunks/build/BrowserBadge-BTA4QU_J.mjs.map +0 -1
  427. package/.output/server/chunks/build/ChartCard-BqAhMip2.mjs.map +0 -1
  428. package/.output/server/chunks/build/Checkbox-_1nGm_DR.mjs.map +0 -1
  429. package/.output/server/chunks/build/CiEnvCard-DAufYuJw.mjs.map +0 -1
  430. package/.output/server/chunks/build/CodeBlock-BVKHuYjU.mjs.map +0 -1
  431. package/.output/server/chunks/build/DashboardNavbar-BR6j4VLd.mjs.map +0 -1
  432. package/.output/server/chunks/build/DiagnosisPanel-BnrdXDvd.mjs.map +0 -1
  433. package/.output/server/chunks/build/EnvManagedBadge-DdnEtjIl.mjs.map +0 -1
  434. package/.output/server/chunks/build/HelpHint-D_GJzMpW.mjs.map +0 -1
  435. package/.output/server/chunks/build/Modal-COIjm3js.mjs.map +0 -1
  436. package/.output/server/chunks/build/ProjectTestCasesTable-XFBPQGIX.mjs.map +0 -1
  437. package/.output/server/chunks/build/RunReports-ChNkmuWa.mjs.map +0 -1
  438. package/.output/server/chunks/build/RunStatusBadge-CXpuCUGQ.mjs.map +0 -1
  439. package/.output/server/chunks/build/SectionCard-zs9FDzps.mjs.map +0 -1
  440. package/.output/server/chunks/build/Select-r3S5nkSY.mjs.map +0 -1
  441. package/.output/server/chunks/build/Separator-pqpPG0up.mjs.map +0 -1
  442. package/.output/server/chunks/build/SettingsField-Wdpzlt13.mjs.map +0 -1
  443. package/.output/server/chunks/build/Slideover-02XjJjn0.mjs.map +0 -1
  444. package/.output/server/chunks/build/Switch-gx_JXgCo.mjs.map +0 -1
  445. package/.output/server/chunks/build/Table-C64RrBp3.mjs.map +0 -1
  446. package/.output/server/chunks/build/TestStatusBar--u4VX_Xf.mjs.map +0 -1
  447. package/.output/server/chunks/build/Tooltip-ui_BVvqr.mjs.map +0 -1
  448. package/.output/server/chunks/build/VisuallyHiddenInput-mMsqmkjz.mjs.map +0 -1
  449. package/.output/server/chunks/build/_id_-R6KGfZOC.mjs.map +0 -1
  450. package/.output/server/chunks/build/_id_-pkxJKe17.mjs.map +0 -1
  451. package/.output/server/chunks/build/about-CmtGYbC6.mjs +0 -313
  452. package/.output/server/chunks/build/about-CmtGYbC6.mjs.map +0 -1
  453. package/.output/server/chunks/build/account-AbLuwiZP.mjs.map +0 -1
  454. package/.output/server/chunks/build/ai-DR_slopS.mjs.map +0 -1
  455. package/.output/server/chunks/build/analytics-BbT2-Tr-.mjs.map +0 -1
  456. package/.output/server/chunks/build/db.client-DlA_u5y9.mjs.map +0 -1
  457. package/.output/server/chunks/build/default-D6diRCW0.mjs.map +0 -1
  458. package/.output/server/chunks/build/edit-CNV4xdYj.mjs.map +0 -1
  459. package/.output/server/chunks/build/help-content-BMumoQQF.mjs.map +0 -1
  460. package/.output/server/chunks/build/index-DmHBPf7T.mjs.map +0 -1
  461. package/.output/server/chunks/build/index-Dw526KXV.mjs.map +0 -1
  462. package/.output/server/chunks/build/index-dwYB76GO.mjs.map +0 -1
  463. package/.output/server/chunks/build/index-rSHkKNna.mjs.map +0 -1
  464. package/.output/server/chunks/build/isValueEqualOrExist-DTJ5ejZs.mjs.map +0 -1
  465. package/.output/server/chunks/build/login-Da5C8jP2.mjs.map +0 -1
  466. package/.output/server/chunks/build/mcp-DM1t-9L_.mjs.map +0 -1
  467. package/.output/server/chunks/build/notifications-BTPF0xA7.mjs.map +0 -1
  468. package/.output/server/chunks/build/settings-Bmw_JdBS.mjs.map +0 -1
  469. package/.output/server/chunks/build/settings-metadata-CksLgMun.mjs.map +0 -1
  470. package/.output/server/chunks/build/storage-BqR4acgi.mjs.map +0 -1
  471. package/.output/server/chunks/build/tags-miPAzIr3.mjs.map +0 -1
  472. package/.output/server/chunks/build/test-cases-D-LqhLpk.mjs.map +0 -1
  473. package/.output/server/chunks/build/useAiStatus-FwqbA4gz.mjs.map +0 -1
  474. package/.output/server/chunks/build/useFormControl-DFTjniPG.mjs +0 -19
  475. package/.output/server/chunks/build/useFormControl-DFTjniPG.mjs.map +0 -1
  476. package/.output/server/chunks/build/useSettingsNav-v_dFuTw9.mjs.map +0 -1
  477. package/.output/server/chunks/build/users-D-GDKZmZ.mjs.map +0 -1
  478. package/.output/server/chunks/build/virtualizer-BcC1XuFf.mjs.map +0 -1
  479. package/.output/server/chunks/build/wasted-time-CFmeT_e2.mjs.map +0 -1
@@ -267,6 +267,20 @@
267
267
  "when": 1784402219845,
268
268
  "tag": "0037_deep_mulholland_black",
269
269
  "breakpoints": true
270
+ },
271
+ {
272
+ "idx": 38,
273
+ "version": "7",
274
+ "when": 1784582756861,
275
+ "tag": "0038_tranquil_moira_mactaggert",
276
+ "breakpoints": true
277
+ },
278
+ {
279
+ "idx": 39,
280
+ "version": "7",
281
+ "when": 1784619503940,
282
+ "tag": "0039_fat_starjammers",
283
+ "breakpoints": true
270
284
  }
271
285
  ]
272
286
  }
@@ -1,6 +1,6 @@
1
1
  import process from 'node:process';globalThis._importMeta_={url:import.meta.url,env:process.env};import 'node:http';
2
2
  import 'node:https';
3
- export { da as default } from './chunks/nitro/nitro.mjs';
3
+ export { dh as default } from './chunks/nitro/nitro.mjs';
4
4
  import 'node:crypto';
5
5
  import 'drizzle-orm';
6
6
  import 'path';
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piwitests/dashboard-prod",
3
- "version": "0.15.0",
3
+ "version": "0.17.0",
4
4
  "type": "module",
5
5
  "private": true,
6
6
  "dependencies": {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@piwitests/server",
3
- "version": "0.15.0",
3
+ "version": "0.17.0",
4
4
  "description": "Self-hosted Piwi Dashboard server — run with npx @piwitests/server",
5
5
  "type": "module",
6
6
  "bin": {
@@ -1 +0,0 @@
1
- import{_ as $,a as k}from"./B32-7cBF.js";import{_ as y,a as C}from"./C9jjVEQU.js";import{u as B,_ as D}from"./DjCfCT_5.js";import{a1 as M,a3 as S,o as f,f as d,g as i,T as c,i as p,p as u,k as t,V as U,h as _,a6 as N,C as P,r as T,d as j,e as q,j as o,aH as H}from"./B8fs6GU9.js";import"./BtJkQ3to.js";import"./CKZn0TUX.js";import"./DFw8I2FL.js";import"./CBrCcDzR.js";import"./3SnTawZW.js";const V={slots:{root:"shrink-0 flex items-center justify-between border-b border-default px-4 sm:px-6 gap-1.5 overflow-x-auto min-h-[49px]",left:"flex items-center gap-1.5",right:"flex items-center gap-1.5"}},z={__name:"UDashboardToolbar",props:{as:{type:null,required:!1},class:{type:null,required:!1},ui:{type:Object,required:!1}},setup(s){const a=M("dashboardToolbar",s),e=S(),l=_(()=>N({extend:V,...e.ui?.dashboardToolbar||{}})());return(r,m)=>(f(),d(t(U),{as:t(a).as,"data-slot":"root",class:u(l.value.root({class:[t(a).ui?.root,t(a).class]}))},{default:i(()=>[c(r.$slots,"default",{},()=>[p("div",{"data-slot":"left",class:u(l.value.left({class:[t(a).ui?.left]}))},[c(r.$slots,"left")],2),p("div",{"data-slot":"right",class:u(l.value.right({class:[t(a).ui?.right]}))},[c(r.$slots,"right")],2)])]),_:3},8,["as","class"]))}};function A(){const s=T({account:!1,users:!1,notifications:!1,tags:!1,storage:!1,"wasted-time":!1,ai:!1,about:!1});async function n(){const a=[];a.push($fetch("/api/settings/ai").then(e=>{s.value.ai=!!e.envManaged}).catch(()=>{})),a.push($fetch("/api/settings/wasted-waits").then(e=>{s.value["wasted-time"]=!!e.envManaged}).catch(()=>{})),a.push($fetch("/api/settings/smtp").then(e=>{s.value.notifications=!!(e.envManaged&&e.configured)}).catch(()=>{})),await Promise.all(a)}return P(()=>{n()}),{envManaged:s,refresh:n}}const E={class:"flex flex-col gap-4 sm:gap-6 lg:gap-12 w-full lg:max-w-4xl mx-auto"},W=j({__name:"settings",setup(s){q({title:"Settings — Piwi Dashboard"});const{envManaged:n}=A(),a=B(n),e=_(()=>[a.value,[{label:"Documentation",icon:"i-lucide-book-open",to:"https://github.com/piwitests/platform",target:"_blank"}]]);return(l,r)=>{const m=$,g=k,h=C,b=D,v=z,x=H,w=y;return f(),d(w,{id:"settings",ui:{body:"lg:py-12"}},{header:i(()=>[o(h,null,{leading:i(()=>[o(m),o(g,{items:[{label:"Home",icon:"i-lucide-house",to:"/"},{label:"Settings"}]})]),_:1}),o(v,null,{default:i(()=>[o(b,{items:t(e),highlight:"",class:"-mx-1 flex-1",ui:{list:"overflow-x-auto",root:"min-w-0"}},null,8,["items"])]),_:1})]),body:i(()=>[p("div",E,[o(x)])]),_:1})}}});export{W as default};
@@ -1 +0,0 @@
1
- import{d as R,b as U,w as M,c as m,i as t,j as a,g as i,F as x,P as z,o as u,v as I,m as p,y as O,k as s,t as n,q as j,_ as A,l as N,r as y}from"./B8fs6GU9.js";import{_ as L}from"./CHgsEM4U.js";import{_ as q}from"./BBJ9Pu3M.js";import{_ as W}from"./IdQR_Djw.js";import{_ as G}from"./PPFO8UVt.js";import{_ as H}from"./CD-xwM9N.js";import{k as w}from"./CvCF77E-.js";import{e as J,g as K}from"./wCQds5_f.js";import{u as Q}from"./DAeYEeCC.js";import"./DFw8I2FL.js";import"./B32ySRXg.js";import"./D1tZEdSi.js";import"./BC_Wu-fv.js";import"./3SnTawZW.js";import"./DWzdeQ3Z.js";const X={class:"space-y-6"},Y={class:"space-y-3"},Z={class:"flex items-center gap-2 text-sm text-muted"},ee={class:"grid grid-cols-1 sm:grid-cols-2 gap-2 text-sm"},te={class:"text-muted"},se={class:"flex items-center gap-2 font-mono"},oe={class:"text-xs"},ae={key:0,class:"flex items-center gap-2 py-4 text-muted"},le={key:1,class:"grid grid-cols-2 sm:grid-cols-3 gap-4"},ne={class:"space-y-1"},ie={class:"text-2xl font-semibold"},re={class:"space-y-1"},de={class:"text-2xl font-semibold"},ce={class:"space-y-1"},me={class:"text-2xl font-semibold"},ue={class:"space-y-1"},pe={class:"text-2xl font-semibold"},_e={class:"space-y-1"},fe={class:"text-2xl font-semibold"},ve={class:"space-y-1"},ge={class:"text-2xl font-semibold"},xe={class:"space-y-1"},ye={class:"text-2xl font-semibold"},be={class:"flex flex-col sm:flex-row items-start sm:items-center gap-4"},ze=R({__name:"storage",async setup(he){let _,b;const h=U(),{data:r,refresh:C,pending:k}=([_,b]=M(()=>Q("/api/admin/stats","$-MAlPFSlMr")),_=await _,b(),_),$=J("storage").map(o=>({name:o,...K(o)})),B=[{label:"7 days",value:7},{label:"14 days",value:14},{label:"30 days",value:30},{label:"60 days",value:60},{label:"90 days",value:90},{label:"180 days",value:180},{label:"1 year",value:365}],d=y(30),c=y(!1),f=y(!1);async function T(){c.value=!1,f.value=!0;try{const o=await $fetch("/api/admin/cleanup",{method:"DELETE",body:{olderThanDays:d.value}});h.add({title:"Cleanup complete",description:`Deleted ${o.deletedRuns} test run(s) older than ${d.value} days.`,color:"success"}),await C()}catch(o){const e=o&&typeof o=="object"&&"data"in o?o.data?.message:void 0;h.add({title:"Cleanup failed",description:e||"An error occurred",color:"error"})}finally{f.value=!1}}return(o,e)=>{const S=I,V=L,g=q,v=A,E=W,F=G,D=H,P=z;return u(),m(x,null,[t("div",X,[a(g,{icon:"i-lucide-server",title:"Storage backend",help:"settings.storage-backend"},{subtitle:i(()=>[...e[5]||(e[5]=[p(" Configured through environment variables. The active backend is shown read-only. ",-1)])]),default:i(()=>[t("div",Y,[t("div",Z,[a(S,{name:"i-lucide-info",class:"size-4"}),e[6]||(e[6]=p(" Storage backend selection (local disk or S3) and its credentials are set via the environment. Each variable below is shown read-only — hover the lock to see what it controls. ",-1))]),t("div",ee,[(u(!0),m(x,null,O(s($),l=>(u(),m(x,{key:l.name},[t("div",te,n(l.name.replace("PIWI_S3_","S3 ").replace("PIWI_STORAGE_","Storage ")),1),t("div",se,[t("code",oe,n(l.name),1),a(V,{"env-vars":[l.name]},null,8,["env-vars"])])],64))),128))])])]),_:1}),a(g,{icon:"i-lucide-database",title:"Storage statistics",help:"settings.storage-stats"},{footer:i(()=>[a(v,{icon:"i-lucide-refresh-cw",variant:"outline",size:"sm",loading:s(k),label:"Refresh",onClick:e[0]||(e[0]=l=>s(C)())},null,8,["loading"])]),default:i(()=>[s(k)?(u(),m("div",ae,[a(S,{name:"i-lucide-loader-2",class:"animate-spin"}),e[7]||(e[7]=p(" Loading… ",-1))])):s(r)?(u(),m("div",le,[t("div",ne,[e[8]||(e[8]=t("p",{class:"text-sm text-muted"},"Projects",-1)),t("p",ie,n(s(r).totalProjects),1)]),t("div",re,[e[9]||(e[9]=t("p",{class:"text-sm text-muted"},"Test runs",-1)),t("p",de,n(s(r).totalRuns),1)]),t("div",ce,[e[10]||(e[10]=t("p",{class:"text-sm text-muted"},"Test cases (unique)",-1)),t("p",me,n(s(r).totalTestCases),1)]),t("div",ue,[e[11]||(e[11]=t("p",{class:"text-sm text-muted"},"Test results",-1)),t("p",pe,n(s(r).totalRunsCases),1)]),t("div",_e,[e[12]||(e[12]=t("p",{class:"text-sm text-muted"},"Stored files",-1)),t("p",fe,n(s(r).totalFiles),1)]),t("div",ve,[e[13]||(e[13]=t("p",{class:"text-sm text-muted"},"File size (DB)",-1)),t("p",ge,n(("formatBytes"in o?o.formatBytes:s(w))(s(r).totalFileSize)),1)]),t("div",xe,[e[14]||(e[14]=t("p",{class:"text-sm text-muted"},"Storage on disk",-1)),t("p",ye,n(("formatBytes"in o?o.formatBytes:s(w))(s(r).storageSizeOnDisk)),1)])])):j("",!0)]),_:1}),a(g,{icon:"i-lucide-trash-2",title:"Cleanup old test runs",help:"settings.cleanup"},{default:i(()=>[t("div",be,[a(F,{label:"Delete runs older than",name:"period"},{default:i(()=>[a(E,{modelValue:s(d),"onUpdate:modelValue":e[1]||(e[1]=l=>N(d)?d.value=l:null),items:B},null,8,["modelValue"])]),_:1}),a(v,{icon:"i-lucide-trash-2",color:"error",variant:"soft",loading:s(f),label:"Run cleanup",class:"mt-4 sm:mt-5",onClick:e[2]||(e[2]=l=>c.value=!0)},null,8,["loading"])])]),_:1})]),a(P,null,{default:i(()=>[a(D,{open:s(c),title:"Confirm cleanup","onUpdate:open":e[4]||(e[4]=l=>c.value=l)},{body:i(()=>[t("p",null,[e[15]||(e[15]=p(" This will permanently delete all test runs older than ",-1)),t("strong",null,n(s(d))+" days",1),e[16]||(e[16]=p(", along with their associated reports, traces, and test results. This action cannot be undone. ",-1))])]),footer:i(()=>[a(v,{color:"neutral",variant:"ghost",label:"Cancel",onClick:e[3]||(e[3]=l=>c.value=!1)}),a(v,{color:"error",label:"Delete",icon:"i-lucide-trash-2",loading:s(f),onClick:T},null,8,["loading"])]),_:1},8,["open"])]),_:1})],64)}}});export{ze as default};
@@ -1 +0,0 @@
1
- import{_ as Re,a as $e}from"./BMQIO38j.js";import{d as H,z as le,B as se,o as n,f as P,g as u,i as s,j as c,D as G,l as W,k as a,c as p,v as ne,F as U,y as F,p as ie,m as A,t as S,q as _,A as q,r as $,h as N,G as Ee,_ as re,w as oe,b as Oe,aa as Le,I as z}from"./B8fs6GU9.js";import{_ as Be}from"./wCQds5_f.js";import{_ as pe}from"./C7RarFGi.js";import{_ as fe}from"./IdQR_Djw.js";import{_ as ge}from"./PPFO8UVt.js";import{_ as ve}from"./CHgsEM4U.js";import{_ as Fe}from"./CD-xwM9N.js";import{h as We}from"./3SnTawZW.js";import{_ as ye}from"./BBJ9Pu3M.js";import{h as De}from"./CvCF77E-.js";import{u as ae}from"./DAeYEeCC.js";import{_ as Ne}from"./CNzoIhwN.js";import{p as qe,g as Xe}from"./CBrCcDzR.js";import"./n7Htv9PJ.js";import"./DWzdeQ3Z.js";import"./BC_Wu-fv.js";import"./D1tZEdSi.js";import"./YDWXnWou.js";import"./DVdOm5Bg.js";import"./DFw8I2FL.js";import"./B32ySRXg.js";const je={class:"space-y-3"},Ke={key:0,class:"flex items-center justify-center gap-2 py-8 text-gray-400"},ze={key:1,class:"py-8 text-center text-sm text-gray-400"},He={key:2,class:"max-h-96 overflow-y-auto space-y-px"},Ge=["onClick"],Qe={class:"flex-1 min-w-0"},Ye={class:"text-sm font-medium leading-snug truncate"},Ze={key:0,class:"text-gray-500 font-normal"},Je={class:"text-xs text-gray-400 leading-snug mt-0.5"},et={key:3,class:"italic text-gray-500"},tt={key:0,class:"flex items-center gap-1 shrink-0 pt-0.5"},st=["title"],ot=["title"],at={key:0,class:"py-8 text-center text-sm text-gray-400"},lt=H({__name:"ModelPickerModal",props:q({models:{},selected:{},loading:{type:Boolean}},{open:{type:Boolean,required:!0},openModifiers:{}}),emits:q(["select"],["update:open"]),setup(o,{emit:I}){function T(y){return y?y>=1e6?`${(y/1e6).toFixed(1)}M`:y>=1e3?`${Math.round(y/1e3)}K`:String(y):""}const v=o,r=I,k=le(o,"open"),b=$(null),d=$("");se(k,y=>{y&&Ee(()=>b.value?.focus())});const l=N(()=>{const y=d.value.toLowerCase();return y?v.models.filter(i=>i.id.toLowerCase().includes(y)||(i.label?.toLowerCase()??"").includes(y)):v.models}),x={image:{icon:"i-lucide-image",label:"Image input"},pdf:{icon:"i-lucide-file-text",label:"PDF input"},code:{icon:"i-lucide-code",label:"Code execution"},thinking:{icon:"i-lucide-brain",label:"Extended thinking"},json:{icon:"i-lucide-braces",label:"Structured output"},text:{icon:"i-lucide-type",label:"Text"},audio:{icon:"i-lucide-music",label:"Audio"}};function V(y){return y.map(i=>{const C=i.indexOf("→");if(C!==-1){const R=i.slice(0,C),O=i.slice(C+1);return{inputs:R.split("+").filter(Boolean),outputs:O.split("+").filter(Boolean)}}return{inputs:[i],outputs:[]}})}function E(y){r("select",y),k.value=!1,d.value=""}return(y,i)=>{const C=G,R=ne,O=Fe;return n(),P(O,{open:k.value,"onUpdate:open":i[1]||(i[1]=g=>k.value=g),title:"Select a model",ui:{content:"max-w-2xl"}},{body:u(()=>[s("div",je,[c(C,{ref_key:"searchInput",ref:b,modelValue:a(d),"onUpdate:modelValue":i[0]||(i[0]=g=>W(d)?d.value=g:null),placeholder:"Search models…",icon:"i-lucide-search",size:"sm"},null,8,["modelValue"]),o.models.length===0&&o.loading?(n(),p("div",Ke,[c(R,{name:"i-lucide-loader-2",class:"size-4 animate-spin"}),i[2]||(i[2]=s("span",{class:"text-sm"},"Loading models…",-1))])):o.models.length===0?(n(),p("div",ze," No models available — check your provider configuration ")):(n(),p("div",He,[(n(!0),p(U,null,F(a(l),g=>(n(),p("button",{key:g.id,class:ie(["w-full text-left px-4 py-3 rounded-lg hover:bg-elevated transition-colors border border-transparent hover:border-default flex items-start gap-4",o.selected===g.id?"bg-primary/10 ring-1 ring-inset ring-primary/30 border-primary/30":""]),onClick:h=>E(g.id)},[s("div",Qe,[s("p",Ye,[A(S(g.id)+" ",1),g.label&&g.label!==g.id?(n(),p("span",Ze," — "+S(g.label),1)):_("",!0)]),s("p",Je,[g.contextLength?(n(),p(U,{key:0},[A(S(T(g.contextLength))+" ctx",1)],64)):_("",!0),g.maxTokens?(n(),p(U,{key:1},[A(" · up to "+S(T(g.maxTokens))+" out",1)],64)):_("",!0),g.pricing?.prompt?(n(),p(U,{key:2},[A(" · $"+S(g.pricing.prompt)+" / $"+S(g.pricing.completion??"?")+" per 1M",1)],64)):_("",!0),!g.contextLength&&!g.maxTokens&&!g.pricing?.prompt?(n(),p("span",et,"No additional info")):_("",!0)])]),g.modalities?.length?(n(),p("div",tt,[(n(!0),p(U,null,F(V(g.modalities),h=>(n(),p(U,{key:h.inputs.join()+"→"+h.outputs.join()},[(n(!0),p(U,null,F(h.inputs,w=>(n(),p("span",{key:"in-"+w,title:x[w]?.label??w,class:"inline-flex items-center justify-center size-6 rounded-md bg-gray-100 dark:bg-gray-800 text-gray-500 hover:text-primary transition-colors"},[c(R,{name:x[w]?.icon??"i-lucide-cpu",class:"size-3.5"},null,8,["name"])],8,st))),128)),h.outputs.length?(n(),P(R,{key:0,name:"i-lucide-arrow-right",class:"size-3 text-gray-400 shrink-0"})):_("",!0),(n(!0),p(U,null,F(h.outputs,w=>(n(),p("span",{key:"out-"+w,title:x[w]?.label??w,class:"inline-flex items-center justify-center size-6 rounded-md bg-gray-100 dark:bg-gray-800 text-gray-500 hover:text-primary transition-colors"},[c(R,{name:x[w]?.icon??"i-lucide-cpu",class:"size-3.5"},null,8,["name"])],8,ot))),128))],64))),128))])):_("",!0)],10,Ge))),128)),a(l).length===0?(n(),p("div",at,' No models match "'+S(a(d))+'" ',1)):_("",!0)]))])]),_:1},8,["open"])}}}),nt=Object.assign(lt,{__name:"ModelPickerModal"}),it={class:"flex gap-2"},rt=H({__name:"ModelFieldInput",props:q({provider:{},providerResolved:{},reuse:{type:Boolean},models:{},loadingModels:{type:Boolean},placeholderAnthropic:{},placeholderOpenai:{}},{modelValue:{required:!0},modelModifiers:{}}),emits:q(["loadModels"],["update:modelValue"]),setup(o,{emit:I}){const T=I,v=le(o,"modelValue"),r=$(!1);return(k,b)=>{const d=G,l=re,x=nt;return n(),p(U,null,[s("div",it,[c(d,{modelValue:v.value,"onUpdate:modelValue":b[0]||(b[0]=V=>v.value=V),placeholder:o.providerResolved==="anthropic"?o.placeholderAnthropic:o.placeholderOpenai,class:"flex-1"},null,8,["modelValue","placeholder"]),o.providerResolved?(n(),P(l,{key:0,size:"sm",variant:"soft",onClick:b[1]||(b[1]=V=>{T("loadModels"),r.value=!0})},{default:u(()=>[...b[4]||(b[4]=[A(" Choose model… ",-1)])]),_:1})):_("",!0)]),c(x,{open:a(r),"onUpdate:open":b[2]||(b[2]=V=>W(r)?r.value=V:null),models:o.models,selected:v.value,loading:o.loadingModels,onSelect:b[3]||(b[3]=V=>v.value=V)},null,8,["open","models","selected","loading"])],64)}}}),dt=Object.assign(rt,{__name:"ModelFieldInput"}),ct={class:"flex items-start justify-between gap-3"},ut={class:"flex items-start gap-2"},mt={class:"font-medium inline-flex items-center gap-1"},pt={class:"text-sm text-gray-500"},ft={class:"inline-flex items-center gap-1"},gt={class:"inline-flex items-center gap-1"},vt={class:"inline-flex items-center gap-1"},yt={key:3,class:"flex justify-end"},ht=H({__name:"AiRoleConfigForm",props:q({meta:{},hasApiKey:{type:Boolean},reuseOptions:{},providerOptions:{},presetOptions:{},disabled:{type:Boolean},envManaged:{type:Boolean},models:{},loadingModels:{type:Boolean},providerResolved:{},testing:{type:Boolean}},{modelValue:{required:!0},modelModifiers:{}}),emits:q(["applyPreset","loadModels","test"],["update:modelValue"]),setup(o,{emit:I}){const T=o,v=I,r=le(o,"modelValue"),k=N({get:()=>r.value.reuse??"own",set:d=>r.value.reuse=d==="own"?null:d}),b=N(()=>We(T.meta.help));return(d,l)=>{const x=ne,V=Be,E=pe,y=fe,i=ge,C=ve,R=G,O=dt,g=re;return n(),p("div",{class:ie(["rounded-lg border border-default p-4 space-y-4",o.meta.optional&&!r.value.enabled?"opacity-80":""])},[s("div",ct,[s("div",ut,[c(x,{name:o.meta.icon,class:"size-5 mt-0.5 text-primary"},null,8,["name"]),s("div",null,[s("p",mt,[A(S(o.meta.title)+" ",1),c(V,{topic:o.meta.help},null,8,["topic"])]),s("p",pt,S(o.meta.blurb),1)])]),o.meta.optional?(n(),P(E,{key:0,modelValue:r.value.enabled,"onUpdate:modelValue":l[0]||(l[0]=h=>r.value.enabled=h),disabled:o.disabled&&!o.envManaged,"aria-label":o.meta.enableLabel},null,8,["modelValue","disabled","aria-label"])):_("",!0)]),!o.meta.optional||r.value.enabled?(n(),p(U,{key:0},[o.meta.reuseTargets.length?(n(),P(i,{key:0,label:"Provider source"},{default:u(()=>[c(y,{modelValue:a(k),"onUpdate:modelValue":l[1]||(l[1]=h=>W(k)?k.value=h:null),items:o.reuseOptions,disabled:o.disabled&&!o.envManaged,class:"w-full"},null,8,["modelValue","items","disabled"])]),_:1})):_("",!0),r.value.reuse?_("",!0):(n(),p(U,{key:1},[c(i,{label:"Provider"},{label:u(()=>[s("span",ft,[l[9]||(l[9]=A(" Provider ",-1)),o.disabled?(n(),P(C,{key:0,"env-vars":a(b)},null,8,["env-vars"])):_("",!0)])]),default:u(()=>[c(y,{modelValue:r.value.provider,"onUpdate:modelValue":l[2]||(l[2]=h=>r.value.provider=h),items:o.providerOptions,disabled:o.disabled,placeholder:"Choose a provider…",class:"w-full"},null,8,["modelValue","items","disabled"])]),_:1}),r.value.provider==="openai"?(n(),P(i,{key:0,label:"Preset",description:"Pick a known provider to auto-fill the URL and model, then adjust as needed"},{default:u(()=>[c(y,{items:o.presetOptions,placeholder:"Choose a preset…",disabled:o.disabled,class:"w-full","onUpdate:modelValue":l[3]||(l[3]=h=>v("applyPreset",h))},null,8,["items","disabled"])]),_:1})):_("",!0),r.value.provider?(n(),P(i,{key:1,label:"API key",description:o.hasApiKey?"Leave empty to keep the stored key, clear and save to remove it":"Required for Anthropic; optional for local OpenAI-compatible servers"},{label:u(()=>[s("span",gt,[l[10]||(l[10]=A(" API key ",-1)),o.disabled?(n(),P(C,{key:0,"env-vars":a(b)},null,8,["env-vars"])):_("",!0)])]),default:u(()=>[c(R,{modelValue:r.value.apiKey,"onUpdate:modelValue":l[4]||(l[4]=h=>r.value.apiKey=h),type:"password",placeholder:o.hasApiKey?"•••••••• (unchanged)":"sk-…",disabled:o.disabled,class:"w-full font-mono"},null,8,["modelValue","placeholder","disabled"])]),_:1},8,["description"])):_("",!0),r.value.provider==="openai"?(n(),P(i,{key:2,label:"Base URL",description:"Required, e.g. http://localhost:11434/v1"},{label:u(()=>[s("span",vt,[l[11]||(l[11]=A(" Base URL ",-1)),o.disabled?(n(),P(C,{key:0,"env-vars":a(b)},null,8,["env-vars"])):_("",!0)])]),default:u(()=>[c(R,{modelValue:r.value.baseUrl,"onUpdate:modelValue":l[5]||(l[5]=h=>r.value.baseUrl=h),placeholder:"http://localhost:11434/v1",disabled:o.disabled,class:"w-full"},null,8,["modelValue","disabled"])]),_:1})):_("",!0)],64)),r.value.reuse||r.value.provider?(n(),P(i,{key:2,label:"Model",description:r.value.reuse?"Leave empty to use the reused role's model":void 0},{default:u(()=>[c(O,{modelValue:r.value.model,"onUpdate:modelValue":l[6]||(l[6]=h=>r.value.model=h),provider:r.value.provider,"provider-resolved":o.providerResolved,reuse:!!r.value.reuse,models:o.models,"loading-models":o.loadingModels,"placeholder-anthropic":o.meta.modelPlaceholderAnthropic,"placeholder-openai":o.meta.modelPlaceholderOpenai,onLoadModels:l[7]||(l[7]=h=>v("loadModels"))},null,8,["modelValue","provider","provider-resolved","reuse","models","loading-models","placeholder-anthropic","placeholder-openai"])]),_:1},8,["description"])):_("",!0),o.providerResolved?(n(),p("div",yt,[c(g,{size:"xs",color:"neutral",variant:"soft",icon:"i-lucide-plug",loading:o.testing,onClick:l[8]||(l[8]=h=>v("test"))},{default:u(()=>[...l[12]||(l[12]=[A(" Test connection ",-1)])]),_:1},8,["loading"])])):_("",!0)],64)):_("",!0)],2)}}}),bt=Object.assign(ht,{__name:"AiRoleConfigForm"}),_t={key:0,class:"space-y-3"},xt={class:"text-sm text-gray-500"},kt={key:0,class:"text-sm text-gray-500"},At={key:1,class:"overflow-x-auto"},It={class:"w-full text-sm"},Mt={class:"px-2 py-2"},St={class:"font-mono text-xs"},Vt={class:"text-xs text-gray-400"},wt={class:"text-right px-2 py-2"},Pt=["title"],Tt=["title"],Ut={class:"text-right px-2 py-2"},Ct={key:1,class:"flex items-center gap-2 py-4 text-muted"},Rt=H({__name:"AiUsagePanel",async setup(o){let I,T;const v=$(30),r=[{label:"Last 7 days",value:7},{label:"Last 30 days",value:30},{label:"Last 90 days",value:90}],{data:k,pending:b}=([I,T]=oe(()=>ae("/api/settings/ai/usage",{query:{days:v}},"$1ij5UlwVIK")),I=await I,T(),I);function d(l){return l>=1e6?`${(l/1e6).toFixed(1)}M`:l>=1e3?`${(l/1e3).toFixed(1)}k`:String(l)}return(l,x)=>{const V=fe,E=ne,y=ye;return n(),P(y,{icon:"i-lucide-activity",title:"AI usage"},{actions:u(()=>[c(V,{modelValue:a(v),"onUpdate:modelValue":x[0]||(x[0]=i=>W(v)?v.value=i:null),items:r,size:"sm",class:"w-36"},null,8,["modelValue"])]),default:u(()=>[a(k)?(n(),p("div",_t,[s("p",xt,S(d(a(k).totals.diagnoses))+" diagnoses · "+S(d(a(k).totals.inputTokens))+" input tokens · "+S(d(a(k).totals.outputTokens))+" output tokens ",1),a(k).byModel.length===0?(n(),p("p",kt,"No AI calls recorded in this period.")):(n(),p("div",At,[s("table",It,[x[1]||(x[1]=s("thead",null,[s("tr",{class:"text-xs text-gray-500 uppercase tracking-wider border-b border-default"},[s("th",{class:"text-left px-2 py-2 font-medium"},"Model"),s("th",{class:"text-right px-2 py-2 font-medium"},"Diagnoses"),s("th",{class:"text-right px-2 py-2 font-medium"},"Failed"),s("th",{class:"text-right px-2 py-2 font-medium"},"Input tokens"),s("th",{class:"text-right px-2 py-2 font-medium"},"Output tokens"),s("th",{class:"text-right px-2 py-2 font-medium"},"Avg duration")])],-1)),s("tbody",null,[(n(!0),p(U,null,F(a(k).byModel,i=>(n(),p("tr",{key:`${i.provider??"unknown"}/${i.model}`,class:"border-b last:border-b-0 border-default"},[s("td",Mt,[s("span",St,S(i.model),1),s("span",Vt," · "+S(i.provider??"unknown"),1)]),s("td",wt,S(i.diagnoses),1),s("td",{class:ie(["text-right px-2 py-2",i.failed>0?"text-red-600 dark:text-red-400":""])},S(i.failed),3),s("td",{class:"text-right px-2 py-2",title:i.inputTokens.toLocaleString()},S(d(i.inputTokens)),9,Pt),s("td",{class:"text-right px-2 py-2",title:i.outputTokens.toLocaleString()},S(d(i.outputTokens)),9,Tt),s("td",Ut,S(i.avgDurationMs===null?"—":("formatDuration"in l?l.formatDuration:a(De))(i.avgDurationMs)),1)]))),128))])])]))])):a(b)?(n(),p("div",Ct,[c(E,{name:"i-lucide-loader-circle",class:"size-4 animate-spin"}),x[2]||(x[2]=s("span",{class:"text-sm"},"Loading usage…",-1))])):_("",!0)]),_:1})}}}),$t=Object.assign(Rt,{__name:"AiUsagePanel"}),Et=[{key:"sampleErrorChars",label:"Error text characters",envVar:"PIWI_AI_MAX_SAMPLE_ERROR_CHARS",description:"Max characters of raw error text (per error block).",min:200,max:5e4},{key:"scmPatchBudget",label:"SCM patch budget",envVar:"PIWI_AI_MAX_SCM_PATCH_BUDGET",description:"Total characters of diff patches across changed files.",min:0,max:5e4},{key:"affectedTests",label:"Affected tests",envVar:"PIWI_AI_MAX_AFFECTED_TESTS",description:"Max affected tests listed.",min:1,max:200},{key:"steps",label:"Test steps",envVar:"PIWI_AI_MAX_STEPS",description:"Max recent test steps included.",min:1,max:200},{key:"consoleEntries",label:"Console entries",envVar:"PIWI_AI_MAX_CONSOLE_ENTRIES",description:"Max console error/warning entries included.",min:0,max:200},{key:"consoleEntryChars",label:"Console entry characters",envVar:"PIWI_AI_MAX_CONSOLE_ENTRY_CHARS",description:"Max characters per console entry.",min:50,max:5e3},{key:"networkRequests",label:"Network requests",envVar:"PIWI_AI_MAX_NETWORK_REQUESTS",description:"Max failed network requests included.",min:0,max:200},{key:"ariaSnapshotChars",label:"ARIA snapshot characters",envVar:"PIWI_AI_MAX_ARIA_SNAPSHOT_CHARS",description:"Max characters of the page ARIA snapshot.",min:0,max:5e4},{key:"testSourceChars",label:"Test source characters",envVar:"PIWI_AI_MAX_TEST_SOURCE_CHARS",description:"Max characters of the test source snippet.",min:0,max:5e4},{key:"maxSourceFiles",label:"Full source files",envVar:"PIWI_AI_MAX_SOURCE_FILES",description:"Max full source files fetched from SCM to ground patches (0 disables).",min:0,max:20},{key:"sourceFileChars",label:"Source file characters",envVar:"PIWI_AI_MAX_SOURCE_FILE_CHARS",description:"Max characters per fetched full source file.",min:0,max:5e4},{key:"serverLogEntries",label:"Server log entries",envVar:"PIWI_AI_MAX_SERVER_LOG_ENTRIES",description:"Max backend server log entries (from X-Piwi-Logs header) included.",min:0,max:200},{key:"serverLogEntryChars",label:"Server log entry characters",envVar:"PIWI_AI_MAX_SERVER_LOG_ENTRY_CHARS",description:"Max characters per backend server log entry.",min:50,max:5e3},{key:"maxImages",label:"Max screenshots",envVar:"PIWI_AI_MAX_IMAGES",description:"Max screenshots auto-included in the diagnosis context.",min:0,max:20},{key:"maxPassedPeers",label:"Max passed peers",envVar:"PIWI_AI_MAX_PASSED_PEERS",description:"Max peer tests in the same file listed when they passed.",min:0,max:100},{key:"maxConsoleWindow",label:"Console window entries",envVar:"PIWI_AI_MAX_CONSOLE_WINDOW",description:"Max console entries of any type in the window before failure.",min:0,max:200},{key:"slowRequestMs",label:"Slow request threshold (ms)",envVar:"PIWI_AI_SLOW_REQUEST_MS",description:"Network request duration threshold for flagging as slow.",min:100,max:3e4},{key:"maxTraceActions",label:"Trace actions",envVar:"PIWI_AI_MAX_TRACE_ACTIONS",description:"Max actions extracted from trace ZIP for failing-action context (0 disables).",min:0,max:50},{key:"traceDomChars",label:"Trace DOM excerpt characters",envVar:"PIWI_AI_TRACE_DOM_CHARS",description:"Max characters for the trace-derived DOM/ARIA excerpt in failing-action context.",min:0,max:2e4},{key:"traceStackFrames",label:"Trace stack frames",envVar:"PIWI_AI_MAX_TRACE_STACK_FRAMES",description:"Max call-stack frames (with source windows) from the trace (0 disables).",min:0,max:50},{key:"traceNetworkRequests",label:"Trace network requests",envVar:"PIWI_AI_MAX_TRACE_NETWORK_REQUESTS",description:"Max requests from the trace network stream (0 disables).",min:0,max:200},{key:"domSnapshotChars",label:"DOM snapshot characters",envVar:"PIWI_AI_MAX_DOM_SNAPSHOT_CHARS",description:"Max characters of the failure-time DOM snapshot rendered from the trace (0 disables).",min:0,max:5e4},{key:"imageMaxEdge",label:"Screenshot max edge (px)",envVar:"PIWI_AI_IMAGE_MAX_EDGE",description:"Screenshots are downscaled to at most this many pixels on the long edge before being sent.",min:512,max:8192}],Ot={class:"space-y-6"},Lt={class:"space-y-5"},Bt={class:"flex items-center gap-3"},Ft={class:"flex items-center gap-2 justify-end"},Wt={class:"flex justify-end"},Dt={class:"flex justify-end"},Nt={class:"grid grid-cols-1 sm:grid-cols-2 gap-x-4 gap-y-3"},qt={class:"flex justify-end gap-2"},ms=H({__name:"ai",async setup(o){let I,T;const v=Oe(),{data:r,refresh:k}=([I,T]=oe(()=>ae("/api/settings/ai","$nV9xx-QVRl")),I=await I,T(),I);function b(){return{enabled:!1,reuse:null,provider:"",model:"",baseUrl:"",apiKey:""}}const d=z({diagnosis:b(),research:b(),embedding:b()}),l=$(!1),x=$(""),V=$(""),E=$(!1),y=$(!1),i=$(!1),C=z({diagnosis:!1,research:!1,embedding:!1}),R=z({diagnosis:[],research:[],embedding:[]}),O=z({diagnosis:!1,research:!1,embedding:!1});function g(t){const e=d[t];return e.reuse?d[e.reuse]?.provider||"":e.provider}async function h(t){const e=d[t],f=g(t),M=e.reuse?d[e.reuse]:e,ee=M.apiKey||void 0;O[t]=!0;try{const te=await $fetch("/api/settings/ai/models",{method:"POST",body:{role:t,provider:f,baseUrl:M.baseUrl||void 0,apiKey:ee}});R[t]=te.models}catch{R[t]=[]}finally{O[t]=!1}}const w=[{key:"diagnosis",title:"Diagnosis model",icon:"i-lucide-stethoscope",help:"settings.ai-provider",optional:!1,enableLabel:"",blurb:"The main model that writes the final diagnosis. Required to enable AI features.",reuseTargets:[],modelPlaceholderAnthropic:"claude-opus-4-8",modelPlaceholderOpenai:"e.g. gpt-4o, llama3.1"},{key:"research",title:"Research model",icon:"i-lucide-search",help:"settings.ai-research",optional:!0,enableLabel:"Two-stage diagnosis",blurb:"A cheaper/faster model that pre-analyzes the failure before the diagnosis model writes the final answer. Also used for cluster naming and merge adjudication.",reuseTargets:["diagnosis"],modelPlaceholderAnthropic:"e.g. claude-haiku-4-5",modelPlaceholderOpenai:"e.g. llama-3.1-8b-instant"},{key:"embedding",title:"Embedding model",icon:"i-lucide-vector-square",help:"settings.embedding-model",optional:!0,enableLabel:"Semantic clustering",blurb:"Embeds failures so semantically-similar errors group together (used by failure clustering).",reuseTargets:["diagnosis","research"],modelPlaceholderAnthropic:"— Anthropic has no embeddings API —",modelPlaceholderOpenai:"e.g. text-embedding-3-small"}],de=[{label:"Anthropic API",value:"anthropic"},{label:"OpenAI-compatible",value:"openai"}],he=de.filter(t=>t.value!=="anthropic"),be=N(()=>{const t={};for(const e of w)t[e.key]=[{label:"Configure its own provider",value:"own"},...e.reuseTargets.filter(f=>d[f].enabled||f==="diagnosis").filter(f=>e.key!=="embedding"||d[f].provider==="openai").map(f=>({label:`Reuse ${w.find(M=>M.key===f).title.toLowerCase()}`,value:f}))];return t}),D=N(()=>!!r.value?.envManaged),_e=qe(Xe("ai"));se(r,t=>{if(t){for(const e of w){const f=t.roles[e.key],M=d[e.key];M.enabled=!!f,M.reuse=f?.reuse??null,M.provider=f?.provider??"",M.model=f?.model??"",M.baseUrl=f?.baseUrl??"",M.apiKey=""}l.value=t.autoDiagnose,x.value=t.customInstructions||""}},{immediate:!0});function xe(t){return!!r.value?.roles[t]?.hasApiKey}const ce=[{label:"ollama (local)",baseUrl:"http://localhost:11434/v1",model:"llama3.1"},{label:"LM Studio (local)",baseUrl:"http://localhost:1234/v1",model:""},{label:"OpenRouter",baseUrl:"https://openrouter.ai/api/v1",model:"meta-llama/llama-3.1-8b-instruct"},{label:"Groq",baseUrl:"https://api.groq.com/openai/v1",model:"llama-3.1-8b-instant"},{label:"OpenAI",baseUrl:"https://api.openai.com/v1",model:"gpt-4o"},{label:"Mistral AI",baseUrl:"https://api.mistral.ai/v1",model:"mistral-small-latest"},{label:"Custom",baseUrl:"",model:""}],ke=ce.map(t=>({label:t.label,value:t.label}));function Ae(t,e){const f=ce.find(M=>M.label===e);!f||f.label==="Custom"||(d[t].baseUrl=f.baseUrl,d[t].model=f.model)}function Q(t){const e=d[t];if(!e.enabled)return null;if(e.reuse)return{reuse:e.reuse,model:e.model||void 0};const f={provider:e.provider,model:e.model||void 0,baseUrl:e.baseUrl||void 0};return e.apiKey!==""&&(f.apiKey=e.apiKey),f}async function Ie(){E.value=!0;try{!D&&(!d.diagnosis.enabled||!d.diagnosis.provider)?await $fetch("/api/settings/ai",{method:"PUT",body:{roles:null,autoDiagnose:l.value}}):await $fetch("/api/settings/ai",{method:"PUT",body:{roles:{diagnosis:Q("diagnosis"),research:Q("research"),embedding:Q("embedding")},autoDiagnose:l.value}}),await k();for(const t of w)d[t.key].apiKey="";v.add({title:"Settings saved",color:"success"})}catch(t){v.add({title:"Save failed",description:String(t?.message??t),color:"error"})}finally{E.value=!1}}async function Me(){i.value=!0;try{await $fetch("/api/settings/ai",{method:"PUT",body:{scmToken:V.value||null}}),await k(),V.value="",v.add({title:"SCM token saved",color:"success"})}catch(t){v.add({title:"Save failed",description:String(t?.message??t),color:"error"})}finally{i.value=!1}}async function Se(){y.value=!0;try{await $fetch("/api/settings/ai",{method:"PUT",body:{customInstructions:x.value||null}}),await k(),v.add({title:"Instructions saved",color:"success"})}catch(t){v.add({title:"Save failed",description:String(t?.message??t),color:"error"})}finally{y.value=!1}}async function Ve(t){C[t]=!0;try{const e=d[t],f=e.reuse?d[e.reuse]:e,M=await $fetch("/api/settings/ai/test",{method:"POST",body:{role:t,provider:f.provider||void 0,apiKey:f.apiKey||void 0,model:e.model||(e.reuse?f.model:"")||void 0,baseUrl:f.baseUrl||void 0}});M.success?v.add({title:"Connection successful",description:`Model: ${M.model}`,color:"success"}):v.add({title:"Connection failed",description:M.error||"Unknown error",color:"error"})}catch(e){v.add({title:"Connection failed",description:String(e?.message??e),color:"error"})}finally{C[t]=!1}}const{data:L}=([I,T]=oe(()=>ae("/api/settings/ai/limits","$cSpsteApgW")),I=await I,T(),I),Y=Et,X=z({}),Z=$(!1),J=N(()=>new Set(L.value?.envManaged??[]));se(L,t=>{if(t)for(const e of Y)X[e.key]=t.limits[e.key]},{immediate:!0});async function we(){Z.value=!0;try{L.value=await $fetch("/api/settings/ai/limits",{method:"PUT",body:{limits:X}}),v.add({title:"Context limits saved",color:"success"})}catch(t){v.add({title:"Failed to save context limits",description:String(t?.message??t),color:"error"})}finally{Z.value=!1}}function Pe(){if(L.value)for(const t of Y)J.value.has(t.key)||(X[t.key]=L.value.defaults[t.key])}return(t,e)=>{const f=Re,M=bt,ee=pe,te=$e,j=re,K=ye,Te=$t,ue=G,me=ge,Ue=Ne,Ce=ve;return n(),p("div",Ot,[a(D)?(n(),P(f,{key:0,"env-vars":a(_e)},null,8,["env-vars"])):_("",!0),c(K,{icon:"i-lucide-sparkles",title:"Model providers",help:"settings.ai-provider"},{subtitle:u(()=>[...e[3]||(e[3]=[A(" Configure a complete provider for each model role. Optional roles can reuse another role's provider so you don't re-enter credentials. ",-1)])]),footer:u(()=>[s("div",Ft,[c(j,{color:"primary",loading:a(E),icon:"i-lucide-save",onClick:Ie},{default:u(()=>[...e[5]||(e[5]=[A(" Save ",-1)])]),_:1},8,["loading"])])]),default:u(()=>[s("div",Lt,[(n(),p(U,null,F(w,m=>c(M,{key:m.key,modelValue:a(d)[m.key],"onUpdate:modelValue":B=>a(d)[m.key]=B,meta:m,"has-api-key":xe(m.key),"reuse-options":a(be)[m.key],"provider-options":m.key==="embedding"?a(he):de,"preset-options":a(ke),disabled:a(D),"env-managed":a(D),"provider-resolved":g(m.key),models:a(R)[m.key],"loading-models":a(O)[m.key],testing:a(C)[m.key],onApplyPreset:B=>Ae(m.key,B),onLoadModels:B=>h(m.key),onTest:B=>Ve(m.key)},null,8,["modelValue","onUpdate:modelValue","meta","has-api-key","reuse-options","provider-options","preset-options","disabled","env-managed","provider-resolved","models","loading-models","testing","onApplyPreset","onLoadModels","onTest"])),64)),c(te,{label:"Auto-diagnose",help:"settings.auto-diagnose","env-managed":a(D)},{default:u(()=>[s("div",Bt,[c(ee,{modelValue:a(l),"onUpdate:modelValue":e[0]||(e[0]=m=>W(l)?l.value=m:null),disabled:a(D)||!a(d).diagnosis.enabled},null,8,["modelValue","disabled"]),e[4]||(e[4]=s("span",{class:"text-sm text-gray-500"}," Automatically diagnose new failure clusters when a run finishes — up to 3 clusters per run (research + diagnosis call each), plus one batched call to title new clusters ",-1))])]),_:1},8,["env-managed"])])]),_:1}),c(Te),c(K,{title:"Repository access",help:"project.scm-token"},{subtitle:u(()=>[...e[6]||(e[6]=[A(" Optional — required for private repositories. Per-project tokens override this. ",-1)])]),footer:u(()=>[s("div",Wt,[c(j,{color:"primary",loading:a(i),icon:"i-lucide-save",onClick:Me},{default:u(()=>[...e[7]||(e[7]=[A(" Save token ",-1)])]),_:1},8,["loading"])])]),default:u(()=>[c(me,{label:"SCM token",description:a(r)?.hasScmToken?"Leave empty to keep the stored token, enter a new value to replace it, or save empty to remove it":"Personal access token with read access to repository contents. Supports GitHub (ghp_), GitLab (glpat-), and Bitbucket tokens."},{default:u(()=>[c(ue,{modelValue:a(V),"onUpdate:modelValue":e[1]||(e[1]=m=>W(V)?V.value=m:null),type:"password",placeholder:a(r)?.hasScmToken?"•••••••• (unchanged)":"ghp_..., glpat-..., or Bitbucket token",class:"w-full font-mono"},null,8,["modelValue","placeholder"])]),_:1},8,["description"])]),_:1}),c(K,{title:"Global analysis instructions",help:"settings.ai-instructions"},{footer:u(()=>[s("div",Dt,[c(j,{color:"primary",loading:a(y),icon:"i-lucide-save",onClick:Se},{default:u(()=>[...e[8]||(e[8]=[A(" Save instructions ",-1)])]),_:1},8,["loading"])])]),default:u(()=>[c(Ue,{modelValue:a(x),"onUpdate:modelValue":e[2]||(e[2]=m=>W(x)?x.value=m:null),rows:6,placeholder:"e.g. Always suggest running failing tests with --repeat-each 5 to confirm flakiness. Prefer network-level evidence over ARIA snapshots. Recommend git bisect when a commit range is available.",class:"w-full font-mono text-sm"},null,8,["modelValue"]),e[9]||(e[9]=s("p",{class:"text-xs text-gray-400 mt-2"}," These instructions are appended to the base system prompt. They shape how the AI analyzes failures but cannot override the response schema or confidence requirement. ",-1))]),_:1}),c(K,{title:"Diagnosis context limits",help:"settings.ai-limits"},{subtitle:u(()=>[...e[10]||(e[10]=[A(" Leave a field empty to use its default; env-managed fields are read-only. ",-1)])]),footer:u(()=>[s("div",qt,[c(j,{color:"neutral",variant:"ghost",size:"sm",onClick:Pe},{default:u(()=>[...e[11]||(e[11]=[A("Reset to defaults",-1)])]),_:1}),c(j,{color:"primary",loading:a(Z),icon:"i-lucide-save",size:"sm",onClick:we},{default:u(()=>[...e[12]||(e[12]=[A(" Save limits ",-1)])]),_:1},8,["loading"])])]),default:u(()=>[s("div",Nt,[(n(!0),p(U,null,F(a(Y),m=>(n(),P(me,{key:m.key,label:m.label,description:m.description,hint:`default ${a(L)?.defaults[m.key]??""}`},{default:u(()=>[c(ue,{modelValue:a(X)[m.key],"onUpdate:modelValue":B=>a(X)[m.key]=B,modelModifiers:{number:!0},type:"number",min:m.min,max:m.max,disabled:a(J).has(m.key),placeholder:`default ${a(L)?.defaults[m.key]??""}`,class:"w-full"},Le({_:2},[a(J).has(m.key)?{name:"trailing",fn:u(()=>[c(Ce,{"env-vars":[m.envVar]},null,8,["env-vars"])]),key:"0"}:void 0]),1032,["modelValue","onUpdate:modelValue","min","max","disabled","placeholder"])]),_:2},1032,["label","description","hint"]))),128))])]),_:1}),c(K,{icon:"i-lucide-shield-check",title:"Privacy notice",help:"settings.privacy"},{default:u(()=>[...e[13]||(e[13]=[s("div",{class:"space-y-2 text-sm text-gray-600 dark:text-gray-400"},[s("p",null,"When diagnosing a failure cluster, the following data is sent to the configured LLM provider:"),s("ul",{class:"list-disc list-inside space-y-1 ml-2"},[s("li",null,"Normalized error signature and sample raw error text"),s("li",null,"Test titles and file paths for affected tests"),s("li",null,"Browser info, test steps, console error/warning entries (excerpts)"),s("li",null,"Failed network request URLs and status codes"),s("li",null,"ARIA page snapshot (if collected)"),s("li",null," Commit SHA range since last passing run, plus changed file names and diff patches fetched from GitHub/GitLab/Bitbucket (if a repository token is configured or the repo is public) ")]),s("p",{class:"mt-2"},[A(" API keys are stored encrypted in the application database (admin-only access). For stricter setups, use the "),s("code",{class:"font-mono text-xs"},"PIWI_AI_*"),A(" environment variables instead of the UI. ")])],-1)])]),_:1})])}}});export{ms as default};
@@ -1 +0,0 @@
1
- import{b$ as s}from"./B8fs6GU9.js";import{h as n}from"./3SnTawZW.js";const l=[{id:"account",label:"Account",icon:"i-lucide-user-round",to:"/settings/account",fields:[{id:"account.display-name",label:"Display name",help:"account.display-name"},{id:"account.email",label:"Email address",help:"account.email"},{id:"account.connected-accounts",label:"Connected accounts",help:"account.connected-accounts"},{id:"account.password",label:"Password",help:"account.password"},{id:"account.auth-toggle",label:"Authentication",help:"settings.auth-toggle",envOnly:!0}]},{id:"users",label:"Users",icon:"i-lucide-users",to:"/settings/users",roles:[s.ADMINISTRATOR],introHelp:"settings.users",fields:[{id:"users.list",label:"Users & roles",help:"settings.users"},{id:"users.api-keys",label:"API keys",help:"settings.api-keys"}]},{id:"notifications",label:"Notifications",icon:"i-lucide-bell",to:"/settings/notifications",fields:[{id:"notifications.smtp",label:"SMTP email delivery",help:"settings.smtp",envOnly:!0},{id:"notifications.test-email",label:"Send test email",help:"notifications.test-email"},{id:"notifications.channels",label:"Notification channels",help:"notifications.channels"},{id:"notifications.subscriptions",label:"My subscriptions",help:"notifications.subscriptions"}]},{id:"tags",label:"Tags",icon:"i-lucide-tags",to:"/settings/tags",roles:[s.ADMINISTRATOR],introHelp:"settings.tags",fields:[{id:"tags.list",label:"Tags",help:"settings.tags"}]},{id:"storage",label:"Storage",icon:"i-lucide-hard-drive",to:"/settings/storage",roles:[s.ADMINISTRATOR],fields:[{id:"storage.backend",label:"Storage backend",help:"settings.storage-backend",envOnly:!0},{id:"storage.stats",label:"Storage statistics",help:"settings.storage-stats"},{id:"storage.cleanup",label:"Cleanup old test runs",help:"settings.cleanup"}]},{id:"wasted-time",label:"Wasted time",icon:"i-lucide-hourglass",to:"/settings/wasted-time",roles:[s.ADMINISTRATOR],introHelp:"settings.wasted-time",fields:[{id:"wasted-time.patterns",label:"Wasted-time patterns",help:"settings.wasted-time"}]},{id:"ai",label:"AI diagnosis",icon:"i-lucide-sparkles",to:"/settings/ai",roles:[s.ADMINISTRATOR],fields:[{id:"ai.diagnosis",label:"Diagnosis model",help:"settings.ai-provider"},{id:"ai.research",label:"Research model",help:"settings.ai-research"},{id:"ai.embedding",label:"Embedding model",help:"settings.embedding-model"},{id:"ai.auto-diagnose",label:"Auto-diagnose",help:"settings.auto-diagnose"},{id:"ai.context-limits",label:"Diagnosis context limits",help:"settings.ai-limits"},{id:"ai.instructions",label:"Global analysis instructions",help:"settings.ai-instructions"},{id:"ai.scm-token",label:"Repository access token",help:"project.scm-token"},{id:"ai.privacy",label:"Privacy notice",help:"settings.privacy"}]},{id:"about",label:"About",icon:"i-lucide-info",to:"/settings/about",fields:[]}];function o(e){return n(e.help)}function r(e){const i=new Set;for(const t of e.fields)for(const a of o(t))i.add(a);return[...i]}function g(e){const i=l.find(t=>t.id===e);if(!i)throw new Error(`Unknown settings page: ${e}`);return i}export{l as S,g,r as p};
@@ -1,3 +0,0 @@
1
- import{_ as U,a as O}from"./C9jjVEQU.js";import{_ as z}from"./n7Htv9PJ.js";import{d as L,e as M,f,g as i,K as E,o as d,i as e,k as o,q as B,j as r,c as y,F as N,y as G,v as Y,t as l,m as s,_ as F,h as a}from"./B8fs6GU9.js";import{_ as H}from"./BBJ9Pu3M.js";import{_ as K}from"./0KrkW531.js";import{_ as W}from"./BCK4f6Y3.js";import"./BtJkQ3to.js";import"./wCQds5_f.js";import"./3SnTawZW.js";import"./DWzdeQ3Z.js";import"./B32ySRXg.js";import"./CvCF77E-.js";import"./B_80i5Ge.js";const $=[{name:"list_projects",description:"List all projects with stats: total runs, test cases, latest run status and branch. Use this first to discover available projects and their IDs.",inputSchema:{type:"object",properties:{}}},{name:"get_project",description:"Get project details and its recent test runs with pass/fail counts. Results are paginated — use pageSize and cursor for the runs list.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Project ID from list_projects"},pageSize:{type:"number",description:"Runs per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page of runs"}},required:["id"]}},{name:"list_runs",description:"List test runs for a project with filters.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},status:{type:"string",enum:["passed","failed","running","initialising","aborted"],description:"Filter by status"},branch:{type:"string",description:"Filter by branch name (exact match against SCM metadata)"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"}},required:["projectId"]}},{name:"get_run",description:"Get a test run summary plus its test cases (paginated), with status, truncated error text, and failure cluster IDs. Filter by status and page with pageSize/cursor.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run ID"},status_filter:{type:"string",enum:["failed","flaky","all"],description:'Which test cases to include (default: "failed" — only failed+timedOut; "flaky" — only flaky; "all" — every case)'},pageSize:{type:"number",description:"Cases per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response for the next page of cases"}},required:["id"]}},{name:"list_failed_cases",description:"List failed and timed-out test cases across recent runs for a project.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"},runId:{type:"number",description:"Optional: restrict to a specific run"}},required:["projectId"]}},{name:"list_flaky_tests",description:"List flaky tests for a project with flakiness scores.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},runs:{type:"number",description:"Number of recent runs to analyze (default 50, max 200)"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response. Cursor is the flakyScore value (descending)."}},required:["projectId"]}},{name:"get_test_case",description:"Get test case details including aggregated pass/fail stats, flakiness metrics, and recent executions (paginated). Use testCaseId (stable identity), not the per-run caseId.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test case ID (testCaseId from list_failed_cases or list_flaky_tests)"},pageSize:{type:"number",description:"Executions per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page of executions"}},required:["id"]}},{name:"list_clusters",description:"List failure clusters for a project. Each cluster groups similar failures by error fingerprint.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},status:{type:"string",enum:["open","resolved","ignored"],description:"Filter by triage status (default: all statuses)"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"}},required:["projectId"]}},{name:"get_cluster",description:"Get full details for a failure cluster including all affected test cases, a compact diagnosis summary, and locator healing suggestions for up to 5 affected cases. Each healing entry includes the failing locator, the recommended fix, and the number of alternatives available. Use get_cluster_diagnosis for the full diagnosis text, or get_cluster_context for the raw AI evidence.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID from list_clusters"}},required:["id"]}},{name:"get_cluster_diagnosis",description:"Get the stored AI diagnosis for a failure cluster. Returns category, confidence, root cause, evidence, and suggested fix. Returns null if no diagnosis has been run yet.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID"}},required:["id"]}},{name:"get_test_case_context",description:"Get the AI evidence context for a specific test-run-case (execution scope). Use this when debugging a single test failure — it provides the execution-scoped evidence including steps, console, network, and SCM diff.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run case ID"}},required:["id"]}},{name:"get_case_screenshots",description:"Get screenshots for a test-run-case. By default returns metadata only (name, type, size). Set content=true to include base64-encoded image data (max 3, capped at ~100 KB each). Call metadata-only first to discover what exists, then request content for the ones you need.",inputSchema:{type:"object",properties:{testRunsCaseId:{type:"number",description:"Test run case ID"},content:{type:"boolean",description:"Include base64 image data (default false — metadata only)"}},required:["testRunsCaseId"]}},{name:"get_cluster_context",description:"Get the full AI evidence context for a failure cluster — the same data sent to the diagnosis AI. Includes error samples, stack traces, test steps, console logs, network failures, ARIA snapshots, SCM diff (changed files since last green run), and a per-section breakdown with char counts and truncation flags. This is the richest available evidence for debugging a failure.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID"},baseCommit:{type:"string",description:"Optional: override the baseline commit SHA for SCM diff comparison"},selectedCommitShas:{type:"array",items:{type:"string"},description:"Optional: specific commit SHAs to include in the diff context (max 10)"}},required:["id"]}},{name:"search_test_cases",description:"Search test cases by title or file path within a project. Accepts a free-text query and returns matching test cases with basic stats. Use this to find a test case when you don't know its ID.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},q:{type:"string",description:"Search query — matched against title and file path (case-insensitive)"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"}},required:["projectId","q"]}},{name:"get_test_run_case",description:"Get a single test-run-case execution record with full (untruncated) error text plus steps, console logs, web vitals, and ARIA snapshot. Use include to fetch only the blobs you need. The ID is the executionId from get_run.cases or testRunsCaseId from get_cluster.affectedTestCases.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run case ID (executionId from get_run.cases or testRunsCaseId from get_cluster.affectedTestCases)"},include:{type:"array",items:{type:"string",enum:["steps","console","webVitals","aria","source"]},description:"Optional: which heavy blobs to include (default: all). The error, status, and summary are always returned."}},required:["id"]}},{name:"list_recent_activity",description:"List the most recent test runs across all projects. No projectId required — returns a cross-project view of recent CI activity. Paginated by startTime descending.",inputSchema:{type:"object",properties:{pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"}}}},{name:"get_repo_commits",description:"List recent commits for a project's repository. Requires SCM token configuration (per-project or global). Returns commit details (SHA, message, author, date).",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},branch:{type:"string",description:"Branch name (default: repository default branch)"},limit:{type:"number",description:"Max commits (default 20, max 100)"}},required:["projectId"]}},{name:"get_repo_diff",description:"Get the diff (changed files with patches) for a single commit in a project's repository. Requires SCM token configuration (per-project or global). Useful for inspecting what code changed in a specific commit suspected of causing a failure.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},sha:{type:"string",description:"Full commit SHA"}},required:["projectId","sha"]}},{name:"get_run_insights",description:'Compare a run to its last green baseline: pass-rate delta, new regressions, recurrences, recovered tests, new flaky tests, biggest perf improvements/regressions, worker imbalance, and newly opened clusters. Use this to answer "what changed?" and "did my fix work?".',inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run ID"}},required:["id"]}},{name:"get_spec_health",description:"Per-spec-file health for a project: pass rate, flaky rate, failure count, test count, and average duration grouped by spec-file prefix over the last N days. Use to find which areas of the suite are unhealthy.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},days:{type:"number",description:"Lookback window in days (default 30, max 90)"}},required:["projectId"]}},{name:"get_slow_tests",description:"Slowest test cases in a project by average duration, with max/min and trend direction across recent runs. Use to target performance work.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},runs:{type:"number",description:"Recent runs to analyze (default 50, max 100)"}},required:["projectId"]}},{name:"get_performance_trend",description:'Time series of run duration, average test duration, and p90 test duration for a project. Use to answer "is the suite getting slower?".',inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},limit:{type:"number",description:"Number of recent runs (default 30, max 100)"}},required:["projectId"]}},{name:"get_test_stability_trend",description:'Time-series stability for a single test case: flaky rate, pass rate, and average duration bucketed over its recent execution history. Use to answer "is this test getting flakier?".',inputSchema:{type:"object",properties:{id:{type:"number",description:"Test case ID (stable testCaseId)"},buckets:{type:"number",description:"Number of time buckets (default 20, 5–50)"}},required:["id"]}},{name:"get_network_requests",description:"A run's network requests aggregated by method + normalized route, sorted by average duration, with status codes and captured backend server logs. Use to pin a UI failure on a slow or failing endpoint.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run ID"}},required:["id"]}},{name:"get_failure_groups",description:"One run's failures grouped by failure cluster, with per-group affected cases and worker correlation. Run-scoped counterpart to list_clusters.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Test run ID"}},required:["id"]}},{name:"get_locator_healing",description:"Ranked alternative locators for a failing test-run-case: the failing locator, the recommended durable fix, and the full alternative lists (from prior success, element match, and ARIA snapshot). Use when fixing a broken selector.",inputSchema:{type:"object",properties:{testRunsCaseId:{type:"number",description:"Test run case ID (executionId)"}},required:["testRunsCaseId"]}},{name:"search",description:"Global search across all in-scope projects, runs (by label or numeric id), and test cases (by title). Use to find a run by its label or locate an entity across projects.",inputSchema:{type:"object",properties:{q:{type:"string",description:"Search query (min 2 chars)"}},required:["q"]}},{name:"list_case_traces",description:"List Playwright trace files for a test-run-case, with a download path for each. Fetch the bytes via GET /api/files/<path>.",inputSchema:{type:"object",properties:{testRunsCaseId:{type:"number",description:"Test run case ID (executionId)"}},required:["testRunsCaseId"]}},{name:"list_links",description:"List external entity links (Jira, GitHub PR/issue, etc.) attached to a run, test-run-case, or test case, with provider and unfurled status.",inputSchema:{type:"object",properties:{entityType:{type:"string",enum:["test_run","test_runs_case","test_case"],description:"Which entity the links are attached to"},id:{type:"number",description:"The entity ID matching entityType"}},required:["entityType","id"]}},{name:"list_tags",description:"List the project tag catalog (id, text, color).",inputSchema:{type:"object",properties:{}}},{name:"get_project_test_catalog",description:"The full test-case catalog for a project with aggregated pass/fail/flaky counts, average duration, and last status per test. Offset-paginated bulk companion to get_test_case.",inputSchema:{type:"object",properties:{projectId:{type:"number",description:"Project ID"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},offset:{type:"number",description:"Row offset for paging (default 0)"},query:{type:"string",description:"Optional case-insensitive substring filter on title or file path"}},required:["projectId"]}},{name:"list_open_clusters",description:"Open failure clusters across all in-scope projects, ranked by occurrences — a cross-project triage queue. Filter by status; paginate with pageSize/cursor.",inputSchema:{type:"object",properties:{status:{type:"string",enum:["open","resolved","ignored"],description:"Triage status (default: open)"},pageSize:{type:"number",description:"Results per page (default 10, max 50)"},cursor:{type:"string",description:"Opaque cursor from a previous response to get the next page"}}}},{name:"get_instance_stats",description:"Instance-wide counts (projects, runs, test cases, executions, files) and total storage size. Admin only.",inputSchema:{type:"object",properties:{}}},{name:"explain_failure",description:"One-call evidence bundle for a single failing execution: error, steps, console, ARIA snapshot, the recommended locator fix, a screenshot count, and the AI diagnosis context. Prefer this over chaining get_test_run_case + get_locator_healing + get_test_case_context.",inputSchema:{type:"object",properties:{testRunsCaseId:{type:"number",description:"Test run case ID (executionId)"}},required:["testRunsCaseId"]}},{name:"set_cluster_status",description:"Triage a failure cluster: set its status to open, resolved, or ignored with an optional note. Requires reporter or admin access. Use after fixing the underlying issue.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID"},status:{type:"string",enum:["open","resolved","ignored"],description:"New triage status"},triageNote:{type:"string",description:"Optional note explaining the status change"}},required:["id","status"]}},{name:"set_cluster_base_commit",description:'Pin the baseline commit SHA a cluster uses for its SCM-diff diagnosis context, so "what changed since green" is accurate. Requires reporter or admin access.',inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID"},commit:{type:"string",description:"Baseline commit SHA (empty to clear)"}},required:["id","commit"]}},{name:"submit_diagnosis_feedback",description:"Record thumbs up/down feedback on a stored diagnosis, with an optional note. Requires reporter or admin access.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Diagnosis ID"},feedback:{type:"string",enum:["up","down"],description:"Rating (omit to clear)"},feedbackNote:{type:"string",description:"Optional note"}},required:["id"]}},{name:"run_cluster_diagnosis",description:"Trigger an AI diagnosis for a failure cluster and return the result (category, confidence, root cause, suggested fix). Returns the existing completed diagnosis unless force is set. Requires reporter or admin access and a configured AI provider.",inputSchema:{type:"object",properties:{id:{type:"number",description:"Cluster ID"},force:{type:"boolean",description:"Re-run even if a completed diagnosis exists (default false)"},baseCommit:{type:"string",description:"Optional baseline commit SHA for SCM-diff context"}},required:["id"]}}];function V(h){return new URL(globalThis.location.href)}const J={class:"max-w-3xl mx-auto p-6 space-y-6"},Q={class:"flex flex-col gap-1.5"},X={class:"min-w-0"},Z={class:"text-sm font-mono font-semibold text-foreground"},ee={class:"text-xs text-gray-500 dark:text-gray-400 mt-0.5"},te={class:"space-y-3"},se={class:"space-y-3"},re={class:"space-y-3"},ie={class:"space-y-3"},oe={class:"space-y-3"},ne={class:"space-y-3"},ae={class:"space-y-2"},ce={class:"flex items-center gap-2"},pe={class:"flex-1 px-3 py-2 bg-muted rounded-md text-sm font-mono break-all"},ve=L({__name:"mcp",setup(h){const m=E(),g=m.public.demoMode,b=V(),n=a(()=>`${m.public.siteUrl||b.origin}/mcp`);M({title:"MCP server — Piwi Dashboard"});const _=$,x=[{label:"Claude Code",slot:"claude-code"},{label:"Cursor",slot:"cursor"},{label:"VS Code",slot:"vscode"},{label:"Claude Desktop",slot:"claude-desktop"},{label:"Gemini CLI",slot:"gemini"},{label:"Windsurf / Continue",slot:"windsurf"}],I=a(()=>`claude mcp add --transport http piwi ${n.value} \\
2
- --header "Authorization: Bearer pd_YOUR_API_KEY"`),j=a(()=>JSON.stringify({mcpServers:{piwi:{url:n.value,headers:{Authorization:"Bearer pd_YOUR_API_KEY"}}}},null,2)),v=a(()=>JSON.stringify({servers:{piwi:{type:"http",url:n.value,headers:{Authorization:"Bearer pd_YOUR_API_KEY"}}}},null,2)),w=a(()=>JSON.stringify({mcpServers:{piwi:{type:"http",url:n.value,headers:{Authorization:"Bearer pd_YOUR_API_KEY"}}}},null,2)),S=a(()=>`gemini mcp add --transport http piwi ${n.value} \\
3
- --header "Authorization: Bearer pd_YOUR_API_KEY"`),k=a(()=>JSON.stringify({mcpServers:{piwi:{serverUrl:n.value,headers:{Authorization:"Bearer pd_YOUR_API_KEY"}}}},null,2));return(C,t)=>{const q=O,R=z,A=Y,p=H,c=K,P=W,D=F,T=U;return d(),f(T,null,{header:i(()=>[r(q,{title:"MCP server"})]),body:i(()=>[e("div",J,[o(g)?(d(),f(R,{key:0,color:"info",icon:"i-lucide-bot",title:"Feature preview",description:"The MCP endpoint is not active in this demo — it requires a real Piwi backend. The tools and client setup shown below reflect what your own deployment exposes."})):B("",!0),r(p,{icon:"i-lucide-bot",title:"What it provides",help:"mcp.tools"},{default:i(()=>[e("div",Q,[(d(!0),y(N,null,G(o(_),u=>(d(),y("div",{key:u.name,class:"flex items-start gap-3 px-3 py-2.5 rounded-md bg-elevated/50 border border-default hover:bg-elevated transition-colors"},[r(A,{name:"i-lucide-wrench",class:"size-4 mt-0.5 shrink-0 text-primary"}),e("div",X,[e("p",Z,l(u.name),1),e("p",ee,l(u.description),1)])]))),128))])]),_:1}),r(p,{icon:"i-lucide-key",title:"Authentication",help:"mcp.auth"},{default:i(()=>[...t[0]||(t[0]=[e("div",{class:"space-y-3 text-sm text-gray-600 dark:text-gray-400"},[e("p",null,[s(" MCP requests are authenticated with the same API keys used by the REST API. API keys start with "),e("code",{class:"px-1 py-0.5 bg-muted rounded text-xs font-mono"},"pd_"),s(". ")]),e("p",null,[s(" Generate a key in "),e("strong",null,"Settings → Users → [your account] → API keys"),s(", then replace "),e("code",{class:"px-1 py-0.5 bg-muted rounded text-xs font-mono"},"pd_YOUR_API_KEY"),s(" in the snippets below. ")]),e("p",{class:"text-xs text-gray-400"},[s(" When authentication is disabled ("),e("code",{class:"font-mono"},"PIWI_AUTH_ENABLED"),s(" not set), any request is accepted without a key. ")])],-1)])]),_:1}),r(p,{icon:"i-lucide-settings-2",title:"Client setup",help:"mcp.client-setup"},{default:i(()=>[t[13]||(t[13]=e("p",{class:"text-sm text-gray-500 dark:text-gray-400 mb-4"},[s(" Replace "),e("code",{class:"px-1 py-0.5 bg-muted rounded text-xs font-mono"},"pd_YOUR_API_KEY"),s(" with your actual API key. The MCP URL shown below is auto-detected from your current browser origin. ")],-1)),r(P,{items:x,ui:{list:"mb-4"}},{"claude-code":i(()=>[e("div",te,[t[1]||(t[1]=e("p",{class:"text-sm text-gray-600 dark:text-gray-400"}," Run once in any terminal. Claude Code stores the server in your global MCP config. ",-1)),r(c,{code:o(I),lang:"sh"},null,8,["code"]),t[2]||(t[2]=e("p",{class:"text-xs text-gray-400"},[s(" After adding, restart Claude Code and use "),e("code",{class:"font-mono"},"/mcp"),s(" to verify "),e("strong",null,"piwi"),s(" is connected. Claude will call the tools automatically when you ask about test results or failures. ")],-1))])]),cursor:i(()=>[e("div",se,[t[3]||(t[3]=e("p",{class:"text-sm text-gray-600 dark:text-gray-400"},[s(" Add to "),e("code",{class:"font-mono text-xs"},"~/.cursor/mcp.json"),s(" (global) or "),e("code",{class:"font-mono text-xs"},".cursor/mcp.json"),s(" in your project root: ")],-1)),r(c,{code:o(j),lang:"json"},null,8,["code"]),t[4]||(t[4]=e("p",{class:"text-xs text-gray-400"}," Restart Cursor, then enable the MCP server in Cursor Settings → MCP. ",-1))])]),vscode:i(()=>[e("div",re,[t[5]||(t[5]=e("p",{class:"text-sm text-gray-600 dark:text-gray-400"},[s(" Add to "),e("code",{class:"font-mono text-xs"},".vscode/mcp.json"),s(" in your workspace (VS Code Copilot agent mode, version 1.99+): ")],-1)),r(c,{code:o(v),lang:"json"},null,8,["code"]),t[6]||(t[6]=e("p",{class:"text-xs text-gray-400"}," The server appears in the Copilot chat agent drop-down once the file is saved. ",-1))])]),"claude-desktop":i(()=>[e("div",ie,[t[7]||(t[7]=e("p",{class:"text-sm text-gray-600 dark:text-gray-400"},"Add to your Claude Desktop config file:",-1)),t[8]||(t[8]=e("ul",{class:"text-xs text-gray-400 space-y-0.5 mb-2"},[e("li",null,[e("strong",null,"macOS:"),e("code",{class:"font-mono"},"~/Library/Application Support/Claude/claude_desktop_config.json")]),e("li",null,[e("strong",null,"Windows:"),e("code",{class:"font-mono"},"%APPDATA%\\Claude\\claude_desktop_config.json")])],-1)),r(c,{code:o(w),lang:"json"},null,8,["code"]),t[9]||(t[9]=e("p",{class:"text-xs text-gray-400"}," Requires Claude Desktop with remote MCP support (released early 2025). Restart the app after saving. ",-1))])]),gemini:i(()=>[e("div",oe,[t[10]||(t[10]=e("p",{class:"text-sm text-gray-600 dark:text-gray-400"},"Run once to register the server with Gemini CLI:",-1)),r(c,{code:o(S),lang:"sh"},null,8,["code"]),t[11]||(t[11]=e("p",{class:"text-xs text-gray-400"}," Gemini CLI fetches the tool list on startup and makes them available in agent mode. ",-1))])]),windsurf:i(()=>[e("div",ne,[t[12]||(t[12]=e("p",{class:"text-sm text-gray-600 dark:text-gray-400"},[s(" Add to your Windsurf or Continue MCP config. For Windsurf: "),e("code",{class:"font-mono text-xs"},"~/.codeium/windsurf/mcp_config.json"),s(". For Continue: "),e("code",{class:"font-mono text-xs"},"~/.continue/config.json"),s(" under "),e("code",{class:"font-mono text-xs"},"mcpServers"),s(". ")],-1)),r(c,{code:o(k),lang:"json"},null,8,["code"])])]),_:1})]),_:1}),r(p,{icon:"i-lucide-link",title:"Server URL"},{default:i(()=>[e("div",ae,[e("div",ce,[e("code",pe,l(o(n)),1),r(D,{icon:"i-lucide-external-link",size:"sm",color:"neutral",variant:"outline",title:"Open API docs",to:"/docs",external:!o(g)},{default:i(()=>[...t[14]||(t[14]=[s(" REST API docs ",-1)])]),_:1},8,["external"])]),t[15]||(t[15]=e("p",{class:"text-xs text-gray-400"},[s(" This is your Piwi instance's MCP endpoint. It is also the server URL to paste into client configs above. The server requires a valid Bearer token (or no auth if "),e("code",{class:"font-mono"},"PIWI_AUTH_ENABLED"),s(" is not set). ")],-1))])]),_:1})])]),_:1})}}});export{ve as default};
@@ -1,34 +0,0 @@
1
- import{_ as Pt,a as It}from"./B32-7cBF.js";import{_ as Ot,a as Lt}from"./C9jjVEQU.js";import{_ as At}from"./IdQR_Djw.js";import{_ as Bt}from"./DNP5tTJo.js";import{d as B,am as zt,C as Ft,G as qt,ab as Ut,B as ft,o as a,c as b,h as T,r as _t,j as v,l as st,k as t,f,q as L,i as o,m as E,w as F,g as y,_ as q,F as V,y as I,ae as $t,x as J,p as P,v as St,t as g,O as nt,s as Ct,e as Wt}from"./B8fs6GU9.js";import{_ as Gt}from"./DiUGa0CT.js";import{_ as Ht}from"./n7Htv9PJ.js";import{e as U,f as rt,h as Xt,c as Yt}from"./CvCF77E-.js";import{u as Jt}from"./BtJkQ3to.js";import{u as Mt}from"./DAeYEeCC.js";import{_ as W}from"./DKTDub7I.js";import{_ as G}from"./Surk4Lw-.js";import{_ as H}from"./DZLrAp2i.js";import{_ as Q}from"./BBJ9Pu3M.js";import{_ as Zt}from"./CrFCPOnY.js";import{_ as wt}from"./o5WQ5Z7k.js";import{_ as Qt}from"./CHMpVLqo.js";import{_ as ot}from"./BgR7oL4p.js";import{X as Kt,b as Rt,c as it,d as te,i as ee,e as se,f as ae,g as K,m as ct,h as ne,j as bt,k as re,l as xt,s as tt,n as vt,o as oe,p as ie,q as le,r as ce,t as de,P as ue,v as me,_ as yt,u as Dt,a as ht,C as ut,w as pe,O as Z}from"./BW1UOxWn.js";import{_ as lt}from"./CokbKVE6.js";import{N as Et}from"./CU-OXXdh.js";import{_ as _e,a as ye}from"./Cgr8IKY4.js";import"./D1tZEdSi.js";import"./CKZn0TUX.js";import"./YDWXnWou.js";import"./DVdOm5Bg.js";import"./B_80i5Ge.js";import"./BC_Wu-fv.js";import"./wCQds5_f.js";import"./3SnTawZW.js";import"./DWzdeQ3Z.js";import"./B32ySRXg.js";import"./D7W_4Sqc.js";function he({x:w,y:e,w:c,h:p,tl:r=!1,tr:C=!1,bl:u=!1,br:R=!1,r:_=0}){let d;d=`M${w+_},${e}h${c-2*_}`;let s=C?_:0,i=C?0:_;return d+=`a${s},${s} 0 0 1 ${s},${s}`,d+=`h${i}v${i}`,d+=`v${p-2*_}`,s=R?_:0,i=R?0:_,d+=`a${s},${s} 0 0 1 ${-s},${s}`,d+=`v${i}h${-i}`,d+=`h${2*_-c}`,s=u?_:0,i=u?0:_,d+=`a${s},${s} 0 0 1 ${-s},${-s}`,d+=`h${-i}v${-i}`,d+=`v${2*_-p}`,s=r?_:0,i=r?0:_,d+=`a${s},${s} 0 0 1 ${s},${-s}`,d+=`v${-i}h${i}`,d+="z",d}const ge=Object.assign(Object.assign({},Kt),{color:void 0,barMaxWidth:void 0,barWidth:void 0,dataStep:void 0,barPadding:0,roundedCorners:2,cursor:null,barMinHeight1Px:!1,barMinHeightZeroValue:null,orientation:Rt.Vertical}),Tt=it`
2
- label: stacked-bar-component;
3
- `,fe=ee`
4
- :root {
5
- --vis-stacked-bar-cursor: default;
6
- --vis-stacked-bar-fill-color: var(--vis-color-main);
7
- --vis-stacked-bar-stroke-color: none;
8
- --vis-stacked-bar-stroke-width: 0px;
9
- --vis-stacked-bar-hover-stroke-width: none;
10
- --vis-stacked-bar-hover-stroke-color: none;
11
-
12
- /* Dark Theme */
13
- --vis-dark-stacked-bar-stroke-color: none;
14
- }
15
-
16
- ${te} ${`.${Tt}`} {
17
- --vis-stacked-bar-stroke-color: var(--vis-dark-stacked-bar-stroke-color);
18
- }
19
- `,at=it`
20
- label: bar;
21
- fill: var(--vis-stacked-bar-fill-color);
22
- stroke: var(--vis-stacked-bar-stroke-color);
23
- stroke-width: var(--vis-stacked-bar-stroke-width);
24
- cursor: var(--vis-stacked-bar-cursor);
25
-
26
- &:hover {
27
- stroke-width: var(--vis-stacked-bar-hover-stroke-width);
28
- stroke: var(--vis-stacked-bar-hover-stroke-color);
29
- }
30
- `,mt=it`
31
- label: barGroup;
32
- `,Vt=it`
33
- label: barGroupExit;
34
- `,be=Object.freeze(Object.defineProperty({__proto__:null,bar:at,barGroup:mt,barGroupExit:Vt,globalStyles:fe,root:Tt},Symbol.toStringTag,{value:"Module"}));class jt extends se{constructor(e){super(),this._defaultConfig=ge,this.config=this._defaultConfig,this.getAccessors=()=>ae(this.config.y)?this.config.y:[this.config.y],this.stacked=!0,this.events={},this._barData=[],e&&this.setConfig(e)}get bleed(){if(this._barData=this._getVisibleData(),this._barData.length===0)return{top:0,bottom:0,left:0,right:0};const e=!this.isVertical()&&this.dataScale.range()[0]>this.dataScale.range()[1],c=this.dataScale.domain(),p=this._getBarWidth()/2,r=this._barData.map(($,x)=>K($,this.config.x,x)),C=ct(r),u=ne(r),R=this.dataScale(C),_=this.dataScale(u),d=this.dataScale.invert(R+(e?p:-p)),s=this.dataScale.invert(_+(e?-p:p)),i=d<=c[0]?this.dataScale(c[0])-this.dataScale(d):0,D=s>c[1]?this.dataScale(s)-this.dataScale(c[1]):0;return{top:this.isVertical()?0:e?-D:i,bottom:this.isVertical()?0:e?-i:D,left:this.isVertical()?i:0,right:this.isVertical()?D:0}}get dataScale(){return this.isVertical()?this.xScale:this.yScale}get valueScale(){return this.isVertical()?this.yScale:this.xScale}isVertical(){return this.config.orientation===Rt.Vertical}_render(e){const{config:c}=this,p=bt(e)?e:c.duration,r=this.getAccessors(),C=re(this._barData,0,r,this._prevNegative);this._prevNegative=C.map(x=>!!x.isMostlyNegative);const u=this.g.selectAll(`.${mt}`).data(this._barData,(x,S)=>{var m;return`${(m=xt(x,c.id,S))!==null&&m!==void 0?m:S}`}),R=(x,S)=>{const m=this.dataScale(K(x,c.x,S)),k=this.isVertical()?m:0,n=this.isVertical()?0:m;return`translate(${k},${n})`},d=u.enter().append("g").attr("class",mt).attr("transform",R).style("opacity",1).merge(u);tt(d,p).attr("transform",R).style("opacity",1);const s=u.exit().attr("class",Vt);tt(s,p).style("opacity",0).remove().on("interrupt",function(){this.remove()}),tt(s.selectAll(`.${at}`),p).attr("transform",this.isVertical()?`translate(0,${this._height/3})`:`translate(${this._width/6},0)`);const i=d.selectAll(`.${at}`).data((x,S)=>{const m=C.map((k,n)=>({datum:x,index:S,stacked:k[S],stackIndex:n})).filter(k=>k.stacked[0]!==k.stacked[1]);return m.forEach((k,n)=>{k.isEnding=n===m.length-1||n<=m.length-1&&m[n+1].stacked[0]!==k.stacked[1]}),m},x=>x.stackIndex),$=i.enter().append("path").attr("class",at).attr("d",x=>this._getBarPath(x,!0)).style("fill",x=>vt(x.datum,c.color,x.stackIndex)).merge(i);tt($,p).attr("d",x=>this._getBarPath(x)).style("fill",x=>vt(x.datum,c.color,x.stackIndex)).style("cursor",x=>xt(x.datum,c.cursor,x.stackIndex)),tt(i.exit(),p).style("opacity",0).remove().on("interrupt",function(){this.remove()})}_getBarWidth(){const{config:e,datamodel:{data:c}}=this;if(oe(c))return 0;if(e.barWidth)return ct([e.barWidth,e.barMaxWidth]);const p=this.dataScale.bandwidth,r=this.dataScale.domain?this.dataScale.domain():[];let u=1+(p?r.length:r[1]-r[0])/e.dataStep||!p&&c.filter((d,s)=>{const i=K(d,e.x,s);return i>=r[0]&&i<=r[1]}).length||c.length;!p&&u>=2&&(u+=1);const _=(u<2?1:1-e.barPadding)*(this.isVertical()?this._width:this._height)/u;return ct([_,e.barMaxWidth])}_getVisibleData(){const{config:e,datamodel:{data:c}}=this,p=this._getBarWidth(),r=c.length<2?0:p/2,C=this.dataScale,u=Math.abs(C.invert(r)-C.invert(0));return c?.filter((_,d)=>{const s=K(_,e.x,d),i=C.domain(),D=+i[0],$=+i[1];return s>=D-u&&s<=$+u})}_getBarPath(e,c=!1){const{config:p}=this,r=this.getAccessors(),C=this._getBarWidth(),u=e.stacked[1]<0,R=e.isEnding,_=K(e.datum,r[e.stackIndex],e.index),d=c?0:Math.abs(this.valueScale(e.stacked[0])-this.valueScale(e.stacked[1])),s=!c&&p.barMinHeight1Px&&d<1&&isFinite(_)&&_!==p.barMinHeightZeroValue?1:d,i=c?this.valueScale(0):this.valueScale(u?e.stacked[0]:e.stacked[1])-(d<1&&p.barMinHeight1Px?1:0),D=-C/2,$=C,x=p.roundedCorners?bt(p.roundedCorners)?+p.roundedCorners:$/2:0,S=ce(x,0,Math.min(d,$)/2),m=this.yScale.range()[0]>this.yScale.range()[1];return he({x:this.isVertical()?D:i-s,y:this.isVertical()?i+(m?0:-s):D,w:this.isVertical()?$:s,h:this.isVertical()?s:$,tl:R&&(this.isVertical()?!u&&m||u&&!m:u),tr:R&&(this.isVertical()?!u&&m||u&&!m:!u),br:R&&(this.isVertical()?u&&m||!u&&!m:!u),bl:R&&(this.isVertical()?u&&m||!u&&!m:u),r:S})}_mapEventDatum(e){return{datum:Object.assign(Object.assign({},e),e.datum),index:e.index}}getValueScaleExtent(e){const{datamodel:c}=this,p=this.getAccessors(),r=e?this._getVisibleData():c.data;return ie(r,...p)}getDataScaleExtent(){const{config:e,datamodel:c}=this;return le(c.data,e.x)}getYDataExtent(e){return this.isVertical()?this.getValueScaleExtent(e):this.getDataScaleExtent()}getXDataExtent(){return this.isVertical()?this.getDataScaleExtent():this.getValueScaleExtent(!1)}}jt.selectors=be;const xe={"data-vis-component":""},ve=B({__name:"index",props:{color:{type:[Function,String,Array,null]},barWidth:{},barMaxWidth:{},dataStep:{},barPadding:{},roundedCorners:{type:[Number,Boolean]},cursor:{type:[Function,String,null]},barMinHeight1Px:{type:Boolean},barMinHeightZeroValue:{},orientation:{},x:{type:[Function,Number,null]},y:{type:[Function,Number,null,Array]},id:{type:Function},xScale:{type:[Object,Function]},yScale:{type:[Object,Function]},excludeFromDomainCalculation:{type:Boolean},duration:{},events:{},attributes:{},data:{}},setup(w,{expose:e}){const c=zt(de),p=w,r=T(()=>c.data.value??p.data),C=ue(p),u=_t();return Ft(()=>{qt(()=>{u.value=new jt(C.value),u.value?.setData(r.value),c.update(u.value)})}),Ut(()=>{u.value?.destroy(),c.destroy()}),ft(C,(R,_)=>{me(R,_)||(u.value?.setConfig(C.value),u.value?.render())}),ft(r,()=>{u.value?.setData(r.value)}),e({component:u}),(R,_)=>(a(),b("div",xe))}}),ke=30,pt=3650;function $e(w){const e={days:String(w.days)};return w.projectIds&&w.projectIds.length>0&&(e.projects=w.projectIds.join(",")),w.environment&&(e.environment=w.environment),w.fullRunsOnly||(e.fullRunsOnly="false"),e}const Se={class:"flex items-center gap-3 flex-wrap"},Ce={class:"flex items-center gap-1.5 cursor-pointer select-none text-sm text-gray-600 dark:text-gray-400 hover:text-gray-900 dark:hover:text-gray-100 transition-colors"},dt="All environments",Me=B({__name:"AnalyticsScopeBar",props:{modelValue:{},availableEnvironments:{}},emits:["update:modelValue"],setup(w,{emit:e}){const c=w,p=e,r=[{label:"Last 7 days",value:7},{label:"Last 30 days",value:30},{label:"Last 90 days",value:90},{label:"Last year",value:365},{label:"All time",value:pt}],C=T({get:()=>c.modelValue.days,set:d=>p("update:modelValue",{...c.modelValue,days:d})}),u=T({get:()=>c.modelValue.environment??dt,set:d=>p("update:modelValue",{...c.modelValue,environment:d===dt?null:d})}),R=T(()=>[dt,...c.availableEnvironments]),_=T({get:()=>c.modelValue.fullRunsOnly,set:d=>p("update:modelValue",{...c.modelValue,fullRunsOnly:d})});return(d,s)=>{const i=At,D=Bt;return a(),b("div",Se,[v(i,{modelValue:t(C),"onUpdate:modelValue":s[0]||(s[0]=$=>st(C)?C.value=$:null),items:r,size:"sm",class:"min-w-[140px]",icon:"i-lucide-calendar-range"},null,8,["modelValue"]),w.availableEnvironments.length>0?(a(),f(i,{key:0,modelValue:t(u),"onUpdate:modelValue":s[1]||(s[1]=$=>st(u)?u.value=$:null),items:t(R),size:"sm",class:"min-w-[160px]",icon:"i-lucide-server"},null,8,["modelValue","items"])):L("",!0),o("label",Ce,[v(D,{modelValue:t(_),"onUpdate:modelValue":s[2]||(s[2]=$=>st(_)?_.value=$:null),size:"sm"},null,8,["modelValue"]),s[3]||(s[3]=E(" Full runs only ",-1))])])}}}),we=Object.assign(Me,{__name:"AnalyticsScopeBar"}),Nt=[{id:"insights",title:"Insights",icon:"i-lucide-lightbulb",size:"half"},{id:"pass-rate-heatmap",title:"Pass rate heatmap",icon:"i-lucide-grid-3x3",size:"half"},{id:"portfolio",title:"Portfolio health",icon:"i-lucide-table-properties",size:"full"},{id:"ci-time-trend",title:"CI time",icon:"i-lucide-timer",size:"half"},{id:"wasted-time",title:"Wasted CI time",icon:"i-lucide-hourglass",size:"half"},{id:"flaky-leaderboard",title:"Flakiest tests",icon:"i-lucide-repeat",size:"half"},{id:"cluster-landscape",title:"Failure clusters",icon:"i-lucide-layers",size:"half"},{id:"regression-velocity",title:"Regression velocity",icon:"i-lucide-git-pull-request-arrow",size:"half"},{id:"browser-matrix",title:"Browser matrix",icon:"i-lucide-monitor-smartphone",size:"half"},{id:"slow-endpoints",title:"Slow endpoints",icon:"i-lucide-gauge",size:"full"}];new Set(Nt.map(w=>w.id));const et={days:ke,environment:null,fullRunsOnly:!0};function Re(){const w=Jt("piwi-analytics-scope",{default:()=>({...et}),encode:p=>JSON.stringify(p),decode:p=>{try{return p?{...et,...JSON.parse(p)}:{...et}}catch{return{...et}}}}),e=T(()=>({days:w.value.days,environment:w.value.environment,fullRunsOnly:w.value.fullRunsOnly})),c=T(()=>$e(e.value));return{state:w,scope:e,scopeQuery:c}}function X(w,e){return Mt(`/api/analytics/${w}`,{query:T(e),lazy:!0,server:!1},"$EEH4o0rJ7t")}const De={key:3,class:"divide-y divide-gray-100 dark:divide-gray-800"},Ee={class:"min-w-0"},Te={class:"text-sm font-medium"},Ve={key:0,class:"text-xs text-gray-500 dark:text-gray-400 mt-0.5"},je=B({__name:"InsightsFeed",props:{query:{}},async setup(w){let e,c;const p=w,{data:r,pending:C,error:u,refresh:R}=([e,c]=F(()=>X("insights",()=>p.query)),e=await e,c(),e),_=J,d={critical:{icon:"i-lucide-octagon-alert",class:"text-red-500",border:"border-l-red-500"},warning:{icon:"i-lucide-triangle-alert",class:"text-amber-500",border:"border-l-amber-400"},info:{icon:"i-lucide-info",class:"text-blue-500",border:"border-l-blue-400"},positive:{icon:"i-lucide-trending-up",class:"text-green-500",border:"border-l-green-500"}};return(s,i)=>{const D=W,$=q,x=G,S=H,m=St,k=Q;return a(),f(k,{icon:"i-lucide-lightbulb",title:"Insights",count:t(r)?.length||void 0,help:"analytics.insights"},{default:y(()=>[t(C)?(a(),f(D,{key:0})):t(u)?(a(),f(x,{key:1,text:`Couldn't load insights: ${("errorMessage"in s?s.errorMessage:t(U))(t(u))}`},{action:y(()=>[v($,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:i[0]||(i[0]=n=>t(R)())},{default:y(()=>[...i[1]||(i[1]=[E(" Retry ",-1)])]),_:1})]),_:1},8,["text"])):!t(r)||t(r).length===0?(a(),f(S,{key:2,icon:"i-lucide-check-circle",text:"Nothing needs your attention in this period."})):(a(),b("div",De,[(a(!0),b(V,null,I(t(r),n=>(a(),f($t(n.to?t(_):"div"),{key:n.id,to:n.to,class:P(["flex items-start gap-3 py-3 pl-3 border-l-2",[d[n.severity].border,n.to?"hover:bg-gray-50 dark:hover:bg-gray-800/60 rounded-r transition-colors":""]])},{default:y(()=>[v(m,{name:d[n.severity].icon,class:P(["size-4 mt-0.5 shrink-0",d[n.severity].class])},null,8,["name","class"]),o("div",Ee,[o("p",Te,g(n.message),1),n.detail?(a(),b("p",Ve,g(n.detail),1)):L("",!0)])]),_:2},1032,["to","class"]))),128))]))]),_:1},8,["count"])}}}),Ne=Object.assign(je,{__name:"InsightsFeed"}),Pe={class:"md:hidden space-y-3"},Ie={class:"flex items-center justify-between gap-2"},Oe={class:"flex items-center justify-between text-xs text-gray-500 dark:text-gray-400"},Le={key:0},Ae={class:"hidden md:block"},Be={class:"w-full text-sm"},ze={class:"divide-y divide-gray-100 dark:divide-gray-800"},Fe={class:"py-2.5 pr-4"},qe={class:"flex items-center gap-2 min-w-0"},Ue={class:"py-2.5 pr-4"},We={class:"w-36"},Ge={class:"py-2.5 pr-4 text-right"},He={class:"py-2.5 pr-4 text-right tabular-nums"},Xe={class:"py-2.5 pr-4 text-right tabular-nums text-gray-500 dark:text-gray-400"},Ye={class:"py-2.5 text-right"},Je={class:"text-xs text-gray-500 dark:text-gray-400"},Ze={key:1,class:"text-xs text-gray-400"},Qe=B({__name:"PortfolioScorecard",props:{query:{}},async setup(w){let e,c;const p=w,{data:r,pending:C,error:u,refresh:R}=([e,c]=F(()=>X("portfolio",()=>p.query)),e=await e,c(),e);function _(s){return s===null?"text-gray-400":s>=90?"text-green-600 dark:text-green-400":s>=50?"text-yellow-600 dark:text-yellow-400":"text-red-600 dark:text-red-400"}function d(s){return s===null||Math.abs(s)<1?null:s>0?{icon:"i-lucide-trending-up",class:"text-green-600 dark:text-green-400"}:{icon:"i-lucide-trending-down",class:"text-red-600 dark:text-red-400"}}return(s,i)=>{const D=W,$=q,x=G,S=H,m=J,k=Zt,n=wt,l=St,M=Qt,A=ot,j=Q;return a(),f(j,{icon:"i-lucide-table-properties",title:"Portfolio health",count:t(r)?.length||void 0,help:"analytics.portfolio"},{default:y(()=>[t(C)?(a(),f(D,{key:0})):t(u)?(a(),f(x,{key:1,text:`Couldn't load the portfolio: ${("errorMessage"in s?s.errorMessage:t(U))(t(u))}`},{action:y(()=>[v($,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:i[0]||(i[0]=h=>t(R)())},{default:y(()=>[...i[1]||(i[1]=[E(" Retry ",-1)])]),_:1})]),_:1},8,["text"])):!t(r)||t(r).length===0?(a(),f(S,{key:2,text:"No projects with runs in this period."})):(a(),b(V,{key:3},[o("div",Pe,[(a(!0),b(V,null,I(t(r),h=>(a(),b("div",{key:h.projectId,class:"rounded-lg border border-gray-200 dark:border-gray-800 p-3 space-y-2"},[o("div",Ie,[v(m,{to:`/projects/${h.projectId}`,class:"font-medium truncate hover:text-primary"},{default:y(()=>[E(g(h.label||h.name),1)]),_:2},1032,["to"]),o("span",{class:P(["tabular-nums font-semibold shrink-0",_(h.passRate)])},g(h.passRate!==null?`${h.passRate}%`:"—"),3)]),v(k,{runs:h.recentRuns,height:20},null,8,["runs"]),o("div",Oe,[o("span",null,g(h.runCount)+" runs · "+g(h.flakyTests)+" flaky · "+g(h.openClusters)+" open clusters",1),h.latestRun?(a(),b("span",Le,g(("formatRelativeTime"in s?s.formatRelativeTime:t(rt))(h.latestRun.startTime)),1)):L("",!0)])]))),128))]),o("div",Ae,[v(A,{"min-width":"52rem"},{default:y(()=>[o("table",Be,[i[2]||(i[2]=o("thead",null,[o("tr",{class:"text-left text-xs text-gray-500 uppercase tracking-wider border-b border-gray-200 dark:border-gray-800"},[o("th",{class:"py-2 pr-4 font-medium"},"Project"),o("th",{class:"py-2 pr-4 font-medium"},"Trend"),o("th",{class:"py-2 pr-4 font-medium text-right"},"Pass rate"),o("th",{class:"py-2 pr-4 font-medium text-right"},"Runs"),o("th",{class:"py-2 pr-4 font-medium text-right"},"Flaky"),o("th",{class:"py-2 pr-4 font-medium text-right"},"Avg run"),o("th",{class:"py-2 pr-4 font-medium text-right"},"Open clusters"),o("th",{class:"py-2 font-medium text-right"},"Latest run")])],-1)),o("tbody",ze,[(a(!0),b(V,null,I(t(r),h=>(a(),b("tr",{key:h.projectId},[o("td",Fe,[o("div",qe,[v(m,{to:`/projects/${h.projectId}`,class:"font-medium truncate hover:text-primary"},{default:y(()=>[E(g(h.label||h.name),1)]),_:2},1032,["to"]),(a(!0),b(V,null,I(h.tags.slice(0,2),z=>(a(),f(n,{key:z.id,text:z.text,color:z.color},null,8,["text","color"]))),128))])]),o("td",Ue,[o("div",We,[v(k,{runs:h.recentRuns,height:22},null,8,["runs"])])]),o("td",Ge,[o("span",{class:P(["inline-flex items-center gap-1 tabular-nums font-semibold",_(h.passRate)])},[E(g(h.passRate!==null?`${h.passRate}%`:"—")+" ",1),d(h.passRateDelta)?(a(),f(l,{key:0,name:d(h.passRateDelta).icon,class:P(["size-3.5",d(h.passRateDelta).class]),title:`${h.passRateDelta>0?"+":""}${h.passRateDelta} pts vs previous period`},null,8,["name","class","title"])):L("",!0)],2)]),o("td",He,g(h.runCount),1),o("td",{class:P(["py-2.5 pr-4 text-right tabular-nums",h.flakyTests>0?"text-amber-600 dark:text-amber-400":""])},g(h.flakyTests),3),o("td",Xe,g(h.avgRunDurationMs?("formatDuration"in s?s.formatDuration:t(Xt))(h.avgRunDurationMs):"—"),1),o("td",{class:P(["py-2.5 pr-4 text-right tabular-nums",h.openClusters>0?"text-red-600 dark:text-red-400":""])},g(h.openClusters),3),o("td",Ye,[h.latestRun?(a(),f(m,{key:0,to:`/test-runs/${h.latestRun.id}`,class:"inline-flex items-center gap-2 hover:text-primary"},{default:y(()=>[v(M,{status:h.latestRun.status},null,8,["status"]),o("span",Je,g(("formatRelativeTime"in s?s.formatRelativeTime:t(rt))(h.latestRun.startTime)),1)]),_:2},1032,["to"])):(a(),b("span",Ze,"No runs"))])]))),128))])])]),_:1})])],64))]),_:1},8,["count"])}}}),Ke=Object.assign(Qe,{__name:"PortfolioScorecard"}),ts={class:"space-y-1"},es={class:"flex gap-px"},ss=["title"],as={class:"grid gap-2",style:{"grid-template-columns":"8rem 1fr"}},ns={class:"relative h-4"},rs=B({__name:"PassRateHeatmap",props:{query:{}},async setup(w){let e,c;const p=w,{data:r,pending:C,error:u,refresh:R}=([e,c]=F(()=>X("pass-rate-heatmap",()=>p.query)),e=await e,c(),e);function _(m){return m===null?{}:m>=99.5?{backgroundColor:"rgba(34, 197, 94, 0.85)"}:m>=90?{backgroundColor:"rgba(34, 197, 94, 0.5)"}:m>=75?{backgroundColor:"rgba(245, 158, 11, 0.55)"}:m>=50?{backgroundColor:"rgba(249, 115, 22, 0.65)"}:{backgroundColor:"rgba(239, 68, 68, 0.75)"}}function d(m,k,n){const l=r.value?.buckets[k]??"",M=(r.value?.bucketDays??1)>1?` (${r.value.bucketDays} days)`:"";return`${m.label||m.name} · ${l}${M}: ${n!==null?`${n}% passed`:"no runs"}`}const s=[{color:"rgba(34, 197, 94, 0.85)",label:"100%"},{color:"rgba(34, 197, 94, 0.5)",label:"≥ 90%"},{color:"rgba(245, 158, 11, 0.55)",label:"≥ 75%"},{color:"rgba(249, 115, 22, 0.65)",label:"≥ 50%"},{color:"rgba(239, 68, 68, 0.75)",label:"< 50%"}],i=T(()=>{const m=r.value?.bucketDays??1;return m>1?`One cell = ${m} days`:"One cell = one day"}),D=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],$=T(()=>{const m=r.value?.buckets??[];return m.length>1&&m[0].slice(0,4)!==m[m.length-1].slice(0,4)});function x(m){const[k,n,l]=m.split("-"),M=D[Number(n)-1];return $.value?`${M} ${k}`:`${M} ${Number(l)}`}const S=T(()=>{const m=r.value?.buckets??[],k=m.length;if(k===0)return[];const n=Math.min($.value?4:5,k),l=new Set,M=[];for(let A=0;A<n;A++){const j=n===1?0:Math.round(A*(k-1)/(n-1));if(l.has(j))continue;l.add(j);const h=j===0?0:j===k-1?100:(j+.5)/k*100,z=j===0?"translateX(0)":j===k-1?"translateX(-100%)":"translateX(-50%)";M.push({index:j,label:x(m[j]),left:h,transform:z})}return M});return(m,k)=>{const n=W,l=q,M=G,A=H,j=J,h=yt,z=ot,Y=lt;return a(),f(Y,{icon:"i-lucide-grid-3x3",title:"Pass rate heatmap",subtitle:t(i),help:"analytics.heatmap"},{default:y(()=>[t(C)?(a(),f(n,{key:0})):t(u)?(a(),f(M,{key:1,text:`Couldn't load the heatmap: ${("errorMessage"in m?m.errorMessage:t(U))(t(u))}`},{action:y(()=>[v(l,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:k[0]||(k[0]=O=>t(R)())},{default:y(()=>[...k[1]||(k[1]=[E(" Retry ",-1)])]),_:1})]),_:1},8,["text"])):!t(r)||t(r).rows.length===0?(a(),f(A,{key:2,text:"No runs in this period."})):(a(),f(z,{key:3,"min-width":"22rem"},{default:y(()=>[o("div",ts,[(a(!0),b(V,null,I(t(r).rows,O=>(a(),b("div",{key:O.projectId,class:"grid items-center gap-2",style:{"grid-template-columns":"8rem 1fr"}},[v(j,{to:`/projects/${O.projectId}`,class:"text-sm truncate hover:text-primary",title:O.label||O.name},{default:y(()=>[E(g(O.label||O.name),1)]),_:2},1032,["to","title"]),o("div",es,[(a(!0),b(V,null,I(O.cells,(N,gt)=>(a(),b("div",{key:gt,class:"h-6 flex-1 rounded-sm min-w-1 bg-gray-100 dark:bg-gray-800",style:nt(_(N)),title:d(O,gt,N)},null,12,ss))),128))])]))),128)),o("div",as,[k[2]||(k[2]=o("span",null,null,-1)),o("div",ns,[(a(!0),b(V,null,I(t(S),O=>(a(),b("span",{key:O.index,class:"absolute top-0 text-xs text-gray-400 whitespace-nowrap",style:nt({left:`${O.left}%`,transform:O.transform})},g(O.label),5))),128))])]),v(h,{items:s,dense:""})])]),_:1}))]),_:1},8,["subtitle"])}}}),os=Object.assign(rs,{__name:"PassRateHeatmap"}),is={key:3,class:"w-full relative"},ls={class:"p-2 text-sm text-gray-900 dark:text-gray-100"},cs={class:"font-semibold mb-1"},ds={class:"text-gray-400 text-xs"},kt="rgb(59, 130, 246)",us=B({__name:"CiTimeTrendChart",props:{query:{}},async setup(w){let e,c;const p=w,{data:r,pending:C,error:u,refresh:R}=([e,c]=F(()=>X("ci-time-trend",()=>p.query)),e=await e,c(),e),_=T(()=>r.value?.points.map(n=>({date:new Date(n.date),totalMinutes:n.totalMinutes,runCount:n.runCount}))??[]),d=T(()=>_.value.some(n=>n.runCount>0)),s=n=>n.date,i=n=>n.totalMinutes,D=_t(null),{tooltipData:$,tooltipPos:x,onRenderComplete:S}=Dt(D,_,{x:n=>n.date,series:[{y:n=>n.totalMinutes,color:kt}]}),m=T(()=>{if(!r.value||r.value.deltaPct===null)return null;const n=r.value.deltaPct;return{label:`${n>0?"+":""}${n}% vs previous period`,class:n>25?"text-red-600 dark:text-red-400":n<-10?"text-green-600 dark:text-green-400":"text-gray-500"}}),k=T(()=>{if(!r.value)return;const n=r.value.totalMinutes;return`${n<60?`${Math.round(n)} min`:`${Math.round(n/60*10)/10} h`} across ${r.value.runCount} runs`});return(n,l)=>{const M=W,A=q,j=G,h=H,z=lt;return a(),f(z,{icon:"i-lucide-timer",title:"CI time",subtitle:t(k),help:"analytics.ci-time"},{actions:y(()=>[t(m)?(a(),b("span",{key:0,class:P(["text-xs font-medium tabular-nums",t(m).class])},g(t(m).label),3)):L("",!0)]),default:y(()=>[t(C)?(a(),f(M,{key:0})):t(u)?(a(),f(j,{key:1,text:`Couldn't load CI time: ${("errorMessage"in n?n.errorMessage:t(U))(t(u))}`},{action:y(()=>[v(A,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:l[0]||(l[0]=Y=>t(R)())},{default:y(()=>[...l[1]||(l[1]=[E(" Retry ",-1)])]),_:1})]),_:1},8,["text"])):t(d)?(a(),b("div",is,[v(t(ht),{ref_key:"xyContainerRef",ref:D,data:t(_),height:220,padding:{top:10,right:10,bottom:0,left:0},"on-render-complete":t(S)},{default:y(()=>[v(t(Et),{x:s,y:i,color:"rgba(59, 130, 246, 0.15)","curve-type":t(ut).MonotoneX},null,8,["curve-type"]),v(t(pe),{x:s,y:i,color:kt,"curve-type":t(ut).MonotoneX,"line-width":2},null,8,["curve-type"]),v(t(Z),{type:"x","tick-format":Y=>new Date(Y).toLocaleDateString("en-US",{month:"short",day:"numeric"})},null,8,["tick-format"]),v(t(Z),{type:"y",label:"Minutes","tick-format":Y=>Y.toString()},null,8,["tick-format"])]),_:1},8,["data","on-render-complete"]),t($)?(a(),b("div",{key:0,class:"fixed z-50 pointer-events-none bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 max-w-[240px]",style:nt({left:`${t(x).x}px`,top:`${t(x).y}px`})},[o("div",ls,[o("div",cs,g(new Date(t($).date).toLocaleDateString("en-US",{month:"short",day:"numeric"})),1),o("div",null,g(t($).totalMinutes)+" minutes",1),o("div",ds,g(t($).runCount)+" runs",1)])],4)):L("",!0)])):(a(),f(h,{key:2,text:"No runs in this period."}))]),_:1},8,["subtitle"])}}}),ms=Object.assign(us,{__name:"CiTimeTrendChart"}),ps={key:3,class:"w-full relative"},_s={class:"p-2 text-sm text-gray-900 dark:text-gray-100"},ys={class:"font-semibold mb-1"},hs={key:1,class:"mt-4 space-y-1"},gs={class:"tabular-nums text-gray-500 dark:text-gray-400 shrink-0"},fs=B({__name:"WastedTimeChart",props:{query:{}},async setup(w){let e,c;const p=w,{data:r,pending:C,error:u,refresh:R}=([e,c]=F(()=>X("wasted-time",()=>p.query)),e=await e,c(),e),_=T(()=>r.value?.points.map(n=>({date:new Date(n.date),waitMinutes:n.waitMinutes,failedExecMinutes:n.failedExecMinutes}))??[]),d=T(()=>_.value.some(n=>n.waitMinutes>0||n.failedExecMinutes>0)),s=n=>n.date,i=["rgb(245, 158, 11)","rgb(239, 68, 68)"],D=_t(null),{tooltipData:$,tooltipPos:x,onRenderComplete:S}=Dt(D,_,{x:n=>n.date,series:[{y:n=>n.waitMinutes,color:i[0]},{y:n=>n.failedExecMinutes,color:i[1]}]}),m=[{color:i[0],label:"Wait steps"},{color:i[1],label:"Failed attempts"}],k=T(()=>{if(!r.value)return;const n=r.value.totalWaitMinutes+r.value.totalFailedExecMinutes;return`${n<60?`${Math.round(n)} min`:`${Math.round(n/60*10)/10} h`} of CI time produced no signal`});return(n,l)=>{const M=yt,A=W,j=q,h=G,z=H,Y=J,O=lt;return a(),f(O,{icon:"i-lucide-hourglass",title:"Wasted CI time",subtitle:t(k),help:"analytics.wasted-time"},{legend:y(()=>[v(M,{items:m,dense:""})]),default:y(()=>[t(C)?(a(),f(A,{key:0})):t(u)?(a(),f(h,{key:1,text:`Couldn't load wasted time: ${("errorMessage"in n?n.errorMessage:t(U))(t(u))}`},{action:y(()=>[v(j,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:l[0]||(l[0]=N=>t(R)())},{default:y(()=>[...l[1]||(l[1]=[E(" Retry ",-1)])]),_:1})]),_:1},8,["text"])):t(d)?(a(),b("div",ps,[v(t(ht),{ref_key:"xyContainerRef",ref:D,data:t(_),height:220,padding:{top:10,right:10,bottom:0,left:0},"on-render-complete":t(S)},{default:y(()=>[v(t(Et),{x:s,y:[N=>N.waitMinutes,N=>N.failedExecMinutes],color:i,"curve-type":t(ut).MonotoneX},null,8,["y","curve-type"]),v(t(Z),{type:"x","tick-format":N=>new Date(N).toLocaleDateString("en-US",{month:"short",day:"numeric"})},null,8,["tick-format"]),v(t(Z),{type:"y",label:"Minutes","tick-format":N=>N.toString()},null,8,["tick-format"])]),_:1},8,["data","on-render-complete"]),t($)?(a(),b("div",{key:0,class:"fixed z-50 pointer-events-none bg-white dark:bg-gray-800 rounded-lg shadow-lg border border-gray-200 dark:border-gray-700 max-w-[240px]",style:nt({left:`${t(x).x}px`,top:`${t(x).y}px`})},[o("div",_s,[o("div",ys,g(new Date(t($).date).toLocaleDateString("en-US",{month:"short",day:"numeric"})),1),o("div",null,[l[2]||(l[2]=o("span",{class:"text-amber-500"},"●",-1)),E(" Wait steps: "+g(t($).waitMinutes)+" min",1)]),o("div",null,[l[3]||(l[3]=o("span",{class:"text-red-500"},"●",-1)),E(" Failed attempts: "+g(t($).failedExecMinutes)+" min",1)])])],4)):L("",!0),t(r)&&t(r).byProject.length>0?(a(),b("div",hs,[(a(!0),b(V,null,I(t(r).byProject.slice(0,5),N=>(a(),b("div",{key:N.projectId,class:"flex items-center justify-between text-sm"},[v(Y,{to:`/projects/${N.projectId}`,class:"truncate hover:text-primary"},{default:y(()=>[E(g(N.label||N.name),1)]),_:2},1032,["to"]),o("span",gs,g(Math.round(N.waitMinutes+N.failedExecMinutes))+" min ",1)]))),128))])):L("",!0)])):(a(),f(z,{key:2,text:"No wasted time recorded in this period."}))]),_:1},8,["subtitle"])}}}),bs=Object.assign(fs,{__name:"WastedTimeChart"}),xs={key:3,class:"divide-y divide-gray-100 dark:divide-gray-800"},vs={class:"flex-1 min-w-0"},ks={class:"text-sm font-medium truncate"},$s={class:"text-xs text-gray-500 dark:text-gray-400 truncate"},Ss={class:"text-right shrink-0"},Cs=B({__name:"GlobalFlakyLeaderboard",props:{query:{}},async setup(w){let e,c;const p=w,{data:r,pending:C,error:u,refresh:R}=([e,c]=F(()=>X("flaky-leaderboard",()=>p.query)),e=await e,c(),e);function _(s){return s>=60?"text-red-600 dark:text-red-400":s>=30?"text-amber-600 dark:text-amber-400":"text-gray-500"}function d(s){return s.retryPassRuns>0?`flaked ${s.retryPassRuns}/${s.totalRuns} runs`:`${s.alternations} status flips in ${s.totalRuns} runs`}return(s,i)=>{const D=W,$=q,x=G,S=H,m=wt,k=J,n=Q;return a(),f(n,{icon:"i-lucide-repeat",title:"Flakiest tests",count:t(r)?.length||void 0,subtitle:"Across all projects, sorted by impact",help:"analytics.flaky-leaderboard"},{default:y(()=>[t(C)?(a(),f(D,{key:0})):t(u)?(a(),f(x,{key:1,text:`Couldn't load flaky tests: ${("errorMessage"in s?s.errorMessage:t(U))(t(u))}`},{action:y(()=>[v($,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:i[0]||(i[0]=l=>t(R)())},{default:y(()=>[...i[1]||(i[1]=[E(" Retry ",-1)])]),_:1})]),_:1},8,["text"])):!t(r)||t(r).length===0?(a(),f(S,{key:2,text:"No flaky tests detected. Nice and stable."})):(a(),b("div",xs,[(a(!0),b(V,null,I(t(r),l=>(a(),f(k,{key:`${l.projectId}-${l.testCaseId}`,to:`/test-cases/${l.testCaseId}`,class:"flex items-center gap-3 py-2.5 hover:bg-gray-50 dark:hover:bg-gray-800/60 rounded transition-colors"},{default:y(()=>[o("span",{class:P(["tabular-nums font-bold text-sm w-10 text-right shrink-0",_(l.score)])},g(l.score),3),o("div",vs,[o("p",ks,g(l.title),1),o("p",$s,[E(g(l.projectLabel||l.projectName)+" · "+g(d(l))+" ",1),l.lastFlakeAt?(a(),b(V,{key:0},[E(" · last "+g(("formatRelativeTime"in s?s.formatRelativeTime:t(rt))(l.lastFlakeAt)),1)],64)):L("",!0)])]),o("div",Ss,[o("p",{class:P(["text-sm tabular-nums",l.wastedCiMinutes>=30?"text-red-600 dark:text-red-400":l.wastedCiMinutes>=5?"text-amber-600 dark:text-amber-400":"text-gray-500"])},g(Math.round(l.wastedCiMinutes))+" min ",3),l.rootCause?(a(),f(m,{key:0,text:l.rootCause,color:"neutral"},null,8,["text"])):L("",!0)])]),_:2},1032,["to"]))),128))]))]),_:1},8,["count"])}}}),Ms=Object.assign(Cs,{__name:"GlobalFlakyLeaderboard"}),ws={key:3,class:"space-y-4"},Rs={key:0,class:"flex flex-wrap gap-1.5"},Ds={class:"divide-y divide-gray-100 dark:divide-gray-800"},Es={class:"flex-1 min-w-0"},Ts={class:"text-sm font-medium truncate"},Vs={class:"text-xs text-gray-500 dark:text-gray-400 truncate"},js={class:"text-right text-xs shrink-0"},Ns={class:"tabular-nums font-medium"},Ps=B({__name:"ClusterLandscape",props:{query:{}},async setup(w){let e,c;const p=w,{data:r,pending:C,error:u,refresh:R}=([e,c]=F(()=>X("cluster-landscape",()=>p.query)),e=await e,c(),e);function _(d){return d>=30?"text-red-600 dark:text-red-400":d>=14?"text-amber-600 dark:text-amber-400":"text-gray-500"}return(d,s)=>{const i=W,D=q,$=G,x=H,S=ye,m=_e,k=Ct,n=J,l=Q;return a(),f(l,{icon:"i-lucide-layers",title:"Failure clusters",subtitle:"Open root causes across all projects",help:"analytics.cluster-landscape"},{default:y(()=>[t(C)?(a(),f(i,{key:0})):t(u)?(a(),f($,{key:1,text:`Couldn't load clusters: ${("errorMessage"in d?d.errorMessage:t(U))(t(u))}`},{action:y(()=>[v(D,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:s[0]||(s[0]=M=>t(R)())},{default:y(()=>[...s[1]||(s[1]=[E(" Retry ",-1)])]),_:1})]),_:1},8,["text"])):!t(r)||t(r).totalOpen===0&&t(r).resolvedInPeriod===0?(a(),f(x,{key:2,icon:"i-lucide-check-circle",text:"No open failure clusters."})):(a(),b("div",ws,[v(m,null,{default:y(()=>[v(S,{label:"Open",value:t(r).totalOpen,"value-class":t(r).totalOpen>0?"text-red-600 dark:text-red-400":""},null,8,["value","value-class"]),v(S,{label:"Resolved this period",value:t(r).resolvedInPeriod},null,8,["value"]),v(S,{label:"Oldest open",value:t(r).clusters.length>0?`${Math.max(...t(r).clusters.map(M=>M.ageDays))} d`:"—",size:"lg"},null,8,["value"])]),_:1}),t(r).byErrorType.length>0?(a(),b("div",Rs,[(a(!0),b(V,null,I(t(r).byErrorType,M=>(a(),f(k,{key:M.errorType,color:("clusterErrorTypeColor"in d?d.clusterErrorTypeColor:t(Yt))(M.errorType),variant:"subtle",size:"sm"},{default:y(()=>[E(g(M.errorType)+" · "+g(M.count),1)]),_:2},1032,["color"]))),128))])):L("",!0),o("div",Ds,[(a(!0),b(V,null,I(t(r).clusters.slice(0,8),M=>(a(),f(n,{key:M.id,to:`/failure-clusters/${M.id}`,class:"flex items-center gap-3 py-2.5 hover:bg-gray-50 dark:hover:bg-gray-800/60 rounded transition-colors"},{default:y(()=>[o("div",Es,[o("p",Ts,g(M.title||M.signature),1),o("p",Vs,[E(g(M.projectLabel||M.projectName)+" ",1),M.errorType?(a(),b(V,{key:0},[E(" · "+g(M.errorType),1)],64)):L("",!0)])]),o("div",js,[o("p",Ns,g(M.occurrences)+"×",1),o("p",{class:P(["tabular-nums",_(M.ageDays)])},g(M.ageDays)+" d open",3)])]),_:2},1032,["to"]))),128))])]))]),_:1})}}}),Is=Object.assign(Ps,{__name:"ClusterLandscape"}),Os={key:3,class:"w-full"},Ls=B({__name:"RegressionVelocityChart",props:{query:{}},async setup(w){let e,c;const p=w,{data:r,pending:C,error:u,refresh:R}=([e,c]=F(()=>X("regression-velocity",()=>p.query)),e=await e,c(),e),_=T(()=>r.value?.points.map(S=>({date:new Date(S.date),regressions:S.regressions,newFlaky:S.newFlaky}))??[]),d=T(()=>_.value.some(S=>S.regressions>0||S.newFlaky>0)),s=S=>S.date,i=["rgb(239, 68, 68)","rgb(147, 51, 234)"],D=[{color:i[0],label:"New regressions"},{color:i[1],label:"Newly flaky"}],$=T(()=>{if(!r.value||r.value.deltaPct===null)return null;const S=r.value.deltaPct;return{label:`${S>0?"+":""}${S}% vs previous period`,class:S>0?"text-red-600 dark:text-red-400":"text-green-600 dark:text-green-400"}}),x=T(()=>{if(r.value)return`${r.value.totalRegressions} new regressions, ${r.value.totalNewFlaky} newly flaky`});return(S,m)=>{const k=yt,n=W,l=q,M=G,A=H,j=lt;return a(),f(j,{icon:"i-lucide-git-pull-request-arrow",title:"Regression velocity",subtitle:t(x),help:"analytics.regression-velocity"},{legend:y(()=>[v(k,{items:D,dense:""})]),actions:y(()=>[t($)?(a(),b("span",{key:0,class:P(["text-xs font-medium tabular-nums",t($).class])},g(t($).label),3)):L("",!0)]),default:y(()=>[t(C)?(a(),f(n,{key:0})):t(u)?(a(),f(M,{key:1,text:`Couldn't load regression velocity: ${("errorMessage"in S?S.errorMessage:t(U))(t(u))}`},{action:y(()=>[v(l,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:m[0]||(m[0]=h=>t(R)())},{default:y(()=>[...m[1]||(m[1]=[E(" Retry ",-1)])]),_:1})]),_:1},8,["text"])):t(d)?(a(),b("div",Os,[v(t(ht),{data:t(_),height:220,padding:{top:10,right:10,bottom:0,left:0}},{default:y(()=>[v(t(ve),{x:s,y:[h=>h.regressions,h=>h.newFlaky],color:i,"rounded-corners":2},null,8,["y"]),v(t(Z),{type:"x","tick-format":h=>new Date(h).toLocaleDateString("en-US",{month:"short",day:"numeric"})},null,8,["tick-format"]),v(t(Z),{type:"y",label:"Count","tick-format":h=>h.toString()},null,8,["tick-format"])]),_:1},8,["data"])])):(a(),f(A,{key:2,icon:"i-lucide-shield-check",text:"No new regressions in this period."}))]),_:1},8,["subtitle"])}}}),As=Object.assign(Ls,{__name:"RegressionVelocityChart"}),Bs={class:"w-full text-sm border-separate border-spacing-1"},zs={class:"pr-2 max-w-[12rem]"},Fs=["title"],qs=B({__name:"BrowserMatrix",props:{query:{}},async setup(w){let e,c;const p=w,{data:r,pending:C,error:u,refresh:R}=([e,c]=F(()=>X("browser-matrix",()=>p.query)),e=await e,c(),e);function _(d){return d===null?"bg-gray-100 dark:bg-gray-800 text-gray-400":d>=99.5?"bg-green-500/85 text-white":d>=90?"bg-green-500/45":d>=75?"bg-amber-500/50":d>=50?"bg-orange-500/60":"bg-red-500/70 text-white"}return(d,s)=>{const i=W,D=q,$=G,x=H,S=J,m=ot,k=Q;return a(),f(k,{icon:"i-lucide-monitor-smartphone",title:"Browser matrix",help:"analytics.browser-matrix"},{default:y(()=>[t(C)?(a(),f(i,{key:0})):t(u)?(a(),f($,{key:1,text:`Couldn't load the browser matrix: ${("errorMessage"in d?d.errorMessage:t(U))(t(u))}`},{action:y(()=>[v(D,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:s[0]||(s[0]=n=>t(R)())},{default:y(()=>[...s[1]||(s[1]=[E(" Retry ",-1)])]),_:1})]),_:1},8,["text"])):!t(r)||t(r).rows.length===0?(a(),f(x,{key:2,text:"No runs with browser data in this period."})):(a(),f(m,{key:3,"min-width":"30rem"},{default:y(()=>[o("table",Bs,[o("thead",null,[o("tr",null,[s[2]||(s[2]=o("th",{class:"text-left text-xs text-gray-500 uppercase tracking-wider font-medium pr-2"},"Project",-1)),(a(!0),b(V,null,I(t(r).browsers,n=>(a(),b("th",{key:n,class:"text-xs text-gray-500 uppercase tracking-wider font-medium px-1 text-center"},g(n),1))),128))])]),o("tbody",null,[(a(!0),b(V,null,I(t(r).rows,n=>(a(),b("tr",{key:n.projectId},[o("td",zs,[v(S,{to:`/projects/${n.projectId}`,class:"truncate hover:text-primary block",title:n.label||n.name},{default:y(()=>[E(g(n.label||n.name),1)]),_:2},1032,["to","title"])]),(a(!0),b(V,null,I(n.cells,(l,M)=>(a(),b("td",{key:M,class:P(["text-center tabular-nums rounded-md px-2 py-1.5 font-medium",_(l)]),title:`${n.label||n.name} · ${t(r).browsers[M]}: ${l!==null?`${l}% passed`:"no tests"}`},g(l!==null?`${Math.round(l)}%`:"—"),11,Fs))),128))]))),128))])])]),_:1}))]),_:1})}}}),Us=Object.assign(qs,{__name:"BrowserMatrix"}),Ws={class:"md:hidden space-y-3"},Gs={class:"flex items-center gap-2 min-w-0"},Hs={class:"text-xs truncate"},Xs={class:"flex items-center justify-between text-xs text-gray-500 dark:text-gray-400"},Ys={key:0,class:"text-red-600 dark:text-red-400 tabular-nums"},Js={class:"hidden md:block"},Zs={class:"w-full text-sm"},Qs={class:"divide-y divide-gray-100 dark:divide-gray-800"},Ks={class:"py-2.5 pr-4"},ta={class:"flex items-center gap-2 min-w-0"},ea=["title"],sa={class:"py-2.5 pr-4 text-right tabular-nums"},aa={class:"py-2.5 pr-4 text-right tabular-nums text-gray-500"},na={class:"py-2.5 pr-4 text-right tabular-nums text-gray-500"},ra={class:"py-2.5 text-right tabular-nums"},oa=B({__name:"SlowEndpointsTable",props:{query:{}},async setup(w){let e,c;const p=w,{data:r,pending:C,error:u,refresh:R}=([e,c]=F(()=>X("slow-endpoints",()=>p.query)),e=await e,c(),e);function _(s){return s>=1e3?"text-red-600 dark:text-red-400":s>=500?"text-amber-600 dark:text-amber-400":"text-gray-600 dark:text-gray-300"}function d(s){return{GET:"info",POST:"success",PUT:"warning",PATCH:"warning",DELETE:"error"}[s.toUpperCase()]??"neutral"}return(s,i)=>{const D=W,$=q,x=G,S=H,m=Ct,k=ot,n=Q;return a(),f(n,{icon:"i-lucide-gauge",title:"Slow endpoints",count:t(r)?.endpoints.length||void 0,subtitle:"Backend calls across all projects, slowest first",help:"analytics.slow-endpoints"},{default:y(()=>[t(C)?(a(),f(D,{key:0})):t(u)?(a(),f(x,{key:1,text:`Couldn't load slow endpoints: ${("errorMessage"in s?s.errorMessage:t(U))(t(u))}`},{action:y(()=>[v($,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-refresh-cw",onClick:i[0]||(i[0]=l=>t(R)())},{default:y(()=>[...i[1]||(i[1]=[E(" Retry ",-1)])]),_:1})]),_:1},8,["text"])):!t(r)||t(r).endpoints.length===0?(a(),f(S,{key:2,icon:"i-lucide-network",text:"No network requests captured in this period."})):(a(),b(V,{key:3},[o("div",Ws,[(a(!0),b(V,null,I(t(r).endpoints,l=>(a(),b("div",{key:`${l.method} ${l.route}`,class:"rounded-lg border border-gray-200 dark:border-gray-800 p-3 space-y-1.5"},[o("div",Gs,[v(m,{color:d(l.method),variant:"subtle",size:"sm"},{default:y(()=>[E(g(l.method),1)]),_:2},1032,["color"]),o("code",Hs,g(l.route),1)]),o("div",Xs,[o("span",null,[i[2]||(i[2]=E("p90 ",-1)),o("span",{class:P(["tabular-nums font-medium",_(l.p90Ms)])},g(l.p90Ms)+" ms",3)]),o("span",null,g(l.requests)+" reqs · "+g(l.projectCount)+" proj",1),l.errorRate>0?(a(),b("span",Ys,g(l.errorRate)+"% err",1)):L("",!0)])]))),128))]),o("div",Js,[v(k,{"min-width":"44rem"},{default:y(()=>[o("table",Zs,[i[3]||(i[3]=o("thead",null,[o("tr",{class:"text-left text-xs text-gray-500 uppercase tracking-wider border-b border-gray-200 dark:border-gray-800"},[o("th",{class:"py-2 pr-4 font-medium"},"Endpoint"),o("th",{class:"py-2 pr-4 font-medium text-right"},"Requests"),o("th",{class:"py-2 pr-4 font-medium text-right"},"p50"),o("th",{class:"py-2 pr-4 font-medium text-right"},"p90"),o("th",{class:"py-2 pr-4 font-medium text-right"},"Max"),o("th",{class:"py-2 pr-4 font-medium text-right"},"Errors"),o("th",{class:"py-2 font-medium text-right"},"Projects")])],-1)),o("tbody",Qs,[(a(!0),b(V,null,I(t(r).endpoints,l=>(a(),b("tr",{key:`${l.method} ${l.route}`},[o("td",Ks,[o("div",ta,[v(m,{color:d(l.method),variant:"subtle",size:"sm"},{default:y(()=>[E(g(l.method),1)]),_:2},1032,["color"]),o("code",{class:"text-xs truncate max-w-[22rem]",title:l.route},g(l.route),9,ea)])]),o("td",sa,g(l.requests),1),o("td",aa,g(l.p50Ms)+" ms",1),o("td",{class:P(["py-2.5 pr-4 text-right tabular-nums font-medium",_(l.p90Ms)])},g(l.p90Ms)+" ms ",3),o("td",na,g(l.maxMs)+" ms",1),o("td",{class:P(["py-2.5 pr-4 text-right tabular-nums",l.errorRate>0?"text-red-600 dark:text-red-400":"text-gray-400"])},g(l.errorRate)+"% ",3),o("td",ra,g(l.projectCount),1)]))),128))])])]),_:1})])],64))]),_:1},8,["count"])}}}),ia=Object.assign(oa,{__name:"SlowEndpointsTable"}),la={class:"p-6 space-y-6"},ca={class:"grid grid-cols-1 xl:grid-cols-2 gap-6 items-start"},qa=B({__name:"analytics",async setup(w){let e,c;Wt({title:"Analytics - Piwi Dashboard"});const{state:p,scopeQuery:r}=Re(),{data:C}=([e,c]=F(()=>Mt("/api/test-runs/recent",{lazy:!0,server:!1,default:()=>[]},"$jZuDAh0IrH")),e=await e,c(),e),u=T(()=>{const i=new Set;for(const D of C.value??[])D.environment&&i.add(D.environment);return[...i].sort()}),R=T(()=>{const i=C.value??[];return i.length===0?null:Math.max(...i.map(D=>new Date(D.startTime).getTime()))}),_=T(()=>{if(R.value===null||p.value.days>=pt)return!1;const i=Date.now()-p.value.days*24*60*60*1e3;return R.value<i});function d(){p.value={...p.value,days:pt}}const s={insights:Ne,portfolio:Ke,"pass-rate-heatmap":os,"ci-time-trend":ms,"wasted-time":bs,"flaky-leaderboard":Ms,"cluster-landscape":Is,"regression-velocity":As,"browser-matrix":Us,"slow-endpoints":ia};return(i,D)=>{const $=Pt,x=It,S=Lt,m=we,k=Gt,n=Ht,l=Ot;return a(),f(l,{id:"analytics"},{header:y(()=>[v(S,null,{leading:y(()=>[v($),v(x,{items:[{label:"Analytics",icon:"i-lucide-chart-line",to:"/analytics"}]})]),_:1})]),body:y(()=>[o("div",la,[v(k,null,{default:y(()=>[v(m,{modelValue:t(p),"onUpdate:modelValue":D[0]||(D[0]=M=>st(p)?p.value=M:null),"available-environments":t(u)},null,8,["modelValue","available-environments"])]),_:1}),t(_)?(a(),f(n,{key:0,icon:"i-lucide-calendar-off",color:"warning",variant:"subtle",title:`No test runs in the last ${t(p).days} days`,description:`Your most recent run was ${("formatRelativeTime"in i?i.formatRelativeTime:t(rt))(t(R))} — the widgets below look empty because the selected range excludes it.`,actions:[{label:"Show all time",color:"warning",variant:"solid",size:"xs",onClick:d}]},null,8,["title","description","actions"])):L("",!0),o("div",ca,[(a(!0),b(V,null,I(t(Nt),M=>(a(),b("div",{key:M.id,class:P(M.size==="full"?"xl:col-span-2":"")},[(a(),f($t(s[M.id]),{query:t(r)},null,8,["query"]))],2))),128))])])]),_:1})}}});export{qa as default};