limn-review 0.1.150 → 0.1.151

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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "limn-review",
3
- "version": "0.1.150",
3
+ "version": "0.1.151",
4
4
  "description": "Dashboard for tracking your team's GitHub PR activity across repos. Runs on your machine with your gh login.",
5
5
  "type": "module",
6
6
  "author": "Alex Wakeman",
@@ -1,3 +1,3 @@
1
- import{d as Ae,r as f,j as e}from"./tanstack-BnbsafB1.js";import{aH as V,aG as ze,cs as be,cz as Ge,c9 as Qe,cq as Ve,cb as Fe,aA as Je,cr as $,A as Ne,aF as Ie,O as H,q as Xe,aa as ne,ba as Te,W as Se,e as z,aD as Ee,h as Me,a as Ze,d2 as et,bF as tt,aI as st,cW as nt,cX as it,T as at,y as rt,N as lt,p as G,bn as ct,cp as ot,co as dt,c8 as ut,b2 as mt,bG as ht,al as xt,b1 as pt,aT as ft,bQ as _e,bq as gt,c4 as Be,c5 as jt,ci as bt,cx as Nt,cw as vt,cP as wt,cQ as yt,aE as kt,aB as Pt,c7 as Rt,c6 as Ct,cj as At,aC as Ft,bu as It,bD as ie,Q as Tt,F as St,M as Et,bM as Le,cH as Mt,a8 as ve,D as _t}from"./index-B9TtX9l5.js";import{r as Bt,t as Lt,S as Ut,C as $t,T as Dt,F as Ot,f as Wt,M as Kt}from"./ClaudeReviewTab-CuU74jVK.js";import"./markdown-CcoLFczy.js";import"./highlight-DIEV0qGG.js";import"./vis-C3BCkP5U.js";const Yt="inline-flex h-7 items-center whitespace-nowrap rounded-ui bg-ui-raise px-2.5 text-meta font-medium text-ui-ink hover:bg-ui-hover disabled:cursor-not-allowed disabled:opacity-50 touch:h-10 touch:px-3",X="inline-flex h-7 items-center whitespace-nowrap rounded-ui bg-ui-raise px-2.5 text-meta font-medium text-ui-ink hover:bg-ui-hover disabled:cursor-not-allowed disabled:opacity-50 touch:h-10 touch:px-3",we="inline-flex items-center rounded-ui bg-ui-raise px-1.5 py-px font-mono text-meta text-ui-ink";function qt(t){return t instanceof Me||t instanceof Error?t.message:"Something went wrong"}function Ue({plan:t}){return e.jsx("ul",{className:"list-disc space-y-0.5 pl-5 text-body text-ui-ink",children:t.summary.map((s,n)=>e.jsx("li",{children:s},n))})}function ye(t,s){var n;return((n=t==null?void 0:t.find(a=>a.ref===s))==null?void 0:n.title)??null}function Ht({plan:t,items:s}){return e.jsxs("div",{className:"mt-2 space-y-3 text-meta text-ui-ink",children:[t.steps.length>0&&e.jsx("ol",{className:"list-decimal space-y-2 pl-5",children:t.steps.map((n,a)=>e.jsxs("li",{children:[e.jsx("div",{className:"font-medium text-ui-ink",children:n.title}),n.files.length>0&&e.jsx("div",{className:"mt-0.5 font-mono text-meta text-ui-mute",children:n.files.join(", ")}),e.jsx("p",{className:"mt-0.5 whitespace-pre-wrap",children:n.change}),n.refs.length>0&&e.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:n.refs.map(i=>e.jsx("span",{className:we,children:i},i))})]},a))}),t.notAddressed.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"mb-1 font-semibold text-ui-mute",children:"Will not fix"}),e.jsx("ul",{className:"space-y-1",children:t.notAddressed.map(n=>e.jsxs("li",{children:[e.jsx("span",{className:we,children:n.ref})," ",ye(s,n.ref)&&e.jsxs("span",{className:"font-medium",children:[ye(s,n.ref),": "]}),n.reason]},n.ref))})]}),t.notCovered.length>0&&e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold text-ui-mute",children:"Not in the plan: "}),t.notCovered.join(", ")]})]})}function zt({pr:t,fix:s,liveStatus:n,passRunning:a,auth:i}){var w,b;const l=s.plan,c=V(s.plan??s),h=ze((s.plan??s).provider,(s.plan??s).model),N=be(h,"plan"),j=be(h,"fix"),r=Ee(N),v=Ge(t.id),p=Qe(t.id),k=Ve(t.id),I=Fe(t.id),T=Ae({mutationKey:Je(t.id)})>0,D=$(m=>m.noteAiFixRun),[S,E]=f.useState(""),[A,M]=f.useState(!1);if(!l)return null;const P=l.plan,R=l.status==="plan_ready"&&!a,C=S.trim(),y=C.length>Ne,o=()=>{!R||T||C===""||y||v.mutate({fixId:s.id,text:C},{onSuccess:()=>E("")})},x=()=>{D({prId:t.id,repoFullName:t.repoFullName,prNumber:t.number,prTitle:t.title}),p.mutate(s.id)},d=v.error??p.error??k.error;return e.jsxs("div",{className:"mt-3 rounded-ui bg-ui-surface p-3",children:[e.jsxs("div",{className:"mb-1 flex items-center gap-1 text-meta font-semibold text-ui-ink",children:["Plan",P&&l.revision>1&&e.jsxs("span",{className:"font-normal text-ui-mute",children:["· version ",l.revision]}),l.model&&e.jsxs("span",{className:"font-normal text-ui-mute",children:["· ",Ie(l.provider,l.model,l.effort)]}),e.jsxs(H,{title:"Plan first",children:[e.jsxs("p",{children:[r," reads the code and writes a plan. It changes nothing."]}),e.jsxs("p",{children:["Tell ",r," what to change and it rewrites the plan, taking the whole conversation into account. Each message runs ",r," again."]}),e.jsxs("p",{children:["When you approve, ",r," builds the fix from this plan. You still review the diff and press Push."]})]})]}),P?e.jsxs(e.Fragment,{children:[e.jsx(Ue,{plan:P}),e.jsxs("button",{type:"button",className:"hit mt-2 inline-flex items-center gap-1 text-meta text-ui-mute hover:text-ui-ink","aria-expanded":A,onClick:()=>M(m=>!m),children:[e.jsx(Xe,{dir:A?"down":"right"}),"Details"]}),A&&e.jsx(Ht,{plan:P,items:s.reviewItems})]}):!a&&e.jsx("p",{className:"text-meta text-ui-mute",children:"No plan yet."}),s.error&&e.jsx("p",{className:"mt-2 rounded-ui bg-ui-raise p-2 text-meta text-ui-warn",children:s.error}),l.transcript.length>0&&e.jsx("ul",{className:"mt-3 space-y-1.5 border-t border-ui-line pt-2 text-meta",children:l.transcript.map((m,B)=>e.jsxs("li",{className:"whitespace-pre-wrap text-ui-ink",children:[e.jsxs("span",{className:"font-semibold",children:[m.role==="reader"?"You":c,": "]}),m.text]},B))}),a&&e.jsxs("div",{className:"mt-3",children:[e.jsx(ne,{active:!0,label:P?"Updating the plan":"Making the plan",value:Te(n),timeConstantSec:30}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 text-meta text-ui-mute",children:[Se[((w=n==null?void 0:n.progress)==null?void 0:w.phase)??""]??"Working…",e.jsx("button",{type:"button",className:X,onClick:()=>I.mutate(),children:"Cancel"})]}),((b=n==null?void 0:n.progress)==null?void 0:b.recentActivity)&&n.progress.recentActivity.length>0&&e.jsx("pre",{className:"mt-1 max-h-32 overflow-auto rounded-ui bg-ui-surface p-2 text-meta leading-relaxed text-ui-mute",children:n.progress.recentActivity.slice(-8).join(`
1
+ import{d as Ae,r as f,j as e}from"./tanstack-BnbsafB1.js";import{aH as V,aG as ze,cs as be,cz as Ge,c9 as Qe,cq as Ve,cb as Fe,aA as Je,cr as $,A as Ne,aF as Ie,O as H,q as Xe,aa as ne,ba as Te,W as Se,e as z,aD as Ee,h as Me,a as Ze,d2 as et,bF as tt,aI as st,cW as nt,cX as it,T as at,y as rt,N as lt,p as G,bn as ct,cp as ot,co as dt,c8 as ut,b2 as mt,bG as ht,al as xt,b1 as pt,aT as ft,bQ as _e,bq as gt,c4 as Be,c5 as jt,ci as bt,cx as Nt,cw as vt,cP as wt,cQ as yt,aE as kt,aB as Pt,c7 as Rt,c6 as Ct,cj as At,aC as Ft,bu as It,bD as ie,Q as Tt,F as St,M as Et,bM as Le,cH as Mt,a8 as ve,D as _t}from"./index-DZWulOIE.js";import{r as Bt,t as Lt,S as Ut,C as $t,T as Dt,F as Ot,f as Wt,M as Kt}from"./ClaudeReviewTab-3dS4-wd-.js";import"./markdown-CcoLFczy.js";import"./highlight-DIEV0qGG.js";import"./vis-C3BCkP5U.js";const Yt="inline-flex h-7 items-center whitespace-nowrap rounded-ui bg-ui-raise px-2.5 text-meta font-medium text-ui-ink hover:bg-ui-hover disabled:cursor-not-allowed disabled:opacity-50 touch:h-10 touch:px-3",X="inline-flex h-7 items-center whitespace-nowrap rounded-ui bg-ui-raise px-2.5 text-meta font-medium text-ui-ink hover:bg-ui-hover disabled:cursor-not-allowed disabled:opacity-50 touch:h-10 touch:px-3",we="inline-flex items-center rounded-ui bg-ui-raise px-1.5 py-px font-mono text-meta text-ui-ink";function qt(t){return t instanceof Me||t instanceof Error?t.message:"Something went wrong"}function Ue({plan:t}){return e.jsx("ul",{className:"list-disc space-y-0.5 pl-5 text-body text-ui-ink",children:t.summary.map((s,n)=>e.jsx("li",{children:s},n))})}function ye(t,s){var n;return((n=t==null?void 0:t.find(a=>a.ref===s))==null?void 0:n.title)??null}function Ht({plan:t,items:s}){return e.jsxs("div",{className:"mt-2 space-y-3 text-meta text-ui-ink",children:[t.steps.length>0&&e.jsx("ol",{className:"list-decimal space-y-2 pl-5",children:t.steps.map((n,a)=>e.jsxs("li",{children:[e.jsx("div",{className:"font-medium text-ui-ink",children:n.title}),n.files.length>0&&e.jsx("div",{className:"mt-0.5 font-mono text-meta text-ui-mute",children:n.files.join(", ")}),e.jsx("p",{className:"mt-0.5 whitespace-pre-wrap",children:n.change}),n.refs.length>0&&e.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:n.refs.map(i=>e.jsx("span",{className:we,children:i},i))})]},a))}),t.notAddressed.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"mb-1 font-semibold text-ui-mute",children:"Will not fix"}),e.jsx("ul",{className:"space-y-1",children:t.notAddressed.map(n=>e.jsxs("li",{children:[e.jsx("span",{className:we,children:n.ref})," ",ye(s,n.ref)&&e.jsxs("span",{className:"font-medium",children:[ye(s,n.ref),": "]}),n.reason]},n.ref))})]}),t.notCovered.length>0&&e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold text-ui-mute",children:"Not in the plan: "}),t.notCovered.join(", ")]})]})}function zt({pr:t,fix:s,liveStatus:n,passRunning:a,auth:i}){var w,b;const l=s.plan,c=V(s.plan??s),h=ze((s.plan??s).provider,(s.plan??s).model),N=be(h,"plan"),j=be(h,"fix"),r=Ee(N),v=Ge(t.id),p=Qe(t.id),k=Ve(t.id),I=Fe(t.id),T=Ae({mutationKey:Je(t.id)})>0,D=$(m=>m.noteAiFixRun),[S,E]=f.useState(""),[A,M]=f.useState(!1);if(!l)return null;const P=l.plan,R=l.status==="plan_ready"&&!a,C=S.trim(),y=C.length>Ne,o=()=>{!R||T||C===""||y||v.mutate({fixId:s.id,text:C},{onSuccess:()=>E("")})},x=()=>{D({prId:t.id,repoFullName:t.repoFullName,prNumber:t.number,prTitle:t.title}),p.mutate(s.id)},d=v.error??p.error??k.error;return e.jsxs("div",{className:"mt-3 rounded-ui bg-ui-surface p-3",children:[e.jsxs("div",{className:"mb-1 flex items-center gap-1 text-meta font-semibold text-ui-ink",children:["Plan",P&&l.revision>1&&e.jsxs("span",{className:"font-normal text-ui-mute",children:["· version ",l.revision]}),l.model&&e.jsxs("span",{className:"font-normal text-ui-mute",children:["· ",Ie(l.provider,l.model,l.effort)]}),e.jsxs(H,{title:"Plan first",children:[e.jsxs("p",{children:[r," reads the code and writes a plan. It changes nothing."]}),e.jsxs("p",{children:["Tell ",r," what to change and it rewrites the plan, taking the whole conversation into account. Each message runs ",r," again."]}),e.jsxs("p",{children:["When you approve, ",r," builds the fix from this plan. You still review the diff and press Push."]})]})]}),P?e.jsxs(e.Fragment,{children:[e.jsx(Ue,{plan:P}),e.jsxs("button",{type:"button",className:"hit mt-2 inline-flex items-center gap-1 text-meta text-ui-mute hover:text-ui-ink","aria-expanded":A,onClick:()=>M(m=>!m),children:[e.jsx(Xe,{dir:A?"down":"right"}),"Details"]}),A&&e.jsx(Ht,{plan:P,items:s.reviewItems})]}):!a&&e.jsx("p",{className:"text-meta text-ui-mute",children:"No plan yet."}),s.error&&e.jsx("p",{className:"mt-2 rounded-ui bg-ui-raise p-2 text-meta text-ui-warn",children:s.error}),l.transcript.length>0&&e.jsx("ul",{className:"mt-3 space-y-1.5 border-t border-ui-line pt-2 text-meta",children:l.transcript.map((m,B)=>e.jsxs("li",{className:"whitespace-pre-wrap text-ui-ink",children:[e.jsxs("span",{className:"font-semibold",children:[m.role==="reader"?"You":c,": "]}),m.text]},B))}),a&&e.jsxs("div",{className:"mt-3",children:[e.jsx(ne,{active:!0,label:P?"Updating the plan":"Making the plan",value:Te(n),timeConstantSec:30}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 text-meta text-ui-mute",children:[Se[((w=n==null?void 0:n.progress)==null?void 0:w.phase)??""]??"Working…",e.jsx("button",{type:"button",className:X,onClick:()=>I.mutate(),children:"Cancel"})]}),((b=n==null?void 0:n.progress)==null?void 0:b.recentActivity)&&n.progress.recentActivity.length>0&&e.jsx("pre",{className:"mt-1 max-h-32 overflow-auto rounded-ui bg-ui-surface p-2 text-meta leading-relaxed text-ui-mute",children:n.progress.recentActivity.slice(-8).join(`
2
2
  `)})]}),R&&P&&e.jsxs("div",{className:"mt-3",children:[e.jsxs(z,{kind:"plan",auth:i,meter:!1,followUp:!0,provider:N,children:[e.jsx("textarea",{"aria-label":"Change the plan",className:"w-full rounded-ui bg-ui-raise px-2 py-1 text-body ring-1 ring-inset ring-ui-line focus:outline-none focus:ring-2 focus:ring-ui-accent",rows:2,placeholder:`Tell ${r} what to change in the plan`,value:S,disabled:T,onChange:m=>E(m.target.value),onKeyDown:m=>{m.key==="Enter"&&(m.metaKey||m.ctrlKey)&&(m.preventDefault(),o())}}),y&&e.jsxs("p",{className:"text-meta text-ui-danger",children:["Keep it under ",Ne.toLocaleString("en-US")," characters."]}),e.jsx("div",{className:"mt-2",children:e.jsx("button",{type:"button","data-ai-run":!0,className:X,disabled:T||C===""||y,onClick:o,children:"Update plan"})})]}),e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[e.jsx(z,{kind:"fix",auth:i,followUp:!0,provider:j,children:e.jsx("button",{type:"button","data-ai-run":!0,className:Yt,disabled:T,onClick:x,children:"Approve and build"})}),e.jsx("button",{type:"button",className:X,disabled:T,onClick:()=>k.mutate(s.id),children:"Discard plan"})]})]}),d!=null&&e.jsx("p",{className:"mt-1 text-meta text-ui-danger",children:qt(d)})]})}function $e({fix:t}){var n;const s=((n=t.plan)==null?void 0:n.status)==="approved"?t.plan.plan:null;return s?e.jsxs("div",{className:"mb-2 rounded-ui bg-ui-surface p-2",children:[e.jsx("div",{className:"mb-1 text-meta font-semibold text-ui-mute",children:"Built from your plan"}),e.jsx(Ue,{plan:s})]}):null}function Gt(t,s,n){var a;return t??((s==null?void 0:s.status)==="succeeded"?s.id:((a=n.find(i=>i.status==="succeeded"))==null?void 0:a.id)??null)}function Qt(t,s,n){return s==null||n==null||s===n.id?null:t!=null?"Uses the review you picked, not the latest.":n.status==="failed"?"Uses the last review that finished. The latest one failed.":n.status==="running"||n.status==="queued"?"Uses the last review that finished. A newer one is running.":"Uses the last review that finished."}const ke="inline-flex max-w-full items-center gap-1 rounded-ui px-1.5 py-0.5 text-meta font-medium bg-ui-raise text-ui-ink",Y="mb-1 mt-3 flex items-center gap-1 text-meta font-medium text-ui-mute";function Vt(t){return t.kind==="finding"&&t.findingId!=null?`claude-finding-${t.findingId}`:null}function Jt(t){const s=$(n=>n.openClaudeReview);return n=>{s({id:t.id,number:t.number,title:t.title,repoFullName:t.repoFullName,authorLogin:null,authorDisplayName:null,authorAvatarUrl:null});const a=Date.now()+3e3,i=()=>{const l=document.getElementById(n);if(l){l.scrollIntoView({behavior:"smooth",block:"center"});return}Date.now()<a&&requestAnimationFrame(i)};requestAnimationFrame(i)}}function q({refId:t,item:s,onJump:n}){const a=s?`${Ze[s.kind]} ${t}`:t,i=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"shrink-0",children:a}),s&&e.jsxs("span",{className:"min-w-0 truncate font-normal",children:["· ",s.title]})]}),l=s?Vt(s):null;return l?e.jsx("button",{type:"button",onClick:()=>n(l),"aria-label":`${a}: ${(s==null?void 0:s.title)??""}. Show in AI Review`,className:`${ke} max-w-[22rem] hover:bg-ui-hover`,children:i}):e.jsx("span",{className:`${ke} max-w-[22rem]`,children:i})}function Xt(t){var s;switch(t.seed){case"review":{const n=((s=t.reviewItems)==null?void 0:s.length)??0;return`Fix from the AI review${n>0?` (${n} item${n===1?"":"s"})`:""}.`}case"plain":return"Fix from your instruction.";case"comments":return"Fix from picked comments (no longer offered).";case"ci_analysis":return"Fix from the CI analysis (no longer offered).";default:return""}}function Zt({pr:t,fix:s}){const n=V(s),a=Jt(t),i=s.changeReport,l=new Map((s.reviewItems??[]).map(r=>[r.ref,r])),c=(s.reviewItems??[]).filter(r=>!r.included);if(!i&&c.length===0)return null;const h=new Set((i==null?void 0:i.changes.map(r=>r.path))??[]),N=s.filesChanged.filter(r=>!h.has(r)),j=l.size>0;return e.jsxs("div",{className:"mt-2 text-meta",children:[i&&(i.changes.length>0||N.length>0)&&e.jsxs("section",{children:[e.jsxs("div",{className:Y,children:["Changes",e.jsxs(H,{title:"Changes",children:[e.jsxs("p",{children:["What ",n," says it changed in each file, and why."]}),j&&e.jsx("p",{children:"Each tag is a review item the change answers. A finding tag opens it in the AI Review tab."}),e.jsx("p",{children:"The diff below is what actually changed."})]})]}),e.jsxs("ul",{className:"space-y-2",children:[i.changes.map(r=>e.jsxs("li",{children:[e.jsx("div",{className:"break-all font-mono text-ui-ink",children:r.path}),r.summary&&e.jsx("p",{className:"mt-0.5 text-ui-ink",children:r.summary}),r.refs.length>0&&e.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:r.refs.map(v=>e.jsx(q,{refId:v,item:l.get(v),onJump:a},v))})]},r.path)),N.map(r=>e.jsxs("li",{children:[e.jsx("div",{className:"break-all font-mono text-ui-ink",children:r}),e.jsx("p",{className:"mt-0.5 text-ui-mute",children:"No summary reported."})]},r))]})]}),i&&i.unaddressed.length>0&&e.jsxs("section",{children:[e.jsx("div",{className:Y,children:"Not addressed"}),e.jsx("ul",{className:"space-y-1.5",children:i.unaddressed.map(r=>e.jsxs("li",{children:[e.jsx(q,{refId:r.ref,item:l.get(r.ref),onJump:a}),e.jsx("p",{className:"mt-0.5 text-ui-ink",children:r.reason})]},r.ref))})]}),i&&i.notReported.length>0&&e.jsxs("section",{children:[e.jsx("div",{className:Y,children:"No report"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:i.notReported.map(r=>e.jsx(q,{refId:r,item:l.get(r),onJump:a},r))})]}),c.length>0&&e.jsxs("section",{children:[e.jsxs("div",{className:Y,children:["Left out",e.jsx(H,{title:"Left out",children:e.jsxs("p",{children:["These review items did not fit in what ",n," was sent, so it never saw them."]})})]}),e.jsx("div",{className:"flex flex-wrap gap-1",children:c.map(r=>e.jsx(q,{refId:r.ref,item:r,onJump:a},r.ref))})]})]})}const es=["findings","earlier_findings","judged_threads","untouched_threads","ci_failures","sonar","style_bots","story"],ts={findings:"Claude’s findings",earlier_findings:"Earlier findings still open",judged_threads:"Threads Claude says need a fix",untouched_threads:"Unanswered threads",ci_failures:"CI failures",sonar:"SonarCloud issues",style_bots:"Style bot comments",story:"Ticket gaps"};function Pe(t,s="Claude"){return t==="findings"?`${s}’s findings`:t==="judged_threads"?`Threads ${s} says need a fix`:ts[t]}function Q(t,s){return s[t.key]??t.defaultIncluded}function ss(t,s){return t.items.filter(n=>Q(n,s)).map(n=>n.key)}function De(t,s){const n=new Set;let a=0;for(const i of t.items)if(Q(i,s)){if(a>0&&a+i.chars>t.budgetChars){n.add(i.key);continue}a+=i.chars}return n}const ns={blocker:"Blocker",warning:"Warning",nit:"Nit",question:"Question",praise:"Praise"},Re={blocker:"bg-ui-danger/10 text-ui-danger",warning:"bg-ui-raise text-ui-warn",nit:"bg-ui-raise text-ui-mute"},Oe="whitespace-nowrap rounded-ui bg-ui-raise px-1 py-px text-meta text-ui-warn",Z=new Set;function is(t,s){return t?s!=null?`${t}:${s}`:t:null}function as({item:t,picked:s,cut:n,disabled:a,onToggle:i}){return e.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1.5 pt-0.5",children:[e.jsx("label",{className:"flex cursor-pointer items-center touch:-my-3 touch:min-h-10 touch:min-w-10 touch:justify-center",children:e.jsx(G,{checked:s,disabled:a,onChange:l=>i(l.target.checked),"aria-label":`Include in the fix: ${t.label}`})}),s&&n&&e.jsx("span",{className:Oe,children:"Won’t fit"})]})}function rs({item:t,picked:s,cut:n,disabled:a,onToggle:i}){const l=is(t.path,t.line);return e.jsx("li",{children:e.jsxs("label",{className:`flex cursor-pointer items-start gap-2 rounded-ui border px-2 py-1.5 text-meta ${s?"border-ui-line bg-ui-sel":"border-ui-line"}`,children:[e.jsx(G,{className:"mt-0.5",checked:s,disabled:a,onChange:c=>i(c.target.checked)}),e.jsxs("span",{className:"min-w-0 flex-1",children:[e.jsxs("span",{className:"flex flex-wrap items-center gap-1.5",children:[t.severity&&Re[t.severity]&&e.jsx("span",{className:`rounded-ui px-1 py-px text-meta font-medium ${Re[t.severity]}`,children:ns[t.severity]}),e.jsx("span",{className:"break-words text-ui-ink",children:t.label}),s&&n&&e.jsx("span",{className:Oe,children:"Won’t fit"})]}),(l||t.detail)&&e.jsxs("span",{className:"mt-0.5 block break-words text-meta text-ui-mute",children:[l&&e.jsx("span",{className:"font-mono",children:l}),l&&t.detail?" · ":"",t.detail]})]})]})})}function ls({preview:t,overrides:s,onChange:n,disabled:a,pr:i,review:l}){const c=De(t,s),h=new Map;for(const o of t.items){const x=h.get(o.section)??[];x.push(o),h.set(o.section,x)}const N=(o,x)=>{const d={...s};for(const w of o)d[w]=x;n(d)},j=l!=null&&l.id===t.sourceReviewId?l:null,r=Bt(l),v=Lt(l),p=f.useMemo(()=>j!=null?et(j):null,[j]),k=f.useMemo(()=>new Map(((p==null?void 0:p.findings)??[]).map(o=>[o.id,o])),[p]),I=f.useMemo(()=>{var o;return new Map((((o=p==null?void 0:p.followUp)==null?void 0:o.items)??[]).map(x=>[x.priorFindingId,x]))},[p]),T=f.useMemo(()=>p!=null?tt(p):new Map,[p]),D=f.useMemo(()=>p!=null?st(p):new Set,[p]),S=f.useMemo(()=>{var x;const o=new Set;for(const d of t.items)((x=d.card)==null?void 0:x.kind)==="story"&&o.add(d.card.ticketReviewId);return[...o].sort((d,w)=>d-w)},[t.items]),E=nt(i.id,S.length>0),A=f.useMemo(()=>{var x;const o=new Map;for(const d of((x=E.data)==null?void 0:x.tickets)??[])d.review!=null&&o.set(d.review.id,d.review);return o},[E.data]),M=f.useMemo(()=>E.data==null?[]:S.filter(o=>!A.has(o)),[E.data,S,A]),P=it(M),R=f.useMemo(()=>{const o=new Map(A);for(const x of P)o.set(x.id,x);return o},[A,P]);if(t.items.length===0)return e.jsx("p",{className:"text-meta text-ui-mute",children:"The review found nothing to fix."});const C=(j==null?void 0:j.headSha)??i.headSha,y=o=>{var B,L;const x=Q(o,s),d=c.has(o.key),w=u=>N([o.key],u),b=e.jsx(as,{item:o,picked:x,cut:d,disabled:a,onToggle:w}),m=o.card;switch(m==null?void 0:m.kind){case"finding":{const u=k.get(m.findingId);if(u==null)break;return e.jsx(Ot,{authorName:Wt(l,u),prId:i.id,finding:u,editable:!1,prUrl:i.githubUrl,repoFullName:i.repoFullName,headSha:C,posting:!1,postError:null,inChangeset:u.fileInDiff,priorStatus:T.get(u.id),alreadyPosted:D.has(u.id),actions:!1,selection:b,docReferences:(j==null?void 0:j.docReferences)??null},o.key)}case"earlier_finding":{const u=I.get(m.priorFindingId);if(u==null)break;return e.jsx(lt,{item:u,muted:!1,findingsById:k,headMoved:((B=p==null?void 0:p.followUp)==null?void 0:B.headMoved)??!1,changedPaths:Z,actions:!1,selection:b,by:r},o.key)}case"thread":return e.jsx(Dt,{t:m.assessment,muted:!1,actions:!1,selection:b,notCheckedNote:m.inReview?void 0:`${v} didn’t check this one.`,by:v},o.key);case"ci":return e.jsx($t,{f:m.item,suggestion:m.item.suggestion,changedPaths:Z,selection:b},o.key);case"sonar":return e.jsx(Ut,{issue:m.issue,selection:b},o.key);case"story":{const u=R.get(m.ticketReviewId),g=u==null?void 0:u.items.find(_=>_.id===m.itemId);if(u==null||g==null)break;const W={review:u,viewedPrId:i.id,changedPaths:Z,actions:!1,selection:b};if(g.status==="missing")return e.jsx(at,{item:g,...W},o.key);const O=(L=u.assessment)==null?void 0:L.criteria.find(_=>_.ref===g.ref);if(O==null||O.status==="met")break;return e.jsx(rt,{c:O,item:g,...W},o.key)}}return e.jsx(rs,{item:o,picked:x,cut:d,disabled:a,onToggle:w},o.key)};return e.jsxs("div",{className:"space-y-3",children:[es.filter(o=>h.has(o)).map(o=>{const x=h.get(o),d=x.filter(b=>Q(b,s)).length,w=d===x.length;return e.jsxs("section",{"aria-label":Pe(o,r),children:[e.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[e.jsx("h4",{className:"text-meta font-semibold text-ui-ink",children:Pe(o,r)}),e.jsxs("span",{className:"text-meta text-ui-mute",children:[d," of ",x.length]}),e.jsx("button",{type:"button",className:"hit ml-auto text-meta text-ui-accent hover:underline disabled:opacity-50",disabled:a,onClick:()=>N(x.map(b=>b.key),!w),children:w?"Untick all":"Tick all"})]}),e.jsx("ul",{className:"space-y-1.5",children:x.map(y)})]},o)}),c.size>0&&e.jsxs("p",{className:"text-meta text-ui-warn",children:[c.size," ticked ",c.size===1?"item does":"items do"," not fit in one fix and will be left out. Untick something to make room."]})]})}const cs="inline-flex h-7 items-center whitespace-nowrap rounded-ui bg-ui-raise px-2.5 text-meta font-medium text-ui-ink hover:bg-ui-hover disabled:cursor-not-allowed disabled:opacity-50 touch:h-10 touch:px-3",Ce="inline-flex h-7 items-center whitespace-nowrap rounded-ui bg-ui-raise px-2.5 text-meta font-medium text-ui-ink hover:bg-ui-hover disabled:cursor-not-allowed disabled:opacity-50 touch:h-10 touch:px-3";function We(t){return{prId:t.id,repoId:t.repoId,repoFullName:t.repoFullName,prNumber:t.number,prTitle:t.title,githubUrl:t.githubUrl}}function os(t){const s=ct({mergeable:t.mergeable,mergeStateStatus:t.mergeStateStatus,isDraft:t.isDraft,inMergeQueue:t.inMergeQueue===!0}).verdict;return ot({state:t.state,verdict:s,viewerCanPush:t.viewerCanPush})}function ds({pr:t}){const s=dt(t.id),n=ut(),a=mt(s),i=t.baseRefName??"the base branch";f.useEffect(()=>{ht(t.id)},[t.id]);const l=We(t),c=(s==null?void 0:s.phase)==="succeeded"?s.resolution:null;return e.jsxs("div",{className:"mb-3 rounded-ui bg-ui-surface p-3",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-body font-medium text-ui-ink",children:[e.jsx(xt,{size:13,className:"text-ai-signal"}),"This branch conflicts with ",i]}),e.jsxs("p",{className:"mt-1 text-meta text-ui-mute",children:[n," reads the code and picks a result for each conflict. You check its choices in the resolver before anything is pushed."]}),a&&s!=null?e.jsxs("div",{className:"mt-2",children:[e.jsx(ne,{active:!0,label:`Resolving conflicts with ${n}`,timeConstantSec:60}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 text-meta text-ui-mute",children:[pt(s.phase,n),e.jsx("button",{type:"button",className:Ce,onClick:()=>ft(t.id),children:"Cancel"})]})]}):e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[e.jsx(z,{kind:"resolve",children:e.jsx("button",{type:"button",className:cs,onClick:()=>_e(l,{providerName:n}),children:c!=null?"Run again":`Resolve merge conflicts with ${n}`})}),c!=null&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:Ce,onClick:()=>gt(l),children:"Open the resolver"}),e.jsxs("span",{className:"text-meta text-ui-mute",children:[V(c)," decided ",c.choices.length," of ",c.decidableTotal," change",c.decidableTotal===1?"":"s","."]})]}),(s==null?void 0:s.phase)==="failed"&&s.error!=null&&e.jsx("span",{className:"text-meta text-ui-danger",children:s.error}),(s==null?void 0:s.phase)==="cancelled"&&e.jsx("span",{className:"text-meta text-ui-mute",children:"Cancelled."})]})]})}const te="inline-flex h-7 items-center whitespace-nowrap rounded-ui bg-ui-raise px-2.5 text-meta font-medium text-ui-ink hover:bg-ui-hover disabled:cursor-not-allowed disabled:opacity-50 touch:h-10 touch:px-3";function se(t){return t instanceof Me||t instanceof Error?t.message:"Something went wrong"}const ee="inline-flex h-7 items-center whitespace-nowrap rounded-ui bg-ui-raise px-2.5 text-meta font-medium text-ui-ink hover:bg-ui-hover disabled:cursor-not-allowed disabled:opacity-50 touch:h-10 touch:px-3";function us({children:t,info:s}){return e.jsxs("div",{className:"flex items-center gap-1.5 px-4 pb-2 pt-4 text-title text-ui-ink md:px-5",children:[e.jsx("h3",{children:t}),s]})}function ks({pr:t}){const s=Be().enabled,n=$(c=>c.aiFixTabFocus),a=$(c=>c.consumeAiFixTabFocus),[i,l]=f.useState(null);return f.useEffect(()=>{n&&n.prId===t.id&&(n.reviewId!=null&&l(n.reviewId),a())},[n,t.id,a]),s?e.jsx("div",{className:"pb-6",children:e.jsx(ms,{pr:t,handoffReviewId:i})}):e.jsx(e.Fragment,{})}function ms({pr:t,handoffReviewId:s}){var oe,de,ue,me,he,xe,pe,fe,ge,je;const{data:n,isLoading:a}=jt(t.id,!0),{data:i,isLoading:l}=bt(t.id),c=(i==null?void 0:i.review)??null,h=Gt(s,c,(i==null?void 0:i.history)??[]),N=Qt(s,h,c),j=$(F=>F.setPrDetailTab),r=Nt("fix",_t),v=Ee(r.chosen.provider),p=vt().data,k=wt(t.id),I=yt(t.id),T=Fe(t.id),D=Be(),S=kt(p,r.chosen.provider,"plan"),[E,A]=f.useState(!1),M=E&&S,P=$(F=>F.noteAiFixRun),R=Ae({mutationKey:Pt(t.id)})>0,C=((oe=n==null?void 0:n.fix)==null?void 0:oe.status)??null,y=C==="planned",o=y&&((ue=(de=n==null?void 0:n.fix)==null?void 0:de.plan)==null?void 0:ue.status)==="planning",x=C==="running"||C==="queued"||R||o,{status:d}=Rt(t.id,x),w=(d==null?void 0:d.status)??C??"idle",b=w==="running"||w==="queued",m=b&&!y,B=y&&(o||b),L=y&&(((he=(me=n==null?void 0:n.fix)==null?void 0:me.plan)==null?void 0:he.status)==="planning"||((pe=(xe=n==null?void 0:n.fix)==null?void 0:xe.plan)==null?void 0:pe.status)==="plan_ready"),u=(n==null?void 0:n.fix)??null,g=Ct(t.id,h,(n==null?void 0:n.enabled)!==!1),W=At(h!=null&&(c==null?void 0:c.id)!==h?h:null),O=h!=null&&(c==null?void 0:c.id)===h?c:W.data??null,[_,ae]=f.useState({});f.useEffect(()=>ae({}),[h]);const[Ye,K]=f.useState(!1),re=!L&&(Ye||!u||u.status!=="succeeded"),J=os(t),[le,qe]=f.useState(!1),U=g.data?ss(g.data,_):[],ce=g.data?De(g.data,_).size:0,He=()=>{if(h==null||!g.data||U.length===0)return;const F={model:r.chosen.model,provider:r.chosen.provider,seed:"review",sourceReviewId:h,include:U};M?I.mutate(F,{onSuccess:()=>K(!1)}):(P({prId:t.id,repoFullName:t.repoFullName,prNumber:t.number,prTitle:t.title}),k.mutate(F,{onSuccess:()=>K(!1)})),le&&J&&_e(We(t),{model:Ft(r.chosen.model),providerName:D.providerName})};return e.jsxs("div",{children:[e.jsx(us,{info:e.jsxs(H,{title:"AI Fix",children:[e.jsxs("p",{children:[v," reads the PR's code and edits files in a private copy. It has no shell, so it installs, builds and tests nothing."]}),e.jsx("p",{children:"A fix starts from an AI review. Pick what it should work on: the review's findings, earlier findings still open, threads the review says need a fix, unanswered threads, CI failures and ticket gaps are ticked; style bot comments are not."}),e.jsxs("p",{children:["Tick Plan first to read ",v,"'s plan, steer it and approve it before anything changes."]}),e.jsxs("p",{children:[v," reports what it changed in each file and what it left alone, and why."]}),e.jsx("p",{children:"Nothing is pushed until you press Push. An automatic fix on your own PR is pushed for you only when Push automatically is on in Settings."})]}),children:"AI Fix"}),e.jsxs("div",{className:"px-4",children:[J&&e.jsx(ds,{pr:t}),(n==null?void 0:n.enabled)===!1?e.jsx("p",{className:"text-body text-ui-mute",children:"The agentic fixer is turned off."}):e.jsxs(e.Fragment,{children:[!m&&!L&&h==null&&!l&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"text-meta text-ui-mute",children:(c==null?void 0:c.status)==="running"||(c==null?void 0:c.status)==="queued"?"A fix starts from an AI review. One is running.":"A fix starts from a finished AI review."}),e.jsx("button",{type:"button",className:te,onClick:()=>j(t.id,"claude_review"),children:"Open AI Review"})]}),!m&&!L&&h!=null&&!re&&e.jsx("button",{type:"button",className:ee,onClick:()=>K(!0),children:"New fix"}),!m&&h!=null&&re&&e.jsxs("div",{children:[N&&e.jsx("p",{className:"mb-2 text-meta text-ui-mute",children:N}),g.isLoading&&e.jsx("p",{className:"text-meta text-ui-mute",children:"Loading…"}),g.isError&&e.jsx("p",{className:"text-meta text-ui-danger",children:se(g.error)}),g.data&&e.jsx(ls,{preview:g.data,overrides:_,onChange:ae,disabled:R,pr:t,review:O}),g.data&&g.data.items.length>0&&J&&e.jsxs("label",{className:"mt-3 flex cursor-pointer items-start gap-2 text-meta text-ui-ink",children:[e.jsx(G,{className:"mt-0.5",checked:le,disabled:R,onChange:F=>qe(F.target.checked)}),e.jsxs("span",{children:["Also resolve merge conflicts with ",t.baseRefName??"the base branch",e.jsx("span",{className:"block text-meta text-ui-mute",children:"You check the merge in the resolver. It lands as its own commit, apart from the fix."})]})]}),g.data&&g.data.items.length>0&&e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2 max-md:sticky max-md:bottom-0 max-md:z-20 max-md:-mx-4 max-md:bg-ui-surface max-md:px-4 max-md:py-3",children:[e.jsx(Kt,{state:r,onPick:r.pick,disabled:R}),S&&e.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 text-meta text-ui-ink",children:[e.jsx(G,{checked:M,disabled:R,onChange:F=>A(F.target.checked)}),"Plan first"]}),e.jsx(z,{kind:"fix",auth:n==null?void 0:n.auth,anyProvider:!0,provider:r.chosen.provider,children:e.jsx("button",{type:"button",className:te,disabled:R||U.length===0,onClick:He,children:M?"Make a plan":"Start fix"})}),e.jsx("span",{className:"text-meta text-ui-mute",children:U.length===0?"Nothing ticked.":`${U.length-ce} item${U.length-ce===1?"":"s"}`}),(u==null?void 0:u.status)==="succeeded"&&e.jsx("button",{type:"button",className:ee,onClick:()=>K(!1),children:"Close"})]})]}),m&&e.jsx("button",{type:"button",className:ee,onClick:()=>T.mutate(),children:"Cancel"}),(k.isError||I.isError)&&e.jsx("p",{className:"mt-1 text-meta text-ui-danger",children:se(k.error??I.error)}),u&&y&&e.jsx(zt,{pr:t,fix:u,liveStatus:d,passRunning:B,auth:n==null?void 0:n.auth}),m&&e.jsxs("div",{className:"mt-3",children:[u&&e.jsx($e,{fix:u}),e.jsx(ne,{active:!0,label:"Running AI fix",value:Te(d),timeConstantSec:40}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 text-meta text-ui-mute",children:[(u==null?void 0:u.trigger)==="auto"&&e.jsx(Ke,{}),Se[((fe=d==null?void 0:d.progress)==null?void 0:fe.phase)??""]??"Working…"]}),((ge=d==null?void 0:d.progress)==null?void 0:ge.recentActivity)&&d.progress.recentActivity.length>0&&e.jsx("pre",{className:"mt-1 max-h-32 overflow-auto rounded-ui bg-ui-surface p-2 text-meta leading-relaxed text-ui-mute",children:d.progress.recentActivity.slice(-8).join(`
3
3
  `)})]}),!m&&u&&!y&&e.jsx(xs,{pr:t,fix:u,headInfo:(n==null?void 0:n.headInfo)??null,viewerCanPush:(n==null?void 0:n.viewerCanPush)??!1}),a&&!u&&e.jsx("p",{className:"mt-3 text-meta text-ui-mute",children:"Loading…"})]}),e.jsx(fs,{history:(n==null?void 0:n.history)??[],currentFixId:((je=n==null?void 0:n.fix)==null?void 0:je.id)??null})]})]})}function Ke(){return e.jsx("span",{className:"inline-flex items-center rounded-ui bg-ui-raise px-1.5 py-px text-meta font-medium text-ui-mute",children:"Auto fix"})}function hs(t){return Ie(t.provider,t.model,t.effort)}function xs({pr:t,fix:s,headInfo:n,viewerCanPush:a}){var c,h;const i=f.useMemo(()=>It(s.patch),[s.patch]);if(s.status==="failed"&&((c=s.plan)==null?void 0:c.status)==="failed")return e.jsxs("div",{className:"mt-3 rounded-ui border border-ui-danger/40 bg-ui-danger/10 p-2 text-meta text-ui-danger",children:[V(s.plan??s)," could not make a plan: ",s.error??"unknown error"]});if(s.status==="cancelled"&&((h=s.plan)==null?void 0:h.status)==="discarded")return e.jsx("p",{className:"mt-3 text-meta text-ui-mute",children:"The plan was discarded."});if(s.status==="failed")return e.jsxs("div",{className:"mt-3 rounded-ui border border-ui-danger/40 bg-ui-danger/10 p-2 text-meta text-ui-danger",children:["The fix run failed: ",s.error??"unknown error"]});if(s.status==="cancelled")return e.jsx("p",{className:"mt-3 text-meta text-ui-mute",children:"The fix run was cancelled."});if(s.status!=="succeeded")return e.jsx(e.Fragment,{});const l=!s.patch||s.filesChanged.length===0;return e.jsxs("div",{className:"mt-3 border-t border-ui-line pt-3",children:[e.jsxs("p",{className:"mb-1 text-meta text-ui-mute",children:[s.trigger==="auto"&&e.jsxs(e.Fragment,{children:[e.jsx(Ke,{})," "]}),Xt(s)," · ",hs(s),s.finishedAt&&e.jsxs(e.Fragment,{children:[" · ",ie(s.finishedAt)]})]}),s.pushedAt==null&&s.error&&e.jsx("p",{className:"mb-2 rounded-ui bg-ui-raise p-2 text-meta text-ui-warn",children:s.error}),e.jsx($e,{fix:s}),s.summary&&e.jsx("div",{className:"prose prose-sm max-w-none dark:prose-invert",children:e.jsx(Tt,{children:s.summary})}),e.jsx(Zt,{pr:t,fix:s}),l?e.jsx("p",{className:"mt-2 text-meta text-ui-mute",children:"No files changed."}):e.jsxs(e.Fragment,{children:[e.jsxs("div",{className:"mb-1 mt-2 flex items-center justify-between gap-3 text-meta text-ui-mute",children:[e.jsxs("span",{children:[s.filesChanged.length," file",s.filesChanged.length===1?"":"s"," changed · Not built or tested here."]}),e.jsx(St,{})]}),e.jsx("div",{className:"overflow-hidden rounded-ui bg-ui-surface text-ui-ink",children:e.jsx(Et,{files:i})}),e.jsx(gs,{pr:t,fix:s,headInfo:n,viewerCanPush:a})]})]})}function ps({fix:t}){return e.jsxs("div",{className:"mb-2 rounded-ui bg-ui-raise p-2 text-meta text-ui-success",children:[e.jsxs("div",{children:["Pushed to ",e.jsx("span",{className:"font-mono",children:t.pushedBranch}),t.pushedPrUrl&&e.jsxs(e.Fragment,{children:[" · ",e.jsxs("a",{href:Le(t.pushedPrUrl),target:"_blank",rel:"noreferrer",className:"hit underline",children:["PR #",t.pushedPrNumber]})]}),t.pushedAt&&e.jsxs(e.Fragment,{children:[" · ",ie(t.pushedAt)]})]}),t.commitMessage&&e.jsx("div",{className:"mt-1 font-mono text-meta text-ui-success",children:t.commitMessage})]})}function fs({history:t,currentFixId:s}){const n=t.filter(a=>a.pushedAt!=null&&a.id!==s);return n.length===0?null:e.jsxs("div",{className:"mt-6",children:[e.jsx("div",{className:"mb-2 text-title text-ui-ink",children:"Earlier fixes pushed"}),e.jsx("ul",{className:"space-y-2",children:n.map(a=>e.jsxs("li",{className:"text-meta",children:[e.jsx("div",{className:"font-mono text-ui-ink",children:a.commitMessage??"(no commit message)"}),e.jsxs("div",{className:"mt-0.5 text-meta text-ui-faint",children:[a.pushedBranch&&e.jsx("span",{className:"font-mono",children:a.pushedBranch}),a.pushedPrUrl&&e.jsxs(e.Fragment,{children:[" · ",e.jsxs("a",{href:Le(a.pushedPrUrl),target:"_blank",rel:"noreferrer",className:"hit underline",children:["PR #",a.pushedPrNumber]})]}),a.pushedAt&&e.jsxs(e.Fragment,{children:[" · ",ie(a.pushedAt)]})]})]},a.id))})]})}function gs({pr:t,fix:s,headInfo:n,viewerCanPush:a}){const i=Mt(t.id),l=(n==null?void 0:n.canPushSameBranch)??!1,[c,h]=f.useState(l?"existing":"new"),[N,j]=f.useState((n==null?void 0:n.suggestedBranch)??""),r=f.useRef(!1);if(f.useEffect(()=>{!r.current&&(n!=null&&n.suggestedBranch)&&(j(n.suggestedBranch),r.current=!0,n.canPushSameBranch||h("new"))},[n]),s.pushedAt!=null)return e.jsx(ps,{fix:s});if(!a)return e.jsx("p",{className:"mt-2 text-meta text-ui-mute",children:"You need write access to push this fix."});const v=c==="new"&&N.trim().length===0,p=i.isPending,k=()=>{i.mutate({fixId:s.id,body:{target:c,branch:c==="new"?N.trim():void 0}})};return e.jsxs("div",{className:"mt-3 rounded-ui bg-ui-surface p-2",children:[s.commitMessage&&e.jsx("div",{className:"mb-2 rounded-ui bg-ui-surface px-2 py-1 font-mono text-meta text-ui-ink",title:"Commit message",children:s.commitMessage}),e.jsxs("label",{className:`flex items-center gap-2 text-meta ${l?"":"opacity-40"}`,title:l?void 0:"The PR head is a fork you cannot push to — use a new branch",children:[e.jsx(ve,{className:"mt-0",checked:c==="existing",disabled:!l||p,onChange:()=>h("existing")}),"Push to the PR branch",(n==null?void 0:n.headRef)&&e.jsxs("span",{className:"font-mono text-ui-faint",children:["(",n.headRef,")"]})]}),e.jsxs("label",{className:"mt-1 flex items-center gap-2 text-meta",children:[e.jsx(ve,{className:"mt-0",checked:c==="new",disabled:p,onChange:()=>h("new")}),"New branch + open a PR"]}),c==="new"&&e.jsx("input",{type:"text",className:"mt-1 w-full rounded-ui bg-ui-raise px-2 py-1 font-mono text-meta ring-1 ring-inset ring-ui-line focus:outline-none focus:ring-2 focus:ring-ui-accent touch:min-h-10",value:N,disabled:p,onChange:I=>j(I.target.value),placeholder:"branch-name"}),e.jsx("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:e.jsx("button",{type:"button",className:te,disabled:p||v,onClick:k,children:p?"Pushing…":c==="new"?"Push + open PR":"Push"})}),i.isError&&e.jsx("div",{className:"mt-2 text-meta text-ui-danger",children:se(i.error)})]})}export{ks as AiFixTab};
@@ -1,4 +1,4 @@
1
- import{j as e,r as f,d as At,k as Bs}from"./tanstack-BnbsafB1.js";import{bD as ss,bp as Je,aQ as Ze,aL as et,aM as tt,V as ns,aF as is,c as Ce,aH as Oe,aD as De,aj as lt,bJ as as,c8 as rt,bw as Hs,bZ as Os,bY as Ds,ae as Z,q as ge,O as ae,a3 as ue,bh as Us,bM as ie,aJ as ls,b0 as Gs,a$ as Ws,m as Vs,ao as Tt,l as zs,bX as Ks,ap as qs,B as Ys,J as Se,a7 as q,a0 as se,b_ as Qs,x as Xs,cJ as Js,h as Zs,g as rs,e as le,Y as en,cn as tn,bW as sn,bV as nn,a5 as ot,c4 as de,ce as os,cO as an,cg as ln,ch as rn,cf as on,aZ as _e,a_ as cn,aW as un,aa as ct,aX as dn,j as mn,aY as hn,a6 as X,Q as ce,aV as xn,af as Ue,f as cs,C as pn,n as Re,ay as ut,cF as fn,cI as gn,cB as bn,ai as dt,cG as jn,cv as yn,Z as vn,bB as Y,bC as Ge,v as kn,bP as Nn,at as Lt,bv as wn,cW as mt,cS as Cn,cU as Rn,cV as $n,cT as Sn,b$ as In,bo as Pn,b3 as En,bj as us,bU as ds,P as _n,ar as An,aq as Tn,z as Ln,bA as Fn,am as ms,c1 as Mn,as as Bn,au as Hn,cR as hs,u as On,by as xs,c0 as Dn,bT as Un,aU as Gn,c2 as Wn,c$ as Vn,t as zn,bi as Kn,cy as qn,an as Yn,y as Qn,S as Xn,U as Jn,H as Zn,$ as ei,b4 as ti,bR as si,bm as ni,ci as ii,cL as ai,ct as li,cl as ri,cc as oi,cZ as ci,cY as ui,cC as di,cA as mi,b8 as hi,cm as xi,cN as ps,cj as pi,aG as fs,a1 as fi,b5 as Ke,K as qe,d as gi,aK as Ft,bg as bi,bt as ji,i as $e,a9 as gs,az as yi,aN as Mt,R as bs,bd as vi,d2 as ki,bl as Ni,bx as wi,bO as Ci,bF as Ri,aI as $i,bc as Si,bN as Ii,cd as Pi,br as Ei,bI as _i,L as Ai,s as Ti,o as Li,bS as Fi,I as Mi,r as Bi,ab as Hi,b7 as Oi,a4 as st,ah as Di,k as Ui,b9 as Gi,a2 as Bt,b as Ye,bz as Ht,bE as Wi,aO as Ot,G as Vi,ak as zi,bH as Ki,ck as qi,bK as Yi,ad as Qi,bL as Xi,cD as Ji,ag as Zi,_ as ea,c3 as ta,cK as sa,c_ as na,cM as ia,aP as aa,d1 as la,bs as ra,aw as oa,av as ca,ax as ua,cu as da,bf as Dt,be as ma,bk as ha,d3 as js,aS as xa,cr as pa,al as fa,X as ga,E as ba}from"./index-B9TtX9l5.js";const ja="https://sonarcloud.io",ya={blocker:"Blocker",critical:"Critical",major:"Major",minor:"Minor",info:"Info"},va={new_coverage:"Coverage on new code",coverage:"Coverage",new_line_coverage:"Line coverage on new code",line_coverage:"Line coverage",new_branch_coverage:"Branch coverage on new code",branch_coverage:"Branch coverage",new_uncovered_lines:"Uncovered new lines",uncovered_lines:"Uncovered lines",new_lines_to_cover:"New lines to cover",new_duplicated_lines_density:"Duplicated lines on new code",duplicated_lines_density:"Duplicated lines",new_duplicated_lines:"Duplicated new lines",duplicated_lines:"Duplicated lines",new_lines:"New lines",new_reliability_rating:"Reliability rating on new code",new_security_rating:"Security rating on new code",new_maintainability_rating:"Maintainability rating on new code",new_security_review_rating:"Security review rating on new code",new_security_hotspots_reviewed:"Security hotspots reviewed",new_violations:"Issues on new code",new_bugs:"Bugs on new code",new_vulnerabilities:"Vulnerabilities on new code",new_code_smells:"Code smells on new code"};function ht(t){return va[t]??t.replace(/^new_/,"").replace(/_/g," ").replace(/^./,s=>s.toUpperCase())}const ys=t=>/_rating$/.test(t),ka=t=>/(coverage|density|hotspots_reviewed)$/.test(t);function nt(t,s){const n=Number(s);return Number.isFinite(n)?ys(t)?"ABCDE"[Math.round(n)-1]??s:ka(t)?`${Math.round(n*10)/10}%`:String(n):s}function Na(t){const s=ht(t.metric),n=t.actual!=null?nt(t.metric,t.actual):null,a=t.threshold!=null?nt(t.metric,t.threshold):null,o=n!=null?`${s} is ${n}.`:`${s} fails.`;if(a==null)return o;const l=ys(t.metric)?`${a} or better`:t.comparator==="LT"?`at least ${a}`:t.comparator==="GT"?`at most ${a}`:a;return`${o} The quality gate needs ${l}.`}function wa(t){return((t==null?void 0:t.conditions)??[]).filter(s=>s.status==="ERROR"||s.status==="WARN")}const vs=t=>/coverage|uncovered_lines|lines_to_cover/.test(t),Ca=t=>/duplicat/.test(t);function Ra(t){return vs(t)||Ca(t)}function $a(t,s){return wa(t).filter(n=>Ra(n.metric)).map(n=>{const a=vs(n.metric),o=n.files??[],l=o.length>0?`
1
+ import{j as e,r as f,d as At,k as Bs}from"./tanstack-BnbsafB1.js";import{bD as ss,bp as Je,aQ as Ze,aL as et,aM as tt,V as ns,aF as is,c as Ce,aH as Oe,aD as De,aj as lt,bJ as as,c8 as rt,bw as Hs,bZ as Os,bY as Ds,ae as Z,q as ge,O as ae,a3 as ue,bh as Us,bM as ie,aJ as ls,b0 as Gs,a$ as Ws,m as Vs,ao as Tt,l as zs,bX as Ks,ap as qs,B as Ys,J as Se,a7 as q,a0 as se,b_ as Qs,x as Xs,cJ as Js,h as Zs,g as rs,e as le,Y as en,cn as tn,bW as sn,bV as nn,a5 as ot,c4 as de,ce as os,cO as an,cg as ln,ch as rn,cf as on,aZ as _e,a_ as cn,aW as un,aa as ct,aX as dn,j as mn,aY as hn,a6 as X,Q as ce,aV as xn,af as Ue,f as cs,C as pn,n as Re,ay as ut,cF as fn,cI as gn,cB as bn,ai as dt,cG as jn,cv as yn,Z as vn,bB as Y,bC as Ge,v as kn,bP as Nn,at as Lt,bv as wn,cW as mt,cS as Cn,cU as Rn,cV as $n,cT as Sn,b$ as In,bo as Pn,b3 as En,bj as us,bU as ds,P as _n,ar as An,aq as Tn,z as Ln,bA as Fn,am as ms,c1 as Mn,as as Bn,au as Hn,cR as hs,u as On,by as xs,c0 as Dn,bT as Un,aU as Gn,c2 as Wn,c$ as Vn,t as zn,bi as Kn,cy as qn,an as Yn,y as Qn,S as Xn,U as Jn,H as Zn,$ as ei,b4 as ti,bR as si,bm as ni,ci as ii,cL as ai,ct as li,cl as ri,cc as oi,cZ as ci,cY as ui,cC as di,cA as mi,b8 as hi,cm as xi,cN as ps,cj as pi,aG as fs,a1 as fi,b5 as Ke,K as qe,d as gi,aK as Ft,bg as bi,bt as ji,i as $e,a9 as gs,az as yi,aN as Mt,R as bs,bd as vi,d2 as ki,bl as Ni,bx as wi,bO as Ci,bF as Ri,aI as $i,bc as Si,bN as Ii,cd as Pi,br as Ei,bI as _i,L as Ai,s as Ti,o as Li,bS as Fi,I as Mi,r as Bi,ab as Hi,b7 as Oi,a4 as st,ah as Di,k as Ui,b9 as Gi,a2 as Bt,b as Ye,bz as Ht,bE as Wi,aO as Ot,G as Vi,ak as zi,bH as Ki,ck as qi,bK as Yi,ad as Qi,bL as Xi,cD as Ji,ag as Zi,_ as ea,c3 as ta,cK as sa,c_ as na,cM as ia,aP as aa,d1 as la,bs as ra,aw as oa,av as ca,ax as ua,cu as da,bf as Dt,be as ma,bk as ha,d3 as js,aS as xa,cr as pa,al as fa,X as ga,E as ba}from"./index-DZWulOIE.js";const ja="https://sonarcloud.io",ya={blocker:"Blocker",critical:"Critical",major:"Major",minor:"Minor",info:"Info"},va={new_coverage:"Coverage on new code",coverage:"Coverage",new_line_coverage:"Line coverage on new code",line_coverage:"Line coverage",new_branch_coverage:"Branch coverage on new code",branch_coverage:"Branch coverage",new_uncovered_lines:"Uncovered new lines",uncovered_lines:"Uncovered lines",new_lines_to_cover:"New lines to cover",new_duplicated_lines_density:"Duplicated lines on new code",duplicated_lines_density:"Duplicated lines",new_duplicated_lines:"Duplicated new lines",duplicated_lines:"Duplicated lines",new_lines:"New lines",new_reliability_rating:"Reliability rating on new code",new_security_rating:"Security rating on new code",new_maintainability_rating:"Maintainability rating on new code",new_security_review_rating:"Security review rating on new code",new_security_hotspots_reviewed:"Security hotspots reviewed",new_violations:"Issues on new code",new_bugs:"Bugs on new code",new_vulnerabilities:"Vulnerabilities on new code",new_code_smells:"Code smells on new code"};function ht(t){return va[t]??t.replace(/^new_/,"").replace(/_/g," ").replace(/^./,s=>s.toUpperCase())}const ys=t=>/_rating$/.test(t),ka=t=>/(coverage|density|hotspots_reviewed)$/.test(t);function nt(t,s){const n=Number(s);return Number.isFinite(n)?ys(t)?"ABCDE"[Math.round(n)-1]??s:ka(t)?`${Math.round(n*10)/10}%`:String(n):s}function Na(t){const s=ht(t.metric),n=t.actual!=null?nt(t.metric,t.actual):null,a=t.threshold!=null?nt(t.metric,t.threshold):null,o=n!=null?`${s} is ${n}.`:`${s} fails.`;if(a==null)return o;const l=ys(t.metric)?`${a} or better`:t.comparator==="LT"?`at least ${a}`:t.comparator==="GT"?`at most ${a}`:a;return`${o} The quality gate needs ${l}.`}function wa(t){return((t==null?void 0:t.conditions)??[]).filter(s=>s.status==="ERROR"||s.status==="WARN")}const vs=t=>/coverage|uncovered_lines|lines_to_cover/.test(t),Ca=t=>/duplicat/.test(t);function Ra(t){return vs(t)||Ca(t)}function $a(t,s){return wa(t).filter(n=>Ra(n.metric)).map(n=>{const a=vs(n.metric),o=n.files??[],l=o.length>0?`
2
2
 
3
3
  Files with the most ${a?"uncovered":"duplicated"} new lines:
4
4
  ${o.map(i=>`- ${i.path}: ${i.lines} ${i.lines===1?"line":"lines"}`).join(`
@@ -1 +1 @@
1
- import{r as w,j as s}from"./tanstack-BnbsafB1.js";import{cE as j,cK as y,ca as N,O as b,aR as g,d0 as k,bD as v,ay as f,ac as C,w as T,b6 as x,bb as $}from"./index-B9TtX9l5.js";import"./markdown-CcoLFczy.js";import"./highlight-DIEV0qGG.js";import"./vis-C3BCkP5U.js";function h(e){return e==null?"—":$(e)}function B(e){const t=[];for(const i of e){const a=v(i.at),n=t[t.length-1];if(n&&n.label===a){n.to=i.at,n.count+=1,i.kind==="review"?n.reviews+=1:n.comments+=1;continue}t.push({from:i.at,to:i.at,label:a,count:1,reviews:i.kind==="review"?1:0,comments:i.kind==="review"?0:1})}return t}function I(e){const t=[];return e.reviews>0&&t.push(`${e.reviews} review${e.reviews===1?"":"s"}`),e.comments>0&&t.push(`${e.comments} comment${e.comments===1?"":"s"}`),t.join(", ")}const P=40;function d({label:e,value:t,tone:i}){return s.jsxs("div",{children:[s.jsx("div",{className:"text-meta font-semibold text-ui-mute",children:e}),s.jsx("div",{className:`text-body font-semibold ${i==="warn"?"text-ui-danger":"text-ui-ink"}`,children:t})]})}function R({bot:e,color:t}){const i=g(e.kind),a=e.ttfrAnomaly,n=e.typicalTtfrHours==null,c=e.typicalFollowups!=null&&e.followupCount>=e.typicalFollowups+2,u=B(e.touches),r=u.slice(0,P),l=e.touches.length-r.reduce((o,p)=>o+p.count,0),m=n?"building baseline":a?`slower than typical — usually ${h(e.typicalTtfrHours)}`:`within typical (${h(e.typicalTtfrHours)})`;return s.jsxs("div",{className:"space-y-2 rounded-ui border border-ui-line p-3",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-body font-semibold text-ui-ink",children:[s.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full",style:{background:t},"aria-hidden":!0}),e.label]}),s.jsx("span",{className:"rounded-ui px-1.5 py-0.5 text-meta font-medium",style:{...k(i.color),background:`${i.color}1a`},children:i.label}),e.firstTouchAt&&s.jsxs("span",{className:"text-meta text-ui-mute",children:["first touch ",v(e.firstTouchAt)]}),a&&s.jsxs("span",{className:"rounded-ui bg-ui-danger/10 px-1.5 py-0.5 text-meta font-semibold text-ui-danger",children:[s.jsx(f,{size:11,className:"inline-block align-[-0.1em]"})," slower than usual"]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:[s.jsx(d,{label:"Time to first review",value:h(e.ttfrHours),tone:a?"warn":"default"}),s.jsx(d,{label:"Follow-ups",value:String(e.followupCount),tone:c?"warn":"default"}),s.jsx(d,{label:"Comments",value:String(e.commentCount)}),s.jsx(d,{label:"Touches",value:String(e.touchCount)})]}),s.jsxs("div",{className:"text-meta text-ui-mute",children:[s.jsxs("span",{className:a?"font-medium text-ui-danger":"",children:[!n&&a&&s.jsx(f,{size:11,className:"mr-1 inline-block align-[-0.1em]"}),m]}),e.ttfrBasis&&!n&&s.jsxs("span",{children:[" · from ",e.ttfrBasis==="ready"?"ready-for-review":"opened"]}),e.typicalFollowups!=null&&s.jsxs("span",{children:[" · ",e.followupCount," follow-up",e.followupCount===1?"":"s"," vs ",e.typicalFollowups," typical",c?" (more than usual)":""]}),!n&&s.jsxs("span",{children:[" · baseline: ",e.baselinePrs," PRs"]})]}),u.length>0&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[r.map((o,p)=>s.jsxs("span",{className:"inline-flex items-center gap-1 rounded-ui bg-ui-raise px-1.5 py-0.5 text-meta text-ui-mute",title:`${o.count>1?`${I(o)} · `:""}${o.from===o.to?x(o.from):`${x(o.from)} – ${x(o.to)}`}`,children:[o.reviews>0&&s.jsx(C,{size:11}),o.comments>0&&s.jsx(T,{size:11}),o.count>1&&s.jsxs("span",{className:"font-medium",children:["×",o.count]}),o.label]},p)),l>0&&s.jsxs("span",{className:"text-meta text-ui-mute",children:["+",l," more touches"]})]})]})}function S({pr:e}){const{data:t,isLoading:i,isError:a}=j(e.id,!0),{data:n}=y(),c=w.useMemo(()=>{var l;return((l=(n??[]).find(m=>m.id===e.repoId))==null?void 0:l.workspaceId)??null},[n,e.repoId]),u=N(c),r=(t==null?void 0:t.bots)??[];return s.jsxs("div",{className:"space-y-3 p-4",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs(b,{title:"Bot activity",children:[s.jsx("p",{children:"How each review bot behaved on this pull request, compared with its own usual over the last 84 days. No AI is involved."}),s.jsx("p",{children:"A touch is one review or one comment, so a review submitted with three inline comments counts as four."})]}),s.jsx("span",{className:"text-meta text-ui-mute",children:"Each bot against its own usual"})]}),i?s.jsx("div",{className:"h-24 animate-pulse rounded-ui bg-ui-surface"}):a?s.jsx("div",{className:"text-body text-ui-danger",children:"Couldn’t load bot behaviour for this PR."}):r.length===0?s.jsx("div",{className:"rounded-ui border border-dashed border-ui-line p-6 text-center text-body text-ui-mute",children:"No automated-reviewer activity on this PR."}):r.map(l=>s.jsx(R,{bot:l,color:u({login:l.login,kind:l.kind})},l.key))]})}export{S as PrBotBehaviourTab};
1
+ import{r as w,j as s}from"./tanstack-BnbsafB1.js";import{cE as j,cK as y,ca as N,O as b,aR as g,d0 as k,bD as v,ay as f,ac as C,w as T,b6 as x,bb as $}from"./index-DZWulOIE.js";import"./markdown-CcoLFczy.js";import"./highlight-DIEV0qGG.js";import"./vis-C3BCkP5U.js";function h(e){return e==null?"—":$(e)}function B(e){const t=[];for(const i of e){const a=v(i.at),n=t[t.length-1];if(n&&n.label===a){n.to=i.at,n.count+=1,i.kind==="review"?n.reviews+=1:n.comments+=1;continue}t.push({from:i.at,to:i.at,label:a,count:1,reviews:i.kind==="review"?1:0,comments:i.kind==="review"?0:1})}return t}function I(e){const t=[];return e.reviews>0&&t.push(`${e.reviews} review${e.reviews===1?"":"s"}`),e.comments>0&&t.push(`${e.comments} comment${e.comments===1?"":"s"}`),t.join(", ")}const P=40;function d({label:e,value:t,tone:i}){return s.jsxs("div",{children:[s.jsx("div",{className:"text-meta font-semibold text-ui-mute",children:e}),s.jsx("div",{className:`text-body font-semibold ${i==="warn"?"text-ui-danger":"text-ui-ink"}`,children:t})]})}function R({bot:e,color:t}){const i=g(e.kind),a=e.ttfrAnomaly,n=e.typicalTtfrHours==null,c=e.typicalFollowups!=null&&e.followupCount>=e.typicalFollowups+2,u=B(e.touches),r=u.slice(0,P),l=e.touches.length-r.reduce((o,p)=>o+p.count,0),m=n?"building baseline":a?`slower than typical — usually ${h(e.typicalTtfrHours)}`:`within typical (${h(e.typicalTtfrHours)})`;return s.jsxs("div",{className:"space-y-2 rounded-ui border border-ui-line p-3",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs("span",{className:"inline-flex items-center gap-1.5 text-body font-semibold text-ui-ink",children:[s.jsx("span",{className:"inline-block h-2.5 w-2.5 rounded-full",style:{background:t},"aria-hidden":!0}),e.label]}),s.jsx("span",{className:"rounded-ui px-1.5 py-0.5 text-meta font-medium",style:{...k(i.color),background:`${i.color}1a`},children:i.label}),e.firstTouchAt&&s.jsxs("span",{className:"text-meta text-ui-mute",children:["first touch ",v(e.firstTouchAt)]}),a&&s.jsxs("span",{className:"rounded-ui bg-ui-danger/10 px-1.5 py-0.5 text-meta font-semibold text-ui-danger",children:[s.jsx(f,{size:11,className:"inline-block align-[-0.1em]"})," slower than usual"]})]}),s.jsxs("div",{className:"grid grid-cols-2 gap-2 sm:grid-cols-4",children:[s.jsx(d,{label:"Time to first review",value:h(e.ttfrHours),tone:a?"warn":"default"}),s.jsx(d,{label:"Follow-ups",value:String(e.followupCount),tone:c?"warn":"default"}),s.jsx(d,{label:"Comments",value:String(e.commentCount)}),s.jsx(d,{label:"Touches",value:String(e.touchCount)})]}),s.jsxs("div",{className:"text-meta text-ui-mute",children:[s.jsxs("span",{className:a?"font-medium text-ui-danger":"",children:[!n&&a&&s.jsx(f,{size:11,className:"mr-1 inline-block align-[-0.1em]"}),m]}),e.ttfrBasis&&!n&&s.jsxs("span",{children:[" · from ",e.ttfrBasis==="ready"?"ready-for-review":"opened"]}),e.typicalFollowups!=null&&s.jsxs("span",{children:[" · ",e.followupCount," follow-up",e.followupCount===1?"":"s"," vs ",e.typicalFollowups," typical",c?" (more than usual)":""]}),!n&&s.jsxs("span",{children:[" · baseline: ",e.baselinePrs," PRs"]})]}),u.length>0&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[r.map((o,p)=>s.jsxs("span",{className:"inline-flex items-center gap-1 rounded-ui bg-ui-raise px-1.5 py-0.5 text-meta text-ui-mute",title:`${o.count>1?`${I(o)} · `:""}${o.from===o.to?x(o.from):`${x(o.from)} – ${x(o.to)}`}`,children:[o.reviews>0&&s.jsx(C,{size:11}),o.comments>0&&s.jsx(T,{size:11}),o.count>1&&s.jsxs("span",{className:"font-medium",children:["×",o.count]}),o.label]},p)),l>0&&s.jsxs("span",{className:"text-meta text-ui-mute",children:["+",l," more touches"]})]})]})}function S({pr:e}){const{data:t,isLoading:i,isError:a}=j(e.id,!0),{data:n}=y(),c=w.useMemo(()=>{var l;return((l=(n??[]).find(m=>m.id===e.repoId))==null?void 0:l.workspaceId)??null},[n,e.repoId]),u=N(c),r=(t==null?void 0:t.bots)??[];return s.jsxs("div",{className:"space-y-3 p-4",children:[s.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[s.jsxs(b,{title:"Bot activity",children:[s.jsx("p",{children:"How each review bot behaved on this pull request, compared with its own usual over the last 84 days. No AI is involved."}),s.jsx("p",{children:"A touch is one review or one comment, so a review submitted with three inline comments counts as four."})]}),s.jsx("span",{className:"text-meta text-ui-mute",children:"Each bot against its own usual"})]}),i?s.jsx("div",{className:"h-24 animate-pulse rounded-ui bg-ui-surface"}):a?s.jsx("div",{className:"text-body text-ui-danger",children:"Couldn’t load bot behaviour for this PR."}):r.length===0?s.jsx("div",{className:"rounded-ui border border-dashed border-ui-line p-6 text-center text-body text-ui-mute",children:"No automated-reviewer activity on this PR."}):r.map(l=>s.jsx(R,{bot:l,color:u({login:l.login,kind:l.kind})},l.key))]})}export{S as PrBotBehaviourTab};