@capagents/forgeqe 3.3.3 → 3.3.4
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/HOW_TO_USE.md +18 -10
- package/dist/docs-site/docs/area-operations/index.html +18 -10
- package/dist/docs-site/docs/search.js +1 -1
- package/dist/forgeqe.js +1899 -1899
- package/dist/web/assets/Agent-CPDdNdzX.js +10 -0
- package/dist/web/assets/{AgentWork-CqMhsFBP.js → AgentWork-DmCMV4YL.js} +1 -1
- package/dist/web/assets/ApiTests-C8XEETqg.js +17 -0
- package/dist/web/assets/{Chat-DO-UvDWX.js → Chat-DKOatIXA.js} +1 -1
- package/dist/web/assets/{Compare-BFuLcrBB.js → Compare-BIUv2jE1.js} +1 -1
- package/dist/web/assets/{Cost-DbKrBm9m.js → Cost-DiCKET0E.js} +1 -1
- package/dist/web/assets/{Data-B6_6Rm7C.js → Data-CjWcmOft.js} +1 -1
- package/dist/web/assets/{Desktop-CnBxMp68.js → Desktop-ChCPGa4S.js} +1 -1
- package/dist/web/assets/{DesktopReview-DVITz4Jv.js → DesktopReview-Bg2GEMn0.js} +1 -1
- package/dist/web/assets/{Evidence-BZx9UF1t.js → Evidence-B7iO8OAV.js} +1 -1
- package/dist/web/assets/{Explore-Kkl9koqy.js → Explore-VSyrooF_.js} +1 -1
- package/dist/web/assets/{Features-_WrrIGBz.js → Features-CyL67W6D.js} +1 -1
- package/dist/web/assets/{Flags-BGqG09qD.js → Flags-CTndlZ8W.js} +1 -1
- package/dist/web/assets/{Flaky-B7mr96H8.js → Flaky-DUztfo-f.js} +1 -1
- package/dist/web/assets/{Impact-DzAtWie1.js → Impact-DgJIBG7L.js} +1 -1
- package/dist/web/assets/{Jobs-YSmfG7C9.js → Jobs-DGtR5ObS.js} +1 -1
- package/dist/web/assets/{KindPage-UqU2qh63.js → KindPage-BVr4n0ZP.js} +1 -1
- package/dist/web/assets/{Migration-CfHZeobD.js → Migration-DXRwsp94.js} +1 -1
- package/dist/web/assets/{Mobile-DTMPjWeO.js → Mobile-D5D-DcNd.js} +1 -1
- package/dist/web/assets/{Observability-B-9cikxK.js → Observability-D0Y8qi2t.js} +1 -1
- package/dist/web/assets/{OwnItems-BC9M20At.js → OwnItems-7-j-eCvZ.js} +1 -1
- package/dist/web/assets/{PageAgent-CvV8gwuP.js → PageAgent-hlUDoATU.js} +1 -1
- package/dist/web/assets/{Product-lDXsflpD.js → Product-B3dgOq3I.js} +1 -1
- package/dist/web/assets/{Production-BHXWX-ww.js → Production-CW8pMuAY.js} +1 -1
- package/dist/web/assets/{Quality-Bsljiu_v.js → Quality-DCzS_GuJ.js} +1 -1
- package/dist/web/assets/{Readiness-BZppEirK.js → Readiness-BQ811zqC.js} +1 -1
- package/dist/web/assets/{Record-7h0EFEiJ.js → Record-Slru4bw9.js} +1 -1
- package/dist/web/assets/{Regression-DdM66t2E.js → Regression-BT_dP1xn.js} +1 -1
- package/dist/web/assets/{Reports-u72R1XBV.js → Reports-C19TfbRO.js} +1 -1
- package/dist/web/assets/{Requirements-BAcEi5Fl.js → Requirements-ROyC5mNL.js} +1 -1
- package/dist/web/assets/{Responsive-CCPzSbdd.js → Responsive-Cwky2L-3.js} +1 -1
- package/dist/web/assets/{RunDiff-CGhLqPpP.js → RunDiff-BbekEd9C.js} +1 -1
- package/dist/web/assets/{Settings-DDCiQZ0T.js → Settings-CIEWLuAi.js} +3 -3
- package/dist/web/assets/{Steps-sfVkdv7g.js → Steps-BjV1MGz-.js} +1 -1
- package/dist/web/assets/{TestData-B4-xVlvt.js → TestData-ChL4QzCY.js} +1 -1
- package/dist/web/assets/{TestManagement-BGBKGV1L.js → TestManagement-B2oqBgb7.js} +1 -1
- package/dist/web/assets/{WhatsNew-BMTuBbaX.js → WhatsNew-ID__g8MH.js} +1 -1
- package/dist/web/assets/{agentSettingsSheet-Cc2W6lyp.js → agentSettingsSheet-CCkfMiKg.js} +1 -1
- package/dist/web/assets/{dataParts-CkwgLllh.js → dataParts-_X5zGtE9.js} +1 -1
- package/dist/web/assets/frame-CgBYYtdw.js +13 -0
- package/dist/web/assets/index-Cq1_-QV9.css +2 -0
- package/dist/web/assets/{index-6SZomYE0.js → index-Ctos0-8H.js} +5 -5
- package/dist/web/assets/{markdown-1wY7hIbM.js → markdown-CwgDQU8m.js} +5 -5
- package/dist/web/assets/{productParts-D18glCBr.js → productParts-CmNi_5fy.js} +1 -1
- package/dist/web/assets/{qualityParts-1F1Ee4Ay.js → qualityParts-BzzN4OCT.js} +1 -1
- package/dist/web/index.html +4 -4
- package/docs/user-guide.html +18 -10
- package/package.json +1 -1
- package/dist/web/assets/Agent-Bd54dLhD.js +0 -10
- package/dist/web/assets/ApiTests-BO_sKAg8.js +0 -15
- package/dist/web/assets/frame-BMpSUo2-.js +0 -13
- package/dist/web/assets/index-CWqwtFKz.css +0 -2
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./react-BDur5s0O.js";import{r as n}from"./route-oDy8sV6H.js";import{F as r,l as i,o as a}from"./preload-helper-BupTYkQW.js";import{t as o}from"./utils-DJRAScIl.js";import{t as s}from"./jsx-runtime-LKYXHABd.js";import{J as c}from"./api-BsiuHmJq.js";import{C as l,S as u,b as d,f,g as p,x as m}from"./pageBack-CbyKfisx.js";import{At as h,E as g,Gt as _,N as v,Rr as y,Sr as b,br as x,mt as ee,o as S,ot as C,t as w,xr as T,z as E}from"./line-icons-CwCZidXs.js";import{Ct as D,bt as O,gt as k,ht as A,vt as j,xt as M,yt as N}from"./frame-BMpSUo2-.js";import{t as P}from"./when-BuWCTaKm.js";import{a as F,n as I}from"./markdown-1wY7hIbM.js";import{W as te}from"./index-6SZomYE0.js";var L=e(t(),1),R=s(),z=[`critical`,`serious`,`moderate`,`minor`],B={critical:`fail`,serious:`fail`,moderate:`warn`,minor:`neutral`},V=[{key:`lcp`,label:`LCP`,good:2500,poor:4e3,unit:`ms`},{key:`cls`,label:`CLS`,good:.1,poor:.25,unit:``},{key:`inp`,label:`INP`,good:200,poor:500,unit:`ms`},{key:`fcp`,label:`FCP`,good:1800,poor:3e3,unit:`ms`},{key:`ttfb`,label:`TTFB`,good:800,poor:1800,unit:`ms`},{key:`load`,label:`Load`,good:1/0,poor:1/0,unit:`ms`}],H={same:{label:`Same`,tone:`pass`},changed:{label:`Changed`,tone:`warn`},new:{label:`New baseline`,tone:`neutral`},no_baseline:{label:`No baseline`,tone:`neutral`}},U=e=>new Date(e).toLocaleString([],{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),W=(e,t)=>t?e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`:e.toFixed(3).replace(/(?<!0)0+$/,``).replace(/\.$/,``),G=(e,t)=>`${e} ${t}${e===1?``:`s`}`,ne=e=>e.replace(/(data:[\w/+.-]+;base64,)[A-Za-z0-9+/=]{24,}/g,`$1…`),K=e=>{try{let t=new URL(e),n=t.pathname===`/`?``:t.pathname.length>44?`${t.pathname.slice(0,20)}…${t.pathname.slice(-20)}`:t.pathname;return`${t.host}${n}${t.search?`?…`:``}`}catch{return e.length>70?`${e.slice(0,68)}…`:e}},re=e=>!!(e.breaches||e.a11y?.failed||e.perf.over||e.visual?.changed);function q({run:e,standard:t,disclaimer:n}){let r=e.report,[i,a]=(0,L.useState)(new Set),[s,c]=(0,L.useState)(`all`),[d,f]=(0,L.useState)(!1);if(!r?.accessibility.pages)return(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`This run has no accessibility results: report.accessibility was off, or the run visited no page.`});let h=r.accessibility,_=r.breaches.filter(e=>e.kind===`accessibility`),v=h.failed.filter(e=>s===`all`||e.impact===s).sort((e,t)=>z.indexOf(e.impact)-z.indexOf(t.impact)||t.count-e.count),y=e=>{let t=new Set(i);t.has(e)?t.delete(e):t.add(e),a(t)};return(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,R.jsxs)(`p`,{className:`m-0 text-body-sm text-muted`,children:[t,` with `,r.engine||`axe`,` on `,G(h.pages,`page`),`: `,(0,R.jsxs)(`span`,{className:`text-pass`,children:[G(h.passed.length,`rule`),` passed`]}),`, `,(0,R.jsxs)(`span`,{className:h.failed.length?`text-fail`:``,children:[h.failed.length,` failed`]}),`.`,` `,r.budgets.accessibility?_.length?`${G(_.length,`budget`)} exceeded.`:`Within the budget.`:`No budget set, so nothing here fails the run.`]}),_.map((e,t)=>(0,R.jsxs)(`p`,{className:o(l.fail,`m-0`),children:[`Over budget · `,K(e.page),`: `,e.text]},t)),h.failed.length>0&&(0,R.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:(0,R.jsx)(`div`,{role:`group`,"aria-label":`Impact`,className:`flex flex-wrap gap-1`,children:[`all`,...z].map(e=>{let t=e===`all`?h.failed.length:h.failed.filter(t=>t.impact===e).length;return e!==`all`&&!t?null:(0,R.jsxs)(`button`,{type:`button`,"aria-pressed":s===e,onClick:()=>c(e),className:o(u({size:`sm`}),`gap-1 font-normal capitalize`),children:[e,` `,(0,R.jsx)(`span`,{className:`tabular-nums opacity-75`,children:t})]},e)})})}),h.failed.length?(0,R.jsx)(A,{label:`Failed rules`,placeholder:`Find a rule, WCAG criterion, page or element`,resetKey:s,empty:`Nothing matches.`,head:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`th`,{scope:`col`,className:o(O,`w-[96px]`),children:`Impact`}),(0,R.jsx)(`th`,{scope:`col`,className:O,children:`Rule`}),(0,R.jsx)(`th`,{scope:`col`,className:o(O,`hidden @2xl:table-cell`),children:`WCAG`}),(0,R.jsx)(`th`,{scope:`col`,className:M,children:`Elements`}),(0,R.jsx)(`th`,{scope:`col`,className:M,children:`Pages`})]}),children:v.map(t=>{let n=i.has(t.rule),r=e.examples[t.rule]??[];return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsxs)(`tr`,{onClick:()=>y(t.rule),"aria-expanded":n,className:o(D,n&&`bg-surface-muted`),children:[(0,R.jsx)(`td`,{className:j,"data-sort":z.includes(t.impact)?z.length-z.indexOf(t.impact):0,children:(0,R.jsx)(p,{tone:B[t.impact],className:`min-h-5 px-2 text-body-sm capitalize`,children:t.impact})}),(0,R.jsx)(`td`,{className:j,children:(0,R.jsxs)(`span`,{className:`flex items-start gap-1`,children:[(0,R.jsx)(g,{size:13,"aria-hidden":`true`,className:o(`mt-1 flex-none text-muted transition-transform`,!n&&`-rotate-90`)}),(0,R.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,R.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:t.help}),(0,R.jsx)(`span`,{className:`font-mono text-body-sm text-muted`,children:t.rule})]})]})}),(0,R.jsx)(`td`,{className:o(j,`hidden whitespace-nowrap text-ink-2 @2xl:table-cell`),children:t.wcag?`${t.wcag}${t.level?` · ${t.level}`:``}`:`–`}),(0,R.jsx)(`td`,{className:N,children:t.count}),(0,R.jsx)(`td`,{className:N,children:t.pages})]}),n&&(0,R.jsxs)(`tr`,{className:`bg-surface-muted`,children:[(0,R.jsx)(`td`,{}),(0,R.jsx)(`td`,{colSpan:4,className:`px-4 py-2`,children:(0,R.jsxs)(`div`,{className:`flex flex-col divide-y divide-line-soft pl-4`,children:[r.length?r.map((e,t)=>(0,R.jsxs)(`div`,{className:`flex flex-col gap-1 py-2`,children:[(0,R.jsxs)(`span`,{className:`flex min-w-0 gap-2 text-body-sm text-muted`,children:[(0,R.jsx)(`span`,{className:`flex-none`,"data-tip":e.page,children:K(e.page)}),e.target&&(0,R.jsxs)(`span`,{className:`min-w-0 truncate font-mono text-body-sm`,"data-tip":e.target,children:[`· `,e.target]})]}),e.html&&(0,R.jsx)(`code`,{className:`line-clamp-3 font-mono text-body-sm break-all text-ink-2`,children:ne(e.html)})]},t)):(0,R.jsx)(`span`,{className:`text-body-sm text-muted`,children:`No elements were kept for this rule.`}),t.helpUrl&&F(t.helpUrl)===`web`&&(0,R.jsxs)(`a`,{href:t.helpUrl,target:`_blank`,rel:`noreferrer noopener`,className:`inline-flex items-center gap-1 self-start text-body-sm`,children:[`How to fix it `,(0,R.jsx)(C,{size:12,"aria-hidden":`true`})]})]})})]})]},t.rule)})}):(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-pass`,children:`No rule failed on the pages this run visited.`}),h.passed.length>0&&(0,R.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,R.jsxs)(m,{variant:`ghost`,size:`sm`,"aria-expanded":d,onClick:()=>f(!d),className:`gap-1 self-start`,children:[(0,R.jsx)(g,{size:13,"aria-hidden":`true`,className:o(`text-muted transition-transform`,!d&&`-rotate-90`)}),`Rules that passed `,(0,R.jsx)(`span`,{className:`font-normal text-muted tabular-nums`,children:h.passed.length})]}),d&&(0,R.jsx)(`ul`,{className:`m-0 flex list-none flex-wrap gap-1 p-0`,children:h.passed.map(e=>(0,R.jsx)(`li`,{children:(0,R.jsx)(p,{tone:`pass`,icon:!1,className:`font-mono`,children:e})},e))})]}),(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:n})]})}function J({run:e}){let t=e.report;if(!t?.performance.pages.length)return(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`This run has no timings: the run visited no page.`});let n=(e,t)=>e>t.poor?`poor`:e>t.good?`needs improvement`:`good`,r={poor:`text-fail`,"needs improvement":`text-warn`,good:`text-pass`},i=t.breaches.filter(e=>e.kind===`performance`);return(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,R.jsxs)(`p`,{className:`m-0 text-body-sm text-muted`,children:[`Core Web Vitals of each page, from one visit in the browser the agent drove, against Google's thresholds: `,(0,R.jsx)(`span`,{className:`text-pass`,children:`good`}),`, `,(0,R.jsx)(`span`,{className:`text-warn`,children:`needs improvement`}),`, `,(0,R.jsx)(`span`,{className:`text-fail`,children:`poor`}),`.`,` `,t.budgets.performance?`Pages over quality.budgets.performance are marked.`:`No performance budget set: nothing fails on timings.`]}),i.map((e,t)=>(0,R.jsxs)(`p`,{className:o(l.fail,`m-0`),children:[`Over budget · `,K(e.page),`: `,e.text]},t)),(0,R.jsx)(A,{label:`Timings`,minWidth:720,head:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`th`,{scope:`col`,className:O,children:`Page`}),V.map(e=>(0,R.jsx)(`th`,{scope:`col`,className:M,"data-tip":e.label,children:e.label},e.key)),(0,R.jsx)(`th`,{scope:`col`,className:M,children:`Requests`}),(0,R.jsx)(`th`,{scope:`col`,className:M,children:`Size`})]}),children:t.performance.pages.map((e,t)=>(0,R.jsxs)(`tr`,{className:`border-t border-line-soft align-top`,children:[(0,R.jsxs)(`td`,{className:j,children:[(0,R.jsx)(`span`,{className:`block max-w-[340px] truncate font-mono text-body-sm`,"data-tip":e.url,children:K(e.url)}),e.over.length>0&&(0,R.jsxs)(`span`,{className:`text-body-sm text-fail`,children:[`over: `,e.over.join(`, `)]})]}),V.map(t=>{let i=e[t.key];return(0,R.jsxs)(`td`,{"data-sort":typeof i==`number`?i:-1,className:o(N,typeof i==`number`&&t.good!==1/0?r[n(i,t)]:typeof i==`number`?`text-ink-2`:`text-muted`),children:[typeof i==`number`?W(i,t.unit):`–`,typeof i==`number`&&t.good!==1/0&&(0,R.jsxs)(`span`,{className:`sr-only`,children:[` (`,n(i,t),`)`]})]},t.key)}),(0,R.jsx)(`td`,{className:o(N,`text-muted`),children:e.requests??`–`}),(0,R.jsx)(`td`,{className:o(N,`text-muted`),"data-sort":e.kb??-1,children:e.kb===void 0?`–`:`${e.kb} KB`})]},t))}),(0,R.jsxs)(`p`,{className:`m-0 text-body-sm text-muted`,children:[V.filter(e=>e.good!==1/0).map(e=>`${e.label}: good up to ${W(e.good,e.unit)}, poor over ${W(e.poor,e.unit)}`).join(` · `),`. Lab values from one visit, not data from real users.`]})]})}function Y({run:e,index:t,which:n,label:r}){let[i,s]=(0,L.useState)(``),[l,u]=(0,L.useState)(!1);return(0,L.useEffect)(()=>{let r=!1;return s(``),u(!1),c.image(e,t,n).then(e=>!r&&s(e),()=>!r&&u(!0)),()=>{r=!0}},[e,t,n]),(0,R.jsxs)(`figure`,{className:`m-0 flex min-w-0 flex-col gap-2`,children:[(0,R.jsx)(`figcaption`,{className:`text-body-sm font-medium text-muted`,children:r}),i?(0,R.jsx)(`img`,{src:i,alt:`${r} of the page`,className:o(a,`block h-auto w-full`)}):(0,R.jsx)(`span`,{className:o(a,`flex h-[120px] items-center justify-center gap-2 text-body-sm text-muted`),children:l?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(d,{icon:_,size:14}),` Not available`]}):`Loading…`})]})}function X({run:e,budget:t,onChange:n}){let[i,a]=(0,L.useState)(null),[s,d]=(0,L.useState)(``),[f,h]=(0,L.useState)(!1),[_,b]=(0,L.useState)(``),[x,S]=(0,L.useState)(new Set),[C,w]=(0,L.useState)(`all`),T=e.visual?.pages??[],E=T.find(e=>e.status===`changed`)?.index;(0,L.useEffect)(()=>S(E===void 0?new Set:new Set([E])),[e.id,E]);let k=async e=>{h(!0),b(``);try{n(await e()),a(null),d(``)}catch(e){b(e.message)}finally{h(!1)}};if(!e.visual)return e.captured?(0,R.jsxs)(`div`,{className:`flex flex-col items-start gap-2`,children:[(0,R.jsxs)(`p`,{className:`m-0 text-body-sm text-ink-2`,children:[`This run captured `,G(e.captured,`page`),` but they were not compared with the baselines yet.`]}),(0,R.jsxs)(m,{size:`sm`,variant:`primary`,disabled:f,"data-tip":`Compare with the baselines`,onClick:()=>k(()=>c.compare(e.id)),children:[(0,R.jsx)(ee,{"aria-hidden":`true`}),`Compare`]}),_&&(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-fail`,children:_})]}):(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`This run has no visual captures: quality.visual.enabled was off, or the run visited no page.`});let P=T.filter(e=>e.status===`changed`),F=(C===`changed`?P:T).toSorted((e,t)=>Number(t.status===`changed`)-Number(e.status===`changed`)||(t.diffPercent??0)-(e.diffPercent??0)),I=e=>{let t=new Set(x);t.has(e)?t.delete(e):t.add(e),S(t)};return(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,R.jsxs)(`p`,{className:`m-0 text-body-sm text-muted`,children:[`Each page captured with animations frozen and masked regions hidden, against its approved baseline. `,t?`A page over quality.budgets.visual fails the run.`:`No visual budget set: a change does not fail the run.`]}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,R.jsx)(`div`,{role:`group`,"aria-label":`Show`,className:`flex gap-1`,children:[[`all`,`All pages`,T.length],[`changed`,`Changed`,P.length]].map(([e,t,n])=>(0,R.jsxs)(`button`,{type:`button`,"aria-pressed":C===e,onClick:()=>w(e),className:o(u({size:`sm`}),`gap-1 font-normal`),children:[t,` `,(0,R.jsx)(`span`,{className:`tabular-nums opacity-75`,children:n})]},e))}),(0,R.jsx)(`span`,{className:`flex-1`}),P.length>1&&(0,R.jsxs)(m,{size:`sm`,disabled:f,"data-tip":`Approve all ${P.length} changes`,onClick:()=>a(P.map(e=>e.url)),children:[(0,R.jsx)(v,{"aria-hidden":`true`}),`Approve (`,P.length,`)`]})]}),i&&(0,R.jsxs)(`div`,{role:`alertdialog`,"aria-label":`Approve as baseline`,className:o(l.info,`flex flex-col gap-2`),children:[(0,R.jsxs)(`span`,{className:`font-medium`,children:[`Make this run's capture the baseline of `,i.length===1?K(i[0]):G(i.length,`page`),`?`]}),(0,R.jsx)(`span`,{className:`text-ink-2`,children:`Later runs are compared with it. Approve only a change that was intended; one that was not is a visual defect.`}),(0,R.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[`Why it changed (kept with the baseline)`,(0,R.jsx)(r,{size:`sm`,value:s,maxLength:300,placeholder:`New checkout banner`,onChange:e=>d(e.target.value),className:`max-w-[480px]`})]}),(0,R.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,R.jsxs)(m,{size:`sm`,variant:`primary`,disabled:f,onClick:()=>k(()=>c.approve(e.id,i,s.trim()||void 0)),children:[(0,R.jsx)(v,{"aria-hidden":`true`}),`Approve`]}),(0,R.jsxs)(m,{size:`sm`,onClick:()=>a(null),children:[(0,R.jsx)(y,{"aria-hidden":`true`}),`Cancel`]})]})]}),_&&(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-fail`,children:_}),(0,R.jsx)(A,{label:`Pages against their baselines`,fixed:!0,resetKey:C,empty:`No page changed.`,head:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`th`,{scope:`col`,className:O,children:`Page`}),(0,R.jsx)(`th`,{scope:`col`,className:o(O,`hidden w-[110px] @2xl:table-cell`),children:`Size`}),(0,R.jsx)(`th`,{scope:`col`,className:o(M,`w-[90px]`),children:`Changed`}),(0,R.jsx)(`th`,{scope:`col`,className:o(O,`w-[120px]`),children:`Result`}),(0,R.jsx)(`th`,{scope:`col`,className:o(O,`w-[96px]`),children:(0,R.jsx)(`span`,{className:`sr-only`,children:`Approve`})})]}),children:F.map(t=>{let n=x.has(t.index);return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsxs)(`tr`,{onClick:()=>I(t.index),"aria-expanded":n,className:o(D,n&&`bg-surface-muted`),children:[(0,R.jsx)(`td`,{className:j,children:(0,R.jsxs)(`span`,{className:`flex items-start gap-1`,children:[(0,R.jsx)(g,{size:13,"aria-hidden":`true`,className:o(`mt-1 flex-none text-muted transition-transform`,!n&&`-rotate-90`)}),(0,R.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,R.jsx)(`span`,{className:`truncate`,"data-tip":t.title||t.url,children:t.title||K(t.url)}),(0,R.jsx)(`span`,{className:`truncate font-mono text-body-sm text-muted`,"data-tip":t.url,children:K(t.url)})]})]})}),(0,R.jsxs)(`td`,{className:o(j,`hidden whitespace-nowrap text-muted @2xl:table-cell`),children:[t.size||`–`,t.resized?` · resized ${t.resized}`:``]}),(0,R.jsx)(`td`,{"data-sort":t.status===`changed`?t.diffPercent:-1,className:o(N,t.over?`text-fail`:t.status===`changed`?`text-warn`:`text-muted`),children:t.status===`changed`?`${t.diffPercent}%${t.limit===void 0?``:` / ${t.limit}%`}`:`–`}),(0,R.jsx)(`td`,{className:j,children:(0,R.jsx)(p,{tone:t.over?`fail`:H[t.status].tone,className:`min-h-5 px-2 text-body-sm`,children:t.over?`Over budget`:H[t.status].label})}),(0,R.jsx)(`td`,{className:N,onClick:e=>e.stopPropagation(),children:t.status===`changed`&&(0,R.jsx)(m,{variant:`icon`,size:`icon-sm`,disabled:f,"aria-label":`Approve ${K(t.url)}`,"data-tip":`Approve ${K(t.url)}`,onClick:()=>a([t.url]),children:(0,R.jsx)(v,{"aria-hidden":`true`})})})]}),n&&(0,R.jsx)(`tr`,{className:`bg-surface-muted`,children:(0,R.jsx)(`td`,{colSpan:5,className:`px-4 py-2`,children:(0,R.jsxs)(`div`,{className:`grid grid-cols-[repeat(auto-fit,minmax(180px,1fr))] gap-4`,children:[t.images.baseline&&(0,R.jsx)(Y,{run:e.id,index:t.index,which:`baseline`,label:`Baseline`}),t.images.current&&(0,R.jsx)(Y,{run:e.id,index:t.index,which:`current`,label:`This run`}),t.images.diff&&(0,R.jsx)(Y,{run:e.id,index:t.index,which:`diff`,label:`Difference (in red)`})]})})})]},t.index)})})]})}function ie({values:e}){if(e.length<2)return null;let t=Math.max(1,...e);return(0,R.jsx)(`span`,{role:`img`,"aria-label":`Violations over the last ${e.length} runs: ${e.join(`, `)}`,className:`flex flex-none items-end gap-1`,children:e.map((n,r)=>{let i=n?Math.max(1,Math.round(n/t*5)):0;return(0,R.jsx)(`span`,{className:`flex flex-col-reverse gap-1`,"aria-hidden":`true`,children:Array.from({length:Math.max(1,i)},(t,n)=>(0,R.jsx)(`i`,{className:o(`size-1.5 rounded-full`,i?r===e.length-1?`bg-accent`:`bg-accent-line`:`bg-line`)},n))},r)})})}function Z({icon:e,className:t,lines:n}){return n.length?(0,R.jsxs)(`span`,{className:o(`flex items-start gap-2 text-body-sm`,t),children:[(0,R.jsx)(d,{icon:e,size:14,className:`mt-1 flex-none`}),(0,R.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:n.join(` · `)})]}):null}function ae({trends:e}){return e.length?(0,R.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:e.map(e=>{let t=e.a11y.latest?z.reduce((t,n)=>t+(e.a11y.latest[n]||0),0):void 0;return(0,R.jsxs)(`li`,{className:`flex flex-col gap-2 border-t border-line-soft py-4 first:border-t-0`,children:[(0,R.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-4`,children:[(0,R.jsx)(`span`,{className:`min-w-0 flex-[1_1_240px] truncate font-mono text-body-sm`,"data-tip":e.page,children:/^https?:/.test(e.page)?K(e.page):e.page}),(0,R.jsx)(ie,{values:e.a11y.trail}),(0,R.jsxs)(`span`,{className:`text-body-sm text-muted`,children:[G(e.runs,`run`),t===void 0?``:` · ${G(t,`violation`)} now`]})]}),(0,R.jsx)(Z,{icon:T,className:`text-fail`,lines:[...e.perf.worse.map(e=>`slower: ${e}`),...e.a11y.newRules.map(e=>`newly failing: ${e}`)]}),(0,R.jsx)(Z,{icon:x,className:`text-pass`,lines:[...e.perf.better.map(e=>`faster: ${e}`),...e.a11y.fixedRules.map(e=>`fixed: ${e}`)]})]},e.page)})}):(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`No history yet: every browser run adds each page's accessibility and timings to quality-history.json in the reports folder.`})}var oe={accessibility:e=>!!e.a11y?.pages,performance:e=>e.perf.pages>0,visual:e=>!!e.visual||e.captured>0},Q={accessibility:e=>!!e.a11y?.failed,performance:e=>e.perf.over>0,visual:e=>!!(e.visual?.changed||e.visual?.over)},$=(e,t)=>t.filter(oe[e]);function se({kind:e,runs:t}){let[r,i]=(0,L.useState)(`all`),a=$(e,t),s=r===`attention`?a.filter(Q[e]):a,c=t=>location.hash=n(e,encodeURIComponent(t));return(0,R.jsx)(A,{label:`Runs`,placeholder:`Find a run by what it did`,resetKey:r,empty:`Nothing matches.`,height:k,tools:(0,R.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,R.jsx)(f,{items:[{id:`all`,label:`All`,n:a.length},{id:`attention`,label:`Needs a look`,n:a.filter(Q[e]).length,alert:!0}],value:r,onChange:i})}),head:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`th`,{scope:`col`,className:o(O,`w-[46%]`),children:`Run`}),e===`accessibility`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,children:`Rules failed`}),(0,R.jsx)(`th`,{scope:`col`,className:o(`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,`hidden @2xl:table-cell`),children:`Critical · serious`}),(0,R.jsx)(`th`,{scope:`col`,className:o(`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,`hidden @3xl:table-cell`),children:`Moderate · minor`}),(0,R.jsx)(`th`,{scope:`col`,className:o(`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,`hidden @xl:table-cell`),children:`Pages`})]}),e===`performance`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,children:`Over budget`}),(0,R.jsx)(`th`,{scope:`col`,className:o(`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,`hidden @xl:table-cell`),children:`Pages timed`})]}),e===`visual`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,children:`Changed`}),(0,R.jsx)(`th`,{scope:`col`,className:o(`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,`hidden @2xl:table-cell`),children:`New`}),(0,R.jsx)(`th`,{scope:`col`,className:o(`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,`hidden @xl:table-cell`),children:`Same`})]}),(0,R.jsx)(`th`,{scope:`col`,className:o(O,`hidden @xl:table-cell`),children:`When`})]}),children:s.map(t=>{let r=Q[e](t),i=(t.over?.[e]??0)>0,a=i?E:r?b:v,s=i?`text-fail`:r?`text-warn`:`text-pass`,l=i?`Over a budget`:r?`Needs a look`:`Within budgets`;return(0,R.jsxs)(`tr`,{onClick:()=>c(t.id),className:D,children:[(0,R.jsx)(`td`,{className:o(j,`max-w-0`),children:(0,R.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(a,{size:15,"aria-label":l,className:o(`flex-none`,s)}),(0,R.jsx)(`a`,{href:n(e,encodeURIComponent(t.id)),onClick:e=>e.stopPropagation(),"data-tip":t.goal,className:`truncate text-ink no-underline hover:underline`,children:t.goal})]})}),e===`accessibility`&&t.a11y&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,t.a11y.failed?`text-fail`:`text-muted`),children:t.a11y.failed}),(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden @2xl:table-cell`,t.a11y.critical+t.a11y.serious?`text-fail`:`text-muted`),"data-sort":t.a11y.critical*1e3+t.a11y.serious,children:`${t.a11y.critical} · ${t.a11y.serious}`}),(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden text-muted @3xl:table-cell`),"data-sort":t.a11y.moderate*1e3+t.a11y.minor,children:`${t.a11y.moderate} · ${t.a11y.minor}`}),(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden text-muted @xl:table-cell`),children:t.a11y.pages})]}),e===`performance`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,t.perf.over?`text-fail`:`text-muted`),children:t.perf.over}),(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden text-muted @xl:table-cell`),children:t.perf.pages})]}),e===`visual`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,t.visual?.changed?`text-warn`:`text-muted`),"data-sort":t.visual?t.visual.changed:-1,children:t.visual?t.visual.changed:`not compared`}),(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden text-muted @2xl:table-cell`),"data-sort":t.visual?t.visual.new+t.visual.no_baseline:-1,children:t.visual?t.visual.new+t.visual.no_baseline:`–`}),(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden text-muted @xl:table-cell`),"data-sort":t.visual?t.visual.same:-1,children:t.visual?t.visual.same:`–`})]}),(0,R.jsx)(`td`,{className:o(j,`hidden whitespace-nowrap text-body-sm text-muted @xl:table-cell`),"data-tip":U(t.at),"data-sort":new Date(t.at).getTime()||0,children:P(t.at)})]},t.id)})})}function ce({kind:e,id:t,view:r,onChanged:i}){let[a,s]=(0,L.useState)(null),[u,d]=(0,L.useState)(``);(0,L.useEffect)(()=>{let e=!1;return s(null),c.run(t).then(t=>{e||(s(t),d(``))},t=>!e&&d(t.message)),()=>{e=!0}},[t]);let f=(0,R.jsxs)(`a`,{href:n(e),className:`inline-flex items-center gap-1 self-start text-body-sm no-underline`,children:[(0,R.jsx)(g,{size:14,"aria-hidden":`true`,className:`rotate-90`}),`All runs`]});return u||!a?(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[f,u?(0,R.jsx)(`p`,{className:o(l.fail,`m-0`),children:u}):(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`Loading…`})]}):(0,R.jsxs)(`section`,{"aria-labelledby":`run-h`,className:`flex min-w-0 flex-col gap-4`,children:[f,(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,R.jsx)(te,{id:`run-h`,icon:e===`accessibility`?w:e===`performance`?h:_,title:(0,R.jsx)(`span`,{"data-tip":a.goal,className:`block truncate`,children:a.goal})}),(0,R.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-2 text-body-sm text-muted`,children:[U(a.at),` · `,(0,R.jsx)(I,{path:a.dir}),` · `,(0,R.jsx)(`a`,{href:n(`quality`,encodeURIComponent(a.id)),children:`Everything it measured`})]})]}),e===`accessibility`&&(0,R.jsx)(q,{run:a,standard:r.standard,disclaimer:r.disclaimer}),e===`performance`&&(0,R.jsx)(J,{run:a}),e===`visual`&&(0,R.jsx)(X,{run:a,budget:r.budgets.visual,onChange:e=>{s(e),i()}})]})}function le({r:e,to:t,line:n}){return(0,R.jsxs)(`div`,{className:o(i,`ml-12 flex flex-wrap items-center gap-x-4 gap-y-2`),children:[(0,R.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_240px] flex-col`,children:[(0,R.jsx)(`span`,{className:`text-body-lg font-medium [overflow-wrap:anywhere]`,children:e.goal}),(0,R.jsx)(`span`,{className:`text-body-sm text-muted`,children:n})]}),(0,R.jsxs)(m,{size:`sm`,variant:`primary`,"data-tip":`Open the run`,onClick:()=>location.hash=t,children:[(0,R.jsx)(S,{"aria-hidden":`true`}),`Open`]})]})}function ue({label:e,value:t,sub:n,tone:r}){return(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1 px-4 py-2`,children:[(0,R.jsx)(`span`,{className:`text-body-sm text-muted`,children:e}),(0,R.jsx)(`span`,{className:o(`text-body-lg leading-tight font-medium tabular-nums`,r),children:t}),n&&(0,R.jsx)(`span`,{className:`truncate text-body-sm text-muted`,children:n})]})}export{U as _,se as a,le as c,X as d,W as f,K as g,$ as h,ce as i,ae as l,G as m,z as n,ue as o,re as p,B as r,J as s,q as t,V as u};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{t}from"./react-BDur5s0O.js";import{r as n}from"./route-oDy8sV6H.js";import{F as r,l as i,o as a}from"./preload-helper-BupTYkQW.js";import{t as o}from"./utils-DJRAScIl.js";import{t as s}from"./jsx-runtime-LKYXHABd.js";import{J as c}from"./api-BsiuHmJq.js";import{C as l,S as u,b as d,f,g as p,x as m}from"./pageBack-CbyKfisx.js";import{At as h,E as g,Gt as _,N as v,Rr as y,Sr as b,br as x,mt as ee,o as S,ot as C,t as w,xr as T,z as E}from"./line-icons-CwCZidXs.js";import{Ct as D,bt as O,gt as k,ht as A,vt as j,xt as M,yt as N}from"./frame-CgBYYtdw.js";import{t as P}from"./when-BuWCTaKm.js";import{a as F,n as I}from"./markdown-CwgDQU8m.js";import{W as te}from"./index-Ctos0-8H.js";var L=e(t(),1),R=s(),z=[`critical`,`serious`,`moderate`,`minor`],B={critical:`fail`,serious:`fail`,moderate:`warn`,minor:`neutral`},V=[{key:`lcp`,label:`LCP`,good:2500,poor:4e3,unit:`ms`},{key:`cls`,label:`CLS`,good:.1,poor:.25,unit:``},{key:`inp`,label:`INP`,good:200,poor:500,unit:`ms`},{key:`fcp`,label:`FCP`,good:1800,poor:3e3,unit:`ms`},{key:`ttfb`,label:`TTFB`,good:800,poor:1800,unit:`ms`},{key:`load`,label:`Load`,good:1/0,poor:1/0,unit:`ms`}],H={same:{label:`Same`,tone:`pass`},changed:{label:`Changed`,tone:`warn`},new:{label:`New baseline`,tone:`neutral`},no_baseline:{label:`No baseline`,tone:`neutral`}},U=e=>new Date(e).toLocaleString([],{month:`short`,day:`numeric`,hour:`numeric`,minute:`2-digit`}),W=(e,t)=>t?e>=1e3?`${(e/1e3).toFixed(1)}s`:`${Math.round(e)}ms`:e.toFixed(3).replace(/(?<!0)0+$/,``).replace(/\.$/,``),G=(e,t)=>`${e} ${t}${e===1?``:`s`}`,ne=e=>e.replace(/(data:[\w/+.-]+;base64,)[A-Za-z0-9+/=]{24,}/g,`$1…`),K=e=>{try{let t=new URL(e),n=t.pathname===`/`?``:t.pathname.length>44?`${t.pathname.slice(0,20)}…${t.pathname.slice(-20)}`:t.pathname;return`${t.host}${n}${t.search?`?…`:``}`}catch{return e.length>70?`${e.slice(0,68)}…`:e}},re=e=>!!(e.breaches||e.a11y?.failed||e.perf.over||e.visual?.changed);function q({run:e,standard:t,disclaimer:n}){let r=e.report,[i,a]=(0,L.useState)(new Set),[s,c]=(0,L.useState)(`all`),[d,f]=(0,L.useState)(!1);if(!r?.accessibility.pages)return(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`This run has no accessibility results: report.accessibility was off, or the run visited no page.`});let h=r.accessibility,_=r.breaches.filter(e=>e.kind===`accessibility`),v=h.failed.filter(e=>s===`all`||e.impact===s).sort((e,t)=>z.indexOf(e.impact)-z.indexOf(t.impact)||t.count-e.count),y=e=>{let t=new Set(i);t.has(e)?t.delete(e):t.add(e),a(t)};return(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,R.jsxs)(`p`,{className:`m-0 text-body-sm text-muted`,children:[t,` with `,r.engine||`axe`,` on `,G(h.pages,`page`),`: `,(0,R.jsxs)(`span`,{className:`text-pass`,children:[G(h.passed.length,`rule`),` passed`]}),`, `,(0,R.jsxs)(`span`,{className:h.failed.length?`text-fail`:``,children:[h.failed.length,` failed`]}),`.`,` `,r.budgets.accessibility?_.length?`${G(_.length,`budget`)} exceeded.`:`Within the budget.`:`No budget set, so nothing here fails the run.`]}),_.map((e,t)=>(0,R.jsxs)(`p`,{className:o(l.fail,`m-0`),children:[`Over budget · `,K(e.page),`: `,e.text]},t)),h.failed.length>0&&(0,R.jsx)(`div`,{className:`flex flex-wrap items-center gap-2`,children:(0,R.jsx)(`div`,{role:`group`,"aria-label":`Impact`,className:`flex flex-wrap gap-1`,children:[`all`,...z].map(e=>{let t=e===`all`?h.failed.length:h.failed.filter(t=>t.impact===e).length;return e!==`all`&&!t?null:(0,R.jsxs)(`button`,{type:`button`,"aria-pressed":s===e,onClick:()=>c(e),className:o(u({size:`sm`}),`gap-1 font-normal capitalize`),children:[e,` `,(0,R.jsx)(`span`,{className:`tabular-nums opacity-75`,children:t})]},e)})})}),h.failed.length?(0,R.jsx)(A,{label:`Failed rules`,placeholder:`Find a rule, WCAG criterion, page or element`,resetKey:s,empty:`Nothing matches.`,head:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`th`,{scope:`col`,className:o(O,`w-[96px]`),children:`Impact`}),(0,R.jsx)(`th`,{scope:`col`,className:O,children:`Rule`}),(0,R.jsx)(`th`,{scope:`col`,className:o(O,`hidden @2xl:table-cell`),children:`WCAG`}),(0,R.jsx)(`th`,{scope:`col`,className:M,children:`Elements`}),(0,R.jsx)(`th`,{scope:`col`,className:M,children:`Pages`})]}),children:v.map(t=>{let n=i.has(t.rule),r=e.examples[t.rule]??[];return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsxs)(`tr`,{onClick:()=>y(t.rule),"aria-expanded":n,className:o(D,n&&`bg-surface-muted`),children:[(0,R.jsx)(`td`,{className:j,"data-sort":z.includes(t.impact)?z.length-z.indexOf(t.impact):0,children:(0,R.jsx)(p,{tone:B[t.impact],className:`min-h-5 px-2 text-body-sm capitalize`,children:t.impact})}),(0,R.jsx)(`td`,{className:j,children:(0,R.jsxs)(`span`,{className:`flex items-start gap-1`,children:[(0,R.jsx)(g,{size:13,"aria-hidden":`true`,className:o(`mt-1 flex-none text-muted transition-transform`,!n&&`-rotate-90`)}),(0,R.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,R.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:t.help}),(0,R.jsx)(`span`,{className:`font-mono text-body-sm text-muted`,children:t.rule})]})]})}),(0,R.jsx)(`td`,{className:o(j,`hidden whitespace-nowrap text-ink-2 @2xl:table-cell`),children:t.wcag?`${t.wcag}${t.level?` · ${t.level}`:``}`:`–`}),(0,R.jsx)(`td`,{className:N,children:t.count}),(0,R.jsx)(`td`,{className:N,children:t.pages})]}),n&&(0,R.jsxs)(`tr`,{className:`bg-surface-muted`,children:[(0,R.jsx)(`td`,{}),(0,R.jsx)(`td`,{colSpan:4,className:`px-4 py-2`,children:(0,R.jsxs)(`div`,{className:`flex flex-col divide-y divide-line-soft pl-4`,children:[r.length?r.map((e,t)=>(0,R.jsxs)(`div`,{className:`flex flex-col gap-1 py-2`,children:[(0,R.jsxs)(`span`,{className:`flex min-w-0 gap-2 text-body-sm text-muted`,children:[(0,R.jsx)(`span`,{className:`flex-none`,"data-tip":e.page,children:K(e.page)}),e.target&&(0,R.jsxs)(`span`,{className:`min-w-0 truncate font-mono text-body-sm`,"data-tip":e.target,children:[`· `,e.target]})]}),e.html&&(0,R.jsx)(`code`,{className:`line-clamp-3 font-mono text-body-sm break-all text-ink-2`,children:ne(e.html)})]},t)):(0,R.jsx)(`span`,{className:`text-body-sm text-muted`,children:`No elements were kept for this rule.`}),t.helpUrl&&F(t.helpUrl)===`web`&&(0,R.jsxs)(`a`,{href:t.helpUrl,target:`_blank`,rel:`noreferrer noopener`,className:`inline-flex items-center gap-1 self-start text-body-sm`,children:[`How to fix it `,(0,R.jsx)(C,{size:12,"aria-hidden":`true`})]})]})})]})]},t.rule)})}):(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-pass`,children:`No rule failed on the pages this run visited.`}),h.passed.length>0&&(0,R.jsxs)(`div`,{className:`flex flex-col gap-2`,children:[(0,R.jsxs)(m,{variant:`ghost`,size:`sm`,"aria-expanded":d,onClick:()=>f(!d),className:`gap-1 self-start`,children:[(0,R.jsx)(g,{size:13,"aria-hidden":`true`,className:o(`text-muted transition-transform`,!d&&`-rotate-90`)}),`Rules that passed `,(0,R.jsx)(`span`,{className:`font-normal text-muted tabular-nums`,children:h.passed.length})]}),d&&(0,R.jsx)(`ul`,{className:`m-0 flex list-none flex-wrap gap-1 p-0`,children:h.passed.map(e=>(0,R.jsx)(`li`,{children:(0,R.jsx)(p,{tone:`pass`,icon:!1,className:`font-mono`,children:e})},e))})]}),(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:n})]})}function J({run:e}){let t=e.report;if(!t?.performance.pages.length)return(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`This run has no timings: the run visited no page.`});let n=(e,t)=>e>t.poor?`poor`:e>t.good?`needs improvement`:`good`,r={poor:`text-fail`,"needs improvement":`text-warn`,good:`text-pass`},i=t.breaches.filter(e=>e.kind===`performance`);return(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-4`,children:[(0,R.jsxs)(`p`,{className:`m-0 text-body-sm text-muted`,children:[`Core Web Vitals of each page, from one visit in the browser the agent drove, against Google's thresholds: `,(0,R.jsx)(`span`,{className:`text-pass`,children:`good`}),`, `,(0,R.jsx)(`span`,{className:`text-warn`,children:`needs improvement`}),`, `,(0,R.jsx)(`span`,{className:`text-fail`,children:`poor`}),`.`,` `,t.budgets.performance?`Pages over quality.budgets.performance are marked.`:`No performance budget set: nothing fails on timings.`]}),i.map((e,t)=>(0,R.jsxs)(`p`,{className:o(l.fail,`m-0`),children:[`Over budget · `,K(e.page),`: `,e.text]},t)),(0,R.jsx)(A,{label:`Timings`,minWidth:720,head:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`th`,{scope:`col`,className:O,children:`Page`}),V.map(e=>(0,R.jsx)(`th`,{scope:`col`,className:M,"data-tip":e.label,children:e.label},e.key)),(0,R.jsx)(`th`,{scope:`col`,className:M,children:`Requests`}),(0,R.jsx)(`th`,{scope:`col`,className:M,children:`Size`})]}),children:t.performance.pages.map((e,t)=>(0,R.jsxs)(`tr`,{className:`border-t border-line-soft align-top`,children:[(0,R.jsxs)(`td`,{className:j,children:[(0,R.jsx)(`span`,{className:`block max-w-[340px] truncate font-mono text-body-sm`,"data-tip":e.url,children:K(e.url)}),e.over.length>0&&(0,R.jsxs)(`span`,{className:`text-body-sm text-fail`,children:[`over: `,e.over.join(`, `)]})]}),V.map(t=>{let i=e[t.key];return(0,R.jsxs)(`td`,{"data-sort":typeof i==`number`?i:-1,className:o(N,typeof i==`number`&&t.good!==1/0?r[n(i,t)]:typeof i==`number`?`text-ink-2`:`text-muted`),children:[typeof i==`number`?W(i,t.unit):`–`,typeof i==`number`&&t.good!==1/0&&(0,R.jsxs)(`span`,{className:`sr-only`,children:[` (`,n(i,t),`)`]})]},t.key)}),(0,R.jsx)(`td`,{className:o(N,`text-muted`),children:e.requests??`–`}),(0,R.jsx)(`td`,{className:o(N,`text-muted`),"data-sort":e.kb??-1,children:e.kb===void 0?`–`:`${e.kb} KB`})]},t))}),(0,R.jsxs)(`p`,{className:`m-0 text-body-sm text-muted`,children:[V.filter(e=>e.good!==1/0).map(e=>`${e.label}: good up to ${W(e.good,e.unit)}, poor over ${W(e.poor,e.unit)}`).join(` · `),`. Lab values from one visit, not data from real users.`]})]})}function Y({run:e,index:t,which:n,label:r}){let[i,s]=(0,L.useState)(``),[l,u]=(0,L.useState)(!1);return(0,L.useEffect)(()=>{let r=!1;return s(``),u(!1),c.image(e,t,n).then(e=>!r&&s(e),()=>!r&&u(!0)),()=>{r=!0}},[e,t,n]),(0,R.jsxs)(`figure`,{className:`m-0 flex min-w-0 flex-col gap-2`,children:[(0,R.jsx)(`figcaption`,{className:`text-body-sm font-medium text-muted`,children:r}),i?(0,R.jsx)(`img`,{src:i,alt:`${r} of the page`,className:o(a,`block h-auto w-full`)}):(0,R.jsx)(`span`,{className:o(a,`flex h-[120px] items-center justify-center gap-2 text-body-sm text-muted`),children:l?(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(d,{icon:_,size:14}),` Not available`]}):`Loading…`})]})}function X({run:e,budget:t,onChange:n}){let[i,a]=(0,L.useState)(null),[s,d]=(0,L.useState)(``),[f,h]=(0,L.useState)(!1),[_,b]=(0,L.useState)(``),[x,S]=(0,L.useState)(new Set),[C,w]=(0,L.useState)(`all`),T=e.visual?.pages??[],E=T.find(e=>e.status===`changed`)?.index;(0,L.useEffect)(()=>S(E===void 0?new Set:new Set([E])),[e.id,E]);let k=async e=>{h(!0),b(``);try{n(await e()),a(null),d(``)}catch(e){b(e.message)}finally{h(!1)}};if(!e.visual)return e.captured?(0,R.jsxs)(`div`,{className:`flex flex-col items-start gap-2`,children:[(0,R.jsxs)(`p`,{className:`m-0 text-body-sm text-ink-2`,children:[`This run captured `,G(e.captured,`page`),` but they were not compared with the baselines yet.`]}),(0,R.jsxs)(m,{size:`sm`,variant:`primary`,disabled:f,"data-tip":`Compare with the baselines`,onClick:()=>k(()=>c.compare(e.id)),children:[(0,R.jsx)(ee,{"aria-hidden":`true`}),`Compare`]}),_&&(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-fail`,children:_})]}):(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`This run has no visual captures: quality.visual.enabled was off, or the run visited no page.`});let P=T.filter(e=>e.status===`changed`),F=(C===`changed`?P:T).toSorted((e,t)=>Number(t.status===`changed`)-Number(e.status===`changed`)||(t.diffPercent??0)-(e.diffPercent??0)),I=e=>{let t=new Set(x);t.has(e)?t.delete(e):t.add(e),S(t)};return(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[(0,R.jsxs)(`p`,{className:`m-0 text-body-sm text-muted`,children:[`Each page captured with animations frozen and masked regions hidden, against its approved baseline. `,t?`A page over quality.budgets.visual fails the run.`:`No visual budget set: a change does not fail the run.`]}),(0,R.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2`,children:[(0,R.jsx)(`div`,{role:`group`,"aria-label":`Show`,className:`flex gap-1`,children:[[`all`,`All pages`,T.length],[`changed`,`Changed`,P.length]].map(([e,t,n])=>(0,R.jsxs)(`button`,{type:`button`,"aria-pressed":C===e,onClick:()=>w(e),className:o(u({size:`sm`}),`gap-1 font-normal`),children:[t,` `,(0,R.jsx)(`span`,{className:`tabular-nums opacity-75`,children:n})]},e))}),(0,R.jsx)(`span`,{className:`flex-1`}),P.length>1&&(0,R.jsxs)(m,{size:`sm`,disabled:f,"data-tip":`Approve all ${P.length} changes`,onClick:()=>a(P.map(e=>e.url)),children:[(0,R.jsx)(v,{"aria-hidden":`true`}),`Approve (`,P.length,`)`]})]}),i&&(0,R.jsxs)(`div`,{role:`alertdialog`,"aria-label":`Approve as baseline`,className:o(l.info,`flex flex-col gap-2`),children:[(0,R.jsxs)(`span`,{className:`font-medium`,children:[`Make this run's capture the baseline of `,i.length===1?K(i[0]):G(i.length,`page`),`?`]}),(0,R.jsx)(`span`,{className:`text-ink-2`,children:`Later runs are compared with it. Approve only a change that was intended; one that was not is a visual defect.`}),(0,R.jsxs)(`label`,{className:`flex flex-col gap-1`,children:[`Why it changed (kept with the baseline)`,(0,R.jsx)(r,{size:`sm`,value:s,maxLength:300,placeholder:`New checkout banner`,onChange:e=>d(e.target.value),className:`max-w-[480px]`})]}),(0,R.jsxs)(`div`,{className:`flex flex-wrap gap-2`,children:[(0,R.jsxs)(m,{size:`sm`,variant:`primary`,disabled:f,onClick:()=>k(()=>c.approve(e.id,i,s.trim()||void 0)),children:[(0,R.jsx)(v,{"aria-hidden":`true`}),`Approve`]}),(0,R.jsxs)(m,{size:`sm`,onClick:()=>a(null),children:[(0,R.jsx)(y,{"aria-hidden":`true`}),`Cancel`]})]})]}),_&&(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-fail`,children:_}),(0,R.jsx)(A,{label:`Pages against their baselines`,fixed:!0,resetKey:C,empty:`No page changed.`,head:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`th`,{scope:`col`,className:O,children:`Page`}),(0,R.jsx)(`th`,{scope:`col`,className:o(O,`hidden w-[110px] @2xl:table-cell`),children:`Size`}),(0,R.jsx)(`th`,{scope:`col`,className:o(M,`w-[90px]`),children:`Changed`}),(0,R.jsx)(`th`,{scope:`col`,className:o(O,`w-[120px]`),children:`Result`}),(0,R.jsx)(`th`,{scope:`col`,className:o(O,`w-[96px]`),children:(0,R.jsx)(`span`,{className:`sr-only`,children:`Approve`})})]}),children:F.map(t=>{let n=x.has(t.index);return(0,R.jsxs)(L.Fragment,{children:[(0,R.jsxs)(`tr`,{onClick:()=>I(t.index),"aria-expanded":n,className:o(D,n&&`bg-surface-muted`),children:[(0,R.jsx)(`td`,{className:j,children:(0,R.jsxs)(`span`,{className:`flex items-start gap-1`,children:[(0,R.jsx)(g,{size:13,"aria-hidden":`true`,className:o(`mt-1 flex-none text-muted transition-transform`,!n&&`-rotate-90`)}),(0,R.jsxs)(`span`,{className:`flex min-w-0 flex-col`,children:[(0,R.jsx)(`span`,{className:`truncate`,"data-tip":t.title||t.url,children:t.title||K(t.url)}),(0,R.jsx)(`span`,{className:`truncate font-mono text-body-sm text-muted`,"data-tip":t.url,children:K(t.url)})]})]})}),(0,R.jsxs)(`td`,{className:o(j,`hidden whitespace-nowrap text-muted @2xl:table-cell`),children:[t.size||`–`,t.resized?` · resized ${t.resized}`:``]}),(0,R.jsx)(`td`,{"data-sort":t.status===`changed`?t.diffPercent:-1,className:o(N,t.over?`text-fail`:t.status===`changed`?`text-warn`:`text-muted`),children:t.status===`changed`?`${t.diffPercent}%${t.limit===void 0?``:` / ${t.limit}%`}`:`–`}),(0,R.jsx)(`td`,{className:j,children:(0,R.jsx)(p,{tone:t.over?`fail`:H[t.status].tone,className:`min-h-5 px-2 text-body-sm`,children:t.over?`Over budget`:H[t.status].label})}),(0,R.jsx)(`td`,{className:N,onClick:e=>e.stopPropagation(),children:t.status===`changed`&&(0,R.jsx)(m,{variant:`icon`,size:`icon-sm`,disabled:f,"aria-label":`Approve ${K(t.url)}`,"data-tip":`Approve ${K(t.url)}`,onClick:()=>a([t.url]),children:(0,R.jsx)(v,{"aria-hidden":`true`})})})]}),n&&(0,R.jsx)(`tr`,{className:`bg-surface-muted`,children:(0,R.jsx)(`td`,{colSpan:5,className:`px-4 py-2`,children:(0,R.jsxs)(`div`,{className:`grid grid-cols-[repeat(auto-fit,minmax(180px,1fr))] gap-4`,children:[t.images.baseline&&(0,R.jsx)(Y,{run:e.id,index:t.index,which:`baseline`,label:`Baseline`}),t.images.current&&(0,R.jsx)(Y,{run:e.id,index:t.index,which:`current`,label:`This run`}),t.images.diff&&(0,R.jsx)(Y,{run:e.id,index:t.index,which:`diff`,label:`Difference (in red)`})]})})})]},t.index)})})]})}function ie({values:e}){if(e.length<2)return null;let t=Math.max(1,...e);return(0,R.jsx)(`span`,{role:`img`,"aria-label":`Violations over the last ${e.length} runs: ${e.join(`, `)}`,className:`flex flex-none items-end gap-1`,children:e.map((n,r)=>{let i=n?Math.max(1,Math.round(n/t*5)):0;return(0,R.jsx)(`span`,{className:`flex flex-col-reverse gap-1`,"aria-hidden":`true`,children:Array.from({length:Math.max(1,i)},(t,n)=>(0,R.jsx)(`i`,{className:o(`size-1.5 rounded-full`,i?r===e.length-1?`bg-accent`:`bg-accent-line`:`bg-line`)},n))},r)})})}function Z({icon:e,className:t,lines:n}){return n.length?(0,R.jsxs)(`span`,{className:o(`flex items-start gap-2 text-body-sm`,t),children:[(0,R.jsx)(d,{icon:e,size:14,className:`mt-1 flex-none`}),(0,R.jsx)(`span`,{className:`[overflow-wrap:anywhere]`,children:n.join(` · `)})]}):null}function ae({trends:e}){return e.length?(0,R.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:e.map(e=>{let t=e.a11y.latest?z.reduce((t,n)=>t+(e.a11y.latest[n]||0),0):void 0;return(0,R.jsxs)(`li`,{className:`flex flex-col gap-2 border-t border-line-soft py-4 first:border-t-0`,children:[(0,R.jsxs)(`span`,{className:`flex min-w-0 flex-wrap items-center gap-4`,children:[(0,R.jsx)(`span`,{className:`min-w-0 flex-[1_1_240px] truncate font-mono text-body-sm`,"data-tip":e.page,children:/^https?:/.test(e.page)?K(e.page):e.page}),(0,R.jsx)(ie,{values:e.a11y.trail}),(0,R.jsxs)(`span`,{className:`text-body-sm text-muted`,children:[G(e.runs,`run`),t===void 0?``:` · ${G(t,`violation`)} now`]})]}),(0,R.jsx)(Z,{icon:T,className:`text-fail`,lines:[...e.perf.worse.map(e=>`slower: ${e}`),...e.a11y.newRules.map(e=>`newly failing: ${e}`)]}),(0,R.jsx)(Z,{icon:x,className:`text-pass`,lines:[...e.perf.better.map(e=>`faster: ${e}`),...e.a11y.fixedRules.map(e=>`fixed: ${e}`)]})]},e.page)})}):(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`No history yet: every browser run adds each page's accessibility and timings to quality-history.json in the reports folder.`})}var oe={accessibility:e=>!!e.a11y?.pages,performance:e=>e.perf.pages>0,visual:e=>!!e.visual||e.captured>0},Q={accessibility:e=>!!e.a11y?.failed,performance:e=>e.perf.over>0,visual:e=>!!(e.visual?.changed||e.visual?.over)},$=(e,t)=>t.filter(oe[e]);function se({kind:e,runs:t}){let[r,i]=(0,L.useState)(`all`),a=$(e,t),s=r===`attention`?a.filter(Q[e]):a,c=t=>location.hash=n(e,encodeURIComponent(t));return(0,R.jsx)(A,{label:`Runs`,placeholder:`Find a run by what it did`,resetKey:r,empty:`Nothing matches.`,height:k,tools:(0,R.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,R.jsx)(f,{items:[{id:`all`,label:`All`,n:a.length},{id:`attention`,label:`Needs a look`,n:a.filter(Q[e]).length,alert:!0}],value:r,onChange:i})}),head:(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`th`,{scope:`col`,className:o(O,`w-[46%]`),children:`Run`}),e===`accessibility`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,children:`Rules failed`}),(0,R.jsx)(`th`,{scope:`col`,className:o(`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,`hidden @2xl:table-cell`),children:`Critical · serious`}),(0,R.jsx)(`th`,{scope:`col`,className:o(`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,`hidden @3xl:table-cell`),children:`Moderate · minor`}),(0,R.jsx)(`th`,{scope:`col`,className:o(`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,`hidden @xl:table-cell`),children:`Pages`})]}),e===`performance`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,children:`Over budget`}),(0,R.jsx)(`th`,{scope:`col`,className:o(`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,`hidden @xl:table-cell`),children:`Pages timed`})]}),e===`visual`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,children:`Changed`}),(0,R.jsx)(`th`,{scope:`col`,className:o(`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,`hidden @2xl:table-cell`),children:`New`}),(0,R.jsx)(`th`,{scope:`col`,className:o(`px-4 py-2 text-right text-label-md font-medium tracking-wide whitespace-nowrap text-muted uppercase`,`hidden @xl:table-cell`),children:`Same`})]}),(0,R.jsx)(`th`,{scope:`col`,className:o(O,`hidden @xl:table-cell`),children:`When`})]}),children:s.map(t=>{let r=Q[e](t),i=(t.over?.[e]??0)>0,a=i?E:r?b:v,s=i?`text-fail`:r?`text-warn`:`text-pass`,l=i?`Over a budget`:r?`Needs a look`:`Within budgets`;return(0,R.jsxs)(`tr`,{onClick:()=>c(t.id),className:D,children:[(0,R.jsx)(`td`,{className:o(j,`max-w-0`),children:(0,R.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,R.jsx)(a,{size:15,"aria-label":l,className:o(`flex-none`,s)}),(0,R.jsx)(`a`,{href:n(e,encodeURIComponent(t.id)),onClick:e=>e.stopPropagation(),"data-tip":t.goal,className:`truncate text-ink no-underline hover:underline`,children:t.goal})]})}),e===`accessibility`&&t.a11y&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,t.a11y.failed?`text-fail`:`text-muted`),children:t.a11y.failed}),(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden @2xl:table-cell`,t.a11y.critical+t.a11y.serious?`text-fail`:`text-muted`),"data-sort":t.a11y.critical*1e3+t.a11y.serious,children:`${t.a11y.critical} · ${t.a11y.serious}`}),(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden text-muted @3xl:table-cell`),"data-sort":t.a11y.moderate*1e3+t.a11y.minor,children:`${t.a11y.moderate} · ${t.a11y.minor}`}),(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden text-muted @xl:table-cell`),children:t.a11y.pages})]}),e===`performance`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,t.perf.over?`text-fail`:`text-muted`),children:t.perf.over}),(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden text-muted @xl:table-cell`),children:t.perf.pages})]}),e===`visual`&&(0,R.jsxs)(R.Fragment,{children:[(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,t.visual?.changed?`text-warn`:`text-muted`),"data-sort":t.visual?t.visual.changed:-1,children:t.visual?t.visual.changed:`not compared`}),(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden text-muted @2xl:table-cell`),"data-sort":t.visual?t.visual.new+t.visual.no_baseline:-1,children:t.visual?t.visual.new+t.visual.no_baseline:`–`}),(0,R.jsx)(`td`,{className:o(`px-4 py-2 text-right whitespace-nowrap tabular-nums`,`hidden text-muted @xl:table-cell`),"data-sort":t.visual?t.visual.same:-1,children:t.visual?t.visual.same:`–`})]}),(0,R.jsx)(`td`,{className:o(j,`hidden whitespace-nowrap text-body-sm text-muted @xl:table-cell`),"data-tip":U(t.at),"data-sort":new Date(t.at).getTime()||0,children:P(t.at)})]},t.id)})})}function ce({kind:e,id:t,view:r,onChanged:i}){let[a,s]=(0,L.useState)(null),[u,d]=(0,L.useState)(``);(0,L.useEffect)(()=>{let e=!1;return s(null),c.run(t).then(t=>{e||(s(t),d(``))},t=>!e&&d(t.message)),()=>{e=!0}},[t]);let f=(0,R.jsxs)(`a`,{href:n(e),className:`inline-flex items-center gap-1 self-start text-body-sm no-underline`,children:[(0,R.jsx)(g,{size:14,"aria-hidden":`true`,className:`rotate-90`}),`All runs`]});return u||!a?(0,R.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[f,u?(0,R.jsx)(`p`,{className:o(l.fail,`m-0`),children:u}):(0,R.jsx)(`p`,{className:`m-0 text-body-sm text-muted`,children:`Loading…`})]}):(0,R.jsxs)(`section`,{"aria-labelledby":`run-h`,className:`flex min-w-0 flex-col gap-4`,children:[f,(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,R.jsx)(te,{id:`run-h`,icon:e===`accessibility`?w:e===`performance`?h:_,title:(0,R.jsx)(`span`,{"data-tip":a.goal,className:`block truncate`,children:a.goal})}),(0,R.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-2 text-body-sm text-muted`,children:[U(a.at),` · `,(0,R.jsx)(I,{path:a.dir}),` · `,(0,R.jsx)(`a`,{href:n(`quality`,encodeURIComponent(a.id)),children:`Everything it measured`})]})]}),e===`accessibility`&&(0,R.jsx)(q,{run:a,standard:r.standard,disclaimer:r.disclaimer}),e===`performance`&&(0,R.jsx)(J,{run:a}),e===`visual`&&(0,R.jsx)(X,{run:a,budget:r.budgets.visual,onChange:e=>{s(e),i()}})]})}function le({r:e,to:t,line:n}){return(0,R.jsxs)(`div`,{className:o(i,`ml-12 flex flex-wrap items-center gap-x-4 gap-y-2`),children:[(0,R.jsxs)(`span`,{className:`flex min-w-0 flex-[1_1_240px] flex-col`,children:[(0,R.jsx)(`span`,{className:`text-body-lg font-medium [overflow-wrap:anywhere]`,children:e.goal}),(0,R.jsx)(`span`,{className:`text-body-sm text-muted`,children:n})]}),(0,R.jsxs)(m,{size:`sm`,variant:`primary`,"data-tip":`Open the run`,onClick:()=>location.hash=t,children:[(0,R.jsx)(S,{"aria-hidden":`true`}),`Open`]})]})}function ue({label:e,value:t,sub:n,tone:r}){return(0,R.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1 px-4 py-2`,children:[(0,R.jsx)(`span`,{className:`text-body-sm text-muted`,children:e}),(0,R.jsx)(`span`,{className:o(`text-body-lg leading-tight font-medium tabular-nums`,r),children:t}),n&&(0,R.jsx)(`span`,{className:`truncate text-body-sm text-muted`,children:n})]})}export{U as _,se as a,le as c,X as d,W as f,K as g,$ as h,ce as i,ae as l,G as m,z as n,ue as o,re as p,B as r,J as s,q as t,V as u};
|
package/dist/web/index.html
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
<!-- Light and dark both: before the app has set its mode, the page is the computer's (src/index.css, :root). -->
|
|
8
8
|
<meta name="color-scheme" content="light dark" />
|
|
9
9
|
<title>ForgeQE</title>
|
|
10
|
-
<script type="module" crossorigin src="/assets/index-
|
|
10
|
+
<script type="module" crossorigin src="/assets/index-Ctos0-8H.js"></script>
|
|
11
11
|
<link rel="modulepreload" crossorigin href="/assets/rolldown-runtime-XKyaHtl9.js">
|
|
12
12
|
<link rel="modulepreload" crossorigin href="/assets/react-BDur5s0O.js">
|
|
13
13
|
<link rel="modulepreload" crossorigin href="/assets/route-oDy8sV6H.js">
|
|
@@ -20,12 +20,12 @@
|
|
|
20
20
|
<link rel="modulepreload" crossorigin href="/assets/palette-6YAAmgkD.js">
|
|
21
21
|
<link rel="modulepreload" crossorigin href="/assets/nav-B_68FVw_.js">
|
|
22
22
|
<link rel="modulepreload" crossorigin href="/assets/pageBack-CbyKfisx.js">
|
|
23
|
-
<link rel="modulepreload" crossorigin href="/assets/frame-
|
|
23
|
+
<link rel="modulepreload" crossorigin href="/assets/frame-CgBYYtdw.js">
|
|
24
24
|
<link rel="modulepreload" crossorigin href="/assets/when-BuWCTaKm.js">
|
|
25
25
|
<link rel="modulepreload" crossorigin href="/assets/code-Jek8uWUO.js">
|
|
26
26
|
<link rel="modulepreload" crossorigin href="/assets/default-DB4ZMZxa.js">
|
|
27
|
-
<link rel="modulepreload" crossorigin href="/assets/markdown-
|
|
28
|
-
<link rel="stylesheet" crossorigin href="/assets/index-
|
|
27
|
+
<link rel="modulepreload" crossorigin href="/assets/markdown-CwgDQU8m.js">
|
|
28
|
+
<link rel="stylesheet" crossorigin href="/assets/index-Cq1_-QV9.css">
|
|
29
29
|
</head>
|
|
30
30
|
<body>
|
|
31
31
|
<div id="root"></div>
|
package/docs/user-guide.html
CHANGED
|
@@ -7397,7 +7397,7 @@ them back on restores everything as it was.</p>
|
|
|
7397
7397
|
</article>
|
|
7398
7398
|
<article class="spec feat" id="cap-agent-teams">
|
|
7399
7399
|
<div class="hd"><span class="mono">Operations</span><h3>Teams of custom agents</h3></div>
|
|
7400
|
-
<p class="ds">Hands a request to a team of the project's custom agents: its lead plans the work and hands each task to the member it fits, each member held to its
|
|
7400
|
+
<p class="ds">Hands a request to a team of agents (ForgeQE's own, the project's custom agents, or any mix): its lead plans the work and hands each task to the member it fits, each member held to its limits and the team's, and the team answers with one report. Also tries a team's file before it is approved, reading and running only. assign_task, team_note, team_board, ask_lead, team_answer and team_wait are the team's own tools, given only to its agents during its run.</p>
|
|
7401
7401
|
<div class="facts">
|
|
7402
7402
|
<div class="fact"><span class="mono">Ask it</span><ul class="asks"><li>Ask the release-qa team to check release 2.4 on qa</li><li>Which teams do we have?</li><li>Try the payments team on the checkout</li></ul></div>
|
|
7403
7403
|
<div class="fact"><span class="mono">What it needs</span><ul class="needs"><li><span class="need req">Required</span><span>A live model profile in llms.json (an API key or Microsoft Entra ID sign-in)</span></li></ul></div>
|
|
@@ -7407,18 +7407,24 @@ them back on restores everything as it was.</p>
|
|
|
7407
7407
|
<div class="detail"><span class="mono">In detail</span>
|
|
7408
7408
|
<section class="doc" id="doc-how_to_use-teams-of-custom-agents">
|
|
7409
7409
|
<h4>Teams of custom agents</h4>
|
|
7410
|
-
<div class="prose"><p>A team is a lead and its members
|
|
7411
|
-
|
|
7412
|
-
|
|
7413
|
-
|
|
7410
|
+
<div class="prose"><p>A team is a lead and its members for QA work that needs several agents: the lead plans the request and hands each task
|
|
7411
|
+
to the member it fits, and reports one result. Each one is one of ForgeQE's own agents (WebPilot, Quill, Link, Mender,
|
|
7412
|
+
Miner, Atlas and the others) or one of your custom agents, in any mix; Atlas makes a good lead. A member can work as one
|
|
7413
|
+
of your business personas. A team never lets an agent do more than it may: a custom agent stays within its own approved
|
|
7414
|
+
version, cut further by the team's limits (fewer environments or actions, more questions for a person, tools no member
|
|
7415
|
+
uses); one of ForgeQE's own works only with its own capabilities, within the team's environments and actions (reading
|
|
7416
|
+
and running when the team sets none, never production unless the team names it), every change asked of a person, no
|
|
7417
|
+
shell. ForgeQE's agents need no approval of their own: approving the team approves how they work in it.</p>
|
|
7414
7418
|
<p>A team is a file, <code>.forgeqe/agents/teams/<id>.yaml</code>:</p>
|
|
7415
7419
|
<pre><code class="language-yaml">id: release-qa
|
|
7416
7420
|
name: Release QA team
|
|
7417
7421
|
version: 1.0.0
|
|
7418
7422
|
description: Checks a release candidate end to end.
|
|
7419
7423
|
purpose: Plan the checks for the release, hand each to the member it fits, and report one verdict.
|
|
7420
|
-
lead:
|
|
7424
|
+
lead: forgeqe # Atlas, ForgeQE's own; or a custom agent's id
|
|
7421
7425
|
members:
|
|
7426
|
+
- agent: engine # WebPilot, ForgeQE's own browser agent
|
|
7427
|
+
role: Accessibility checks
|
|
7422
7428
|
- agent: api-tester # a custom agent; its approved version does each task
|
|
7423
7429
|
role: API testing
|
|
7424
7430
|
- agent: ui-tester
|
|
@@ -7481,9 +7487,10 @@ disabling pauses it. A repository webhook can start a team the same way it start
|
|
|
7481
7487
|
</ul>
|
|
7482
7488
|
<p><strong>Web app</strong></p>
|
|
7483
7489
|
<ol>
|
|
7484
|
-
<li>Open <strong>Agents › Custom agents</strong
|
|
7490
|
+
<li>Open <strong>Agents</strong> (or <strong>Agents › Custom agents</strong>, where your teams are listed under <strong>Teams</strong>) and click <strong>New team</strong>.
|
|
7491
|
+
The new-agent page has a link to it too.</li>
|
|
7485
7492
|
<li>Say what the team should do, or pick a starting point (Release check, PR gate, Regression triage…). Captain, the
|
|
7486
|
-
team builder, drafts a team from your own
|
|
7493
|
+
team builder, drafts a team from ForgeQE's agents and your own, using yours where they fit: a lead, members with roles, hand-offs, the knowledge it needs,
|
|
7487
7494
|
and the jobs no agent of yours does yet. ForgeQE keeps only agents, files and skills you have, and sets the limits
|
|
7488
7495
|
itself (never production). With no model set up, ForgeQE drafts it from what your agents say they do. It is saved
|
|
7489
7496
|
as a draft; nothing runs yet.</li>
|
|
@@ -7492,8 +7499,9 @@ person who approves changes, and the report. Click any part to edit it in the pa
|
|
|
7492
7499
|
anywhere (<strong>Tidy up</strong> lays them out again). Draw a line from one member's right dot to another's left dot to make
|
|
7493
7500
|
the second work after the first; select a line and press Delete to remove it, or use <strong>Works after</strong> in the
|
|
7494
7501
|
member's panel. A dashed box is a job no
|
|
7495
|
-
member does yet: <strong>Choose</strong>
|
|
7496
|
-
team's rules). <strong>Add member</strong> does the same
|
|
7502
|
+
member does yet: <strong>Choose</strong> an agent for it (filter by <strong>ForgeQE's agents</strong> or <strong>Your custom agents</strong>), or <strong>Build</strong>
|
|
7503
|
+
a new agent for the team (a draft held to the team's rules). <strong>Add member</strong> does the same. ForgeQE's agents carry a
|
|
7504
|
+
ForgeQE mark on the canvas.</li>
|
|
7497
7505
|
<li><strong>Knowledge</strong> has two tabs. <strong>This team only</strong>: add skills, prompts, guardrails and notes written for this team
|
|
7498
7506
|
(a prompt or guardrails for every agent, the lead or the members); they are saved at once, and the team uses them
|
|
7499
7507
|
once a person approves it again. <strong>Shared from ForgeQE</strong>: switch on product knowledge, and pick knowledge files and
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@capagents/forgeqe",
|
|
3
|
-
"version": "3.3.
|
|
3
|
+
"version": "3.3.4",
|
|
4
4
|
"description": "ForgeQE: a browser agent CLI that runs goals and test cases in local Chrome or Chromium, or BrowserStack and TestMu AI/LambdaTest when configured, and turns passing runs into tests in your repo",
|
|
5
5
|
"license": "SEE LICENSE IN LICENSE",
|
|
6
6
|
"repository": {
|