@capagents/forgeqe 3.1.6 → 3.1.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.
- package/dist/forgeqe.js +1704 -1704
- package/dist/web/assets/{3d-force-graph-DhjnuSZ7.js → 3d-force-graph-BmczCBlL.js} +1 -1
- package/dist/web/assets/{Agent-BvZNnkYO.js → Agent-y4MCu8wo.js} +1 -1
- package/dist/web/assets/{AgentWork-CXqq9ihT.js → AgentWork-BWblSkId.js} +1 -1
- package/dist/web/assets/{ApiTests-B26ezscO.js → ApiTests-DMwtosgK.js} +1 -1
- package/dist/web/assets/{Browse-DU423cZs.js → Browse-C3r1fDvS.js} +1 -1
- package/dist/web/assets/{Chat-D128NJm9.js → Chat-C5WRZ7EO.js} +1 -1
- package/dist/web/assets/{CommandPalette-CqHeNMlz.js → CommandPalette-ab9Dujgu.js} +1 -1
- package/dist/web/assets/{Compare-Cfhl9eEb.js → Compare-ObjtkAZ2.js} +1 -1
- package/dist/web/assets/{Cost-BZ34Hxth.js → Cost-XLrxpQZz.js} +1 -1
- package/dist/web/assets/{Data-BQx6Yjyt.js → Data-DmfILc8f.js} +1 -1
- package/dist/web/assets/{Desktop-XvNM9FOF.js → Desktop-C9cgaHSS.js} +1 -1
- package/dist/web/assets/{DesktopReview-hvUm15-5.js → DesktopReview-QuculN-N.js} +1 -1
- package/dist/web/assets/{Evidence-Cfk59P10.js → Evidence-IFtgLPK-.js} +1 -1
- package/dist/web/assets/{Explore-BDyb5dKe.js → Explore-DhskIcmJ.js} +1 -1
- package/dist/web/assets/{Features-XIqYxKc1.js → Features-OMov_t5a.js} +1 -1
- package/dist/web/assets/{Flags-CdHPrNp4.js → Flags-v34h7tMQ.js} +1 -1
- package/dist/web/assets/{Flaky-DwDQRut-.js → Flaky-llIyrSlY.js} +1 -1
- package/dist/web/assets/{Impact-t9iOQDtS.js → Impact-BDY3keAo.js} +1 -1
- package/dist/web/assets/{Jobs-48PdEMgf.js → Jobs-C6W440Zy.js} +1 -1
- package/dist/web/assets/{KindPage-Dy0J7L-M.js → KindPage-DalVU3V4.js} +1 -1
- package/dist/web/assets/{Migration-0HYN_JZm.js → Migration-DycKheEL.js} +1 -1
- package/dist/web/assets/{PageAgent-DY8YEIdr.js → PageAgent-qe1dHEIV.js} +1 -1
- package/dist/web/assets/{Product-Ba9C8kLQ.js → Product-xPHPwyRb.js} +3 -3
- package/dist/web/assets/{Production-DzfDMnnj.js → Production-C0xJTE_A.js} +1 -1
- package/dist/web/assets/{Quality-CnURaQom.js → Quality-HN4Y1xcO.js} +1 -1
- package/dist/web/assets/{Readiness-DlwnwSJ8.js → Readiness-CtTpkOIF.js} +1 -1
- package/dist/web/assets/{Record-CrJyzp8u.js → Record-DEEvHQMt.js} +1 -1
- package/dist/web/assets/{Regression-D-qjvr44.js → Regression-BlTPM7di.js} +1 -1
- package/dist/web/assets/{Reports-BspqEzVg.js → Reports-C-pKyOOd.js} +1 -1
- package/dist/web/assets/{Response-BxvDBStv.js → Response-xh7r4ldF.js} +1 -1
- package/dist/web/assets/{Responsive-C4chhZcc.js → Responsive-7uoXE0-6.js} +1 -1
- package/dist/web/assets/{RunDiff-D8NBOHwI.js → RunDiff-wZSP-_yc.js} +1 -1
- package/dist/web/assets/{Runs-Bb2krvLN.js → Runs-CatjSiWh.js} +1 -1
- package/dist/web/assets/{Settings-D2Byn_Va.js → Settings-26cvU21X.js} +3 -3
- package/dist/web/assets/{Steps-CymeLF90.js → Steps-DlqnuxiM.js} +1 -1
- package/dist/web/assets/{TestCases-DYTIR2LB.js → TestCases-DWhXIHc9.js} +1 -1
- package/dist/web/assets/{TestData-UNmAG8Wi.js → TestData-Z9fozptW.js} +1 -1
- package/dist/web/assets/{TestDebt-CQOYiRaK.js → TestDebt-_R-P8oXN.js} +1 -1
- package/dist/web/assets/{TestManagement-DWNUDF7y.js → TestManagement-BS8Al6g-.js} +1 -1
- package/dist/web/assets/{Tosca-BJsofAG8.js → Tosca-zhsG-p3K.js} +1 -1
- package/dist/web/assets/{WhatsNew-Gs-_0But.js → WhatsNew-gJQO1DB7.js} +1 -1
- package/dist/web/assets/{dataParts-DV44YXP9.js → dataParts-Ds4Gjeep.js} +1 -1
- package/dist/web/assets/{fold-CdtPs-3w.js → fold-DQqF7F_f.js} +1 -1
- package/dist/web/assets/{head-EHQVlLa5.js → head-BQ9P1hk0.js} +1 -1
- package/dist/web/assets/{highlight-DIktyogB.js → highlight-CQWNqo7N.js} +1 -1
- package/dist/web/assets/{index-Cq2sihjc.js → index-DeYZJBWf.js} +5 -5
- package/dist/web/assets/{logos-B1BhmXnA.js → logos-Cbs1qp4G.js} +1 -1
- package/dist/web/assets/{paletteCommands-w1UNWBRa.js → paletteCommands-BSqUaeAr.js} +1 -1
- package/dist/web/assets/{qualityParts-B8bouYKy.js → qualityParts-j9yO6-qk.js} +1 -1
- package/dist/web/index.html +1 -1
- package/package.json +1 -1
- package/prompts/test-plan.md +1 -1
- package/prompts/test-reviewer.md +1 -1
- package/prompts/test-rules.md +6 -1
- package/skills/bdd-gherkin/SKILL.md +3 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{Bn as t,H as n,Hr as r,I as i,In as a,L as o,R as s,Rr as c,gn as l,lt as u,r as d,u as ee,wr as f}from"./route-Dg53WdFu.js";import{t as p}from"./jsx-runtime-LKYXHABd.js";import{A as m,X as h,Z as g}from"./input-D7iHeNXz.js";import{d as _,f as v,o as y,t as b}from"./filters-Culzq1j1.js";import{L as x}from"./palette-lUno7fso.js";import{Dn as te,H as S,K as C,Pt as w,U as T,g as E,j as D}from"./index-Cq2sihjc.js";import{_ as O,o as k}from"./qualityParts-B8bouYKy.js";var A=e(r(),1),j={view:(e=!1)=>h(`GET`,`/api/production${e?`?refresh=1`:``}`)},M=p(),N={sentry:`Sentry`,datadog:`Datadog`,appinsights:`App Insights`},ne={fatal:{label:`Fatal`,tone:`text-fail`},error:{label:`Error`,tone:`text-fail`},warning:{label:`Warning`,tone:`text-warn`},info:{label:`Info`,tone:`text-muted`}};function P(e,t,n){return e.flatMap(e=>{let r=e.issues.filter(e=>(t===`all`||!e.coverage.covered)&&(n===`all`||e.provider===n));return r.length?[{...e,issues:r}]:[]})}var F=e=>e&&D(e)===`web`?e:void 0,I=e=>d(`record`,encodeURIComponent(e));function L({p:e}){let t=e.error||e.problem?n:e.configured?i:o,r=e.error||e.problem?`Not read`:e.configured?`Connected`:`Not set up`,a=e.error||e.problem?`text-fail`:e.configured?`text-pass`:`text-muted`;return(0,M.jsxs)(`li`,{className:`flex min-w-0 items-start gap-2 py-2 text-[13px]`,children:[(0,M.jsx)(t,{size:15,"aria-label":r,className:m(`mt-1 flex-none`,a)}),(0,M.jsxs)(`span`,{className:`min-w-0 flex-1 [overflow-wrap:anywhere]`,children:[(0,M.jsx)(`span`,{className:`font-medium`,children:e.label}),e.host&&(0,M.jsxs)(`span`,{className:`text-muted`,children:[` · `,e.host]}),(0,M.jsxs)(`span`,{className:`text-ink-2`,children:[` — `,e.problem?e.problem:e.error?e.error:e.configured?`${e.issues} issue${e.issues===1?``:`s`}${e.fetchedAt?`, read ${E(e.fetchedAt)}`:``}`:e.missing.length?`set ${e.missing.join(` and `)}`:`not set up`]})]})]})}function R({i:e}){if(!e.coverage.covered)return(0,M.jsxs)(`span`,{className:`flex items-center gap-2 whitespace-nowrap text-warn`,children:[(0,M.jsx)(f,{size:14,"aria-label":`No test`,className:`flex-none`}),`No test`]});let t=[...e.coverage.runs.map(e=>e.goal?`${e.id} (${e.goal})`:e.id),...e.coverage.tests],n=e.coverage.runs[0]?.id??e.coverage.tests[0]??``;return(0,M.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,"data-tip":`Covered by ${e.coverage.how===`page`?`a run on this page`:`a test named for this page`}: ${t.join(`, `)}`,children:[(0,M.jsx)(i,{size:14,"aria-label":`Covered`,className:`flex-none text-pass`}),(0,M.jsxs)(`span`,{className:`truncate`,children:[n,t.length>1?` +${t.length-1}`:``]})]})}function z(){let[e,r]=(0,A.useState)(null),[p,h]=(0,A.useState)(``),[D,z]=(0,A.useState)(`uncovered`),[B,V]=(0,A.useState)(`all`),[H,U]=(0,A.useState)(!1),[W,G]=(0,A.useState)(``),[K,q]=(0,A.useState)(null),J=(0,A.useCallback)((e=!1)=>{U(e),j.view(e).then(e=>{r(e),h(``),U(!1)},e=>{h(e.message),U(!1)})},[]);(0,A.useEffect)(()=>J(),[J]);let Y=e=>{if(e.repro){if(e.repro.on===`production`)return q(e);location.hash=I(e.repro.url)}},X=async e=>{U(!0);try{let{id:t}=await g.start(e.ask,{});location.hash=d(`chats`,t)}catch(e){G(e.message),U(!1)}},Z=e?.providers.filter(e=>e.configured)??[],re=e?P(e.pages,D,B):[],Q=[`sentry`,`datadog`,`appinsights`].filter(t=>e?.pages.some(e=>e.issues.some(e=>e.provider===t))),$=`py-2 pr-4 text-right tabular-nums`;return(0,M.jsxs)(`div`,{className:`flex min-h-(--screen) flex-col`,children:[(0,M.jsx)(C,{}),(0,M.jsxs)(`main`,{className:m(T,`@container flex-auto gap-4`),children:[(0,M.jsx)(S,{}),(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4`,children:[(0,M.jsx)(te,{pixel:x.production,size:`lg`}),(0,M.jsx)(`h1`,{className:`m-0 flex-1 text-[25px] font-semibold tracking-[-0.01em]`,children:`Production signals`}),Z.length>0&&(0,M.jsxs)(_,{size:`sm`,disabled:H,onClick:()=>J(!0),"data-tip":`Read again`,children:[(0,M.jsx)(t,{"aria-hidden":`true`}),`Refresh`]})]}),(0,M.jsxs)(`p`,{className:`m-0 text-[13px] leading-relaxed text-ink-2`,children:[`The errors real users hit in the last 14 days, from Sentry, Datadog and Azure Application Insights, grouped by the page they happened on. Each one says which browser run or automated test already goes to that page, or that no test does. This page only reads: nothing is changed at the provider. Record a repro opens `,(0,M.jsx)(`a`,{href:d(`record`),children:`Record`}),` at the same page on `,e?.testEnvironment?(0,M.jsxs)(M.Fragment,{children:[`the `,e.testEnvironment,` environment`]}):`your test environment`,`.`]}),p&&(0,M.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[10px] bg-fail-soft px-4 py-2 text-[13px] text-fail [overflow-wrap:anywhere]`,children:p}),!e&&!p&&(0,M.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-muted`,children:`Loading…`}),e&&(0,M.jsx)(`ul`,{"aria-label":`Error trackers`,className:`m-0 flex list-none flex-col divide-y divide-line-soft border-y border-line-soft p-0`,children:e.providers.map(e=>(0,M.jsx)(L,{p:e},e.id))}),e&&!Z.length&&(0,M.jsx)(y,{icon:a,title:`No error tracker set up`,action:(0,M.jsxs)(`a`,{className:v({size:`sm`}),href:d(`settings`,`integrations`),"data-tip":`Open Integrations in Settings`,children:[(0,M.jsx)(ee,{"aria-hidden":`true`}),`Integrations`]}),children:`Add one of integrations.sentry, integrations.datadog or integrations.appinsights to forgeqe.yaml, and save its keys in Settings under the variable names it lists above. Sentry uses the same settings as its MCP server.`}),e&&Z.length>0&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`div`,{className:`grid grid-cols-2 overflow-hidden border-y border-line-soft @xl:grid-cols-4 @xl:divide-x @xl:divide-line-soft`,children:[(0,M.jsx)(k,{label:`Errors`,value:e.counts.issues,sub:`on ${e.pages.length} page${e.pages.length===1?``:`s`}`}),(0,M.jsx)(k,{label:`No test`,value:e.counts.uncovered,tone:e.counts.uncovered?`text-warn`:`text-pass`,sub:`no run or test goes there`}),(0,M.jsx)(k,{label:`Events`,value:e.counts.events.toLocaleString(),sub:`last 14 days`}),(0,M.jsx)(k,{label:`Users affected`,value:e.counts.users.toLocaleString(),sub:`added up per error`})]}),K?.repro&&(0,M.jsxs)(`div`,{role:`group`,"aria-label":`Record on production`,className:`flex flex-wrap items-center gap-2 rounded-[10px] bg-surface-muted px-4 py-2 text-[13px]`,children:[(0,M.jsx)(f,{size:15,"aria-label":`Warning`,className:`flex-none text-warn`}),(0,M.jsxs)(`span`,{className:`min-w-0 flex-1 [overflow-wrap:anywhere]`,children:[`No test environment is active, so the recording would open the production page `,(0,M.jsx)(`code`,{className:`font-mono text-[13px]`,children:K.repro.url}),`. Real data is there: record only steps that read.`]}),(0,M.jsxs)(_,{size:`sm`,onClick:()=>{let e=K.repro.url;q(null),location.hash=I(e)},"data-tip":`Record on production`,children:[(0,M.jsx)(s,{"aria-hidden":`true`}),`Record`]}),(0,M.jsxs)(_,{size:`sm`,variant:`ghost`,onClick:()=>q(null),children:[(0,M.jsx)(c,{"aria-hidden":`true`}),`Cancel`]})]}),W&&(0,M.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-ink-2`,children:W}),Q.length>1&&(0,M.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,M.jsx)(b,{items:[{id:`all`,label:`All trackers`},...Q.map(t=>({id:t,label:N[t],n:e.pages.reduce((e,n)=>e+n.issues.filter(e=>e.provider===t).length,0)}))],value:B,onChange:V})}),e.counts.issues===0?(0,M.jsx)(y,{icon:i,title:`No errors in the last 14 days`,children:`The trackers that are set up report no unresolved errors.`}):(0,M.jsx)(w,{label:`Errors by page`,placeholder:`Find an error, page or test`,resetKey:`${D}-${B}`,empty:D===`uncovered`?`Every error here has a test.`:`Nothing matches.`,tools:(0,M.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,M.jsx)(b,{items:[{id:`uncovered`,label:`No test`,n:P(e.pages,`uncovered`,B).reduce((e,t)=>e+t.issues.length,0),alert:!0},{id:`all`,label:`All`,n:P(e.pages,`all`,B).reduce((e,t)=>e+t.issues.length,0)}],value:D,onChange:z})}),head:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`th`,{scope:`col`,className:m(`px-4 py-2 text-left text-[13px] font-medium whitespace-nowrap text-muted`,`w-[38%]`),children:`Error`}),(0,M.jsx)(`th`,{scope:`col`,className:m(`px-4 py-2 text-left text-[13px] font-medium whitespace-nowrap text-muted`,`hidden @xl:table-cell`),children:`Tracker`}),(0,M.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-right text-[13px] font-medium whitespace-nowrap text-muted`,children:`Events`}),(0,M.jsx)(`th`,{scope:`col`,className:m(`px-4 py-2 text-right text-[13px] font-medium whitespace-nowrap text-muted`,`hidden @2xl:table-cell`),children:`Users`}),(0,M.jsx)(`th`,{scope:`col`,className:m(`px-4 py-2 text-left text-[13px] font-medium whitespace-nowrap text-muted`,`hidden @2xl:table-cell`),children:`Last seen`}),(0,M.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-left text-[13px] font-medium whitespace-nowrap text-muted`,children:`Covered by`}),(0,M.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-left text-[13px] font-medium whitespace-nowrap text-muted`,children:(0,M.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]}),children:re.map(e=>(0,M.jsxs)(A.Fragment,{children:[(0,M.jsx)(`tr`,{className:`border-t border-line-soft bg-surface-muted`,children:(0,M.jsx)(`td`,{colSpan:7,className:m(`px-4 py-2`,`max-w-0 text-[13px]`),children:(0,M.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,M.jsx)(`span`,{className:`truncate font-mono`,"data-tip":e.url||e.page||`The tracker names no page`,children:e.page||`No page named`}),(0,M.jsxs)(`span`,{className:`flex-none text-muted`,children:[e.issues.length,` error`,e.issues.length===1?``:`s`,e.uncovered?`, ${e.uncovered} with no test`:``]})]})})}),e.issues.map(e=>{let t=ne[e.level],r=F(e.link);return(0,M.jsxs)(`tr`,{className:`border-t border-line-soft hover:bg-surface-muted`,children:[(0,M.jsx)(`td`,{className:m(`px-4 py-2`,`max-w-0`),children:(0,M.jsxs)(`span`,{className:`flex items-center gap-2`,children:[e.level===`info`?(0,M.jsx)(o,{size:15,"aria-label":t.label,className:m(`flex-none`,t.tone)}):e.level===`warning`?(0,M.jsx)(f,{size:15,"aria-label":t.label,className:m(`flex-none`,t.tone)}):(0,M.jsx)(n,{size:15,"aria-label":t.label,className:m(`flex-none`,t.tone)}),(0,M.jsx)(`span`,{className:`truncate`,"data-tip":[e.title,`${N[e.provider]} ${e.id}`,e.environment&&`environment ${e.environment}${e.production?` (production: read only)`:``}`,e.release&&`release ${e.release}`,e.service].filter(Boolean).join(` · `),children:e.title})]})}),(0,M.jsx)(`td`,{className:m(`px-4 py-2`,`hidden whitespace-nowrap text-[13px] text-ink-2 @xl:table-cell`),children:N[e.provider]}),(0,M.jsx)(`td`,{className:$,children:e.count.toLocaleString()}),(0,M.jsx)(`td`,{className:m($,`hidden text-muted @2xl:table-cell`),children:e.users.toLocaleString()}),(0,M.jsx)(`td`,{className:m(`px-4 py-2`,`hidden whitespace-nowrap text-[13px] text-muted @2xl:table-cell`),"data-tip":e.lastSeen?O(e.lastSeen):void 0,children:e.lastSeen?E(e.lastSeen):`–`}),(0,M.jsx)(`td`,{className:m(`px-4 py-2`,`max-w-0 text-[13px]`),children:(0,M.jsx)(R,{i:e})}),(0,M.jsxs)(`td`,{className:`px-4 py-2 text-right whitespace-nowrap tabular-nums`,children:[e.repro&&(0,M.jsx)(_,{variant:`icon`,size:`icon-sm`,disabled:H,onClick:()=>Y(e),"aria-label":e.repro.on===`test`?`Record a repro at ${e.repro.url}`:`Record a repro at the production page (asks first)`,"data-tip":e.repro.on===`test`?`Record a repro at ${e.repro.url}`:`Record a repro at the production page (asks first)`,children:(0,M.jsx)(s,{"aria-hidden":`true`})}),(0,M.jsx)(_,{variant:`icon`,size:`icon-sm`,disabled:H,onClick:()=>void X(e),"aria-label":`Ask in a chat about ${N[e.provider]} ${e.id}`,"data-tip":`Ask in a chat about ${N[e.provider]} ${e.id}`,children:(0,M.jsx)(l,{"aria-hidden":`true`})}),r&&(0,M.jsx)(`a`,{className:v({variant:`icon`,size:`icon`}),href:r,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open in ${N[e.provider]}`,"data-tip":`Open in ${N[e.provider]}`,children:(0,M.jsx)(u,{"aria-hidden":`true`})})]})]},`${e.provider}-${e.id}`)})]},e.page||`-`))})]})]})]})}export{z as Production,P as shownPages};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{Bn as t,H as n,Hr as r,I as i,In as a,L as o,R as s,Rr as c,gn as l,lt as u,r as d,u as ee,wr as f}from"./route-Dg53WdFu.js";import{t as p}from"./jsx-runtime-LKYXHABd.js";import{A as m,X as h,Z as g}from"./input-D7iHeNXz.js";import{d as _,f as v,o as y,t as b}from"./filters-Culzq1j1.js";import{L as x}from"./palette-lUno7fso.js";import{Dn as te,H as S,K as C,Pt as w,U as T,g as E,j as D}from"./index-DeYZJBWf.js";import{_ as O,o as k}from"./qualityParts-j9yO6-qk.js";var A=e(r(),1),j={view:(e=!1)=>h(`GET`,`/api/production${e?`?refresh=1`:``}`)},M=p(),N={sentry:`Sentry`,datadog:`Datadog`,appinsights:`App Insights`},ne={fatal:{label:`Fatal`,tone:`text-fail`},error:{label:`Error`,tone:`text-fail`},warning:{label:`Warning`,tone:`text-warn`},info:{label:`Info`,tone:`text-muted`}};function P(e,t,n){return e.flatMap(e=>{let r=e.issues.filter(e=>(t===`all`||!e.coverage.covered)&&(n===`all`||e.provider===n));return r.length?[{...e,issues:r}]:[]})}var F=e=>e&&D(e)===`web`?e:void 0,I=e=>d(`record`,encodeURIComponent(e));function L({p:e}){let t=e.error||e.problem?n:e.configured?i:o,r=e.error||e.problem?`Not read`:e.configured?`Connected`:`Not set up`,a=e.error||e.problem?`text-fail`:e.configured?`text-pass`:`text-muted`;return(0,M.jsxs)(`li`,{className:`flex min-w-0 items-start gap-2 py-2 text-[13px]`,children:[(0,M.jsx)(t,{size:15,"aria-label":r,className:m(`mt-1 flex-none`,a)}),(0,M.jsxs)(`span`,{className:`min-w-0 flex-1 [overflow-wrap:anywhere]`,children:[(0,M.jsx)(`span`,{className:`font-medium`,children:e.label}),e.host&&(0,M.jsxs)(`span`,{className:`text-muted`,children:[` · `,e.host]}),(0,M.jsxs)(`span`,{className:`text-ink-2`,children:[` — `,e.problem?e.problem:e.error?e.error:e.configured?`${e.issues} issue${e.issues===1?``:`s`}${e.fetchedAt?`, read ${E(e.fetchedAt)}`:``}`:e.missing.length?`set ${e.missing.join(` and `)}`:`not set up`]})]})]})}function R({i:e}){if(!e.coverage.covered)return(0,M.jsxs)(`span`,{className:`flex items-center gap-2 whitespace-nowrap text-warn`,children:[(0,M.jsx)(f,{size:14,"aria-label":`No test`,className:`flex-none`}),`No test`]});let t=[...e.coverage.runs.map(e=>e.goal?`${e.id} (${e.goal})`:e.id),...e.coverage.tests],n=e.coverage.runs[0]?.id??e.coverage.tests[0]??``;return(0,M.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,"data-tip":`Covered by ${e.coverage.how===`page`?`a run on this page`:`a test named for this page`}: ${t.join(`, `)}`,children:[(0,M.jsx)(i,{size:14,"aria-label":`Covered`,className:`flex-none text-pass`}),(0,M.jsxs)(`span`,{className:`truncate`,children:[n,t.length>1?` +${t.length-1}`:``]})]})}function z(){let[e,r]=(0,A.useState)(null),[p,h]=(0,A.useState)(``),[D,z]=(0,A.useState)(`uncovered`),[B,V]=(0,A.useState)(`all`),[H,U]=(0,A.useState)(!1),[W,G]=(0,A.useState)(``),[K,q]=(0,A.useState)(null),J=(0,A.useCallback)((e=!1)=>{U(e),j.view(e).then(e=>{r(e),h(``),U(!1)},e=>{h(e.message),U(!1)})},[]);(0,A.useEffect)(()=>J(),[J]);let Y=e=>{if(e.repro){if(e.repro.on===`production`)return q(e);location.hash=I(e.repro.url)}},X=async e=>{U(!0);try{let{id:t}=await g.start(e.ask,{});location.hash=d(`chats`,t)}catch(e){G(e.message),U(!1)}},Z=e?.providers.filter(e=>e.configured)??[],re=e?P(e.pages,D,B):[],Q=[`sentry`,`datadog`,`appinsights`].filter(t=>e?.pages.some(e=>e.issues.some(e=>e.provider===t))),$=`py-2 pr-4 text-right tabular-nums`;return(0,M.jsxs)(`div`,{className:`flex min-h-(--screen) flex-col`,children:[(0,M.jsx)(C,{}),(0,M.jsxs)(`main`,{className:m(T,`@container flex-auto gap-4`),children:[(0,M.jsx)(S,{}),(0,M.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4`,children:[(0,M.jsx)(te,{pixel:x.production,size:`lg`}),(0,M.jsx)(`h1`,{className:`m-0 flex-1 text-[25px] font-semibold tracking-[-0.01em]`,children:`Production signals`}),Z.length>0&&(0,M.jsxs)(_,{size:`sm`,disabled:H,onClick:()=>J(!0),"data-tip":`Read again`,children:[(0,M.jsx)(t,{"aria-hidden":`true`}),`Refresh`]})]}),(0,M.jsxs)(`p`,{className:`m-0 text-[13px] leading-relaxed text-ink-2`,children:[`The errors real users hit in the last 14 days, from Sentry, Datadog and Azure Application Insights, grouped by the page they happened on. Each one says which browser run or automated test already goes to that page, or that no test does. This page only reads: nothing is changed at the provider. Record a repro opens `,(0,M.jsx)(`a`,{href:d(`record`),children:`Record`}),` at the same page on `,e?.testEnvironment?(0,M.jsxs)(M.Fragment,{children:[`the `,e.testEnvironment,` environment`]}):`your test environment`,`.`]}),p&&(0,M.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[10px] bg-fail-soft px-4 py-2 text-[13px] text-fail [overflow-wrap:anywhere]`,children:p}),!e&&!p&&(0,M.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-muted`,children:`Loading…`}),e&&(0,M.jsx)(`ul`,{"aria-label":`Error trackers`,className:`m-0 flex list-none flex-col divide-y divide-line-soft border-y border-line-soft p-0`,children:e.providers.map(e=>(0,M.jsx)(L,{p:e},e.id))}),e&&!Z.length&&(0,M.jsx)(y,{icon:a,title:`No error tracker set up`,action:(0,M.jsxs)(`a`,{className:v({size:`sm`}),href:d(`settings`,`integrations`),"data-tip":`Open Integrations in Settings`,children:[(0,M.jsx)(ee,{"aria-hidden":`true`}),`Integrations`]}),children:`Add one of integrations.sentry, integrations.datadog or integrations.appinsights to forgeqe.yaml, and save its keys in Settings under the variable names it lists above. Sentry uses the same settings as its MCP server.`}),e&&Z.length>0&&(0,M.jsxs)(M.Fragment,{children:[(0,M.jsxs)(`div`,{className:`grid grid-cols-2 overflow-hidden border-y border-line-soft @xl:grid-cols-4 @xl:divide-x @xl:divide-line-soft`,children:[(0,M.jsx)(k,{label:`Errors`,value:e.counts.issues,sub:`on ${e.pages.length} page${e.pages.length===1?``:`s`}`}),(0,M.jsx)(k,{label:`No test`,value:e.counts.uncovered,tone:e.counts.uncovered?`text-warn`:`text-pass`,sub:`no run or test goes there`}),(0,M.jsx)(k,{label:`Events`,value:e.counts.events.toLocaleString(),sub:`last 14 days`}),(0,M.jsx)(k,{label:`Users affected`,value:e.counts.users.toLocaleString(),sub:`added up per error`})]}),K?.repro&&(0,M.jsxs)(`div`,{role:`group`,"aria-label":`Record on production`,className:`flex flex-wrap items-center gap-2 rounded-[10px] bg-surface-muted px-4 py-2 text-[13px]`,children:[(0,M.jsx)(f,{size:15,"aria-label":`Warning`,className:`flex-none text-warn`}),(0,M.jsxs)(`span`,{className:`min-w-0 flex-1 [overflow-wrap:anywhere]`,children:[`No test environment is active, so the recording would open the production page `,(0,M.jsx)(`code`,{className:`font-mono text-[13px]`,children:K.repro.url}),`. Real data is there: record only steps that read.`]}),(0,M.jsxs)(_,{size:`sm`,onClick:()=>{let e=K.repro.url;q(null),location.hash=I(e)},"data-tip":`Record on production`,children:[(0,M.jsx)(s,{"aria-hidden":`true`}),`Record`]}),(0,M.jsxs)(_,{size:`sm`,variant:`ghost`,onClick:()=>q(null),children:[(0,M.jsx)(c,{"aria-hidden":`true`}),`Cancel`]})]}),W&&(0,M.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-ink-2`,children:W}),Q.length>1&&(0,M.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,M.jsx)(b,{items:[{id:`all`,label:`All trackers`},...Q.map(t=>({id:t,label:N[t],n:e.pages.reduce((e,n)=>e+n.issues.filter(e=>e.provider===t).length,0)}))],value:B,onChange:V})}),e.counts.issues===0?(0,M.jsx)(y,{icon:i,title:`No errors in the last 14 days`,children:`The trackers that are set up report no unresolved errors.`}):(0,M.jsx)(w,{label:`Errors by page`,placeholder:`Find an error, page or test`,resetKey:`${D}-${B}`,empty:D===`uncovered`?`Every error here has a test.`:`Nothing matches.`,tools:(0,M.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,M.jsx)(b,{items:[{id:`uncovered`,label:`No test`,n:P(e.pages,`uncovered`,B).reduce((e,t)=>e+t.issues.length,0),alert:!0},{id:`all`,label:`All`,n:P(e.pages,`all`,B).reduce((e,t)=>e+t.issues.length,0)}],value:D,onChange:z})}),head:(0,M.jsxs)(M.Fragment,{children:[(0,M.jsx)(`th`,{scope:`col`,className:m(`px-4 py-2 text-left text-[13px] font-medium whitespace-nowrap text-muted`,`w-[38%]`),children:`Error`}),(0,M.jsx)(`th`,{scope:`col`,className:m(`px-4 py-2 text-left text-[13px] font-medium whitespace-nowrap text-muted`,`hidden @xl:table-cell`),children:`Tracker`}),(0,M.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-right text-[13px] font-medium whitespace-nowrap text-muted`,children:`Events`}),(0,M.jsx)(`th`,{scope:`col`,className:m(`px-4 py-2 text-right text-[13px] font-medium whitespace-nowrap text-muted`,`hidden @2xl:table-cell`),children:`Users`}),(0,M.jsx)(`th`,{scope:`col`,className:m(`px-4 py-2 text-left text-[13px] font-medium whitespace-nowrap text-muted`,`hidden @2xl:table-cell`),children:`Last seen`}),(0,M.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-left text-[13px] font-medium whitespace-nowrap text-muted`,children:`Covered by`}),(0,M.jsx)(`th`,{scope:`col`,className:`px-4 py-2 text-left text-[13px] font-medium whitespace-nowrap text-muted`,children:(0,M.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]}),children:re.map(e=>(0,M.jsxs)(A.Fragment,{children:[(0,M.jsx)(`tr`,{className:`border-t border-line-soft bg-surface-muted`,children:(0,M.jsx)(`td`,{colSpan:7,className:m(`px-4 py-2`,`max-w-0 text-[13px]`),children:(0,M.jsxs)(`span`,{className:`flex min-w-0 items-center gap-2`,children:[(0,M.jsx)(`span`,{className:`truncate font-mono`,"data-tip":e.url||e.page||`The tracker names no page`,children:e.page||`No page named`}),(0,M.jsxs)(`span`,{className:`flex-none text-muted`,children:[e.issues.length,` error`,e.issues.length===1?``:`s`,e.uncovered?`, ${e.uncovered} with no test`:``]})]})})}),e.issues.map(e=>{let t=ne[e.level],r=F(e.link);return(0,M.jsxs)(`tr`,{className:`border-t border-line-soft hover:bg-surface-muted`,children:[(0,M.jsx)(`td`,{className:m(`px-4 py-2`,`max-w-0`),children:(0,M.jsxs)(`span`,{className:`flex items-center gap-2`,children:[e.level===`info`?(0,M.jsx)(o,{size:15,"aria-label":t.label,className:m(`flex-none`,t.tone)}):e.level===`warning`?(0,M.jsx)(f,{size:15,"aria-label":t.label,className:m(`flex-none`,t.tone)}):(0,M.jsx)(n,{size:15,"aria-label":t.label,className:m(`flex-none`,t.tone)}),(0,M.jsx)(`span`,{className:`truncate`,"data-tip":[e.title,`${N[e.provider]} ${e.id}`,e.environment&&`environment ${e.environment}${e.production?` (production: read only)`:``}`,e.release&&`release ${e.release}`,e.service].filter(Boolean).join(` · `),children:e.title})]})}),(0,M.jsx)(`td`,{className:m(`px-4 py-2`,`hidden whitespace-nowrap text-[13px] text-ink-2 @xl:table-cell`),children:N[e.provider]}),(0,M.jsx)(`td`,{className:$,children:e.count.toLocaleString()}),(0,M.jsx)(`td`,{className:m($,`hidden text-muted @2xl:table-cell`),children:e.users.toLocaleString()}),(0,M.jsx)(`td`,{className:m(`px-4 py-2`,`hidden whitespace-nowrap text-[13px] text-muted @2xl:table-cell`),"data-tip":e.lastSeen?O(e.lastSeen):void 0,children:e.lastSeen?E(e.lastSeen):`–`}),(0,M.jsx)(`td`,{className:m(`px-4 py-2`,`max-w-0 text-[13px]`),children:(0,M.jsx)(R,{i:e})}),(0,M.jsxs)(`td`,{className:`px-4 py-2 text-right whitespace-nowrap tabular-nums`,children:[e.repro&&(0,M.jsx)(_,{variant:`icon`,size:`icon-sm`,disabled:H,onClick:()=>Y(e),"aria-label":e.repro.on===`test`?`Record a repro at ${e.repro.url}`:`Record a repro at the production page (asks first)`,"data-tip":e.repro.on===`test`?`Record a repro at ${e.repro.url}`:`Record a repro at the production page (asks first)`,children:(0,M.jsx)(s,{"aria-hidden":`true`})}),(0,M.jsx)(_,{variant:`icon`,size:`icon-sm`,disabled:H,onClick:()=>void X(e),"aria-label":`Ask in a chat about ${N[e.provider]} ${e.id}`,"data-tip":`Ask in a chat about ${N[e.provider]} ${e.id}`,children:(0,M.jsx)(l,{"aria-hidden":`true`})}),r&&(0,M.jsx)(`a`,{className:v({variant:`icon`,size:`icon`}),href:r,target:`_blank`,rel:`noopener noreferrer`,"aria-label":`Open in ${N[e.provider]}`,"data-tip":`Open in ${N[e.provider]}`,children:(0,M.jsx)(u,{"aria-hidden":`true`})})]})]},`${e.provider}-${e.id}`)})]},e.page||`-`))})]})]})]})}export{z as Production,P as shownPages};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{A as t,H as n,Hr as r,I as i,Nt as a,R as o,Rt as s,a as c,dn as l,gn as u,n as d,qt as f,r as p,wr as m}from"./route-Dg53WdFu.js";import{t as h}from"./jsx-runtime-LKYXHABd.js";import{A as g,X as _,Z as v,mt as y,wt as b}from"./input-D7iHeNXz.js";import{d as x,f as S,l as C,o as w,t as T}from"./filters-Culzq1j1.js";import{L as E}from"./palette-lUno7fso.js";import{D,Dn as O,Ft as k,H as A,K as j,Lt as M,Pt as N,Rt as P,U as ee,Ut as te,Wt as ne,g as F,zn as I}from"./index-Cq2sihjc.js";import{_ as L,d as R,f as z,g as B,l as re,o as V,p as H,s as ie,t as U}from"./qualityParts-B8bouYKy.js";var W=e(r(),1),G={view:()=>_(`GET`,`/api/localization`),run:e=>_(`GET`,`/api/localization/${encodeURIComponent(e)}`),shot:(e,t,n)=>y(`/api/localization/${encodeURIComponent(e)}/shot/${t}/${n}`,`image/jpeg`)},K=h(),q={high:`text-fail`,medium:`text-warn`,low:`text-muted`},J=[`key`,`untranslated`,`cut_off`,`overflow`,`expansion`,`rtl`];function Y({id:e,index:t,mode:n}){let[r,i]=(0,W.useState)(``),[a,o]=(0,W.useState)(!1);(0,W.useEffect)(()=>{let r=!1;return G.shot(e,t,n).then(e=>!r&&i(e),()=>!r&&o(!0)),()=>{r=!0}},[e,t,n]);let s=n===`pseudo`?`Pseudo-localized`:`Right to left`;return(0,K.jsxs)(`figure`,{className:`m-0 flex min-w-0 flex-col gap-1`,children:[(0,K.jsx)(`figcaption`,{className:`text-[13px] text-muted`,children:s}),a?(0,K.jsx)(`p`,{className:`m-0 rounded-[12px] bg-surface-muted px-4 py-6 text-center text-[13px] text-muted`,children:`No capture`}):r?(0,K.jsx)(`img`,{src:r,alt:`${s} capture`,className:`max-h-[420px] w-full rounded-[12px] border border-line-soft object-contain object-top`}):(0,K.jsx)(`div`,{className:`min-h-24 rounded-[12px] bg-surface-muted`})]})}function ae({id:e,page:r,index:a,text:o}){let[s,c]=(0,W.useState)(!1),l=r.findings.some(e=>o[e.kind].severity===`high`)?`high`:r.findings.some(e=>o[e.kind].severity===`medium`)?`medium`:r.findings.length?`low`:void 0,u=l===`high`?n:l?m:i,d=r.findings.toSorted((e,t)=>J.indexOf(e.kind)-J.indexOf(t.kind));return(0,K.jsxs)(`li`,{className:`border-t border-line-soft`,children:[(0,K.jsxs)(`button`,{type:`button`,"aria-expanded":s,onClick:()=>c(!s),className:`flex w-full items-start gap-2 bg-transparent px-1 py-2 text-left text-[13px] hover:bg-surface-muted`,children:[(0,K.jsx)(u,{size:15,"aria-label":l?`${l} findings`:`Nothing found`,className:g(`mt-1 flex-none`,l?q[l]:`text-pass`)}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,K.jsxs)(`span`,{className:`truncate font-medium`,"data-tip":r.url,children:[r.title||B(r.url),l&&(0,K.jsxs)(`span`,{className:g(`font-normal`,q[l]),children:[` · `,l===`high`?`High`:l===`medium`?`Medium`:`Low`]})]}),(0,K.jsxs)(`span`,{className:`truncate text-[13px] text-muted`,children:[B(r.url),` · `,r.lang?`lang ${r.lang}`:`no lang`,d.length?` · ${d.map(e=>`${o[e.kind].label.charAt(0).toLowerCase()}${o[e.kind].label.slice(1)} ${e.count}`).join(`, `)}`:` · nothing found`]})]}),(0,K.jsx)(t,{size:14,"aria-hidden":`true`,className:g(`mt-1 flex-none transition-transform`,s&&`rotate-180`)})]}),(0,K.jsx)(I,{open:s,children:(0,K.jsxs)(`div`,{className:`flex flex-col gap-4 px-1 pb-4 pl-8`,children:[d.map(e=>(0,K.jsxs)(`div`,{className:`flex flex-col gap-1 text-[13px]`,children:[(0,K.jsxs)(`span`,{className:`font-medium`,children:[o[e.kind].label,` `,(0,K.jsxs)(`span`,{className:g(`font-normal`,q[o[e.kind].severity]),children:[`· `,e.count]})]}),(0,K.jsx)(`span`,{className:`text-[13px] text-ink-2`,children:o[e.kind].fix}),e.examples.map((e,t)=>(0,K.jsx)(`span`,{className:`truncate font-mono text-[13px] text-muted`,"data-tip":e,children:e},t))]},e.kind)),(r.shots.pseudo||r.shots.rtl)&&(0,K.jsxs)(`div`,{className:`grid grid-cols-1 items-start gap-4 @2xl:grid-cols-2`,children:[r.shots.pseudo&&(0,K.jsx)(Y,{id:e,index:a,mode:`pseudo`}),r.shots.rtl&&(0,K.jsx)(Y,{id:e,index:a,mode:`rtl`})]})]})})]})}function oe({id:e,text:n}){let[r,i]=(0,W.useState)(null),[a,o]=(0,W.useState)(``),[s,c]=(0,W.useState)(``);(0,W.useEffect)(()=>{let t=!1;return i(null),G.run(e).then(e=>!t&&(i(e),o(``)),e=>!t&&o(e.message)),()=>{t=!0}},[e]);let l=(0,K.jsxs)(`a`,{href:p(`quality`,`localization`),className:`inline-flex items-center gap-1 self-start text-[13px] no-underline`,children:[(0,K.jsx)(t,{size:14,"aria-hidden":`true`,className:`rotate-90`}),`All runs`]});if(a||!r)return(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[l,a?(0,K.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[10px] bg-fail-soft px-4 py-2 text-[13px] text-fail`,children:a}):(0,K.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-muted`,children:`Loading…`})]});let d=async()=>{try{let{id:e}=await v.start(`Explain the localization findings of the browser run ${r.id} in the reports folder (its localization.json and the captures in its localization folder), page by page, and what the developers should change.`,{});location.hash=p(`chats`,e)}catch(e){c(e.message)}},f=e=>r.counts[e]??0;return(0,K.jsxs)(`section`,{"aria-labelledby":`l10n-run-h`,className:`flex min-w-0 flex-col gap-4`,children:[l,(0,K.jsxs)(`div`,{className:`flex flex-wrap items-start gap-4`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_300px] flex-col gap-1`,children:[(0,K.jsx)(`h2`,{id:`l10n-run-h`,"data-tip":r.goal,className:`m-0 truncate text-[16px] leading-snug font-semibold`,children:r.goal}),(0,K.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[L(r.at),` · `,r.langs.length?r.langs.join(`, `):`no lang`,` · `,(0,K.jsx)(`span`,{className:`font-mono`,children:r.id})]})]}),(0,K.jsxs)(x,{size:`sm`,variant:`ghost`,"data-tip":`Ask in a chat`,onClick:()=>void d(),children:[(0,K.jsx)(u,{"aria-hidden":`true`}),`Chat`]})]}),s&&(0,K.jsx)(`p`,{className:`m-0 text-[13px] text-fail`,children:s}),(0,K.jsxs)(`div`,{className:`grid grid-cols-2 overflow-hidden border-y border-line-soft @xl:grid-cols-3 @4xl:grid-cols-6 @4xl:divide-x @4xl:divide-line-soft`,children:[(0,K.jsx)(V,{label:`Pages`,value:r.pages,sub:r.langs.length?r.langs.join(`, `):`no lang set`}),(0,K.jsx)(V,{label:`Keys shown`,value:f(`key`),tone:f(`key`)?`text-fail`:void 0,sub:`untranslated keys`}),(0,K.jsx)(V,{label:`English left`,value:f(`untranslated`),tone:f(`untranslated`)?`text-warn`:void 0,sub:`on other languages`}),(0,K.jsx)(V,{label:`Cut off`,value:f(`cut_off`)+f(`overflow`),tone:f(`cut_off`)+f(`overflow`)?`text-warn`:void 0,sub:`as the page was`}),(0,K.jsx)(V,{label:`Longer text`,value:f(`expansion`),tone:f(`expansion`)?`text-warn`:void 0,sub:`breaks pseudo-localized`}),(0,K.jsx)(V,{label:`Right to left`,value:f(`rtl`),tone:f(`rtl`)?`text-warn`:void 0,sub:`breaks mirrored`})]}),(0,K.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:r.list.map((e,t)=>(0,K.jsx)(ae,{id:r.id,page:e,index:t,text:n},e.url))})]})}function se({runs:e}){let t=e=>location.hash=p(`quality`,`localization`,encodeURIComponent(e)),r=`py-2 pr-4 text-right tabular-nums`,a=(e,t)=>e.counts[t]??0;return(0,K.jsx)(N,{label:`Runs`,placeholder:`Find a run by what it did`,empty:`Nothing matches.`,head:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`th`,{scope:`col`,className:g(M,`w-[44%]`),children:`Run`}),(0,K.jsx)(`th`,{scope:`col`,className:P,children:`Keys`}),(0,K.jsx)(`th`,{scope:`col`,className:g(P,`hidden @xl:table-cell`),children:`English left`}),(0,K.jsx)(`th`,{scope:`col`,className:P,children:`Cut off`}),(0,K.jsx)(`th`,{scope:`col`,className:g(P,`hidden @2xl:table-cell`),children:`Longer · RTL`}),(0,K.jsx)(`th`,{scope:`col`,className:g(M,`hidden @xl:table-cell`),children:`When`})]}),children:e.map(e=>{let o=a(e,`key`),s=a(e,`untranslated`)+a(e,`cut_off`)+a(e,`overflow`)+a(e,`expansion`)+a(e,`rtl`),c=o?n:s?m:i;return(0,K.jsxs)(`tr`,{onClick:()=>t(e.id),className:`cursor-pointer border-t border-line-soft hover:bg-surface-muted`,children:[(0,K.jsx)(`td`,{className:g(k,`max-w-0`),children:(0,K.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(c,{size:15,"aria-label":o?`Keys shown`:s?`Needs a look`:`Nothing found`,className:g(`flex-none`,o?`text-fail`:s?`text-warn`:`text-pass`)}),(0,K.jsx)(`a`,{href:p(`quality`,`localization`,encodeURIComponent(e.id)),onClick:e=>e.stopPropagation(),"data-tip":e.goal,className:`truncate text-ink no-underline hover:underline`,children:e.goal})]})}),(0,K.jsx)(`td`,{className:g(r,o?`text-fail`:`text-muted`),children:o}),(0,K.jsx)(`td`,{className:g(r,`hidden @xl:table-cell`,a(e,`untranslated`)?`text-warn`:`text-muted`),children:a(e,`untranslated`)}),(0,K.jsx)(`td`,{className:g(r,a(e,`cut_off`)+a(e,`overflow`)?`text-warn`:`text-muted`),children:a(e,`cut_off`)+a(e,`overflow`)}),(0,K.jsxs)(`td`,{className:g(r,`hidden text-muted @2xl:table-cell`),children:[a(e,`expansion`),` · `,a(e,`rtl`)]}),(0,K.jsx)(`td`,{className:g(k,`hidden whitespace-nowrap text-[13px] text-muted @xl:table-cell`),"data-tip":L(e.at),children:F(e.at)})]},e.id)})})}function ce({id:e}){let[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)(``);return(0,W.useEffect)(()=>{G.view().then(e=>(n(e),i(``)),e=>i(e.message))},[]),r?(0,K.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[10px] bg-fail-soft px-4 py-2 text-[13px] text-fail [overflow-wrap:anywhere]`,children:r}):t?e?(0,K.jsx)(oe,{id:e,text:t.text}):t.runs.length?(0,K.jsx)(se,{runs:t.runs}):(0,K.jsx)(w,{icon:s,title:`No runs checked yet`,action:(0,K.jsxs)(`a`,{className:S({size:`sm`}),href:p(`record`),"data-tip":`Record a flow`,children:[(0,K.jsx)(o,{"aria-hidden":`true`}),`Record`]}),children:`Every browser run with accessibility checks on also checks each page's language: run a flow, in each language your site has, and what it found shows here.`}):(0,K.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-muted`,children:`Loading…`})}var X={view:()=>_(`GET`,`/api/security`),run:e=>_(`GET`,`/api/security/${encodeURIComponent(e)}`)},Z={high:`text-fail`,medium:`text-warn`,low:`text-muted`},Q={high:`High`,medium:`Medium`,low:`Low`};function le({id:e,fix:r}){let[a,o]=(0,W.useState)(null),[s,c]=(0,W.useState)(``),[d,f]=(0,W.useState)(`all`),[h,_]=(0,W.useState)(``);(0,W.useEffect)(()=>{let t=!1;return o(null),X.run(e).then(e=>!t&&(o(e),c(``)),e=>!t&&c(e.message)),()=>{t=!0}},[e]);let y=(0,K.jsxs)(`a`,{href:p(`quality`,`security`),className:`inline-flex items-center gap-1 self-start text-[13px] no-underline`,children:[(0,K.jsx)(t,{size:14,"aria-hidden":`true`,className:`rotate-90`}),`All runs`]});if(s)return(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[y,(0,K.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[10px] bg-fail-soft px-4 py-2 text-[13px] text-fail`,children:s})]});if(!a)return(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[y,(0,K.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-muted`,children:`Loading…`})]});let b=async()=>{try{let{id:e}=await v.start(`Explain the passive security findings of the browser run ${a.id} in the reports folder (its network.json, security section), most serious first, and how the team should fix each.`,{});location.hash=p(`chats`,e)}catch(e){_(e.message)}},S=a.findings.filter(e=>d===`all`||e.severity===d);return(0,K.jsxs)(`section`,{"aria-labelledby":`sec-run-h`,className:`flex min-w-0 flex-col gap-4`,children:[y,(0,K.jsxs)(`div`,{className:`flex flex-wrap items-start gap-4`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_300px] flex-col gap-1`,children:[(0,K.jsx)(`h2`,{id:`sec-run-h`,"data-tip":a.goal,className:`m-0 truncate text-[16px] leading-snug font-semibold`,children:a.goal}),(0,K.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-2 text-[13px] text-muted`,children:[L(a.at),` · `,a.env?`${a.env} · `:``,a.host??`no start page`,` · `,(0,K.jsx)(`span`,{className:`font-mono`,children:a.id})]})]}),!a.production&&a.findings.length>0&&(0,K.jsxs)(x,{size:`sm`,variant:`ghost`,"data-tip":`Ask in a chat`,onClick:()=>void b(),children:[(0,K.jsx)(u,{"aria-hidden":`true`}),`Chat`]})]}),h&&(0,K.jsx)(`p`,{className:`m-0 text-[13px] text-fail`,children:h}),a.production?(0,K.jsxs)(w,{icon:l,title:`Not checked`,children:[`This run was on `,a.env,`, an environment named like production. The security smoke checks are for test environments only.`]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`grid grid-cols-2 overflow-hidden border-y border-line-soft @xl:grid-cols-5 @xl:divide-x @xl:divide-line-soft`,children:[(0,K.jsx)(V,{label:`High`,value:a.counts.high,tone:a.counts.high?`text-fail`:`text-pass`,sub:`fix before release`}),(0,K.jsx)(V,{label:`Medium`,value:a.counts.medium,tone:a.counts.medium?`text-warn`:void 0,sub:`worth fixing`}),(0,K.jsx)(V,{label:`Low`,value:a.counts.low,sub:`hardening`}),(0,K.jsx)(V,{label:`Pages checked`,value:a.pages,sub:`their headers and cookies`}),(0,K.jsx)(V,{label:`Calls checked`,value:a.calls,sub:`their answers`})]}),!a.pages&&!a.findings.length?(0,K.jsx)(w,{icon:m,title:`No pages recorded`,children:`This run kept its API calls but not the pages' headers and cookies: it was made before ForgeQE recorded them. Run the flow again to check it.`}):a.findings.length?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,K.jsx)(T,{items:[{id:`all`,label:`All`,n:a.findings.length},...[`high`,`medium`,`low`].filter(e=>a.counts[e]).map(e=>({id:e,label:Q[e],n:a.counts[e],alert:e===`high`}))],value:d,onChange:f})}),(0,K.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:S.map(e=>(0,K.jsxs)(`li`,{className:`flex items-start gap-2 border-t border-line-soft py-2 text-[13px]`,children:[e.severity===`high`?(0,K.jsx)(n,{size:15,"aria-label":`High`,className:`mt-1 flex-none text-fail`}):(0,K.jsx)(m,{size:15,"aria-label":Q[e.severity],className:g(`mt-1 flex-none`,Z[e.severity])}),(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,K.jsxs)(`span`,{className:`font-medium`,children:[e.title,` `,(0,K.jsxs)(`span`,{className:g(`font-normal`,Z[e.severity]),children:[`· `,Q[e.severity]]})]}),(0,K.jsxs)(`span`,{className:`truncate font-mono text-[13px] text-ink-2`,"data-tip":e.target,children:[e.target,e.detail?` · ${e.detail}`:``]}),(0,K.jsx)(`span`,{className:`text-[13px] text-ink-2`,children:r[e.kind]?.fix})]})]},`${e.kind}|${e.target}`))})]}):(0,K.jsx)(w,{icon:i,title:`Nothing found`,children:`The pages this run loaded sent the security headers checked, their cookies had safe flags, and no answer held a key or token.`})]})]})}function $({runs:e}){let[t,r]=(0,W.useState)(`all`),a=t===`high`?e.filter(e=>e.counts.high):e,o=e=>location.hash=p(`quality`,`security`,encodeURIComponent(e)),s=`py-2 pr-4 text-right tabular-nums`;return(0,K.jsx)(N,{label:`Runs`,placeholder:`Find a run by what it did`,resetKey:t,empty:`Nothing matches.`,tools:(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,K.jsx)(T,{items:[{id:`all`,label:`All`,n:e.length},{id:`high`,label:`High findings`,n:e.filter(e=>e.counts.high).length,alert:!0}],value:t,onChange:r})}),head:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`th`,{scope:`col`,className:g(M,`w-[46%]`),children:`Run`}),(0,K.jsx)(`th`,{scope:`col`,className:P,children:`High`}),(0,K.jsx)(`th`,{scope:`col`,className:P,children:`Medium`}),(0,K.jsx)(`th`,{scope:`col`,className:g(P,`hidden @xl:table-cell`),children:`Low`}),(0,K.jsx)(`th`,{scope:`col`,className:g(M,`hidden @2xl:table-cell`),children:`Environment`}),(0,K.jsx)(`th`,{scope:`col`,className:g(M,`hidden @xl:table-cell`),children:`When`})]}),children:a.map(e=>{let t=e.production||!e.pages&&!e.counts.high&&!e.counts.medium&&!e.counts.low,r=t?l:e.counts.high?n:e.counts.medium?m:i,a=e.production?`Not checked: production`:t?`No pages recorded`:e.counts.high?`High findings`:e.counts.medium?`Medium findings`:`Nothing serious`;return(0,K.jsxs)(`tr`,{onClick:()=>o(e.id),className:`cursor-pointer border-t border-line-soft hover:bg-surface-muted`,children:[(0,K.jsx)(`td`,{className:g(k,`max-w-0`),children:(0,K.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(r,{size:15,"aria-label":a,className:g(`flex-none`,t?`text-muted`:e.counts.high?`text-fail`:e.counts.medium?`text-warn`:`text-pass`)}),(0,K.jsx)(`a`,{href:p(`quality`,`security`,encodeURIComponent(e.id)),onClick:e=>e.stopPropagation(),"data-tip":e.goal,className:`truncate text-ink no-underline hover:underline`,children:e.goal})]})}),(0,K.jsx)(`td`,{className:g(s,e.counts.high?`text-fail`:`text-muted`),children:t?`–`:e.counts.high}),(0,K.jsx)(`td`,{className:g(s,e.counts.medium?`text-warn`:`text-muted`),children:t?`–`:e.counts.medium}),(0,K.jsx)(`td`,{className:g(s,`hidden text-muted @xl:table-cell`),children:t?`–`:e.counts.low}),(0,K.jsx)(`td`,{className:g(k,`hidden text-[13px] text-muted @2xl:table-cell`),children:e.production?`${e.env} · not checked`:t?`no pages recorded`:e.env??e.host??`–`}),(0,K.jsx)(`td`,{className:g(k,`hidden whitespace-nowrap text-[13px] text-muted @xl:table-cell`),"data-tip":L(e.at),children:F(e.at)})]},e.id)})})}function ue({id:e}){let[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)(``);return(0,W.useEffect)(()=>{X.view().then(e=>(n(e),i(``)),e=>i(e.message))},[]),r?(0,K.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[10px] bg-fail-soft px-4 py-2 text-[13px] text-fail [overflow-wrap:anywhere]`,children:r}):t?e?(0,K.jsx)(le,{id:e,fix:t.fix}):t.runs.length?(0,K.jsx)($,{runs:t.runs}):(0,K.jsx)(w,{icon:l,title:`No runs to check yet`,action:(0,K.jsxs)(`a`,{className:S({size:`sm`}),href:p(`record`),"data-tip":`Record a flow`,children:[(0,K.jsx)(o,{"aria-hidden":`true`}),`Record`]}),children:`Every browser run keeps the pages' security headers, the cookies' flags and its API calls; run a flow on a test environment, and what it found shows here.`}):(0,K.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-muted`,children:`Loading…`})}function de({id:e,view:n,onChanged:r}){let[i,o]=(0,W.useState)(null),[s,l]=(0,W.useState)(``),[d,m]=(0,W.useState)(`accessibility`),[h,g]=(0,W.useState)(``);(0,W.useEffect)(()=>{let t=!1;return o(null),b.run(e).then(e=>{if(t)return;o(e),l(``);let n=e.visual?.pages.some(e=>e.status===`changed`)||!e.visual&&e.captured;m(e.report?.accessibility.failed.length?`accessibility`:e.report?.breaches.some(e=>e.kind===`performance`)?`performance`:n?`visual`:e.report?.accessibility.pages?`accessibility`:e.report?.performance.pages.length?`performance`:`visual`)},e=>!t&&l(e.message)),()=>{t=!0}},[e]);let _=(0,K.jsxs)(`a`,{href:p(`quality`),className:`inline-flex items-center gap-1 self-start text-[13px] no-underline`,children:[(0,K.jsx)(t,{size:14,"aria-hidden":`true`,className:`rotate-90`}),`All runs`]});if(s)return(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[_,(0,K.jsx)(`p`,{className:`m-0 rounded-[10px] bg-fail-soft px-4 py-2 text-[13px] text-fail`,children:s})]});if(!i)return(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[_,(0,K.jsx)(`p`,{className:`m-0 text-[13px] text-muted`,children:`Loading…`})]});let y=async()=>{try{let{id:e}=await v.start(`Explain the accessibility, performance and visual results of the run in ${i.dir}: call quality_report and visual_compare with run_dir ${i.dir}. Say what matters most to fix first, and why.`,{});location.hash=p(`chats`,e)}catch(e){g(e.message)}},S=i.report,w=S?.accessibility,T=S?.performance.pages??[],E=T.filter(e=>e.over.length).length,O=T.map(e=>e.lcp).filter(e=>typeof e==`number`),k=O.length?Math.max(...O):void 0,A=i.visual?.pages.filter(e=>e.status===`changed`).length??0,j=S?.breaches.length??0,M=[{id:`accessibility`,label:`Accessibility`,icon:c,n:w?.pages?`${w.failed.length} failed`:`not measured`,tone:w?.failed.length?`text-fail`:void 0},{id:`performance`,label:`Performance`,icon:a,n:T.length?E?`${E} over budget`:`${T.length} pages`:`not measured`,tone:E?`text-fail`:void 0},{id:`visual`,label:`Visual`,icon:f,n:i.visual?`${A} changed`:i.captured?`not compared`:`not captured`,tone:A?`text-warn`:void 0}];return(0,K.jsxs)(`section`,{"aria-labelledby":`run-h`,className:`flex min-w-0 flex-col gap-4`,children:[_,(0,K.jsxs)(`div`,{className:`flex flex-wrap items-start gap-4`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_300px] flex-col gap-1`,children:[(0,K.jsx)(`h2`,{id:`run-h`,"data-tip":i.goal,className:`m-0 truncate text-[16px] leading-snug font-semibold`,children:i.goal}),(0,K.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-2 text-[13px] text-muted`,children:[L(i.at),` · `,n.standard,` · `,(0,K.jsx)(D,{path:i.dir})]})]}),(0,K.jsxs)(x,{size:`sm`,variant:`ghost`,"data-tip":`Ask in a chat`,onClick:()=>void y(),children:[(0,K.jsx)(u,{"aria-hidden":`true`}),`Chat`]})]}),h&&(0,K.jsx)(`p`,{className:`m-0 text-[13px] text-fail`,children:h}),(0,K.jsxs)(`div`,{className:`grid grid-cols-2 overflow-hidden border-y border-line-soft @xl:grid-cols-4 @4xl:grid-cols-8 @4xl:divide-x @4xl:divide-line-soft`,children:[(0,K.jsx)(V,{label:`Budgets exceeded`,value:j,tone:j?`text-fail`:`text-pass`,sub:j?`fails the run`:`within budgets`}),(0,K.jsx)(V,{label:`Rules failed`,value:w?.pages?w.failed.length:`–`,tone:w?.failed.length?`text-fail`:void 0,sub:w?.pages?`${w.passed.length} passed`:`not measured`}),(0,K.jsx)(V,{label:`Critical · serious`,value:w?.pages?`${w.byImpact.critical} · ${w.byImpact.serious}`:`–`,tone:w&&w.byImpact.critical+w.byImpact.serious?`text-fail`:void 0,sub:`violations`}),(0,K.jsx)(V,{label:`Moderate · minor`,value:w?.pages?`${w.byImpact.moderate} · ${w.byImpact.minor}`:`–`,sub:`violations`}),(0,K.jsx)(V,{label:`Pages timed`,value:T.length||`–`,sub:E?`${E} over budget`:`none over budget`,tone:E?`text-fail`:void 0}),(0,K.jsx)(V,{label:`Slowest LCP`,value:k===void 0?`–`:z(k,`ms`),tone:k===void 0?void 0:k>4e3?`text-fail`:k>2500?`text-warn`:`text-pass`,sub:`good up to 2.5s`}),(0,K.jsx)(V,{label:`Pages compared`,value:i.visual?i.visual.pages.length:i.captured?`${i.captured} captured`:`–`,sub:i.visual?`against baselines`:`not compared`}),(0,K.jsx)(V,{label:`Visual changes`,value:i.visual?A:`–`,tone:A?`text-warn`:void 0,sub:i.visual?.pages.some(e=>e.over)?`over budget`:`pages changed`})]}),(0,K.jsx)(ne,{label:`Results`,className:`mb-0`,current:d,onPick:m,tabs:M.map(e=>({id:e.id,label:e.label,n:e.n,...e.tone?{tone:e.tone}:{},icon:(0,K.jsx)(C,{icon:e.icon,size:14})}))}),(0,K.jsxs)(`div`,{role:`tabpanel`,id:`panel-${d}`,"aria-labelledby":`tab-${d}`,className:`flex min-w-0 flex-col`,children:[d===`accessibility`&&(0,K.jsx)(U,{run:i,standard:n.standard,disclaimer:n.disclaimer}),d===`performance`&&(0,K.jsx)(ie,{run:i}),d===`visual`&&(0,K.jsx)(R,{run:i,budget:n.budgets.visual,onChange:e=>{o(e),r()}})]})]})}function fe({runs:e}){let[t,r]=(0,W.useState)(`all`),a=e,o=t===`attention`?a.filter(H):a,s=e=>location.hash=p(`quality`,encodeURIComponent(e)),c=`py-2 pr-4 text-right tabular-nums`;return(0,K.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,K.jsx)(N,{label:`Runs`,placeholder:`Find a run by what it did`,resetKey:t,empty:`Nothing matches.`,tools:(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,K.jsx)(T,{items:[{id:`all`,label:`All`,n:a.length},{id:`attention`,label:`Needs a look`,n:a.filter(H).length,alert:!0}],value:t,onChange:r})}),head:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`th`,{scope:`col`,className:g(M,`w-[46%]`),children:`Run`}),(0,K.jsx)(`th`,{scope:`col`,className:P,children:`Rules failed`}),(0,K.jsx)(`th`,{scope:`col`,className:g(P,`hidden @2xl:table-cell`),children:`Critical · serious`}),(0,K.jsx)(`th`,{scope:`col`,className:g(P,`hidden @xl:table-cell`),children:`Slow pages`}),(0,K.jsx)(`th`,{scope:`col`,className:P,children:`Visual`}),(0,K.jsx)(`th`,{scope:`col`,className:g(P,`hidden @3xl:table-cell`),children:`Budgets`}),(0,K.jsx)(`th`,{scope:`col`,className:g(M,`hidden @xl:table-cell`),children:`When`})]}),children:o.map(e=>{let t=e.breaches?n:H(e)?m:i,r=e.a11y?e.a11y.critical+e.a11y.serious:void 0;return(0,K.jsxs)(`tr`,{onClick:()=>s(e.id),className:`cursor-pointer border-t border-line-soft hover:bg-surface-muted`,children:[(0,K.jsx)(`td`,{className:g(k,`max-w-0`),children:(0,K.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(t,{size:15,"aria-label":e.breaches?`Over a budget`:H(e)?`Needs a look`:`Within budgets`,className:g(`flex-none`,e.breaches?`text-fail`:H(e)?`text-warn`:`text-pass`)}),(0,K.jsx)(`a`,{href:p(`quality`,encodeURIComponent(e.id)),onClick:e=>e.stopPropagation(),"data-tip":e.goal,className:`truncate text-ink no-underline hover:underline`,children:e.goal})]})}),(0,K.jsx)(`td`,{className:g(c,e.a11y?.failed?`text-fail`:`text-muted`),children:e.a11y?e.a11y.failed:`–`}),(0,K.jsx)(`td`,{className:g(c,`hidden @2xl:table-cell`,r?`text-fail`:`text-muted`),children:e.a11y?`${e.a11y.critical} · ${e.a11y.serious}`:`–`}),(0,K.jsx)(`td`,{className:g(c,`hidden @xl:table-cell`,e.perf.over?`text-fail`:`text-muted`),children:e.perf.pages?`${e.perf.over} / ${e.perf.pages}`:`–`}),(0,K.jsx)(`td`,{className:g(c,e.visual?.changed?`text-warn`:`text-muted`),children:e.visual?`${e.visual.changed} changed`:e.captured?`not compared`:`–`}),(0,K.jsx)(`td`,{className:g(c,`hidden @3xl:table-cell`,e.breaches?`text-fail`:`text-muted`),children:e.breaches?`${e.breaches} over`:`ok`}),(0,K.jsx)(`td`,{className:g(k,`hidden whitespace-nowrap text-[13px] text-muted @xl:table-cell`),"data-tip":L(e.at),children:F(e.at)})]},e.id)})})})}function pe({sub:e}){let[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)(``),a=(0,W.useCallback)(()=>{b.view().then(e=>{n(e),i(``)},e=>i(e.message))},[]);(0,W.useEffect)(a,[a]);let[s=``,l]=(e??``).split(`/`),u=s===`trends`,f=s===`security`,m=s===`localization`,h=(f||m)&&l?d(l):void 0,_=f?h:void 0,v=s&&!u&&!f&&!m?d(s):``,y=t?.trends.filter(e=>e.perf.worse.length||e.a11y.newRules.length).length??0;return(0,K.jsxs)(`div`,{className:`flex min-h-(--screen) flex-col`,children:[(0,K.jsx)(j,{}),(0,K.jsxs)(`main`,{className:g(ee,`@container flex-auto gap-4`),children:[(0,K.jsx)(A,{}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4`,children:[(0,K.jsx)(O,{pixel:E.quality,size:`lg`}),(0,K.jsx)(`h1`,{className:`m-0 text-[25px] font-semibold tracking-[-0.01em]`,children:`Quality`}),!v&&(0,K.jsx)(te,{label:`Show`,current:u?`trends`:f?`security`:m?`localization`:`runs`,links:[{id:`runs`,label:t?`Runs (${t.runs.length})`:`Runs`,href:p(`quality`)},{id:`trends`,label:`Trends${y?` (${y} worse)`:``}`,href:p(`quality`,`trends`)},{id:`security`,label:`Security`,href:p(`quality`,`security`)},{id:`localization`,label:`Localization`,href:p(`quality`,`localization`)}]})]}),f&&!_&&(0,K.jsx)(`p`,{className:`m-0 text-[13px] leading-relaxed text-ink-2`,children:`Passive security smoke checks of each browser run, read from what it recorded: the pages' security headers, the flags of the cookies they set, http requests from https pages, redirects to an address taken from the URL, and keys or tokens in API answers. Nothing is sent to the site, and runs on an environment named like production are not checked.`}),m&&!h&&(0,K.jsx)(`p`,{className:`m-0 text-[13px] leading-relaxed text-ink-2`,children:`Each page a browser run visited, checked for its language: translation keys shown as text, English left on a page in another language, and text cut off or running past its box. Then, for a moment the run never sees, the page with pseudo-localized text (accented and a third longer) and right to left, to find what breaks in German or Arabic before it is translated. Run a flow in each language your site has.`}),!v&&!f&&!m&&(0,K.jsxs)(`p`,{className:`m-0 text-[13px] leading-relaxed text-ink-2`,children:[`What each browser run measured on the pages it visited: accessibility (`,t?.standard||`WCAG`,`), Core Web Vitals, and visual changes against approved baselines. Budgets (quality.budgets) decide what fails a run. Open a run for all its details, or one kind with its agent: `,(0,K.jsx)(`a`,{href:p(`accessibility`),children:`Accessibility`}),`, `,(0,K.jsx)(`a`,{href:p(`performance`),children:`Performance`}),` or `,(0,K.jsx)(`a`,{href:p(`visual`),children:`Visual`}),`.`]}),r&&(0,K.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[10px] bg-fail-soft px-4 py-2 text-[13px] text-fail [overflow-wrap:anywhere]`,children:r}),!t&&!r&&(0,K.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-muted`,children:`Loading…`}),f&&(0,K.jsx)(ue,{id:_}),m&&(0,K.jsx)(ce,{id:h}),t&&v&&(0,K.jsx)(de,{id:v,view:t,onChanged:a}),t&&!v&&u&&(0,K.jsx)(`div`,{role:`tabpanel`,"aria-label":`Trends`,children:(0,K.jsx)(re,{trends:t.trends})}),t&&!v&&!u&&!f&&!m&&(t.runs.length?(0,K.jsx)(fe,{runs:t.runs}):(0,K.jsx)(w,{icon:c,title:`No measurements yet`,action:(0,K.jsxs)(`a`,{className:S({size:`sm`}),href:p(`record`),"data-tip":`Record a flow`,children:[(0,K.jsx)(o,{"aria-hidden":`true`}),`Record`]}),children:`Every browser run checks accessibility, timings and visual changes of the pages it visits; run a flow from a chat or the Record page, and its results show here.`}))]})]})}export{pe as Quality};
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{A as t,H as n,Hr as r,I as i,Nt as a,R as o,Rt as s,a as c,dn as l,gn as u,n as d,qt as f,r as p,wr as m}from"./route-Dg53WdFu.js";import{t as h}from"./jsx-runtime-LKYXHABd.js";import{A as g,X as _,Z as v,mt as y,wt as b}from"./input-D7iHeNXz.js";import{d as x,f as S,l as C,o as w,t as T}from"./filters-Culzq1j1.js";import{L as E}from"./palette-lUno7fso.js";import{D,Dn as O,Ft as k,H as A,K as j,Lt as M,Pt as N,Rt as P,U as ee,Ut as te,Wt as ne,g as F,zn as I}from"./index-DeYZJBWf.js";import{_ as L,d as R,f as z,g as B,l as re,o as V,p as H,s as ie,t as U}from"./qualityParts-j9yO6-qk.js";var W=e(r(),1),G={view:()=>_(`GET`,`/api/localization`),run:e=>_(`GET`,`/api/localization/${encodeURIComponent(e)}`),shot:(e,t,n)=>y(`/api/localization/${encodeURIComponent(e)}/shot/${t}/${n}`,`image/jpeg`)},K=h(),q={high:`text-fail`,medium:`text-warn`,low:`text-muted`},J=[`key`,`untranslated`,`cut_off`,`overflow`,`expansion`,`rtl`];function Y({id:e,index:t,mode:n}){let[r,i]=(0,W.useState)(``),[a,o]=(0,W.useState)(!1);(0,W.useEffect)(()=>{let r=!1;return G.shot(e,t,n).then(e=>!r&&i(e),()=>!r&&o(!0)),()=>{r=!0}},[e,t,n]);let s=n===`pseudo`?`Pseudo-localized`:`Right to left`;return(0,K.jsxs)(`figure`,{className:`m-0 flex min-w-0 flex-col gap-1`,children:[(0,K.jsx)(`figcaption`,{className:`text-[13px] text-muted`,children:s}),a?(0,K.jsx)(`p`,{className:`m-0 rounded-[12px] bg-surface-muted px-4 py-6 text-center text-[13px] text-muted`,children:`No capture`}):r?(0,K.jsx)(`img`,{src:r,alt:`${s} capture`,className:`max-h-[420px] w-full rounded-[12px] border border-line-soft object-contain object-top`}):(0,K.jsx)(`div`,{className:`min-h-24 rounded-[12px] bg-surface-muted`})]})}function ae({id:e,page:r,index:a,text:o}){let[s,c]=(0,W.useState)(!1),l=r.findings.some(e=>o[e.kind].severity===`high`)?`high`:r.findings.some(e=>o[e.kind].severity===`medium`)?`medium`:r.findings.length?`low`:void 0,u=l===`high`?n:l?m:i,d=r.findings.toSorted((e,t)=>J.indexOf(e.kind)-J.indexOf(t.kind));return(0,K.jsxs)(`li`,{className:`border-t border-line-soft`,children:[(0,K.jsxs)(`button`,{type:`button`,"aria-expanded":s,onClick:()=>c(!s),className:`flex w-full items-start gap-2 bg-transparent px-1 py-2 text-left text-[13px] hover:bg-surface-muted`,children:[(0,K.jsx)(u,{size:15,"aria-label":l?`${l} findings`:`Nothing found`,className:g(`mt-1 flex-none`,l?q[l]:`text-pass`)}),(0,K.jsxs)(`span`,{className:`flex min-w-0 flex-1 flex-col gap-1`,children:[(0,K.jsxs)(`span`,{className:`truncate font-medium`,"data-tip":r.url,children:[r.title||B(r.url),l&&(0,K.jsxs)(`span`,{className:g(`font-normal`,q[l]),children:[` · `,l===`high`?`High`:l===`medium`?`Medium`:`Low`]})]}),(0,K.jsxs)(`span`,{className:`truncate text-[13px] text-muted`,children:[B(r.url),` · `,r.lang?`lang ${r.lang}`:`no lang`,d.length?` · ${d.map(e=>`${o[e.kind].label.charAt(0).toLowerCase()}${o[e.kind].label.slice(1)} ${e.count}`).join(`, `)}`:` · nothing found`]})]}),(0,K.jsx)(t,{size:14,"aria-hidden":`true`,className:g(`mt-1 flex-none transition-transform`,s&&`rotate-180`)})]}),(0,K.jsx)(I,{open:s,children:(0,K.jsxs)(`div`,{className:`flex flex-col gap-4 px-1 pb-4 pl-8`,children:[d.map(e=>(0,K.jsxs)(`div`,{className:`flex flex-col gap-1 text-[13px]`,children:[(0,K.jsxs)(`span`,{className:`font-medium`,children:[o[e.kind].label,` `,(0,K.jsxs)(`span`,{className:g(`font-normal`,q[o[e.kind].severity]),children:[`· `,e.count]})]}),(0,K.jsx)(`span`,{className:`text-[13px] text-ink-2`,children:o[e.kind].fix}),e.examples.map((e,t)=>(0,K.jsx)(`span`,{className:`truncate font-mono text-[13px] text-muted`,"data-tip":e,children:e},t))]},e.kind)),(r.shots.pseudo||r.shots.rtl)&&(0,K.jsxs)(`div`,{className:`grid grid-cols-1 items-start gap-4 @2xl:grid-cols-2`,children:[r.shots.pseudo&&(0,K.jsx)(Y,{id:e,index:a,mode:`pseudo`}),r.shots.rtl&&(0,K.jsx)(Y,{id:e,index:a,mode:`rtl`})]})]})})]})}function oe({id:e,text:n}){let[r,i]=(0,W.useState)(null),[a,o]=(0,W.useState)(``),[s,c]=(0,W.useState)(``);(0,W.useEffect)(()=>{let t=!1;return i(null),G.run(e).then(e=>!t&&(i(e),o(``)),e=>!t&&o(e.message)),()=>{t=!0}},[e]);let l=(0,K.jsxs)(`a`,{href:p(`quality`,`localization`),className:`inline-flex items-center gap-1 self-start text-[13px] no-underline`,children:[(0,K.jsx)(t,{size:14,"aria-hidden":`true`,className:`rotate-90`}),`All runs`]});if(a||!r)return(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[l,a?(0,K.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[10px] bg-fail-soft px-4 py-2 text-[13px] text-fail`,children:a}):(0,K.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-muted`,children:`Loading…`})]});let d=async()=>{try{let{id:e}=await v.start(`Explain the localization findings of the browser run ${r.id} in the reports folder (its localization.json and the captures in its localization folder), page by page, and what the developers should change.`,{});location.hash=p(`chats`,e)}catch(e){c(e.message)}},f=e=>r.counts[e]??0;return(0,K.jsxs)(`section`,{"aria-labelledby":`l10n-run-h`,className:`flex min-w-0 flex-col gap-4`,children:[l,(0,K.jsxs)(`div`,{className:`flex flex-wrap items-start gap-4`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_300px] flex-col gap-1`,children:[(0,K.jsx)(`h2`,{id:`l10n-run-h`,"data-tip":r.goal,className:`m-0 truncate text-[16px] leading-snug font-semibold`,children:r.goal}),(0,K.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[L(r.at),` · `,r.langs.length?r.langs.join(`, `):`no lang`,` · `,(0,K.jsx)(`span`,{className:`font-mono`,children:r.id})]})]}),(0,K.jsxs)(x,{size:`sm`,variant:`ghost`,"data-tip":`Ask in a chat`,onClick:()=>void d(),children:[(0,K.jsx)(u,{"aria-hidden":`true`}),`Chat`]})]}),s&&(0,K.jsx)(`p`,{className:`m-0 text-[13px] text-fail`,children:s}),(0,K.jsxs)(`div`,{className:`grid grid-cols-2 overflow-hidden border-y border-line-soft @xl:grid-cols-3 @4xl:grid-cols-6 @4xl:divide-x @4xl:divide-line-soft`,children:[(0,K.jsx)(V,{label:`Pages`,value:r.pages,sub:r.langs.length?r.langs.join(`, `):`no lang set`}),(0,K.jsx)(V,{label:`Keys shown`,value:f(`key`),tone:f(`key`)?`text-fail`:void 0,sub:`untranslated keys`}),(0,K.jsx)(V,{label:`English left`,value:f(`untranslated`),tone:f(`untranslated`)?`text-warn`:void 0,sub:`on other languages`}),(0,K.jsx)(V,{label:`Cut off`,value:f(`cut_off`)+f(`overflow`),tone:f(`cut_off`)+f(`overflow`)?`text-warn`:void 0,sub:`as the page was`}),(0,K.jsx)(V,{label:`Longer text`,value:f(`expansion`),tone:f(`expansion`)?`text-warn`:void 0,sub:`breaks pseudo-localized`}),(0,K.jsx)(V,{label:`Right to left`,value:f(`rtl`),tone:f(`rtl`)?`text-warn`:void 0,sub:`breaks mirrored`})]}),(0,K.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:r.list.map((e,t)=>(0,K.jsx)(ae,{id:r.id,page:e,index:t,text:n},e.url))})]})}function se({runs:e}){let t=e=>location.hash=p(`quality`,`localization`,encodeURIComponent(e)),r=`py-2 pr-4 text-right tabular-nums`,a=(e,t)=>e.counts[t]??0;return(0,K.jsx)(N,{label:`Runs`,placeholder:`Find a run by what it did`,empty:`Nothing matches.`,head:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`th`,{scope:`col`,className:g(M,`w-[44%]`),children:`Run`}),(0,K.jsx)(`th`,{scope:`col`,className:P,children:`Keys`}),(0,K.jsx)(`th`,{scope:`col`,className:g(P,`hidden @xl:table-cell`),children:`English left`}),(0,K.jsx)(`th`,{scope:`col`,className:P,children:`Cut off`}),(0,K.jsx)(`th`,{scope:`col`,className:g(P,`hidden @2xl:table-cell`),children:`Longer · RTL`}),(0,K.jsx)(`th`,{scope:`col`,className:g(M,`hidden @xl:table-cell`),children:`When`})]}),children:e.map(e=>{let o=a(e,`key`),s=a(e,`untranslated`)+a(e,`cut_off`)+a(e,`overflow`)+a(e,`expansion`)+a(e,`rtl`),c=o?n:s?m:i;return(0,K.jsxs)(`tr`,{onClick:()=>t(e.id),className:`cursor-pointer border-t border-line-soft hover:bg-surface-muted`,children:[(0,K.jsx)(`td`,{className:g(k,`max-w-0`),children:(0,K.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(c,{size:15,"aria-label":o?`Keys shown`:s?`Needs a look`:`Nothing found`,className:g(`flex-none`,o?`text-fail`:s?`text-warn`:`text-pass`)}),(0,K.jsx)(`a`,{href:p(`quality`,`localization`,encodeURIComponent(e.id)),onClick:e=>e.stopPropagation(),"data-tip":e.goal,className:`truncate text-ink no-underline hover:underline`,children:e.goal})]})}),(0,K.jsx)(`td`,{className:g(r,o?`text-fail`:`text-muted`),children:o}),(0,K.jsx)(`td`,{className:g(r,`hidden @xl:table-cell`,a(e,`untranslated`)?`text-warn`:`text-muted`),children:a(e,`untranslated`)}),(0,K.jsx)(`td`,{className:g(r,a(e,`cut_off`)+a(e,`overflow`)?`text-warn`:`text-muted`),children:a(e,`cut_off`)+a(e,`overflow`)}),(0,K.jsxs)(`td`,{className:g(r,`hidden text-muted @2xl:table-cell`),children:[a(e,`expansion`),` · `,a(e,`rtl`)]}),(0,K.jsx)(`td`,{className:g(k,`hidden whitespace-nowrap text-[13px] text-muted @xl:table-cell`),"data-tip":L(e.at),children:F(e.at)})]},e.id)})})}function ce({id:e}){let[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)(``);return(0,W.useEffect)(()=>{G.view().then(e=>(n(e),i(``)),e=>i(e.message))},[]),r?(0,K.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[10px] bg-fail-soft px-4 py-2 text-[13px] text-fail [overflow-wrap:anywhere]`,children:r}):t?e?(0,K.jsx)(oe,{id:e,text:t.text}):t.runs.length?(0,K.jsx)(se,{runs:t.runs}):(0,K.jsx)(w,{icon:s,title:`No runs checked yet`,action:(0,K.jsxs)(`a`,{className:S({size:`sm`}),href:p(`record`),"data-tip":`Record a flow`,children:[(0,K.jsx)(o,{"aria-hidden":`true`}),`Record`]}),children:`Every browser run with accessibility checks on also checks each page's language: run a flow, in each language your site has, and what it found shows here.`}):(0,K.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-muted`,children:`Loading…`})}var X={view:()=>_(`GET`,`/api/security`),run:e=>_(`GET`,`/api/security/${encodeURIComponent(e)}`)},Z={high:`text-fail`,medium:`text-warn`,low:`text-muted`},Q={high:`High`,medium:`Medium`,low:`Low`};function le({id:e,fix:r}){let[a,o]=(0,W.useState)(null),[s,c]=(0,W.useState)(``),[d,f]=(0,W.useState)(`all`),[h,_]=(0,W.useState)(``);(0,W.useEffect)(()=>{let t=!1;return o(null),X.run(e).then(e=>!t&&(o(e),c(``)),e=>!t&&c(e.message)),()=>{t=!0}},[e]);let y=(0,K.jsxs)(`a`,{href:p(`quality`,`security`),className:`inline-flex items-center gap-1 self-start text-[13px] no-underline`,children:[(0,K.jsx)(t,{size:14,"aria-hidden":`true`,className:`rotate-90`}),`All runs`]});if(s)return(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[y,(0,K.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[10px] bg-fail-soft px-4 py-2 text-[13px] text-fail`,children:s})]});if(!a)return(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[y,(0,K.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-muted`,children:`Loading…`})]});let b=async()=>{try{let{id:e}=await v.start(`Explain the passive security findings of the browser run ${a.id} in the reports folder (its network.json, security section), most serious first, and how the team should fix each.`,{});location.hash=p(`chats`,e)}catch(e){_(e.message)}},S=a.findings.filter(e=>d===`all`||e.severity===d);return(0,K.jsxs)(`section`,{"aria-labelledby":`sec-run-h`,className:`flex min-w-0 flex-col gap-4`,children:[y,(0,K.jsxs)(`div`,{className:`flex flex-wrap items-start gap-4`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_300px] flex-col gap-1`,children:[(0,K.jsx)(`h2`,{id:`sec-run-h`,"data-tip":a.goal,className:`m-0 truncate text-[16px] leading-snug font-semibold`,children:a.goal}),(0,K.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-2 text-[13px] text-muted`,children:[L(a.at),` · `,a.env?`${a.env} · `:``,a.host??`no start page`,` · `,(0,K.jsx)(`span`,{className:`font-mono`,children:a.id})]})]}),!a.production&&a.findings.length>0&&(0,K.jsxs)(x,{size:`sm`,variant:`ghost`,"data-tip":`Ask in a chat`,onClick:()=>void b(),children:[(0,K.jsx)(u,{"aria-hidden":`true`}),`Chat`]})]}),h&&(0,K.jsx)(`p`,{className:`m-0 text-[13px] text-fail`,children:h}),a.production?(0,K.jsxs)(w,{icon:l,title:`Not checked`,children:[`This run was on `,a.env,`, an environment named like production. The security smoke checks are for test environments only.`]}):(0,K.jsxs)(K.Fragment,{children:[(0,K.jsxs)(`div`,{className:`grid grid-cols-2 overflow-hidden border-y border-line-soft @xl:grid-cols-5 @xl:divide-x @xl:divide-line-soft`,children:[(0,K.jsx)(V,{label:`High`,value:a.counts.high,tone:a.counts.high?`text-fail`:`text-pass`,sub:`fix before release`}),(0,K.jsx)(V,{label:`Medium`,value:a.counts.medium,tone:a.counts.medium?`text-warn`:void 0,sub:`worth fixing`}),(0,K.jsx)(V,{label:`Low`,value:a.counts.low,sub:`hardening`}),(0,K.jsx)(V,{label:`Pages checked`,value:a.pages,sub:`their headers and cookies`}),(0,K.jsx)(V,{label:`Calls checked`,value:a.calls,sub:`their answers`})]}),!a.pages&&!a.findings.length?(0,K.jsx)(w,{icon:m,title:`No pages recorded`,children:`This run kept its API calls but not the pages' headers and cookies: it was made before ForgeQE recorded them. Run the flow again to check it.`}):a.findings.length?(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,K.jsx)(T,{items:[{id:`all`,label:`All`,n:a.findings.length},...[`high`,`medium`,`low`].filter(e=>a.counts[e]).map(e=>({id:e,label:Q[e],n:a.counts[e],alert:e===`high`}))],value:d,onChange:f})}),(0,K.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:S.map(e=>(0,K.jsxs)(`li`,{className:`flex items-start gap-2 border-t border-line-soft py-2 text-[13px]`,children:[e.severity===`high`?(0,K.jsx)(n,{size:15,"aria-label":`High`,className:`mt-1 flex-none text-fail`}):(0,K.jsx)(m,{size:15,"aria-label":Q[e.severity],className:g(`mt-1 flex-none`,Z[e.severity])}),(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,K.jsxs)(`span`,{className:`font-medium`,children:[e.title,` `,(0,K.jsxs)(`span`,{className:g(`font-normal`,Z[e.severity]),children:[`· `,Q[e.severity]]})]}),(0,K.jsxs)(`span`,{className:`truncate font-mono text-[13px] text-ink-2`,"data-tip":e.target,children:[e.target,e.detail?` · ${e.detail}`:``]}),(0,K.jsx)(`span`,{className:`text-[13px] text-ink-2`,children:r[e.kind]?.fix})]})]},`${e.kind}|${e.target}`))})]}):(0,K.jsx)(w,{icon:i,title:`Nothing found`,children:`The pages this run loaded sent the security headers checked, their cookies had safe flags, and no answer held a key or token.`})]})]})}function $({runs:e}){let[t,r]=(0,W.useState)(`all`),a=t===`high`?e.filter(e=>e.counts.high):e,o=e=>location.hash=p(`quality`,`security`,encodeURIComponent(e)),s=`py-2 pr-4 text-right tabular-nums`;return(0,K.jsx)(N,{label:`Runs`,placeholder:`Find a run by what it did`,resetKey:t,empty:`Nothing matches.`,tools:(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,K.jsx)(T,{items:[{id:`all`,label:`All`,n:e.length},{id:`high`,label:`High findings`,n:e.filter(e=>e.counts.high).length,alert:!0}],value:t,onChange:r})}),head:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`th`,{scope:`col`,className:g(M,`w-[46%]`),children:`Run`}),(0,K.jsx)(`th`,{scope:`col`,className:P,children:`High`}),(0,K.jsx)(`th`,{scope:`col`,className:P,children:`Medium`}),(0,K.jsx)(`th`,{scope:`col`,className:g(P,`hidden @xl:table-cell`),children:`Low`}),(0,K.jsx)(`th`,{scope:`col`,className:g(M,`hidden @2xl:table-cell`),children:`Environment`}),(0,K.jsx)(`th`,{scope:`col`,className:g(M,`hidden @xl:table-cell`),children:`When`})]}),children:a.map(e=>{let t=e.production||!e.pages&&!e.counts.high&&!e.counts.medium&&!e.counts.low,r=t?l:e.counts.high?n:e.counts.medium?m:i,a=e.production?`Not checked: production`:t?`No pages recorded`:e.counts.high?`High findings`:e.counts.medium?`Medium findings`:`Nothing serious`;return(0,K.jsxs)(`tr`,{onClick:()=>o(e.id),className:`cursor-pointer border-t border-line-soft hover:bg-surface-muted`,children:[(0,K.jsx)(`td`,{className:g(k,`max-w-0`),children:(0,K.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(r,{size:15,"aria-label":a,className:g(`flex-none`,t?`text-muted`:e.counts.high?`text-fail`:e.counts.medium?`text-warn`:`text-pass`)}),(0,K.jsx)(`a`,{href:p(`quality`,`security`,encodeURIComponent(e.id)),onClick:e=>e.stopPropagation(),"data-tip":e.goal,className:`truncate text-ink no-underline hover:underline`,children:e.goal})]})}),(0,K.jsx)(`td`,{className:g(s,e.counts.high?`text-fail`:`text-muted`),children:t?`–`:e.counts.high}),(0,K.jsx)(`td`,{className:g(s,e.counts.medium?`text-warn`:`text-muted`),children:t?`–`:e.counts.medium}),(0,K.jsx)(`td`,{className:g(s,`hidden text-muted @xl:table-cell`),children:t?`–`:e.counts.low}),(0,K.jsx)(`td`,{className:g(k,`hidden text-[13px] text-muted @2xl:table-cell`),children:e.production?`${e.env} · not checked`:t?`no pages recorded`:e.env??e.host??`–`}),(0,K.jsx)(`td`,{className:g(k,`hidden whitespace-nowrap text-[13px] text-muted @xl:table-cell`),"data-tip":L(e.at),children:F(e.at)})]},e.id)})})}function ue({id:e}){let[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)(``);return(0,W.useEffect)(()=>{X.view().then(e=>(n(e),i(``)),e=>i(e.message))},[]),r?(0,K.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[10px] bg-fail-soft px-4 py-2 text-[13px] text-fail [overflow-wrap:anywhere]`,children:r}):t?e?(0,K.jsx)(le,{id:e,fix:t.fix}):t.runs.length?(0,K.jsx)($,{runs:t.runs}):(0,K.jsx)(w,{icon:l,title:`No runs to check yet`,action:(0,K.jsxs)(`a`,{className:S({size:`sm`}),href:p(`record`),"data-tip":`Record a flow`,children:[(0,K.jsx)(o,{"aria-hidden":`true`}),`Record`]}),children:`Every browser run keeps the pages' security headers, the cookies' flags and its API calls; run a flow on a test environment, and what it found shows here.`}):(0,K.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-muted`,children:`Loading…`})}function de({id:e,view:n,onChanged:r}){let[i,o]=(0,W.useState)(null),[s,l]=(0,W.useState)(``),[d,m]=(0,W.useState)(`accessibility`),[h,g]=(0,W.useState)(``);(0,W.useEffect)(()=>{let t=!1;return o(null),b.run(e).then(e=>{if(t)return;o(e),l(``);let n=e.visual?.pages.some(e=>e.status===`changed`)||!e.visual&&e.captured;m(e.report?.accessibility.failed.length?`accessibility`:e.report?.breaches.some(e=>e.kind===`performance`)?`performance`:n?`visual`:e.report?.accessibility.pages?`accessibility`:e.report?.performance.pages.length?`performance`:`visual`)},e=>!t&&l(e.message)),()=>{t=!0}},[e]);let _=(0,K.jsxs)(`a`,{href:p(`quality`),className:`inline-flex items-center gap-1 self-start text-[13px] no-underline`,children:[(0,K.jsx)(t,{size:14,"aria-hidden":`true`,className:`rotate-90`}),`All runs`]});if(s)return(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[_,(0,K.jsx)(`p`,{className:`m-0 rounded-[10px] bg-fail-soft px-4 py-2 text-[13px] text-fail`,children:s})]});if(!i)return(0,K.jsxs)(`div`,{className:`flex flex-col gap-4`,children:[_,(0,K.jsx)(`p`,{className:`m-0 text-[13px] text-muted`,children:`Loading…`})]});let y=async()=>{try{let{id:e}=await v.start(`Explain the accessibility, performance and visual results of the run in ${i.dir}: call quality_report and visual_compare with run_dir ${i.dir}. Say what matters most to fix first, and why.`,{});location.hash=p(`chats`,e)}catch(e){g(e.message)}},S=i.report,w=S?.accessibility,T=S?.performance.pages??[],E=T.filter(e=>e.over.length).length,O=T.map(e=>e.lcp).filter(e=>typeof e==`number`),k=O.length?Math.max(...O):void 0,A=i.visual?.pages.filter(e=>e.status===`changed`).length??0,j=S?.breaches.length??0,M=[{id:`accessibility`,label:`Accessibility`,icon:c,n:w?.pages?`${w.failed.length} failed`:`not measured`,tone:w?.failed.length?`text-fail`:void 0},{id:`performance`,label:`Performance`,icon:a,n:T.length?E?`${E} over budget`:`${T.length} pages`:`not measured`,tone:E?`text-fail`:void 0},{id:`visual`,label:`Visual`,icon:f,n:i.visual?`${A} changed`:i.captured?`not compared`:`not captured`,tone:A?`text-warn`:void 0}];return(0,K.jsxs)(`section`,{"aria-labelledby":`run-h`,className:`flex min-w-0 flex-col gap-4`,children:[_,(0,K.jsxs)(`div`,{className:`flex flex-wrap items-start gap-4`,children:[(0,K.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_300px] flex-col gap-1`,children:[(0,K.jsx)(`h2`,{id:`run-h`,"data-tip":i.goal,className:`m-0 truncate text-[16px] leading-snug font-semibold`,children:i.goal}),(0,K.jsxs)(`span`,{className:`flex flex-wrap items-center gap-x-2 text-[13px] text-muted`,children:[L(i.at),` · `,n.standard,` · `,(0,K.jsx)(D,{path:i.dir})]})]}),(0,K.jsxs)(x,{size:`sm`,variant:`ghost`,"data-tip":`Ask in a chat`,onClick:()=>void y(),children:[(0,K.jsx)(u,{"aria-hidden":`true`}),`Chat`]})]}),h&&(0,K.jsx)(`p`,{className:`m-0 text-[13px] text-fail`,children:h}),(0,K.jsxs)(`div`,{className:`grid grid-cols-2 overflow-hidden border-y border-line-soft @xl:grid-cols-4 @4xl:grid-cols-8 @4xl:divide-x @4xl:divide-line-soft`,children:[(0,K.jsx)(V,{label:`Budgets exceeded`,value:j,tone:j?`text-fail`:`text-pass`,sub:j?`fails the run`:`within budgets`}),(0,K.jsx)(V,{label:`Rules failed`,value:w?.pages?w.failed.length:`–`,tone:w?.failed.length?`text-fail`:void 0,sub:w?.pages?`${w.passed.length} passed`:`not measured`}),(0,K.jsx)(V,{label:`Critical · serious`,value:w?.pages?`${w.byImpact.critical} · ${w.byImpact.serious}`:`–`,tone:w&&w.byImpact.critical+w.byImpact.serious?`text-fail`:void 0,sub:`violations`}),(0,K.jsx)(V,{label:`Moderate · minor`,value:w?.pages?`${w.byImpact.moderate} · ${w.byImpact.minor}`:`–`,sub:`violations`}),(0,K.jsx)(V,{label:`Pages timed`,value:T.length||`–`,sub:E?`${E} over budget`:`none over budget`,tone:E?`text-fail`:void 0}),(0,K.jsx)(V,{label:`Slowest LCP`,value:k===void 0?`–`:z(k,`ms`),tone:k===void 0?void 0:k>4e3?`text-fail`:k>2500?`text-warn`:`text-pass`,sub:`good up to 2.5s`}),(0,K.jsx)(V,{label:`Pages compared`,value:i.visual?i.visual.pages.length:i.captured?`${i.captured} captured`:`–`,sub:i.visual?`against baselines`:`not compared`}),(0,K.jsx)(V,{label:`Visual changes`,value:i.visual?A:`–`,tone:A?`text-warn`:void 0,sub:i.visual?.pages.some(e=>e.over)?`over budget`:`pages changed`})]}),(0,K.jsx)(ne,{label:`Results`,className:`mb-0`,current:d,onPick:m,tabs:M.map(e=>({id:e.id,label:e.label,n:e.n,...e.tone?{tone:e.tone}:{},icon:(0,K.jsx)(C,{icon:e.icon,size:14})}))}),(0,K.jsxs)(`div`,{role:`tabpanel`,id:`panel-${d}`,"aria-labelledby":`tab-${d}`,className:`flex min-w-0 flex-col`,children:[d===`accessibility`&&(0,K.jsx)(U,{run:i,standard:n.standard,disclaimer:n.disclaimer}),d===`performance`&&(0,K.jsx)(ie,{run:i}),d===`visual`&&(0,K.jsx)(R,{run:i,budget:n.budgets.visual,onChange:e=>{o(e),r()}})]})]})}function fe({runs:e}){let[t,r]=(0,W.useState)(`all`),a=e,o=t===`attention`?a.filter(H):a,s=e=>location.hash=p(`quality`,encodeURIComponent(e)),c=`py-2 pr-4 text-right tabular-nums`;return(0,K.jsx)(`div`,{className:`flex flex-col gap-2`,children:(0,K.jsx)(N,{label:`Runs`,placeholder:`Find a run by what it did`,resetKey:t,empty:`Nothing matches.`,tools:(0,K.jsx)(`div`,{className:`flex flex-wrap gap-2`,children:(0,K.jsx)(T,{items:[{id:`all`,label:`All`,n:a.length},{id:`attention`,label:`Needs a look`,n:a.filter(H).length,alert:!0}],value:t,onChange:r})}),head:(0,K.jsxs)(K.Fragment,{children:[(0,K.jsx)(`th`,{scope:`col`,className:g(M,`w-[46%]`),children:`Run`}),(0,K.jsx)(`th`,{scope:`col`,className:P,children:`Rules failed`}),(0,K.jsx)(`th`,{scope:`col`,className:g(P,`hidden @2xl:table-cell`),children:`Critical · serious`}),(0,K.jsx)(`th`,{scope:`col`,className:g(P,`hidden @xl:table-cell`),children:`Slow pages`}),(0,K.jsx)(`th`,{scope:`col`,className:P,children:`Visual`}),(0,K.jsx)(`th`,{scope:`col`,className:g(P,`hidden @3xl:table-cell`),children:`Budgets`}),(0,K.jsx)(`th`,{scope:`col`,className:g(M,`hidden @xl:table-cell`),children:`When`})]}),children:o.map(e=>{let t=e.breaches?n:H(e)?m:i,r=e.a11y?e.a11y.critical+e.a11y.serious:void 0;return(0,K.jsxs)(`tr`,{onClick:()=>s(e.id),className:`cursor-pointer border-t border-line-soft hover:bg-surface-muted`,children:[(0,K.jsx)(`td`,{className:g(k,`max-w-0`),children:(0,K.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,K.jsx)(t,{size:15,"aria-label":e.breaches?`Over a budget`:H(e)?`Needs a look`:`Within budgets`,className:g(`flex-none`,e.breaches?`text-fail`:H(e)?`text-warn`:`text-pass`)}),(0,K.jsx)(`a`,{href:p(`quality`,encodeURIComponent(e.id)),onClick:e=>e.stopPropagation(),"data-tip":e.goal,className:`truncate text-ink no-underline hover:underline`,children:e.goal})]})}),(0,K.jsx)(`td`,{className:g(c,e.a11y?.failed?`text-fail`:`text-muted`),children:e.a11y?e.a11y.failed:`–`}),(0,K.jsx)(`td`,{className:g(c,`hidden @2xl:table-cell`,r?`text-fail`:`text-muted`),children:e.a11y?`${e.a11y.critical} · ${e.a11y.serious}`:`–`}),(0,K.jsx)(`td`,{className:g(c,`hidden @xl:table-cell`,e.perf.over?`text-fail`:`text-muted`),children:e.perf.pages?`${e.perf.over} / ${e.perf.pages}`:`–`}),(0,K.jsx)(`td`,{className:g(c,e.visual?.changed?`text-warn`:`text-muted`),children:e.visual?`${e.visual.changed} changed`:e.captured?`not compared`:`–`}),(0,K.jsx)(`td`,{className:g(c,`hidden @3xl:table-cell`,e.breaches?`text-fail`:`text-muted`),children:e.breaches?`${e.breaches} over`:`ok`}),(0,K.jsx)(`td`,{className:g(k,`hidden whitespace-nowrap text-[13px] text-muted @xl:table-cell`),"data-tip":L(e.at),children:F(e.at)})]},e.id)})})})}function pe({sub:e}){let[t,n]=(0,W.useState)(null),[r,i]=(0,W.useState)(``),a=(0,W.useCallback)(()=>{b.view().then(e=>{n(e),i(``)},e=>i(e.message))},[]);(0,W.useEffect)(a,[a]);let[s=``,l]=(e??``).split(`/`),u=s===`trends`,f=s===`security`,m=s===`localization`,h=(f||m)&&l?d(l):void 0,_=f?h:void 0,v=s&&!u&&!f&&!m?d(s):``,y=t?.trends.filter(e=>e.perf.worse.length||e.a11y.newRules.length).length??0;return(0,K.jsxs)(`div`,{className:`flex min-h-(--screen) flex-col`,children:[(0,K.jsx)(j,{}),(0,K.jsxs)(`main`,{className:g(ee,`@container flex-auto gap-4`),children:[(0,K.jsx)(A,{}),(0,K.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4`,children:[(0,K.jsx)(O,{pixel:E.quality,size:`lg`}),(0,K.jsx)(`h1`,{className:`m-0 text-[25px] font-semibold tracking-[-0.01em]`,children:`Quality`}),!v&&(0,K.jsx)(te,{label:`Show`,current:u?`trends`:f?`security`:m?`localization`:`runs`,links:[{id:`runs`,label:t?`Runs (${t.runs.length})`:`Runs`,href:p(`quality`)},{id:`trends`,label:`Trends${y?` (${y} worse)`:``}`,href:p(`quality`,`trends`)},{id:`security`,label:`Security`,href:p(`quality`,`security`)},{id:`localization`,label:`Localization`,href:p(`quality`,`localization`)}]})]}),f&&!_&&(0,K.jsx)(`p`,{className:`m-0 text-[13px] leading-relaxed text-ink-2`,children:`Passive security smoke checks of each browser run, read from what it recorded: the pages' security headers, the flags of the cookies they set, http requests from https pages, redirects to an address taken from the URL, and keys or tokens in API answers. Nothing is sent to the site, and runs on an environment named like production are not checked.`}),m&&!h&&(0,K.jsx)(`p`,{className:`m-0 text-[13px] leading-relaxed text-ink-2`,children:`Each page a browser run visited, checked for its language: translation keys shown as text, English left on a page in another language, and text cut off or running past its box. Then, for a moment the run never sees, the page with pseudo-localized text (accented and a third longer) and right to left, to find what breaks in German or Arabic before it is translated. Run a flow in each language your site has.`}),!v&&!f&&!m&&(0,K.jsxs)(`p`,{className:`m-0 text-[13px] leading-relaxed text-ink-2`,children:[`What each browser run measured on the pages it visited: accessibility (`,t?.standard||`WCAG`,`), Core Web Vitals, and visual changes against approved baselines. Budgets (quality.budgets) decide what fails a run. Open a run for all its details, or one kind with its agent: `,(0,K.jsx)(`a`,{href:p(`accessibility`),children:`Accessibility`}),`, `,(0,K.jsx)(`a`,{href:p(`performance`),children:`Performance`}),` or `,(0,K.jsx)(`a`,{href:p(`visual`),children:`Visual`}),`.`]}),r&&(0,K.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[10px] bg-fail-soft px-4 py-2 text-[13px] text-fail [overflow-wrap:anywhere]`,children:r}),!t&&!r&&(0,K.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-muted`,children:`Loading…`}),f&&(0,K.jsx)(ue,{id:_}),m&&(0,K.jsx)(ce,{id:h}),t&&v&&(0,K.jsx)(de,{id:v,view:t,onChanged:a}),t&&!v&&u&&(0,K.jsx)(`div`,{role:`tabpanel`,"aria-label":`Trends`,children:(0,K.jsx)(re,{trends:t.trends})}),t&&!v&&!u&&!f&&!m&&(t.runs.length?(0,K.jsx)(fe,{runs:t.runs}):(0,K.jsx)(w,{icon:c,title:`No measurements yet`,action:(0,K.jsxs)(`a`,{className:S({size:`sm`}),href:p(`record`),"data-tip":`Record a flow`,children:[(0,K.jsx)(o,{"aria-hidden":`true`}),`Record`]}),children:`Every browser run checks accessibility, timings and visual changes of the pages it visits; run a flow from a chat or the Record page, and its results show here.`}))]})]})}export{pe as Quality};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{H as t,Hr as n,I as r,L as i,ot as a,r as o,u as s,wr as c}from"./route-Dg53WdFu.js";import{t as l}from"./jsx-runtime-LKYXHABd.js";import{A as u,X as d,n as f,t as p}from"./input-D7iHeNXz.js";import{d as m}from"./filters-Culzq1j1.js";import{L as h}from"./palette-lUno7fso.js";import{Dn as g,H as _,K as v,U as y,g as b}from"./index-
|
|
1
|
+
import{r as e}from"./rolldown-runtime-XKyaHtl9.js";import{H as t,Hr as n,I as r,L as i,ot as a,r as o,u as s,wr as c}from"./route-Dg53WdFu.js";import{t as l}from"./jsx-runtime-LKYXHABd.js";import{A as u,X as d,n as f,t as p}from"./input-D7iHeNXz.js";import{d as m}from"./filters-Culzq1j1.js";import{L as h}from"./palette-lUno7fso.js";import{Dn as g,H as _,K as v,U as y,g as b}from"./index-DeYZJBWf.js";import{_ as x}from"./qualityParts-j9yO6-qk.js";var S=e(n(),1),C={view:(e,t)=>d(`GET`,`/api/readiness?${new URLSearchParams({...e?{pack:e}:{},...t?{report:t}:{}})}`),signOff:e=>d(`POST`,`/api/readiness/signoff`,{...e,confirmed:!0})},w=l(),T={pass:{label:`Pass`,icon:r,tone:`text-pass`},risk:{label:`Risk`,icon:c,tone:`text-warn`},block:{label:`Blocker`,icon:t,tone:`text-fail`},unknown:{label:`No evidence`,icon:i,tone:`text-muted`}},E={GO:{word:`Go`,tone:`text-pass`,bg:`bg-pass-soft`,text:`Every criterion with evidence passed.`},"GO WITH RISKS":{word:`Go with risks`,tone:`text-warn`,bg:`bg-warn-soft`,text:`Nothing blocks the release, but some criteria are risks or have no evidence yet.`},"NO-GO":{word:`No go`,tone:`text-fail`,bg:`bg-fail-soft`,text:`At least one criterion blocks the release.`},"NO EVIDENCE":{word:`No evidence yet`,tone:`text-muted`,bg:`bg-surface-muted`,text:`Nothing has been measured for this release yet: build and run a regression pack.`}},D={GO:`go`,"GO WITH RISKS":`go-with-risks`,"NO-GO":`no-go`,"NO EVIDENCE":`no-go`};function O({view:e,onDone:t}){let[n,i]=(0,S.useState)(``),[a,o]=(0,S.useState)(D[e.verdict]),[s,c]=(0,S.useState)(``),[l,u]=(0,S.useState)(!1),[d,h]=(0,S.useState)(``),g=async()=>{u(!0);try{let r=await C.signOff({by:n.trim(),decision:a,...s.trim()?{note:s.trim()}:{},...e.pack?{pack:e.pack}:{},...e.report?{report:e.report}:{}});t(r.view,r.file,r.markdown)}catch(e){h(e.message)}finally{u(!1)}};return(0,w.jsxs)(`form`,{"aria-label":`Sign off`,className:`flex flex-col gap-2 rounded-[10px] bg-surface-muted p-4 text-[13px]`,onSubmit:e=>{e.preventDefault(),n.trim()&&g()},children:[(0,w.jsxs)(`span`,{children:[`Sign off `,e.release||e.pack||`this release`,` as it is now. The record keeps your name, your decision, ForgeQE's verdict and every criterion with its evidence.`]}),(0,w.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2`,children:[(0,w.jsxs)(`label`,{className:`flex min-w-0 flex-[1_1_180px] flex-col gap-1 font-medium`,children:[`Your name`,(0,w.jsx)(p,{size:`sm`,value:n,maxLength:80,onChange:e=>i(e.target.value)})]}),(0,w.jsxs)(`label`,{className:`flex flex-[0_1_200px] flex-col gap-1 font-medium`,children:[`Decision`,(0,w.jsxs)(f,{size:`sm`,value:a,onChange:e=>o(e.target.value),children:[(0,w.jsx)(`option`,{value:`go`,children:`Go`}),(0,w.jsx)(`option`,{value:`go-with-risks`,children:`Go with risks`}),(0,w.jsx)(`option`,{value:`no-go`,children:`No go`})]})]}),(0,w.jsxs)(`label`,{className:`flex min-w-0 flex-[2_1_260px] flex-col gap-1 font-medium`,children:[`Note (optional)`,(0,w.jsx)(p,{size:`sm`,value:s,maxLength:500,onChange:e=>c(e.target.value),placeholder:`Accepted the coupon risk: covered by a manual check`})]}),(0,w.jsxs)(m,{size:`sm`,variant:`primary`,type:`submit`,disabled:l||!n.trim(),children:[(0,w.jsx)(r,{"aria-hidden":`true`}),`Sign off`]})]}),d&&(0,w.jsx)(`p`,{role:`alert`,className:`m-0 text-fail`,children:d})]})}function k(){let[e,t]=(0,S.useState)(null),[n,i]=(0,S.useState)(``),[c,l]=(0,S.useState)(),[d,p]=(0,S.useState)(),[D,k]=(0,S.useState)(!1),[A,j]=(0,S.useState)(null),M=(0,S.useCallback)(()=>{C.view(c,d).then(e=>(t(e),i(``)),e=>i(e.message))},[c,d]);(0,S.useEffect)(M,[M]);let N=e,P=N?{block:N.criteria.filter(e=>e.status===`block`).length,risk:N.criteria.filter(e=>e.status===`risk`).length,unknown:N.criteria.filter(e=>e.status===`unknown`).length}:void 0;return(0,w.jsxs)(`div`,{className:`flex min-h-(--screen) flex-col`,children:[(0,w.jsx)(v,{}),(0,w.jsxs)(`main`,{className:u(y,`@container flex-auto gap-4`),children:[(0,w.jsx)(_,{}),(0,w.jsxs)(`div`,{className:`flex flex-wrap items-center gap-4`,children:[(0,w.jsx)(g,{pixel:h.readiness,size:`lg`}),(0,w.jsx)(`h1`,{className:`m-0 text-[25px] font-semibold tracking-[-0.01em]`,children:`Release readiness`})]}),(0,w.jsx)(`p`,{className:`m-0 text-[13px] leading-relaxed text-ink-2`,children:`One verdict for a release, from what ForgeQE has measured: the regression pack's last run and the changes it does not cover, the latest readiness report of the test cases and bugs, flaky tests, Quality budgets and Security findings since the pack was built, the agents' Evidence verdicts and exploratory sessions. Any blocker is NO-GO. Each criterion opens the page with its evidence.`}),n&&(0,w.jsx)(`p`,{role:`alert`,className:`m-0 rounded-[10px] bg-fail-soft px-4 py-2 text-[13px] text-fail [overflow-wrap:anywhere]`,children:n}),!N&&!n&&(0,w.jsx)(`p`,{role:`status`,className:`m-0 text-[13px] text-muted`,children:`Loading…`}),N&&P&&(0,w.jsxs)(w.Fragment,{children:[(0,w.jsxs)(`div`,{className:`flex flex-wrap items-end gap-2`,children:[(0,w.jsxs)(`label`,{className:`flex min-w-0 flex-[1_1_260px] flex-col gap-1 text-[13px] font-medium`,children:[`Release (regression pack)`,(0,w.jsxs)(f,{size:`sm`,value:N.pack??``,onChange:e=>(l(e.target.value||void 0),j(null)),disabled:!N.packs.length,children:[!N.packs.length&&(0,w.jsx)(`option`,{value:``,children:`No packs yet`}),N.packs.map(e=>(0,w.jsx)(`option`,{value:e.name,children:e.release?`${e.release} · ${e.name}`:e.name},e.name))]})]}),(0,w.jsxs)(`label`,{className:`flex min-w-0 flex-[1_1_260px] flex-col gap-1 text-[13px] font-medium`,children:[`Test cases and bugs (readiness report)`,(0,w.jsxs)(f,{size:`sm`,value:N.report??``,onChange:e=>(p(e.target.value||void 0),j(null)),disabled:!N.reports.length,children:[!N.reports.length&&(0,w.jsx)(`option`,{value:``,children:`No reports yet`}),N.reports.map(e=>(0,w.jsxs)(`option`,{value:e.id,children:[e.scope,` · `,e.verdict,` · `,e.id]},e.id))]})]})]}),(0,w.jsxs)(`section`,{"aria-label":`Verdict`,className:u(`flex flex-wrap items-center gap-x-6 gap-y-2 rounded-[14px] px-4 py-4`,E[N.verdict].bg),children:[(0,w.jsxs)(`div`,{className:`flex flex-col`,children:[(0,w.jsxs)(`span`,{className:`text-[13px] text-muted`,children:[`ForgeQE's verdict`,N.release?` for ${N.release}`:``]}),(0,w.jsx)(`span`,{className:u(`text-[31px] leading-tight font-semibold tracking-[-0.02em]`,E[N.verdict].tone),children:E[N.verdict].word})]}),(0,w.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_300px] flex-col gap-1 text-[13px]`,children:[(0,w.jsx)(`span`,{className:`text-ink-2`,children:E[N.verdict].text}),(0,w.jsxs)(`span`,{className:`text-muted`,children:[P.block,` blocker`,P.block===1?``:`s`,` · `,P.risk,` risk`,P.risk===1?``:`s`,` · `,P.unknown,` without evidence`,N.since?(0,w.jsxs)(`span`,{"data-tip":x(N.since),children:[` · measured since the pack was built, `,b(N.since)]}):null]})]}),!D&&(0,w.jsxs)(m,{size:`sm`,onClick:()=>(k(!0),j(null)),children:[(0,w.jsx)(r,{"aria-hidden":`true`}),`Sign off`]})]}),D&&(0,w.jsx)(O,{view:N,onDone:(e,n,r)=>{t(e),k(!1),j({file:n,markdown:r})}}),A&&(0,w.jsxs)(`p`,{role:`status`,className:`m-0 flex flex-wrap items-center gap-2 text-[13px] text-ink-2`,children:[`Signed off: saved as `,(0,w.jsx)(`code`,{className:`font-mono text-[13px]`,children:A.file}),(0,w.jsxs)(m,{size:`sm`,variant:`ghost`,"data-tip":`Download the record`,onClick:()=>{let e=URL.createObjectURL(new Blob([A.markdown],{type:`text/markdown;charset=utf-8`})),t=document.createElement(`a`);t.href=e,t.download=`signoff.md`,t.click(),setTimeout(()=>URL.revokeObjectURL(e),1e3)},children:[(0,w.jsx)(a,{"aria-hidden":`true`}),`Download`]})]}),(0,w.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0`,children:N.criteria.map(e=>{let t=T[e.status];return(0,w.jsxs)(`li`,{className:`flex flex-wrap items-start gap-4 border-t border-line-soft py-4 text-[13px]`,children:[(0,w.jsx)(t.icon,{size:16,"aria-label":t.label,className:u(`mt-1 flex-none`,t.tone)}),(0,w.jsxs)(`div`,{className:`flex min-w-0 flex-[1_1_320px] flex-col gap-1`,children:[(0,w.jsxs)(`span`,{className:`font-medium`,children:[e.label,` `,(0,w.jsxs)(`span`,{className:u(`font-normal`,t.tone),children:[`· `,t.label,`: `,e.value]})]}),e.detail.map((e,t)=>(0,w.jsx)(`span`,{className:`text-ink-2 [overflow-wrap:anywhere]`,children:e},t))]}),e.link.length>0&&(0,w.jsxs)(`a`,{href:o(...e.link.map(encodeURIComponent)),className:`inline-flex items-center gap-1 self-center text-[13px] whitespace-nowrap`,children:[`Open`,(0,w.jsx)(s,{size:14,"aria-hidden":`true`})]})]},e.id)})}),N.signoffs.length>0&&(0,w.jsxs)(`section`,{"aria-labelledby":`signoffs-h`,className:`flex flex-col gap-2`,children:[(0,w.jsx)(`h2`,{id:`signoffs-h`,className:`m-0 text-[16px] font-semibold`,children:`Sign-offs`}),(0,w.jsx)(`ul`,{className:`m-0 flex list-none flex-col p-0 text-[13px]`,children:N.signoffs.map(e=>(0,w.jsxs)(`li`,{className:`flex flex-wrap gap-x-2 border-t border-line-soft py-2`,children:[(0,w.jsx)(`span`,{className:`font-medium`,children:e.release}),(0,w.jsx)(`span`,{className:e.decision===`NO-GO`?`text-fail`:e.decision===`GO`?`text-pass`:`text-warn`,children:E[e.decision]?.word??e.decision}),(0,w.jsxs)(`span`,{className:`text-muted`,children:[`by `,e.by,`, `,e.at?x(e.at):e.id,` · ForgeQE said `,E[e.verdict]?.word??e.verdict]})]},e.id))})]})]})]})]})}export{k as Readiness};
|