@capagents/forgeqe 2.4.6 → 2.4.7

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (39) hide show
  1. package/dist/docs-site/docs/search.js +1 -1
  2. package/dist/docs-site/docs/web-app/index.html +9 -5
  3. package/dist/forgeqe.js +829 -829
  4. package/dist/web/assets/ApiTests-D5YLst-t.js +2 -0
  5. package/dist/web/assets/{Chat-DU2a1lg2.js → Chat-DUZawyA0.js} +3 -3
  6. package/dist/web/assets/{Data-BMmaUggv.js → Data-BOu8BrmB.js} +4 -4
  7. package/dist/web/assets/{Features-Ciy-CcIJ.js → Features-BCBzUoB7.js} +1 -1
  8. package/dist/web/assets/Jobs-C-Tqj504.js +3 -0
  9. package/dist/web/assets/Quality-CzCArgrj.js +1 -0
  10. package/dist/web/assets/Record-CcHMCfs6.js +1 -0
  11. package/dist/web/assets/{Regression-DpRx7yLr.js → Regression-CgiNh2hj.js} +2 -2
  12. package/dist/web/assets/{Reports-BE4Jg3Pa.js → Reports-CXRY0udx.js} +2 -2
  13. package/dist/web/assets/Response-VUbDhVeF.js +8 -0
  14. package/dist/web/assets/Runs-kghxBY8X.js +2 -0
  15. package/dist/web/assets/capgemini-BO8ajcbd.svg +21 -0
  16. package/dist/web/assets/{circle-dashed-CEZcCi0T.js → circle-dashed-CQKCycSk.js} +1 -1
  17. package/dist/web/assets/{external-link-NCKfigiH.js → external-link-B45wnQ3R.js} +1 -1
  18. package/dist/web/assets/{file-chart-column-increasing-tV7y_ABu.js → file-chart-column-increasing-9rCBQxTk.js} +1 -1
  19. package/dist/web/assets/frame-CHQgOaj6.js +3 -0
  20. package/dist/web/assets/index-CwX6YH3i.css +2 -0
  21. package/dist/web/assets/index-Hd8gmpz5.js +26 -0
  22. package/dist/web/assets/{markdown-BmsRBxB-.js → markdown-BPBR6Fva.js} +8 -8
  23. package/dist/web/assets/{sticky-note-CinvvKBc.js → sticky-note-D_lJfPYH.js} +1 -1
  24. package/dist/web/assets/{terminal-EkGTrfG9.js → terminal-BZSHVR9y.js} +1 -1
  25. package/dist/web/assets/{trending-up-BLA071mC.js → trending-up-Bypj2D7Z.js} +1 -1
  26. package/dist/web/index.html +3 -3
  27. package/docs/WEB_APP.md +9 -5
  28. package/docs/walkthrough/hotfix-narration.md +297 -443
  29. package/forgeqe.example.yaml +1 -0
  30. package/package.json +1 -1
  31. package/dist/web/assets/ApiTests-CNUbGOAY.js +0 -2
  32. package/dist/web/assets/Jobs-D6siJpbm.js +0 -3
  33. package/dist/web/assets/Quality-BrEGVxJH.js +0 -1
  34. package/dist/web/assets/Record-DrlDedsV.js +0 -1
  35. package/dist/web/assets/Response-pcvzCf4S.js +0 -8
  36. package/dist/web/assets/Runs-DemSYbtq.js +0 -2
  37. package/dist/web/assets/frame-Dq1wC8eF.js +0 -3
  38. package/dist/web/assets/index-C_8DS1Wt.js +0 -26
  39. package/dist/web/assets/index-E1pAbXe5.css +0 -2
