From 7ff414b41274d5b2dadf34caa22ed49b04442d58 Mon Sep 17 00:00:00 2001 From: Brendan Whitney Date: Fri, 10 Jul 2026 09:27:51 -0600 Subject: [PATCH 1/2] fix: make the hidden-lines gap row clickable to expand context --- frontend/src/components/diff/DiffView.tsx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/frontend/src/components/diff/DiffView.tsx b/frontend/src/components/diff/DiffView.tsx index 1ff22cd..077232f 100644 --- a/frontend/src/components/diff/DiffView.tsx +++ b/frontend/src/components/diff/DiffView.tsx @@ -153,7 +153,10 @@ function HunkRow(props: { file: DiffFile; line: DiffLineType; lineIdx: number }) return ( <> - + expandContext(hunkNewStart(), 'up', e.currentTarget as HTMLElement, gap())} + > ⋯ {gap()} line{gap() !== 1 ? 's' : ''} hidden From c13e0e0c258b51fbc733522cbd1202e38e72d73e Mon Sep 17 00:00:00 2001 From: Brendan Whitney Date: Fri, 10 Jul 2026 09:27:51 -0600 Subject: [PATCH 2/2] build: sync dist for clickable expand row --- frontend/dist/assets/index.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/dist/assets/index.js b/frontend/dist/assets/index.js index eda86de..0f78ed7 100644 --- a/frontend/dist/assets/index.js +++ b/frontend/dist/assets/index.js @@ -89,4 +89,4 @@ Please report this to https://github.com/markedjs/marked.`,e){const a="

