@straiffi/archon 1.2.14 → 1.2.16

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.
@@ -1,4 +1,4 @@
1
- import{a as e}from"./rolldown-runtime-BYbx6iT9.js";import{At as t,Mt as n,Nt as r,Rt as i,Wt as a,_t as o,a as s,c,h as l,i as u,l as d,m as f,n as p,o as m,r as ee,s as te,t as h,u as g,zt as _}from"./dropdown-menu-CeChQYkP.js";import{a as v,c as y,d as b,f as x,h as S,i as C,l as w,m as ne,n as T,o as E,p as D,r as O,s as re,t as k,u as ie}from"./index-C4ASxO0G.js";var A=e(a(),1),ae=(e,t)=>_(r(`/projects/${e}/test-sessions`),{method:`POST`,body:t,fallbackErrorMessage:`Unable to open the test runner right now.`}),oe=(e,t)=>_(r(`/tickets/${e}/test-sessions${t?`?project_id=${encodeURIComponent(t)}`:``}`),{method:`POST`,fallbackErrorMessage:`Unable to open the test runner right now.`}),se=(e,t={})=>_(r(`/test-sessions/${e}/discovery${t.commandId?`?command_id=${encodeURIComponent(t.commandId)}`:``}`),{signal:t.signal,fallbackErrorMessage:`Unable to discover tests right now.`}),ce=(e,t)=>_(r(`/test-sessions/${e}/run`),{method:`POST`,body:t,fallbackErrorMessage:`Unable to start the selected tests right now.`}),le=e=>_(r(`/test-sessions/${e}/stop`),{method:`POST`,fallbackErrorMessage:`Unable to stop the test run right now.`}),ue=e=>i(r(`/test-sessions/${e}`),{method:`DELETE`,fallbackErrorMessage:`Unable to close the test runner right now.`}),j=t(),M=256*1024,N=24,P=RegExp(`\x1B\\[[0-9;?]*[ -/]*[@-~]`,`g`),F=(e,t)=>m.t(`common:testsDialog.${e}`,t),de=(e,t)=>{let n=`${e}${t}`;return n.length<=M?n:n.slice(-M)},I=e=>e.replace(P,``),fe=e=>e.scrollHeight-e.scrollTop-e.clientHeight<=N,L=e=>{e.scrollTop=e.scrollHeight},pe=(e,t=!1)=>{L(e);let n=0,r=0;return n=window.requestAnimationFrame(()=>{L(e),t&&(r=window.requestAnimationFrame(()=>{L(e)}))}),()=>{window.cancelAnimationFrame(n),r!==0&&window.cancelAnimationFrame(r)}},me=e=>{if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.flatMap(e=>{if(!e||typeof e!=`object`||Array.isArray(e))return[];let t=e;if(typeof t.id!=`string`||typeof t.name!=`string`||typeof t.command!=`string`)return[];let n=t.runner===`vitest`||t.runner===`jest`||t.runner===`unknown`?t.runner:`auto`;return[{id:t.id,name:t.name,command:t.command,runner:n,...typeof t.cwd==`string`&&t.cwd.trim()!==``?{cwd:t.cwd}:{}}]}):[]}catch{return[]}},R=e=>e===`running`?`border-sky-400/40 bg-sky-500/10 text-sky-200`:e===`passed`?`border-emerald-400/40 bg-emerald-500/10 text-emerald-200`:e===`failed`||e===`error`?`border-rose-400/40 bg-rose-500/10 text-rose-200`:e===`stopped`?`border-amber-400/40 bg-amber-500/10 text-amber-200`:`border-border/70 bg-background/60 text-muted-foreground`,he=e=>e==null?null:e<1e3?`${e} ms`:`${(e/1e3).toFixed(e>=1e4?0:1)} s`,z=e=>{let t=e.split(`/`);return t[t.length-1]||e},B=e=>e.toLowerCase().trim().split(/\s+/).filter(Boolean),V=(e,t)=>e.length===0?!0:e.every(e=>t.some(t=>t.includes(e))),H=(e,t)=>{let n=B(t);return n.length===0?e:e.flatMap(e=>{let t=z(e.path);if(V(n,[t.toLowerCase(),e.path.toLowerCase()]))return[e];let r=e.cases.filter(r=>V(n,[t.toLowerCase(),e.path.toLowerCase(),r.name.toLowerCase()]));return r.length===0?[]:[{...e,cases:r}]})},U=e=>F(e===`passed`?`status.passed`:e===`failed`?`status.failed`:e===`running`?`status.running`:e===`error`?`status.error`:e===`stopped`?`status.stopped`:`status.idle`),ge=e=>e?.selection?e.selection.kind===`all`?F(`selection.allTests`):e.selection.kind===`case`?e.selection.name:z(e.selection.path):F(`selection.noRunYet`),W=e=>/(^|\s)(?:FAIL|✗)(\s|$)|\b(?:failed|error|stderr|Expected:|Received:)\b/i.test(e)?`failure`:/(^|\s)(?:PASS|✓)(\s|$)|\bpassed\b/i.test(e)?`success`:/\b(?:WARN|warning|skipped|todo|pending)\b/i.test(e)?`warning`:`default`,G=e=>e===`failure`?`text-rose-200`:e===`success`?`text-emerald-200`:e===`warning`?`text-amber-200`:`text-slate-200`,_e=(e,t)=>e===t?!0:e.length===t.length?e.every((e,n)=>{let r=t[n];return r!=null&&e.id===r.id&&e.name===r.name&&e.command===r.command&&e.cwd===r.cwd&&e.runner===r.runner}):!1,ve=`min-w-24 justify-center shadow-none transition-none disabled:opacity-100`,K=({line:e,tone:t})=>(0,j.jsx)(`div`,{"data-tone":t,className:l(`whitespace-pre-wrap break-words`,G(t)),children:e===``?` `:e}),q=(0,A.memo)(({canRunGranular:e,filePath:t,isActive:n,name:r,onRunCase:i})=>(0,j.jsxs)(`button`,{type:`button`,"aria-label":F(`caseRow.runAriaLabel`,{name:r}),title:r,className:l(`flex w-full min-w-0 items-center gap-2.5 rounded-xl px-2.5 py-1.5 text-left transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,e?`cursor-pointer hover:bg-sky-500/10`:`cursor-not-allowed opacity-60`,n&&`bg-sky-500/10`),disabled:!e,onClick:()=>{i(t,r)},children:[(0,j.jsx)(`span`,{className:`h-2 w-2 shrink-0 rounded-full bg-sky-300/80`}),(0,j.jsx)(`span`,{className:`truncate text-xs text-foreground`,children:r})]}));q.displayName=`TestCaseRow`;var J=(0,A.memo)(({activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:n,canRunGranular:r,file:i,isExpanded:a,onRunCase:o,onRunFile:s,onToggleFile:c})=>{let u=e===`file`&&n===i.path,p=e===`case`&&n===i.path;return(0,j.jsx)(O,{open:a,onOpenChange:e=>{c(i.path,e)},children:(0,j.jsxs)(`div`,{className:`space-y-1`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(v,{asChild:!0,children:(0,j.jsx)(f,{type:`button`,variant:`ghost`,size:`icon-xs`,"aria-label":F(a?`fileRow.collapseAriaLabel`:`fileRow.expandAriaLabel`,{path:i.path}),className:`mt-1 shrink-0 text-muted-foreground hover:text-foreground`,children:(0,j.jsx)(d,{className:l(`h-4 w-4 transition-transform`,a&&`rotate-180`)})})}),(0,j.jsx)(`button`,{type:`button`,"aria-label":F(`fileRow.runAriaLabel`,{path:i.path}),className:l(`min-w-0 flex-1 rounded-xl border border-border/60 bg-background/20 px-2.5 py-2 text-left transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,r?`cursor-pointer hover:border-sky-400/35 hover:bg-sky-500/10`:`cursor-not-allowed opacity-60`,(u||p)&&`border-sky-400/45 bg-sky-500/10`),disabled:!r,onClick:()=>{s(i.path)},children:(0,j.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,j.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center rounded-md border border-border/70 bg-background/60 text-sky-200`,children:(0,j.jsx)(T,{className:`h-3.5 w-3.5`})}),(0,j.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-start justify-between gap-3`,children:[(0,j.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,j.jsx)(`span`,{className:`block truncate text-xs font-medium text-foreground`,children:z(i.path)}),(0,j.jsx)(`span`,{className:`mt-0.5 block truncate text-[11px] text-muted-foreground`,children:i.path})]}),(0,j.jsx)(`span`,{className:`shrink-0 text-[11px] text-muted-foreground`,children:F(`fileRow.testCount`,{count:i.cases.length})})]})]})})]}),(0,j.jsx)(C,{children:(0,j.jsx)(`div`,{className:`ml-4 border-l border-border/60 pl-6`,children:i.cases.length===0?(0,j.jsx)(`p`,{className:`px-2.5 py-1.5 text-xs text-muted-foreground`,children:F(`fileRow.noNamedTests`)}):(0,j.jsx)(`div`,{className:`space-y-1`,children:i.cases.map(a=>{let s=e===`case`&&n===i.path&&t===a.name;return(0,j.jsx)(q,{canRunGranular:r,filePath:i.path,isActive:s,name:a.name,onRunCase:o},a.id)})})})})]})})});J.displayName=`DiscoveryFileRow`;var ye=(0,A.memo)(({activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:n,availableCommands:r,canRunGranular:i,discovery:a,expandedFiles:o,fullSuiteOnlyNotice:s,isLoading:m,selectedCommandId:_,selectedCommandName:v,sessionError:y,sessionStatus:b,shouldShowCommandSelector:x,onRunCase:S,onRunFile:C,onSelectCommand:w,onToggleFile:ne})=>{let[T,E]=(0,A.useState)(``),D=(0,A.useMemo)(()=>H(a,T),[a,T]),O=(0,A.useMemo)(()=>D.reduce((e,t)=>e+t.cases.length,0),[D]),re=B(T).length>0;return(0,j.jsx)(`aside`,{className:`min-h-0 border-b border-border/70 px-4 py-4 lg:border-r lg:border-b-0`,children:(0,j.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-3`,children:[x&&(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(`p`,{className:`text-xs uppercase tracking-[0.22em] text-muted-foreground`,children:F(`scope.label`)}),(0,j.jsxs)(h,{children:[(0,j.jsx)(u,{asChild:!0,children:(0,j.jsxs)(f,{type:`button`,variant:`outline`,className:`w-full justify-between rounded-xl border-border/70 bg-background/60`,"aria-label":F(`scope.selectedCommandAriaLabel`),disabled:r.length===0||b===`running`,children:[(0,j.jsx)(`span`,{className:`truncate`,children:v??F(`scope.selectTestScope`)}),(0,j.jsx)(d,{className:`h-4 w-4 text-muted-foreground`})]})}),(0,j.jsx)(p,{align:`start`,className:`w-72`,children:r.map(e=>(0,j.jsx)(ee,{className:l(_===e.id&&`bg-accent text-accent-foreground`),onSelect:()=>{w(e.id)},children:(0,j.jsx)(`span`,{className:`truncate`,children:e.name})},e.id))})]})]}),s&&(0,j.jsx)(`div`,{className:`rounded-2xl border border-border/70 bg-background/30 px-4 py-3 text-sm text-muted-foreground`,children:s}),(a.length>0||T.length>0)&&(0,j.jsxs)(`div`,{className:`relative mt-1 shrink-0`,children:[(0,j.jsx)(g,{type:`search`,value:T,onChange:e=>{E(e.target.value)},placeholder:F(`filter.placeholder`),"aria-label":F(`filter.ariaLabel`),className:`pr-10`}),T.length>0&&(0,j.jsx)(f,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":F(`filter.clearAriaLabel`),className:`absolute right-1 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,onClick:()=>{E(``)},children:(0,j.jsx)(te,{className:`size-4`})})]}),!r.length&&(0,j.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-4 text-sm text-muted-foreground`,children:F(`discovery.noCommands`)}),y&&(0,j.jsx)(`div`,{className:`rounded-2xl border border-rose-500/30 bg-rose-500/10 px-4 py-3 text-sm text-rose-200`,children:y}),(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 overflow-hidden rounded-2xl border border-border/70 bg-background/20 p-4`,children:[(0,j.jsxs)(`div`,{className:`shrink-0 flex items-start justify-between gap-3`,children:[(0,j.jsx)(`div`,{className:`min-w-0`,children:(0,j.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[F(`discovery.fileCount`,{count:D.length}),`, `,F(`discovery.caseCount`,{count:O})]})}),m&&(0,j.jsx)(c,{className:`h-4 w-4 animate-spin text-muted-foreground`})]}),(0,j.jsx)(`div`,{className:`min-h-0 flex-1 space-y-2 overflow-y-auto pr-1`,children:a.length===0&&!m?(0,j.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-5 text-sm text-muted-foreground`,children:F(`discovery.noFilesDetected`)}):D.length===0?(0,j.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-5 text-sm text-muted-foreground`,children:F(`discovery.noFilterMatches`)}):D.map(r=>(0,j.jsx)(J,{activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:n,canRunGranular:i,file:r,isExpanded:re||(o[r.path]??!1),onRunCase:S,onRunFile:C,onToggleFile:ne},r.path))})]})]})})});ye.displayName=`DiscoveryPane`;var be=(0,A.memo)(({durationMs:e,output:t,outputTruncated:n,selectionLabel:r,status:i,summaryCounts:a,viewportRef:o,onScroll:c})=>{let u=(0,A.useMemo)(()=>t?I(t).replaceAll(`\r
1
+ import{a as e}from"./rolldown-runtime-BYbx6iT9.js";import{At as t,Mt as n,Nt as r,Rt as i,Wt as a,_t as o,a as s,c,h as l,i as u,l as d,m as f,n as p,o as m,r as ee,s as te,t as h,u as g,zt as _}from"./dropdown-menu-CHiEwVjq.js";import{a as v,c as y,d as b,f as x,h as S,i as C,l as w,m as ne,n as T,o as E,p as D,r as O,s as re,t as k,u as ie}from"./index-BpEzCfrc.js";var A=e(a(),1),ae=(e,t)=>_(r(`/projects/${e}/test-sessions`),{method:`POST`,body:t,fallbackErrorMessage:`Unable to open the test runner right now.`}),oe=(e,t)=>_(r(`/tickets/${e}/test-sessions${t?`?project_id=${encodeURIComponent(t)}`:``}`),{method:`POST`,fallbackErrorMessage:`Unable to open the test runner right now.`}),se=(e,t={})=>_(r(`/test-sessions/${e}/discovery${t.commandId?`?command_id=${encodeURIComponent(t.commandId)}`:``}`),{signal:t.signal,fallbackErrorMessage:`Unable to discover tests right now.`}),ce=(e,t)=>_(r(`/test-sessions/${e}/run`),{method:`POST`,body:t,fallbackErrorMessage:`Unable to start the selected tests right now.`}),le=e=>_(r(`/test-sessions/${e}/stop`),{method:`POST`,fallbackErrorMessage:`Unable to stop the test run right now.`}),ue=e=>i(r(`/test-sessions/${e}`),{method:`DELETE`,fallbackErrorMessage:`Unable to close the test runner right now.`}),j=t(),M=256*1024,N=24,P=RegExp(`\x1B\\[[0-9;?]*[ -/]*[@-~]`,`g`),F=(e,t)=>m.t(`common:testsDialog.${e}`,t),de=(e,t)=>{let n=`${e}${t}`;return n.length<=M?n:n.slice(-M)},I=e=>e.replace(P,``),fe=e=>e.scrollHeight-e.scrollTop-e.clientHeight<=N,L=e=>{e.scrollTop=e.scrollHeight},pe=(e,t=!1)=>{L(e);let n=0,r=0;return n=window.requestAnimationFrame(()=>{L(e),t&&(r=window.requestAnimationFrame(()=>{L(e)}))}),()=>{window.cancelAnimationFrame(n),r!==0&&window.cancelAnimationFrame(r)}},me=e=>{if(!e)return[];try{let t=JSON.parse(e);return Array.isArray(t)?t.flatMap(e=>{if(!e||typeof e!=`object`||Array.isArray(e))return[];let t=e;if(typeof t.id!=`string`||typeof t.name!=`string`||typeof t.command!=`string`)return[];let n=t.runner===`vitest`||t.runner===`jest`||t.runner===`unknown`?t.runner:`auto`;return[{id:t.id,name:t.name,command:t.command,runner:n,...typeof t.cwd==`string`&&t.cwd.trim()!==``?{cwd:t.cwd}:{}}]}):[]}catch{return[]}},R=e=>e===`running`?`border-sky-400/40 bg-sky-500/10 text-sky-200`:e===`passed`?`border-emerald-400/40 bg-emerald-500/10 text-emerald-200`:e===`failed`||e===`error`?`border-rose-400/40 bg-rose-500/10 text-rose-200`:e===`stopped`?`border-amber-400/40 bg-amber-500/10 text-amber-200`:`border-border/70 bg-background/60 text-muted-foreground`,he=e=>e==null?null:e<1e3?`${e} ms`:`${(e/1e3).toFixed(e>=1e4?0:1)} s`,z=e=>{let t=e.split(`/`);return t[t.length-1]||e},B=e=>e.toLowerCase().trim().split(/\s+/).filter(Boolean),V=(e,t)=>e.length===0?!0:e.every(e=>t.some(t=>t.includes(e))),H=(e,t)=>{let n=B(t);return n.length===0?e:e.flatMap(e=>{let t=z(e.path);if(V(n,[t.toLowerCase(),e.path.toLowerCase()]))return[e];let r=e.cases.filter(r=>V(n,[t.toLowerCase(),e.path.toLowerCase(),r.name.toLowerCase()]));return r.length===0?[]:[{...e,cases:r}]})},U=e=>F(e===`passed`?`status.passed`:e===`failed`?`status.failed`:e===`running`?`status.running`:e===`error`?`status.error`:e===`stopped`?`status.stopped`:`status.idle`),ge=e=>e?.selection?e.selection.kind===`all`?F(`selection.allTests`):e.selection.kind===`case`?e.selection.name:z(e.selection.path):F(`selection.noRunYet`),W=e=>/(^|\s)(?:FAIL|✗)(\s|$)|\b(?:failed|error|stderr|Expected:|Received:)\b/i.test(e)?`failure`:/(^|\s)(?:PASS|✓)(\s|$)|\bpassed\b/i.test(e)?`success`:/\b(?:WARN|warning|skipped|todo|pending)\b/i.test(e)?`warning`:`default`,G=e=>e===`failure`?`text-rose-200`:e===`success`?`text-emerald-200`:e===`warning`?`text-amber-200`:`text-slate-200`,_e=(e,t)=>e===t?!0:e.length===t.length?e.every((e,n)=>{let r=t[n];return r!=null&&e.id===r.id&&e.name===r.name&&e.command===r.command&&e.cwd===r.cwd&&e.runner===r.runner}):!1,ve=`min-w-24 justify-center shadow-none transition-none disabled:opacity-100`,K=({line:e,tone:t})=>(0,j.jsx)(`div`,{"data-tone":t,className:l(`whitespace-pre-wrap break-words`,G(t)),children:e===``?` `:e}),q=(0,A.memo)(({canRunGranular:e,filePath:t,isActive:n,name:r,onRunCase:i})=>(0,j.jsxs)(`button`,{type:`button`,"aria-label":F(`caseRow.runAriaLabel`,{name:r}),title:r,className:l(`flex w-full min-w-0 items-center gap-2.5 rounded-xl px-2.5 py-1.5 text-left transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,e?`cursor-pointer hover:bg-sky-500/10`:`cursor-not-allowed opacity-60`,n&&`bg-sky-500/10`),disabled:!e,onClick:()=>{i(t,r)},children:[(0,j.jsx)(`span`,{className:`h-2 w-2 shrink-0 rounded-full bg-sky-300/80`}),(0,j.jsx)(`span`,{className:`truncate text-xs text-foreground`,children:r})]}));q.displayName=`TestCaseRow`;var J=(0,A.memo)(({activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:n,canRunGranular:r,file:i,isExpanded:a,onRunCase:o,onRunFile:s,onToggleFile:c})=>{let u=e===`file`&&n===i.path,p=e===`case`&&n===i.path;return(0,j.jsx)(O,{open:a,onOpenChange:e=>{c(i.path,e)},children:(0,j.jsxs)(`div`,{className:`space-y-1`,children:[(0,j.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,j.jsx)(v,{asChild:!0,children:(0,j.jsx)(f,{type:`button`,variant:`ghost`,size:`icon-xs`,"aria-label":F(a?`fileRow.collapseAriaLabel`:`fileRow.expandAriaLabel`,{path:i.path}),className:`mt-1 shrink-0 text-muted-foreground hover:text-foreground`,children:(0,j.jsx)(d,{className:l(`h-4 w-4 transition-transform`,a&&`rotate-180`)})})}),(0,j.jsx)(`button`,{type:`button`,"aria-label":F(`fileRow.runAriaLabel`,{path:i.path}),className:l(`min-w-0 flex-1 rounded-xl border border-border/60 bg-background/20 px-2.5 py-2 text-left transition-colors outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,r?`cursor-pointer hover:border-sky-400/35 hover:bg-sky-500/10`:`cursor-not-allowed opacity-60`,(u||p)&&`border-sky-400/45 bg-sky-500/10`),disabled:!r,onClick:()=>{s(i.path)},children:(0,j.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,j.jsx)(`span`,{className:`flex size-6 shrink-0 items-center justify-center rounded-md border border-border/70 bg-background/60 text-sky-200`,children:(0,j.jsx)(T,{className:`h-3.5 w-3.5`})}),(0,j.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-start justify-between gap-3`,children:[(0,j.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,j.jsx)(`span`,{className:`block truncate text-xs font-medium text-foreground`,children:z(i.path)}),(0,j.jsx)(`span`,{className:`mt-0.5 block truncate text-[11px] text-muted-foreground`,children:i.path})]}),(0,j.jsx)(`span`,{className:`shrink-0 text-[11px] text-muted-foreground`,children:F(`fileRow.testCount`,{count:i.cases.length})})]})]})})]}),(0,j.jsx)(C,{children:(0,j.jsx)(`div`,{className:`ml-4 border-l border-border/60 pl-6`,children:i.cases.length===0?(0,j.jsx)(`p`,{className:`px-2.5 py-1.5 text-xs text-muted-foreground`,children:F(`fileRow.noNamedTests`)}):(0,j.jsx)(`div`,{className:`space-y-1`,children:i.cases.map(a=>{let s=e===`case`&&n===i.path&&t===a.name;return(0,j.jsx)(q,{canRunGranular:r,filePath:i.path,isActive:s,name:a.name,onRunCase:o},a.id)})})})})]})})});J.displayName=`DiscoveryFileRow`;var ye=(0,A.memo)(({activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:n,availableCommands:r,canRunGranular:i,discovery:a,expandedFiles:o,fullSuiteOnlyNotice:s,isLoading:m,selectedCommandId:_,selectedCommandName:v,sessionError:y,sessionStatus:b,shouldShowCommandSelector:x,onRunCase:S,onRunFile:C,onSelectCommand:w,onToggleFile:ne})=>{let[T,E]=(0,A.useState)(``),D=(0,A.useMemo)(()=>H(a,T),[a,T]),O=(0,A.useMemo)(()=>D.reduce((e,t)=>e+t.cases.length,0),[D]),re=B(T).length>0;return(0,j.jsx)(`aside`,{className:`min-h-0 border-b border-border/70 px-4 py-4 lg:border-r lg:border-b-0`,children:(0,j.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-3`,children:[x&&(0,j.jsxs)(`div`,{className:`space-y-2`,children:[(0,j.jsx)(`p`,{className:`text-xs uppercase tracking-[0.22em] text-muted-foreground`,children:F(`scope.label`)}),(0,j.jsxs)(h,{children:[(0,j.jsx)(u,{asChild:!0,children:(0,j.jsxs)(f,{type:`button`,variant:`outline`,className:`w-full justify-between rounded-xl border-border/70 bg-background/60`,"aria-label":F(`scope.selectedCommandAriaLabel`),disabled:r.length===0||b===`running`,children:[(0,j.jsx)(`span`,{className:`truncate`,children:v??F(`scope.selectTestScope`)}),(0,j.jsx)(d,{className:`h-4 w-4 text-muted-foreground`})]})}),(0,j.jsx)(p,{align:`start`,className:`w-72`,children:r.map(e=>(0,j.jsx)(ee,{className:l(_===e.id&&`bg-accent text-accent-foreground`),onSelect:()=>{w(e.id)},children:(0,j.jsx)(`span`,{className:`truncate`,children:e.name})},e.id))})]})]}),s&&(0,j.jsx)(`div`,{className:`rounded-2xl border border-border/70 bg-background/30 px-4 py-3 text-sm text-muted-foreground`,children:s}),(a.length>0||T.length>0)&&(0,j.jsxs)(`div`,{className:`relative mt-1 shrink-0`,children:[(0,j.jsx)(g,{type:`search`,value:T,onChange:e=>{E(e.target.value)},placeholder:F(`filter.placeholder`),"aria-label":F(`filter.ariaLabel`),className:`pr-10`}),T.length>0&&(0,j.jsx)(f,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":F(`filter.clearAriaLabel`),className:`absolute right-1 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,onClick:()=>{E(``)},children:(0,j.jsx)(te,{className:`size-4`})})]}),!r.length&&(0,j.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-4 text-sm text-muted-foreground`,children:F(`discovery.noCommands`)}),y&&(0,j.jsx)(`div`,{className:`rounded-2xl border border-rose-500/30 bg-rose-500/10 px-4 py-3 text-sm text-rose-200`,children:y}),(0,j.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col gap-3 overflow-hidden rounded-2xl border border-border/70 bg-background/20 p-4`,children:[(0,j.jsxs)(`div`,{className:`shrink-0 flex items-start justify-between gap-3`,children:[(0,j.jsx)(`div`,{className:`min-w-0`,children:(0,j.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[F(`discovery.fileCount`,{count:D.length}),`, `,F(`discovery.caseCount`,{count:O})]})}),m&&(0,j.jsx)(c,{className:`h-4 w-4 animate-spin text-muted-foreground`})]}),(0,j.jsx)(`div`,{className:`min-h-0 flex-1 space-y-2 overflow-y-auto pr-1`,children:a.length===0&&!m?(0,j.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-5 text-sm text-muted-foreground`,children:F(`discovery.noFilesDetected`)}):D.length===0?(0,j.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-5 text-sm text-muted-foreground`,children:F(`discovery.noFilterMatches`)}):D.map(r=>(0,j.jsx)(J,{activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:n,canRunGranular:i,file:r,isExpanded:re||(o[r.path]??!1),onRunCase:S,onRunFile:C,onToggleFile:ne},r.path))})]})]})})});ye.displayName=`DiscoveryPane`;var be=(0,A.memo)(({durationMs:e,output:t,outputTruncated:n,selectionLabel:r,status:i,summaryCounts:a,viewportRef:o,onScroll:c})=>{let u=(0,A.useMemo)(()=>t?I(t).replaceAll(`\r
2
2
  `,`
3
3
  `).replaceAll(`\r`,`
4
4
  `).split(`