@@ -1,2 +1,2 @@
1
- import{Et as e,Ft as t,Hn as n,Ht as r,K as i,Tt as a,V as o,W as s,at as c,et as l,hn as u,kn as d,nt as f,ot as p,pt as m,r as h,rt as g,st as _,t as v,tt as y,x as b,zn as x}from"./frame-Dq1wC8eF.js";import{t as S}from"./external-link-NCKfigiH.js";import{t as C}from"./sticky-note-CinvvKBc.js";import{b as w,s as T}from"./index-C_8DS1Wt.js";var E={name:`bandage`,size:24,node:[[`path`,{d:`M10 10.01h.01`,key:`1e9xi7`}],[`path`,{d:`M10 14.01h.01`,key:`ac23bv`}],[`path`,{d:`M14 10.01h.01`,key:`2wfrvf`}],[`path`,{d:`M14 14.01h.01`,key:`8tw8yn`}],[`path`,{d:`M18 6v12`,key:`1bcixs`}],[`path`,{d:`M6 6v12`,key:`vkc79e`}],[`rect`,{x:`2`,y:`6`,width:`20`,height:`12`,rx:`2`,key:`1wpnh2`}]]};E.node;var D=u(E),O={name:`git-commit-horizontal`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]],aliases:[`git-commit`]};O.node;var k=u(O),A={name:`hammer`,size:24,node:[[`path`,{d:`m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9`,key:`1hayfq`}],[`path`,{d:`m18 15 4-4`,key:`16gjal`}],[`path`,{d:`m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5`,key:`15ts47`}]]};A.node;var j=u(A),M=n(x(),1),N=c(),P={linked:{label:`Linked test case`,tone:`pass`,help:`It automates a test case that tests a changed work item`},changed:{label:`Test code changed`,tone:`running`,help:`The change is in test code it uses`},covers:{label:`Matches a change`,tone:`neutral`,help:`The change's words name what it does`},risk:{label:`Risk area`,tone:`warn`,help:`The release touches an area with defects or failures before`},smoke:{label:`Smoke`,tone:`neutral`,help:`Tagged smoke: in every pack`}},F={heal:{label:`Heal`,tone:`warn`,does:`An element it uses is gone: the healing agent re-runs the flow and updates the test.`},check:{label:`AI re-run decides`,tone:`warn`,does:`The healing agent re-runs the flow: it heals the test when the flow works, and reports an app bug when it fails at the same step.`},flaky:{label:`Flaky`,tone:`neutral`,does:`Passed when run again: quarantine it, or fix the cause it flakes on. Not healed.`},environment:{label:`Environment`,tone:`neutral`,does:`Network, a server error, sign-in: run again once the environment works. No heal, no bug.`},test_code:{label:`Test code broken`,tone:`fail`,does:`A missing module, a compile error, a missing fixture: fix the test's code.`}},I={work_item:w,pr:t,commit:k,note:C},L=e=>new Date(e).toLocaleString([],{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),R=e=>e?e.status===`passed`?`pass`:e.status===`failed`?`fail`:`warn`:`neutral`,z=e=>e<60?`${Math.round(e)}s`:`${Math.floor(e/60)}m ${Math.round(e%60)}s`,B=e=>e&&/^https?:\/\//i.test(e)?e:void 0;function V({job:e,onStop:t}){let n=(0,M.useRef)(null),[,r]=(0,M.useState)(0);(0,M.useEffect)(()=>{if(!e.running)return;let t=setInterval(()=>r(e=>e+1),1e3);return()=>clearInterval(t)},[e.running]),(0,M.useEffect)(()=>{n.current&&(n.current.scrollTop=n.current.scrollHeight)},[e.lines.length]);let i=e.running?e.kind===`build`?`Building the pack`:e.kind===`run`?`Running ${e.pack}`:`Healing ${e.pack}'s failures`:e.kind===`build`?`Built ${e.pack||`the pack`}`:e.kind===`run`?`Ran ${e.pack}`:`Healed ${e.pack}'s failures`,a=Math.round(((e.endedAt?Date.parse(e.endedAt):Date.now())-Date.parse(e.startedAt))/1e3);return(0,N.jsxs)(`section`,{"aria-label":i,className:`flex flex-col gap-2 rounded-[14px] border border-line-soft p-4`,children:[(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,N.jsx)(`span`,{className:`flex-1 font-medium`,children:i}),(0,N.jsx)(T,{orb:e.kind===`build`?`handing`:e.kind===`heal`?`retrying`:`working`,tone:e.running?`running`:e.exitCode===0?`pass`:e.kind===`run`&&e.exitCode===1?`warn`:`fail`,children:e.running?`Working`:e.exitCode===0?`Done`:e.kind===`run`&&e.exitCode===1?`Tests failed`:`Did not finish`}),(0,N.jsx)(`span`,{className:`text-[13px] text-muted tabular-nums`,children:z(a)}),e.running&&(0,N.jsxs)(g,{onClick:t,className:`border-fail text-fail hover:bg-fail-soft`,children:[(0,N.jsx)(m,{size:14,fill:`currentColor`,"aria-hidden":`true`}),`Stop`]})]}),(0,N.jsx)(`code`,{className:`font-mono text-[12px] text-muted [overflow-wrap:anywhere]`,children:e.command}),(0,N.jsxs)(`details`,{open:e.running,children:[(0,N.jsxs)(`summary`,{className:`cursor-pointer text-sm text-muted`,children:[`Output (`,e.lines.length,` lines)`]}),(0,N.jsx)(`pre`,{ref:n,className:`mt-2 max-h-[300px] overflow-auto rounded-[10px] bg-surface-muted p-3 font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-ink-2`,children:e.lines.join(`
2
- `)||`Starting…`})]})]})}function H({title:e,aside:t,children:n}){return(0,N.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,N.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-2`,children:[(0,N.jsx)(`h3`,{className:`m-0 flex-1 text-base font-semibold`,children:e}),t]}),n]})}function U(e){let[t,n]=e.slice(-2).length===2?e.slice(-2):[void 0,e.at(-1)];return!n||!t?{fresh:[],fixed:[]}:{fresh:n.failed.filter(e=>!t.failed.includes(e)),fixed:t.failed.filter(e=>!n.failed.includes(e))}}function W({name:e,busy:t,act:n,version:i}){let[o,s]=(0,M.useState)(null),[c,l]=(0,M.useState)(``),[u,f]=(0,M.useState)(`all`),[m,h]=(0,M.useState)(null),[_,v]=(0,M.useState)(new Set);if((0,M.useEffect)(()=>{let t=!1;return d.detail(e).then(e=>!t&&(s(e),l(``)),e=>!t&&l(e.message)),()=>{t=!0}},[e,i]),(0,M.useEffect)(()=>{f(`all`),h(null),v(new Set)},[e]),c)return(0,N.jsx)(`p`,{className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:c});if(!o)return(0,N.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Loading…`});let y=o.runs.at(-1),{fresh:x,fixed:w}=U(o.runs),E=o.tests.filter(e=>u===`all`||e.reasons.some(e=>e.kind===u)),O=(o.triage?.items??[]).filter(e=>e.route===`heal`||e.route===`check`),k=Object.keys(F).filter(e=>o.triage?.items.some(t=>t.route===e)),A=Object.keys(P).filter(e=>o.tests.some(t=>t.reasons.some(t=>t.kind===e)));return(0,N.jsxs)(`section`,{"aria-labelledby":`pack-h`,className:`flex min-w-0 flex-1 flex-col gap-6`,children:[(0,N.jsxs)(`div`,{className:`flex flex-wrap items-start gap-3`,children:[(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_260px] flex-col gap-1`,children:[(0,N.jsx)(`h2`,{id:`pack-h`,className:`m-0 text-[22px] font-semibold tracking-[-0.01em] [overflow-wrap:anywhere]`,children:o.name}),(0,N.jsxs)(`span`,{className:`text-sm text-muted`,children:[`Built `,L(o.createdAt)]}),o.scope.length>0&&(0,N.jsx)(`span`,{className:`flex flex-wrap gap-1.5 pt-1`,children:o.scope.map(e=>(0,N.jsx)(`span`,{className:`rounded-full bg-surface-strong px-2.5 py-0.5 text-[12px] text-ink-2`,children:e},e))})]}),m?(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 rounded-[12px] bg-accent-soft px-3 py-2`,children:[(0,N.jsxs)(`span`,{className:`text-sm`,children:[`Run `,o.tests.length,` test`,o.tests.length===1?``:`s`,` `,m===`local`?`on this machine`:`on TestMu AI`,`?`]}),(0,N.jsx)(g,{variant:`primary`,disabled:t,onClick:()=>{h(null),n(()=>d.run(o.name,m))},children:`Run`}),(0,N.jsx)(g,{onClick:()=>h(null),children:`Don't run`})]}):(0,N.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,N.jsxs)(g,{variant:`primary`,disabled:t||!o.tests.length,onClick:()=>h(`local`),children:[(0,N.jsx)(a,{size:16,"aria-hidden":`true`}),`Run here`]}),(0,N.jsx)(g,{disabled:t||!o.tests.length,onClick:()=>h(`testmu`),children:`Run on TestMu AI`})]})]}),(0,N.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,N.jsx)(b,{label:`Tests`,value:String(o.tests.length),note:A.map(e=>`${o.tests.filter(t=>t.reasons.some(t=>t.kind===e)).length} ${P[e].label.toLowerCase()}`).join(` · `)}),(0,N.jsx)(b,{label:`Not covered`,value:String(o.uncovered.length),note:`changes no test is in for`}),(0,N.jsx)(b,{label:`Risk areas`,value:String(o.risk.length)}),(0,N.jsx)(b,{label:`Last run`,value:y?y.status===`passed`?`Passed`:`${y.counts.failed} failed`:`–`,note:y?`${L(y.at)} · ${y.on===`testmu`?`TestMu AI`:y.on===`pipeline`?`pipeline`:`this machine`}`:`Not run yet`})]}),o.triage&&(0,N.jsxs)(H,{title:`Triage of the last run`,aside:(0,N.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[o.triage.items.length,` failed or flaky`]}),children:[o.triage.environmentDown&&(0,N.jsx)(`p`,{className:`m-0 rounded-[12px] bg-warn-soft px-3 py-2 text-sm text-warn`,children:`Most failures were the environment: run the pack again before healing anything.`}),k.map(e=>(0,N.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-[12px] border border-line-soft px-4 py-3`,children:[(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,N.jsx)(T,{tone:F[e].tone,children:F[e].label}),(0,N.jsx)(`span`,{className:`text-[13px] text-muted`,children:F[e].does})]}),(0,N.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:o.triage.items.filter(t=>t.route===e).map(t=>(0,N.jsxs)(`li`,{className:`flex items-start gap-3 border-t border-line-soft py-2 text-sm first:border-t-0`,children:[(e===`heal`||e===`check`)&&(0,N.jsx)(`input`,{type:`checkbox`,"aria-label":`Heal ${t.name}`,checked:_.has(t.name),onChange:e=>{let n=new Set(_);e.target.checked?n.add(t.name):n.delete(t.name),v(n)},className:`mt-1 size-5 accent-accent`}),(0,N.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,N.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:t.name}),(0,N.jsxs)(`span`,{className:`text-[13px] text-muted [overflow-wrap:anywhere]`,children:[t.why,` · `,t.confidence,` confidence`,t.file?` · ${t.file}`:``,t.history?` · ${t.history}`:``]})]})]},t.name))})]},e)),O.length>0&&(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,N.jsxs)(g,{disabled:t||!_.size,onClick:()=>n(()=>d.heal(o.name,[..._])),children:[(0,N.jsx)(D,{size:16,"aria-hidden":`true`}),`Heal `,_.size||``,` selected`]}),(0,N.jsxs)(g,{variant:`ghost`,disabled:t,onClick:()=>v(new Set(O.map(e=>e.name))),children:[`Select all `,O.length]}),(0,N.jsx)(`span`,{className:`text-[13px] text-muted`,children:`The healing agent re-runs each flow in the browser before it changes anything.`})]})]}),o.runs.length>0&&(0,N.jsxs)(H,{title:`Runs`,aside:x.length||w.length?(0,N.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[[x.length?`${x.length} newly failing`:``,w.length?`${w.length} fixed`:``].filter(Boolean).join(` · `),` since the run before`]}):void 0,children:[(0,N.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:[...o.runs].reverse().map((e,t)=>(0,N.jsxs)(`li`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 border-t border-line-soft py-2 text-sm first:border-t-0`,children:[(0,N.jsx)(T,{tone:R(e),children:e.status===`passed`?`Passed`:e.status===`failed`?`Failed`:e.status}),(0,N.jsxs)(`span`,{className:`flex-1`,children:[L(e.at),` · `,e.on===`testmu`?`TestMu AI`:e.on===`pipeline`?`pipeline`:`this machine`]}),(0,N.jsxs)(`span`,{className:`text-muted tabular-nums`,children:[e.counts.passed,` passed · `,e.counts.failed,` failed`,e.counts.skipped?` · ${e.counts.skipped} skipped`:``,` · `,z(e.seconds)]}),B(e.url)&&(0,N.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1`,children:[`Pipeline `,(0,N.jsx)(S,{size:13,"aria-hidden":`true`})]})]},`${e.at}-${t}`))}),x.length>0&&(0,N.jsxs)(`p`,{className:`m-0 text-[13px] text-fail`,children:[`Newly failing: `,x.join(`, `)]}),w.length>0&&(0,N.jsxs)(`p`,{className:`m-0 text-[13px] text-pass`,children:[`Fixed: `,w.join(`, `)]})]}),(0,N.jsxs)(H,{title:`Tests (${o.tests.length})`,aside:(0,N.jsx)(`div`,{role:`group`,"aria-label":`Why in`,className:`flex flex-wrap gap-1`,children:[`all`,...A].map(e=>(0,N.jsx)(`button`,{type:`button`,"aria-pressed":u===e,title:P[e]?.help,onClick:()=>f(e),className:p(`min-h-8 cursor-pointer rounded-[8px] border px-3 text-[13px]`,u===e?`border-ink bg-ink text-bg`:`border-transparent bg-surface-strong text-ink-2 hover:bg-line hover:text-ink`),children:e===`all`?`All`:P[e].label},e))}),children:[(0,N.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:E.slice(0,300).map(e=>(0,N.jsxs)(`li`,{className:`flex flex-col gap-1 border-t border-line-soft py-2 text-sm first:border-t-0`,children:[(0,N.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,N.jsx)(`span`,{className:`font-medium [overflow-wrap:anywhere]`,children:e.test}),e.flaky&&(0,N.jsx)(T,{tone:`warn`,children:`Flaky`})]}),(0,N.jsxs)(`span`,{className:`font-mono text-[12px] text-muted [overflow-wrap:anywhere]`,children:[e.file,e.line?`:${e.line}`:``]}),(0,N.jsx)(`span`,{className:`flex flex-wrap gap-1.5`,children:e.reasons.map((e,t)=>(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-[13px] text-ink-2`,children:[(0,N.jsx)(T,{tone:P[e.kind]?.tone??`neutral`,icon:!1,children:P[e.kind]?.label??e.kind}),e.text]},t))})]},`${e.file}:${e.test}`))}),E.length>300&&(0,N.jsxs)(`p`,{className:`m-0 text-[13px] text-muted`,children:[`The first 300 of `,E.length,`.`]})]}),o.uncovered.length>0&&(0,N.jsx)(H,{title:`Not covered (${o.uncovered.length})`,aside:(0,N.jsx)(`span`,{className:`text-[13px] text-muted`,children:`Extend the closest test rather than write a new one`}),children:(0,N.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:o.uncovered.map(e=>(0,N.jsxs)(`li`,{className:`flex flex-col gap-0.5 border-t border-line-soft py-2 text-sm first:border-t-0`,children:[(0,N.jsxs)(`span`,{className:`[overflow-wrap:anywhere]`,children:[(0,N.jsx)(`span`,{className:`mr-1.5 font-mono text-[12px] text-muted`,children:e.item}),e.title]}),(0,N.jsx)(`span`,{className:`text-[13px] text-muted`,children:e.why}),e.nearest&&(0,N.jsxs)(`span`,{className:`text-[13px] text-ink-2 [overflow-wrap:anywhere]`,children:[`Closest: `,e.nearest.test,` `,(0,N.jsxs)(`span`,{className:`font-mono text-[12px] text-muted`,children:[`(`,e.nearest.file,`)`]}),e.nearest.lacks.length?`, lacks ${e.nearest.lacks.join(`, `)}`:``]})]},e.item))})}),o.risk.length>0&&(0,N.jsx)(H,{title:`Risk areas`,children:(0,N.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:o.risk.map(e=>(0,N.jsxs)(`li`,{className:`flex items-start gap-3 border-t border-line-soft py-2 text-sm first:border-t-0`,children:[(0,N.jsx)(r,{size:16,"aria-hidden":`true`,className:p(`mt-0.5 flex-none`,e.level===`high`?`text-fail`:`text-warn`)}),(0,N.jsxs)(`span`,{className:`flex flex-col`,children:[(0,N.jsxs)(`span`,{children:[e.area,` `,(0,N.jsxs)(`span`,{className:`text-muted`,children:[`· `,e.level]})]}),(0,N.jsx)(`span`,{className:`text-[13px] text-muted`,children:e.reasons.join(`; `)})]})]},e.area))})}),(0,N.jsx)(H,{title:`Changes (${o.items.length})`,children:(0,N.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:o.items.slice(0,200).map(e=>{let t=I[e.kind]||C;return(0,N.jsxs)(`li`,{className:`flex items-start gap-3 border-t border-line-soft py-2 text-sm first:border-t-0`,children:[(0,N.jsx)(t,{size:16,"aria-hidden":`true`,className:`mt-0.5 flex-none text-muted`}),(0,N.jsxs)(`span`,{className:`min-w-0 flex-1 [overflow-wrap:anywhere]`,children:[(0,N.jsxs)(`span`,{className:`mr-1.5 font-mono text-[12px] text-muted`,children:[e.type?`${e.type} `:``,e.id]}),e.title]}),B(e.url)&&(0,N.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open ${e.id}`,className:`flex-none`,children:(0,N.jsx)(S,{size:14,"aria-hidden":`true`})})]},`${e.kind}-${e.id}`)})})}),o.notes.length>0&&(0,N.jsx)(`ul`,{className:`m-0 flex flex-col gap-1 pl-5 text-[13px] text-muted`,children:o.notes.map((e,t)=>(0,N.jsx)(`li`,{children:e},t))})]})}function G({open:e,onClose:t,view:n,onBuild:r,busy:a}){let[c,u]=(0,M.useState)({rangeRepo:`product`,prRepo:`product`,risk:!0,smoke:!0});(0,M.useEffect)(()=>{e&&u({rangeRepo:n.productRepo?`product`:`tests`,prRepo:n.productRepo?`product`:`tests`,risk:!0,smoke:!0})},[e,n.productRepo]);let d=(e,t)=>u({...c,[e]:t}),f=(e,t,n,r)=>(0,N.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,N.jsx)(`label`,{htmlFor:`pk-${e}`,className:`text-sm font-medium`,children:t}),(0,N.jsx)(o,{id:`pk-${e}`,value:String(c[e]??``),spellCheck:!1,maxLength:200,placeholder:n,onChange:t=>d(e,t.target.value)}),r&&(0,N.jsx)(`span`,{className:`text-[13px] text-muted`,children:r})]}),m=(e,t)=>(0,N.jsxs)(`fieldset`,{className:`m-0 flex flex-wrap items-center gap-x-4 gap-y-1 border-0 p-0`,children:[(0,N.jsx)(`legend`,{className:`mb-1 text-[13px] text-muted`,children:t}),(0,N.jsxs)(`label`,{className:`flex min-h-9 cursor-pointer items-center gap-2 text-sm`,children:[(0,N.jsx)(`input`,{type:`radio`,name:e,checked:c[e]===`product`,disabled:!n.productRepo,onChange:()=>d(e,`product`),className:`size-4 accent-accent`}),`The product's `,n.productRepo?(0,N.jsx)(`code`,{className:`font-mono text-[12px]`,children:n.productRepo}):(0,N.jsx)(`span`,{className:`text-muted`,children:`(set defects.product_repo)`})]}),(0,N.jsxs)(`label`,{className:`flex min-h-9 cursor-pointer items-center gap-2 text-sm`,children:[(0,N.jsx)(`input`,{type:`radio`,name:e,checked:c[e]===`tests`,onChange:()=>d(e,`tests`),className:`size-4 accent-accent`}),`The tests' `,n.repo===`.`?`(this project)`:(0,N.jsx)(`code`,{className:`font-mono text-[12px]`,children:n.repo})]})]}),h=`flex flex-col gap-3 rounded-[12px] border border-line-soft p-3`;return(0,N.jsx)(s,{open:e,onClose:t,wide:!0,title:`Build a regression pack`,description:`The tests a release's changes can break, from any mix of the changes below. Building runs nothing; it takes seconds.`,footer:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(g,{onClick:t,children:`Cancel`}),(0,N.jsxs)(g,{variant:`primary`,disabled:a,onClick:()=>r(c),children:[(0,N.jsx)(j,{size:16,"aria-hidden":`true`}),`Build the pack`]})]}),children:(0,N.jsxs)(`div`,{className:`flex flex-col gap-4 pt-3`,children:[f(`name`,`Name`,`release-1.5`,`Lower-case letters, digits, dots and dashes. Empty: release-<date>.`),(0,N.jsxs)(`div`,{className:h,children:[(0,N.jsxs)(`h3`,{className:`m-0 flex items-center gap-2 text-sm font-semibold`,children:[(0,N.jsx)(k,{size:16,"aria-hidden":`true`,className:`text-accent-fg`}),`Code changes`]}),(0,N.jsxs)(`div`,{className:`grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] gap-3`,children:[f(`from`,`Commits after`,`release/1.4, a tag or a commit`),f(`to`,`Up to`,`HEAD`)]}),m(`rangeRepo`,`In the repository`),(0,N.jsxs)(`div`,{className:`grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] gap-3`,children:[f(`prs`,`Pull requests`,`57, 58 or their links`),(0,N.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,N.jsx)(`label`,{htmlFor:`pk-days`,className:`text-sm font-medium`,children:`Or merged in the last`}),(0,N.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[(0,N.jsx)(o,{id:`pk-days`,type:`number`,min:1,max:365,value:c.mergedDays??``,onChange:e=>d(`mergedDays`,e.target.value?Number(e.target.value):void 0),className:`w-24`}),` days`]})]})]}),(c.prs||c.mergedDays)&&m(`prRepo`,`Pull requests of`)]}),(0,N.jsxs)(`div`,{className:p(h,!n.azureDevops&&`opacity-70`),children:[(0,N.jsxs)(`h3`,{className:`m-0 flex items-center gap-2 text-sm font-semibold`,children:[(0,N.jsx)(w,{size:16,"aria-hidden":`true`,className:`text-accent-fg`}),`Azure DevOps work items and their linked test cases`]}),!n.azureDevops&&(0,N.jsxs)(`p`,{className:`m-0 text-[13px] text-muted`,children:[`Not set up: `,(0,N.jsx)(`a`,{href:i(`settings`,`integrations`),children:`Settings, Integrations`}),`.`]}),(0,N.jsxs)(`div`,{className:`grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] gap-3`,children:[f(`sprint`,`Sprint`,`current, or Sprint 41`),f(`iteration`,`Iteration path`,`Shop\\Release 2026.09`),f(`area`,`Area path`,`Shop\\Checkout`),f(`parent`,`Epic or feature`,`1200`),f(`workItems`,`Work items`,`2211, 2212`)]}),(0,N.jsx)(`p`,{className:`m-0 text-[13px] text-muted`,children:`Their stories and bugs, the test cases each is tested by, and the files their linked pull requests changed.`})]}),(0,N.jsxs)(`div`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,N.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[(0,N.jsx)(l,{checked:c.risk!==!1,onChange:e=>d(`risk`,e),label:`Add tests for risk areas`}),`Add tests for risk areas the release touches`]}),(0,N.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[(0,N.jsx)(l,{checked:c.smoke!==!1,onChange:e=>d(`smoke`,e),label:`Add smoke tests`}),`Add smoke-tagged tests`]})]})]})})}function K({sub:t}){let[n,r]=(0,M.useState)(null),[a,o]=(0,M.useState)(``),[s,c]=(0,M.useState)(!1),[l,u]=(0,M.useState)(!1),m=(0,M.useCallback)(()=>{d.list().then(e=>{r(e),o(``)},e=>o(e.message))},[]);(0,M.useEffect)(m,[m]);let b=!!n?.job?.running;(0,M.useEffect)(()=>{if(!b)return;let e=setInterval(m,1500);return()=>clearInterval(e)},[b,m]);let x=async e=>{c(!0),o(``);try{await e(),m()}catch(e){o(e.message)}finally{c(!1)}},S=t?decodeURIComponent(t):``,C=n?.packs.find(e=>e.name===S)||n?.packs[0],w=(0,M.useMemo)(()=>`${n?.job?.endedAt??``}|${C?.runs??0}|${C?.createdAt??``}`,[n,C]);return(0,N.jsxs)(`div`,{className:`flex min-h-screen flex-col`,children:[(0,N.jsx)(h,{}),(0,N.jsxs)(`main`,{className:p(v,`@container flex-auto gap-4`),children:[(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,N.jsx)(y,{icon:e,size:`lg`}),(0,N.jsx)(`h1`,{className:`m-0 flex-1 text-[26px] font-semibold tracking-[-0.01em]`,children:`Regression`}),(0,N.jsxs)(g,{variant:`primary`,disabled:!n||b,onClick:()=>u(!0),children:[(0,N.jsx)(j,{size:16,"aria-hidden":`true`}),`Build a pack`]})]}),(0,N.jsxs)(`p`,{className:`m-0 max-w-[74ch] text-sm leading-relaxed text-muted`,children:[`A regression pack is the set of tests in `,n&&n.repo!==`.`?(0,N.jsx)(`code`,{className:`font-mono text-[13px]`,children:n.repo}):`this project`,` that a release's changes can break: from the commits and pull requests of the product or development repositories, and the Azure DevOps sprint, epic or work items with their linked test cases. Each test says why it is in; the changes no test covers are listed. Run it here or on TestMu AI, and each run is triaged into what to heal, re-run or fix.`]}),a&&(0,N.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:a}),!n&&!a&&(0,N.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Loading…`}),n?.job&&(0,N.jsx)(V,{job:n.job,onStop:()=>x(()=>d.stop())}),n&&(n.packs.length?(0,N.jsxs)(`div`,{className:`flex flex-col gap-6 @2xl:flex-row @2xl:items-start @2xl:gap-8`,children:[(0,N.jsxs)(`nav`,{"aria-label":`Packs`,className:`flex min-w-0 flex-col gap-1 @2xl:sticky @2xl:top-6 @2xl:w-[250px] @2xl:flex-none`,children:[(0,N.jsxs)(`span`,{className:`px-3 text-[13px] font-medium text-muted`,children:[`Packs (`,n.packs.length,`)`]}),(0,N.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:n.packs.map(e=>(0,N.jsx)(`li`,{children:(0,N.jsxs)(`a`,{href:i(`regression`,encodeURIComponent(e.name)),"aria-current":C?.name===e.name?`page`:void 0,className:p(`flex min-h-[60px] items-center gap-3 rounded-[12px] px-3 py-2 text-ink no-underline`,C?.name===e.name?`bg-surface-strong hover:text-ink`:`hover:bg-surface-muted hover:text-ink`),children:[n?.job?.running&&n.job.pack===e.name?(0,N.jsx)(f,{state:n.job.kind===`heal`?`retrying`:`working`,label:`Working on it`,px:16}):(0,N.jsx)(`span`,{className:p(`size-2.5 flex-none rounded-full`,e.lastRun?e.lastRun.status===`passed`?`bg-pass`:`bg-fail`:`bg-line`),"aria-label":e.lastRun?e.lastRun.status:`not run`}),(0,N.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,N.jsx)(`span`,{className:`truncate text-[15px] font-medium`,children:e.name}),(0,N.jsxs)(`span`,{className:`truncate text-[13px] text-muted`,children:[_(e.tests,`test`),` · `,e.uncovered,` not covered · `,L(e.createdAt)]})]})]})},e.name))})]}),C&&(0,N.jsx)(W,{name:C.name,busy:s||b,act:x,version:w})]}):(0,N.jsxs)(`div`,{className:`flex flex-col items-start gap-3 rounded-[18px] border border-line p-6`,children:[(0,N.jsx)(e,{size:24,"aria-hidden":`true`,className:`text-muted`}),(0,N.jsx)(`p`,{className:`m-0 max-w-[62ch] leading-relaxed text-ink-2`,children:`No regression packs yet. Build one from a sprint, the commits since the last release, or the pull requests merged this week.`}),(0,N.jsx)(g,{onClick:()=>u(!0),children:`Build a pack`})]}))]}),n&&(0,N.jsx)(G,{open:l,onClose:()=>u(!1),view:n,busy:s||b,onBuild:e=>x(async()=>{await d.build(e),u(!1)})})]})}export{K as Regression};
1
+ import{Dt as e,G as t,Gn as n,H as r,Hn as i,Lt as a,Ot as o,S as s,Wt as c,_n as l,at as u,ct as d,ht as f,it as p,jn as m,lt as h,nt as g,q as _,r as v,st as y,t as b,tt as x}from"./frame-CHQgOaj6.js";import{t as S}from"./external-link-B45wnQ3R.js";import{t as C}from"./sticky-note-D_lJfPYH.js";import{b as w,s as T}from"./index-Hd8gmpz5.js";var E={name:`bandage`,size:24,node:[[`path`,{d:`M10 10.01h.01`,key:`1e9xi7`}],[`path`,{d:`M10 14.01h.01`,key:`ac23bv`}],[`path`,{d:`M14 10.01h.01`,key:`2wfrvf`}],[`path`,{d:`M14 14.01h.01`,key:`8tw8yn`}],[`path`,{d:`M18 6v12`,key:`1bcixs`}],[`path`,{d:`M6 6v12`,key:`vkc79e`}],[`rect`,{x:`2`,y:`6`,width:`20`,height:`12`,rx:`2`,key:`1wpnh2`}]]};E.node;var D=l(E),O={name:`git-commit-horizontal`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]],aliases:[`git-commit`]};O.node;var k=l(O),A={name:`hammer`,size:24,node:[[`path`,{d:`m15 12-9.373 9.373a1 1 0 0 1-3.001-3L12 9`,key:`1hayfq`}],[`path`,{d:`m18 15 4-4`,key:`16gjal`}],[`path`,{d:`m21.5 11.5-1.914-1.914A2 2 0 0 1 19 8.172v-.344a2 2 0 0 0-.586-1.414l-1.657-1.657A6 6 0 0 0 12.516 3H9l1.243 1.243A6 6 0 0 1 12 8.485V10l2 2h1.172a2 2 0 0 1 1.414.586L18.5 14.5`,key:`15ts47`}]]};A.node;var j=l(A),M=n(i(),1),N=y(),P={linked:{label:`Linked test case`,tone:`pass`,help:`It automates a test case that tests a changed work item`},changed:{label:`Test code changed`,tone:`running`,help:`The change is in test code it uses`},covers:{label:`Matches a change`,tone:`neutral`,help:`The change's words name what it does`},risk:{label:`Risk area`,tone:`warn`,help:`The release touches an area with defects or failures before`},smoke:{label:`Smoke`,tone:`neutral`,help:`Tagged smoke: in every pack`}},F={heal:{label:`Heal`,tone:`warn`,does:`An element it uses is gone: the healing agent re-runs the flow and updates the test.`},check:{label:`AI re-run decides`,tone:`warn`,does:`The healing agent re-runs the flow: it heals the test when the flow works, and reports an app bug when it fails at the same step.`},flaky:{label:`Flaky`,tone:`neutral`,does:`Passed when run again: quarantine it, or fix the cause it flakes on. Not healed.`},environment:{label:`Environment`,tone:`neutral`,does:`Network, a server error, sign-in: run again once the environment works. No heal, no bug.`},test_code:{label:`Test code broken`,tone:`fail`,does:`A missing module, a compile error, a missing fixture: fix the test's code.`}},I={work_item:w,pr:a,commit:k,note:C},L=e=>new Date(e).toLocaleString([],{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),R=e=>e?e.status===`passed`?`pass`:e.status===`failed`?`fail`:`warn`:`neutral`,z=e=>e<60?`${Math.round(e)}s`:`${Math.floor(e/60)}m ${Math.round(e%60)}s`,B=e=>e&&/^https?:\/\//i.test(e)?e:void 0;function V({job:e,onStop:t}){let n=(0,M.useRef)(null),[,r]=(0,M.useState)(0);(0,M.useEffect)(()=>{if(!e.running)return;let t=setInterval(()=>r(e=>e+1),1e3);return()=>clearInterval(t)},[e.running]),(0,M.useEffect)(()=>{n.current&&(n.current.scrollTop=n.current.scrollHeight)},[e.lines.length]);let i=e.running?e.kind===`build`?`Building the pack`:e.kind===`run`?`Running ${e.pack}`:`Healing ${e.pack}'s failures`:e.kind===`build`?`Built ${e.pack||`the pack`}`:e.kind===`run`?`Ran ${e.pack}`:`Healed ${e.pack}'s failures`,a=Math.round(((e.endedAt?Date.parse(e.endedAt):Date.now())-Date.parse(e.startedAt))/1e3);return(0,N.jsxs)(`section`,{"aria-label":i,className:`flex flex-col gap-2 rounded-[14px] border border-line-soft p-4`,children:[(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,N.jsx)(`span`,{className:`flex-1 font-medium`,children:i}),(0,N.jsx)(T,{orb:e.kind===`build`?`handing`:e.kind===`heal`?`retrying`:`working`,tone:e.running?`running`:e.exitCode===0?`pass`:e.kind===`run`&&e.exitCode===1?`warn`:`fail`,children:e.running?`Working`:e.exitCode===0?`Done`:e.kind===`run`&&e.exitCode===1?`Tests failed`:`Did not finish`}),(0,N.jsx)(`span`,{className:`text-[13px] text-muted tabular-nums`,children:z(a)}),e.running&&(0,N.jsxs)(u,{onClick:t,className:`border-fail text-fail hover:bg-fail-soft`,children:[(0,N.jsx)(f,{size:14,fill:`currentColor`,"aria-hidden":`true`}),`Stop`]})]}),(0,N.jsx)(`code`,{className:`font-mono text-[12px] text-muted [overflow-wrap:anywhere]`,children:e.command}),(0,N.jsxs)(`details`,{open:e.running,children:[(0,N.jsxs)(`summary`,{className:`cursor-pointer text-sm text-muted`,children:[`Output (`,e.lines.length,` lines)`]}),(0,N.jsx)(`pre`,{ref:n,className:`mt-2 max-h-[300px] overflow-auto rounded-[10px] bg-surface-muted p-3 font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-ink-2`,children:e.lines.join(`
2
+ `)||`Starting…`})]})]})}function H({title:e,aside:t,children:n}){return(0,N.jsxs)(`section`,{className:`flex flex-col gap-2`,children:[(0,N.jsxs)(`div`,{className:`flex flex-wrap items-baseline gap-2`,children:[(0,N.jsx)(`h3`,{className:`m-0 flex-1 text-base font-semibold`,children:e}),t]}),n]})}function U(e){let[t,n]=e.slice(-2).length===2?e.slice(-2):[void 0,e.at(-1)];return!n||!t?{fresh:[],fixed:[]}:{fresh:n.failed.filter(e=>!t.failed.includes(e)),fixed:t.failed.filter(e=>!n.failed.includes(e))}}function W({name:t,busy:n,act:r,version:i}){let[a,o]=(0,M.useState)(null),[l,f]=(0,M.useState)(``),[p,h]=(0,M.useState)(`all`),[g,_]=(0,M.useState)(null),[v,y]=(0,M.useState)(new Set);if((0,M.useEffect)(()=>{let e=!1;return m.detail(t).then(t=>!e&&(o(t),f(``)),t=>!e&&f(t.message)),()=>{e=!0}},[t,i]),(0,M.useEffect)(()=>{h(`all`),_(null),y(new Set)},[t]),l)return(0,N.jsx)(`p`,{className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:l});if(!a)return(0,N.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Loading…`});let b=a.runs.at(-1),{fresh:x,fixed:w}=U(a.runs),E=a.tests.filter(e=>p===`all`||e.reasons.some(e=>e.kind===p)),O=(a.triage?.items??[]).filter(e=>e.route===`heal`||e.route===`check`),k=Object.keys(F).filter(e=>a.triage?.items.some(t=>t.route===e)),A=Object.keys(P).filter(e=>a.tests.some(t=>t.reasons.some(t=>t.kind===e)));return(0,N.jsxs)(`section`,{"aria-labelledby":`pack-h`,className:`flex min-w-0 flex-1 flex-col gap-6`,children:[(0,N.jsxs)(`div`,{className:`flex flex-wrap items-start gap-3`,children:[(0,N.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_260px] flex-col gap-1`,children:[(0,N.jsx)(`h2`,{id:`pack-h`,className:`m-0 text-[22px] font-semibold tracking-[-0.01em] [overflow-wrap:anywhere]`,children:a.name}),(0,N.jsxs)(`span`,{className:`text-sm text-muted`,children:[`Built `,L(a.createdAt)]}),a.scope.length>0&&(0,N.jsx)(`span`,{className:`flex flex-wrap gap-1.5 pt-1`,children:a.scope.map(e=>(0,N.jsx)(`span`,{className:`rounded-full bg-surface-strong px-2.5 py-0.5 text-[12px] text-ink-2`,children:e},e))})]}),g?(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 rounded-[12px] bg-accent-soft px-3 py-2`,children:[(0,N.jsxs)(`span`,{className:`text-sm`,children:[`Run `,a.tests.length,` test`,a.tests.length===1?``:`s`,` `,g===`local`?`on this machine`:`on TestMu AI`,`?`]}),(0,N.jsx)(u,{variant:`primary`,disabled:n,onClick:()=>{_(null),r(()=>m.run(a.name,g))},children:`Run`}),(0,N.jsx)(u,{onClick:()=>_(null),children:`Don't run`})]}):(0,N.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,N.jsxs)(u,{variant:`primary`,disabled:n||!a.tests.length,onClick:()=>_(`local`),children:[(0,N.jsx)(e,{size:16,"aria-hidden":`true`}),`Run here`]}),(0,N.jsx)(u,{disabled:n||!a.tests.length,onClick:()=>_(`testmu`),children:`Run on TestMu AI`})]})]}),(0,N.jsxs)(`div`,{className:`flex flex-wrap gap-3`,children:[(0,N.jsx)(s,{label:`Tests`,value:String(a.tests.length),note:A.map(e=>`${a.tests.filter(t=>t.reasons.some(t=>t.kind===e)).length} ${P[e].label.toLowerCase()}`).join(` · `)}),(0,N.jsx)(s,{label:`Not covered`,value:String(a.uncovered.length),note:`changes no test is in for`}),(0,N.jsx)(s,{label:`Risk areas`,value:String(a.risk.length)}),(0,N.jsx)(s,{label:`Last run`,value:b?b.status===`passed`?`Passed`:`${b.counts.failed} failed`:`–`,note:b?`${L(b.at)} · ${b.on===`testmu`?`TestMu AI`:b.on===`pipeline`?`pipeline`:`this machine`}`:`Not run yet`})]}),a.triage&&(0,N.jsxs)(H,{title:`Triage of the last run`,aside:(0,N.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[a.triage.items.length,` failed or flaky`]}),children:[a.triage.environmentDown&&(0,N.jsx)(`p`,{className:`m-0 rounded-[12px] bg-warn-soft px-3 py-2 text-sm text-warn`,children:`Most failures were the environment: run the pack again before healing anything.`}),k.map(e=>(0,N.jsxs)(`div`,{className:`flex flex-col gap-1 rounded-[12px] border border-line-soft px-4 py-3`,children:[(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,N.jsx)(T,{tone:F[e].tone,children:F[e].label}),(0,N.jsx)(`span`,{className:`text-[13px] text-muted`,children:F[e].does})]}),(0,N.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:a.triage.items.filter(t=>t.route===e).map(t=>(0,N.jsxs)(`li`,{className:`flex items-start gap-3 border-t border-line-soft py-2 text-sm first:border-t-0`,children:[(e===`heal`||e===`check`)&&(0,N.jsx)(`input`,{type:`checkbox`,"aria-label":`Heal ${t.name}`,checked:v.has(t.name),onChange:e=>{let n=new Set(v);e.target.checked?n.add(t.name):n.delete(t.name),y(n)},className:`mt-1 size-5 accent-accent`}),(0,N.jsxs)(`span`,{className:`flex min-w-0 flex-col gap-0.5`,children:[(0,N.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:t.name}),(0,N.jsxs)(`span`,{className:`text-[13px] text-muted [overflow-wrap:anywhere]`,children:[t.why,` · `,t.confidence,` confidence`,t.file?` · ${t.file}`:``,t.history?` · ${t.history}`:``]})]})]},t.name))})]},e)),O.length>0&&(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,N.jsxs)(u,{disabled:n||!v.size,onClick:()=>r(()=>m.heal(a.name,[...v])),children:[(0,N.jsx)(D,{size:16,"aria-hidden":`true`}),`Heal `,v.size||``,` selected`]}),(0,N.jsxs)(u,{variant:`ghost`,disabled:n,onClick:()=>y(new Set(O.map(e=>e.name))),children:[`Select all `,O.length]}),(0,N.jsx)(`span`,{className:`text-[13px] text-muted`,children:`The healing agent re-runs each flow in the browser before it changes anything.`})]})]}),a.runs.length>0&&(0,N.jsxs)(H,{title:`Runs`,aside:x.length||w.length?(0,N.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[[x.length?`${x.length} newly failing`:``,w.length?`${w.length} fixed`:``].filter(Boolean).join(` · `),` since the run before`]}):void 0,children:[(0,N.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:[...a.runs].reverse().map((e,t)=>(0,N.jsxs)(`li`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1 border-t border-line-soft py-2 text-sm first:border-t-0`,children:[(0,N.jsx)(T,{tone:R(e),children:e.status===`passed`?`Passed`:e.status===`failed`?`Failed`:e.status}),(0,N.jsxs)(`span`,{className:`flex-1`,children:[L(e.at),` · `,e.on===`testmu`?`TestMu AI`:e.on===`pipeline`?`pipeline`:`this machine`]}),(0,N.jsxs)(`span`,{className:`text-muted tabular-nums`,children:[e.counts.passed,` passed · `,e.counts.failed,` failed`,e.counts.skipped?` · ${e.counts.skipped} skipped`:``,` · `,z(e.seconds)]}),B(e.url)&&(0,N.jsxs)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,className:`inline-flex items-center gap-1`,children:[`Pipeline `,(0,N.jsx)(S,{size:13,"aria-hidden":`true`})]})]},`${e.at}-${t}`))}),x.length>0&&(0,N.jsxs)(`p`,{className:`m-0 text-[13px] text-fail`,children:[`Newly failing: `,x.join(`, `)]}),w.length>0&&(0,N.jsxs)(`p`,{className:`m-0 text-[13px] text-pass`,children:[`Fixed: `,w.join(`, `)]})]}),(0,N.jsxs)(H,{title:`Tests (${a.tests.length})`,aside:(0,N.jsx)(`div`,{role:`group`,"aria-label":`Why in`,className:`flex flex-wrap gap-1`,children:[`all`,...A].map(e=>(0,N.jsx)(`button`,{type:`button`,"aria-pressed":p===e,title:P[e]?.help,onClick:()=>h(e),className:d(`min-h-8 cursor-pointer rounded-[8px] border px-3 text-[13px]`,p===e?`border-ink bg-ink text-bg`:`border-transparent bg-surface-strong text-ink-2 hover:bg-line hover:text-ink`),children:e===`all`?`All`:P[e].label},e))}),children:[(0,N.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:E.slice(0,300).map(e=>(0,N.jsxs)(`li`,{className:`flex flex-col gap-1 border-t border-line-soft py-2 text-sm first:border-t-0`,children:[(0,N.jsxs)(`span`,{className:`flex flex-wrap items-center gap-2`,children:[(0,N.jsx)(`span`,{className:`font-medium [overflow-wrap:anywhere]`,children:e.test}),e.flaky&&(0,N.jsx)(T,{tone:`warn`,children:`Flaky`})]}),(0,N.jsxs)(`span`,{className:`font-mono text-[12px] text-muted [overflow-wrap:anywhere]`,children:[e.file,e.line?`:${e.line}`:``]}),(0,N.jsx)(`span`,{className:`flex flex-wrap gap-1.5`,children:e.reasons.map((e,t)=>(0,N.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-[13px] text-ink-2`,children:[(0,N.jsx)(T,{tone:P[e.kind]?.tone??`neutral`,icon:!1,children:P[e.kind]?.label??e.kind}),e.text]},t))})]},`${e.file}:${e.test}`))}),E.length>300&&(0,N.jsxs)(`p`,{className:`m-0 text-[13px] text-muted`,children:[`The first 300 of `,E.length,`.`]})]}),a.uncovered.length>0&&(0,N.jsx)(H,{title:`Not covered (${a.uncovered.length})`,aside:(0,N.jsx)(`span`,{className:`text-[13px] text-muted`,children:`Extend the closest test rather than write a new one`}),children:(0,N.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:a.uncovered.map(e=>(0,N.jsxs)(`li`,{className:`flex flex-col gap-0.5 border-t border-line-soft py-2 text-sm first:border-t-0`,children:[(0,N.jsxs)(`span`,{className:`[overflow-wrap:anywhere]`,children:[(0,N.jsx)(`span`,{className:`mr-1.5 font-mono text-[12px] text-muted`,children:e.item}),e.title]}),(0,N.jsx)(`span`,{className:`text-[13px] text-muted`,children:e.why}),e.nearest&&(0,N.jsxs)(`span`,{className:`text-[13px] text-ink-2 [overflow-wrap:anywhere]`,children:[`Closest: `,e.nearest.test,` `,(0,N.jsxs)(`span`,{className:`font-mono text-[12px] text-muted`,children:[`(`,e.nearest.file,`)`]}),e.nearest.lacks.length?`, lacks ${e.nearest.lacks.join(`, `)}`:``]})]},e.item))})}),a.risk.length>0&&(0,N.jsx)(H,{title:`Risk areas`,children:(0,N.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:a.risk.map(e=>(0,N.jsxs)(`li`,{className:`flex items-start gap-3 border-t border-line-soft py-2 text-sm first:border-t-0`,children:[(0,N.jsx)(c,{size:16,"aria-hidden":`true`,className:d(`mt-0.5 flex-none`,e.level===`high`?`text-fail`:`text-warn`)}),(0,N.jsxs)(`span`,{className:`flex flex-col`,children:[(0,N.jsxs)(`span`,{children:[e.area,` `,(0,N.jsxs)(`span`,{className:`text-muted`,children:[`· `,e.level]})]}),(0,N.jsx)(`span`,{className:`text-[13px] text-muted`,children:e.reasons.join(`; `)})]})]},e.area))})}),(0,N.jsx)(H,{title:`Changes (${a.items.length})`,children:(0,N.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:a.items.slice(0,200).map(e=>{let t=I[e.kind]||C;return(0,N.jsxs)(`li`,{className:`flex items-start gap-3 border-t border-line-soft py-2 text-sm first:border-t-0`,children:[(0,N.jsx)(t,{size:16,"aria-hidden":`true`,className:`mt-0.5 flex-none text-muted`}),(0,N.jsxs)(`span`,{className:`min-w-0 flex-1 [overflow-wrap:anywhere]`,children:[(0,N.jsxs)(`span`,{className:`mr-1.5 font-mono text-[12px] text-muted`,children:[e.type?`${e.type} `:``,e.id]}),e.title]}),B(e.url)&&(0,N.jsx)(`a`,{href:e.url,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open ${e.id}`,className:`flex-none`,children:(0,N.jsx)(S,{size:14,"aria-hidden":`true`})})]},`${e.kind}-${e.id}`)})})}),a.notes.length>0&&(0,N.jsx)(`ul`,{className:`m-0 flex flex-col gap-1 pl-5 text-[13px] text-muted`,children:a.notes.map((e,t)=>(0,N.jsx)(`li`,{children:e},t))})]})}function G({open:e,onClose:n,view:i,onBuild:a,busy:o}){let[s,c]=(0,M.useState)({rangeRepo:`product`,prRepo:`product`,risk:!0,smoke:!0});(0,M.useEffect)(()=>{e&&c({rangeRepo:i.productRepo?`product`:`tests`,prRepo:i.productRepo?`product`:`tests`,risk:!0,smoke:!0})},[e,i.productRepo]);let l=(e,t)=>c({...s,[e]:t}),f=(e,t,n,i)=>(0,N.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,N.jsx)(`label`,{htmlFor:`pk-${e}`,className:`text-sm font-medium`,children:t}),(0,N.jsx)(r,{id:`pk-${e}`,value:String(s[e]??``),spellCheck:!1,maxLength:200,placeholder:n,onChange:t=>l(e,t.target.value)}),i&&(0,N.jsx)(`span`,{className:`text-[13px] text-muted`,children:i})]}),p=(e,t)=>(0,N.jsxs)(`fieldset`,{className:`m-0 flex flex-wrap items-center gap-x-4 gap-y-1 border-0 p-0`,children:[(0,N.jsx)(`legend`,{className:`mb-1 text-[13px] text-muted`,children:t}),(0,N.jsxs)(`label`,{className:`flex min-h-9 cursor-pointer items-center gap-2 text-sm`,children:[(0,N.jsx)(`input`,{type:`radio`,name:e,checked:s[e]===`product`,disabled:!i.productRepo,onChange:()=>l(e,`product`),className:`size-4 accent-accent`}),`The product's `,i.productRepo?(0,N.jsx)(`code`,{className:`font-mono text-[12px]`,children:i.productRepo}):(0,N.jsx)(`span`,{className:`text-muted`,children:`(set defects.product_repo)`})]}),(0,N.jsxs)(`label`,{className:`flex min-h-9 cursor-pointer items-center gap-2 text-sm`,children:[(0,N.jsx)(`input`,{type:`radio`,name:e,checked:s[e]===`tests`,onChange:()=>l(e,`tests`),className:`size-4 accent-accent`}),`The tests' `,i.repo===`.`?`(this project)`:(0,N.jsx)(`code`,{className:`font-mono text-[12px]`,children:i.repo})]})]}),m=`flex flex-col gap-3 rounded-[12px] border border-line-soft p-3`;return(0,N.jsx)(t,{open:e,onClose:n,wide:!0,title:`Build a regression pack`,description:`The tests a release's changes can break, from any mix of the changes below. Building runs nothing; it takes seconds.`,footer:(0,N.jsxs)(N.Fragment,{children:[(0,N.jsx)(u,{onClick:n,children:`Cancel`}),(0,N.jsxs)(u,{variant:`primary`,disabled:o,onClick:()=>a(s),children:[(0,N.jsx)(j,{size:16,"aria-hidden":`true`}),`Build the pack`]})]}),children:(0,N.jsxs)(`div`,{className:`flex flex-col gap-4 pt-3`,children:[f(`name`,`Name`,`release-1.5`,`Lower-case letters, digits, dots and dashes. Empty: release-<date>.`),(0,N.jsxs)(`div`,{className:m,children:[(0,N.jsxs)(`h3`,{className:`m-0 flex items-center gap-2 text-sm font-semibold`,children:[(0,N.jsx)(k,{size:16,"aria-hidden":`true`,className:`text-accent-fg`}),`Code changes`]}),(0,N.jsxs)(`div`,{className:`grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] gap-3`,children:[f(`from`,`Commits after`,`release/1.4, a tag or a commit`),f(`to`,`Up to`,`HEAD`)]}),p(`rangeRepo`,`In the repository`),(0,N.jsxs)(`div`,{className:`grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] gap-3`,children:[f(`prs`,`Pull requests`,`57, 58 or their links`),(0,N.jsxs)(`div`,{className:`flex flex-col gap-1.5`,children:[(0,N.jsx)(`label`,{htmlFor:`pk-days`,className:`text-sm font-medium`,children:`Or merged in the last`}),(0,N.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[(0,N.jsx)(r,{id:`pk-days`,type:`number`,min:1,max:365,value:s.mergedDays??``,onChange:e=>l(`mergedDays`,e.target.value?Number(e.target.value):void 0),className:`w-24`}),` days`]})]})]}),(s.prs||s.mergedDays)&&p(`prRepo`,`Pull requests of`)]}),(0,N.jsxs)(`div`,{className:d(m,!i.azureDevops&&`opacity-70`),children:[(0,N.jsxs)(`h3`,{className:`m-0 flex items-center gap-2 text-sm font-semibold`,children:[(0,N.jsx)(w,{size:16,"aria-hidden":`true`,className:`text-accent-fg`}),`Azure DevOps work items and their linked test cases`]}),!i.azureDevops&&(0,N.jsxs)(`p`,{className:`m-0 text-[13px] text-muted`,children:[`Not set up: `,(0,N.jsx)(`a`,{href:_(`settings`,`integrations`),children:`Settings, Integrations`}),`.`]}),(0,N.jsxs)(`div`,{className:`grid grid-cols-[repeat(auto-fit,minmax(200px,1fr))] gap-3`,children:[f(`sprint`,`Sprint`,`current, or Sprint 41`),f(`iteration`,`Iteration path`,`Shop\\Release 2026.09`),f(`area`,`Area path`,`Shop\\Checkout`),f(`parent`,`Epic or feature`,`1200`),f(`workItems`,`Work items`,`2211, 2212`)]}),(0,N.jsx)(`p`,{className:`m-0 text-[13px] text-muted`,children:`Their stories and bugs, the test cases each is tested by, and the files their linked pull requests changed.`})]}),(0,N.jsxs)(`div`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,N.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[(0,N.jsx)(x,{checked:s.risk!==!1,onChange:e=>l(`risk`,e),label:`Add tests for risk areas`}),`Add tests for risk areas the release touches`]}),(0,N.jsxs)(`span`,{className:`flex items-center gap-2 text-sm`,children:[(0,N.jsx)(x,{checked:s.smoke!==!1,onChange:e=>l(`smoke`,e),label:`Add smoke tests`}),`Add smoke-tagged tests`]})]})]})})}function K({sub:e}){let[t,n]=(0,M.useState)(null),[r,i]=(0,M.useState)(``),[a,s]=(0,M.useState)(!1),[c,l]=(0,M.useState)(!1),f=(0,M.useCallback)(()=>{m.list().then(e=>{n(e),i(``)},e=>i(e.message))},[]);(0,M.useEffect)(f,[f]);let y=!!t?.job?.running;(0,M.useEffect)(()=>{if(!y)return;let e=setInterval(f,1500);return()=>clearInterval(e)},[y,f]);let x=async e=>{s(!0),i(``);try{await e(),f()}catch(e){i(e.message)}finally{s(!1)}},S=e?decodeURIComponent(e):``,C=t?.packs.find(e=>e.name===S)||t?.packs[0],w=(0,M.useMemo)(()=>`${t?.job?.endedAt??``}|${C?.runs??0}|${C?.createdAt??``}`,[t,C]);return(0,N.jsxs)(`div`,{className:`flex min-h-screen flex-col`,children:[(0,N.jsx)(v,{}),(0,N.jsxs)(`main`,{className:d(b,`@container flex-auto gap-4`),children:[(0,N.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3`,children:[(0,N.jsx)(g,{icon:o,size:`lg`}),(0,N.jsx)(`h1`,{className:`m-0 flex-1 text-[26px] font-semibold tracking-[-0.01em]`,children:`Regression`}),(0,N.jsxs)(u,{variant:`primary`,disabled:!t||y,onClick:()=>l(!0),children:[(0,N.jsx)(j,{size:16,"aria-hidden":`true`}),`Build a pack`]})]}),(0,N.jsxs)(`p`,{className:`m-0 max-w-[74ch] text-sm leading-relaxed text-muted`,children:[`A regression pack is the set of tests in `,t&&t.repo!==`.`?(0,N.jsx)(`code`,{className:`font-mono text-[13px]`,children:t.repo}):`this project`,` that a release's changes can break: from the commits and pull requests of the product or development repositories, and the Azure DevOps sprint, epic or work items with their linked test cases. Each test says why it is in; the changes no test covers are listed. Run it here or on TestMu AI, and each run is triaged into what to heal, re-run or fix.`]}),r&&(0,N.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:r}),!t&&!r&&(0,N.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Loading…`}),t?.job&&(0,N.jsx)(V,{job:t.job,onStop:()=>x(()=>m.stop())}),t&&(t.packs.length?(0,N.jsxs)(`div`,{className:`flex flex-col gap-6 @2xl:flex-row @2xl:items-start @2xl:gap-8`,children:[(0,N.jsxs)(`nav`,{"aria-label":`Packs`,className:`flex min-w-0 flex-col gap-1 @2xl:sticky @2xl:top-6 @2xl:w-[250px] @2xl:flex-none`,children:[(0,N.jsxs)(`span`,{className:`px-3 text-[13px] font-medium text-muted`,children:[`Packs (`,t.packs.length,`)`]}),(0,N.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:t.packs.map(e=>(0,N.jsx)(`li`,{children:(0,N.jsxs)(`a`,{href:_(`regression`,encodeURIComponent(e.name)),"aria-current":C?.name===e.name?`page`:void 0,className:d(`flex min-h-[60px] items-center gap-3 rounded-[12px] px-3 py-2 text-ink no-underline`,C?.name===e.name?`bg-surface-strong hover:text-ink`:`hover:bg-surface-muted hover:text-ink`),children:[t?.job?.running&&t.job.pack===e.name?(0,N.jsx)(p,{state:t.job.kind===`heal`?`retrying`:`working`,label:`Working on it`,px:16}):(0,N.jsx)(`span`,{className:d(`size-2.5 flex-none rounded-full`,e.lastRun?e.lastRun.status===`passed`?`bg-pass`:`bg-fail`:`bg-line`),"aria-label":e.lastRun?e.lastRun.status:`not run`}),(0,N.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,N.jsx)(`span`,{className:`truncate text-[15px] font-medium`,children:e.name}),(0,N.jsxs)(`span`,{className:`truncate text-[13px] text-muted`,children:[h(e.tests,`test`),` · `,e.uncovered,` not covered · `,L(e.createdAt)]})]})]})},e.name))})]}),C&&(0,N.jsx)(W,{name:C.name,busy:a||y,act:x,version:w})]}):(0,N.jsxs)(`div`,{className:`flex flex-col items-start gap-3 rounded-[18px] border border-line p-6`,children:[(0,N.jsx)(o,{size:24,"aria-hidden":`true`,className:`text-muted`}),(0,N.jsx)(`p`,{className:`m-0 max-w-[62ch] leading-relaxed text-ink-2`,children:`No regression packs yet. Build one from a sprint, the commits since the last release, or the pull requests merged this week.`}),(0,N.jsx)(u,{onClick:()=>l(!0),children:`Build a pack`})]}))]}),t&&(0,N.jsx)(G,{open:c,onClose:()=>l(!1),view:t,busy:a||y,onBuild:e=>x(async()=>{await m.build(e),l(!1)})})]})}export{K as Regression};
@@ -1,2 +1,2 @@
1
- import{D as e,G as t,H as n,Hn as r,K as i,Kt as a,Nn as o,T as s,Ut as c,V as l,at as u,en as d,nt as f,ot as p,r as m,rt as h,st as g,t as _,tt as v,zn as y}from"./frame-Dq1wC8eF.js";import{t as b}from"./circle-dashed-CEZcCi0T.js";import{t as x}from"./markdown-BmsRBxB-.js";import{t as S}from"./external-link-NCKfigiH.js";import{n as C,t as w}from"./trending-up-BLA071mC.js";import{E as T,j as E,w as D}from"./index-C_8DS1Wt.js";import{n as O,t as k}from"./when-CHnpLdYw.js";var A=r(y(),1),j=u(),M={suite:`Suite`,monitor:`Monitor round`,run:`Browser run`,explore:`Exploration`,api:`API run`,desktop:`Desktop run`,mobile:`Mobile run`,page:`Report page`},N=e=>{if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString([],{month:`short`,day:`numeric`,...t.getFullYear()===new Date().getFullYear()?{}:{year:`numeric`},hour:`numeric`,minute:`2-digit`})},P=e=>{if(!e)return``;let t=Math.round(e/1e3);return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m ${t%60}s`:`${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`};function F(e){return e.scope===`page`?{tone:`neutral`,label:`Report`}:e.counts.total?e.counts.failed?{tone:`fail`,label:`${e.counts.failed} failed`}:e.stopped||e.counts.other?{tone:`warn`,label:e.stopped?`Stopped`:`${e.counts.other} not run`}:{tone:`pass`,label:`Passed`}:{tone:`neutral`,label:`No results`}}var I=50;function L({r:e}){let t=F(e),n=e.scope===`page`?c:t.tone===`pass`?E:t.tone===`fail`?d:b;return(0,j.jsx)(n,{size:16,"aria-label":t.label,className:p(`flex-none`,t.tone===`pass`?`text-pass`:t.tone===`fail`?`text-fail`:t.tone===`warn`?`text-warn`:`text-muted`)})}var R=e=>{let t=new Date(`${e}T12:00:00`);return Number.isNaN(t.getTime())?e:t.toLocaleDateString([],{day:`numeric`,month:`short`})},z=e=>{let t=e.reduce((e,t)=>e+t.cases,0);return t?Math.round(e.reduce((e,t)=>e+t.passed,0)/t*100):null};function B({title:e,note:t,children:n,className:r}){return(0,j.jsxs)(`section`,{className:p(`flex min-w-0 flex-col rounded-[14px] border border-line-soft bg-bg px-4 py-3.5`,r),children:[(0,j.jsx)(`h3`,{className:`m-0 text-[15px] font-semibold`,children:e}),t&&(0,j.jsx)(`p`,{className:`m-0 mt-0.5 text-[12.5px] text-muted`,children:t}),(0,j.jsx)(`div`,{className:`mt-3 flex min-w-0 flex-col`,children:n})]})}function V({part:e,whole:t,tone:n,label:r}){return(0,j.jsxs)(`span`,{className:`flex flex-none items-center gap-2`,children:[(0,j.jsx)(`span`,{"aria-hidden":`true`,className:`h-1.5 w-16 flex-none overflow-hidden rounded-full bg-surface-strong`,children:(0,j.jsx)(`span`,{className:p(`block h-full rounded-full`,n===`pass`?`bg-pass`:n===`fail`?`bg-fail`:`bg-accent`),style:{width:`${t?Math.max(4,e/t*100):0}%`}})}),(0,j.jsx)(`span`,{className:`text-[12.5px] whitespace-nowrap text-ink-2 tabular-nums`,children:r})]})}function H({days:e}){let[t,n]=(0,A.useState)(null),r=e.slice(-30);if(!r.length)return(0,j.jsx)(`p`,{className:`m-0 py-6 text-sm text-muted`,children:`No runs with results yet.`});let i=Math.max(1,...r.map(e=>e.cases)),a=i<=4?1:Math.ceil(i/4/5)*5||1,o=Math.ceil(i/a)*a,s=[o,Math.round(o/2),0],c=Math.ceil(r.length/8),l=t===null?null:r[t];return(0,j.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,j.jsxs)(`div`,{"aria-hidden":`true`,className:`flex gap-4 text-[12.5px] text-ink-2`,children:[(0,j.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,j.jsx)(`span`,{className:`size-2.5 rounded-[3px] bg-pass`}),` Passed`]}),(0,j.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,j.jsx)(`span`,{className:`size-2.5 rounded-[3px] bg-fail`}),` Failed`]})]}),(0,j.jsxs)(`div`,{className:`relative grid grid-cols-[32px_minmax(0,1fr)] gap-x-2`,children:[(0,j.jsx)(`div`,{"aria-hidden":`true`,className:`flex h-[180px] flex-col justify-between text-right text-[11px] text-muted tabular-nums`,children:s.map(e=>(0,j.jsx)(`span`,{className:`-translate-y-1/2 first:translate-y-0 last:translate-y-0`,children:e},e))}),(0,j.jsxs)(`div`,{className:`relative h-[180px]`,onMouseLeave:()=>n(null),children:[s.map((e,t)=>(0,j.jsx)(`span`,{"aria-hidden":`true`,className:p(`absolute inset-x-0 border-t`,t===s.length-1?`border-line`:`border-line-soft`),style:{top:`${(1-e/o)*100}%`}},e)),(0,j.jsx)(`div`,{className:`absolute inset-0 flex items-end gap-[3px]`,children:r.map((e,r)=>{let i=e.cases-e.passed;return(0,j.jsx)(`div`,{className:`flex h-full min-w-0 flex-1 cursor-default flex-col justify-end`,onMouseEnter:()=>n(r),children:(0,j.jsxs)(`div`,{className:p(`flex w-full flex-col justify-end gap-[2px] transition-opacity`,t!==null&&t!==r&&`opacity-50`),style:{height:`${e.cases/o*100}%`},children:[i>0&&(0,j.jsx)(`span`,{className:`min-h-[2px] w-full rounded-t-[4px] bg-fail`,style:{flexGrow:i}}),e.passed>0&&(0,j.jsx)(`span`,{className:p(`min-h-[2px] w-full bg-pass`,!i&&`rounded-t-[4px]`),style:{flexGrow:e.passed}})]})},e.day)})}),l&&(0,j.jsxs)(`div`,{role:`status`,className:`pointer-events-none absolute z-[2] w-max max-w-[220px] -translate-x-1/2 -translate-y-[calc(100%+8px)] rounded-[10px] border border-line-soft bg-bg px-3 py-2 text-[12.5px] shadow-composer`,style:{left:`${Math.min(88,Math.max(12,(t+.5)/r.length*100))}%`,top:`${(1-l.cases/o)*100}%`},children:[(0,j.jsx)(`b`,{className:`block text-ink`,children:R(l.day)}),(0,j.jsxs)(`span`,{className:`block text-ink-2 tabular-nums`,children:[l.passed,` passed, `,l.cases-l.passed,` failed · `,z([l]),`%`]}),(0,j.jsx)(`span`,{className:`block text-muted`,children:g(l.runs,`run`)})]})]}),(0,j.jsx)(`span`,{}),(0,j.jsx)(`div`,{"aria-hidden":`true`,className:`mt-1 flex gap-[3px] text-[11px] text-muted`,children:r.map((e,t)=>(0,j.jsx)(`span`,{className:`min-w-0 flex-1 text-center whitespace-nowrap`,children:t%c===0&&(0,j.jsx)(`span`,{className:p(t/c%2==1&&`hidden @2xl:inline`),children:R(e.day)})},e.day))})]}),(0,j.jsxs)(`table`,{className:`sr-only`,children:[(0,j.jsx)(`caption`,{children:`Cases by day`}),(0,j.jsx)(`thead`,{children:(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`th`,{children:`Day`}),(0,j.jsx)(`th`,{children:`Runs`}),(0,j.jsx)(`th`,{children:`Passed`}),(0,j.jsx)(`th`,{children:`Failed`})]})}),(0,j.jsx)(`tbody`,{children:r.map(e=>(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`td`,{children:e.day}),(0,j.jsx)(`td`,{children:e.runs}),(0,j.jsx)(`td`,{children:e.passed}),(0,j.jsx)(`td`,{children:e.cases-e.passed})]},e.day))})]})]})}function U({project:n,build:r,onBuilt:i}){let[a,c]=(0,A.useState)(r),[l,u]=(0,A.useState)(``),m=!!a?.running;(0,A.useEffect)(()=>{if(!m)return;let e=setInterval(async()=>{try{let e=await o.buildStatus();c(e),e&&!e.running&&i()}catch{}},1200);return()=>clearInterval(e)},[m,i]);let _=n.cases?Math.round(n.passed/n.cases*100):null,v=z(n.days.slice(-7)),y=z(n.days.slice(-14,-7)),b=v!==null&&y!==null?v-y:null,x=[{label:`Runs`,value:String(n.runs),sub:n.runs?`${R(String(n.from).slice(0,10))} – ${R(String(n.to).slice(0,10))}`:void 0},{label:`Cases run`,value:String(n.cases),sub:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`span`,{className:`text-pass`,children:[n.passed,` passed`]}),` · `,(0,j.jsxs)(`span`,{className:p(n.failed&&`text-fail`),children:[n.failed,` failed`]})]})},{label:`Tokens`,value:e(n.tokens),sub:n.cost?s(n.cost.amount,n.cost.currency):void 0}];return(0,j.jsxs)(`section`,{"aria-labelledby":`project-h`,className:`flex min-w-0 flex-col gap-4`,children:[(0,j.jsx)(`h2`,{id:`project-h`,className:`sr-only`,children:`Project report`}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`min-w-0 flex-[1_1_240px] text-[13px] text-muted`,children:n.page?`The HTML report was built ${N(n.page.builtAt)}.`:`Every run, taken together. The HTML report has not been built yet.`}),n.page&&(0,j.jsxs)(h,{size:`sm`,onClick:async()=>u(await t(n.page.file)),children:[(0,j.jsx)(S,{size:14,"aria-hidden":`true`}),`Open HTML report`]}),(0,j.jsx)(h,{size:`sm`,variant:`outline`,disabled:m,onClick:async()=>{u(``);try{c(await o.build())}catch(e){u(e.message)}},children:m?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(f,{state:`working`,px:14}),`Building…`]}):n.page?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(T,{size:14,"aria-hidden":`true`}),`Rebuild`]}):`Build HTML report`})]}),l&&(0,j.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:l}),a&&(a.running||a.ok===!1)&&(0,j.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[!a.running&&(0,j.jsx)(`p`,{className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:`forgeqe bi build stopped with a problem; its output is below.`}),(0,j.jsx)(`pre`,{"aria-label":`forgeqe bi build output`,"aria-live":`polite`,className:`m-0 max-h-[200px] overflow-auto rounded-[12px] bg-surface-muted px-4 py-3 font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-ink-2 [overflow-wrap:anywhere]`,children:a.lines.length?a.lines.join(`
2
- `):`Starting…`})]}),n.runs?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{className:`grid grid-cols-2 gap-px overflow-hidden rounded-[14px] border border-line-soft bg-line-soft @2xl:grid-cols-[1.4fr_1fr_1fr_1fr]`,children:[(0,j.jsxs)(`div`,{className:`col-span-2 flex flex-col gap-1 bg-bg px-5 py-4 @2xl:col-span-1`,children:[(0,j.jsx)(`span`,{className:`text-[13px] text-muted`,children:`Pass rate`}),(0,j.jsx)(`span`,{className:p(`text-[34px] leading-none font-semibold tracking-[-0.02em] tabular-nums`,_!==null&&_<80?`text-fail`:`text-ink`),children:_===null?`–`:`${_}%`}),b!==null&&(0,j.jsxs)(`span`,{className:p(`inline-flex items-center gap-1 text-[12.5px]`,b>0?`text-pass`:b<0?`text-fail`:`text-muted`),children:[b>0?(0,j.jsx)(w,{size:14,"aria-hidden":`true`}):b<0?(0,j.jsx)(C,{size:14,"aria-hidden":`true`}):null,b===0?`Same as the week before`:`${b>0?`Up`:`Down`} ${Math.abs(b)} ${Math.abs(b)===1?`point`:`points`} on the week before`]})]}),x.map(e=>(0,j.jsxs)(`div`,{className:`flex flex-col gap-1 bg-bg px-5 py-4 last:col-span-2 @2xl:last:col-span-1`,children:[(0,j.jsx)(`span`,{className:`text-[13px] text-muted`,children:e.label}),(0,j.jsx)(`span`,{className:`text-[22px] leading-tight font-semibold tabular-nums`,children:e.value}),e.sub&&(0,j.jsx)(`span`,{className:`text-[12.5px] text-muted tabular-nums`,children:e.sub})]},e.label))]}),(0,j.jsx)(B,{title:`Cases by day`,note:`The last ${g(Math.min(30,n.days.length),`day`)} with runs. Hover a day for its pass rate.`,children:(0,j.jsx)(H,{days:n.days})}),(0,j.jsxs)(`div`,{className:`grid gap-4 @3xl:grid-cols-2`,children:[(0,j.jsx)(B,{title:`Fails most`,note:`Cases that failed in the most runs.`,children:n.failing.length===0?(0,j.jsx)(`p`,{className:`m-0 py-2 text-sm text-muted`,children:`No case has failed.`}):(0,j.jsx)(`ul`,{className:`m-0 list-none p-0`,children:n.failing.slice(0,8).map(e=>(0,j.jsxs)(`li`,{className:`flex flex-col gap-1 border-t border-line-soft py-2 first:border-t-0 first:pt-0`,children:[(0,j.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,j.jsx)(d,{size:14,"aria-hidden":`true`,className:`flex-none text-fail`}),(0,j.jsxs)(`span`,{className:`min-w-0 flex-1 truncate text-[14px]`,title:e.title,children:[e.id&&(0,j.jsx)(`span`,{className:`font-mono text-[12.5px] text-ink-2`,children:e.id}),` `,e.title]}),(0,j.jsx)(`span`,{className:`flex-none text-[12px] text-muted`,children:k(e.lastFailed)})]}),(0,j.jsxs)(`span`,{className:`flex min-w-0 items-center gap-3 pl-[22px]`,children:[(0,j.jsx)(V,{part:e.failed,whole:e.runs,tone:`fail`,label:`failed ${e.failed} of ${e.runs}`}),e.summary&&(0,j.jsx)(`span`,{className:`min-w-0 truncate text-[12.5px] text-muted`,children:e.summary.replace(/[*_`#>[\]]/g,``)})]})]},e.id||e.title))})}),(0,j.jsx)(B,{title:`Defects`,note:`Failures grouped by their cause.`,children:n.defects.length===0?(0,j.jsx)(`p`,{className:`m-0 py-2 text-sm text-muted`,children:`None found.`}):(0,j.jsx)(`ul`,{className:`m-0 list-none p-0`,children:n.defects.slice(0,8).map(e=>(0,j.jsxs)(`li`,{className:`grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3 border-t border-line-soft py-2 first:border-t-0 first:pt-0`,children:[(0,j.jsx)(`span`,{className:`min-w-0 truncate text-[14px]`,title:e.title,children:e.title}),(0,j.jsxs)(`span`,{className:`text-[12.5px] whitespace-nowrap text-muted tabular-nums`,children:[g(e.cases,`case`),` · `,g(e.runs,`run`),e.lastSeen?` · ${k(e.lastSeen)}`:``]})]},e.title))})}),(0,j.jsx)(B,{title:`Flaky`,note:`Cases that both passed and failed.`,children:n.flaky.length===0?(0,j.jsx)(`p`,{className:`m-0 py-2 text-sm text-muted`,children:`None.`}):(0,j.jsx)(`ul`,{className:`m-0 list-none p-0`,children:n.flaky.slice(0,8).map(e=>(0,j.jsxs)(`li`,{className:`grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3 border-t border-line-soft py-2 first:border-t-0 first:pt-0`,children:[(0,j.jsxs)(`span`,{className:`min-w-0 truncate text-[14px]`,title:e.title,children:[e.id&&(0,j.jsx)(`span`,{className:`font-mono text-[12.5px] text-ink-2`,children:e.id}),` `,e.title]}),(0,j.jsx)(V,{part:e.failed,whole:e.runs,tone:`fail`,label:`${e.failed}/${e.runs} failed`})]},e.id||e.title))})}),(0,j.jsx)(B,{title:`By kind`,note:`Each kind of run and how often its cases passed.`,children:n.kinds.length===0?(0,j.jsx)(`p`,{className:`m-0 py-2 text-sm text-muted`,children:`No runs with results yet.`}):(0,j.jsx)(`ul`,{className:`m-0 list-none p-0`,children:n.kinds.map(e=>(0,j.jsxs)(`li`,{className:`grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-x-4 border-t border-line-soft py-2 first:border-t-0 first:pt-0`,children:[(0,j.jsx)(`span`,{className:`min-w-0 truncate text-[14px]`,children:M[e.scope]||e.scope}),(0,j.jsx)(`span`,{className:`text-[12.5px] text-muted tabular-nums`,children:g(e.runs,`run`)}),(0,j.jsx)(V,{part:e.passed,whole:e.cases,tone:`pass`,label:e.cases?`${Math.round(e.passed/e.cases*100)}% passed`:`no cases`})]},e.scope))})})]})]}):(0,j.jsxs)(`div`,{className:`flex flex-col items-start gap-2 rounded-[14px] border border-dashed border-line px-5 py-6`,children:[(0,j.jsx)(`span`,{className:`font-medium`,children:`No runs yet`}),(0,j.jsx)(`span`,{className:`max-w-[60ch] text-sm text-muted`,children:`Runs, suites and monitor rounds are taken together here once there are some: pass rate by day, the cases that fail most, flaky cases and defects.`})]})]})}function W({sub:e}){let[r,s]=(0,A.useState)(null),[c,u]=(0,A.useState)(``),[d,f]=(0,A.useState)(``),[g,y]=(0,A.useState)(``),[b,C]=(0,A.useState)(`all`),[w,T]=(0,A.useState)(I),[E,R]=(0,A.useState)(``),z=(0,A.useCallback)(()=>{o.list().then(s,e=>u(e.message))},[]);(0,A.useEffect)(z,[z]);let B=e===`project`?`project`:`execution`,V=r?.rows??null,H=g.toLowerCase().split(/\s+/).filter(Boolean),W=(0,A.useMemo)(()=>(V||[]).filter(e=>(!d||e.scope===d)&&H.every(t=>`${e.title} ${e.id} ${M[e.scope]}`.toLowerCase().includes(t))),[V,d,g]),G=W.filter(e=>F(e).tone===`fail`).length,K=b===`failed`?W.filter(e=>F(e).tone===`fail`):W;(0,A.useEffect)(()=>T(I),[d,g,b]);let q=[...new Set((V||[]).map(e=>e.scope))];return(0,j.jsxs)(`div`,{className:`flex min-h-screen flex-col`,children:[(0,j.jsx)(m,{}),(0,j.jsxs)(`main`,{className:p(_,`@container flex-auto gap-4`),children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-end gap-x-6 gap-y-2`,children:[(0,j.jsx)(v,{icon:a,size:`lg`}),(0,j.jsx)(`h1`,{className:`m-0 text-[26px] font-semibold tracking-[-0.01em]`,children:`Reports`}),(0,j.jsx)(`nav`,{"aria-label":`Reports`,className:`flex gap-1 rounded-[10px] bg-surface-strong p-1`,children:[[`execution`,`Execution reports`,i(`reports`)],[`project`,`Project report`,i(`reports`,`project`)]].map(([e,t,n])=>(0,j.jsx)(`a`,{href:n,"aria-current":B===e?`page`:void 0,className:p(`inline-flex min-h-9 items-center rounded-[7px] px-4 text-sm font-medium no-underline`,B===e?`bg-bg text-ink shadow-composer hover:text-ink`:`text-ink-2 hover:text-ink`),children:t},e))})]}),c&&(0,j.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:c}),!r&&!c&&(0,j.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Loading…`}),r&&B===`project`&&(0,j.jsx)(U,{project:r.project,build:r.build,onBuilt:z}),r&&B===`execution`&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Every report ForgeQE generated, newest first. Open one to see it in full in a new tab.`}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsxs)(`div`,{className:`relative min-w-0 flex-[1_1_240px]`,children:[(0,j.jsx)(D,{size:16,"aria-hidden":`true`,className:`pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-muted`}),(0,j.jsx)(`label`,{htmlFor:`report-search`,className:`sr-only`,children:`Find a report`}),(0,j.jsx)(l,{id:`report-search`,type:`search`,value:g,onChange:e=>y(e.target.value),placeholder:`Find a report`,className:`h-9 pl-9`})]}),[[`all`,`All`,W.length],[`failed`,`Failed`,G]].map(([e,t,n])=>(0,j.jsxs)(`button`,{type:`button`,"aria-pressed":b===e,onClick:()=>C(e),className:p(`inline-flex min-h-8 cursor-pointer items-center gap-1 rounded-[8px] border px-3 text-[13px] font-medium`,b===e?`border-accent bg-accent-soft text-ink`:`border-transparent bg-surface-strong text-ink-2 hover:bg-line hover:text-ink`),children:[t,(0,j.jsx)(`span`,{className:p(`tabular-nums`,e===`failed`&&n?`text-fail`:``),children:n})]},e)),q.length>1&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`label`,{htmlFor:`report-kind`,className:`sr-only`,children:`Kind`}),(0,j.jsxs)(n,{id:`report-kind`,value:d,onChange:e=>f(e.target.value),className:`h-8 w-auto py-0 pr-7 pl-3 text-[13px]`,children:[(0,j.jsx)(`option`,{value:``,children:`Every kind`}),q.map(e=>(0,j.jsx)(`option`,{value:e,children:M[e]},e))]})]})]}),E&&(0,j.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:E}),(0,j.jsxs)(`div`,{className:`rounded-[14px] border border-line-soft bg-bg`,children:[(0,j.jsxs)(`div`,{"aria-hidden":`true`,className:`hidden grid-cols-[minmax(0,1fr)_110px_150px_100px_128px] items-center gap-x-4 border-b border-line-soft px-4 py-2 text-[12px] font-semibold text-muted @3xl:grid`,children:[(0,j.jsx)(`span`,{children:`Report`}),(0,j.jsx)(`span`,{children:`Kind`}),(0,j.jsx)(`span`,{children:`Result`}),(0,j.jsx)(`span`,{className:`text-right`,children:`When`}),(0,j.jsx)(`span`,{})]}),(0,j.jsxs)(`ul`,{"aria-label":`Execution reports`,className:`m-0 list-none p-1.5`,children:[K.length===0&&(0,j.jsx)(`li`,{className:`px-3 py-4 text-sm text-muted`,children:r.rows.length?`Nothing matches.`:`No reports yet. Runs, suites and monitor rounds show here once they have run.`}),K.slice(0,w).map((e,n,r)=>{let i=O(e.startedAt),a=F(e);return(0,j.jsxs)(`li`,{className:`contents`,children:[(n===0||O(r[n-1].startedAt)!==i)&&(0,j.jsx)(`span`,{className:`block px-3 pt-3 pb-1 text-[12px] font-semibold text-muted`,children:i}),(0,j.jsxs)(`div`,{className:`grid min-h-12 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-x-3 rounded-[10px] px-3 py-1.5 hover:bg-surface-muted @3xl:grid-cols-[auto_minmax(0,1fr)_110px_150px_100px_128px] @3xl:gap-x-4`,children:[(0,j.jsx)(L,{r:e}),(0,j.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,j.jsx)(`span`,{className:`truncate text-[14px] font-medium`,title:e.title,children:e.title}),(0,j.jsx)(`span`,{className:`truncate text-[12px] text-muted @3xl:hidden`,children:[M[e.scope],e.scope===`page`||!e.counts.total?``:`${e.counts.passed}/${e.counts.total} passed`,k(e.startedAt)].filter(Boolean).join(` · `)})]}),(0,j.jsx)(`span`,{className:`hidden truncate text-[13px] text-muted @3xl:block`,children:M[e.scope]}),(0,j.jsxs)(`span`,{className:`hidden truncate text-[13px] text-muted tabular-nums @3xl:block`,children:[(0,j.jsx)(`span`,{className:p(a.tone===`fail`&&`text-fail`),children:e.scope===`page`?`Report`:e.counts.total?`${e.counts.passed}/${e.counts.total} passed`:a.label}),P(e.ms)?` · ${P(e.ms)}`:``]}),(0,j.jsx)(`span`,{className:`hidden text-right text-[13px] text-muted tabular-nums @3xl:block`,title:N(e.startedAt),children:k(e.startedAt)}),(0,j.jsx)(`span`,{className:`flex min-w-0 justify-end`,children:e.report?(0,j.jsxs)(h,{size:`sm`,"aria-label":`Open the report of ${e.title} in a new tab`,onClick:async()=>R(await t(e.report)),children:[(0,j.jsx)(S,{size:14,"aria-hidden":`true`}),(0,j.jsx)(`span`,{className:`hidden @md:inline`,children:`Open report`})]}):(0,j.jsx)(x,{path:e.folder,children:`Folder`})})]})]},e.key)})]}),(K.length>w||r.total>r.rows.length)&&(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-t border-line-soft px-4 py-2.5 text-[13px] text-muted`,children:[(0,j.jsxs)(`span`,{children:[`Showing `,Math.min(w,K.length),` of `,K.length,r.total>r.rows.length?` (the newest ${r.rows.length} of ${r.total})`:``]}),K.length>w&&(0,j.jsxs)(h,{size:`sm`,onClick:()=>T(w+I),children:[`Show `,Math.min(I,K.length-w),` more`]})]})]})]})]})]})}export{W as Reports};
1
+ import{E as e,Fn as t,Gn as n,Gt as r,H as i,Hn as a,Jt as o,K as s,O as c,U as l,at as u,ct as d,it as f,lt as p,nn as m,nt as h,q as g,r as _,st as v,t as y}from"./frame-CHQgOaj6.js";import{t as b}from"./circle-dashed-CQKCycSk.js";import{t as x}from"./markdown-BPBR6Fva.js";import{t as S}from"./external-link-B45wnQ3R.js";import{n as C,t as w}from"./trending-up-Bypj2D7Z.js";import{E as T,j as E,w as D}from"./index-Hd8gmpz5.js";import{n as O,t as k}from"./when-CHnpLdYw.js";var A=n(a(),1),j=v(),M={suite:`Suite`,monitor:`Monitor round`,run:`Browser run`,explore:`Exploration`,api:`API run`,desktop:`Desktop run`,mobile:`Mobile run`,page:`Report page`},N=e=>{if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString([],{month:`short`,day:`numeric`,...t.getFullYear()===new Date().getFullYear()?{}:{year:`numeric`},hour:`numeric`,minute:`2-digit`})},P=e=>{if(!e)return``;let t=Math.round(e/1e3);return t<60?`${t}s`:t<3600?`${Math.floor(t/60)}m ${t%60}s`:`${Math.floor(t/3600)}h ${Math.floor(t%3600/60)}m`};function F(e){return e.scope===`page`?{tone:`neutral`,label:`Report`}:e.counts.total?e.counts.failed?{tone:`fail`,label:`${e.counts.failed} failed`}:e.stopped||e.counts.other?{tone:`warn`,label:e.stopped?`Stopped`:`${e.counts.other} not run`}:{tone:`pass`,label:`Passed`}:{tone:`neutral`,label:`No results`}}var I=50;function L({r:e}){let t=F(e),n=e.scope===`page`?r:t.tone===`pass`?E:t.tone===`fail`?m:b;return(0,j.jsx)(n,{size:16,"aria-label":t.label,className:d(`flex-none`,t.tone===`pass`?`text-pass`:t.tone===`fail`?`text-fail`:t.tone===`warn`?`text-warn`:`text-muted`)})}var R=e=>{let t=new Date(`${e}T12:00:00`);return Number.isNaN(t.getTime())?e:t.toLocaleDateString([],{day:`numeric`,month:`short`})},z=e=>{let t=e.reduce((e,t)=>e+t.cases,0);return t?Math.round(e.reduce((e,t)=>e+t.passed,0)/t*100):null};function B({title:e,note:t,children:n,className:r}){return(0,j.jsxs)(`section`,{className:d(`flex min-w-0 flex-col rounded-[14px] border border-line-soft bg-bg px-4 py-3.5`,r),children:[(0,j.jsx)(`h3`,{className:`m-0 text-[15px] font-semibold`,children:e}),t&&(0,j.jsx)(`p`,{className:`m-0 mt-0.5 text-[12.5px] text-muted`,children:t}),(0,j.jsx)(`div`,{className:`mt-3 flex min-w-0 flex-col`,children:n})]})}function V({part:e,whole:t,tone:n,label:r}){return(0,j.jsxs)(`span`,{className:`flex flex-none items-center gap-2`,children:[(0,j.jsx)(`span`,{"aria-hidden":`true`,className:`h-1.5 w-16 flex-none overflow-hidden rounded-full bg-surface-strong`,children:(0,j.jsx)(`span`,{className:d(`block h-full rounded-full`,n===`pass`?`bg-pass`:n===`fail`?`bg-fail`:`bg-accent`),style:{width:`${t?Math.max(4,e/t*100):0}%`}})}),(0,j.jsx)(`span`,{className:`text-[12.5px] whitespace-nowrap text-ink-2 tabular-nums`,children:r})]})}function H({days:e}){let[t,n]=(0,A.useState)(null),r=e.slice(-30);if(!r.length)return(0,j.jsx)(`p`,{className:`m-0 py-6 text-sm text-muted`,children:`No runs with results yet.`});let i=Math.max(1,...r.map(e=>e.cases)),a=i<=4?1:Math.ceil(i/4/5)*5||1,o=Math.ceil(i/a)*a,s=[o,Math.round(o/2),0],c=Math.ceil(r.length/8),l=t===null?null:r[t];return(0,j.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,j.jsxs)(`div`,{"aria-hidden":`true`,className:`flex gap-4 text-[12.5px] text-ink-2`,children:[(0,j.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,j.jsx)(`span`,{className:`size-2.5 rounded-[3px] bg-pass`}),` Passed`]}),(0,j.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,j.jsx)(`span`,{className:`size-2.5 rounded-[3px] bg-fail`}),` Failed`]})]}),(0,j.jsxs)(`div`,{className:`relative grid grid-cols-[32px_minmax(0,1fr)] gap-x-2`,children:[(0,j.jsx)(`div`,{"aria-hidden":`true`,className:`flex h-[180px] flex-col justify-between text-right text-[11px] text-muted tabular-nums`,children:s.map(e=>(0,j.jsx)(`span`,{className:`-translate-y-1/2 first:translate-y-0 last:translate-y-0`,children:e},e))}),(0,j.jsxs)(`div`,{className:`relative h-[180px]`,onMouseLeave:()=>n(null),children:[s.map((e,t)=>(0,j.jsx)(`span`,{"aria-hidden":`true`,className:d(`absolute inset-x-0 border-t`,t===s.length-1?`border-line`:`border-line-soft`),style:{top:`${(1-e/o)*100}%`}},e)),(0,j.jsx)(`div`,{className:`absolute inset-0 flex items-end gap-[3px]`,children:r.map((e,r)=>{let i=e.cases-e.passed;return(0,j.jsx)(`div`,{className:`flex h-full min-w-0 flex-1 cursor-default flex-col justify-end`,onMouseEnter:()=>n(r),children:(0,j.jsxs)(`div`,{className:d(`flex w-full flex-col justify-end gap-[2px] transition-opacity`,t!==null&&t!==r&&`opacity-50`),style:{height:`${e.cases/o*100}%`},children:[i>0&&(0,j.jsx)(`span`,{className:`min-h-[2px] w-full rounded-t-[4px] bg-fail`,style:{flexGrow:i}}),e.passed>0&&(0,j.jsx)(`span`,{className:d(`min-h-[2px] w-full bg-pass`,!i&&`rounded-t-[4px]`),style:{flexGrow:e.passed}})]})},e.day)})}),l&&(0,j.jsxs)(`div`,{role:`status`,className:`pointer-events-none absolute z-[2] w-max max-w-[220px] -translate-x-1/2 -translate-y-[calc(100%+8px)] rounded-[10px] border border-line-soft bg-bg px-3 py-2 text-[12.5px] shadow-composer`,style:{left:`${Math.min(88,Math.max(12,(t+.5)/r.length*100))}%`,top:`${(1-l.cases/o)*100}%`},children:[(0,j.jsx)(`b`,{className:`block text-ink`,children:R(l.day)}),(0,j.jsxs)(`span`,{className:`block text-ink-2 tabular-nums`,children:[l.passed,` passed, `,l.cases-l.passed,` failed · `,z([l]),`%`]}),(0,j.jsx)(`span`,{className:`block text-muted`,children:p(l.runs,`run`)})]})]}),(0,j.jsx)(`span`,{}),(0,j.jsx)(`div`,{"aria-hidden":`true`,className:`mt-1 flex gap-[3px] text-[11px] text-muted`,children:r.map((e,t)=>(0,j.jsx)(`span`,{className:`min-w-0 flex-1 text-center whitespace-nowrap`,children:t%c===0&&(0,j.jsx)(`span`,{className:d(t/c%2==1&&`hidden @2xl:inline`),children:R(e.day)})},e.day))})]}),(0,j.jsxs)(`table`,{className:`sr-only`,children:[(0,j.jsx)(`caption`,{children:`Cases by day`}),(0,j.jsx)(`thead`,{children:(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`th`,{children:`Day`}),(0,j.jsx)(`th`,{children:`Runs`}),(0,j.jsx)(`th`,{children:`Passed`}),(0,j.jsx)(`th`,{children:`Failed`})]})}),(0,j.jsx)(`tbody`,{children:r.map(e=>(0,j.jsxs)(`tr`,{children:[(0,j.jsx)(`td`,{children:e.day}),(0,j.jsx)(`td`,{children:e.runs}),(0,j.jsx)(`td`,{children:e.passed}),(0,j.jsx)(`td`,{children:e.cases-e.passed})]},e.day))})]})]})}function U({project:n,build:r,onBuilt:i}){let[a,o]=(0,A.useState)(r),[l,h]=(0,A.useState)(``),g=!!a?.running;(0,A.useEffect)(()=>{if(!g)return;let e=setInterval(async()=>{try{let e=await t.buildStatus();o(e),e&&!e.running&&i()}catch{}},1200);return()=>clearInterval(e)},[g,i]);let _=n.cases?Math.round(n.passed/n.cases*100):null,v=z(n.days.slice(-7)),y=z(n.days.slice(-14,-7)),b=v!==null&&y!==null?v-y:null,x=[{label:`Runs`,value:String(n.runs),sub:n.runs?`${R(String(n.from).slice(0,10))} – ${R(String(n.to).slice(0,10))}`:void 0},{label:`Cases run`,value:String(n.cases),sub:(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`span`,{className:`text-pass`,children:[n.passed,` passed`]}),` · `,(0,j.jsxs)(`span`,{className:d(n.failed&&`text-fail`),children:[n.failed,` failed`]})]})},{label:`Tokens`,value:c(n.tokens),sub:n.cost?e(n.cost.amount,n.cost.currency):void 0}];return(0,j.jsxs)(`section`,{"aria-labelledby":`project-h`,className:`flex min-w-0 flex-col gap-4`,children:[(0,j.jsx)(`h2`,{id:`project-h`,className:`sr-only`,children:`Project report`}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsx)(`span`,{className:`min-w-0 flex-[1_1_240px] text-[13px] text-muted`,children:n.page?`The HTML report was built ${N(n.page.builtAt)}.`:`Every run, taken together. The HTML report has not been built yet.`}),n.page&&(0,j.jsxs)(u,{size:`sm`,onClick:async()=>h(await s(n.page.file)),children:[(0,j.jsx)(S,{size:14,"aria-hidden":`true`}),`Open HTML report`]}),(0,j.jsx)(u,{size:`sm`,variant:`outline`,disabled:g,onClick:async()=>{h(``);try{o(await t.build())}catch(e){h(e.message)}},children:g?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(f,{state:`working`,px:14}),`Building…`]}):n.page?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(T,{size:14,"aria-hidden":`true`}),`Rebuild`]}):`Build HTML report`})]}),l&&(0,j.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:l}),a&&(a.running||a.ok===!1)&&(0,j.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[!a.running&&(0,j.jsx)(`p`,{className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:`forgeqe bi build stopped with a problem; its output is below.`}),(0,j.jsx)(`pre`,{"aria-label":`forgeqe bi build output`,"aria-live":`polite`,className:`m-0 max-h-[200px] overflow-auto rounded-[12px] bg-surface-muted px-4 py-3 font-mono text-[12px] leading-relaxed whitespace-pre-wrap text-ink-2 [overflow-wrap:anywhere]`,children:a.lines.length?a.lines.join(`
2
+ `):`Starting…`})]}),n.runs?(0,j.jsxs)(j.Fragment,{children:[(0,j.jsxs)(`div`,{className:`grid grid-cols-2 gap-px overflow-hidden rounded-[14px] border border-line-soft bg-line-soft @2xl:grid-cols-[1.4fr_1fr_1fr_1fr]`,children:[(0,j.jsxs)(`div`,{className:`col-span-2 flex flex-col gap-1 bg-bg px-5 py-4 @2xl:col-span-1`,children:[(0,j.jsx)(`span`,{className:`text-[13px] text-muted`,children:`Pass rate`}),(0,j.jsx)(`span`,{className:d(`text-[34px] leading-none font-semibold tracking-[-0.02em] tabular-nums`,_!==null&&_<80?`text-fail`:`text-ink`),children:_===null?`–`:`${_}%`}),b!==null&&(0,j.jsxs)(`span`,{className:d(`inline-flex items-center gap-1 text-[12.5px]`,b>0?`text-pass`:b<0?`text-fail`:`text-muted`),children:[b>0?(0,j.jsx)(w,{size:14,"aria-hidden":`true`}):b<0?(0,j.jsx)(C,{size:14,"aria-hidden":`true`}):null,b===0?`Same as the week before`:`${b>0?`Up`:`Down`} ${Math.abs(b)} ${Math.abs(b)===1?`point`:`points`} on the week before`]})]}),x.map(e=>(0,j.jsxs)(`div`,{className:`flex flex-col gap-1 bg-bg px-5 py-4 last:col-span-2 @2xl:last:col-span-1`,children:[(0,j.jsx)(`span`,{className:`text-[13px] text-muted`,children:e.label}),(0,j.jsx)(`span`,{className:`text-[22px] leading-tight font-semibold tabular-nums`,children:e.value}),e.sub&&(0,j.jsx)(`span`,{className:`text-[12.5px] text-muted tabular-nums`,children:e.sub})]},e.label))]}),(0,j.jsx)(B,{title:`Cases by day`,note:`The last ${p(Math.min(30,n.days.length),`day`)} with runs. Hover a day for its pass rate.`,children:(0,j.jsx)(H,{days:n.days})}),(0,j.jsxs)(`div`,{className:`grid gap-4 @3xl:grid-cols-2`,children:[(0,j.jsx)(B,{title:`Fails most`,note:`Cases that failed in the most runs.`,children:n.failing.length===0?(0,j.jsx)(`p`,{className:`m-0 py-2 text-sm text-muted`,children:`No case has failed.`}):(0,j.jsx)(`ul`,{className:`m-0 list-none p-0`,children:n.failing.slice(0,8).map(e=>(0,j.jsxs)(`li`,{className:`flex flex-col gap-1 border-t border-line-soft py-2 first:border-t-0 first:pt-0`,children:[(0,j.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,j.jsx)(m,{size:14,"aria-hidden":`true`,className:`flex-none text-fail`}),(0,j.jsxs)(`span`,{className:`min-w-0 flex-1 truncate text-[14px]`,title:e.title,children:[e.id&&(0,j.jsx)(`span`,{className:`font-mono text-[12.5px] text-ink-2`,children:e.id}),` `,e.title]}),(0,j.jsx)(`span`,{className:`flex-none text-[12px] text-muted`,children:k(e.lastFailed)})]}),(0,j.jsxs)(`span`,{className:`flex min-w-0 items-center gap-3 pl-[22px]`,children:[(0,j.jsx)(V,{part:e.failed,whole:e.runs,tone:`fail`,label:`failed ${e.failed} of ${e.runs}`}),e.summary&&(0,j.jsx)(`span`,{className:`min-w-0 truncate text-[12.5px] text-muted`,children:e.summary.replace(/[*_`#>[\]]/g,``)})]})]},e.id||e.title))})}),(0,j.jsx)(B,{title:`Defects`,note:`Failures grouped by their cause.`,children:n.defects.length===0?(0,j.jsx)(`p`,{className:`m-0 py-2 text-sm text-muted`,children:`None found.`}):(0,j.jsx)(`ul`,{className:`m-0 list-none p-0`,children:n.defects.slice(0,8).map(e=>(0,j.jsxs)(`li`,{className:`grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3 border-t border-line-soft py-2 first:border-t-0 first:pt-0`,children:[(0,j.jsx)(`span`,{className:`min-w-0 truncate text-[14px]`,title:e.title,children:e.title}),(0,j.jsxs)(`span`,{className:`text-[12.5px] whitespace-nowrap text-muted tabular-nums`,children:[p(e.cases,`case`),` · `,p(e.runs,`run`),e.lastSeen?` · ${k(e.lastSeen)}`:``]})]},e.title))})}),(0,j.jsx)(B,{title:`Flaky`,note:`Cases that both passed and failed.`,children:n.flaky.length===0?(0,j.jsx)(`p`,{className:`m-0 py-2 text-sm text-muted`,children:`None.`}):(0,j.jsx)(`ul`,{className:`m-0 list-none p-0`,children:n.flaky.slice(0,8).map(e=>(0,j.jsxs)(`li`,{className:`grid grid-cols-[minmax(0,1fr)_auto] items-center gap-x-3 border-t border-line-soft py-2 first:border-t-0 first:pt-0`,children:[(0,j.jsxs)(`span`,{className:`min-w-0 truncate text-[14px]`,title:e.title,children:[e.id&&(0,j.jsx)(`span`,{className:`font-mono text-[12.5px] text-ink-2`,children:e.id}),` `,e.title]}),(0,j.jsx)(V,{part:e.failed,whole:e.runs,tone:`fail`,label:`${e.failed}/${e.runs} failed`})]},e.id||e.title))})}),(0,j.jsx)(B,{title:`By kind`,note:`Each kind of run and how often its cases passed.`,children:n.kinds.length===0?(0,j.jsx)(`p`,{className:`m-0 py-2 text-sm text-muted`,children:`No runs with results yet.`}):(0,j.jsx)(`ul`,{className:`m-0 list-none p-0`,children:n.kinds.map(e=>(0,j.jsxs)(`li`,{className:`grid grid-cols-[minmax(0,1fr)_auto_auto] items-center gap-x-4 border-t border-line-soft py-2 first:border-t-0 first:pt-0`,children:[(0,j.jsx)(`span`,{className:`min-w-0 truncate text-[14px]`,children:M[e.scope]||e.scope}),(0,j.jsx)(`span`,{className:`text-[12.5px] text-muted tabular-nums`,children:p(e.runs,`run`)}),(0,j.jsx)(V,{part:e.passed,whole:e.cases,tone:`pass`,label:e.cases?`${Math.round(e.passed/e.cases*100)}% passed`:`no cases`})]},e.scope))})})]})]}):(0,j.jsxs)(`div`,{className:`flex flex-col items-start gap-2 rounded-[14px] border border-dashed border-line px-5 py-6`,children:[(0,j.jsx)(`span`,{className:`font-medium`,children:`No runs yet`}),(0,j.jsx)(`span`,{className:`max-w-[60ch] text-sm text-muted`,children:`Runs, suites and monitor rounds are taken together here once there are some: pass rate by day, the cases that fail most, flaky cases and defects.`})]})]})}function W({sub:e}){let[n,r]=(0,A.useState)(null),[a,c]=(0,A.useState)(``),[f,p]=(0,A.useState)(``),[m,v]=(0,A.useState)(``),[b,C]=(0,A.useState)(`all`),[w,T]=(0,A.useState)(I),[E,R]=(0,A.useState)(``),z=(0,A.useCallback)(()=>{t.list().then(r,e=>c(e.message))},[]);(0,A.useEffect)(z,[z]);let B=e===`project`?`project`:`execution`,V=n?.rows??null,H=m.toLowerCase().split(/\s+/).filter(Boolean),W=(0,A.useMemo)(()=>(V||[]).filter(e=>(!f||e.scope===f)&&H.every(t=>`${e.title} ${e.id} ${M[e.scope]}`.toLowerCase().includes(t))),[V,f,m]),G=W.filter(e=>F(e).tone===`fail`).length,K=b===`failed`?W.filter(e=>F(e).tone===`fail`):W;(0,A.useEffect)(()=>T(I),[f,m,b]);let q=[...new Set((V||[]).map(e=>e.scope))];return(0,j.jsxs)(`div`,{className:`flex min-h-screen flex-col`,children:[(0,j.jsx)(_,{}),(0,j.jsxs)(`main`,{className:d(y,`@container flex-auto gap-4`),children:[(0,j.jsxs)(`div`,{className:`flex flex-wrap items-end gap-x-6 gap-y-2`,children:[(0,j.jsx)(h,{icon:o,size:`lg`}),(0,j.jsx)(`h1`,{className:`m-0 text-[26px] font-semibold tracking-[-0.01em]`,children:`Reports`}),(0,j.jsx)(`nav`,{"aria-label":`Reports`,className:`flex gap-1 rounded-[10px] bg-surface-strong p-1`,children:[[`execution`,`Execution reports`,g(`reports`)],[`project`,`Project report`,g(`reports`,`project`)]].map(([e,t,n])=>(0,j.jsx)(`a`,{href:n,"aria-current":B===e?`page`:void 0,className:d(`inline-flex min-h-9 items-center rounded-[7px] px-4 text-sm font-medium no-underline`,B===e?`bg-bg text-ink shadow-composer hover:text-ink`:`text-ink-2 hover:text-ink`),children:t},e))})]}),a&&(0,j.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:a}),!n&&!a&&(0,j.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Loading…`}),n&&B===`project`&&(0,j.jsx)(U,{project:n.project,build:n.build,onBuilt:z}),n&&B===`execution`&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Every report ForgeQE generated, newest first. Open one to see it in full in a new tab.`}),(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,j.jsxs)(`div`,{className:`relative min-w-0 flex-[1_1_240px]`,children:[(0,j.jsx)(D,{size:16,"aria-hidden":`true`,className:`pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-muted`}),(0,j.jsx)(`label`,{htmlFor:`report-search`,className:`sr-only`,children:`Find a report`}),(0,j.jsx)(i,{id:`report-search`,type:`search`,value:m,onChange:e=>v(e.target.value),placeholder:`Find a report`,className:`h-9 pl-9`})]}),[[`all`,`All`,W.length],[`failed`,`Failed`,G]].map(([e,t,n])=>(0,j.jsxs)(`button`,{type:`button`,"aria-pressed":b===e,onClick:()=>C(e),className:d(`inline-flex min-h-8 cursor-pointer items-center gap-1 rounded-[8px] border px-3 text-[13px] font-medium`,b===e?`border-accent bg-accent-soft text-ink`:`border-transparent bg-surface-strong text-ink-2 hover:bg-line hover:text-ink`),children:[t,(0,j.jsx)(`span`,{className:d(`tabular-nums`,e===`failed`&&n?`text-fail`:``),children:n})]},e)),q.length>1&&(0,j.jsxs)(j.Fragment,{children:[(0,j.jsx)(`label`,{htmlFor:`report-kind`,className:`sr-only`,children:`Kind`}),(0,j.jsxs)(l,{id:`report-kind`,value:f,onChange:e=>p(e.target.value),className:`h-8 w-auto py-0 pr-7 pl-3 text-[13px]`,children:[(0,j.jsx)(`option`,{value:``,children:`Every kind`}),q.map(e=>(0,j.jsx)(`option`,{value:e,children:M[e]},e))]})]})]}),E&&(0,j.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:E}),(0,j.jsxs)(`div`,{className:`rounded-[14px] border border-line-soft bg-bg`,children:[(0,j.jsxs)(`div`,{"aria-hidden":`true`,className:`hidden grid-cols-[minmax(0,1fr)_110px_150px_100px_128px] items-center gap-x-4 border-b border-line-soft px-4 py-2 text-[12px] font-semibold text-muted @3xl:grid`,children:[(0,j.jsx)(`span`,{children:`Report`}),(0,j.jsx)(`span`,{children:`Kind`}),(0,j.jsx)(`span`,{children:`Result`}),(0,j.jsx)(`span`,{className:`text-right`,children:`When`}),(0,j.jsx)(`span`,{})]}),(0,j.jsxs)(`ul`,{"aria-label":`Execution reports`,className:`m-0 list-none p-1.5`,children:[K.length===0&&(0,j.jsx)(`li`,{className:`px-3 py-4 text-sm text-muted`,children:n.rows.length?`Nothing matches.`:`No reports yet. Runs, suites and monitor rounds show here once they have run.`}),K.slice(0,w).map((e,t,n)=>{let r=O(e.startedAt),i=F(e);return(0,j.jsxs)(`li`,{className:`contents`,children:[(t===0||O(n[t-1].startedAt)!==r)&&(0,j.jsx)(`span`,{className:`block px-3 pt-3 pb-1 text-[12px] font-semibold text-muted`,children:r}),(0,j.jsxs)(`div`,{className:`grid min-h-12 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-x-3 rounded-[10px] px-3 py-1.5 hover:bg-surface-muted @3xl:grid-cols-[auto_minmax(0,1fr)_110px_150px_100px_128px] @3xl:gap-x-4`,children:[(0,j.jsx)(L,{r:e}),(0,j.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,j.jsx)(`span`,{className:`truncate text-[14px] font-medium`,title:e.title,children:e.title}),(0,j.jsx)(`span`,{className:`truncate text-[12px] text-muted @3xl:hidden`,children:[M[e.scope],e.scope===`page`||!e.counts.total?``:`${e.counts.passed}/${e.counts.total} passed`,k(e.startedAt)].filter(Boolean).join(` · `)})]}),(0,j.jsx)(`span`,{className:`hidden truncate text-[13px] text-muted @3xl:block`,children:M[e.scope]}),(0,j.jsxs)(`span`,{className:`hidden truncate text-[13px] text-muted tabular-nums @3xl:block`,children:[(0,j.jsx)(`span`,{className:d(i.tone===`fail`&&`text-fail`),children:e.scope===`page`?`Report`:e.counts.total?`${e.counts.passed}/${e.counts.total} passed`:i.label}),P(e.ms)?` · ${P(e.ms)}`:``]}),(0,j.jsx)(`span`,{className:`hidden text-right text-[13px] text-muted tabular-nums @3xl:block`,title:N(e.startedAt),children:k(e.startedAt)}),(0,j.jsx)(`span`,{className:`flex min-w-0 justify-end`,children:e.report?(0,j.jsxs)(u,{size:`sm`,"aria-label":`Open the report of ${e.title} in a new tab`,onClick:async()=>R(await s(e.report)),children:[(0,j.jsx)(S,{size:14,"aria-hidden":`true`}),(0,j.jsx)(`span`,{className:`hidden @md:inline`,children:`Open report`})]}):(0,j.jsx)(x,{path:e.folder,children:`Folder`})})]})]},e.key)})]}),(K.length>w||n.total>n.rows.length)&&(0,j.jsxs)(`div`,{className:`flex flex-wrap items-center justify-between gap-3 border-t border-line-soft px-4 py-2.5 text-[13px] text-muted`,children:[(0,j.jsxs)(`span`,{children:[`Showing `,Math.min(w,K.length),` of `,K.length,n.total>n.rows.length?` (the newest ${n.rows.length} of ${n.total})`:``]}),K.length>w&&(0,j.jsxs)(u,{size:`sm`,onClick:()=>T(w+I),children:[`Show `,Math.min(I,K.length-w),` more`]})]})]})]})]})]})}export{W as Reports};
@@ -0,0 +1,8 @@
1
+ import{Gn as e,Hn as t,Kt as n,Mt as r,St as i,Ut as a,_n as o,an as s,at as c,ct as l,it as u,lt as d,on as f,rt as p,st as m,ut as h}from"./frame-CHQgOaj6.js";import{a as g,n as _,r as v,t as y}from"./markdown-BPBR6Fva.js";import{A as ee,M as te,a as b,i as x,o as S,s as ne}from"./index-Hd8gmpz5.js";var C={name:`message-circle-question-mark`,size:24,node:[[`path`,{d:`M2.992 16.342a2 2 0 0 1 .094 1.167l-1.065 3.29a1 1 0 0 0 1.236 1.168l3.413-.998a2 2 0 0 1 1.099.092 10 10 0 1 0-4.777-4.719`,key:`1sd12s`}],[`path`,{d:`M9.09 9a3 3 0 0 1 5.83 1c0 2-3 3-3 3`,key:`1u773s`}],[`path`,{d:`M12 17h.01`,key:`p32p05`}]],aliases:[`message-circle-question`]};C.node;var re=o(C),w={name:`square-terminal`,size:24,node:[[`path`,{d:`m7 11 2-2-2-2`,key:`1lz0vl`}],[`path`,{d:`M11 13h4`,key:`1p7l4v`}],[`rect`,{width:`18`,height:`18`,x:`3`,y:`3`,rx:`2`,ry:`2`,key:`1m3agn`}]],aliases:[`terminal-square`]};w.node;var ie=o(w),T=e(t(),1),E=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:{},D=e=>typeof e==`string`?e:e==null?``:String(e),ae=(e,t=400)=>e.length>t?`${e.slice(0,t-1)}…`:e,O=e=>typeof e==`number`?` in ${Math.round(e/1e3)}s`:``;function k(e,t=400){return ae(e.replace(/\s+/g,` `).trim(),t).replace(/([\\`*_[\]<>#|~!])/g,`\\$1`)}function A(e){let t=e.replace(/\s+/g,` `).trim();if(!t)return``;let n=t.includes("`")?"``":"`";return`${n}${n==="``"?` `:``}${t}${n==="``"?` `:``}${n}`}function j(e,t){return/^https?:\/\/[^\s)]+$/i.test(t)?`[${k(e||t,120)}](${t})`:k(e)}var M=e=>[A(D(E(e).id)),k(D(E(e).title),200)].filter(Boolean).join(` `);function N(e){return e.replace(/<!--[\s\S]*?(?:-->|$)/g,``).trim()}function oe(e){return e.replace(/\[((?:\\.|[^\]\\])*)\]\(https?:\/\/[^\s)]+\)/g,`$1`).replace(/\\(.)/g,`$1`).replace(/[*`]/g,``)}var P=(e,t)=>({tone:e,kind:`item`,md:t}),F=(e,t)=>({tone:e,kind:`sub`,md:t});function I(e,t=``){let n=t||(e.agent&&e.agent!==`forgeqe`?`**${k(D(e.agent))}:** `:``);switch(e.kind){case`info`:return P(`info`,`${n}${k(D(e.text))}`);case`start`:return P(`dim`,`${n}→ ${A(D(e.tool))}${e.text&&e.text!==e.tool?` ${k(D(e.text),200)}`:``}`);case`tool`:{let t=E(e.file);return P(e.ok===!1?`warn`:`dim`,`${n}${e.ok===!1?`⚠`:`✓`} ${k(D(e.text)||D(e.tool),240)}${t.path?` (${k(D(t.action))} ${A(D(t.path))})`:``}`)}case`say`:{let t=N(D(e.text));return t?P(`say`,`${n}*${k(t)}*`):null}case`test`:return Number(e.attempt)>0?P(e.ok?`ok`:`fail`,`${n}${e.ok?`✓`:`✗`} **Test, attempt ${k(D(e.attempt))}:** ${k(D(e.text),240)}`):P(e.ok?`ok`:`fail`,`${n}${e.ok?`✓`:`✗`} ${k(D(e.text),240)}`);case`plan`:{let t=Array.isArray(e.items)?e.items.map(E):[],r=t.find(e=>e.status===`in_progress`);return P(`info`,`${n}**Plan:** ${t.filter(e=>e.status===`completed`).length} of ${t.length} done${r?`; now: ${k(D(r.text))}`:``}`)}case`review`:return P(e.approved?`ok`:`warn`,`${n}**Review, attempt ${k(D(e.attempt))}:** ${e.approved?`approved`:`changes asked`}. ${k(D(e.summary),240)}`);case`attempt`:return P(`warn`,`${n}**Attempt ${k(D(e.attempt))} of ${k(D(e.max))}:** ${k(D(e.why),240)}`);case`answer`:return P(`dim`,`${n}Attempt ${k(D(e.attempt))}: ${k(D(e.notes)||`changed ${(Array.isArray(e.changed)?e.changed:[]).map(D).join(`, `)}`,240)}`);case`context`:return e.compacted?P(`info`,`${n}Context compacted: the conversation was summarised to make room.`):null;default:return null}}function se(e,t=``){switch(e.type){case`log`:return P(e.level===`error`?`fail`:e.level===`warn`?`warn`:`dim`,`${t}${e.level===`warn`||e.level===`error`?`⚠ `:``}${k(D(e.text))}`);case`step`:return P(`dim`,`${t}**Step ${k(D(e.step))}** · ${e.source===`memory`?`from memory`:k(D(e.category))} · ${j(D(e.title)||`untitled`,D(e.url))}`);case`memory`:return P(`info`,`${t}↻ ${k(D(e.text))}`);case`thought`:return F(`think`,`*${k(D(e.text))}*`);case`outcome`:return F(e.ok?`ok`:`fail`,`${e.ok?`✓`:`✗`} ${k(D(e.text),300)}`);case`done`:{let n=E(e.result);return P(n.status===`complete`?`ok`:`fail`,`${t}**${k(D(n.status))}:** ${k(D(n.summary))}`)}case`code`:return I(e,t);default:return null}}function ce(e){switch(e.type){case`run-start`:return{tone:`info`,kind:`head`,md:`Browser run: ${k(D(e.goal),200)}${e.url?` · ${j(D(e.url).replace(/^https?:\/\//,``),D(e.url))}`:``}`};case`run-event`:return se(E(e.event));case`run-done`:{let t=E(e.result),n=!e.error&&(t.outcome===`passed`||!t.outcome&&t.status===`complete`);return P(n?`ok`:`fail`,`${n?`✓`:`✗`} **Run ${n?`passed`:`failed`}**${O(e.ms)}: ${k(D(e.error)||D(t.summary))}${e.runDir?` · ${A(D(e.runDir))}`:``}`)}case`suite-start`:return{tone:`info`,kind:`head`,md:`Suite: ${(Array.isArray(e.cases)?e.cases:[]).length} cases, ${k(D(e.parallel))} at once`};case`suite-event`:{let t=E(e.event);if(t.type===`case-start`)return P(`info`,`**Case ${Number(t.index)+1} of ${k(D(t.total))}:** ${M(t.case)}`);if(t.type===`case-event`)return se(E(t.event),`${A(D(E(t.case).id))} `);if(t.type===`case-done`){let e=E(t.result);return P(e.status===`passed`?`ok`:`fail`,`${e.status===`passed`?`✓`:`✗`} ${M(e.case)}: **${k(D(e.status))}**${O(e.ms)}${e.summary?`. ${k(D(e.summary),240)}`:``}`)}return t.type===`code-start`?P(`info`,`${A(D(E(t.case).id))} writing its test`):t.type===`writeback`?P(`dim`,`Posted the result back: ${k(JSON.stringify(t.item),240)}`):null}case`suite-done`:{let t=(Array.isArray(E(e.suite).results)?E(e.suite).results:[]).map(E),n=t.filter(e=>e.status===`passed`).length;return P(n===t.length?`ok`:`fail`,`**Suite: ${n} of ${t.length} passed**${O(E(e.suite).ms)}`)}case`info`:return P(e.ok===!1?`fail`:e.ok===!0?`ok`:`info`,k(D(e.text)));case`agent`:return I(E(E(e.event)),`**Coding agent:** `);case`code-start`:return{tone:`info`,kind:`head`,md:`Writing a test: ${k(D(e.goal),200)}`};case`code-done`:return P(e.error?`fail`:`ok`,`${e.error?`✗`:`✓`} **Test ${e.error?`not written`:`written`}**${O(e.ms)}${e.error?`: ${k(D(e.error),240)}`:``}`);case`card`:{let t=E(e.card),n=(Array.isArray(t.body)?t.body:[]).map(D).filter(Boolean);return P(t.status===`ok`?`ok`:t.status===`fail`?`fail`:`info`,`**${k(D(t.title))}**${t.stats?` · ${k(D(t.stats))}`:``}${n.length?`: ${k(n.join(`; `),300)}`:``}`)}case`report`:return P(`ok`,`✓ Report saved: ${k(D(e.title))}`);case`call-start`:return P(`dim`,`→ ${k(D(e.text),240)}`);case`call`:return P(e.ok===!1?`warn`:`dim`,`${e.ok===!1?`⚠`:`✓`} ${k(D(e.text),240)}`);default:return null}}function le(e){let t=D(e.at)||D(e.t),n=null;switch(e.type){case`user`:n=P(`you`,`**You:** ${k(D(e.text),240)}`);break;case`agent`:n=I(E(e.event));break;case`tool`:n=ce(E(e.event));break;case`ask`:n=P(`you`,`**Asked:** ${k(D(E(e.question).title))}`);break;case`wait`:n=P(`you`,`**Waiting for you:** ${k(D(e.prompt))}`);break;case`answered`:n=P(`you`,`**You:** ${e.label===void 0?e.ok?`done, continue`:`cancel`:k(D(e.label))}`);break;case`turn_done`:n=P(e.outcome===`done`?`ok`:e.outcome===`stopped`?`warn`:`fail`,`**${e.outcome===`done`?`Done`:e.outcome===`stopped`?`Stopped`:e.outcome===`needs_input`?`Needs your input`:`Failed`}**${e.error?`: ${k(D(e.error),300)}`:``}`);break;case`settings`:n=P(`you`,`**Settings:** browser ${e.headed?`shown`:`headless`}, ${e.writeTests?`passed runs become tests`:`no tests written`}`);break;case`stderr`:n={tone:`dim`,kind:`out`,md:D(e.text)};break;case`error`:n=P(`warn`,`⚠ ${k(D(e.message))}`);break;case`fatal`:n=P(`fail`,`✗ **ForgeQE cannot go on:** ${k(D(e.message))}`);break;case`exit`:n=P(e.code===0?`dim`:`fail`,`ForgeQE stopped${e.code!==null&&e.code!==void 0?` (exit ${k(D(e.code))})`:``}${e.message?`: ${k(D(e.message))}`:``}`)}return n?{at:t,...n,plain:n.kind===`out`?n.md:oe(n.md)}:null}function ue(e,t){let n=e?Math.max(0,Math.round((Date.parse(t)-Date.parse(e))/1e3)):0;return Number.isFinite(n)?`+${Math.floor(n/60)}:${String(n%60).padStart(2,`0`)}`:``}function de(e,t,n){let r=n?[`## ${k(n,200)}`,``]:[],i=[],a=()=>{if(!i.length)return;let e=Math.max(2,...i.map(e=>Math.max(0,...(e.match(/`+/g)||[]).map(e=>e.length)))),t="`".repeat(e+1);r.push(``,`${t}text`,...i,t,``),i=[]};for(let n of e){let e=`\`${ue(t,n.at)}\``;n.kind===`out`?i.push(`${ue(t,n.at)} ${n.md}`):(a(),n.kind===`head`?r.push(``,`#### ${n.md} ${e}`,``):n.kind===`sub`?r.push(` - ${n.md}`):r.push(`- ${e} ${n.md}`))}return a(),r.join(`
2
+ `).replace(/\n{3,}/g,`
3
+
4
+ `).trim()+`
5
+ `}var L=m();function R({diff:e,className:t}){let n=0,r=0,i=e.split(`
6
+ `).flatMap((e,t)=>{if(/^(diff |index |--- |\+\+\+ )/.test(e))return[];let i=/^@@ -(\d+)(?:,\d+)? \+(\d+)(?:,\d+)? @@/.exec(e);return i?(n=Number(i[1]),r=Number(i[2]),[{key:t,kind:`hunk`,text:e,a:``,b:``}]):e.startsWith(`+`)?[{key:t,kind:`add`,text:e.slice(1),a:``,b:String(r++)}]:e.startsWith(`-`)?[{key:t,kind:`del`,text:e.slice(1),a:String(n++),b:``}]:e.startsWith(`\\`)?[{key:t,kind:`hunk`,text:e,a:``,b:``}]:[{key:t,kind:`same`,text:e.startsWith(` `)?e.slice(1):e,a:String(n++),b:String(r++)}]});return(0,L.jsx)(`div`,{className:l(`max-h-[420px] overflow-auto rounded-[10px] border border-line-soft bg-bg font-mono text-[12px] leading-[1.6]`,t),children:(0,L.jsx)(`table`,{className:`w-full border-collapse`,children:(0,L.jsx)(`tbody`,{children:i.map(e=>(0,L.jsxs)(`tr`,{className:e.kind===`add`?`bg-pass-soft`:e.kind===`del`?`bg-fail-soft`:e.kind===`hunk`?`bg-surface-muted`:void 0,children:[(0,L.jsx)(`td`,{className:`w-10 px-2 text-right align-top text-muted tabular-nums select-none`,children:e.a}),(0,L.jsx)(`td`,{className:`w-10 px-2 text-right align-top text-muted tabular-nums select-none`,children:e.b}),(0,L.jsx)(`td`,{"aria-hidden":`true`,className:l(`w-4 align-top select-none`,e.kind===`add`?`text-pass`:e.kind===`del`?`text-fail`:`text-muted`),children:e.kind===`add`?`+`:e.kind===`del`?`−`:``}),(0,L.jsxs)(`td`,{className:l(`pr-3 align-top whitespace-pre`,e.kind===`hunk`?`text-muted`:`text-ink`),children:[(0,L.jsx)(`span`,{className:`sr-only`,children:e.kind===`add`?`added: `:e.kind===`del`?`removed: `:``}),e.text||` `]})]},e.key))})})})}var z=e=>{let t=B(e);return typeof t.input==`number`&&typeof t.output==`number`?{input:t.input,output:t.output,cached:typeof t.cached==`number`?t.cached:void 0}:void 0},B=e=>e&&typeof e==`object`&&!Array.isArray(e)?e:{},V=e=>typeof e==`string`?e:e==null?``:String(e),fe=[[/find_test_cases|story_test_cases|check_test_cases|list_sprints/,`Finding test cases`,`searching`],[/environment|logins/,`Preparing the environment`,`handing`],[/run_test_cases|browser_run|suite|run_goal|run_direct/,`Running in the browser`,`browsing`],[/comment_on_pr/,`Commenting on the pull request`,`working`],[/write_back|post_result|post_results|file_bugs|create_bugs/,`Posting the result`,`working`],[/write_test|heal/,`Writing the test`,`writing`],[/run_tests|bash|shell/,`Running the tests`,`working`],[/read_confluence|read|grep|glob|list|webfetch/,`Reading`,`reading`],[/edit|write|patch/,`Changing the code`,`writing`],[/task/,`Handing work to another agent`,`handing`]],pe=/run_test_cases|browser_run|run_suite|write_test/,me=[[/find_test_cases|story_test_cases|check_test_cases/,`forgeqe-find`],[/run_test_cases|browser_run|run_goal|run_direct|suite|explore_run/,`engine`],[/write_test/,`forgeqe-test`],[/heal/,`forgeqe-heal`],[/review_pr|pr_review/,`forgeqe-pr-review`],[/api_plan/,`forgeqe-api-plan`],[/write_api|api_test/,`forgeqe-api`],[/explore_plan|plan_charters/,`forgeqe-explore-plan`],[/defect_rca|root_cause/,`forgeqe-defect-rca`],[/insights|forgeqe_bi|defect_intelligence/,`forgeqe-bi`],[/refine/,`forgeqe-refine`]];function H(e){let t=e.toLowerCase();if(!U(t))return me.find(([e])=>e.test(t))?.[1]}var he=[[/^(azure_devops|ado|azuredevops)_/,`Azure DevOps`],[/^(jira|atlassian)_/,`Jira`],[/^confluence_/,`Confluence`],[/^github_/,`GitHub`],[/^xray_/,`Xray`],[/^testrail_/,`TestRail`],[/^zephyr_/,`Zephyr Scale`],[/^qtest_/,`qTest`]],ge=/(^|_)(create|update|add|delete|remove|post|comment|link|unlink|upload|set|assign|transition|edit|merge|close|reopen|queue|trigger|run|push|move|copy|import|write|publish|approve|vote|lock|unlock)(_|$)/;function U(e){let t=e.toLowerCase();if(!t.startsWith(`forgeqe_`))return he.find(([e])=>e.test(t))?.[1]}var _e=e=>{let t=B(e);return typeof t.diff==`string`&&t.diff?{diff:t.diff,added:Number(t.added)||0,removed:Number(t.removed)||0}:void 0},W=e=>Array.isArray(e)?e.map(V).filter(Boolean):[];function ve(e,t,n){let r=V(e.status)||(t?`failed`:``);return{status:r,ok:!t&&/^(passed|pass|written|ok|known_defect)$/i.test(r),...V(e.testFile)?{testFile:V(e.testFile)}:{},...V(e.testName)?{testName:V(e.testName)}:{},...V(e.command)?{command:V(e.command)}:{},...typeof e.attempts==`number`?{attempts:e.attempts}:{},...typeof e.maxAttempts==`number`?{maxAttempts:e.maxAttempts}:{},changed:W(e.changed),reused:W(e.reused),...n?{runDir:n}:{},...t?{error:t}:{},...V(e.notes)?{notes:V(e.notes)}:{}}}function ye(e){if(!Array.isArray(e))return[];let t=[];for(let n of e){let e=B(n),r=(typeof n==`string`?n:V(e.label)||V(e.request)).replace(/\s+/g,` `).trim(),i=(typeof n==`string`?n:V(e.request)||V(e.label)).trim();r&&i&&!t.some(e=>e.label.toLowerCase()===r.toLowerCase())&&t.push({label:r.length>60?`${r.slice(0,59)}…`:r,request:i})}return t.slice(0,4)}function G(e){let t=e.toLowerCase(),n=U(t);if(n)return ge.test(t.replace(/^[a-z]+_/,``))?{label:`Updating ${n}`,orb:`working`}:{label:`Reading ${n}`,orb:`reading`};for(let[e,n,r]of fe)if(e.test(t))return{label:n,orb:r};let r=t.replace(/^forgeqe_/,``).replace(/[_-]+/g,` `).trim();return{label:r?r[0].toUpperCase()+r.slice(1):`Working`,orb:`working`}}function be(e,t){return{id:e,user:t,steps:[],parts:[],next:[],asks:[],waits:[],log:[],plan:[],changes:[],tests:[],reports:[]}}function xe(e){let t=B(e);return[V(t.id),V(t.title)].filter(Boolean).join(`: `)}function Se(e){let t={turns:[],notes:[]},n=new Map,r=e=>(typeof e==`string`?n.get(e):void 0)??t.turns.at(-1),i=(e,t)=>{let n=e=>{for(let r of e){if(r.key===t)return r;let e=r.children&&n(r.children);if(e)return e}};return n(e.steps)},a=(e,t,n)=>{let r={lines:[],...t};if(n)n.push(r);else{let t=e.plan.find(e=>e.status===`active`)??e.plan.find(e=>e.status===`pending`)??e.plan.at(-1);t&&(r.phase=t.text),e.steps.push(r)}return r},o=(e,t,n)=>{let r=t.parent?i(e,`c:${V(t.parent)}`):void 0;if(r)return r.children??=[];let o=V(t.agent);if(!n||!o||o===`forgeqe`)return;let s=[...e.steps].reverse().find(e=>e.status===`running`);return s||=a(e,{key:`ag:${o}:${e.steps.length}`,label:S(o).name,status:`running`,orb:`handing`,agent:o}),s.agent??=o,s.children??=[]},s=(e,n,r)=>{let s=V(n.kind),c=V(n.id);if((s===`start`||s===`tool`)&&pe.test(V(n.tool))&&!U(V(n.tool)))return;let l=o(e,n,r),u=B(n.delegate),d=V(u.agent)?{agent:V(u.agent),task:V(u.task)}:void 0;if(s===`start`){if(d)a(e,{key:`c:${c}`,label:`Hands off to ${S(d.agent).name}`,arg:d.task||void 0,status:`running`,orb:`handing`,agent:d.agent,handoff:d,children:[]},l);else{let{label:t,orb:r}=G(V(n.tool)||V(n.text)),i=l?void 0:H(V(n.tool));a(e,{key:`c:${c}`,label:t,arg:V(n.text)&&V(n.text)!==V(n.tool)?V(n.text):void 0,status:`running`,orb:r,...i?{agent:i}:{}},l)}}else if(s===`tool`){let t=c?i(e,`c:${c}`):void 0,r=B(n.file),o=_e(n.change);if(o&&V(r.path)){let t=e.changes.find(e=>e.path===V(r.path));t?Object.assign(t,{diff:`${t.diff}\n${o.diff}`,added:t.added+o.added,removed:t.removed+o.removed}):e.changes.push({path:V(r.path),...o,...V(n.agent)?{agent:V(n.agent)}:{}})}if(t)t.status=n.ok===!1?`fail`:`ok`,t.handoff&&V(u.result)&&(t.handoff.result=V(u.result));else if(d)a(e,{key:`c:${c||e.steps.length}`,label:`Hands off to ${S(d.agent).name}`,arg:d.task||void 0,status:n.ok===!1?`fail`:`ok`,orb:`handing`,agent:d.agent,handoff:{...d,...V(u.result)?{result:V(u.result)}:{}},children:[]},l);else{let{label:t,orb:i}=G(V(n.tool)||V(n.text)),s=l?void 0:H(V(n.tool));a(e,{key:`c:${c||e.steps.length}`,label:t,arg:V(r.path)||V(n.text)||void 0,status:n.ok===!1?`fail`:`ok`,orb:i,...s?{agent:s}:{},...o?{change:o}:{}},l)}t&&o&&(t.change=o)}else if(s===`stream`||s===`say`){if(r)return;let t=e.parts.find(e=>e.id===c);t?t.text=s===`say`?V(n.text):t.text+V(n.text):e.parts.push({id:c||`p${e.parts.length}`,text:V(n.text)})}else if(s===`plan`){if(l||n.agent&&n.agent!==`forgeqe`)return;let t=Array.isArray(n.items)?n.items.map(B):[],r=e=>e===`completed`?`done`:e===`in_progress`?`active`:e===`cancelled`?`skipped`:`pending`;e.plan=t.map(e=>({text:V(e.text),status:r(e.status)})).filter(e=>e.text)}else if(s===`test`){let t=Number(n.attempt)||0;if(t>0)a(e,{key:`t:${e.steps.length}`,label:`Test, attempt ${t}`,arg:V(n.text),status:n.ok?`ok`:`fail`,orb:`retrying`},l);else if(n.ok&&/\bconnected$/i.test(V(n.text)))return;else a(e,{key:`t:${e.steps.length}`,label:V(n.text)||(n.ok?`Checked`:`Check failed`),status:n.ok?`ok`:`fail`,orb:/connect|mcp/i.test(V(n.text))?`waiting`:`working`},l)}else if(s===`review`)a(e,{key:`r:${e.steps.length}`,label:n.approved?`Review approved`:`Review asked for changes`,status:n.approved?`ok`:`info`,orb:`thinking`,agent:`forgeqe-review`,lines:[{text:V(n.summary)}]});else if((s===`context`||s===`usage`)&&!r)s===`context`&&typeof n.tokens==`number`&&typeof n.limit==`number`&&(t.context={tokens:n.tokens,limit:n.limit,compactsAt:typeof n.compactsAt==`number`?n.compactsAt:void 0}),s===`usage`&&(t.usage=z(n.usage)??t.usage);else if(s===`info`){let t=(l??e.steps).at(-1);t&&t.lines.push({text:V(n.text)})}},c,l=(e,t)=>{let n=V(t.type);if(n===`run-start`)a(e,{key:`run:${e.steps.length}`,label:`Running in the browser`,arg:V(t.goal),status:`running`,orb:`browsing`,agent:`engine`});else if(n===`run-event`){let n=[...e.steps].reverse().find(e=>e.key.startsWith(`run:`)),r=B(t.event);if(!n)return;r.type===`outcome`?n.lines.push({text:`Step ${V(r.step)}: ${V(r.action)||V(r.text)}`,ok:r.ok===!0||r.ok!==!1&&void 0}):r.type===`log`&&(r.level!==`info`||r.progress)&&n.lines.push({text:V(r.text),ok:r.level!==`error`&&void 0})}else if(n===`run-done`){let n=[...e.steps].reverse().find(e=>e.key.startsWith(`run:`)&&e.status===`running`),r=B(t.result),i=!t.error&&(r.outcome===`passed`||!r.outcome&&r.status===`complete`);if(n){n.status=i?`ok`:`fail`;let e=V(t.error)||V(r.summary);e&&n.lines.push({text:e,ok:!!i})}V(t.runDir)&&e.reports.push({label:i?`Browser run report`:`Browser run report (failed)`,path:V(t.runDir)})}else if(n===`suite-start`){let n=Array.isArray(t.cases)?t.cases:[];a(e,{key:`suite:${e.steps.length}`,label:`Running ${n.length} test case${n.length===1?``:`s`}`,status:`running`,orb:`working`,agent:`engine`})}else if(n===`suite-event`){let n=[...e.steps].reverse().find(e=>e.key.startsWith(`suite:`)),r=B(t.event);if(n&&r.type===`case-done`){let e=B(r.result);n.lines.push({text:`${xe(e.case)}: ${V(e.status)}`,ok:e.status===`passed`})}}else if(n===`suite-done`){let n=[...e.steps].reverse().find(e=>e.key.startsWith(`suite:`)),r=Array.isArray(B(t.suite).results)?B(t.suite).results.map(B):[];if(n){let e=r.filter(e=>e.status!==`passed`).length;n.status=e?`fail`:`ok`,n.arg=`${r.length-e} of ${r.length} passed`}}else if(n===`card`){let n=B(t.card);a(e,{key:`card:${e.steps.length}`,label:V(n.title),arg:V(n.stats)||void 0,status:n.status===`ok`?`ok`:n.status===`fail`?`fail`:`info`,orb:`working`,lines:(Array.isArray(n.body)?n.body:[]).map(e=>({text:V(e)}))})}else if(n===`call-start`&&!t.quiet)a(e,{key:`call:${V(t.id)}`,label:V(t.text),status:`running`,orb:`working`});else if(n===`call`&&!t.quiet){let n=t.id?i(e,`call:${V(t.id)}`):void 0;n?n.status=t.ok===!1?`fail`:`ok`:a(e,{key:`call:${e.steps.length}`,label:V(t.text),status:t.ok===!1?`fail`:`ok`,orb:`working`})}else if(n===`code-start`)c=V(t.runDir)||void 0,a(e,{key:`code:${e.steps.length}`,label:`Writing the test`,arg:V(t.goal),status:`running`,orb:`writing`,agent:`forgeqe-test`});else if(n===`code-done`){let n=[...e.steps].reverse().find(e=>e.key.startsWith(`code:`)&&e.status===`running`);n&&(n.status=t.error?`fail`:`ok`,t.error&&n.lines.push({text:V(t.error),ok:!1})),e.tests.push(ve(B(t.result),V(t.error),c)),c=void 0}else if(n===`agent`)s(e,B(t.event),!0);else if(n===`info`){let n=e.steps.at(-1);n?n.lines.push({text:V(t.text),ok:t.ok===!0||t.ok!==!1&&void 0}):a(e,{key:`info:${e.steps.length}`,label:V(t.text),status:t.ok===!1?`fail`:`info`,orb:`working`})}else n===`report`&&(a(e,{key:`report:${e.steps.length}`,label:`Report saved`,arg:V(t.title),status:`ok`,orb:`working`}),V(t.html)&&e.reports.push({label:V(t.title)||`Report`,path:V(t.html)}))};for(let r of e){u(r);let e=le(r);e&&(typeof r.id==`string`&&n.get(r.id)||typeof r.turn==`string`&&n.get(r.turn)||t.turns.at(-1))?.log.push(e)}return t;function u(e){switch(e.type){case`user`:{let r=be(V(e.id),V(e.text));t.turns.push(r),n.set(r.id,r);break}case`ready`:{let n=B(e.profile);n.name&&(t.model={name:V(n.name),provider:V(n.provider)}),t.writeTests=e.writeTests!==!1,t.headed=e.headed===!0;break}case`settings`:typeof e.writeTests==`boolean`&&(t.writeTests=e.writeTests),typeof e.headed==`boolean`&&(t.headed=e.headed);break;case`turn_start`:{let t=r(e.id);t&&(t.started=V(e.t)||V(e.at));break}case`agent`:{let t=r(e.id);t&&s(t,B(e.event),!1);break}case`tool`:{let t=r(e.id);t&&l(t,B(e.event));break}case`ask`:{let t=r(e.turn),n=B(e.question);t?.asks.push({id:V(e.id),title:V(n.title),detail:V(n.detail)||void 0,lines:Array.isArray(n.lines)?n.lines.map(V):[],options:(Array.isArray(n.options)?n.options:[]).map(e=>({id:V(B(e).id),label:V(B(e).label)}))});break}case`wait`:r(e.turn)?.waits.push({id:V(e.id),prompt:V(e.prompt)});break;case`answered`:for(let n of t.turns){let t=n.asks.find(t=>t.id===e.ask);t&&(t.answer=V(e.label));let r=n.waits.find(t=>t.id===e.ask);r&&(r.answer=e.ok===!0)}break;case`turn_done`:{let n=r(e.id);if(!n)break;n.outcome=e.outcome,n.reply=V(e.reply),n.next=ye(e.next),n.error=V(e.error)||void 0,n.ended=V(e.t)||V(e.at),t.usage=z(e.usage)??t.usage;let i=e=>{for(let t of e)t.status===`running`&&(t.status=n.outcome===`done`?`ok`:`info`),t.children&&i(t.children)};if(i(n.steps),n.outcome===`done`)for(let e of n.plan)e.status===`active`&&(e.status=`done`);break}case`error`:e.code!==`busy`&&t.notes.push(V(e.message));break;case`fatal`:t.fatal=V(e.message);break;case`exit`:t.ended={code:typeof e.code==`number`?e.code:null,stderr:Array.isArray(e.stderr)?e.stderr.map(V):void 0,message:V(e.message)||void 0}}}}function Ce(e){let t=e.asks.find(e=>e.answer===void 0),n=e.waits.find(e=>e.answer===void 0);if(t||n)return{text:`Waiting for you…`,orb:`waiting`};let r=[...e.steps].reverse().find(e=>e.status===`running`);return r?{text:`${r.label}…`,orb:r.orb}:e.parts.some(e=>e.text.trim())&&e.steps.length?{text:`Writing a reply…`,orb:`writing`}:{text:`Thinking…`,orb:`thinking`}}function we(e){if(!e.started||!e.ended)return`Done`;let t=Math.max(1,Math.round((Date.parse(e.ended)-Date.parse(e.started))/1e3)),n=e.outcome===`stopped`?`Stopped after`:`Worked for`;return t<60?`${n} ${t} second${t===1?``:`s`}`:`${n} ${Math.floor(t/60)} min ${t%60} s`}var Te={running:`active`,ok:`done`,fail:`failed`,info:`note`};function Ee(e,t){let n=e=>e===`active`&&!t?`done`:e;if(!e.plan.length)return e.steps.map(e=>({key:e.key,label:e.label,status:n(Te[e.status]),steps:[],step:e}));let r=new Set(e.plan.map(e=>e.text)),i=new Map,a=``;for(let t of e.steps)t.phase&&r.has(t.phase)&&(a=t.phase),i.set(a,[...i.get(a)||[],t]);let o=e=>e.some(e=>e.status===`running`),s=[],c=i.get(``)||[];c.length&&s.push({key:`plan:start`,label:`Getting started`,status:n(o(c)?`active`:`done`),steps:c});let l=e.plan.map((e,n)=>{let r=i.get(e.text)||[],a=e.status===`done`?`done`:e.status===`skipped`?`skipped`:e.status===`active`||o(r)?`active`:`pending`;return{key:`plan:${n}`,label:e.text,status:a===`active`&&!t?`pending`:a,steps:r}});return[...s,...De(l)]}function De(e){let t=e.findIndex(e=>e.status===`active`);return t<0?e:e.map((e,n)=>e.status===`skipped`||e.status===`failed`||n===t?e:{...e,status:n<t?`done`:`pending`})}var Oe={done:`bg-pass/30`,active:`bg-accent/25`,pending:`bg-line`,failed:`bg-fail/30`,skipped:`bg-line`,note:`bg-line`};function K({status:e,orb:t,px:n=20,spin:i=!1}){let a={width:n,height:n};return e===`active`&&i?(0,L.jsx)(`span`,{role:`img`,"aria-label":`At work`,className:`flex flex-none items-center justify-center`,style:a,children:(0,L.jsx)(r,{size:n-2,strokeWidth:2.5,"aria-hidden":`true`,className:`animate-spin text-accent-fg motion-reduce:animate-none`})}):e===`active`?(0,L.jsx)(u,{state:t,px:n,label:`At work`}):e===`done`?(0,L.jsx)(`span`,{role:`img`,"aria-label":`Done`,className:`flex flex-none items-center justify-center rounded-full bg-pass`,style:a,children:(0,L.jsx)(f,{size:n*.6,strokeWidth:3,"aria-hidden":`true`,className:`text-white`})}):e===`failed`?(0,L.jsx)(`span`,{role:`img`,"aria-label":`Failed`,className:`flex flex-none items-center justify-center rounded-full bg-fail`,style:a,children:(0,L.jsx)(h,{size:n*.6,strokeWidth:3,"aria-hidden":`true`,className:`text-white`})}):e===`note`?(0,L.jsx)(`span`,{role:`img`,"aria-label":`Note`,className:`flex flex-none items-center justify-center`,style:a,children:(0,L.jsx)(`span`,{className:`size-1.5 rounded-full bg-line-strong`})}):(0,L.jsx)(`span`,{role:`img`,"aria-label":e===`skipped`?`Skipped`:`To come`,className:l(`box-border block flex-none rounded-full border-2 border-line-strong`,e===`skipped`&&`border-dashed`),style:a})}var ke=(e,t)=>e.status===`running`?t?`active`:`done`:e.status===`ok`?`done`:e.status===`fail`?`failed`:`note`,Ae=e=>/[/\\]|\.\w{1,5}$|^\$ /.test(e)&&!/\s{2,}/.test(e);function q({text:e}){return(0,L.jsx)(`span`,{className:l(`min-w-0 max-w-full truncate rounded-md bg-surface-strong px-1.5 py-0.5 text-[12.5px] text-ink-2`,Ae(e)&&`font-mono text-[12px]`),children:e})}function je({step:e}){return(0,L.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-1 p-0 text-[13px] leading-relaxed`,children:e.lines.map((e,t)=>(0,L.jsxs)(`li`,{className:l(`flex gap-1.5 [overflow-wrap:anywhere]`,e.ok===!0?`text-pass`:e.ok===!1?`text-fail`:`text-ink-2`),children:[e.ok!==void 0&&(0,L.jsx)(`span`,{"aria-hidden":`true`,children:e.ok?`✓`:`✗`}),(0,L.jsx)(_,{text:e.text,className:`min-w-0 text-[13px] leading-relaxed text-inherit [&_p]:my-0`})]},t))})}function J({agent:e,named:t=!0,working:n=!1}){let r=S(e);return(0,L.jsxs)(`span`,{className:`inline-flex flex-none items-center gap-1.5`,title:r.name,children:[(0,L.jsx)(x,{agent:e,px:18,decorative:t,working:n}),t&&(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(`span`,{className:`font-medium`,style:{color:r.hue},children:r.name}),(0,L.jsx)(`span`,{"aria-hidden":`true`,className:`text-muted`,children:`·`})]})]})}function Y({step:e,from:t,live:n}){let r=e.handoff.agent,i=S(r);return(0,L.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-0.5`,children:[(0,L.jsx)(x,{agent:t,px:18}),(0,L.jsxs)(`span`,{role:`img`,"aria-label":`hands off to`,className:l(`handoff-flow flex-none`,n&&`is-live`),style:{color:i.hue},children:[(0,L.jsx)(`span`,{}),(0,L.jsx)(`span`,{}),(0,L.jsx)(`span`,{})]}),(0,L.jsx)(x,{agent:r,px:20,decorative:!0,working:n,className:`handoff-in`}),(0,L.jsx)(`span`,{className:`font-medium`,style:{color:i.hue},children:i.name}),e.arg&&(0,L.jsx)(q,{text:e.arg})]})}function X({step:e,working:t,from:n=b}){let r=e.agent||n,i=Z(e),a=ke(e,t),[o,c]=(0,T.useState)(null),u=o??((!!e.handoff||!!e.agent)&&a===`active`),d=(0,L.jsxs)(L.Fragment,{children:[(0,L.jsx)(K,{status:a,orb:e.orb,px:16,spin:!0}),e.handoff?(0,L.jsx)(Y,{step:e,from:n,live:a===`active`}):(0,L.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-0.5`,children:[(0,L.jsx)(J,{agent:r,named:r!==n,working:a===`active`}),(0,L.jsx)(`span`,{className:l(`[overflow-wrap:anywhere]`,a===`active`?`text-ink`:`text-ink-2`),children:e.label}),e.arg&&(0,L.jsx)(q,{text:e.arg}),e.change&&(0,L.jsxs)(`span`,{className:`font-mono text-[12px] tabular-nums`,children:[(0,L.jsxs)(`span`,{className:`text-pass`,children:[`+`,e.change.added]}),` `,(0,L.jsxs)(`span`,{className:`text-fail`,children:[`−`,e.change.removed]})]})]}),i&&(0,L.jsx)(s,{size:14,"aria-hidden":`true`,className:l(`mt-0.5 ml-auto flex-none text-muted transition-transform`,u&&`rotate-180`)})]});return(0,L.jsxs)(`li`,{className:`flex flex-col`,children:[i?(0,L.jsx)(`button`,{type:`button`,"aria-expanded":u,onClick:()=>c(!u),className:`flex min-h-8 w-full cursor-pointer items-start gap-2 rounded-lg border-0 bg-transparent px-1.5 py-1.5 text-left text-[13.5px] hover:bg-surface-muted`,children:d}):(0,L.jsx)(`div`,{className:`flex min-h-8 items-start gap-2 px-1.5 py-1.5 text-[13.5px]`,children:d}),i&&(0,L.jsx)(p,{open:u,children:(0,L.jsx)(Me,{step:e,working:t,from:n,className:`mb-1 ml-[13px]`})})]})}var Z=e=>e.lines.length>0||(e.children?.length??0)>0||!!e.handoff?.result||!!e.change;function Me({step:e,working:t,from:n,className:r}){let i=e.children||[],a=e.handoff?.agent||e.agent;return(0,L.jsxs)(`div`,{className:l(`flex flex-col gap-1.5 border-l-2 py-1 pl-3`,r),style:{borderColor:a?`${S(a).hue}66`:`var(--color-line)`},children:[e.lines.length>0&&(0,L.jsx)(je,{step:e}),e.change&&(0,L.jsx)(R,{diff:e.change.diff}),i.length>0&&(0,L.jsx)(`ul`,{"aria-label":a?`What ${S(a).name} did`:`Steps`,className:`m-0 flex list-none flex-col p-0`,children:i.map(e=>(0,L.jsx)(X,{step:e,working:t,from:a||n},e.key))}),e.handoff?.result&&(0,L.jsxs)(`div`,{className:`flex flex-col gap-0.5 text-[13px]`,children:[(0,L.jsxs)(`span`,{className:`text-muted`,children:[S(e.handoff.agent).name,` answered`]}),(0,L.jsx)(_,{text:e.handoff.result.length>1200?`${e.handoff.result.slice(0,1199)}…`:e.handoff.result,className:`text-[13px] text-ink-2 [&_p]:my-0`})]})]})}function Ne({node:e,last:t,working:n,now:r,orbed:i}){let a=e.step?[]:e.steps,o=e.step,c=a.length>0||!!r||!!o&&Z(o),[u,d]=(0,T.useState)(null),f=u??(e.status===`active`||e.status===`failed`),m=o?.orb??[...a].reverse().find(e=>e.status===`running`)?.orb??r?.orb??`thinking`;return(0,L.jsxs)(`li`,{className:`flex gap-3`,children:[(0,L.jsxs)(`div`,{className:`flex flex-none flex-col items-center`,children:[(0,L.jsx)(`span`,{className:`mt-[3px]`,children:(0,L.jsx)(K,{status:e.status,orb:m,spin:!i})}),!t&&(0,L.jsx)(`span`,{"aria-hidden":`true`,className:l(`mt-1.5 min-h-4 w-0.5 flex-1 rounded-sm`,Oe[e.status])})]}),(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col pb-2`,children:[c?(0,L.jsxs)(`button`,{type:`button`,"aria-expanded":f,onClick:()=>d(!f),className:`flex min-h-7 w-full cursor-pointer items-start gap-1.5 border-0 bg-transparent p-0 text-left`,children:[(0,L.jsx)(Pe,{node:e}),(0,L.jsx)(s,{size:14,"aria-hidden":`true`,className:l(`mt-1 flex-none text-muted transition-transform`,f&&`rotate-180`)}),e.status===`active`&&(0,L.jsx)(`span`,{className:`mt-0.5 ml-1 flex-none rounded-full border border-accent-line bg-accent-soft px-2 py-px text-[11.5px] font-medium text-accent-fg`,children:`In progress`})]}):(0,L.jsx)(`div`,{className:`min-h-7`,children:(0,L.jsx)(Pe,{node:e})}),c&&(0,L.jsx)(p,{open:f,className:`mt-0.5`,children:o?(0,L.jsx)(Me,{step:o,working:n,from:`forgeqe`,className:`mt-1`}):(0,L.jsxs)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:[a.map(e=>(0,L.jsx)(X,{step:e,working:n},e.key)),r&&(0,L.jsx)(`li`,{children:(0,L.jsx)(Q,{live:r,className:`px-1.5`})})]})})]})]})}function Pe({node:e}){let t=e.status===`active`?`text-ink`:e.status===`pending`||e.status===`skipped`?`text-muted`:e.status===`failed`?`text-fail`:`text-ink-2`,n=e.step;return n?.handoff?(0,L.jsx)(Y,{step:n,from:b,live:e.status===`active`}):(0,L.jsxs)(`span`,{className:l(`flex min-w-0 flex-wrap items-center gap-x-1.5 gap-y-0.5 text-sm font-medium`,t,e.status===`skipped`&&`line-through`),children:[n&&(0,L.jsx)(J,{agent:n.agent||`forgeqe`,named:!!n.agent&&n.agent!==`forgeqe`,working:e.status===`active`}),e.status===`active`?(0,L.jsx)(`span`,{className:`shimmer [overflow-wrap:anywhere]`,children:(0,L.jsx)(`span`,{children:e.label})}):(0,L.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:e.label}),n?.arg&&(0,L.jsx)(q,{text:n.arg})]})}var Fe={info:`text-ink-2`,ok:`text-pass`,fail:`text-fail`,warn:`text-warn`,dim:`text-muted`,say:`text-ink-2`,you:`text-accent-fg`,think:`text-muted italic`};function Ie(e){let[t,n]=(0,T.useState)(()=>Date.now());(0,T.useEffect)(()=>{let e=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(e)},[]);let r=e?Date.parse(e):NaN;if(Number.isNaN(r))return``;let i=Math.max(0,Math.round((t-r)/1e3));return i<2?`just now`:i<60?`${i}s ago`:`${Math.floor(i/60)} min ago`}function Q({live:e,orb:t=!1,className:n}){let r=Ie(e.latest?.at);return(0,L.jsxs)(`div`,{className:l(`flex min-h-8 items-start gap-2 py-1`,n),children:[(0,L.jsx)(`span`,{className:`mt-0.5 flex size-4 flex-none items-center justify-center`,children:t?(0,L.jsx)(u,{state:e.orb,px:20,label:`At work`}):(0,L.jsxs)(`span`,{"aria-hidden":`true`,className:`relative flex size-2`,children:[(0,L.jsx)(`span`,{className:`absolute inline-flex size-full animate-ping rounded-full bg-accent opacity-60 motion-reduce:animate-none`}),(0,L.jsx)(`span`,{className:`relative inline-flex size-2 rounded-full bg-accent`})]})}),(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,L.jsx)(`span`,{className:`shimmer text-[13.5px] font-medium text-muted`,children:(0,L.jsx)(`span`,{"aria-live":`polite`,children:e.text})}),e.latest&&(0,L.jsxs)(`button`,{type:`button`,onClick:e.onLog,title:`Open the activity log`,className:`flex w-full min-w-0 cursor-pointer items-baseline gap-2 border-0 bg-transparent p-0 text-left hover:underline`,children:[(0,L.jsx)(`span`,{className:l(`min-w-0 truncate font-mono text-[12px]`,Fe[e.latest.tone]),children:e.latest.plain}),(0,L.jsxs)(`span`,{className:`flex-none text-[11.5px] whitespace-nowrap text-muted tabular-nums`,children:[r,r&&` · `,e.events,` `,e.events===1?`event`:`events`]})]})]})]})}function Le({turn:e,working:t,live:n,folded:r=!1}){if(r)return(0,L.jsx)(Q,{live:n,orb:!0});let i=Ee(e,t),a=e.plan.length>0&&t?i.find(e=>e.status===`active`)??null:null,o=t&&!a?[{key:`now`,label:n.text,status:`active`,steps:[]}]:[],s=[...i,...o],c=[...i].reverse().find(e=>e.status===`active`);return(0,L.jsx)(`ol`,{"aria-label":`What ForgeQE did`,className:`m-0 flex list-none flex-col p-0 pt-1`,children:s.map((e,r)=>e.key===`now`?(0,L.jsx)(`li`,{className:`flex gap-3`,children:(0,L.jsx)(Q,{live:n,orb:!c,className:`-mt-1 min-w-0 flex-1 py-0`})},`now`):(0,L.jsx)(Ne,{node:e,last:r===s.length-1,working:t,now:a===e?n:void 0,orbed:c===e},e.key))})}var Re={passed:`Passed`,failed:`Failed`,stopped:`Stopped`,blocked:`Blocked`};function $({label:e,children:t}){return(0,L.jsxs)(`div`,{className:`grid grid-cols-[110px_minmax(0,1fr)] items-baseline gap-3 py-1.5 text-sm`,children:[(0,L.jsx)(`span`,{className:`text-muted`,children:e}),(0,L.jsx)(`div`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:t})]})}function ze({text:e}){let[t,n]=(0,T.useState)(!1);return(0,L.jsxs)(`div`,{className:`flex items-start gap-2 rounded-[10px] bg-surface-muted px-3 py-2`,children:[(0,L.jsx)(ie,{size:14,"aria-hidden":`true`,className:`mt-0.5 flex-none text-muted`}),(0,L.jsx)(`code`,{className:`min-w-0 flex-1 font-mono text-[12.5px] break-all whitespace-pre-wrap text-ink`,children:e}),(0,L.jsx)(`button`,{type:`button`,"aria-label":t?`Copied`:`Copy the command`,onClick:async()=>{await v(e)&&(n(!0),setTimeout(()=>n(!1),1500))},className:`inline-flex size-7 flex-none cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted hover:bg-surface-strong hover:text-ink`,children:t?(0,L.jsx)(f,{size:14,"aria-hidden":`true`,className:`text-pass`}):(0,L.jsx)(g,{size:14,"aria-hidden":`true`})})]})}function Be({t:e}){return(0,L.jsxs)(`div`,{className:`flex flex-col`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 pb-1`,children:[(0,L.jsx)(a,{size:16,"aria-hidden":`true`,className:`text-accent-fg`}),(0,L.jsx)(`span`,{className:`font-medium`,children:`Test written`}),(0,L.jsx)(ne,{tone:e.ok?`pass`:e.status===`stopped`?`neutral`:`fail`,children:Re[e.status]||e.status||`Not written`}),e.attempts!==void 0&&(0,L.jsx)(`span`,{className:`text-[13px] text-muted`,children:e.maxAttempts?`attempt ${e.attempts} of ${e.maxAttempts}`:d(e.attempts,`attempt`)})]}),e.testFile&&(0,L.jsx)($,{label:`Test file`,children:(0,L.jsx)(y,{path:e.testFile})}),e.testName&&(0,L.jsx)($,{label:`Test`,children:(0,L.jsx)(`code`,{className:`font-mono text-[12.5px]`,children:e.testName})}),e.command&&(0,L.jsx)($,{label:`Run it`,children:(0,L.jsx)(ze,{text:e.command})}),e.runDir&&(0,L.jsx)($,{label:`From the run`,children:(0,L.jsx)(y,{path:e.runDir})}),e.reused.length>0&&(0,L.jsx)($,{label:`Reused`,children:(0,L.jsx)(`span`,{className:`flex flex-wrap gap-x-2 gap-y-1`,children:e.reused.map(e=>(0,L.jsx)(y,{path:e},e))})}),e.error&&(0,L.jsx)(`p`,{className:`m-0 mt-1 rounded-[10px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:e.error})]})}function Ve({c:e}){let[t,n]=(0,T.useState)(!1);return(0,L.jsxs)(`li`,{className:`flex flex-col`,children:[(0,L.jsxs)(`div`,{className:`flex min-h-9 items-center gap-2`,children:[(0,L.jsx)(`button`,{type:`button`,"aria-expanded":t,"aria-label":`${t?`Hide`:`Show`} the changes to ${e.path}`,onClick:()=>n(!t),className:`inline-flex size-7 flex-none cursor-pointer items-center justify-center rounded-md border-0 bg-transparent text-muted hover:bg-surface-strong hover:text-ink`,children:(0,L.jsx)(s,{size:15,"aria-hidden":`true`,className:l(`transition-transform`,!t&&`-rotate-90`)})}),(0,L.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:(0,L.jsx)(y,{path:e.path})}),(0,L.jsxs)(`span`,{className:`flex-none font-mono text-[12px] tabular-nums`,children:[(0,L.jsxs)(`span`,{className:`text-pass`,children:[`+`,e.added]}),` `,(0,L.jsxs)(`span`,{className:`text-fail`,children:[`−`,e.removed]})]})]}),(0,L.jsx)(p,{open:t,children:(0,L.jsx)(R,{diff:e.diff,className:`mb-2 ml-9`})})]})}function He({turn:e}){let t=e.reports.filter((e,t,n)=>n.findIndex(t=>t.path===e.path)===t),r=new Set(e.changes.map(e=>e.path)),i=[...new Set(e.tests.flatMap(e=>e.changed))].filter(e=>!r.has(e)&&![...r].some(t=>t.endsWith(e)||e.endsWith(t)));return!e.tests.length&&!t.length&&!e.changes.length&&!i.length?null:(0,L.jsxs)(`section`,{"aria-label":`Result`,className:`flex flex-col gap-4 rounded-[14px] border border-line-soft px-4 py-3`,children:[e.tests.map((e,t)=>(0,L.jsx)(Be,{t:e},t)),t.length>0&&(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,L.jsx)(`span`,{className:`text-sm font-medium`,children:`Reports`}),(0,L.jsx)(`ul`,{className:`m-0 flex list-none flex-col gap-1 p-0 text-sm`,children:t.map(e=>(0,L.jsxs)(`li`,{className:`flex flex-wrap items-baseline gap-2`,children:[(0,L.jsx)(`span`,{className:`text-ink-2`,children:e.label}),(0,L.jsx)(y,{path:e.path})]},e.path))})]}),(e.changes.length>0||i.length>0)&&(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,L.jsxs)(`span`,{className:`flex items-center gap-1.5 text-sm font-medium`,children:[(0,L.jsx)(n,{size:15,"aria-hidden":`true`,className:`text-muted`}),`Files changed`,(0,L.jsxs)(`span`,{className:`font-normal text-muted`,children:[d(e.changes.length+i.length,`file`),` · `,(0,L.jsxs)(`span`,{className:`text-pass`,children:[`+`,e.changes.reduce((e,t)=>e+t.added,0)]}),` `,(0,L.jsxs)(`span`,{className:`text-fail`,children:[`−`,e.changes.reduce((e,t)=>e+t.removed,0)]})]})]}),(0,L.jsxs)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:[e.changes.map(e=>(0,L.jsx)(Ve,{c:e},e.path)),i.map(e=>(0,L.jsx)(`li`,{className:`flex min-h-9 items-center gap-2 pl-9`,children:(0,L.jsx)(y,{path:e})},e))]})]})]})}function Ue({lines:e,start:t,live:n,name:r}){let i=(0,T.useRef)(null),a=(0,T.useRef)(!0),[o,s]=(0,T.useState)(!1),c=(0,T.useMemo)(()=>de(e,t),[e,t]);(0,T.useEffect)(()=>{a.current&&i.current&&(i.current.scrollTop=i.current.scrollHeight)},[c]);let l=`inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-lg border-0 bg-transparent px-2 text-[12px] font-medium text-muted hover:bg-surface-strong hover:text-ink`;return(0,L.jsxs)(`div`,{className:`overflow-hidden rounded-[12px] border border-line-soft bg-surface-muted`,children:[(0,L.jsxs)(`div`,{className:`flex min-h-9 items-center gap-1 border-b border-line-soft pr-1 pl-3 text-[12px] text-muted`,children:[(0,L.jsxs)(`span`,{className:`flex-1`,children:[`Markdown · `,e.length,` event`,e.length===1?``:`s`,n&&` · live`]}),(0,L.jsxs)(`button`,{type:`button`,"aria-label":o?`Copied`:`Copy the activity log as Markdown`,onClick:async()=>{try{await navigator.clipboard.writeText(c),s(!0),setTimeout(()=>s(!1),1500)}catch{}},className:l,children:[o?(0,L.jsx)(f,{size:14,"aria-hidden":`true`,className:`text-pass`}):(0,L.jsx)(g,{size:14,"aria-hidden":`true`}),o?`Copied`:`Copy`]}),(0,L.jsxs)(`button`,{type:`button`,"aria-label":`Download the activity log as a Markdown file`,onClick:()=>{let e=URL.createObjectURL(new Blob([c],{type:`text/markdown;charset=utf-8`})),t=document.createElement(`a`);t.href=e,t.download=r,t.click(),setTimeout(()=>URL.revokeObjectURL(e),1e3)},className:l,children:[(0,L.jsx)(ee,{size:14,"aria-hidden":`true`}),`.md`]})]}),(0,L.jsx)(`div`,{ref:i,role:`log`,"aria-label":`Activity log`,onScroll:e=>{let t=e.currentTarget;a.current=t.scrollTop+t.clientHeight>=t.scrollHeight-24},className:`max-h-[360px] overflow-y-auto px-4 py-2`,children:(0,L.jsx)(_,{text:c,className:`text-[13px] leading-[1.6] [&_code]:text-[12px] [&_h4]:mt-3 [&_h4]:mb-1 [&_li]:my-0.5 [&_pre]:text-[12px] [&_ul]:my-1`})})]})}function We({ask:e,live:t,onAnswer:n}){let r=t&&e.answer===void 0;return(0,L.jsxs)(`div`,{className:l(`flex flex-col gap-3 rounded-[14px] border px-4 py-3`,r?`border-accent-line bg-accent-soft`:`border-line-soft`),children:[(0,L.jsxs)(`div`,{className:`flex items-start gap-2`,children:[(0,L.jsx)(re,{size:18,"aria-hidden":`true`,className:`mt-0.5 flex-none text-accent-fg`}),(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,L.jsx)(`span`,{className:`font-medium`,children:e.title}),e.detail&&(0,L.jsx)(`span`,{className:`text-sm text-ink-2`,children:e.detail}),e.lines.map((e,t)=>(0,L.jsx)(`span`,{className:`text-sm text-ink-2 [overflow-wrap:anywhere]`,children:e},t))]})]}),r?(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[e.options.map(e=>(0,L.jsx)(c,{size:`sm`,onClick:()=>n(e.id),children:e.label},e.id)),(0,L.jsx)(c,{size:`sm`,variant:`ghost`,onClick:()=>n(null),children:`Cancel`})]}):(0,L.jsx)(`span`,{className:`text-sm text-muted`,children:e.answer===void 0?`Not answered`:`You chose: ${e.answer}`})]})}function Ge({wait:e,live:t,onProceed:n}){let r=t&&e.answer===void 0;return(0,L.jsxs)(`div`,{className:l(`flex flex-col gap-3 rounded-[14px] border px-4 py-3`,r?`border-accent-line bg-accent-soft`:`border-line-soft`),children:[(0,L.jsxs)(`span`,{className:`flex items-start gap-2`,children:[(0,L.jsx)(te,{size:18,"aria-hidden":`true`,className:`mt-0.5 flex-none text-accent-fg`}),(0,L.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:e.prompt})]}),r?(0,L.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,L.jsx)(c,{size:`sm`,variant:`primary`,onClick:()=>n(!0),children:`Done, continue`}),(0,L.jsx)(c,{size:`sm`,onClick:()=>n(!1),children:`Cancel`})]}):(0,L.jsx)(`span`,{className:`text-sm text-muted`,children:e.answer===void 0?`Not done`:e.answer?`You continued`:`You cancelled`})]})}function Ke({turn:e,live:t,onAnswer:n,onProceed:r}){let a=t&&!e.outcome,[o,c]=(0,T.useState)(null),u=o??a,d=Ce(e),f=a?d.text:we(e),m=e.parts.map(e=>N(e.text)).filter(Boolean),[h,g]=(0,T.useState)(!1),v=[...e.log].reverse().find(e=>e.tone!==`you`&&e.tone!==`say`);return(0,L.jsxs)(`div`,{className:`flex gap-3`,children:[(0,L.jsx)(`div`,{className:`size-9 flex-none`,"aria-hidden":`true`,children:(0,L.jsx)(x,{agent:`forgeqe`,px:34,working:a,className:`mt-0.5`})}),(0,L.jsxs)(`div`,{className:`flex min-w-0 flex-1 flex-col gap-3 pt-1.5`,children:[(e.steps.length>0||a||e.log.length>0)&&(0,L.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,L.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,L.jsxs)(`button`,{type:`button`,"aria-expanded":u,disabled:!e.steps.length&&!e.plan.length,onClick:()=>c(!u),className:l(`flex cursor-pointer items-center gap-1.5 border-0 bg-transparent p-0 text-sm font-medium text-muted hover:text-ink disabled:cursor-default`,a&&`shimmer`),children:[(0,L.jsx)(`span`,{"aria-live":`polite`,children:f}),(e.steps.length>0||e.plan.length>0)&&(0,L.jsx)(s,{size:16,"aria-hidden":`true`,className:l(`transition-transform`,u&&`rotate-180`)})]}),e.log.length>0&&(0,L.jsxs)(`button`,{type:`button`,"aria-expanded":h,onClick:()=>g(!h),className:`ml-auto inline-flex min-h-8 cursor-pointer items-center gap-1.5 rounded-lg border-0 bg-transparent px-2 text-[13px] font-medium text-muted hover:bg-surface-muted hover:text-ink`,children:[(0,L.jsx)(i,{size:14,"aria-hidden":`true`}),`Activity log`,(0,L.jsx)(`span`,{className:`tabular-nums`,children:e.log.length})]})]}),(u||a)&&(e.steps.length>0||e.plan.length>0||a)&&(0,L.jsx)(Le,{turn:e,working:a,folded:!u,live:{...d,latest:v,events:e.log.length,onLog:()=>g(!0)}}),(0,L.jsx)(p,{open:h,children:(0,L.jsx)(Ue,{lines:e.log,start:e.started||e.log[0]?.at,live:a,name:`forgeqe-activity-${e.id}.md`})})]}),e.asks.map(e=>(0,L.jsx)(We,{ask:e,live:a,onAnswer:t=>n(e.id,t)},e.id)),e.waits.map(e=>(0,L.jsx)(Ge,{wait:e,live:a,onProceed:t=>r(e.id,t)},e.id)),e.outcome&&e.reply?(0,L.jsx)(_,{text:e.reply}):m.length>0&&(0,L.jsx)(_,{text:m.join(`
7
+
8
+ `)}),(0,L.jsx)(He,{turn:e}),e.error&&(0,L.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:e.error}),e.outcome===`stopped`&&!e.reply&&(0,L.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Stopped.`})]})]})}export{N as a,le as i,Ke as n,Se as r,Ue as t};
@@ -0,0 +1,2 @@
1
+ import{At as e,Cn as t,Dt as n,Et as r,Ft as i,Gn as a,H as o,Hn as s,In as c,K as l,Mt as u,O as d,Rt as f,U as p,Ut as m,_n as h,_t as g,an as _,at as v,ct as y,dt as b,ht as x,ln as S,lt as C,nn as w,nt as T,q as E,r as D,sn as O,st as k,t as A}from"./frame-CHQgOaj6.js";import{t as ee}from"./circle-dashed-CQKCycSk.js";import{n as j,t as M}from"./markdown-BPBR6Fva.js";import{t as N}from"./external-link-B45wnQ3R.js";import{t as P}from"./file-chart-column-increasing-9rCBQxTk.js";import{a as te,i as ne,t as re}from"./Response-VUbDhVeF.js";import{t as ie}from"./terminal-BZSHVR9y.js";import{F as ae,N as oe,P as se,T as ce,_ as le,j as ue,s as F,w as de}from"./index-Hd8gmpz5.js";import{n as I,t as fe}from"./when-CHnpLdYw.js";var pe={name:`book-check`,size:24,node:[[`path`,{d:`M4 19.5v-15A2.5 2.5 0 0 1 6.5 2H19a1 1 0 0 1 1 1v18a1 1 0 0 1-1 1H6.5a1 1 0 0 1 0-5H20`,key:`k3hazp`}],[`path`,{d:`m9 9.5 2 2 4-4`,key:`1dth82`}]]};pe.node;var me=h(pe),L={name:`code-xml`,size:24,node:[[`path`,{d:`m18 16 4-4-4-4`,key:`1inbqp`}],[`path`,{d:`m6 8-4 4 4 4`,key:`15zrgr`}],[`path`,{d:`m14.5 4-5 16`,key:`e7oirm`}]],aliases:[`code-2`]};L.node;var R=h(L),z={name:`flag`,size:24,node:[[`path`,{d:`M4 22V4a1 1 0 0 1 .4-.8A6 6 0 0 1 8 2c3 0 5 2 7.333 2q2 0 3.067-.8A1 1 0 0 1 20 4v10a1 1 0 0 1-.4.8A6 6 0 0 1 16 16c-3 0-5-2-8-2a6 6 0 0 0-4 1.528`,key:`1jaruq`}]]};z.node;var he=h(z),ge={name:`lightbulb`,size:24,node:[[`path`,{d:`M15 14c.2-1 .7-1.7 1.5-2.5 1-.9 1.5-2.2 1.5-3.5A6 6 0 0 0 6 8c0 1 .2 2.2 1.5 3.5.7.7 1.3 1.5 1.5 2.5`,key:`1gvzjb`}],[`path`,{d:`M9 18h6`,key:`x1upvd`}],[`path`,{d:`M10 22h4`,key:`ceow96`}]]};ge.node;var _e=h(ge),B=a(s(),1),V=k(),H={execution:`Execution`,report:`Report`,coding:`Coding`,chat:`Chat`},ve={execution:m,report:P,coding:R,chat:e};function ye({kind:e}){let t=ve[e];return(0,V.jsx)(t,{size:14,"aria-hidden":`true`,className:`flex-none text-muted`})}var be={passed:{label:`Passed`,tone:`pass`},failed:{label:`Failed`,tone:`fail`},error:{label:`Error`,tone:`fail`},skipped:{label:`Skipped`,tone:`neutral`},stopped:{label:`Stopped`,tone:`neutral`},blocked:{label:`Blocked`,tone:`warn`}},U=e=>be[e]||{label:e?e.charAt(0).toUpperCase()+e.slice(1).replace(/_/g,` `):`–`,tone:`neutral`},xe={suite:`Suite`,monitor:`Monitor round`,run:`Browser run`,explore:`Exploration`,api:`API run`,desktop:`Desktop run`,mobile:`App run`},Se=e=>{if(!e)return``;let t=Math.round(e/1e3);return t<60?`${t}s`:`${Math.floor(t/60)}m ${t%60}s`};function W({title:e,icon:t,children:n,aside:r}){return(0,V.jsxs)(`section`,{className:`flex flex-col gap-3 rounded-[14px] border border-line-soft p-4`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsxs)(`h3`,{className:`m-0 flex flex-1 items-center gap-2 text-base font-semibold`,children:[(0,V.jsx)(`span`,{className:`text-accent-fg`,children:t}),e]}),r]}),n]})}function Ce({path:e,label:t=`Open report`}){let[n,r]=(0,B.useState)(``);return(0,V.jsxs)(`span`,{className:`inline-flex flex-wrap items-center gap-2`,children:[(0,V.jsxs)(v,{onClick:async()=>r(await l(e)),children:[(0,V.jsx)(N,{size:16,"aria-hidden":`true`}),t]}),n&&(0,V.jsx)(`span`,{className:`text-[13px] text-fail`,children:n})]})}function we({items:e,first:t,render:n}){let[r,i]=(0,B.useState)(!1);return(0,V.jsxs)(V.Fragment,{children:[(r?e:e.slice(0,t)).map(n),e.length>t&&(0,V.jsx)(`button`,{type:`button`,"aria-expanded":r,onClick:()=>i(!r),className:`min-h-8 cursor-pointer self-start border-0 bg-transparent px-0 text-[13px] font-medium text-accent-fg hover:underline`,children:r?`Show fewer`:`Show all ${e.length}`})]})}function Te({c:e}){if(!e.total)return null;let t=t=>`${t/e.total*100}%`;return(0,V.jsxs)(`div`,{role:`img`,"aria-label":`${e.passed} passed, ${e.failed} failed, ${e.other} other, of ${e.total}`,className:`flex h-2 overflow-hidden rounded-full bg-surface-strong`,children:[(0,V.jsx)(`div`,{className:`bg-pass`,style:{width:t(e.passed)}}),(0,V.jsx)(`div`,{className:`bg-fail`,style:{width:t(e.failed)}}),(0,V.jsx)(`div`,{className:`bg-warn`,style:{width:t(e.other)}})]})}function Ee({e}){let t=e.counts.total?Math.round(e.counts.passed/e.counts.total*100):0;return(0,V.jsxs)(`div`,{className:`flex flex-col gap-3 border-t border-line-soft pt-3 first:border-t-0 first:pt-0`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-start gap-x-3 gap-y-2`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_240px] flex-col gap-0.5`,children:[(0,V.jsx)(`span`,{className:`font-medium [overflow-wrap:anywhere]`,children:e.title}),(0,V.jsx)(`span`,{className:`text-[13px] text-muted`,children:[xe[e.scope]||e.scope,Se(e.ms),e.tokens?`${d(e.tokens)} tokens`:``,e.stopped?`stopped early`:``].filter(Boolean).join(` · `)})]}),e.report&&(0,V.jsx)(Ce,{path:e.report})]}),(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,V.jsxs)(`span`,{className:`text-[22px] font-semibold tabular-nums`,children:[t,`%`]}),(0,V.jsx)(`span`,{className:`text-muted`,children:`passed`}),(0,V.jsxs)(F,{tone:`pass`,children:[e.counts.passed,` passed`]}),e.counts.failed>0&&(0,V.jsxs)(F,{tone:`fail`,children:[e.counts.failed,` failed`]}),e.counts.other>0&&(0,V.jsxs)(F,{tone:`warn`,children:[e.counts.other,` other`]}),(0,V.jsxs)(`span`,{className:`text-muted`,children:[`of `,e.counts.total]})]}),(0,V.jsx)(Te,{c:e.counts}),e.cases.length>0&&(0,V.jsx)(`ul`,{"aria-label":`Cases of ${e.title}`,className:`m-0 flex list-none flex-col p-0`,children:(0,V.jsx)(we,{items:[...e.cases].sort((e,t)=>Number(U(t.status).tone===`fail`)-Number(U(e.status).tone===`fail`)),first:6,render:(e,t)=>(0,V.jsxs)(`li`,{className:`flex min-w-0 items-start gap-3 border-t border-line-soft py-2 text-sm`,children:[(0,V.jsx)(`span`,{className:`w-[76px] flex-none`,children:(0,V.jsx)(F,{tone:U(e.status).tone,children:U(e.status).label})}),(0,V.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-0.5`,children:[(0,V.jsxs)(`span`,{className:`[overflow-wrap:anywhere]`,children:[e.id&&(0,V.jsx)(`span`,{className:`mr-1.5 font-mono text-[12px] text-muted`,children:e.id}),e.title,e.device&&(0,V.jsxs)(`span`,{className:`text-muted`,children:[` · `,e.device]})]}),e.summary&&(0,V.jsx)(`span`,{className:`line-clamp-2 text-[13px] text-muted`,children:e.summary})]}),(0,V.jsx)(`span`,{className:`flex-none text-[13px] text-muted tabular-nums`,children:Se(e.ms)})]},`${e.id}-${t}`)})}),e.folder&&!e.report&&(0,V.jsxs)(`span`,{className:`text-sm`,children:[`Kept in `,(0,V.jsx)(M,{path:e.folder})]})]})}function De({list:e}){let t=e.reduce((e,t)=>({total:e.total+t.counts.total,passed:e.passed+t.counts.passed,failed:e.failed+t.counts.failed}),{total:0,passed:0,failed:0});return(0,V.jsx)(W,{title:`Execution summary`,icon:(0,V.jsx)(m,{size:18,"aria-hidden":`true`}),aside:e.length>1?(0,V.jsxs)(`span`,{className:`text-sm text-muted`,children:[C(e.length,`run`),` · `,t.passed,` of `,t.total,` passed`]}):void 0,children:e.length?e.map((e,t)=>(0,V.jsx)(Ee,{e},`${e.folder||e.title}-${t}`)):(0,V.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`No results found for this run yet: they appear once its report is written.`})})}function Oe({list:e}){return(0,V.jsxs)(W,{title:`Report summary`,icon:(0,V.jsx)(P,{size:18,"aria-hidden":`true`}),children:[e.length===0&&(0,V.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`No report was written in this run.`}),e.map((e,t)=>(0,V.jsxs)(`div`,{className:`flex flex-col gap-3 border-t border-line-soft pt-3 first:border-t-0 first:pt-0`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-start gap-x-3 gap-y-2`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_240px] flex-col gap-0.5`,children:[(0,V.jsx)(`span`,{className:`font-medium [overflow-wrap:anywhere]`,children:e.title}),(0,V.jsx)(`span`,{className:`text-[13px] text-muted`,children:e.builtAt?`Written ${new Date(e.builtAt).toLocaleString([],{dateStyle:`medium`,timeStyle:`short`})}`:e.path?``:`Its page is not there any more`})]}),e.path&&(0,V.jsx)(Ce,{path:e.path})]}),e.stats&&(0,V.jsx)(`dl`,{className:`m-0 grid grid-cols-[repeat(auto-fit,minmax(110px,1fr))] gap-2`,children:e.stats.map(e=>(0,V.jsxs)(`div`,{className:`rounded-[10px] bg-surface-muted px-3 py-2`,children:[(0,V.jsx)(`dt`,{className:`text-[12px] text-muted`,children:e.label}),(0,V.jsx)(`dd`,{className:`m-0 text-[18px] font-semibold tabular-nums`,children:e.value})]},e.label))}),e.markdown&&(0,V.jsx)(ke,{text:e.markdown})]},`${e.path||e.title}-${t}`))]})}function ke({text:e,height:t=220}){let[n,r]=(0,B.useState)(!1),[i,a]=(0,B.useState)(!0),o=(0,B.useRef)(null);return(0,B.useLayoutEffect)(()=>{o.current&&!n&&a(o.current.scrollHeight>t+8)},[e,t,n]),(0,V.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,V.jsxs)(`div`,{ref:o,style:n?void 0:{maxHeight:t},className:n?``:`relative overflow-hidden`,children:[(0,V.jsx)(j,{text:e,className:`text-sm`}),!n&&i&&(0,V.jsx)(`div`,{className:`pointer-events-none absolute inset-x-0 bottom-0 h-12 bg-gradient-to-t from-bg to-transparent`})]}),(n||i)&&(0,V.jsx)(`button`,{type:`button`,"aria-expanded":n,onClick:()=>r(!n),className:`min-h-8 cursor-pointer self-start border-0 bg-transparent px-0 text-[13px] font-medium text-accent-fg hover:underline`,children:n?`Show less`:`Show all of it`})]})}function Ae(e){let t=e.join(`
2
+ `),n=Math.max(2,...(t.match(/`+/g)||[]).map(e=>e.length)),r="`".repeat(n+1);return`${r}diff\n${t}\n${r}`}function je({e}){let[t,n]=(0,B.useState)(!1),r=e.action===`write`?`New`:`Edited`;return(0,V.jsxs)(`li`,{className:`border-t border-line-soft`,children:[(0,V.jsxs)(`div`,{className:`flex min-h-[44px] min-w-0 items-center gap-2 py-1.5 text-sm`,children:[(0,V.jsx)(`button`,{type:`button`,"aria-expanded":t,"aria-label":`${t?`Hide`:`Show`} the diff of ${e.path}`,disabled:!e.diffs.length,onClick:()=>n(!t),className:`inline-flex size-8 flex-none cursor-pointer items-center justify-center rounded-lg border-0 bg-transparent text-muted hover:bg-surface-strong disabled:cursor-default disabled:opacity-40`,children:t?(0,V.jsx)(_,{size:16,"aria-hidden":`true`}):(0,V.jsx)(oe,{size:16,"aria-hidden":`true`})}),(0,V.jsx)(`span`,{className:`w-[52px] flex-none text-[12px] text-muted`,children:r}),(0,V.jsx)(`span`,{className:`min-w-0 flex-1 truncate`,children:(0,V.jsx)(M,{path:e.path})}),(0,V.jsxs)(`span`,{className:`flex-none font-mono text-[12px] tabular-nums`,children:[(0,V.jsxs)(`span`,{className:`text-pass`,children:[`+`,e.added]}),` `,(0,V.jsxs)(`span`,{className:`text-fail`,children:[`−`,e.removed]})]})]}),t&&(0,V.jsx)(`div`,{className:`pb-3 pl-10 [&_pre]:max-h-[420px] [&_pre]:overflow-auto`,children:e.diffs.length?(0,V.jsx)(j,{text:Ae(e.diffs)}):null})]})}function Me({c:e}){let t=e.edits.reduce((e,t)=>e+t.added,0),n=e.edits.reduce((e,t)=>e+t.removed,0),r=e.tests.at(-1),i=e.reviews.at(-1);return(0,V.jsxs)(W,{title:`Code changes`,icon:(0,V.jsx)(R,{size:18,"aria-hidden":`true`}),aside:(0,V.jsxs)(`span`,{className:`font-mono text-[13px] tabular-nums`,children:[e.edits.length,` file`,e.edits.length===1?``:`s`,` · `,(0,V.jsxs)(`span`,{className:`text-pass`,children:[`+`,t]}),` `,(0,V.jsxs)(`span`,{className:`text-fail`,children:[`−`,n]})]}),children:[e.results.map((e,t)=>(0,V.jsxs)(`div`,{className:`flex flex-col gap-2 rounded-[12px] bg-surface-muted px-4 py-3 text-sm`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsx)(F,{tone:e.status===`passed`||e.status===`done`?`pass`:e.status===`error`||e.status===`failed`?`fail`:`warn`,children:U(e.status).label}),e.testFile&&(0,V.jsx)(M,{path:e.testFile}),e.maxAttempts>0&&(0,V.jsxs)(`span`,{className:`text-muted`,children:[`attempt `,e.attempts,` of `,e.maxAttempts]}),e.review&&(0,V.jsx)(F,{tone:e.review.approved?`pass`:`warn`,children:e.review.approved?`Review approved`:`Review not approved`})]}),e.error&&(0,V.jsx)(`p`,{className:`m-0 text-fail`,children:e.error}),e.notes&&(0,V.jsx)(j,{text:e.notes,className:`text-sm [&_p]:my-1`}),e.command&&(0,V.jsx)(j,{text:`Run it with \`${e.command.replace(/`/g,``)}\``,className:`text-sm [&_p]:my-0`})]},t)),(r||i)&&(0,V.jsxs)(`div`,{className:`flex flex-wrap gap-2 text-sm`,children:[r&&(0,V.jsxs)(F,{tone:r.ok?`pass`:`fail`,children:[`Last test run `,r.ok?`passed`:`failed`,e.tests.length>1?` (${e.tests.length} runs)`:``]}),i&&(0,V.jsxs)(F,{tone:i.approved?`pass`:`warn`,children:[`Review `,i.approved?`approved`:`asked for ${i.issues} fix${i.issues===1?``:`es`}`]})]}),e.edits.length?(0,V.jsx)(`ul`,{"aria-label":`Files changed`,className:`m-0 flex list-none flex-col p-0`,children:(0,V.jsx)(we,{items:e.edits,first:8,render:e=>(0,V.jsx)(je,{e},e.path)})}):(0,V.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`No files changed.`}),e.edits.some(e=>!e.diffs.length)&&(0,V.jsx)(`p`,{className:`m-0 text-[13px] text-muted`,children:`A file without a diff was changed before ForgeQE kept diffs, or is a hidden or credential file, whose text is not kept.`})]})}function Ne({final:e,answer:t}){let n=e.from===`agent`?t?.facts??[]:[],r=e.from===`agent`?t?.files??[]:[],i=e.from!==`agent`,a=Math.max(2,...(e.text.match(/`+/g)||[]).map(e=>e.length)),o="`".repeat(a+1);return(0,V.jsxs)(W,{title:`Final message`,icon:(0,V.jsx)(he,{size:18,"aria-hidden":`true`}),aside:(0,V.jsx)(`span`,{className:`text-[13px] text-muted`,children:e.from===`agent`?`The agent's last reply`:e.from===`job`?`The end of the job's output`:`What the command said at the end`}),children:[n.length>0&&(0,V.jsx)(`dl`,{className:`m-0 grid grid-cols-[repeat(auto-fit,minmax(180px,1fr))] gap-2`,children:n.map((e,t)=>(0,V.jsxs)(`div`,{className:`min-w-0 rounded-[10px] bg-surface-muted px-3 py-2`,children:[(0,V.jsx)(`dt`,{className:`text-[12px] text-muted`,children:e.label}),(0,V.jsx)(`dd`,{className:`m-0 text-sm [overflow-wrap:anywhere]`,children:(0,V.jsx)(j,{text:e.value,className:`[&_p]:my-0`})})]},`${e.label}-${t}`))}),(0,V.jsx)(ke,{text:i?`${o}text\n${e.text}\n${o}`:te(e.text),height:360}),r.length>0&&(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 text-sm`,children:[(0,V.jsx)(`span`,{className:`text-muted`,children:`Files it names:`}),r.map(e=>(0,V.jsx)(M,{path:e},e))]})]})}var Pe={rule:{icon:me,label:`Rulebook`},decision:{icon:f,label:`Test decisions`},memory:{icon:S,label:`Page memory`},replay:{icon:r,label:`Replays`},model:{icon:g,label:`Model`},skill:{icon:i,label:`Skills`}};function Fe({list:e}){let t=Object.keys(Pe).filter(t=>e.some(e=>e.kind===t));return(0,V.jsx)(W,{title:`Learnings`,icon:(0,V.jsx)(_e,{size:18,"aria-hidden":`true`}),aside:e.length?(0,V.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[e.length,` from this session`]}):void 0,children:e.length===0?(0,V.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Nothing learned or decided in this session: no rules, test decisions, page memory or model switches in its log.`}):(0,V.jsx)(`div`,{className:`grid grid-cols-[repeat(auto-fit,minmax(280px,1fr))] gap-x-6 gap-y-3`,children:t.map(t=>{let{icon:n,label:r}=Pe[t];return(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,V.jsxs)(`h4`,{className:`m-0 flex items-center gap-1.5 text-[13px] font-medium text-muted`,children:[(0,V.jsx)(n,{size:14,"aria-hidden":`true`}),r]}),(0,V.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:e.filter(e=>e.kind===t).map((e,t)=>(0,V.jsxs)(`li`,{className:`flex flex-col gap-0.5 border-t border-line-soft py-1.5 text-sm first:border-t-0`,children:[(0,V.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:e.text}),e.note&&(0,V.jsx)(`span`,{className:`text-[13px] text-muted [overflow-wrap:anywhere]`,children:e.note})]},t))})]},t)})})})}function Ie({run:e}){let t=[];return(e.executions.length||e.kind===`execution`)&&t.push({kind:`execution`,node:(0,V.jsx)(De,{list:e.executions},`e`)}),(e.reports.length||e.kind===`report`)&&t.push({kind:`report`,node:(0,V.jsx)(Oe,{list:e.reports},`r`)}),e.coding&&(e.coding.edits.length||e.coding.results.length||e.kind===`coding`)&&t.push({kind:`coding`,node:(0,V.jsx)(Me,{c:e.coding},`c`)}),t.sort((t,n)=>Number(n.kind===e.kind)-Number(t.kind===e.kind)),(0,V.jsx)(V.Fragment,{children:t.map(e=>e.node)})}var Le={running:{label:`Running`,tone:`running`},done:{label:`Done`,tone:`pass`},failed:{label:`Failed`,tone:`fail`},stopped:{label:`Stopped`,tone:`neutral`}},Re={chat:`Chat`,suite:`Suite`,monitor:`Monitor`,run:`Browser run`,start:`Chat`,heal:`Heal`,"pr-tests":`PR tests`,pack:`Pack`,pipeline:`Pipeline watch`,explore:`Explore`,api:`API tests`,generate:`Generate`,jobs:`Jobs service`},ze=e=>Re[e]||e.charAt(0).toUpperCase()+e.slice(1),G=e=>{if(!e)return``;let t=new Date(e);return Number.isNaN(t.getTime())?e:t.toLocaleString([],{month:`short`,day:`numeric`,...t.getFullYear()===new Date().getFullYear()?{}:{year:`numeric`},hour:`numeric`,minute:`2-digit`})},K=(e,t)=>Math.max(0,Math.round(((e.status===`running`?t:Date.parse(e.lastAt))-Date.parse(e.startedAt))/1e3)),q=e=>Number.isFinite(e)?e<60?`${e}s`:e<3600?`${Math.floor(e/60)}m ${e%60}s`:`${Math.floor(e/3600)}h ${Math.floor(e%3600/60)}m`:`–`,J=e=>e.usage.input+e.usage.output;function Be(e){let[t,n]=(0,B.useState)(Date.now());return(0,B.useEffect)(()=>{if(!e)return;let t=setInterval(()=>n(Date.now()),1e3);return()=>clearInterval(t)},[e]),t}function Ve({r:t}){return t.origin.kind===`web`?(0,V.jsxs)(`a`,{href:E(`chats`,t.origin.chat),className:`inline-flex items-center gap-1.5`,children:[(0,V.jsx)(e,{size:14,"aria-hidden":`true`}),`Web chat`]}):t.origin.kind===`job`?(0,V.jsxs)(`a`,{href:E(`jobs`,encodeURIComponent(t.origin.job)),className:`inline-flex items-center gap-1.5`,children:[(0,V.jsx)(O,{size:14,"aria-hidden":`true`}),`Job`]}):(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1.5 text-muted`,children:[(0,V.jsx)(ie,{size:14,"aria-hidden":`true`}),`Terminal`]})}function He({status:e}){let t=Le[e].label;return e===`running`?(0,V.jsx)(u,{size:16,"aria-label":t,className:`flex-none animate-spin text-accent-fg`}):e===`done`?(0,V.jsx)(ue,{size:16,"aria-label":t,className:`flex-none text-pass`}):e===`failed`?(0,V.jsx)(w,{size:16,"aria-label":t,className:`flex-none text-fail`}):(0,V.jsx)(ee,{size:16,"aria-label":t,className:`flex-none text-muted`})}var Y=e=>e.status!==`running`&&!e.tools&&!e.turns&&!J(e)&&!e.files.length&&!e.outputs.length&&K(e,0)<2;function X({label:e,children:t}){return(0,V.jsxs)(`div`,{className:`grid grid-cols-[120px_minmax(0,1fr)] items-baseline gap-3 border-t border-line-soft py-2 text-sm first:border-t-0`,children:[(0,V.jsx)(`span`,{className:`text-[13px] text-muted`,children:e}),(0,V.jsx)(`span`,{className:`min-w-0 [overflow-wrap:anywhere]`,children:t})]})}function Z({title:e,children:t}){return(0,V.jsxs)(`section`,{className:`flex min-w-0 flex-col rounded-[14px] border border-line-soft px-4 py-3`,children:[(0,V.jsx)(`h3`,{className:`m-0 mb-1 text-[14px] font-semibold`,children:e}),t]})}var Ue={rerun:ce,write_test:le,investigate:de,fix_test:b};function We({actions:e}){let[n,r]=(0,B.useState)(``),[i,a]=(0,B.useState)(``);if(!e.length)return null;let o=async e=>{r(e.prompt),a(``);try{let{id:n}=await t.start(e.prompt,{});location.hash=E(`chats`,n)}catch(e){a(e.message),r(``)}};return(0,V.jsxs)(`section`,{"aria-label":`Next steps`,className:`flex flex-col gap-2`,children:[(0,V.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:e.map((e,t)=>{let r=Ue[e.kind];return(0,V.jsxs)(`button`,{type:`button`,disabled:!!n,onClick:()=>void o(e),className:y(`flex min-h-[52px] max-w-full cursor-pointer items-center gap-3 rounded-[14px] border px-3 py-2 text-left disabled:cursor-default disabled:opacity-60`,t===0?`border-accent bg-accent-soft hover:bg-accent-soft/70`:`border-line-soft bg-bg hover:bg-surface-muted`),children:[(0,V.jsx)(r,{size:18,"aria-hidden":`true`,className:`flex-none text-accent-fg`}),(0,V.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,V.jsx)(`span`,{className:`text-sm font-medium text-ink`,children:n===e.prompt?`Opening a chat…`:e.label}),(0,V.jsx)(`span`,{className:`max-w-[320px] truncate text-[12px] text-muted`,children:e.note})]})]},t)})}),(0,V.jsx)(`span`,{className:`text-[12px] text-muted`,children:`Each opens a chat with the request; it asks before it changes anything.`}),i&&(0,V.jsx)(`p`,{className:`m-0 text-sm text-fail`,children:i})]})}var Q=e=>`\`${e.replace(/`/g,``)}\``;function Ge({name:e}){let[t,n]=(0,B.useState)(null),[r,i]=(0,B.useState)(``),[a,o]=(0,B.useState)(!1),[s,l]=(0,B.useState)(`summary`),u=(0,B.useCallback)(()=>{c.detail(e).then(e=>{n(e),i(``)},e=>i(e.message))},[e]);(0,B.useEffect)(u,[u]);let f=t?.status===`running`;(0,B.useEffect)(()=>{if(!f)return;let e=setInterval(u,2e3);return()=>clearInterval(e)},[u,f]);let p=Be(f),m=(0,B.useMemo)(()=>(t?.events??[]).map(ne).filter(e=>!!e),[t?.events]),h=async()=>{o(!0),i(``);try{await c.cancel(e),u()}catch(e){i(e.message)}finally{o(!1)}},g=(0,V.jsxs)(`a`,{href:E(`runs`),className:`inline-flex items-center gap-1.5 text-sm`,children:[(0,V.jsx)(ae,{size:16,"aria-hidden":`true`}),`All runs`]});if(!t)return(0,V.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[g,r?(0,V.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail`,children:r}):(0,V.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Loading…`})]});let _=Le[t.status],b=!t.replies.length,S=!!t.final||t.executions.length>0||t.reports.length>0||!!(t.coding&&(t.coding.edits.length||t.coding.results.length))||t.learnings.length>0||t.outputs.length>0,w=[{id:`summary`,label:`Summary`},{id:`conversation`,label:b?`Command`:`Conversation`,n:t.replies.length||void 0},{id:`activity`,label:`Activity`,n:m.length||void 0},{id:`details`,label:`Details`}],T=new Set([...t.reports.map(e=>e.path),...t.executions.flatMap(e=>[e.report,e.folder])].filter(Boolean)),D=t.outputs.filter(e=>!T.has(e.path)),O=t.context?.limit?Math.round(t.context.tokens/t.context.limit*100):null;return(0,V.jsxs)(`div`,{className:`flex flex-col gap-5`,children:[g,(0,V.jsxs)(`div`,{className:`flex flex-wrap items-start gap-x-3 gap-y-3`,children:[(0,V.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_320px] flex-col gap-1.5`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-x-3 gap-y-1`,children:[(0,V.jsx)(`h2`,{className:`m-0 min-w-0 text-[22px] font-semibold tracking-[-0.01em] [overflow-wrap:anywhere]`,children:t.title}),(0,V.jsx)(F,{tone:_.tone,children:_.label})]}),(0,V.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1 text-[13px] text-muted`,children:[(0,V.jsxs)(`span`,{className:`inline-flex items-center gap-1.5`,children:[(0,V.jsx)(ye,{kind:t.kind}),H[t.kind]]}),`· `,(0,V.jsx)(Ve,{r:t}),`· `,G(t.startedAt),` · `,f?`running for `:`took `,q(K(t,p)),` · `,d(J(t)),` tokens`,t.profile?.model?` · ${t.profile.model}`:``]})]}),t.cancel&&(0,V.jsxs)(v,{disabled:a,onClick:()=>void h(),className:`border-fail text-fail hover:bg-fail-soft`,children:[(0,V.jsx)(x,{size:14,fill:`currentColor`,"aria-hidden":`true`}),a?`Stopping…`:t.cancel===`chat`?`Stop this chat's work`:`Cancel this job's run`]})]}),r&&(0,V.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:r}),t.error&&(0,V.jsxs)(`p`,{className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:[(0,V.jsx)(`strong`,{children:`What went wrong:`}),` `,t.error]}),!f&&(0,V.jsx)(We,{actions:t.actions??[]}),(0,V.jsx)(`div`,{role:`tablist`,"aria-label":`This run`,className:`flex gap-1 overflow-x-auto border-b border-line-soft`,children:w.map(e=>(0,V.jsxs)(`button`,{type:`button`,role:`tab`,id:`run-tab-${e.id}`,"aria-selected":s===e.id,"aria-controls":`run-panel-${e.id}`,onClick:()=>l(e.id),className:y(`-mb-px inline-flex min-h-10 cursor-pointer items-center gap-1.5 border-0 border-b-2 bg-transparent px-3 text-sm font-medium whitespace-nowrap`,s===e.id?`border-accent text-ink`:`border-transparent text-muted hover:text-ink`),children:[e.label,e.n!==void 0&&(0,V.jsx)(`span`,{className:`text-[12px] text-muted tabular-nums`,children:e.n})]},e.id))}),(0,V.jsxs)(`div`,{role:`tabpanel`,id:`run-panel-${s}`,"aria-labelledby":`run-tab-${s}`,className:`flex min-w-0 flex-col gap-4`,children:[s===`summary`&&(0,V.jsxs)(V.Fragment,{children:[t.final&&(0,V.jsx)(Ne,{final:t.final,answer:t.answer}),(0,V.jsx)(Ie,{run:t}),D.length>0&&(0,V.jsx)(Z,{title:`What it produced (${D.length})`,children:D.map(e=>(0,V.jsx)(X,{label:e.label,children:(0,V.jsx)(M,{path:e.path})},e.path))}),t.learnings.length>0&&(0,V.jsx)(Fe,{list:t.learnings}),!S&&(0,V.jsx)(`p`,{className:`m-0 rounded-[12px] bg-surface-muted px-4 py-3 text-sm text-ink-2`,children:f?`Still working: its answer and what it produces show here when it ends.`:`This run left no answer, results or files. Its Activity shows what it did.`})]}),s===`conversation`&&(b?(0,V.jsx)(j,{text:Q(t.prompt),className:`text-sm [&_p]:my-0`}):(0,V.jsx)(`ol`,{className:`m-0 flex list-none flex-col gap-4 p-0`,children:t.replies.map((e,t)=>(0,V.jsxs)(`li`,{className:`flex flex-col gap-2`,children:[(0,V.jsx)(`div`,{className:`self-end rounded-[14px] bg-surface-strong px-4 py-2.5 text-sm max-w-[85%]`,children:(0,V.jsx)(j,{text:e.ask,className:`[&_p]:my-0.5`})}),e.text&&(0,V.jsx)(j,{text:te(e.text),className:`text-sm`}),e.error&&(0,V.jsx)(`p`,{className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:e.error})]},t))})),s===`activity`&&(t.archived?(0,V.jsxs)(`p`,{className:`m-0 rounded-[12px] bg-surface-muted px-4 py-3 text-sm text-ink-2`,children:[`ForgeQE keeps the newest session logs only, and this run's is gone. Its summary, final message and learnings were kept in `,(0,V.jsx)(`code`,{className:`font-mono text-[13px]`,children:`.forgeqe/runs`}),`; its step-by-step activity was not.`]}):m.length?(0,V.jsx)(re,{lines:m,start:t.startedAt,live:f,name:`forgeqe-run-${t.name.replace(/\.log$/,``)}.md`}):(0,V.jsx)(`p`,{className:`m-0 text-sm text-muted`,children:`Nothing logged yet.`})),s===`details`&&(0,V.jsxs)(`div`,{className:`grid items-start gap-3 @3xl:grid-cols-2`,children:[(0,V.jsxs)(Z,{title:`Numbers`,children:[(0,V.jsx)(X,{label:f?`Running for`:`Took`,children:q(K(t,p))}),(0,V.jsxs)(X,{label:`Tokens`,children:[d(J(t)),` `,(0,V.jsxs)(`span`,{className:`text-muted`,children:[`(`,d(t.usage.input),` in · `,d(t.usage.output),` out`,t.usage.cached?` · ${d(t.usage.cached)} cached`:``,`)`]})]}),(0,V.jsxs)(X,{label:`Context`,children:[t.context?d(t.context.tokens):`–`,O!==null&&(0,V.jsxs)(`span`,{className:`text-muted`,children:[` of `,d(t.context.limit),` (`,O,`%)`]})]}),(0,V.jsxs)(X,{label:`Tool calls`,children:[t.tools,` `,(0,V.jsxs)(`span`,{className:`text-muted`,children:[`in `,C(t.turns,`turn`)]})]})]}),(0,V.jsxs)(Z,{title:`Session`,children:[(0,V.jsx)(X,{label:`Started by`,children:(0,V.jsx)(Ve,{r:t})}),(0,V.jsx)(X,{label:`Command`,children:ze(t.command)}),(0,V.jsx)(X,{label:`Model`,children:t.profile?[t.profile.name,t.profile.model].filter(Boolean).join(` · `):`–`}),(0,V.jsx)(X,{label:`Agents`,children:t.agents.length?t.agents.map(e=>`${e.name} (${C(e.calls,`call`)})`).join(`, `):(0,V.jsx)(`span`,{className:`text-muted`,children:`None`})}),(0,V.jsxs)(X,{label:`Log`,children:[t.archived?(0,V.jsx)(`span`,{className:`text-muted`,children:`No longer kept: ForgeQE keeps the newest logs only`}):(0,V.jsx)(M,{path:`.forgeqe/logs/${t.name}`}),t.truncated&&(0,V.jsx)(`span`,{className:`block text-[13px] text-muted`,children:`Very long: only its start is shown.`})]})]}),t.job&&(0,V.jsxs)(Z,{title:`Job`,children:[(0,V.jsx)(X,{label:`Job`,children:(0,V.jsx)(`a`,{href:E(`jobs`,encodeURIComponent(t.origin.kind===`job`?t.origin.job:t.job.name)),children:t.job.name})}),(0,V.jsx)(X,{label:`Runs`,children:(0,V.jsx)(j,{text:Q(t.job.command),className:`text-sm [&_p]:my-0`})}),(0,V.jsxs)(X,{label:`Schedule`,children:[t.job.schedule,!t.job.enabled&&` (disabled)`,t.job.nextAt&&t.job.enabled?` · next ${G(t.job.nextAt)}`:``]}),t.job.run&&(0,V.jsxs)(X,{label:`This run`,children:[t.job.run.reason===`asked`?`Asked for`:`On schedule`,`, `,t.job.run.status.replace(`_`,` `),t.job.run.exitCode!==void 0&&t.job.run.exitCode!==null?`, exit ${t.job.run.exitCode}`:``]})]}),(0,V.jsx)(Z,{title:`Files worked on (${t.files.length})`,children:t.files.length?t.files.map(e=>(0,V.jsx)(X,{label:e.action===`write`?`Written`:e.action===`edit`?`Edited`:e.action===`delete`?`Deleted`:e.action||`Changed`,children:e.action===`delete`?(0,V.jsx)(`span`,{className:`font-mono text-[13px]`,children:e.path}):(0,V.jsx)(M,{path:e.path})},e.path)):(0,V.jsx)(`p`,{className:`m-0 py-1 text-sm text-muted`,children:`No files changed.`})}),(0,V.jsx)(Z,{title:`Notifications`,children:t.notifications.length?t.notifications.map(e=>(0,V.jsx)(X,{label:e.event.replace(/_/g,` `),children:e.channels.length?e.channels.join(`, `):(0,V.jsx)(`span`,{className:`text-muted`,children:`No channel takes it`})},e.event)):(0,V.jsx)(`p`,{className:`m-0 py-1 text-sm text-muted`,children:t.origin.kind===`terminal`||t.origin.kind===`web`?`None: notify channels go with jobs, suites and the monitor.`:`No notify channels are set up (Settings, Notify).`})})]})]})]})}var $=25;function Ke({runs:e}){let t=Be(e.some(e=>e.status===`running`)),[n,r]=(0,B.useState)(``),[i,a]=(0,B.useState)(`all`),[s,c]=(0,B.useState)(``),[l,u]=(0,B.useState)(``),[f,m]=(0,B.useState)(!1),[h,g]=(0,B.useState)(0);(0,B.useEffect)(()=>g(0),[n,i,s,l,f]);let _=e.filter(Y).length,b=n.toLowerCase().split(/\s+/).filter(Boolean),x=e.filter(e=>(f||!Y(e))&&(!s||e.kind===s)&&(!l||e.origin.kind===l)&&b.every(t=>`${e.title} ${e.command} ${e.error||``}`.toLowerCase().includes(t))),S={all:x.length,running:x.filter(e=>e.status===`running`).length,failed:x.filter(e=>e.status===`failed`).length},w=i===`all`?x:x.filter(e=>e.status===i),T=Math.max(1,Math.ceil(w.length/$)),D=Math.min(h,T-1),O=w.slice(D*$,D*$+$),k=e.filter(e=>e.status!==`running`&&!Y(e)),A=k.filter(e=>e.status===`failed`).length,ee=k.length?k.reduce((e,n)=>e+K(n,t),0)/k.length:NaN,j=e.reduce((e,t)=>e+J(t),0),M=[...new Set(e.map(e=>e.kind))],N=[...new Set(e.map(e=>e.origin.kind))],P={web:`Web chat`,job:`Job`,terminal:`Terminal`};return e.length===0?(0,V.jsx)(`p`,{className:`m-0 rounded-[14px] bg-surface-muted px-5 py-4 text-sm leading-relaxed text-ink-2`,children:`No runs yet. A chat here, a job, or a ForgeQE command in this project adds one.`}):(0,V.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,V.jsxs)(`div`,{className:`flex flex-wrap gap-x-6 gap-y-1 text-[13px] text-muted`,children:[(0,V.jsxs)(`span`,{children:[(0,V.jsx)(`b`,{className:`text-ink tabular-nums`,children:e.length-_}),` runs`]}),e.some(e=>e.status===`running`)&&(0,V.jsxs)(`span`,{children:[(0,V.jsx)(`b`,{className:`text-accent-fg tabular-nums`,children:e.filter(e=>e.status===`running`).length}),` running now`]}),(0,V.jsxs)(`span`,{children:[(0,V.jsx)(`b`,{className:y(`tabular-nums`,A?`text-fail`:`text-ink`),children:A}),` failed`,k.length?` (${Math.round(A/k.length*100)}%)`:``]}),(0,V.jsxs)(`span`,{children:[(0,V.jsx)(`b`,{className:`text-ink tabular-nums`,children:d(j)}),` tokens`]}),(0,V.jsxs)(`span`,{children:[(0,V.jsx)(`b`,{className:`text-ink tabular-nums`,children:q(Math.round(ee))}),` on average`]})]}),(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,V.jsxs)(`div`,{className:`relative min-w-0 flex-[1_1_240px]`,children:[(0,V.jsx)(de,{size:16,"aria-hidden":`true`,className:`pointer-events-none absolute top-1/2 left-3 -translate-y-1/2 text-muted`}),(0,V.jsx)(`label`,{htmlFor:`run-search`,className:`sr-only`,children:`Find a run`}),(0,V.jsx)(o,{id:`run-search`,type:`search`,value:n,onChange:e=>r(e.target.value),placeholder:`Find a run by what was asked`,className:`h-9 pl-9`})]}),[[`all`,`All`],[`running`,`Running`],[`failed`,`Failed`]].map(([e,t])=>(0,V.jsxs)(`button`,{type:`button`,"aria-pressed":i===e,onClick:()=>a(e),className:y(`inline-flex min-h-8 cursor-pointer items-center gap-1 rounded-[8px] border px-3 text-[13px] font-medium`,i===e?`border-accent bg-accent-soft text-ink`:`border-transparent bg-surface-strong text-ink-2 hover:bg-line hover:text-ink`),children:[t,(0,V.jsx)(`span`,{className:y(`tabular-nums`,e===`failed`&&S.failed?`text-fail`:``),children:S[e]})]},e)),M.length>1&&(0,V.jsxs)(p,{"aria-label":`What it did`,value:s,onChange:e=>c(e.target.value),className:`h-8 w-auto py-0 pr-7 pl-3 text-[13px]`,children:[(0,V.jsx)(`option`,{value:``,children:`Any kind`}),M.map(e=>(0,V.jsx)(`option`,{value:e,children:H[e]},e))]}),N.length>1&&(0,V.jsxs)(p,{"aria-label":`Started by`,value:l,onChange:e=>u(e.target.value),className:`h-8 w-auto py-0 pr-7 pl-3 text-[13px]`,children:[(0,V.jsx)(`option`,{value:``,children:`Started anywhere`}),N.map(e=>(0,V.jsx)(`option`,{value:e,children:P[e]||e},e))]})]}),(0,V.jsxs)(`div`,{className:`rounded-[14px] border border-line-soft bg-bg`,children:[(0,V.jsxs)(`div`,{"aria-hidden":`true`,className:`hidden grid-cols-[auto_minmax(0,1fr)_104px_104px_72px_64px_92px] items-center gap-x-4 border-b border-line-soft px-4 py-2 text-[12px] font-semibold text-muted @3xl:grid`,children:[(0,V.jsx)(`span`,{className:`w-4`}),(0,V.jsx)(`span`,{children:`Run`}),(0,V.jsx)(`span`,{children:`Kind`}),(0,V.jsx)(`span`,{children:`Started by`}),(0,V.jsx)(`span`,{className:`text-right`,children:`Took`}),(0,V.jsx)(`span`,{className:`text-right`,children:`Tokens`}),(0,V.jsx)(`span`,{className:`text-right`,children:`When`})]}),(0,V.jsxs)(`ul`,{"aria-label":`Runs`,className:`m-0 list-none p-1.5`,children:[O.length===0&&(0,V.jsx)(`li`,{className:`px-3 py-4 text-sm text-muted`,children:`Nothing matches.`}),O.map((e,n)=>{let r=I(e.startedAt);return(0,V.jsxs)(`li`,{className:`contents`,children:[(n===0||I(O[n-1].startedAt)!==r)&&(0,V.jsx)(`span`,{className:`block px-3 pt-3 pb-1 text-[12px] font-semibold text-muted`,children:r}),(0,V.jsxs)(`a`,{href:E(`runs`,encodeURIComponent(e.name)),className:`grid min-h-12 grid-cols-[auto_minmax(0,1fr)_auto] items-center gap-x-3 rounded-[10px] px-3 py-1.5 text-ink no-underline hover:bg-surface-muted hover:text-ink @3xl:grid-cols-[auto_minmax(0,1fr)_104px_104px_72px_64px_92px] @3xl:gap-x-4`,children:[(0,V.jsx)(He,{status:e.status}),(0,V.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,V.jsx)(`span`,{className:`truncate text-[14px] font-medium`,title:e.title,children:e.title}),e.error?(0,V.jsx)(`span`,{className:`truncate text-[12px] text-fail`,children:e.error}):(0,V.jsx)(`span`,{className:`truncate text-[12px] text-muted @3xl:hidden`,children:[H[e.kind],P[e.origin.kind],q(K(e,t)),`${d(J(e))} tokens`].join(` · `)})]}),(0,V.jsxs)(`span`,{className:`hidden min-w-0 items-center gap-1.5 text-[13px] text-ink-2 @3xl:inline-flex`,children:[(0,V.jsx)(ye,{kind:e.kind}),H[e.kind]]}),(0,V.jsx)(`span`,{className:`hidden text-[13px] text-ink-2 @3xl:block`,children:P[e.origin.kind]||e.origin.kind}),(0,V.jsx)(`span`,{className:`hidden text-right text-[13px] text-muted tabular-nums @3xl:block`,children:q(K(e,t))}),(0,V.jsx)(`span`,{className:`hidden text-right text-[13px] text-muted tabular-nums @3xl:block`,children:d(J(e))}),(0,V.jsx)(`span`,{className:`text-right text-[12.5px] text-muted tabular-nums`,title:G(e.startedAt),children:fe(e.startedAt)})]})]},e.name)})]}),(0,V.jsxs)(`div`,{className:`flex flex-wrap items-center gap-3 border-t border-line-soft px-4 py-2.5 text-[13px] text-muted`,children:[(0,V.jsxs)(`span`,{className:`flex-1`,children:[w.length?`${D*$+1}–${Math.min(w.length,D*$+$)} of ${w.length}`:`0 runs`,_>0&&(0,V.jsxs)(V.Fragment,{children:[` · `,(0,V.jsx)(`button`,{type:`button`,onClick:()=>m(!f),className:`cursor-pointer border-0 bg-transparent p-0 text-[13px] text-accent-fg hover:underline`,children:f?`Hide the ${C(_,`empty session`)}`:`${C(_,`empty session`)} hidden`})]})]}),T>1&&(0,V.jsxs)(`nav`,{"aria-label":`Pages of runs`,className:`flex items-center gap-1`,children:[(0,V.jsx)(v,{size:`sm`,variant:`ghost`,disabled:D===0,onClick:()=>g(D-1),"aria-label":`Newer runs`,children:(0,V.jsx)(se,{size:16,"aria-hidden":`true`})}),(0,V.jsxs)(`span`,{className:`px-1 tabular-nums`,children:[`Page `,D+1,` of `,T]}),(0,V.jsx)(v,{size:`sm`,variant:`ghost`,disabled:D>=T-1,onClick:()=>g(D+1),"aria-label":`Older runs`,children:(0,V.jsx)(oe,{size:16,"aria-hidden":`true`})})]})]})]})]})}function qe({sub:e}){let[t,r]=(0,B.useState)(null),[i,a]=(0,B.useState)(``),o=(0,B.useCallback)(()=>{c.list().then(e=>{r(e.runs),a(``)},e=>a(e.message))},[]);(0,B.useEffect)(o,[o]);let s=t?.some(e=>e.status===`running`);(0,B.useEffect)(()=>{if(e)return;let t=setInterval(o,s?3e3:2e4);return()=>clearInterval(t)},[o,s,e]);let l=e?decodeURIComponent(e):``;return(0,V.jsxs)(`div`,{className:`flex min-h-screen flex-col`,children:[(0,V.jsx)(D,{}),(0,V.jsx)(`main`,{className:y(A,`@container flex-auto gap-4`),children:l?(0,V.jsx)(Ge,{name:l},l):(0,V.jsxs)(V.Fragment,{children:[(0,V.jsxs)(`div`,{className:`flex items-center gap-3`,children:[(0,V.jsx)(T,{icon:n,size:`lg`}),(0,V.jsx)(`h1`,{className:`m-0 text-[26px] font-semibold tracking-[-0.01em]`,children:`Runs`})]}),(0,V.jsx)(`p`,{className:`m-0 max-w-[70ch] text-sm leading-relaxed text-muted`,children:`Every ForgeQE session in this project: chats here, jobs' runs, and commands typed in a terminal, newest first. Open one for how it went and what it produced.`}),i&&(0,V.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[12px] bg-fail-soft px-3 py-2 text-sm text-fail [overflow-wrap:anywhere]`,children:i}),!t&&!i&&(0,V.jsx)(`p`,{role:`status`,className:`m-0 text-sm text-muted`,children:`Loading…`}),t&&(0,V.jsx)(Ke,{runs:t})]})})]})}export{qe as Runs};
@@ -0,0 +1,21 @@
1
+ <?xml version="1.0" encoding="UTF-8" standalone="no"?>
2
+ <svg
3
+ xmlns:svg="http://www.w3.org/2000/svg"
4
+ xmlns="http://www.w3.org/2000/svg"
5
+ version="1.1"
6
+ id="svg3709"
7
+ width="1024"
8
+ height="239"
9
+ viewBox="-1.06668594 -1.06668594 161.58207188 37.68956988">
10
+ <defs
11
+ id="defs3711" />
12
+ <path
13
+ id="path3676"
14
+ style="fill:#12ABDB;fill-opacity:1;fill-rule:evenodd;stroke:none"
15
+ d="m 153.2175,21.2782 c 3.4962,0 6.1962,-2.8462 6.2312,-6.225 -0.245,-1.475 -0.7625,-4.2037 -4.585,-4.2037 -4.19,0 -5.5762,5.8487 -8.985,9.6237 -0.2737,2.1438 -2.305,4.0625 -4.8387,4.385 0.62,0.6488 2.0025,1.0013 3.6525,1.0013 3.0175,0 6.67,-0.9088 8.5837,-2.7988 -2.5537,0.035 -4.1937,-1.6062 -4.355,-3.8762 1.245,1.5087 2.6513,2.0937 4.2963,2.0937" />
16
+ <path
17
+ id="path3678"
18
+ style="fill:#0070AD;fill-opacity:1;fill-rule:evenodd;stroke:none"
19
+ d="m 126.3725,11.972 c 0,-1.86 -0.1125,-3.1 -1.3288,-3.1 -0.5562,0 -0.825,0.1125 -1.3087,0.2725 0.43,6.28 -0.9913,11.8125 -2.7238,11.8125 -2.2712,0 -1.1387,-13.4625 -5.9475,-13.4625 -4.4387,0 -5.0787,10.7475 -5.5812,10.7475 -0.3425,0 -0.395,-2.8225 -0.3763,-4.9763 0.1863,-1.03 0.2888,-1.9575 0.2888,-2.6612 0,-1 -0.41,-2.7288 -2.6813,-1.865 0.079,7.6862 -1.46,12.3287 -3.1937,12.3287 -2.5388,0 -2.5675,-6.9675 -2.5675,-8.8862 0,-1.875 0.1362,-4.38 -2.6513,-3.4913 -0.415,6.7038 -2.1737,11.7625 -3.2812,11.7625 -1.6513,0 -1.3188,-11.5812 -4.8888,-11.5812 -3.2125,0 -4.2037,10.9712 -4.8725,10.9712 -1.1962,0 0.3763,-12.3487 -4.2625,-12.3487 -2.4312,0 -3.3987,4.1212 -4.3512,8.735 -0.185,0.8937 -0.375,0.9237 -0.41,-0.087 -0.024,-0.8588 -0.029,-1.7238 -0.019,-2.5825 1.1663,-4.6388 -0.2587,-6.3525 -2.4075,-5.1175 0.6938,8.56 -3.2375,12.7437 -6.25,12.7437 -1.0887,0 -1.9487,-0.4637 -2.5875,-1.1962 3.6125,-2.2163 5.2188,-4.76 5.2188,-7.2463 0,-2.69 -1.5475,-4.2425 -4.1163,-4.2425 -3.5837,0 -5.59,3.6913 -5.59,6.8313 0,1.6887 0.3175,3.125 0.835,4.3062 -1.2312,0.5863 -2.3925,1.0938 -3.4725,1.5863 -0.098,-3.2275 -0.4587,-6.615 -0.7362,-9.745 -1.91,-0.5275 -2.4663,0.39 -2.6125,2.0887 -0.3425,3.8775 -1.7775,6.285 -3.0475,6.285 -0.9525,0 -1.5375,-1.1625 -1.6063,-2.3975 -0.3562,-6.2162 4.6875,-7.945 7.3288,-7.0412 0.5475,-1.3725 -0.054,-2.3588 -2.4363,-2.3588 -2.8862,0 -5.0437,1.7538 -6.6262,4.0038 -1.0538,1.5 -2.275,2.5637 -3.8963,3.8487 0.044,-0.3662 0.064,-0.7375 0.064,-1.1037 0,-4.38 -2.3738,-6.3038 -4.6388,-6.3038 -1.875,0 -3.0562,1.1225 -3.74,2.8513 -0.1662,-1.7338 -0.5125,-2.48 -1.5187,-2.48 -0.43,0 -1.03,0.1212 -1.67,0.4337 0.2925,0.9675 0.405,3.1113 0.405,4.5175 0,5.2675 -1.5088,7.6313 -2.9588,7.6313 -1.66,0 -1.9237,-6.25 -2.065,-8.6813 -0.2587,-0.098 -0.5325,-0.1512 -0.8112,-0.1512 -1.5038,0 -1.6988,2.0162 -2.07,3.8712 -0.41,2.0563 -1.5913,4.6388 -3.345,4.6388 -1.0588,0 -1.7238,-1.02 -1.8063,-2.8563 -0.1712,-3.725 2.93,-8.14 7.7788,-6.7675 0.6337,-1.4837 -0.3625,-2.6125 -2.3738,-2.6125 -3.545,0 -6.475,2.6513 -7.7537,5.7913 -1.2988,2.8812 -3.57,7.11 -8.1888,7.11 C 6.26,21.7975 3.76,18.95 3.76,12.9787 c 0,-5.1462 3.2462,-10.035 6.7087,-10.035 2.4213,0 2.9838,2.3838 2.7688,4.62 1.255,1.005 3.31,0.067 3.31,-2.4462 0,-1.7338 -1.4063,-4.6738 -5.9513,-4.6738 C 4.9712,0.4437 0,6.055 0,13.4225 0,20.5612 3.6225,24.78 8.75,24.78 c 3.2375,0 6.2887,-1.845 8.3937,-5.2538 0.5325,2.9838 2.5638,4.2388 4.0863,4.2388 2.4662,0 4.0775,-1.5975 4.9562,-3.755 0.5475,2.1625 1.7038,3.765 3.6288,3.765 1.3525,0 2.4112,-0.6888 3.2075,-1.7875 -0.3175,7.5187 -0.7125,12.3137 3.73,11.3725 -0.6875,-2.1388 -0.9075,-6.0313 -0.9075,-9.5275 0,-9.565 1.5775,-12.7138 3.555,-12.7138 1.435,0 1.8987,1.825 1.8987,3.7738 0,1.045 -0.1025,2.2462 -0.3662,3.325 -2.4313,1.5337 -4.37,2.745 -4.37,4.2825 0,1.2162 0.9037,1.3275 1.685,1.3275 1.865,0 4.1112,-1.83 5.3512,-5.2825 1.0838,-0.6588 2.1725,-1.4113 3.2125,-2.4363 -0.034,0.3513 -0.054,0.7025 -0.054,1.0638 0,3.4275 1.4987,5.5037 3.8962,5.5037 1.88,0 3.2863,-1.3337 4.2825,-3.33 0.064,1.1513 0.1025,2.2113 0.1175,3.1825 -3.8087,1.7638 -8.0225,3.55 -8.0225,8.5213 0,2.5725 1.855,4.5062 4.2725,4.5062 5.3075,0 6.5188,-5.6 6.5675,-12.1087 1.7288,-0.7475 3.0125,-1.3238 4.4975,-2.0613 1.2688,1.5925 2.9975,2.3888 4.58,2.3888 2.9925,0 5.2438,-1.5875 7.05,-4.805 0.3175,2.4462 0.9525,4.805 2.2563,4.805 2.3725,0 2.8562,-12.4125 4.6187,-12.4125 1.3525,0 0.245,13.4275 3.8138,13.4275 3.0562,0 3.6275,-11.8163 5.1175,-11.8163 1.055,0 1.1325,10.8013 4.4625,10.8013 1.6362,0 3.4137,-1.9688 4.3012,-6.09 0.42,2.745 1.8025,6.09 4.5075,6.09 1.5775,0 2.935,-1.5975 3.9838,-3.7163 0.2887,2.1825 0.9037,3.7163 2.1,3.7163 3.11,0 3.0075,-12.3838 5.4687,-12.3838 1.9188,0 1.3288,12.3838 5.8988,12.3838 2.1725,0 3.2025,-1.8513 3.8187,-4.18 0.8388,3.4225 2.2013,4.18 3.315,4.18 0.7075,0 1.245,-0.25 1.9488,-1.085 -3.5363,-1.5325 -3.2375,-7.1138 -3.2375,-10.7175 m -74.8438,21.27 c -1.0987,0 -1.68,-1.045 -1.68,-2.2225 0,-3.1788 2.3338,-4.8625 5.205,-6.3125 -0.1275,6.9425 -1.7437,8.535 -3.525,8.535 m 14.2775,-22.51 c 1.0688,0 1.6788,0.9812 1.5713,2.3925 -0.1213,1.655 -1.3275,3.555 -3.4275,5.0437 -1.0938,-3.115 -0.2775,-7.4362 1.8562,-7.4362 M 99.6722,6.035 c 1.0162,-0.034 1.7287,-0.9075 1.7337,-1.9475 0.01,-1.04 -0.6987,-1.8613 -1.7187,-1.8225 -1.02,0.035 -1.85,0.9087 -1.855,1.9487 -0.01,1.04 0.82,1.855 1.84,1.8213 m 25.3325,0.5275 c 0.9275,-0.034 1.685,-0.8638 1.685,-1.855 0,-0.9913 -0.7425,-1.7675 -1.67,-1.7388 -0.9288,0.034 -1.685,0.8688 -1.69,1.86 -0.01,0.9913 0.7475,1.7675 1.675,1.7338 m 34.4387,8.2425 c -0.079,-3.9263 -1.9437,-7.2363 -4.825,-9.8788 -2.1875,-1.9962 -4.785,-3.515 -7.5087,-4.6575 -0.215,-0.092 -0.44,-0.1812 -0.66,-0.2687 -3.3538,4.0187 -14.965,7.0162 -14.965,15.44 0,3.29 2.08,6.3712 5.1312,7.6075 1.7725,0.6687 3.54,0.7025 5.3125,0.1062 1.5775,-0.5175 2.8713,-1.4937 3.95,-2.68 3.4088,-3.775 4.795,-9.6187 8.98,-9.6187 3.8275,0 4.345,2.7237 4.59,4.1987 0,-0.01 0,-0.1075 -0.01,-0.2487" />
20
+ </svg>
21
+ <!-- version: 20171223, original size: 159.4487 35.556198, border: 3% -->
@@ -1 +1 @@
1
- import{hn as e}from"./frame-Dq1wC8eF.js";var t={name:`circle-dashed`,size:24,node:[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]};t.node;var n=e(t);export{n as t};
1
+ import{_n as e}from"./frame-CHQgOaj6.js";var t={name:`circle-dashed`,size:24,node:[[`path`,{d:`M10.1 2.182a10 10 0 0 1 3.8 0`,key:`5ilxe3`}],[`path`,{d:`M13.9 21.818a10 10 0 0 1-3.8 0`,key:`11zvb9`}],[`path`,{d:`M17.609 3.721a10 10 0 0 1 2.69 2.7`,key:`1iw5b2`}],[`path`,{d:`M2.182 13.9a10 10 0 0 1 0-3.8`,key:`c0bmvh`}],[`path`,{d:`M20.279 17.609a10 10 0 0 1-2.7 2.69`,key:`1ruxm7`}],[`path`,{d:`M21.818 10.1a10 10 0 0 1 0 3.8`,key:`qkgqxc`}],[`path`,{d:`M3.721 6.391a10 10 0 0 1 2.7-2.69`,key:`1mcia2`}],[`path`,{d:`M6.391 20.279a10 10 0 0 1-2.69-2.7`,key:`1fvljs`}]]};t.node;var n=e(t);export{n as t};
@@ -1 +1 @@
1
- import{hn as e}from"./frame-Dq1wC8eF.js";var t={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};t.node;var n=e(t);export{n as t};
1
+ import{_n as e}from"./frame-CHQgOaj6.js";var t={name:`external-link`,size:24,node:[[`path`,{d:`M15 3h6v6`,key:`1q9fwt`}],[`path`,{d:`M10 14 21 3`,key:`gplh6r`}],[`path`,{d:`M18 13v6a2 2 0 0 1-2 2H5a2 2 0 0 1-2-2V8a2 2 0 0 1 2-2h6`,key:`a6xqqp`}]]};t.node;var n=e(t);export{n as t};
@@ -1 +1 @@
1
- import{hn as e}from"./frame-Dq1wC8eF.js";var t={name:`file-chart-column-increasing`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M12 18v-4`,key:`q1q25u`}],[`path`,{d:`M16 18v-6`,key:`15y0np`}]],aliases:[`file-bar-chart`]};t.node;var n=e(t);export{n as t};
1
+ import{_n as e}from"./frame-CHQgOaj6.js";var t={name:`file-chart-column-increasing`,size:24,node:[[`path`,{d:`M6 22a2 2 0 0 1-2-2V4a2 2 0 0 1 2-2h8a2.4 2.4 0 0 1 1.704.706l3.588 3.588A2.4 2.4 0 0 1 20 8v12a2 2 0 0 1-2 2z`,key:`1oefj6`}],[`path`,{d:`M14 2v5a1 1 0 0 0 1 1h5`,key:`wfsgrz`}],[`path`,{d:`M8 18v-2`,key:`qcmpov`}],[`path`,{d:`M12 18v-4`,key:`q1q25u`}],[`path`,{d:`M16 18v-6`,key:`15y0np`}]],aliases:[`file-bar-chart`]};t.node;var n=e(t);export{n as t};