@straiffi/archon 1.8.2 → 1.8.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/client/assets/ActivityView-CZwuxu-k.js +1 -0
- package/dist/client/assets/GitHubActionsDialog-m0WCUbsY.js +1 -0
- package/dist/client/assets/VerificationDialog-D0LL2bcG.js +4 -0
- package/dist/client/assets/{architectureDiagram-3BPJPVTR-DSq-Vw-s.js → architectureDiagram-3BPJPVTR-Da0b3yts.js} +1 -1
- package/dist/client/assets/{blockDiagram-GPEHLZMM-C_0U0auf.js → blockDiagram-GPEHLZMM-DvzsxBUN.js} +1 -1
- package/dist/client/assets/{c4Diagram-AAUBKEIU-CEHt0Kjy.js → c4Diagram-AAUBKEIU-BEKrFtx2.js} +1 -1
- package/dist/client/assets/channel-CHuNNrYD.js +1 -0
- package/dist/client/assets/{chunk-2J33WTMH-C0Kxxq-6.js → chunk-2J33WTMH-BAKgBD7I.js} +1 -1
- package/dist/client/assets/{chunk-3OPIFGDE-QvjUuKmV.js → chunk-3OPIFGDE-BKPTlfa5.js} +1 -1
- package/dist/client/assets/{chunk-5ZQYHXKU-Csrpz86K.js → chunk-5ZQYHXKU-BDqDj4QJ.js} +1 -1
- package/dist/client/assets/{chunk-727SXJPM-B3vZVGMR.js → chunk-727SXJPM-Cs2r0JtD.js} +1 -1
- package/dist/client/assets/{chunk-AQP2D5EJ-Cs9__8di.js → chunk-AQP2D5EJ-DQbaJPN-.js} +1 -1
- package/dist/client/assets/{chunk-CSCIHK7Q-C9X7lfBM.js → chunk-CSCIHK7Q-CxuNtNrM.js} +1 -1
- package/dist/client/assets/{chunk-KSCS5N6A-CY0NGeTu.js → chunk-KSCS5N6A-Cw9Q8JPi.js} +1 -1
- package/dist/client/assets/{chunk-L5ZTLDWV-BboXbWo7.js → chunk-L5ZTLDWV-CtuZjEe8.js} +1 -1
- package/dist/client/assets/{chunk-LZXEDZCA-CUBnjoBD.js → chunk-LZXEDZCA-BQQddDdh.js} +2 -2
- package/dist/client/assets/{chunk-ND2GUHAM-BJqpZMk2.js → chunk-ND2GUHAM-AK6DBTJe.js} +1 -1
- package/dist/client/assets/{chunk-NZK2D7GU-BHRnsVyz.js → chunk-NZK2D7GU-CWRA29FQ.js} +1 -1
- package/dist/client/assets/{chunk-O5CBEL6O-Anqw_yuF.js → chunk-O5CBEL6O-X-Oio9FM.js} +1 -1
- package/dist/client/assets/{chunk-WU5MYG2G-BgGztexj.js → chunk-WU5MYG2G-CETO3v_f.js} +1 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-BZQ7jv-A.js +1 -0
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-7EFkByjs.js +1 -0
- package/dist/client/assets/{dagre-BM42HDAG-BaQbcdG0.js → dagre-BM42HDAG-Dt0-rccy.js} +1 -1
- package/dist/client/assets/{diagram-2AECGRRQ-Brv-rcOf.js → diagram-2AECGRRQ-BWRTEjaU.js} +1 -1
- package/dist/client/assets/{diagram-5GNKFQAL-D3eStICz.js → diagram-5GNKFQAL-C2H5QcoG.js} +1 -1
- package/dist/client/assets/{diagram-KO2AKTUF-CrZfGF7-.js → diagram-KO2AKTUF-RBK3VSKM.js} +1 -1
- package/dist/client/assets/{diagram-LMA3HP47-Dtk6gUIn.js → diagram-LMA3HP47-RGh2ZH4s.js} +1 -1
- package/dist/client/assets/{diagram-OG6HWLK6-Bmarlaaa.js → diagram-OG6HWLK6-DRZPfcn0.js} +1 -1
- package/dist/client/assets/{erDiagram-TEJ5UH35-BC_ZzN2S.js → erDiagram-TEJ5UH35-BMjeuzHP.js} +1 -1
- package/dist/client/assets/{flowDiagram-I6XJVG4X-DpCPHLj5.js → flowDiagram-I6XJVG4X-DoLSPv4x.js} +1 -1
- package/dist/client/assets/{ganttDiagram-6RSMTGT7-CaLaeFMa.js → ganttDiagram-6RSMTGT7-By8_6nMe.js} +1 -1
- package/dist/client/assets/{gitGraphDiagram-PVQCEYII-36phJ4N5.js → gitGraphDiagram-PVQCEYII-2rHM4CiD.js} +1 -1
- package/dist/client/assets/index-3dSPyX_Q.js +274 -0
- package/dist/client/assets/index-DZqqZx53.css +2 -0
- package/dist/client/assets/{infoDiagram-5YYISTIA-BI5oO32P.js → infoDiagram-5YYISTIA-DWOg8hUJ.js} +1 -1
- package/dist/client/assets/{ishikawaDiagram-YF4QCWOH-bgfzr0xn.js → ishikawaDiagram-YF4QCWOH-C9YznvSm.js} +1 -1
- package/dist/client/assets/{journeyDiagram-JHISSGLW-DrmwNzOC.js → journeyDiagram-JHISSGLW-DSQDDTNI.js} +1 -1
- package/dist/client/assets/{kanban-definition-UN3LZRKU-Cg5rkyMP.js → kanban-definition-UN3LZRKU-BkmCufHa.js} +1 -1
- package/dist/client/assets/{line-CFlz4TDX.js → line-cufAthH2.js} +1 -1
- package/dist/client/assets/{mermaid-parser.core-C7CnvU1K.js → mermaid-parser.core-BzbhogG7.js} +1 -1
- package/dist/client/assets/{mermaid.core-Dbab-VXW.js → mermaid.core-CsQKe9Kh.js} +3 -3
- package/dist/client/assets/{mindmap-definition-RKZ34NQL-DJze85_k.js → mindmap-definition-RKZ34NQL-Ci6JrMb6.js} +1 -1
- package/dist/client/assets/{pieDiagram-4H26LBE5-DJAQkhKY.js → pieDiagram-4H26LBE5-CU9I_3Q_.js} +1 -1
- package/dist/client/assets/{quadrantDiagram-W4KKPZXB-BD8d4qar.js → quadrantDiagram-W4KKPZXB-DytyOGrA.js} +1 -1
- package/dist/client/assets/{requirementDiagram-4Y6WPE33-C5mokQZP.js → requirementDiagram-4Y6WPE33-CnrtyW9-.js} +1 -1
- package/dist/client/assets/{sankeyDiagram-5OEKKPKP-EkdPZKJO.js → sankeyDiagram-5OEKKPKP-CGAC1tbH.js} +1 -1
- package/dist/client/assets/{sequenceDiagram-3UESZ5HK-B-5oe-32.js → sequenceDiagram-3UESZ5HK-Cqlp3Fns.js} +1 -1
- package/dist/client/assets/{stateDiagram-AJRCARHV-BFHel4DJ.js → stateDiagram-AJRCARHV-DspbWEGS.js} +1 -1
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-Bcxu99EH.js +1 -0
- package/dist/client/assets/{timeline-definition-PNZ67QCA-DvyAtzba.js → timeline-definition-PNZ67QCA-Bd0SWRDD.js} +1 -1
- package/dist/client/assets/{vennDiagram-CIIHVFJN-C9vIulQP.js → vennDiagram-CIIHVFJN-BZduwhis.js} +1 -1
- package/dist/client/assets/{wardleyDiagram-YWT4CUSO-CQTFOoRr.js → wardleyDiagram-YWT4CUSO-D6LrBEnX.js} +1 -1
- package/dist/client/assets/{xychartDiagram-2RQKCTM6-CyXsRLmO.js → xychartDiagram-2RQKCTM6-CoLKir5a.js} +1 -1
- package/dist/client/index.html +2 -2
- package/dist/client/notification-service-worker.js +70 -0
- package/dist/server/db.js +11 -0
- package/dist/server/db.js.map +1 -1
- package/dist/server/index.js +83 -95
- package/dist/server/index.js.map +1 -1
- package/dist/server/lib/automationBuildContinuation.js +141 -0
- package/dist/server/lib/automationBuildContinuation.js.map +1 -0
- package/dist/server/lib/buildSequences.js +13 -6
- package/dist/server/lib/buildSequences.js.map +1 -1
- package/dist/server/lib/chatOperations.js +23 -5
- package/dist/server/lib/chatOperations.js.map +1 -1
- package/dist/server/lib/chatTargets.js +3 -129
- package/dist/server/lib/chatTargets.js.map +1 -1
- package/dist/server/lib/chats.js +4 -40
- package/dist/server/lib/chats.js.map +1 -1
- package/dist/server/lib/checkRepair.js +28 -1
- package/dist/server/lib/checkRepair.js.map +1 -1
- package/dist/server/lib/executionRetry.js +14 -6
- package/dist/server/lib/executionRetry.js.map +1 -1
- package/dist/server/lib/executionRetryContext.js +11 -3
- package/dist/server/lib/executionRetryContext.js.map +1 -1
- package/dist/server/lib/executionRuns.js +11 -4
- package/dist/server/lib/executionRuns.js.map +1 -1
- package/dist/server/lib/git.js +3 -2
- package/dist/server/lib/git.js.map +1 -1
- package/dist/server/lib/projectTargets.js +5 -0
- package/dist/server/lib/projectTargets.js.map +1 -1
- package/dist/server/lib/pullRequestContent.js +8 -4
- package/dist/server/lib/pullRequestContent.js.map +1 -1
- package/dist/server/lib/reviewFindings.js +1 -1
- package/dist/server/lib/reviewFindings.js.map +1 -1
- package/dist/server/lib/sessionTargets.js +166 -0
- package/dist/server/lib/sessionTargets.js.map +1 -0
- package/dist/server/lib/specOperations.js +6 -0
- package/dist/server/lib/specOperations.js.map +1 -1
- package/dist/server/lib/specReviewOperations.js +5 -0
- package/dist/server/lib/specReviewOperations.js.map +1 -1
- package/dist/server/lib/specWorkspaceActivity.js +35 -0
- package/dist/server/lib/specWorkspaceActivity.js.map +1 -0
- package/dist/server/lib/specs.js +15 -4
- package/dist/server/lib/specs.js.map +1 -1
- package/dist/server/lib/ticketAutomation.js +2 -1
- package/dist/server/lib/ticketAutomation.js.map +1 -1
- package/dist/server/lib/ticketAutomationCommit.js +1 -4
- package/dist/server/lib/ticketAutomationCommit.js.map +1 -1
- package/dist/server/lib/tickets.js +15 -8
- package/dist/server/lib/tickets.js.map +1 -1
- package/dist/server/lib/types.js.map +1 -1
- package/dist/server/workers/build.js +3 -1
- package/dist/server/workers/build.js.map +1 -1
- package/dist/server/workers/plan.js +1 -1
- package/dist/server/workers/plan.js.map +1 -1
- package/dist/server/workers/specReview.js +21 -4
- package/dist/server/workers/specReview.js.map +1 -1
- package/dist/server/workers/specSession.js +42 -19
- package/dist/server/workers/specSession.js.map +1 -1
- package/package.json +1 -1
- package/dist/client/assets/ActivityView-CF8punHV.js +0 -1
- package/dist/client/assets/GitHubActionsDialog-Ckb99-ve.js +0 -1
- package/dist/client/assets/VerificationDialog-BgEDRfgP.js +0 -4
- package/dist/client/assets/channel-BjDfVBsO.js +0 -1
- package/dist/client/assets/classDiagram-4FO5ZUOK-DSaSDx3D.js +0 -1
- package/dist/client/assets/classDiagram-v2-Q7XG4LA2-BwfjAHrx.js +0 -1
- package/dist/client/assets/index-D4qr0sQx.css +0 -2
- package/dist/client/assets/index-Os2WLcbu.js +0 -274
- package/dist/client/assets/stateDiagram-v2-BHNVJYJU-iGqsY8gO.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{dt as e,r as t}from"./index-3dSPyX_Q.js";var n=e(),r=({projectId:e,onClose:r,onNavigateToLifecycleSource:i,initialRunId:a,initialEventId:o,onRunSelectionChange:s,onUnavailable:c})=>e?(0,n.jsx)(t,{projectId:e,scope:{type:`project`},initialRunId:a,initialEventId:o,onRunSelectionChange:s,onUnavailable:c,onClose:r,onNavigateToLifecycleSource:i}):null;export{r as ActivityView};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{a as e}from"./chunk-BNv3lrIs.js";import{B as t,C as n,E as r,F as i,H as a,J as o,M as s,P as c,S as l,T as u,U as d,V as f,W as p,Y as m,b as h,ct as g,dt as _,ft as v,lt as y,mt as ee,q as te,st as ne,u as b,ut as re,vt as x,w as S,x as C,z as w}from"./index-3dSPyX_Q.js";var T=e(x(),1),E=_(),ie=`https://docs.github.com/en/actions`,ae=5e3,D=(e,t)=>C.t(`common:githubActions.${e}`,t),O=e=>D(`status.${e}`),k=e=>e?D(`conclusion.${e}`):null,A=e=>e.status===`completed`?e.conclusion===`success`?`border-emerald-400/40 bg-emerald-500/10 text-emerald-200`:e.conclusion===`failure`||e.conclusion===`timed_out`?`border-rose-400/40 bg-rose-500/10 text-rose-200`:e.conclusion===`cancelled`?`border-amber-400/40 bg-amber-500/10 text-amber-200`:`border-border/70 bg-background/60 text-muted-foreground`:e.status===`in_progress`?`border-sky-400/40 bg-sky-500/10 text-sky-200`:e.status===`queued`?`border-violet-400/40 bg-violet-500/10 text-violet-200`:`border-border/70 bg-background/60 text-muted-foreground`,j=e=>e.status===`completed`?e.conclusion===`success`?`border-emerald-400/30 bg-emerald-500/10 text-emerald-200`:e.conclusion===`failure`?`border-rose-400/30 bg-rose-500/10 text-rose-200`:`border-border/70 bg-background/60 text-muted-foreground`:e.status===`in_progress`?`border-sky-400/30 bg-sky-500/10 text-sky-200`:`border-border/70 bg-background/60 text-muted-foreground`,M=e=>{let t=e.run_started_at??e.created_at,n=e.updated_at;if(!t||!n)return null;let r=Date.parse(t),i=Date.parse(n);if(!Number.isFinite(r)||!Number.isFinite(i)||i<r)return null;let a=i-r;if(a<1e3)return`${a} ms`;let o=Math.floor(a/1e3),s=Math.floor(o/3600),c=Math.floor(o%3600/60),l=o%60;return s>0?`${s}h ${c}m ${l}s`:c>0?`${c}m ${l}s`:`${(a/1e3).toFixed(a>=1e4?0:1)} s`},N=e=>e.status===`completed`?k(e.conclusion)??D(`status.completed`):O(e.status),P=e=>{let t={};for(let n of e){if(n.type===`boolean`){t[n.name]=n.default===!0;continue}typeof n.default==`string`&&n.default!==``&&(t[n.name]=n.default)}return t},F=({workflow:e,inputsState:t,isSelected:n,onSelect:r})=>{let a=e.state===`active`,s=t?.dispatchable??!0,l=a&&s&&!t?.isLoading,u=e.path.split(`/`).pop();return(0,E.jsxs)(`div`,{className:m(`flex flex-col gap-3 rounded-2xl border px-4 py-3 transition-colors`,n?`border-sky-400/45 bg-sky-500/10`:`border-border/60 bg-background/20 hover:bg-accent/20`),children:[(0,E.jsx)(`p`,{className:`line-clamp-2 break-words text-sm font-medium text-foreground`,children:e.name}),(0,E.jsx)(`p`,{className:`min-w-0 break-words text-[11px] text-muted-foreground`,children:u}),(0,E.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,E.jsx)(h,{variant:`outline`,className:m(`px-2 py-0.5 text-[10px] uppercase tracking-[0.18em]`,a?`border-emerald-400/30 bg-emerald-500/10 text-emerald-200`:`border-border/70 bg-background/60 text-muted-foreground`),children:D(a?`workflows.stateActive`:`workflows.stateDisabled`)}),(0,E.jsxs)(o,{type:`button`,variant:n?`secondary`:`outline`,size:`sm`,className:`h-8 gap-1.5 px-3 text-xs`,disabled:!l,"aria-label":D(`workflows.runAriaLabel`,{name:e.name}),title:!s&&t?D(`inputs.notDispatchable`):void 0,onClick:r,children:[t?.isLoading?(0,E.jsx)(i,{className:`h-3.5 w-3.5 animate-spin`}):(0,E.jsx)(c,{className:`h-3.5 w-3.5`}),(0,E.jsx)(`span`,{children:D(`actions.run`)})]})]})]})},I=({workflow:e,inputsState:n,refValue:r,onRefChange:a,values:s,onValueChange:u,isDispatching:d,onDispatch:f,onCancel:p})=>{let m=n.inputs.filter(e=>e.required&&!L(s[e.name],e)),h=n.dispatchable&&!n.isLoading&&!n.error&&r.trim()!==``&&m.length===0&&!d;return(0,E.jsxs)(`div`,{className:`space-y-4 rounded-2xl border border-border/70 bg-background/20 p-4`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,E.jsxs)(`div`,{className:`min-w-0`,children:[(0,E.jsx)(`p`,{className:`text-xs uppercase tracking-[0.22em] text-muted-foreground`,children:D(`inputs.title`)}),(0,E.jsx)(`p`,{className:`mt-0.5 truncate text-sm font-medium text-foreground`,children:e.name})]}),(0,E.jsx)(o,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":D(`actions.cancel`),onClick:p,children:(0,E.jsx)(l,{className:`h-4 w-4`})})]}),(0,E.jsxs)(`div`,{className:`space-y-2`,children:[(0,E.jsx)(w,{htmlFor:`github-actions-ref`,children:D(`inputs.refLabel`)}),(0,E.jsx)(t,{id:`github-actions-ref`,type:`text`,value:r,onChange:e=>{a(e.target.value)},placeholder:D(`inputs.refPlaceholder`),"aria-label":D(`inputs.refAriaLabel`)})]}),n.isLoading&&(0,E.jsxs)(`div`,{className:`flex items-center gap-2 text-xs text-muted-foreground`,children:[(0,E.jsx)(i,{className:`h-3.5 w-3.5 animate-spin`}),(0,E.jsx)(`span`,{children:D(`inputs.loading`)})]}),n.error&&(0,E.jsx)(`p`,{className:`text-xs text-rose-200`,children:n.error}),!n.dispatchable&&!n.isLoading&&!n.error&&(0,E.jsx)(`p`,{className:`text-xs text-amber-200`,children:D(`inputs.notDispatchable`)}),n.inputs.map(e=>(0,E.jsx)(R,{input:e,value:s[e.name],onChange:t=>{u(e.name,t)}},e.name)),m.length>0&&(0,E.jsx)(`p`,{className:`text-xs text-rose-200`,children:D(`inputs.requiredValidationError`)}),(0,E.jsxs)(`div`,{className:`flex items-center justify-end gap-2`,children:[(0,E.jsx)(o,{type:`button`,variant:`ghost`,onClick:p,disabled:d,children:D(`actions.cancel`)}),(0,E.jsxs)(o,{type:`button`,variant:`success`,onClick:f,disabled:!h,children:[d?(0,E.jsx)(i,{className:`h-4 w-4 animate-spin`}):(0,E.jsx)(c,{className:`h-4 w-4`}),(0,E.jsx)(`span`,{children:D(`actions.dispatch`)})]})]})]})},L=(e,t)=>t.type===`boolean`?typeof e==`boolean`:typeof e==`string`&&e.trim()!==``,R=({input:e,value:t,onChange:n})=>{let r=`github-actions-input-${e.name}`;return(0,E.jsxs)(`div`,{className:`space-y-2`,children:[(0,E.jsxs)(w,{htmlFor:r,className:`flex items-center gap-2`,children:[(0,E.jsx)(`span`,{children:e.name}),e.required&&(0,E.jsx)(`span`,{className:`text-[10px] uppercase tracking-[0.18em] text-rose-200/80`,children:D(`inputs.requiredLabel`)})]}),e.description&&(0,E.jsx)(`p`,{className:`text-[11px] text-muted-foreground`,children:e.description}),z(e,r,t,n)]})},z=(e,n,r,i)=>{if(e.type===`boolean`){let t=typeof r==`boolean`?r:e.default===!0;return(0,E.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,E.jsx)(b,{id:n,checked:t,onCheckedChange:e=>{i(e)}}),(0,E.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:D(t?`inputs.booleanYes`:`inputs.booleanNo`)})]})}if(e.type===`choice`){let t=e.options??[],a=typeof r==`string`?r:typeof e.default==`string`?e.default:``;return(0,E.jsxs)(`select`,{id:n,className:`h-9 w-full rounded-lg border border-border/70 bg-background/60 px-3 text-sm text-foreground outline-none focus-visible:ring-2 focus-visible:ring-ring/50`,value:a,onChange:e=>{i(e.target.value)},children:[a===``&&(0,E.jsx)(`option`,{value:``,children:D(`inputs.selectPlaceholder`)}),t.map(e=>(0,E.jsx)(`option`,{value:e,children:e},e))]})}return(0,E.jsx)(t,{id:n,type:`text`,value:typeof r==`string`?r:typeof e.default==`string`?e.default:``,onChange:e=>{i(e.target.value)}})},B=({job:e})=>e.steps.length===0?null:(0,E.jsx)(`div`,{className:`mt-2 ml-4 space-y-1 border-l border-border/60 pl-4`,children:e.steps.map(t=>(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsx)(h,{variant:`outline`,className:m(`px-2 py-0 text-[10px] uppercase tracking-[0.16em]`,j(t)),children:t.status===`completed`?k(t.conclusion)??D(`status.completed`):O(t.status)}),(0,E.jsx)(`span`,{className:`truncate text-[11px] text-muted-foreground`,children:t.name})]},`${e.id}-${t.number}`))}),oe=({run:e})=>{let t=M(e),r=N(e);return(0,E.jsxs)(`div`,{className:`rounded-2xl border border-border/60 bg-background/20 px-4 py-3`,children:[(0,E.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-2`,children:[(0,E.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,E.jsx)(`span`,{className:`truncate text-sm font-medium text-foreground`,children:e.name??`#${e.id}`}),(0,E.jsx)(h,{variant:`outline`,className:m(`px-2 py-0.5 text-[10px] uppercase tracking-[0.18em]`,A(e)),children:r})]}),(0,E.jsxs)(`div`,{className:`flex shrink-0 items-center gap-2`,children:[t&&(0,E.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:t}),e.html_url&&(0,E.jsxs)(`a`,{href:e.html_url,target:`_blank`,rel:`noreferrer`,className:`inline-flex items-center gap-1 text-[11px] text-sky-200 hover:text-sky-100`,children:[D(`actions.openOnGithub`),(0,E.jsx)(n,{className:`h-3 w-3`})]})]})]}),e.head_branch&&(0,E.jsx)(`p`,{className:`mt-1 text-[11px] text-muted-foreground`,children:e.head_branch}),e.jobs.map(e=>(0,E.jsxs)(`div`,{className:`mt-2`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,E.jsx)(h,{variant:`outline`,className:m(`px-2 py-0 text-[10px] uppercase tracking-[0.16em]`,A(e)),children:e.status===`completed`?k(e.conclusion)??D(`status.completed`):O(e.status)}),(0,E.jsx)(`span`,{className:`text-[11px] text-muted-foreground`,children:e.name})]}),(0,E.jsx)(B,{job:e})]},e.id))]})},se=({tracked:e})=>{let t=e.state===`resolving`,n=e.failure?.message??D(`runs.trackingState.${e.state}`);return(0,E.jsxs)(`div`,{className:m(`flex items-start gap-2 rounded-2xl border px-4 py-3`,t?`border-border/60 bg-background/20`:`border-red-400/25 bg-red-500/8`),children:[t&&(0,E.jsx)(i,{className:`mt-0.5 h-3.5 w-3.5 animate-spin text-muted-foreground`}),(0,E.jsxs)(`div`,{className:`min-w-0`,children:[(0,E.jsx)(`span`,{className:m(`block break-words text-xs`,t?`text-muted-foreground`:`text-red-200`),children:n}),(0,E.jsx)(`span`,{className:`mt-1 block text-[11px] text-muted-foreground`,children:e.ref??D(`runs.unknownRef`)})]})]})},V=(e,t)=>{let n=new Map(e.map(e=>[e.id,e]));for(let e of t){let t=n.get(e.id);(!t||(e.updated_at??``)>=(t.updated_at??``))&&n.set(e.id,e)}return[...n.values()]},H=(e,t)=>{let n=new Map(e.map(e=>[e.execution_run_id,e]));for(let e of t){let t=n.get(e.execution_run_id),r=t&&![`queued`,`waiting`,`running`].includes(t.execution_status),i=[`queued`,`waiting`,`running`].includes(e.execution_status);(!r||!i)&&n.set(e.execution_run_id,e)}return[...n.values()]},U=(e,t,n)=>{let r=t.filter(e=>e.run===null),i=new Set(r.map(e=>e.tracking_key));return H(e.filter(e=>i.has(e.tracking_key)||n.get(e.tracking_key)?.run===null),r.filter(e=>!n.has(e.tracking_key)))},W=e=>({ref:e??`main`}),G=({projectId:e,defaultBranch:t,onClose:c})=>{let[m,h]=(0,T.useState)([]),[_,b]=(0,T.useState)(!0),[x,C]=(0,T.useState)(null),[w,O]=(0,T.useState)([]),[k,A]=(0,T.useState)([]),[j,M]=(0,T.useState)({}),[N,L]=(0,T.useState)(null),[R,z]=(0,T.useState)(!1),[B]=(0,T.useState)(()=>W(t)),H=(0,T.useRef)({}),G=(0,T.useRef)({}),K=(0,T.useRef)(null),q=(0,T.useRef)(!1),J=(0,T.useRef)(0),Y=(0,T.useRef)(new Map),X=(0,T.useCallback)(async t=>{M(e=>{let n=e[t.id];return n?.isLoading?e:{...e,[t.id]:{inputs:n?.inputs??[],dispatchable:n?.dispatchable??!0,isLoading:!0,error:null}}});try{let n=await g(e,t.id,t.path);return M(e=>({...e,[t.id]:{inputs:n.inputs,dispatchable:n.dispatchable,isLoading:!1,error:null}})),n}catch(e){return M(n=>({...n,[t.id]:{inputs:[],dispatchable:!0,isLoading:!1,error:e instanceof v?e.message:D(`workflows.loadError`)}})),null}},[e]),Z=(0,T.useCallback)(async()=>{b(!0),C(null);try{let t=await re(e);h(t.workflows),Promise.allSettled(t.workflows.map(e=>X(e)))}catch(e){C(e instanceof v?e.message:D(`workflows.loadError`))}finally{b(!1)}},[X,e]),Q=(0,T.useCallback)(async t=>{if(q.current)return;q.current=!0;let n=J.current;try{let r=await y(e,t);O(e=>V(e,r.runs)),A(e=>{let t=new Map([...Y.current.entries()].filter(([,e])=>e.revision>n).map(([e,t])=>[e,t.event]));return U(e,r.tracked_runs??[],t)})}catch(e){ee(e)||console.warn(`[github-actions] unable to load runs`,e)}finally{q.current=!1}},[e]);(0,T.useEffect)(()=>{Z()},[Z]),(0,T.useEffect)(()=>{let e=new AbortController,t=()=>{document.visibilityState===`visible`&&Q(e.signal)};t();let n=window.setInterval(t,ae),r=u(t);return()=>{e.abort(),window.clearInterval(n),r()}},[Q]);let ce=(0,T.useCallback)(async e=>{if(N?.workflow.id===e.id)return;K.current=e.id,L({workflow:e,ref:B.ref,values:{}});let t=j[e.id];if(t&&!t.isLoading&&!t.error){L(n=>!n||n.workflow.id!==e.id?n:{...n,values:P(t.inputs)});return}let n=await X(e);n&&L(t=>!t||t.workflow.id!==e.id?t:{...t,values:P(n.inputs)})},[B.ref,j,X,N]),le=(0,T.useCallback)(async()=>{if(!N)return;let t=j[N.workflow.id];if(!t||!t.dispatchable)return;z(!0);let n={};for(let e of t.inputs){let t=N.values[e.name];e.type===`boolean`?n[e.name]=typeof t==`boolean`?t:e.default===!0:typeof t==`string`&&t!==``?n[e.name]=t:typeof e.default==`string`&&e.default!==``&&(n[e.name]=e.default)}try{await ne(e,N.workflow.id,{ref:N.ref,workflowName:N.workflow.name,workflowUrl:N.workflow.url,inputs:n}),s.success(D(`messages.dispatched`)),L(null),Q()}catch(e){s.error(e instanceof v?e.message:D(`messages.dispatchError`))}finally{z(!1)}},[j,Q,e,N]);(0,T.useEffect)(()=>{let t=t=>{!t||t.project_id!==e||(J.current+=1,Y.current.set(t.tracking_key,{revision:J.current,event:t}),A(e=>{let n=e.filter(e=>e.tracking_key!==t.tracking_key);return t.run?n:[...n,t]}),t.run&&O(e=>V(e,[t.run])))};return S.on(`github-actions:updated`,t),()=>{S.off(`github-actions:updated`,t)}},[e]),(0,T.useEffect)(()=>{let e=N?.workflow.id;!e||K.current!==e||(H.current[e]?.scrollIntoView({block:`nearest`}),G.current[e]?.scrollIntoView({block:`nearest`}),K.current=null)},[N?.workflow.id]);let $=(0,T.useMemo)(()=>[...w].sort((e,t)=>{let n=e.updated_at?Date.parse(e.updated_at):0;return(t.updated_at?Date.parse(t.updated_at):0)-n}),[w]);return(0,E.jsx)(f,{open:!0,onOpenChange:e=>{e||c()},children:(0,E.jsxs)(d,{showCloseButton:!1,overlayClassName:`bg-black/70`,className:`flex h-[calc(100vh-2rem)] max-h-[58rem] w-full max-w-[calc(100%-1rem)] flex-col gap-0 overflow-hidden rounded-3xl border border-[#2a2a38] bg-[#16161f] p-0 shadow-2xl sm:max-w-5xl`,onInteractOutside:e=>e.preventDefault(),children:[(0,E.jsx)(te,{className:`sr-only`,children:D(`dialog.srTitle`)}),(0,E.jsx)(p,{className:`sr-only`,children:D(`dialog.srDescription`)}),(0,E.jsxs)(`div`,{className:`flex items-start justify-between gap-4 border-b border-border px-6 py-4`,children:[(0,E.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,E.jsx)(`div`,{className:`flex size-10 shrink-0 items-center justify-center rounded-2xl border border-border/70 bg-background/60 text-violet-200`,children:(0,E.jsx)(r,{className:`h-5 w-5`})}),(0,E.jsx)(`div`,{children:(0,E.jsx)(`h2`,{className:`text-2xl font-semibold text-foreground`,children:D(`dialog.title`)})})]}),(0,E.jsx)(a,{asChild:!0,children:(0,E.jsx)(o,{type:`button`,"aria-label":D(`dialog.closeAriaLabel`),variant:`ghost`,size:`icon-sm`,className:`cursor-pointer text-muted-foreground hover:text-foreground`,children:(0,E.jsx)(l,{className:`h-4 w-4`})})})]}),(0,E.jsxs)(`div`,{className:`grid min-h-0 flex-1 gap-0 overflow-hidden lg:grid-cols-[22rem_minmax(0,1fr)]`,children:[(0,E.jsxs)(`aside`,{"aria-label":D(`workflows.ariaLabel`),className:`flex min-h-0 flex-col gap-3 overflow-y-auto border-b border-border/70 px-4 py-4 lg:border-r lg:border-b-0`,children:[(0,E.jsxs)(`div`,{className:`flex items-center justify-between gap-2`,children:[(0,E.jsx)(`p`,{className:`text-xs uppercase tracking-[0.22em] text-muted-foreground`,children:D(`workflows.title`)}),(0,E.jsx)(o,{type:`button`,variant:`ghost`,size:`sm`,className:`h-7 px-2 text-xs text-muted-foreground hover:text-foreground`,onClick:()=>{Z(),Q()},children:D(`actions.refresh`)})]}),_&&(0,E.jsxs)(`div`,{className:`flex items-center gap-2 px-2 text-xs text-muted-foreground`,children:[(0,E.jsx)(i,{className:`h-3.5 w-3.5 animate-spin`}),(0,E.jsx)(`span`,{children:D(`workflows.loading`)})]}),x&&(0,E.jsx)(`div`,{className:`rounded-2xl border border-rose-500/30 bg-rose-500/10 px-4 py-3 text-sm text-rose-200`,children:x}),!_&&m.length===0&&!x&&(0,E.jsxs)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-5 text-sm text-muted-foreground`,children:[(0,E.jsx)(`p`,{children:D(`workflows.empty`)}),(0,E.jsx)(`p`,{className:`mt-1`,children:D(`workflows.emptyHint`)}),(0,E.jsxs)(`a`,{href:ie,target:`_blank`,rel:`noreferrer`,className:`mt-2 inline-flex items-center gap-1 text-xs text-sky-200 hover:text-sky-100`,children:[D(`workflows.docsLink`),(0,E.jsx)(n,{className:`h-3 w-3`})]})]}),(0,E.jsx)(`div`,{className:`space-y-2`,children:m.map(e=>{let t=N?.workflow.id===e.id;return(0,E.jsxs)(`div`,{className:`space-y-2`,children:[(0,E.jsx)(`div`,{ref:t=>{H.current[e.id]=t},children:(0,E.jsx)(F,{workflow:e,inputsState:j[e.id]??null,isSelected:t,onSelect:()=>{ce(e)}})}),t&&N&&(0,E.jsx)(`div`,{ref:t=>{G.current[e.id]=t},children:(0,E.jsx)(I,{workflow:e,inputsState:j[e.id]??{inputs:[],dispatchable:!0,isLoading:!1,error:null},refValue:N.ref,onRefChange:e=>{L(t=>t&&{...t,ref:e})},values:N.values,onValueChange:(e,t)=>{L(n=>n&&{...n,values:{...n.values,[e]:t}})},isDispatching:R,onDispatch:()=>{le()},onCancel:()=>{L(null)}})})]},e.id)})})]}),(0,E.jsxs)(`section`,{className:`flex min-h-0 flex-col gap-3 overflow-y-auto px-4 py-4`,children:[(0,E.jsx)(`p`,{className:`text-xs uppercase tracking-[0.22em] text-muted-foreground`,children:D(`runs.title`)}),k.map(e=>(0,E.jsx)(se,{tracked:e},e.tracking_key)),$.map(e=>(0,E.jsx)(oe,{run:e},e.id)),$.length===0&&k.length===0&&(0,E.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-5 text-sm text-muted-foreground`,children:D(`runs.empty`)})]})]})]})})};export{G as GitHubActionsDialog};
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import{a as e}from"./chunk-BNv3lrIs.js";import{$ as t,A as n,B as r,D as i,F as a,G as o,I as s,J as c,K as l,L as u,N as d,O as f,P as p,Q as m,R as h,S as g,U as _,V as v,W as y,X as b,Y as x,Z as S,_ as C,_t as w,a as T,at as E,b as D,c as O,d as ee,dt as k,et as te,f as ne,ft as A,g as j,gt as M,h as N,ht as re,i as ie,it as ae,j as oe,k as se,m as ce,mt as le,n as ue,nt as de,o as fe,ot as pe,p as P,pt as F,q as me,rt as he,s as ge,t as _e,tt as ve,v as I,vt as L,w as ye,x as be,y as xe}from"./index-3dSPyX_Q.js";var R=e(L(),1),z=k(),Se=({title:e,children:t,defaultOpen:n=!1})=>(0,z.jsxs)(C,{defaultOpen:n,className:`mt-5 rounded-2xl border border-border/70 bg-background/25`,children:[(0,z.jsx)(xe,{asChild:!0,children:(0,z.jsxs)(`button`,{type:`button`,"aria-label":e,className:`group flex w-full items-center gap-2 rounded-2xl px-4 py-3 text-left outline-none transition-colors hover:bg-accent/40 focus-visible:ring-2 focus-visible:ring-ring/60`,children:[(0,z.jsx)(`span`,{className:`min-w-0 flex-1 text-sm font-semibold text-foreground`,children:e}),(0,z.jsx)(h,{className:`size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-180`})]})}),(0,z.jsx)(I,{className:`border-t border-border/60 px-4 py-3`,children:t})]}),B=e=>{if(!e.file_path)return null;if(!e.start_line)return e.file_path;let t=`${e.start_line}${e.start_column?`:${e.start_column}`:``}`,n=e.end_line?`-${e.end_line}${e.end_column?`:${e.end_column}`:``}`:``;return`${e.file_path}:${t}${n}`},V=[`error`,`warning`,`info`,`unknown`],H=e=>{let t={error:0,warning:0,info:0,unknown:0};return e.forEach(e=>{t[e.severity]+=1}),t},U=({counts:e,totalCount:t})=>{let{t:n}=w(`common`,{keyPrefix:`checksDialog.diagnostics`}),r=V.filter(t=>e[t]>0);return(0,z.jsxs)(`div`,{"aria-label":n(`severitySummaryLabel`),className:`mt-3 flex flex-wrap items-center gap-2`,children:[r.map(t=>(0,z.jsx)(`span`,{className:`rounded-full border border-border/70 bg-background/45 px-2 py-1 text-[11px] text-muted-foreground`,children:n(`severityCount`,{count:e[t],severity:n(`severity.${t}`)})},t)),t>0&&t!==r.reduce((t,n)=>t+e[n],0)&&(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:n(`totalAvailable`,{count:t})})]})},Ce=({attempt:e,parser:t,repair:n,ticketRequired:r,selectedTicketId:i,onSelectedTicketChange:a})=>{let{t:o}=w(`common`,{keyPrefix:`checksDialog.diagnostics`}),s=e.currency??`unavailable`;return(0,z.jsxs)(C,{className:`mt-4 rounded-xl border border-border/60 bg-background/25`,children:[(0,z.jsx)(xe,{asChild:!0,children:(0,z.jsxs)(`button`,{type:`button`,"aria-label":o(`technicalDetails`),className:`group flex w-full items-center gap-2 rounded-xl px-3 py-2.5 text-left outline-none transition-colors hover:bg-accent/40 focus-visible:ring-2 focus-visible:ring-ring/60`,children:[(0,z.jsx)(`span`,{className:`text-xs font-semibold text-foreground`,children:o(`technicalDetails`)}),(0,z.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-xs text-muted-foreground`,children:o(`technicalDetailsHint`)}),(0,z.jsx)(h,{className:`size-4 shrink-0 text-muted-foreground transition-transform group-data-[state=open]:rotate-180`})]})}),(0,z.jsxs)(I,{className:`border-t border-border/60 px-3 py-3`,children:[(0,z.jsxs)(`dl`,{className:`grid gap-3 text-xs sm:grid-cols-2`,children:[t&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`text-muted-foreground`,children:o(`parserLabel`)}),(0,z.jsx)(`dd`,{className:`mt-1 text-foreground`,children:o(`parser.${t.parser_kind}`)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`text-muted-foreground`,children:o(`parserStateLabel`)}),(0,z.jsx)(`dd`,{className:`mt-1 text-foreground`,children:o(`state.${t.status}`)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`text-muted-foreground`,children:o(`parserRetentionLabel`)}),(0,z.jsx)(`dd`,{className:`mt-1 text-foreground`,children:o(`retentionState.${t.retention_state}`)})]})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`text-muted-foreground`,children:o(`outputRetentionLabel`)}),(0,z.jsx)(`dd`,{className:`mt-1 text-foreground`,children:o(`retentionState.${e.output_retention_state}`)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`text-muted-foreground`,children:o(`applicabilityLabel`)}),(0,z.jsx)(`dd`,{className:`mt-1 text-foreground`,children:o(`applicability`,{state:o(`applicabilityState.${s}`)})})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`text-muted-foreground`,children:o(`sourceLabel`)}),(0,z.jsx)(`dd`,{className:`mt-1 break-words text-foreground`,children:e.command_snapshot.name})]}),n&&(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`text-muted-foreground`,children:o(`destinationTitle`)}),(0,z.jsx)(`dd`,{className:`mt-1 text-foreground`,children:o(`destination.${n.destination}`)}),(0,z.jsx)(`dd`,{className:`mt-1 text-muted-foreground`,children:o(`destinationHint`)})]})]}),r&&n&&(0,z.jsxs)(`label`,{className:`mt-3 block text-xs text-muted-foreground`,children:[o(`ticketLabel`),(0,z.jsxs)(`select`,{value:i,onChange:e=>a(e.target.value),className:`mt-1 h-10 w-full rounded-xl border border-border bg-card px-3 text-sm text-foreground`,children:[(0,z.jsx)(`option`,{value:``,children:o(`ticketPlaceholder`)}),n.candidate_tickets.map(e=>(0,z.jsx)(`option`,{value:e.id,children:e.title},e.id))]})]})]})]})},W=({attempt:e,diagnostics:t,repair:n,selectedDiagnosticIds:r,selectedRawOutputAttemptRunIds:i,selectedAttemptRunIds:a,selectedTicketId:o,pending:s,activeRepair:l,onSelectedTicketChange:u,onToggleDiagnostic:d,onToggleRawOutput:f,onStartRepair:p,onStopRepair:m})=>{let{t:h}=w(`common`,{keyPrefix:`checksDialog.diagnostics`}),{t:g}=w(`common`,{keyPrefix:`checksDialog`});if(e.execution_status!==`failed`)return null;let _=t?.parser??null,v=t?.diagnostics??[],y=H(v),b=l?.terminal_result===null,x=!!(n?.eligibility.eligible&&n.eligible_attempt_run_ids.includes(e.execution_run_id)&&_?.status===`complete`&&_.retention_state===`retained`),S=!!(n?.eligibility.eligible&&n.eligible_raw_output_attempt_run_ids.includes(e.execution_run_id)&&e.output_retention_state===`retained`&&e.retained_output),C=i.has(e.execution_run_id),T=r.size,E=T>=32,D=a.size>=8&&!a.has(e.execution_run_id),O=E?h(`diagnosticLimit`,{count:32}):D?h(`attemptLimit`,{count:8}):null,ee=!!(n?.accepts_ticket_id&&n.candidate_tickets.length>1),k=T+i.size,te=k>0&&(!ee||o!==``),ne=n&&!n.eligibility.eligible?h(`disabled.${n.eligibility.reason}`):null,A=_&&t&&(_.status===`interrupted`||v.length===0&&[`unsupported`,`malformed`].includes(_.status))?_.status:null,j=!!(_&&t&&v.length===0&&_.status===`complete`&&_.retention_state===`retained`&&_.diagnostic_count===0),M=!!(_&&t&&v.length===0&&_.status===`complete`&&_.retention_state===`retained`&&_.diagnostic_count>0),N=_?.diagnostic_count??v.length;return(0,z.jsxs)(`section`,{"aria-labelledby":`diagnostics-${e.execution_run_id}`,className:`mt-5 rounded-2xl border border-border/70 bg-background/25 p-4`,children:[(0,z.jsx)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h3`,{id:`diagnostics-${e.execution_run_id}`,className:`text-sm font-semibold text-foreground`,children:h(`title`)}),(0,z.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:_&&_.status===`pending`?h(`loading`):_&&N>0?M||_.retention_state===`expired`?h(`totalAvailable`,{count:N}):h(`availableCount`,{count:N}):h(t?`noneAvailable`:`loading`)}),(0,z.jsx)(`p`,{className:`mt-1 text-xs text-muted-foreground`,children:h(`failureOutcome`,{outcome:e.outcome?g(`outcomeValue.${e.outcome}`):g(`status.${e.execution_status}`)})}),t&&v.length>0&&(0,z.jsx)(U,{counts:y,totalCount:N})]})}),_?.retention_state===`expired`&&(0,z.jsx)(`p`,{className:`mt-3 text-sm text-amber-200`,children:h(`expired`)}),_?.truncated&&(0,z.jsx)(`p`,{className:`mt-3 text-sm text-amber-200`,children:h(`truncated`)}),A&&(0,z.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:h(`fallback.${A}`)}),j&&(0,z.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:h(`noStructuredDiagnostics`)}),M&&(0,z.jsx)(`p`,{className:`mt-3 text-sm text-muted-foreground`,children:h(`structuredDetailsUnavailable`)}),S&&(0,z.jsxs)(`label`,{className:`mt-4 flex items-start gap-3 rounded-xl border border-amber-400/25 bg-amber-500/5 p-3`,children:[(0,z.jsx)(`input`,{type:`checkbox`,className:`mt-1 size-4 accent-primary`,"aria-label":h(`rawOutputSelect`),checked:C,disabled:b||!C&&D,onChange:e=>f(e.target.checked)}),(0,z.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,z.jsx)(`span`,{className:`block text-sm font-medium text-foreground`,children:h(`rawOutputSelect`)}),(0,z.jsx)(`span`,{className:`mt-1 block text-xs text-muted-foreground`,children:h(`rawOutputHint`)}),e.retained_start_offset>0&&(0,z.jsx)(`span`,{className:`mt-1 block text-xs text-amber-200`,children:h(`rawOutputTruncated`)})]})]}),t&&v.length>0&&(0,z.jsxs)(`fieldset`,{className:`mt-4`,children:[(0,z.jsx)(`legend`,{className:`text-xs font-medium text-muted-foreground`,children:h(`selectLegend`)}),(0,z.jsx)(`ul`,{className:`mt-2 space-y-2`,children:v.map(e=>{let t=B(e),n=r.has(e.id);return(0,z.jsx)(`li`,{children:(0,z.jsxs)(`label`,{className:`flex items-start gap-3 rounded-xl border border-border/60 bg-background/35 p-3`,children:[(0,z.jsx)(`input`,{type:`checkbox`,className:`mt-1 size-4 accent-primary`,checked:n,disabled:!x||b||!n&&O!==null,onChange:t=>d(e.id,t.target.checked)}),(0,z.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,z.jsxs)(`span`,{className:`flex flex-wrap gap-2 text-xs text-muted-foreground`,children:[(0,z.jsx)(`span`,{className:`font-semibold uppercase text-foreground`,children:h(`severity.${e.severity}`)}),e.code&&(0,z.jsx)(`code`,{children:e.code})]}),(0,z.jsx)(`span`,{className:`mt-1 block break-words text-sm text-foreground`,children:e.message}),t&&(0,z.jsx)(`span`,{className:`mt-1 block break-all font-mono text-xs text-muted-foreground`,children:t})]})]})},e.id)})})]}),ne&&(0,z.jsx)(`p`,{className:`mt-3 text-xs text-amber-200`,children:ne}),O&&(0,z.jsx)(`p`,{className:`mt-3 text-xs text-amber-200`,children:O}),l&&(0,z.jsxs)(`div`,{className:`mt-4 rounded-xl border border-sky-400/25 bg-sky-500/10 p-3 text-sm`,children:[(0,z.jsx)(`p`,{className:`font-medium text-sky-100`,children:h(l.terminal_result?`repairResult.${l.terminal_result}`:`repairRunning`)}),l.terminal_message&&(0,z.jsx)(`p`,{className:`mt-1 text-xs text-sky-100/80`,children:l.terminal_message})]}),(0,z.jsxs)(`div`,{className:`mt-4 flex flex-wrap items-center justify-between gap-3`,children:[(0,z.jsx)(`p`,{className:`text-xs text-muted-foreground`,children:h(`selectedEvidence`,{count:k})}),(0,z.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,z.jsx)(c,{type:`button`,size:`sm`,disabled:n?.eligibility.eligible!==!0||!te||s||b,title:ne??void 0,onClick:p,children:s?h(`starting`):h(`repairSelectedEvidence`,{count:k})}),b&&(0,z.jsx)(c,{type:`button`,variant:`destructive`,size:`sm`,disabled:s,onClick:m,children:h(`stopRepair`)})]})]}),(0,z.jsx)(Ce,{attempt:e,parser:_,repair:n,ticketRequired:ee,selectedTicketId:o,onSelectedTicketChange:u})]})},G=({attempt:e})=>{let{t}=w(`common`,{keyPrefix:`checksDialog`}),n=e.retained_output?ie(e.retained_output):``;return(0,z.jsxs)(Se,{title:t(`rawOutput`),defaultOpen:!0,children:[e.output_retention_state===`expired`&&(0,z.jsx)(`p`,{className:`rounded-xl border border-border bg-background/30 p-4 text-sm text-muted-foreground`,children:t(`outputExpired`)}),e.output_retention_state===`retained`&&!n&&(0,z.jsx)(`p`,{className:`rounded-xl border border-border bg-background/30 p-4 text-sm text-muted-foreground`,children:t(`outputEmpty`)}),e.output_retention_state===`retained`&&n&&(0,z.jsx)(`pre`,{className:`max-h-80 overflow-auto whitespace-pre-wrap break-words rounded-xl border border-border bg-[#090b12] p-4 font-mono text-xs text-slate-200`,children:n}),e.retained_start_offset>0&&(0,z.jsx)(`p`,{className:`mt-2 text-xs text-muted-foreground`,children:t(`outputTruncated`)})]})},K=({definition:e,policy:t})=>{let{t:n}=w(`common`,{keyPrefix:`checksDialog`});return(0,z.jsxs)(`article`,{"aria-labelledby":`configured-check-${e.id}`,children:[(0,z.jsx)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`h2`,{id:`configured-check-${e.id}`,className:`text-lg font-semibold text-foreground`,children:e.name}),(0,z.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:n(`status.notRun`)})]})}),(0,z.jsx)(`p`,{className:`mt-4 rounded-xl border border-dashed border-border px-3 py-2 text-sm text-muted-foreground`,children:n(`notRunDescription`)}),(0,z.jsxs)(`dl`,{className:`mt-4 grid gap-3 text-sm sm:grid-cols-2`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:n(`command`)}),(0,z.jsx)(`dd`,{className:`mt-0.5 break-words font-mono text-xs text-foreground`,children:e.command})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:n(`directory`)}),(0,z.jsx)(`dd`,{className:`mt-0.5 text-foreground`,children:e.cwd??n(`targetRoot`)})]}),t&&(0,z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,z.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:n(`policyLabel`)}),(0,z.jsxs)(`dd`,{className:`mt-0.5 break-words text-foreground`,children:[n(t.required?`required`:`optional`),` · `,n(t.preReview?`preReview`:`finalOnly`)]})]})]})]})},we=({attempt:e,definition:t,diagnostics:n,repair:r,selectedDiagnosticIds:i,selectedRawOutputAttemptRunIds:a,selectedAttemptRunIds:o,selectedTicketId:s,pending:c,activeRepair:l,onSelectedTicketChange:u,onToggleDiagnostic:d,onToggleRawOutput:f,onStartRepair:p,onStopRepair:m,policy:h})=>{let{t:g}=w(`common`,{keyPrefix:`checksDialog`}),{t:_}=w(`common`,{keyPrefix:`activityView`});return e?(0,z.jsxs)(`article`,{"aria-labelledby":`selected-check-${e.execution_run_id}`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`h2`,{id:`selected-check-${e.execution_run_id}`,className:`text-lg font-semibold text-foreground`,children:e.command_snapshot.name}),(0,z.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:g(`status.${e.execution_status}`)})]}),e.outcome&&(0,z.jsx)(`span`,{className:`rounded-full border border-border px-2 py-1 text-xs text-muted-foreground`,children:g(`outcomeValue.${e.outcome}`)})]}),(0,z.jsxs)(`dl`,{className:`mt-4 grid gap-3 text-sm sm:grid-cols-2`,children:[(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:g(`command`)}),(0,z.jsx)(`dd`,{className:`mt-0.5 break-words font-mono text-xs text-foreground`,children:e.command_snapshot.command})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:g(`directory`)}),(0,z.jsx)(`dd`,{className:`mt-0.5 text-foreground`,children:e.command_snapshot.cwd??g(`targetRoot`)})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:g(`outcome`)}),(0,z.jsx)(`dd`,{className:`mt-0.5 text-foreground`,children:e.outcome?g(`outcomeValue.${e.outcome}`):g(`status.${e.execution_status}`)})]}),e.currency&&(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:g(`currencyLabel`)}),(0,z.jsx)(`dd`,{className:`mt-0.5 text-foreground`,children:_(`currency.${e.currency}`)})]}),h&&(0,z.jsxs)(`div`,{className:`sm:col-span-2`,children:[(0,z.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:g(`policyLabel`)}),(0,z.jsxs)(`dd`,{className:`mt-0.5 break-words text-foreground`,children:[g(h.required?`required`:`optional`),` · `,g(h.preReview?`preReview`:`finalOnly`)]})]})]}),e.execution_status===`failed`&&(0,z.jsx)(W,{attempt:e,diagnostics:n,repair:r,selectedDiagnosticIds:i,selectedRawOutputAttemptRunIds:a,selectedAttemptRunIds:o,selectedTicketId:s,pending:c,activeRepair:l,onSelectedTicketChange:u,onToggleDiagnostic:d,onToggleRawOutput:f,onStartRepair:p,onStopRepair:m}),(0,z.jsx)(G,{attempt:e},e.execution_run_id)]}):t?(0,z.jsx)(K,{definition:t,policy:h}):(0,z.jsxs)(`section`,{"aria-labelledby":`selected-check-heading`,className:`rounded-2xl border border-dashed border-border p-6`,children:[(0,z.jsx)(`h2`,{id:`selected-check-heading`,className:`font-medium text-foreground`,children:g(`selectAttemptTitle`)}),(0,z.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:g(`selectAttemptDescription`)})]})},q={current:`border-emerald-400/30 bg-emerald-500/10 text-emerald-200`,stale:`border-amber-400/30 bg-amber-500/10 text-amber-200`,failed:`border-red-400/30 bg-red-500/10 text-red-200`,missing:`border-border bg-muted/40 text-muted-foreground`,interrupted:`border-orange-400/30 bg-orange-500/10 text-orange-200`,blocked:`border-amber-400/30 bg-amber-500/10 text-amber-200`},Te=(e,t)=>e.presentApplicability.appliesToCurrentState===!1?`stale`:t?t.execution_status===`interrupted`||t.execution_status===`cancelled`?`interrupted`:t.execution_status===`failed`?`failed`:t.currency===`stale`?`stale`:t.outcome&&t.outcome!==`passed`?`failed`:t.outcome===`passed`&&t.currency===`current`?`current`:e.decision===`blocked`?`blocked`:`current`:`missing`,Ee=e=>e===!0?`gateApplicability.overallCurrent`:e===!1?`gateApplicability.overallStale`:`gateApplicability.overallUnverifiable`,De=({evaluation:e})=>{let{t}=w(`common`,{keyPrefix:`checksDialog`}),n=e.presentApplicability.appliesToCurrentState===!1?`gateStale`:e.presentApplicability.appliesToCurrentState===null?`gateUnverifiable`:e.decision===`passed`?`gatePassed`:`gateBlocked`,r=e.reasonCodes[0],i=r?t(`gateReasonSummary`,{reason:t(`reason.${r}`)}):e.decision===`passed`?t(`gatePassedSummary`):t(`gateBlockedSummary`);return(0,z.jsxs)(`section`,{"aria-labelledby":`automated-delivery-gate-heading`,className:`mb-5 rounded-2xl border border-border/70 bg-background/30 p-4`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-start justify-between gap-3`,children:[(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`h2`,{id:`automated-delivery-gate-heading`,className:`font-semibold text-foreground`,children:t(`gateTitle`)}),(0,z.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:i})]}),(0,z.jsx)(`span`,{className:x(`shrink-0 rounded-full border px-2.5 py-1 text-xs font-medium`,e.decision===`passed`&&e.presentApplicability.appliesToCurrentState===!0?q.current:q.blocked),children:t(n)})]}),(0,z.jsx)(Se,{title:t(`gateDetails`),children:(0,z.jsxs)(`div`,{className:`space-y-3 text-xs text-muted-foreground`,children:[(0,z.jsx)(`p`,{children:t(`gateScope`)}),(0,z.jsxs)(`div`,{className:`grid gap-2 sm:grid-cols-2`,children:[(0,z.jsx)(`p`,{children:t(`gateBoundary.label`,{boundary:t(`gateBoundary.${e.boundaryKind}`)})}),(0,z.jsx)(`p`,{className:`break-all`,children:t(`gatePolicy`,{fingerprint:e.policy.fingerprint.slice(0,12)})}),(0,z.jsx)(`p`,{children:t(`gatePolicyStatus`,{status:t(e.policy.status===`valid`?`gatePolicyValid`:`gatePolicyInvalid`)})}),(0,z.jsx)(`p`,{className:`break-all`,children:e.sourceBatchRunId?t(`gateSourceBatch`,{batchId:e.sourceBatchRunId}):t(`gateNoBatch`)}),(0,z.jsx)(`p`,{className:`break-words`,children:t(`gateApplicability.label`,{workspace:t(`gateApplicability.${e.presentApplicability.workspace}`),policy:t(`gateApplicability.${e.presentApplicability.policy}`),overall:t(Ee(e.presentApplicability.appliesToCurrentState))})})]}),e.reasonCodes.length>0&&(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h3`,{className:`font-medium text-foreground`,children:t(`gateReasonsTitle`)}),(0,z.jsx)(`ul`,{className:`mt-1 space-y-1`,children:e.reasonCodes.map(e=>(0,z.jsx)(`li`,{children:t(`reason.${e}`)},e))})]}),(0,z.jsxs)(`div`,{children:[(0,z.jsx)(`h3`,{className:`font-medium text-foreground`,children:t(`gateEvidenceTitle`)}),(0,z.jsx)(`div`,{className:`mt-2 space-y-2`,children:e.policy.definitions.map(n=>{let r=Te(e,e.evaluatedAttempts.find(e=>e.definition_id===n.id));return(0,z.jsxs)(`div`,{className:`flex items-start justify-between gap-3 rounded-xl border border-border/60 p-3`,children:[(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`p`,{className:`break-words text-sm font-medium text-foreground`,children:n.name}),(0,z.jsx)(`code`,{className:`mt-1 block break-all text-xs text-muted-foreground`,children:n.command})]}),(0,z.jsx)(`span`,{className:x(`shrink-0 rounded-full border px-2 py-1 text-xs`,q[r]),children:t(`evidence.${r}`)})]},n.id)})})]}),e.policy.status===`invalid`&&(0,z.jsx)(`p`,{className:`break-words text-amber-200`,children:e.policy.error})]})})]})},Oe=e=>e.execution_status===`completed`?`border-emerald-400/30 bg-emerald-500/10 text-emerald-200`:e.execution_status===`failed`||e.execution_status===`interrupted`?`border-red-400/30 bg-red-500/10 text-red-200`:e.execution_status===`running`||e.execution_status===`queued`?`border-sky-400/30 bg-sky-500/10 text-sky-200`:`border-border bg-muted/40 text-muted-foreground`,ke=e=>e.execution_status===`completed`&&e.outcome&&e.outcome!==`passed`?`outcomeValue.${e.outcome}`:`status.${e.execution_status}`,Ae=(e,t,n,r)=>((t?.attempts.find(t=>t.attempt_run_id===e.execution_run_id))?.diagnostics.filter(e=>n.has(e.id)).length??0)+ +!!r.has(e.execution_run_id),je=({definitions:e,attempts:t,requiredDefinitionIds:n,preReviewDefinitionIds:r,selectedDefinitionIds:i,selectedCheckId:a,diagnostics:o,selectedDiagnosticIds:s,selectedRawOutputAttemptRunIds:c,onToggleDefinition:l,onSelectCheck:u})=>{let{t:d}=w(`common`,{keyPrefix:`checksDialog`}),f=new Set(n),p=new Set(r),m=new Set(e.map(e=>e.id)),h=[...e.map(e=>({definition:e,attempt:t.find(t=>t.definition_id===e.id),historical:!1})),...t.filter(e=>!m.has(e.definition_id)).map(e=>({definition:e.command_snapshot,attempt:e,historical:!0}))];return(0,z.jsxs)(`section`,{"aria-labelledby":`configured-checks-heading`,className:`flex min-h-0 flex-1 flex-col`,children:[(0,z.jsxs)(`header`,{className:`shrink-0 border-b border-border/60 px-4 py-4 sm:px-5`,children:[(0,z.jsxs)(`div`,{className:`flex flex-col items-start gap-1`,children:[(0,z.jsx)(`h2`,{id:`configured-checks-heading`,className:`text-sm font-semibold text-foreground`,children:d(`configured`)}),(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:d(`selectionHint`)})]}),(0,z.jsxs)(`div`,{className:`mt-3 rounded-xl border border-border/70 bg-background/35 p-3 text-xs text-muted-foreground`,children:[(0,z.jsx)(`p`,{className:`font-medium text-foreground`,children:d(`policySummary.title`)}),(0,z.jsx)(`p`,{className:`mt-1`,children:d(`policySummary.counts`,{requiredCount:n.length,preReviewCount:r.length})})]})]}),(0,z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-y-auto px-4 py-4 sm:px-5 md:max-h-none md:py-5 max-md:max-h-[min(35vh,18rem)]`,children:(0,z.jsx)(`ul`,{"aria-label":d(`configured`),className:`space-y-2`,children:h.map(({definition:e,attempt:t,historical:n})=>{let r=a===e.id,m=t?Ae(t,o,s,c):0,h=f.has(e.id),g=p.has(e.id),_=`${d(`category.${e.category}`)} · ${d(h?`required`:`optional`)} · ${d(g?`preReview`:`finalOnly`)}`;return(0,z.jsx)(`li`,{className:`rounded-xl border border-border/60 bg-background/30 p-2.5`,children:(0,z.jsxs)(`div`,{className:`flex items-start gap-2.5`,children:[!n&&(0,z.jsx)(`input`,{type:`checkbox`,className:`mt-1 size-4 shrink-0 accent-primary`,checked:i.has(e.id),"aria-label":d(`selectForRun`,{name:e.name}),onChange:t=>l(e.id,t.target.checked)}),t?(0,z.jsxs)(`button`,{type:`button`,className:x(`min-w-0 flex-1 cursor-pointer rounded-lg px-1.5 py-1 text-left outline-none transition-colors hover:bg-accent/60 focus-visible:ring-2 focus-visible:ring-ring/60`,r&&`bg-accent/60`),"aria-label":d(`inspectAttempt`,{name:e.name,status:d(ke(t))}),"aria-pressed":r,"aria-current":r?`true`:void 0,onClick:()=>u(e.id),children:[(0,z.jsxs)(`span`,{className:`flex min-w-0 items-center justify-between gap-2`,children:[(0,z.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-foreground`,children:e.name}),(0,z.jsx)(`span`,{className:x(`shrink-0 rounded-full border px-2 py-0.5 text-[11px] font-medium`,Oe(t)),children:d(ke(t))})]}),(0,z.jsx)(`span`,{className:`mt-1 block truncate text-[11px] text-muted-foreground`,children:_}),m>0&&(0,z.jsx)(`span`,{"data-evidence-selected":`true`,className:`mt-1.5 inline-flex rounded-full border border-amber-400/30 bg-amber-500/10 px-2 py-0.5 text-[11px] text-amber-200`,children:d(`evidenceSelected`,{count:m})})]}):(0,z.jsxs)(`button`,{type:`button`,className:x(`min-w-0 flex-1 cursor-pointer rounded-lg px-1.5 py-1 text-left outline-none transition-colors hover:bg-accent/60 focus-visible:ring-2 focus-visible:ring-ring/60`,r&&`bg-accent/60`),"aria-label":d(`inspectAttempt`,{name:e.name,status:d(`status.notRun`)}),"aria-pressed":r,"aria-current":r?`true`:void 0,onClick:()=>u(e.id),children:[(0,z.jsx)(`span`,{className:`flex min-w-0 items-center justify-between gap-2`,children:(0,z.jsx)(`span`,{className:`min-w-0 truncate text-sm font-medium text-foreground`,children:e.name})}),(0,z.jsx)(`span`,{className:`mt-1 block truncate text-[11px] text-muted-foreground`,children:_})]})]})},t?.execution_run_id??e.id)})})})]})},Me=(e,t)=>{let n=new Set(t?.attempts.filter(e=>e.parser.status===`complete`&&e.parser.retention_state===`retained`&&e.diagnostics.length>0).map(e=>e.attempt_run_id)??[]);return e.find(e=>e.execution_status===`failed`&&n.has(e.execution_run_id))??e.find(e=>e.execution_status===`failed`)??e.find(e=>e.execution_status===`running`)??e[0]??null},Ne=new Set([`queued`,`running`,`waiting`]),Pe=75,Fe=32,Ie=64,Le=3,Re=32,ze=8,J=(e,t)=>e instanceof A?e.message:t,Be=e=>{let t=new Set(e.repair.eligibility.eligible?e.repair.eligible_attempt_run_ids:[]);return new Set(e.attempts.filter(e=>t.has(e.attempt_run_id)).flatMap(e=>e.diagnostics.map(e=>e.id)))},Ve=e=>new Set(e.repair.eligibility.eligible?e.repair.eligible_raw_output_attempt_run_ids:[]),He=({projectId:e,targetKind:n,targetBundleId:r,definitions:i,requiredDefinitionIds:a=[],preReviewDefinitionIds:o=[],gateEvaluationId:s=null,directBatchRunId:l=null,directAttemptRunId:u=null,onSelectionChange:d,onUnavailable:f,onStatusChange:p})=>{let{t:h}=w(`common`,{keyPrefix:`checksDialog`}),g=O(),[_,v]=(0,R.useState)(()=>new Set(i.map(e=>e.id))),[y,b]=(0,R.useState)(null),[x,C]=(0,R.useState)(null),[D,ee]=(0,R.useState)(null),[k,ne]=(0,R.useState)(null),[j,M]=(0,R.useState)(!0),[N,re]=(0,R.useState)(null),[ie,oe]=(0,R.useState)(null),[se,ce]=(0,R.useState)(new Set),[ue,P]=(0,R.useState)(new Set),[F,me]=(0,R.useState)(``),[_e,I]=(0,R.useState)(null),[L,ye]=(0,R.useState)(!1),[be,xe]=(0,R.useState)(0),[Se,B]=(0,R.useState)(null),V=(0,R.useRef)(y),H=(0,R.useRef)(null),U=(0,R.useRef)(new Set),Ce=(0,R.useRef)(new Map),W=(0,R.useRef)(0),G=(0,R.useRef)(0),K=(0,R.useRef)(null),q=(0,R.useRef)(!1),Te=(0,R.useRef)(!0),Ee=(0,R.useRef)(null),Oe=(0,R.useRef)(`automatic`),ke=(0,R.useRef)(null),Ae=(0,R.useRef)(async()=>void 0),He=(0,R.useRef)(async()=>void 0),Ue=(0,R.useRef)(()=>void 0),We=(0,R.useRef)(0),Ge=(0,R.useRef)(ie);V.current=y,Ge.current=ie,Te.current=j||N!==null;let Y=(0,R.useCallback)((e,t)=>{Ee.current=e,Oe.current=t,ee(e)},[]),Ke=(0,R.useCallback)(e=>{oe(e),I(e.latest_repair?.source_batch_run_id===e.batch_run_id?e.latest_repair:null),ce(t=>{let n=Be(e);return new Set([...t].filter(e=>n.has(e)))}),P(t=>{let n=Ve(e);return new Set([...t].filter(e=>n.has(e)))}),me(t=>e.repair.candidate_tickets.some(e=>e.id===t)?t:e.repair.candidate_tickets.length===1&&e.repair.accepts_ticket_id?e.repair.candidate_tickets[0].id:``);let t=V.current;Oe.current===`automatic`&&t?.batch.execution_run_id===e.batch_run_id&&Y(Me(t.attempts,e)?.execution_run_id??null,`automatic`)},[Y]),qe=(0,R.useCallback)(e=>{let t=Ce.current;if(!t.has(e.attempt_run_id)&&t.size>=Fe){let e=t.keys().next().value;e&&(t.delete(e),U.current.delete(e))}let n=t.get(e.attempt_run_id)??[];t.set(e.attempt_run_id,[...n.slice(-(Ie-1)),e])},[]),Je=(0,R.useCallback)((e,t,n=`route`)=>{let r=V.current?.batch.execution_run_id===e.batch.execution_run_id?V.current:null,i=!1,a=new Set(e.attempts.map(e=>e.execution_run_id));for(let e of Ce.current.keys())a.has(e)||(Ce.current.delete(e),U.current.delete(e));let o=e.attempts.map(e=>{let t=!1,n=r?.attempts.find(t=>t.execution_run_id===e.execution_run_id),a=n&&n.output_revision>e.output_revision?n:e,o=Ce.current.get(e.execution_run_id)??[];for(let e of[...o].sort((e,t)=>e.revision-t.revision)){let n=fe(T(a),e);if(n.status===`refetch`){t=!0,i=!0;continue}n.status===`applied`&&(a={...a,output_revision:n.snapshot.revision,retained_start_offset:n.snapshot.retainedStartOffset,retained_end_offset:n.snapshot.totalByteCount,total_persisted_bytes:n.snapshot.totalByteCount,retained_output:n.snapshot.retainedText})}return t?U.current.add(e.execution_run_id):(U.current.delete(e.execution_run_id),Ce.current.delete(e.execution_run_id)),a}),s={...e,attempts:o};K.current=e.batch.execution_run_id,V.current=s,b(s);let c=t?s.attempts.find(e=>e.execution_run_id===t):null,l=Ee.current,u=Oe.current,p=!!(l&&s.attempts.some(e=>e.execution_run_id===l)),m=Me(s.attempts,Ge.current?.batch_run_id===s.batch.execution_run_id?Ge.current:null),g=ke.current,_=!!(g&&g.batchRunId===s.batch.execution_run_id&&g.attemptRunId===t),v=!!(g&&g.previousBatchRunId===s.batch.execution_run_id&&g.previousAttemptRunId===t);if(n===`reset`)Y(m?.execution_run_id??null,`automatic`);else if(t)if(c)if(_)Y(c.execution_run_id,`manual`);else if(v&&u===`manual`)Y(p?l:m?.execution_run_id??null,p?`manual`:`automatic`);else{let e=u!==`external`||l!==c.execution_run_id;Y(c.execution_run_id,`external`),e&&d?.(s.batch.execution_run_id,c.execution_run_id)}else _||v?u===`manual`&&p?Y(l,`manual`):Y(m?.execution_run_id??null,`automatic`):(Y(t,`external`),f?.());else n===`preserve`?u===`external`&&l?p?Y(l,`external`):(Y(l,`external`),f?.()):u===`manual`&&p?Y(l,`manual`):Y(u===`automatic`&&p?l:m?.execution_run_id??null,`automatic`):u===`manual`&&p?Y(l,`manual`):Y(m?.execution_run_id??null,`automatic`);i?Ue.current(e.batch.execution_run_id):We.current=0,q.current&&!H.current&&(q.current=!1,H.current=setTimeout(()=>{H.current=null,He.current().catch(e=>B(J(e,h(`errors.load`))))},Pe))},[d,f,h,Y]),X=(0,R.useCallback)(async(t,n)=>{let r=++W.current,i=await S(e,t,n);if(r!==W.current||i.batch.execution_run_id!==t||K.current!==null&&K.current!==t){i.batch.execution_run_id!==t&&f?.();return}Je(i,t===l?u:null)},[u,l,Je,f,e]);Ae.current=X,Ue.current=(0,R.useCallback)(e=>{if(H.current)return;if(We.current>=Le){We.current=0,U.current.clear(),Ce.current.clear();return}let t=Pe*2**We.current;H.current=setTimeout(()=>{H.current=null,We.current+=1,Ae.current(e).catch(t=>{B(J(t,h(`errors.load`))),U.current.size>0&&Ue.current(e)})},t)},[h]);let Z=(0,R.useCallback)(async t=>{let i=++W.current,a=null;do{let o=await ve(e,{limit:50,cursor:a,signal:t});if(i!==W.current)return;let s=o.items.find(e=>e.check_batch?.details?.target_kind===n&&e.check_batch.details.target_bundle_id===(n===`bundle`?r:null));if(s){K.current=s.run.id,await X(s.run.id,t);return}a=o.next_cursor}while(a);!t?.aborted&&i===W.current&&(K.current=null,V.current=null,b(null),Y(null,`automatic`))},[X,e,r,n,Y]),Ye=(0,R.useCallback)(async()=>{if(s||l){let e=K.current;e&&await X(e);return}await Z()},[l,s,X,Z]);He.current=Ye;let Xe=(0,R.useCallback)(e=>{H.current||=setTimeout(()=>{H.current=null,X(e).catch(e=>B(J(e,h(`errors.load`))))},Pe)},[X,h]);(0,R.useEffect)(()=>{let n=new AbortController;return M(!0),B(null),(async()=>{if(l){if(C(null),u){let t=await ge(e,u,n.signal);if(t.run.kind!==`check_attempt`||t.details.kind!==`check_attempt`||!t.details.available||!t.details.attempt||t.details.attempt.batch_run_id!==l){f?.();return}}K.current=l,await X(l,n.signal);return}if(!s){C(null),await Z(n.signal);return}let r=await t(e,s,n.signal);if(C(r),r.sourceBatchRunId){K.current=r.sourceBatchRunId,await X(r.sourceBatchRunId,n.signal);return}K.current=null,V.current=null,b(null),Y(null,`automatic`)})().catch(e=>{le(e)||(e instanceof A&&e.status===404&&f?.(),B(J(e,h(`errors.load`))))}).finally(()=>{n.signal.aborted||(M(!1),Te.current=!1,q.current&&!H.current&&(q.current=!1,H.current=setTimeout(()=>{H.current=null,He.current().catch(e=>B(J(e,h(`errors.load`))))},Pe)))}),()=>n.abort()},[u,l,s,X,Z,f,e,h,Y]),(0,R.useEffect)(()=>{let t=y?.batch.execution_run_id;if(!t){G.current+=1,oe(null),ce(new Set),P(new Set),me(``),I(null);return}Ge.current?.batch_run_id!==t&&(oe(null),ce(new Set),P(new Set),me(``),I(null));let n=++G.current,r=new AbortController;return m(e,t,r.signal).then(e=>{n===G.current&&e.batch_run_id===t&&K.current===t&&Ke(e)}).catch(e=>{le(e)||B(J(e,h(`errors.diagnostics`)))}),()=>r.abort()},[y?.batch.execution_run_id,be,Ke,e,h]),(0,R.useEffect)(()=>{let t=t=>{if(t.project_id!==e)return;let n=K.current;if(n!==null&&t.batch_run_id!==n)return;let r=V.current;if(!r||U.current.has(t.attempt_run_id)){qe(t),r&&U.current.has(t.attempt_run_id)&&Ue.current(r.batch.execution_run_id);return}let i=r.attempts.findIndex(e=>e.execution_run_id===t.attempt_run_id);if(i<0){qe(t),Xe(r.batch.execution_run_id);return}let a=r.attempts[i],o=fe(T(a),t);if(o.status===`ignored`)return;if(o.status===`refetch`){U.current.add(t.attempt_run_id),qe(t),Ue.current(r.batch.execution_run_id);return}let s=[...r.attempts];s[i]={...a,output_revision:o.snapshot.revision,retained_start_offset:o.snapshot.retainedStartOffset,retained_end_offset:o.snapshot.totalByteCount,total_persisted_bytes:o.snapshot.totalByteCount,retained_output:o.snapshot.retainedText};let c={...r,attempts:s};V.current=c,b(c)},n=t=>{if(t.project_id&&t.project_id!==e)return;if(Te.current){q.current=!0;return}let n=V.current,r=t.execution_run_id??t.id;if(xe(e=>e+1),_e&&r===_e.execution_run_id&&_e.source_batch_run_id===K.current&&te(e,_e.execution_run_id).then(I).catch(()=>void 0),n&&(r===n.batch.execution_run_id||n.attempts.some(e=>e.execution_run_id===r))){W.current+=1,Xe(n.batch.execution_run_id);return}q.current=!0,!Te.current&&!H.current&&(q.current=!1,H.current=setTimeout(()=>{H.current=null,He.current().catch(e=>B(J(e,h(`errors.load`))))},Pe))},r=()=>{xe(e=>e+1),Ye().catch(e=>B(J(e,h(`errors.load`))))};return g.on(`check-attempt:output`,t),g.on(`execution-run:updated`,n),g.on(`lifecycle-event:created`,n),g.on(`connect`,r),()=>{g.off(`check-attempt:output`,t),g.off(`execution-run:updated`,n),g.off(`lifecycle-event:created`,n),g.off(`connect`,r)}},[_e,qe,e,Ye,Xe,g,h]),(0,R.useEffect)(()=>()=>{H.current&&clearTimeout(H.current),U.current.clear(),Ce.current.clear()},[]);let Ze=(e,t)=>{W.current+=1,K.current=e.batch.execution_run_id,Je(e,null,t)},Qe=async(e,t)=>{W.current+=1,Te.current=!0,re(e),B(null);try{let n=await t();e!==`stop`&&(ke.current=null),Ze(n,e===`stop`?`preserve`:`reset`),e!==`stop`&&d?.(n.batch.execution_run_id,void 0)}catch(t){B(J(t,h(`errors.${e}`))),t instanceof A&&t.status===409&&await Ye().catch(()=>void 0)}finally{re(null),Te.current=j,q.current&&!H.current&&(q.current=!1,H.current=setTimeout(()=>{H.current=null,He.current().catch(e=>B(J(e,h(`errors.load`))))},Pe))}},$e=y?Ne.has(y.batch.execution_status):!1,et=y?$e?`running`:y.batch.execution_status===`completed`?`finished`:y.batch.execution_status===`cancelled`||y.batch.execution_status===`interrupted`?`interrupted`:`error`:`inactive`,tt=y?.batch.execution_run_id??null,Q=ie?.batch_run_id===tt?ie:null,nt=_e?.source_batch_run_id===tt?_e:null,rt=Q?Be(Q):new Set,it=Q?Ve(Q):new Set,at=new Set([...se].filter(e=>rt.has(e))),ot=new Set([...ue].filter(e=>it.has(e))),st=[..._],ct=y?.attempts.filter(e=>e.execution_status!==`completed`).length??0,lt=async()=>{let t=[...at],n=[...ot];if(!(!Q||!tt||K.current!==tt||Q.repair.eligibility.eligible!==!0||nt?.terminal_result===null||t.length===0&&n.length===0)){ye(!0),B(null);try{let r=await ae(e,t,n,Q.repair.accepts_ticket_id?Q.repair.candidate_tickets.some(e=>e.id===F)?F:Q.repair.candidate_tickets[0]?.id||null:null);I(r.source_batch_run_id===tt?r:null)}catch(t){if(B(J(t,h(`errors.repair`))),t instanceof A&&t.status===409&&y){let t=y.batch.execution_run_id,n=++G.current;m(e,t).then(e=>{n===G.current&&e.batch_run_id===t&&K.current===t&&Ke(e)}).catch(()=>void 0)}}finally{ye(!1)}}},ut=async()=>{if(nt){ye(!0),B(null);try{I(await pe(e,nt.execution_run_id))}catch(e){B(J(e,h(`errors.repairStop`)))}finally{ye(!1)}}},dt=new Set([...Q?.attempts.filter(e=>e.diagnostics.some(e=>at.has(e.id))).map(e=>e.attempt_run_id)??[],...ot]),ft=(e,t,n)=>{ce(r=>{let i=new Set(r);if(!n)return i.delete(t),i;if(i.size>=Re||!Q||!rt.has(t))return r;let a=new Set(Q.attempts.filter(e=>e.diagnostics.some(e=>i.has(e.id))).map(e=>e.attempt_run_id)??[]);return!a.has(e)&&a.size>=ze?r:(i.add(t),i)})},pt=(e,t)=>{P(n=>{let r=new Set(n);return t?!dt.has(e)&&dt.size>=ze||!it.has(e)?n:(r.add(e),r):(r.delete(e),r)})},mt=(e,t)=>{v(n=>{let r=new Set(n);return t?r.add(e):r.delete(e),r})},ht=e=>{y&&(ne(null),ke.current={batchRunId:y.batch.execution_run_id,attemptRunId:e,previousBatchRunId:l===y.batch.execution_run_id?l:null,previousAttemptRunId:l===y.batch.execution_run_id?u:null},Y(e,`manual`),d?.(y.batch.execution_run_id,e))},gt=e=>{let t=y?.attempts.find(t=>t.definition_id===e);if(t){ht(t.execution_run_id);return}ne(e)},$=k?y?.attempts.find(e=>e.definition_id===k)??null:y?.attempts.find(e=>e.execution_run_id===D)??null,_t=$?.command_snapshot??i.find(e=>e.id===k)??null,vt=k??$?.definition_id??null,yt=_t?{required:a.includes(_t.id),preReview:o.includes(_t.id)}:null;return(0,R.useEffect)(()=>{p?.(et)},[et,p]),(0,z.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,children:[Se&&(0,z.jsx)(`p`,{role:`alert`,className:`mx-4 mt-3 rounded-xl border border-red-400/25 bg-red-500/10 px-3 py-2 text-sm text-red-200 sm:mx-6`,children:Se}),(0,z.jsxs)(`div`,{role:`toolbar`,"aria-label":h(`runActions`),className:`flex shrink-0 flex-wrap items-center justify-between gap-3 border-y border-border/70 bg-background/30 px-4 py-3 sm:px-6`,children:[(0,z.jsx)(`div`,{className:`min-w-0`,children:(0,z.jsx)(`h2`,{className:`text-sm font-semibold text-foreground`,children:h(`runActions`)})}),(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,z.jsx)(c,{type:`button`,size:`sm`,disabled:st.length===0||$e||N!==null,onClick:()=>void Qe(`run`,()=>he(e,{targetKind:n,targetBundleId:r,definitionIds:st})),children:h(N===`run`?`starting`:`runSelected`)}),y&&$e&&(0,z.jsx)(c,{type:`button`,variant:`destructive`,size:`sm`,disabled:N!==null,onClick:()=>void Qe(`stop`,()=>E(e,y.batch.execution_run_id)),children:h(N===`stop`?`stopping`:`stop`)}),y&&!$e&&(0,z.jsxs)(z.Fragment,{children:[(0,z.jsx)(c,{type:`button`,variant:`outline`,size:`xs`,disabled:N!==null,onClick:()=>void Qe(`rerun`,()=>de(e,y.batch.execution_run_id,{mode:`all`})),children:h(`rerunAll`)}),(0,z.jsx)(c,{type:`button`,variant:`outline`,size:`xs`,disabled:N!==null||ct===0,onClick:()=>void Qe(`rerun`,()=>de(e,y.batch.execution_run_id,{mode:`failed_only`})),children:h(`rerunFailed`)})]})]})]}),(0,z.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-rows-[minmax(0,auto)_minmax(0,1fr)] overflow-hidden md:grid-cols-[19rem_minmax(0,1fr)] md:grid-rows-1`,children:[(0,z.jsx)(`aside`,{className:`flex min-h-0 flex-col border-b border-border/70 md:border-r md:border-b-0`,children:(0,z.jsx)(je,{definitions:i,attempts:y?.attempts??[],requiredDefinitionIds:a,preReviewDefinitionIds:o,selectedDefinitionIds:_,selectedCheckId:vt,diagnostics:Q,selectedDiagnosticIds:at,selectedRawOutputAttemptRunIds:ot,onToggleDefinition:mt,onSelectCheck:gt})}),(0,z.jsxs)(`main`,{className:`min-h-0 overflow-y-auto p-4 sm:p-6`,children:[s&&!x&&j&&(0,z.jsx)(`p`,{role:`status`,className:`mb-4 text-sm text-muted-foreground`,children:h(`gateLoading`)}),x&&(0,z.jsx)(De,{evaluation:x}),j&&(0,z.jsx)(`p`,{role:`status`,className:`text-sm text-muted-foreground`,children:h(`loading`)}),!j&&!y&&!_t&&(0,z.jsxs)(`div`,{className:`rounded-2xl border border-dashed border-border p-6 text-center`,children:[(0,z.jsx)(`h2`,{className:`font-medium text-foreground`,children:h(`emptyTitle`)}),(0,z.jsx)(`p`,{className:`mt-1 text-sm text-muted-foreground`,children:h(`emptyDescription`)})]}),y&&(0,z.jsx)(z.Fragment,{children:(0,z.jsxs)(`div`,{className:`mb-4 flex flex-wrap items-center gap-2`,children:[(0,z.jsx)(`span`,{className:`rounded-full border border-border px-2 py-1 text-xs text-muted-foreground`,children:h(`status.${y.batch.execution_status}`)}),(0,z.jsx)(`span`,{className:`text-xs text-muted-foreground`,children:h(`summary`,{passed:y.batch.passed_count,failed:y.batch.failed_count,running:y.batch.running_count,queued:y.batch.queued_count})}),y.batch.stop_requested&&(0,z.jsx)(`span`,{className:`text-xs text-amber-200`,children:h(`stopRequested`)})]})}),(y||_t)&&(0,z.jsx)(z.Fragment,{children:(0,z.jsx)(we,{attempt:$,definition:_t,diagnostics:Q?.attempts.find(e=>e.attempt_run_id===$?.execution_run_id)??null,repair:Q?.repair??null,selectedDiagnosticIds:at,selectedRawOutputAttemptRunIds:ot,selectedAttemptRunIds:dt,selectedTicketId:F,pending:L,activeRepair:nt,policy:yt,onSelectedTicketChange:me,onToggleDiagnostic:(e,t)=>$&&ft($.execution_run_id,e,t),onToggleRawOutput:e=>$&&pt($.execution_run_id,e),onStartRepair:()=>void lt(),onStopRepair:()=>void ut()})})]})]})]})},Ue=(e,t)=>M(F(`/projects/${e}/test-sessions`),{method:`POST`,body:t,fallbackErrorMessage:`Unable to open the test runner right now.`}),We=(e,t)=>M(F(`/tickets/${e}/test-sessions${t?`?project_id=${encodeURIComponent(t)}`:``}`),{method:`POST`,fallbackErrorMessage:`Unable to open the test runner right now.`}),Ge=(e,t={})=>M(F(`/test-sessions/${e}/discovery${t.commandId?`?command_id=${encodeURIComponent(t.commandId)}`:``}`),{signal:t.signal,fallbackErrorMessage:`Unable to discover tests right now.`}),Y=(e,t)=>M(F(`/test-sessions/${e}/run`),{method:`POST`,body:t,fallbackErrorMessage:`Unable to start the selected tests right now.`}),Ke=e=>M(F(`/test-sessions/${e}/stop`),{method:`POST`,fallbackErrorMessage:`Unable to stop the test run right now.`}),qe=e=>re(F(`/test-sessions/${e}`),{method:`DELETE`,fallbackErrorMessage:`Unable to close the test runner right now.`}),Je=256*1024,X=24,Z=(e,t)=>be.t(`common:testsDialog.${e}`,t),Ye=(e,t)=>{let n=`${e}${t}`;return n.length<=Je?n:n.slice(-Je)},Xe=(e,t)=>e?e.run_id&&t.run_id&&e.run_id!==t.run_id?e.status===`running`||t.status!==`running`?e:t:e.status!==`idle`&&e.status!==`running`&&t.status===`running`?e:e.run_id===t.run_id&&e.output.length>t.output.length?{...t,output:e.output,output_truncated:e.output_truncated||t.output_truncated}:t:t,Ze=e=>e.scrollHeight-e.scrollTop-e.clientHeight<=X,Qe=e=>{e.scrollTop=e.scrollHeight},$e=(e,t=!1)=>{Qe(e);let n=0,r=0;return n=window.requestAnimationFrame(()=>{Qe(e),t&&(r=window.requestAnimationFrame(()=>{Qe(e)}))}),()=>{window.cancelAnimationFrame(n),r!==0&&window.cancelAnimationFrame(r)}},et=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`,tt=e=>{if(e==null)return null;if(e<1e3)return`${e} ms`;let t=Math.floor(e/1e3),n=Math.floor(t/3600),r=Math.floor(t%3600/60),i=t%60;return n>0?`${n}h ${r}m ${i}s`:r>0?`${r}m ${i}s`:`${(e/1e3).toFixed(e>=1e4?0:1)} s`},Q=e=>{let t=e.split(`/`);return t[t.length-1]||e},nt=e=>e.toLowerCase().trim().split(/\s+/).filter(Boolean),rt=(e,t)=>e.length===0?!0:e.every(e=>t.some(t=>t.includes(e))),it=(e,t)=>{let n=nt(t);return n.length===0?e:e.flatMap(e=>{let t=Q(e.path);if(rt(n,[t.toLowerCase(),e.path.toLowerCase()]))return[e];let r=e.cases.filter(r=>rt(n,[t.toLowerCase(),e.path.toLowerCase(),r.name.toLowerCase()]));return r.length===0?[]:[{...e,cases:r}]})},at=e=>Z(e===`passed`?`status.passed`:e===`failed`?`status.failed`:e===`running`?`status.running`:e===`error`?`status.error`:e===`stopped`?`status.stopped`:`status.idle`),ot=e=>e?.selection?e.selection.kind===`all`?Z(`selection.allTests`):e.selection.kind===`case`?e.selection.name:Q(e.selection.path):Z(`selection.noRunYet`),st=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`,ct=e=>e===`failure`?`text-rose-200`:e===`success`?`text-emerald-200`:e===`warning`?`text-amber-200`:`text-slate-200`,lt=(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,ut=`min-w-24 justify-center shadow-none transition-none disabled:opacity-100`,dt=({line:e,tone:t})=>(0,z.jsx)(`div`,{"data-tone":t,className:x(`whitespace-pre-wrap break-words`,ct(t)),children:e===``?` `:e}),ft=(0,R.memo)(({canRunGranular:e,filePath:t,isActive:n,name:r,onRunCase:i})=>(0,z.jsxs)(`button`,{type:`button`,"aria-label":Z(`caseRow.runAriaLabel`,{name:r}),title:r,className:x(`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,z.jsx)(`span`,{className:`h-2 w-2 shrink-0 rounded-full bg-sky-300/80`}),(0,z.jsx)(`span`,{className:`truncate text-xs text-foreground`,children:r})]}));ft.displayName=`TestCaseRow`;var pt=(0,R.memo)(({activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:n,canRunGranular:r,file:i,isExpanded:a,onRunCase:o,onRunFile:l,onToggleFile:u})=>{let d=e===`file`&&n===i.path,f=e===`case`&&n===i.path;return(0,z.jsx)(C,{open:a,onOpenChange:e=>{u(i.path,e)},children:(0,z.jsxs)(`div`,{className:`space-y-1`,children:[(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[(0,z.jsx)(xe,{asChild:!0,children:(0,z.jsx)(c,{type:`button`,variant:`ghost`,size:`icon-xs`,"aria-label":Z(a?`fileRow.collapseAriaLabel`:`fileRow.expandAriaLabel`,{path:i.path}),className:`mt-1 shrink-0 text-muted-foreground hover:text-foreground`,children:(0,z.jsx)(h,{className:x(`h-4 w-4 transition-transform`,a&&`rotate-180`)})})}),(0,z.jsx)(`button`,{type:`button`,"aria-label":Z(`fileRow.runAriaLabel`,{path:i.path}),className:x(`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`,(d||f)&&`border-sky-400/45 bg-sky-500/10`),disabled:!r,onClick:()=>{l(i.path)},children:(0,z.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2.5`,children:[(0,z.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,z.jsx)(s,{className:`h-3.5 w-3.5`})}),(0,z.jsxs)(`span`,{className:`flex min-w-0 flex-1 items-start justify-between gap-3`,children:[(0,z.jsxs)(`span`,{className:`min-w-0 flex-1`,children:[(0,z.jsx)(`span`,{className:`block truncate text-xs font-medium text-foreground`,children:Q(i.path)}),(0,z.jsx)(`span`,{className:`mt-0.5 block truncate text-[11px] text-muted-foreground`,children:i.path})]}),(0,z.jsx)(`span`,{className:`shrink-0 text-[11px] text-muted-foreground`,children:Z(`fileRow.testCount`,{count:i.cases.length})})]})]})})]}),(0,z.jsx)(I,{children:(0,z.jsx)(`div`,{className:`ml-4 border-l border-border/60 pl-6`,children:i.cases.length===0?(0,z.jsx)(`p`,{className:`px-2.5 py-1.5 text-xs text-muted-foreground`,children:Z(`fileRow.noNamedTests`)}):(0,z.jsx)(`div`,{className:`space-y-1`,children:i.cases.map(a=>{let s=e===`case`&&n===i.path&&t===a.name;return(0,z.jsx)(ft,{canRunGranular:r,filePath:i.path,isActive:s,name:a.name,onRunCase:o},a.id)})})})})]})})});pt.displayName=`DiscoveryFileRow`;var mt=(0,R.memo)(({activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:i,availableCommands:o,canRunGranular:s,discovery:l,expandedFiles:u,fullSuiteOnlyNotice:d,isLoading:p,selectedCommandId:m,selectedCommandName:_,sessionError:v,sessionStatus:y,shouldShowCommandSelector:b,onRunCase:S,onRunFile:C,onSelectCommand:w,onToggleFile:T})=>{let[E,D]=(0,R.useState)(``),O=(0,R.useMemo)(()=>it(l,E),[l,E]),ee=(0,R.useMemo)(()=>O.reduce((e,t)=>e+t.cases.length,0),[O]),k=nt(E).length>0;return(0,z.jsx)(`aside`,{className:`min-h-0 border-b border-border/70 px-4 py-4 lg:border-r lg:border-b-0`,children:(0,z.jsxs)(`div`,{className:`flex h-full min-h-0 flex-col gap-3`,children:[b&&(0,z.jsxs)(`div`,{className:`space-y-2`,children:[(0,z.jsx)(`p`,{className:`text-xs uppercase tracking-[0.22em] text-muted-foreground`,children:Z(`scope.label`)}),(0,z.jsxs)(f,{children:[(0,z.jsx)(oe,{asChild:!0,children:(0,z.jsxs)(c,{type:`button`,variant:`outline`,className:`w-full justify-between rounded-xl border-border/70 bg-background/60`,"aria-label":Z(`scope.selectedCommandAriaLabel`),disabled:o.length===0||y===`running`,children:[(0,z.jsx)(`span`,{className:`truncate`,children:_??Z(`scope.selectTestScope`)}),(0,z.jsx)(h,{className:`h-4 w-4 text-muted-foreground`})]})}),(0,z.jsx)(se,{align:`start`,className:`w-72`,children:o.map(e=>(0,z.jsx)(n,{className:x(m===e.id&&`bg-accent text-accent-foreground`),onSelect:()=>{w(e.id)},children:(0,z.jsx)(`span`,{className:`truncate`,children:e.name})},e.id))})]})]}),d&&(0,z.jsx)(`div`,{className:`rounded-2xl border border-border/70 bg-background/30 px-4 py-3 text-sm text-muted-foreground`,children:d}),(l.length>0||E.length>0)&&(0,z.jsxs)(`div`,{className:`relative mt-1 shrink-0`,children:[(0,z.jsx)(r,{type:`search`,value:E,onChange:e=>{D(e.target.value)},placeholder:Z(`filter.placeholder`),"aria-label":Z(`filter.ariaLabel`),className:`pr-10`}),E.length>0&&(0,z.jsx)(c,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":Z(`filter.clearAriaLabel`),className:`absolute right-1 top-1/2 -translate-y-1/2 text-muted-foreground hover:text-foreground`,onClick:()=>{D(``)},children:(0,z.jsx)(g,{className:`size-4`})})]}),!o.length&&(0,z.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-4 text-sm text-muted-foreground`,children:Z(`discovery.noCommands`)}),v&&(0,z.jsx)(`div`,{className:`rounded-2xl border border-rose-500/30 bg-rose-500/10 px-4 py-3 text-sm text-rose-200`,children:v}),(0,z.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,z.jsxs)(`div`,{className:`shrink-0 flex items-start justify-between gap-3`,children:[(0,z.jsx)(`div`,{className:`min-w-0`,children:(0,z.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[Z(`discovery.fileCount`,{count:O.length}),`, `,Z(`discovery.caseCount`,{count:ee})]})}),p&&(0,z.jsx)(a,{className:`h-4 w-4 animate-spin text-muted-foreground`})]}),(0,z.jsx)(`div`,{className:`min-h-0 flex-1 space-y-2 overflow-y-auto pr-1`,children:l.length===0&&!p?(0,z.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-5 text-sm text-muted-foreground`,children:Z(`discovery.noFilesDetected`)}):O.length===0?(0,z.jsx)(`div`,{className:`rounded-2xl border border-dashed border-border/70 bg-background/20 px-4 py-5 text-sm text-muted-foreground`,children:Z(`discovery.noFilterMatches`)}):O.map(n=>(0,z.jsx)(pt,{activeSelectionKind:e,activeSelectionName:t,activeSelectionPath:i,canRunGranular:s,file:n,isExpanded:k||(u[n.path]??!1),onRunCase:S,onRunFile:C,onToggleFile:T},n.path))})]})]})})});mt.displayName=`DiscoveryPane`;var ht=(0,R.memo)(({durationMs:e,output:t,outputTruncated:n,selectionLabel:r,status:i,summaryCounts:a,viewportRef:o,onScroll:s})=>{let c=(0,R.useMemo)(()=>t?ie(t).replace(/\r\n/g,`
|
|
2
|
+
`).replace(/\r/g,`
|
|
3
|
+
`).split(`
|
|
4
|
+
`).map(e=>({line:e,tone:st(e)})):[],[t]);return(0,z.jsx)(`section`,{className:`min-h-0 px-4 py-4`,children:(0,z.jsxs)(`div`,{className:`flex h-full flex-col gap-3`,children:[(0,z.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,z.jsx)(`span`,{className:`font-medium text-foreground`,children:r}),i&&(0,z.jsx)(D,{variant:`outline`,className:x(`px-3 py-1 text-xs uppercase tracking-[0.2em]`,et(i)),children:at(i)}),a&&(0,z.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2 text-xs font-medium uppercase tracking-[0.18em]`,children:[(0,z.jsxs)(`span`,{className:`text-rose-200`,children:[a.failed.count,` `,a.failed.label]}),(0,z.jsxs)(`span`,{className:`text-emerald-200`,children:[a.passed.count,` `,a.passed.label]})]}),e!=null&&(0,z.jsx)(`span`,{className:`text-muted-foreground`,children:tt(e)}),n&&(0,z.jsx)(D,{variant:`outline`,className:`border-amber-400/30 bg-amber-500/10 text-amber-200`,children:Z(`output.trimmed`)})]}),(0,z.jsx)(`div`,{className:`min-h-0 flex-1 overflow-hidden rounded-2xl border border-border/70 bg-[#0d1017]`,children:(0,z.jsx)(`div`,{ref:o,"aria-label":Z(`output.ariaLabel`),className:`h-full overflow-auto px-4 py-4`,onScroll:s,children:(0,z.jsx)(`div`,{className:`font-mono text-xs leading-5`,children:c.length>0?c.map((e,t)=>(0,z.jsx)(dt,{line:e.line,tone:e.tone},`${t}:${e.line}`)):(0,z.jsx)(`div`,{className:`text-slate-200`,children:Z(`output.empty`)})})})})]})})});ht.displayName=`OutputPane`;var gt=(0,R.forwardRef)(({testCommands:e,onStatusChange:t,onTargetLabelChange:n,onClose:r,...i},a)=>{let s=i.scope,u=i.projectId,f=i.scope===`ticket`?i.ticketId:null,m=i.scope===`project`?i.targetKind:null,h=i.scope===`project`?i.targetBundleId:null,[g,x]=(0,R.useState)(e),[S,C]=(0,R.useState)(null),[w,T]=(0,R.useState)([]),[E,D]=(0,R.useState)(``),[O,k]=(0,R.useState)({}),[te,ne]=(0,R.useState)(!0),[j,M]=(0,R.useState)(!1),[N,re]=(0,R.useState)(!1),[ie,ae]=(0,R.useState)(null),[oe,se]=(0,R.useState)(!1),[ce,le]=(0,R.useState)(!1),de=(0,R.useRef)(null),fe=(0,R.useRef)(!1),pe=(0,R.useRef)(null),P=(0,R.useRef)(!0),F=(0,R.useRef)(null),he=(0,R.useRef)(null),ge=S?.selection?.kind??null,_e=S?.selection?.kind===`all`?null:S?.selection?.path??null,ve=S?.selection?.kind===`case`?S.selection.name:null,I=S?.id??null,L=S?.status??null,be=(0,R.useMemo)(()=>g.find(e=>e.id===E)??null,[g,E]),xe=(0,R.useMemo)(()=>{if(S?.summary?.failed_count==null&&S?.summary?.passed_count==null&&S?.summary?.failed_file_count==null&&S?.summary?.passed_file_count==null)return null;let e=S?.summary?.failed_count==null&&S?.summary?.passed_count==null;return{failed:L===`failed`&&S?.summary?.failed_count==null&&S?.summary?.failed_file_count!=null||e?{count:S?.summary?.failed_file_count??0,label:Z(`summaryCounts.filesFailed`)}:{count:S?.summary?.failed_count??0,label:Z(`summaryCounts.failed`)},passed:e?{count:S?.summary?.passed_file_count??0,label:Z(`summaryCounts.filesPassed`)}:{count:S?.summary?.passed_count??S?.summary?.passed_file_count??0,label:Z(`summaryCounts.passed`)}}},[S?.summary?.failed_count,S?.summary?.passed_count,S?.summary?.failed_file_count,S?.summary?.passed_file_count,L]),Se=be?.runner===`unknown`?Z(`scope.fullSuiteOnlyNotice`):null,B=!!(be&&S?.status!==`running`&&!j&&!N),V=B,H=B&&ce,U=g.length>1,{runs:Ce}=ue(u),W=S?.run_id?Ce.find(e=>e.id===S.run_id)??null:null;(0,R.useEffect)(()=>{E||g.length===0||D(g[0]?.id??``)},[g,E]),(0,R.useEffect)(()=>{e.length>0&&x(t=>lt(t,e)?t:e)},[e]),(0,R.useEffect)(()=>{if(g.length>0||!u)return;let e=new AbortController;return b(e.signal).then(e=>{let t=e.find(e=>e.id===u);t&&x(e=>{let n=ee(t);return lt(e,n)?e:n})}).catch(()=>{}),()=>{e.abort()}},[g.length,u]),(0,R.useEffect)(()=>{let e=e=>{!e||e.id!==de.current||C(t=>Xe(t,e))},t=e=>{!e||e.session_id!==de.current||C(t=>!t||t.id!==e.session_id||e.run_id&&t.run_id&&e.run_id!==t.run_id?t:{...t,output:Ye(t.output,e.chunk),output_truncated:e.output_truncated})};return ye.on(`test-session:updated`,e),ye.on(`test-session:output`,t),()=>{ye.off(`test-session:updated`,e),ye.off(`test-session:output`,t)}},[]),(0,R.useEffect)(()=>{let e=pe.current;if(!e){F.current=S?.output??null,he.current=S?.status??null;return}let t=F.current!==(S?.output??null),n=he.current!==`running`&&S?.status===`running`,r=he.current===`running`&&S?.status!==`running`;if(n&&(P.current=!0),n||t&&S?.status===`running`&&P.current||r&&P.current){let t=$e(e,r);return F.current=S?.output??null,he.current=S?.status??null,t}F.current=S?.output??null,he.current=S?.status??null},[S?.output,S?.status]),(0,R.useEffect)(()=>{let e=!1;return(async()=>{try{let t;if(s===`project`){if(!u)return;t=await Ue(u,{target_kind:m??`repo_root`,target_bundle_id:h??null})}else t=await We(f??``,u);if(e){qe(t.id).catch(()=>{});return}de.current=t.id,C(t)}catch(t){e||ae(t instanceof A?t.message:Z(`messages.loadRunnerError`))}finally{!e&&de.current==null&&ne(!1)}})(),()=>{e=!0}},[u,s,h,m,f]),(0,R.useEffect)(()=>{W&&C(e=>{if(!e||e.run_id!==W.id)return e;let t=W.status===`completed`?`passed`:W.status===`failed`?`failed`:W.status===`cancelled`||W.status===`interrupted`?`stopped`:`running`;return e.status===t&&e.error===(W.failure?.message??e.error)?e:{...e,status:t,error:W.failure?.message??e.error,started_at:W.started_at??e.started_at,completed_at:W.completed_at??e.completed_at}})},[W]),(0,R.useEffect)(()=>{if(!S?.id){le(!1);return}if(g.length>0&&!E){le(!1);return}let e=new AbortController,t=!1;return ne(!0),le(!1),Ge(S.id,{commandId:E||null,signal:e.signal}).then(e=>{t||(T(e.files),le(e.supports_granular_selection))}).catch(n=>{t||e.signal.aborted||ae(n instanceof A?n.message:Z(`messages.discoverError`))}).finally(()=>{t||ne(!1)}),()=>{t=!0,e.abort()}},[g.length,E,S?.id]),(0,R.useEffect)(()=>()=>{let e=de.current;!e||fe.current||(fe.current=!0,qe(e).catch(()=>{}))},[]);let G=(0,R.useCallback)(async e=>{if(!(!I||L===`running`||!be||j||N)){ae(null),M(!0);try{let t=await Y(I,{command_id:be.id,selection:e});C(e=>Xe(e,t))}catch(e){ae(e instanceof A?e.message:Z(`messages.startError`))}finally{M(!1)}}},[j,N,be,I,L]),K=(0,R.useCallback)(async()=>{if(!(!I||L!==`running`||N)){ae(null),re(!0);try{let e=await Ke(I);C(t=>Xe(t,e))}catch(e){ae(e instanceof A?e.message:Z(`messages.stopError`))}finally{re(!1)}}},[N,I,L]),we=(0,R.useCallback)(()=>{let e=de.current;if(!e||fe.current){r();return}fe.current=!0,r(),qe(e).catch(()=>{})},[r]),q=(0,R.useCallback)(()=>{if(L===`running`){se(!0);return}we()},[we,L]);(0,R.useImperativeHandle)(a,()=>({requestClose:q}),[q]),(0,R.useEffect)(()=>{t?.(L===`running`?`running`:L===`passed`?`finished`:L===`failed`||L===`error`?`error`:L===`stopped`?`interrupted`:`inactive`)},[t,L]),(0,R.useEffect)(()=>{S?.target_label&&n?.(S.target_label)},[n,S?.target_label]);let Te=(0,R.useCallback)(()=>{let e=pe.current;e&&(P.current=Ze(e))},[]),Ee=(0,R.useCallback)(e=>{D(e)},[]),De=(0,R.useCallback)((e,t)=>{k(n=>(n[e]??!1)===t?n:{...n,[e]:t})},[]),Oe=(0,R.useCallback)(e=>{G({kind:`file`,path:e})},[G]),ke=(0,R.useCallback)((e,t)=>{G({kind:`case`,path:e,name:t})},[G]);return(0,z.jsxs)(z.Fragment,{children:[(0,z.jsxs)(`div`,{className:`flex min-h-0 flex-1 flex-col overflow-hidden`,"data-testid":`tests-panel-layout`,children:[(0,z.jsxs)(`div`,{className:`grid min-h-0 flex-1 grid-rows-[minmax(0,1fr)_minmax(0,1fr)] gap-0 lg:grid-cols-[22rem_minmax(0,1fr)] lg:grid-rows-1`,children:[(0,z.jsx)(mt,{activeSelectionKind:ge,activeSelectionName:ve,activeSelectionPath:_e,availableCommands:g,canRunGranular:H,discovery:w,expandedFiles:O,fullSuiteOnlyNotice:Se,isLoading:te,selectedCommandId:E,selectedCommandName:be?.name??null,sessionError:ie,sessionStatus:L,shouldShowCommandSelector:U,onRunCase:ke,onRunFile:Oe,onSelectCommand:Ee,onToggleFile:De}),(0,z.jsx)(ht,{durationMs:S?.duration_ms??null,output:S?.output??``,outputTruncated:S?.output_truncated??!1,selectionLabel:ot(S),status:L,summaryCounts:xe,viewportRef:pe,onScroll:Te})]}),(0,z.jsx)(o,{className:`shrink-0 border-t border-border/70 px-6 py-4 sm:flex-row sm:items-center sm:justify-end`,children:(0,z.jsx)(`div`,{className:`flex items-center justify-end gap-2`,children:S?.status===`running`?(0,z.jsxs)(c,{type:`button`,variant:`destructive`,className:ut,onClick:()=>{K()},disabled:N,children:[(0,z.jsx)(d,{className:`h-4 w-4`}),(0,z.jsx)(`span`,{children:Z(`actions.stop`)})]}):(0,z.jsxs)(c,{type:`button`,variant:`success`,className:ut,disabled:!V,onClick:()=>{G({kind:`all`})},children:[(0,z.jsx)(p,{className:`h-4 w-4`}),(0,z.jsx)(`span`,{children:Z(`actions.run`)})]})})})]}),(0,z.jsx)(v,{open:oe,onOpenChange:se,children:(0,z.jsxs)(_,{showCloseButton:!1,overlayClassName:`z-[60] bg-black/60`,className:`z-[60] max-w-md rounded-2xl border border-border bg-card p-6 shadow-2xl`,children:[(0,z.jsxs)(l,{children:[(0,z.jsx)(me,{className:`text-sm font-semibold uppercase tracking-widest text-muted-foreground`,children:Z(`closeConfirmation.title`)}),(0,z.jsx)(y,{className:`text-sm text-foreground whitespace-pre-line`,children:Z(`closeConfirmation.description`)})]}),(0,z.jsxs)(o,{className:`sm:flex-row sm:justify-end`,children:[(0,z.jsx)(c,{type:`button`,variant:`ghost`,onClick:()=>se(!1),children:Z(`closeConfirmation.keepRunning`)}),(0,z.jsx)(c,{type:`button`,variant:`destructive`,onClick:()=>{se(!1),we()},children:Z(`closeConfirmation.stopAndClose`)})]})]})})]})});gt.displayName=`TestsPanel`;var $=`archon.verification-tab`,_t=()=>{try{let e=window.localStorage.getItem($);return e===`checks`||e===`tests`?e:null}catch{return null}},vt=e=>{try{window.localStorage.setItem($,e)}catch{}},yt=({targetLabel:e,definitions:t,requiredDefinitionIds:n=[],preReviewDefinitionIds:r=[],checksTarget:a,testsTarget:o,onClose:s,onOpenActivity:l,requestedInitialTab:d,directBatchRunId:f,directAttemptRunId:p,onCheckSelectionChange:m,onUnavailable:h})=>{let{t:b}=w(`common`,{keyPrefix:`verificationDialog`}),x=ne(t),S=a!==null&&(t.length>0||!!a.gateEvaluationId||!!f),C=o!==null&&x.length>0,[T,E]=(0,R.useState)(()=>{if(d===`checks`&&S||d===`tests`&&C)return d;let e=_t();return e===`checks`&&S||e===`tests`&&C?e:S?`checks`:`tests`}),[D,O]=(0,R.useState)(`inactive`),[ee,k]=(0,R.useState)(`inactive`),te=(0,R.useRef)(null),A=(0,R.useRef)(null);(0,R.useEffect)(()=>{(T===`checks`&&!S||T===`tests`&&!C)&&E(S?`checks`:`tests`)},[T,S,C]);let M=e=>{if(A.current=e??null,o){let e=te.current;if(e){e.requestClose();return}}(e??s)()},re=()=>{let e=A.current??s;A.current=null,e()};return(0,z.jsx)(v,{open:!0,onOpenChange:e=>{e||M()},children:(0,z.jsxs)(_,{showCloseButton:!1,className:`flex h-[calc(100vh-1rem)] max-h-[58rem] w-full max-w-[calc(100%-1rem)] flex-col gap-0 overflow-hidden rounded-3xl p-0 sm:h-[calc(100vh-2rem)] sm:max-w-7xl`,onInteractOutside:e=>e.preventDefault(),onEscapeKeyDown:e=>e.stopPropagation(),children:[(0,z.jsx)(me,{className:`sr-only`,children:b(`title`)}),(0,z.jsx)(y,{className:`sr-only`,children:b(`description`)}),(0,z.jsxs)(`header`,{className:`flex shrink-0 items-start justify-between gap-4 border-b border-border/70 px-4 py-4 sm:px-6`,children:[(0,z.jsxs)(`div`,{className:`flex min-w-0 gap-3`,children:[(0,z.jsx)(`div`,{className:`flex size-10 shrink-0 items-center justify-center rounded-2xl border border-border bg-background/60 text-sky-200`,children:(0,z.jsx)(u,{className:`size-5`})}),(0,z.jsxs)(`div`,{className:`min-w-0`,children:[(0,z.jsx)(`h1`,{className:`text-xl font-semibold text-foreground`,children:b(`title`)}),(0,z.jsx)(`p`,{className:`truncate text-sm text-muted-foreground`,children:e})]})]}),(0,z.jsxs)(`div`,{className:`flex items-center gap-2`,children:[l&&(0,z.jsx)(c,{type:`button`,variant:`outline`,size:`sm`,onClick:()=>M(l),children:b(`openActivity`)}),(0,z.jsx)(c,{type:`button`,variant:`ghost`,size:`icon-sm`,"aria-label":b(`close`),onClick:()=>M(),children:(0,z.jsx)(g,{className:`size-4`})})]})]}),(0,z.jsxs)(P,{value:T,onValueChange:e=>{e!==`checks`&&e!==`tests`||(E(e),vt(e))},className:`flex min-h-0 flex-1 flex-col`,children:[(0,z.jsxs)(`div`,{className:`shrink-0 border-b border-border/70 px-4 py-3 sm:px-6`,children:[(0,z.jsxs)(N,{"aria-label":b(`tabsAriaLabel`),children:[S&&(0,z.jsxs)(j,{value:`checks`,className:`gap-2`,children:[(0,z.jsx)(u,{className:`size-4`}),(0,z.jsx)(`span`,{children:b(`tabs.checks.label`)}),(0,z.jsx)(`span`,{className:`inline-flex shrink-0`,role:`status`,"aria-label":b(`status.checks.${D}`),children:(0,z.jsx)(i,{state:D})})]}),C&&(0,z.jsxs)(j,{value:`tests`,className:`gap-2`,children:[(0,z.jsx)(_e,{className:`size-4`}),(0,z.jsx)(`span`,{children:b(`tabs.tests.label`)}),(0,z.jsx)(`span`,{className:`inline-flex shrink-0`,role:`status`,"aria-label":b(`status.tests.${ee}`),children:(0,z.jsx)(i,{state:ee})})]})]}),(0,z.jsx)(`p`,{className:`mt-2 text-sm text-muted-foreground`,children:b(`tabs.${T}.description`)})]}),S&&a&&(0,z.jsx)(ce,{value:`checks`,forceMount:!0,className:`mt-0 flex min-h-0 flex-1 flex-col overflow-hidden data-[state=inactive]:hidden`,children:(0,z.jsx)(He,{...a,definitions:t,requiredDefinitionIds:n,preReviewDefinitionIds:r,directBatchRunId:f,directAttemptRunId:p,onSelectionChange:T===`checks`?m:void 0,onUnavailable:h,onStatusChange:O})}),o&&x.length>0&&(0,z.jsx)(ce,{value:`tests`,forceMount:!0,className:`mt-0 flex min-h-0 flex-1 flex-col overflow-hidden data-[state=inactive]:hidden`,children:(0,z.jsx)(gt,{ref:te,...o,testCommands:x,onStatusChange:k,onClose:re})})]})]})})};export{yt as VerificationDialog};
|