@piwitests/server 0.22.1 → 0.23.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.
- package/.output/nitro.json +1 -1
- package/.output/public/_nuxt/{B_mN5eMV.js → 2yLW7WU0.js} +1 -1
- package/.output/public/_nuxt/{DK7xciFW.js → 499RbBSX.js} +1 -1
- package/.output/public/_nuxt/{CJEp4i0N.js → 5QBnDbs_.js} +1 -1
- package/.output/public/_nuxt/{cSeAgciy.js → 5SkLJHl8.js} +1 -1
- package/.output/public/_nuxt/{CrOA9onF.js → 6sA-GK37.js} +1 -1
- package/.output/public/_nuxt/{C0v6l4pr.js → 6vX5JdHr.js} +1 -1
- package/.output/public/_nuxt/{DOBSrxzY.js → 7_9fts7T.js} +1 -1
- package/.output/public/_nuxt/{DBhdObsO.js → 9_aJhhcm.js} +1 -1
- package/.output/public/_nuxt/{BtaTvcz6.js → AQ86C4c2.js} +1 -1
- package/.output/public/_nuxt/{HwFFbACq.js → B070fjS-.js} +1 -1
- package/.output/public/_nuxt/B0tmRAhY.js +1 -0
- package/.output/public/_nuxt/{CkKCKAYp.js → B2L0-Lzp.js} +2 -2
- package/.output/public/_nuxt/{BNAHBHbY.js → B3AG2m76.js} +1 -1
- package/.output/public/_nuxt/{BTvE9qca.js → B3G-TIoP.js} +1 -1
- package/.output/public/_nuxt/{B2a-Phk3.js → B4mZElvM.js} +1 -1
- package/.output/public/_nuxt/{2VtBYkNh.js → B7tiBVLW.js} +1 -1
- package/.output/public/_nuxt/{4yvOL9PC.js → BAbrtVp3.js} +1 -1
- package/.output/public/_nuxt/{_VzR8bwc.js → BDUfBn3i.js} +1 -1
- package/.output/public/_nuxt/{CZ9ThISn.js → BFYkWpPx.js} +1 -1
- package/.output/public/_nuxt/{BH-ym1CI.js → BM5BPKlc.js} +1 -1
- package/.output/public/_nuxt/{CI_q0F1O.js → BNyTWIad.js} +3 -3
- package/.output/public/_nuxt/{BqCiYSVY.js → BOvtXn3m.js} +1 -1
- package/.output/public/_nuxt/BVyjw9Bi.js +1 -0
- package/.output/public/_nuxt/{BhH0TNTi.js → BZFiz2UB.js} +1 -1
- package/.output/public/_nuxt/BZOykMLD.js +1 -0
- package/.output/public/_nuxt/{CWoSSKhQ.js → B_JSV0yG.js} +1 -1
- package/.output/public/_nuxt/{CWw9WGlv.js → B_MVJP17.js} +1 -1
- package/.output/public/_nuxt/{Cwwe5bRS.js → Bag08cIY.js} +1 -1
- package/.output/public/_nuxt/{BQzG26t0.js → Bb2mDqKr.js} +1 -1
- package/.output/public/_nuxt/{CobveFaj.js → BfcMJBTf.js} +1 -1
- package/.output/public/_nuxt/{BmJUhCIO.js → BjMo2tKC.js} +1 -1
- package/.output/public/_nuxt/{DOLeth7M.js → BjOFxi54.js} +1 -1
- package/.output/public/_nuxt/{DXXnDejN.js → Bj_v57Zu.js} +1 -1
- package/.output/public/_nuxt/{Hot1UcKY.js → Bq4_kqIp.js} +1 -1
- package/.output/public/_nuxt/{CNcu4khZ.js → Bsc11YIJ.js} +1 -1
- package/.output/public/_nuxt/{BlRWlfdD.js → BtZNYmZO.js} +1 -1
- package/.output/public/_nuxt/{x8w_1_rn.js → BuGAn4f7.js} +1 -1
- package/.output/public/_nuxt/{COP3KBCA.js → BwwfasRt.js} +1 -1
- package/.output/public/_nuxt/{BQOWm9mQ.js → C2_7XZo0.js} +1 -1
- package/.output/public/_nuxt/{DSvBQHzW.js → C6t4kxaa.js} +1 -1
- package/.output/public/_nuxt/{SBmMTKQb.js → C77tM5Hz.js} +1 -1
- package/.output/public/_nuxt/{DDN2tt0a.js → C9I1Dp3S.js} +1 -1
- package/.output/public/_nuxt/{t-juTK3X.js → CAoQUDI4.js} +1 -1
- package/.output/public/_nuxt/{DQnsFoJn.js → CBJFORiZ.js} +1 -1
- package/.output/public/_nuxt/{b_yFgp5S.js → CC8wk-N0.js} +1 -1
- package/.output/public/_nuxt/{D0ROfwV0.js → CEai-PWF.js} +1 -1
- package/.output/public/_nuxt/{BKJetfRH.js → CF_eDZHu.js} +1 -1
- package/.output/public/_nuxt/{Sgis3xif.js → CGDPUNcO.js} +1 -1
- package/.output/public/_nuxt/{6-ivqM_I.js → CIQeRUSy.js} +1 -1
- package/.output/public/_nuxt/{Cf52zHyB.js → CLWMETf9.js} +1 -1
- package/.output/public/_nuxt/{h49q_GXF.js → CNu3kken.js} +42 -42
- package/.output/public/_nuxt/{Bt4FLbe0.js → CPQRQqXU.js} +1 -1
- package/.output/public/_nuxt/{DwyFnMoY.js → CTTmX4gy.js} +1 -1
- package/.output/public/_nuxt/{D6Mo5HeX.js → CUOS6S13.js} +1 -1
- package/.output/public/_nuxt/{Bb7Uckln.js → CYhm2FBS.js} +1 -1
- package/.output/public/_nuxt/{DWEkQ7bl.js → CdEzDaDI.js} +1 -1
- package/.output/public/_nuxt/{DLNNAYfu.js → Ce47NgZw.js} +1 -1
- package/.output/public/_nuxt/{BFcdtAzg.js → Ce89VyHE.js} +1 -1
- package/.output/public/_nuxt/{PdEEuEsg.js → Ce_j5NtN.js} +1 -1
- package/.output/public/_nuxt/{BtSJxOdh.js → CfhOanaF.js} +1 -1
- package/.output/public/_nuxt/Ck_fTH5z.js +4 -0
- package/.output/public/_nuxt/{By5qkOq8.js → Clg2Qx0r.js} +1 -1
- package/.output/public/_nuxt/{B6s20NbT.js → CmTzxoQt.js} +1 -1
- package/.output/public/_nuxt/{9P8iHISX.js → CvVbKrcH.js} +1 -1
- package/.output/public/_nuxt/Cz7SCzdW.js +1 -0
- package/.output/public/_nuxt/{B9kt7ySS.js → D1Ucra3E.js} +1 -1
- package/.output/public/_nuxt/{DGyGmFem.js → D3SJGdl4.js} +1 -1
- package/.output/public/_nuxt/D7fxV-UA.js +1 -0
- package/.output/public/_nuxt/{BZnfiR67.js → D7t0Dn3h.js} +1 -1
- package/.output/public/_nuxt/{DtSn2Q9-.js → DAhv9aNg.js} +1 -1
- package/.output/public/_nuxt/{CMhK1PvI.js → DBWM_xs-.js} +1 -1
- package/.output/public/_nuxt/DCE2_MKD.js +2 -0
- package/.output/public/_nuxt/DFfqRQxk.js +1 -0
- package/.output/public/_nuxt/{Dj-TetcW.js → DJzFYrBt.js} +1 -1
- package/.output/public/_nuxt/{x8YSyy4c.js → DNKZmhbX.js} +1 -1
- package/.output/public/_nuxt/{CDh_Qt7h.js → DNqm5cWU.js} +1 -1
- package/.output/public/_nuxt/{C9p0YCAi.js → DTrPCv7R.js} +1 -1
- package/.output/public/_nuxt/{nANaAHCd.js → DXkFgrsT.js} +1 -1
- package/.output/public/_nuxt/{B0hK-xDF.js → DYjxDsYC.js} +1 -1
- package/.output/public/_nuxt/{D4UlSVir.js → DZ-KbUZi.js} +1 -1
- package/.output/public/_nuxt/{DzM9oeLa.js → DZECGgZm.js} +1 -1
- package/.output/public/_nuxt/{iubpj2qv.js → Dbf8eT28.js} +1 -1
- package/.output/public/_nuxt/{CD3R-ggS.js → DeewM3Wg.js} +1 -1
- package/.output/public/_nuxt/{CAZpjzvB.js → DgEa6_av.js} +1 -1
- package/.output/public/_nuxt/DiWxW-w3.js +2 -0
- package/.output/public/_nuxt/{DpalT0nH.js → DmqCquDx.js} +1 -1
- package/.output/public/_nuxt/{CoPntblj.js → DnxrNGE_.js} +1 -1
- package/.output/public/_nuxt/{Cd8r0xk5.js → DprkT7rM.js} +1 -1
- package/.output/public/_nuxt/{BjU3HZuS.js → DuBtaw3j.js} +1 -1
- package/.output/public/_nuxt/DylyATWU.js +2 -0
- package/.output/public/_nuxt/{CRPt9SfB.js → FJTsZ5Aa.js} +1 -1
- package/.output/public/_nuxt/{DHUT-BKj.js → HIGGZ_c-.js} +1 -1
- package/.output/public/_nuxt/{DLn-VPtK.js → HbnAkiyK.js} +1 -1
- package/.output/public/_nuxt/{czXrP7NB.js → LTMoFvEY.js} +1 -1
- package/.output/public/_nuxt/{DsX5CCb5.js → PDSNX4Te.js} +1 -1
- package/.output/public/_nuxt/{BfS8BZTO.js → QZYo3ErV.js} +1 -1
- package/.output/public/_nuxt/{kfFeu9tK.js → RkNtgoTD.js} +1 -1
- package/.output/public/_nuxt/Wk7ZKG4B.js +1 -0
- package/.output/public/_nuxt/{9N6hSApy.js → Ya8ZzWuY.js} +1 -1
- package/.output/public/_nuxt/{B09ddw9C.js → ZLfZolDM.js} +1 -1
- package/.output/public/_nuxt/{3xlGO1qT.js → a8Z6VC7V.js} +1 -1
- package/.output/public/_nuxt/{CCP6Tyle.js → axj2iIDK.js} +1 -1
- package/.output/public/_nuxt/builds/latest.json +1 -1
- package/.output/public/_nuxt/builds/meta/6d1766a0-0aba-46b8-9d97-7dd174130359.json +1 -0
- package/.output/public/_nuxt/dUPMBJ4f.js +1 -0
- package/.output/public/_nuxt/{DS2ANCQh.js → eT2oObCh.js} +1 -1
- package/.output/public/_nuxt/entry.D_eWXrnD.css +1 -0
- package/.output/public/_nuxt/{CkyMZI-0.js → jR2xm3_t.js} +1 -1
- package/.output/public/_nuxt/{BDQCwxpX.js → jxc14CqP.js} +1 -1
- package/.output/public/_nuxt/{Gik813Ek.js → kWnH8yJq.js} +1 -1
- package/.output/public/_nuxt/{BYB8NVJZ.js → mi22nGUC.js} +1 -1
- package/.output/public/_nuxt/{BVN50jIb.js → oSLbl-p0.js} +1 -1
- package/.output/public/_nuxt/{CBZD8ym8.js → pZbe82l5.js} +1 -1
- package/.output/public/_nuxt/roaTZkYi.js +1 -0
- package/.output/public/_nuxt/{BUMoU50-.js → sqqg4oXL.js} +1 -1
- package/.output/public/_nuxt/xZQGtnVA.js +1 -0
- package/.output/server/chunks/build/{Alert-DAb8nKVs.mjs → Alert-He-UxEt6.mjs} +2 -2
- package/.output/server/chunks/build/Alert-He-UxEt6.mjs.map +1 -0
- package/.output/server/chunks/build/{Breadcrumb-DJp5WvUM.mjs → Breadcrumb-DEP2dVCZ.mjs} +3 -3
- package/.output/server/chunks/build/Breadcrumb-DEP2dVCZ.mjs.map +1 -0
- package/.output/server/chunks/build/{BreadcrumbNav-BrQwfL8G.mjs → BreadcrumbNav-y6nMDYcR.mjs} +3 -3
- package/.output/server/chunks/build/BreadcrumbNav-y6nMDYcR.mjs.map +1 -0
- package/.output/server/chunks/build/{BrowserBadge-Djw_e_I9.mjs → BrowserBadge-DIASU8Gf.mjs} +6 -66
- package/.output/server/chunks/build/BrowserBadge-DIASU8Gf.mjs.map +1 -0
- package/.output/server/chunks/build/{ChartCard-B2gd_8HP.mjs → ChartCard-ZTsCvItQ.mjs} +2 -2
- package/.output/server/chunks/build/ChartCard-ZTsCvItQ.mjs.map +1 -0
- package/.output/server/chunks/build/{Checkbox-C1khEdTh.mjs → Checkbox-BisdHf8n.mjs} +6 -6
- package/.output/server/chunks/build/Checkbox-BisdHf8n.mjs.map +1 -0
- package/.output/server/chunks/build/{CodeBlock-CjnDrO3Y.mjs → CodeBlock-B8BNtZAe.mjs} +2 -2
- package/.output/server/chunks/build/CodeBlock-B8BNtZAe.mjs.map +1 -0
- package/.output/server/chunks/build/{DashboardNavbar-DYtmVlhy.mjs → DashboardNavbar-D7-3zBUU.mjs} +3 -3
- package/.output/server/chunks/build/DashboardNavbar-D7-3zBUU.mjs.map +1 -0
- package/.output/server/chunks/build/{DashboardSidebarToggle-BPNxODwj.mjs → DashboardSidebarToggle-C3HdHvlE.mjs} +2 -2
- package/.output/server/chunks/build/DashboardSidebarToggle-C3HdHvlE.mjs.map +1 -0
- package/.output/server/chunks/build/{DataLocationCard-2B-sVSMr.mjs → DataLocationCard-CC2-lHiP.mjs} +3 -3
- package/.output/server/chunks/build/DataLocationCard-CC2-lHiP.mjs.map +1 -0
- package/.output/server/chunks/build/{MetaStripGroup-BBByVvpR.mjs → DesktopRunLocallyButton-iNzrDsEs.mjs} +601 -623
- package/.output/server/chunks/build/DesktopRunLocallyButton-iNzrDsEs.mjs.map +1 -0
- package/.output/server/chunks/build/{DiagnosisPanel-D6QO30FQ.mjs → DiagnosisPanel-BVb2LgHu.mjs} +5 -5
- package/.output/server/chunks/build/DiagnosisPanel-BVb2LgHu.mjs.map +1 -0
- package/.output/server/chunks/build/{DiagnosisResult-ujB5Lt2A.mjs → DiagnosisResult-xVgZlfKK.mjs} +8 -8
- package/.output/server/chunks/build/DiagnosisResult-xVgZlfKK.mjs.map +1 -0
- package/.output/server/chunks/build/{EntityLinks-F8_kC-IH.mjs → EntityLinks-Dzn73fbq.mjs} +2 -2
- package/.output/server/chunks/build/EntityLinks-Dzn73fbq.mjs.map +1 -0
- package/.output/server/chunks/build/{EnvManagedBadge-D6e-10M9.mjs → EnvManagedBadge-C-agmABK.mjs} +3 -3
- package/.output/server/chunks/build/EnvManagedBadge-C-agmABK.mjs.map +1 -0
- package/.output/server/chunks/build/{FeatureUnavailable-BMw4euTk.mjs → FeatureUnavailable-DHFkwI7t.mjs} +2 -2
- package/.output/server/chunks/build/FeatureUnavailable-DHFkwI7t.mjs.map +1 -0
- package/.output/server/chunks/build/{FormField-QptK0rPg.mjs → FormField-GYHKiSI6.mjs} +2 -2
- package/.output/server/chunks/build/FormField-GYHKiSI6.mjs.map +1 -0
- package/.output/server/chunks/build/{GetStartedWizard-DxT8T14Y.mjs → GetStartedWizard-BpcGYsm2.mjs} +3 -3
- package/.output/server/chunks/build/GetStartedWizard-BpcGYsm2.mjs.map +1 -0
- package/.output/server/chunks/build/{HelpHint-C5Ru8BCc.mjs → HelpHint-plioHKA0.mjs} +2 -2
- package/.output/server/chunks/build/HelpHint-plioHKA0.mjs.map +1 -0
- package/.output/server/chunks/build/MetaStripGroup-A0a72vt5.mjs +193 -0
- package/.output/server/chunks/build/MetaStripGroup-A0a72vt5.mjs.map +1 -0
- package/.output/server/chunks/build/{Modal-BacZmQCX.mjs → Modal-hKLvVFNp.mjs} +2 -2
- package/.output/server/chunks/build/Modal-hKLvVFNp.mjs.map +1 -0
- package/.output/server/chunks/build/{NavigationMenu-sTiKSWDm.mjs → NavigationMenu-RfBOyS32.mjs} +4 -4
- package/.output/server/chunks/build/NavigationMenu-RfBOyS32.mjs.map +1 -0
- package/.output/server/chunks/build/{OpenInIdeLink-Crc8y0Yx.mjs → OpenInIdeLink-Jp6SzEtD.mjs} +4 -4
- package/.output/server/chunks/build/{OpenInIdeLink-Crc8y0Yx.mjs.map → OpenInIdeLink-Jp6SzEtD.mjs.map} +1 -1
- package/.output/server/chunks/build/{ProjectTestCasesTable-DwjqZ2i5.mjs → ProjectTestCasesTable-DxOTfhi4.mjs} +8 -8
- package/.output/server/chunks/build/{ProjectTestCasesTable-DwjqZ2i5.mjs.map → ProjectTestCasesTable-DxOTfhi4.mjs.map} +1 -1
- package/.output/server/chunks/build/{RovingFocusItem--OEHI2P3.mjs → RovingFocusItem-BOSx1Z9Z.mjs} +2 -2
- package/.output/server/chunks/build/RovingFocusItem-BOSx1Z9Z.mjs.map +1 -0
- package/.output/server/chunks/build/{SectionCard-C753B3Yo.mjs → SectionCard-DHAFvJxm.mjs} +2 -2
- package/.output/server/chunks/build/SectionCard-DHAFvJxm.mjs.map +1 -0
- package/.output/server/chunks/build/{Select-BAyYwPuo.mjs → Select-CEyw7HGK.mjs} +3 -3
- package/.output/server/chunks/build/Select-CEyw7HGK.mjs.map +1 -0
- package/.output/server/chunks/build/{SelectMenu-zE_AhMX8.mjs → SelectMenu-C02Hs2_F.mjs} +4 -4
- package/.output/server/chunks/build/{SelectMenu-zE_AhMX8.mjs.map → SelectMenu-C02Hs2_F.mjs.map} +1 -1
- package/.output/server/chunks/build/{Separator-BbgCfKKJ.mjs → Separator-lrN70ODV.mjs} +2 -2
- package/.output/server/chunks/build/Separator-lrN70ODV.mjs.map +1 -0
- package/.output/server/chunks/build/{SettingsField-D-VriK9X.mjs → SettingsField-tRmytcEJ.mjs} +5 -5
- package/.output/server/chunks/build/SettingsField-tRmytcEJ.mjs.map +1 -0
- package/.output/server/chunks/build/{Slideover-CNbGvbUF.mjs → Slideover-D6cRIqch.mjs} +3 -3
- package/.output/server/chunks/build/Slideover-D6cRIqch.mjs.map +1 -0
- package/.output/server/chunks/build/{Switch-DdkA3Fii.mjs → Switch-R2n82ncQ.mjs} +4 -4
- package/.output/server/chunks/build/Switch-R2n82ncQ.mjs.map +1 -0
- package/.output/server/chunks/build/{Table-CfDVAuUJ.mjs → Table-qZdnm9t2.mjs} +2 -2
- package/.output/server/chunks/build/Table-qZdnm9t2.mjs.map +1 -0
- package/.output/server/chunks/build/{Tabs-BCOhHEB9.mjs → Tabs-BDP7MWl4.mjs} +3 -3
- package/.output/server/chunks/build/Tabs-BDP7MWl4.mjs.map +1 -0
- package/.output/server/chunks/build/{TestStatusBar-wquHQqtp.mjs → TestStatusBar-CvsmKJ4D.mjs} +2 -2
- package/.output/server/chunks/build/TestStatusBar-CvsmKJ4D.mjs.map +1 -0
- package/.output/server/chunks/build/{Textarea-Ohs6QTXf.mjs → Textarea-DpmpM-lN.mjs} +2 -2
- package/.output/server/chunks/build/Textarea-DpmpM-lN.mjs.map +1 -0
- package/.output/server/chunks/build/{Tooltip-BRBnl4pE.mjs → Tooltip-BI3WQErw.mjs} +2 -2
- package/.output/server/chunks/build/Tooltip-BI3WQErw.mjs.map +1 -0
- package/.output/server/chunks/build/{VisuallyHiddenInput-BHvzNumK.mjs → VisuallyHiddenInput-D4E5aJCQ.mjs} +2 -2
- package/.output/server/chunks/build/VisuallyHiddenInput-D4E5aJCQ.mjs.map +1 -0
- package/.output/server/chunks/build/{_id_-CGs0u8Fr.mjs → _id_-CrGTZymJ.mjs} +70 -41
- package/.output/server/chunks/build/{_id_-CGs0u8Fr.mjs.map → _id_-CrGTZymJ.mjs.map} +1 -1
- package/.output/server/chunks/build/{_id_-BesWjK_d.mjs → _id_-D7UtAIPR.mjs} +34 -31
- package/.output/server/chunks/build/{_id_-BesWjK_d.mjs.map → _id_-D7UtAIPR.mjs.map} +1 -1
- package/.output/server/chunks/build/{_id_-CQ0lolEK.mjs → _id_-T965GKYC.mjs} +58 -15
- package/.output/server/chunks/build/_id_-T965GKYC.mjs.map +1 -0
- package/.output/server/chunks/build/{_id_-D1-06Fcl.mjs → _id_-wiULjAVc.mjs} +43 -39
- package/.output/server/chunks/build/{_id_-D1-06Fcl.mjs.map → _id_-wiULjAVc.mjs.map} +1 -1
- package/.output/server/chunks/build/{about-DdyOj-dj.mjs → about-B3V_OEiu.mjs} +5 -5
- package/.output/server/chunks/build/about-B3V_OEiu.mjs.map +1 -0
- package/.output/server/chunks/build/{account-7aVMKekZ.mjs → account-DpBdYE46.mjs} +6 -6
- package/.output/server/chunks/build/account-DpBdYE46.mjs.map +1 -0
- package/.output/server/chunks/build/{ai-zw3T9b5u.mjs → ai-DYhpzbqp.mjs} +15 -15
- package/.output/server/chunks/build/{ai-zw3T9b5u.mjs.map → ai-DYhpzbqp.mjs.map} +1 -1
- package/.output/server/chunks/build/{analytics-CeCzKwEX.mjs → analytics-CZJEU0an.mjs} +17 -17
- package/.output/server/chunks/build/{analytics-CeCzKwEX.mjs.map → analytics-CZJEU0an.mjs.map} +1 -1
- package/.output/server/chunks/build/client.precomputed.mjs +1 -1
- package/.output/server/chunks/build/{default-CkyAx_Mu.mjs → default-DO1izI2V.mjs} +504 -88
- package/.output/server/chunks/build/default-DO1izI2V.mjs.map +1 -0
- package/.output/server/chunks/build/{docs-Dhj-wEks.mjs → docs-C8bndVXg.mjs} +11 -11
- package/.output/server/chunks/build/{docs-Dhj-wEks.mjs.map → docs-C8bndVXg.mjs.map} +1 -1
- package/.output/server/chunks/build/{edit-CVz_gdoe.mjs → edit-BdfF9er2.mjs} +12 -12
- package/.output/server/chunks/build/edit-BdfF9er2.mjs.map +1 -0
- package/.output/server/chunks/build/{fetch-Be-j7hF1.mjs → fetch-tkz5_OA-.mjs} +2 -2
- package/.output/server/chunks/build/fetch-tkz5_OA-.mjs.map +1 -0
- package/.output/server/chunks/build/{forgot-password-CwdjL7BO.mjs → forgot-password-swZRcvXE.mjs} +3 -3
- package/.output/server/chunks/build/forgot-password-swZRcvXE.mjs.map +1 -0
- package/.output/server/chunks/build/{import-DyQEw4V3.mjs → import-B27Sv7h5.mjs} +10 -10
- package/.output/server/chunks/build/import-B27Sv7h5.mjs.map +1 -0
- package/.output/server/chunks/build/{index-DcnICCZU.mjs → index-BdZmxLtC.mjs} +17 -17
- package/.output/server/chunks/build/{index-DcnICCZU.mjs.map → index-BdZmxLtC.mjs.map} +1 -1
- package/.output/server/chunks/build/{index-D7Bmj6bq.mjs → index-C7m32bRI.mjs} +9 -9
- package/.output/server/chunks/build/index-C7m32bRI.mjs.map +1 -0
- package/.output/server/chunks/build/{index-DghAFpNR.mjs → index-vRwzDXLs.mjs} +30 -29
- package/.output/server/chunks/build/{index-DghAFpNR.mjs.map → index-vRwzDXLs.mjs.map} +1 -1
- package/.output/server/chunks/build/{isValueEqualOrExist-D2qw9YEr.mjs → isValueEqualOrExist-D4lZ8uRY.mjs} +2 -2
- package/.output/server/chunks/build/isValueEqualOrExist-D4lZ8uRY.mjs.map +1 -0
- package/.output/server/chunks/build/{login-rXKF63j6.mjs → login-hxCF06JT.mjs} +4 -4
- package/.output/server/chunks/build/login-hxCF06JT.mjs.map +1 -0
- package/.output/server/chunks/build/{mcp-ByNvFy4o.mjs → mcp-BVW1llyW.mjs} +11 -11
- package/.output/server/chunks/build/mcp-BVW1llyW.mjs.map +1 -0
- package/.output/server/chunks/build/{notifications-CbLAZnKJ.mjs → notifications-Dn-evqXM.mjs} +11 -11
- package/.output/server/chunks/build/notifications-Dn-evqXM.mjs.map +1 -0
- package/.output/server/chunks/build/{performance-C93MEPaZ.mjs → performance-CV8qm94u.mjs} +10 -10
- package/.output/server/chunks/build/performance-CV8qm94u.mjs.map +1 -0
- package/.output/server/chunks/build/{pr-feedback-DKCB0bDE.mjs → pr-feedback-gKDz8LyA.mjs} +9 -9
- package/.output/server/chunks/build/pr-feedback-gKDz8LyA.mjs.map +1 -0
- package/.output/server/chunks/build/{reset-password-BBoHKMqD.mjs → reset-password-DtEISa1I.mjs} +3 -3
- package/.output/server/chunks/build/reset-password-DtEISa1I.mjs.map +1 -0
- package/.output/server/chunks/build/server.mjs +85 -31
- package/.output/server/chunks/build/{settings-DiG0JjzC.mjs → settings-BJDnuLpc.mjs} +8 -8
- package/.output/server/chunks/build/settings-BJDnuLpc.mjs.map +1 -0
- package/.output/server/chunks/build/{setup-0-1O6Hjz.mjs → setup-BO9tXa_G.mjs} +14 -14
- package/.output/server/chunks/build/{setup-0-1O6Hjz.mjs.map → setup-BO9tXa_G.mjs.map} +1 -1
- package/.output/server/chunks/build/{storage-3JiFJ843.mjs → storage-zN92cA9q.mjs} +10 -10
- package/.output/server/chunks/build/storage-zN92cA9q.mjs.map +1 -0
- package/.output/server/chunks/build/{tags-CqYcp7js.mjs → tags-CJFnoyQc.mjs} +5 -5
- package/.output/server/chunks/build/tags-CJFnoyQc.mjs.map +1 -0
- package/.output/server/chunks/build/{test-cases-y1HSgPX2.mjs → test-cases-0Q6rT73d.mjs} +18 -18
- package/.output/server/chunks/build/test-cases-0Q6rT73d.mjs.map +1 -0
- package/.output/server/chunks/build/{test-functions-D2ju95Ly.mjs → test-functions-DVRJgiWo.mjs} +8 -8
- package/.output/server/chunks/build/test-functions-DVRJgiWo.mjs.map +1 -0
- package/.output/server/chunks/build/{useCopyRich-CVFeYfkG.mjs → useCopyRich-CZxJ7IY_.mjs} +12 -12
- package/.output/server/chunks/build/{useCopyRich-CVFeYfkG.mjs.map → useCopyRich-CZxJ7IY_.mjs.map} +1 -1
- package/.output/server/chunks/build/useDesktopLocalRuns-k7Gw3Fv3.mjs +319 -0
- package/.output/server/chunks/build/useDesktopLocalRuns-k7Gw3Fv3.mjs.map +1 -0
- package/.output/server/chunks/build/useDesktopProjectLink-WwLte59P.mjs +67 -0
- package/.output/server/chunks/build/useDesktopProjectLink-WwLte59P.mjs.map +1 -0
- package/.output/server/chunks/build/{useFormControl-CZ9So7iX.mjs → useFormControl-8skMOTIf.mjs} +2 -2
- package/.output/server/chunks/build/useFormControl-8skMOTIf.mjs.map +1 -0
- package/.output/server/chunks/build/{useOpenInIde--6Me0WlL.mjs → useOpenInIde-D74FmDNg.mjs} +2 -2
- package/.output/server/chunks/build/useOpenInIde-D74FmDNg.mjs.map +1 -0
- package/.output/server/chunks/build/{users-IdmY9JZV.mjs → users-C9bjOBde.mjs} +6 -6
- package/.output/server/chunks/build/users-C9bjOBde.mjs.map +1 -0
- package/.output/server/chunks/nitro/nitro.mjs +734 -720
- package/.output/server/package.json +1 -1
- package/package.json +1 -1
- package/.output/public/_nuxt/B-6GGrhr.js +0 -1
- package/.output/public/_nuxt/B9FSuKdA.js +0 -1
- package/.output/public/_nuxt/BaDhDBCV.js +0 -1
- package/.output/public/_nuxt/Be4c943G.js +0 -2
- package/.output/public/_nuxt/BpUXqOVj.js +0 -2
- package/.output/public/_nuxt/CScusXhF.js +0 -1
- package/.output/public/_nuxt/Cot8fIp5.js +0 -2
- package/.output/public/_nuxt/D4oheDIm.js +0 -4
- package/.output/public/_nuxt/DslnXfcH.js +0 -1
- package/.output/public/_nuxt/builds/meta/28bca36d-5571-4157-b1b8-7f62c934eed6.json +0 -1
- package/.output/public/_nuxt/entry.BAvBQY-h.css +0 -1
- package/.output/public/_nuxt/hzsG6cAc.js +0 -1
- package/.output/public/_nuxt/jjOqY9Tv.js +0 -1
- package/.output/public/_nuxt/xbO0VmDX.js +0 -1
- package/.output/server/chunks/build/Alert-DAb8nKVs.mjs.map +0 -1
- package/.output/server/chunks/build/Breadcrumb-DJp5WvUM.mjs.map +0 -1
- package/.output/server/chunks/build/BreadcrumbNav-BrQwfL8G.mjs.map +0 -1
- package/.output/server/chunks/build/BrowserBadge-Djw_e_I9.mjs.map +0 -1
- package/.output/server/chunks/build/ChartCard-B2gd_8HP.mjs.map +0 -1
- package/.output/server/chunks/build/Checkbox-C1khEdTh.mjs.map +0 -1
- package/.output/server/chunks/build/CodeBlock-CjnDrO3Y.mjs.map +0 -1
- package/.output/server/chunks/build/DashboardNavbar-DYtmVlhy.mjs.map +0 -1
- package/.output/server/chunks/build/DashboardSidebarToggle-BPNxODwj.mjs.map +0 -1
- package/.output/server/chunks/build/DataLocationCard-2B-sVSMr.mjs.map +0 -1
- package/.output/server/chunks/build/DiagnosisPanel-D6QO30FQ.mjs.map +0 -1
- package/.output/server/chunks/build/DiagnosisResult-ujB5Lt2A.mjs.map +0 -1
- package/.output/server/chunks/build/EntityLinks-F8_kC-IH.mjs.map +0 -1
- package/.output/server/chunks/build/EnvManagedBadge-D6e-10M9.mjs.map +0 -1
- package/.output/server/chunks/build/FeatureUnavailable-BMw4euTk.mjs.map +0 -1
- package/.output/server/chunks/build/FormField-QptK0rPg.mjs.map +0 -1
- package/.output/server/chunks/build/GetStartedWizard-DxT8T14Y.mjs.map +0 -1
- package/.output/server/chunks/build/HelpHint-C5Ru8BCc.mjs.map +0 -1
- package/.output/server/chunks/build/MetaStripGroup-BBByVvpR.mjs.map +0 -1
- package/.output/server/chunks/build/Modal-BacZmQCX.mjs.map +0 -1
- package/.output/server/chunks/build/NavigationMenu-sTiKSWDm.mjs.map +0 -1
- package/.output/server/chunks/build/RovingFocusItem--OEHI2P3.mjs.map +0 -1
- package/.output/server/chunks/build/SectionCard-C753B3Yo.mjs.map +0 -1
- package/.output/server/chunks/build/Select-BAyYwPuo.mjs.map +0 -1
- package/.output/server/chunks/build/Separator-BbgCfKKJ.mjs.map +0 -1
- package/.output/server/chunks/build/SettingsField-D-VriK9X.mjs.map +0 -1
- package/.output/server/chunks/build/Slideover-CNbGvbUF.mjs.map +0 -1
- package/.output/server/chunks/build/Switch-DdkA3Fii.mjs.map +0 -1
- package/.output/server/chunks/build/Table-CfDVAuUJ.mjs.map +0 -1
- package/.output/server/chunks/build/Tabs-BCOhHEB9.mjs.map +0 -1
- package/.output/server/chunks/build/TestStatusBar-wquHQqtp.mjs.map +0 -1
- package/.output/server/chunks/build/Textarea-Ohs6QTXf.mjs.map +0 -1
- package/.output/server/chunks/build/Tooltip-BRBnl4pE.mjs.map +0 -1
- package/.output/server/chunks/build/VisuallyHiddenInput-BHvzNumK.mjs.map +0 -1
- package/.output/server/chunks/build/_id_-CQ0lolEK.mjs.map +0 -1
- package/.output/server/chunks/build/about-DdyOj-dj.mjs.map +0 -1
- package/.output/server/chunks/build/account-7aVMKekZ.mjs.map +0 -1
- package/.output/server/chunks/build/default-CkyAx_Mu.mjs.map +0 -1
- package/.output/server/chunks/build/edit-CVz_gdoe.mjs.map +0 -1
- package/.output/server/chunks/build/fetch-Be-j7hF1.mjs.map +0 -1
- package/.output/server/chunks/build/forgot-password-CwdjL7BO.mjs.map +0 -1
- package/.output/server/chunks/build/import-DyQEw4V3.mjs.map +0 -1
- package/.output/server/chunks/build/index-D7Bmj6bq.mjs.map +0 -1
- package/.output/server/chunks/build/isValueEqualOrExist-D2qw9YEr.mjs.map +0 -1
- package/.output/server/chunks/build/login-rXKF63j6.mjs.map +0 -1
- package/.output/server/chunks/build/mcp-ByNvFy4o.mjs.map +0 -1
- package/.output/server/chunks/build/notifications-CbLAZnKJ.mjs.map +0 -1
- package/.output/server/chunks/build/performance-C93MEPaZ.mjs.map +0 -1
- package/.output/server/chunks/build/pr-feedback-DKCB0bDE.mjs.map +0 -1
- package/.output/server/chunks/build/reset-password-BBoHKMqD.mjs.map +0 -1
- package/.output/server/chunks/build/settings-DiG0JjzC.mjs.map +0 -1
- package/.output/server/chunks/build/storage-3JiFJ843.mjs.map +0 -1
- package/.output/server/chunks/build/tags-CqYcp7js.mjs.map +0 -1
- package/.output/server/chunks/build/test-cases-y1HSgPX2.mjs.map +0 -1
- package/.output/server/chunks/build/test-functions-D2ju95Ly.mjs.map +0 -1
- package/.output/server/chunks/build/useFormControl-CZ9So7iX.mjs.map +0 -1
- package/.output/server/chunks/build/useOpenInIde--6Me0WlL.mjs.map +0 -1
- package/.output/server/chunks/build/users-IdmY9JZV.mjs.map +0 -1
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
import{_ as ts}from"./C9p0YCAi.js";import{d as fe,o as s,c as a,j as i,p as ve,i as n,z as ss,f as b,K as at,g as r,m as w,t as l,k as e,y as ie,_ as Ce,F as O,v as p,A as ot,b as ht,P as ft,l as Fe,ak as pt,s as we,G as Ee,D as lt,q as J,h as S,r as H,L as De,R as ke,C as Ae,n as Ge,H as Qe,J as me,al as gt,E as ns,I as as,u as Oe,w as Ue,ah as os,B as ls,ad as vt,a as is,e as rs}from"./h49q_GXF.js";import{_ as kt}from"./CRPt9SfB.js";import{_ as us}from"./BTvE9qca.js";import{_ as cs}from"./CBZD8ym8.js";import{_ as ds,a as ms}from"./B_mN5eMV.js";import{_ as fs,d as ps,a as gs,b as xs,c as ys}from"./BpUXqOVj.js";import{_ as hs}from"./CJEp4i0N.js";import{_ as Ke}from"./DWEkQ7bl.js";import{_ as Ie}from"./BtSJxOdh.js";import{_ as bt}from"./Cwwe5bRS.js";import{_ as vs}from"./DtSn2Q9-.js";import{y as wt,n as _t,p as $t,f as it,a as ks,h as Ct,m as bs,z as tt,A as st,k as je,B as Tt,j as nt,b as ws,c as _s,i as ce}from"./CD3R-ggS.js";import{f as Ve}from"./D-c8ZSws.js";import{_ as $s}from"./9P8iHISX.js";import{_ as rt}from"./CWoSSKhQ.js";import{_ as Cs}from"./DBhdObsO.js";import{b as Rt}from"./BZnfiR67.js";import{a as ut,u as Le}from"./Cd8r0xk5.js";import{_ as Ts}from"./DDN2tt0a.js";import{_ as zt}from"./BlRWlfdD.js";import{_ as Rs}from"./x8YSyy4c.js";import{_ as St}from"./PdEEuEsg.js";import{_ as zs}from"./DOBSrxzY.js";import{_ as It}from"./cSeAgciy.js";import{u as Ss}from"./4yvOL9PC.js";import{_ as Is}from"./CWw9WGlv.js";import{_ as Ft}from"./DHUT-BKj.js";import{_ as Pt}from"./BVN50jIb.js";import{_ as Fs}from"./DLNNAYfu.js";import{_ as ct}from"./DGyGmFem.js";import{_ as jt}from"./DzM9oeLa.js";import{_ as Ps}from"./6-ivqM_I.js";import{_ as Dt}from"./jjOqY9Tv.js";import{_ as js}from"./BH-ym1CI.js";import{_ as Ds}from"./C0v6l4pr.js";import{_ as Ns}from"./9N6hSApy.js";import{u as Bs}from"./BUMoU50-.js";import{_ as Ms}from"./BQOWm9mQ.js";import{u as As,s as Us}from"./CNcu4khZ.js";import"./BhH0TNTi.js";import"./BKJetfRH.js";import"./D4UlSVir.js";import"./B0hK-xDF.js";import"./xbO0VmDX.js";import"./B9FSuKdA.js";import"./BNAHBHbY.js";import"./Dj-TetcW.js";import"./CDh_Qt7h.js";import"./Hot1UcKY.js";import"./BjaRappk.js";import"./D7W_4Sqc.js";import"./CScusXhF.js";import"./x8w_1_rn.js";import"./DOLeth7M.js";import"./B6s20NbT.js";import"./Cf52zHyB.js";import"./t-juTK3X.js";const Ls={key:0,class:"inline-flex items-center gap-2 text-info"},Es={type:"button",class:"inline-flex items-center gap-1.5 rounded-md px-1.5 py-0.5 -my-0.5 -ml-1.5 text-muted hover:text-default hover:bg-elevated/60 transition-colors cursor-pointer",title:"Stored reports & artifacts"},Os={class:"tabular-nums whitespace-nowrap"},Ks={class:"text-dimmed"},Ws={class:"p-3 w-72 space-y-2"},Hs={class:"text-xs font-medium text-muted inline-flex items-center gap-1"},Vs={class:"text-xs tabular-nums text-dimmed shrink-0"},Gs={key:0,class:"flex items-center justify-between gap-2 text-sm border-t border-default pt-2"},Xs={class:"truncate"},qs={class:"text-xs tabular-nums text-dimmed shrink-0"},Ys=fe({__name:"RunStorageChip",props:{storageStats:{},reports:{},finalizing:{type:Boolean}},setup(t){const y=ot();return(k,R)=>{const C=ve,d=ss,T=Ie,u=Ce,h=at;return t.finalizing?(s(),a("div",Ls,[i(C,{name:"i-lucide-upload",class:"size-3.5 shrink-0 animate-pulse"}),R[0]||(R[0]=n("span",{class:"text-xs font-medium whitespace-nowrap"},"Uploading reports & traces…",-1)),i(d,{value:null,size:"sm",color:"info",class:"w-24 rounded-full animate-pulse"})])):t.storageStats?.totalFiles?(s(),b(h,{key:1},{content:r(()=>[n("div",Ws,[n("p",Hs,[R[1]||(R[1]=w(" Stored artifacts ",-1)),i(T,{topic:"run.reports"})]),(s(!0),a(O,null,ie(t.reports,B=>(s(),a("div",{key:`${B.type}-${B.path}`,class:"flex items-center justify-between gap-2 min-w-0"},[i(u,{href:("fileApiUrl"in k?k.fileApiUrl:e(_t))(B.path,null,e(y).app?.baseURL),icon:("reportIcon"in k?k.reportIcon:e(wt))(B.type),target:"_blank",size:"xs",variant:"outline",class:"min-w-0",ui:{label:"truncate"}},{default:r(()=>[w(l(B.label),1)]),_:2},1032,["href","icon"]),n("span",Vs,l(("formatBytes"in k?k.formatBytes:e(Ve))(B.size)),1)]))),128)),t.storageStats.testCaseFilesCount>0?(s(),a("div",Gs,[n("span",Xs,"Test files ("+l(t.storageStats.testCaseFilesCount)+")",1),n("span",qs,l(("formatBytes"in k?k.formatBytes:e(Ve))(t.storageStats.testCaseFilesSize)),1)])):p("",!0)])]),default:r(()=>[n("button",Es,[i(C,{name:"i-lucide-database",class:"size-3.5 text-dimmed shrink-0"}),n("span",Os,[w(l(("formatBytes"in k?k.formatBytes:e(Ve))(t.storageStats.totalSize))+" ",1),n("span",Ks,"· "+l(t.storageStats.totalFiles)+" file"+l(t.storageStats.totalFiles===1?"":"s"),1)]),i(C,{name:"i-lucide-chevron-down",class:"size-3 text-dimmed shrink-0"})])]),_:1})):p("",!0)}}}),Js=Object.assign(Ys,{__name:"RunStorageChip"}),Zs={class:"flex items-center gap-3 flex-1 min-w-0 justify-between"},Qs={class:"flex items-center gap-3 min-w-0"},en={class:"text-sm font-semibold truncate flex items-center gap-1"},tn={class:"flex items-center gap-3 shrink-0 max-sm:hidden"},sn={class:"text-xs text-zinc-500 tabular-nums whitespace-nowrap"},nn={class:"text-zinc-700 dark:text-zinc-300"},an={class:"text-xs text-emerald-600 dark:text-emerald-400 tabular-nums whitespace-nowrap"},on={class:"text-xs text-rose-600 dark:text-rose-400 tabular-nums whitespace-nowrap"},ln={class:"text-xs text-zinc-500 tabular-nums whitespace-nowrap"},rn={class:"text-xs text-amber-600 dark:text-amber-400 tabular-nums whitespace-nowrap",title:"Tests that never ran (maxFailures cutoff or a serial-group failure)"},un={class:"text-xs text-orange-600 dark:text-orange-400 tabular-nums whitespace-nowrap"},cn={class:"@container"},dn={class:"space-y-3"},mn={class:"flex items-start justify-between gap-x-3 gap-y-2 flex-wrap pr-8"},fn={class:"min-w-0 flex-1 basis-64"},pn={class:"flex items-center gap-2 flex-wrap"},gn={class:"text-base font-bold shrink-0 flex items-center gap-1"},xn={class:"mt-1 text-xs text-muted flex items-center gap-1.5 flex-wrap"},yn={class:"text-dimmed"},hn={class:"flex items-center gap-1.5 shrink-0"},vn={class:"p-2 space-y-1 min-w-32"},kn=["onClick"],bn={class:"hidden @2xl:inline"},wn={class:"text-xl font-bold mt-0.5"},_n={class:"relative"},$n={class:"text-xl font-bold mt-0.5 text-emerald-600 dark:text-emerald-400"},Cn={class:"text-xl font-bold mt-0.5 text-rose-600 dark:text-rose-400"},Tn={class:"text-xl font-bold mt-0.5 text-zinc-600 dark:text-zinc-400"},Rn={class:"text-xl font-bold mt-0.5 text-amber-600 dark:text-amber-400"},zn={key:0,class:"flex items-center gap-x-4 gap-y-1.5 flex-wrap"},Sn={class:"flex-1 basis-60 min-w-44 max-w-xl"},In={class:"flex items-center flex-wrap gap-x-3 gap-y-1 text-xs shrink-0"},Fn={class:"flex items-center gap-1"},Pn={key:0,class:"flex items-center gap-1"},jn={key:1,class:"flex items-center gap-1"},Dn={key:2,class:"flex items-center gap-1"},Nn={key:0,class:"rounded-full border border-default px-2 py-0.5 text-xs bg-elevated/60"},Bn={key:1},Mn=["href"],An={key:1},Un={class:"text-muted"},Ln={key:0,class:"font-medium"},En=["title"],On={key:2,class:"text-muted"},Kn=["title"],Wn={class:"text-muted whitespace-nowrap"},Hn={class:"text-muted"},Vn={key:0,class:"mt-2"},Gn={class:"bg-zinc-50 dark:bg-zinc-900 p-2.5 rounded text-xs font-mono overflow-x-auto max-h-48 overflow-y-auto"},Xn={class:"m-0"},qn=fe({__name:"RunSummary",props:{testRun:{},displayProgress:{},allReports:{},showCustomData:{type:Boolean},finalizing:{type:Boolean},activeFilter:{},totalWastedTime:{}},emits:["update:showCustomData","filter-status","label-updated"],setup(t,{emit:y}){const k=t,R=y,C=ht(),d=ot(),T=S(()=>k.testRun?.storageStats),u=S(()=>k.testRun?.metadata?.ci),h=S(()=>k.testRun?.metadata?.scm),B=S(()=>k.testRun?.metadata?.tags),M=S(()=>k.testRun?.metadata?.customData),P=S(()=>!!(u.value||k.testRun?.environment)),I=S(()=>!!(k.testRun?.playwrightVersion||k.testRun?.reporterVersion)),j=S(()=>!!(T.value?.totalFiles||k.finalizing)),W=S(()=>k.allReports[0]??null),{copy:L,copied:f}=ut(),z=H("file-line"),_=H(!1),c=S(()=>k.testRun?.testCases?k.testRun.testCases.filter(D=>D.status==="failed"||D.status==="timedout").map(D=>({filePath:(D.filePath||D.location?.split(":")[0])??"",title:D.title,line:D.location&&parseInt(D.location.split(":")[1]??"",10)||null,projectName:D.browser?.projectName||null})):[]);function m(){return Rt(c.value,{mode:z.value})}async function A(){const D=m();D&&(_.value=!0,await L(D,{toast:"Retry command copied"}),setTimeout(()=>{_.value=!1},2e3))}const $=S(()=>_.value?"Copied!":Ct(m()));function E(){const D=k.testRun;if(!D)return"";const o=D.status==="passed"?"✅":D.status==="failed"?"❌":D.status==="running"?"🔄":"⚠️",F=D.label?` — ${D.label}`:"",V=D.project?.label??D.project?.name??"",re=D.totalTests??0,Z=D.passedTests??0,v=D.failedTests??0,X=D.skippedTests??0,ne=D.didNotRunTests??0,te=D.flakyTests??0,xe=ks(D.duration),be=te>0?` · ${te} flaky`:"",se=ne>0?` · ${ne} didn't run`:"";return[`*Run #${D.id}*${F}`,`Status: ${o} ${D.status} | Project: ${V}`,`Tests: ${re} total · ${Z} passed · ${v} failed · ${X} skipped${se}${be}`,`Duration: ${xe}`].join(`
|
|
2
|
-
`)}const x=H(""),Y=H(!1),Q=H(!1);let oe=!1;const ee=H(null);function le(){oe=!1,x.value=k.testRun?.label??"",Y.value=!0,De(()=>ee.value?.focus())}async function K(){if(Q.value)return;if(oe){oe=!1;return}const D=k.testRun;if(D){Q.value=!0;try{await $fetch(`/api/test-runs/${D.id}`,{method:"PATCH",body:{label:x.value||null}}),Y.value=!1,R("label-updated")}catch(o){const F=o&&typeof o=="object"&&"data"in o?o.data?.message:"Failed to save label";C.add({title:"Error",description:F||"Failed to save label",color:"error"})}finally{Q.value=!1}}}function N(){oe=!0,Y.value=!1}function he(D){D.key==="Enter"?K():D.key==="Escape"&&N()}return(D,o)=>{const F=fs,V=ve,re=we,Z=hs,v=Ke,X=Ie,ne=bt,te=Ee,xe=kt,be=lt,se=Ce,Te=at,Re=ps,pe=vs,ge=xs,_e=Js,Se=$s,g=gs,$e=rt,Ne=Cs;return s(),b(Ne,{"storage-key":"test-run"},{folded:r(()=>[n("div",Zs,[n("div",Qs,[i(F,{status:t.testRun?.status??"",size:"sm"},null,8,["status"]),n("span",en,[w(" Run #"+l(t.testRun?.id)+" ",1),e(Y)?(s(),a(O,{key:0},[ft(n("input",{ref_key:"labelInputRef",ref:ee,"onUpdate:modelValue":o[0]||(o[0]=ae=>Fe(x)?x.value=ae:null),type:"text",placeholder:"Add a label...",class:"inline-block w-40 text-sm font-normal border-b border-dashed border-zinc-400 bg-transparent outline-none focus:border-primary px-0.5 py-0",onKeydown:he,onBlur:K},null,544),[[pt,e(x)]]),e(Q)?(s(),b(V,{key:0,name:"i-lucide-loader-circle",class:"size-3.5 text-zinc-400 animate-spin shrink-0"})):p("",!0)],64)):(s(),a(O,{key:1},[t.testRun?.label?(s(),a("span",{key:0,class:"font-normal text-zinc-500 ml-1.5 cursor-pointer hover:text-zinc-700 dark:hover:text-zinc-300 border-b border-dashed border-transparent hover:border-zinc-400",onClick:le},"— "+l(t.testRun.label),1)):(s(),a("button",{key:1,class:"text-xs text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 border-b border-dashed border-transparent hover:border-zinc-400 ml-1",title:"Add a label",onClick:le}," + label "))],64))]),t.testRun?.shardTotal&&t.testRun.shardTotal>1?(s(),b(re,{key:0,color:"neutral",variant:"soft",size:"sm",class:"shrink-0",title:`Shard ${t.testRun.shardsFinished??0}/${t.testRun.shardTotal}`},{default:r(()=>[i(V,{name:"i-lucide-layout-grid",class:"size-3 mr-1"}),w(" "+l(t.testRun.shardsFinished??0)+"/"+l(t.testRun.shardTotal),1)]),_:1},8,["title"])):p("",!0)]),n("div",tn,[n("span",sn,[o[12]||(o[12]=w(" T: ",-1)),n("strong",nn,l(t.displayProgress?.totalTests??t.testRun?.totalTests??0),1)]),n("span",an,[o[13]||(o[13]=w(" P: ",-1)),n("strong",null,l(t.displayProgress?.passedTests??t.testRun?.passedTests??0),1)]),n("span",on,[o[14]||(o[14]=w(" F: ",-1)),n("strong",null,l(t.displayProgress?.failedTests??t.testRun?.failedTests??0),1)]),n("span",ln,[o[15]||(o[15]=w(" S: ",-1)),n("strong",null,l(t.displayProgress?.skippedTests??t.testRun?.skippedTests??0),1)]),n("span",rn,[o[16]||(o[16]=w(" DNR: ",-1)),n("strong",null,l(t.testRun?.didNotRunTests??0),1)]),n("span",un,[o[17]||(o[17]=w(" Fl: ",-1)),n("strong",null,l(t.testRun?.flakyTests??0),1)]),i(Z,{passed:t.displayProgress?.passedTests??t.testRun?.passedTests??0,failed:t.displayProgress?.failedTests??t.testRun?.failedTests??0,skipped:t.displayProgress?.skippedTests??t.testRun?.skippedTests??0,flaky:t.testRun?.flakyTests??0,"did-not-run":t.testRun?.didNotRunTests??0,total:t.displayProgress?.totalTests??t.testRun?.totalTests??0},null,8,["passed","failed","skipped","flaky","did-not-run","total"]),i(v,{ms:t.testRun?.duration,class:"text-xs text-zinc-400"},null,8,["ms"])])])]),default:r(()=>[n("div",cn,[i($e,{class:"shadow-xs",ui:{footer:"px-4 py-2.5 sm:px-4 bg-muted/30"}},{footer:r(()=>[i(g,null,{default:r(()=>[e(P)?(s(),b(ge,{key:0,label:"CI & environment",icon:"i-lucide-cloud",help:"run.ci-env"},{default:r(()=>[t.testRun?.environment?(s(),a("span",Nn,l(t.testRun.environment),1)):p("",!0),e(u)?.provider?(s(),a("span",Bn,l(e(u).provider),1)):p("",!0),e(u)?.buildNumber||e(u)?.buildUrl?(s(),a(O,{key:2},[o[29]||(o[29]=n("span",{class:"text-dimmed"},"·",-1)),e(u)?.buildUrl?(s(),a("a",{key:0,href:e(u).buildUrl,target:"_blank",class:"text-primary hover:underline"},l(e(u)?.buildNumber?`Build #${e(u).buildNumber}`:"View build"),9,Mn)):(s(),a("span",An,"Build #"+l(e(u).buildNumber),1))],64)):p("",!0),e(u)?.workflow||e(u)?.jobName?(s(),a(O,{key:3},[o[30]||(o[30]=n("span",{class:"text-dimmed"},"·",-1)),n("span",Un,[e(u)?.workflow?(s(),a(O,{key:0},[w(l(e(u).workflow),1)],64)):p("",!0),e(u)?.workflow&&e(u)?.jobName?(s(),a(O,{key:1},[w(" · ")],64)):p("",!0),e(u)?.jobName?(s(),a(O,{key:2},[w(l(e(u).jobName),1)],64)):p("",!0)])],64)):p("",!0)]),_:1})):p("",!0),e(h)?(s(),b(ge,{key:1,label:"Source",icon:"i-lucide-git-branch"},{default:r(()=>[e(h).branch?(s(),a("span",Ln,l(e(h).branch),1)):p("",!0),e(h).commit?(s(),a("code",{key:1,class:"text-xs font-mono bg-zinc-100 dark:bg-zinc-800 px-1 py-0.5 rounded",title:e(h).commit},l(e(h).commit.length>=8?e(h).commit.substring(0,8):e(h).commit),9,En)):p("",!0),e(h).author?(s(),a("span",On,l(e(h).author),1)):p("",!0),e(h).commitMessage?(s(),a("span",{key:3,class:"text-xs text-dimmed truncate max-w-[40ch]",title:e(h).commitMessage},l(e(h).commitMessage),9,Kn)):p("",!0)]),_:1})):p("",!0),e(I)?(s(),b(ge,{key:2,label:"Tooling versions",icon:"i-lucide-tag"},{default:r(()=>[n("span",Wn,[t.testRun?.playwrightVersion?(s(),a(O,{key:0},[w("Playwright v"+l(t.testRun.playwrightVersion),1)],64)):p("",!0),t.testRun?.playwrightVersion&&t.testRun?.reporterVersion?(s(),a(O,{key:1},[w(" · ")],64)):p("",!0),t.testRun?.reporterVersion?(s(),a(O,{key:2},[w("Piwi v"+l(t.testRun.reporterVersion),1)],64)):p("",!0)])]),_:1})):p("",!0),e(B)?.length?(s(),b(ge,{key:3,label:"Tags",icon:"i-lucide-tags"},{default:r(()=>[(s(!0),a(O,null,ie(e(B),ae=>(s(),b(re,{key:ae,color:"neutral",variant:"soft",size:"sm"},{default:r(()=>[w(l(ae),1)]),_:2},1024))),128))]),_:1})):p("",!0),t.testRun?.metadata?.relatedIssue?(s(),b(ge,{key:4,label:"Related issue",icon:"i-lucide-bookmark"},{default:r(()=>[n("span",Hn,l(t.testRun.metadata.relatedIssue),1)]),_:1})):p("",!0),e(j)?(s(),b(ge,{key:5,label:"Storage"},{default:r(()=>[i(_e,{"storage-stats":e(T),reports:t.allReports,finalizing:t.finalizing},null,8,["storage-stats","reports","finalizing"])]),_:1})):p("",!0),i(ge,{label:"Links",icon:"i-lucide-link",help:"run.metadata"},{default:r(()=>[i(Se,{"entity-type":"test_run","entity-id":t.testRun.id,links:t.testRun.links??null,onUpdated:o[10]||(o[10]=ae=>D.$emit("label-updated"))},null,8,["entity-id","links"])]),_:1}),e(M)?(s(),b(ge,{key:6,label:"Custom data"},{default:r(()=>[i(se,{size:"xs",variant:"ghost",color:"neutral",icon:t.showCustomData?"i-lucide-chevron-up":"i-lucide-chevron-down",onClick:o[11]||(o[11]=ae=>R("update:showCustomData",!t.showCustomData))},{default:r(()=>[...o[31]||(o[31]=[w(" Custom data ",-1)])]),_:1},8,["icon"])]),_:1})):p("",!0)]),_:1}),t.showCustomData&&e(M)?(s(),a("div",Vn,[n("div",Gn,[n("pre",Xn,l(JSON.stringify(e(M),null,2)),1)])])):p("",!0)]),default:r(()=>[n("div",dn,[n("div",mn,[n("div",fn,[n("div",pn,[i(F,{status:t.testRun?.status??""},null,8,["status"]),n("h2",gn,[w(" Run #"+l(t.testRun?.id)+" ",1),e(Y)?(s(),a(O,{key:0},[ft(n("input",{ref_key:"labelInputRef",ref:ee,"onUpdate:modelValue":o[1]||(o[1]=ae=>Fe(x)?x.value=ae:null),type:"text",placeholder:"Add a label...",class:"inline-block w-48 text-sm font-normal border-b border-dashed border-zinc-400 bg-transparent outline-none focus:border-primary px-0.5 py-0",onKeydown:he,onBlur:K},null,544),[[pt,e(x)]]),e(Q)?(s(),b(V,{key:0,name:"i-lucide-loader-circle",class:"size-3.5 text-zinc-400 animate-spin shrink-0"})):p("",!0)],64)):(s(),a(O,{key:1},[t.testRun?.label?(s(),a("span",{key:0,class:"font-normal text-zinc-500 ml-1.5 cursor-pointer hover:text-zinc-700 dark:hover:text-zinc-300 border-b border-dashed border-transparent hover:border-zinc-400",onClick:le},"— "+l(t.testRun.label),1)):(s(),a("button",{key:1,class:"text-xs text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300 border-b border-dashed border-transparent hover:border-zinc-400 ml-1.5",title:"Add a label",onClick:le}," + label "))],64)),i(X,{topic:"run.summary"})]),t.testRun?.shardTotal&&t.testRun.shardTotal>1?(s(),b(re,{key:0,color:"neutral",variant:"soft",size:"sm",class:"shrink-0",title:`Shard ${t.testRun.shardsFinished??0}/${t.testRun.shardTotal}`},{default:r(()=>[i(V,{name:"i-lucide-layout-grid",class:"size-3 mr-1"}),w(" "+l(t.testRun.shardsFinished??0)+"/"+l(t.testRun.shardTotal),1)]),_:1},8,["title"])):p("",!0),t.testRun?.precedingMarker?(s(),b(xe,{key:1,text:`This run started after: ${t.testRun.precedingMarker.label}`},{default:r(()=>[i(te,{to:`/projects/${t.testRun.projectId}?tab=timeline`,class:"shrink-0 inline-flex items-center gap-1"},{default:r(()=>[o[18]||(o[18]=n("span",{class:"text-xs text-muted"},"After",-1)),i(ne,{marker:t.testRun.precedingMarker,size:"xs"},null,8,["marker"])]),_:1},8,["to"])]),_:1},8,["text"])):p("",!0)]),n("p",xn,[n("span",null,"Started "+l(("prettyDateFormat"in D?D.prettyDateFormat:e($t))(t.testRun?.startTime)),1),i(be,null,{default:r(()=>[n("span",yn,"· "+l(("formatRelativeTime"in D?D.formatRelativeTime:e(it))(t.testRun?.startTime)),1)]),_:1})])]),n("div",hn,[i(xe,{text:e(f)?"Copied!":"Copy run summary"},{default:r(()=>[i(se,{size:"xs",variant:"ghost",color:"neutral",icon:e(f)?"i-lucide-check":"i-lucide-clipboard","aria-label":"Copy run summary",class:"text-zinc-400 hover:text-zinc-600 dark:hover:text-zinc-300",onClick:o[2]||(o[2]=ae=>e(L)(E(),{toast:"Run summary copied"}))},null,8,["icon"])]),_:1},8,["text"]),e(c).length>0?(s(),b(Te,{key:0},{content:r(()=>[n("div",vn,[o[20]||(o[20]=n("p",{class:"text-xs font-medium text-zinc-500 px-2 py-1"},"Mode",-1)),(s(),a(O,null,ie(["file-line","grep","file"],ae=>n("button",{key:ae,class:J(["w-full text-left px-2 py-1 text-sm rounded hover:bg-zinc-100 dark:hover:bg-zinc-800",e(z)===ae?"bg-primary/10 text-primary":""]),onClick:Je=>z.value=ae},l(ae==="file-line"?"File:line":ae==="grep"?"Title (grep)":"File only"),11,kn)),64))])]),default:r(()=>[i(se,{size:"xs",color:"warning",variant:"subtle",icon:e(_)?"i-lucide-check":"i-lucide-play",title:e($),"aria-label":"Retry",onClick:o[3]||(o[3]=ae=>A())},{default:r(()=>[...o[19]||(o[19]=[n("span",{class:"hidden @2xl:inline"},"Retry",-1)])]),_:1},8,["icon","title"])]),_:1})):p("",!0),e(c).length>0?(s(),b(Re,{key:1,"project-id":t.testRun?.project?.id,"project-label":t.testRun?.project?.label??t.testRun?.project?.name,cases:e(c)},null,8,["project-id","project-label","cases"])):p("",!0),e(W)?(s(),b(se,{key:2,href:("fileApiUrl"in D?D.fileApiUrl:e(_t))(e(W).path,null,e(d).app?.baseURL),icon:("reportIcon"in D?D.reportIcon:e(wt))(e(W).type),target:"_blank",size:"xs",color:"primary",variant:"outline","aria-label":e(W).label,title:e(W).size?`${e(W).label} · ${("formatBytes"in D?D.formatBytes:e(Ve))(e(W).size)}`:e(W).label},{default:r(()=>[n("span",bn,l(e(W).label),1)]),_:1},8,["href","icon","aria-label","title"])):p("",!0)])]),i(pe,{"min-tile-width":"7.5rem"},{default:r(()=>[n("button",{class:J(["rounded-lg p-3 text-left w-full transition-colors cursor-pointer",t.activeFilter==="all"?"bg-accented ring-2 ring-zinc-400 dark:ring-zinc-500":"bg-elevated/60 hover:bg-elevated"]),onClick:o[4]||(o[4]=ae=>R("filter-status","all"))},[o[21]||(o[21]=n("p",{class:"text-xs font-medium text-zinc-500 uppercase tracking-wider"},"Total",-1)),n("p",wn,l(t.displayProgress?.totalTests??t.testRun?.totalTests??0),1)],2),n("div",_n,[n("button",{class:J(["rounded-lg p-3 text-left w-full h-full transition-colors cursor-pointer",t.activeFilter==="passed"?"bg-emerald-100 dark:bg-emerald-900/30 ring-2 ring-emerald-400 dark:ring-emerald-600":"bg-emerald-50 dark:bg-emerald-900/20 hover:bg-emerald-100 dark:hover:bg-emerald-900/30"]),onClick:o[5]||(o[5]=ae=>R("filter-status","passed"))},[o[22]||(o[22]=n("p",{class:"text-xs font-medium text-emerald-700 dark:text-emerald-400 uppercase tracking-wider"}," Passed ",-1)),n("p",$n,l(t.displayProgress?.passedTests??t.testRun?.passedTests??0),1)],2),(t.testRun?.flakyTests??0)>0?(s(),a("button",{key:0,class:J(["absolute top-1.5 right-1.5 inline-flex items-center gap-0.5 rounded-full px-1.5 py-0.5 text-xs font-semibold leading-none tabular-nums transition-colors cursor-pointer",t.activeFilter==="flaky"?"bg-orange-200 dark:bg-orange-800/60 text-orange-800 dark:text-orange-200 ring-2 ring-orange-400 dark:ring-orange-600":"bg-orange-100 dark:bg-orange-900/40 text-orange-700 dark:text-orange-300 hover:bg-orange-200 dark:hover:bg-orange-800/60"]),title:"Flaky — passed only after a retry (a subset of passed). Click to filter.",onClick:o[6]||(o[6]=ae=>R("filter-status","flaky"))},[i(V,{name:"i-lucide-shuffle",class:"size-3"}),w(" "+l(t.testRun?.flakyTests??0),1)],2)):p("",!0)]),n("button",{class:J(["rounded-lg p-3 text-left w-full transition-colors cursor-pointer",t.activeFilter==="failed"?"bg-rose-100 dark:bg-rose-900/30 ring-2 ring-rose-400 dark:ring-rose-600":"bg-rose-50 dark:bg-rose-900/20 hover:bg-rose-100 dark:hover:bg-rose-900/30"]),onClick:o[7]||(o[7]=ae=>R("filter-status","failed"))},[o[23]||(o[23]=n("p",{class:"text-xs font-medium text-rose-700 dark:text-rose-400 uppercase tracking-wider"},"Failed",-1)),n("p",Cn,l(t.displayProgress?.failedTests??t.testRun?.failedTests??0),1)],2),n("button",{class:J(["rounded-lg p-3 text-left w-full transition-colors cursor-pointer",t.activeFilter==="skipped"?"bg-accented ring-2 ring-zinc-400 dark:ring-zinc-500":"bg-elevated/60 hover:bg-elevated"]),onClick:o[8]||(o[8]=ae=>R("filter-status","skipped"))},[o[24]||(o[24]=n("p",{class:"text-xs font-medium text-zinc-500 uppercase tracking-wider"},"Skipped",-1)),n("p",Tn,l(t.displayProgress?.skippedTests??t.testRun?.skippedTests??0),1)],2),n("button",{class:J(["rounded-lg p-3 text-left w-full transition-colors cursor-pointer",t.activeFilter==="didnotrun"?"bg-amber-100 dark:bg-amber-900/30 ring-2 ring-amber-400 dark:ring-amber-600":"bg-amber-50 dark:bg-amber-900/20 hover:bg-amber-100 dark:hover:bg-amber-900/30"]),title:"Tests that never ran (maxFailures cutoff or a serial-group failure)",onClick:o[9]||(o[9]=ae=>R("filter-status","didnotrun"))},[o[25]||(o[25]=n("p",{class:"text-xs font-medium text-amber-700 dark:text-amber-400 uppercase tracking-wider"},"Didn't run",-1)),n("p",Rn,l(t.testRun?.didNotRunTests??0),1)],2)]),_:1}),t.testRun?(s(),a("div",zn,[n("div",Sn,[i(Z,{passed:t.displayProgress?.passedTests??t.testRun?.passedTests??0,failed:t.displayProgress?.failedTests??t.testRun?.failedTests??0,skipped:t.displayProgress?.skippedTests??t.testRun?.skippedTests??0,flaky:t.testRun?.flakyTests??0,"did-not-run":t.testRun?.didNotRunTests??0,total:t.displayProgress?.totalTests??t.testRun?.totalTests??0},null,8,["passed","failed","skipped","flaky","did-not-run","total"])]),n("div",In,[n("div",Fn,[i(V,{name:"i-lucide-clock",class:"size-3.5 text-zinc-400"}),i(v,{ms:t.testRun?.duration,class:"font-medium"},null,8,["ms"])]),t.testRun?.avgTestDuration?(s(),a("div",Pn,[i(V,{name:"i-lucide-gauge",class:"size-3.5 text-zinc-400"}),o[26]||(o[26]=n("span",{class:"text-zinc-500"},"Avg",-1)),i(v,{ms:t.testRun.avgTestDuration,class:"font-medium"},null,8,["ms"])])):p("",!0),t.testRun?.p90TestDuration?(s(),a("div",jn,[i(V,{name:"i-lucide-arrow-up-right",class:"size-3.5 text-orange-500"}),o[27]||(o[27]=n("span",{class:"text-zinc-500"},"P90",-1)),i(v,{ms:t.testRun.p90TestDuration,class:"font-medium text-orange-600 dark:text-orange-400","unit-class":"opacity-60"},null,8,["ms"])])):p("",!0),t.totalWastedTime&&t.totalWastedTime>0?(s(),a("div",Dn,[i(V,{name:"i-lucide-clock",class:"size-3.5 text-amber-500"}),o[28]||(o[28]=n("span",{class:"text-zinc-500"},"Wasted",-1)),i(v,{ms:t.totalWastedTime,class:"font-medium text-amber-600 dark:text-amber-400","unit-class":"opacity-60"},null,8,["ms"])])):p("",!0)])])):p("",!0)])]),_:1})])]),_:1})}}}),Yn=Object.assign(qn,{__name:"RunSummary"}),Jn={key:0,class:"inline-flex items-center gap-1 flex-wrap"},Zn=fe({__name:"TestRowBadges",props:{mode:{default:null},isNewRegression:{type:[Boolean,null],default:!1},isNewFlaky:{type:[Boolean,null],default:!1},annotations:{default:null},tags:{default:null},meta:{default:null},maxTags:{default:0}},setup(t){const y=t;function k(h){return h==="fixme"||h==="slow"?"warning":h==="fail"?"error":h==="skip"?"neutral":h==="tag"?"primary":"info"}function R(h){switch(h){case"fixme":return"i-lucide-wrench";case"skip":return"i-lucide-skip-forward";case"slow":return"i-lucide-timer";case"fail":return"i-lucide-x-circle";case"tag":return"i-lucide-tag";default:return null}}function C(h){return h.type==="tag"?h.description??h.type:h.type}const d=S(()=>(y.annotations??[]).filter(h=>!bs(h.type))),T=S(()=>!!((y.tags?.length??0)>0||y.meta?.owner||y.meta?.priority||y.meta?.feature||y.meta?.link)),u=S(()=>y.mode==="parallel"||y.mode==="serial"||!!y.isNewRegression||!!y.isNewFlaky||d.value.length>0||T.value);return(h,B)=>{const M=we,P=ve,I=zs;return e(u)?(s(),a("div",Jn,[t.mode==="parallel"?(s(),b(M,{key:0,color:"success",variant:"soft",size:"xs",class:"shrink-0"},{default:r(()=>[...B[0]||(B[0]=[w("parallel",-1)])]),_:1})):p("",!0),t.mode==="serial"?(s(),b(M,{key:1,color:"warning",variant:"soft",size:"xs",class:"shrink-0"},{default:r(()=>[...B[1]||(B[1]=[w("serial",-1)])]),_:1})):p("",!0),t.isNewRegression?(s(),b(M,{key:2,color:"error",variant:"solid",size:"xs",class:"uppercase tracking-wider shrink-0",title:"First run in which this test failed"},{default:r(()=>[...B[2]||(B[2]=[w(" NEW ",-1)])]),_:1})):p("",!0),t.isNewFlaky?(s(),b(M,{key:3,color:"info",variant:"solid",size:"xs",class:"uppercase tracking-wider shrink-0",title:"First run in which this test was flaky"},{default:r(()=>[...B[3]||(B[3]=[w(" FLAKY ",-1)])]),_:1})):p("",!0),(s(!0),a(O,null,ie(e(d),j=>(s(),b(M,{key:`${j.type}:${j.description??""}`,color:k(j.type),variant:"soft",size:"xs",title:j.type!=="tag"?j.description??void 0:void 0,class:"shrink-0 gap-1"},{default:r(()=>[R(j.type)?(s(),b(P,{key:0,name:R(j.type),class:"size-2.5 shrink-0"},null,8,["name"])):p("",!0),w(" "+l(C(j)),1)]),_:2},1032,["color","title"]))),128)),i(I,{tags:t.tags,meta:t.meta,"max-tags":t.maxTags},null,8,["tags","meta","max-tags"])])):p("",!0)}}}),Nt=Object.assign(Zn,{__name:"TestRowBadges"}),Qn={class:"rounded-lg border border-default bg-default text-sm flex flex-col flex-1 min-h-0"},ea={class:"flex items-center justify-end px-3 py-1.5 border-b border-default bg-elevated shrink-0"},ta=["disabled","title"],sa={class:"overflow-y-auto flex-1 min-h-0"},na=["onClick"],aa={key:1,class:"font-medium truncate min-w-0 text-muted"},oa={class:"flex items-center gap-1.5 sm:gap-2 shrink-0 tabular-nums"},la=["title"],ia={class:"max-sm:sr-only"},ra=["href","title","onClick"],ua={class:"truncate"},ca={class:"flex items-center gap-1.5 sm:gap-2 shrink-0 ml-auto"},da={key:0,class:"text-xs text-info"},ma={key:4,class:"inline-flex items-center gap-0.5 text-xs text-amber-600 dark:text-amber-400",title:"Wasted in fixed waits"},fa={key:0,class:"text-center py-8 text-muted"},pa=fe({__name:"TestCasesTree",props:{testCases:{},suites:{},hasFilter:{type:Boolean},highlightedCaseId:{},projectKey:{},projectName:{}},setup(t){const y=t,k=S(()=>{const f=new Map;for(const z of y.suites)f.set(`${z.filePath}${z.suitePath.join("")}`,z);return f});function R(f){return f==="timedOut"||f==="timedout"?"failed":f}const C=["failed","passed","skipped","didnotrun","running"];function d(f){return C.filter(z=>f[z]>0).map(z=>({key:z,count:f[z],label:je(z)}))}function T(f){const z={passed:0,failed:0,skipped:0,didnotrun:0,running:0,total:0};for(const _ of f){const c=R(_.status);c in z&&z[c]++,z.total++}return z}const u=H(new Set),h=S(()=>u.value.size===0);function B(f){return y.hasFilter?!0:!u.value.has(f)}function M(f){if(y.hasFilter)return;const z=new Set(u.value);z.has(f)?z.delete(f):z.add(f),u.value=z}function P(){const f=[],z=new Map;for(const _ of y.testCases){const c=_.filePath??"unknown";z.has(c)||z.set(c,[]),z.get(c).push(_)}for(const[_,c]of z){f.push(`file:${_}`);const m=new Set;for(const A of c){const $=A.suitePath??[];for(let E=1;E<=$.length;E++)m.add(`group:${_}${$.slice(0,E).join("")}`)}for(const A of m)f.push(A)}return f}function I(){u.value=new Set(P())}function j(){u.value=new Set}function W(f,z,_,c,m){const A=z.filter(x=>(x.suitePath??[]).length===c.length),$=z.filter(x=>(x.suitePath??[]).length>c.length),E=new Map;for(const x of $){const Y=(x.suitePath??[])[c.length];E.has(Y)||E.set(Y,[]),E.get(Y).push(x)}for(const[x,Y]of E){const Q=[...c,x],oe=`group:${_}${Q.join("")}`,ee=k.value.get(`${_}${Q.join("")}`);f.push({kind:"group",depth:m,key:oe,label:x,stats:T(Y),mode:ee?.mode??"default",annotations:ee?.annotations??[]}),B(oe)&&W(f,Y,_,Q,m+1)}for(const x of A)f.push({kind:"test",depth:m,key:`test:${x.id}`,test:x})}const L=S(()=>{const f=[],z=new Map;for(const _ of y.testCases){const c=_.filePath??"unknown";z.has(c)||z.set(c,[]),z.get(c).push(_)}for(const[_,c]of[...z.entries()].sort(([m],[A])=>m.localeCompare(A))){const m=`file:${_}`;f.push({kind:"group",depth:0,key:m,label:_,stats:T(c)}),B(m)&&W(f,c,_,[],1)}return f});return(f,z)=>{const _=ve,c=St,m=Nt,A=It,$=Ke,E=we;return s(),a("div",Qn,[n("div",ea,[n("button",{class:J(["flex items-center gap-1 text-xs transition-colors",t.hasFilter?"text-muted cursor-not-allowed opacity-50":"text-muted hover:text-default"]),disabled:t.hasFilter,title:t.hasFilter?"Clear filters to collapse/expand":h.value?"Collapse all":"Expand all",onClick:z[0]||(z[0]=x=>h.value?I():j())},[i(_,{name:h.value?"i-lucide-fold-vertical":"i-lucide-unfold-vertical",class:"size-3.5"},null,8,["name"]),w(" "+l(h.value?"Collapse all":"Expand all"),1)],10,ta)]),n("div",sa,[(s(!0),a(O,null,ie(L.value,x=>(s(),a(O,{key:x.key},[x.kind==="group"?(s(),a("div",{key:0,class:J(["flex items-center gap-2 py-2 pr-4 border-b border-default last:border-b-0 select-none sticky",[x.depth===0?"bg-elevated":"bg-default",!t.hasFilter&&"cursor-pointer"]]),style:ke({paddingLeft:`${x.depth*20+12}px`,top:`${x.depth*36}px`,zIndex:20-x.depth}),onClick:Y=>M(x.key)},[i(_,{name:B(x.key)?"i-lucide-chevron-down":"i-lucide-chevron-right",class:"size-3.5 text-muted shrink-0"},null,8,["name"]),i(_,{name:x.depth===0?"i-lucide-file-code-2":"i-lucide-folder-open",class:J(["size-4 shrink-0",x.depth===0?"text-blue-500":"text-amber-500"])},null,8,["name","class"]),x.depth===0?(s(),a("span",{key:0,class:"min-w-0",onClick:z[1]||(z[1]=Ae(()=>{},["stop"]))},[i(c,{"file-path":x.label,"project-key":t.projectKey,"project-name":t.projectName,class:"font-medium text-default"},null,8,["file-path","project-key","project-name"])])):(s(),a("span",aa,l(x.label),1)),x.depth>0?(s(),b(m,{key:2,mode:x.mode,annotations:x.annotations,class:"shrink-0"},null,8,["mode","annotations"])):p("",!0),z[2]||(z[2]=n("div",{class:"flex-1"},null,-1)),n("div",oa,[(s(!0),a(O,null,ie(d(x.stats),Y=>(s(),a("span",{key:Y.key,class:J(["text-xs inline-flex items-center gap-0.5",[("getStatusTextClass"in f?f.getStatusTextClass:e(tt))(Y.key),Y.key==="failed"?"font-medium":""]]),title:`${Y.count} ${Y.label}`},[i(_,{name:("getStatusIcon"in f?f.getStatusIcon:e(st))(Y.key),class:"size-3 shrink-0 sm:hidden"},null,8,["name"]),w(" "+l(Y.count),1),n("span",ia,l(Y.label),1)],10,la))),128))])],14,na)):(s(),a("div",{key:1,class:J(["flex flex-wrap items-center gap-x-2 gap-y-1 pr-3 py-2 sm:py-1.5 border-b border-default last:border-b-0 hover:bg-zinc-50 dark:hover:bg-zinc-900/40 transition-colors",t.highlightedCaseId===x.test.id?"animate-pulse bg-yellow-100 dark:bg-yellow-900/30":""]),style:ke({paddingLeft:`${x.depth*20+12}px`})},[i(A,{browser:x.test.browser,size:"sm"},null,8,["browser"]),i(_,{name:("getStatusIcon"in f?f.getStatusIcon:e(st))(x.test.status),class:J(["size-4 shrink-0",[("getStatusTextClass"in f?f.getStatusTextClass:e(tt))(x.test.status),("isStatusInFlight"in f?f.isStatusInFlight:e(Tt))(x.test.status)?"animate-spin":""]]),role:"img","aria-label":`Status: ${("formatStatusLabel"in f?f.formatStatusLabel:e(je))(x.test.status)}`,title:("formatStatusLabel"in f?f.formatStatusLabel:e(je))(x.test.status)},null,8,["name","class","aria-label","title"]),n("a",{href:`/test-run-cases/${x.test.id}`,class:"text-highlighted hover:text-primary hover:underline min-w-32 self-stretch flex items-center",title:x.test.title,onClick:Ae(Y=>("navigateTo"in f?f.navigateTo:e(Ge))(`/test-run-cases/${x.test.id}`),["prevent"])},[n("span",ua,l(x.test.title),1)],8,ra),i(m,{"is-new-regression":!!x.test.isNewRegression,"is-new-flaky":!!x.test.isNewFlaky,annotations:x.test.testAnnotations,tags:x.test.tags,meta:x.test.testMeta,"max-tags":3,class:"shrink-0"},null,8,["is-new-regression","is-new-flaky","annotations","tags","meta"]),n("div",ca,[x.test.status==="running"?(s(),a("span",da,"In progress...")):x.test.duration?(s(),b($,{key:1,ms:x.test.duration,class:"text-xs text-muted"},null,8,["ms"])):p("",!0),x.test.workerIndex!=null?(s(),b(E,{key:2,color:"neutral",variant:"soft",size:"xs",class:"font-mono",title:`Worker ${x.test.workerIndex}`},{default:r(()=>[w(" w"+l(x.test.workerIndex),1)]),_:2},1032,["title"])):p("",!0),(x.test.retries??0)>0?(s(),b(E,{key:3,color:"warning",variant:"soft",size:"xs"},{default:r(()=>[w(l(x.test.retries)+"x ",1)]),_:2},1024)):p("",!0),x.test.wastedTimeMs?(s(),a("span",ma,[i(_,{name:"i-lucide-hourglass",class:"size-3 shrink-0"}),i($,{ms:x.test.wastedTimeMs,"unit-class":"opacity-60","no-title":""},null,8,["ms"])])):p("",!0)])],6))],64))),128)),L.value.length===0?(s(),a("div",fa,[i(_,{name:"i-lucide-search-x",class:"size-6 mx-auto mb-2 text-zinc-300 dark:text-zinc-600"}),z[3]||(z[3]=n("p",{class:"text-sm"},"No test cases match your filters.",-1))])):p("",!0)])])}}}),ga=Object.assign(pa,{__name:"TestCasesTree"}),xa={class:"flex flex-col min-h-0"},ya={class:"flex items-center rounded-md border border-default overflow-hidden"},ha={key:0,class:"text-sm text-zinc-500 tabular-nums inline-flex items-center gap-1"},va={key:1,class:"text-sm text-zinc-500 tabular-nums inline-flex items-center gap-1"},ka={class:"flex flex-wrap items-center gap-1"},ba=["onClick"],wa={key:2,class:"flex items-center gap-1 md:hidden"},_a={key:0,class:"flex-1 min-h-0 max-lg:h-[70dvh] md:overflow-x-auto overflow-y-hidden rounded-lg border border-default bg-default"},$a=["aria-rowcount"],Ca=["aria-sort","aria-label","title","onClick"],Ta={key:1,class:"truncate"},Ra={class:"flex items-start gap-2"},za=["href","onClick"],Sa={class:"pl-6 flex flex-wrap items-center gap-x-2 gap-y-1 text-xs text-muted"},Ia={key:0,class:"text-info"},Fa={key:4,class:"inline-flex items-center gap-0.5 text-amber-600 dark:text-amber-400",title:"Wasted in fixed waits"},Pa={class:"px-3 py-2 flex items-center min-w-0",role:"cell"},ja={class:"px-3 py-2 min-w-0 space-y-0.5",role:"cell"},Da={class:"flex items-center gap-1.5 min-w-0"},Na=["href","title","onClick"],Ba={class:"px-3 py-2 flex items-center",role:"cell"},Ma={class:"px-3 py-2 flex items-center whitespace-nowrap",role:"cell"},Aa={key:0,class:"text-info text-xs"},Ua={class:"px-3 py-2 flex items-center",role:"cell"},La={class:"px-3 py-2 flex items-center tabular-nums",role:"cell"},Ea={key:0,class:"px-3 py-2 flex items-center whitespace-nowrap",role:"cell"},Oa={key:1,class:"text-zinc-400"},Ka={class:"flex-1 min-h-0 flex items-center justify-center py-10 text-sm text-zinc-500"},Wa={key:1,class:"text-center py-10 text-zinc-500"},Ha={key:2,class:"text-center py-10 text-zinc-500"},We="natural",Va=fe({__name:"TestCasesList",props:as({testCases:{},suites:{},isLive:{type:Boolean},failureClusterFilter:{},projectKey:{},projectName:{}},{search:{default:""},searchModifiers:{},activeStatuses:{default:()=>[]},activeStatusesModifiers:{},browserFilter:{default:"all"},browserFilterModifiers:{}}),emits:["update:search","update:activeStatuses","update:browserFilter"],setup(t,{expose:y}){const{treeView:k,setTreeView:R}=Ss("test-cases"),C=t,d=Qe(t,"search"),T=Qe(t,"activeStatuses"),u=Qe(t,"browserFilter"),h=H(!1),B=H(!1),M=[{label:"Passed",value:"passed",color:"green"},{label:"Failed",value:"failed",color:"red"},{label:"Skipped",value:"skipped",color:"gray"},{label:"Didn't run",value:"didnotrun",color:"amber"},{label:"Flaky",value:"flaky",color:"orange"}];function P(o){T.value.indexOf(o)>=0?T.value=T.value.filter(V=>V!==o):T.value=[...T.value,o]}const I=S(()=>{const o=new Set;for(const V of C.testCases){const re=V.browser?.projectName;re&&o.add(re)}const F=[{label:"All browsers",value:"all"}];for(const V of[...o].sort())F.push({label:V,value:V});return F});function j(o,F){return F==="failed"?o.status==="failed"||o.status==="timedOut"||o.status==="timedout":F==="flaky"?(o.retries??0)>0:o.status===F}const W=S(()=>{let o=C.testCases;if(C.failureClusterFilter!=null&&(o=o.filter(F=>F.failureClusterId===C.failureClusterFilter)),T.value.length>0&&(o=o.filter(F=>T.value.some(V=>j(F,V)))),u.value!=="all"&&(o=o.filter(F=>F.browser?.projectName===u.value)),d.value){const F=d.value.toLowerCase();o=o.filter(V=>V.title.toLowerCase().includes(F)||V.location&&V.location.toLowerCase().includes(F))}return h.value&&(o=o.filter(F=>F.isNewRegression)),B.value&&(o=o.filter(F=>F.isNewFlaky)),o}),L=H(null),f=H("asc");function z(o){L.value!==o?(L.value=o,f.value="asc"):f.value==="asc"?f.value="desc":L.value=null}function _(o){return L.value!==o?"i-lucide-chevrons-up-down":f.value==="asc"?"i-lucide-chevron-up":"i-lucide-chevron-down"}function c(o,F){switch(F){case"browser":return o.browser?.projectName??"";case"title":return o.title??"";case"status":return o.status??"";case"duration":return o.duration??0;case"workerIndex":return o.workerIndex??-1;case"retries":return o.retries??0;case"wastedTimeMs":return o.wastedTimeMs??0;default:return""}}const m=S(()=>{const o=W.value,F=L.value;if(!F)return o;const V=f.value==="asc"?1:-1;return[...o].sort((re,Z)=>{const v=c(re,F),X=c(Z,F);return typeof v=="number"&&typeof X=="number"?(v-X)*V:String(v).localeCompare(String(X))*V})}),A=S(()=>C.testCases.some(o=>(o.wastedTimeMs??0)>0)),$=S(()=>{const o=[{key:"browser",label:"Browser",sortable:!0,width:"3.25rem",align:"left",icon:"i-lucide-monitor"},{key:"title",label:"Test case",sortable:!0,width:"minmax(12rem, 3fr)",align:"left"},{key:"status",label:"Status",sortable:!0,width:"6rem",align:"left"},{key:"duration",label:"Duration",sortable:!0,width:"7rem",align:"left"},{key:"workerIndex",label:"Worker",sortable:!0,width:"6rem",align:"left"},{key:"retries",label:"Retries",sortable:!0,width:"6.5rem",align:"left"}];return A.value&&o.push({key:"wastedTimeMs",label:"Wasted",sortable:!0,width:"6rem",align:"left"}),o}),E=S(()=>[{label:"Run order",value:We},...$.value.map(o=>({label:o.label,value:o.key}))]),x=S({get:()=>L.value??We,set:o=>{L.value=o===We?null:o,o!==We&&(f.value="asc")}}),Y=S(()=>$.value.map(o=>o.width).join(" ")),Q=S(()=>A.value?"47.5rem":"41.5rem"),oe=S(()=>d.value!==""||T.value.length>0||u.value!=="all"||C.failureClusterFilter!=null),ee=H(null),le=H(!1),K=H(null);function N(o){return o.scrollHeight-o.scrollTop-o.clientHeight<50}function he(o){const F=o.target;F&&(le.value=!N(F))}me(()=>C.isLive,o=>{o||(le.value=!1)}),me(()=>m.value.length,()=>{!C.isLive||le.value||De(()=>ee.value?.scrollToBottom())});function D(o){R(!1),K.value=o;const F=()=>{const V=m.value.findIndex(re=>re.id===o);V>=0&&ee.value?.scrollToItem(V,{behavior:"smooth"})};De(()=>{ee.value?F():setTimeout(F,60),setTimeout(()=>{K.value=null},3e3)})}return y({scrollToCase:D}),(o,F)=>{const V=ve,re=Ie,Z=ns,v=Ts,X=zt,ne=Ce,te=Rs,xe=ga,be=It,se=St,Te=Nt,Re=Ke,pe=we,ge=gt("DynamicScrollerItem"),_e=gt("DynamicScroller"),Se=lt;return s(),a("div",xa,[i(te,{class:"mb-4 shrink-0"},{start:r(()=>[n("div",ya,[n("button",{class:J(["px-2 py-1 text-xs transition-colors",e(k)?"text-muted hover:bg-elevated/60":"bg-primary text-white dark:text-white"]),title:"Flat list",onClick:F[0]||(F[0]=g=>e(R)(!1))},[i(V,{name:"i-lucide-list",class:"size-3.5"})],2),n("button",{class:J(["px-2 py-1 text-xs transition-colors",e(k)?"bg-primary text-white dark:text-white":"text-muted hover:bg-elevated/60"]),title:"Tree view",onClick:F[1]||(F[1]=g=>e(R)(!0))},[i(V,{name:"i-lucide-folder-tree",class:"size-3.5"})],2)]),t.isLive?(s(),a("span",ha,[w(l(t.testCases.length)+" completed ",1),i(re,{topic:"run.live"})])):(s(),a("span",va,[w(l(m.value.length)+l(m.value.length!==t.testCases.length?` / ${t.testCases.length}`:"")+" cases ",1),i(re,{topic:"run.test-cases"})]))]),default:r(()=>[i(Z,{modelValue:d.value,"onUpdate:modelValue":F[2]||(F[2]=g=>d.value=g),placeholder:"Search test cases...",icon:"i-lucide-search",size:"sm",class:"min-w-48 max-sm:flex-1"},null,8,["modelValue"]),n("div",ka,[(s(),a(O,null,ie(M,g=>n("button",{key:g.value,class:J(["inline-flex items-center gap-1.5 px-2 py-1 rounded-md text-xs font-medium transition-colors whitespace-nowrap",T.value.includes(g.value)?g.color==="green"?"bg-emerald-100 text-emerald-700 dark:bg-emerald-900/30 dark:text-emerald-400":g.color==="red"?"bg-rose-100 text-rose-700 dark:bg-rose-900/30 dark:text-rose-400":g.color==="orange"?"bg-orange-100 text-orange-700 dark:bg-orange-900/30 dark:text-orange-400":"bg-zinc-200 text-zinc-700 dark:bg-zinc-700 dark:text-zinc-300":"bg-zinc-100 text-zinc-500 dark:bg-zinc-800 dark:text-zinc-400 hover:bg-zinc-200 dark:hover:bg-zinc-700"]),onClick:$e=>P(g.value)},[n("span",{class:J(["size-2 rounded-full shrink-0",g.color==="green"?"bg-emerald-500":g.color==="red"?"bg-rose-500":g.color==="orange"?"bg-orange-500":"bg-zinc-400"])},null,2),w(" "+l(g.label),1)],10,ba)),64))]),i(v,{modelValue:u.value,"onUpdate:modelValue":F[3]||(F[3]=g=>u.value=g),items:I.value,size:"sm",class:"w-36"},null,8,["modelValue","items"]),t.isLive?p("",!0):(s(),b(X,{key:0,modelValue:h.value,"onUpdate:modelValue":F[4]||(F[4]=g=>h.value=g),label:"New regressions",size:"sm"},null,8,["modelValue"])),t.isLive?p("",!0):(s(),b(X,{key:1,modelValue:B.value,"onUpdate:modelValue":F[5]||(F[5]=g=>B.value=g),label:"New flaky",size:"sm"},null,8,["modelValue"])),e(k)?p("",!0):(s(),a("div",wa,[i(v,{modelValue:x.value,"onUpdate:modelValue":F[6]||(F[6]=g=>x.value=g),items:E.value,size:"sm",class:"w-32","aria-label":"Sort cases by"},null,8,["modelValue","items"]),i(ne,{size:"sm",variant:"outline",color:"neutral",disabled:L.value===null,icon:f.value==="asc"?"i-lucide-arrow-up-narrow-wide":"i-lucide-arrow-down-wide-narrow",title:f.value==="asc"?"Sorted ascending":"Sorted descending","aria-label":f.value==="asc"?"Sorted ascending":"Sorted descending",onClick:F[7]||(F[7]=g=>f.value=f.value==="asc"?"desc":"asc")},null,8,["disabled","icon","title","aria-label"])]))]),_:1}),e(k)&&t.testCases.length>0?(s(),b(xe,{key:0,"test-cases":m.value,suites:t.suites,"has-filter":oe.value,"highlighted-case-id":K.value,"project-key":t.projectKey,"project-name":t.projectName,class:"flex-1 min-h-0"},null,8,["test-cases","suites","has-filter","highlighted-case-id","project-key","project-name"])):e(k)?p("",!0):(s(),a(O,{key:1},[m.value.length>0?(s(),a("div",_a,[n("div",{class:"flex flex-col h-full md:min-w-(--grid-min-width)",role:"table","aria-label":"Test cases","aria-rowcount":m.value.length+1,style:ke({"--grid-min-width":Q.value})},[n("div",{class:"hidden md:grid shrink-0 bg-elevated/50 border-b border-default",role:"row",style:ke({gridTemplateColumns:Y.value})},[(s(!0),a(O,null,ie($.value,g=>(s(),a(O,{key:g.key},[g.sortable?(s(),a("button",{key:0,type:"button",role:"columnheader","aria-sort":L.value===g.key?f.value==="asc"?"ascending":"descending":"none","aria-label":g.icon?g.label:void 0,title:g.icon?g.label:void 0,class:J(["flex items-center gap-1 min-w-0 px-3 py-2 text-sm font-semibold select-none cursor-pointer hover:text-highlighted transition-colors",g.align==="right"?"justify-end":""]),onClick:$e=>z(g.key)},[g.icon?(s(),b(V,{key:0,name:g.icon,class:"shrink-0 size-4"},null,8,["name"])):(s(),a("span",Ta,l(g.label),1)),i(V,{name:_(g.key),class:J(["shrink-0 size-3.5",L.value===g.key?"":"opacity-40"])},null,8,["name","class"])],10,Ca)):(s(),a("div",{key:1,role:"columnheader",class:J(["px-3 py-2 text-sm font-semibold",g.align==="right"?"text-right":""])},l(g.label),3))],64))),128))],4),i(Se,null,{fallback:r(()=>[n("div",Ka,[i(V,{name:"i-lucide-loader-circle",class:"size-4 mr-2 animate-spin"}),F[8]||(F[8]=w(" Loading test cases… ",-1))])]),default:r(()=>[i(_e,{ref_key:"scrollerRef",ref:ee,items:m.value,"min-item-size":44,"key-field":"id",role:"rowgroup",class:"flex-1 min-h-0",onScrollPassive:he},{default:r(({item:g,index:$e,active:Ne})=>[i(ge,{item:g,active:Ne,"size-dependencies":[g.title,g.location,g.isNewRegression,g.isNewFlaky,g.testAnnotations,g.tags],"data-index":$e},{default:r(()=>[n("div",{class:J(["md:hidden border-b border-default px-3 py-2.5 space-y-1.5 text-sm transition-colors",K.value===g.id?"animate-pulse bg-yellow-100 dark:bg-yellow-900/30":""]),role:"row"},[n("div",Ra,[i(V,{name:("getStatusIcon"in o?o.getStatusIcon:e(st))(g.status),class:J(["size-4 shrink-0 mt-0.5",[("getStatusTextClass"in o?o.getStatusTextClass:e(tt))(g.status),("isStatusInFlight"in o?o.isStatusInFlight:e(Tt))(g.status)?"animate-spin":""]]),role:"img","aria-label":`Status: ${("formatStatusLabel"in o?o.formatStatusLabel:e(je))(g.status)}`,title:("formatStatusLabel"in o?o.formatStatusLabel:e(je))(g.status)},null,8,["name","class","aria-label","title"]),n("a",{href:`/test-run-cases/${g.id}`,class:"text-highlighted hover:text-primary hover:underline font-medium flex-1 min-w-0",onClick:Ae(ae=>("navigateTo"in o?o.navigateTo:e(Ge))(`/test-run-cases/${g.id}`),["prevent"])},l(g.title),9,za),i(be,{browser:g.browser,size:"sm",class:"mt-0.5"},null,8,["browser"])]),g.location?(s(),b(se,{key:0,location:g.location,"project-key":t.projectKey,"project-name":t.projectName,class:"block pl-6 text-xs text-gray-400 dark:text-gray-500"},null,8,["location","project-key","project-name"])):p("",!0),i(Te,{"is-new-regression":!!g.isNewRegression,"is-new-flaky":!!g.isNewFlaky,annotations:g.testAnnotations,tags:g.tags,meta:g.testMeta,"max-tags":3,class:"pl-6"},null,8,["is-new-regression","is-new-flaky","annotations","tags","meta"]),n("div",Sa,[g.status==="running"?(s(),a("span",Ia,"In progress...")):g.duration?(s(),b(Re,{key:1,ms:g.duration},null,8,["ms"])):p("",!0),g.workerIndex!=null?(s(),b(pe,{key:2,color:"neutral",variant:"soft",size:"xs",class:"font-mono",title:`Worker ${g.workerIndex}`},{default:r(()=>[w(" w"+l(g.workerIndex),1)]),_:2},1032,["title"])):p("",!0),(g.retries??0)>0?(s(),b(pe,{key:3,color:"warning",variant:"soft",size:"xs"},{default:r(()=>[w(l(g.retries)+"x ",1)]),_:2},1024)):p("",!0),g.wastedTimeMs?(s(),a("span",Fa,[i(V,{name:"i-lucide-hourglass",class:"size-3 shrink-0"}),i(Re,{ms:g.wastedTimeMs,"unit-class":"opacity-60","no-title":""},null,8,["ms"])])):p("",!0)])],2),n("div",{class:J(["hidden md:grid items-center border-b border-default text-sm transition-colors hover:bg-zinc-50 dark:hover:bg-zinc-900/50",K.value===g.id?"animate-pulse bg-yellow-100 dark:bg-yellow-900/30":""]),role:"row",style:ke({gridTemplateColumns:Y.value})},[n("div",Pa,[i(be,{browser:g.browser},null,8,["browser"])]),n("div",ja,[n("div",Da,[n("a",{href:`/test-run-cases/${g.id}`,class:"text-highlighted hover:text-primary hover:underline font-medium truncate",title:g.title,onClick:Ae(ae=>("navigateTo"in o?o.navigateTo:e(Ge))(`/test-run-cases/${g.id}`),["prevent"])},l(g.title),9,Na),i(Te,{"is-new-regression":!!g.isNewRegression,"is-new-flaky":!!g.isNewFlaky,annotations:g.testAnnotations,tags:g.tags,meta:g.testMeta,"max-tags":3,class:"shrink-0"},null,8,["is-new-regression","is-new-flaky","annotations","tags","meta"])]),g.location?(s(),b(se,{key:0,location:g.location,"project-key":t.projectKey,"project-name":t.projectName,class:"text-xs text-zinc-400 dark:text-zinc-500"},null,8,["location","project-key","project-name"])):p("",!0)]),n("div",Ba,[i(pe,{color:("getStatusColor"in o?o.getStatusColor:e(nt))(g.status==="timedOut"||g.status==="timedout"?"failed":g.status),variant:"subtle",class:"capitalize"},{default:r(()=>[w(l(("formatStatusLabel"in o?o.formatStatusLabel:e(je))(g.status)),1)]),_:2},1032,["color"])]),n("div",Ma,[g.status==="running"?(s(),a("span",Aa,"In progress...")):(s(),b(Re,{key:1,ms:g.duration,fallback:""},null,8,["ms"]))]),n("div",Ua,[g.workerIndex!=null?(s(),b(pe,{key:0,color:"neutral",variant:"soft",class:"font-mono text-xs"},{default:r(()=>[w(l(g.workerIndex),1)]),_:2},1024)):p("",!0)]),n("div",La,l(g.retries&&g.retries>0?g.retries:""),1),A.value?(s(),a("div",Ea,[g.wastedTimeMs?(s(),b(Re,{key:0,ms:g.wastedTimeMs,class:"text-amber-600 dark:text-amber-400","unit-class":"opacity-60"},null,8,["ms"])):(s(),a("span",Oa,"—"))])):p("",!0)],6)]),_:2},1032,["item","active","size-dependencies","data-index"])]),_:1},8,["items"])]),_:1})],12,$a)])):t.testCases.length===0?(s(),a("div",Wa,[i(V,{name:"i-lucide-beaker",class:"size-8 mx-auto mb-2 text-zinc-300 dark:text-zinc-600"}),F[9]||(F[9]=n("p",null,"No test cases recorded for this run.",-1))])):(s(),a("div",Ha,[i(V,{name:"i-lucide-search-x",class:"size-8 mx-auto mb-2 text-zinc-300 dark:text-zinc-600"}),F[10]||(F[10]=n("p",null,"No test cases match your filters.",-1))]))],64))])}}}),Ga=Object.assign(Va,{__name:"TestCasesList"}),Xa={key:2,class:"p-4"},qa={key:3,class:"p-4"},Ya={key:4,class:"p-4"},Ja={key:5,class:"space-y-6 p-4"},Za={class:"flex items-center gap-1.5 text-sm text-muted"},Qa={class:"grid grid-cols-1 sm:grid-cols-3 gap-4"},eo={class:"space-y-1"},to={class:"text-xl font-semibold"},so={key:0},no={key:1},ao={class:"space-y-1"},oo={key:1,class:"text-xl font-semibold text-muted"},lo={class:"space-y-1"},io={class:"space-y-0.5 text-sm"},ro={key:0,class:"text-red-500"},uo={key:1,class:"text-green-600"},co={key:2,class:"text-purple-500"},mo={key:3,class:"text-muted"},fo={class:"space-y-1"},po={class:"font-medium text-primary hover:underline truncate"},go={class:"text-gray-400 text-xs ml-auto shrink-0"},xo={class:"space-y-1"},yo={class:"font-medium text-primary hover:underline truncate"},ho={class:"space-y-1"},vo={class:"font-medium text-primary hover:underline truncate"},ko={class:"space-y-1"},bo={class:"font-medium text-primary hover:underline truncate"},wo={class:"text-gray-400 text-xs ml-auto shrink-0"},_o={class:"space-y-1"},$o={class:"font-medium text-primary hover:underline truncate"},Co={class:"grid grid-cols-2 gap-4"},To={key:0},Ro={class:"space-y-1"},zo={class:"text-red-500 font-mono shrink-0"},So={class:"truncate text-primary hover:underline"},Io={key:1},Fo={class:"space-y-1"},Po={class:"text-green-500 font-mono shrink-0"},jo={class:"truncate text-primary hover:underline"},Do={class:"space-y-1"},No={class:"flex-1 truncate text-primary hover:underline"},Bo={class:"text-gray-500 font-mono text-xs shrink-0"},Mo={class:"w-24 h-2 rounded-full bg-gray-100 shrink-0"},Ao={key:0,class:"flex items-center gap-1.5 text-xs text-amber-600 mb-3"},Uo={class:"flex items-end gap-2 h-20"},Lo={class:"text-xs text-gray-500"},Eo={class:"text-xs text-gray-400"},Oo={class:"space-y-1"},Ko={class:"truncate"},Wo=fe({__name:"RunInsights",props:{testRunId:{},runStatus:{},refreshKey:{}},setup(t){const y=t,k=S(()=>{if(!d.value)return"";const P=d.value.passRateDelta;return P>0?"text-green-600":P<0?"text-red-600":"text-muted"}),R=S(()=>{if(!d.value)return"";const P=d.value.passRateDelta;return P>0?"i-lucide-trending-up":P<0?"i-lucide-trending-down":"i-lucide-minus"}),C=S(()=>d.value?.avgDurationDelta==null?"":d.value.avgDurationDelta>0?"text-red-600":"text-green-600"),d=H(null),T=H(!1),u=H(null),h=S(()=>y.runStatus==="running"||y.runStatus==="initialising"||y.runStatus==="finalizing");async function B(){if(!y.testRunId||h.value){d.value=null;return}T.value=!0,u.value=null;try{d.value=await $fetch(`/api/test-runs/${y.testRunId}/insights`)}catch(P){console.error("[RunInsights] failed to load",P),u.value=P?.data?.message||P?.message||"Failed to load insights"}finally{T.value=!1}}me(()=>y.testRunId,B,{immediate:!0}),me(()=>y.refreshKey,(P,I)=>{P!==I&&P!==void 0&&B()});function M(P){return P==null?"—":P<1e3?`${P}ms`:`${(P/1e3).toFixed(1)}s`}return(P,I)=>{const j=Ce,W=Is,L=Ft,f=Pt,z=ve,_=Ie,c=Fs,m=we,A=Ee;return e(u)?(s(),b(W,{key:0,text:e(u),padded:""},{action:r(()=>[i(j,{size:"sm",onClick:B},{default:r(()=>[...I[0]||(I[0]=[w("Retry",-1)])]),_:1})]),_:1},8,["text"])):e(T)?(s(),b(L,{key:1,padded:""})):e(h)?(s(),a("div",Xa,[i(f,{icon:"i-lucide-loader-circle",text:"Run in progress"},{default:r(()=>[...I[1]||(I[1]=[n("p",{class:"text-sm text-muted max-w-sm text-center"}," Insights are computed once the run finishes. Switch back here when the run completes. ",-1)])]),_:1})])):e(d)?e(d).hasBaseline?(s(),a("div",Ja,[n("div",Za,[i(z,{name:"i-lucide-sparkles",class:"size-4 shrink-0 text-primary/70"}),I[3]||(I[3]=n("span",null,"Automatic highlights from this run",-1)),i(_,{topic:"run.insights"})]),i(c,{icon:"i-lucide-bar-chart-3","icon-class":"text-blue-500",title:"Run summary"},{default:r(()=>[n("div",Qa,[n("div",eo,[I[4]||(I[4]=n("p",{class:"text-xs text-muted"},"Pass rate",-1)),n("p",to,l(e(d).passRate)+"%",1),n("div",{class:J(["flex items-center gap-1 text-xs",e(k)])},[i(z,{name:e(R),class:"size-3.5"},null,8,["name"]),e(d).passRateDelta!==0?(s(),a("span",so,l(e(d).passRateDelta>0?"+":"")+l(e(d).passRateDelta)+"pp vs baseline",1)):(s(),a("span",no,"Same as baseline"))],2)]),n("div",ao,[I[5]||(I[5]=n("p",{class:"text-xs text-muted"},"Avg duration",-1)),e(d).avgDurationDelta!==null?(s(),a("p",{key:0,class:J(["text-xl font-semibold",e(C)])},l(e(d).avgDurationDelta>0?"+":"")+l(e(d).avgDurationDelta)+"% ",3)):(s(),a("p",oo,"—")),I[6]||(I[6]=n("p",{class:"text-xs text-muted"},"vs baseline (passing tests)",-1))]),n("div",lo,[I[7]||(I[7]=n("p",{class:"text-xs text-muted"},"Changes",-1)),n("div",io,[e(d).newRegressions.length>0?(s(),a("p",ro," +"+l(e(d).newRegressions.length)+" regressed ",1)):p("",!0),e(d).recovered.length>0?(s(),a("p",uo,"+"+l(e(d).recovered.length)+" fixed",1)):p("",!0),e(d).newFlaky.length>0?(s(),a("p",co,"+"+l(e(d).newFlaky.length)+" flaky",1)):p("",!0),!e(d).newRegressions.length&&!e(d).recovered.length&&!e(d).newFlaky.length?(s(),a("p",mo," No status changes ")):p("",!0)])])])]),_:1}),e(d).newRegressions.length>0?(s(),b(c,{key:0,icon:"i-lucide-alert-circle","icon-class":"text-red-500",title:"New regressions",count:e(d).newRegressions.length},{default:r(()=>[n("div",fo,[(s(!0),a(O,null,ie(e(d).newRegressions,$=>(s(),b(A,{key:$.testRunsCaseId,to:`/test-run-cases/${$.testRunsCaseId}`,class:"flex items-center gap-2 text-sm hover:bg-red-50 dark:hover:bg-red-900/10 rounded px-1 -mx-1 transition-colors"},{default:r(()=>[i(m,{color:"error",variant:"solid",size:"xs"},{default:r(()=>[...I[8]||(I[8]=[w("NEW",-1)])]),_:1}),n("span",po,l($.title),1),n("span",go,l(M($.duration)),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):p("",!0),e(d).recurrences.length>0?(s(),b(c,{key:1,icon:"i-lucide-refresh-cw","icon-class":"text-amber-500",title:"Recurring failures",count:e(d).recurrences.length},{default:r(()=>[n("div",xo,[(s(!0),a(O,null,ie(e(d).recurrences,$=>(s(),b(A,{key:$.testRunsCaseId,to:`/test-run-cases/${$.testRunsCaseId}`,class:"flex items-center gap-2 text-sm hover:bg-amber-50 dark:hover:bg-amber-900/10 rounded px-1 -mx-1 transition-colors"},{default:r(()=>[i(m,{color:"warning",variant:"solid",size:"xs"},{default:r(()=>[...I[9]||(I[9]=[w("RECURRING",-1)])]),_:1}),n("span",yo,l($.title),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):p("",!0),e(d).recovered.length>0?(s(),b(c,{key:2,icon:"i-lucide-check-circle","icon-class":"text-green-500",title:"Fixed tests",count:e(d).recovered.length},{default:r(()=>[n("div",ho,[(s(!0),a(O,null,ie(e(d).recovered,$=>(s(),b(A,{key:$.testRunsCaseId,to:`/test-run-cases/${$.testRunsCaseId}`,class:"flex items-center gap-2 text-sm hover:bg-green-50 dark:hover:bg-green-900/10 rounded px-1 -mx-1 transition-colors"},{default:r(()=>[i(m,{color:"success",variant:"solid",size:"xs"},{default:r(()=>[...I[10]||(I[10]=[w("FIXED",-1)])]),_:1}),n("span",vo,l($.title),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):p("",!0),e(d).newFlaky.length>0?(s(),b(c,{key:3,icon:"i-lucide-flask","icon-class":"text-purple-500",title:"New flaky tests",count:e(d).newFlaky.length},{default:r(()=>[n("div",ko,[(s(!0),a(O,null,ie(e(d).newFlaky,$=>(s(),b(A,{key:$.testRunsCaseId,to:`/test-run-cases/${$.testRunsCaseId}?tab=history`,class:"flex items-center gap-2 text-sm hover:bg-purple-50 dark:hover:bg-purple-900/10 rounded px-1 -mx-1 transition-colors"},{default:r(()=>[i(m,{color:"info",variant:"solid",size:"xs"},{default:r(()=>[...I[11]||(I[11]=[w("FLAKY",-1)])]),_:1}),n("span",bo,l($.title),1),n("span",wo,l(M($.duration)),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):p("",!0),e(d).flakyOnRetry.length>0?(s(),b(c,{key:4,icon:"i-lucide-repeat","icon-class":"text-orange-500",title:"Passed on retry",count:e(d).flakyOnRetry.length,subtitle:"Tests that passed but needed one or more retries"},{default:r(()=>[n("div",_o,[(s(!0),a(O,null,ie(e(d).flakyOnRetry,$=>(s(),b(A,{key:$.testRunsCaseId,to:`/test-run-cases/${$.testRunsCaseId}?tab=history`,class:"flex items-center gap-2 text-sm hover:bg-orange-50 dark:hover:bg-orange-900/10 rounded px-1 -mx-1 transition-colors"},{default:r(()=>[i(m,{color:"warning",variant:"subtle",size:"xs"},{default:r(()=>[w("×"+l($.retries),1)]),_:2},1024),n("span",$o,l($.title),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):p("",!0),e(d).mostRegressed.length>0||e(d).mostImproved.length>0?(s(),b(c,{key:5,icon:"i-lucide-trending-up","icon-class":"text-blue-500",title:"Performance changes"},{default:r(()=>[n("div",Co,[e(d).mostRegressed.length>0?(s(),a("div",To,[I[12]||(I[12]=n("p",{class:"text-xs font-medium text-red-500 mb-2"},"Most regressed",-1)),n("div",Ro,[(s(!0),a(O,null,ie(e(d).mostRegressed,$=>(s(),b(A,{key:$.testRunsCaseId,to:`/test-run-cases/${$.testRunsCaseId}?tab=performance`,class:"flex items-center gap-2 text-sm hover:bg-red-50 dark:hover:bg-red-900/10 rounded px-1 -mx-1 transition-colors"},{default:r(()=>[n("span",zo,"+"+l($.pctChange)+"%",1),n("span",So,l($.title),1)]),_:2},1032,["to"]))),128))])])):p("",!0),e(d).mostImproved.length>0?(s(),a("div",Io,[I[13]||(I[13]=n("p",{class:"text-xs font-medium text-green-500 mb-2"},"Most improved",-1)),n("div",Fo,[(s(!0),a(O,null,ie(e(d).mostImproved,$=>(s(),b(A,{key:$.testRunsCaseId,to:`/test-run-cases/${$.testRunsCaseId}?tab=performance`,class:"flex items-center gap-2 text-sm hover:bg-green-50 dark:hover:bg-green-900/10 rounded px-1 -mx-1 transition-colors"},{default:r(()=>[n("span",Po,l($.pctChange)+"%",1),n("span",jo,l($.title),1)]),_:2},1032,["to"]))),128))])])):p("",!0)])]),_:1})):p("",!0),e(d).slowestTests.length>0?(s(),b(c,{key:6,icon:"i-lucide-clock","icon-class":"text-amber-500",title:"Slowest tests"},{default:r(()=>[n("div",Do,[(s(!0),a(O,null,ie(e(d).slowestTests,$=>(s(),b(A,{key:$.testRunsCaseId,to:`/test-run-cases/${$.testRunsCaseId}?tab=performance`,class:"flex items-center gap-2 text-sm hover:bg-amber-50 dark:hover:bg-amber-900/10 rounded px-1 -mx-1 transition-colors"},{default:r(()=>[n("div",No,l($.title),1),n("div",Bo,l(M($.duration)),1),n("div",Mo,[n("div",{class:"h-full rounded-full bg-amber-400",style:ke({width:Math.min(100,$.duration/(e(d).slowestTests[0]?.duration||1)*100)+"%"})},null,4)])]),_:2},1032,["to"]))),128))])]),_:1})):p("",!0),e(d).workerImbalance.length>1?(s(),b(c,{key:7,icon:"i-lucide-users","icon-class":"text-gray-500",title:"Worker distribution"},{default:r(()=>[e(d).workerImbalanceWarning?(s(),a("div",Ao,[i(z,{name:"i-lucide-alert-triangle",class:"size-3.5 shrink-0"}),n("span",null,l(e(d).workerImbalanceWarning),1)])):p("",!0),n("div",Uo,[(s(!0),a(O,null,ie(e(d).workerImbalance,$=>(s(),a("div",{key:$.workerIndex,class:"flex-1 flex flex-col items-center gap-1"},[n("span",Lo,l($.count),1),n("div",{class:"w-full bg-blue-400 rounded-t",style:ke({height:Math.max(4,$.count/Math.max(...e(d).workerImbalance.map(E=>E.count))*60)+"px"})},null,4),n("span",Eo,"W"+l($.workerIndex),1)]))),128))])]),_:1})):p("",!0),e(d).clusterNew.length>0?(s(),b(c,{key:8,icon:"i-lucide-layers","icon-class":"text-purple-500",title:"New failure clusters",count:e(d).clusterNew.length},{default:r(()=>[n("div",Oo,[(s(!0),a(O,null,ie(e(d).clusterNew,$=>(s(),b(A,{key:$.clusterId,to:`/failure-clusters/${$.clusterId}`,class:"flex items-center gap-2 text-sm text-primary hover:underline"},{default:r(()=>[n("span",Ko,l($.signature),1)]),_:2},1032,["to"]))),128))])]),_:1},8,["count"])):p("",!0)])):(s(),a("div",Ya,[i(f,{icon:"i-lucide-git-compare-arrows",text:"No baseline run found"},{default:r(()=>[...I[2]||(I[2]=[n("p",{class:"text-sm text-muted max-w-sm text-center"}," Insights compare this run against the most recent passing run in the same project. No previous passing run exists yet — once you have at least two completed runs, comparisons will appear here automatically. ",-1)])]),_:1})])):(s(),a("div",qa,[i(f,{text:"No insights yet"})]))}}}),Ho=Object.assign(Wo,{__name:"RunInsights"}),Vo=fe({__name:"ClusterDiagnosis",props:{clusterId:{}},setup(t){return(y,k)=>{const R=Ps;return s(),b(R,{"cluster-id":t.clusterId},null,8,["cluster-id"])}}}),Go=Object.assign(Vo,{__name:"ClusterDiagnosis"}),Xo={class:"pt-4 space-y-3"},qo={key:0,class:"flex items-center justify-center py-8 text-gray-500 gap-2"},Yo={class:"flex items-center justify-between gap-3"},Jo={class:"text-sm text-gray-500 dark:text-gray-400 inline-flex items-center gap-1"},Zo={class:"min-w-0 space-y-0.5"},Qo=["title"],el={key:0,class:"text-xs text-gray-500 truncate block"},tl={class:"font-mono"},sl={key:1,class:"text-gray-400 text-xs"},nl={key:1,class:"text-gray-400 text-xs"},al={class:"text-sm tabular-nums"},ol={key:0,class:"flex flex-wrap gap-1"},ll={key:1,class:"text-gray-400 text-xs"},il={key:0,class:"flex items-center gap-1 text-xs text-gray-500"},rl={key:2,class:"text-gray-400 text-xs"},ul={key:0,class:"text-xs font-medium text-warning-500"},cl={key:1,class:"text-sm text-gray-500 whitespace-nowrap"},dl={key:0,class:"ml-1 text-xs text-gray-400"},ml={class:"flex justify-end gap-2"},fl={key:2,class:"flex flex-col items-center justify-center py-8 text-gray-500 gap-2"},pl=fe({__name:"FailureGroups",props:{refreshKey:{}},emits:["selectCluster"],async setup(t,{emit:y}){let k,R;const C=y,d=t,u=Oe().params.id,{data:h,pending:B,refresh:M}=([k,R]=Ue(()=>Le(`/api/test-runs/${u}/failure-groups`,{lazy:!0,server:!1},"$MjXpKokGLu")),k=await k,R(),k);me(()=>d.refreshKey,(c,m)=>{c!==m&&c!==void 0&&M()});const P=H(null),{copy:I,copied:j}=ut(),W=S(()=>h.value?h.value.flatMap(c=>c.cases.filter(m=>!m.passedOnRetry).map(m=>({filePath:m.filePath,title:m.title,line:null,projectName:null}))):[]),L=S(()=>Rt(W.value));function f(){const c=L.value;c&&I(c,{toast:"Retry command copied"})}const z=[{accessorKey:"signature",header:ce("Signature")},{accessorKey:"errorType",header:ce("Type")},{accessorKey:"status",header:ce("Status")},{accessorKey:"caseCount",header:ce("Tests")},{accessorKey:"signals",header:"Signals"},{accessorKey:"diagnosis",header:"AI"},{accessorKey:"firstSeenRunId",header:ce("Known since")},{id:"actions",header:"Actions"}],_=S(()=>h.value?.reduce((c,m)=>c+m.caseCount,0)??0);return(c,m)=>{const A=ve,$=Ie,E=Ce,x=we,Y=Ee,Q=ct,oe=jt,ee=rt,le=Go,K=Dt;return s(),a(O,null,[n("div",Xo,[e(B)?(s(),a("div",qo,[i(A,{name:"i-lucide-loader-2",class:"size-4 animate-spin"}),m[2]||(m[2]=n("span",null,"Grouping failures...",-1))])):e(h)&&e(h).length?(s(),a(O,{key:1},[n("div",Yo,[n("p",Jo,[w(l(e(_))+" failing "+l(e(_)===1?"test":"tests")+" across "+l(e(h).length)+" "+l(e(h).length===1?"group":"groups")+" ",1),i($,{topic:"cluster.concept"})]),e(W).length>0?(s(),b(E,{key:0,size:"xs",variant:"outline",color:"neutral",icon:e(j)?"i-lucide-check":"i-lucide-play",title:e(j)?"Copied!":("copyPreview"in c?c.copyPreview:e(Ct))(e(L)),onClick:m[0]||(m[0]=N=>f())},{default:r(()=>[...m[3]||(m[3]=[w(" Copy retry command ",-1)])]),_:1},8,["icon","title"])):p("",!0)]),i(ee,{ui:{body:"p-0 sm:p-0"}},{default:r(()=>[i(oe,{"min-width":"46rem",bleed:!1},{default:r(()=>[i(Q,{data:e(h),columns:z},{"actions-header":r(()=>[...m[4]||(m[4]=[n("div",{class:"text-right"},"Actions",-1)])]),"signature-cell":r(({row:N})=>[n("div",Zo,[n("span",{class:J(["text-sm block truncate",N.original.title?"":"font-mono"]),title:N.original.signature},l(N.original.title||N.original.signature),11,Qo),N.original.selector?(s(),a("span",el,[m[5]||(m[5]=w(" Locator: ",-1)),n("code",tl,l(N.original.selector),1)])):p("",!0)])]),"errorType-cell":r(({row:N})=>[N.original.errorType?(s(),b(x,{key:0,color:("clusterErrorTypeColor"in c?c.clusterErrorTypeColor:e(_s))(N.original.errorType),variant:"subtle",size:"sm"},{default:r(()=>[w(l(N.original.errorType),1)]),_:2},1032,["color"])):(s(),a("span",sl,"—"))]),"status-cell":r(({row:N})=>[N.original.status?(s(),b(x,{key:0,color:("clusterStatusColor"in c?c.clusterStatusColor:e(ws))(N.original.status),variant:"subtle",size:"sm"},{default:r(()=>[w(l(N.original.status),1)]),_:2},1032,["color"])):(s(),a("span",nl,"—"))]),"caseCount-cell":r(({row:N})=>[n("span",al,l(N.original.caseCount),1)]),"signals-cell":r(({row:N})=>[N.original.isNew||N.original.flaky||N.original.workerCorrelated||N.original.locatorHealing?(s(),a("div",ol,[N.original.isNew?(s(),b(x,{key:0,color:"warning",variant:"subtle",size:"sm"},{default:r(()=>[...m[6]||(m[6]=[w(" New ",-1)])]),_:1})):p("",!0),N.original.flaky?(s(),b(x,{key:1,color:"warning",variant:"outline",size:"sm"},{default:r(()=>[...m[7]||(m[7]=[w(" Flaky ",-1)])]),_:1})):p("",!0),N.original.workerCorrelated?(s(),b(x,{key:2,color:"info",variant:"outline",size:"sm",title:"All failures ran on the same worker"},{default:r(()=>[...m[8]||(m[8]=[w(" Same worker ",-1)])]),_:1})):p("",!0),N.original.locatorHealing?.healed?(s(),b(x,{key:3,color:"success",variant:"subtle",size:"sm",icon:"i-lucide-circle-check",title:"The recommended locator already passes at this call site in a later run"},{default:r(()=>[...m[9]||(m[9]=[w(" Healed ",-1)])]),_:1})):N.original.locatorHealing?(s(),b(x,{key:4,color:"success",variant:"outline",size:"sm",icon:"i-lucide-bandage",title:`Locator fix available: ${N.original.locatorHealing.recommended} — open the cluster to apply it`},{default:r(()=>[...m[10]||(m[10]=[w(" Locator fix ",-1)])]),_:1},8,["title"])):p("",!0)])):(s(),a("span",ll,"—"))]),"diagnosis-cell":r(({row:N})=>[N.original.diagnosis?.status==="running"?(s(),a("div",il,[i(A,{name:"i-lucide-loader-2",class:"size-3 animate-spin"}),m[11]||(m[11]=w(" Running ",-1))])):N.original.diagnosis?.status==="completed"&&N.original.diagnosis.category?(s(),b(x,{key:1,color:"neutral",variant:"subtle",size:"sm",class:"gap-1"},{default:r(()=>[i(A,{name:"i-lucide-sparkles",class:"size-3"}),w(" "+l(N.original.diagnosis.category),1)]),_:2},1024)):(s(),a("span",rl,"—"))]),"firstSeenRunId-cell":r(({row:N})=>[N.original.isNew?(s(),a("span",ul,"New in this run")):(s(),a("div",cl,[i(Y,{to:`/test-runs/${N.original.firstSeenRunId}`,class:"text-primary hover:underline"},{default:r(()=>[w(" run #"+l(N.original.firstSeenRunId),1)]),_:2},1032,["to"]),N.original.firstSeenAt?(s(),a("span",dl," ("+l(("formatRelativeTime"in c?c.formatRelativeTime:e(it))(N.original.firstSeenAt))+") ",1)):p("",!0)]))]),"actions-cell":r(({row:N})=>[n("div",ml,[i(E,{size:"sm",color:"primary",variant:"soft",onClick:he=>C("selectCluster",N.original.clusterId)},{default:r(()=>[...m[12]||(m[12]=[w(" Filter ",-1)])]),_:1},8,["onClick"]),i(E,{size:"sm",color:"neutral",variant:"outline",icon:"i-lucide-sparkles",onClick:he=>P.value=N.original.clusterId},{default:r(()=>[...m[13]||(m[13]=[w(" Diagnose ",-1)])]),_:1},8,["onClick"]),i(E,{to:`/failure-clusters/${N.original.clusterId}`,size:"sm",variant:"outline","trailing-icon":"i-lucide-arrow-right"},{default:r(()=>[...m[14]||(m[14]=[w(" View ",-1)])]),_:1},8,["to"])])]),_:1},8,["data"])]),_:1})]),_:1})],64)):(s(),a("div",fl,[i(A,{name:"i-lucide-party-popper",class:"size-6"}),m[15]||(m[15]=n("span",null,"No failure groups — failed tests without error details are not grouped",-1))]))]),i(K,{open:e(P)!==null,title:"AI Diagnosis",ui:{content:"max-w-2xl"},"onUpdate:open":m[1]||(m[1]=N=>{N||(P.value=null)})},{body:r(()=>[e(P)!==null?(s(),b(le,{key:0,"cluster-id":e(P)},null,8,["cluster-id"])):p("",!0)]),_:1},8,["open"])],64)}}}),gl=Object.assign(pl,{__name:"FailureGroups"}),xl={class:"pt-4"},yl={key:2,class:"space-y-4"},hl={class:"flex flex-wrap items-center gap-2 text-sm"},vl={class:"text-gray-500 inline-flex items-center gap-1"},kl={key:0,class:"text-gray-400"},bl={key:0,class:"flex flex-wrap items-center gap-2"},wl={class:"text-sm text-gray-500"},_l={key:1,class:"flex items-center gap-2"},$l={class:"text-sm text-gray-500"},Cl={class:"space-y-3"},Tl={class:"flex items-center gap-2 text-sm font-medium"},Rl={class:"flex flex-wrap items-center gap-2 text-sm font-mono"},zl={key:0,class:"text-xs text-gray-400 font-sans"},Sl={class:"flex flex-wrap items-center gap-2"},Il={class:"flex items-center gap-1.5 flex-1 min-w-0"},Fl={class:"flex-1 text-xs bg-gray-100 dark:bg-gray-800 px-3 py-1.5 rounded font-mono truncate select-all"},Pl={key:3,class:"text-sm text-gray-500 flex items-center gap-2"},jl={class:"px-4 py-3 text-sm font-medium flex items-center gap-2 border-b border-default"},Dl={class:"overflow-x-auto"},Nl={class:"w-full min-w-[36rem] text-sm"},Bl={class:"px-4 py-2 text-gray-500"},Ml={class:"px-4 py-2 font-mono text-xs"},Al={key:0,class:"text-green-700 dark:text-green-400"},Ul={key:1,class:"text-gray-400"},Ll={class:"px-4 py-2 font-mono text-xs"},El={key:0,class:"text-red-700 dark:text-red-400"},Ol={key:1,class:"text-gray-400"},Kl=fe({__name:"RegressionContext",props:{refreshKey:{}},async setup(t){let y,k;const C=Oe().params.id,d=t,{data:T,pending:u,refresh:h}=([y,k]=Ue(()=>Le(`/api/test-runs/${C}/regression-context`,{lazy:!0,server:!1},"$bK54nhbSza")),y=await y,k(),y);me(()=>d.refreshKey,(I,j)=>{I!==j&&I!==void 0&&h()});const{copy:B,copied:M}=ut();function P(){B(T.value?.commitRange?.gitCommand)}return(I,j)=>{const W=Ft,L=Pt,f=ve,z=Ie,_=Ee,c=we,m=Ce,A=rt;return s(),a("div",xl,[e(u)?(s(),b(W,{key:0,text:"Looking for last passing run…"})):e(T)?.hasGreen?(s(),a("div",yl,[n("div",hl,[i(f,{name:"i-lucide-circle-check",class:"size-4 text-green-500 shrink-0"}),n("span",vl,[j[0]||(j[0]=w("Last passing run: ",-1)),i(z,{topic:"run.regression"})]),i(_,{to:`/test-runs/${e(T).lastGreenRunId}`,class:"font-medium text-primary hover:underline"},{default:r(()=>[w(" Run #"+l(e(T).lastGreenRunId),1)]),_:1},8,["to"]),e(T).lastGreenRunAt?(s(),a("span",kl," ("+l(("formatRelativeTime"in I?I.formatRelativeTime:e(it))(e(T).lastGreenRunAt))+") ",1)):p("",!0)]),(e(T).newFailures??0)>0?(s(),a("div",bl,[i(c,{color:"error",variant:"soft",size:"lg"},{default:r(()=>[w(l(e(T).newFailures)+" new "+l(e(T).newFailures===1?"failure":"failures"),1)]),_:1}),n("span",wl,l(e(T).newFailures===1?"test":"tests")+" that "+l((e(T).newFailures===1,"passed"))+" in run #"+l(e(T).lastGreenRunId)+" but "+l(e(T).newFailures===1?"fails":"fail")+" here ",1)])):(s(),a("div",_l,[i(c,{color:"warning",variant:"soft",size:"lg"},{default:r(()=>[...j[1]||(j[1]=[w(" No new regressions ",-1)])]),_:1}),n("span",$l,"All failing tests were also failing before run #"+l(e(T).lastGreenRunId),1)])),e(T).commitRange?(s(),b(A,{key:2,ui:{body:"p-4 sm:p-4"}},{default:r(()=>[n("div",Cl,[n("div",Tl,[i(f,{name:"i-lucide-git-commit-horizontal",class:"size-4"}),j[2]||(j[2]=w(" Commits introduced since last passing run ",-1))]),n("div",Rl,[i(c,{color:"success",variant:"soft",size:"sm"},{default:r(()=>[w(l(e(T).commitRange.fromShort),1)]),_:1}),i(f,{name:"i-lucide-arrow-right",class:"size-3 text-gray-400"}),i(c,{color:"error",variant:"soft",size:"sm"},{default:r(()=>[w(l(e(T).commitRange.toShort),1)]),_:1}),e(T).currentBranch||e(T).lastGreenBranch?(s(),a("span",zl," on "+l(e(T).currentBranch||e(T).lastGreenBranch),1)):p("",!0)]),n("div",Sl,[e(T).commitRange.compareUrl?(s(),b(m,{key:0,to:e(T).commitRange.compareUrl,target:"_blank",external:"",icon:"i-lucide-external-link",size:"sm",variant:"soft",color:"primary"},{default:r(()=>[...j[3]||(j[3]=[w(" View commits ",-1)])]),_:1},8,["to"])):p("",!0),n("div",Il,[n("code",Fl,l(e(T).commitRange.gitCommand),1),i(m,{icon:e(M)?"i-lucide-check":"i-lucide-clipboard",size:"xs",color:"neutral",variant:"ghost",title:e(M)?"Copied!":"Copy git command",onClick:P},null,8,["icon","title"])])])])]),_:1})):!e(T).currentCommit||!e(T).lastGreenCommit?(s(),a("div",Pl,[i(f,{name:"i-lucide-git-branch",class:"size-4 shrink-0"}),j[4]||(j[4]=w(" No commit info available — enable ",-1)),j[5]||(j[5]=n("code",{class:"font-mono text-xs"},"collectScmInfo: true",-1)),j[6]||(j[6]=w(" in the reporter to see commit ranges ",-1))])):p("",!0),e(T).metadataDiff&&e(T).metadataDiff.length>0?(s(),b(A,{key:4,ui:{body:"p-0 sm:p-0"}},{default:r(()=>[n("div",jl,[i(f,{name:"i-lucide-sliders-horizontal",class:"size-4"}),j[7]||(j[7]=w(" What changed between runs ",-1))]),n("div",Dl,[n("table",Nl,[j[8]||(j[8]=n("thead",null,[n("tr",{class:"text-xs text-gray-500 uppercase tracking-wider border-b border-default"},[n("th",{class:"text-left px-4 py-2 font-medium w-32"},"Field"),n("th",{class:"text-left px-4 py-2 font-medium"},"Last passing"),n("th",{class:"text-left px-4 py-2 font-medium"},"This run")])],-1)),n("tbody",null,[(s(!0),a(O,null,ie(e(T).metadataDiff,$=>(s(),a("tr",{key:$.key,class:"border-b last:border-b-0 border-default"},[n("td",Bl,l($.label),1),n("td",Ml,[$.before?(s(),a("span",Al,l($.before),1)):(s(),a("span",Ul,"—"))]),n("td",Ll,[$.after?(s(),a("span",El,l($.after),1)):(s(),a("span",Ol,"—"))])]))),128))])])])]),_:1})):p("",!0)])):(s(),b(L,{key:1,icon:"i-lucide-history",text:"No previous passing run found for this project"}))])}}}),Wl=Object.assign(Kl,{__name:"RegressionContext"}),Hl={class:"flex items-center justify-between mb-2"},Vl={class:"text-xs text-gray-500 inline-flex items-center gap-1"},Gl={class:"flex items-center gap-1"},Xl={class:"p-2 flex flex-col gap-2 min-w-56"},ql=fe({__name:"TimelineHeader",props:{workerCount:{},shardTotal:{},testCount:{},hookCount:{},waitCount:{},spanTypes:{},live:{type:Boolean}},emits:["reset","toggleSpan"],setup(t){return(y,k)=>{const R=Ie,C=Ce,d=zt,T=at;return s(),a("div",Hl,[n("span",Vl,[n("span",null,[w(l(t.workerCount)+" worker"+l(t.workerCount>1?"s":"")+" ",1),t.shardTotal&&t.shardTotal>1?(s(),a(O,{key:0},[w(" · "+l(t.shardTotal)+" shard"+l(t.shardTotal>1?"s":""),1)],64)):p("",!0),w(" · "+l(t.testCount)+" tests ",1),t.hookCount>0?(s(),a(O,{key:1},[w(" · "+l(t.hookCount)+" hooks ",1)],64)):p("",!0),t.waitCount>0?(s(),a(O,{key:2},[w(" · "+l(t.waitCount)+" waits ",1)],64)):p("",!0)]),i(R,{topic:"run.timeline"})]),n("div",Gl,[t.spanTypes.length>1?(s(),b(T,{key:0,content:{align:"end"}},{content:r(()=>[n("div",Xl,[(s(!0),a(O,null,ie(t.spanTypes,u=>(s(),b(d,{key:u.key,"model-value":u.checked,label:u.label,"onUpdate:modelValue":h=>y.$emit("toggleSpan",u.key,h===!0)},null,8,["model-value","label","onUpdate:modelValue"]))),128))])]),default:r(()=>[i(C,{size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-list-filter","trailing-icon":"i-lucide-chevron-down",title:"Show or hide span types"},{default:r(()=>[...k[1]||(k[1]=[w(" Span types ",-1)])]),_:1})]),_:1})):p("",!0),t.live?p("",!0):(s(),b(C,{key:1,size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-rotate-ccw",onClick:k[0]||(k[0]=u=>y.$emit("reset"))},{default:r(()=>[...k[2]||(k[2]=[w(" Reset view ",-1)])]),_:1}))])])}}}),Yl=Object.assign(ql,{__name:"TimelineHeader"}),Xe={barHeight:24,rowGap:8,labelWidth:80,sidePadding:16,axisHeight:28,get rowHeight(){return this.barHeight+this.rowGap}},Jl={passed:"#16a34a",failed:"#dc2626",timedOut:"#ea580c",running:"#2563eb",initialising:"#2563eb",skipped:"#9ca3af",cancelled:"#a1a1aa",interrupted:"#ea580c",flaky:"#ca8a04"},Pe={fill:"#facc15",stroke:"#ca8a04",swatch:"#f59e0b"};function Ye(t){return Jl[t]||"#a1a1aa"}function Bt(t){return Ye(t)+"66"}function Mt(t){return Ye(t)}function qe(t){return t<1e3?`${t}ms`:t<6e4?`${(t/1e3).toFixed(1)}s`:`${Math.floor(t/6e4)}m ${Math.floor(t%6e4/1e3)}s`}const Zl=["y","width","height"],Ql=["y1","x2","y2"],ei=["x1","y1","x2","y2"],ti=["x1","y1","x2","y2"],si=["x","y"],ni=["y"],ai=fe({__name:"TimelineGrid",props:{workerRows:{},shardGroups:{},tickMarks:{},contentWidth:{},shardTotal:{}},setup(t){const{barHeight:y,rowGap:k,axisHeight:R,rowHeight:C}=Xe;return(d,T)=>(s(),a("g",null,[(s(!0),a(O,null,ie(t.workerRows,(u,h)=>(s(),a("rect",{key:"bg-"+h,x:0,y:h*e(C)+e(R),width:t.contentWidth,height:e(C),class:J(h%2===1?"fill-black/[0.03] dark:fill-white/[0.03]":"fill-transparent")},null,10,Zl))),128)),(s(!0),a(O,null,ie(t.shardGroups.slice(1),u=>(s(),a("line",{key:"shard-sep-"+u.rowRange[0],x1:0,y1:u.rowRange[0]*e(C)+e(R)-e(k)/2,x2:t.contentWidth,y2:u.rowRange[0]*e(C)+e(R)-e(k)/2,stroke:"currentColor","stroke-dasharray":"4,3",class:"stroke-gray-400 dark:stroke-gray-500"},null,8,Ql))),128)),n("line",{x1:e(Xe).labelWidth,y1:e(R),x2:t.contentWidth,y2:e(R),stroke:"currentColor",class:"stroke-gray-300 dark:stroke-gray-600"},null,8,ei),(s(!0),a(O,null,ie(t.tickMarks,u=>(s(),a("g",{key:u.ms},[n("line",{x1:u.x,y1:e(R)-4,x2:u.x,y2:e(R),stroke:"currentColor",class:"stroke-gray-300 dark:stroke-gray-600"},null,8,ti),n("text",{x:u.x,y:e(R)-8,"text-anchor":"middle",class:"fill-gray-400 text-[10px]"},l(u.label),9,si)]))),128)),(s(!0),a(O,null,ie(t.workerRows,(u,h)=>(s(),a("text",{key:"label-"+h,x:6,y:h*e(C)+e(R)+e(y)/2+4,class:"fill-gray-500 text-[11px] font-medium"},l(u.shardIndex!=null&&t.shardTotal&&t.shardTotal>1?`S${u.shardIndex} W${u.workerIndex}`:`Worker ${u.workerIndex}`),9,ni))),128))]))}}),oi=Object.assign(ai,{__name:"TimelineGrid"}),li=["x","y","width","height","fill","stroke"],ii=["x","y"],ri=["x","y","width","height","fill","stroke"],ui=["x1","y1","x2","y2","stroke"],ci=["x1","y1","x2","y2","stroke"],di=["x","y"],mi=["cx","cy"],fi=["cx","cy"],pi=["x","y","width","height","fill"],gi=["x","y"],xi=fe({__name:"TimelineBar",props:{item:{},x:{},y:{},width:{}},emits:["select","hover","move","leave"],setup(t,{emit:y}){const k=t,R=y,{barHeight:C}=Xe,d=S(()=>["setup","hook","fixture"].includes(k.item.kind)),T=S(()=>k.item.testCaseId!=null),u=S(()=>T.value?"cursor-pointer":"cursor-default");function h(){k.item.testCaseId!=null&&R("select",k.item.testCaseId)}return(B,M)=>(s(),a("g",{class:"timeline-bar-group",onMouseenter:M[0]||(M[0]=P=>R("hover",t.item,P)),onMousemove:M[1]||(M[1]=P=>R("move",P)),onMouseleave:M[2]||(M[2]=P=>R("leave"))},[d.value?(s(),a(O,{key:0},[n("rect",{x:t.x,y:t.y,width:t.width,height:e(C),rx:3,ry:3,fill:e(Bt)(t.item.status),stroke:e(Mt)(t.item.status),"stroke-width":"1","stroke-dasharray":"3,2",class:J(["timeline-bar-shape transition-opacity duration-100 opacity-80",u.value]),onClick:h},null,10,li),t.width>60?(s(),a("text",{key:0,x:t.x+4,y:t.y+e(C)/2+4,class:"fill-gray-600 dark:fill-gray-300 text-[9px] font-medium pointer-events-none"},l(t.item.title),9,ii)):p("",!0)],64)):t.item.kind==="wait"?(s(),a(O,{key:1},[n("rect",{x:t.x,y:t.y-3,width:t.width,height:e(C)+6,rx:2,ry:2,fill:e(Pe).fill,"fill-opacity":"0.28",stroke:e(Pe).stroke,"stroke-width":"1.5",class:J(["timeline-bar-shape transition-opacity duration-100 opacity-90",u.value]),onClick:h},null,10,ri),t.width>4?(s(),a("line",{key:0,x1:t.x+1,y1:t.y-3,x2:t.x+t.width-1,y2:t.y+e(C)+3,stroke:e(Pe).stroke,"stroke-width":"1","stroke-opacity":"0.25",class:"pointer-events-none"},null,8,ui)):p("",!0),t.width>4?(s(),a("line",{key:1,x1:t.x+t.width-1,y1:t.y-3,x2:t.x+1,y2:t.y+e(C)+3,stroke:e(Pe).stroke,"stroke-width":"1","stroke-opacity":"0.25",class:"pointer-events-none"},null,8,ci)):p("",!0),t.width>50?(s(),a("text",{key:2,x:t.x+4,y:t.y+e(C)/2+4,class:"fill-yellow-800 dark:fill-yellow-200 text-[9px] font-bold pointer-events-none"}," wasted "+l(e(qe)(t.item.duration)),9,di)):p("",!0)],64)):t.item.status==="running"?(s(),a(O,{key:2},[n("circle",{cx:t.x+6,cy:t.y+e(C)/2,r:"3",fill:"#2563eb",filter:"url(#glow)",class:"timeline-bar-shape transition-opacity duration-100 cursor-pointer opacity-90",onClick:h},null,8,mi),n("circle",{cx:t.x+6,cy:t.y+e(C)/2,r:"5",fill:"none",stroke:"#2563eb","stroke-width":"1.5","stroke-opacity":"0.4",filter:"url(#glow)",class:"timeline-bar-shape transition-opacity duration-100 cursor-pointer opacity-90",onClick:h},null,8,fi)],64)):(s(),a(O,{key:3},[n("rect",{x:t.x,y:t.y,width:t.width,height:e(C),rx:3,ry:3,fill:e(Ye)(t.item.status),class:"timeline-bar-shape transition-opacity duration-100 cursor-pointer opacity-90",onClick:h},null,8,pi),t.width>40?(s(),a("text",{key:0,x:t.x+4,y:t.y+e(C)/2+4,class:"fill-white text-[10px] font-medium pointer-events-none"},l(e(qe)(t.item.duration)),9,gi)):p("",!0)],64))],32))}}),yi=Object.assign(xi,{__name:"TimelineBar"}),hi={class:"flex items-center gap-2 mb-1"},vi={class:"font-medium text-gray-900 dark:text-white max-w-64 truncate"},ki={class:"flex items-center gap-3 text-gray-500"},bi={class:"capitalize"},wi={key:0,class:"italic truncate max-w-48"},_i=340,$i=fe({__name:"TimelineTooltip",props:{item:{},pos:{}},setup(t){const y=t,k=S(()=>{const C=y.item;return C?C.kind==="test"?{backgroundColor:Ye(C.status)}:C.kind==="wait"?{backgroundColor:Pe.swatch+"66",borderColor:Pe.swatch}:{backgroundColor:Bt(C.status),borderColor:Mt(C.status)}:{}}),R=S(()=>{const{x:C,y:d}=y.pos;if(typeof window>"u")return{left:`${C+12}px`,top:`${d-10}px`};const T=C+12+_i>window.innerWidth,u=d+90>window.innerHeight;return{left:T?void 0:`${C+12}px`,right:T?`${window.innerWidth-C+12}px`:void 0,top:u?void 0:`${d-10}px`,bottom:u?`${window.innerHeight-d+10}px`:void 0}});return(C,d)=>(s(),b(os,{to:"body"},[t.item?(s(),a("div",{key:0,class:"fixed z-[9999] pointer-events-none rounded-lg border border-gray-200 dark:border-gray-700 bg-white dark:bg-gray-900 px-3 py-2 text-xs shadow-lg",style:ke(R.value)},[n("div",hi,[n("span",{class:J(["inline-block size-2.5 rounded-full shrink-0",{"border border-dashed":t.item.kind!=="test"}]),style:ke(k.value)},null,6),n("span",vi,[t.item.kind!=="test"?(s(),a("span",{key:0,class:J(["uppercase text-[10px] tracking-wider mr-1",t.item.kind==="wait"?"text-amber-500":"text-gray-500"])},l(t.item.kind),3)):p("",!0),w(" "+l(t.item.title),1)])]),n("div",ki,[n("span",bi,l(t.item.status),1),n("span",null,l(e(qe)(t.item.duration)),1),n("span",null,"Worker "+l(t.item.workerIndex),1),t.item.parentTitle?(s(),a("span",wi," for "+l(t.item.parentTitle),1)):p("",!0)])],4)):p("",!0)]))}}),Ci=Object.assign($i,{__name:"TimelineTooltip"}),Ti=["Wait for timeout*","*waitForTimeout*"];function Ri(t){const y=t.replace(/[.+^${}()|[\]\\]/g,"\\$&").replace(/\*/g,".*").replace(/\?/g,".");return new RegExp(`^${y}$`,"i")}const xt=new Map;function zi(t){let y=xt.get(t);return y||(y=Ri(t),xt.set(t,y)),y}function Si(t,y){if(!y||y.length===0)return!1;const k=t.title??"",R=t.location??"";for(const C of y){const d=zi(C);if(d.test(k)||R&&d.test(R))return!0}return!1}function Ii(t){const y=new Map;for(const k of t){const R=k.workerIndex;if(R==null||R<0)continue;const C=k.shardIndex??null,d=`${C??"null"}|${R}`;let T=y.get(d);T||(T={shardIndex:C,workerIndex:R,cases:[]},y.set(d,T)),T.cases.push(k)}return[...y.values()].sort((k,R)=>{const C=k.shardIndex??1/0,d=R.shardIndex??1/0;return C!==d?C-d:k.workerIndex-R.workerIndex})}function He(t){if(t==null)return null;if(typeof t=="number")return Number.isFinite(t)?t:null;if(t instanceof Date)return t.getTime();const y=new Date(t).getTime();return Number.isNaN(y)?null:y}function Fi(t,y){return t.category==="wait"?Si(t,y)?"wait":null:t.category==="hook"||t.category==="fixture"?t.category:null}function Pi(t){const y=S(()=>t.wastedPatterns&&t.wastedPatterns.length>0?t.wastedPatterns:Ti),k=S(()=>Ii(t.testCases)),R=S(()=>{const u=k.value,h=y.value;let B=1/0;for(const W of u)for(const L of W.cases){const f=He(L.startedAt);f!=null&&f>0&&(B=Math.min(B,f))}const M=Number.isFinite(B),P=W=>Math.max(0,(He(W)??B)-B),I=[],j=new Map;if(u.forEach((W,L)=>{const f=[],z=M?W.cases:[...W.cases].sort((c,m)=>(He(c.startedAt)??0)-(He(m.startedAt)??0));let _=0;for(const c of z){const m=c.duration??1e3,A=M?P(c.startedAt):_;f.push({key:`t${c.id}`,kind:"test",testCaseId:c.id,title:c.title,status:c.status,workerIndex:W.workerIndex,start:A,duration:m,rowIndex:L}),_=A+m,(c.stepEvents??[]).forEach((E,x)=>{const Y=Fi(E,h);if(!Y)return;const Q=E.duration||0,oe=M?P(E.startedAt):_;f.push({key:`s${c.id}:${x}`,kind:Y,testCaseId:c.id,title:E.title,status:E.status||"passed",workerIndex:W.workerIndex,start:oe,duration:Q,rowIndex:L,parentTitle:c.title}),_=oe+Q})}f.sort((c,m)=>c.start-m.start),I.push(...f),j.has(W.workerIndex)||j.set(W.workerIndex,_)}),t.setupSteps&&t.setupSteps.length>0){const W=new Map;u.forEach((L,f)=>{W.has(L.workerIndex)||W.set(L.workerIndex,f)}),t.setupSteps.forEach((L,f)=>{const z=L.workerIndex;if(z==null||z<0)return;const _=W.get(z);if(_==null)return;const c=L.duration||0;let m;M?m=P(L.startedAt):(m=j.get(z)??0,j.set(z,m+c)),I.push({key:`setup${z}:${f}`,kind:"setup",testCaseId:null,title:`[Setup] ${L.title}`,status:L.status||"passed",workerIndex:z,start:m,duration:c,rowIndex:_,parentTitle:null})})}return I}),C=S(()=>k.value.map(u=>({shardIndex:u.shardIndex,workerIndex:u.workerIndex}))),d=S(()=>{const u=[];for(let h=0;h<C.value.length;h++){const B=C.value[h],M=u[u.length-1];!M||M.shardIndex!==B.shardIndex?u.push({shardIndex:B.shardIndex,rowRange:[h,h]}):M.rowRange[1]=h}return u}),T=S(()=>{let u=0;for(const h of R.value)u=Math.max(u,h.start+h.duration);return u||6e4});return{timelineData:R,workerRows:C,shardGroups:d,maxTime:T}}const yt=1.12,ji=10,Di=100,et=[10,20,50,100,200,500,1e3,2e3,5e3,1e4,15e3,3e4,6e4,12e4,3e5,6e5,9e5,18e5,36e5];function Ni(t){const{containerRef:y,maxTime:k,rowCount:R,hasData:C,live:d}=t,{labelWidth:T,sidePadding:u,axisHeight:h,rowHeight:B}=Xe,M=H(1),P=H(0),I=H(!1),j=H(0),W=H(0),L=S(()=>.5*M.value),f=S(()=>k.value*L.value+T+u),z=S(()=>R.value*B+h);function _(v){return v.start*L.value+T}function c(v){return Math.max(v.duration*L.value,3)}function m(v){return v.rowIndex*B+h}function A(){const v=y.value?.clientWidth;if(!v||k.value<=0)return 1;const X=(v-T)/k.value;return Math.min(1,X/.5)}function $(){const v=A();v>0&&(M.value=v,P.value=0)}function E(v){if(!y.value)return v;const X=y.value.clientWidth;return f.value<=X?0:Math.max(X-f.value,Math.min(0,v))}function x(v,X){const ne=Math.max(A(),Math.min(ji,v)),te=ne/M.value;M.value=ne,P.value=E(X-(X-P.value)*te)}const Y=S(()=>{const v=Di/L.value;let X=et.find(te=>te>=v)??et[et.length-1];for(;k.value/X>1e3;)X*=2;const ne=[];for(let te=0;te<=k.value;te+=X)ne.push({ms:te,x:te*L.value+T,label:qe(te)});return ne});function Q(v){if(d())return;const X=v.deltaY>0?1/yt:yt,ne=y.value?.getBoundingClientRect();x(M.value*X,ne?v.clientX-ne.left:0)}const oe=4,ee=new Map;let le=null,K=0,N=1,he=0;function D(v,X){le=v,j.value=X,W.value=P.value}function o(v){if(!d()&&!(v.pointerType==="mouse"&&v.button!==0)){if(ee.set(v.pointerId,{x:v.clientX,y:v.clientY}),ee.size===1)D(v.pointerId,v.clientX);else if(ee.size===2){le=null,I.value=!1;for(const xe of ee.keys())y.value?.setPointerCapture?.(xe);const[X,ne]=[...ee.values()];K=Math.hypot(X.x-ne.x,X.y-ne.y)||1,N=M.value;const te=y.value?.getBoundingClientRect();he=(X.x+ne.x)/2-(te?.left??0)}v.preventDefault()}}function F(v){if(!(d()||!ee.has(v.pointerId))){if(ee.set(v.pointerId,{x:v.clientX,y:v.clientY}),ee.size>=2){const[X,ne]=[...ee.values()],te=Math.hypot(X.x-ne.x,X.y-ne.y)||1;x(N*(te/K),he);return}I.value?P.value=E(W.value+(v.clientX-j.value)):le===v.pointerId&&Math.abs(v.clientX-j.value)>oe&&(y.value?.setPointerCapture?.(v.pointerId),I.value=!0,P.value=E(W.value+(v.clientX-j.value)))}}function V(v){if(ee.delete(v.pointerId),le===v.pointerId&&(le=null),y.value?.releasePointerCapture?.(v.pointerId),ee.size===1){const[X]=[...ee.entries()];D(X[0],X[1].x)}else ee.size===0&&(I.value=!1)}function re(){$()}let Z=null;return ls(()=>{De($),y.value&&(Z=new ResizeObserver(()=>$()),Z.observe(y.value))}),vt(()=>{Z?.disconnect()}),me(()=>[d(),C.value,k.value,R.value],([v,X])=>{v&&X&&De($)}),{panX:P,isPanning:I,pxPerMs:L,contentWidth:f,contentHeight:z,getBarX:_,getBarWidth:c,getBarTop:m,tickMarks:Y,onWheel:Q,onPointerDown:o,onPointerMove:F,onPointerUp:V,resetView:re}}const Bi={key:0,class:"relative select-none"},Mi=["width","height"],Ai={key:1,class:"text-center py-10 text-gray-500"},Ui=fe({__name:"WorkersTimeline",props:{testCases:{},setupSteps:{},shardTotal:{},live:{type:Boolean},wastedPatterns:{}},emits:["selectTestCase"],setup(t,{emit:y}){const k=t,R=y,{timelineData:C,workerRows:d,shardGroups:T,maxTime:u}=Pi(k),h=H(null),B=S(()=>d.value.length),M=S(()=>C.value.length>0),{panX:P,isPanning:I,contentWidth:j,contentHeight:W,getBarX:L,getBarWidth:f,getBarTop:z,tickMarks:_,onWheel:c,onPointerDown:m,onPointerMove:A,onPointerUp:$,resetView:E}=Ni({containerRef:h,maxTime:u,rowCount:B,hasData:M,live:()=>k.live}),x=S(()=>C.value.filter(Z=>Z.kind==="test").length),Y=S(()=>C.value.filter(Z=>Z.kind!=="test"&&Z.kind!=="wait").length),Q=S(()=>C.value.filter(Z=>Z.kind==="wait").length),oe=["test","setup","hook","fixture","wait"],ee={test:"Tests",setup:"Setup (beforeAll/afterAll)",hook:"Hooks",fixture:"Fixtures",wait:"Wasted waits"},le=H({}),K=S(()=>C.value.filter(Z=>!le.value[Z.kind])),N=S(()=>{const Z=new Set(C.value.map(v=>v.kind));return oe.filter(v=>Z.has(v)).map(v=>({key:v,label:ee[v],checked:!le.value[v]}))});function he(Z,v){le.value={...le.value,[Z]:!v}}const D=H(null),o=H({x:0,y:0});me(K,Z=>{D.value&&(D.value=Z.find(v=>v.key===D.value.key)??null)});function F(Z,v){D.value=Z,o.value={x:v.clientX,y:v.clientY}}function V(Z){o.value={x:Z.clientX,y:Z.clientY}}function re(){D.value=null}return(Z,v)=>{const X=Yl,ne=oi,te=yi,xe=Ci,be=ve;return e(C).length>0?(s(),a("div",Bi,[i(X,{"worker-count":e(d).length,"shard-total":t.shardTotal,"test-count":x.value,"hook-count":Y.value,"wait-count":Q.value,"span-types":N.value,live:t.live,onToggleSpan:he,onReset:e(E)},null,8,["worker-count","shard-total","test-count","hook-count","wait-count","span-types","live","onReset"]),n("div",{ref_key:"containerRef",ref:h,class:J(["relative overflow-hidden rounded-lg border border-gray-200 dark:border-gray-700 touch-pan-y",{"cursor-grab":!e(I),"cursor-grabbing":e(I)}]),style:ke({height:e(W)+"px"}),onWheel:v[1]||(v[1]=Ae((...se)=>e(c)&&e(c)(...se),["prevent"])),onPointerdown:v[2]||(v[2]=(...se)=>e(m)&&e(m)(...se)),onPointermove:v[3]||(v[3]=(...se)=>e(A)&&e(A)(...se)),onPointerup:v[4]||(v[4]=(...se)=>e($)&&e($)(...se)),onPointercancel:v[5]||(v[5]=(...se)=>e($)&&e($)(...se)),onPointerleave:v[6]||(v[6]=(...se)=>e($)&&e($)(...se))},[(s(),a("svg",{class:"overflow-visible",style:ke({transform:`translateX(${e(P)}px)`}),width:e(j),height:e(W)},[v[7]||(v[7]=n("defs",null,[n("filter",{id:"glow"},[n("feGaussianBlur",{stdDeviation:"2.5",result:"blur"}),n("feMerge",null,[n("feMergeNode",{in:"blur"}),n("feMergeNode",{in:"SourceGraphic"})])])],-1)),i(ne,{"worker-rows":e(d),"shard-groups":e(T),"tick-marks":e(_),"content-width":e(j),"shard-total":t.shardTotal},null,8,["worker-rows","shard-groups","tick-marks","content-width","shard-total"]),(s(!0),a(O,null,ie(K.value,se=>(s(),b(te,{key:se.key,item:se,x:e(L)(se),y:e(z)(se),width:e(f)(se),onSelect:v[0]||(v[0]=Te=>R("selectTestCase",Te)),onHover:F,onMove:V,onLeave:re},null,8,["item","x","y","width"]))),128))],12,Mi))],38),i(xe,{item:D.value,pos:o.value},null,8,["item","pos"])])):(s(),a("div",Ai,[i(be,{name:"i-lucide-rows-3",class:"size-8 mx-auto mb-2 text-gray-300 dark:text-gray-600"}),v[8]||(v[8]=n("p",null,"No worker data available for this run.",-1))]))}}}),Li=Object.assign(Ui,{__name:"WorkersTimeline"}),Ei={key:0,class:"space-y-4"},Oi={class:"grid grid-cols-1 md:grid-cols-2 gap-4"},Ki={class:"flex items-center gap-2 py-1.5"},Wi={class:"font-medium"},Hi={key:0,class:"flex"},Vi={key:1,class:"flex items-center justify-center py-6 text-gray-500 gap-2"},Gi={class:"flex flex-wrap gap-2 mt-1"},Xi={class:"flex flex-wrap gap-4 text-sm"},qi={key:3,class:"text-sm text-gray-500"},Yi={class:"flex flex-wrap gap-4 text-sm"},Ji={key:0,class:"text-gray-400"},Zi={key:0,class:"text-gray-400"},Qi={key:1,class:"text-gray-400"},er={key:1,class:"text-gray-400"},tr={key:0,class:"text-gray-400"},sr={key:0,class:"text-gray-400"},nr={key:4,class:"text-center py-8 text-gray-500"},ar={key:5,class:"text-center py-8 text-gray-500"},or={key:1,class:"text-center py-10 text-gray-500"},lr=fe({__name:"RunCompare",props:{testRun:{}},setup(t){const y=t,R=Oe().params.id,C=H(null),d=H([]),T=S(()=>y.testRun?.status==="running"||y.testRun?.status==="finalizing");me(()=>y.testRun?.projectId,async _=>{if(!(!_||T.value)){try{C.value=await $fetch(`/api/projects/${_}`)}catch(c){console.error("Failed to fetch project for RunCompare",c)}try{const c=await $fetch(`/api/projects/${_}/markers`);d.value=c.markers??[]}catch{}}},{immediate:!0});const u=S(()=>{if(!P.value||!y.testRun)return[];const _=new Date(P.value.startTime).getTime(),c=new Date(y.testRun.startTime).getTime(),m=Math.min(_,c),A=Math.max(_,c),$=new Set([P.value.environment,y.testRun.environment].filter(E=>E!=null));return d.value.filter(E=>{const x=new Date(E.occurredAt).getTime();return x<=m||x>=A?!1:E.environment==null||$.has(E.environment)})}),h=S(()=>C.value?.testRuns?C.value.testRuns.filter(_=>_.id!==Number(R)).slice(0,50).map(_=>({label:`Run #${_.id} — ${$t(_.startTime,{dateOnly:!0})} (${_.status})`,value:_.id})):[]),B=S(()=>{if(!C.value?.testRuns)return null;const _=[...C.value.testRuns].sort((m,A)=>new Date(A.startTime).getTime()-new Date(m.startTime).getTime()),c=_.findIndex(m=>m.id===Number(R));return c>=0&&c<_.length-1?_[c+1].id:null}),M=H(void 0),P=H(null),I=H(!1);me(M,async _=>{if(!_?.value){P.value=null;return}I.value=!0;try{P.value=await $fetch(`/api/test-runs/${_.value}`)}catch{}finally{I.value=!1}});function j(){if(B.value){const _=h.value.find(c=>c.value===B.value);_&&(M.value=_)}}const W=S(()=>y.testRun??null),{comparisonData:L,comparisonSummary:f}=Bs(P,W),z=[{accessorKey:"title",header:ce("Test case")},{accessorKey:"statusA",header:ce("Status A")},{accessorKey:"statusB",header:ce("Status B")},{accessorKey:"durationA",header:ce("Duration A")},{accessorKey:"durationB",header:ce("Duration B")},{accessorKey:"delta",header:ce("Delta")},{accessorKey:"percentChange",header:ce("Change")}];return(_,c)=>{const m=js,A=Ds,$=Ce,E=ve,x=bt,Y=Ns,Q=we,oe=Ke,ee=ct,le=jt;return s(),a("div",null,[t.testRun&&!T.value?(s(),a("div",Ei,[n("div",Oi,[n("div",null,[c[1]||(c[1]=n("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Run A (baseline)",-1)),i(m,{modelValue:M.value,"onUpdate:modelValue":c[0]||(c[0]=K=>M.value=K),items:h.value,placeholder:"Select a baseline run..."},null,8,["modelValue","items"])]),n("div",null,[c[2]||(c[2]=n("label",{class:"block text-sm font-medium text-gray-700 dark:text-gray-300 mb-1"},"Run B (this run)",-1)),n("div",Ki,[i(A,{status:t.testRun.status},null,8,["status"]),n("span",Wi,"#"+l(t.testRun.id),1)])])]),B.value?(s(),a("div",Hi,[i($,{icon:"i-lucide-arrow-left-right",size:"sm",variant:"outline",label:"Compare with previous run",onClick:j})])):p("",!0),I.value?(s(),a("div",Vi,[i(E,{name:"i-lucide-loader-2",class:"size-4 animate-spin"}),c[3]||(c[3]=n("span",null,"Loading baseline data...",-1))])):u.value.length>0?(s(),b(Y,{key:2,color:"warning",variant:"subtle",icon:"i-lucide-milestone",title:`${u.value.length} timeline marker${u.value.length>1?"s":""} between these runs`},{description:r(()=>[n("div",Gi,[(s(!0),a(O,null,ie(u.value,K=>(s(),b(x,{key:K.id,marker:K,size:"sm"},null,8,["marker"]))),128))])]),_:1},8,["title"])):P.value&&e(L).length>0?(s(),a(O,{key:3},[n("div",Xi,[c[4]||(c[4]=n("span",{class:"text-xs font-semibold text-gray-500 uppercase tracking-wider mr-1"},"Status",-1)),e(f).newFailures>0?(s(),b(Q,{key:0,color:"error",variant:"soft",size:"lg"},{default:r(()=>[w(l(e(f).newFailures)+" new failure"+l(e(f).newFailures>1?"s":""),1)]),_:1})):p("",!0),e(f).recovered>0?(s(),b(Q,{key:1,color:"success",variant:"soft",size:"lg"},{default:r(()=>[w(l(e(f).recovered)+" recovered ",1)]),_:1})):p("",!0),e(f).stillFailing>0?(s(),b(Q,{key:2,color:"warning",variant:"soft",size:"lg"},{default:r(()=>[w(l(e(f).stillFailing)+" still failing ",1)]),_:1})):p("",!0),e(f).newFailures===0&&e(f).recovered===0&&e(f).stillFailing===0?(s(),a("span",qi,"No status changes")):p("",!0)]),n("div",Yi,[c[5]||(c[5]=n("span",{class:"text-xs font-semibold text-gray-500 uppercase tracking-wider mr-1"},"Duration changes",-1)),e(f).regressed>0?(s(),b(Q,{key:0,color:"error",variant:"soft",size:"lg"},{default:r(()=>[w(l(e(f).regressed)+" regressed ",1)]),_:1})):p("",!0),e(f).improved>0?(s(),b(Q,{key:1,color:"success",variant:"soft",size:"lg"},{default:r(()=>[w(l(e(f).improved)+" improved ",1)]),_:1})):p("",!0),i(Q,{color:"neutral",variant:"soft",size:"lg"},{default:r(()=>[w(l(e(f).unchanged)+" unchanged ",1)]),_:1})]),i(le,{"min-width":"48rem",bleed:!1},{default:r(()=>[i(ee,{data:e(L),columns:z,ui:{base:"table-fixed border-separate border-spacing-0 min-w-[48rem]",thead:"[&>tr]:bg-elevated/50 [&>tr]:after:content-none",tbody:"[&>tr]:last:[&>td]:border-b-0",th:"first:rounded-l-lg last:rounded-r-lg border-y border-default first:border-l last:border-r",td:"border-b border-default"}},{"statusA-cell":r(({row:K})=>[K.original.statusA?(s(),b(Q,{key:1,color:("getStatusColor"in _?_.getStatusColor:e(nt))(K.original.statusA),variant:"subtle",class:"capitalize"},{default:r(()=>[w(l(K.original.statusA),1)]),_:2},1032,["color"])):(s(),a("span",Ji,"—"))]),"statusB-cell":r(({row:K})=>[K.original.statusB?(s(),b(Q,{key:1,color:("getStatusColor"in _?_.getStatusColor:e(nt))(K.original.statusB),variant:"subtle",class:"capitalize"},{default:r(()=>[w(l(K.original.statusB),1)]),_:2},1032,["color"])):(s(),a("span",Zi,"—"))]),"durationA-cell":r(({row:K})=>[K.original.durationA!==null?(s(),b(oe,{key:0,ms:K.original.durationA},null,8,["ms"])):(s(),a("span",Qi,"—"))]),"durationB-cell":r(({row:K})=>[K.original.durationB!==null?(s(),b(oe,{key:0,ms:K.original.durationB},null,8,["ms"])):(s(),a("span",er,"—"))]),"delta-cell":r(({row:K})=>[K.original.delta===null?(s(),a("span",tr,"—")):(s(),a("span",{key:1,class:J(K.original.delta>0?"text-red-600":K.original.delta<0?"text-green-600":"text-gray-500")},[w(l(K.original.delta>0?"+":""),1),i(oe,{ms:K.original.delta,"unit-class":"opacity-60"},null,8,["ms"])],2))]),"percentChange-cell":r(({row:K})=>[K.original.percentChange===null?(s(),a("span",sr,"—")):(s(),a("span",{key:1,class:J(K.original.percentChange>10?"text-red-600 font-medium":K.original.percentChange<-10?"text-green-600 font-medium":"text-gray-500")},l(K.original.percentChange>0?"+":"")+l(K.original.percentChange)+"% ",3))]),_:1},8,["data"])]),_:1})],64)):M.value&&!I.value?(s(),a("div",nr,[i(E,{name:"i-lucide-git-compare-arrows",class:"size-8 mx-auto mb-2 text-gray-300 dark:text-gray-600"}),c[6]||(c[6]=n("p",null,"No comparison data available.",-1))])):(s(),a("div",ar,[i(E,{name:"i-lucide-arrow-left-right",class:"size-8 mx-auto mb-2 text-gray-300 dark:text-gray-600"}),c[7]||(c[7]=n("p",null,"Select a baseline run to compare.",-1))]))])):T.value?(s(),a("div",or,[i(E,{name:"i-lucide-git-compare-arrows",class:"size-8 mx-auto mb-2 text-gray-300 dark:text-gray-600"}),c[8]||(c[8]=n("p",null,"Comparison is available after the run finishes.",-1))])):p("",!0)])}}}),ir=Object.assign(lr,{__name:"RunCompare"}),rr={class:"flex flex-col overflow-hidden"},ur={key:0,class:"flex-1 flex items-center justify-center text-gray-500 gap-2"},cr={class:"text-xs font-mono break-all"},dr={key:0,class:"text-gray-400"},mr={key:1,class:"text-red-600 font-medium"},fr=fe({__name:"SlowEndpoints",props:{refreshKey:{}},emits:["endpointsCount"],async setup(t,{emit:y}){let k,R;const d=Oe().params.id,T=t,u=y,{data:h,pending:B,refresh:M}=([k,R]=Ue(()=>Le(`/api/test-runs/${d}/network-requests`,{lazy:!0,server:!1},"$QlrRz6EqI4")),k=await k,R(),k);me(h,I=>{u("endpointsCount",I?.length??0)}),me(()=>T.refreshKey,(I,j)=>{I!==j&&I!==void 0&&M()});const P=[{accessorKey:"method",header:ce("Method")},{accessorKey:"route",header:ce("Route")},{accessorKey:"count",header:ce("Calls")},{accessorKey:"avgDuration",header:ce("Avg")},{accessorKey:"p90Duration",header:ce("P90")},{accessorKey:"maxDuration",header:ce("Max")},{accessorKey:"errorRate",header:ce("Errors")}];return(I,j)=>{const W=ve,L=we,f=Ke,z=ct,_=Ms;return s(),a("div",rr,[e(B)?(s(),a("div",ur,[i(W,{name:"i-lucide-loader-2",class:"size-4 animate-spin"}),j[0]||(j[0]=n("span",null,"Loading network data...",-1))])):e(h)&&e(h).length>0?(s(),b(z,{key:1,sticky:"",data:e(h),columns:P,class:"flex-1 min-h-0",ui:{base:"table-fixed border-separate border-spacing-0 min-w-[44rem]",thead:"[&>tr]:bg-elevated/50 [&>tr]:after:content-none",tbody:"[&>tr]:last:[&>td]:border-b-0 [&>tr]:hover:bg-gray-50 dark:[&>tr]:hover:bg-gray-900/50",th:"first:rounded-l-lg last:rounded-r-lg border-y border-default first:border-l last:border-r",td:"border-b border-default"}},{"method-cell":r(({row:c})=>[i(L,{color:c.original.method==="GET"?"info":c.original.method==="POST"?"success":c.original.method==="PUT"||c.original.method==="PATCH"?"warning":c.original.method==="DELETE"?"error":"neutral",variant:"soft",class:"font-mono text-xs"},{default:r(()=>[w(l(c.original.method),1)]),_:2},1032,["color"])]),"route-cell":r(({row:c})=>[n("code",cr,l(c.original.route),1)]),"avgDuration-cell":r(({row:c})=>[n("span",{class:J(c.original.avgDuration>1e3?"text-red-600 font-medium":c.original.avgDuration>500?"text-orange-500 font-medium":"")},[i(f,{ms:c.original.avgDuration,"unit-class":"opacity-60"},null,8,["ms"])],2)]),"p90Duration-cell":r(({row:c})=>[n("span",{class:J(c.original.p90Duration>2e3?"text-red-600 font-medium":c.original.p90Duration>1e3?"text-orange-500":"")},[i(f,{ms:c.original.p90Duration,"unit-class":"opacity-60"},null,8,["ms"])],2)]),"errorRate-cell":r(({row:c})=>[c.original.errorRate===0?(s(),a("span",dr,"0%")):(s(),a("span",mr,l(c.original.errorRate)+"%",1))]),_:1},8,["data"])):(s(),b(_,{key:2,class:"flex-1",icon:"i-lucide-wifi-off",title:"No network requests captured",text:"Slow endpoints need the Piwi capture fixtures — extend your Playwright test with piwiFixtures and request timing rides along with every run.",doc:"capture-fixtures"}))])}}}),pr=Object.assign(fr,{__name:"SlowEndpoints"}),gr={class:"inline-flex items-center justify-center w-5 h-5 rounded-full bg-blue-500/10 hover:bg-blue-500/20 transition-colors ml-1"},xr={key:0,class:"flex items-center gap-2 mb-3 shrink-0"},bu=fe({__name:"[id]",async setup(t){let y,k;const R=Oe(),C=is(),d=R.params.id,T=!!ot().public.demoMode,{data:u,refresh:h}=([y,k]=Ue(()=>Le(`/api/test-runs/${d}`,"$JCybzNzO0T")),y=await y,k(),y),B=u.value?.projectId,{data:M,refresh:P}=B?([y,k]=Ue(()=>Le(`/api/projects/${B}/latest-run`,{key:`latest-run-${B}`},"$26uPrJhWGK")),y=await y,k(),y):{data:H(null),refresh:async()=>{}};As(P);const I=S(()=>M.value?.id??u.value?.project?.latestRunId??null),j=S(()=>M.value?.status??u.value?.project?.latestRunStatus??null),W=S(()=>j.value==="running"||j.value==="finalizing");rs(S(()=>({title:`Test run #${d}${u.value?.project?` — ${u.value.project.name}`:""} — Piwi Dashboard`})));const L=ht(),f=H(!1),z=H(!1),_=S(()=>u.value?.status==="running"||u.value?.status==="finalizing"),c=H(!1),m=H([]),A=new Map,$=H(null);let E=null;const x=H([]);me([_,u],()=>{_.value&&m.value.length>0?x.value=[...m.value]:u.value?.testCases?x.value=u.value.testCases:x.value=[]},{immediate:!0});function Y(U){for(const G of U){const ue=`${G.title}@@${G.location}@@${JSON.stringify(G.browser)}`;A.has(ue)||(A.set(ue,!0),m.value=[...m.value,G])}x.value=[...m.value]}let Q=[],oe=null;function ee(){if(Q.length===0)return;const U=Q;Q=[];for(const G of U){const ue=G.data;if(G.type==="init")$.value={totalTests:ue.totalTests,passedTests:ue.passedTests,failedTests:ue.failedTests,skippedTests:ue.skippedTests};else if(G.type==="test-begin"){const q=ue;if(q.stepCategory)continue;const ze=`${q.title}@@${q.location}@@${JSON.stringify(q.browser)}`;A.has(ze)||(A.set(ze,!0),m.value=[...m.value,{id:m.value.length+1,title:q.title,filePath:q.filePath,suitePath:q.suitePath??void 0,status:"running",location:q.location,workerIndex:q.workerIndex??null,startedAt:q.startedAt??Date.now(),browser:q.browser??null}],x.value=[...m.value])}else if(G.type==="test-completed"){const q=ue;if(q.stepCategory)continue;const ze=`${q.title}@@${q.location}@@${JSON.stringify(q.browser)}`;if(A.has(ze)){const Be=m.value.findIndex(ye=>`${ye.title}@@${ye.location}@@${JSON.stringify(ye.browser)}`===ze);if(Be>=0){const ye=m.value[Be],Me=[...m.value];Me[Be]={...ye,filePath:q.filePath??ye.filePath,suitePath:q.suitePath??ye.suitePath,status:q.status,duration:q.duration,error:q.error,stepEvents:q.stepEvents??ye.stepEvents,wastedTimeMs:q.wastedTimeMs??ye.wastedTimeMs,workerIndex:q.workerIndex??ye.workerIndex,startedAt:q.startedAt?q.startedAt:ye.startedAt,browser:q.browser??ye.browser},m.value=Me,x.value=[...Me]}}else A.set(ze,!0),m.value=[...m.value,{id:m.value.length+1,title:q.title,filePath:q.filePath,suitePath:q.suitePath??void 0,status:q.status,duration:q.duration,location:q.location,error:q.error,stepEvents:q.stepEvents??null,wastedTimeMs:q.wastedTimeMs??null,workerIndex:q.workerIndex??null,startedAt:q.startedAt??void 0,browser:q.browser??null}],x.value=[...m.value]}else G.type==="run-progress"?$.value=ue:G.type==="run-finalizing"?(c.value=!0,$.value=ue):G.type==="run-finished"&&(c.value=!1,o(),h(),_e.value++,le())}}function le(U=0){T||U>=5||setTimeout(async()=>{await h(),le(U+1)},1500*(U+1))}function K(U){Q.push(U),oe&&clearTimeout(oe),oe=setTimeout(ee,200)}let N=null;function he(){N||(u.value?.testCases?.length&&Y(u.value.testCases),N=Us(U=>{U.scope==="run"&&U.runId===Number(d)?K(U.event):U.scope==="global"&&U.event.runId===Number(d)&&U.event.type==="run-started"&&h()}))}function D(){if(T){he();return}E||_.value&&(u.value?.testCases?.length&&Y(u.value.testCases),E=new EventSource(`/api/test-runs/${d}/stream`),E.onmessage=U=>{try{K(JSON.parse(U.data))}catch{}},E.onerror=()=>{})}function o(){E&&(E.close(),E=null),N&&(N(),N=null)}const F=S(()=>_.value||T&&u.value?.status==="initialising");me(F,U=>{U?D():o()},{immediate:!0}),vt(()=>{o()});let V=null;const re=H([]);me(x,U=>{V===null&&(V=requestAnimationFrame(()=>{re.value=U,V=null}))},{immediate:!0});const Z=S(()=>_.value&&$.value?$.value:u.value?{totalTests:u.value.totalTests,passedTests:u.value.passedTests,failedTests:u.value.failedTests,skippedTests:u.value.skippedTests}:null);async function v(){f.value=!1,z.value=!0;try{await $fetch(`/api/test-runs/${d}`,{method:"DELETE"}),L.add({title:"Test run deleted",color:"success"}),await Ge(`/projects/${u.value?.project?.id}`)}catch(U){const G=U&&typeof U=="object"&&"data"in U?U.data?.message:void 0;L.add({title:"Delete failed",description:G||"An error occurred",color:"error"})}finally{z.value=!1}}const X=H(!1),ne=H(""),te=H([]),xe=H("all"),be=S(()=>te.value.length===1?te.value[0]:"all");function se(U){te.value=!U||U==="all"?[]:[U]}const Te=S(()=>u.value?.reports||[]),Re=S(()=>{const U=x.value;return U?U.reduce((G,ue)=>G+(ue.wastedTimeMs??0),0):0}),pe=H("test-cases"),ge=H(null),_e=H(0),Se=H(0);function g(){ge.value=null}const $e=S(()=>u.value&&u.value.failedTests>0),Ne=S(()=>{if(!u.value?.testCases)return 0;const U=new Set;for(const G of u.value.testCases)G.failureClusterId!=null&&U.add(G.failureClusterId);return U.size}),ae=S(()=>{const U=_.value?x.value:u.value?.testCases;if(!U||U.length===0)return 0;const G=new Set;for(const ue of U)ue.workerIndex!=null&&ue.workerIndex>=0&&G.add(ue.workerIndex);return G.size}),Je=S(()=>[{label:`Test cases (${x.value.length})`,icon:"i-lucide-beaker",value:"test-cases",slot:"test-cases"},{label:"Insights",icon:"i-lucide-sparkles",value:"insights",slot:"insights"},{label:$e.value?`Failure groups (${Ne.value})`:"Failure groups",icon:"i-lucide-layers",value:"failure-groups",slot:"failure-groups",disabled:!$e.value},{label:"Regression",icon:"i-lucide-git-pull-request-arrow",value:"regression",slot:"regression",disabled:!$e.value},{label:`Timeline${ae.value>0?` (${ae.value})`:""}`,icon:"i-lucide-timeline",value:"workers",slot:"workers"},{label:"Compare",icon:"i-lucide-git-compare-arrows",value:"compare",slot:"compare"},{label:`Slow endpoints${Se.value>0?` (${Se.value})`:""}`,icon:"i-lucide-network",value:"endpoints",slot:"endpoints"}]),At={"test-cases":"overflow-hidden flex flex-col",endpoints:"overflow-hidden flex flex-col"},dt=S(()=>Je.value.filter(U=>!U.disabled).map(U=>U.value));typeof R.query.tab=="string"&&dt.value.includes(R.query.tab)&&(pe.value=R.query.tab),me(dt,U=>{U.includes(pe.value)||(pe.value="test-cases")}),me(pe,U=>{R.query.tab!==U&&C.replace({query:{...R.query,tab:U}})});const mt=H(null);function Ut(U){pe.value="test-cases",De(()=>{mt.value?.scrollToCase(U)})}function Lt(U){ge.value=U,pe.value="test-cases"}return(U,G)=>{const ue=ts,q=Ee,ze=ve,Be=kt,ye=us,Me=cs,Et=ms,Ot=Yn,Kt=we,Ze=Ce,Wt=Ga,Ht=Ho,Vt=gl,Gt=Wl,Xt=Li,qt=ir,Yt=pr,Jt=ys,Zt=ds,Qt=Dt,es=lt;return s(),a(O,null,[i(Zt,{id:"test-run-detail"},{header:r(()=>[i(Et,null,{leading:r(()=>[i(ue),i(ye,{items:[{label:"Home",icon:"i-lucide-house",to:"/"},{label:"Projects",to:"/projects"},...e(u)?.project?.id?[{label:e(u).project.label||e(u).project.name||"Project",to:`/projects/${e(u).project.id}`,slot:"project"}]:[{label:"Project"}],{label:`Run #${e(d)}`+(e(u)?.label?` — ${e(u).label}`:"")}]},{project:r(({item:de})=>[i(q,{to:de?.to,class:"text-sm font-medium text-[var(--ui-text-muted)] hover:text-[var(--ui-text)] transition-colors"},{default:r(()=>[w(l(de?.label),1)]),_:2},1032,["to"]),I.value&&I.value!==Number(e(d))?(s(),b(Be,{key:0,text:W.value?"Go to running run":"Go to latest run"},{default:r(()=>[i(q,{to:`/test-runs/${I.value}`},{default:r(()=>[n("span",gr,[i(ze,{name:"i-lucide-circle-play",class:J(["w-3.5 h-3.5 text-blue-500",{"animate-pulse":W.value}])},null,8,["class"])])]),_:1},8,["to"])]),_:1},8,["text"])):p("",!0)]),_:1},8,["items"])]),right:r(()=>[i(Me,{actions:[{label:"Refresh",icon:"i-lucide-refresh-cw",onClick:()=>e(h)()},{label:"Delete",icon:"i-lucide-trash-2",color:"error",variant:"soft",loading:e(z),onClick:()=>f.value=!0}]},null,8,["actions"])]),_:1})]),body:r(()=>[i(Jt,{modelValue:e(pe),"onUpdate:modelValue":G[5]||(G[5]=de=>Fe(pe)?pe.value=de:null),"tab-items":Je.value,"tab-panel-class":At},{summary:r(()=>[e(u)?(s(),b(Ot,{key:0,"test-run":e(u),"display-progress":Z.value,"all-reports":Te.value,"show-custom-data":e(X),finalizing:e(c),"active-filter":be.value,"total-wasted-time":Re.value,"onUpdate:showCustomData":G[0]||(G[0]=de=>X.value=de),onFilterStatus:se,onLabelUpdated:e(h)},null,8,["test-run","display-progress","all-reports","show-custom-data","finalizing","active-filter","total-wasted-time","onLabelUpdated"])):p("",!0)]),"tab-test-cases":r(()=>[e(ge)!=null?(s(),a("div",xr,[i(Kt,{color:"info",variant:"subtle",size:"sm"},{default:r(()=>[...G[8]||(G[8]=[w(" Filtered by failure group ",-1)])]),_:1}),i(Ze,{size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-x",label:"Clear filter",onClick:g})])):p("",!0),i(Wt,{ref_key:"testCasesListRef",ref:mt,search:e(ne),"onUpdate:search":G[1]||(G[1]=de=>Fe(ne)?ne.value=de:null),"active-statuses":e(te),"onUpdate:activeStatuses":G[2]||(G[2]=de=>Fe(te)?te.value=de:null),"browser-filter":e(xe),"onUpdate:browserFilter":G[3]||(G[3]=de=>Fe(xe)?xe.value=de:null),"test-cases":e(x),suites:e(u)?.suites??[],"is-live":_.value,"failure-cluster-filter":e(ge),"project-key":e(u)?.projectId,"project-name":e(u)?.project?.name,class:"flex-1 min-h-0"},null,8,["search","active-statuses","browser-filter","test-cases","suites","is-live","failure-cluster-filter","project-key","project-name"])]),"tab-insights":r(()=>[i(Ht,{"test-run-id":Number(e(d)),"run-status":e(u)?.status??"","refresh-key":e(_e),class:"flex-1 min-h-0 p-4"},null,8,["test-run-id","run-status","refresh-key"])]),"tab-failure-groups":r(()=>[i(Vt,{"refresh-key":e(_e),onSelectCluster:Lt},null,8,["refresh-key"])]),"tab-regression":r(()=>[i(Gt,{"refresh-key":e(_e)},null,8,["refresh-key"])]),"tab-workers":r(()=>[i(Xt,{"test-cases":e(re),"setup-steps":e(u)?.setupSteps??null,"shard-total":e(u)?.shardTotal??null,live:_.value,"wasted-patterns":e(u)?.wastedWaitPatterns??null,onSelectTestCase:Ut},null,8,["test-cases","setup-steps","shard-total","live","wasted-patterns"])]),"tab-compare":r(()=>[i(qt,{"test-run":e(u)},null,8,["test-run"])]),"tab-endpoints":r(()=>[i(Yt,{"refresh-key":e(_e),class:"flex-1 min-h-0",onEndpointsCount:G[4]||(G[4]=de=>Se.value=de)},null,8,["refresh-key"])]),_:1},8,["modelValue","tab-items"])]),_:1}),i(es,null,{default:r(()=>[i(Qt,{open:e(f),title:"Delete test run","onUpdate:open":G[7]||(G[7]=de=>f.value=de)},{body:r(()=>[n("p",null,[G[9]||(G[9]=w(" Are you sure you want to delete ",-1)),n("strong",null,"Test Run #"+l(e(u)?.id),1),G[10]||(G[10]=w("? This will also remove all associated test results, reports, and traces. This action cannot be undone. ",-1))])]),footer:r(()=>[i(Ze,{color:"neutral",variant:"ghost",label:"Cancel",onClick:G[6]||(G[6]=de=>f.value=!1)}),i(Ze,{color:"error",label:"Delete",icon:"i-lucide-trash-2",loading:e(z),onClick:v},null,8,["loading"])]),_:1},8,["open"])]),_:1})],64)}}});export{bu as default};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{_ as Le}from"./C9p0YCAi.js";import{_ as Pe}from"./BTvE9qca.js";import{_ as _e,a as De,b as Oe,c as He,d as qe,e as Ke,f as Ge,g as ke,u as We,h as Je,i as Qe,j as Ze,k as Xe,l as Ye,m as et}from"./Bb7Uckln.js";import{d as ee,o as s,f as S,g as p,i as t,j as r,c as l,t as o,v as d,s as ce,k as e,m as b,p as te,G as be,F as B,y as Z,_ as ie,h as D,H as tt,q as Y,I as st,r as x,J as ae,B as nt,l as Q,E as $e,K as at,L as ot,C as fe,M as lt,b as rt,u as it,w as ct,e as ut,N as dt}from"./h49q_GXF.js";import{_ as Ce}from"./CRPt9SfB.js";import{_ as mt,a as ft}from"./B_mN5eMV.js";import{_ as ge}from"./BtSJxOdh.js";import{_ as pt}from"./C0v6l4pr.js";import{_ as gt}from"./DLNNAYfu.js";import{_ as we}from"./CScusXhF.js";import{_ as xt,a as vt,i as ht,b as yt,s as ve,c as _t}from"./DBhdObsO.js";import{c as he,f as re,a as kt,b as bt,d as $t,g as Se,s as pe,e as de,r as ye,h as Ct}from"./CD3R-ggS.js";import{_ as xe}from"./PdEEuEsg.js";import{_ as wt}from"./CDh_Qt7h.js";import{_ as St}from"./BH-ym1CI.js";import{_ as Tt}from"./DHUT-BKj.js";import{_ as It}from"./CWw9WGlv.js";import{_ as Te}from"./jjOqY9Tv.js";import{u as jt,p as Rt,_ as zt}from"./6-ivqM_I.js";import{b as Ut}from"./BZnfiR67.js";import{a as Et,u as Vt}from"./Cd8r0xk5.js";import"./BhH0TNTi.js";import"./DOLeth7M.js";import"./BDQCwxpX.js";import"./BaDhDBCV.js";import"./9N6hSApy.js";import"./Dj-TetcW.js";import"./D-c8ZSws.js";import"./CWoSSKhQ.js";import"./BjaRappk.js";import"./Hot1UcKY.js";import"./xbO0VmDX.js";import"./BNAHBHbY.js";import"./B6s20NbT.js";import"./Cf52zHyB.js";import"./t-juTK3X.js";const At={class:"flex items-center gap-3 flex-1 min-w-0 justify-between"},Mt={class:"flex items-center gap-3 min-w-0"},Nt={class:"font-mono text-sm truncate text-gray-600 dark:text-gray-400 min-w-0"},Ft={class:"flex items-center gap-3 shrink-0 max-sm:hidden"},Bt={class:"text-xs text-gray-500 tabular-nums whitespace-nowrap"},Lt={class:"text-xs text-gray-500 tabular-nums whitespace-nowrap"},Pt={key:1,class:"text-xs text-gray-400 whitespace-nowrap"},Dt={class:"grid grid-cols-1 lg:grid-cols-12 gap-4"},Ot={class:"lg:col-span-9"},Ht={class:"space-y-3"},qt={key:0,class:"text-sm font-medium break-words text-gray-500 dark:text-gray-400"},Kt={class:"flex flex-wrap gap-2"},Gt={class:"text-sm text-gray-500"},Wt={key:1,class:"rounded-md border border-default p-3 space-y-1.5"},Jt={class:"flex items-center gap-2 flex-wrap"},Qt={key:0,class:"text-xs text-gray-500"},Zt={class:"text-xs text-gray-500"},Xt={class:"text-sm text-gray-500"},Yt={class:"font-mono text-xs"},es={class:"flex items-start gap-3"},ts={class:"flex flex-col gap-1 shrink-0"},ss={class:"flex-1 min-w-0 space-y-1.5"},ns={class:"flex justify-end"},as=ee({__name:"ClusterSummary",props:{cluster:{},triageStatus:{},triageNote:{},triageSaving:{type:Boolean},triageChanged:{type:Boolean}},emits:["update:triageStatus","update:triageNote","save-triage"],setup(a,{emit:j}){const f=a,$=j,m=D(()=>$t(f.cluster.fixVerification)),C=[{label:"Open",value:"open",color:"warning"},{label:"Resolved",value:"resolved",color:"success"},{label:"Ignored",value:"ignored",color:"neutral"}];return(n,u)=>{const y=ce,U=te,E=ge,R=be,T=pt,h=gt,I=ie,v=we,A=xt;return s(),S(A,{"storage-key":"failure-cluster"},{folded:p(()=>[t("div",At,[t("div",Mt,[r(y,{color:("clusterStatusColor"in n?n.clusterStatusColor:e(bt))(a.cluster.status),variant:"solid",size:"sm",class:"shrink-0 capitalize"},{default:p(()=>[b(o(a.cluster.status),1)]),_:1},8,["color"]),t("span",Nt,o(a.cluster.signature),1),a.cluster.errorType?(s(),S(y,{key:0,color:("clusterErrorTypeColor"in n?n.clusterErrorTypeColor:e(he))(a.cluster.errorType),variant:"subtle",size:"sm"},{default:p(()=>[b(o(a.cluster.errorType),1)]),_:1},8,["color"])):d("",!0),e(m)?(s(),S(y,{key:1,color:e(m).color,variant:"subtle",size:"sm",class:"gap-1 shrink-0"},{default:p(()=>[r(U,{name:e(m).icon,class:"size-3"},null,8,["name"]),b(" "+o(e(m).label),1)]),_:1},8,["color"])):d("",!0)]),t("div",Ft,[t("span",Bt,o(a.cluster.occurrences)+" occurrence"+o(a.cluster.occurrences===1?"":"s"),1),t("span",Lt,o(a.cluster.affectedTests)+" "+o(a.cluster.affectedTests===1?"test":"tests"),1),a.cluster.diagnosis?.status==="completed"&&a.cluster.diagnosis?.category?(s(),S(y,{key:0,color:"neutral",variant:"outline",size:"sm",class:"gap-1 whitespace-nowrap"},{default:p(()=>[r(U,{name:"i-lucide-sparkles",class:"size-3"}),b(" "+o(a.cluster.diagnosis.category),1)]),_:1})):d("",!0),a.cluster.lastSeenAt?(s(),l("span",Pt," last seen "+o(("formatRelativeTime"in n?n.formatRelativeTime:e(re))(a.cluster.lastSeenAt)),1)):d("",!0)])])]),default:p(()=>[t("div",Dt,[t("div",Ot,[r(h,{title:a.cluster.signature},{default:p(()=>[t("div",Ht,[a.cluster.title?(s(),l("p",qt,o(a.cluster.title),1)):d("",!0),t("div",Kt,[a.cluster.errorType?(s(),S(y,{key:0,color:("clusterErrorTypeColor"in n?n.clusterErrorTypeColor:e(he))(a.cluster.errorType),variant:"subtle"},{default:p(()=>[b(o(a.cluster.errorType),1)]),_:1},8,["color"])):d("",!0),r(y,{color:"neutral",variant:"subtle"},{default:p(()=>[b(o(a.cluster.occurrences)+" occurrence"+o(a.cluster.occurrences===1?"":"s"),1)]),_:1}),r(y,{color:"neutral",variant:"subtle"},{default:p(()=>[b(o(a.cluster.affectedTests)+" "+o(a.cluster.affectedTests===1?"test":"tests")+" affected ",1)]),_:1}),a.cluster.diagnosis?.status==="completed"&&a.cluster.diagnosis?.category?(s(),S(y,{key:1,color:"neutral",variant:"outline",class:"gap-1"},{default:p(()=>[r(U,{name:"i-lucide-sparkles",class:"size-3"}),b(" "+o(a.cluster.diagnosis.category),1)]),_:1})):d("",!0),r(E,{topic:"cluster.concept"})]),t("p",Gt,[u[2]||(u[2]=b(" First seen in ",-1)),r(R,{to:`/test-runs/${a.cluster.firstSeenRunId}`,class:"text-primary hover:underline"},{default:p(()=>[b(" run #"+o(a.cluster.firstSeenRunId),1)]),_:1},8,["to"]),a.cluster.firstSeenAt?(s(),l(B,{key:0},[b(" ("+o(("formatRelativeTime"in n?n.formatRelativeTime:e(re))(a.cluster.firstSeenAt))+") ",1)],64)):d("",!0),u[3]||(u[3]=b(" · Last seen in ",-1)),r(R,{to:`/test-runs/${a.cluster.lastSeenRunId}`,class:"text-primary hover:underline"},{default:p(()=>[b(" run #"+o(a.cluster.lastSeenRunId),1)]),_:1},8,["to"]),a.cluster.lastSeenAt?(s(),l(B,{key:1},[b(" ("+o(("formatRelativeTime"in n?n.formatRelativeTime:e(re))(a.cluster.lastSeenAt))+") ",1)],64)):d("",!0),a.cluster.lastSeenRunStatus?(s(),S(T,{key:2,status:a.cluster.lastSeenRunStatus,size:"sm",class:"ml-1 align-middle"},null,8,["status"])):d("",!0)]),e(m)?(s(),l("div",Wt,[t("div",Jt,[r(y,{color:e(m).color,variant:"subtle",class:"gap-1"},{default:p(()=>[r(U,{name:e(m).icon,class:"size-3"},null,8,["name"]),b(" "+o(e(m).label),1)]),_:1},8,["color"]),a.cluster.timeToResolutionMs!=null?(s(),l("span",Qt," open for "+o(("formatDuration"in n?n.formatDuration:e(kt))(a.cluster.timeToResolutionMs)),1)):d("",!0),r(E,{topic:"cluster.resolution"})]),t("p",Zt,o(e(m).hint),1),t("p",Xt,[a.cluster.fixLandedRunId?(s(),l(B,{key:0},[u[4]||(u[4]=b(" Fix landed in ",-1)),r(R,{to:`/test-runs/${a.cluster.fixLandedRunId}`,class:"text-primary hover:underline"},{default:p(()=>[b(" run #"+o(a.cluster.fixLandedRunId),1)]),_:1},8,["to"])],64)):d("",!0),a.cluster.fixLandedAt?(s(),l(B,{key:1},[b(" ("+o(("formatRelativeTime"in n?n.formatRelativeTime:e(re))(a.cluster.fixLandedAt))+")",1)],64)):d("",!0),a.cluster.fixCommit?(s(),l(B,{key:2},[u[5]||(u[5]=b(" · commit ",-1)),t("code",Yt,o(a.cluster.fixCommit.slice(0,8)),1)],64)):d("",!0)])])):d("",!0)])]),_:1},8,["title"])]),r(h,{class:"lg:col-span-3",icon:"i-lucide-triangle-alert","icon-class":"text-amber-500",title:"Triage",help:"cluster.triage"},{default:p(()=>[t("div",es,[t("div",ts,[(s(),l(B,null,Z(C,M=>r(I,{key:M.value,size:"xs",class:"justify-start",color:a.triageStatus===M.value?M.color:"neutral",variant:a.triageStatus===M.value?"solid":"outline",onClick:O=>$("update:triageStatus",M.value)},{default:p(()=>[b(o(M.label),1)]),_:2},1032,["color","variant","onClick"])),64))]),t("div",ss,[r(v,{"model-value":a.triageNote,placeholder:"Optional note…",rows:3,class:"text-sm w-full","onUpdate:modelValue":u[0]||(u[0]=M=>$("update:triageNote",M))},null,8,["model-value"]),t("div",ns,[a.triageChanged?(s(),S(I,{key:0,size:"xs",icon:"i-lucide-check",loading:a.triageSaving,onClick:u[1]||(u[1]=M=>$("save-triage"))},{default:p(()=>[...u[6]||(u[6]=[b(" Save ",-1)])]),_:1},8,["loading"])):d("",!0)])])])]),_:1})])]),_:1})}}}),os=Object.assign(as,{__name:"ClusterSummary"}),ls={class:"divide-y divide-default"},rs={class:"text-xs font-mono text-gray-700 dark:text-gray-300 break-all whitespace-pre-wrap"},is={class:"text-xs font-mono text-gray-600 dark:text-gray-400 truncate"},cs=ee({__name:"TestEvidenceSignals",props:st({consoleLogs:{},networkRequests:{}},{open:{type:Boolean,default:!1},openModifiers:{}}),emits:["update:open"],setup(a){const j=a,f=D(()=>Array.isArray(j.consoleLogs)?j.consoleLogs.filter(u=>u.type==="error"||u.type==="warning"):[]),$=D(()=>Array.isArray(j.networkRequests)?j.networkRequests.filter(u=>u.status&&u.status>=400):[]),m=D(()=>f.value.length>0||$.value.length>0),C=D(()=>{const u=[];return f.value.length&&u.push(`${f.value.length} console`),$.value.length&&u.push(`${$.value.length} network`),u.join(", ")}),n=tt(a,"open");return(u,y)=>{const U=te,E=ce,R=_e;return e(m)?(s(),S(R,{key:0,icon:"i-lucide-triangle-alert",label:`Signals (${e(C)})`,open:n.value,"onUpdate:open":y[0]||(y[0]=T=>n.value=T)},{default:p(()=>[t("div",ls,[e(f).length>0?(s(),l(B,{key:0},[y[1]||(y[1]=t("div",{class:"px-3 py-1 bg-gray-50 dark:bg-gray-800/40"},[t("p",{class:"text-[10px] font-semibold text-gray-400 uppercase tracking-wide"},"Console")],-1)),(s(!0),l(B,null,Z(e(f),(T,h)=>(s(),l("div",{key:"log-"+h,class:"px-3 py-1.5 flex items-start gap-2"},[r(U,{name:T.type==="error"?"i-lucide-x-circle":"i-lucide-alert-triangle",class:Y(["size-3.5 mt-0.5 shrink-0",T.type==="error"?"text-red-500":"text-yellow-500"])},null,8,["name","class"]),t("p",rs,o(T.text),1)]))),128))],64)):d("",!0),e($).length>0?(s(),l(B,{key:1},[y[2]||(y[2]=t("div",{class:"px-3 py-1 bg-gray-50 dark:bg-gray-800/40"},[t("p",{class:"text-[10px] font-semibold text-gray-400 uppercase tracking-wide"},"Network")],-1)),(s(!0),l(B,null,Z(e($),(T,h)=>(s(),l("div",{key:"req-"+h,class:"px-3 py-1.5 flex items-center gap-2"},[r(E,{color:T.status>=500?"error":"warning",variant:"subtle",size:"sm",class:"shrink-0 font-mono"},{default:p(()=>[b(o(T.status),1)]),_:2},1032,["color"]),t("p",is,o(T.url),1)]))),128))],64)):d("",!0)])]),_:1},8,["label","open"])):d("",!0)}}}),us=Object.assign(cs,{__name:"TestEvidenceSignals"}),ds={class:"space-y-3"},ms={key:0,class:"flex gap-0 border-b border-default overflow-x-auto"},fs=["title","onClick"],ps={key:0,class:"opacity-60 ml-1"},gs={key:1,class:"flex items-start justify-between gap-2 flex-wrap"},xs={class:"min-w-0"},vs={class:"text-sm font-medium break-words"},hs={key:2,class:"flex items-center justify-center py-10"},ys={key:0,class:"flex flex-wrap gap-1.5"},_s={class:"divide-y divide-default"},ks={class:"text-xs font-medium text-gray-700 dark:text-gray-300"},bs={key:0,class:"text-xs font-mono text-red-500 whitespace-pre-wrap break-all"},$s={class:"overflow-x-auto max-h-72"},Cs={class:"max-h-64 overflow-auto"},ws=ee({__name:"ClusterTestEvidence",props:{affectedTestCases:{},projectKey:{},projectName:{}},setup(a){const j=a,f=x(j.affectedTestCases[0]?.recentTestRunsCaseId??null),$=D(()=>j.affectedTestCases.find(i=>i.recentTestRunsCaseId===f.value)),m=x(null),C=x([]),n=x(!1),u=x(!1),y=x(!1),U=x(!1),E=x(!1),R=x(!1),T=x(!1),h=new Map;function I(){y.value=!1,U.value=!1,E.value=!1,R.value=!1,T.value=!1}async function v(i){I();const w=h.get(i);if(w){m.value=w.detail,C.value=w.traces,n.value=!1,u.value=!1;return}n.value=!0,u.value=!0,m.value=null,C.value=[];const[P,q]=await Promise.allSettled([$fetch(`/api/test-run-cases/${i}`),$fetch(`/api/test-run-cases/${i}/traces`)]);P.status==="fulfilled"&&(m.value=P.value),n.value=!1,q.status==="fulfilled"&&(C.value=q.value),u.value=!1,P.status==="fulfilled"&&q.status==="fulfilled"&&h.set(i,{detail:P.value,traces:q.value})}const A=new Map,M=x(null),O=x("trace"),N=D(()=>M.value?.frames??[]);async function H(i){if(M.value=A.get(i)??null,A.has(i)||C.value.length===0)return;const w=m.value?.testRun?.id;if(w)try{const P=await $fetch(`/api/test-runs/${w}/cases/${i}/trace-stacks`),q=P.status==="ok"&&P.frames?.length?P:null;A.set(i,q),f.value===i&&(M.value=q)}catch{A.set(i,null)}}ae([m,C],()=>{O.value="trace",f.value&&H(f.value)}),ae(f,i=>{i&&v(i)}),nt(()=>{f.value&&v(f.value)});const V=D(()=>{const i=m.value?.steps;return Array.isArray(i)?i.filter(w=>w.error):[]}),L=D(()=>m.value?.testSource?m.value.testSource.split(`
|
|
2
|
-
`).length:0),z=D(()=>{const i=m.value;if(!i)return[];const w=i.attachments.filter(_=>ht(_.path,_.contentType)).length,P=i.attachments.filter(_=>yt(_.path,_.contentType)).length,q=Array.isArray(i.consoleLogs)?i.consoleLogs.filter(_=>_.type==="error"||_.type==="warning").length:0,X=Array.isArray(i.networkRequests)?i.networkRequests.filter(_=>(_.status??0)>=400).length:0;return[{icon:"i-lucide-image",label:"screenshots",count:w},{icon:"i-lucide-video",label:"videos",count:P},{icon:"i-lucide-bug-play",label:"traces",count:C.value.length},{icon:"i-lucide-list-checks",label:"failing steps",count:V.value.length},{icon:"i-lucide-triangle-alert",label:"signals",count:q+X},{icon:"i-lucide-code",label:"source",count:i.testSourceFrames?.length||(i.testSource?1:0)},{icon:"i-lucide-accessibility",label:"ARIA",count:i.ariaSnapshot?1:0}].filter(_=>_.count>0)});return(i,w)=>{const P=xe,q=ie,X=te,_=ce,c=De,k=Oe,F=He,K=_e,G=us,W=wt,J=qe,se=Ke,ne=vt,ue=Ge;return s(),l("div",ds,[a.affectedTestCases.length>1?(s(),l("div",ms,[(s(!0),l(B,null,Z(a.affectedTestCases,g=>(s(),l("button",{key:g.recentTestRunsCaseId,class:Y(["px-3 py-1.5 text-xs whitespace-nowrap border-b-2 -mb-px transition-colors",e(f)===g.recentTestRunsCaseId?"border-primary text-primary font-medium":"border-transparent text-gray-500 hover:text-gray-700 dark:hover:text-gray-300"]),title:g.title,onClick:oe=>f.value=g.recentTestRunsCaseId},[b(o(g.title.split(" › ").pop())+" ",1),g.runCount>1?(s(),l("span",ps,o(g.runCount)+"×",1)):d("",!0)],10,fs))),128))])):d("",!0),e($)?(s(),l("div",gs,[t("div",xs,[t("p",vs,o(e($).title),1),r(P,{"file-path":e($).filePath,"project-key":a.projectKey,"project-name":a.projectName,class:"text-xs text-gray-400"},null,8,["file-path","project-key","project-name"])]),r(q,{to:`/test-run-cases/${e($).recentTestRunsCaseId}`,size:"xs",variant:"outline",color:"neutral","trailing-icon":"i-lucide-arrow-right"},{default:p(()=>[...w[6]||(w[6]=[b(" Open execution ",-1)])]),_:1},8,["to"])])):d("",!0),e(n)?(s(),l("div",hs,[r(X,{name:"i-lucide-loader-circle",class:"size-5 animate-spin text-gray-400"})])):e(m)?(s(),l(B,{key:3},[e(z).length?(s(),l("div",ys,[(s(!0),l(B,null,Z(e(z),g=>(s(),S(_,{key:g.label,color:"neutral",variant:"subtle",size:"sm",class:"gap-1"},{default:p(()=>[r(X,{name:g.icon,class:"size-3"},null,8,["name"]),b(" "+o(g.count)+" "+o(g.label),1)]),_:2},1024))),128))])):d("",!0),r(c,{attachments:e(m).attachments},null,8,["attachments"]),r(k,{attachments:e(m).attachments},null,8,["attachments"]),r(F,{traces:e(C),loading:e(u)},null,8,["traces","loading"]),e(V).length>0?(s(),S(K,{key:1,icon:"i-lucide-list-checks",label:"Failing steps",count:e(V).length,open:e(y),"onUpdate:open":w[0]||(w[0]=g=>Q(y)?y.value=g:null)},{default:p(()=>[t("div",_s,[(s(!0),l(B,null,Z(e(V),(g,oe)=>(s(),l("div",{key:oe,class:"px-3 py-2 space-y-0.5"},[t("p",ks,o(oe+1)+". "+o(g.title),1),g.error?.message?(s(),l("p",bs,o(g.error.message),1)):d("",!0)]))),128))])]),_:1},8,["count","open"])):d("",!0),r(G,{"console-logs":e(m).consoleLogs,"network-requests":e(m).networkRequests,open:e(U),"onUpdate:open":w[1]||(w[1]=g=>Q(U)?U.value=g:null)},null,8,["console-logs","network-requests","open"]),e(m).testSourceFrames?.length||e(m).testSource||e(N).length?(s(),S(K,{key:2,icon:"i-lucide-code",label:"Test source",count:e(N).length||e(m).testSourceFrames?.length||e(L),open:e(E),"onUpdate:open":w[3]||(w[3]=g=>Q(E)?E.value=g:null)},{default:p(()=>[e(N).length&&(e(m).testSourceFrames?.length||e(m).testSource)?(s(),S(W,{key:0,modelValue:e(O),"onUpdate:modelValue":w[2]||(w[2]=g=>Q(O)?O.value=g:null),items:[{label:`Full stack (${e(N).length})`,value:"trace"},{label:`Captured (${e(m).testSourceFrames?.length||1})`,value:"captured"}],size:"xs",variant:"link",class:"mb-1.5",ui:{list:"gap-2",trigger:"px-1.5"}},null,8,["modelValue","items"])):d("",!0),t("div",$s,[e(O)==="trace"&&e(N).length?(s(),S(J,{key:0,frames:e(N),"project-key":a.projectKey,"project-name":a.projectName},null,8,["frames","project-key","project-name"])):e(m).testSourceFrames?.length?(s(),S(se,{key:1,frames:e(m).testSourceFrames,"project-key":a.projectKey,"project-name":a.projectName},null,8,["frames","project-key","project-name"])):e(m).testSource?(s(),S(ne,{key:2,text:"```typescript\n"+e(m).testSource+"\n```"},null,8,["text"])):d("",!0)])]),_:1},8,["count","open"])):d("",!0),e(m).ariaSnapshot?(s(),S(K,{key:3,icon:"i-lucide-accessibility",label:"ARIA snapshot",open:e(R),"onUpdate:open":w[4]||(w[4]=g=>Q(R)?R.value=g:null)},{default:p(()=>[t("div",Cs,[r(ne,{text:"```yaml\n"+e(m).ariaSnapshot+"\n```"},null,8,["text"])])]),_:1},8,["open"])):d("",!0),e(m).pageState?(s(),S(K,{key:4,icon:"i-lucide-database",label:"App state",open:e(T),"onUpdate:open":w[5]||(w[5]=g=>Q(T)?T.value=g:null)},{default:p(()=>[r(ue,{"page-state":e(m).pageState,plain:""},null,8,["page-state"])]),_:1},8,["open"])):d("",!0)],64)):d("",!0)])}}}),Ss=Object.assign(ws,{__name:"ClusterTestEvidence"}),Ts={key:0,class:"flex items-center gap-1.5 overflow-hidden min-w-0"},Is={class:"text-primary shrink-0"},js={class:"text-gray-500 truncate text-xs font-sans"},Rs={key:1,class:"text-primary text-xs"},zs={key:2,class:"text-gray-400 font-sans text-xs"},Us={class:"w-96 p-2 space-y-2"},Es={class:"flex items-center gap-1"},Vs={class:"flex items-center gap-1"},As={key:0,class:"flex items-center gap-2 px-2 py-1.5 text-xs rounded-md bg-primary/5 text-gray-600 dark:text-gray-300"},Ms={class:"font-medium text-green-600 dark:text-green-400"},Ns={class:"font-medium text-red-600 dark:text-red-400"},Fs={class:"text-gray-400"},Bs={key:1,class:"flex items-center justify-center gap-2 py-6 text-gray-400"},Ls={key:2,class:"py-4 text-center text-sm text-red-500"},Ps={key:3,class:"flex items-start gap-2 px-2 py-2 text-xs text-amber-700 dark:text-amber-400 bg-amber-50 dark:bg-amber-900/20 rounded-md"},Ds={key:4,class:"max-h-80 overflow-y-auto space-y-px"},Os={class:"text-xs text-primary"},Hs={key:1,class:"py-4 text-center text-sm text-gray-400"},qs=["onClick"],Ks={class:"text-xs text-primary shrink-0 w-14 pt-px"},Gs={class:"flex-1 min-w-0"},Ws={class:"text-xs font-medium leading-snug truncate"},Js={class:"text-xs text-gray-400 leading-snug truncate"},Qs=ee({__name:"CommitPicker",props:{modelValue:{},clusterId:{}},emits:["update:modelValue"],setup(a,{emit:j}){const f=a,$=j,m=x(!1),C=x(""),n=x([]),u=x(null),y=x(null),U=x(!1),E=x(!1),R=x(null),T=x(null),h=x([]),I=x(!1),v=x(void 0),A=D(()=>{if(!f.modelValue)return null;const z=f.modelValue.trim();return n.value.find(w=>w.sha===z||w.sha.startsWith(z))??{sha:z,shortSha:z.slice(0,7),message:"",author:"",date:""}});async function M(){if(!h.value.length){I.value=!0;try{const z=await $fetch(`/api/failure-clusters/${f.clusterId}/branches`);h.value=z.branches}catch{}finally{I.value=!1}}}async function O(){const z=f.modelValue||"";U.value=!0,E.value=!1,T.value=null;try{const i={};z&&(i.baseline=z),v.value&&(i.branch=v.value);const w=await $fetch(`/api/failure-clusters/${f.clusterId}/commits`,{query:i});n.value=w.commits,y.value=w.aggregate,u.value=w.error??null,T.value=z}catch{E.value=!0}finally{U.value=!1}}ae(v,()=>{n.value=[],T.value=null,O()}),ae(m,async z=>{if(z){await Promise.all([M(),O()]),await ot();const i=R.value?.$el?.querySelector("input")??R.value?.$el;i instanceof HTMLElement&&i.focus()}else C.value=""});const N=D(()=>Se(n.value,C.value)),H=D(()=>{const z=C.value.trim();return!/^[0-9a-f]{7,40}$/i.test(z)||N.value.some(i=>i.sha.startsWith(z.toLowerCase()))?null:z});function V(z){$("update:modelValue",z),m.value=!1}function L(z){z.stopPropagation(),u.value=null,y.value=null,$("update:modelValue",""),m.value=!1}return(z,i)=>{const w=ie,P=te,q=St,X=$e,_=at;return s(),S(_,{open:e(m),"onUpdate:open":i[4]||(i[4]=c=>Q(m)?m.value=c:null)},{content:p(()=>[t("div",Us,[t("div",Es,[r(P,{name:"i-lucide-git-branch",class:"size-3.5 text-gray-400 shrink-0"}),r(q,{modelValue:e(v),"onUpdate:modelValue":i[0]||(i[0]=c=>Q(v)?v.value=c:null),items:e(h),placeholder:"Default branch",size:"xs",class:"flex-1",loading:e(I),disabled:e(I)},null,8,["modelValue","items","loading","disabled"])]),t("div",Vs,[r(X,{ref_key:"searchInputRef",ref:R,modelValue:e(C),"onUpdate:modelValue":i[1]||(i[1]=c=>Q(C)?C.value=c:null),placeholder:"Search message, author, SHA…",size:"xs",icon:"i-lucide-search",class:"flex-1"},null,8,["modelValue"]),a.modelValue?(s(),S(w,{key:0,size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-x",title:"Clear baseline",onClick:i[2]||(i[2]=c=>L(c))})):d("",!0)]),e(y)&&a.modelValue&&!e(U)?(s(),l("div",As,[r(P,{name:"i-lucide-git-compare-arrows",class:"size-3.5 shrink-0 text-primary"}),i[5]||(i[5]=t("span",null,"Since baseline:",-1)),t("span",Ms,"+"+o(e(y).linesAdded),1),t("span",Ns,"-"+o(e(y).linesRemoved),1),t("span",Fs,"across "+o(e(y).filesChanged)+" file"+o(e(y).filesChanged===1?"":"s"),1)])):d("",!0),e(U)?(s(),l("div",Bs,[r(P,{name:"i-lucide-loader-2",class:"size-4 animate-spin"}),i[6]||(i[6]=t("span",{class:"text-sm"},"Loading commits…",-1))])):e(E)?(s(),l("div",Ls," Failed to load commits — check your SCM token in Settings → AI ")):e(u)&&!e(U)&&e(n).length===0?(s(),l("div",Ps,[r(P,{name:"i-lucide-triangle-alert",class:"size-3.5 shrink-0 mt-0.5"}),t("span",null,o(e(u)),1)])):(s(),l("div",Ds,[e(H)?(s(),l("button",{key:0,class:"w-full text-left px-2 py-1.5 rounded flex items-center gap-2 hover:bg-elevated transition-colors border border-dashed border-default",onClick:i[3]||(i[3]=c=>V(e(H)))},[r(P,{name:"i-lucide-git-commit-horizontal",class:"size-3.5 text-gray-400 shrink-0"}),i[7]||(i[7]=t("span",{class:"text-xs text-gray-500"},"Use commit",-1)),t("code",Os,o(e(H).slice(0,7)),1)])):d("",!0),e(N).length===0&&!e(H)?(s(),l("div",Hs,o(e(C)?"No commits match":"No commits available"),1)):d("",!0),(s(!0),l(B,null,Z(e(N),c=>(s(),l("button",{key:c.sha,class:Y(["w-full text-left px-2 py-1.5 rounded flex items-start gap-2 hover:bg-elevated transition-colors",a.modelValue===c.sha?"bg-primary/10 ring-1 ring-inset ring-primary/30":""]),onClick:k=>V(c.sha)},[t("code",Ks,o(c.shortSha),1),t("div",Gs,[t("p",Ws,o(c.message),1),t("p",Js,[b(o(c.author),1),c.date?(s(),l(B,{key:0},[b(" · "+o(e(re)(c.date)),1)],64)):d("",!0)])]),a.modelValue===c.sha?(s(),S(P,{key:0,name:"i-lucide-check",class:"size-3.5 text-primary shrink-0 mt-0.5"})):d("",!0)],10,qs))),128))]))])]),default:p(()=>[r(w,{size:"xs",color:"neutral",variant:"outline",icon:a.modelValue?"i-lucide-git-branch-plus":"i-lucide-git-branch","trailing-icon":"i-lucide-chevron-down",class:"min-w-36 max-w-48 font-mono"},{default:p(()=>[e(A)?.message?(s(),l("span",Ts,[t("code",Is,o(e(A).shortSha),1),t("span",js,o(e(A).message),1)])):a.modelValue?(s(),l("span",Rs,o(a.modelValue.slice(0,7))+"…",1)):(s(),l("span",zs,"baseline commit…"))]),_:1},8,["icon"])]),_:1},8,["open"])}}}),Zs=Object.assign(Qs,{__name:"CommitPicker"}),Xs={class:"space-y-3"},Ys={key:0,class:"space-y-1"},en={class:"text-xs font-semibold text-gray-500 uppercase tracking-wide px-1"},tn={class:"rounded-md border border-default overflow-hidden divide-y divide-default"},sn={class:"text-xs text-gray-400 shrink-0"},nn={class:"text-xs text-gray-700 dark:text-gray-300 truncate"},an={class:"space-y-1"},on={class:"text-xs font-semibold text-gray-500 uppercase tracking-wide px-1"},ln={key:0,class:"text-yellow-500 font-normal normal-case"},rn={class:"rounded-md border border-default overflow-hidden divide-y divide-default"},cn=["onClick"],un={class:"text-xs font-mono flex-1 truncate text-gray-700 dark:text-gray-300"},dn={class:"text-xs text-gray-400 shrink-0 tabular-nums"},mn={key:0,class:"text-green-500"},fn={key:1,class:"text-gray-300 mx-0.5"},pn={key:2,class:"text-red-500"},gn={key:0,class:"border-t border-default overflow-x-auto max-h-96"},xn=ee({__name:"ScmChangesView",props:{changes:{}},setup(a){const j=x(new Set);function f($){const m=new Set(j.value);m.has($)?m.delete($):m.add($),j.value=m}return($,m)=>{const C=te,n=ke;return s(),l("div",Xs,[a.changes.commits.length>0?(s(),l("div",Ys,[t("p",en,o(a.changes.commits.length)+" commit"+o(a.changes.commits.length===1?"":"s"),1),t("div",tn,[(s(!0),l(B,null,Z(a.changes.commits,u=>(s(),l("div",{key:u.sha,class:"flex items-center gap-2 px-3 py-1.5"},[r(C,{name:"i-lucide-git-commit-horizontal",class:"size-3.5 text-gray-400 shrink-0"}),t("code",sn,o(u.sha.slice(0,7)),1),t("span",nn,o(u.message),1)]))),128))])])):d("",!0),t("div",an,[t("p",on,[b(o(a.changes.files.length)+" file"+o(a.changes.files.length===1?"":"s")+" changed ",1),a.changes.patchesOmitted?(s(),l("span",ln," — diff too large, file names only ")):d("",!0)]),t("div",rn,[(s(!0),l(B,null,Z(a.changes.files,u=>(s(),l("div",{key:u.filename},[t("button",{class:Y(["w-full flex items-center gap-2 px-3 py-1.5 text-left hover:bg-gray-50 dark:hover:bg-gray-800/50 transition-colors",u.patch?"cursor-pointer":"cursor-default"]),onClick:y=>u.patch&&f(u.filename)},[r(C,{name:("scmFileStatusMeta"in $?$.scmFileStatusMeta:e(pe))(u.status).icon,class:Y(["size-3.5 shrink-0",("scmFileStatusMeta"in $?$.scmFileStatusMeta:e(pe))(u.status).color])},null,8,["name","class"]),t("span",un,o(u.filename),1),t("span",dn,[u.additions?(s(),l("span",mn,"+"+o(u.additions),1)):d("",!0),u.additions&&u.deletions?(s(),l("span",fn,"/")):d("",!0),u.deletions?(s(),l("span",pn,"-"+o(u.deletions),1)):d("",!0)]),u.patch?(s(),S(C,{key:0,name:e(j).has(u.filename)?"i-lucide-chevron-up":"i-lucide-chevron-down",class:"size-3.5 text-gray-400 shrink-0"},null,8,["name"])):d("",!0)],10,cn),u.patch&&e(j).has(u.filename)?(s(),l("div",gn,[r(n,{patch:u.patch},null,8,["patch"])])):d("",!0)]))),128))])])])}}}),vn=Object.assign(xn,{__name:"ScmChangesView"}),hn={class:"border border-default rounded-lg overflow-clip text-xs font-mono"},yn={class:"sticky top-0 z-10 flex items-center justify-between px-3 py-1.5 bg-elevated border-b border-default text-gray-600 dark:text-gray-300"},_n={class:"font-medium truncate"},kn={class:"shrink-0 flex items-center gap-1.5 ml-2 text-[11px]"},bn={key:0,class:"text-green-600 dark:text-green-400"},$n={key:1,class:"text-red-600 dark:text-red-400"},Cn={key:1,class:"px-3 py-2 text-gray-400 text-[11px]"},wn=ee({__name:"DiffFile",props:{file:{}},setup(a){return(j,f)=>{const $=ce,m=ke;return s(),l("div",hn,[t("div",yn,[t("span",_n,o(a.file.filename),1),t("span",kn,[a.file.additions?(s(),l("span",bn,"+"+o(a.file.additions),1)):d("",!0),a.file.deletions?(s(),l("span",$n,"-"+o(a.file.deletions),1)):d("",!0),r($,{label:a.file.status,size:"xs",variant:"subtle",color:("scmFileStatusMeta"in j?j.scmFileStatusMeta:e(pe))(a.file.status).badgeColor},null,8,["label","color"])])]),a.file.patch?(s(),S(m,{key:0,patch:a.file.patch},null,8,["patch"])):(s(),l("div",Cn,"No patch available"))])}}}),Sn=Object.assign(wn,{__name:"DiffFile"}),Tn={class:"inline-flex items-center gap-1"},In={class:"flex h-[72vh] overflow-hidden"},jn={class:"w-72 shrink-0 border-r border-default flex flex-col"},Rn={class:"p-2 border-b border-default space-y-2 shrink-0"},zn={class:"flex items-center gap-2 text-xs text-gray-500"},Un={class:"ml-auto"},En={key:2,class:"flex-1 overflow-y-auto flex flex-col"},Vn={key:0,class:"py-6 text-center text-sm text-gray-400 flex-1"},An=["onClick"],Mn=["checked","onChange"],Nn={class:"flex-1 min-w-0"},Fn={class:"text-xs font-medium leading-snug truncate"},Bn={class:"text-[10px] text-gray-400 leading-snug mt-0.5 flex items-center gap-1 min-w-0"},Ln={class:"text-primary shrink-0"},Pn={class:"truncate"},Dn={key:0,class:"shrink-0"},On={key:1,class:"p-2 shrink-0 space-y-1.5"},Hn={key:0,class:"flex items-center gap-1.5 text-xs text-red-500 px-1"},qn={class:"flex-1 overflow-y-auto flex flex-col min-w-0"},Kn={key:0,class:"flex-1 flex items-center justify-center text-gray-400 text-sm"},Gn={key:2,class:"flex-1 p-4 space-y-3"},Wn={key:0,class:"space-y-0.5 pb-3 border-b border-default"},Jn={class:"flex items-center gap-2"},Qn={class:"text-xs font-mono text-primary"},Zn={class:"text-xs text-gray-400"},Xn={class:"text-sm font-semibold"},Yn={key:1,class:"text-sm text-gray-400 pt-2"},ea={key:4,class:"flex-1 flex items-center justify-center text-sm text-gray-400"},ta={class:"flex items-center gap-3 w-full"},sa={class:"flex-1 flex items-center gap-2 text-sm text-gray-500 min-w-0"},na={class:"font-medium text-gray-700 dark:text-gray-200 shrink-0"},aa={class:"shrink-0"},oa={class:"text-green-600 dark:text-green-400 shrink-0 font-medium"},la={class:"text-red-600 dark:text-red-400 shrink-0 font-medium"},ra={key:1,class:"text-gray-400 text-xs shrink-0"},ia={key:1},me=50,ca=ee({__name:"CommitBrowserModal",props:{open:{type:Boolean},clusterId:{},initialSelected:{},autoSelectedShas:{}},emits:["update:open","confirm"],setup(a,{emit:j}){const f=a,$=D(()=>new Set(f.autoSelectedShas??[])),m=j,C=x(""),n=x([]),u=x(me),y=x(!1),U=x(!1),E=x(!1),R=x(null),T=x(null),h=x(new Set),I=x(null),v=lt({}),A=x(null),M=x(!1),O=x(null),N=D(()=>n.value.find(_=>_.sha===I.value)??null),H=D(()=>Se(n.value,C.value)),V=D(()=>{let _=0,c=0,k=0,F=0;for(const K of h.value){if(!(K in v)){F++;continue}const G=v[K];G&&(_+=G.files.length,c+=G.files.reduce((W,J)=>W+J.additions,0),k+=G.files.reduce((W,J)=>W+J.deletions,0))}return{files:_,linesAdded:c,linesRemoved:k,unreviewed:F}});async function L(_){_?(U.value=!0,R.value=null):(E.value=!0,T.value=null);try{const c=await $fetch(`/api/failure-clusters/${f.clusterId}/commits`,{query:{limit:u.value}});n.value=c.commits,y.value=c.hasMore??!1,c.error&&!c.commits.length&&(_?R.value=c.error:T.value=c.error),_&&c.commits[0]&&i(c.commits[0].sha)}catch(c){_?R.value=de(c):T.value=de(c)}finally{U.value=!1,E.value=!1}}async function z(){u.value+=me,await L(!1)}ae(()=>f.open,async _=>{if(_){if(h.value=new Set(f.initialSelected??[]),n.value.length){!I.value&&n.value[0]&&i(n.value[0].sha);return}u.value=me,await L(!0)}});async function i(_){if(I.value!==_){if(I.value=_,O.value=null,_ in v){A.value=v[_],M.value=!1;return}A.value=null,M.value=!0;try{const c=await $fetch(`/api/failure-clusters/${f.clusterId}/commit-diff`,{query:{sha:_}});v[_]=c,I.value===_&&(A.value=c)}catch(c){I.value===_&&(O.value=de(c))}finally{I.value===_&&(M.value=!1)}}}function w(_){const c=new Set(h.value);c.has(_)?c.delete(_):c.add(_),h.value=c}function P(){h.value=new Set(H.value.map(_=>_.sha))}function q(){h.value=new Set}function X(){m("confirm",[...h.value]),m("update:open",!1)}return(_,c)=>{const k=ge,F=$e,K=Tt,G=ie,W=It,J=ce,se=te,ne=Sn,ue=Te;return s(),S(ue,{open:a.open,title:"Browse commits",ui:{content:"max-w-6xl",body:"p-0 overflow-hidden"},"onUpdate:open":c[4]||(c[4]=g=>m("update:open",g))},{title:p(()=>[t("span",Tn,[c[5]||(c[5]=b("Browse commits ",-1)),r(k,{topic:"cluster.commit-browser"})])]),body:p(()=>[t("div",In,[t("div",jn,[t("div",Rn,[r(F,{modelValue:e(C),"onUpdate:modelValue":c[0]||(c[0]=g=>Q(C)?C.value=g:null),placeholder:"Search commits…",size:"xs",icon:"i-lucide-search"},null,8,["modelValue"]),t("div",zn,[t("button",{class:"hover:text-primary transition-colors",onClick:P},"All"),c[6]||(c[6]=t("span",null,"·",-1)),t("button",{class:"hover:text-primary transition-colors",onClick:q},"None"),t("span",Un,o(e(h).size>0?`${e(h).size} selected`:"none selected"),1)])]),e(U)?(s(),S(K,{key:0,text:"Loading…",padded:!1,class:"flex-1"})):e(R)?(s(),S(W,{key:1,text:e(R),padded:!1,class:"flex-1 p-4"},{action:p(()=>[r(G,{size:"xs",color:"neutral",variant:"outline",onClick:c[1]||(c[1]=g=>L(!0))},{default:p(()=>[...c[7]||(c[7]=[b(" Retry ",-1)])]),_:1})]),_:1},8,["text"])):(s(),l("div",En,[e(H).length===0?(s(),l("div",Vn,o(e(C)?"No commits match":"No commits"),1)):d("",!0),(s(!0),l(B,null,Z(e(H),g=>(s(),l("button",{key:g.sha,class:Y(["w-full text-left px-2.5 py-2 flex items-start gap-2.5 hover:bg-elevated transition-colors border-b border-default/50 last:border-0 shrink-0",e(I)===g.sha?"bg-elevated":""]),onClick:oe=>i(g.sha)},[t("input",{type:"checkbox",checked:e(h).has(g.sha),class:"mt-0.5 shrink-0 cursor-pointer accent-primary",onClick:c[2]||(c[2]=fe(()=>{},["stop"])),onChange:oe=>w(g.sha)},null,40,Mn),t("div",Nn,[t("p",Fn,o(g.message||"(no message)"),1),t("p",Bn,[t("code",Ln,o(g.shortSha),1),t("span",Pn,o(g.author),1),g.date?(s(),l("span",Dn,"· "+o(e(re)(g.date)),1)):d("",!0),e($).has(g.sha)?(s(),S(J,{key:1,size:"xs",color:"info",variant:"soft",class:"shrink-0"},{default:p(()=>[...c[8]||(c[8]=[b(" auto ",-1)])]),_:1})):d("",!0)])])],10,An))),128)),e(y)&&!e(C)?(s(),l("div",On,[e(T)?(s(),l("p",Hn,[r(se,{name:"i-lucide-circle-alert",class:"size-3.5 shrink-0"}),b(" "+o(e(T)),1)])):d("",!0),r(G,{size:"xs",color:"neutral",variant:"outline",block:"",loading:e(E),onClick:z},{default:p(()=>[...c[9]||(c[9]=[b(" Load more ",-1)])]),_:1},8,["loading"])])):d("",!0)]))]),t("div",qn,[e(I)?e(M)?(s(),S(K,{key:1,text:"Loading diff…",padded:!1,class:"flex-1"})):e(A)?(s(),l("div",Gn,[e(N)?(s(),l("div",Wn,[t("div",Jn,[t("code",Qn,o(e(N).shortSha),1),t("span",Zn,[b(o(e(N).author),1),e(N).date?(s(),l(B,{key:0},[b(" · "+o(e(re)(e(N).date)),1)],64)):d("",!0)])]),t("p",Xn,o(e(N).message),1)])):d("",!0),e(A).files.length===0?(s(),l("div",Yn,"No file changes in this commit")):d("",!0),(s(!0),l(B,null,Z(e(A).files,g=>(s(),S(ne,{key:g.filename,file:g},null,8,["file"]))),128))])):e(O)?(s(),S(W,{key:3,text:e(O),padded:!1,class:"flex-1 p-6"},{action:p(()=>[...c[10]||(c[10]=[t("p",{class:"text-xs text-gray-400"},"Click the commit again to retry",-1)])]),_:1},8,["text"])):(s(),l("div",ea," Diff not available for this commit ")):(s(),l("div",Kn," Select a commit to view its diff "))])])]),footer:p(()=>[t("div",ta,[t("div",sa,[e(h).size>0?(s(),l(B,{key:0},[t("span",na,o(e(h).size)+" commit"+o(e(h).size===1?"":"s"),1),e(V).files>0||e(V).linesAdded>0||e(V).linesRemoved>0?(s(),l(B,{key:0},[c[11]||(c[11]=t("span",{class:"text-gray-300 dark:text-gray-600"},"·",-1)),t("span",aa,o(e(V).files)+" file"+o(e(V).files===1?"":"s"),1),t("span",oa,"+"+o(e(V).linesAdded),1),t("span",la,"-"+o(e(V).linesRemoved),1)],64)):d("",!0),e(V).unreviewed>0?(s(),l("span",ra," ("+o(e(V).unreviewed)+" unreviewed) ",1)):d("",!0)],64)):(s(),l("span",ia,"No commits selected"))]),r(G,{color:"neutral",variant:"ghost",onClick:c[3]||(c[3]=g=>m("update:open",!1))},{default:p(()=>[...c[12]||(c[12]=[b(" Cancel ",-1)])]),_:1}),r(G,{color:"primary",disabled:e(h).size===0,onClick:X},{default:p(()=>[...c[13]||(c[13]=[b(" Add to context ",-1)])]),_:1},8,["disabled"])])]),_:1},8,["open"])}}}),ua=Object.assign(ca,{__name:"CommitBrowserModal"});function Ie(a){return{scmStatus:D(()=>{const f=a.value?.scm;if(!f)return{color:"text-gray-400",icon:"i-lucide-git-branch",text:"Git context unavailable",detail:""};if(f.baseCommitUsed){if(f.filesCount===0)return{color:"text-yellow-500",icon:"i-lucide-git-branch-plus",text:`Manual baseline ${f.baseCommitUsed.slice(0,7)} · fetch failed`,detail:"network error or missing SCM token (check AI settings)"};const C=f.patchesOmitted?", no patches (diff too large)":f.patchesTruncated?`, ${f.patchedFilesCount} with patches (some cut)`:`, ${f.patchedFilesCount} with patches`;return{color:"text-blue-500",icon:"i-lucide-git-branch-plus",text:`Manual baseline ${f.baseCommitUsed.slice(0,7)} · ${f.filesCount} files${C}`,detail:f.hasLastGreen?"overrides last passing run baseline":"no last passing run"}}if(!f.hasLastGreen)return{color:"text-gray-400",icon:"i-lucide-git-branch",text:"No last passing run",detail:"enter a baseline commit below to enable diff"};if(!f.hasCommitRange)return{color:"text-gray-400",icon:"i-lucide-git-branch",text:"No commit range",detail:"reporter did not send SCM metadata"};if(!f.provider)return{color:"text-yellow-500",icon:"i-lucide-git-branch",text:"Unsupported SCM host",detail:"only GitHub, GitLab and Bitbucket are supported"};if(f.filesCount===0)return{color:"text-yellow-500",icon:"i-lucide-git-branch",text:`${f.provider} · fetch failed`,detail:"network error or missing SCM token (check AI settings)"};if(f.patchesOmitted)return{color:"text-yellow-500",icon:"i-lucide-git-branch",text:`${f.provider} · ${f.filesCount} files`,detail:"diff too large — file list only, no patches"};const $=f.patchesTruncated?", some patches cut (budget)":"",m=f.commitsCount>0?` · ${f.commitsCount} commit${f.commitsCount>1?"s":""}`:"";return{color:"text-green-500",icon:"i-lucide-git-branch",text:`${f.provider} · ${f.filesCount} files · ${f.patchedFilesCount} with patches${$}${m}`,detail:""}})}}const da={class:"space-y-3"},ma={class:"pb-2 border-b border-default"},fa={class:"flex items-center gap-2 flex-wrap"},pa={class:"text-xs text-gray-500 font-medium shrink-0 inline-flex items-center gap-1"},ga={class:"flex items-center gap-1.5 ml-auto"},xa={key:0,class:"flex items-center gap-1 px-2 py-0.5 rounded-full bg-primary/10 text-primary text-xs font-medium"},va={key:0,class:"flex items-start gap-1.5 text-xs px-2 py-1.5 rounded-md bg-elevated border border-default"},ha={key:0,class:"text-gray-400 ml-1"},ya={key:1,class:"flex items-center justify-center py-6"},_a={key:3,class:"text-xs text-gray-400 text-center py-4"},ka=ee({__name:"ClusterInvestigation",setup(a){const{clusterId:j,baseCommit:f,selectedCommitShas:$,autoSelectedCommits:m,baseCommitIsPinned:C,coverage:n,scmChanges:u,contextLoading:y,refreshContext:U}=jt(),E=x(!1),{scmStatus:R}=Ie(n);return(T,h)=>{const I=ge,v=Zs,A=te,M=Ce,O=ie,N=vn,H=ua;return s(),l(B,null,[t("div",da,[t("div",ma,[t("div",fa,[t("span",pa,[h[5]||(h[5]=b(" Baseline ",-1)),r(I,{topic:"cluster.baseline"})]),r(v,{modelValue:e(f),"onUpdate:modelValue":h[0]||(h[0]=V=>Q(f)?f.value=V:null),"cluster-id":e(j)},null,8,["modelValue","cluster-id"]),e(C)?(s(),S(M,{key:0,text:"Baseline commit pinned for this cluster"},{default:p(()=>[r(A,{name:"i-lucide-pin",class:"size-3.5 text-primary shrink-0"})]),_:1})):d("",!0),t("div",ga,[e($).length?(s(),l("div",xa,[r(A,{name:"i-lucide-git-commit-horizontal",class:"size-3"}),t("span",null,o(e($).length)+" commit"+o(e($).length===1?"":"s"),1),t("button",{class:"ml-0.5 hover:opacity-70 transition-opacity",onClick:h[1]||(h[1]=V=>$.value=[])},[r(A,{name:"i-lucide-x",class:"size-3"})])])):d("",!0),r(O,{size:"xs",color:"neutral",variant:"ghost",icon:"i-lucide-list",onClick:h[2]||(h[2]=V=>E.value=!0)},{default:p(()=>[...h[6]||(h[6]=[b(" Browse ",-1)])]),_:1}),r(O,{icon:"i-lucide-refresh-cw",size:"xs",color:"neutral",variant:"outline",loading:e(y),onClick:e(U)},null,8,["loading","onClick"])])])]),e(n)?(s(),l("div",va,[r(A,{name:e(R).icon,class:Y(["size-3.5 mt-0.5 shrink-0",e(R).color])},null,8,["name","class"]),t("div",null,[t("span",{class:Y(e(R).color)},o(e(R).text),3),e(R).detail?(s(),l("span",ha,"— "+o(e(R).detail),1)):d("",!0)])])):d("",!0),e(y)&&!e(u)?(s(),l("div",ya,[r(A,{name:"i-lucide-loader-circle",class:"size-4 animate-spin text-gray-400"})])):e(u)?(s(),S(N,{key:2,changes:e(u)},null,8,["changes"])):e(n)&&!e(y)&&!e(u)?(s(),l("p",_a," No changes found in this range. ")):d("",!0)]),r(H,{open:e(E),"onUpdate:open":h[3]||(h[3]=V=>Q(E)?E.value=V:null),"cluster-id":e(j),"initial-selected":e($),"auto-selected-shas":e(m),onConfirm:h[4]||(h[4]=V=>$.value=V)},null,8,["open","cluster-id","initial-selected","auto-selected-shas"])],64)}}}),ba=Object.assign(ka,{__name:"ClusterInvestigation"}),$a={class:"flex flex-col h-[60vh]"},Ca={class:"flex items-center gap-3 px-4 py-2.5 border-b border-default text-sm shrink-0"},wa={key:0,class:"ml-auto text-xs text-gray-500"},Sa={class:"flex-1 overflow-y-auto"},Ta={class:"w-full text-sm"},Ia=["onClick"],ja={class:"px-4 py-2.5"},Ra=["checked","onChange"],za={class:"px-2 py-2.5 min-w-0"},Ua={class:"truncate font-medium text-gray-800 dark:text-gray-200 max-w-[24rem]"},Ea={class:"px-2 py-2.5 text-gray-500 text-xs max-w-[16rem] hidden sm:table-cell"},Va={class:"px-2 py-2.5 text-right text-gray-500 text-xs"},Aa={key:0},Ma={class:"shrink-0 border-t border-default px-4 py-3 space-y-1.5"},Na={key:0,class:"shrink-0 px-4 pb-3 flex items-center gap-1.5 text-xs text-red-500"},Fa={class:"flex items-center gap-3 w-full"},Ba=ee({__name:"ClusterExtractCasesModal",props:{open:{type:Boolean},clusterId:{},affectedTestCases:{},projectKey:{},projectName:{}},emits:["update:open","extracted"],setup(a,{emit:j}){const f=a,$=j,m=rt(),C=x(new Set),n=x(""),u=x(!1),y=x(null);function U(){C.value=new Set(f.affectedTestCases.map(I=>I.testCaseId))}function E(){C.value=new Set}function R(I){const v=new Set(C.value);v.has(I)?v.delete(I):v.add(I),C.value=v}ae(()=>f.open,I=>{I&&(E(),n.value="",y.value=null)});const T=D(()=>C.value.size);async function h(){if(T.value!==0){u.value=!0,y.value=null;try{await $fetch(`/api/failure-clusters/${f.clusterId}/extract-cases`,{method:"POST",body:{testCaseIds:[...C.value],triageNote:n.value.trim()||void 0}}),m.add({title:`Extracted ${T.value} test ${T.value===1?"case":"cases"}`,color:"success"}),$("extracted"),$("update:open",!1)}catch(I){y.value=de(I)}finally{u.value=!1}}}return(I,v)=>{const A=be,M=xe,O=we,N=te,H=ie,V=Te;return s(),S(V,{open:a.open,title:"Extract test cases",ui:{content:"max-w-4xl",body:"p-0 flex flex-col overflow-hidden"},"onUpdate:open":v[4]||(v[4]=L=>$("update:open",L))},{body:p(()=>[t("div",$a,[t("div",Ca,[t("button",{class:"text-xs font-medium text-primary hover:underline",onClick:U},"Select all"),v[5]||(v[5]=t("span",{class:"text-gray-300 dark:text-gray-600"},"·",-1)),t("button",{class:"text-xs font-medium text-primary hover:underline",onClick:E},"Deselect all"),e(T)>0?(s(),l("span",wa,o(e(T))+" selected ",1)):d("",!0)]),t("div",Sa,[t("table",Ta,[v[8]||(v[8]=t("thead",{class:"sticky top-0 bg-gray-50 dark:bg-gray-800 border-b border-default"},[t("tr",null,[t("th",{class:"w-10 px-4 py-2.5"}),t("th",{class:"text-left px-2 py-2.5 font-medium text-gray-500 text-xs uppercase tracking-wide"},"Test"),t("th",{class:"text-left px-2 py-2.5 font-medium text-gray-500 text-xs uppercase tracking-wide hidden sm:table-cell"}," File "),t("th",{class:"text-right px-2 py-2.5 font-medium text-gray-500 text-xs uppercase tracking-wide w-20"}," Occurrences ")])],-1)),t("tbody",null,[(s(!0),l(B,null,Z(a.affectedTestCases,L=>(s(),l("tr",{key:L.testCaseId,class:"border-b border-default/50 hover:bg-elevated transition-colors cursor-pointer",onClick:z=>R(L.testCaseId)},[t("td",ja,[t("input",{type:"checkbox",checked:e(C).has(L.testCaseId),class:"shrink-0 cursor-pointer accent-primary",onClick:v[0]||(v[0]=fe(()=>{},["stop"])),onChange:z=>R(L.testCaseId)},null,40,Ra)]),t("td",za,[t("p",Ua,o(L.title),1),r(A,{to:`/test-cases/${L.testCaseId}`,class:"text-[10px] text-primary hover:underline mt-0.5 inline-block",onClick:v[1]||(v[1]=fe(()=>{},["stop"]))},{default:p(()=>[...v[6]||(v[6]=[b(" View details ",-1)])]),_:1},8,["to"])]),t("td",Ea,[r(M,{"file-path":L.filePath,"project-key":a.projectKey,"project-name":a.projectName,class:"max-w-full"},null,8,["file-path","project-key","project-name"])]),t("td",Va,o(L.runCount),1)],8,Ia))),128)),a.affectedTestCases.length===0?(s(),l("tr",Aa,[...v[7]||(v[7]=[t("td",{colspan:"4",class:"px-4 py-8 text-center text-gray-400 text-sm"},"No test cases in this cluster.",-1)])])):d("",!0)])])]),t("div",Ma,[v[9]||(v[9]=t("label",{class:"text-xs font-medium text-gray-500 uppercase tracking-wide"},"Triage note (optional)",-1)),r(O,{modelValue:e(n),"onUpdate:modelValue":v[2]||(v[2]=L=>Q(n)?n.value=L:null),placeholder:"Add a note explaining why these tests were extracted…",rows:2,class:"text-sm w-full"},null,8,["modelValue"])]),e(y)?(s(),l("p",Na,[r(N,{name:"i-lucide-circle-alert",class:"size-3.5 shrink-0"}),b(" "+o(e(y)),1)])):d("",!0)])]),footer:p(()=>[t("div",Fa,[v[11]||(v[11]=t("div",{class:"flex-1"},null,-1)),r(H,{color:"neutral",variant:"ghost",disabled:e(u),onClick:v[3]||(v[3]=L=>$("update:open",!1))},{default:p(()=>[...v[10]||(v[10]=[b(" Cancel ",-1)])]),_:1},8,["disabled"]),r(H,{color:"warning",disabled:e(T)===0,loading:e(u),onClick:h},{default:p(()=>[b(" Extract"+o(e(T)>0?` ${e(T)}`:""),1)]),_:1},8,["disabled","loading"])])]),_:1},8,["open"])}}}),La=Object.assign(Ba,{__name:"ClusterExtractCasesModal"}),Pa={key:0,class:"flex flex-col h-full min-h-0 max-xl:overflow-y-auto xl:overflow-hidden"},Da={class:"border-b border-default shrink-0"},Oa={class:"grid grid-cols-1 xl:grid-cols-[3fr_2fr] gap-4 p-1 xl:flex-1 xl:min-h-0 xl:overflow-hidden"},Ha={class:"space-y-4 xl:overflow-y-auto"},qa={class:"font-mono text-xs"},Ka=["innerHTML"],Ga={class:"inline-flex items-center gap-1.5"},Wa={class:"xl:overflow-y-auto"},Ja={key:1,class:"flex items-center justify-center h-64 text-gray-500"},Eo=ee({__name:"[id]",async setup(a){let j,f;const $=it(),m=parseInt(String($.params.id)),C=Rt(m),{data:n,refresh:u}=([j,f]=ct(()=>Vt(`/api/failure-clusters/${m}`,"$Io0yQjh0TH")),j=await j,f(),j);ut(D(()=>({title:`${n.value?.signature??"Failure cluster"} — Piwi Dashboard`})));const y=x(n.value?.status??"open"),U=x(n.value?.triageNote??""),E=x(!1);ae(()=>n.value?.status,k=>{k&&(y.value=k)}),ae(()=>n.value?.triageNote,k=>{U.value=k??""});const R=D(()=>y.value!==(n.value?.status??"open")||U.value.trim()!==(n.value?.triageNote??""));async function T(){E.value=!0;try{await $fetch(`/api/failure-clusters/${m}/status`,{method:"PATCH",body:{status:y.value,triageNote:U.value.trim()||null}}),u()}finally{E.value=!1}}const h=x(!1);function I(){h.value=!1,u()}const{copyRich:v,copied:A}=We();function M(){const k=n.value;if(!k)return;const F=window.location.href,K=ne=>ne.replace(/&/g,"&").replace(/</g,"<").replace(/>/g,">"),G=[k.errorType,`${k.occurrences} occurrence${k.occurrences===1?"":"s"}`,`${k.affectedTests} test${k.affectedTests===1?"":"s"} affected`,k.status!=="open"?k.status:null].filter(Boolean).join(" · "),W=k.diagnosis?.status==="completed"&&k.diagnosis.summary?`AI diagnosis (${k.diagnosis.category??"unknown"}, ${k.diagnosis.confidence??"?"} confidence): ${k.diagnosis.summary}`:null,J=[`❌ Failure cluster: ${k.signature}`,G,"",...k.sampleError?["Sample error:",ve(k.sampleError),""]:[],...W?[W,""]:[],`Cluster: ${F}`].join(`
|
|
3
|
-
`),se=[`<p><strong>❌ Failure cluster</strong>: <code>${K(k.signature)}</code></p>`,`<p><em>${K(G)}</em></p>`,k.sampleError?`<p><strong>Sample error:</strong></p><pre>${ye(k.sampleError)}</pre>`:"",W?`<p><strong>AI diagnosis</strong> (${K(k.diagnosis?.category??"unknown")}, ${K(k.diagnosis?.confidence??"?")} confidence):<br>${K(k.diagnosis.summary)}</p>`:"",`<p>🔗 <a href="${F}">View failure cluster</a></p>`].join("");v(J,se,{toast:"Failure cluster copied"})}const O=D(()=>{const k=n.value?.sampleError;return k?ve(k).split(`
|
|
4
|
-
`).find(F=>F.trim())??"":""}),{scmStatus:N}=Ie(C.coverage),H=D(()=>Ut((n.value?.affectedTestCases??[]).map(k=>({filePath:k.filePath,title:k.title,line:null,projectName:null})))),{copy:V,copied:L}=Et(),z=x(null),i=x(null),w=x(null),P=x(null),q=x(null),X=x(null),_={sampleError:()=>z.value,executionError:()=>z.value,environmentDiff:()=>P.value,visualDiff:()=>q.value,domSnapshot:()=>X.value,scmInvestigation:()=>w.value,selectedCommits:()=>w.value,topSuspectedCommit:()=>w.value,failingAction:()=>w.value,affectedTests:()=>i.value,testSource:()=>i.value,sourceFiles:()=>i.value,steps:()=>i.value,failingSteps:()=>i.value,console:()=>i.value,networkRequests:()=>i.value,serverTraces:()=>i.value,ariaSnapshot:()=>i.value,screenshots:()=>i.value,tracePointers:()=>i.value,artifacts:()=>i.value};dt(_t,{canLocate:k=>k in _,open:k=>_[k]?.()?.reveal()});const c=D(()=>[{label:"Home",icon:"i-lucide-house",to:"/"},{label:"Projects",to:"/projects"},...n.value?.project?[{label:n.value.project.label||n.value.project.name||"Project",to:`/projects/${n.value.project.id}?tab=failure-clusters`}]:[{label:"Project"}],{label:`Failure cluster #${m}`}]);return(k,F)=>{const K=Le,G=Pe,W=et,J=ie,se=Ce,ne=ft,ue=os,g=Je,oe=Qe,je=Ze,Re=Xe,ze=Ye,Ue=xe,Ee=ce,Ve=Ss,Ae=te,Me=ba,Ne=zt,Fe=mt,Be=La;return s(),l(B,null,[r(Fe,{id:"failure-cluster-detail"},{header:p(()=>[r(ne,null,{leading:p(()=>[r(K),r(G,{items:e(c)},null,8,["items"])]),right:p(()=>[e(n)?(s(),S(W,{key:0,endpoint:`/api/failure-clusters/${e(n).id}/export`,"base-name":`piwi-cluster-${e(n).id}`},null,8,["endpoint","base-name"])):d("",!0),e(n)?(s(),S(se,{key:1,text:e(A)?"Copied!":"Copy failure cluster"},{default:p(()=>[r(J,{size:"sm",variant:"ghost",color:"neutral",icon:e(A)?"i-lucide-check":"i-lucide-clipboard",onClick:M},null,8,["icon"])]),_:1},8,["text"])):d("",!0)]),_:1})]),body:p(()=>[e(n)?(s(),l("div",Pa,[t("div",Da,[r(ue,{cluster:e(n),"triage-status":e(y),"triage-note":e(U),"triage-saving":e(E),"triage-changed":e(R),"onUpdate:triageStatus":F[0]||(F[0]=le=>y.value=le),"onUpdate:triageNote":F[1]||(F[1]=le=>U.value=le),onSaveTriage:T},null,8,["cluster","triage-status","triage-note","triage-saving","triage-changed"])]),t("div",Oa,[t("div",Ha,[e(n).sampleError?(s(),S(g,{key:0,ref_key:"errorSection",ref:z,"storage-key":"cluster-error",icon:"i-lucide-circle-x","icon-class":"text-red-500",title:"Error message"},{folded:p(()=>[t("span",qa,o(e(O)),1)]),default:p(()=>[t("div",{class:"text-xs font-mono overflow-x-auto whitespace-pre-wrap",innerHTML:e(ye)(e(n).sampleError)},null,8,Ka)]),_:1},512)):d("",!0),e(n).affectedTestCases?.length&&e(n).affectedTestCases[0]?.recentTestRunsCaseId?(s(),S(oe,{key:1,ref:"locatorSection","storage-key":"cluster-locators","run-id":e(n).lastSeenRunId,"test-runs-case-id":e(n).affectedTestCases[0].recentTestRunsCaseId,"affected-count":e(n).affectedTestCases.length},null,8,["run-id","test-runs-case-id","affected-count"])):d("",!0),e(n).affectedTestCases?.length&&e(n).affectedTestCases[0]?.recentTestRunsCaseId?(s(),S(je,{key:2,ref_key:"envDiffSection",ref:P,"storage-key":"cluster-env-diff","run-id":e(n).lastSeenRunId,"test-runs-case-id":e(n).affectedTestCases[0].recentTestRunsCaseId},null,8,["run-id","test-runs-case-id"])):d("",!0),e(n).affectedTestCases?.length&&e(n).affectedTestCases[0]?.recentTestRunsCaseId?(s(),S(Re,{key:3,ref_key:"visualDiffSection",ref:q,"storage-key":"cluster-visual-diff","run-id":e(n).lastSeenRunId,"test-runs-case-id":e(n).affectedTestCases[0].recentTestRunsCaseId},null,8,["run-id","test-runs-case-id"])):d("",!0),e(n).affectedTestCases?.length&&e(n).affectedTestCases[0]?.recentTestRunsCaseId?(s(),S(ze,{key:4,ref_key:"domSnapshotSection",ref:X,"storage-key":"cluster-dom-snapshot","run-id":e(n).lastSeenRunId,"test-runs-case-id":e(n).affectedTestCases[0].recentTestRunsCaseId},null,8,["run-id","test-runs-case-id"])):d("",!0),e(n).affectedTestCases?.length?(s(),S(g,{key:5,ref_key:"evidenceSection",ref:i,"storage-key":"cluster-evidence",icon:"i-lucide-flask-conical",title:"Test evidence",help:"cluster.evidence"},{folded:p(()=>[b(o(e(n).affectedTests)+" "+o(e(n).affectedTests===1?"test":"tests")+" · "+o(e(n).occurrences)+" occurrence"+o(e(n).occurrences===1?"":"s")+" · ",1),e(n).affectedTestCases[0]?.filePath?(s(),S(Ue,{key:0,"file-path":e(n).affectedTestCases[0].filePath,"project-key":e(n).project?.id,"project-name":e(n).project?.name,class:"text-xs"},null,8,["file-path","project-key","project-name"])):d("",!0)]),actions:p(()=>[r(Ee,{color:"neutral",variant:"subtle",size:"sm"},{default:p(()=>[b(o(e(n).affectedTestCases.length)+" "+o(e(n).affectedTestCases.length===1?"test":"tests"),1)]),_:1}),r(J,{size:"xs",variant:"outline",color:"neutral",icon:e(L)?"i-lucide-check":"i-lucide-play",title:e(L)?"Copied!":("copyPreview"in k?k.copyPreview:e(Ct))(e(H)),onClick:F[2]||(F[2]=le=>e(V)(e(H),{toast:"Retry command copied"}))},{default:p(()=>[...F[5]||(F[5]=[b(" Copy retry command ",-1)])]),_:1},8,["icon","title"]),r(se,{text:"Unlink incorrectly clustered test cases from this group"},{default:p(()=>[r(J,{size:"xs",color:"warning",variant:"outline",icon:"i-lucide-arrow-up-from-line",onClick:F[3]||(F[3]=le=>h.value=!0)},{default:p(()=>[...F[6]||(F[6]=[b(" Extract ",-1)])]),_:1})]),_:1})]),default:p(()=>[r(Ve,{"affected-test-cases":e(n).affectedTestCases,"project-key":e(n).project?.id,"project-name":e(n).project?.name},null,8,["affected-test-cases","project-key","project-name"])]),_:1},512)):d("",!0),r(g,{ref_key:"scmSection",ref:w,"storage-key":"cluster-scm",icon:"i-lucide-git-compare-arrows",title:"What changed",help:"cluster.scm"},{folded:p(()=>[t("span",Ga,[r(Ae,{name:e(N).icon,class:Y(["size-3.5 shrink-0",e(N).color])},null,8,["name","class"]),t("span",{class:Y(e(N).color)},o(e(N).text),3)])]),default:p(()=>[r(Me)]),_:1},512)]),t("div",Wa,[r(Ne,{"cluster-id":e(m),"last-seen-run-id":e(n)?.lastSeenRunId,"affected-test-cases":e(n)?.affectedTestCases??[]},null,8,["cluster-id","last-seen-run-id","affected-test-cases"])])])])):(s(),l("div",Ja,"Cluster not found."))]),_:1}),e(n)?(s(),S(Be,{key:0,open:e(h),"cluster-id":e(m),"affected-test-cases":e(n).affectedTestCases??[],"project-key":e(n).project?.id,"project-name":e(n).project?.name,"onUpdate:open":F[4]||(F[4]=le=>h.value=le),onExtracted:I},null,8,["open","cluster-id","affected-test-cases","project-key","project-name"])):d("",!0)],64)}}});export{Eo as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{_ as W}from"./C9p0YCAi.js";import{_ as X}from"./BTvE9qca.js";import{_ as Y}from"./CBZD8ym8.js";import{_ as Z,a as tt}from"./B_mN5eMV.js";import{_ as et}from"./PdEEuEsg.js";import{d as st,u as at,w as T,J as ot,e as nt,f as u,g as a,h as w,o as n,i,t as l,k as t,v as d,c as _,j as o,s as rt,m,G as it,_ as lt,F as S,y as D,q as ct,p as ut,r as dt,n as _t}from"./h49q_GXF.js";import{_ as mt}from"./CkyMZI-0.js";import{_ as pt}from"./DWEkQ7bl.js";import{_ as ft}from"./BtSJxOdh.js";import{_ as gt}from"./DtSn2Q9-.js";import{_ as ht}from"./b_yFgp5S.js";import{_ as yt}from"./DQnsFoJn.js";import{_ as xt}from"./CRPt9SfB.js";import{_ as bt}from"./DGyGmFem.js";import{_ as kt}from"./BVN50jIb.js";import{_ as vt}from"./DLNNAYfu.js";import{_ as $t}from"./9P8iHISX.js";import{f as jt,j as Rt}from"./CD3R-ggS.js";import{u as I}from"./Cd8r0xk5.js";import"./BhH0TNTi.js";import"./DOLeth7M.js";import"./BZnfiR67.js";import"./BjaRappk.js";import"./Sgis3xif.js";import"./Cwwe5bRS.js";import"./D7W_4Sqc.js";import"./czXrP7NB.js";import"./B6s20NbT.js";import"./CWoSSKhQ.js";const Ct={class:"flex flex-col gap-4 p-4"},Tt={class:"flex items-start gap-4 flex-wrap"},wt={class:"flex-1 min-w-0"},St={class:"text-xl font-bold truncate"},Dt={key:1,class:"flex items-center gap-2 mt-2"},It={key:0,class:"grid grid-cols-1 lg:grid-cols-2 gap-4"},zt={class:"flex items-center gap-1 flex-wrap max-h-[200px] overflow-y-auto py-1"},Lt={key:0,class:"text-sm text-gray-400"},Nt={key:1,class:"text-center py-6 text-gray-400"},Ut={class:"text-xs whitespace-nowrap"},Et={class:"text-gray-500"},Pt={class:"text-gray-400 ml-1"},At={key:1,class:"text-gray-400"},Vt=["title"],Bt={class:"flex justify-end"},Ft={class:"space-y-2"},Kt={class:"flex items-center gap-2 min-w-0"},Ht={class:"text-sm truncate"},Gt={key:0,class:"text-xs text-gray-400 shrink-0"},$e=st({__name:"[id]",async setup(Mt){let p,y;const h=at().params.id,{data:s,refresh:z}=([p,y]=T(()=>I(`/api/test-cases/${h}`,"$IiVoRdAdzb")),p=await p,y(),p),{data:f}=([p,y]=T(()=>I(`/api/test-cases/${h}/history`,"$cuQ0G6KeIS")),p=await p,y(),p),j=dt([]);ot(()=>s.value?.project?.id,async r=>{if(r)try{j.value=(await $fetch(`/api/projects/${r}/markers`)).markers??[]}catch{}},{immediate:!0});function L(){const r=s.value?.project?.id;r&&_t(`/projects/${r}?tab=timeline`)}nt(w(()=>({title:`${s.value?.title||`Test case #${h}`} — Piwi Dashboard`})));const x=w(()=>{const r=s.value;return!r||!r.totalRuns?null:Math.round((r.passedRuns+r.skippedRuns)/r.totalRuns*100)}),N=r=>r==="open"?"error":r==="resolved"?"success":"neutral",U=[{accessorKey:"startTime",header:"Date"},{accessorKey:"status",header:"Status"},{accessorKey:"duration",header:"Duration"},{accessorKey:"retries",header:"Retries"},{accessorKey:"runId",header:"Run"},{accessorKey:"error",header:"Error"},{id:"actions",header:"Actions"}];return(r,c)=>{const E=W,P=X,A=Y,V=tt,B=et,b=rt,k=lt,v=it,g=mt,R=pt,F=ft,K=gt,H=ht,C=yt,G=xt,M=ut,O=bt,q=kt,$=vt,J=$t,Q=Z;return n(),u(Q,{id:"test-case-evolution"},{header:a(()=>[o(V,null,{leading:a(()=>[o(E),o(P,{items:[{label:"Home",icon:"i-lucide-house",to:"/"},{label:"Projects",to:"/projects"},...t(s)?.project?.id?[{label:t(s).project.name||"Project",to:`/projects/${t(s).project.id}`}]:[{label:"Project"}],{label:t(s)?.title||`Test case #${t(h)}`}]},null,8,["items"])]),right:a(()=>[o(A,{actions:[{label:"Refresh",icon:"i-lucide-refresh-cw",onClick:()=>t(z)()}]},null,8,["actions"])]),_:1})]),body:a(()=>[i("div",Ct,[i("div",Tt,[i("div",wt,[i("h1",St,l(t(s)?.title),1),t(s)?.filePath?(n(),u(B,{key:0,"file-path":t(s).filePath,"project-key":t(s)?.project?.id,"project-name":t(s)?.project?.name,class:"text-sm text-gray-500 mt-0.5"},null,8,["file-path","project-key","project-name"])):d("",!0),t(s)?.project?(n(),_("div",Dt,[o(b,{color:"neutral",variant:"soft",size:"xs",class:"font-mono"},{default:a(()=>[m(l(t(s).project.name),1)]),_:1}),t(s)?.flakyRuns>0?(n(),u(b,{key:0,color:"warning",variant:"soft",size:"xs"},{default:a(()=>[m(l(t(s).flakyRuns)+" flaky run"+l(t(s).flakyRuns===1?"":"s"),1)]),_:1})):d("",!0)])):d("",!0)]),t(s)?.lastExecutionId?(n(),u(v,{key:0,to:`/test-run-cases/${t(s).lastExecutionId}`,class:"shrink-0"},{default:a(()=>[o(k,{size:"sm",variant:"outline","trailing-icon":"i-lucide-arrow-right"},{default:a(()=>[...c[0]||(c[0]=[m(" Latest execution ",-1)])]),_:1})]),_:1},8,["to"])):d("",!0)]),o(K,null,{default:a(()=>[o(g,{label:"Total runs",value:t(s)?.totalRuns??0},null,8,["value"]),o(g,{label:"Pass rate",value:t(x)!==null?`${t(x)}%`:"—","value-class":(t(x)??0)>=80?"text-green-600":(t(x)??0)>=50?"text-yellow-600":"text-red-600"},null,8,["value","value-class"]),o(g,{label:"Failed",value:t(s)?.failedRuns??0,"value-class":"text-red-600"},null,8,["value"]),o(g,{label:"Avg duration"},{default:a(()=>[o(R,{ms:t(s)?.avgDuration},null,8,["ms"])]),_:1}),o(g,{label:"Flaky",value:t(s)?.flakyRuns??0,"value-class":(t(s)?.flakyRuns??0)>0?"text-purple-600":""},{label:a(()=>[c[1]||(c[1]=m(" Flaky ",-1)),o(F,{topic:"case.flaky-count"})]),_:1},8,["value","value-class"]),o(g,{label:"Last run",size:"sm",value:t(s)?.lastRunAt?("formatRelativeTime"in r?r.formatRelativeTime:t(jt))(t(s).lastRunAt):"—"},null,8,["value"])]),_:1}),t(f)&&t(f).length>1?(n(),_("div",It,[o(C,{title:"Duration trend",icon:"i-lucide-trending-up",help:"case.history-chart"},{default:a(()=>[o(H,{data:t(f),height:200,markers:t(j),onMarkerClick:L},null,8,["data","markers"])]),_:1}),o(C,{title:"Status history",icon:"i-lucide-check-circle",help:"case.sparkline"},{default:a(()=>[i("div",zt,[(n(!0),_(S,null,D(t(f),(e,qt)=>(n(),u(G,{key:e.id,text:`Run #${e.runId}: ${e.status} — ${new Date(e.startTime).toLocaleDateString("en-US",{month:"short",day:"numeric"})}`},{default:a(()=>[o(v,{to:`/test-run-cases/${e.id}`,class:ct([{"bg-red-500 hover:bg-red-600":e.status==="failed"||e.status==="timedOut","bg-green-500 hover:bg-green-600":e.status==="passed","bg-yellow-500 hover:bg-yellow-600":e.status==="skipped","bg-gray-400 hover:bg-gray-500":!["passed","failed","skipped","timedOut"].includes(e.status)},"size-3.5 rounded-sm inline-block transition-colors"]),title:`Run #${e.runId}: ${e.status}`},null,8,["to","class","title"])]),_:2},1032,["text"]))),128)),t(f).length===0?(n(),_("span",Lt,"No history yet")):d("",!0)])]),_:1})])):t(f)&&t(f).length<=1?(n(),_("div",Nt,[o(M,{name:"i-lucide-trending-up",class:"size-6 mx-auto mb-1"}),c[2]||(c[2]=i("p",{class:"text-sm"},"Need at least 2 runs to show trends.",-1))])):d("",!0),o($,{icon:"i-lucide-list-checks",title:`Recent executions (${t(s)?.recentExecutions?.length??0})`},{default:a(()=>[t(s)?.recentExecutions?.length?(n(),u(O,{key:0,data:t(s).recentExecutions,columns:U,ui:{base:"table-fixed border-separate border-spacing-0",thead:"[&>tr]:bg-elevated/50 [&>tr]:after:content-none",tbody:"[&>tr]:last:[&>td]:border-b-0",th:"first:rounded-l-lg last:rounded-r-lg border-y border-default first:border-l last:border-r",td:"border-b border-default"}},{"startTime-cell":a(({row:e})=>[i("span",Ut,[i("span",Et,l(new Date(e.original.startTime).toLocaleDateString("en-US",{month:"short",day:"numeric"})),1),i("span",Pt,l(new Date(e.original.startTime).toLocaleTimeString("en-US",{hour:"2-digit",minute:"2-digit"})),1)])]),"status-cell":a(({row:e})=>[o(b,{color:("getStatusColor"in r?r.getStatusColor:t(Rt))(e.original.status),variant:"subtle",class:"capitalize"},{default:a(()=>[m(l(e.original.status),1)]),_:2},1032,["color"])]),"duration-cell":a(({row:e})=>[e.original.duration!==null?(n(),u(R,{key:0,ms:e.original.duration},null,8,["ms"])):(n(),_("span",At,"—"))]),"retries-cell":a(({row:e})=>[m(l(e.original.retries&&e.original.retries>0?e.original.retries:""),1)]),"runId-cell":a(({row:e})=>[o(v,{to:`/test-runs/${e.original.runId}`,class:"text-primary hover:underline"},{default:a(()=>[m(l(e.original.runLabel?`${e.original.runLabel} (#${e.original.runId})`:`#${e.original.runId}`),1)]),_:2},1032,["to"])]),"error-cell":a(({row:e})=>[e.original.error?(n(),_("span",{key:0,class:"text-red-600 text-xs truncate max-w-xs block",title:e.original.error},l(e.original.error.length>80?`${e.original.error.substring(0,80)}…`:e.original.error),9,Vt)):d("",!0)]),"actions-header":a(()=>[...c[3]||(c[3]=[i("div",{class:"text-right"},"Actions",-1)])]),"actions-cell":a(({row:e})=>[i("div",Bt,[o(k,{to:`/test-run-cases/${e.original.id}`,size:"sm",variant:"outline","trailing-icon":"i-lucide-arrow-right"},{default:a(()=>[...c[4]||(c[4]=[m(" View ",-1)])]),_:1},8,["to"])])]),_:1},8,["data"])):(n(),u(q,{key:1,icon:"i-lucide-inbox",text:"No executions yet"}))]),_:1},8,["title"]),t(s)?.failureClusters?.length?(n(),u($,{key:2,icon:"i-lucide-bug",title:`Failure clusters (${t(s).failureClusters.length})`,help:"cluster.concept"},{default:a(()=>[i("div",Ft,[(n(!0),_(S,null,D(t(s).failureClusters,e=>(n(),_("div",{key:e.id,class:"flex items-center justify-between py-2 px-2 rounded hover:bg-gray-50 dark:hover:bg-gray-800"},[i("div",Kt,[o(b,{color:N(e.status),variant:"soft",size:"xs",class:"capitalize"},{default:a(()=>[m(l(e.status),1)]),_:2},1032,["color"]),i("span",Ht,l(e.signature),1),e.occurrences>1?(n(),_("span",Gt,l(e.occurrences)+" occurrences ",1)):d("",!0)]),o(k,{to:`/failure-clusters/${e.id}`,size:"xs",variant:"outline","trailing-icon":"i-lucide-arrow-right"},{default:a(()=>[...c[5]||(c[5]=[m(" View ",-1)])]),_:1},8,["to"])]))),128))])]),_:1},8,["title"])):d("",!0),t(s)?.links?.length?(n(),u($,{key:3,icon:"i-lucide-link",title:"Links",help:"shared.entity-links"},{default:a(()=>[o(J,{"entity-type":"test_case","entity-id":Number(t(h)),links:t(s).links??null},null,8,["entity-id","links"])]),_:1})):d("",!0)])]),_:1})}}});export{$e as default};
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"id":"28bca36d-5571-4157-b1b8-7f62c934eed6","timestamp":1785469653361,"prerendered":[]}
|