limn-review 0.1.130 → 0.1.131

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.130",
3
+ "version": "0.1.131",
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 ke,r as g,j as e}from"./tanstack-BnbsafB1.js";import{c4 as Be,bL as Le,b_ as Ue,bN as Ne,as as De,b$ as D,A as ge,M as Y,q as Oe,a4 as Q,aU as we,T as ve,e as Z,g as Ce,a as $e,cu as Ke,bj as We,au as Ye,cn as He,co as qe,R as Ve,y as ze,L as Je,b6 as Ge,bZ as Xe,bY as Qe,aP as Ze,bk as et,ae as tt,aO as st,aE as rt,bt as Re,b7 as at,bH as nt,bI as it,bT as lt,D as dt,cg as ct,ch as ot,at as ut,bK as xt,bJ as ht,bU as gt,k as mt,l as pt,b8 as bt,bh as ee,O as ft,F as yt,K as jt,bp as Pe,cc as kt}from"./index-jmnLc1R-.js";import{S as Nt,C as wt,T as vt,F as Ct}from"./ClaudeReviewTab-D2GE3Lpe.js";import"./markdown-CcoLFczy.js";import"./highlight-DIEV0qGG.js";import"./vis-C3BCkP5U.js";const Rt="whitespace-nowrap rounded border border-blue-400 px-2.5 py-1 text-xs text-blue-600 hover:bg-blue-50 disabled:opacity-50 dark:border-blue-600 dark:text-blue-400 dark:hover:bg-blue-900/30",V="whitespace-nowrap rounded border border-gray-300 px-2.5 py-1 text-xs hover:border-gray-400 disabled:opacity-50 dark:border-gray-700 dark:hover:border-gray-500",me="inline-flex items-center rounded bg-gray-500/10 px-1.5 py-px font-mono text-[11px] text-gray-700 dark:text-gray-200";function Pt(t){return t instanceof Ce||t instanceof Error?t.message:"Something went wrong"}function Ae({plan:t}){return e.jsx("ul",{className:"list-disc space-y-0.5 pl-5 text-[13px] text-gray-800 dark:text-gray-100",children:t.summary.map((r,s)=>e.jsx("li",{children:r},s))})}function pe(t,r){var s;return((s=t==null?void 0:t.find(a=>a.ref===r))==null?void 0:s.title)??null}function At({plan:t,items:r}){return e.jsxs("div",{className:"mt-2 space-y-3 text-xs text-gray-700 dark:text-gray-200",children:[t.steps.length>0&&e.jsx("ol",{className:"list-decimal space-y-2 pl-5",children:t.steps.map((s,a)=>e.jsxs("li",{children:[e.jsx("div",{className:"font-medium text-gray-800 dark:text-gray-100",children:s.title}),s.files.length>0&&e.jsx("div",{className:"mt-0.5 font-mono text-[11px] text-gray-600 dark:text-gray-300",children:s.files.join(", ")}),e.jsx("p",{className:"mt-0.5 whitespace-pre-wrap",children:s.change}),s.refs.length>0&&e.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:s.refs.map(i=>e.jsx("span",{className:me,children:i},i))})]},a))}),t.notAddressed.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"mb-1 font-semibold text-gray-600 dark:text-gray-300",children:"Will not fix"}),e.jsx("ul",{className:"space-y-1",children:t.notAddressed.map(s=>e.jsxs("li",{children:[e.jsx("span",{className:me,children:s.ref})," ",pe(r,s.ref)&&e.jsxs("span",{className:"font-medium",children:[pe(r,s.ref),": "]}),s.reason]},s.ref))})]}),t.notCovered.length>0&&e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold text-gray-600 dark:text-gray-300",children:"Not in the plan: "}),t.notCovered.join(", ")]})]})}function Ft({pr:t,fix:r,liveStatus:s,passRunning:a,auth:i}){var n,h;const d=r.plan,c=Be(t.id),x=Le(t.id),k=Ue(t.id),l=Ne(t.id),o=ke({mutationKey:De(t.id)})>0,E=D(u=>u.noteAiFixRun),[N,A]=g.useState(""),[F,I]=g.useState(!1);if(!d)return null;const w=d.plan,S=d.status==="plan_ready"&&!a,v=N.trim(),R=v.length>ge,P=()=>{!S||o||v===""||R||c.mutate({fixId:r.id,text:v},{onSuccess:()=>A("")})},_=()=>{E({prId:t.id,repoFullName:t.repoFullName,prNumber:t.number,prTitle:t.title}),x.mutate(r.id)},M=c.error??x.error??k.error;return e.jsxs("div",{className:"mt-3 rounded border border-gray-200 p-3 dark:border-gray-800",children:[e.jsxs("div",{className:"mb-1 flex items-center gap-1 text-xs font-semibold text-gray-700 dark:text-gray-200",children:["Plan",w&&d.revision>1&&e.jsxs("span",{className:"font-normal text-gray-500 dark:text-gray-400",children:["· version ",d.revision]}),e.jsxs(Y,{title:"Plan first",children:[e.jsx("p",{children:"Claude reads the code and writes a plan. It changes nothing."}),e.jsx("p",{children:"Tell Claude what to change and it rewrites the plan, taking the whole conversation into account. Each message runs Claude again."}),e.jsx("p",{children:"When you approve, Claude builds the fix from this plan. You still review the diff and press Push."})]})]}),w?e.jsxs(e.Fragment,{children:[e.jsx(Ae,{plan:w}),e.jsxs("button",{type:"button",className:"mt-2 inline-flex items-center gap-1 text-xs text-gray-600 hover:text-gray-800 dark:text-gray-300 dark:hover:text-gray-100","aria-expanded":F,onClick:()=>I(u=>!u),children:[e.jsx(Oe,{dir:F?"down":"right"}),"Details"]}),F&&e.jsx(At,{plan:w,items:r.reviewItems})]}):!a&&e.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-300",children:"No plan yet."}),r.error&&e.jsx("p",{className:"mt-2 rounded border border-amber-200 bg-amber-50 p-2 text-xs text-amber-800 dark:border-amber-800 dark:bg-amber-950/30 dark:text-amber-200",children:r.error}),d.transcript.length>0&&e.jsx("ul",{className:"mt-3 space-y-1.5 border-t border-gray-200 pt-2 text-xs dark:border-gray-800",children:d.transcript.map((u,p)=>e.jsxs("li",{className:"whitespace-pre-wrap text-gray-700 dark:text-gray-200",children:[e.jsxs("span",{className:"font-semibold",children:[u.role==="reader"?"You":"Claude",": "]}),u.text]},p))}),a&&e.jsxs("div",{className:"mt-3",children:[e.jsx(Q,{active:!0,label:w?"Updating the plan":"Making the plan",value:we(s),timeConstantSec:30}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 text-xs text-gray-500 dark:text-gray-400",children:[ve[((n=s==null?void 0:s.progress)==null?void 0:n.phase)??""]??"Working…",e.jsx("button",{type:"button",className:V,onClick:()=>l.mutate(),children:"Cancel"})]}),((h=s==null?void 0:s.progress)==null?void 0:h.recentActivity)&&s.progress.recentActivity.length>0&&e.jsx("pre",{className:"mt-1 max-h-32 overflow-auto rounded bg-gray-50 p-2 text-[11px] leading-relaxed text-gray-500 dark:bg-gray-900 dark:text-gray-400",children:s.progress.recentActivity.slice(-8).join(`
1
+ import{d as ke,r as g,j as e}from"./tanstack-BnbsafB1.js";import{c4 as Be,bL as Le,b_ as Ue,bN as Ne,as as De,b$ as D,A as ge,M as Y,q as Oe,a4 as Q,aU as we,T as ve,e as Z,g as Ce,a as $e,cu as Ke,bj as We,au as Ye,cn as He,co as qe,R as Ve,y as ze,L as Je,b6 as Ge,bZ as Xe,bY as Qe,aP as Ze,bk as et,ae as tt,aO as st,aE as rt,bt as Re,b7 as at,bH as nt,bI as it,bT as lt,D as dt,cg as ct,ch as ot,at as ut,bK as xt,bJ as ht,bU as gt,k as mt,l as pt,b8 as bt,bh as ee,O as ft,F as yt,K as jt,bp as Pe,cc as kt}from"./index-DDzOcB3p.js";import{S as Nt,C as wt,T as vt,F as Ct}from"./ClaudeReviewTab-2Tbx3UFN.js";import"./markdown-CcoLFczy.js";import"./highlight-DIEV0qGG.js";import"./vis-C3BCkP5U.js";const Rt="whitespace-nowrap rounded border border-blue-400 px-2.5 py-1 text-xs text-blue-600 hover:bg-blue-50 disabled:opacity-50 dark:border-blue-600 dark:text-blue-400 dark:hover:bg-blue-900/30",V="whitespace-nowrap rounded border border-gray-300 px-2.5 py-1 text-xs hover:border-gray-400 disabled:opacity-50 dark:border-gray-700 dark:hover:border-gray-500",me="inline-flex items-center rounded bg-gray-500/10 px-1.5 py-px font-mono text-[11px] text-gray-700 dark:text-gray-200";function Pt(t){return t instanceof Ce||t instanceof Error?t.message:"Something went wrong"}function Ae({plan:t}){return e.jsx("ul",{className:"list-disc space-y-0.5 pl-5 text-[13px] text-gray-800 dark:text-gray-100",children:t.summary.map((r,s)=>e.jsx("li",{children:r},s))})}function pe(t,r){var s;return((s=t==null?void 0:t.find(a=>a.ref===r))==null?void 0:s.title)??null}function At({plan:t,items:r}){return e.jsxs("div",{className:"mt-2 space-y-3 text-xs text-gray-700 dark:text-gray-200",children:[t.steps.length>0&&e.jsx("ol",{className:"list-decimal space-y-2 pl-5",children:t.steps.map((s,a)=>e.jsxs("li",{children:[e.jsx("div",{className:"font-medium text-gray-800 dark:text-gray-100",children:s.title}),s.files.length>0&&e.jsx("div",{className:"mt-0.5 font-mono text-[11px] text-gray-600 dark:text-gray-300",children:s.files.join(", ")}),e.jsx("p",{className:"mt-0.5 whitespace-pre-wrap",children:s.change}),s.refs.length>0&&e.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:s.refs.map(i=>e.jsx("span",{className:me,children:i},i))})]},a))}),t.notAddressed.length>0&&e.jsxs("div",{children:[e.jsx("div",{className:"mb-1 font-semibold text-gray-600 dark:text-gray-300",children:"Will not fix"}),e.jsx("ul",{className:"space-y-1",children:t.notAddressed.map(s=>e.jsxs("li",{children:[e.jsx("span",{className:me,children:s.ref})," ",pe(r,s.ref)&&e.jsxs("span",{className:"font-medium",children:[pe(r,s.ref),": "]}),s.reason]},s.ref))})]}),t.notCovered.length>0&&e.jsxs("p",{children:[e.jsx("span",{className:"font-semibold text-gray-600 dark:text-gray-300",children:"Not in the plan: "}),t.notCovered.join(", ")]})]})}function Ft({pr:t,fix:r,liveStatus:s,passRunning:a,auth:i}){var n,h;const d=r.plan,c=Be(t.id),x=Le(t.id),k=Ue(t.id),l=Ne(t.id),o=ke({mutationKey:De(t.id)})>0,E=D(u=>u.noteAiFixRun),[N,A]=g.useState(""),[F,I]=g.useState(!1);if(!d)return null;const w=d.plan,S=d.status==="plan_ready"&&!a,v=N.trim(),R=v.length>ge,P=()=>{!S||o||v===""||R||c.mutate({fixId:r.id,text:v},{onSuccess:()=>A("")})},_=()=>{E({prId:t.id,repoFullName:t.repoFullName,prNumber:t.number,prTitle:t.title}),x.mutate(r.id)},M=c.error??x.error??k.error;return e.jsxs("div",{className:"mt-3 rounded border border-gray-200 p-3 dark:border-gray-800",children:[e.jsxs("div",{className:"mb-1 flex items-center gap-1 text-xs font-semibold text-gray-700 dark:text-gray-200",children:["Plan",w&&d.revision>1&&e.jsxs("span",{className:"font-normal text-gray-500 dark:text-gray-400",children:["· version ",d.revision]}),e.jsxs(Y,{title:"Plan first",children:[e.jsx("p",{children:"Claude reads the code and writes a plan. It changes nothing."}),e.jsx("p",{children:"Tell Claude what to change and it rewrites the plan, taking the whole conversation into account. Each message runs Claude again."}),e.jsx("p",{children:"When you approve, Claude builds the fix from this plan. You still review the diff and press Push."})]})]}),w?e.jsxs(e.Fragment,{children:[e.jsx(Ae,{plan:w}),e.jsxs("button",{type:"button",className:"mt-2 inline-flex items-center gap-1 text-xs text-gray-600 hover:text-gray-800 dark:text-gray-300 dark:hover:text-gray-100","aria-expanded":F,onClick:()=>I(u=>!u),children:[e.jsx(Oe,{dir:F?"down":"right"}),"Details"]}),F&&e.jsx(At,{plan:w,items:r.reviewItems})]}):!a&&e.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-300",children:"No plan yet."}),r.error&&e.jsx("p",{className:"mt-2 rounded border border-amber-200 bg-amber-50 p-2 text-xs text-amber-800 dark:border-amber-800 dark:bg-amber-950/30 dark:text-amber-200",children:r.error}),d.transcript.length>0&&e.jsx("ul",{className:"mt-3 space-y-1.5 border-t border-gray-200 pt-2 text-xs dark:border-gray-800",children:d.transcript.map((u,p)=>e.jsxs("li",{className:"whitespace-pre-wrap text-gray-700 dark:text-gray-200",children:[e.jsxs("span",{className:"font-semibold",children:[u.role==="reader"?"You":"Claude",": "]}),u.text]},p))}),a&&e.jsxs("div",{className:"mt-3",children:[e.jsx(Q,{active:!0,label:w?"Updating the plan":"Making the plan",value:we(s),timeConstantSec:30}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 text-xs text-gray-500 dark:text-gray-400",children:[ve[((n=s==null?void 0:s.progress)==null?void 0:n.phase)??""]??"Working…",e.jsx("button",{type:"button",className:V,onClick:()=>l.mutate(),children:"Cancel"})]}),((h=s==null?void 0:s.progress)==null?void 0:h.recentActivity)&&s.progress.recentActivity.length>0&&e.jsx("pre",{className:"mt-1 max-h-32 overflow-auto rounded bg-gray-50 p-2 text-[11px] leading-relaxed text-gray-500 dark:bg-gray-900 dark:text-gray-400",children:s.progress.recentActivity.slice(-8).join(`
2
2
  `)})]}),S&&w&&e.jsx(Z,{auth:i,children:e.jsxs("div",{className:"mt-3",children:[e.jsx("textarea",{"aria-label":"Change the plan",className:"w-full rounded border border-gray-300 bg-transparent px-2 py-1 text-xs dark:border-gray-700",rows:2,placeholder:"Tell Claude what to change in the plan",value:N,disabled:o,onChange:u=>A(u.target.value),onKeyDown:u=>{u.key==="Enter"&&(u.metaKey||u.ctrlKey)&&(u.preventDefault(),P())}}),R&&e.jsxs("p",{className:"text-[12px] text-red-600 dark:text-red-400",children:["Keep it under ",ge.toLocaleString("en-US")," characters."]}),e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[e.jsx("button",{type:"button",className:V,disabled:o||v===""||R,onClick:P,children:"Update plan"}),e.jsx("button",{type:"button",className:Rt,disabled:o,onClick:_,children:"Approve and build"}),e.jsx("button",{type:"button",className:V,disabled:o,onClick:()=>k.mutate(r.id),children:"Discard plan"})]})]})}),M!=null&&e.jsx("p",{className:"mt-1 text-[12px] text-red-600 dark:text-red-400",children:Pt(M)})]})}function Fe({fix:t}){var s;const r=((s=t.plan)==null?void 0:s.status)==="approved"?t.plan.plan:null;return r?e.jsxs("div",{className:"mb-2 rounded border border-gray-200 p-2 dark:border-gray-800",children:[e.jsx("div",{className:"mb-1 text-xs font-semibold text-gray-600 dark:text-gray-300",children:"Built from your plan"}),e.jsx(Ae,{plan:r})]}):null}function It(t,r,s){var a;return t??((r==null?void 0:r.status)==="succeeded"?r.id:((a=s.find(i=>i.status==="succeeded"))==null?void 0:a.id)??null)}function St(t,r,s){return r==null||s==null||r===s.id?null:t!=null?"Uses the review you picked, not the latest.":s.status==="failed"?"Uses the last review that finished. The latest one failed.":s.status==="running"||s.status==="queued"?"Uses the last review that finished. A newer one is running.":"Uses the last review that finished."}const be="inline-flex max-w-full items-center gap-1 rounded px-1.5 py-0.5 text-[11px] font-medium bg-gray-500/10 text-gray-700 dark:text-gray-200",K="mb-1 mt-3 flex items-center gap-1 text-xs font-semibold uppercase tracking-wide text-gray-500 dark:text-gray-400";function Et(t){return t.kind==="finding"&&t.findingId!=null?`claude-finding-${t.findingId}`:null}function Tt(t){const r=D(s=>s.openClaudeReview);return s=>{r({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 d=document.getElementById(s);if(d){d.scrollIntoView({behavior:"smooth",block:"center"});return}Date.now()<a&&requestAnimationFrame(i)};requestAnimationFrame(i)}}function W({refId:t,item:r,onJump:s}){const a=r?`${$e[r.kind]} ${t}`:t,i=e.jsxs(e.Fragment,{children:[e.jsx("span",{className:"shrink-0",children:a}),r&&e.jsxs("span",{className:"min-w-0 truncate font-normal",children:["· ",r.title]})]}),d=r?Et(r):null;return d?e.jsx("button",{type:"button",onClick:()=>s(d),"aria-label":`${a}: ${(r==null?void 0:r.title)??""}. Show in Claude Review`,className:`${be} max-w-[22rem] hover:bg-gray-500/20`,children:i}):e.jsx("span",{className:`${be} max-w-[22rem]`,children:i})}function _t(t){var r;switch(t.seed){case"review":{const s=((r=t.reviewItems)==null?void 0:r.length)??0;return`Fix from the Claude review${s>0?` (${s} item${s===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 Mt({pr:t,fix:r}){const s=Tt(t),a=r.changeReport,i=new Map((r.reviewItems??[]).map(l=>[l.ref,l])),d=(r.reviewItems??[]).filter(l=>!l.included);if(!a&&d.length===0)return null;const c=new Set((a==null?void 0:a.changes.map(l=>l.path))??[]),x=r.filesChanged.filter(l=>!c.has(l)),k=i.size>0;return e.jsxs("div",{className:"mt-2 text-xs",children:[a&&(a.changes.length>0||x.length>0)&&e.jsxs("section",{children:[e.jsxs("div",{className:K,children:["Changes",e.jsxs(Y,{title:"Changes",children:[e.jsx("p",{children:"What Claude says it changed in each file, and why."}),k&&e.jsx("p",{children:"Each tag is a review item the change answers. A finding tag opens it in the Claude Review tab."}),e.jsx("p",{children:"The diff below is what actually changed."})]})]}),e.jsxs("ul",{className:"space-y-2",children:[a.changes.map(l=>e.jsxs("li",{children:[e.jsx("div",{className:"break-all font-mono text-gray-800 dark:text-gray-100",children:l.path}),l.summary&&e.jsx("p",{className:"mt-0.5 text-gray-700 dark:text-gray-300",children:l.summary}),l.refs.length>0&&e.jsx("div",{className:"mt-1 flex flex-wrap gap-1",children:l.refs.map(o=>e.jsx(W,{refId:o,item:i.get(o),onJump:s},o))})]},l.path)),x.map(l=>e.jsxs("li",{children:[e.jsx("div",{className:"break-all font-mono text-gray-800 dark:text-gray-100",children:l}),e.jsx("p",{className:"mt-0.5 text-gray-500 dark:text-gray-400",children:"No summary reported."})]},l))]})]}),a&&a.unaddressed.length>0&&e.jsxs("section",{children:[e.jsx("div",{className:K,children:"Not addressed"}),e.jsx("ul",{className:"space-y-1.5",children:a.unaddressed.map(l=>e.jsxs("li",{children:[e.jsx(W,{refId:l.ref,item:i.get(l.ref),onJump:s}),e.jsx("p",{className:"mt-0.5 text-gray-700 dark:text-gray-300",children:l.reason})]},l.ref))})]}),a&&a.notReported.length>0&&e.jsxs("section",{children:[e.jsx("div",{className:K,children:"No report"}),e.jsx("div",{className:"flex flex-wrap gap-1",children:a.notReported.map(l=>e.jsx(W,{refId:l,item:i.get(l),onJump:s},l))})]}),d.length>0&&e.jsxs("section",{children:[e.jsxs("div",{className:K,children:["Left out",e.jsx(Y,{title:"Left out",children:e.jsx("p",{children:"These review items did not fit in what Claude was sent, so it never saw them."})})]}),e.jsx("div",{className:"flex flex-wrap gap-1",children:d.map(l=>e.jsx(W,{refId:l.ref,item:l,onJump:s},l.ref))})]})]})}const Bt=["findings","earlier_findings","judged_threads","untouched_threads","ci_failures","sonar","style_bots","story"],fe={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 H(t,r){return r[t.key]??t.defaultIncluded}function Lt(t,r){return t.items.filter(s=>H(s,r)).map(s=>s.key)}function Ie(t,r){const s=new Set;let a=0;for(const i of t.items)if(H(i,r)){if(a>0&&a+i.chars>t.budgetChars){s.add(i.key);continue}a+=i.chars}return s}const Ut={blocker:"Blocker",warning:"Warning",nit:"Nit",question:"Question",praise:"Praise"},ye={blocker:"bg-red-500/10 text-red-700 dark:text-red-300",warning:"bg-amber-500/10 text-amber-700 dark:text-amber-300",nit:"bg-gray-500/10 text-gray-600 dark:text-gray-300"},Se="whitespace-nowrap rounded bg-amber-500/10 px-1 py-px text-[11px] text-amber-700 dark:text-amber-300",z=new Set;function Dt(t,r){return t?r!=null?`${t}:${r}`:t:null}function Ot({item:t,picked:r,cut:s,disabled:a,onToggle:i}){return e.jsxs("span",{className:"inline-flex shrink-0 items-center gap-1.5 pt-0.5",children:[e.jsx("input",{type:"checkbox",checked:r,disabled:a,onChange:d=>i(d.target.checked),"aria-label":`Include in the fix: ${t.label}`}),r&&s&&e.jsx("span",{className:Se,children:"Won’t fit"})]})}function $t({item:t,picked:r,cut:s,disabled:a,onToggle:i}){const d=Dt(t.path,t.line);return e.jsx("li",{children:e.jsxs("label",{className:`flex cursor-pointer items-start gap-2 rounded border px-2 py-1.5 text-xs ${r?"border-blue-300 bg-blue-50/50 dark:border-blue-800 dark:bg-blue-950/20":"border-gray-200 dark:border-gray-800"}`,children:[e.jsx("input",{type:"checkbox",className:"mt-0.5",checked:r,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&&ye[t.severity]&&e.jsx("span",{className:`rounded px-1 py-px text-[11px] font-medium ${ye[t.severity]}`,children:Ut[t.severity]}),e.jsx("span",{className:"break-words text-gray-800 dark:text-gray-100",children:t.label}),r&&s&&e.jsx("span",{className:Se,children:"Won’t fit"})]}),(d||t.detail)&&e.jsxs("span",{className:"mt-0.5 block break-words text-[11px] text-gray-500 dark:text-gray-400",children:[d&&e.jsx("span",{className:"font-mono",children:d}),d&&t.detail?" · ":"",t.detail]})]})]})})}function Kt({preview:t,overrides:r,onChange:s,disabled:a,pr:i,review:d}){const c=Ie(t,r),x=new Map;for(const n of t.items){const h=x.get(n.section)??[];h.push(n),x.set(n.section,h)}const k=(n,h)=>{const u={...r};for(const p of n)u[p]=h;s(u)},l=d!=null&&d.id===t.sourceReviewId?d:null,o=g.useMemo(()=>l!=null?Ke(l):null,[l]),E=g.useMemo(()=>new Map(((o==null?void 0:o.findings)??[]).map(n=>[n.id,n])),[o]),N=g.useMemo(()=>{var n;return new Map((((n=o==null?void 0:o.followUp)==null?void 0:n.items)??[]).map(h=>[h.priorFindingId,h]))},[o]),A=g.useMemo(()=>o!=null?We(o):new Map,[o]),F=g.useMemo(()=>o!=null?Ye(o):new Set,[o]),I=g.useMemo(()=>{var h;const n=new Set;for(const u of t.items)((h=u.card)==null?void 0:h.kind)==="story"&&n.add(u.card.ticketReviewId);return[...n].sort((u,p)=>u-p)},[t.items]),w=He(i.id,I.length>0),S=g.useMemo(()=>{var h;const n=new Map;for(const u of((h=w.data)==null?void 0:h.tickets)??[])u.review!=null&&n.set(u.review.id,u.review);return n},[w.data]),v=g.useMemo(()=>w.data==null?[]:I.filter(n=>!S.has(n)),[w.data,I,S]),R=qe(v),P=g.useMemo(()=>{const n=new Map(S);for(const h of R)n.set(h.id,h);return n},[S,R]);if(t.items.length===0)return e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"The review found nothing to fix."});const _=(l==null?void 0:l.headSha)??i.headSha,M=n=>{var b,f;const h=H(n,r),u=c.has(n.key),p=m=>k([n.key],m),C=e.jsx(Ot,{item:n,picked:h,cut:u,disabled:a,onToggle:p}),y=n.card;switch(y==null?void 0:y.kind){case"finding":{const m=E.get(y.findingId);if(m==null)break;return e.jsx(Ct,{prId:i.id,finding:m,editable:!1,prUrl:i.githubUrl,repoFullName:i.repoFullName,headSha:_,posting:!1,postError:null,inChangeset:m.fileInDiff,priorStatus:A.get(m.id),alreadyPosted:F.has(m.id),actions:!1,selection:C,docReferences:(l==null?void 0:l.docReferences)??null},n.key)}case"earlier_finding":{const m=N.get(y.priorFindingId);if(m==null)break;return e.jsx(Je,{item:m,muted:!1,findingsById:E,headMoved:((b=o==null?void 0:o.followUp)==null?void 0:b.headMoved)??!1,changedPaths:z,actions:!1,selection:C},n.key)}case"thread":return e.jsx(vt,{t:y.assessment,muted:!1,actions:!1,selection:C,notCheckedNote:y.inReview?void 0:"Claude didn’t check this one."},n.key);case"ci":return e.jsx(wt,{f:y.item,suggestion:y.item.suggestion,changedPaths:z,selection:C},n.key);case"sonar":return e.jsx(Nt,{issue:y.issue,selection:C},n.key);case"story":{const m=P.get(y.ticketReviewId),T=m==null?void 0:m.items.find(O=>O.id===y.itemId);if(m==null||T==null)break;const B={review:m,viewedPrId:i.id,changedPaths:z,actions:!1,selection:C};if(T.status==="missing")return e.jsx(Ve,{item:T,...B},n.key);const L=(f=m.assessment)==null?void 0:f.criteria.find(O=>O.ref===T.ref);if(L==null||L.status==="met")break;return e.jsx(ze,{c:L,item:T,...B},n.key)}}return e.jsx($t,{item:n,picked:h,cut:u,disabled:a,onToggle:p},n.key)};return e.jsxs("div",{className:"space-y-3",children:[Bt.filter(n=>x.has(n)).map(n=>{const h=x.get(n),u=h.filter(C=>H(C,r)).length,p=u===h.length;return e.jsxs("section",{"aria-label":fe[n],children:[e.jsxs("div",{className:"mb-1 flex items-center gap-2",children:[e.jsx("h4",{className:"text-xs font-semibold text-gray-700 dark:text-gray-200",children:fe[n]}),e.jsxs("span",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:[u," of ",h.length]}),e.jsx("button",{type:"button",className:"ml-auto text-[11px] text-blue-600 hover:underline disabled:opacity-50 dark:text-blue-400",disabled:a,onClick:()=>k(h.map(C=>C.key),!p),children:p?"Untick all":"Tick all"})]}),e.jsx("ul",{className:"space-y-1.5",children:h.map(M)})]},n)}),c.size>0&&e.jsxs("p",{className:"text-xs text-amber-700 dark:text-amber-300",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 Wt="whitespace-nowrap rounded border border-blue-400 px-2.5 py-1 text-xs text-blue-600 hover:bg-blue-50 disabled:opacity-50 dark:border-blue-600 dark:text-blue-400 dark:hover:bg-blue-900/30",je="whitespace-nowrap rounded border border-gray-300 px-2.5 py-1 text-xs hover:border-gray-400 dark:border-gray-700 dark:hover:border-gray-500";function Ee(t){return{prId:t.id,repoId:t.repoId,repoFullName:t.repoFullName,prNumber:t.number,prTitle:t.title,githubUrl:t.githubUrl}}function Yt(t){const r=Ge({mergeable:t.mergeable,mergeStateStatus:t.mergeStateStatus,isDraft:t.isDraft,inMergeQueue:t.inMergeQueue===!0}).verdict;return Xe({state:t.state,verdict:r,viewerCanPush:t.viewerCanPush})}function Ht({pr:t}){const r=Qe(t.id),s=Ze(r),a=t.baseRefName??"the base branch";g.useEffect(()=>{et(t.id)},[t.id]);const i=Ee(t),d=(r==null?void 0:r.phase)==="succeeded"?r.resolution:null;return e.jsxs("div",{className:"mb-3 rounded border border-gray-200 p-3 dark:border-gray-800",children:[e.jsxs("div",{className:"flex items-center gap-1.5 text-sm font-medium text-gray-800 dark:text-gray-100",children:[e.jsx(tt,{size:13,className:"text-ai-signal"}),"This branch conflicts with ",a]}),e.jsx("p",{className:"mt-1 text-[12px] text-gray-600 dark:text-gray-300",children:"Claude reads the code and picks a result for each conflict. You check its choices in the resolver before anything is pushed."}),s&&r!=null?e.jsxs("div",{className:"mt-2",children:[e.jsx(Q,{active:!0,label:"Resolving conflicts with Claude",timeConstantSec:60}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 text-xs text-gray-600 dark:text-gray-300",children:[st(r.phase),e.jsx("button",{type:"button",className:je,onClick:()=>rt(t.id),children:"Cancel"})]})]}):e.jsxs("div",{className:"mt-2 flex flex-wrap items-center gap-2",children:[e.jsx(Z,{children:e.jsx("button",{type:"button",className:Wt,onClick:()=>Re(i),children:d!=null?"Run again":"Resolve merge conflicts with Claude"})}),d!=null&&e.jsxs(e.Fragment,{children:[e.jsx("button",{type:"button",className:je,onClick:()=>at(i),children:"Open the resolver"}),e.jsxs("span",{className:"text-xs text-gray-600 dark:text-gray-300",children:["Claude decided ",d.choices.length," of ",d.decidableTotal," change",d.decidableTotal===1?"":"s","."]})]}),(r==null?void 0:r.phase)==="failed"&&r.error!=null&&e.jsx("span",{className:"text-xs text-red-600 dark:text-red-400",children:r.error}),(r==null?void 0:r.phase)==="cancelled"&&e.jsx("span",{className:"text-xs text-gray-600 dark:text-gray-300",children:"Cancelled."})]})]})}const G="whitespace-nowrap rounded border border-blue-400 px-2.5 py-1 text-xs text-blue-600 hover:bg-blue-50 disabled:opacity-50 dark:border-blue-600 dark:text-blue-400 dark:hover:bg-blue-900/30";function X(t){return t instanceof Ce||t instanceof Error?t.message:"Something went wrong"}const J="whitespace-nowrap rounded border border-gray-300 px-2.5 py-1 text-xs hover:border-gray-400 disabled:opacity-50 dark:border-gray-700 dark:hover:border-gray-500";function qt({children:t,info:r}){return e.jsxs("div",{className:"flex items-center gap-1 px-4 pb-1 pt-3 text-xs font-semibold uppercase tracking-wide text-gray-400",children:[t,r]})}function as({pr:t}){const r=nt().enabled,s=D(c=>c.aiFixTabFocus),a=D(c=>c.consumeAiFixTabFocus),[i,d]=g.useState(null);return g.useEffect(()=>{s&&s.prId===t.id&&(s.reviewId!=null&&d(s.reviewId),a())},[s,t.id,a]),r?e.jsx("div",{className:"pb-6",children:e.jsx(Vt,{pr:t,handoffReviewId:i})}):e.jsx(e.Fragment,{})}function Vt({pr:t,handoffReviewId:r}){var ae,ne,ie,le,de,ce,oe,ue,xe,he;const{data:s,isLoading:a}=it(t.id,!0),{data:i,isLoading:d}=lt(t.id),c=(i==null?void 0:i.review)??null,x=It(r,c,(i==null?void 0:i.history)??[]),k=St(r,x,c),l=D(j=>j.setPrDetailTab),[o,E]=g.useState(dt),N=ct(t.id),A=ot(t.id),F=Ne(t.id),[I,w]=g.useState(!1),S=D(j=>j.noteAiFixRun),v=ke({mutationKey:ut(t.id)})>0,R=((ae=s==null?void 0:s.fix)==null?void 0:ae.status)??null,P=R==="planned",_=P&&((ie=(ne=s==null?void 0:s.fix)==null?void 0:ne.plan)==null?void 0:ie.status)==="planning",M=R==="running"||R==="queued"||v||_,{status:n}=xt(t.id,M),h=(n==null?void 0:n.status)??R??"idle",u=h==="running"||h==="queued",p=u&&!P,C=P&&(_||u),y=P&&(((de=(le=s==null?void 0:s.fix)==null?void 0:le.plan)==null?void 0:de.status)==="planning"||((oe=(ce=s==null?void 0:s.fix)==null?void 0:ce.plan)==null?void 0:oe.status)==="plan_ready"),b=(s==null?void 0:s.fix)??null,f=ht(t.id,x,(s==null?void 0:s.enabled)!==!1),m=gt(x!=null&&(c==null?void 0:c.id)!==x?x:null),T=x!=null&&(c==null?void 0:c.id)===x?c:m.data??null,[B,L]=g.useState({});g.useEffect(()=>L({}),[x]);const[O,$]=g.useState(!1),te=!y&&(O||!b||b.status!=="succeeded"),q=Yt(t),[se,_e]=g.useState(!1),U=f.data?Lt(f.data,B):[],re=f.data?Ie(f.data,B).size:0,Me=()=>{if(x==null||!f.data||U.length===0)return;const j={model:o,seed:"review",sourceReviewId:x,include:U};I?A.mutate(j,{onSuccess:()=>$(!1)}):(S({prId:t.id,repoFullName:t.repoFullName,prNumber:t.number,prTitle:t.title}),N.mutate(j,{onSuccess:()=>$(!1)})),se&&q&&Re(Ee(t),{model:o})};return e.jsxs("div",{children:[e.jsx(qt,{info:e.jsxs(Y,{title:"AI Fix",children:[e.jsx("p",{children:"Claude 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 a Claude review. Pick what it should work on: Claude's findings, earlier findings still open, threads Claude says need a fix, unanswered threads, CI failures and ticket gaps are ticked; style bot comments are not."}),e.jsx("p",{children:"Tick Plan first to read Claude's plan, steer it and approve it before anything changes."}),e.jsx("p",{children:"Claude 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:[q&&e.jsx(Ht,{pr:t}),(s==null?void 0:s.enabled)===!1?e.jsx("p",{className:"text-sm text-gray-500 dark:text-gray-400",children:"The agentic fixer is turned off."}):e.jsxs(e.Fragment,{children:[!p&&!y&&x==null&&!d&&e.jsxs("div",{className:"flex flex-wrap items-center gap-2",children:[e.jsx("p",{className:"text-xs text-gray-600 dark:text-gray-300",children:(c==null?void 0:c.status)==="running"||(c==null?void 0:c.status)==="queued"?"A fix starts from a Claude review. One is running.":"A fix starts from a finished Claude review."}),e.jsx("button",{type:"button",className:G,onClick:()=>l(t.id,"claude_review"),children:"Open Claude Review"})]}),!p&&!y&&x!=null&&!te&&e.jsx("button",{type:"button",className:J,onClick:()=>$(!0),children:"New fix"}),!p&&x!=null&&te&&e.jsxs("div",{children:[k&&e.jsx("p",{className:"mb-2 text-xs text-gray-500 dark:text-gray-400",children:k}),f.isLoading&&e.jsx("p",{className:"text-xs text-gray-500 dark:text-gray-400",children:"Loading…"}),f.isError&&e.jsx("p",{className:"text-xs text-red-600 dark:text-red-400",children:X(f.error)}),f.data&&e.jsx(Kt,{preview:f.data,overrides:B,onChange:L,disabled:v,pr:t,review:T}),f.data&&f.data.items.length>0&&q&&e.jsxs("label",{className:"mt-3 flex cursor-pointer items-start gap-2 text-xs text-gray-800 dark:text-gray-100",children:[e.jsx("input",{type:"checkbox",className:"mt-0.5",checked:se,disabled:v,onChange:j=>_e(j.target.checked)}),e.jsxs("span",{children:["Also resolve merge conflicts with ",t.baseRefName??"the base branch",e.jsx("span",{className:"block text-[12px] text-gray-600 dark:text-gray-300",children:"You check the merge in the resolver. It lands as its own commit, apart from the fix."})]})]}),f.data&&f.data.items.length>0&&e.jsxs("div",{className:"mt-3 flex flex-wrap items-center gap-2",children:[e.jsx("select",{"aria-label":"Model",className:"rounded border border-gray-300 bg-transparent px-2 py-1 text-xs dark:border-gray-700",value:o,onChange:j=>E(j.target.value),children:mt.map(j=>e.jsx("option",{value:j,children:pt[j]},j))}),e.jsxs("label",{className:"flex cursor-pointer items-center gap-1.5 text-xs text-gray-800 dark:text-gray-100",children:[e.jsx("input",{type:"checkbox",checked:I,disabled:v,onChange:j=>w(j.target.checked)}),"Plan first"]}),e.jsx(Z,{auth:s==null?void 0:s.auth,children:e.jsx("button",{type:"button",className:G,disabled:v||U.length===0,onClick:Me,children:I?"Make a plan":"Start fix"})}),e.jsx("span",{className:"text-xs text-gray-500 dark:text-gray-400",children:U.length===0?"Nothing ticked.":`${U.length-re} item${U.length-re===1?"":"s"}`}),(b==null?void 0:b.status)==="succeeded"&&e.jsx("button",{type:"button",className:J,onClick:()=>$(!1),children:"Close"})]})]}),p&&e.jsx("button",{type:"button",className:J,onClick:()=>F.mutate(),children:"Cancel"}),(N.isError||A.isError)&&e.jsx("p",{className:"mt-1 text-[11px] text-red-600 dark:text-red-400",children:X(N.error??A.error)}),b&&P&&e.jsx(Ft,{pr:t,fix:b,liveStatus:n,passRunning:C,auth:s==null?void 0:s.auth}),p&&e.jsxs("div",{className:"mt-3",children:[b&&e.jsx(Fe,{fix:b}),e.jsx(Q,{active:!0,label:"Running AI fix",value:we(n),timeConstantSec:40}),e.jsxs("div",{className:"mt-1 flex items-center gap-2 text-xs text-gray-500 dark:text-gray-400",children:[(b==null?void 0:b.trigger)==="auto"&&e.jsx(Te,{}),ve[((ue=n==null?void 0:n.progress)==null?void 0:ue.phase)??""]??"Working…"]}),((xe=n==null?void 0:n.progress)==null?void 0:xe.recentActivity)&&n.progress.recentActivity.length>0&&e.jsx("pre",{className:"mt-1 max-h-32 overflow-auto rounded bg-gray-50 p-2 text-[11px] leading-relaxed text-gray-500 dark:text-gray-400 dark:bg-gray-900",children:n.progress.recentActivity.slice(-8).join(`
3
3
  `)})]}),!p&&b&&!P&&e.jsx(zt,{pr:t,fix:b,headInfo:(s==null?void 0:s.headInfo)??null,viewerCanPush:(s==null?void 0:s.viewerCanPush)??!1}),a&&!b&&e.jsx("p",{className:"mt-3 text-xs text-gray-500 dark:text-gray-400",children:"Loading…"})]}),e.jsx(Gt,{history:(s==null?void 0:s.history)??[],currentFixId:((he=s==null?void 0:s.fix)==null?void 0:he.id)??null})]})]})}function Te(){return e.jsx("span",{className:"inline-flex items-center rounded bg-gray-500/10 px-1.5 py-px text-[11px] font-medium text-gray-600 dark:text-gray-300",children:"Auto fix"})}function zt({pr:t,fix:r,headInfo:s,viewerCanPush:a}){var c,x;const i=g.useMemo(()=>bt(r.patch),[r.patch]);if(r.status==="failed"&&((c=r.plan)==null?void 0:c.status)==="failed")return e.jsxs("div",{className:"mt-3 rounded border border-red-200 bg-red-50 p-2 text-xs text-red-700 dark:border-red-800 dark:bg-red-950/30 dark:text-red-300",children:["Claude could not make a plan: ",r.error??"unknown error"]});if(r.status==="cancelled"&&((x=r.plan)==null?void 0:x.status)==="discarded")return e.jsx("p",{className:"mt-3 text-xs text-gray-500 dark:text-gray-400",children:"The plan was discarded."});if(r.status==="failed")return e.jsxs("div",{className:"mt-3 rounded border border-red-200 bg-red-50 p-2 text-xs text-red-700 dark:border-red-800 dark:bg-red-950/30 dark:text-red-300",children:["The fix run failed: ",r.error??"unknown error"]});if(r.status==="cancelled")return e.jsx("p",{className:"mt-3 text-xs text-gray-500 dark:text-gray-400",children:"The fix run was cancelled."});if(r.status!=="succeeded")return e.jsx(e.Fragment,{});const d=!r.patch||r.filesChanged.length===0;return e.jsxs("div",{className:"mt-3 border-t border-gray-200 pt-3 dark:border-gray-800",children:[e.jsxs("p",{className:"mb-1 text-xs text-gray-500 dark:text-gray-400",children:[r.trigger==="auto"&&e.jsxs(e.Fragment,{children:[e.jsx(Te,{})," "]}),_t(r),r.finishedAt&&e.jsxs(e.Fragment,{children:[" · ",ee(r.finishedAt)]})]}),r.pushedAt==null&&r.error&&e.jsx("p",{className:"mb-2 rounded border border-amber-200 bg-amber-50 p-2 text-xs text-amber-800 dark:border-amber-800 dark:bg-amber-950/30 dark:text-amber-200",children:r.error}),e.jsx(Fe,{fix:r}),r.summary&&e.jsx("div",{className:"prose prose-sm max-w-none dark:prose-invert",children:e.jsx(ft,{children:r.summary})}),e.jsx(Mt,{pr:t,fix:r}),d?e.jsx("p",{className:"mt-2 text-xs text-gray-500 dark:text-gray-400",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-xs text-gray-500 dark:text-gray-400",children:[e.jsxs("span",{children:[r.filesChanged.length," file",r.filesChanged.length===1?"":"s"," changed · Not built or tested here."]}),e.jsx(yt,{})]}),e.jsx("div",{className:"overflow-hidden rounded border border-gray-200 text-gray-800 dark:border-gray-800 dark:text-gray-200",children:e.jsx(jt,{files:i})}),e.jsx(Xt,{pr:t,fix:r,headInfo:s,viewerCanPush:a})]})]})}function Jt({fix:t}){return e.jsxs("div",{className:"mb-2 rounded border border-green-200 bg-green-50 p-2 text-xs text-green-700 dark:border-green-800 dark:bg-green-950/30 dark:text-green-300",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:Pe(t.pushedPrUrl),target:"_blank",rel:"noreferrer",className:"underline",children:["PR #",t.pushedPrNumber]})]}),t.pushedAt&&e.jsxs(e.Fragment,{children:[" · ",ee(t.pushedAt)]})]}),t.commitMessage&&e.jsx("div",{className:"mt-1 font-mono text-[11px] text-green-800 dark:text-green-300",children:t.commitMessage})]})}function Gt({history:t,currentFixId:r}){const s=t.filter(a=>a.pushedAt!=null&&a.id!==r);return s.length===0?null:e.jsxs("div",{className:"mt-4 border-t border-gray-200 pt-3 dark:border-gray-800",children:[e.jsx("div",{className:"mb-1.5 text-xs font-semibold uppercase tracking-wide text-gray-400",children:"Earlier fixes pushed"}),e.jsx("ul",{className:"space-y-2",children:s.map(a=>e.jsxs("li",{className:"text-xs",children:[e.jsx("div",{className:"font-mono text-gray-700 dark:text-gray-200",children:a.commitMessage??"(no commit message)"}),e.jsxs("div",{className:"mt-0.5 text-[11px] text-gray-400",children:[a.pushedBranch&&e.jsx("span",{className:"font-mono",children:a.pushedBranch}),a.pushedPrUrl&&e.jsxs(e.Fragment,{children:[" · ",e.jsxs("a",{href:Pe(a.pushedPrUrl),target:"_blank",rel:"noreferrer",className:"underline",children:["PR #",a.pushedPrNumber]})]}),a.pushedAt&&e.jsxs(e.Fragment,{children:[" · ",ee(a.pushedAt)]})]})]},a.id))})]})}function Xt({pr:t,fix:r,headInfo:s,viewerCanPush:a}){const i=kt(t.id),d=(s==null?void 0:s.canPushSameBranch)??!1,[c,x]=g.useState(d?"existing":"new"),[k,l]=g.useState((s==null?void 0:s.suggestedBranch)??""),o=g.useRef(!1);if(g.useEffect(()=>{!o.current&&(s!=null&&s.suggestedBranch)&&(l(s.suggestedBranch),o.current=!0,s.canPushSameBranch||x("new"))},[s]),r.pushedAt!=null)return e.jsx(Jt,{fix:r});if(!a)return e.jsx("p",{className:"mt-2 text-xs text-gray-500 dark:text-gray-400",children:"You need write access to push this fix."});const E=c==="new"&&k.trim().length===0,N=i.isPending,A=()=>{i.mutate({fixId:r.id,body:{target:c,branch:c==="new"?k.trim():void 0}})};return e.jsxs("div",{className:"mt-3 rounded border border-gray-200 p-2 dark:border-gray-800",children:[r.commitMessage&&e.jsx("div",{className:"mb-2 rounded bg-gray-50 px-2 py-1 font-mono text-xs text-gray-700 dark:bg-gray-900 dark:text-gray-200",title:"Commit message",children:r.commitMessage}),e.jsxs("label",{className:`flex items-center gap-2 text-xs ${d?"":"opacity-40"}`,title:d?void 0:"The PR head is a fork you cannot push to — use a new branch",children:[e.jsx("input",{type:"radio",checked:c==="existing",disabled:!d||N,onChange:()=>x("existing")}),"Push to the PR branch",(s==null?void 0:s.headRef)&&e.jsxs("span",{className:"font-mono text-gray-400",children:["(",s.headRef,")"]})]}),e.jsxs("label",{className:"mt-1 flex items-center gap-2 text-xs",children:[e.jsx("input",{type:"radio",checked:c==="new",disabled:N,onChange:()=>x("new")}),"New branch + open a PR"]}),c==="new"&&e.jsx("input",{type:"text",className:"mt-1 w-full rounded border border-gray-300 bg-transparent px-2 py-1 font-mono text-xs dark:border-gray-700",value:k,disabled:N,onChange:F=>l(F.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:G,disabled:N||E,onClick:A,children:N?"Pushing…":c==="new"?"Push + open PR":"Push"})}),i.isError&&e.jsx("div",{className:"mt-2 text-[11px] text-red-500",children:X(i.error)})]})}export{as as AiFixTab};
@@ -1,4 +1,4 @@
1
- import{r as p,j as e,d as ut,k as ls}from"./tanstack-BnbsafB1.js";import{ba as is,bA as os,bz as ds,a8 as q,q as xe,M as ie,_ as oe,b0 as cs,bp as se,av as Lt,aN as us,aM as xs,n as hs,ah as xt,m as ms,by as ps,ai as gs,B as bs,J as Ne,a2 as V,Y as Z,bB as ys,x as fs,a0 as Qe,bH as he,bP as Ft,cf as ks,bR as js,bS as vs,bQ as Ns,aK as Pe,aL as ws,aH as Cs,a4 as Xe,aI as Rs,i as $s,aJ as Ss,a1 as Y,O as le,e as me,aG as Is,a9 as He,c as Le,C as Ps,o as je,ar as Je,ca as Es,cd as _s,c6 as Ts,ac as Ze,cb as As,c2 as Ls,V as Fs,bf as W,bg as De,v as Ms,bs as Bs,am as ht,b9 as Hs,cn as et,cj as Ds,cl as Os,cm as Us,ck as Gs,bC as Vs,aQ as zs,b2 as Mt,bx as Bt,N as Ws,ak as Ks,aj as Ys,z as qs,be as Qs,af as Ht,bE as Xs,al as Js,an as Zs,ci as Dt,u as en,bc as Ot,bD as tn,bw as sn,aF as nn,bF as rn,cr as an,t as ln,b1 as on,c3 as dn,ag as cn,y as un,Q as xn,S as hn,H as mn,X as pn,aR as gn,bu as bn,b5 as yn,bT as fn,E as kn,c0 as jn,bW as vn,bO as Nn,cq as wn,cp as Cn,c7 as Rn,c5 as $n,bX as Sn,bU as In,k as Pn,l as We,d as En,aw as mt,a$ as _n,f as Tn,h as ve,a3 as Ut,aY as Gt,bm as An,ay as pt,az as gt,aB as bt,ax as yt,P as Vt,bh as Ln,aX as Fn,aT as Mn,$ as Ke,ab as Bn,j as Hn,Z as ft,b as Ge,bd as kt,bi as Dn,aA as jt,G as On,ad as Un,bl as Gn,bV as Vn,bn as zn,a7 as Wn,bo as Kn,c8 as Yn,aa as qn,W as Qn,bG as Xn,cu as Jn,b4 as Zn,bb as er,br as tr,bj as sr,au as nr,aW as rr,bq as ar,s as lr,p as ir,bv as or,I as dr,r as cr,a5 as ur,ct as xr,c1 as hr,a_ as vt,aZ as mr,b3 as pr,cv as zt,aD as gr,b$ as br,ap as yr,ao as fr,aq as kr,U as jr}from"./index-jmnLc1R-.js";const vr="https://sonarcloud.io",Nr={blocker:"Blocker",critical:"Critical",major:"Major",minor:"Minor",info:"Info"},wr={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 tt(t){return wr[t]??t.replace(/^new_/,"").replace(/_/g," ").replace(/^./,s=>s.toUpperCase())}const Wt=t=>/_rating$/.test(t),Cr=t=>/(coverage|density|hotspots_reviewed)$/.test(t);function Ye(t,s){const n=Number(s);return Number.isFinite(n)?Wt(t)?"ABCDE"[Math.round(n)-1]??s:Cr(t)?`${Math.round(n*10)/10}%`:String(n):s}function Rr(t){const s=tt(t.metric),n=t.actual!=null?Ye(t.metric,t.actual):null,a=t.threshold!=null?Ye(t.metric,t.threshold):null,i=n!=null?`${s} is ${n}.`:`${s} fails.`;if(a==null)return i;const l=Wt(t.metric)?`${a} or better`:t.comparator==="LT"?`at least ${a}`:t.comparator==="GT"?`at most ${a}`:a;return`${i} The quality gate needs ${l}.`}function $r(t){return((t==null?void 0:t.conditions)??[]).filter(s=>s.status==="ERROR"||s.status==="WARN")}const Kt=t=>/coverage|uncovered_lines|lines_to_cover/.test(t),Sr=t=>/duplicat/.test(t);function Ir(t){return Kt(t)||Sr(t)}function Pr(t,s){return $r(t).filter(n=>Ir(n.metric)).map(n=>{const a=Kt(n.metric),i=n.files??[],l=i.length>0?`
1
+ import{r as p,j as e,d as ut,k as ls}from"./tanstack-BnbsafB1.js";import{ba as is,bA as os,bz as ds,a8 as q,q as xe,M as ie,_ as oe,b0 as cs,bp as se,av as Lt,aN as us,aM as xs,n as hs,ah as xt,m as ms,by as ps,ai as gs,B as bs,J as Ne,a2 as V,Y as Z,bB as ys,x as fs,a0 as Qe,bH as he,bP as Ft,cf as ks,bR as js,bS as vs,bQ as Ns,aK as Pe,aL as ws,aH as Cs,a4 as Xe,aI as Rs,i as $s,aJ as Ss,a1 as Y,O as le,e as me,aG as Is,a9 as He,c as Le,C as Ps,o as je,ar as Je,ca as Es,cd as _s,c6 as Ts,ac as Ze,cb as As,c2 as Ls,V as Fs,bf as W,bg as De,v as Ms,bs as Bs,am as ht,b9 as Hs,cn as et,cj as Ds,cl as Os,cm as Us,ck as Gs,bC as Vs,aQ as zs,b2 as Mt,bx as Bt,N as Ws,ak as Ks,aj as Ys,z as qs,be as Qs,af as Ht,bE as Xs,al as Js,an as Zs,ci as Dt,u as en,bc as Ot,bD as tn,bw as sn,aF as nn,bF as rn,cr as an,t as ln,b1 as on,c3 as dn,ag as cn,y as un,Q as xn,S as hn,H as mn,X as pn,aR as gn,bu as bn,b5 as yn,bT as fn,E as kn,c0 as jn,bW as vn,bO as Nn,cq as wn,cp as Cn,c7 as Rn,c5 as $n,bX as Sn,bU as In,k as Pn,l as We,d as En,aw as mt,a$ as _n,f as Tn,h as ve,a3 as Ut,aY as Gt,bm as An,ay as pt,az as gt,aB as bt,ax as yt,P as Vt,bh as Ln,aX as Fn,aT as Mn,$ as Ke,ab as Bn,j as Hn,Z as ft,b as Ge,bd as kt,bi as Dn,aA as jt,G as On,ad as Un,bl as Gn,bV as Vn,bn as zn,a7 as Wn,bo as Kn,c8 as Yn,aa as qn,W as Qn,bG as Xn,cu as Jn,b4 as Zn,bb as er,br as tr,bj as sr,au as nr,aW as rr,bq as ar,s as lr,p as ir,bv as or,I as dr,r as cr,a5 as ur,ct as xr,c1 as hr,a_ as vt,aZ as mr,b3 as pr,cv as zt,aD as gr,b$ as br,ap as yr,ao as fr,aq as kr,U as jr}from"./index-DDzOcB3p.js";const vr="https://sonarcloud.io",Nr={blocker:"Blocker",critical:"Critical",major:"Major",minor:"Minor",info:"Info"},wr={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 tt(t){return wr[t]??t.replace(/^new_/,"").replace(/_/g," ").replace(/^./,s=>s.toUpperCase())}const Wt=t=>/_rating$/.test(t),Cr=t=>/(coverage|density|hotspots_reviewed)$/.test(t);function Ye(t,s){const n=Number(s);return Number.isFinite(n)?Wt(t)?"ABCDE"[Math.round(n)-1]??s:Cr(t)?`${Math.round(n*10)/10}%`:String(n):s}function Rr(t){const s=tt(t.metric),n=t.actual!=null?Ye(t.metric,t.actual):null,a=t.threshold!=null?Ye(t.metric,t.threshold):null,i=n!=null?`${s} is ${n}.`:`${s} fails.`;if(a==null)return i;const l=Wt(t.metric)?`${a} or better`:t.comparator==="LT"?`at least ${a}`:t.comparator==="GT"?`at most ${a}`:a;return`${i} The quality gate needs ${l}.`}function $r(t){return((t==null?void 0:t.conditions)??[]).filter(s=>s.status==="ERROR"||s.status==="WARN")}const Kt=t=>/coverage|uncovered_lines|lines_to_cover/.test(t),Sr=t=>/duplicat/.test(t);function Ir(t){return Kt(t)||Sr(t)}function Pr(t,s){return $r(t).filter(n=>Ir(n.metric)).map(n=>{const a=Kt(n.metric),i=n.files??[],l=i.length>0?`
2
2
 
3
3
  Files with the most ${a?"uncovered":"duplicated"} new lines:
4
4
  ${i.map(r=>`- ${r.path}: ${r.lines} ${r.lines===1?"line":"lines"}`).join(`
@@ -1 +1 @@
1
- import{r as g,j as s}from"./tanstack-BnbsafB1.js";import{c9 as v,ce as w,bM as j,M as k,aC as N,cs as b,bh as y,ar as f,a6 as C,w as T,aS as p,aV as $}from"./index-jmnLc1R-.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 r of e){const o=y(r.at),a=t[t.length-1];if(a&&a.label===o){a.to=r.at,a.count+=1,r.kind==="review"?a.reviews+=1:a.comments+=1;continue}t.push({from:r.at,to:r.at,label:o,count:1,reviews:r.kind==="review"?1:0,comments:r.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 u({label:e,value:t,tone:r}){return s.jsxs("div",{children:[s.jsx("div",{className:"text-[11px] font-semibold text-gray-500 dark:text-gray-400",children:e}),s.jsx("div",{className:`text-sm font-semibold ${r==="warn"?"text-red-600 dark:text-red-400":"text-gray-800 dark:text-gray-100"}`,children:t})]})}function R({bot:e,color:t}){const r=N(e.kind),o=e.ttfrAnomaly,a=e.typicalTtfrHours==null,c=e.typicalFollowups!=null&&e.followupCount>=e.typicalFollowups+2,d=B(e.touches),i=d.slice(0,P),l=e.touches.length-i.reduce((n,x)=>n+x.count,0),m=a?"building baseline":o?`slower than typical — usually ${h(e.typicalTtfrHours)}`:`within typical (${h(e.typicalTtfrHours)})`;return s.jsxs("div",{className:"space-y-2 rounded-lg border border-gray-200 p-3 dark:border-gray-800",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-sm font-semibold text-gray-800 dark:text-gray-100",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 px-1.5 py-0.5 text-[11px] font-medium",style:{...b(r.color),background:`${r.color}1a`},children:r.label}),e.firstTouchAt&&s.jsxs("span",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:["first touch ",y(e.firstTouchAt)]}),o&&s.jsxs("span",{className:"rounded bg-red-500/10 px-1.5 py-0.5 text-[11px] font-semibold text-red-600 dark:text-red-400",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(u,{label:"Time to first review",value:h(e.ttfrHours),tone:o?"warn":"default"}),s.jsx(u,{label:"Follow-ups",value:String(e.followupCount),tone:c?"warn":"default"}),s.jsx(u,{label:"Comments",value:String(e.commentCount)}),s.jsx(u,{label:"Touches",value:String(e.touchCount)})]}),s.jsxs("div",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:[s.jsxs("span",{className:o?"font-medium text-red-600 dark:text-red-400":"",children:[!a&&o&&s.jsx(f,{size:11,className:"mr-1 inline-block align-[-0.1em]"}),m]}),e.ttfrBasis&&!a&&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)":""]}),!a&&s.jsxs("span",{children:[" · baseline: ",e.baselinePrs," PRs"]})]}),d.length>0&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[i.map((n,x)=>s.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-gray-500/10 px-1.5 py-0.5 text-[11px] text-gray-600 dark:text-gray-300",title:`${n.count>1?`${I(n)} · `:""}${n.from===n.to?p(n.from):`${p(n.from)} – ${p(n.to)}`}`,children:[n.reviews>0&&s.jsx(C,{size:11}),n.comments>0&&s.jsx(T,{size:11}),n.count>1&&s.jsxs("span",{className:"font-medium",children:["×",n.count]}),n.label]},x)),l>0&&s.jsxs("span",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:["+",l," more touches"]})]})]})}function E({pr:e}){const{data:t,isLoading:r,isError:o}=v(e.id,!0),{data:a}=w(),c=g.useMemo(()=>{var l;return((l=(a??[]).find(m=>m.id===e.repoId))==null?void 0:l.workspaceId)??null},[a,e.repoId]),d=j(c),i=(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(k,{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-[12px] text-gray-500 dark:text-gray-400",children:"Each bot against its own usual"})]}),r?s.jsx("div",{className:"h-24 animate-pulse rounded-lg border border-gray-200 bg-gray-50 dark:border-gray-800 dark:bg-gray-900/40"}):o?s.jsx("div",{className:"text-sm text-red-500",children:"Couldn’t load bot behaviour for this PR."}):i.length===0?s.jsx("div",{className:"rounded-lg border border-dashed border-gray-300 p-6 text-center text-sm text-gray-500 dark:border-gray-700 dark:text-gray-400",children:"No automated-reviewer activity on this PR."}):i.map(l=>s.jsx(R,{bot:l,color:d({login:l.login,kind:l.kind})},l.key))]})}export{E as PrBotBehaviourTab};
1
+ import{r as g,j as s}from"./tanstack-BnbsafB1.js";import{c9 as v,ce as w,bM as j,M as k,aC as N,cs as b,bh as y,ar as f,a6 as C,w as T,aS as p,aV as $}from"./index-DDzOcB3p.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 r of e){const o=y(r.at),a=t[t.length-1];if(a&&a.label===o){a.to=r.at,a.count+=1,r.kind==="review"?a.reviews+=1:a.comments+=1;continue}t.push({from:r.at,to:r.at,label:o,count:1,reviews:r.kind==="review"?1:0,comments:r.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 u({label:e,value:t,tone:r}){return s.jsxs("div",{children:[s.jsx("div",{className:"text-[11px] font-semibold text-gray-500 dark:text-gray-400",children:e}),s.jsx("div",{className:`text-sm font-semibold ${r==="warn"?"text-red-600 dark:text-red-400":"text-gray-800 dark:text-gray-100"}`,children:t})]})}function R({bot:e,color:t}){const r=N(e.kind),o=e.ttfrAnomaly,a=e.typicalTtfrHours==null,c=e.typicalFollowups!=null&&e.followupCount>=e.typicalFollowups+2,d=B(e.touches),i=d.slice(0,P),l=e.touches.length-i.reduce((n,x)=>n+x.count,0),m=a?"building baseline":o?`slower than typical — usually ${h(e.typicalTtfrHours)}`:`within typical (${h(e.typicalTtfrHours)})`;return s.jsxs("div",{className:"space-y-2 rounded-lg border border-gray-200 p-3 dark:border-gray-800",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-sm font-semibold text-gray-800 dark:text-gray-100",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 px-1.5 py-0.5 text-[11px] font-medium",style:{...b(r.color),background:`${r.color}1a`},children:r.label}),e.firstTouchAt&&s.jsxs("span",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:["first touch ",y(e.firstTouchAt)]}),o&&s.jsxs("span",{className:"rounded bg-red-500/10 px-1.5 py-0.5 text-[11px] font-semibold text-red-600 dark:text-red-400",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(u,{label:"Time to first review",value:h(e.ttfrHours),tone:o?"warn":"default"}),s.jsx(u,{label:"Follow-ups",value:String(e.followupCount),tone:c?"warn":"default"}),s.jsx(u,{label:"Comments",value:String(e.commentCount)}),s.jsx(u,{label:"Touches",value:String(e.touchCount)})]}),s.jsxs("div",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:[s.jsxs("span",{className:o?"font-medium text-red-600 dark:text-red-400":"",children:[!a&&o&&s.jsx(f,{size:11,className:"mr-1 inline-block align-[-0.1em]"}),m]}),e.ttfrBasis&&!a&&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)":""]}),!a&&s.jsxs("span",{children:[" · baseline: ",e.baselinePrs," PRs"]})]}),d.length>0&&s.jsxs("div",{className:"flex flex-wrap items-center gap-1",children:[i.map((n,x)=>s.jsxs("span",{className:"inline-flex items-center gap-1 rounded bg-gray-500/10 px-1.5 py-0.5 text-[11px] text-gray-600 dark:text-gray-300",title:`${n.count>1?`${I(n)} · `:""}${n.from===n.to?p(n.from):`${p(n.from)} – ${p(n.to)}`}`,children:[n.reviews>0&&s.jsx(C,{size:11}),n.comments>0&&s.jsx(T,{size:11}),n.count>1&&s.jsxs("span",{className:"font-medium",children:["×",n.count]}),n.label]},x)),l>0&&s.jsxs("span",{className:"text-[11px] text-gray-500 dark:text-gray-400",children:["+",l," more touches"]})]})]})}function E({pr:e}){const{data:t,isLoading:r,isError:o}=v(e.id,!0),{data:a}=w(),c=g.useMemo(()=>{var l;return((l=(a??[]).find(m=>m.id===e.repoId))==null?void 0:l.workspaceId)??null},[a,e.repoId]),d=j(c),i=(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(k,{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-[12px] text-gray-500 dark:text-gray-400",children:"Each bot against its own usual"})]}),r?s.jsx("div",{className:"h-24 animate-pulse rounded-lg border border-gray-200 bg-gray-50 dark:border-gray-800 dark:bg-gray-900/40"}):o?s.jsx("div",{className:"text-sm text-red-500",children:"Couldn’t load bot behaviour for this PR."}):i.length===0?s.jsx("div",{className:"rounded-lg border border-dashed border-gray-300 p-6 text-center text-sm text-gray-500 dark:border-gray-700 dark:text-gray-400",children:"No automated-reviewer activity on this PR."}):i.map(l=>s.jsx(R,{bot:l,color:d({login:l.login,kind:l.kind})},l.key))]})}export{E as PrBotBehaviourTab};