An err ${g.num} ${g.num} ${f} - `}const p=document.createElement("tbody");p.innerHTML=E;const m=Array.from(p.children);if(l==="up")for(const g of m)c.before(g);c.remove()}catch{}}return[O(F,{get when(){return i()},get children(){var s=sh(),l=s.firstChild,c=l.firstChild,_=c.nextSibling,u=_.nextSibling,d=u.nextSibling;return d.nextSibling,R(l,a,_),R(l,()=>a()!==1?"s":"",d),s}}),O(F,{get when(){return ie(()=>!i())()&&n()>1},get children(){var s=lh();return s.$$click=l=>o(n(),"up",l.currentTarget,20),s}}),(()=>{var s=ch(),l=s.firstChild,c=l.nextSibling,_=c.nextSibling;return R(_,()=>Fe(t.line.content)),s})()]}ge(["click"]);var ph=A("

"),mh=A("
"),Eh=A("
"),gh=A('
');function Sh(){const t=J(()=>Jl().content||""),e=J(()=>{const r=wr(t()),a=document.createElement("div");a.innerHTML=r;const i=[];let o=0;for(const s of Array.from(a.children)){const l=s.tagName.toLowerCase();if(l==="ul"||l==="ol"){const c=Array.from(s.children).filter(u=>u.tagName.toLowerCase()==="li"),_=l==="ol"?parseInt(s.getAttribute("start")||"1",10):1;for(let u=0;uet.list.filter(r=>r.item===He()&&!r.parentId&&r.status!=="dismissed").length);return(()=>{var r=ph(),a=r.firstChild;return R(a,()=>Jl().filename||"Document",null),R(a,O(F,{get when(){return n()>0},get children(){return[" ","· ",ie(()=>n())," comment",ie(()=>n()!==1?"s":"")]}}),null),R(r,O(Re,{get each(){return e()},children:i=>O(fh,{get html(){return i.html},get blockIdx(){return i.idx}})}),null),r})()}function fh(t){const[e,n]=H(!1),r=J(()=>et.list.filter(o=>o.item===He()&&o.block===t.blockIdx&&!o.parentId&&o.status!=="dismissed"));function a(o){o.target.closest(".comment-box")||o.target.closest(".reply-textarea-wrap")||r().find(l=>l.author==="user"&&l.mode==="review")||n(!0)}async function i(o){const s=await Ap({author:"user",text:o,item:He(),block:t.blockIdx,mode:"review"});pl(s),n(!1)}return[(()=>{var o=mh();return o.$$click=a,Q(s=>{var l=r().length>0,c=`md-block-${He()}-${t.blockIdx}`,_=t.blockIdx,u=t.html;return l!==s.e&&o.classList.toggle("has-comment",s.e=l),c!==s.t&&ce(o,"id",s.t=c),_!==s.a&&ce(o,"data-block",s.a=_),u!==s.o&&(o.innerHTML=s.o=u),s},{e:void 0,t:void 0,a:void 0,o:void 0}),o})(),O(Re,{get each(){return r()},children:o=>(()=>{var s=gh(),l=s.firstChild;return R(l,O(sm,{comment:o})),s})()}),O(F,{get when(){return e()},get children(){var o=Eh();return R(o,O(xr,{onSave:i,onCancel:()=>n(!1)})),o}})]}ge(["click"]);var Th=A("
"),bh=A("
"),Rh=A("
Click line to comment · Cmd+Enter save · f search (!test *.py) · w whole file · e reviewed · c commits · n/p next/prev comment · Shift Shift symbol search"),Ch=A("
Click any block to comment · Cmd+Enter save · Esc cancel"),hh=A("
No changes to review");function Nh(){const[t,e]=H(!1),n=`lgtm-active-item:${_n()}`,r=new Map;function a(){var x;const N=He(),I=document.getElementById("diff-container");r.set(N,{filePath:((x=jt())==null?void 0:x.path)??null,scrollTop:(I==null?void 0:I.scrollTop)??0})}function i(N){const I=r.get(N);I&&requestAnimationFrame(()=>{const x=document.getElementById("diff-container");x&&(x.scrollTop=I.scrollTop)})}async function o(){try{const N=await lp();Km(N)}catch{}}async function s(){try{const N=await Vm();Zm(N)}catch{}}async function l(){try{const N=await EE();ic(N.walkthrough),oc(N.stale),uE()}catch{ic(null),oc(!1)}}async function c(){if(!(ye().length>0))try{const N=await Er("diff");N.mode==="diff"&&(ea(aa(N.diff)),wn().repoPath||Zl(N.meta||{}))}catch{}}async function _(N){a(),zm(N),localStorage.setItem(n,N);const I=await Er(N);if(I.mode==="diff"){Zl(I.meta||{}),Xl("diff"),ea(aa(I.diff));const x=r.get(N),B=x==null?void 0:x.filePath,P=B?ye().find(M=>M.path===B):void 0;P?_r(P.path):ye().length>0?_r(ye()[0].path):kt(null),$n(!1),await s();try{const M=await Ys();if(jl(M),M.length>0&&!(wn().branch===wn().baseBranch))for(const U of M)Sr(U.sha,!0)}catch{}}else I.mode==="file"&&(Xl("file"),e(!1),Wm({content:I.content,filename:I.filename,filepath:I.filepath,markdown:I.markdown,title:I.title}),await s());i(N)}async function u(){try{await o(),await _(He()),qe("Refreshed")}catch(N){qe("Failed to refresh: "+N.message)}}async function d(){var N;try{const I=He(),x={};document.querySelectorAll(".md-block[data-block]").forEach(w=>{var Y,X;const U=w.dataset.block;if(U!=null){const ne=`${I}-${U}`;x[ne]=((X=(Y=w.textContent)==null?void 0:Y.trim())==null?void 0:X.slice(0,80))||`Block ${U}`}});const B=bE(et.list,ye(),Mt(),x,I),P=await up(B,{},I),M=I==="diff"?"Code Changes":((N=Mt().find(w=>w.id===I))==null?void 0:N.title)??I;qe(`Review round ${P.round} submitted for ${M}!`,3e3),on("list",w=>w.filter(U=>U.item!==I)),lc()}catch(I){qe("Failed to submit: "+I.message)}}async function E(N){try{const I=await pp(N);qe("Review submitted to GitHub!",3e3),I.reviewUrl&&window.open(I.reviewUrl,"_blank"),on("list",x=>x.filter(B=>B.item!=="diff")),lc()}catch(I){qe("GitHub submit failed: "+I.message)}}async function p(N){try{await dp(N),await o(),He()===N&&await _("diff")}catch(I){qe("Failed to remove: "+I.message)}}async function m(){e(!1);const N=Jt().filter(x=>Fp[x.sha]).map(x=>x.sha),I=N.length>0&&N.length0&&_r(ye()[0].path),qe(`Showing ${N.length} commit${N.length!==1?"s":""}`)}catch(x){qe("Failed to apply: "+x.message)}}function g(N){const I=document.getElementById("diff-container"),x=Array.from(I.querySelectorAll("tr.comment-row, tr.claude-comment-row"));if(x.length===0)return;const B=I.getBoundingClientRect();if(N==="next"){const P=x.find(M=>M.getBoundingClientRect().top>B.top+10);P?P.scrollIntoView({block:"center",behavior:"smooth"}):x[0].scrollIntoView({block:"center",behavior:"smooth"})}else{const P=x.reverse().find(M=>M.getBoundingClientRect().tope(!t()),onJumpComment:g,onSymbolSearch:()=>Mp(!wp()),onOpenPalette:()=>ul(!Zs()),onOpenHelp:()=>Pp(!xp())}),Ve(()=>{const N=Ye(),I=tt();N&&N.stops[I]&&$p(N.stops[I].id)}),Ve(()=>{Ye()&&c()}),Ve(()=>{var I;if(!document.body.classList.contains("embedded"))return;const N=Ye()!==null;(I=window.parent)==null||I.postMessage({type:"lgtm-walkthrough-availability",has:N},"*")});function f(){const N=new Set;for(const I of ye()){const x=I.path.toLowerCase();x.endsWith(".py")?N.add("python"):x.endsWith(".ts")||x.endsWith(".tsx")||x.endsWith(".js")||x.endsWith(".jsx")?N.add("typescript"):x.endsWith(".rs")&&N.add("rust")}return[...N]}function b(N){for(const I of["python","typescript","rust"]){const x=N[I];dl(I,x==="partial"?"ok":x)}}let T=null,h="";async function v(){try{const N=await ol();b(N)}catch{}}Ve(()=>{const N=f(),I=N.slice().sort().join(",");I===h||N.length===0||(h=I,Tp(N).then(b).catch(()=>{}))});async function S(){try{ta(await ra())}catch{}}async function L(){const[N,I]=await Promise.all([$s().catch(()=>null),ra().catch(()=>null)]);N&&ec(N),ta(I)}function D(){const N=new EventSource(`${_e()}/events`);N.addEventListener("comments_changed",async()=>{const I=et.list.filter(B=>(B==null?void 0:B.author)==="claude"&&!B.parentId).length;await s(),et.list.filter(B=>(B==null?void 0:B.author)==="claude"&&!B.parentId).length>I&&qe("New comments from Claude",2e3)}),N.addEventListener("items_changed",()=>{o().then(()=>qe("Review items updated",2e3))}),N.addEventListener("walkthrough_changed",()=>{l().then(()=>qe("Walkthrough updated",2e3))}),N.addEventListener("analysis_changed",()=>{L()}),N.addEventListener("git_changed",async()=>{u(),l();try{const I=await Ys();jl(I)}catch{}await S()}),N.onerror=()=>{N.close(),setTimeout(D,5e3)}}It(async()=>{await NE(),IE(),aE(),await o();const N=await $s();N&&ec(N),ta(await ra().catch(()=>null)),Qm(await pE().catch(()=>({claimed:!1,alive:!1,claimedAt:null}))),await l();const I=new URLSearchParams(window.location.search).get("item"),x=I&&Mt().some(Y=>Y.id===I),B=localStorage.getItem(n),P=B&&Mt().some(Y=>Y.id===B);await _(x?I:P?B:"diff");const M=wn();M.repoName&&(document.title=`${M.repoName} — ${M.branch||""}`),y(),D(),v(),T=window.setInterval(v,5e3);const w=document.getElementById("resize-handle"),U=document.querySelector(".sidebar");if(w&&U){let Y=!1;w.addEventListener("mousedown",X=>{Y=!0,w.classList.add("dragging"),document.body.style.cursor="col-resize",document.body.style.userSelect="none",X.preventDefault()}),document.addEventListener("mousemove",X=>{Y&&(U.style.width=Math.min(Math.max(X.clientX,150),600)+"px")}),document.addEventListener("mouseup",()=>{Y&&(Y=!1,w.classList.remove("dragging"),document.body.style.cursor="",document.body.style.userSelect="")})}}),ft(()=>{T!=null&&(clearInterval(T),T=null)});function y(){var P;const N=window.location.hash.match(/#file=(.+)/);if(!N)return;const I=decodeURIComponent(N[1]);if(!ye().find(M=>M.path===I))return;const B=I.split("/");for(let M=1;Me(!t()),get showCommitToggle(){return ie(()=>Wt()==="diff")()&&Jt().length>0}}),O(AC,{onSwitchItem:_,onCloseTab:p}),O(wC,{get visible(){return t()},onApply:m}),(()=>{var N=bh(),I=N.firstChild;return R(N,O(F,{get when(){return Wt()==="diff"},get children(){return[O(JC,{}),Th()]}}),I),R(I,O(F,{get when(){return Pn()},get fallback(){return O(F,{get when(){return Wt()==="diff"},get fallback(){return O(Sh,{})},get children(){return O(F,{get when(){return ye().length>0},get fallback(){return hh()},get children(){return O(dh,{})}})}})},get children(){return O(zR,{})}})),N})(),O(wE,{}),O(F,{get when(){return Wt()==="diff"},get children(){return Rh()}}),O(F,{get when(){return Wt()==="file"},get children(){return Ch()}}),O(pb,{}),O(vb,{}),O(Mb,{}),O(Vb,{})]}var Oh=A("

LGTM

Registered projects"),vh=A("
Loading…"),Ih=A("
"),Ah=A("
No projects registered yet. Run the MCP start tool from a project to register it."),yh=A("(repo missing)"),Dh=A("
"),Lh=A("Remove?"),wh=A("