@vostride/agent-qa-dashboard-ui 0.1.10 → 0.1.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (100) hide show
  1. package/dist/assets/{arrow-up-down-DyIZvSrC.js → arrow-up-down-CN-uHgX9.js} +1 -1
  2. package/dist/assets/{badge-BbhOGRC0.js → badge-DrW2vGVJ.js} +1 -1
  3. package/dist/assets/{batch-action-bar-CZxUcNFZ.js → batch-action-bar-uEhHVDds.js} +1 -1
  4. package/dist/assets/{circle-alert-pBH5T6su.js → circle-alert-BKX0IIz1.js} +1 -1
  5. package/dist/assets/{circle-x-DLBotPS8.js → circle-x-yPIxYoz1.js} +1 -1
  6. package/dist/assets/config-TRu3J-E7.js +10 -0
  7. package/dist/assets/{copy-Gj5_oF-8.js → copy-Clw3wvSn.js} +1 -1
  8. package/dist/assets/display-step-NqsJgW_B.js +1 -0
  9. package/dist/assets/dist-BPJgj1d0.js +1 -0
  10. package/dist/assets/{dist-DZYW0-Ta.js → dist-BPheZrD6.js} +1 -1
  11. package/dist/assets/{dist-DFSjTjXY.js → dist-m_OM4Je_.js} +1 -1
  12. package/dist/assets/{empty-state-Dluv5C1Q.js → empty-state-BTvOA5lp.js} +1 -1
  13. package/dist/assets/{external-link-BZ9gsZx_.js → external-link-C_uggQOc.js} +1 -1
  14. package/dist/assets/{eye-CZ7GiZXJ.js → eye-CZrufbYE.js} +1 -1
  15. package/dist/assets/{file-code-GHpcb0ud.js → file-code-B3iDpJRP.js} +1 -1
  16. package/dist/assets/{file-search-CIA16Vb8.js → file-search-DHHwYVza.js} +1 -1
  17. package/dist/assets/filename-validation-4sTTEagx.js +1 -0
  18. package/dist/assets/{grip-vertical-aDoBVncr.js → grip-vertical-A-AANrBM.js} +1 -1
  19. package/dist/assets/{hook-editor-Dvrur2VR.js → hook-editor-yhQoi-Ky.js} +1 -1
  20. package/dist/assets/{hook-runtime-ChJ0-jZo.js → hook-runtime-JF-0oZpz.js} +1 -1
  21. package/dist/assets/hook-viewer-DIkxp9uJ.js +1 -0
  22. package/dist/assets/hooks-CDRbjPKv.js +1 -0
  23. package/dist/assets/{id-badge-Dzm7eQ9l.js → id-badge-NwZYoNfB.js} +2 -2
  24. package/dist/assets/{index-B3xPCIyH.js → index-Bvtm2F6f.js} +2 -2
  25. package/dist/assets/index-CW7tbJhs.css +2 -0
  26. package/dist/assets/{insights-rNBE_Oot.js → insights-DuYBsUzB.js} +1 -1
  27. package/dist/assets/{insights-line-grid-G3ouKANt.js → insights-line-grid-BKOqA-1W.js} +4 -4
  28. package/dist/assets/{lib-BPEPp1D-.js → lib-58FyJI_k.js} +1 -1
  29. package/dist/assets/live-run-ucgeJa3o.js +1 -0
  30. package/dist/assets/{memory-DcKox3BM.js → memory-B7nfWNTH.js} +1 -1
  31. package/dist/assets/memory-product-D1u5V75o.js +2 -0
  32. package/dist/assets/{monaco-editor-CDJrOpKK.js → monaco-editor-DNT0Mzki.js} +2 -2
  33. package/dist/assets/{monaco-editor-inner-Q9WqqJ52.js → monaco-editor-inner-DuCqlGei.js} +2 -2
  34. package/dist/assets/{monaco.contribution-DTHp-zXN.js → monaco.contribution-LYJB_lCm.js} +2 -2
  35. package/dist/assets/{observation-block-DdB7C1c0.js → observation-block-4AqYhL1h.js} +1 -1
  36. package/dist/assets/observation-markdown-Dx_5-T0t.js +1 -0
  37. package/dist/assets/{pencil-BmkcPKBm.js → pencil-DdRoBrsh.js} +1 -1
  38. package/dist/assets/plus-pXO98OAE.js +1 -0
  39. package/dist/assets/popover-DGZi688D.js +1 -0
  40. package/dist/assets/{refresh-cw-v_0wwa0P.js → refresh-cw-C_0AkMuu.js} +1 -1
  41. package/dist/assets/{resizable-COfX_iMb.js → resizable-BGEcNRZO.js} +1 -1
  42. package/dist/assets/run-detail-3tlB8sew.js +1 -0
  43. package/dist/assets/runs-CywxkFZ6.js +1 -0
  44. package/dist/assets/{scroll-area-DfPMtFw0.js → scroll-area-CnATfQoe.js} +1 -1
  45. package/dist/assets/select-CeVjgiKI.js +1 -0
  46. package/dist/assets/{shortcut-hints-CfVf0REF.js → shortcut-hints-Bs5o743i.js} +1 -1
  47. package/dist/assets/split-button-DcY8ames.js +1 -0
  48. package/dist/assets/square-D71GHEET.js +1 -0
  49. package/dist/assets/{step-name-pills-COKv64-4.js → step-name-pills-Dta5ZGMZ.js} +1 -1
  50. package/dist/assets/suite-editor-Bnf6KMna.js +5 -0
  51. package/dist/assets/suite-navbar-PStktQ6j.js +1 -0
  52. package/dist/assets/suite-viewer-BD74MY_X.js +1 -0
  53. package/dist/assets/{suites-Cbjz7uPI.js → suites-BvfwzFEd.js} +1 -1
  54. package/dist/assets/{switch-BOdp7A9U.js → switch-ByV5GV5L.js} +1 -1
  55. package/dist/assets/tab-console-BQFkZJG_.js +1 -0
  56. package/dist/assets/table-D08QBBt4.js +1 -0
  57. package/dist/assets/{tabs-CfNQIHt-.js → tabs-DrB_Acb3.js} +1 -1
  58. package/dist/assets/test-editor-w7ZQPYgH.js +9 -0
  59. package/dist/assets/test-navbar-DoHKAy1p.js +7 -0
  60. package/dist/assets/{test-viewer-C6Rg-HeW.js → test-viewer-BwUQNVa4.js} +1 -1
  61. package/dist/assets/tests-B5ELKDH2.js +1 -0
  62. package/dist/assets/{tests-suites-table-widths-tlOYaS72.js → tests-suites-table-widths-DNWnkAjA.js} +1 -1
  63. package/dist/assets/{textarea-ByegDm2e.js → textarea-DChEVvwQ.js} +1 -1
  64. package/dist/assets/{trash-2-CawFHfTJ.js → trash-2-7P1Dp87k.js} +1 -1
  65. package/dist/assets/{tsMode-DGJI_hpV.js → tsMode-DEhRZlmT.js} +1 -1
  66. package/dist/assets/{use-hook-run-session-Cjqu9VED.js → use-hook-run-session-x-d_iodT.js} +1 -1
  67. package/dist/assets/{use-keyboard-shortcuts-BRF3cm7O.js → use-keyboard-shortcuts-EAppuiKO.js} +1 -1
  68. package/dist/assets/{use-page-title-CK82kWb2.js → use-page-title-B1t9-5_U.js} +1 -1
  69. package/dist/assets/use-run-status-favicon-D69P46yH.js +1 -0
  70. package/dist/assets/{use-selection-queue-CZ4rXNAT.js → use-selection-queue-BboTDies.js} +1 -1
  71. package/dist/assets/{viewer-url-state-CZTYs75z.js → viewer-url-state-6mOK5_sY.js} +1 -1
  72. package/dist/assets/{zap-C7OZlYXQ.js → zap-KFJmkY3Y.js} +1 -1
  73. package/dist/index.html +2 -2
  74. package/package.json +2 -2
  75. package/dist/assets/config-BfxB7vJt.js +0 -10
  76. package/dist/assets/display-step-CV3zilMS.js +0 -1
  77. package/dist/assets/dist-o2A-YJGQ.js +0 -1
  78. package/dist/assets/filename-validation-BOmZP9gf.js +0 -1
  79. package/dist/assets/hook-viewer-DwQt3CRN.js +0 -1
  80. package/dist/assets/hooks-DcW2AVgE.js +0 -1
  81. package/dist/assets/index-cLLRFOsN.css +0 -2
  82. package/dist/assets/live-run-C2WLFzlf.js +0 -1
  83. package/dist/assets/memory-product-oHTD8fqS.js +0 -2
  84. package/dist/assets/observation-markdown-CvCuqq7R.js +0 -1
  85. package/dist/assets/plus-C6Zz9JLt.js +0 -1
  86. package/dist/assets/popover-CvQRjfg5.js +0 -1
  87. package/dist/assets/run-detail-B6QhqCjq.js +0 -1
  88. package/dist/assets/runs-DO4LkmoV.js +0 -1
  89. package/dist/assets/select-B5gV6YUf.js +0 -1
  90. package/dist/assets/split-button-C7J0EKrF.js +0 -1
  91. package/dist/assets/square-CvSqzenY.js +0 -1
  92. package/dist/assets/suite-editor-CaMQ5mWb.js +0 -5
  93. package/dist/assets/suite-navbar-CnJmeIp-.js +0 -1
  94. package/dist/assets/suite-viewer-HsI0Pn4t.js +0 -1
  95. package/dist/assets/tab-console-CLKFTABo.js +0 -1
  96. package/dist/assets/table-DL0PmHAE.js +0 -1
  97. package/dist/assets/test-editor-CIRL6zSb.js +0 -9
  98. package/dist/assets/test-navbar-CZhYoxgB.js +0 -7
  99. package/dist/assets/tests-C0Xhq39F.js +0 -1
  100. package/dist/assets/use-run-status-favicon-DoJZcfHz.js +0 -1
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{l as t}from"./select-CeVjgiKI.js";import{t as n}from"./shortcut-hints-Bs5o743i.js";import{t as r}from"./dist-BPJgj1d0.js";import{r as i}from"./use-page-title-B1t9-5_U.js";import{n as a,r as o,t as s}from"./dist-BPheZrD6.js";import{$t as c,Cn as l,Dn as u,En as d,Jn as f,Mn as p,Qn as m,Qt as ee,Rn as h,Ut as g,V as te,Wt as _,Xt as v,Zt as y,_n as ne,bn as b,en as x,fn as S,gn as re,hn as ie,jn as C,kn as w,mn as ae,pn as oe,pr as se,vn as T,wn as E,xn as ce,yn as D}from"./index-Bvtm2F6f.js";var O=f(`globe`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 2a14.5 14.5 0 0 0 0 20 14.5 14.5 0 0 0 0-20`,key:`13o1zl`}],[`path`,{d:`M2 12h20`,key:`9i4pu4`}]]),k=f(`monitor`,[[`rect`,{width:`20`,height:`14`,x:`2`,y:`3`,rx:`2`,key:`48i651`}],[`line`,{x1:`8`,x2:`16`,y1:`21`,y2:`21`,key:`1svkeh`}],[`line`,{x1:`12`,x2:`12`,y1:`17`,y2:`21`,key:`vw1qmm`}]]),A=e(se(),1),j=m(),M=[`Enter`,` `],le=[`ArrowDown`,`PageUp`,`Home`],ue=[`ArrowUp`,`PageDown`,`End`],de=[...le,...ue],fe={ltr:[...M,`ArrowRight`],rtl:[...M,`ArrowLeft`]},N={ltr:[`ArrowLeft`],rtl:[`ArrowRight`]},P=`Menu`,[F,pe,me]=r(P),[I,he]=E(P,[me,x,o]),L=x(),ge=o(),[_e,R]=I(P),[ve,z]=I(P),ye=e=>{let{__scopeMenu:t,open:n=!1,children:r,dir:a,onOpenChange:o,modal:s=!0}=e,l=L(t),[u,d]=A.useState(null),f=A.useRef(!1),p=T(o),m=i(a);return A.useEffect(()=>{let e=()=>{f.current=!0,document.addEventListener(`pointerdown`,t,{capture:!0,once:!0}),document.addEventListener(`pointermove`,t,{capture:!0,once:!0})},t=()=>f.current=!1;return document.addEventListener(`keydown`,e,{capture:!0}),()=>{document.removeEventListener(`keydown`,e,{capture:!0}),document.removeEventListener(`pointerdown`,t,{capture:!0}),document.removeEventListener(`pointermove`,t,{capture:!0})}},[]),(0,j.jsx)(c,{...l,children:(0,j.jsx)(_e,{scope:t,open:n,onOpenChange:p,content:u,onContentChange:d,children:(0,j.jsx)(ve,{scope:t,onClose:A.useCallback(()=>p(!1),[p]),isUsingKeyboardRef:f,dir:m,modal:s,children:r})})})};ye.displayName=P;var be=`MenuAnchor`,B=A.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=L(n);return(0,j.jsx)(v,{...i,...r,ref:t})});B.displayName=be;var V=`MenuPortal`,[xe,Se]=I(V,{forceMount:void 0}),Ce=e=>{let{__scopeMenu:t,forceMount:n,children:r,container:i}=e,a=R(V,t);return(0,j.jsx)(xe,{scope:t,forceMount:n,children:(0,j.jsx)(b,{present:n||a.open,children:(0,j.jsx)(ie,{asChild:!0,container:i,children:r})})})};Ce.displayName=V;var H=`MenuContent`,[we,U]=I(H),Te=A.forwardRef((e,t)=>{let n=Se(H,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=R(H,e.__scopeMenu),o=z(H,e.__scopeMenu);return(0,j.jsx)(F.Provider,{scope:e.__scopeMenu,children:(0,j.jsx)(b,{present:r||a.open,children:(0,j.jsx)(F.Slot,{scope:e.__scopeMenu,children:o.modal?(0,j.jsx)(Ee,{...i,ref:t}):(0,j.jsx)(De,{...i,ref:t})})})})}),Ee=A.forwardRef((e,t)=>{let n=R(H,e.__scopeMenu),r=A.useRef(null),i=p(t,r);return A.useEffect(()=>{let e=r.current;if(e)return S(e)},[]),(0,j.jsx)(W,{...e,ref:i,trapFocus:n.open,disableOutsidePointerEvents:n.open,disableOutsideScroll:!0,onFocusOutside:l(e.onFocusOutside,e=>e.preventDefault(),{checkForDefaultPrevented:!1}),onDismiss:()=>n.onOpenChange(!1)})}),De=A.forwardRef((e,t)=>{let n=R(H,e.__scopeMenu);return(0,j.jsx)(W,{...e,ref:t,trapFocus:!1,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,onDismiss:()=>n.onOpenChange(!1)})}),Oe=w(`MenuContent.ScrollLock`),W=A.forwardRef((e,t)=>{let{__scopeMenu:n,loop:r=!1,trapFocus:i,onOpenAutoFocus:o,onCloseAutoFocus:s,disableOutsidePointerEvents:c,onEntryFocus:u,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:g,disableOutsideScroll:te,..._}=e,v=R(H,n),y=z(H,n),b=L(n),x=ge(n),S=pe(n),[ie,C]=A.useState(null),w=A.useRef(null),se=p(t,w,v.onContentChange),T=A.useRef(0),E=A.useRef(``),ce=A.useRef(0),D=A.useRef(null),O=A.useRef(`right`),k=A.useRef(0),M=te?oe:A.Fragment,le=te?{as:Oe,allowPinchZoom:!0}:void 0,fe=e=>{let t=E.current+e,n=S().filter(e=>!e.disabled),r=document.activeElement,i=n.find(e=>e.ref.current===r)?.textValue,a=ct(n.map(e=>e.textValue),t,i),o=n.find(e=>e.textValue===a)?.ref.current;(function e(t){E.current=t,window.clearTimeout(T.current),t!==``&&(T.current=window.setTimeout(()=>e(``),1e3))})(t),o&&setTimeout(()=>o.focus())};A.useEffect(()=>()=>window.clearTimeout(T.current),[]),ae();let N=A.useCallback(e=>O.current===D.current?.side&&ut(e,D.current?.area),[]);return(0,j.jsx)(we,{scope:n,searchRef:E,onItemEnter:A.useCallback(e=>{N(e)&&e.preventDefault()},[N]),onItemLeave:A.useCallback(e=>{N(e)||(w.current?.focus(),C(null))},[N]),onTriggerLeave:A.useCallback(e=>{N(e)&&e.preventDefault()},[N]),pointerGraceTimerRef:ce,onPointerGraceIntentChange:A.useCallback(e=>{D.current=e},[]),children:(0,j.jsx)(M,{...le,children:(0,j.jsx)(re,{asChild:!0,trapped:i,onMountAutoFocus:l(o,e=>{e.preventDefault(),w.current?.focus({preventScroll:!0})}),onUnmountAutoFocus:s,children:(0,j.jsx)(ne,{asChild:!0,disableOutsidePointerEvents:c,onEscapeKeyDown:d,onPointerDownOutside:f,onFocusOutside:m,onInteractOutside:h,onDismiss:g,children:(0,j.jsx)(a,{asChild:!0,...x,dir:y.dir,orientation:`vertical`,loop:r,currentTabStopId:ie,onCurrentTabStopIdChange:C,onEntryFocus:l(u,e=>{y.isUsingKeyboardRef.current||e.preventDefault()}),preventScrollOnEntryFocus:!0,children:(0,j.jsx)(ee,{role:`menu`,"aria-orientation":`vertical`,"data-state":it(v.open),"data-radix-menu-content":``,dir:y.dir,...b,..._,ref:se,style:{outline:`none`,..._.style},onKeyDown:l(_.onKeyDown,e=>{let t=e.target.closest(`[data-radix-menu-content]`)===e.currentTarget,n=e.ctrlKey||e.altKey||e.metaKey,r=e.key.length===1;t&&(e.key===`Tab`&&e.preventDefault(),!n&&r&&fe(e.key));let i=w.current;if(e.target!==i||!de.includes(e.key))return;e.preventDefault();let a=S().filter(e=>!e.disabled).map(e=>e.ref.current);ue.includes(e.key)&&a.reverse(),ot(a)}),onBlur:l(e.onBlur,e=>{e.currentTarget.contains(e.target)||(window.clearTimeout(T.current),E.current=``)}),onPointerMove:l(e.onPointerMove,Y(e=>{let t=e.target,n=k.current!==e.clientX;e.currentTarget.contains(t)&&n&&(O.current=e.clientX>k.current?`right`:`left`,k.current=e.clientX)}))})})})})})})});Te.displayName=H;var ke=`MenuGroup`,Ae=A.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,j.jsx)(d.div,{role:`group`,...r,ref:t})});Ae.displayName=ke;var je=`MenuLabel`,Me=A.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,j.jsx)(d.div,{...r,ref:t})});Me.displayName=je;var G=`MenuItem`,Ne=`menu.itemSelect`,K=A.forwardRef((e,t)=>{let{disabled:n=!1,onSelect:r,...i}=e,a=A.useRef(null),o=z(G,e.__scopeMenu),s=U(G,e.__scopeMenu),c=p(t,a),d=A.useRef(!1),f=()=>{let e=a.current;if(!n&&e){let t=new CustomEvent(Ne,{bubbles:!0,cancelable:!0});e.addEventListener(Ne,e=>r?.(e),{once:!0}),u(e,t),t.defaultPrevented?d.current=!1:o.onClose()}};return(0,j.jsx)(Pe,{...i,ref:c,disabled:n,onClick:l(e.onClick,f),onPointerDown:t=>{e.onPointerDown?.(t),d.current=!0},onPointerUp:l(e.onPointerUp,e=>{d.current||e.currentTarget?.click()}),onKeyDown:l(e.onKeyDown,e=>{let t=s.searchRef.current!==``;n||t&&e.key===` `||M.includes(e.key)&&(e.currentTarget.click(),e.preventDefault())})})});K.displayName=G;var Pe=A.forwardRef((e,t)=>{let{__scopeMenu:n,disabled:r=!1,textValue:i,...a}=e,o=U(G,n),c=ge(n),u=A.useRef(null),f=p(t,u),[m,ee]=A.useState(!1),[h,g]=A.useState(``);return A.useEffect(()=>{let e=u.current;e&&g((e.textContent??``).trim())},[a.children]),(0,j.jsx)(F.ItemSlot,{scope:n,disabled:r,textValue:i??h,children:(0,j.jsx)(s,{asChild:!0,...c,focusable:!r,children:(0,j.jsx)(d.div,{role:`menuitem`,"data-highlighted":m?``:void 0,"aria-disabled":r||void 0,"data-disabled":r?``:void 0,...a,ref:f,onPointerMove:l(e.onPointerMove,Y(e=>{r?o.onItemLeave(e):(o.onItemEnter(e),e.defaultPrevented||e.currentTarget.focus({preventScroll:!0}))})),onPointerLeave:l(e.onPointerLeave,Y(e=>o.onItemLeave(e))),onFocus:l(e.onFocus,()=>ee(!0)),onBlur:l(e.onBlur,()=>ee(!1))})})})}),Fe=`MenuCheckboxItem`,Ie=A.forwardRef((e,t)=>{let{checked:n=!1,onCheckedChange:r,...i}=e;return(0,j.jsx)(We,{scope:e.__scopeMenu,checked:n,children:(0,j.jsx)(K,{role:`menuitemcheckbox`,"aria-checked":J(n)?`mixed`:n,...i,ref:t,"data-state":at(n),onSelect:l(i.onSelect,()=>r?.(J(n)?!0:!n),{checkForDefaultPrevented:!1})})})});Ie.displayName=Fe;var Le=`MenuRadioGroup`,[Re,ze]=I(Le,{value:void 0,onValueChange:()=>{}}),Be=A.forwardRef((e,t)=>{let{value:n,onValueChange:r,...i}=e,a=T(r);return(0,j.jsx)(Re,{scope:e.__scopeMenu,value:n,onValueChange:a,children:(0,j.jsx)(Ae,{...i,ref:t})})});Be.displayName=Le;var Ve=`MenuRadioItem`,He=A.forwardRef((e,t)=>{let{value:n,...r}=e,i=ze(Ve,e.__scopeMenu),a=n===i.value;return(0,j.jsx)(We,{scope:e.__scopeMenu,checked:a,children:(0,j.jsx)(K,{role:`menuitemradio`,"aria-checked":a,...r,ref:t,"data-state":at(a),onSelect:l(r.onSelect,()=>i.onValueChange?.(n),{checkForDefaultPrevented:!1})})})});He.displayName=Ve;var Ue=`MenuItemIndicator`,[We,Ge]=I(Ue,{checked:!1}),Ke=A.forwardRef((e,t)=>{let{__scopeMenu:n,forceMount:r,...i}=e,a=Ge(Ue,n);return(0,j.jsx)(b,{present:r||J(a.checked)||a.checked===!0,children:(0,j.jsx)(d.span,{...i,ref:t,"data-state":at(a.checked)})})});Ke.displayName=Ue;var qe=`MenuSeparator`,Je=A.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e;return(0,j.jsx)(d.div,{role:`separator`,"aria-orientation":`horizontal`,...r,ref:t})});Je.displayName=qe;var Ye=`MenuArrow`,Xe=A.forwardRef((e,t)=>{let{__scopeMenu:n,...r}=e,i=L(n);return(0,j.jsx)(y,{...i,...r,ref:t})});Xe.displayName=Ye;var Ze=`MenuSub`,[Qe,$e]=I(Ze),et=e=>{let{__scopeMenu:t,children:n,open:r=!1,onOpenChange:i}=e,a=R(Ze,t),o=L(t),[s,l]=A.useState(null),[u,d]=A.useState(null),f=T(i);return A.useEffect(()=>(a.open===!1&&f(!1),()=>f(!1)),[a.open,f]),(0,j.jsx)(c,{...o,children:(0,j.jsx)(_e,{scope:t,open:r,onOpenChange:f,content:u,onContentChange:d,children:(0,j.jsx)(Qe,{scope:t,contentId:D(),triggerId:D(),trigger:s,onTriggerChange:l,children:n})})})};et.displayName=Ze;var q=`MenuSubTrigger`,tt=A.forwardRef((e,t)=>{let n=R(q,e.__scopeMenu),r=z(q,e.__scopeMenu),i=$e(q,e.__scopeMenu),a=U(q,e.__scopeMenu),o=A.useRef(null),{pointerGraceTimerRef:s,onPointerGraceIntentChange:c}=a,u={__scopeMenu:e.__scopeMenu},d=A.useCallback(()=>{o.current&&window.clearTimeout(o.current),o.current=null},[]);return A.useEffect(()=>d,[d]),A.useEffect(()=>{let e=s.current;return()=>{window.clearTimeout(e),c(null)}},[s,c]),(0,j.jsx)(B,{asChild:!0,...u,children:(0,j.jsx)(Pe,{id:i.triggerId,"aria-haspopup":`menu`,"aria-expanded":n.open,"aria-controls":i.contentId,"data-state":it(n.open),...e,ref:C(t,i.onTriggerChange),onClick:t=>{e.onClick?.(t),!(e.disabled||t.defaultPrevented)&&(t.currentTarget.focus(),n.open||n.onOpenChange(!0))},onPointerMove:l(e.onPointerMove,Y(t=>{a.onItemEnter(t),!t.defaultPrevented&&!e.disabled&&!n.open&&!o.current&&(a.onPointerGraceIntentChange(null),o.current=window.setTimeout(()=>{n.onOpenChange(!0),d()},100))})),onPointerLeave:l(e.onPointerLeave,Y(e=>{d();let t=n.content?.getBoundingClientRect();if(t){let r=n.content?.dataset.side,i=r===`right`,o=i?-5:5,c=t[i?`left`:`right`],l=t[i?`right`:`left`];a.onPointerGraceIntentChange({area:[{x:e.clientX+o,y:e.clientY},{x:c,y:t.top},{x:l,y:t.top},{x:l,y:t.bottom},{x:c,y:t.bottom}],side:r}),window.clearTimeout(s.current),s.current=window.setTimeout(()=>a.onPointerGraceIntentChange(null),300)}else{if(a.onTriggerLeave(e),e.defaultPrevented)return;a.onPointerGraceIntentChange(null)}})),onKeyDown:l(e.onKeyDown,t=>{let i=a.searchRef.current!==``;e.disabled||i&&t.key===` `||fe[r.dir].includes(t.key)&&(n.onOpenChange(!0),n.content?.focus(),t.preventDefault())})})})});tt.displayName=q;var nt=`MenuSubContent`,rt=A.forwardRef((e,t)=>{let n=Se(H,e.__scopeMenu),{forceMount:r=n.forceMount,...i}=e,a=R(H,e.__scopeMenu),o=z(H,e.__scopeMenu),s=$e(nt,e.__scopeMenu),c=A.useRef(null),u=p(t,c);return(0,j.jsx)(F.Provider,{scope:e.__scopeMenu,children:(0,j.jsx)(b,{present:r||a.open,children:(0,j.jsx)(F.Slot,{scope:e.__scopeMenu,children:(0,j.jsx)(W,{id:s.contentId,"aria-labelledby":s.triggerId,...i,ref:u,align:`start`,side:o.dir===`rtl`?`left`:`right`,disableOutsidePointerEvents:!1,disableOutsideScroll:!1,trapFocus:!1,onOpenAutoFocus:e=>{o.isUsingKeyboardRef.current&&c.current?.focus(),e.preventDefault()},onCloseAutoFocus:e=>e.preventDefault(),onFocusOutside:l(e.onFocusOutside,e=>{e.target!==s.trigger&&a.onOpenChange(!1)}),onEscapeKeyDown:l(e.onEscapeKeyDown,e=>{o.onClose(),e.preventDefault()}),onKeyDown:l(e.onKeyDown,e=>{let t=e.currentTarget.contains(e.target),n=N[o.dir].includes(e.key);t&&n&&(a.onOpenChange(!1),s.trigger?.focus(),e.preventDefault())})})})})})});rt.displayName=nt;function it(e){return e?`open`:`closed`}function J(e){return e===`indeterminate`}function at(e){return J(e)?`indeterminate`:e?`checked`:`unchecked`}function ot(e){let t=document.activeElement;for(let n of e)if(n===t||(n.focus(),document.activeElement!==t))return}function st(e,t){return e.map((n,r)=>e[(t+r)%e.length])}function ct(e,t,n){let r=t.length>1&&Array.from(t).every(e=>e===t[0])?t[0]:t,i=n?e.indexOf(n):-1,a=st(e,Math.max(i,0));r.length===1&&(a=a.filter(e=>e!==n));let o=a.find(e=>e.toLowerCase().startsWith(r.toLowerCase()));return o===n?void 0:o}function lt(e,t){let{x:n,y:r}=e,i=!1;for(let e=0,a=t.length-1;e<t.length;a=e++){let o=t[e],s=t[a],c=o.x,l=o.y,u=s.x,d=s.y;l>r!=d>r&&n<(u-c)*(r-l)/(d-l)+c&&(i=!i)}return i}function ut(e,t){return t?lt({x:e.clientX,y:e.clientY},t):!1}function Y(e){return t=>t.pointerType===`mouse`?e(t):void 0}var dt=ye,ft=B,pt=Ce,mt=Te,ht=Ae,gt=Me,_t=K,vt=Ie,yt=Be,bt=He,xt=Ke,St=Je,Ct=Xe,wt=tt,Tt=rt,X=`DropdownMenu`,[Et,Dt]=E(X,[he]),Z=he(),[Ot,kt]=Et(X),At=e=>{let{__scopeDropdownMenu:t,children:n,dir:r,open:i,defaultOpen:a,onOpenChange:o,modal:s=!0}=e,c=Z(t),l=A.useRef(null),[u,d]=ce({prop:i,defaultProp:a??!1,onChange:o,caller:X});return(0,j.jsx)(Ot,{scope:t,triggerId:D(),triggerRef:l,contentId:D(),open:u,onOpenChange:d,onOpenToggle:A.useCallback(()=>d(e=>!e),[d]),modal:s,children:(0,j.jsx)(dt,{...c,open:u,onOpenChange:d,dir:r,modal:s,children:n})})};At.displayName=X;var jt=`DropdownMenuTrigger`,Mt=A.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,disabled:r=!1,...i}=e,a=kt(jt,n),o=Z(n);return(0,j.jsx)(ft,{asChild:!0,...o,children:(0,j.jsx)(d.button,{type:`button`,id:a.triggerId,"aria-haspopup":`menu`,"aria-expanded":a.open,"aria-controls":a.open?a.contentId:void 0,"data-state":a.open?`open`:`closed`,"data-disabled":r?``:void 0,disabled:r,...i,ref:C(t,a.triggerRef),onPointerDown:l(e.onPointerDown,e=>{!r&&e.button===0&&e.ctrlKey===!1&&(a.onOpenToggle(),a.open||e.preventDefault())}),onKeyDown:l(e.onKeyDown,e=>{r||([`Enter`,` `].includes(e.key)&&a.onOpenToggle(),e.key===`ArrowDown`&&a.onOpenChange(!0),[`Enter`,` `,`ArrowDown`].includes(e.key)&&e.preventDefault())})})})});Mt.displayName=jt;var Nt=`DropdownMenuPortal`,Pt=e=>{let{__scopeDropdownMenu:t,...n}=e,r=Z(t);return(0,j.jsx)(pt,{...r,...n})};Pt.displayName=Nt;var Ft=`DropdownMenuContent`,It=A.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=kt(Ft,n),a=Z(n),o=A.useRef(!1);return(0,j.jsx)(mt,{id:i.contentId,"aria-labelledby":i.triggerId,...a,...r,ref:t,onCloseAutoFocus:l(e.onCloseAutoFocus,e=>{o.current||i.triggerRef.current?.focus(),o.current=!1,e.preventDefault()}),onInteractOutside:l(e.onInteractOutside,e=>{let t=e.detail.originalEvent,n=t.button===0&&t.ctrlKey===!0,r=t.button===2||n;(!i.modal||r)&&(o.current=!0)}),style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});It.displayName=Ft;var Lt=`DropdownMenuGroup`,Rt=A.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,j.jsx)(ht,{...i,...r,ref:t})});Rt.displayName=Lt;var zt=`DropdownMenuLabel`,Bt=A.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,j.jsx)(gt,{...i,...r,ref:t})});Bt.displayName=zt;var Vt=`DropdownMenuItem`,Ht=A.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,j.jsx)(_t,{...i,...r,ref:t})});Ht.displayName=Vt;var Ut=`DropdownMenuCheckboxItem`,Wt=A.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,j.jsx)(vt,{...i,...r,ref:t})});Wt.displayName=Ut;var Gt=`DropdownMenuRadioGroup`,Kt=A.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,j.jsx)(yt,{...i,...r,ref:t})});Kt.displayName=Gt;var qt=`DropdownMenuRadioItem`,Jt=A.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,j.jsx)(bt,{...i,...r,ref:t})});Jt.displayName=qt;var Yt=`DropdownMenuItemIndicator`,Xt=A.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,j.jsx)(xt,{...i,...r,ref:t})});Xt.displayName=Yt;var Zt=`DropdownMenuSeparator`,Qt=A.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,j.jsx)(St,{...i,...r,ref:t})});Qt.displayName=Zt;var $t=`DropdownMenuArrow`,en=A.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,j.jsx)(Ct,{...i,...r,ref:t})});en.displayName=$t;var tn=`DropdownMenuSubTrigger`,nn=A.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,j.jsx)(wt,{...i,...r,ref:t})});nn.displayName=tn;var rn=`DropdownMenuSubContent`,an=A.forwardRef((e,t)=>{let{__scopeDropdownMenu:n,...r}=e,i=Z(n);return(0,j.jsx)(Tt,{...i,...r,ref:t,style:{...e.style,"--radix-dropdown-menu-content-transform-origin":`var(--radix-popper-transform-origin)`,"--radix-dropdown-menu-content-available-width":`var(--radix-popper-available-width)`,"--radix-dropdown-menu-content-available-height":`var(--radix-popper-available-height)`,"--radix-dropdown-menu-trigger-width":`var(--radix-popper-anchor-width)`,"--radix-dropdown-menu-trigger-height":`var(--radix-popper-anchor-height)`}})});an.displayName=rn;var on=At,sn=Mt,cn=Pt,ln=It,un=Ht,dn=Qt;function fn({...e}){return(0,j.jsx)(on,{"data-slot":`dropdown-menu`,...e})}function pn({...e}){return(0,j.jsx)(sn,{"data-slot":`dropdown-menu-trigger`,...e})}function mn({className:e,sideOffset:t=4,...n}){return(0,j.jsx)(cn,{children:(0,j.jsx)(ln,{"data-slot":`dropdown-menu-content`,sideOffset:t,className:_(`z-50 max-h-(--radix-dropdown-menu-content-available-height) min-w-[8rem] origin-(--radix-dropdown-menu-content-transform-origin) overflow-x-hidden overflow-y-auto rounded-md border bg-popover p-1 text-popover-foreground shadow-md data-[side=bottom]:slide-in-from-top-2 data-[side=left]:slide-in-from-right-2 data-[side=right]:slide-in-from-left-2 data-[side=top]:slide-in-from-bottom-2 data-[state=closed]:animate-out data-[state=closed]:fade-out-0 data-[state=closed]:zoom-out-95 data-[state=open]:animate-in data-[state=open]:fade-in-0 data-[state=open]:zoom-in-95`,e),...n})})}function Q({className:e,inset:t,variant:n=`default`,...r}){return(0,j.jsx)(un,{"data-slot":`dropdown-menu-item`,"data-inset":t,"data-variant":n,className:_(`relative flex cursor-default items-center gap-2 rounded-sm px-2 py-1.5 text-sm outline-hidden select-none focus:bg-accent focus:text-accent-foreground data-[disabled]:pointer-events-none data-[disabled]:opacity-50 data-[inset]:pl-8 data-[variant=destructive]:text-destructive data-[variant=destructive]:focus:bg-destructive/10 data-[variant=destructive]:focus:text-destructive dark:data-[variant=destructive]:focus:bg-destructive/20 [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4 [&_svg:not([class*='text-'])]:text-muted-foreground data-[variant=destructive]:*:[svg]:text-destructive!`,e),...r})}function hn({className:e,...t}){return(0,j.jsx)(dn,{"data-slot":`dropdown-menu-separator`,className:_(`-mx-1 my-1 h-px bg-border`,e),...t})}var $=null,gn=null;function _n(){let[e,t]=(0,A.useState)(()=>$?{...$,isLoading:!1}:{defaultRunMode:`local`,hasFarm:!1,isLoading:!0});return(0,A.useEffect)(()=>{if($){t({...$,isLoading:!1});return}gn||=te().then(e=>{let t=e.config,n=t.farm;$={defaultRunMode:t.defaultRunMode===`farm`?`farm`:`local`,hasFarm:!!n?.provider}}).catch(()=>{$={defaultRunMode:`local`,hasFarm:!1}}).finally(()=>{gn=null}),gn.then(()=>{t({...$,isLoading:!1})})},[]),e}function vn({onRun:e,onRunNoCache:r,onPurgeCache:i,disabled:a=!1,size:o=`default`,className:s,label:c,shortcutKey:l}){let{hasFarm:u}=_n(),d=u||!!r||!!i,f=c??`Run`,p=l?(0,j.jsx)(n,{shortcut:l,className:`border-primary-foreground/20 bg-primary-foreground/10 text-primary-foreground`}):null;return d?(0,j.jsxs)(`div`,{className:_(`inline-flex items-center`,s),children:[(0,j.jsxs)(g,{size:o,disabled:a,onClick:()=>e(!0),className:`rounded-r-none`,children:[(0,j.jsx)(h,{className:`size-4`}),f,p]}),(0,j.jsxs)(fn,{children:[(0,j.jsx)(pn,{asChild:!0,children:(0,j.jsx)(g,{variant:`default`,size:o,disabled:a,className:`rounded-l-none border-l border-l-primary-foreground/20 px-2`,children:(0,j.jsx)(t,{className:`h-4 w-4`})})}),(0,j.jsxs)(mn,{align:`end`,children:[(0,j.jsxs)(Q,{onClick:()=>e(!0),children:[(0,j.jsx)(k,{className:`mr-2 h-4 w-4`}),`Run Local`]}),u&&(0,j.jsxs)(Q,{onClick:()=>e(!1),children:[(0,j.jsx)(O,{className:`mr-2 h-4 w-4`}),`Run on Farm`]}),(r||i)&&(0,j.jsx)(hn,{}),r&&(0,j.jsx)(Q,{onClick:()=>r(!0),children:`Run without cache`}),i&&(0,j.jsx)(Q,{onClick:i,children:`Purge cache`})]})]})]}):(0,j.jsxs)(g,{size:o,disabled:a,onClick:()=>e(!0),className:s,children:[(0,j.jsx)(h,{className:`size-4`}),f,p]})}export{Q as a,O as c,mn as i,_n as n,pn as o,fn as r,k as s,vn as t};
@@ -0,0 +1 @@
1
+ import{Jn as e}from"./index-Bvtm2F6f.js";var t=e(`square`,[[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,key:`afitv7`}]]);export{t};
@@ -1 +1 @@
1
- import{At as e,Nt as t,Ut as n,Zn as r,jt as i}from"./index-B3xPCIyH.js";var a=r(),o={env:`env (.env file)`,inline:`inline (test config)`,suite:`suite (suite config)`,cli:`cli (--var flag)`,capture:`capture (captured from screen)`,hook:`hook (hook output)`,step:`step (set by agent)`,runJS:`runJS (inline JavaScript)`,runHook:`runHook uses the stable hook ID from the configured hooks file`,secret:`secret (runtime only)`};function s(e){switch(e){case`env`:return`bg-blue-500/15 border border-blue-500/20`;case`capture`:return`bg-emerald-500/15 border border-emerald-500/20`;case`cli`:return`bg-purple-500/15 border border-purple-500/20`;case`inline`:return`bg-amber-500/15 border border-amber-500/20`;case`suite`:return`bg-cyan-500/15 border border-cyan-500/20`;case`hook`:return`bg-orange-500/15 border border-orange-500/20`;case`step`:return`bg-teal-500/15 border border-teal-500/20`;case`runJS`:return`bg-yellow-500/15 border border-yellow-500/20`;case`runHook`:return`bg-orange-600/15 border border-orange-600/20`;case`secret`:return`bg-rose-500/15 border border-rose-500/20`;default:return`bg-accent/20 border border-accent/20`}}function c(e){let t=/\[secret:(\w+)\]/g,n=[],r=0,i;for(;(i=t.exec(e))!==null;){let[t,a]=i;i.index>r&&n.push({type:`text`,value:e.slice(r,i.index)}),n.push({type:`pill`,resolvedValue:t,varName:a,namespace:`secret`,templateSyntax:`{{secret:${a}}}`}),r=i.index+t.length}return r<e.length&&n.push({type:`text`,value:e.slice(r)}),n.length>0?n:[{type:`text`,value:e}]}function l(e,t,n){let r=/\{\{(\w+):([^}]*(?:\{[^}]*\}[^}]*)*)\}\}/g,i=[],a;for(;(a=r.exec(e))!==null;)i.push({index:a.index,fullMatch:a[0],namespace:a[1],key:a[2]});if(i.length===0)return t.length>0?[{type:`text`,value:t}]:[];let o=[],s=0;for(let t of i)t.index>s&&o.push({kind:`literal`,text:e.slice(s,t.index)}),t.namespace===`env`?o.push({kind:`env`,varName:t.key,templateSyntax:t.fullMatch}):t.namespace===`secret`?o.push({kind:`secret`,varName:t.key,templateSyntax:t.fullMatch}):o.push({kind:`other`,templateSyntax:t.fullMatch}),s=t.index+t.fullMatch.length;s<e.length&&o.push({kind:`literal`,text:e.slice(s)});let c=[],l=0;for(let e=0;e<o.length;e++){let r=o[e];if(r.kind===`literal`){let e=t.indexOf(r.text,l);e>=0&&(e>l&&c.push({type:`text`,value:t.slice(l,e)}),r.text.length>0&&c.push({type:`text`,value:r.text}),l=e+r.text.length)}else if(r.kind===`env`){let e=n?.[r.varName]?.value??null,i=e??r.templateSyntax,a=t.indexOf(i,l);a>=0&&(a>l&&c.push({type:`text`,value:t.slice(l,a)}),e===null?c.push({type:`text`,value:r.templateSyntax}):c.push({type:`pill`,resolvedValue:i,varName:r.varName,namespace:`env`,templateSyntax:r.templateSyntax}),l=a+i.length)}else if(r.kind===`secret`){let e=`[secret:${r.varName}]`,n=t.indexOf(e,l),i=t.indexOf(r.templateSyntax,l),a=n>=0&&(i===-1||n<=i)?e:r.templateSyntax,o=t.indexOf(a,l);o>=0?(o>l&&c.push({type:`text`,value:t.slice(l,o)}),c.push({type:`pill`,resolvedValue:e,varName:r.varName,namespace:`secret`,templateSyntax:r.templateSyntax}),l=o+a.length):c.push({type:`pill`,resolvedValue:e,varName:r.varName,namespace:`secret`,templateSyntax:r.templateSyntax})}else if(r.kind===`other`){let i=t.length;for(let r=e+1;r<o.length;r++){let e=o[r];if(e.kind===`literal`){let n=t.indexOf(e.text,l);if(n>=0){i=n;break}}else if(e.kind===`env`){let r=n?.[e.varName]?.value;if(r){let e=t.indexOf(r,l);if(e>=0){i=e;break}}}else if(e.kind===`secret`){let n=`[secret:${e.varName}]`,r=t.indexOf(n,l),a=t.indexOf(e.templateSyntax,l),o=r>=0&&(a===-1||r<=a)?r:a;if(o>=0){i=o;break}}}let a=t.slice(l,i),s=r.templateSyntax.match(/^\{\{(\w+):(.+)\}\}$/),u=s?.[1]??`unknown`,d=s?.[2]??r.templateSyntax;c.push({type:`pill`,resolvedValue:a,varName:d,namespace:u,templateSyntax:r.templateSyntax}),l=i}}return l<t.length&&c.push({type:`text`,value:t.slice(l)}),c}function u({step:r}){return(0,a.jsx)(`span`,{className:`flex-1 min-w-0 text-sm break-all`,children:(r.originalStepName?l(r.originalStepName,r.name,r.variableSnapshot):c(r.name)).map((c,l)=>{if(c.type===`text`)return(0,a.jsx)(`span`,{children:c.value},l);let u=r.variableSnapshot?.[c.varName],d=u?o[u.source]??u.source:o[c.namespace]??c.namespace;return(0,a.jsxs)(e,{children:[(0,a.jsx)(t,{asChild:!0,children:(0,a.jsx)(`span`,{className:n(`rounded-sm px-1 py-px cursor-default`,s(u?.source??c.namespace)),"aria-label":`variable: ${c.varName}`,children:c.resolvedValue})}),(0,a.jsx)(i,{className:`max-w-xs`,children:(0,a.jsxs)(`div`,{className:`space-y-1`,children:[(0,a.jsx)(`div`,{className:`text-xs font-medium`,children:c.varName}),(0,a.jsx)(`div`,{className:`text-[10px] font-mono text-muted-foreground`,children:c.templateSyntax}),(0,a.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:c.resolvedValue}),(0,a.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:d})]})})]},l)})})}export{u as n,s as r,o as t};
1
+ import{Mt as e,Pt as t,Qn as n,Wt as r,jt as i}from"./index-Bvtm2F6f.js";var a=n(),o={env:`env (.env file)`,inline:`inline (test config)`,suite:`suite (suite config)`,cli:`cli (--var flag)`,capture:`capture (captured from screen)`,hook:`hook (hook output)`,step:`step (set by agent)`,runJS:`runJS (inline JavaScript)`,runHook:`runHook uses the stable hook ID from the configured hooks file`,secret:`secret (runtime only)`};function s(e){switch(e){case`env`:return`bg-blue-500/15 border border-blue-500/20`;case`capture`:return`bg-emerald-500/15 border border-emerald-500/20`;case`cli`:return`bg-purple-500/15 border border-purple-500/20`;case`inline`:return`bg-amber-500/15 border border-amber-500/20`;case`suite`:return`bg-cyan-500/15 border border-cyan-500/20`;case`hook`:return`bg-orange-500/15 border border-orange-500/20`;case`step`:return`bg-teal-500/15 border border-teal-500/20`;case`runJS`:return`bg-yellow-500/15 border border-yellow-500/20`;case`runHook`:return`bg-orange-600/15 border border-orange-600/20`;case`secret`:return`bg-rose-500/15 border border-rose-500/20`;default:return`bg-accent/20 border border-accent/20`}}function c(e){let t=/\[secret:(\w+)\]/g,n=[],r=0,i;for(;(i=t.exec(e))!==null;){let[t,a]=i;i.index>r&&n.push({type:`text`,value:e.slice(r,i.index)}),n.push({type:`pill`,resolvedValue:t,varName:a,namespace:`secret`,templateSyntax:`{{secret:${a}}}`}),r=i.index+t.length}return r<e.length&&n.push({type:`text`,value:e.slice(r)}),n.length>0?n:[{type:`text`,value:e}]}function l(e,t,n){let r=/\{\{(\w+):([^}]*(?:\{[^}]*\}[^}]*)*)\}\}/g,i=[],a;for(;(a=r.exec(e))!==null;)i.push({index:a.index,fullMatch:a[0],namespace:a[1],key:a[2]});if(i.length===0)return t.length>0?[{type:`text`,value:t}]:[];let o=[],s=0;for(let t of i)t.index>s&&o.push({kind:`literal`,text:e.slice(s,t.index)}),t.namespace===`env`?o.push({kind:`env`,varName:t.key,templateSyntax:t.fullMatch}):t.namespace===`secret`?o.push({kind:`secret`,varName:t.key,templateSyntax:t.fullMatch}):o.push({kind:`other`,templateSyntax:t.fullMatch}),s=t.index+t.fullMatch.length;s<e.length&&o.push({kind:`literal`,text:e.slice(s)});let c=[],l=0;for(let e=0;e<o.length;e++){let r=o[e];if(r.kind===`literal`){let e=t.indexOf(r.text,l);e>=0&&(e>l&&c.push({type:`text`,value:t.slice(l,e)}),r.text.length>0&&c.push({type:`text`,value:r.text}),l=e+r.text.length)}else if(r.kind===`env`){let e=n?.[r.varName]?.value??null,i=e??r.templateSyntax,a=t.indexOf(i,l);a>=0&&(a>l&&c.push({type:`text`,value:t.slice(l,a)}),e===null?c.push({type:`text`,value:r.templateSyntax}):c.push({type:`pill`,resolvedValue:i,varName:r.varName,namespace:`env`,templateSyntax:r.templateSyntax}),l=a+i.length)}else if(r.kind===`secret`){let e=`[secret:${r.varName}]`,n=t.indexOf(e,l),i=t.indexOf(r.templateSyntax,l),a=n>=0&&(i===-1||n<=i)?e:r.templateSyntax,o=t.indexOf(a,l);o>=0?(o>l&&c.push({type:`text`,value:t.slice(l,o)}),c.push({type:`pill`,resolvedValue:e,varName:r.varName,namespace:`secret`,templateSyntax:r.templateSyntax}),l=o+a.length):c.push({type:`pill`,resolvedValue:e,varName:r.varName,namespace:`secret`,templateSyntax:r.templateSyntax})}else if(r.kind===`other`){let i=t.length;for(let r=e+1;r<o.length;r++){let e=o[r];if(e.kind===`literal`){let n=t.indexOf(e.text,l);if(n>=0){i=n;break}}else if(e.kind===`env`){let r=n?.[e.varName]?.value;if(r){let e=t.indexOf(r,l);if(e>=0){i=e;break}}}else if(e.kind===`secret`){let n=`[secret:${e.varName}]`,r=t.indexOf(n,l),a=t.indexOf(e.templateSyntax,l),o=r>=0&&(a===-1||r<=a)?r:a;if(o>=0){i=o;break}}}let a=t.slice(l,i),s=r.templateSyntax.match(/^\{\{(\w+):(.+)\}\}$/),u=s?.[1]??`unknown`,d=s?.[2]??r.templateSyntax;c.push({type:`pill`,resolvedValue:a,varName:d,namespace:u,templateSyntax:r.templateSyntax}),l=i}}return l<t.length&&c.push({type:`text`,value:t.slice(l)}),c}function u({step:n}){return(0,a.jsx)(`span`,{className:`flex-1 min-w-0 text-sm break-all`,children:(n.originalStepName?l(n.originalStepName,n.name,n.variableSnapshot):c(n.name)).map((c,l)=>{if(c.type===`text`)return(0,a.jsx)(`span`,{children:c.value},l);let u=n.variableSnapshot?.[c.varName],d=u?o[u.source]??u.source:o[c.namespace]??c.namespace;return(0,a.jsxs)(i,{children:[(0,a.jsx)(t,{asChild:!0,children:(0,a.jsx)(`span`,{className:r(`rounded-sm px-1 py-px cursor-default`,s(u?.source??c.namespace)),"aria-label":`variable: ${c.varName}`,children:c.resolvedValue})}),(0,a.jsx)(e,{className:`max-w-xs`,children:(0,a.jsxs)(`div`,{className:`space-y-1`,children:[(0,a.jsx)(`div`,{className:`text-xs font-medium`,children:c.varName}),(0,a.jsx)(`div`,{className:`text-[10px] font-mono text-muted-foreground`,children:c.templateSyntax}),(0,a.jsx)(`div`,{className:`text-xs text-muted-foreground truncate`,children:c.resolvedValue}),(0,a.jsx)(`div`,{className:`text-xs text-muted-foreground`,children:d})]})})]},l)})})}export{u as n,s as r,o as t};
@@ -0,0 +1,5 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{c as t}from"./id-badge-NwZYoNfB.js";import{t as n}from"./monaco-editor-DNT0Mzki.js";import{n as r}from"./split-button-DcY8ames.js";import{a as i,c as a,i as ee,n as o,o as te,r as ne,s,t as c}from"./filename-validation-4sTTEagx.js";import{t as re}from"./use-page-title-B1t9-5_U.js";import{a as ie,n as ae}from"./dist-m_OM4Je_.js";import{i as oe,n as se,r as ce,t as le}from"./tabs-DrB_Acb3.js";import{$n as l,At as u,Bn as ue,Bt as de,D as fe,E as pe,Et as me,Ht as he,It as ge,Lt as _e,Mt as d,Ot as ve,Pt as f,Qn as ye,Rt as be,S as xe,St as Se,V as Ce,Vn as we,Yt as Te,cr as Ee,jt as p,lr as De,ot as Oe,pr as ke,r as Ae,ur as je,zt as Me}from"./index-Bvtm2F6f.js";import{n as m,r as Ne,t as Pe}from"./resizable-BGEcNRZO.js";import{t as Fe}from"./empty-state-BTvOA5lp.js";import{t as Ie}from"./use-keyboard-shortcuts-EAppuiKO.js";import{i as Le,n as Re,r as ze,t as Be}from"./suite-navbar-PStktQ6j.js";var h=e(ke(),1);function Ve(e,t){return c(e,t,`suiteMatch`)}var g=ye(),He=`name: My Suite
2
+ target: ""
3
+ tests: []
4
+ `;function Ue(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function We(e){return e instanceof DOMException&&e.name===`AbortError`||e instanceof Error&&e.name===`AbortError`}function Ge({text:e}){return(0,g.jsxs)(p,{children:[(0,g.jsx)(f,{asChild:!0,children:(0,g.jsx)(ue,{className:`h-3 w-3 text-muted-foreground/40 hover:text-muted-foreground/70 transition-colors cursor-help`})}),(0,g.jsx)(d,{className:`max-w-[250px] text-[13px]`,children:e})]})}function _(){let e=De()[`suite-id`]??``,c=Ee(),[ue]=je(),d=Te(),{defaultRunMode:f}=r(),{targets:ye,globalUse:p,isLoading:ke}=t(),_=!e,Ke=ue.get(`live`)===`1`,v=(0,h.useRef)(null),y=(0,h.useRef)(null),qe=(0,h.useRef)(()=>{}),Je=(0,h.useRef)(!1),b=(0,h.useRef)(null),x=(0,h.useRef)(null),[S,C]=(0,h.useState)(_?He:``),[Ye,Xe]=(0,h.useState)(``),[w,Ze]=(0,h.useState)(``),[T,Qe]=(0,h.useState)(!_),[$e,et]=(0,h.useState)(!1),[tt,nt]=(0,h.useState)(!1),[rt,it]=(0,h.useState)(!1),[at,ot]=(0,h.useState)(!1),[E,st]=(0,h.useState)(null),[ct,lt]=(0,h.useState)(!1),[ut,dt]=(0,h.useState)(!1),[D,ft]=(0,h.useState)([]),[O,k]=(0,h.useState)(null),[A,j]=(0,h.useState)(null),[M,N]=(0,h.useState)(!1),[P,F]=(0,h.useState)(!1),[I,L]=(0,h.useState)(null),[pt,R]=(0,h.useState)(`reasoning`),[mt,z]=(0,h.useState)(null),[B,V]=(0,h.useState)({setup:[],teardown:[]}),[H,ht]=(0,h.useState)(``),gt=!_&&S!==Ye,_t=_&&w?Ve(w.trim(),D):null,U=_&&!!w&&!!_t,{suggestions:vt}=o(null),yt=(0,h.useMemo)(()=>vt.filter(e=>e.namespace!==`capture`),[vt]),W=(0,h.useMemo)(()=>ze(S),[S]),bt=W?.suiteId??``,xt=W?.name||(_?`New Suite`:H),G=ee(O,{tests:(0,h.useMemo)(()=>W?W.tests.map(e=>({draftId:e.id,testId:e.id,path:e.test,name:e.test.split(`/`).pop()??e.test,steps:[],setup:[],teardown:[]})):[],[W]),setupHooks:B.setup,teardownHooks:B.teardown,allowReconnect:!1}),K=G.terminateSession;y.current=O,qe.current=K;let St=W?.target?.trim()??``,q=P?`connecting`:G.connectionState,J=O!==null,Y=J&&W!==null&&(!Ue(W.setup??[],B.setup)||!Ue(W.teardown??[],B.teardown)),Ct=J&&q===`connected`&&W!==null&&W.tests.length>0,wt=P||J,Tt=P||J||at||E!==null||_||W===null||!W?.target.trim()||ke;re((0,h.useMemo)(()=>J&&A!==null?`Live #${A} — ${W?.name?.trim()||xt||`Suite`}`:_?`New Suite`:`Edit Suite`,[J,A,W?.name,xt,_]));let X=(0,h.useMemo)(()=>{if(W)return{suiteName:W.name,suiteContext:W.context||void 0}},[W]),Et=(0,h.useMemo)(()=>I===`ended`?{reason:`ended`,title:`Live session ended`,description:`The current draft is unchanged. Close live mode or start a fresh disposable session from this target.`}:I===`disconnected`?{reason:`disconnected`,title:`Live session disconnected`,description:`The connection dropped and the disposable session was terminated. Start a fresh session to reconnect.`}:null,[I]);(0,h.useEffect)(()=>{if(_)return;let t=!1;return Oe(e).then(e=>{t||(C(e.content),Xe(e.content),ht(e.path),Qe(!1))}).catch(()=>{t||(et(!0),Qe(!1))}),()=>{t=!0}},[e,_]),(0,h.useEffect)(()=>{let e=!1;return Ce().then(t=>{if(e)return;let n=t.config?.workspace?.suiteMatch;Array.isArray(n)&&ft(n)}).catch(()=>{}),()=>{e=!0}},[]),(0,h.useEffect)(()=>{_&&C(e=>Le(e,[`suite-id`],ae()))},[_]),(0,h.useEffect)(()=>{if(_||T)return;let e=ze(S);e&&!e.suiteId&&C(e=>Le(e,[`suite-id`],ae()))},[_,T,Ye]);let Z=(0,h.useCallback)(async()=>{nt(!0);try{if(_){let e=Ve(w.trim(),D);if(e){u.error(e);return}await fe(w.trim(),S),u.success(`Suite file created`);let t=W?.suiteId??``;if(!t){u.error(`Created suite is missing suite-id; please reload`);return}c(l.suiteEdit(t))}else await me(e,S),Xe(S),u.success(`Saved`)}catch(e){e instanceof xe&&e.missingTests&&e.missingTests.length>0?u.error(`Cannot save — referenced tests not found: ${e.missingTests.map(e=>e.test).join(`, `)}`):u.error(`Failed to save: ${e instanceof Error?e.message:String(e)}`)}finally{nt(!1)}},[_,w,D,S,e,W?.suiteId,c]),Dt=(0,h.useCallback)(async()=>{it(!0);try{let e=await ve(S);e.valid?u.success(`Valid suite`):u.error(e.errors.map(e=>e.message).join(`
5
+ `))}catch(e){u.error(`Validation failed: ${e instanceof Error?e.message:String(e)}`)}finally{it(!1)}},[S]),Ot=(0,h.useCallback)(async e=>{if(!_){ot(!0);try{st((await Se({file:H,local:e})).runId),u.success(`Suite run started`)}catch(e){u.error(`Failed to start run: ${e instanceof Error?e.message:String(e)}`)}finally{ot(!1)}}},[_,H]),kt=(0,h.useCallback)(()=>st(null),[]),At=(0,h.useCallback)(()=>{i(`page`,`closing live mode`,{liveSessionId:O??void 0,terminalReason:I??void 0}),v.current?.abort(),v.current=null,O&&K(),F(!1),k(null),j(null),L(null),z(null),b.current=null,x.current=null,V({setup:[],teardown:[]}),N(!1)},[O,I,K]),jt=(0,h.useCallback)(()=>{i(`page`,`ending live session from UI`,{liveSessionId:O??void 0}),v.current?.abort(),v.current=null,O&&K(),F(!1),k(null),j(null),L(`ended`),z(null),b.current=null,x.current=null,V({setup:[],teardown:[]}),N(!1)},[O,K]),Q=(0,h.useCallback)(async(e,t)=>{let n=e.target.trim();if(!n){u.error(`Select a target before starting live mode`);return}let r=new AbortController;v.current?.abort(),v.current=r,N(!0),L(null),R(`reasoning`),z(null),b.current=null,x.current=null,F(!0);try{t?.replaceCurrentSession&&y.current&&(K(),k(null),j(null));let a=ne({content:S,targetName:n,targets:ye,globalUse:p});i(`page`,`requesting live session`,{targetName:n,platform:a.platform,headless:a.headless??void 0,replacingSession:t?.replaceCurrentSession??!1});let ee=[...e.setup??[]],o=[...e.teardown??[]],te=e.suiteId?{type:`suite`,id:e.suiteId}:void 0,{sessionId:s,sessionNumber:c}=await pe({...a,setupHooks:ee,teardownHooks:o,entity:te},r.signal);if(r.signal.aborted)return;V({setup:ee,teardown:o}),k(s),j(c),i(`page`,`live session created`,{sessionId:s,targetName:n})}catch(e){We(e)||(i(`page`,`failed to create live session`,{error:e instanceof Error?e.message:String(e),targetName:n}),u.error(e instanceof Error?e.message:`Failed to start live session`)),t?.replaceCurrentSession||N(!1)}finally{v.current===r&&(v.current=null),F(!1)}},[S,p,ye,K]),$=(0,h.useCallback)(async()=>{if(!Tt){if(!W){u.error(`Fix YAML errors before starting live mode`);return}await Q(W)}},[W,Q,Tt]),Mt=(0,h.useCallback)(async()=>{if(J){if(!W){u.error(`Fix YAML errors before restarting live mode`);return}await Q(W,{replaceCurrentSession:!0})}},[W,J,Q]),Nt=(0,h.useCallback)(e=>{if(e){N(!0);return}At()},[At]),Pt=(0,h.useCallback)((e,t)=>{if(!J){u.error(`Start a live session first.`);return}let n=(e===`setup`?G.setupHooks:G.teardownHooks).find(e=>e.id===t);n&&z({type:`suite-hook`,phase:e,hookId:n.id}),R(`reasoning`),G.executeHookById(e,t)},[J,G]),Ft=(0,h.useCallback)(e=>{z({type:`test`,testIndex:e}),R(`reasoning`),G.executeTestByIndex(e,X)},[X,G]);if((0,h.useEffect)(()=>()=>{v.current?.abort(),y.current&&qe.current()},[]),(0,h.useEffect)(()=>{O&&q===`disconnected`&&(i(`page`,`live session moved to terminal state`,{liveSessionId:O,liveConnectionState:q}),k(null),j(null),F(!1),L(`disconnected`),z(null),b.current=null,x.current=null,V({setup:[],teardown:[]}),N(!0))},[q,O]),(0,h.useEffect)(()=>{if(!M||G.runningTestIndex===null)return;let e=`${G.tests[G.runningTestIndex]?.testExecutionId??`pending`}:${G.runningTestIndex}`;b.current!==e&&(b.current=e,z({type:`test`,testIndex:G.runningTestIndex}),R(`reasoning`))},[G.runningTestIndex,G.tests,M]),(0,h.useEffect)(()=>{if(!M||G.runningTestIndex!==null)return;let e=G.tests.map((e,t)=>({index:t,test:e})).filter(({test:e})=>e.status===`failed`).sort((e,t)=>(t.test.lastRunAt??``).localeCompare(e.test.lastRunAt??``))[0];if(!e)return;let t=e.test.testExecutionId??e.test.lastRunAt??`failed:${e.index}`;x.current!==t&&(x.current=t,z({type:`test`,testIndex:e.index}),R(`reasoning`))},[G.runningTestIndex,G.tests,M]),(0,h.useEffect)(()=>{!Ke||Je.current||_||T||$e||P||M||J||!W||!W.target.trim()||(Je.current=!0,c(l.suiteEdit(e),{replace:!0}),$())},[W,$,J,_,P,T,M,c,$e,e,Ke]),Ie((0,h.useMemo)(()=>({r:()=>{_||Ot(f===`local`)},escape:()=>{E&&kt()}}),[_,E,Ot,kt,f])),(0,h.useEffect)(()=>{function e(e){(e.metaKey||e.ctrlKey)&&e.key===`s`&&(e.preventDefault(),Z())}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[Z]),T)return(0,g.jsx)(Ae,{});if($e)return(0,g.jsx)(Fe,{icon:we,title:`Suite not found`,description:`This suite doesn't exist`,actionLabel:`View All Suites`,onAction:()=>c(l.suites)});let It=(0,g.jsxs)(le,{defaultValue:`builder`,className:`flex-1 flex min-h-0 flex-col`,children:[(0,g.jsxs)(ce,{variant:`line`,className:`px-4`,children:[(0,g.jsx)(oe,{value:`builder`,children:`Builder`}),(0,g.jsx)(oe,{value:`yaml`,children:`YAML`})]}),(0,g.jsx)(se,{value:`builder`,className:`mt-2 flex-1 overflow-auto [&::-webkit-scrollbar]:w-1.5 [&::-webkit-scrollbar-thumb]:bg-border [&::-webkit-scrollbar-thumb]:rounded-full [&::-webkit-scrollbar-thumb:hover]:bg-muted-foreground/50 [&::-webkit-scrollbar-track]:bg-transparent [scrollbar-width:thin]`,children:(0,g.jsx)(Re,{content:S,onChange:C,suggestions:yt,isCreateMode:_,liveMode:M,liveTests:G.tests,liveSetupHooks:G.setupHooks,liveTeardownHooks:G.teardownHooks,runningTestIndex:G.runningTestIndex,canRunTest:J&&G.connectionState===`connected`,canRunAll:Ct,isRunningAll:G.isRunningAllTests,isStoppingRunAll:G.isStoppingRunAllTests,onRunTest:Ft,onCancelTest:e=>{G.runningTestIndex===e&&G.cancelStep()},onRunAll:()=>void G.runAllTests(X),onStopAll:G.cancelRunAllTests,setupHooksStale:Y,onRestartSession:Y?()=>void Mt():void 0,selection:mt,onSelect:z,onRunLiveHook:Pt})}),(0,g.jsx)(se,{value:`yaml`,className:`flex-1 min-h-0 mt-2`,children:(0,g.jsx)(n,{value:S,onChange:C,onSave:Z,className:`h-full`,filePath:H||void 0})})]}),Lt=(0,g.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[_&&(0,g.jsx)(`div`,{className:`px-4 pt-3`,children:(0,g.jsxs)(`div`,{className:`rounded-md border bg-muted/15 px-3 py-2`,children:[(0,g.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,g.jsxs)(ie,{className:`flex items-center gap-1 text-xs font-medium`,children:[`File Path `,(0,g.jsx)(Ge,{text:`Path is relative to your workspace root. Must match your workspace's suiteMatch pattern. Directories are created automatically on save.`})]}),(0,g.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`Created only when you save`})]}),(0,g.jsx)(he,{placeholder:`my-suite.suite.yaml`,value:w,onChange:e=>Ze(e.target.value),className:`mt-2 max-w-md h-8 text-sm font-mono ${U?`border-red-500 focus-visible:ring-red-500`:``}`}),U&&(0,g.jsx)(`p`,{className:`mt-1 text-xs text-red-500`,children:_t})]})}),It]}),Rt=(0,g.jsx)(te,{connectionState:G.connectionState,isLaunching:P,targetName:St||`Selected Target`,targetLabel:G.currentUrl||`Configured start URL`,liveSessionNumber:A,platform:G.platform,screenshot:G.screenshot,currentUrl:G.currentUrl,pendingNavigation:G.pendingNavigation,steps:G.steps,setupHooks:G.setupHooks,teardownHooks:G.teardownHooks,tests:G.tests,selection:mt,runningStepId:G.runningStepId,terminalState:Et,draftState:W===null?`invalid`:gt||_?`unsaved`:`saved`,ariaTree:G.ariaTree,errorMessage:G.error,devtoolsTab:pt,canRunAll:Ct,isRunningAll:G.isRunningAllTests,isStoppingRunAll:G.isStoppingRunAllTests,setupHooksStale:Y,executionUnit:`test`,runAllLabel:`Run All Tests`,stopAllLabel:`Stop Run All`,unitRowsSlot:null,onDevtoolsTabChange:R,onRunAll:()=>void G.runAllTests(X),onStopAll:G.cancelRunAllTests,onEndSession:jt,onRestartSession:Y?()=>void Mt():void 0,showEndSessionAction:d,onCloseLiveMode:At,onStartFreshSession:()=>void $(),onBack:G.goBack,onForward:G.goForward,onRefresh:G.refreshPage,onNavigate:G.navigate,onRequestAriaTree:G.requestAriaTree});return(0,g.jsxs)(`div`,{className:`flex h-screen flex-col`,children:[(0,g.jsx)(Be,{suiteName:xt,suiteId:bt,unsaved:gt,isCreateMode:_,mode:`edit`,suiteHref:_?void 0:l.suiteView(e),isSaving:tt,isValidating:rt,isRunning:at,runDisabled:wt,hasInvalidFilename:U,shortcutsOpen:ut,hasLiveSession:J,liveConnectionState:q,isLiveActionDisabled:Tt,liveSessionNumber:A,onBack:()=>c(l.suites),onSave:Z,onValidate:Dt,onRun:Ot,onLiveConnect:M?void 0:$,onLiveEnd:J?jt:void 0,onSettingsOpen:()=>lt(!0),onToggleShortcuts:()=>dt(e=>!e)}),E?(0,g.jsxs)(Ne,{orientation:`horizontal`,className:`flex-1 rounded-md border border-border`,children:[(0,g.jsx)(m,{defaultSize:60,minSize:30,children:(0,g.jsx)(n,{value:S,onChange:C,onSave:Z,className:`h-full`})}),(0,g.jsx)(Pe,{withHandle:!0}),(0,g.jsx)(m,{defaultSize:40,minSize:25,children:(0,g.jsx)(s,{runId:E,onClose:kt})})]}):M&&!d?(0,g.jsxs)(Ne,{orientation:`horizontal`,className:`flex-1 rounded-md border border-border`,children:[(0,g.jsx)(m,{defaultSize:45,minSize:30,children:Lt}),(0,g.jsx)(Pe,{withHandle:!0}),(0,g.jsx)(m,{defaultSize:55,minSize:40,children:Rt})]}):Lt,(0,g.jsx)(ge,{open:ct,onOpenChange:lt,children:(0,g.jsxs)(_e,{side:`right`,className:`sm:max-w-[400px] overflow-y-auto p-0`,children:[(0,g.jsxs)(Me,{className:`px-4 pt-4 pb-2`,children:[(0,g.jsx)(de,{children:`Suite Settings`}),(0,g.jsx)(be,{children:`Advanced configuration for this suite`})]}),(0,g.jsx)(`div`,{className:`px-4 pb-4`,children:(0,g.jsx)(a,{content:S,onChange:C,selectedTarget:W?.target,showMeta:!1})})]})}),d&&(0,g.jsx)(ge,{open:M,onOpenChange:Nt,children:(0,g.jsxs)(_e,{side:`bottom`,showCloseButton:!1,className:`h-[100dvh] max-h-[100dvh] rounded-none p-0`,children:[(0,g.jsxs)(Me,{className:`sr-only`,children:[(0,g.jsx)(de,{children:`Live Session`}),(0,g.jsx)(be,{children:`Live execution workspace for the current suite draft.`})]}),Rt]})})]})}export{_ as default};
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{i as t,n,o as r,s as i,t as a}from"./select-CeVjgiKI.js";import{t as o}from"./circle-alert-BKX0IIz1.js";import{C as s,S as c,_ as l,a as u,b as d,c as f,d as p,f as m,g as h,h as g,l as _,m as v,n as y,o as b,p as x,r as S,s as C,t as w,u as T,v as E,w as D,x as ee,y as te}from"./id-badge-NwZYoNfB.js";import{n as ne,r as O}from"./monaco-editor-DNT0Mzki.js";import{t as re}from"./circle-x-yPIxYoz1.js";import{c as ie,t as k}from"./split-button-DcY8ames.js";import{t as ae}from"./grip-vertical-A-AANrBM.js";import{n as A,r as j,t as M}from"./shortcut-hints-Bs5o743i.js";import{t as oe}from"./plus-pXO98OAE.js";import{t as N}from"./refresh-cw-C_0AkMuu.js";import{n as P,t as F}from"./textarea-DChEVvwQ.js";import{t as I}from"./square-D71GHEET.js";import{a as L,n as R}from"./dist-m_OM4Je_.js";import{n as z,r as B,t as V}from"./popover-DGZi688D.js";import{Bn as H,Fn as se,Ht as ce,Mt as U,Nn as le,Pn as W,Pt as G,Qn as ue,Rn as de,Un as K,Ut as q,Wn as J,Wt as Y,c as fe,d as pe,dt as me,jt as X,l as he,o as ge,pr as _e,s as ve,sr as Z,u as ye,zn as be}from"./index-Bvtm2F6f.js";import{t as xe}from"./badge-DrW2vGVJ.js";import{t as Se}from"./display-step-NqsJgW_B.js";var Q=e(_e(),1),$=ue();function Ce({text:e}){return(0,$.jsxs)(X,{children:[(0,$.jsx)(G,{asChild:!0,children:(0,$.jsx)(H,{className:`h-3 w-3 text-muted-foreground/40 hover:text-muted-foreground/70 transition-colors cursor-help`})}),(0,$.jsx)(U,{className:`max-w-[250px] text-[13px]`,children:e})]})}function we({name:e,suiteId:o,target:c,context:l,isCreateMode:d,suggestions:p,hookLabels:m={},onChange:h,disabled:g=!1}){let{targets:v,isLoading:y}=_(),{targets:x}=f(),S=c?x[c]:void 0,w=(0,Q.useRef)(null),[T,E]=(0,Q.useState)(0),D=u({text:l,cursorPos:T,suggestions:p,anchorRef:w,onInsert:(e,t,n)=>{h(`context`,l.slice(0,t)+e+l.slice(n)),requestAnimationFrame(()=>w.current?.focus())}}),ee=!y&&v.length>0;return(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsxs)(L,{htmlFor:`suite-name`,className:`text-xs flex items-center gap-1`,children:[`Suite Name `,(0,$.jsx)(`span`,{className:`text-destructive`,children:`*`})]}),(0,$.jsx)(ce,{id:`suite-name`,value:e,onChange:e=>h(`name`,e.target.value),placeholder:`My Suite`,required:!0,disabled:g,className:`h-8 text-sm`})]}),(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsxs)(L,{htmlFor:`suite-id`,className:`text-xs flex items-center gap-1`,children:[`Suite ID `,(0,$.jsx)(Ce,{text:`Unique identifier used for memory and analytics. Changing this breaks the association with past runs and observations.`})]}),d?(0,$.jsxs)(`div`,{className:`relative`,children:[(0,$.jsx)(ce,{id:`suite-id`,value:o,readOnly:!0,disabled:!0,className:`h-8 text-sm font-mono pr-9`}),(0,$.jsx)(q,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:()=>h(`suite-id`,R()),"aria-label":`Generate new ID`,disabled:g,className:`absolute right-1 top-1/2 -translate-y-1/2 h-6 w-6`,children:(0,$.jsx)(N,{className:`size-3.5`})})]}):(0,$.jsx)(`p`,{className:`text-[13px] font-mono text-muted-foreground`,children:o||`No ID assigned`})]}),(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsxs)(L,{htmlFor:`suite-target`,className:`text-xs flex items-center gap-1`,children:[`Target `,(0,$.jsx)(`span`,{className:`text-destructive`,children:`*`}),` `,(0,$.jsx)(Ce,{text:`A registered app target from your workspace config. Defines where the suite runs (web URL or mobile app).`})]}),ee?(0,$.jsxs)(a,{value:c||void 0,onValueChange:e=>h(`target`,e),disabled:g,children:[(0,$.jsx)(r,{id:`suite-target`,className:`w-full h-8 text-sm`,children:(0,$.jsx)(i,{placeholder:`Select a target`})}),(0,$.jsx)(n,{children:v.map(e=>(0,$.jsx)(t,{value:e,children:e},e))})]}):y?null:(0,$.jsxs)(`p`,{className:`text-[13px] text-muted-foreground`,children:[`No targets configured.`,` `,(0,$.jsx)(Z,{to:`/config`,className:`text-primary underline underline-offset-4 hover:text-primary/80`,children:`Add targets in Settings.`})]}),S&&(0,$.jsxs)(`div`,{className:`flex items-center gap-1.5 text-[13px] text-muted-foreground mt-1.5`,children:[S.platform===`web`?(0,$.jsx)(ie,{className:`h-3.5 w-3.5 shrink-0`}):(0,$.jsx)(s,{className:`h-3.5 w-3.5 shrink-0`}),(0,$.jsx)(`span`,{className:`text-muted-foreground/70 uppercase text-[11px] tracking-wider shrink-0`,children:S.platform}),(0,$.jsxs)(`span`,{className:`font-mono truncate`,children:[S.product&&(0,$.jsx)(`span`,{className:`mr-1.5`,children:S.product}),S.platform===`web`&&S.url,S.platform===`android`&&`${S.appPackage}${S.appActivity?` / ${S.appActivity}`:``}`,S.platform===`ios`&&S.bundleId]})]})]}),(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsxs)(L,{htmlFor:`suite-context`,className:`text-xs flex items-center gap-1`,children:[`Context `,(0,$.jsx)(Ce,{text:`Additional instructions passed to every test in this suite before its own context. Use this for suite-wide setup notes or shared preconditions.`})]}),(0,$.jsxs)(`div`,{className:`relative`,children:[(0,$.jsx)(F,{ref:w,id:`suite-context`,value:l,onChange:e=>{h(`context`,e.target.value),E(e.target.selectionStart??0)},onKeyDown:e=>{D.handleKeyDown(e)},onBlur:()=>setTimeout(()=>D.setVisible(!1),150),placeholder:`Additional instructions applied to every test in this suite...`,disabled:g,className:`min-h-[60px] resize-none text-sm`,rows:2}),D.dropdown]}),C(l)&&(0,$.jsx)(b,{text:l,hookLabels:m})]})]})}function Te(e){if(e<1e3)return`${Math.round(e)}ms`;let t=e/1e3;return t<10?`${t.toFixed(1)}s`:`${Math.round(t)}s`}function Ee({status:e}){switch(e){case`running`:return(0,$.jsx)(D,{className:`size-3 text-primary`});case`passed`:return(0,$.jsx)(K,{className:`size-3 text-emerald-500`});case`failed`:return(0,$.jsx)(se,{className:`size-3 text-destructive`});default:return(0,$.jsx)(W,{className:`size-3 text-muted-foreground`})}}function De({status:e}){switch(e){case`running`:case`cancelling`:return(0,$.jsx)(D,{className:`size-3 text-primary`});case`passed`:return(0,$.jsx)(K,{className:`size-3 text-emerald-500`});case`failed`:return(0,$.jsx)(re,{className:`size-3 text-red-500`});case`cancelled`:return(0,$.jsx)(I,{className:`size-3 text-amber-500`});default:return(0,$.jsx)(D,{className:`size-3 text-muted-foreground/50`})}}function Oe(e){return e.observation?e.observation:e.reasoning?e.reasoning:e.plannedAction==null?e.verifierReasoning?e.verifierReasoning:e.result:`Planned action captured`}function ke({id:e,name:t,path:n,testId:r,isMissing:i,onRemove:a,disabled:o=!1,actionsLocked:s=!1,sortableDisabled:l=!1,liveMode:u=!1,liveStatus:d=`idle`,liveDuration:f,liveError:p=null,liveSteps:m=[],runningStepIndex:h=null,perTestSetupHooks:g=[],perTestTeardownHooks:_=[],canRunTest:y=!0,onRunTest:b,onCancelTest:x,testIndex:S,selection:C=null,onSelect:w}){let{attributes:T,listeners:E,setNodeRef:ee,transform:te,transition:ne,isDragging:O}=v({id:e,disabled:o||l}),ie={transform:c.Transform.toString(te),transition:ne,opacity:O?.55:1,zIndex:O?10:void 0},k=u&&d===`running`,A=u&&d===`passed`,j=u&&d===`failed`,M=u&&(A||j||u&&d===`cancelled`)&&f!=null,oe=u&&C?.type===`test`&&S!==void 0&&C.testIndex===S,N=u&&g.length+_.length>0,P=u?m.map(e=>({step:e,displayStep:Se(e,e.stepIndex)})):[],F=C&&`stepId`in C?C.stepId:null,L=C?.type===`subaction`?C.subIndex:null;return(0,$.jsxs)(`div`,{ref:ee,style:ie,className:Y(`relative overflow-hidden flex flex-col gap-0.5 rounded-md border bg-card/60 px-3 py-2 hover:bg-card transition-colors`,i&&`border-amber-500/30`,i&&`bg-amber-500/[0.06]`,!i&&`border-border/70`,O&&`shadow-lg ring-2 ring-primary/20`,o&&`opacity-60`,k&&`live-running-surface border-border/60 bg-primary/5`,j&&!k&&`border-destructive/30`,j&&!k&&!oe&&`ring-1 ring-destructive/20`,oe&&!k&&`bg-primary/10 ring-1 ring-primary/30`),children:[(0,$.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,$.jsx)(`button`,{type:`button`,className:`mt-0.5 flex shrink-0 items-center p-0.5 text-muted-foreground/40 hover:text-muted-foreground cursor-grab active:cursor-grabbing touch-none disabled:cursor-not-allowed`,...T,...E,"aria-label":`Reorder ${t}`,"aria-disabled":o||l,disabled:o||l,children:(0,$.jsx)(ae,{className:`size-3.5`})}),k&&(0,$.jsx)(D,{className:`size-4 shrink-0 mt-0.5 text-primary`}),A&&(0,$.jsx)(K,{className:`size-3.5 text-emerald-500 shrink-0 mt-1`}),j&&(0,$.jsx)(re,{className:`size-3.5 text-red-500 shrink-0 mt-1`}),(0,$.jsxs)(`div`,{className:Y(`flex-1 min-w-0 space-y-0.5`,u&&w&&`cursor-pointer`),onClick:u&&w&&S!==void 0?()=>w({type:`test`,testIndex:S}):void 0,children:[(0,$.jsx)(`div`,{className:`text-sm font-medium text-foreground truncate`,children:t}),(0,$.jsx)(`div`,{className:`text-[11px] font-mono text-muted-foreground truncate`,children:n}),(0,$.jsx)(`div`,{className:`text-[10px] font-mono text-muted-foreground/70 truncate`,children:r}),P.length>0&&(0,$.jsx)(`div`,{className:`mt-1.5 space-y-1.5`,children:P.map(({step:e,displayStep:t},n)=>{let r=e.status===`running`||h===e.stepIndex,i=oe&&F===null&&(r||h===null&&n===P.length-1),a=F===e.id||i,o=t.subActionsData??[];return(0,$.jsxs)(`div`,{className:Y(`relative overflow-hidden rounded-sm border bg-background/60`,r?`live-running-surface border-border/60 bg-primary/5`:a?`border-primary/20 bg-primary/10 ring-1 ring-primary/30`:`border-border/60`),children:[(0,$.jsxs)(`button`,{type:`button`,className:`flex w-full min-w-0 items-center gap-2 px-2 py-1.5 text-left`,onClick:t=>{t.stopPropagation(),w?.({type:`step`,stepId:e.id})},"aria-label":`Select step ${e.stepIndex+1} ${e.instruction}`,children:[(0,$.jsx)(De,{status:e.status}),(0,$.jsxs)(`span`,{className:`shrink-0 text-[10px] font-medium uppercase tracking-wide text-muted-foreground`,children:[`Step `,e.stepIndex+1]}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-foreground`,children:e.instruction})]}),(r||a)&&(0,$.jsxs)(`div`,{className:`flex flex-wrap gap-x-2 gap-y-0.5 px-2 pb-1 text-[11px] text-muted-foreground`,children:[r&&(0,$.jsx)(`span`,{children:`Current step`}),a&&(0,$.jsx)(`span`,{children:`Inspecting below`})]}),o.length>0&&(0,$.jsx)(`div`,{className:`space-y-1 border-t border-border/50 px-2 py-1.5`,children:o.map(t=>(0,$.jsxs)(`button`,{type:`button`,className:Y(`flex w-full min-w-0 items-center gap-2 rounded-sm px-1.5 py-1 text-left text-[11px] transition-colors`,a&&L===t.index?`bg-primary/15 text-foreground`:`text-muted-foreground hover:bg-muted/40`),onClick:n=>{n.stopPropagation(),w?.({type:`subaction`,stepId:e.id,subIndex:t.index})},"aria-label":`Select sub-action ${t.index+1} for step ${e.stepIndex+1}`,children:[(0,$.jsxs)(`span`,{className:`shrink-0 font-medium`,children:[`Sub `,t.index+1]}),(0,$.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:Oe(t)})]},`${e.id}-sub-${t.index}`))})]},e.id)})}),i&&(0,$.jsx)(`div`,{className:`text-[11px] text-amber-700 dark:text-amber-300`,children:`This test file no longer exists in your workspace.`})]}),(0,$.jsxs)(`div`,{className:`mt-0.5 flex shrink-0 self-start items-center gap-1`,children:[M&&(0,$.jsx)(`span`,{className:`text-xs leading-none text-muted-foreground whitespace-nowrap shrink-0`,children:Te(f)}),u&&!k&&(0,$.jsx)(q,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:b,disabled:!y||!b||s,className:Y(`text-muted-foreground hover:text-foreground`,(!y||!b||s)&&`text-muted-foreground/30`),"aria-label":d===`idle`?`Run test ${t}`:`Re-run test ${t}`,children:(0,$.jsx)(de,{className:`size-3.5`})}),u&&k&&x&&(0,$.jsx)(q,{type:`button`,variant:`ghost`,size:`icon-sm`,onClick:x,className:`text-muted-foreground hover:text-foreground`,"aria-label":`Cancel test ${t}`,children:(0,$.jsx)(I,{className:`size-3`})}),(0,$.jsx)(q,{type:`button`,variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground hover:text-destructive`,onClick:a,disabled:o||s,"aria-label":`Remove ${t}`,children:(0,$.jsx)(le,{className:`size-3.5`})})]})]}),j&&p&&(0,$.jsxs)(`p`,{className:`text-destructive text-xs mt-1 ml-7 line-clamp-2`,children:[p,` — see Reasoning tab for details`]}),N&&(0,$.jsxs)(`ul`,{className:`mt-1.5 space-y-1 pl-5`,children:[g.map(e=>{let t=C?.type===`test-hook`&&C.hookId===e.id;return(0,$.jsx)(`li`,{children:(0,$.jsxs)(`button`,{type:`button`,onClick:()=>S!==void 0&&w?.({type:`test-hook`,testIndex:S,phase:`setup`,hookId:e.id}),className:Y(`relative flex w-full items-center gap-2 overflow-hidden rounded-sm border px-1.5 py-0.5 text-left transition-colors`,e.status===`running`?`live-running-surface border-border/60 bg-primary/5`:t?`border-primary/20 bg-primary/10 ring-1 ring-primary/30`:`border-transparent bg-transparent hover:bg-muted/40`),children:[(0,$.jsx)(W,{className:`size-3 text-muted-foreground shrink-0`}),(0,$.jsxs)(`span`,{className:`text-xs text-muted-foreground truncate flex-1`,children:[`setup: `,e.name]}),(0,$.jsx)(Ee,{status:e.status})]})},`setup-${e.id}`)}),_.map(e=>{let t=C?.type===`test-hook`&&C.hookId===e.id;return(0,$.jsx)(`li`,{children:(0,$.jsxs)(`button`,{type:`button`,onClick:()=>S!==void 0&&w?.({type:`test-hook`,testIndex:S,phase:`teardown`,hookId:e.id}),className:Y(`relative flex w-full items-center gap-2 overflow-hidden rounded-sm border px-1.5 py-0.5 text-left transition-colors`,e.status===`running`?`live-running-surface border-border/60 bg-primary/5`:t?`border-primary/20 bg-primary/10 ring-1 ring-primary/30`:`border-transparent bg-transparent hover:bg-muted/40`),children:[(0,$.jsx)(W,{className:`size-3 text-muted-foreground shrink-0`}),(0,$.jsxs)(`span`,{className:`text-xs text-muted-foreground truncate flex-1`,children:[`teardown: `,e.name]}),(0,$.jsx)(Ee,{status:e.status})]})},`teardown-${e.id}`)})]})]})}function Ae({availableTests:e,onAdd:t,disabled:n=!1}){return e.length===0?(0,$.jsxs)(`div`,{className:`rounded-md border bg-card/20 p-3 text-sm text-muted-foreground`,children:[`No test files found.`,` `,(0,$.jsx)(Z,{to:`/tests/new`,className:`text-primary underline underline-offset-4 hover:text-primary/80`,children:`Create a test first.`})]}):(0,$.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,$.jsxs)(ge,{className:`rounded-md border`,children:[(0,$.jsx)(he,{placeholder:`Search by test name, path, or ID...`,disabled:n}),(0,$.jsxs)(pe,{className:`max-h-64`,children:[(0,$.jsx)(ve,{children:`No tests match your query.`}),(0,$.jsx)(fe,{children:e.map(e=>(0,$.jsx)(ye,{value:`${e.name} ${e.path} ${e.testId??``}`,onSelect:()=>t({test:e.path,id:e.testId??``}),disabled:n,className:`px-2 py-1.5`,children:(0,$.jsxs)(`div`,{className:`flex flex-col gap-0.5 w-full min-w-0`,children:[(0,$.jsx)(`span`,{className:`text-sm font-medium truncate`,children:e.name}),(0,$.jsx)(`span`,{className:`text-[11px] font-mono text-muted-foreground truncate`,children:e.path}),(0,$.jsx)(`span`,{className:`text-[10px] font-mono text-muted-foreground/70 truncate`,children:e.testId??``})]})},e.path))})]})]}),(0,$.jsx)(`p`,{className:`text-[10px] text-muted-foreground/60`,children:`Type to filter by name, path, or test ID. Click to add. Same test can be added multiple times.`})]})}var je=[`name`,`suite-id`,`target`,`use`,`context`,`setup`,`tests`,`teardown`];function Me(e){function t(e,n){if(S(e)){n?e.items.sort((e,t)=>{let n=je.indexOf(String(e.key)),r=je.indexOf(String(t.key));return(n===-1?je.length:n)-(r===-1?je.length:r)}):e.items.sort((e,t)=>String(e.key).localeCompare(String(t.key)));for(let n of e.items)t(n.value,!1)}}t(e.contents,!0)}function Ne(e){return Me(e),e.toString()}function Pe(e){return Array.isArray(e)?e.filter(e=>typeof e==`string`):[]}function Fe(e){return Array.isArray(e)?e.map(e=>{if(e&&typeof e==`object`&&`test`in e&&`id`in e){let t=e;if(typeof t.test==`string`&&typeof t.id==`string`)return{test:t.test,id:t.id}}return null}).filter(e=>e!==null):[]}function Ie(e){try{let t=y(e);if(t.errors.length>0)return null;let n=t.toJSON();return!n||typeof n!=`object`?null:{name:n.name??``,suiteId:n[`suite-id`]??``,target:n.target??``,context:n.context??``,setup:Pe(n.setup),teardown:Pe(n.teardown),tests:Fe(n.tests)}}catch{return null}}function Le(e,t,n){try{let r=y(e);return n===void 0||Array.isArray(n)&&n.length===0||n===``?r.deleteIn(t):r.setIn(t,n),Ne(r)}catch{return e}}function Re(e,t,n){try{if(t===n||t<0||n<0)return e;let r=y(e),i=Fe(r.toJSON()?.tests);if(t>=i.length||n>=i.length)return e;let a=[...i],[o]=a.splice(t,1);return a.splice(n,0,o),r.setIn([`tests`],a),Ne(r)}catch{return e}}function ze(e,t){try{let n=y(e),r=Fe(n.toJSON()?.tests);return n.setIn([`tests`],[...r,t]),Ne(n)}catch{return e}}function Be(e,t){try{let n=y(e),r=Fe(n.toJSON()?.tests);if(t<0||t>=r.length)return e;let i=r.filter((e,n)=>n!==t);return i.length===0?n.deleteIn([`tests`]):n.setIn([`tests`],i),Ne(n)}catch{return e}}function Ve({text:e}){return(0,$.jsxs)(X,{children:[(0,$.jsx)(G,{asChild:!0,children:(0,$.jsx)(H,{className:`h-3 w-3 text-muted-foreground/40 hover:text-muted-foreground/70 transition-colors cursor-help`})}),(0,$.jsx)(U,{className:`max-w-[250px] text-[13px]`,children:e})]})}function He({status:e}){switch(e){case`running`:return(0,$.jsx)(D,{className:`size-3.5 text-primary`});case`passed`:return(0,$.jsx)(K,{className:`size-3.5 text-emerald-500`});case`failed`:return(0,$.jsx)(se,{className:`size-3.5 text-destructive`});default:return(0,$.jsx)(W,{className:`size-3.5 text-muted-foreground`})}}function Ue(e){return e===`running`||e===`cancelling`}function We(e){return e===`running`||e===`cancelling`}function Ge(e){return e===`running`}function Ke(e){return e.some(e=>Ge(e.status))}function qe(e){return Ue(e.status)||e.runningStepIndex!==null||e.liveSteps.some(e=>We(e.status))||Ke(e.perTestSetupHooks)||Ke(e.perTestTeardownHooks)}function Je({title:e,hooks:t,selection:n,onSelect:r}){return t.length===0?null:(0,$.jsxs)(`div`,{className:`space-y-1`,children:[(0,$.jsx)(`div`,{className:`text-[10px] uppercase tracking-wider font-medium text-muted-foreground`,children:e}),(0,$.jsx)(`ul`,{className:`space-y-1`,children:t.map(e=>{let t=n?.type===`suite-hook`&&n.hookId===e.id;return(0,$.jsx)(`li`,{children:(0,$.jsxs)(`button`,{type:`button`,onClick:()=>r?.({type:`suite-hook`,phase:e.phase,hookId:e.id}),className:Y(`relative flex w-full items-center gap-2 overflow-hidden rounded-md border px-3 py-1.5 text-left transition-colors`,e.status===`running`?`live-running-surface border-border/60 bg-primary/5`:t?`border-primary/20 bg-primary/10 ring-1 ring-primary/30`:`border-border/60 bg-card/40 hover:bg-card/60`),children:[(0,$.jsx)(He,{status:e.status}),(0,$.jsxs)(`div`,{className:`min-w-0 flex-1`,children:[(0,$.jsx)(`div`,{className:`truncate text-sm`,children:e.name}),(0,$.jsx)(`div`,{className:`truncate font-mono text-[11px] text-muted-foreground`,children:e.id})]})]})},e.id)})})]})}function Ye({content:e,onChange:t,disabled:n=!1,suggestions:r,isCreateMode:i=!1,liveMode:a=!1,liveTests:s=[],liveSetupHooks:c=[],liveTeardownHooks:u=[],runningTestIndex:f=null,canRunTest:_=!0,canRunAll:v=!1,isRunningAll:y=!1,isStoppingRunAll:b=!1,onRunTest:S,onCancelTest:C,onRunAll:w,onStopAll:D,onRunLiveHook:ne,setupHooksStale:re=!1,onRestartSession:ie,selection:k=null,onSelect:ae}){let A=(0,Q.useRef)(null),{hooks:j,warningCopy:M}=T(),N=j??[],P=(0,Q.useMemo)(()=>Object.fromEntries(N.map(e=>[e.id,e.name])),[N]),[F,L]=(0,Q.useState)([]),[R,z]=(0,Q.useState)(!1);(0,Q.useEffect)(()=>{me().then(e=>L(e.files)).catch(()=>{})},[]),(0,Q.useEffect)(()=>{if(!R)return;function e(e){e.key===`Escape`&&z(!1)}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[R]);let B=Ie(e),V=B===null,H=B??A.current;B&&(A.current=B);let ce=ee(d(E,{activationConstraint:{distance:8}}),d(l,{coordinateGetter:x})),U=(0,Q.useCallback)((n,r)=>{t(Le(e,[n],r))},[e,t]),le=(0,Q.useCallback)(n=>{t(ze(e,n))},[e,t]),G=(0,Q.useCallback)(n=>{t(Be(e,n))},[e,t]),ue=H?.tests.map((e,t)=>`test-${t}`)??[],de=a&&(y||b),K=a&&(f!==null||s.some(e=>qe(e))||Ke(c)||Ke(u)),J=de||K,Y=de,fe=n||V||J,pe=(0,Q.useCallback)(r=>{if(n||V||J)return;let{active:i,over:a}=r;if(!a||i.id===a.id)return;let o=parseInt(String(i.id).replace(`test-`,``),10),s=parseInt(String(a.id).replace(`test-`,``),10);if(Number.isNaN(o)||Number.isNaN(s))return;let c=Re(e,o,s);c!==e&&t(c)},[e,n,t,J,V]);return(0,$.jsx)(`div`,{className:`flex flex-col`,children:(0,$.jsxs)(`div`,{className:`space-y-4 p-4`,children:[V&&(0,$.jsxs)(`div`,{className:`flex items-center gap-2 rounded-md border border-destructive/50 bg-destructive/10 p-3 text-sm text-destructive`,children:[(0,$.jsx)(o,{className:`size-4 shrink-0`}),(0,$.jsx)(`span`,{children:`YAML has errors — builder shows last valid state`})]}),a&&re&&(0,$.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-sm text-amber-700 dark:text-amber-300`,children:[(0,$.jsxs)(`div`,{className:`flex min-w-0 flex-1 items-start gap-2`,children:[(0,$.jsx)(se,{className:`mt-0.5 size-4 shrink-0`}),(0,$.jsx)(`span`,{children:`Setup hooks changed — restart session to re-apply the latest setup and teardown hooks.`})]}),ie&&(0,$.jsx)(q,{type:`button`,size:`sm`,className:`shrink-0`,onClick:ie,children:`Restart Live Session`})]}),H?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(we,{name:H.name,suiteId:H.suiteId,target:H.target,context:H.context,isCreateMode:i,suggestions:r,hookLabels:P,onChange:U,disabled:n||V}),a&&(0,$.jsx)(Je,{title:`Setup Hooks (Live)`,hooks:c,selection:k,onSelect:ae}),(0,$.jsxs)(`div`,{className:`space-y-3 rounded-md border bg-card/20 p-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsx)(W,{className:`size-4 text-muted-foreground`}),(0,$.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Hooks`})]}),(0,$.jsxs)(`span`,{className:`text-[10px] text-muted-foreground/50`,children:[H.setup.length+H.teardown.length,` `,H.setup.length+H.teardown.length===1?`hook`:`hooks`]})]}),M&&(0,$.jsxs)(`div`,{className:`flex gap-2 rounded-md border border-amber-500/30 bg-amber-500/10 px-3 py-2 text-xs text-amber-700 dark:text-amber-300`,children:[(0,$.jsx)(o,{className:`mt-0.5 size-3.5 shrink-0`}),(0,$.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,$.jsx)(`p`,{className:`font-medium`,children:M.title}),(0,$.jsx)(`p`,{children:M.body})]})]}),(0,$.jsxs)(`div`,{className:`space-y-3`,children:[(0,$.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:`Search hook names or paste an h_ ID. Saved as stable ID in YAML. Inline runHook uses the stable hook ID.`}),(0,$.jsx)(p,{phase:`setup`,label:`Setup`,values:H.setup,suggestions:N,disabled:fe,placeholder:`Search hook names or paste an h_ ID`,onChange:e=>U(`setup`,e)}),(0,$.jsx)(p,{phase:`teardown`,label:`Teardown`,values:H.teardown,suggestions:N,disabled:fe,placeholder:`Search hook names or paste an h_ ID`,onChange:e=>U(`teardown`,e)})]})]}),a&&(0,$.jsx)(Je,{title:`Teardown Hooks (Live)`,hooks:u,selection:k,onSelect:ae}),(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsxs)(`span`,{className:`text-xs font-medium text-muted-foreground flex items-center gap-1`,children:[`Tests in Suite`,` `,(0,$.jsx)(Ve,{text:`Tests run in the order shown. Drag to reorder. The suite fails fast if any referenced test is missing at save.`})]}),(0,$.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,$.jsxs)(`span`,{className:`text-[10px] text-muted-foreground/50`,children:[H.tests.length,` `,H.tests.length===1?`test`:`tests`]}),a&&(0,$.jsx)(q,{type:`button`,variant:`outline`,size:`sm`,onClick:y?D:w,disabled:b||!y&&!v,children:b?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(be,{className:`size-3.5 animate-spin`}),`Stopping...`]}):y?(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(I,{className:`size-3.5`}),`Stop Run All`]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(O,{className:`size-3.5`}),`Run All Tests`]})})]})]}),H.tests.length===0?(0,$.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`No tests added yet. Use the picker below.`}):(0,$.jsx)(h,{sensors:ce,collisionDetection:te,onDragEnd:pe,children:(0,$.jsx)(m,{items:ue,strategy:g,children:(0,$.jsx)(`div`,{className:`space-y-1.5`,children:H.tests.map((e,t)=>{let r=F.find(t=>t.path===e.test),i=r?.name??e.test.split(`/`).pop()??e.test,o=F.length>0&&!r,c=a?s[t]:void 0,l=a?_&&f===null&&!Y:!0;return(0,$.jsx)(ke,{id:`test-${t}`,name:i,path:e.test,testId:e.id,isMissing:o,onRemove:()=>G(t),disabled:n||V,actionsLocked:Y,sortableDisabled:J,liveMode:a,liveStatus:c?.status,liveDuration:c?.duration,liveError:c?.error??null,liveSteps:c?.liveSteps??[],runningStepIndex:c?.runningStepIndex??null,perTestSetupHooks:c?.perTestSetupHooks??[],perTestTeardownHooks:c?.perTestTeardownHooks??[],canRunTest:l,onRunTest:a&&S?()=>S(t):void 0,onCancelTest:a&&C?()=>C(t):void 0,testIndex:t,selection:k,onSelect:ae},`test-${t}`)})})})})]}),(0,$.jsxs)(`div`,{className:`space-y-2`,children:[(0,$.jsxs)(`div`,{className:`flex items-center justify-between`,children:[(0,$.jsx)(`span`,{className:`text-xs font-medium text-muted-foreground`,children:`Available Tests`}),(0,$.jsxs)(q,{type:`button`,variant:`outline`,size:`xs`,onClick:()=>z(e=>!e),disabled:n||V||Y,"aria-expanded":R,"aria-controls":`suite-test-picker-region`,children:[(0,$.jsx)(oe,{className:`size-3`}),R?`Hide picker`:`Add new test`]})]}),R&&(0,$.jsx)(`div`,{id:`suite-test-picker-region`,children:(0,$.jsx)(Ae,{availableTests:F,onAdd:le,disabled:n||V||Y})})]})]}):(0,$.jsx)(`div`,{className:`flex items-center justify-center py-12 text-sm text-muted-foreground`,children:`Enter valid YAML to use the visual builder`})]})})}function Xe({suiteName:e,suiteId:t,unsaved:n,isCreateMode:r,mode:i=`view`,suiteHref:a,isSaving:o,isValidating:s,isRunning:c,runDisabled:l=!1,hasInvalidFilename:u,shortcutsOpen:d,showSuiteId:f=!0,hasLiveSession:p=!1,liveConnectionState:m=`idle`,isLiveActionDisabled:h=!1,liveSessionNumber:g=null,onSave:_,onValidate:v,onRun:y,onLiveConnect:b,onLiveEnd:x,onSettingsOpen:S,onToggleShortcuts:C}){let T=i===`view`&&!r,E=!!b||!!x||p||m===`connecting`,D=!r||E,ee=!r&&!T&&i===`edit`,te=`Start a disposable live session for this suite. Setup hooks run on connect, included tests run serially on a shared browser context, teardown hooks run when the session ends, and changes are not saved automatically.`;return(0,$.jsxs)(`div`,{"data-testid":`suite-navbar-root`,className:`flex h-14 shrink-0 items-center justify-between border-b px-4 min-w-0`,children:[(0,$.jsxs)(`div`,{className:`flex items-center gap-2 min-w-0`,children:[(0,$.jsx)(Z,{to:`/suites`,className:`text-sm text-muted-foreground hover:text-foreground transition-colors shrink-0`,children:`Suites`}),(0,$.jsx)(J,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`}),r?(0,$.jsx)(`span`,{className:`text-sm font-medium truncate`,children:`New Suite`}):a&&!T?(0,$.jsx)(Z,{to:a,className:`truncate text-sm font-medium hover:text-primary transition-colors`,children:e}):(0,$.jsx)(`span`,{className:`text-sm font-medium truncate`,children:e}),ee&&(0,$.jsxs)($.Fragment,{children:[(0,$.jsx)(J,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`}),(0,$.jsx)(`span`,{className:`text-sm font-medium truncate`,children:`Edit`})]}),n&&(0,$.jsx)(xe,{variant:`outline`,className:`text-xs`,children:`Unsaved`}),!T&&!r&&t&&f&&(0,$.jsx)(w,{label:`S`,value:t})]}),(0,$.jsx)(`div`,{className:`flex items-center gap-3 shrink-0`,children:T?(0,$.jsxs)($.Fragment,{children:[a?(0,$.jsx)(q,{variant:`outline`,size:`sm`,asChild:!0,children:(0,$.jsxs)(Z,{to:a,children:[`Edit`,(0,$.jsx)(M,{shortcut:`E`})]})}):(0,$.jsxs)(q,{variant:`outline`,size:`sm`,disabled:!0,children:[`Edit`,(0,$.jsx)(M,{shortcut:`E`})]}),(0,$.jsx)(k,{onRun:y,disabled:c||l,label:c?`Running...`:`Run`,shortcutKey:`R`,size:`sm`}),E&&(0,$.jsxs)(X,{children:[(0,$.jsx)(G,{asChild:!0,children:(0,$.jsxs)(q,{size:`sm`,onClick:b,disabled:h||!b,children:[m===`connecting`?(0,$.jsx)(be,{className:`h-3.5 w-3.5 animate-spin`}):(0,$.jsx)(O,{className:`h-3.5 w-3.5`}),m===`connecting`?`Connecting...`:`Connect Live Session`,(0,$.jsx)(M,{shortcut:`L`,className:`border-primary-foreground/20 bg-primary-foreground/10 text-primary-foreground`})]})}),(0,$.jsx)(U,{className:`max-w-sm text-[13px]`,children:te})]}),!r&&(0,$.jsxs)(V,{open:d,onOpenChange:e=>{e||C()},children:[(0,$.jsxs)(X,{children:[(0,$.jsx)(G,{asChild:!0,children:(0,$.jsx)(B,{asChild:!0,children:(0,$.jsx)(q,{variant:`ghost`,size:`icon-sm`,onClick:C,"aria-label":`Shortcuts`,children:(0,$.jsx)(j,{className:`h-3.5 w-3.5`})})})}),(0,$.jsx)(U,{children:`Shortcuts`})]}),(0,$.jsx)(z,{align:`end`,sideOffset:8,className:`w-72 p-4`,children:(0,$.jsx)(`div`,{className:`space-y-3`,children:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h4`,{className:`text-[10px] uppercase tracking-wider text-muted-foreground font-medium mb-2`,children:`Actions`}),(0,$.jsx)(A,{hints:[{key:`E`,label:`Edit`},{key:`R`,label:`Run`},{key:`L`,label:`Connect Live Session`}]})]})})})]})]}):(0,$.jsxs)($.Fragment,{children:[(0,$.jsxs)(q,{variant:`ghost`,size:`sm`,onClick:v,disabled:s||u,children:[(0,$.jsx)(K,{className:`h-3.5 w-3.5`}),s?`Validating...`:`Validate`]}),(0,$.jsxs)(q,{variant:`ghost`,size:`sm`,onClick:_,disabled:o||u,children:[(0,$.jsx)(ne,{className:`h-3.5 w-3.5`}),o?`Saving...`:`Save`]}),(0,$.jsxs)(q,{variant:`ghost`,size:`sm`,onClick:S,children:[(0,$.jsx)(P,{className:`h-3.5 w-3.5`}),`Settings`]}),D&&(0,$.jsx)(`div`,{className:`h-4 w-px bg-border`}),!r&&(0,$.jsxs)(X,{children:[(0,$.jsx)(G,{asChild:!0,children:(0,$.jsx)(`span`,{className:`inline-flex`,children:(0,$.jsx)(k,{onRun:y,disabled:c||l||p,label:c?`Running...`:`Run Suite`,size:`sm`})})}),p&&(0,$.jsx)(U,{children:`End the live session to queue a new suite run.`})]}),E&&(p&&m!==`connecting`?(0,$.jsxs)(q,{variant:`destructive`,size:`sm`,onClick:x,disabled:!x,children:[(0,$.jsx)(I,{className:`h-3.5 w-3.5`}),`End Live Session`]}):(0,$.jsxs)(X,{children:[(0,$.jsx)(G,{asChild:!0,children:(0,$.jsxs)(q,{size:`sm`,onClick:b,disabled:h||!b,children:[m===`connecting`?(0,$.jsx)(be,{className:`h-3.5 w-3.5 animate-spin`}):(0,$.jsx)(O,{className:`h-3.5 w-3.5`}),m===`connecting`?`Connecting...`:`Connect Live Session`]})}),(0,$.jsx)(U,{className:`max-w-sm text-[13px]`,children:te})]})),!T&&p&&typeof g==`number`&&(m===`connected`||m===`executing`)&&(0,$.jsxs)(xe,{variant:`outline`,"aria-live":`polite`,className:`text-[10px] tracking-wider font-medium text-muted-foreground bg-muted/50 border-border/50`,children:[`Session #`,g]}),!r&&(0,$.jsxs)(V,{open:d,onOpenChange:e=>{e||C()},children:[(0,$.jsxs)(X,{children:[(0,$.jsx)(G,{asChild:!0,children:(0,$.jsx)(B,{asChild:!0,children:(0,$.jsx)(q,{variant:`ghost`,size:`icon-sm`,onClick:C,children:(0,$.jsx)(j,{className:`h-3.5 w-3.5`})})})}),(0,$.jsx)(U,{children:`Shortcuts`})]}),(0,$.jsx)(z,{align:`end`,sideOffset:8,className:`w-72 p-4`,children:(0,$.jsx)(`div`,{className:`space-y-3`,children:(0,$.jsxs)(`div`,{children:[(0,$.jsx)(`h4`,{className:`text-[10px] uppercase tracking-wider text-muted-foreground font-medium mb-2`,children:`Actions`}),(0,$.jsx)(A,{hints:[{key:`R`,label:`Run suite`},{key:`Cmd+S`,label:`Save`},{key:`Esc`,label:`Close results panel`}]})]})})})]})]})})]})}export{Le as i,Ye as n,Ie as r,Xe as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{t}from"./monaco-editor-DNT0Mzki.js";import{t as n}from"./file-code-B3iDpJRP.js";import{n as r}from"./split-button-DcY8ames.js";import{t as i}from"./zap-KFJmkY3Y.js";import{t as a}from"./use-page-title-B1t9-5_U.js";import{a as o,n as s,o as ee,t as c}from"./insights-line-grid-BKOqA-1W.js";import{i as l,n as u,r as d,t as f}from"./tabs-DrB_Acb3.js";import{$n as p,At as m,Gt as h,Jt as g,Kt as _,Mt as v,Nt as te,Pt as y,Qn as b,St as ne,Ut as x,at as re,cr as ie,jt as S,lr as ae,ot as oe,pr as C,qt as w,r as se,sr as T,ur as ce}from"./index-Bvtm2F6f.js";import{t as E}from"./badge-DrW2vGVJ.js";import{a as D,i as O,n as k,o as A,r as j,t as M}from"./table-D08QBBt4.js";import{t as le}from"./empty-state-BTvOA5lp.js";import{t as ue}from"./use-keyboard-shortcuts-EAppuiKO.js";import{n as de,t as fe}from"./suite-navbar-PStktQ6j.js";import{n as pe,r as me,t as he}from"./viewer-url-state-6mOK5_sY.js";var N=e(C(),1),P=b(),ge=[`builder`,`yaml`,`memory`];function _e(e){let t=e.trim();return t.length>=2&&(t.startsWith(`"`)&&t.endsWith(`"`)||t.startsWith(`'`)&&t.endsWith(`'`))?t.slice(1,-1).trim():t}function F(e){return{suiteId:e,total:0,flakyScore:0,isFlaky:!1,runs:[],trends:{daily:[],passRate:0,totalRuns:0,avgDuration:0}}}function I(e){if(!e)return``;let t=new Date(g(e)),n=Date.now()-t.getTime(),r=Math.floor(n/1e3);if(r<60)return`just now`;let i=Math.floor(r/60);if(i<60)return`${i}m ago`;let a=Math.floor(i/60);if(a<24)return`${a}h ago`;let o=Math.floor(a/24);return o<7?`${o}d ago`:h(e)}function L({status:e}){switch(e){case`passed`:return(0,P.jsx)(E,{className:`bg-emerald-500/15 text-emerald-500 border-emerald-500/20`,children:`Passed`});case`failed`:return(0,P.jsx)(E,{variant:`destructive`,children:`Failed`});case`healed`:return(0,P.jsx)(E,{className:`bg-amber-500/15 text-amber-500 border-amber-500/20`,children:`Healed`});case`flaky`:return(0,P.jsx)(E,{className:`bg-amber-500/15 text-amber-500 border-amber-500/20`,children:`Flaky`});case`running`:return(0,P.jsx)(E,{className:`bg-blue-500/15 text-blue-500 border-blue-500/20 animate-pulse`,children:`Running`});case`cancelled`:return(0,P.jsx)(E,{className:`bg-muted text-muted-foreground border-border`,children:`Cancelled`});default:return(0,P.jsx)(E,{variant:`outline`,children:e})}}function R({configured:e,mode:t,scopedCount:n,totalCount:r,onModeChange:i}){return e?(0,P.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,P.jsx)(`div`,{className:`inline-flex rounded border border-border p-0.5`,children:[`scoped`,`all`].map(e=>(0,P.jsx)(x,{type:`button`,size:`xs`,variant:t===e?`default`:`ghost`,"aria-pressed":t===e,className:`h-7 rounded-[2px] px-2 text-xs`,onClick:()=>i(e),children:e===`scoped`?`Scoped`:`All runs`},e))}),(0,P.jsxs)(`span`,{className:`text-xs text-muted-foreground`,children:[n,` scoped / `,r,` total runs`]})]}):(0,P.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:`No analytics scope configured`})}function z({runs:e,compactDate:t=!1}){return e.length===0?(0,P.jsx)(`div`,{className:`flex items-center justify-center h-16 text-sm text-muted-foreground`,children:`No runs yet`}):(0,P.jsxs)(M,{children:[(0,P.jsx)(D,{children:(0,P.jsxs)(A,{children:[(0,P.jsx)(O,{children:`Status`}),(0,P.jsx)(O,{children:`Duration`}),(0,P.jsx)(O,{children:`Date`})]})}),(0,P.jsx)(k,{children:e.map(e=>(0,P.jsxs)(A,{className:`relative cursor-pointer hover:bg-muted/50`,children:[(0,P.jsxs)(j,{children:[(0,P.jsx)(T,{to:p.runDetailOrLive(e.id,e.status),className:`absolute inset-0`,tabIndex:-1}),(0,P.jsx)(L,{status:e.status})]}),(0,P.jsx)(j,{children:e.status===`running`?(0,P.jsx)(`span`,{className:`text-blue-500 text-sm`,children:`In progress...`}):(0,P.jsx)(`span`,{className:`text-muted-foreground`,children:w(e.duration)})}),(0,P.jsx)(j,{children:t?(0,P.jsx)(`span`,{className:`text-muted-foreground`,children:I(e.createdAt)}):(0,P.jsxs)(S,{children:[(0,P.jsx)(y,{asChild:!0,children:(0,P.jsx)(`span`,{className:`text-muted-foreground`,children:h(e.createdAt)})}),(0,P.jsx)(v,{children:_(e.createdAt)})]})})]},e.id))})]})}function B(){let e=ae(),h=ie(),[g,_]=ce(),{defaultRunMode:v}=r(),y=e[`suite-id`]??``,b=(0,N.useMemo)(()=>he(g,ge),[g]),x=(0,N.useMemo)(()=>pe(b,g),[g,b]),S=b.tab,C=b.view,[T,D]=(0,N.useState)(``),[O,k]=(0,N.useState)(``),[A,j]=(0,N.useState)(!0),[M,I]=(0,N.useState)(!1),[L,B]=(0,N.useState)(()=>F(y)),[V,H]=(0,N.useState)(`all`),[U,W]=(0,N.useState)(!1),[ve,ye]=(0,N.useState)(!1),G=(0,N.useMemo)(()=>{let e=T.match(/^name:\s*(.+)$/m);return e?_e(e[1]):null},[T]);a(G||`Suite`);let K=L.scope?.configured===!0,q=V===`scoped`&&K&&L.scopedTrends?L.scopedTrends:L.trends,J=V===`scoped`&&K&&L.scopedFlakyScore!==void 0?L.scopedFlakyScore:L.flakyScore,be=V===`scoped`&&K?L.scopedRuns??[]:L.runs,xe=(0,N.useMemo)(()=>q.daily.map(e=>({date:e.date,passRate:e.total>0?Math.round(e.passed/e.total*1e3)/10:0})),[q]),Se=(0,N.useMemo)(()=>L.trends.daily.map(e=>({date:e.date,duration:e.avgDuration})),[L]),Y=be;(0,N.useEffect)(()=>{H(L.scope?.configured?`scoped`:`all`)},[L]),(0,N.useEffect)(()=>{x.toString()!==g.toString()&&_(x,{replace:!0})},[x,g,_]),(0,N.useEffect)(()=>{if(!y){I(!0),j(!1),B(F(``));return}let e=!1;return j(!0),I(!1),D(``),k(``),B(F(y)),oe(y).then(t=>{e||(D(t.content),k(t.path))}).catch(()=>{e||(I(!0),m.error(`Failed to load suite file`))}).finally(()=>{e||j(!1)}),()=>{e=!0}},[y]),(0,N.useEffect)(()=>{if(!y)return;let e=!1;return re(y,{limit:50}).then(t=>{e||B(t)}).catch(()=>{e||B(F(y))}),()=>{e=!0}},[y]);let X=async e=>{if(!(U||!O)){W(!0);try{let t=await ne({file:O,local:e});m.success(`Run started`),h(p.runLive(t.runId))}catch(e){m.error(`Failed to start run: ${e instanceof Error?e.message:String(e)}`)}finally{W(!1)}}},Z=p.suiteEdit(y),Q=`${Z}?live=1`;ue({e:()=>h(Z),r:()=>{O&&X(v===`local`)},l:()=>h(Q)});let $=e=>{_(pe(e,g),{replace:!0})};if(A)return(0,P.jsx)(se,{});if(M)return(0,P.jsx)(le,{icon:n,title:`Suite not found`,description:`This suite doesn't exist`,actionLabel:`View All Suites`,onAction:()=>h(p.suites)});let Ce=(0,P.jsx)(de,{content:T,onChange:()=>{},disabled:!0,suggestions:[]}),we=(0,P.jsx)(t,{value:T,onChange:()=>{},readOnly:!0,className:`h-full`}),Te=(0,P.jsxs)(`aside`,{"data-testid":`suite-detail-analytics-sidebar`,className:`flex flex-col gap-0 overflow-y-auto border-t border-border md:border-t-0 md:border-l md:border-border`,children:[(0,P.jsx)(`div`,{className:`border-b border-border px-3 py-2`,children:(0,P.jsx)(R,{configured:K,mode:V,scopedCount:L.scope?.scopedCount??0,totalCount:L.scope?.totalCount??L.total,onModeChange:H})}),(0,P.jsxs)(s,{className:`grid-cols-2 divide-x divide-y-0 border-x-0 border-t-0`,children:[(0,P.jsxs)(c,{className:`flex flex-col gap-0.5 px-3 py-2`,children:[(0,P.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:`Pass Rate`}),(0,P.jsxs)(`span`,{className:`text-xl font-semibold text-foreground`,children:[Math.round(q.passRate*100),`%`]})]}),(0,P.jsxs)(c,{className:`flex flex-col gap-0.5 px-3 py-2`,children:[(0,P.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:`Avg Duration`}),(0,P.jsx)(`span`,{className:`text-xl font-semibold text-foreground`,children:w(L.trends.avgDuration)})]}),(0,P.jsxs)(c,{className:`flex flex-col gap-0.5 border-t border-border px-3 py-2`,children:[(0,P.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:`Total Runs`}),(0,P.jsx)(`span`,{className:`text-xl font-semibold text-foreground`,children:L.total.toLocaleString()})]}),(0,P.jsxs)(c,{className:`flex flex-col gap-0.5 border-t border-border px-3 py-2`,children:[(0,P.jsx)(`span`,{className:`text-[10px] font-medium uppercase tracking-wider text-muted-foreground`,children:`Flaky Score`}),(0,P.jsxs)(`span`,{className:`text-xl font-semibold text-foreground`,children:[(J*100).toFixed(0),`%`]})]})]}),(0,P.jsx)(s,{className:`border-x-0 border-y-0`,children:(0,P.jsxs)(c,{className:`flex flex-col gap-2 px-3 py-3`,children:[(0,P.jsxs)(`span`,{className:`text-sm font-medium text-foreground`,children:[V===`scoped`&&K?`Scoped Runs`:`All Runs`,` (`,Y.length,`)`]}),(0,P.jsx)(z,{runs:Y.slice(0,5),compactDate:!0})]})})]});return(0,P.jsx)(te,{children:(0,P.jsxs)(`div`,{className:`flex flex-col h-screen`,children:[(0,P.jsx)(fe,{suiteName:G||`Suite`,suiteId:y,unsaved:!1,isCreateMode:!1,mode:`view`,suiteHref:Z,isSaving:!1,isValidating:!1,isRunning:U,runDisabled:!O,hasInvalidFilename:!1,shortcutsOpen:ve,showSuiteId:!1,onBack:()=>h(p.suites),onSave:()=>{},onValidate:()=>{},onRun:e=>X(e),onLiveConnect:()=>h(Q),onSettingsOpen:()=>{},onToggleShortcuts:()=>ye(e=>!e)}),(0,P.jsxs)(f,{value:S,onValueChange:e=>$({tab:e,view:C}),className:`flex-1 min-h-0 flex flex-col`,children:[(0,P.jsx)(`div`,{className:`px-4 border-b border-border`,children:(0,P.jsxs)(d,{variant:`line`,children:[(0,P.jsx)(l,{value:`overview`,children:`Overview`}),(0,P.jsx)(l,{value:`insights`,children:`Insights`})]})}),(0,P.jsxs)(u,{value:`overview`,className:`flex-1 min-h-0 mt-0 grid grid-cols-1 md:grid-cols-[minmax(480px,1fr)_minmax(260px,320px)]`,children:[(0,P.jsx)(`div`,{className:`min-w-0 min-h-0 flex flex-col`,children:(0,P.jsxs)(f,{value:C,onValueChange:e=>$({tab:S,view:e}),className:`flex-1 min-h-0 flex flex-col`,children:[(0,P.jsx)(`div`,{className:`border-b border-border`,children:(0,P.jsxs)(d,{variant:`line`,className:`w-full grid grid-cols-3 px-4 md:w-fit md:inline-flex`,children:[(0,P.jsx)(l,{value:`builder`,children:`Builder`}),(0,P.jsx)(l,{value:`yaml`,children:`YAML`}),(0,P.jsx)(l,{value:`memory`,children:`Memory`})]})}),(0,P.jsxs)(`div`,{className:`relative flex-1 min-h-0`,children:[(0,P.jsx)(u,{value:`builder`,className:`absolute inset-0 overflow-y-auto data-[state=inactive]:hidden`,children:Ce}),(0,P.jsx)(u,{value:`yaml`,className:`absolute inset-0 data-[state=inactive]:hidden`,children:we}),(0,P.jsx)(u,{value:`memory`,className:`absolute inset-0 overflow-y-auto data-[state=inactive]:hidden`,children:(0,P.jsx)(me,{scope:`suite`,scopeId:y,emptyTitle:`No suite memory yet`,emptyDescription:`This suite doesn't have cataloged observations in this workspace yet. Run the suite with memory enabled, then reopen this tab.`})})]})]})}),Te]}),(0,P.jsx)(u,{value:`insights`,className:`flex-1 overflow-y-auto mt-0`,children:(0,P.jsxs)(`div`,{"data-testid":`suite-detail-insights`,className:`space-y-3 px-4 py-3`,children:[L.isFlaky&&(0,P.jsxs)(E,{variant:`destructive`,children:[(0,P.jsx)(i,{className:`size-3`}),`Flaky (score: `,L.flakyScore.toFixed(2),`)`]}),(0,P.jsxs)(s,{className:`grid-cols-2 divide-x divide-y-0 md:grid-cols-4`,children:[(0,P.jsx)(c,{className:`border-b border-border md:border-b-0`,children:(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Total Runs`}),(0,P.jsx)(`p`,{className:`mt-0.5 text-2xl font-semibold`,children:L.total.toLocaleString()})]})}),(0,P.jsx)(c,{className:`border-b border-border md:border-b-0 md:border-r`,children:(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Pass Rate`}),(0,P.jsxs)(`p`,{className:`mt-0.5 text-2xl font-semibold`,children:[Math.round(q.passRate*100),`%`]})]})}),(0,P.jsx)(c,{children:(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Avg Duration`}),(0,P.jsx)(`p`,{className:`mt-0.5 text-2xl font-semibold`,children:w(L.trends.avgDuration)})]})}),(0,P.jsx)(c,{children:(0,P.jsxs)(`div`,{children:[(0,P.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Flaky Score`}),(0,P.jsxs)(`p`,{className:`mt-0.5 text-2xl font-semibold`,children:[(J*100).toFixed(0),`%`]})]})})]}),(0,P.jsx)(s,{children:(0,P.jsx)(c,{className:`px-4 py-3`,children:(0,P.jsx)(R,{configured:K,mode:V,scopedCount:L.scope?.scopedCount??0,totalCount:L.scope?.totalCount??L.total,onModeChange:H})})}),q.daily.length>0&&(0,P.jsxs)(s,{className:`md:grid-cols-2 md:divide-x md:divide-y-0`,children:[(0,P.jsxs)(c,{className:`px-4 py-3`,children:[(0,P.jsx)(`p`,{className:`text-sm font-medium mb-2`,children:`Pass Rate`}),(0,P.jsx)(`div`,{className:`h-[160px] overflow-hidden`,children:(0,P.jsx)(ee,{data:xe})})]}),(0,P.jsxs)(c,{className:`px-4 py-3`,children:[(0,P.jsx)(`p`,{className:`text-sm font-medium mb-2`,children:`Duration`}),(0,P.jsx)(`div`,{className:`h-[160px] overflow-hidden`,children:(0,P.jsx)(o,{data:Se})})]})]}),(0,P.jsx)(s,{children:(0,P.jsxs)(c,{className:`px-4 py-3`,children:[(0,P.jsxs)(`p`,{className:`text-sm font-medium mb-2`,children:[V===`scoped`&&K?`Scoped Runs`:`All Runs`,` (`,Y.length,`)`]}),(0,P.jsx)(z,{runs:Y})]})})]})})]})]})})}export{B as default};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-CilyBKbf.js";import{t}from"./arrow-up-down-DyIZvSrC.js";import{i as n,n as r,o as i,s as a,t as o}from"./select-B5gV6YUf.js";import{n as s,r as c}from"./shortcut-hints-CfVf0REF.js";import{t as ee}from"./plus-C6Zz9JLt.js";import{t as te}from"./use-page-title-CK82kWb2.js";import{t as l}from"./batch-action-bar-CZxUcNFZ.js";import{n as ne,t as re}from"./scroll-area-DfPMtFw0.js";import{At as ie,Bn as ae,Ht as u,M as oe,Mt as se,Nt as ce,Qn as d,Ut as f,Vt as p,Wt as le,Zn as m,a as ue,fr as h,jt as de,kt as g,lr as _,or as fe,ot as pe,sr as me,tt as he,xt as v}from"./index-B3xPCIyH.js";import{t as y}from"./badge-BbhOGRC0.js";import{a as ge,i as _e,n as ve,o as ye,r as be,t as b}from"./lib-BPEPp1D-.js";import{a as xe,i as Se,n as Ce,o as x,r as S,t as we}from"./table-DL0PmHAE.js";import{t as Te}from"./empty-state-Dluv5C1Q.js";import{t as C}from"./use-keyboard-shortcuts-BRF3cm7O.js";import{n as w,r as T,t as E}from"./tests-suites-table-widths-tlOYaS72.js";var D=e(h(),1);function O(){let[e,t]=_(),n=e.get(`status`)??``,r=e.get(`platform`)??``,i=e.get(`sort`)??``,a=e.get(`order`)??`desc`,o=(0,D.useCallback)((e,n)=>{t(t=>{let r=new URLSearchParams(t);return n?r.set(e,n):r.delete(e),r},{replace:!0})},[t]),s=(0,D.useMemo)(()=>i?[{id:i,desc:a===`desc`}]:[],[i,a]),c=(0,D.useRef)(s);return c.current=s,{status:n,platform:r,sort:i,order:a,sorting:s,onSortingChange:(0,D.useCallback)(e=>{let n=typeof e==`function`?e(c.current):e;t(e=>{let t=new URLSearchParams(e);return n.length>0?(t.set(`sort`,n[0].id),t.set(`order`,n[0].desc?`desc`:`asc`)):(t.delete(`sort`),t.delete(`order`)),t},{replace:!0})},[t]),setStatus:(0,D.useCallback)(e=>o(`status`,e),[o]),setPlatform:(0,D.useCallback)(e=>o(`platform`,e),[o])}}var k=m(),Ee=new Set([`passed`,`healed`]),De=new Set([`passed`,`healed`,`failed`,`flaky`,`cancelled`]),Oe=50;function ke(e){return e?e===`ios`?`iOS`:e.charAt(0).toUpperCase()+e.slice(1):`—`}function A(e){return e.createdAt||e.startedAt||e.endedAt||``}function Ae({status:e}){switch(e){case`passed`:return(0,k.jsx)(y,{className:`bg-emerald-500/15 text-emerald-500 border-emerald-500/20`,children:`Passed`});case`failed`:return(0,k.jsx)(y,{variant:`destructive`,children:`Failed`});case`healed`:return(0,k.jsx)(y,{className:`bg-amber-500/15 text-amber-500 border-amber-500/20`,children:`Healed`});case`flaky`:return(0,k.jsx)(y,{className:`bg-amber-500/15 text-amber-500 border-amber-500/20`,children:`Flaky`});case`running`:return(0,k.jsx)(y,{className:`bg-blue-500/15 text-blue-500 border-blue-500/20 animate-pulse`,children:`Running`});case`cancelled`:return(0,k.jsx)(y,{className:`bg-muted text-muted-foreground border-border`,children:`Cancelled`});default:return(0,k.jsx)(y,{variant:`outline`,children:e})}}function je(e){return f(`h-10 bg-background text-[13px] font-medium text-foreground/90`,e===`select`?`px-2 text-center`:`px-3`,(e===`passRate`||e===`lastRun`)&&`text-right`)}function Me(e){return f(`py-2 align-top`,e===`select`&&`px-2`,e===`name`&&`max-w-0 px-3`,e===`targetName`&&`max-w-0 px-3`,e===`platform`&&`px-3`,e===`passRate`&&`px-3 text-right`,e===`lastRun`&&`max-w-0 px-3 text-right`)}function Ne({isActive:e,isBatchSelected:t}){return f(`cursor-pointer outline-none hover:bg-muted/20 focus-visible:bg-primary/10 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary/60`,t&&!e&&`bg-muted/20`,e&&`bg-primary/10 ring-1 ring-inset ring-primary/60`)}function j(){te(`Suites`);let[e,m]=(0,D.useState)([]),[h,_]=(0,D.useState)([]),[y,j]=(0,D.useState)(!0),[M,N]=(0,D.useState)({}),[Pe,P]=(0,D.useState)(!1),[Fe,Ie]=(0,D.useState)([]),[F,I]=(0,D.useState)(-1),L=(0,D.useRef)([]),R=me(),{status:z,platform:B,sorting:Le,onSortingChange:Re,setStatus:ze,setPlatform:Be}=O();(0,D.useEffect)(()=>{let e=!1;return Promise.all([pe(),he({limit:200})]).then(([t,n])=>{e||(m(t.files),_(n.runs))}).catch(()=>{e||g.error(`Failed to load suites`)}).finally(()=>{e||j(!1)}),()=>{e=!0}},[]);let V=(0,D.useMemo)(()=>e.map(e=>{let t=[...h.filter(t=>t.suiteId&&e.suiteId?t.suiteId===e.suiteId:t.suiteId?!1:t.name===e.name)].sort((e,t)=>A(t).localeCompare(A(e))),n=t.filter(e=>De.has(e.status)),r=n.filter(e=>Ee.has(e.status)).length,i=n.length>0?Math.round(r/n.length*100):null,a=t[0]??null,o=t.find(e=>e.targetName?.trim())??null;return{path:e.path,suiteId:e.suiteId,name:e.name,platform:e.platform??o?.platform??a?.platform??null,lastRunStatus:a?.status??null,lastRun:a,targetName:o?.targetName?.trim()??a?.targetName?.trim()??null,passRate:i,passCount:r,completedRunCount:n.length}}),[e,h]),H=(0,D.useMemo)(()=>{let e=V;return z&&(e=z===`no-runs`?e.filter(e=>!e.lastRunStatus):e.filter(e=>e.lastRunStatus===z)),B&&(e=e.filter(e=>e.platform===B)),e},[V,z,B]),Ve={id:`select`,header:({table:e})=>(0,k.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,k.jsx)(T,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&`indeterminate`,onCheckedChange:t=>e.toggleAllPageRowsSelected(t),ariaLabel:`Select all`})}),cell:({row:e})=>(0,k.jsx)(T,{checked:e.getIsSelected(),onCheckedChange:t=>e.toggleSelected(t)}),enableSorting:!1,size:48},U=(0,D.useMemo)(()=>[{accessorKey:`name`,header:({column:e})=>(0,k.jsxs)(u,{variant:`ghost`,className:`-ml-4`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),children:[`Name`,(0,k.jsx)(t,{className:`ml-2 h-4 w-4`})]}),cell:({row:e})=>(0,k.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,k.jsx)(`span`,{className:`block whitespace-normal break-words text-sm font-medium leading-snug text-foreground`,children:e.getValue(`name`)}),(0,k.jsx)(`span`,{className:`block whitespace-normal break-all text-xs leading-snug text-muted-foreground`,children:e.original.path})]}),size:400,filterFn:(e,t,n)=>{let r=e.getValue(`name`).toLowerCase(),i=e.original.path.toLowerCase(),a=n.toLowerCase();return r.includes(a)||i.includes(a)}},{accessorKey:`targetName`,header:({column:e})=>(0,k.jsxs)(u,{variant:`ghost`,className:`-ml-4`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),children:[`Target`,(0,k.jsx)(t,{className:`ml-2 h-4 w-4`})]}),cell:({row:e})=>(0,k.jsx)(`span`,{className:`block whitespace-normal break-words text-sm leading-snug text-muted-foreground`,children:e.original.targetName??`No target`})},{accessorKey:`platform`,header:({column:e})=>(0,k.jsxs)(u,{variant:`ghost`,className:`-ml-4`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),children:[`Platform`,(0,k.jsx)(t,{className:`ml-2 h-4 w-4`})]}),cell:({row:e})=>(0,k.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:ke(e.getValue(`platform`))})},{accessorKey:`passRate`,header:({column:e})=>(0,k.jsxs)(u,{variant:`ghost`,className:`-ml-4`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),children:[`Pass rate`,(0,k.jsx)(t,{className:`ml-2 h-4 w-4`})]}),cell:({row:e})=>e.original.passRate===null?(0,k.jsxs)(`div`,{className:`space-y-0.5 text-right`,children:[(0,k.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`No runs`}),(0,k.jsx)(`div`,{className:`text-xs tabular-nums text-muted-foreground`,children:`0 completed`})]}):(0,k.jsxs)(`div`,{className:`space-y-0.5 text-right`,children:[(0,k.jsxs)(`div`,{className:`text-sm font-medium tabular-nums text-foreground`,children:[e.original.passRate,`%`]}),(0,k.jsxs)(`div`,{className:`text-xs tabular-nums text-muted-foreground`,children:[e.original.passCount,`/`,e.original.completedRunCount]})]})},{id:`lastRun`,accessorFn:e=>e.lastRun?.createdAt??e.lastRun?.startedAt??e.lastRun?.endedAt??``,header:({column:e})=>(0,k.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,k.jsxs)(u,{variant:`ghost`,className:`h-auto justify-end px-0 text-[13px] font-medium text-foreground/90 hover:bg-transparent`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),children:[`Last run`,(0,k.jsx)(t,{className:`ml-2 h-4 w-4`})]})}),cell:({row:e})=>e.original.lastRun?(0,k.jsxs)(fe,{to:d.runDetail(e.original.lastRun.id),className:`relative z-10 flex w-full flex-col items-end gap-1 rounded-sm text-right focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,onClick:e=>e.stopPropagation(),children:[(0,k.jsx)(Ae,{status:e.original.lastRun.status}),(0,k.jsx)(`span`,{className:`whitespace-normal break-words text-xs leading-snug text-muted-foreground`,children:le(A(e.original.lastRun))})]}):(0,k.jsx)(`span`,{className:`block text-sm text-muted-foreground`,children:`No runs`})}],[]),W=(0,D.useMemo)(()=>Object.keys(M).filter(e=>M[e]),[M]),G=(0,D.useMemo)(()=>H.filter(e=>W.includes(e.path)),[H,W]),K=(0,D.useCallback)(async e=>{if(G.length!==0){P(!0);try{let t=await Promise.allSettled(G.map(t=>v({file:t.path,local:e}))),n=t.filter(e=>e.status===`fulfilled`).length,r=t.length-n;r>0?g.error(`${n} runs queued, ${r} failed`):g.success(`${n} runs queued`),N({})}finally{P(!1)}}},[G]),He=(0,D.useCallback)(async e=>{if(G.length!==0){P(!0);try{let t=await Promise.allSettled(G.map(t=>v({file:t.path,noCache:!0,local:e}))),n=t.filter(e=>e.status===`fulfilled`).length,r=t.length-n;r>0?g.error(`${n} runs queued (no cache), ${r} failed`):g.success(`${n} runs queued (no cache)`),N({})}finally{P(!1)}}},[G]),Ue=(0,D.useCallback)(async()=>{if(G.length!==0){P(!0);try{let e=await Promise.allSettled(G.map(e=>oe(e.path))),t=G.filter((t,n)=>e[n]?.status===`fulfilled`),n=new Set(t.map(e=>e.path)),r=e.length-t.length;t.length>0&&(m(e=>e.filter(e=>!n.has(e.path))),N(e=>Object.fromEntries(Object.entries(e).filter(([e])=>!n.has(e))))),r>0?g.error(`Deleted ${t.length} suite${t.length===1?``:`s`}, ${r} failed`):g.success(`Deleted ${t.length} suite${t.length===1?``:`s`}`)}finally{P(!1)}}},[G]),q=ve({data:H,columns:[Ve,...U],getCoreRowModel:be(),getSortedRowModel:ye(),getFilteredRowModel:_e(),getPaginationRowModel:ge(),onSortingChange:Re,onColumnFiltersChange:Ie,enableRowSelection:!0,onRowSelectionChange:N,getRowId:e=>e.path,state:{sorting:Le,columnFilters:Fe,rowSelection:M},initialState:{pagination:{pageSize:Oe}}}),J=q.getRowModel().rows,Y=q.getColumn(`name`)?.getFilterValue()??``,We=(0,D.useCallback)(e=>{q.getColumn(`name`)?.setFilterValue(e||void 0),q.setPageIndex(0),I(-1),N({})},[q]);C((0,D.useMemo)(()=>{let e=()=>I(e=>Math.min(e+1,J.length-1)),t=()=>I(e=>Math.max(e-1,0));return{j:e,arrowdown:e,k:t,arrowup:t,enter:e=>{if(F>=0&&J[F]){let t=J[F].original;if(!t.suiteId)return;let n=d.suiteView(t.suiteId);e.metaKey||e.ctrlKey?window.open(n,`_blank`):R(n)}}}},[J,F,R])),(0,D.useEffect)(()=>{if(F<0)return;let e=L.current[F];e&&document.activeElement!==e&&e.focus()},[F,J.length]);let X=(0,D.useCallback)((e,t)=>{e.suiteId&&(t&&t.preventDefault(),R(d.suiteView(e.suiteId)))},[R]);if(y)return(0,k.jsx)(ue,{});if(e.length===0)return(0,k.jsx)(Te,{icon:ae,title:`No suites found`,description:`Create your first suite file`,actionLabel:`New Suite`,onAction:()=>R(d.suiteNew)});let Z=q.getFilteredRowModel().rows.length,Ge=q.getState().pagination.pageIndex,Q=q.getState().pagination.pageSize,$=Ge*Q+1,Ke=Math.min($+Q-1,Z);return(0,k.jsx)(se,{children:(0,k.jsxs)(`div`,{className:`space-y-4`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,k.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Suites`}),(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsxs)(ie,{children:[(0,k.jsx)(ce,{asChild:!0,children:(0,k.jsx)(u,{variant:`ghost`,size:`icon-sm`,"aria-label":`Keyboard shortcuts`,children:(0,k.jsx)(c,{className:`h-4 w-4`})})}),(0,k.jsx)(de,{side:`bottom`,className:`p-3`,children:(0,k.jsx)(s,{hints:[{key:`J / ↓`,label:`Next row`},{key:`K / ↑`,label:`Previous row`},{key:`Enter`,label:`Open suite`},{key:`⌘+Enter`,label:`Open in new tab`}]})})]}),(0,k.jsxs)(u,{size:`sm`,onClick:()=>R(d.suiteNew),children:[(0,k.jsx)(ee,{className:`size-4`}),`New Suite`]})]})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,k.jsx)(p,{placeholder:`Search suites...`,value:Y,onChange:e=>We(e.target.value),className:`max-w-[220px]`}),(0,k.jsxs)(o,{value:z||`all`,onValueChange:e=>{ze(e===`all`?``:e),I(-1),N({})},children:[(0,k.jsx)(i,{className:`w-[150px]`,children:(0,k.jsx)(a,{placeholder:`All statuses`})}),(0,k.jsxs)(r,{children:[(0,k.jsx)(n,{value:`all`,children:`All statuses`}),(0,k.jsx)(n,{value:`passed`,children:`Passed`}),(0,k.jsx)(n,{value:`failed`,children:`Failed`}),(0,k.jsx)(n,{value:`running`,children:`Running`}),(0,k.jsx)(n,{value:`no-runs`,children:`No runs`})]})]}),(0,k.jsxs)(o,{value:B||`all`,onValueChange:e=>{Be(e===`all`?``:e),I(-1),N({})},children:[(0,k.jsx)(i,{className:`w-[140px]`,children:(0,k.jsx)(a,{placeholder:`All platforms`})}),(0,k.jsxs)(r,{children:[(0,k.jsx)(n,{value:`all`,children:`All platforms`}),(0,k.jsx)(n,{value:`web`,children:`Web`}),(0,k.jsx)(n,{value:`android`,children:`Android`}),(0,k.jsx)(n,{value:`ios`,children:`iOS`})]})]})]}),(0,k.jsxs)(re,{className:`rounded-md border`,children:[(0,k.jsxs)(we,{className:`min-w-full table-fixed`,children:[(0,k.jsx)(`colgroup`,{children:E.map(e=>{let t=w(e);return(0,k.jsx)(`col`,{"data-column-id":e,style:t?{width:t}:void 0},e)})}),(0,k.jsx)(xe,{children:q.getHeaderGroups().map(e=>(0,k.jsx)(x,{className:`hover:bg-transparent`,children:e.headers.map(e=>(0,k.jsx)(Se,{className:je(e.column.id),children:e.isPlaceholder?null:b(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,k.jsx)(Ce,{children:J.length?J.map((e,t)=>{let n=t===F,r=e.getIsSelected();return(0,k.jsx)(x,{ref:e=>{L.current[t]=e},"data-runs-row-surface":e.id,tabIndex:n?0:-1,"aria-selected":n,className:Ne({isActive:n,isBatchSelected:r}),onClick:()=>{I(t),X(e.original)},onFocus:()=>I(t),onKeyDown:t=>{t.key===`Enter`&&X(e.original,t)},children:e.getVisibleCells().map(e=>{let t=e.column.id===`select`;return(0,k.jsx)(S,{className:f(Me(e.column.id),t&&`relative z-10`),children:b(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)}):(0,k.jsx)(x,{children:(0,k.jsx)(S,{colSpan:U.length+1,className:`h-24 text-center`,children:`No results.`})})})]}),(0,k.jsx)(ne,{orientation:`horizontal`})]}),(0,k.jsxs)(`div`,{className:`flex items-center justify-between px-2`,children:[(0,k.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Z>0?`Showing ${$}-${Ke} of ${Z}${Y||z||B?` (${V.length} total)`:``}`:`No suites found`}),(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsx)(u,{variant:`outline`,size:`sm`,onClick:()=>q.previousPage(),disabled:!q.getCanPreviousPage(),children:`Previous`}),(0,k.jsx)(u,{variant:`outline`,size:`sm`,onClick:()=>q.nextPage(),disabled:!q.getCanNextPage(),children:`Next`})]})]}),(0,k.jsx)(l,{selectedCount:W.length,onRun:K,onRunNoCache:He,onDelete:Ue,onCancel:()=>N({}),isRunning:Pe})]})})}export{j as default};
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{t}from"./arrow-up-down-CN-uHgX9.js";import{i as n,n as r,o as i,s as a,t as o}from"./select-CeVjgiKI.js";import{n as s,r as c}from"./shortcut-hints-Bs5o743i.js";import{t as ee}from"./plus-pXO98OAE.js";import{t as te}from"./use-page-title-B1t9-5_U.js";import{t as l}from"./batch-action-bar-uEhHVDds.js";import{n as ne,t as re}from"./scroll-area-CnATfQoe.js";import{$n as u,At as d,Gt as ie,Ht as ae,M as oe,Mt as se,Nt as ce,Pt as f,Qn as p,St as m,Ut as h,Vn as le,Wt as g,a as ue,cr as de,jt as fe,nt as pe,pr as _,sr as me,st as he,ur as v}from"./index-Bvtm2F6f.js";import{t as y}from"./badge-DrW2vGVJ.js";import{a as ge,i as _e,n as ve,o as ye,r as be,t as b}from"./lib-58FyJI_k.js";import{a as xe,i as Se,n as Ce,o as x,r as S,t as we}from"./table-D08QBBt4.js";import{t as Te}from"./empty-state-BTvOA5lp.js";import{t as C}from"./use-keyboard-shortcuts-EAppuiKO.js";import{n as w,r as T,t as E}from"./tests-suites-table-widths-DNWnkAjA.js";var D=e(_(),1);function O(){let[e,t]=v(),n=e.get(`status`)??``,r=e.get(`platform`)??``,i=e.get(`sort`)??``,a=e.get(`order`)??`desc`,o=(0,D.useCallback)((e,n)=>{t(t=>{let r=new URLSearchParams(t);return n?r.set(e,n):r.delete(e),r},{replace:!0})},[t]),s=(0,D.useMemo)(()=>i?[{id:i,desc:a===`desc`}]:[],[i,a]),c=(0,D.useRef)(s);return c.current=s,{status:n,platform:r,sort:i,order:a,sorting:s,onSortingChange:(0,D.useCallback)(e=>{let n=typeof e==`function`?e(c.current):e;t(e=>{let t=new URLSearchParams(e);return n.length>0?(t.set(`sort`,n[0].id),t.set(`order`,n[0].desc?`desc`:`asc`)):(t.delete(`sort`),t.delete(`order`)),t},{replace:!0})},[t]),setStatus:(0,D.useCallback)(e=>o(`status`,e),[o]),setPlatform:(0,D.useCallback)(e=>o(`platform`,e),[o])}}var k=p(),Ee=new Set([`passed`,`healed`]),De=new Set([`passed`,`healed`,`failed`,`flaky`,`cancelled`]),Oe=50;function ke(e){return e?e===`ios`?`iOS`:e.charAt(0).toUpperCase()+e.slice(1):`—`}function A(e){return e.createdAt||e.startedAt||e.endedAt||``}function Ae({status:e}){switch(e){case`passed`:return(0,k.jsx)(y,{className:`bg-emerald-500/15 text-emerald-500 border-emerald-500/20`,children:`Passed`});case`failed`:return(0,k.jsx)(y,{variant:`destructive`,children:`Failed`});case`healed`:return(0,k.jsx)(y,{className:`bg-amber-500/15 text-amber-500 border-amber-500/20`,children:`Healed`});case`flaky`:return(0,k.jsx)(y,{className:`bg-amber-500/15 text-amber-500 border-amber-500/20`,children:`Flaky`});case`running`:return(0,k.jsx)(y,{className:`bg-blue-500/15 text-blue-500 border-blue-500/20 animate-pulse`,children:`Running`});case`cancelled`:return(0,k.jsx)(y,{className:`bg-muted text-muted-foreground border-border`,children:`Cancelled`});default:return(0,k.jsx)(y,{variant:`outline`,children:e})}}function je(e){return g(`h-10 bg-background text-[13px] font-medium text-foreground/90`,e===`select`?`px-2 text-center`:`px-3`,(e===`passRate`||e===`lastRun`)&&`text-right`)}function Me(e){return g(`py-2 align-top`,e===`select`&&`px-2`,e===`name`&&`max-w-0 px-3`,e===`targetName`&&`max-w-0 px-3`,e===`platform`&&`px-3`,e===`passRate`&&`px-3 text-right`,e===`lastRun`&&`max-w-0 px-3 text-right`)}function Ne({isActive:e,isBatchSelected:t}){return g(`cursor-pointer outline-none hover:bg-muted/20 focus-visible:bg-primary/10 focus-visible:ring-1 focus-visible:ring-inset focus-visible:ring-primary/60`,t&&!e&&`bg-muted/20`,e&&`bg-primary/10 ring-1 ring-inset ring-primary/60`)}function j(){te(`Suites`);let[e,p]=(0,D.useState)([]),[_,v]=(0,D.useState)([]),[y,j]=(0,D.useState)(!0),[M,N]=(0,D.useState)({}),[Pe,P]=(0,D.useState)(!1),[Fe,Ie]=(0,D.useState)([]),[F,I]=(0,D.useState)(-1),L=(0,D.useRef)([]),R=de(),{status:z,platform:B,sorting:Le,onSortingChange:Re,setStatus:ze,setPlatform:Be}=O();(0,D.useEffect)(()=>{let e=!1;return Promise.all([he(),pe({limit:200})]).then(([t,n])=>{e||(p(t.files),v(n.runs))}).catch(()=>{e||d.error(`Failed to load suites`)}).finally(()=>{e||j(!1)}),()=>{e=!0}},[]);let V=(0,D.useMemo)(()=>e.map(e=>{let t=[..._.filter(t=>t.suiteId&&e.suiteId?t.suiteId===e.suiteId:t.suiteId?!1:t.name===e.name)].sort((e,t)=>A(t).localeCompare(A(e))),n=t.filter(e=>De.has(e.status)),r=n.filter(e=>Ee.has(e.status)).length,i=n.length>0?Math.round(r/n.length*100):null,a=t[0]??null,o=t.find(e=>e.targetName?.trim())??null;return{path:e.path,suiteId:e.suiteId,name:e.name,platform:e.platform??o?.platform??a?.platform??null,lastRunStatus:a?.status??null,lastRun:a,targetName:o?.targetName?.trim()??a?.targetName?.trim()??null,passRate:i,passCount:r,completedRunCount:n.length}}),[e,_]),H=(0,D.useMemo)(()=>{let e=V;return z&&(e=z===`no-runs`?e.filter(e=>!e.lastRunStatus):e.filter(e=>e.lastRunStatus===z)),B&&(e=e.filter(e=>e.platform===B)),e},[V,z,B]),Ve={id:`select`,header:({table:e})=>(0,k.jsx)(`div`,{className:`flex items-center justify-center`,children:(0,k.jsx)(T,{checked:e.getIsAllPageRowsSelected()||e.getIsSomePageRowsSelected()&&`indeterminate`,onCheckedChange:t=>e.toggleAllPageRowsSelected(t),ariaLabel:`Select all`})}),cell:({row:e})=>(0,k.jsx)(T,{checked:e.getIsSelected(),onCheckedChange:t=>e.toggleSelected(t)}),enableSorting:!1,size:48},U=(0,D.useMemo)(()=>[{accessorKey:`name`,header:({column:e})=>(0,k.jsxs)(h,{variant:`ghost`,className:`-ml-4`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),children:[`Name`,(0,k.jsx)(t,{className:`ml-2 h-4 w-4`})]}),cell:({row:e})=>(0,k.jsxs)(`div`,{className:`space-y-0.5`,children:[(0,k.jsx)(`span`,{className:`block whitespace-normal break-words text-sm font-medium leading-snug text-foreground`,children:e.getValue(`name`)}),(0,k.jsx)(`span`,{className:`block whitespace-normal break-all text-xs leading-snug text-muted-foreground`,children:e.original.path})]}),size:400,filterFn:(e,t,n)=>{let r=e.getValue(`name`).toLowerCase(),i=e.original.path.toLowerCase(),a=n.toLowerCase();return r.includes(a)||i.includes(a)}},{accessorKey:`targetName`,header:({column:e})=>(0,k.jsxs)(h,{variant:`ghost`,className:`-ml-4`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),children:[`Target`,(0,k.jsx)(t,{className:`ml-2 h-4 w-4`})]}),cell:({row:e})=>(0,k.jsx)(`span`,{className:`block whitespace-normal break-words text-sm leading-snug text-muted-foreground`,children:e.original.targetName??`No target`})},{accessorKey:`platform`,header:({column:e})=>(0,k.jsxs)(h,{variant:`ghost`,className:`-ml-4`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),children:[`Platform`,(0,k.jsx)(t,{className:`ml-2 h-4 w-4`})]}),cell:({row:e})=>(0,k.jsx)(`span`,{className:`text-muted-foreground text-sm`,children:ke(e.getValue(`platform`))})},{accessorKey:`passRate`,header:({column:e})=>(0,k.jsxs)(h,{variant:`ghost`,className:`-ml-4`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),children:[`Pass rate`,(0,k.jsx)(t,{className:`ml-2 h-4 w-4`})]}),cell:({row:e})=>e.original.passRate===null?(0,k.jsxs)(`div`,{className:`space-y-0.5 text-right`,children:[(0,k.jsx)(`div`,{className:`text-sm font-medium text-foreground`,children:`No runs`}),(0,k.jsx)(`div`,{className:`text-xs tabular-nums text-muted-foreground`,children:`0 completed`})]}):(0,k.jsxs)(`div`,{className:`space-y-0.5 text-right`,children:[(0,k.jsxs)(`div`,{className:`text-sm font-medium tabular-nums text-foreground`,children:[e.original.passRate,`%`]}),(0,k.jsxs)(`div`,{className:`text-xs tabular-nums text-muted-foreground`,children:[e.original.passCount,`/`,e.original.completedRunCount]})]})},{id:`lastRun`,accessorFn:e=>e.lastRun?.createdAt??e.lastRun?.startedAt??e.lastRun?.endedAt??``,header:({column:e})=>(0,k.jsx)(`div`,{className:`flex items-center justify-end`,children:(0,k.jsxs)(h,{variant:`ghost`,className:`h-auto justify-end px-0 text-[13px] font-medium text-foreground/90 hover:bg-transparent`,onClick:()=>e.toggleSorting(e.getIsSorted()===`asc`),children:[`Last run`,(0,k.jsx)(t,{className:`ml-2 h-4 w-4`})]})}),cell:({row:e})=>e.original.lastRun?(0,k.jsxs)(me,{to:u.runDetail(e.original.lastRun.id),className:`relative z-10 flex w-full flex-col items-end gap-1 rounded-sm text-right focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-primary/60`,onClick:e=>e.stopPropagation(),children:[(0,k.jsx)(Ae,{status:e.original.lastRun.status}),(0,k.jsx)(`span`,{className:`whitespace-normal break-words text-xs leading-snug text-muted-foreground`,children:ie(A(e.original.lastRun))})]}):(0,k.jsx)(`span`,{className:`block text-sm text-muted-foreground`,children:`No runs`})}],[]),W=(0,D.useMemo)(()=>Object.keys(M).filter(e=>M[e]),[M]),G=(0,D.useMemo)(()=>H.filter(e=>W.includes(e.path)),[H,W]),K=(0,D.useCallback)(async e=>{if(G.length!==0){P(!0);try{let t=await Promise.allSettled(G.map(t=>m({file:t.path,local:e}))),n=t.filter(e=>e.status===`fulfilled`).length,r=t.length-n;r>0?d.error(`${n} runs queued, ${r} failed`):d.success(`${n} runs queued`),N({})}finally{P(!1)}}},[G]),He=(0,D.useCallback)(async e=>{if(G.length!==0){P(!0);try{let t=await Promise.allSettled(G.map(t=>m({file:t.path,noCache:!0,local:e}))),n=t.filter(e=>e.status===`fulfilled`).length,r=t.length-n;r>0?d.error(`${n} runs queued (no cache), ${r} failed`):d.success(`${n} runs queued (no cache)`),N({})}finally{P(!1)}}},[G]),Ue=(0,D.useCallback)(async()=>{if(G.length!==0){P(!0);try{let e=await Promise.allSettled(G.map(e=>oe(e.path))),t=G.filter((t,n)=>e[n]?.status===`fulfilled`),n=new Set(t.map(e=>e.path)),r=e.length-t.length;t.length>0&&(p(e=>e.filter(e=>!n.has(e.path))),N(e=>Object.fromEntries(Object.entries(e).filter(([e])=>!n.has(e))))),r>0?d.error(`Deleted ${t.length} suite${t.length===1?``:`s`}, ${r} failed`):d.success(`Deleted ${t.length} suite${t.length===1?``:`s`}`)}finally{P(!1)}}},[G]),q=ve({data:H,columns:[Ve,...U],getCoreRowModel:be(),getSortedRowModel:ye(),getFilteredRowModel:_e(),getPaginationRowModel:ge(),onSortingChange:Re,onColumnFiltersChange:Ie,enableRowSelection:!0,onRowSelectionChange:N,getRowId:e=>e.path,state:{sorting:Le,columnFilters:Fe,rowSelection:M},initialState:{pagination:{pageSize:Oe}}}),J=q.getRowModel().rows,Y=q.getColumn(`name`)?.getFilterValue()??``,We=(0,D.useCallback)(e=>{q.getColumn(`name`)?.setFilterValue(e||void 0),q.setPageIndex(0),I(-1),N({})},[q]);C((0,D.useMemo)(()=>{let e=()=>I(e=>Math.min(e+1,J.length-1)),t=()=>I(e=>Math.max(e-1,0));return{j:e,arrowdown:e,k:t,arrowup:t,enter:e=>{if(F>=0&&J[F]){let t=J[F].original;if(!t.suiteId)return;let n=u.suiteView(t.suiteId);e.metaKey||e.ctrlKey?window.open(n,`_blank`):R(n)}}}},[J,F,R])),(0,D.useEffect)(()=>{if(F<0)return;let e=L.current[F];e&&document.activeElement!==e&&e.focus()},[F,J.length]);let X=(0,D.useCallback)((e,t)=>{e.suiteId&&(t&&t.preventDefault(),R(u.suiteView(e.suiteId)))},[R]);if(y)return(0,k.jsx)(ue,{});if(e.length===0)return(0,k.jsx)(Te,{icon:le,title:`No suites found`,description:`Create your first suite file`,actionLabel:`New Suite`,onAction:()=>R(u.suiteNew)});let Z=q.getFilteredRowModel().rows.length,Ge=q.getState().pagination.pageIndex,Q=q.getState().pagination.pageSize,$=Ge*Q+1,Ke=Math.min($+Q-1,Z);return(0,k.jsx)(ce,{children:(0,k.jsxs)(`div`,{className:`space-y-4`,children:[(0,k.jsxs)(`div`,{className:`flex items-center justify-between gap-3`,children:[(0,k.jsx)(`h1`,{className:`text-2xl font-semibold tracking-tight`,children:`Suites`}),(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsxs)(fe,{children:[(0,k.jsx)(f,{asChild:!0,children:(0,k.jsx)(h,{variant:`ghost`,size:`icon-sm`,"aria-label":`Keyboard shortcuts`,children:(0,k.jsx)(c,{className:`h-4 w-4`})})}),(0,k.jsx)(se,{side:`bottom`,className:`p-3`,children:(0,k.jsx)(s,{hints:[{key:`J / ↓`,label:`Next row`},{key:`K / ↑`,label:`Previous row`},{key:`Enter`,label:`Open suite`},{key:`⌘+Enter`,label:`Open in new tab`}]})})]}),(0,k.jsxs)(h,{size:`sm`,onClick:()=>R(u.suiteNew),children:[(0,k.jsx)(ee,{className:`size-4`}),`New Suite`]})]})]}),(0,k.jsxs)(`div`,{className:`flex items-center gap-2 flex-wrap`,children:[(0,k.jsx)(ae,{placeholder:`Search suites...`,value:Y,onChange:e=>We(e.target.value),className:`max-w-[220px]`}),(0,k.jsxs)(o,{value:z||`all`,onValueChange:e=>{ze(e===`all`?``:e),I(-1),N({})},children:[(0,k.jsx)(i,{className:`w-[150px]`,children:(0,k.jsx)(a,{placeholder:`All statuses`})}),(0,k.jsxs)(r,{children:[(0,k.jsx)(n,{value:`all`,children:`All statuses`}),(0,k.jsx)(n,{value:`passed`,children:`Passed`}),(0,k.jsx)(n,{value:`failed`,children:`Failed`}),(0,k.jsx)(n,{value:`running`,children:`Running`}),(0,k.jsx)(n,{value:`no-runs`,children:`No runs`})]})]}),(0,k.jsxs)(o,{value:B||`all`,onValueChange:e=>{Be(e===`all`?``:e),I(-1),N({})},children:[(0,k.jsx)(i,{className:`w-[140px]`,children:(0,k.jsx)(a,{placeholder:`All platforms`})}),(0,k.jsxs)(r,{children:[(0,k.jsx)(n,{value:`all`,children:`All platforms`}),(0,k.jsx)(n,{value:`web`,children:`Web`}),(0,k.jsx)(n,{value:`android`,children:`Android`}),(0,k.jsx)(n,{value:`ios`,children:`iOS`})]})]})]}),(0,k.jsxs)(re,{className:`rounded-md border`,children:[(0,k.jsxs)(we,{className:`min-w-full table-fixed`,children:[(0,k.jsx)(`colgroup`,{children:E.map(e=>{let t=w(e);return(0,k.jsx)(`col`,{"data-column-id":e,style:t?{width:t}:void 0},e)})}),(0,k.jsx)(xe,{children:q.getHeaderGroups().map(e=>(0,k.jsx)(x,{className:`hover:bg-transparent`,children:e.headers.map(e=>(0,k.jsx)(Se,{className:je(e.column.id),children:e.isPlaceholder?null:b(e.column.columnDef.header,e.getContext())},e.id))},e.id))}),(0,k.jsx)(Ce,{children:J.length?J.map((e,t)=>{let n=t===F,r=e.getIsSelected();return(0,k.jsx)(x,{ref:e=>{L.current[t]=e},"data-runs-row-surface":e.id,tabIndex:n?0:-1,"aria-selected":n,className:Ne({isActive:n,isBatchSelected:r}),onClick:()=>{I(t),X(e.original)},onFocus:()=>I(t),onKeyDown:t=>{t.key===`Enter`&&X(e.original,t)},children:e.getVisibleCells().map(e=>{let t=e.column.id===`select`;return(0,k.jsx)(S,{className:g(Me(e.column.id),t&&`relative z-10`),children:b(e.column.columnDef.cell,e.getContext())},e.id)})},e.id)}):(0,k.jsx)(x,{children:(0,k.jsx)(S,{colSpan:U.length+1,className:`h-24 text-center`,children:`No results.`})})})]}),(0,k.jsx)(ne,{orientation:`horizontal`})]}),(0,k.jsxs)(`div`,{className:`flex items-center justify-between px-2`,children:[(0,k.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:Z>0?`Showing ${$}-${Ke} of ${Z}${Y||z||B?` (${V.length} total)`:``}`:`No suites found`}),(0,k.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,k.jsx)(h,{variant:`outline`,size:`sm`,onClick:()=>q.previousPage(),disabled:!q.getCanPreviousPage(),children:`Previous`}),(0,k.jsx)(h,{variant:`outline`,size:`sm`,onClick:()=>q.nextPage(),disabled:!q.getCanNextPage(),children:`Next`})]})]}),(0,k.jsx)(l,{selectedCount:W.length,onRun:K,onRunNoCache:He,onDelete:Ue,onCancel:()=>N({}),isRunning:Pe})]})})}export{j as default};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-CilyBKbf.js";import{c as t}from"./select-B5gV6YUf.js";import{Cn as n,Sn as r,Tn as i,Ut as a,Zn as o,bn as s,en as c,fr as l,jn as u}from"./index-B3xPCIyH.js";var d=e(l(),1),f=o(),p=`Switch`,[m,h]=n(p),[g,_]=m(p),v=d.forwardRef((e,t)=>{let{__scopeSwitch:n,name:a,checked:o,defaultChecked:c,required:l,disabled:m,value:h=`on`,onCheckedChange:_,form:v,...y}=e,[b,x]=d.useState(null),w=u(t,e=>x(e)),T=d.useRef(!1),E=b?v||!!b.closest(`form`):!0,[D,O]=s({prop:o,defaultProp:c??!1,onChange:_,caller:p});return(0,f.jsxs)(g,{scope:n,checked:D,disabled:m,children:[(0,f.jsx)(i.button,{type:`button`,role:`switch`,"aria-checked":D,"aria-required":l,"data-state":C(D),"data-disabled":m?``:void 0,disabled:m,value:h,...y,ref:w,onClick:r(e.onClick,e=>{O(e=>!e),E&&(T.current=e.isPropagationStopped(),T.current||e.stopPropagation())})}),E&&(0,f.jsx)(S,{control:b,bubbles:!T.current,name:a,value:h,checked:D,required:l,disabled:m,form:v,style:{transform:`translateX(-100%)`}})]})});v.displayName=p;var y=`SwitchThumb`,b=d.forwardRef((e,t)=>{let{__scopeSwitch:n,...r}=e,a=_(y,n);return(0,f.jsx)(i.span,{"data-state":C(a.checked),"data-disabled":a.disabled?``:void 0,...r,ref:t})});b.displayName=y;var x=`SwitchBubbleInput`,S=d.forwardRef(({__scopeSwitch:e,control:n,checked:r,bubbles:i=!0,...a},o)=>{let s=d.useRef(null),l=u(s,o),p=t(r),m=c(n);return d.useEffect(()=>{let e=s.current;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(p!==r&&n){let t=new Event(`click`,{bubbles:i});n.call(e,r),e.dispatchEvent(t)}},[p,r,i]),(0,f.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:r,...a,tabIndex:-1,ref:l,style:{...a.style,...m,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});S.displayName=x;function C(e){return e?`checked`:`unchecked`}var w=v,T=b;function E({className:e,size:t=`default`,...n}){return(0,f.jsx)(w,{"data-slot":`switch`,"data-size":t,className:a(`peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80`,e),...n,children:(0,f.jsx)(T,{"data-slot":`switch-thumb`,className:a(`pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-muted-foreground`)})})}export{E as t};
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{c as t}from"./select-CeVjgiKI.js";import{Cn as n,En as r,Mn as i,Qn as a,Wt as o,pr as s,tn as c,wn as l,xn as u}from"./index-Bvtm2F6f.js";var d=e(s(),1),f=a(),p=`Switch`,[m,h]=l(p),[g,_]=m(p),v=d.forwardRef((e,t)=>{let{__scopeSwitch:a,name:o,checked:s,defaultChecked:c,required:l,disabled:m,value:h=`on`,onCheckedChange:_,form:v,...y}=e,[b,x]=d.useState(null),w=i(t,e=>x(e)),T=d.useRef(!1),E=b?v||!!b.closest(`form`):!0,[D,O]=u({prop:s,defaultProp:c??!1,onChange:_,caller:p});return(0,f.jsxs)(g,{scope:a,checked:D,disabled:m,children:[(0,f.jsx)(r.button,{type:`button`,role:`switch`,"aria-checked":D,"aria-required":l,"data-state":C(D),"data-disabled":m?``:void 0,disabled:m,value:h,...y,ref:w,onClick:n(e.onClick,e=>{O(e=>!e),E&&(T.current=e.isPropagationStopped(),T.current||e.stopPropagation())})}),E&&(0,f.jsx)(S,{control:b,bubbles:!T.current,name:o,value:h,checked:D,required:l,disabled:m,form:v,style:{transform:`translateX(-100%)`}})]})});v.displayName=p;var y=`SwitchThumb`,b=d.forwardRef((e,t)=>{let{__scopeSwitch:n,...i}=e,a=_(y,n);return(0,f.jsx)(r.span,{"data-state":C(a.checked),"data-disabled":a.disabled?``:void 0,...i,ref:t})});b.displayName=y;var x=`SwitchBubbleInput`,S=d.forwardRef(({__scopeSwitch:e,control:n,checked:r,bubbles:a=!0,...o},s)=>{let l=d.useRef(null),u=i(l,s),p=t(r),m=c(n);return d.useEffect(()=>{let e=l.current;if(!e)return;let t=window.HTMLInputElement.prototype,n=Object.getOwnPropertyDescriptor(t,`checked`).set;if(p!==r&&n){let t=new Event(`click`,{bubbles:a});n.call(e,r),e.dispatchEvent(t)}},[p,r,a]),(0,f.jsx)(`input`,{type:`checkbox`,"aria-hidden":!0,defaultChecked:r,...o,tabIndex:-1,ref:u,style:{...o.style,...m,position:`absolute`,pointerEvents:`none`,opacity:0,margin:0}})});S.displayName=x;function C(e){return e?`checked`:`unchecked`}var w=v,T=b;function E({className:e,size:t=`default`,...n}){return(0,f.jsx)(w,{"data-slot":`switch`,"data-size":t,className:o(`peer group/switch inline-flex shrink-0 items-center rounded-full border border-transparent shadow-xs transition-all outline-none focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:cursor-not-allowed disabled:opacity-50 data-[size=default]:h-[1.15rem] data-[size=default]:w-8 data-[size=sm]:h-3.5 data-[size=sm]:w-6 data-[state=checked]:bg-primary data-[state=unchecked]:bg-input dark:data-[state=unchecked]:bg-input/80`,e),...n,children:(0,f.jsx)(T,{"data-slot":`switch-thumb`,className:o(`pointer-events-none block rounded-full bg-background ring-0 transition-transform group-data-[size=default]/switch:size-4 group-data-[size=sm]/switch:size-3 data-[state=checked]:translate-x-[calc(100%-2px)] data-[state=unchecked]:translate-x-0 dark:data-[state=checked]:bg-primary-foreground dark:data-[state=unchecked]:bg-muted-foreground`)})})}export{E as t};
@@ -0,0 +1 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{i as t,l as n,n as r,o as i,s as a,t as o,u as s}from"./select-CeVjgiKI.js";import{t as c}from"./circle-x-yPIxYoz1.js";import{t as l}from"./copy-Clw3wvSn.js";import{t as u}from"./eye-CZrufbYE.js";import{t as d}from"./refresh-cw-C_0AkMuu.js";import{t as f}from"./dist-BPJgj1d0.js";import{r as p}from"./use-page-title-B1t9-5_U.js";import{Cn as m,En as h,Ft as g,Jn as _,Ln as v,Mn as y,Nn as ee,Qn as te,Rn as ne,Sn as re,Un as b,Wn as x,Wt as S,bn as ie,it as ae,pr as oe,qt as C,wn as se,xn as w,yn as T}from"./index-Bvtm2F6f.js";import{t as E}from"./badge-DrW2vGVJ.js";var ce=_(`brain`,[[`path`,{d:`M12 18V5`,key:`adv99a`}],[`path`,{d:`M15 13a4.17 4.17 0 0 1-3-4 4.17 4.17 0 0 1-3 4`,key:`1e3is1`}],[`path`,{d:`M17.598 6.5A3 3 0 1 0 12 5a3 3 0 1 0-5.598 1.5`,key:`1gqd8o`}],[`path`,{d:`M17.997 5.125a4 4 0 0 1 2.526 5.77`,key:`iwvgf7`}],[`path`,{d:`M18 18a4 4 0 0 0 2-7.464`,key:`efp6ie`}],[`path`,{d:`M19.967 17.483A4 4 0 1 1 12 18a4 4 0 1 1-7.967-.517`,key:`1gq6am`}],[`path`,{d:`M6 18a4 4 0 0 1-2-7.464`,key:`k1g0md`}],[`path`,{d:`M6.003 5.125a4 4 0 0 0-2.526 5.77`,key:`q97ue3`}]]),le=_(`clock`,[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`M12 6v6l4 2`,key:`mmk7yg`}]]),ue=_(`shield-check`,[[`path`,{d:`M20 13c0 5-3.5 7.5-7.66 8.95a1 1 0 0 1-.67-.01C7.5 20.5 4 18 4 13V6a1 1 0 0 1 1-1c2 0 4.5-1.2 6.24-2.72a1.17 1.17 0 0 1 1.52 0C14.51 3.81 17 5 19 5a1 1 0 0 1 1 1z`,key:`oel41y`}],[`path`,{d:`m9 12 2 2 4-4`,key:`dzmm74`}]]),D=e(oe(),1),O=te(),k=`Collapsible`,[de,fe]=se(k),[pe,A]=de(k),me=D.forwardRef((e,t)=>{let{__scopeCollapsible:n,open:r,defaultOpen:i,disabled:a,onOpenChange:o,...s}=e,[c,l]=w({prop:r,defaultProp:i??!1,onChange:o,caller:k});return(0,O.jsx)(pe,{scope:n,disabled:a,contentId:T(),open:c,onOpenToggle:D.useCallback(()=>l(e=>!e),[l]),children:(0,O.jsx)(h.div,{"data-state":P(c),"data-disabled":a?``:void 0,...s,ref:t})})});me.displayName=k;var he=`CollapsibleTrigger`,j=D.forwardRef((e,t)=>{let{__scopeCollapsible:n,...r}=e,i=A(he,n);return(0,O.jsx)(h.button,{type:`button`,"aria-controls":i.contentId,"aria-expanded":i.open||!1,"data-state":P(i.open),"data-disabled":i.disabled?``:void 0,disabled:i.disabled,...r,ref:t,onClick:m(e.onClick,i.onOpenToggle)})});j.displayName=he;var M=`CollapsibleContent`,N=D.forwardRef((e,t)=>{let{forceMount:n,...r}=e,i=A(M,e.__scopeCollapsible);return(0,O.jsx)(ie,{present:n||i.open,children:({present:e})=>(0,O.jsx)(ge,{...r,ref:t,present:e})})});N.displayName=M;var ge=D.forwardRef((e,t)=>{let{__scopeCollapsible:n,present:r,children:i,...a}=e,o=A(M,n),[s,c]=D.useState(r),l=D.useRef(null),u=y(t,l),d=D.useRef(0),f=d.current,p=D.useRef(0),m=p.current,g=o.open||s,_=D.useRef(g),v=D.useRef(void 0);return D.useEffect(()=>{let e=requestAnimationFrame(()=>_.current=!1);return()=>cancelAnimationFrame(e)},[]),re(()=>{let e=l.current;if(e){v.current=v.current||{transitionDuration:e.style.transitionDuration,animationName:e.style.animationName},e.style.transitionDuration=`0s`,e.style.animationName=`none`;let t=e.getBoundingClientRect();d.current=t.height,p.current=t.width,_.current||(e.style.transitionDuration=v.current.transitionDuration,e.style.animationName=v.current.animationName),c(r)}},[o.open,r]),(0,O.jsx)(h.div,{"data-state":P(o.open),"data-disabled":o.disabled?``:void 0,id:o.contentId,hidden:!g,...a,ref:u,style:{"--radix-collapsible-content-height":f?`${f}px`:void 0,"--radix-collapsible-content-width":m?`${m}px`:void 0,...e.style},children:g&&i})});function P(e){return e?`open`:`closed`}var F=me,_e=j,ve=N,I=`Accordion`,ye=[`Home`,`End`,`ArrowDown`,`ArrowUp`,`ArrowLeft`,`ArrowRight`],[L,be,xe]=f(I),[R,Se]=se(I,[xe,fe]),z=fe(),Ce=D.forwardRef((e,t)=>{let{type:n,...r}=e,i=r,a=r;return(0,O.jsx)(L.Provider,{scope:e.__scopeAccordion,children:n===`multiple`?(0,O.jsx)(Oe,{...a,ref:t}):(0,O.jsx)(De,{...i,ref:t})})});Ce.displayName=I;var[B,we]=R(I),[Te,Ee]=R(I,{collapsible:!1}),De=D.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},collapsible:a=!1,...o}=e,[s,c]=w({prop:n,defaultProp:r??``,onChange:i,caller:I});return(0,O.jsx)(B,{scope:e.__scopeAccordion,value:D.useMemo(()=>s?[s]:[],[s]),onItemOpen:c,onItemClose:D.useCallback(()=>a&&c(``),[a,c]),children:(0,O.jsx)(Te,{scope:e.__scopeAccordion,collapsible:a,children:(0,O.jsx)(Ae,{...o,ref:t})})})}),Oe=D.forwardRef((e,t)=>{let{value:n,defaultValue:r,onValueChange:i=()=>{},...a}=e,[o,s]=w({prop:n,defaultProp:r??[],onChange:i,caller:I}),c=D.useCallback(e=>s((t=[])=>[...t,e]),[s]),l=D.useCallback(e=>s((t=[])=>t.filter(t=>t!==e)),[s]);return(0,O.jsx)(B,{scope:e.__scopeAccordion,value:o,onItemOpen:c,onItemClose:l,children:(0,O.jsx)(Te,{scope:e.__scopeAccordion,collapsible:!0,children:(0,O.jsx)(Ae,{...a,ref:t})})})}),[ke,V]=R(I),Ae=D.forwardRef((e,t)=>{let{__scopeAccordion:n,disabled:r,dir:i,orientation:a=`vertical`,...o}=e,s=y(D.useRef(null),t),c=be(n),l=p(i)===`ltr`,u=m(e.onKeyDown,e=>{if(!ye.includes(e.key))return;let t=e.target,n=c().filter(e=>!e.ref.current?.disabled),r=n.findIndex(e=>e.ref.current===t),i=n.length;if(r===-1)return;e.preventDefault();let o=r,s=i-1,u=()=>{o=r+1,o>s&&(o=0)},d=()=>{o=r-1,o<0&&(o=s)};switch(e.key){case`Home`:o=0;break;case`End`:o=s;break;case`ArrowRight`:a===`horizontal`&&(l?u():d());break;case`ArrowDown`:a===`vertical`&&u();break;case`ArrowLeft`:a===`horizontal`&&(l?d():u());break;case`ArrowUp`:a===`vertical`&&d();break}n[o%i].ref.current?.focus()});return(0,O.jsx)(ke,{scope:n,disabled:r,direction:i,orientation:a,children:(0,O.jsx)(L.Slot,{scope:n,children:(0,O.jsx)(h.div,{...o,"data-orientation":a,ref:s,onKeyDown:r?void 0:u})})})}),H=`AccordionItem`,[je,U]=R(H),Me=D.forwardRef((e,t)=>{let{__scopeAccordion:n,value:r,...i}=e,a=V(H,n),o=we(H,n),s=z(n),c=T(),l=r&&o.value.includes(r)||!1,u=a.disabled||e.disabled;return(0,O.jsx)(je,{scope:n,open:l,disabled:u,triggerId:c,children:(0,O.jsx)(F,{"data-orientation":a.orientation,"data-state":Re(l),...s,...i,ref:t,disabled:u,open:l,onOpenChange:e=>{e?o.onItemOpen(r):o.onItemClose(r)}})})});Me.displayName=H;var Ne=`AccordionHeader`,Pe=D.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=V(I,n),a=U(Ne,n);return(0,O.jsx)(h.h3,{"data-orientation":i.orientation,"data-state":Re(a.open),"data-disabled":a.disabled?``:void 0,...r,ref:t})});Pe.displayName=Ne;var W=`AccordionTrigger`,Fe=D.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=V(I,n),a=U(W,n),o=Ee(W,n),s=z(n);return(0,O.jsx)(L.ItemSlot,{scope:n,children:(0,O.jsx)(_e,{"aria-disabled":a.open&&!o.collapsible||void 0,"data-orientation":i.orientation,id:a.triggerId,...s,...r,ref:t})})});Fe.displayName=W;var Ie=`AccordionContent`,Le=D.forwardRef((e,t)=>{let{__scopeAccordion:n,...r}=e,i=V(I,n),a=U(Ie,n),o=z(n);return(0,O.jsx)(ve,{role:`region`,"aria-labelledby":a.triggerId,"data-orientation":i.orientation,...o,...r,ref:t,style:{"--radix-accordion-content-height":`var(--radix-collapsible-content-height)`,"--radix-accordion-content-width":`var(--radix-collapsible-content-width)`,...e.style}})});Le.displayName=Ie;function Re(e){return e?`open`:`closed`}var ze=Ce,Be=Me,Ve=Pe,He=Fe,Ue=Le;function G({...e}){return(0,O.jsx)(F,{"data-slot":`collapsible`,...e})}function K({...e}){return(0,O.jsx)(j,{"data-slot":`collapsible-trigger`,...e})}function q({...e}){return(0,O.jsx)(N,{"data-slot":`collapsible-content`,...e})}function We({confidence:e}){let t=Math.round(e*100);return(0,O.jsxs)(E,{variant:`outline`,className:S(`text-xs font-mono`,t>80?`bg-emerald-500/10 text-emerald-500 border-emerald-500/20`:t>=50?`bg-amber-500/10 text-amber-500 border-amber-500/20`:`bg-red-500/10 text-red-500 border-red-500/20`),children:[t,`%`]})}function Ge({...e}){return(0,O.jsx)(ze,{"data-slot":`accordion`,...e})}function Ke({className:e,...t}){return(0,O.jsx)(Be,{"data-slot":`accordion-item`,className:S(`border-b last:border-b-0`,e),...t})}function qe({className:e,children:t,...r}){return(0,O.jsx)(Ve,{className:`flex`,children:(0,O.jsxs)(He,{"data-slot":`accordion-trigger`,className:S(`flex flex-1 items-start justify-between gap-4 rounded-md py-4 text-left text-sm font-medium transition-all outline-none hover:underline focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 disabled:pointer-events-none disabled:opacity-50 [&[data-state=open]>svg]:rotate-180`,e),...r,children:[t,(0,O.jsx)(n,{className:`pointer-events-none size-4 shrink-0 translate-y-0.5 text-muted-foreground transition-transform duration-200`})]})})}function Je({className:e,children:t,...n}){return(0,O.jsx)(Ue,{"data-slot":`accordion-content`,className:`overflow-hidden text-sm data-[state=closed]:animate-accordion-up data-[state=open]:animate-accordion-down`,...n,children:(0,O.jsx)(`div`,{className:S(`pt-0 pb-4`,e),children:t})})}function Ye({attempts:e}){return!e||e.length===0?null:(0,O.jsx)(Ge,{type:`single`,collapsible:!0,className:`w-full`,children:e.map((e,t)=>(0,O.jsxs)(Ke,{value:`attempt-${t}`,children:[(0,O.jsx)(qe,{className:`py-2 text-sm`,children:(0,O.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,O.jsxs)(`span`,{className:`font-medium`,children:[`Attempt `,e.attemptNumber??t+1]}),e.strategy&&(0,O.jsx)(E,{variant:`secondary`,className:`text-xs`,children:e.strategy}),e.success?(0,O.jsx)(b,{className:`h-3.5 w-3.5 text-emerald-500`}):(0,O.jsx)(c,{className:`h-3.5 w-3.5 text-red-500`})]})}),(0,O.jsxs)(Je,{className:`space-y-2`,children:[e.reasoning&&(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground font-medium mb-0.5`,children:`Reasoning`}),(0,O.jsx)(`p`,{className:`text-sm`,children:e.reasoning})]}),e.observationBefore&&(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground font-medium mb-0.5`,children:`Observation Before`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.observationBefore.length>200?`${e.observationBefore.slice(0,200)}…`:e.observationBefore})]}),e.observationAfter&&(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground font-medium mb-0.5`,children:`Observation After`}),(0,O.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:e.observationAfter.length>200?`${e.observationAfter.slice(0,200)}…`:e.observationAfter})]}),e.action!=null&&(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground font-medium mb-0.5`,children:`Action`}),(0,O.jsx)(`pre`,{className:`text-xs font-mono bg-muted/50 rounded p-2 overflow-x-auto`,children:typeof e.action==`string`?e.action:JSON.stringify(e.action,null,2)})]})]})]},t))})}var J=[{key:`observe`,label:`Observe`,icon:u},{key:`plan`,label:`Plan`,icon:ce},{key:`execute`,label:`Execute`,icon:ne},{key:`verify`,label:`Verify`,icon:ue},{key:`heal`,label:`Heal`,icon:d}];function Xe(e){return e==null?``:typeof e==`string`?e:JSON.stringify(e,null,2)}function Y({config:e,content:t,duration:n,outcome:r,children:i,open:a,onOpenChange:o,sectionRef:s}){let[c,l]=(0,D.useState)(!1),u=a!==void 0,d=u?a:c,f=u?o:l,p=e.icon,m=t||i;return(0,O.jsxs)(G,{open:d,onOpenChange:f,children:[(0,O.jsxs)(K,{ref:s,className:`flex w-full items-center gap-2 py-1.5 text-left group sticky top-0 z-20 bg-background`,children:[(0,O.jsx)(`div`,{className:`flex items-center justify-center h-4 w-4 rounded-full bg-background border shrink-0`,children:(0,O.jsx)(p,{className:`h-2.5 w-2.5 text-muted-foreground`})}),(0,O.jsx)(`span`,{className:`text-sm font-medium`,children:e.label}),n!=null&&(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:C(n)}),r,(0,O.jsx)(`span`,{className:`flex-1`}),m&&(0,O.jsx)(x,{className:S(`h-3 w-3 text-muted-foreground transition-transform duration-200`,d&&`rotate-90`)})]}),m&&(0,O.jsx)(q,{className:`overflow-hidden min-w-0 max-w-full`,children:(0,O.jsxs)(`div`,{className:`min-w-0 max-w-full pl-6 pb-2 space-y-2`,children:[t&&(0,O.jsx)(`div`,{"data-reasoning-content-shell":`true`,className:`min-w-0 max-w-full rounded-sm`,children:(0,O.jsx)(`div`,{"data-reasoning-prose":`true`,className:`m-0 whitespace-pre-wrap break-words text-sm text-muted-foreground [overflow-wrap:anywhere]`,children:t})}),i&&(0,O.jsx)(`div`,{"data-reasoning-children":`true`,className:`min-w-0 max-w-full`,children:i})]})})]})}function Ze(e){let t=[];return e.observation&&t.push({key:`observation`,label:`Observe`,icon:J[0].icon,content:e.observation,duration:null}),e.reasoning&&t.push({key:`reasoning`,label:`Plan`,icon:J[1].icon,content:e.reasoning,duration:null}),e.plannedAction!=null&&t.push({key:`plannedAction`,label:`Execute`,icon:J[2].icon,content:null,duration:null,children:(0,O.jsx)(`pre`,{className:`min-w-0 max-w-full text-xs font-mono bg-muted/50 rounded p-2 overflow-x-auto whitespace-pre-wrap break-words [overflow-wrap:anywhere]`,children:typeof e.plannedAction==`string`?e.plannedAction:JSON.stringify(e.plannedAction,null,2)})}),t}var Qe=(0,D.forwardRef)(function({step:e},t){let n=Ze(e);return n.length===0&&e.error?(0,O.jsx)(`div`,{className:`bg-destructive/10 text-destructive rounded p-2 text-sm break-words [overflow-wrap:anywhere]`,children:e.error}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)($e,{ref:t,sections:n}),e.error&&(0,O.jsx)(`div`,{className:`pl-6 pb-2`,children:(0,O.jsx)(`div`,{className:`bg-destructive/10 text-destructive rounded p-2 text-sm break-words [overflow-wrap:anywhere]`,children:e.error})})]})}),$e=(0,D.forwardRef)(function({sections:e},t){let[n,r]=(0,D.useState)(()=>e.map(()=>!1)),i=(0,D.useRef)([]),a=(0,D.useCallback)(e=>{r(t=>{let n=[...t],r=n[e];return n[e]=!r,r||requestAnimationFrame(()=>{i.current[e]?.scrollIntoView({block:`start`,behavior:`smooth`})}),n})},[]);return(0,D.useImperativeHandle)(t,()=>({togglePhase:a}),[a]),(0,O.jsxs)(`div`,{className:`relative space-y-0`,children:[(0,O.jsx)(`div`,{className:`absolute left-[7px] top-4 bottom-4 w-px bg-border`}),e.map((e,t)=>(0,O.jsx)(Y,{config:{key:e.key,label:e.label,icon:e.icon},content:e.content,duration:e.duration,outcome:e.outcome,open:n[t],onOpenChange:e=>r(n=>{let r=[...n];return r[t]=e,r}),sectionRef:e=>{i.current[t]=e},children:e.children},e.key))]})}),et=(0,D.forwardRef)(function({runId:e,stepOrder:t,stepData:n},r){let[i,a]=(0,D.useState)(null),[o,s]=(0,D.useState)(!0),[c,l]=(0,D.useState)(null),[u,d]=(0,D.useState)([!1,!1,!1,!1]),f=(0,D.useRef)([null,null,null,null]),p=(0,D.useCallback)(e=>{d(t=>{let n=[...t],r=n[e];return n[e]=!r,r||requestAnimationFrame(()=>{f.current[e]?.scrollIntoView({block:`start`,behavior:`smooth`})}),n})},[]);if((0,D.useImperativeHandle)(r,()=>({togglePhase:p}),[p]),(0,D.useEffect)(()=>{let n=!1;return ae(e,t).then(e=>{n||(a(e.trace),s(!1))}).catch(e=>{n||(l(e instanceof Error?e.message:`Failed to load reasoning`),s(!1))}),()=>{n=!0}},[e,t]),o)return(0,O.jsxs)(`div`,{className:`space-y-2`,children:[(0,O.jsx)(g,{className:`h-4 w-3/4`}),(0,O.jsx)(g,{className:`h-4 w-1/2`}),(0,O.jsx)(g,{className:`h-4 w-2/3`})]});if(!i&&c||!i)return(0,O.jsx)(Qe,{ref:r,step:n});let m=i.healAttempts&&i.healAttempts.length>0;return(0,O.jsxs)(`div`,{className:`relative space-y-0`,children:[(0,O.jsx)(`div`,{className:`absolute left-[7px] top-4 bottom-4 w-px bg-border`}),(0,O.jsx)(Y,{config:J[0],content:i.observeText,duration:i.observeDuration,open:u[0],onOpenChange:e=>d(t=>{let n=[...t];return n[0]=e,n}),sectionRef:e=>{f.current[0]=e}}),(0,O.jsx)(Y,{config:J[1],content:i.planReasoning,duration:i.planDuration,outcome:i.planConfidence==null?void 0:(0,O.jsx)(We,{confidence:i.planConfidence}),open:u[1],onOpenChange:e=>d(t=>{let n=[...t];return n[1]=e,n}),sectionRef:e=>{f.current[1]=e},children:i.planAction!=null&&(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground font-medium mb-0.5`,children:`Planned Action`}),(0,O.jsx)(`pre`,{className:`min-w-0 max-w-full text-xs font-mono bg-muted/50 rounded p-2 overflow-x-auto whitespace-pre-wrap break-words [overflow-wrap:anywhere]`,children:Xe(i.planAction)})]})}),(0,O.jsx)(Y,{config:J[2],content:null,duration:i.executeDuration,open:u[2],onOpenChange:e=>d(t=>{let n=[...t];return n[2]=e,n}),sectionRef:e=>{f.current[2]=e},children:i.executeAction!=null&&(0,O.jsxs)(`div`,{children:[(0,O.jsx)(`p`,{className:`text-xs text-muted-foreground font-medium mb-0.5`,children:`Executed Action`}),(0,O.jsx)(`pre`,{className:`min-w-0 max-w-full text-xs font-mono bg-muted/50 rounded p-2 overflow-x-auto whitespace-pre-wrap break-words [overflow-wrap:anywhere]`,children:Xe(i.executeAction)})]})}),(0,O.jsx)(Y,{config:J[3],content:i.verifyReasoning,duration:i.verifyDuration,outcome:i.verifySuccess==null?void 0:(0,O.jsx)(`span`,{className:S(`text-xs font-medium`,i.verifySuccess?`text-emerald-500`:`text-red-500`),children:i.verifySuccess?`Passed`:`Failed`}),open:u[3],onOpenChange:e=>d(t=>{let n=[...t];return n[3]=e,n}),sectionRef:e=>{f.current[3]=e}}),m&&(0,O.jsx)(Y,{config:J[4],content:null,duration:null,children:(0,O.jsx)(Ye,{attempts:i.healAttempts})})]})}),tt=(0,D.forwardRef)(function(e,t){return e.mode===`static`?(0,O.jsx)($e,{sections:e.sections,ref:t}):(0,O.jsx)(et,{runId:e.runId,stepOrder:e.stepOrder,stepData:e.stepData,ref:t})});function nt(e){switch(e){case`env`:return`bg-blue-500/15 text-blue-400 border-blue-500/20`;case`capture`:return`bg-emerald-500/15 text-emerald-400 border-emerald-500/20`;case`cli`:return`bg-purple-500/15 text-purple-400 border-purple-500/20`;case`inline`:return`bg-amber-500/15 text-amber-400 border-amber-500/20`;case`suite`:return`bg-cyan-500/15 text-cyan-400 border-cyan-500/20`;case`test`:return`bg-pink-500/15 text-pink-400 border-pink-500/20`;case`hook`:return`bg-orange-500/15 text-orange-400 border-orange-500/20`;case`step`:return`bg-teal-500/15 text-teal-400 border-teal-500/20`;default:return`bg-muted text-muted-foreground`}}function X({title:e,count:t,defaultOpen:n,children:r}){return(0,O.jsxs)(G,{defaultOpen:n,children:[(0,O.jsxs)(K,{className:`flex items-center gap-1.5 w-full px-3 py-2 text-xs font-medium text-muted-foreground hover:text-foreground transition-colors`,children:[(0,O.jsx)(x,{className:`h-3 w-3 transition-transform duration-200 [[data-state=open]>&]:rotate-90`}),e,(0,O.jsxs)(`span`,{className:`text-[10px] text-muted-foreground/60`,children:[`(`,t,`)`]})]}),(0,O.jsx)(q,{children:r})]})}function Z({message:e}){return(0,O.jsx)(`div`,{className:`px-4 py-3 text-xs text-muted-foreground/60 italic`,children:e})}function rt({step:e,executionLogs:t=[]}){let n=e.variableSnapshot,r=n?Object.entries(n):[],i=t.filter(e=>e.type===`runjs`),a=t.filter(e=>e.type===`hook`);return(0,O.jsxs)(`div`,{className:`py-1`,children:[(0,O.jsx)(X,{title:`Env`,count:r.length,defaultOpen:r.length>0,children:r.length===0?(0,O.jsx)(Z,{message:`No variables at this step`}):(0,O.jsx)(`div`,{className:`px-3 pb-2`,children:(0,O.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{className:`border-b`,children:[(0,O.jsx)(`th`,{className:`text-left py-1.5 px-2 text-xs font-medium text-muted-foreground`,children:`Variable`}),(0,O.jsx)(`th`,{className:`text-left py-1.5 px-2 text-xs font-medium text-muted-foreground`,children:`Value`}),(0,O.jsx)(`th`,{className:`text-left py-1.5 px-2 text-xs font-medium text-muted-foreground`,children:`Source`})]})}),(0,O.jsx)(`tbody`,{children:r.map(([e,t])=>(0,O.jsxs)(`tr`,{className:`border-b border-border/50`,children:[(0,O.jsx)(`td`,{className:`py-1.5 px-2 font-mono text-xs text-muted-foreground`,children:e}),(0,O.jsx)(`td`,{className:`py-1.5 px-2 font-mono text-xs break-all`,children:t.value}),(0,O.jsx)(`td`,{className:`py-1.5 px-2`,children:(0,O.jsx)(E,{className:S(`text-[10px] px-1.5 py-0 border`,nt(t.source)),children:t.source})})]},e))})]})})}),(0,O.jsx)(X,{title:`runJS`,count:i.length,defaultOpen:i.length>0,children:i.length===0?(0,O.jsx)(Z,{message:`No runJS executions for this step`}):(0,O.jsx)(`div`,{className:`px-3 pb-2 space-y-2`,children:i.map(e=>(0,O.jsxs)(`div`,{className:`rounded-md border border-border/50 p-2 text-xs`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 mb-1.5`,children:[e.status===`passed`?(0,O.jsx)(b,{className:`h-3.5 w-3.5 text-emerald-500 shrink-0`}):(0,O.jsx)(c,{className:`h-3.5 w-3.5 text-red-500 shrink-0`}),(0,O.jsx)(`span`,{className:`font-medium truncate`,children:e.name}),(0,O.jsx)(`span`,{className:`text-muted-foreground ml-auto shrink-0`,children:C(e.duration)})]}),e.stdout&&(0,O.jsx)(`pre`,{className:`mt-1 p-1.5 rounded bg-muted/50 font-mono text-[11px] whitespace-pre-wrap break-all overflow-hidden`,children:e.stdout}),e.returnData!=null&&(0,O.jsxs)(`div`,{className:`mt-1 p-1.5 rounded bg-muted/50`,children:[(0,O.jsx)(`span`,{className:`text-muted-foreground`,children:`Return: `}),(0,O.jsx)(`span`,{className:`font-mono text-[11px]`,children:typeof e.returnData==`string`?e.returnData:JSON.stringify(e.returnData)})]})]},e.id))})}),(0,O.jsx)(X,{title:`Hooks`,count:a.length,defaultOpen:a.length>0,children:a.length===0?(0,O.jsx)(Z,{message:`No hooks ran for this step`}):(0,O.jsx)(`div`,{className:`px-3 pb-2 space-y-2`,children:a.map(e=>(0,O.jsxs)(`div`,{className:`rounded-md border border-border/50 p-2 text-xs`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 mb-1`,children:[e.status===`passed`?(0,O.jsx)(b,{className:`h-3.5 w-3.5 text-emerald-500 shrink-0`}):(0,O.jsx)(c,{className:`h-3.5 w-3.5 text-red-500 shrink-0`}),(0,O.jsx)(`span`,{className:`font-medium truncate`,children:e.name}),(0,O.jsx)(`span`,{className:`text-muted-foreground ml-auto shrink-0`,children:C(e.duration)})]}),e.variables&&Object.keys(e.variables).length>0&&(0,O.jsxs)(`div`,{className:`mt-1.5 space-y-0.5`,children:[(0,O.jsx)(`span`,{className:`text-muted-foreground text-[10px]`,children:`Emitted variables:`}),Object.entries(e.variables).map(([e,t])=>(0,O.jsxs)(`div`,{className:`flex gap-2 pl-2 font-mono text-[11px]`,children:[(0,O.jsxs)(`span`,{className:`text-muted-foreground`,children:[e,`:`]}),(0,O.jsx)(`span`,{className:`break-all`,children:t})]},e))]}),e.stdout&&(0,O.jsx)(`pre`,{className:`mt-1 p-1.5 rounded bg-muted/50 font-mono text-[11px] whitespace-pre-wrap break-all overflow-hidden max-h-24 overflow-y-auto`,children:e.stdout})]},e.id))})})]})}function it(e){return e>=1e3?`+${(e/1e3).toFixed(1)}s`:`+${Math.round(e)}ms`}function at(e){return Object.entries(e).filter(([e,t])=>e!==`startTime`&&t>0)}function ot(e){return e>=200&&e<300?`text-emerald-500`:e>=300&&e<400?`text-amber-500`:e>=400?`text-red-500`:`text-muted-foreground`}function st({headers:e}){let t=Object.entries(e);return t.length===0?(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground italic`,children:`None`}):(0,O.jsx)(`div`,{className:`space-y-0.5`,children:t.map(([e,t])=>(0,O.jsxs)(`div`,{className:`flex gap-2 text-xs font-mono`,children:[(0,O.jsxs)(`span`,{className:`text-muted-foreground shrink-0`,children:[e,`:`]}),(0,O.jsx)(`span`,{className:`break-all`,children:t})]},e))})}function Q({label:e,children:t}){return(0,O.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,O.jsx)(`h4`,{className:`text-[10px] uppercase tracking-wider text-muted-foreground font-medium`,children:e}),t]})}function ct({text:e}){let[t,n]=(0,D.useState)(!1);return(0,O.jsx)(`button`,{onClick:(0,D.useCallback)(t=>{t.stopPropagation(),navigator.clipboard.writeText(e),n(!0),setTimeout(()=>n(!1),1500)},[e]),className:`text-muted-foreground hover:text-foreground`,children:t?(0,O.jsx)(s,{className:`h-3 w-3`}):(0,O.jsx)(l,{className:`h-3 w-3`})})}function lt({body:e,contentType:t}){let n=t.toLowerCase();if(n.includes(`application/json`))try{return(0,O.jsx)(`pre`,{className:`text-xs font-mono bg-background/60 rounded-sm px-3 py-2 overflow-x-auto max-h-48 whitespace-pre-wrap break-all`,children:JSON.stringify(JSON.parse(e),null,2)})}catch{return(0,O.jsx)(`pre`,{className:`text-xs font-mono bg-background/60 rounded-sm px-3 py-2 overflow-x-auto max-h-48 whitespace-pre-wrap break-all`,children:e})}return n.includes(`image/svg+xml`)?(0,O.jsx)(`img`,{src:`data:image/svg+xml;charset=utf-8,${encodeURIComponent(e)}`,alt:`SVG response`,className:`max-h-48`}):e.startsWith(`data:image/`)?(0,O.jsx)(`img`,{src:e,alt:`Image response`,className:`max-h-48 rounded-sm`}):n.includes(`image/`)?(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground italic`,children:`Image not previewable (re-run test to capture)`}):(0,O.jsx)(`pre`,{className:`text-xs font-mono bg-background/60 rounded-sm px-3 py-2 overflow-x-auto max-h-48 whitespace-pre-wrap break-all`,children:e})}function ut({entry:e}){let t=e.method===`POST`||e.method===`PUT`||e.method===`PATCH`;return(0,O.jsx)(`tr`,{children:(0,O.jsx)(`td`,{colSpan:6,className:`px-0 py-0`,children:(0,O.jsxs)(`div`,{className:`bg-muted/20 border-b border-border/50 px-4 py-3 space-y-4`,children:[(0,O.jsxs)(`div`,{className:`grid grid-cols-2 gap-4`,children:[(0,O.jsx)(Q,{label:`Request Headers`,children:(0,O.jsx)(st,{headers:e.requestHeaders??{}})}),(0,O.jsx)(Q,{label:`Response Headers`,children:(0,O.jsx)(st,{headers:e.responseHeaders??{}})})]}),t&&(0,O.jsx)(Q,{label:`Request Body`,children:e.requestBody?(0,O.jsx)(`pre`,{className:`text-xs font-mono bg-background/60 rounded-sm px-3 py-2 overflow-x-auto max-h-48 whitespace-pre-wrap break-all`,children:e.requestBody}):(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground italic`,children:`No request body`})}),(0,O.jsxs)(`div`,{className:`space-y-1.5`,children:[(0,O.jsxs)(`div`,{className:`flex justify-between items-center`,children:[(0,O.jsx)(`h4`,{className:`text-[10px] uppercase tracking-wider text-muted-foreground font-medium`,children:`Response Body`}),e.body&&(0,O.jsx)(ct,{text:e.body})]}),e.body?(0,O.jsx)(lt,{body:e.body,contentType:e.responseHeaders?.[`content-type`]??``}):(0,O.jsx)(`span`,{className:`text-xs text-muted-foreground italic`,children:`Not captured`})]}),e.timing&&(()=>{let t=at(e.timing);return t.length===0?null:(0,O.jsx)(Q,{label:`Timing`,children:(0,O.jsx)(`div`,{className:`flex flex-wrap gap-3`,children:t.map(([e,t])=>(0,O.jsxs)(`div`,{className:`text-xs font-mono`,children:[(0,O.jsxs)(`span`,{className:`text-muted-foreground`,children:[e,`:`]}),` `,(0,O.jsxs)(`span`,{children:[Math.round(t),`ms`]})]},e))})})})()]})})})}function $({text:e,query:t}){if(!t)return(0,O.jsx)(O.Fragment,{children:e});let n=e.toLowerCase().indexOf(t.toLowerCase());return n===-1?(0,O.jsx)(O.Fragment,{children:e}):(0,O.jsxs)(O.Fragment,{children:[e.slice(0,n),(0,O.jsx)(`mark`,{className:`bg-yellow-400/30 text-inherit rounded-sm px-0.5`,children:e.slice(n,n+t.length)}),e.slice(n+t.length)]})}function dt({step:e,allSteps:t,platform:n}){let[r,i]=(0,D.useState)(new Set),a=(0,D.useMemo)(()=>{let n=e.displayStepOrder??e.stepOrder,r=[];for(let e of t){let t=e.displayStepOrder??e.stepOrder;if(t>n)continue;let i=t===n;for(let t of e.networkLogs??[])r.push({...t,isCurrent:i})}return r.sort((e,t)=>e.startTime-t.startTime)},[e,t]),o=(0,D.useMemo)(()=>a.length===0?0:Math.min(...a.map(e=>e.startTime)),[a]),[s,c]=(0,D.useState)(``),l=(0,D.useDeferredValue)(s),u=(0,D.useMemo)(()=>{if(!l)return a;let e=l.toLowerCase();return a.filter(t=>t.url.toLowerCase().includes(e)||t.method.toLowerCase().includes(e)||String(t.status).includes(e))},[a,l]);(0,D.useEffect)(()=>{i(new Set)},[l]);let d=(0,D.useCallback)(e=>{i(t=>{let n=new Set(t);return n.has(e)?n.delete(e):n.add(e),n})},[]);return a.length===0?(0,O.jsx)(`div`,{className:`flex items-center justify-center h-full text-muted-foreground text-sm py-12`,children:n===`android`||n===`ios`?`Network capture is not available for mobile tests`:`No network requests captured for this step`}):(0,O.jsxs)(`div`,{children:[(0,O.jsxs)(`div`,{className:`sticky top-0 z-10 bg-background border-b border-border/50 px-3 py-1.5 flex items-center gap-2`,children:[(0,O.jsx)(v,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`}),(0,O.jsx)(`input`,{value:s,onChange:e=>c(e.target.value),placeholder:`Filter...`,className:`flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground`}),s&&(0,O.jsxs)(O.Fragment,{children:[(0,O.jsxs)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:[u.length,` of `,a.length]}),(0,O.jsx)(`button`,{onClick:()=>c(``),className:`text-muted-foreground hover:text-foreground`,children:(0,O.jsx)(ee,{className:`h-3.5 w-3.5`})})]})]}),(0,O.jsx)(`div`,{className:`p-3`,children:(0,O.jsxs)(`table`,{className:`w-full text-sm`,children:[(0,O.jsx)(`thead`,{children:(0,O.jsxs)(`tr`,{className:`border-b`,children:[(0,O.jsx)(`th`,{className:`w-6`}),(0,O.jsx)(`th`,{className:`text-left py-1.5 px-2 text-xs font-medium text-muted-foreground w-16`,children:`Method`}),(0,O.jsx)(`th`,{className:`text-left py-1.5 px-2 text-xs font-medium text-muted-foreground`,children:`URL`}),(0,O.jsx)(`th`,{className:`text-left py-1.5 px-2 text-xs font-medium text-muted-foreground w-16`,children:`Status`}),(0,O.jsx)(`th`,{className:`text-right py-1.5 px-2 text-xs font-medium text-muted-foreground w-20`,children:`Time`}),(0,O.jsx)(`th`,{className:`text-right py-1.5 px-2 text-xs font-medium text-muted-foreground w-20`,children:`Duration`})]})}),(0,O.jsx)(`tbody`,{children:u.map((e,t)=>{let n=e.endTime-e.startTime,i=r.has(t);return(0,O.jsxs)(D.Fragment,{children:[(0,O.jsxs)(`tr`,{onClick:()=>d(t),className:S(`border-b border-border/50 cursor-pointer hover:bg-muted/30 transition-colors`,i&&`bg-muted/20`,!e.isCurrent&&`opacity-40`),children:[(0,O.jsx)(`td`,{className:`py-1.5 pl-2 pr-0 w-6`,children:(0,O.jsx)(x,{className:S(`h-3 w-3 text-muted-foreground transition-transform`,i&&`rotate-90`)})}),(0,O.jsx)(`td`,{className:`py-1.5 px-2`,children:(0,O.jsx)(E,{variant:`outline`,className:`text-[10px] px-1.5 py-0 font-mono`,children:(0,O.jsx)($,{text:e.method,query:l})})}),(0,O.jsx)(`td`,{className:`py-1.5 px-2 text-xs font-mono truncate max-w-0 min-w-0`,children:(0,O.jsx)($,{text:e.url,query:l})}),(0,O.jsx)(`td`,{className:`py-1.5 px-2`,children:(0,O.jsx)(`span`,{className:S(`text-xs font-mono`,ot(e.status)),children:(0,O.jsx)($,{text:String(e.status),query:l})})}),(0,O.jsx)(`td`,{className:`py-1.5 px-2 text-xs font-mono text-muted-foreground text-right`,children:it(e.startTime-o)}),(0,O.jsxs)(`td`,{className:`py-1.5 px-2 text-xs text-muted-foreground text-right`,children:[n<1?`<1`:Math.round(n),`ms`]})]}),i&&(0,O.jsx)(ut,{entry:e})]},t)})})]})})]})}function ft(e){switch(e.toLowerCase()){case`error`:return`text-red-400`;case`warn`:case`warning`:return`text-amber-400`;case`info`:return`text-blue-400`;case`debug`:return`text-cyan-400`;default:return`text-muted-foreground`}}function pt(e){switch(e){case`setup`:return`bg-blue-500/15 text-blue-400 border-blue-500/20`;case`teardown`:return`bg-purple-500/15 text-purple-400 border-purple-500/20`;case`inline`:return`bg-emerald-500/15 text-emerald-400 border-emerald-500/20`;default:return`bg-muted text-muted-foreground`}}var mt=[`error`,`warn`,`info`,`log`,`debug`];function ht({text:e,query:t}){if(!t)return(0,O.jsx)(O.Fragment,{children:e});let n=e.toLowerCase().indexOf(t.toLowerCase());return n===-1?(0,O.jsx)(O.Fragment,{children:e}):(0,O.jsxs)(O.Fragment,{children:[e.slice(0,n),(0,O.jsx)(`mark`,{className:`bg-yellow-400/30 text-inherit rounded-sm px-0.5`,children:e.slice(n,n+t.length)}),e.slice(n+t.length)]})}function gt({step:e,allSteps:n,executionLogs:s,isHookStep:c}){let l=(0,D.useMemo)(()=>{let t=e.displayStepOrder??e.stepOrder,r=[];for(let e of n){let n=e.displayStepOrder??e.stepOrder;if(n>t)continue;let i=n===t;for(let t of e.consoleLogs??[])r.push({...t,isCurrent:i})}return r.sort((e,t)=>e.timestamp-t.timestamp)},[e,n]),[u,d]=(0,D.useState)(``),f=(0,D.useDeferredValue)(u),[p,m]=(0,D.useState)(`all`),h=(0,D.useMemo)(()=>{let e=l;if(p!==`all`&&(e=e.filter(e=>{let t=e.level.toLowerCase(),n=mt.indexOf(p);if(n===-1)return!0;let r=mt.indexOf(t);return r!==-1&&r>=n})),f){let t=f.toLowerCase();e=e.filter(e=>e.text.toLowerCase().includes(t)||e.level.toLowerCase().includes(t))}return e},[l,f,p]),g=c&&s&&s.length>0,_=l.length>0;return!g&&!_?(0,O.jsx)(`div`,{className:`flex items-center justify-center h-full text-muted-foreground text-sm py-12`,children:`No console output captured for this step`}):(0,O.jsxs)(`div`,{className:`w-full overflow-hidden`,children:[_&&(0,O.jsxs)(`div`,{className:`sticky top-0 z-10 bg-background border-b border-border/50 px-3 py-1.5 flex items-center gap-2`,children:[(0,O.jsx)(v,{className:`h-3.5 w-3.5 text-muted-foreground shrink-0`}),(0,O.jsx)(`input`,{value:u,onChange:e=>d(e.target.value),placeholder:`Filter...`,className:`flex-1 bg-transparent text-sm outline-none placeholder:text-muted-foreground`}),u&&(0,O.jsxs)(`span`,{className:`text-xs text-muted-foreground shrink-0`,children:[h.length,` of `,l.length]}),(0,O.jsx)(`div`,{className:`h-3 w-px bg-border/50 shrink-0`}),(0,O.jsxs)(o,{value:p,onValueChange:m,children:[(0,O.jsx)(i,{size:`sm`,className:`h-6 rounded-sm text-xs px-2 gap-1 border-border/50 min-w-0 w-auto`,children:(0,O.jsx)(a,{})}),(0,O.jsxs)(r,{className:`rounded-sm`,children:[(0,O.jsx)(t,{value:`all`,className:`text-xs`,children:`All levels`}),(0,O.jsx)(t,{value:`error`,className:`text-xs`,children:`Errors`}),(0,O.jsx)(t,{value:`warn`,className:`text-xs`,children:`Warnings`}),(0,O.jsx)(t,{value:`info`,className:`text-xs`,children:`Info`}),(0,O.jsx)(t,{value:`log`,className:`text-xs`,children:`Log`}),(0,O.jsx)(t,{value:`debug`,className:`text-xs`,children:`Debug`})]})]}),u&&(0,O.jsx)(`button`,{onClick:()=>d(``),className:`text-muted-foreground hover:text-foreground shrink-0`,children:(0,O.jsx)(ee,{className:`h-3.5 w-3.5`})})]}),(0,O.jsxs)(`div`,{className:`p-3 space-y-0.5 overflow-x-hidden w-full max-w-full`,children:[g&&(0,O.jsx)(`div`,{className:`space-y-2 mb-3`,children:s.map(e=>(0,O.jsxs)(`div`,{className:`border border-border/50 rounded-sm overflow-hidden`,children:[(0,O.jsxs)(`div`,{className:`flex items-center gap-2 px-2 py-1.5 bg-muted/20 border-b border-border/30`,children:[(0,O.jsx)(E,{variant:`outline`,className:`text-[10px] px-1.5 py-0 font-mono`,children:e.name}),(0,O.jsx)(E,{className:S(`text-[10px] px-1.5 py-0`,pt(e.phase)),children:e.phase}),(0,O.jsx)(`span`,{className:S(`text-[10px] font-mono`,e.status===`passed`?`text-emerald-500`:`text-red-500`),children:e.status}),(0,O.jsxs)(`span`,{className:`text-[10px] text-muted-foreground ml-auto`,children:[e.duration,`ms`]})]}),e.stdout&&(0,O.jsx)(`pre`,{className:`px-3 py-2 font-mono text-xs whitespace-pre-wrap text-foreground/90`,children:e.stdout}),e.stderr&&(0,O.jsx)(`pre`,{className:`px-3 py-2 font-mono text-xs whitespace-pre-wrap text-red-400/80 border-t border-border/30`,children:e.stderr})]},e.id))}),g&&_&&(0,O.jsx)(`div`,{className:`border-t border-border/30 pt-2 mb-1`,children:(0,O.jsx)(`span`,{className:`text-[10px] text-muted-foreground uppercase tracking-wider`,children:`Browser Console`})}),_&&h.map((e,t)=>(0,O.jsxs)(`div`,{className:S(`flex items-start gap-1.5 py-0.5 px-2 hover:bg-muted/30 font-mono text-xs overflow-hidden max-w-full`,!e.isCurrent&&`opacity-40`),children:[(0,O.jsx)(`span`,{className:S(`shrink-0 text-[10px]`,ft(e.level)),children:e.level}),(0,O.jsx)(`span`,{className:`text-muted-foreground/60 shrink-0 text-[10px] tabular-nums`,children:new Date(e.timestamp).toLocaleTimeString()}),(0,O.jsx)(`span`,{className:`flex-1 min-w-0 break-all whitespace-pre-wrap overflow-hidden`,children:(0,O.jsx)(ht,{text:e.text,query:f})})]},t))]})]})}export{Ye as a,q as c,le as d,ce as f,tt as i,K as l,dt as n,We as o,rt as r,G as s,gt as t,ue as u};
@@ -0,0 +1 @@
1
+ import"./chunk-CilyBKbf.js";import{Qn as e,Wt as t,pr as n}from"./index-Bvtm2F6f.js";n();var r=e();function i({className:e,...n}){return(0,r.jsx)(`div`,{"data-slot":`table-container`,className:`relative w-full overflow-x-auto`,children:(0,r.jsx)(`table`,{"data-slot":`table`,className:t(`w-full caption-bottom text-sm`,e),...n})})}function a({className:e,...n}){return(0,r.jsx)(`thead`,{"data-slot":`table-header`,className:t(`[&_tr]:border-b`,e),...n})}function o({className:e,...n}){return(0,r.jsx)(`tbody`,{"data-slot":`table-body`,className:t(`[&_tr:last-child]:border-0`,e),...n})}function s({className:e,...n}){return(0,r.jsx)(`tr`,{"data-slot":`table-row`,className:t(`border-b transition-colors hover:bg-muted/50 data-[state=selected]:bg-muted`,e),...n})}function c({className:e,...n}){return(0,r.jsx)(`th`,{"data-slot":`table-head`,className:t(`h-10 px-2 text-left align-middle font-medium whitespace-nowrap text-foreground [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...n})}function l({className:e,...n}){return(0,r.jsx)(`td`,{"data-slot":`table-cell`,className:t(`p-2 align-middle whitespace-nowrap [&:has([role=checkbox])]:pr-0 [&>[role=checkbox]]:translate-y-[2px]`,e),...n})}export{a,c as i,o as n,s as o,l as r,i as t};
@@ -1 +1 @@
1
- import{r as e}from"./chunk-CilyBKbf.js";import{r as t}from"./use-page-title-CK82kWb2.js";import{n,r,t as i}from"./dist-DZYW0-Ta.js";import{Cn as a,Jn as o,Sn as s,Tn as c,Ut as l,Zn as u,bn as d,fr as f,vn as p,yn as m}from"./index-B3xPCIyH.js";var h=e(f(),1),g=u(),_=`Tabs`,[v,y]=a(_,[r]),b=r(),[x,S]=v(_),C=h.forwardRef((e,n)=>{let{__scopeTabs:r,value:i,onValueChange:a,defaultValue:o,orientation:s=`horizontal`,dir:l,activationMode:u=`automatic`,...f}=e,m=t(l),[h,v]=d({prop:i,onChange:a,defaultProp:o??``,caller:_});return(0,g.jsx)(x,{scope:r,baseId:p(),value:h,onValueChange:v,orientation:s,dir:m,activationMode:u,children:(0,g.jsx)(c.div,{dir:m,"data-orientation":s,...f,ref:n})})});C.displayName=_;var w=`TabsList`,T=h.forwardRef((e,t)=>{let{__scopeTabs:r,loop:i=!0,...a}=e,o=S(w,r),s=b(r);return(0,g.jsx)(n,{asChild:!0,...s,orientation:o.orientation,dir:o.dir,loop:i,children:(0,g.jsx)(c.div,{role:`tablist`,"aria-orientation":o.orientation,...a,ref:t})})});T.displayName=w;var E=`TabsTrigger`,D=h.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:a=!1,...o}=e,l=S(E,n),u=b(n),d=A(l.baseId,r),f=j(l.baseId,r),p=r===l.value;return(0,g.jsx)(i,{asChild:!0,...u,focusable:!a,active:p,children:(0,g.jsx)(c.button,{type:`button`,role:`tab`,"aria-selected":p,"aria-controls":f,"data-state":p?`active`:`inactive`,"data-disabled":a?``:void 0,disabled:a,id:d,...o,ref:t,onMouseDown:s(e.onMouseDown,e=>{!a&&e.button===0&&e.ctrlKey===!1?l.onValueChange(r):e.preventDefault()}),onKeyDown:s(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&l.onValueChange(r)}),onFocus:s(e.onFocus,()=>{let e=l.activationMode!==`manual`;!p&&!a&&e&&l.onValueChange(r)})})})});D.displayName=E;var O=`TabsContent`,k=h.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...o}=e,s=S(O,n),l=A(s.baseId,r),u=j(s.baseId,r),d=r===s.value,f=h.useRef(d);return h.useEffect(()=>{let e=requestAnimationFrame(()=>f.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,g.jsx)(m,{present:i||d,children:({present:n})=>(0,g.jsx)(c.div,{"data-state":d?`active`:`inactive`,"data-orientation":s.orientation,role:`tabpanel`,"aria-labelledby":l,hidden:!n,id:u,tabIndex:0,...o,ref:t,style:{...e.style,animationDuration:f.current?`0s`:void 0},children:n&&a})})});k.displayName=O;function A(e,t){return`${e}-trigger-${t}`}function j(e,t){return`${e}-content-${t}`}var M=C,N=T,P=D,F=k;function I({className:e,orientation:t=`horizontal`,...n}){return(0,g.jsx)(M,{"data-slot":`tabs`,"data-orientation":t,orientation:t,className:l(`group/tabs flex gap-0 data-[orientation=horizontal]:flex-col`,e),...n})}var L=o(`group/tabs-list inline-flex w-fit items-center justify-center rounded-sm p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-0 bg-transparent`}},defaultVariants:{variant:`default`}});function R({className:e,variant:t=`default`,...n}){return(0,g.jsx)(N,{"data-slot":`tabs-list`,"data-variant":t,className:l(L({variant:t}),e),...n})}function z({className:e,...t}){return(0,g.jsx)(P,{"data-slot":`tabs-trigger`,className:l(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent`,`data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100`,e),...t})}function B({className:e,...t}){return(0,g.jsx)(F,{"data-slot":`tabs-content`,className:l(`flex-1 outline-none`,e),...t})}export{z as i,B as n,R as r,I as t};
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{r as t}from"./use-page-title-B1t9-5_U.js";import{n,r,t as i}from"./dist-BPheZrD6.js";import{Cn as a,En as o,Qn as s,Wt as c,Yn as l,bn as u,pr as d,wn as f,xn as p,yn as m}from"./index-Bvtm2F6f.js";var h=e(d(),1),g=s(),_=`Tabs`,[v,y]=f(_,[r]),b=r(),[x,S]=v(_),C=h.forwardRef((e,n)=>{let{__scopeTabs:r,value:i,onValueChange:a,defaultValue:s,orientation:c=`horizontal`,dir:l,activationMode:u=`automatic`,...d}=e,f=t(l),[h,v]=p({prop:i,onChange:a,defaultProp:s??``,caller:_});return(0,g.jsx)(x,{scope:r,baseId:m(),value:h,onValueChange:v,orientation:c,dir:f,activationMode:u,children:(0,g.jsx)(o.div,{dir:f,"data-orientation":c,...d,ref:n})})});C.displayName=_;var w=`TabsList`,T=h.forwardRef((e,t)=>{let{__scopeTabs:r,loop:i=!0,...a}=e,s=S(w,r),c=b(r);return(0,g.jsx)(n,{asChild:!0,...c,orientation:s.orientation,dir:s.dir,loop:i,children:(0,g.jsx)(o.div,{role:`tablist`,"aria-orientation":s.orientation,...a,ref:t})})});T.displayName=w;var E=`TabsTrigger`,D=h.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,disabled:s=!1,...c}=e,l=S(E,n),u=b(n),d=A(l.baseId,r),f=j(l.baseId,r),p=r===l.value;return(0,g.jsx)(i,{asChild:!0,...u,focusable:!s,active:p,children:(0,g.jsx)(o.button,{type:`button`,role:`tab`,"aria-selected":p,"aria-controls":f,"data-state":p?`active`:`inactive`,"data-disabled":s?``:void 0,disabled:s,id:d,...c,ref:t,onMouseDown:a(e.onMouseDown,e=>{!s&&e.button===0&&e.ctrlKey===!1?l.onValueChange(r):e.preventDefault()}),onKeyDown:a(e.onKeyDown,e=>{[` `,`Enter`].includes(e.key)&&l.onValueChange(r)}),onFocus:a(e.onFocus,()=>{let e=l.activationMode!==`manual`;!p&&!s&&e&&l.onValueChange(r)})})})});D.displayName=E;var O=`TabsContent`,k=h.forwardRef((e,t)=>{let{__scopeTabs:n,value:r,forceMount:i,children:a,...s}=e,c=S(O,n),l=A(c.baseId,r),d=j(c.baseId,r),f=r===c.value,p=h.useRef(f);return h.useEffect(()=>{let e=requestAnimationFrame(()=>p.current=!1);return()=>cancelAnimationFrame(e)},[]),(0,g.jsx)(u,{present:i||f,children:({present:n})=>(0,g.jsx)(o.div,{"data-state":f?`active`:`inactive`,"data-orientation":c.orientation,role:`tabpanel`,"aria-labelledby":l,hidden:!n,id:d,tabIndex:0,...s,ref:t,style:{...e.style,animationDuration:p.current?`0s`:void 0},children:n&&a})})});k.displayName=O;function A(e,t){return`${e}-trigger-${t}`}function j(e,t){return`${e}-content-${t}`}var M=C,N=T,P=D,F=k;function I({className:e,orientation:t=`horizontal`,...n}){return(0,g.jsx)(M,{"data-slot":`tabs`,"data-orientation":t,orientation:t,className:c(`group/tabs flex gap-0 data-[orientation=horizontal]:flex-col`,e),...n})}var L=l(`group/tabs-list inline-flex w-fit items-center justify-center rounded-sm p-[3px] text-muted-foreground group-data-[orientation=horizontal]/tabs:h-9 group-data-[orientation=vertical]/tabs:h-fit group-data-[orientation=vertical]/tabs:flex-col data-[variant=line]:rounded-none`,{variants:{variant:{default:`bg-muted`,line:`gap-0 bg-transparent`}},defaultVariants:{variant:`default`}});function R({className:e,variant:t=`default`,...n}){return(0,g.jsx)(N,{"data-slot":`tabs-list`,"data-variant":t,className:c(L({variant:t}),e),...n})}function z({className:e,...t}){return(0,g.jsx)(P,{"data-slot":`tabs-trigger`,className:c(`relative inline-flex h-[calc(100%-1px)] flex-1 items-center justify-center gap-1.5 rounded-md border border-transparent px-2 py-1 text-sm font-medium whitespace-nowrap text-foreground/60 transition-all group-data-[orientation=vertical]/tabs:w-full group-data-[orientation=vertical]/tabs:justify-start hover:text-foreground focus-visible:border-ring focus-visible:ring-[3px] focus-visible:ring-ring/50 focus-visible:outline-1 focus-visible:outline-ring disabled:pointer-events-none disabled:opacity-50 group-data-[variant=default]/tabs-list:data-[state=active]:shadow-sm group-data-[variant=line]/tabs-list:data-[state=active]:shadow-none dark:text-muted-foreground dark:hover:text-foreground [&_svg]:pointer-events-none [&_svg]:shrink-0 [&_svg:not([class*='size-'])]:size-4`,`group-data-[variant=line]/tabs-list:bg-transparent group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:border-transparent dark:group-data-[variant=line]/tabs-list:data-[state=active]:bg-transparent`,`data-[state=active]:bg-background data-[state=active]:text-foreground dark:data-[state=active]:border-input dark:data-[state=active]:bg-input/30 dark:data-[state=active]:text-foreground`,`after:absolute after:bg-foreground after:opacity-0 after:transition-opacity group-data-[orientation=horizontal]/tabs:after:inset-x-0 group-data-[orientation=horizontal]/tabs:after:bottom-[-5px] group-data-[orientation=horizontal]/tabs:after:h-0.5 group-data-[orientation=vertical]/tabs:after:inset-y-0 group-data-[orientation=vertical]/tabs:after:-right-1 group-data-[orientation=vertical]/tabs:after:w-0.5 group-data-[variant=line]/tabs-list:data-[state=active]:after:opacity-100`,e),...t})}function B({className:e,...t}){return(0,g.jsx)(F,{"data-slot":`tabs-content`,className:c(`flex-1 outline-none`,e),...t})}export{z as i,B as n,R as r,I as t};
@@ -0,0 +1,9 @@
1
+ import{r as e}from"./chunk-CilyBKbf.js";import{c as t}from"./id-badge-NwZYoNfB.js";import{t as n}from"./monaco-editor-DNT0Mzki.js";import{t as r}from"./file-code-B3iDpJRP.js";import{n as i}from"./split-button-DcY8ames.js";import{t as a}from"./refresh-cw-C_0AkMuu.js";import{a as o,c as s,i as c,n as ee,o as te,r as ne,s as l,t as re}from"./filename-validation-4sTTEagx.js";import{t as ie}from"./use-page-title-B1t9-5_U.js";import{a as ae,c as u,d as oe,f as d,i as se,l as ce,n as le,o as ue,p as f,r as de,s as fe,t as pe,u as p}from"./test-navbar-DoHKAy1p.js";import{a as me,r as he}from"./dist-m_OM4Je_.js";import{i as ge,n as _e,r as ve,t as ye}from"./tabs-DrB_Acb3.js";import{$n as m,At as h,Bn as be,Bt as xe,Dt as Se,E as Ce,Ft as g,Ht as we,It as Te,Lt as Ee,Mt as _,Nn as De,O as Oe,P as ke,Pt as v,Qn as y,Rt as Ae,St as je,Ut as b,V as Me,Wt as Ne,Yt as Pe,cr as Fe,ft as x,jt as S,kt as Ie,lr as Le,pr as Re,qn as C,r as ze,ur as Be,ut as Ve,zt as He}from"./index-Bvtm2F6f.js";import{n as Ue,r as We,t as Ge}from"./resizable-BGEcNRZO.js";import{t as Ke}from"./empty-state-BTvOA5lp.js";import{t as qe}from"./use-keyboard-shortcuts-EAppuiKO.js";import{t as Je}from"./observation-markdown-Dx_5-T0t.js";var w=e(Re(),1),T=y();function E(e){return e>=.7?`text-emerald-500`:e>=.4?`text-amber-500`:`text-destructive`}function Ye(e){try{return new Date(e).toLocaleDateString(void 0,{month:`short`,day:`numeric`,year:`numeric`})}catch{return e}}function Xe({observation:e,onDelete:t,isDeleting:n}){return(0,T.jsxs)(`div`,{className:`rounded-md border bg-card/60 px-3 py-2 space-y-1.5`,children:[(0,T.jsxs)(`div`,{className:`flex items-center gap-3 text-[11px]`,children:[(0,T.jsxs)(S,{children:[(0,T.jsx)(v,{asChild:!0,children:(0,T.jsx)(`span`,{className:Ne(`font-mono tabular-nums font-medium cursor-default`,E(e.trust)),children:e.trust.toFixed(2)})}),(0,T.jsx)(_,{side:`top`,className:`max-w-xs text-xs`,children:`Trust score (0–1). Higher means the agent is more confident this observation is accurate. Increases when confirmed across runs, decreases when contradicted.`})]}),(0,T.jsxs)(S,{children:[(0,T.jsx)(v,{asChild:!0,children:(0,T.jsx)(`span`,{className:`text-muted-foreground cursor-default`,children:Ye(e.created)})}),(0,T.jsx)(_,{side:`top`,className:`text-xs`,children:`First observed on this date`})]}),(0,T.jsxs)(S,{children:[(0,T.jsx)(v,{asChild:!0,children:(0,T.jsxs)(`span`,{className:`text-muted-foreground cursor-default`,children:[e.confirmed_count,`x confirmed · `,e.contradicted_count,`x contradicted`]})}),(0,T.jsx)(_,{side:`top`,className:`max-w-xs text-xs`,children:`Confirmed: how many runs validated this observation. Contradicted: how many runs found it inaccurate.`})]}),(0,T.jsx)(`div`,{className:`ml-auto`,children:(0,T.jsxs)(ae,{children:[(0,T.jsx)(f,{asChild:!0,children:(0,T.jsx)(b,{type:`button`,variant:`ghost`,size:`icon-sm`,disabled:n,"aria-label":`Delete observation: ${e.title.slice(0,40)}`,className:`shrink-0 text-muted-foreground/70 hover:text-destructive`,children:(0,T.jsx)(De,{className:`size-3.5`})})}),(0,T.jsxs)(u,{size:`sm`,children:[(0,T.jsxs)(oe,{children:[(0,T.jsx)(d,{children:`Delete observation?`}),(0,T.jsx)(ce,{children:`This observation will be permanently removed. The agent will no longer use it during future runs.`})]}),(0,T.jsxs)(p,{children:[(0,T.jsx)(fe,{children:`Cancel`}),(0,T.jsx)(ue,{variant:`destructive`,onClick:()=>t(e.id),disabled:n,children:`Delete Observation`})]})]})]})})]}),(0,T.jsxs)(`div`,{className:`space-y-2`,children:[(0,T.jsx)(`h4`,{className:`text-sm font-semibold tracking-tight text-foreground`,children:e.title}),(0,T.jsx)(Je,{content:e.content})]})]})}function Ze({testId:e}){let[t,n]=(0,w.useState)([]),[r,i]=(0,w.useState)([]),[o,s]=(0,w.useState)(!0),[c,ee]=(0,w.useState)(null),[te,ne]=(0,w.useState)(null),l=(0,w.useCallback)(()=>{let t=!1;return s(!0),ee(null),i([]),x(e).then(e=>{t||(n(e.observations),i(e.invalidFiles),s(!1))}).catch(e=>{t||(n([]),ee(e instanceof Error?e.message:`Failed to load observations`),s(!1))}),()=>{t=!0}},[e]);(0,w.useEffect)(()=>l(),[l]);let re=(0,w.useCallback)(async t=>{ne(t);try{await ke(e,t),n(e=>e.filter(e=>e.id!==t)),h.success(`Observation deleted`)}catch(e){h.error(`Failed to delete: ${e instanceof Error?e.message:String(e)}`)}finally{ne(null)}},[e]);return o?(0,T.jsxs)(`div`,{className:`space-y-2 px-4 py-2`,children:[(0,T.jsx)(g,{className:`h-16 w-full rounded-md`}),(0,T.jsx)(g,{className:`h-16 w-full rounded-md`}),(0,T.jsx)(g,{className:`h-16 w-full rounded-md`})]}):c?(0,T.jsxs)(`div`,{className:`flex flex-col items-center justify-center gap-3 px-4 py-12 text-center`,children:[(0,T.jsx)(`p`,{className:`text-sm text-muted-foreground`,children:`Could not load observations. Check that the dashboard server is running and try again.`}),(0,T.jsxs)(b,{variant:`outline`,size:`sm`,onClick:l,children:[(0,T.jsx)(a,{className:`mr-1.5 size-3.5`}),`Retry`]})]}):t.length===0?(0,T.jsxs)(`div`,{className:`space-y-3 px-4 py-2`,children:[r.length>0?(0,T.jsx)(D,{invalidFiles:r}):null,(0,T.jsx)(Ke,{icon:C,title:`No observations yet`,description:`Memory observations are created automatically when this test runs. They help the agent remember facts about your product.`})]}):(0,T.jsxs)(`div`,{className:`space-y-2 px-4 py-2`,children:[r.length>0?(0,T.jsx)(D,{invalidFiles:r}):null,(0,T.jsx)(`div`,{className:`flex items-center justify-between`,children:(0,T.jsxs)(`span`,{className:`text-[11px] text-muted-foreground`,children:[t.length,` observation`,t.length===1?``:`s`]})}),(0,T.jsx)(`div`,{className:`space-y-2`,children:t.map(e=>(0,T.jsx)(Xe,{observation:e,onDelete:re,isDeleting:te===e.id},e.id))})]})}function D({invalidFiles:e}){return(0,T.jsxs)(`div`,{className:`rounded-md border border-amber-500/40 bg-amber-500/10 px-3 py-2 text-xs text-amber-950 dark:text-amber-200`,children:[(0,T.jsxs)(`p`,{className:`font-medium`,children:[e.length,` invalid memory file`,e.length===1?``:`s`,` hidden from this panel.`]}),(0,T.jsx)(`p`,{className:`mt-1 text-[11px] text-amber-900/80 dark:text-amber-200/80`,children:e.map(e=>e.filename).join(`, `)})]})}var Qe=`name: My Test
2
+ test-id: ""
3
+ target: ""
4
+ context: ""
5
+ steps:
6
+ - Navigate to the homepage
7
+ - Verify the page loads
8
+ `;function $e({text:e}){return(0,T.jsxs)(S,{children:[(0,T.jsx)(v,{asChild:!0,children:(0,T.jsx)(be,{className:`h-3 w-3 text-muted-foreground/40 hover:text-muted-foreground/70 transition-colors cursor-help`})}),(0,T.jsx)(_,{className:`max-w-[250px] text-[13px]`,children:e})]})}function et(e){return e instanceof DOMException&&e.name===`AbortError`||e instanceof Error&&e.name===`AbortError`}function tt(e,t,n){if(t===`web`)return n||e?.url||`Configured start URL`;let r=e?.device;return(typeof r?.deviceName==`string`?r.deviceName:typeof r?.name==`string`?r.name:null)||e?.product||e?.bundleId||e?.appPackage||(t===`android`?`Android device`:`iOS device`)}function nt(e){return JSON.stringify({text:e.text,overrides:e.overrides??null})}function rt(e,t){return e.length===t.length&&e.every((e,n)=>e===t[n])}function it(e){let t=(0,w.useRef)([]);return(0,w.useMemo)(()=>{let n=t.current,r=new Set,i=e.map((e,t)=>{let i=nt(e),a=n[t];if(a&&a.signature===i)return r.add(a.id),{id:a.id,instruction:e.text,signature:i};let o=n.find(e=>e.signature===i&&!r.has(e.id));return o?(r.add(o.id),{id:o.id,instruction:e.text,signature:i}):a&&!r.has(a.id)?(r.add(a.id),{id:a.id,instruction:e.text,signature:i}):{id:crypto.randomUUID(),instruction:e.text,signature:i}});return t.current=i.map(({id:e,signature:t})=>({id:e,signature:t})),i},[e])}function at(){let{t_id:e}=Le(),a=Fe(),[ae]=Be(),u=Pe(),{defaultRunMode:oe}=i(),{targets:d,globalUse:ce,isLoading:ue}=t(),f=e??``,{suggestions:fe}=ee(f||null),p=!e,be=ae.get(`live`)===`1`,g=(0,w.useRef)(null),_=(0,w.useRef)(null),De=(0,w.useRef)(null),ke=(0,w.useRef)(()=>{}),v=(0,w.useRef)(!1),[y,b]=(0,w.useState)(p?Qe:``),[Ne,x]=(0,w.useState)(``),[S,Re]=(0,w.useState)(``),[C,Je]=(0,w.useState)(!p),[E,Ye]=(0,w.useState)(!1),[Xe,D]=(0,w.useState)(!1),[nt,at]=(0,w.useState)(!1),[O,ot]=(0,w.useState)(!1),[k,st]=(0,w.useState)(null),[A,j]=(0,w.useState)(null),[M,N]=(0,w.useState)(null),[P,F]=(0,w.useState)(!1),[I,L]=(0,w.useState)(!1),[R,ct]=(0,w.useState)(null),[lt,z]=(0,w.useState)(`reasoning`),[ut,B]=(0,w.useState)(null),[dt,V]=(0,w.useState)({setup:[],teardown:[]}),[H,ft]=(0,w.useState)(null),[pt,mt]=(0,w.useState)(!1),[ht,gt]=(0,w.useState)(!1),[U,_t]=(0,w.useState)(void 0),[vt,yt]=(0,w.useState)(``),W=!p&&y!==Ne,bt=p&&S?re(S.trim(),U,`testMatch`):null,xt=p&&!!S&&!!bt;(0,w.useEffect)(()=>{if(p)return;let e=!1;return Je(!0),Ve(f).then(t=>{e||(b(t.content),x(t.content),yt(t.path))}).catch(()=>{e||(Ye(!0),h.error(`Failed to load test file`))}).finally(()=>{e||Je(!1)}),()=>{e=!0}},[f,p]),(0,w.useEffect)(()=>{if(!p)return;let e=!1;return Me().then(t=>{if(e)return;let n=t.config.workspace?.testMatch;_t(Array.isArray(n)?n:[])}).catch(()=>{e||_t([])}),()=>{e=!0}},[p]),(0,w.useEffect)(()=>{if(!p)return;let e=he();b(t=>de(t,[`test-id`],e))},[p]);let G=(0,w.useMemo)(()=>se(y),[y]);G&&(g.current=G);let K=G??g.current,q=it(K?.steps??[]),St=(0,w.useMemo)(()=>q.map(e=>({draftId:e.id,instruction:e.instruction})),[q]),J=(0,w.useMemo)(()=>G?{testName:G.name.trim()||`Untitled Live Draft`,testContext:G.context.trim()||void 0}:null,[G]),Y=c(A,{steps:St,setupHooks:dt.setup,teardownHooks:dt.teardown,allowReconnect:!1}),X=Y.terminateSession;De.current=A,ke.current=X;let Ct=K?.target?.trim()??``,wt=Ct?d[Ct]:void 0,Tt=A?Y.platform:wt?.platform??`web`,Et=(0,w.useMemo)(()=>tt(wt,Tt,Y.currentUrl),[wt,Tt,Y.currentUrl]),Dt=G===null?`invalid`:W||p?`unsaved`:`saved`,Ot=(0,w.useMemo)(()=>q.map(e=>e.id),[q]),Z=I?`connecting`:Y.connectionState,Q=A!==null,kt=Q&&G!==null&&!rt(G.setup,dt.setup);ie((0,w.useMemo)(()=>Q&&M!==null?`Live #${M} — ${K?.name?.trim()||f||`Test`}`:p?`New Test`:`Edit Test`,[Q,M,K?.name,f,p]));let At=(0,w.useMemo)(()=>R===`ended`?{reason:`ended`,title:`Live session ended`,description:`The current draft is unchanged. Close live mode or start a fresh disposable session from this target.`}:R===`disconnected`?{reason:`disconnected`,title:`Live session disconnected`,description:`The connection dropped and the disposable session was terminated. Start a fresh session to reconnect.`}:null,[R]),jt=Q&&Z===`connected`&&G!==null&&G.steps.some(e=>e.text.trim()),Mt=I||Q,Nt=I||Q||O||k!==null||G===null||!G?.target.trim()||ue,$=(0,w.useCallback)(async()=>{D(!0);try{if(p){let e=re(S.trim(),U,`testMatch`);if(e){h.error(e);return}await Oe(S.trim(),y),h.success(`Test file created`),a(m.testView(G?.testId??``))}else await Se(f,y),x(y),h.success(`Saved`)}catch(e){h.error(`Failed to save: ${e instanceof Error?e.message:String(e)}`)}finally{D(!1)}},[p,S,U,y,f,a,G]),Pt=(0,w.useCallback)(()=>{o(`page`,`closing live mode`,{liveSessionId:A??void 0,terminalReason:R??void 0}),_.current?.abort(),_.current=null,A&&X(),L(!1),j(null),N(null),ct(null),B(null),V({setup:[],teardown:[]}),F(!1)},[A,R,X]),Ft=(0,w.useCallback)(()=>{o(`page`,`ending live session from UI`,{liveSessionId:A??void 0}),_.current?.abort(),_.current=null,A&&X(),L(!1),j(null),N(null),ct(`ended`),B(null),V({setup:[],teardown:[]}),F(!0)},[A,X]),It=(0,w.useCallback)(async(e,t)=>{let n=e.target.trim();if(!n){h.error(`Select a target before starting live mode`);return}let r=new AbortController;_.current?.abort(),_.current=r,F(!0),ct(null),z(`reasoning`),B(null),L(!0);try{t?.replaceCurrentSession&&A&&(X(),j(null),N(null));let i=ne({content:y,targetName:n,targets:d,globalUse:ce});o(`page`,`requesting live session`,{targetName:n,platform:i.platform,headless:i.headless??void 0,replacingSession:t?.replaceCurrentSession??!1});let a=[...e.setup],s=[...e.teardown],c=e.testId?.trim()||null,ee=c?{type:`test`,id:c}:void 0,{sessionId:te,sessionNumber:l}=await Ce({...i,setupHooks:a,teardownHooks:s,entity:ee},r.signal);if(r.signal.aborted)return;V({setup:a,teardown:s}),j(te),N(l),o(`page`,`live session created`,{sessionId:te,targetName:n})}catch(e){et(e)||(o(`page`,`failed to create live session`,{error:e instanceof Error?e.message:String(e),targetName:n}),h.error(e instanceof Error?e.message:`Failed to start live session`)),t?.replaceCurrentSession||F(!1)}finally{_.current===r&&(_.current=null),L(!1)}},[y,ce,A,d,X]),Lt=(0,w.useCallback)(async()=>{if(!Nt){if(!G){h.error(`Fix YAML errors before starting live mode`);return}await It(G)}},[G,It,Nt]),Rt=(0,w.useCallback)(async()=>{if(Q){if(!G){h.error(`Fix YAML errors before restarting live mode`);return}await It(G,{replaceCurrentSession:!0})}},[G,Q,It]),zt=(0,w.useCallback)(e=>{if(e){F(!0);return}Pt()},[Pt]),Bt=async()=>{at(!0);try{let e=await Ie(y,vt||S.trim());if(e.valid)h.success(`Valid YAML`);else{let t=e.errors.map(e=>e.line?`Line ${e.line}: ${e.message}`:e.message).join(`
9
+ `);h.error(t)}}catch(e){h.error(`Validation error: ${e instanceof Error?e.message:String(e)}`)}finally{at(!1)}},Vt=(0,w.useCallback)(async e=>{if(!O){try{if(p){let e=re(S.trim(),U,`testMatch`);if(e){h.error(e);return}await Oe(S.trim(),y),a(m.testView(G?.testId??``));return}W&&(await Se(f,y),x(y))}catch(e){h.error(`Failed to save before run: ${e instanceof Error?e.message:String(e)}`);return}ot(!0);try{st((await je({file:vt,local:e})).runId),h.success(`Run started`)}catch(e){h.error(`Failed to start run: ${e instanceof Error?e.message:String(e)}`),ot(!1)}}},[O,p,S,U,y,W,f,vt,a,G]),Ht=(0,w.useCallback)(()=>{st(null),ot(!1)},[]),Ut=(0,w.useCallback)(e=>{if(!Q)return;if(!J){h.error(`Fix YAML errors before running live steps. Live mode uses the current valid draft, not the last valid snapshot.`);return}let t=Y.steps[e]?.id;t&&B({type:`step`,stepId:t}),z(`reasoning`),Y.executeStepByIndex(e,J)},[J,Q,Y]),Wt=(0,w.useCallback)(e=>{Y.runningStepIndex===e&&(z(`reasoning`),Y.cancelStep())},[Y]),Gt=(0,w.useCallback)((e,t)=>{if(!Q)return;if(e===`setup`){h.error(`Setup hooks only run when a live session starts`);return}let n=Y.teardownHooks.find(e=>e.id===t);n&&B({type:`hook`,hookId:n.id}),z(`reasoning`),Y.executeHookById(e,t)},[Q,Y]);if((0,w.useEffect)(()=>()=>{_.current?.abort(),De.current&&ke.current()},[]),(0,w.useEffect)(()=>{A&&Z===`disconnected`&&(o(`page`,`live session moved to terminal state`,{liveSessionId:A,liveConnectionState:Z}),j(null),N(null),L(!1),ct(`disconnected`),B(null),V({setup:[],teardown:[]}),F(!0))},[Z,A]),(0,w.useEffect)(()=>{!be||v.current||p||C||E||I||P||Q||!G||!G.target.trim()||(v.current=!0,a(m.testEdit(f),{replace:!0}),Lt())},[G,Lt,Q,p,I,C,P,a,E,be,f]),(0,w.useEffect)(()=>{H&&!Ot.includes(H)&&ft(null)},[Ot,H]),(0,w.useEffect)(()=>{if(!P){B(null);return}let e=[...Y.setupHooks,...Y.teardownHooks];if(Y.steps.length===0&&e.length===0){B(null);return}B(t=>t?.type===`hook`&&e.some(e=>e.id===t.hookId)||t&&`stepId`in t&&Y.steps.some(e=>e.id===t.stepId)?t:e.length>0?{type:`hook`,hookId:e[0].id}:{type:`step`,stepId:Y.steps[0].id})},[Y.setupHooks,Y.steps,Y.teardownHooks,P]),qe((0,w.useMemo)(()=>({r:()=>{p||Vt(oe===`local`)},escape:()=>{k&&Ht()}}),[p,k,Vt,Ht,oe])),(0,w.useEffect)(()=>{function e(e){(e.metaKey||e.ctrlKey)&&e.key===`s`&&(e.preventDefault(),$())}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)},[$]),C)return(0,T.jsx)(ze,{});if(E)return(0,T.jsx)(Ke,{icon:r,title:`Test not found`,description:`This test file doesn't exist`,actionLabel:`View All Tests`,onAction:()=>a(m.tests)});let Kt=(0,T.jsx)(le,{content:y,onChange:b,isCreateMode:p,showLiveStepActions:Q,canRunLiveStep:Z===`connected`&&G!==null,canRunLiveHook:Z===`connected`&&G!==null,liveEditorSteps:Y.steps,draftStepIds:Ot,liveSetupHooks:Y.setupHooks,liveTeardownHooks:Y.teardownHooks,onRunLiveStep:Ut,onCancelLiveStep:Wt,onRunLiveHook:Gt,openStepSettingsId:H,onOpenStepSettingsChange:ft,selection:ut,onSelect:B,variableSuggestions:fe}),qt=(0,T.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col`,children:[p&&(0,T.jsx)(`div`,{className:`px-4 pt-3`,children:(0,T.jsxs)(`div`,{className:`rounded-md border bg-muted/15 px-3 py-2`,children:[(0,T.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,T.jsxs)(me,{className:`flex items-center gap-1 text-xs font-medium`,children:[`File Path `,(0,T.jsx)($e,{text:`Path is relative to your workspace root. Must match your workspace's testMatch pattern. Directories are created automatically on save.`})]}),(0,T.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:`Created only when you save`})]}),(0,T.jsx)(we,{placeholder:`my-test.yaml`,value:S,onChange:e=>Re(e.target.value),className:`mt-2 max-w-md ${xt?`border-red-500 focus-visible:ring-red-500`:``}`}),xt&&(0,T.jsx)(`p`,{className:`mt-1 text-xs text-red-500`,children:bt})]})}),(0,T.jsxs)(ye,{defaultValue:`builder`,className:`flex-1 flex min-h-0 flex-col`,children:[(0,T.jsxs)(ve,{variant:`line`,className:`px-4`,children:[(0,T.jsx)(ge,{value:`builder`,children:`Builder`}),(0,T.jsx)(ge,{value:`yaml`,children:`YAML`}),!p&&(0,T.jsx)(ge,{value:`memory`,children:`Memory`})]}),(0,T.jsx)(_e,{value:`builder`,className:`mt-2 flex-1 overflow-auto`,children:Kt}),(0,T.jsx)(_e,{value:`yaml`,className:`flex-1 min-h-0 mt-2`,children:(0,T.jsx)(n,{value:y,onChange:b,onSave:$,showErrors:!0,className:`h-full`})}),!p&&(0,T.jsx)(_e,{value:`memory`,className:`mt-2 flex-1 overflow-auto`,children:(0,T.jsx)(Ze,{testId:f})})]})]}),Jt=(0,T.jsx)(te,{connectionState:Y.connectionState,isLaunching:I,targetName:Ct||`Selected Target`,targetLabel:Et,liveSessionNumber:M,platform:Tt,screenshot:Y.screenshot,currentUrl:Y.currentUrl,pendingNavigation:Y.pendingNavigation,steps:Y.steps,setupHooks:Y.setupHooks,teardownHooks:Y.teardownHooks,selection:ut,runningStepId:Y.runningStepId,terminalState:At,draftState:Dt,ariaTree:Y.ariaTree,errorMessage:Y.error,devtoolsTab:lt,canRunAll:jt,isRunningAll:Y.isRunningAll,isStoppingRunAll:Y.isStoppingRunAll,setupHooksStale:kt,onDevtoolsTabChange:z,onRunAll:()=>{if(!J){h.error(`Fix YAML errors before running live steps. Live mode uses the current valid draft, not the last valid snapshot.`);return}Y.runAll(J)},onStopAll:Y.cancelRunAll,onEndSession:Ft,onRestartSession:kt?()=>void Rt():void 0,showEndSessionAction:u,onCloseLiveMode:Pt,onStartFreshSession:()=>void Lt(),onBack:Y.goBack,onForward:Y.goForward,onRefresh:Y.refreshPage,onNavigate:Y.navigate,onRequestAriaTree:Y.requestAriaTree});return(0,T.jsxs)(`div`,{className:`flex flex-col h-screen`,children:[(0,T.jsx)(pe,{testName:p?`New Test`:K?.name??f,testId:K?.testId??``,unsaved:W,isCreateMode:p,mode:p?`view`:`edit`,testHref:p?void 0:m.testView(f),isSaving:Xe,isValidating:nt,isRunning:O,runDisabled:Mt,hasInvalidFilename:xt,showTestId:!1,hasLiveSession:Q,liveConnectionState:Z,isLiveActionDisabled:Nt,liveSessionNumber:M,onBack:()=>a(p?m.tests:m.testView(f)),onSave:$,onValidate:Bt,onRun:Vt,onLiveConnect:P?void 0:Lt,onLiveEnd:Q?Ft:void 0,onSettingsOpen:()=>mt(!0),shortcutsOpen:ht,onToggleShortcuts:()=>gt(e=>!e)}),k?(0,T.jsxs)(We,{orientation:`horizontal`,className:`flex-1 rounded-md border border-border`,children:[(0,T.jsx)(Ue,{defaultSize:60,minSize:30,children:(0,T.jsx)(n,{value:y,onChange:b,onSave:$,className:`h-full`})}),(0,T.jsx)(Ge,{withHandle:!0}),(0,T.jsx)(Ue,{defaultSize:40,minSize:25,children:(0,T.jsx)(l,{runId:k,onClose:Ht})})]}):P&&!u?(0,T.jsxs)(We,{orientation:`horizontal`,className:`flex-1 rounded-md border border-border`,children:[(0,T.jsx)(Ue,{defaultSize:42,minSize:34,children:qt}),(0,T.jsx)(Ge,{withHandle:!0}),(0,T.jsx)(Ue,{defaultSize:58,minSize:38,children:Jt})]}):qt,(0,T.jsx)(Te,{open:pt,onOpenChange:mt,children:(0,T.jsxs)(Ee,{side:`right`,className:`sm:max-w-[400px] overflow-y-auto p-0`,children:[(0,T.jsxs)(He,{className:`px-4 pt-4 pb-2`,children:[(0,T.jsx)(xe,{children:`Test Settings`}),(0,T.jsx)(Ae,{children:`Advanced configuration for this test`})]}),(0,T.jsx)(`div`,{className:`px-4 pb-4`,children:(0,T.jsx)(s,{content:y,onChange:b,selectedTarget:K?.target})})]})}),u&&(0,T.jsx)(Te,{open:P,onOpenChange:zt,children:(0,T.jsxs)(Ee,{side:`bottom`,showCloseButton:!1,className:`h-[100dvh] max-h-[100dvh] rounded-none p-0`,children:[(0,T.jsxs)(He,{className:`sr-only`,children:[(0,T.jsx)(xe,{children:`Live Session`}),(0,T.jsx)(Ae,{children:`Live execution workspace for the current draft.`})]}),Jt]})})]})}export{at as default};