getgloss 0.8.2 → 0.8.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -233,7 +233,7 @@ Error generating stack: `+n.message+`
233
233
  * See the LICENSE file in the root directory of this source tree.
234
234
  */const U1=[["path",{d:"M18 6 6 18",key:"1bl5f8"}],["path",{d:"m6 6 12 12",key:"d8bk6v"}]],df=Ee("x",U1);function lu(i,r={}){const d=Math.min(i.startLine,i.endLine),o=Math.max(i.startLine,i.endLine);if(d===o)return`${i.side}${d}`;const p=r.repeatSideOnEnd===!1?"":i.side;return`${i.side}${d}-${p}${o}`}function H1(i,r=[]){const d=(i==null?void 0:i.comments)??[],o=new Set(r.map(N=>N.commentId)),p=d.filter(N=>o.has(N.id)).length;return{total:d.length,resolved:p,open:d.length-p}}function Zm(i){var r;return H1(i.feedback,((r=i.resolution)==null?void 0:r.comments)??[])}const L1="brew install iamrajjoshi/tap/gloss",q1="npm install -g getgloss",B1="gloss open --json",lf="npx getgloss open --json",Nm="npx skills add iamrajjoshi/gloss --skill gloss -g -a claude-code",Y1={side:"R",startLine:45,endLine:45},G1=[{id:"seed-human-review",side:"R",startLine:45,endLine:45,body:"Apply the review feedback before resolving the thread so the agent cannot skip the human pass.",createdAt:"2026-05-23T00:00:00.000Z"}],Tm=[{key:"open-review",oldLine:38,newLine:38,side:"R",tone:"neutral",code:"const review = await gloss.open({ base: 'HEAD' });"},{key:"add-reviewer",oldLine:39,newLine:39,side:"R",tone:"neutral",hiddenUntilExpanded:!0,code:"review.addReviewer('human');"},{key:"blocking-mode",oldLine:40,newLine:40,side:"R",tone:"neutral",hiddenUntilExpanded:!0,code:"review.setMode('blocking');"},{key:"wait-feedback",oldLine:41,newLine:41,side:"R",tone:"neutral",hiddenUntilExpanded:!0,code:"const feedback = await review.waitForFeedback();"},{key:"filter-comments",oldLine:42,newLine:42,side:"R",tone:"neutral",code:"const comments = feedback.comments.filter((comment) => comment.actionable);"},{key:"skip-review",oldLine:43,side:"L",tone:"remove",code:"agent.resumeWithoutReview();"},{key:"skip-status",oldLine:44,side:"L",tone:"remove",code:"agent.postStatus('review skipped');"},{key:"guard-comments",newLine:45,side:"R",tone:"add",code:"if (comments.length > 0) {"},{key:"apply-feedback",newLine:46,side:"R",tone:"add",code:" await agent.applyFeedback(comments);"},{key:"resolve-threads",newLine:47,side:"R",tone:"add",code:" await review.resolveThreads(comments);"},{key:"run-checks",newLine:48,side:"R",tone:"add",code:" await agent.runChecks(['pnpm check', 'pnpm test']);"},{key:"close-guard",newLine:49,side:"R",tone:"add",code:"}"},{key:"write-markdown",newLine:50,side:"R",tone:"add",code:"await review.writeFeedbackMarkdown();"},{key:"attach-validation",newLine:51,side:"R",tone:"add",code:"await review.attachValidation('pnpm test');"},{key:"resume-reviewed",newLine:52,side:"R",tone:"add",code:"await agent.resume({ reviewed: true });"},{key:"summary",oldLine:45,newLine:53,side:"R",tone:"neutral",code:"return review.summary();"}];function X1(i){return i.startLine===i.endLine?`Comment on line ${lu(i)}`:`Comment on range ${lu(i)}`}function Q1(i,r){const d=typeof crypto<"u"&&"randomUUID"in crypto?crypto.randomUUID():`${Date.now()}-${Math.random().toString(16).slice(2)}`;return{...r,id:d,body:i,createdAt:new Date().toISOString()}}function sf({value:i,label:r}){const[d,o]=B.useState(!1);return s.jsxs("button",{className:"marketing-copy",type:"button",onClick:async()=>{await navigator.clipboard.writeText(i),o(!0),window.setTimeout(()=>o(!1),1400)},children:[d?s.jsx(rn,{size:15}):s.jsx(K0,{size:15}),s.jsx("span",{children:d?"Copied":r})]})}function Ei({command:i}){return s.jsxs("div",{className:"command-line",children:[s.jsx("span",{children:"$"}),s.jsx("code",{children:i}),s.jsx(sf,{value:i,label:"Copy"})]})}function V1(){const[i,r]=B.useState(!0),[d,o]=B.useState(Y1),[p,N]=B.useState(!1),[R,w]=B.useState(null),[O,v]=B.useState(""),[D,M]=B.useState(G1),[q,Z]=B.useState("idle"),k=q==="submitted",fe=D.find(G=>G.id===R),Ae=X1(d),L=O.trim(),je=`${D.length} review comment${D.length===1?"":"s"}`,me=k?[{marker:"✓",text:"review.submitted received"},{marker:"→",text:"reading ~/.gloss/reviews/01KS5/feedback.json"},{marker:"→",text:`applying ${je}`},{marker:"→",text:"running pnpm check"}]:[{marker:"$",text:"gloss open --json"},{marker:"→",text:"captured 4 files, +128 -31"},{marker:"→",text:"waiting for review.submitted"}],te=i?Tm:Tm.filter(G=>!G.hiddenUntilExpanded),Ne=B.useMemo(()=>JSON.stringify({reviewId:"01KS5...",comments:D.map(G=>({filePath:"src/web/routes/Home.tsx",side:G.side,startLine:G.startLine,endLine:G.endLine,body:G.body}))},null,2),[D]),ne=(G,H)=>d.side===G&&d.startLine===H&&d.endLine===H,W=G=>{o(G),w(null),v(""),N(!0),Z("idle")},pe=G=>{o({side:G.side,startLine:G.startLine,endLine:G.endLine}),w(G.id),v(G.body),N(!0),Z("idle")},Qe=()=>{L&&(M(G=>R?G.map(H=>H.id===R?{...H,body:L}:H):[...G,Q1(L,d)]),v(""),w(null),N(!1),Z("idle"))},pt=G=>{M(H=>H.filter(V=>V.id!==G)),R===G&&(w(null),v(""),N(!1)),Z("idle")},Ie=(G,H)=>D.filter(V=>V.side===G&&Math.max(V.startLine,V.endLine)===H&&Math.min(V.startLine,V.endLine)===H);return s.jsxs("section",{className:"hero-scene","aria-label":"Simulated Gloss code review",children:[s.jsxs("div",{className:"scene-topbar",children:[s.jsxs("div",{className:"scene-brand",children:[s.jsx("img",{className:"brand-mark",src:"/logo.svg",alt:"","aria-hidden":"true"}),s.jsx("span",{children:"Gloss review"})]}),s.jsxs("div",{className:"scene-meta",children:[s.jsx(Ti,{size:14}),s.jsx("span",{children:"raj--gloss--static-site"})]})]}),s.jsxs("div",{className:"scene-shell",children:[s.jsxs("div",{className:"scene-terminal",children:[s.jsxs("div",{className:"terminal-header",children:[s.jsx(cf,{size:14}),s.jsx("span",{children:"agent terminal"})]}),s.jsx("div",{className:"terminal-lines",children:me.map(G=>s.jsxs("p",{children:[s.jsx("span",{children:G.marker})," ",G.text]},G.text))})]}),s.jsxs("div",{className:"scene-review",children:[s.jsxs("button",{className:"scene-file-header",type:"button",children:[s.jsx(au,{size:16}),s.jsx($0,{size:15}),s.jsx("span",{children:"src/web/routes/Home.tsx"}),s.jsx("b",{className:"scene-add",children:"+74"}),s.jsx("b",{className:"scene-del",children:"-6"})]}),s.jsx("button",{className:"scene-hidden",type:"button",onClick:()=>r(G=>!G),children:i?"Hide unchanged context":"194 unmodified lines"}),s.jsx("div",{className:"scene-hunk",children:"@@ -38,11 +38,20 @@ export function Home()"}),te.map(G=>{const H=G.side==="L"?G.oldLine:G.newLine;if(H==null)return null;const V=ne(G.side,H),le=k&&(G.key==="skip-review"||G.key==="skip-status"),S=k&&["apply-feedback","resolve-threads","run-checks"].includes(G.key);return s.jsxs("div",{children:[s.jsxs("button",{className:`scene-row ${G.tone} ${G.hiddenUntilExpanded?"dimmed":""} ${V?"selected":""} ${le?"agent-dimmed":""} ${S?"agent-applied":""}`,type:"button","aria-pressed":V,onClick:()=>W({side:G.side,startLine:H,endLine:H}),children:[s.jsx("span",{children:G.oldLine??""}),s.jsx("span",{children:G.newLine??""}),s.jsx("code",{children:G.code||" "})]}),k&&G.key==="apply-feedback"?s.jsxs("div",{className:"scene-applied-status",children:[s.jsx(rn,{size:13}),s.jsx("span",{children:"applied by agent"})]}):null,s.jsx(Z1,{comments:Ie(G.side,H),onOpen:pe,onRemove:pt}),p&&d.side===G.side&&d.endLine===H?s.jsxs("div",{className:"scene-composer",children:[s.jsxs("div",{className:"scene-composer-title",children:[s.jsx("strong",{children:fe?"Review comment":"New local comment"}),s.jsx("span",{children:Ae})]}),s.jsx("textarea",{"aria-label":Ae,placeholder:"Request change",value:O,onChange:C=>v(C.target.value)}),s.jsxs("div",{className:"scene-composer-actions",children:[s.jsx("button",{className:"scene-secondary-action",type:"button",onClick:()=>{v(""),w(null),N(!1)},children:"Cancel"}),s.jsx("button",{type:"button",disabled:!L,onClick:Qe,children:fe?"Update":"Comment"})]})]}):null]},G.key)})]}),s.jsx("div",{className:"scene-feedback",children:k?s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"feedback-title",children:[s.jsx(cf,{size:15}),s.jsx("span",{children:"agent is updating"})]}),s.jsxs("div",{className:"agent-update-card",children:[s.jsx("code",{children:"~/.gloss/reviews/01KS5/feedback.json"}),s.jsx("ul",{children:["Read feedback","Resolved comment","Validated"].map(G=>s.jsxs("li",{children:[s.jsx(rn,{size:13}),s.jsx("span",{children:G})]},G))})]})]}):s.jsxs(s.Fragment,{children:[s.jsxs("div",{className:"feedback-title",children:[s.jsx(t1,{size:15}),s.jsx("span",{children:"~/.gloss/reviews/01KS5/feedback.json"})]}),s.jsx("pre",{children:Ne})]})})]}),s.jsxs("div",{className:"scene-submit",children:[s.jsx("span",{children:D.length===0?"No local comments yet":k?"Sent to agent":`${D.length} local comment${D.length===1?"":"s"} ready`}),s.jsxs("button",{type:"button",disabled:D.length===0,onClick:()=>Z("submitted"),children:[k?s.jsx(rn,{size:14}):s.jsx(j1,{size:14}),k?"Sent to agent":"Submit review"]})]})]})}function Z1({comments:i,onOpen:r,onRemove:d}){return i.map(o=>s.jsxs("div",{className:"scene-inline-comment",children:[s.jsxs("button",{className:"scene-inline-comment-body",type:"button",onClick:()=>r(o),children:[s.jsx(Qm,{size:14}),s.jsx("span",{children:o.body})]}),s.jsx("button",{className:"scene-inline-comment-remove",type:"button",title:`Remove comment on ${o.side}${o.startLine}`,onClick:()=>d(o.id),children:s.jsx(Vm,{size:13})})]},o.id))}function Ia({step:i,title:r,body:d}){return s.jsxs("div",{className:"workflow-step",children:[s.jsx("span",{children:i}),s.jsxs("div",{children:[s.jsx("h3",{children:r}),s.jsx("p",{children:d})]})]})}function k1(){return s.jsxs("section",{className:"marketing-band demo-video-band",id:"demo",children:[s.jsxs("div",{className:"demo-video-header",children:[s.jsxs("div",{className:"section-heading",children:[s.jsx("p",{children:"Demo"}),s.jsx("h2",{children:"Watch the local review loop run for real."})]}),s.jsx("p",{className:"demo-video-caption",children:"A real pass through the loop: open a local diff, leave review comments, hand them back to the agent."})]}),s.jsx("div",{className:"demo-video-frame",children:s.jsxs("video",{"aria-label":"Gloss product walkthrough showing local diff review comments sent back to an agent",controls:!0,poster:"/gloss-demo-poster.jpg",preload:"metadata",children:[s.jsx("source",{src:"/gloss-demo.mp4",type:"video/mp4"}),s.jsx("track",{default:!0,kind:"captions",label:"English",src:"/gloss-demo-captions.vtt",srcLang:"en"}),"Your browser does not support the video tag."]})})]})}function K1(){return s.jsxs("main",{className:"marketing-page",children:[s.jsxs("section",{className:"marketing-hero",children:[s.jsxs("div",{className:"hero-copy",children:[s.jsxs("div",{className:"hero-copy-main",children:[s.jsx("div",{className:"hero-logo",children:s.jsx("img",{className:"brand-mark",src:"/logo-mark.svg",alt:"Gloss logo"})}),s.jsx("h1",{children:"Gloss"}),s.jsx("p",{className:"hero-subtitle",children:"Review agent-written diffs in your browser."}),s.jsxs("p",{className:"hero-body",children:["Gloss opens your working-tree diff in a local browser, then writes"," ",s.jsx("code",{children:"feedback.json"})," for your agent and ",s.jsx("code",{children:"feedback.md"})," for humans."]}),s.jsxs("div",{className:"hero-actions",children:[s.jsxs("a",{className:"hero-primary",href:"#install",children:["Install with Homebrew",s.jsx(Ym,{size:17})]}),s.jsx("a",{className:"hero-secondary",href:"/setup/",children:"Agent setup"})]})]}),s.jsxs("aside",{className:"hero-quickstart","aria-label":"Quick start command",children:[s.jsx("span",{children:"Run without setup"}),s.jsx("code",{children:lf}),s.jsx(sf,{value:lf,label:"Copy command"})]})]}),s.jsx(V1,{})]}),s.jsx(k1,{}),s.jsxs("section",{className:"marketing-band install-band",id:"install",children:[s.jsxs("div",{className:"section-heading",children:[s.jsx("p",{children:"Install"}),s.jsx("h2",{children:"Start the review loop in one command."})]}),s.jsxs("div",{className:"install-grid",children:[s.jsx(Ei,{command:L1}),s.jsx(Ei,{command:q1}),s.jsx(Ei,{command:B1}),s.jsx(Ei,{command:lf})]}),s.jsxs("div",{className:"agent-prompt",children:[s.jsxs("div",{className:"agent-prompt-label",children:[s.jsx(cf,{size:18}),s.jsx("span",{children:"Packaged skill"})]}),s.jsx("p",{children:"Install the bundled agent skill so Claude Code knows when to open Gloss and how to use the feedback."}),s.jsx("div",{className:"agent-prompt-links",children:s.jsx("a",{href:"/setup/",children:"Agent setup"})}),s.jsxs("div",{className:"agent-skill-command",children:[s.jsx("code",{children:Nm}),s.jsx(sf,{value:Nm,label:"Copy install"})]})]})]}),s.jsxs("section",{className:"marketing-band workflow-band",id:"workflow",children:[s.jsx("div",{className:"section-heading",children:s.jsx("p",{children:"How it works"})}),s.jsxs("div",{className:"workflow-story",children:[s.jsx(Ia,{step:"01",title:"Open a review",body:"The agent runs `gloss open --json`."}),s.jsx(Ia,{step:"02",title:"Wait",body:"Gloss blocks while you review the diff."}),s.jsx(Ia,{step:"03",title:"Receive feedback",body:"The agent reads `feedbackPath`."}),s.jsx(Ia,{step:"04",title:"Fix and validate",body:"The agent applies comments and runs checks."}),s.jsx(Ia,{step:"05",title:"Resolve",body:"The agent runs `gloss resolve`."})]})]}),s.jsxs("section",{className:"marketing-band contract-band",id:"contract",children:[s.jsxs("div",{className:"section-heading",children:[s.jsx("p",{children:"Output"}),s.jsx("h2",{children:"What the agent reads."})]}),s.jsxs("div",{className:"contract-layout",children:[s.jsx("pre",{children:`~/.gloss/reviews/<reviewId>/feedback.json
235
235
  ~/.gloss/reviews/<reviewId>/feedback.md
236
- ~/.gloss/reviews/<reviewId>/resolved.json`}),s.jsx("div",{className:"contract-copy",children:s.jsxs("p",{children:[s.jsx("code",{children:"feedback.json"})," is the machine-readable handoff; ",s.jsx("code",{children:"feedback.md"})," ","is the human-readable copy; ",s.jsx("code",{children:"resolved.json"})," tracks comment and review resolution progress."]})})]})]}),s.jsx("footer",{className:"marketing-footer",children:s.jsxs("a",{href:"https://github.com/iamrajjoshi/gloss",target:"_blank",rel:"noreferrer",children:[s.jsx(Ti,{size:16}),s.jsx("span",{children:"GitHub"})]})})]})}var J1=qm();const $1={mode:"all"};function F1(i=$1,r=[]){if(i.mode==="all")return"All commits";if(i.mode==="single"){const p=r.find(N=>N.commit.sha===i.sha);return p?`${p.commit.shortSha} ${p.commit.subject}`:`Commit ${nf(i.sha)}`}const d=r.findIndex(p=>p.commit.sha===i.fromSha),o=r.findIndex(p=>p.commit.sha===i.toSha);return d>=0&&o>=d?`${o-d+1} commits · ${r[d].commit.shortSha} to ${r[o].commit.shortSha}`:`Commit range ${nf(i.fromSha)} to ${nf(i.toSha)}`}function nf(i){return i.slice(0,7)}function zm(i){var d;const r=(d=i.meta.branch??i.diff.branch)==null?void 0:d.trim();return r||W1(i.diff)}function W1(i){switch(i.scope.mode){case"branch":return"Branch diff";case"explicit":return`Diff against ${i.scope.requestedBase??i.base.ref}`;case"working":return"Working changes"}}function I1(i){return i==="submitted"||i==="resolved"}const P1=["L","R"],ev=["pending","submitted","cancelled","resolved"],tv=["context","add","delete"],lv=["working","branch","explicit"],nv=["working-tree-clean","missing-branch-base"],av=["all","single","range"],uv=["partial","resolved"],iv=["review-resolved","comment-resolved","comment-reopened","turn-created"];function cv(i,r,d){const o=JSON.parse(i);return km(o,r,d)}function km(i,r,d){if(!r(i))throw new Error(`Invalid ${d}`);return i}function sv(i){return Ce(i)&&P(i.reviewId)&&Je(i.turnId)&&ea(i.turnIndex)&&P(i.url)&&Xe(i.files)&&ea(i.comments)&&Je(i.feedbackPath)&&Je(i.markdownPath)&&Je(i.artifactDir)}function fv(i){return Ce(i)&&i.ok===!0&&P(i.path)}function ov(i){return Ce(i)&&P(i.fromSha)&&P(i.toSha)&&_i(i.stats)&&P(i.rawDiff)&&Jt(i.files,mf)}function rv(i){return Ce(i)&&mv(i.meta)&&Jt(i.turns,vv)&&Km(i.diff)&&dn(i.feedback,Jm)&&dn(i.resolution,$m)}function dv(i){return Ce(i)&&P(i.id)&&P(i.cwd)&&Ai(i.base)&&yl(i.branch)&&hf(i.status)&&P(i.createdAt)&&Je(i.submittedAt)&&Je(i.resolvedAt)&&Je(i.artifactDir)&&Je(i.activeTurnId)&&dn(i.turns,r=>Jt(r,yv))&&Je(i.feedbackPath)&&Je(i.markdownPath)}function mv(i){return dv(i)&&P(i.artifactDir)}function Km(i){return Ce(i)&&Ai(i.base)&&yl(i.branch)&&P(i.cwd)&&gv(i.scope)&&_i(i.stats)&&P(i.rawDiff)&&Jt(i.files,mf)&&dn(i.commitDiffs,r=>Jt(r,bv))&&P(i.capturedAt)}function Jm(i){return Ce(i)&&i.version===1&&P(i.reviewId)&&Je(i.turnId)&&ea(i.turnIndex)&&P(i.timestamp)&&Ai(i.base)&&yl(i.branch)&&dn(i.reviewScope,xv)&&Jt(i.comments,Nv)}function $m(i){return Ce(i)&&P(i.reviewId)&&Je(i.turnId)&&ea(i.turnIndex)&&Im(i.status)&&yl(i.summary)&&yl(i.resolvedAt)&&Jt(i.comments,Tv)}function hv(i){if(!Ce(i)||!P(i.reviewId)||!P(i.type))return!1;switch(i.type){case"review.opened":case"review.cancelled":return!0;case"review.turn.created":return P(i.turnId)&&Xe(i.turnIndex)&&eu(i.reused);case"review.submitted":return Je(i.turnId)&&ea(i.turnIndex)&&Ce(i.counts)&&Xe(i.counts.files)&&Xe(i.counts.comments);case"review.updated":return Je(i.turnId)&&ea(i.turnIndex)&&zv(i.reason)&&hf(i.status)&&Im(i.resolutionStatus)&&Wm(i.counts);default:return!1}}function Fm(i){return Ce(i)&&P(i.id)&&Xe(i.index)&&hf(i.status)&&P(i.createdAt)&&Je(i.submittedAt)&&Je(i.resolvedAt)&&P(i.artifactDir)&&P(i.diffPath)&&Je(i.feedbackPath)&&Je(i.markdownPath)&&Je(i.resolvedPath)}function yv(i){return!Ce(i)||!Fm(i)?!1:P(i.capturedAt)&&_i(i.stats)&&Wm(i.comments)}function vv(i){return!Ce(i)||!Fm(i)?!1:Km(i.diff)&&dn(i.feedback,Jm)&&dn(i.resolution,$m)}function gv(i){return Ce(i)&&Gl(i.mode,lv)&&yl(i.requestedBase)&&Ai(i.base)&&pv(i.comparison)&&(i.fallbackReason===null||Gl(i.fallbackReason,nv))}function pv(i){return Ce(i)&&P(i.ref)&&yl(i.sha)}function Ai(i){return Ce(i)&&P(i.ref)&&P(i.sha)}function _i(i){return Ce(i)&&Xe(i.files)&&Xe(i.additions)&&Xe(i.deletions)}function Sv(i){return Ce(i)&&P(i.sha)&&P(i.shortSha)&&P(i.subject)&&P(i.authorName)&&P(i.authorEmail)&&P(i.authoredAt)&&P(i.committedAt)}function bv(i){return Ce(i)&&Sv(i.commit)&&_i(i.stats)&&P(i.rawDiff)&&Jt(i.files,mf)}function xv(i){if(!Ce(i)||!Gl(i.mode,av))return!1;switch(i.mode){case"all":return!0;case"single":return P(i.sha);case"range":return P(i.fromSha)&&P(i.toSha)}}function mf(i){return Ce(i)&&P(i.path)&&yl(i.oldPath)&&Xe(i.additions)&&Xe(i.deletions)&&eu(i.isBinary)&&eu(i.isDeleted)&&eu(i.isNew)&&eu(i.isRenamed)&&yl(i.language)&&Jt(i.hunks,jv)}function jv(i){return Ce(i)&&Xe(i.oldStart)&&Xe(i.oldLines)&&Xe(i.newStart)&&Xe(i.newLines)&&P(i.header)&&Jt(i.lines,Ev)}function Ev(i){return Ce(i)&&Gl(i.type,tv)&&Am(i.oldLine)&&Am(i.newLine)&&P(i.content)}function Nv(i){return Ce(i)&&P(i.id)&&P(i.filePath)&&Xe(i.startLine)&&Xe(i.endLine)&&Gl(i.side,P1)&&P(i.body)&&P(i.originalSnippet)&&P(i.createdAt)}function Tv(i){return Ce(i)&&P(i.commentId)&&i.status==="resolved"&&Je(i.summary)&&P(i.resolvedAt)}function Wm(i){return Ce(i)&&Xe(i.total)&&Xe(i.resolved)&&Xe(i.open)}function hf(i){return Gl(i,ev)}function Im(i){return Gl(i,uv)}function zv(i){return Gl(i,iv)}function Ce(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function Jt(i,r){return Array.isArray(i)&&i.every(r)}function dn(i,r){return i===void 0||r(i)}function P(i){return typeof i=="string"}function Je(i){return i===void 0||P(i)}function yl(i){return i===null||P(i)}function Xe(i){return typeof i=="number"&&Number.isFinite(i)}function ea(i){return i===void 0||Xe(i)}function Am(i){return i===null||Xe(i)}function eu(i){return typeof i=="boolean"}function Gl(i,r){return typeof i=="string"&&r.includes(i)}async function Mi(i,r,d){if(!i.ok)throw new Error(`${i.status}: ${await i.text()}`);const o=await i.json();return km(o,r,d)}async function _m(i){return Mi(await fetch(`/api/reviews/${i}`),rv,"review response")}async function Av(i,r,d){const o={comments:r,reviewScope:d};return Mi(await fetch(`/api/reviews/${i}/submit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(o)}),sv,"submit review response")}async function _v(i,r,d){const o={filePath:r,turnId:d};return Mi(await fetch(`/api/reviews/${i}/files/open`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(o)}),fv,"open file response")}async function Mv(i,r,d,o){const p={fromSha:r,toSha:d,turnId:o};return Mi(await fetch(`/api/reviews/${i}/commits/range`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(p)}),ov,"commit range diff response")}const Dv="modulepreload",Ov=function(i){return"/"+i},Mm={},Cv=function(r,d,o){let p=Promise.resolve();if(d&&d.length>0){let R=function(v){return Promise.all(v.map(D=>Promise.resolve(D).then(M=>({status:"fulfilled",value:M}),M=>({status:"rejected",reason:M}))))};document.getElementsByTagName("link");const w=document.querySelector("meta[property=csp-nonce]"),O=(w==null?void 0:w.nonce)||(w==null?void 0:w.getAttribute("nonce"));p=R(d.map(v=>{if(v=Ov(v),v in Mm)return;Mm[v]=!0;const D=v.endsWith(".css"),M=D?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${M}`))return;const q=document.createElement("link");if(q.rel=D?"stylesheet":Dv,D||(q.as="script"),q.crossOrigin="",q.href=v,O&&q.setAttribute("nonce",O),document.head.appendChild(q),D)return new Promise((Z,k)=>{q.addEventListener("load",Z),q.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${v}`)))})}))}function N(R){const w=new Event("vite:preloadError",{cancelable:!0});if(w.payload=R,window.dispatchEvent(w),!w.defaultPrevented)throw R}return p.then(R=>{for(const w of R||[])w.status==="rejected"&&N(w.reason);return r().catch(N)})};function yf(i){return i.type==="delete"?"L":"R"}function vf(i){return yf(i)==="L"?i.oldLine:i.newLine}function nu(i,r){return`${i}:${r}`}const Pm="0123456789ABCDEFGHJKMNPQRSTVWXYZ",zi=32,Rv=16,eh=10,Dm=0xffffffffffff;var on;(function(i){i.Base32IncorrectEncoding="B32_ENC_INVALID",i.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",i.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",i.EncodeTimeNegative="ENC_TIME_NEG",i.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",i.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",i.PRNGDetectFailure="PRNG_DETECT",i.ULIDInvalid="ULID_INVALID",i.Unexpected="UNEXPECTED",i.UUIDInvalid="UUID_INVALID"})(on||(on={}));class tu extends Error{constructor(r,d){super(`${d} (${r})`),this.name="ULIDError",this.code=r}}function wv(i){const r=Math.floor(i()*zi)%zi;return Pm.charAt(r)}function Uv(i){const r=Hv(),d=r&&(r.crypto||r.msCrypto)||null;if(typeof(d==null?void 0:d.getRandomValues)=="function")return()=>{const o=new Uint8Array(1);return d.getRandomValues(o),o[0]/256};if(typeof(d==null?void 0:d.randomBytes)=="function")return()=>d.randomBytes(1).readUInt8()/256;throw new tu(on.PRNGDetectFailure,"Failed to find a reliable PRNG")}function Hv(){return Bv()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function Lv(i,r){let d="";for(;i>0;i--)d=wv(r)+d;return d}function qv(i,r=eh){if(isNaN(i))throw new tu(on.EncodeTimeValueMalformed,`Time must be a number: ${i}`);if(i>Dm)throw new tu(on.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${Dm}: ${i}`);if(i<0)throw new tu(on.EncodeTimeNegative,`Time must be positive: ${i}`);if(Number.isInteger(i)===!1)throw new tu(on.EncodeTimeValueMalformed,`Time must be an integer: ${i}`);let d,o="";for(let p=r;p>0;p--)d=i%zi,o=Pm.charAt(d)+o,i=(i-d)/zi;return o}function Bv(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function Yv(i,r){const d=Uv(),o=Date.now();return qv(o,eh)+Lv(Rv,d)}const Om=i=>{let r;const d=new Set,o=(v,D)=>{const M=typeof v=="function"?v(r):v;if(!Object.is(M,r)){const q=r;r=D??(typeof M!="object"||M===null)?M:Object.assign({},r,M),d.forEach(Z=>Z(r,q))}},p=()=>r,w={setState:o,getState:p,getInitialState:()=>O,subscribe:v=>(d.add(v),()=>d.delete(v))},O=r=i(o,p,w);return w},Gv=(i=>i?Om(i):Om),Xv=i=>i;function Qv(i,r=Xv){const d=Pa.useSyncExternalStore(i.subscribe,Pa.useCallback(()=>r(i.getState()),[i,r]),Pa.useCallback(()=>r(i.getInitialState()),[i,r]));return Pa.useDebugValue(d),d}const Cm=i=>{const r=Gv(i),d=o=>Qv(r,o);return Object.assign(d,r),d},Vv=(i=>i?Cm(i):Cm),gt=Vv((i,r)=>({comments:[],resolution:null,draft:null,setDraft:d=>i({draft:d}),hydrateComments:d=>i({comments:d,resolution:null,draft:null}),hydrateReview:(d,o=null)=>i({comments:d,resolution:o,draft:null}),addComment:d=>{const o=r().draft;!o||d.trim().length===0||i(p=>({comments:[...p.comments,{id:Yv(),filePath:o.filePath,side:o.side,startLine:Math.min(o.startLine,o.endLine),endLine:Math.max(o.startLine,o.endLine),body:d.trim(),originalSnippet:o.originalSnippet,createdAt:new Date().toISOString()}],draft:null}))},removeComment:d=>i(o=>({comments:o.comments.filter(p=>p.id!==d)})),reset:()=>i({comments:[],resolution:null,draft:null})}));function Zv(i){return th(i)&&!i.shiftKey}function kv(i){return th(i)&&i.shiftKey===!0}function th(i){var r;return i.key==="Enter"&&i.metaKey===!0&&i.ctrlKey!==!0&&i.altKey!==!0&&i.repeat!==!0&&i.defaultPrevented!==!0&&i.isComposing!==!0&&((r=i.nativeEvent)==null?void 0:r.isComposing)!==!0}function Kv({tone:i}){const r=gt(D=>D.draft),d=gt(D=>D.setDraft),o=gt(D=>D.addComment),[p,N]=B.useState(""),R=B.useRef(null);if(B.useEffect(()=>{var D;r&&((D=R.current)==null||D.focus({preventScroll:!0}))},[r]),!r)return null;const w=r.startLine===r.endLine?`Comment on line ${lu(r)}`:`Comment on range ${lu(r)}`,O=()=>{N(""),d(null)},v=()=>{o(p),N("")};return s.jsx("div",{className:`draft-comment-shell tone-${i}`,children:s.jsxs("div",{className:"draft-comment-card",children:[s.jsxs("div",{className:"draft-comment-title",children:[s.jsxs("span",{className:"draft-comment-heading",children:[s.jsx("span",{className:"draft-comment-icon","aria-hidden":"true",children:s.jsx(m1,{size:15})}),s.jsx("span",{children:"Local comment"})]}),s.jsx("span",{className:"draft-comment-label",children:w})]}),s.jsx("textarea",{"aria-label":w,placeholder:"Request change",ref:R,value:p,onChange:D=>N(D.target.value),onKeyDown:D=>{Zv(D)&&(D.preventDefault(),v())}}),s.jsxs("div",{className:"draft-comment-actions",children:[s.jsx("button",{className:"secondary-button",type:"button",onClick:O,children:"Cancel"}),s.jsx("button",{"aria-keyshortcuts":"Meta+Enter",className:"primary-button",title:"Comment (Command+Enter)",type:"button",onClick:v,children:"Comment"})]})]})})}function lh(i){return`gloss-file-${encodeURIComponent(i)}`}function Jv({file:i,collapsed:r,viewed:d,onToggle:o,onViewedChange:p,onOpenFile:N}){const[R,w]=B.useState(!1),O=B.useRef(null);return B.useEffect(()=>{if(!R)return;const v=M=>{var q;(q=O.current)!=null&&q.contains(M.target)||w(!1)},D=M=>{M.key==="Escape"&&w(!1)};return window.addEventListener("pointerdown",v),window.addEventListener("keydown",D),()=>{window.removeEventListener("pointerdown",v),window.removeEventListener("keydown",D)}},[R]),s.jsxs("div",{className:"file-header",children:[s.jsxs("button",{className:"file-header-toggle",type:"button",onClick:o,children:[r?s.jsx(Gm,{size:18}):s.jsx(au,{size:18}),s.jsx(rf,{size:17}),s.jsx("span",{className:"file-path",children:i.path}),i.oldPath&&i.oldPath!==i.path?s.jsxs("span",{className:"rename-path",children:["from ",i.oldPath]}):null]}),s.jsxs("span",{className:"stat add",children:["+",i.additions]}),s.jsxs("span",{className:"stat del",children:["-",i.deletions]}),s.jsxs("label",{className:"viewed-toggle",children:[s.jsx("input",{type:"checkbox",checked:d,onChange:v=>p(v.currentTarget.checked)}),s.jsx("span",{children:"Viewed"})]}),s.jsxs("div",{className:"file-menu",ref:O,children:[s.jsx("button",{"aria-expanded":R,"aria-haspopup":"menu","aria-label":`Open actions for ${i.path}`,className:"icon-button file-menu-button",title:"File actions",type:"button",onClick:()=>w(v=>!v),children:s.jsx(W0,{size:17})}),R?s.jsx("div",{className:"file-menu-popover",role:"menu",children:s.jsxs("button",{role:"menuitem",type:"button",onClick:()=>{w(!1),N()},children:[s.jsx(P0,{size:16}),s.jsx("span",{children:"Open locally"})]})}):null]})]})}function $v({activeFilePath:i=null,emptyState:r=null,files:d,record:o,diff:p=o.diff,readOnly:N=!1,wrapLines:R=!1,viewedFiles:w=new Set,onViewedChange:O=()=>{},onOpenFile:v=()=>{}}){const[D,M]=B.useState(new Set),q=B.useRef(i),Z=gt(L=>L.draft),k=gt(L=>L.setDraft),fe=d??p.files;if(i!==q.current&&(q.current=i,i&&D.has(i))){const L=new Set(D);L.delete(i),M(L)}const Ae=(L,je)=>{je&&((Z==null?void 0:Z.filePath)===L&&k(null),M(me=>{const te=new Set(me);return te.add(L),te})),O(L,je)};return s.jsx("section",{className:"diff-stack",children:fe.length===0?r??s.jsx(Fv,{record:o}):fe.map(L=>{const je=D.has(L.path);return s.jsxs("article",{className:`file-card ${i===L.path?"active":""}`,id:lh(L.path),children:[s.jsx(Jv,{file:L,collapsed:je,viewed:w.has(L.path),onToggle:()=>{!je&&(Z==null?void 0:Z.filePath)===L.path&&k(null),M(me=>{const te=new Set(me);return te.has(L.path)?te.delete(L.path):te.add(L.path),te})},onViewedChange:me=>Ae(L.path,me),onOpenFile:()=>v(L.path)}),je?null:s.jsx(Wv,{file:L,readOnly:N,wrapLines:R})]},`${L.oldPath??L.path}:${L.path}`)})})}function Fv({record:i}){const r=i.diff.scope;return r.mode==="branch"?s.jsxs("div",{className:"empty-diff",children:[s.jsx("h2",{children:"No branch changes"}),s.jsxs("p",{children:["Working tree is clean, and ",r.comparison.ref," matches ",r.base.ref,"."]})]}):r.fallbackReason==="missing-branch-base"?s.jsxs("div",{className:"empty-diff",children:[s.jsx("h2",{children:"No changes to review"}),s.jsx("p",{children:"Working tree is clean and no upstream or default branch ref was found."})]}):r.mode==="explicit"?s.jsxs("div",{className:"empty-diff",children:[s.jsxs("h2",{children:["No changes against ",r.base.ref]}),s.jsx("p",{children:"The captured diff for this explicit base is empty."})]}):s.jsxs("div",{className:"empty-diff",children:[s.jsx("h2",{children:"No working changes"}),s.jsx("p",{children:"Working tree is clean."})]})}function Wv({file:i,readOnly:r,wrapLines:d}){const o=gt(H=>H.comments),p=gt(H=>H.resolution),N=gt(H=>H.draft),R=gt(H=>H.setDraft),[w,O]=B.useState(null),[v,D]=B.useState(null),[M,q]=B.useState(null),Z=B.useRef(null),k=B.useRef(null),fe=B.useMemo(()=>tg(i),[i]),Ae=B.useMemo(()=>new Map(((p==null?void 0:p.comments)??[]).map(H=>[H.commentId,H])),[p]);let L=0;const je=o.filter(H=>H.filePath===i.path),me=w&&v&&w.filePath===i.path&&w.side===v.side?ff(fe,w.side,w.line,v.line):null,te=N&&N.filePath===i.path?ff(fe,N.side,N.startLine,N.endLine):null,Ne=(M==null?void 0:M.file)===i?M.lines:null,ne=H=>{const{start:V,end:le}=H,S=Math.min(V.line,le.line),C=Math.max(V.line,le.line),K=lg(i,fe,V.side,S,C)||V.snippet;R({filePath:i.path,side:V.side,startLine:S,endLine:C,originalSnippet:K})};B.useEffect(()=>()=>{var H;return(H=k.current)==null?void 0:H.call(k)},[]);const W=H=>{var S;if(H.dataset.filePath!==i.path)return null;const V=H.dataset.side,le=Number(H.dataset.line);return V!=="L"&&V!=="R"||!Number.isFinite(le)?null:{filePath:i.path,side:V,line:le,snippet:((S=H.querySelector("code"))==null?void 0:S.textContent)??""}},pe=H=>{const V=W(H);V&&Ie(V)},Qe=(H,V)=>{var K;if(V.button!==0)return;V.preventDefault(),(K=k.current)==null||K.call(k),Z.current={start:H,end:H},O(H),D(H);const le=ae=>{var h;const ee=(h=document.elementFromPoint(ae.clientX,ae.clientY))==null?void 0:h.closest(".diff-row");ee&&pe(ee)},S=ae=>{le(ae);const ee=Z.current;ee&&ne(ee),G()},C=()=>G();window.addEventListener("mousemove",le),window.addEventListener("mouseup",S),window.addEventListener("blur",C),k.current=()=>{window.removeEventListener("mousemove",le),window.removeEventListener("mouseup",S),window.removeEventListener("blur",C),k.current=null}},pt=(H,V)=>{var le;V.key!=="Enter"&&V.key!==" "||V.repeat||V.defaultPrevented||V.nativeEvent.isComposing||(V.preventDefault(),(le=k.current)==null||le.call(k),Z.current=null,O(null),D(null),ne({start:H,end:H}))},Ie=H=>{const V=Z.current;(V==null?void 0:V.start.filePath)===i.path&&V.start.side===H.side&&(Z.current={...V,end:H},D(H))},G=()=>{var H;(H=k.current)==null||H.call(k),Z.current=null,O(null),D(null)};return B.useEffect(()=>{let H=!1;return Cv(async()=>{const{highlightDiffFile:V}=await import("./syntax-DdLzhglo.js");return{highlightDiffFile:V}},[]).then(({highlightDiffFile:V})=>V(i)).then(V=>{H||q({file:i,lines:V})}).catch(()=>{H||q({file:i,lines:null})}),()=>{H=!0}},[i]),s.jsx("section",{"aria-label":`${i.path} diff`,className:`diff-scroller ${d?"wrap-lines":""}`,children:s.jsxs("div",{className:`diff-table ${w?"selecting":""}`,children:[i.isBinary?s.jsx("div",{className:"binary-note",children:"Binary file changed"}):null,i.hunks.map(H=>{const V=H.newStart>L+1?H.newStart-L-1:0;return L=H.newStart+H.newLines-1,s.jsxs("div",{className:"hunk",children:[V>0?s.jsxs("button",{className:"hidden-lines",type:"button",children:[V," unmodified lines"]}):null,s.jsx("div",{className:"hunk-header",children:H.header||`@@ -${H.oldStart},${H.oldLines} +${H.newStart},${H.newLines} @@`}),H.lines.map(le=>{const S=yf(le),C=vf(le);if(C==null)return null;const K={filePath:i.path,side:S,line:C,snippet:le.content},ae=fe.get(nu(S,C)),ee=ae!=null&&Rm(ae,me)?me:ae!=null&&Rm(ae,te)?te:null,h=ae!=null&&ee?eg(ae,ee.start,ee.end):"",A=N&&N.filePath===i.path&&N.side===S&&C===N.endLine,U=je.filter(Y=>Y.side===S&&C===Math.max(Y.startLine,Y.endLine));return s.jsxs("div",{children:[s.jsxs("div",{className:`diff-row ${le.type} ${r?"read-only":""} ${h} ${A?"range-continues":""}`,"data-file-path":i.path,"data-line":C,"data-side":S,children:[h?s.jsx("span",{className:"selection-rail","aria-hidden":"true"}):null,s.jsxs("div",{className:"diff-gutter",children:[s.jsx("span",{className:"line-number old",children:le.oldLine??""}),s.jsx("span",{className:"line-number new",children:le.newLine??""}),s.jsx("span",{className:"marker",children:nh(le)}),r?null:s.jsx("button",{"aria-label":`Comment on ${i.path} line ${C}`,className:"comment-handle",type:"button",onMouseDown:Y=>Qe(K,Y),onKeyDown:Y=>pt(K,Y),children:s.jsx(N1,{size:16,strokeWidth:2.4})})]}),s.jsx(Iv,{content:le.content,tokens:(Ne==null?void 0:Ne.get(nu(S,C)))??null})]}),U.map(Y=>{const F=Ae.get(Y.id);return s.jsxs("div",{className:`inline-comment ${F?"resolved":"open"}`,children:[F?s.jsx(Xm,{size:14}):s.jsx(Qm,{size:14}),s.jsxs("span",{className:"inline-comment-content",children:[r?s.jsx("span",{className:"inline-comment-status",children:F?"Resolved":"Open · Needs fix"}):null,s.jsx("span",{className:"inline-comment-body",children:Y.body}),F!=null&&F.summary?s.jsx("span",{className:"inline-comment-summary",children:F.summary}):null]})]},Y.id)}),A&&!r?s.jsx(Kv,{tone:le.type}):null]},`${le.type}:${le.oldLine??"x"}:${le.newLine??"x"}:${le.content}`)})]},`${H.oldStart}:${H.newStart}`)})]})},d?"wrapped":"unwrapped")}function Iv({content:i,tokens:r}){return!r||r.length===0?s.jsx("code",{children:i||" "}):s.jsx("code",{children:r.map(d=>s.jsx("span",{style:Pv(d),children:d.content},`${d.offset}:${d.content}`))})}function Pv(i){const r={};i.color&&(r.color=i.color),i.fontStyle&&(i.fontStyle&1)!==0&&(r.fontStyle="italic"),i.fontStyle&&(i.fontStyle&2)!==0&&(r.fontWeight=700);const d=[];return i.fontStyle&&(i.fontStyle&4)!==0&&d.push("underline"),i.fontStyle&&(i.fontStyle&8)!==0&&d.push("line-through"),d.length>0&&(r.textDecorationLine=d.join(" ")),r}function nh(i){return i.type==="add"?"+":i.type==="delete"?"-":" "}function eg(i,r,d){return r===d?"range-selected range-single":i===r?"range-selected range-start":i===d?"range-selected range-end":"range-selected range-middle"}function tg(i){const r=new Map;let d=0;for(const o of i.hunks)for(const p of o.lines){const N=yf(p),R=vf(p);R!=null&&(r.set(nu(N,R),d),d+=1)}return r}function ff(i,r,d,o){const p=i.get(nu(r,d)),N=i.get(nu(r,o));return p==null||N==null?null:{start:Math.min(p,N),end:Math.max(p,N)}}function Rm(i,r){return!!(r&&i>=r.start&&i<=r.end)}function lg(i,r,d,o,p){const N=[],R=ff(r,d,o,p);if(!R)return"";let w=0;for(const v of i.hunks)for(const D of v.lines)vf(D)!=null&&(w>=R.start&&w<=R.end&&N.push(D),w+=1);const O=new Set(N.map(v=>v.type)).size>1;return N.map(v=>O?`${nh(v)}${v.content}`:v.content).join(`
236
+ ~/.gloss/reviews/<reviewId>/resolved.json`}),s.jsx("div",{className:"contract-copy",children:s.jsxs("p",{children:[s.jsx("code",{children:"feedback.json"})," is the machine-readable handoff; ",s.jsx("code",{children:"feedback.md"})," ","is the human-readable copy; ",s.jsx("code",{children:"resolved.json"})," tracks comment and review resolution progress."]})})]})]}),s.jsx("footer",{className:"marketing-footer",children:s.jsxs("a",{href:"https://github.com/iamrajjoshi/gloss",target:"_blank",rel:"noreferrer",children:[s.jsx(Ti,{size:16}),s.jsx("span",{children:"GitHub"})]})})]})}var J1=qm();const $1={mode:"all"};function F1(i=$1,r=[]){if(i.mode==="all")return"All commits";if(i.mode==="single"){const p=r.find(N=>N.commit.sha===i.sha);return p?`${p.commit.shortSha} ${p.commit.subject}`:`Commit ${nf(i.sha)}`}const d=r.findIndex(p=>p.commit.sha===i.fromSha),o=r.findIndex(p=>p.commit.sha===i.toSha);return d>=0&&o>=d?`${o-d+1} commits · ${r[d].commit.shortSha} to ${r[o].commit.shortSha}`:`Commit range ${nf(i.fromSha)} to ${nf(i.toSha)}`}function nf(i){return i.slice(0,7)}function zm(i){var d;const r=(d=i.meta.branch??i.diff.branch)==null?void 0:d.trim();return r||W1(i.diff)}function W1(i){switch(i.scope.mode){case"branch":return"Branch diff";case"explicit":return`Diff against ${i.scope.requestedBase??i.base.ref}`;case"working":return"Working changes"}}function I1(i){return i==="submitted"||i==="resolved"}const P1=["L","R"],ev=["pending","submitted","cancelled","resolved"],tv=["context","add","delete"],lv=["working","branch","explicit"],nv=["working-tree-clean","missing-branch-base"],av=["all","single","range"],uv=["partial","resolved"],iv=["review-resolved","comment-resolved","comment-reopened","turn-created"];function cv(i,r,d){const o=JSON.parse(i);return km(o,r,d)}function km(i,r,d){if(!r(i))throw new Error(`Invalid ${d}`);return i}function sv(i){return Ce(i)&&P(i.reviewId)&&Je(i.turnId)&&ea(i.turnIndex)&&P(i.url)&&Xe(i.files)&&ea(i.comments)&&Je(i.feedbackPath)&&Je(i.markdownPath)&&Je(i.artifactDir)}function fv(i){return Ce(i)&&i.ok===!0&&P(i.path)}function ov(i){return Ce(i)&&P(i.fromSha)&&P(i.toSha)&&_i(i.stats)&&P(i.rawDiff)&&Jt(i.files,mf)}function rv(i){return Ce(i)&&mv(i.meta)&&Jt(i.turns,vv)&&Km(i.diff)&&dn(i.feedback,Jm)&&dn(i.resolution,$m)}function dv(i){return Ce(i)&&P(i.id)&&P(i.cwd)&&Ai(i.base)&&yl(i.branch)&&hf(i.status)&&P(i.createdAt)&&Je(i.submittedAt)&&Je(i.resolvedAt)&&Je(i.artifactDir)&&Je(i.activeTurnId)&&dn(i.turns,r=>Jt(r,yv))&&Je(i.feedbackPath)&&Je(i.markdownPath)}function mv(i){return dv(i)&&P(i.artifactDir)}function Km(i){return Ce(i)&&Ai(i.base)&&yl(i.branch)&&P(i.cwd)&&gv(i.scope)&&_i(i.stats)&&P(i.rawDiff)&&Jt(i.files,mf)&&dn(i.commitDiffs,r=>Jt(r,bv))&&P(i.capturedAt)}function Jm(i){return Ce(i)&&i.version===1&&P(i.reviewId)&&Je(i.turnId)&&ea(i.turnIndex)&&P(i.timestamp)&&Ai(i.base)&&yl(i.branch)&&dn(i.reviewScope,xv)&&Jt(i.comments,Nv)}function $m(i){return Ce(i)&&P(i.reviewId)&&Je(i.turnId)&&ea(i.turnIndex)&&Im(i.status)&&yl(i.summary)&&yl(i.resolvedAt)&&Jt(i.comments,Tv)}function hv(i){if(!Ce(i)||!P(i.reviewId)||!P(i.type))return!1;switch(i.type){case"review.opened":case"review.cancelled":return!0;case"review.turn.created":return P(i.turnId)&&Xe(i.turnIndex)&&eu(i.reused);case"review.submitted":return Je(i.turnId)&&ea(i.turnIndex)&&Ce(i.counts)&&Xe(i.counts.files)&&Xe(i.counts.comments);case"review.updated":return Je(i.turnId)&&ea(i.turnIndex)&&zv(i.reason)&&hf(i.status)&&Im(i.resolutionStatus)&&Wm(i.counts);default:return!1}}function Fm(i){return Ce(i)&&P(i.id)&&Xe(i.index)&&hf(i.status)&&P(i.createdAt)&&Je(i.submittedAt)&&Je(i.resolvedAt)&&P(i.artifactDir)&&P(i.diffPath)&&Je(i.feedbackPath)&&Je(i.markdownPath)&&Je(i.resolvedPath)}function yv(i){return!Ce(i)||!Fm(i)?!1:P(i.capturedAt)&&_i(i.stats)&&Wm(i.comments)}function vv(i){return!Ce(i)||!Fm(i)?!1:Km(i.diff)&&dn(i.feedback,Jm)&&dn(i.resolution,$m)}function gv(i){return Ce(i)&&Gl(i.mode,lv)&&yl(i.requestedBase)&&Ai(i.base)&&pv(i.comparison)&&(i.fallbackReason===null||Gl(i.fallbackReason,nv))}function pv(i){return Ce(i)&&P(i.ref)&&yl(i.sha)}function Ai(i){return Ce(i)&&P(i.ref)&&P(i.sha)}function _i(i){return Ce(i)&&Xe(i.files)&&Xe(i.additions)&&Xe(i.deletions)}function Sv(i){return Ce(i)&&P(i.sha)&&P(i.shortSha)&&P(i.subject)&&P(i.authorName)&&P(i.authorEmail)&&P(i.authoredAt)&&P(i.committedAt)}function bv(i){return Ce(i)&&Sv(i.commit)&&_i(i.stats)&&P(i.rawDiff)&&Jt(i.files,mf)}function xv(i){if(!Ce(i)||!Gl(i.mode,av))return!1;switch(i.mode){case"all":return!0;case"single":return P(i.sha);case"range":return P(i.fromSha)&&P(i.toSha)}}function mf(i){return Ce(i)&&P(i.path)&&yl(i.oldPath)&&Xe(i.additions)&&Xe(i.deletions)&&eu(i.isBinary)&&eu(i.isDeleted)&&eu(i.isNew)&&eu(i.isRenamed)&&yl(i.language)&&Jt(i.hunks,jv)}function jv(i){return Ce(i)&&Xe(i.oldStart)&&Xe(i.oldLines)&&Xe(i.newStart)&&Xe(i.newLines)&&P(i.header)&&Jt(i.lines,Ev)}function Ev(i){return Ce(i)&&Gl(i.type,tv)&&Am(i.oldLine)&&Am(i.newLine)&&P(i.content)}function Nv(i){return Ce(i)&&P(i.id)&&P(i.filePath)&&Xe(i.startLine)&&Xe(i.endLine)&&Gl(i.side,P1)&&P(i.body)&&P(i.originalSnippet)&&P(i.createdAt)}function Tv(i){return Ce(i)&&P(i.commentId)&&i.status==="resolved"&&Je(i.summary)&&P(i.resolvedAt)}function Wm(i){return Ce(i)&&Xe(i.total)&&Xe(i.resolved)&&Xe(i.open)}function hf(i){return Gl(i,ev)}function Im(i){return Gl(i,uv)}function zv(i){return Gl(i,iv)}function Ce(i){return typeof i=="object"&&i!==null&&!Array.isArray(i)}function Jt(i,r){return Array.isArray(i)&&i.every(r)}function dn(i,r){return i===void 0||r(i)}function P(i){return typeof i=="string"}function Je(i){return i===void 0||P(i)}function yl(i){return i===null||P(i)}function Xe(i){return typeof i=="number"&&Number.isFinite(i)}function ea(i){return i===void 0||Xe(i)}function Am(i){return i===null||Xe(i)}function eu(i){return typeof i=="boolean"}function Gl(i,r){return typeof i=="string"&&r.includes(i)}async function Mi(i,r,d){if(!i.ok)throw new Error(`${i.status}: ${await i.text()}`);const o=await i.json();return km(o,r,d)}async function _m(i){return Mi(await fetch(`/api/reviews/${i}`),rv,"review response")}async function Av(i,r,d){const o={comments:r,reviewScope:d};return Mi(await fetch(`/api/reviews/${i}/submit`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(o)}),sv,"submit review response")}async function _v(i,r,d){const o={filePath:r,turnId:d};return Mi(await fetch(`/api/reviews/${i}/files/open`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(o)}),fv,"open file response")}async function Mv(i,r,d,o){const p={fromSha:r,toSha:d,turnId:o};return Mi(await fetch(`/api/reviews/${i}/commits/range`,{method:"POST",headers:{"content-type":"application/json"},body:JSON.stringify(p)}),ov,"commit range diff response")}const Dv="modulepreload",Ov=function(i){return"/"+i},Mm={},Cv=function(r,d,o){let p=Promise.resolve();if(d&&d.length>0){let R=function(v){return Promise.all(v.map(D=>Promise.resolve(D).then(M=>({status:"fulfilled",value:M}),M=>({status:"rejected",reason:M}))))};document.getElementsByTagName("link");const w=document.querySelector("meta[property=csp-nonce]"),O=(w==null?void 0:w.nonce)||(w==null?void 0:w.getAttribute("nonce"));p=R(d.map(v=>{if(v=Ov(v),v in Mm)return;Mm[v]=!0;const D=v.endsWith(".css"),M=D?'[rel="stylesheet"]':"";if(document.querySelector(`link[href="${v}"]${M}`))return;const q=document.createElement("link");if(q.rel=D?"stylesheet":Dv,D||(q.as="script"),q.crossOrigin="",q.href=v,O&&q.setAttribute("nonce",O),document.head.appendChild(q),D)return new Promise((Z,k)=>{q.addEventListener("load",Z),q.addEventListener("error",()=>k(new Error(`Unable to preload CSS for ${v}`)))})}))}function N(R){const w=new Event("vite:preloadError",{cancelable:!0});if(w.payload=R,window.dispatchEvent(w),!w.defaultPrevented)throw R}return p.then(R=>{for(const w of R||[])w.status==="rejected"&&N(w.reason);return r().catch(N)})};function yf(i){return i.type==="delete"?"L":"R"}function vf(i){return yf(i)==="L"?i.oldLine:i.newLine}function nu(i,r){return`${i}:${r}`}const Pm="0123456789ABCDEFGHJKMNPQRSTVWXYZ",zi=32,Rv=16,eh=10,Dm=0xffffffffffff;var on;(function(i){i.Base32IncorrectEncoding="B32_ENC_INVALID",i.DecodeTimeInvalidCharacter="DEC_TIME_CHAR",i.DecodeTimeValueMalformed="DEC_TIME_MALFORMED",i.EncodeTimeNegative="ENC_TIME_NEG",i.EncodeTimeSizeExceeded="ENC_TIME_SIZE_EXCEED",i.EncodeTimeValueMalformed="ENC_TIME_MALFORMED",i.PRNGDetectFailure="PRNG_DETECT",i.ULIDInvalid="ULID_INVALID",i.Unexpected="UNEXPECTED",i.UUIDInvalid="UUID_INVALID"})(on||(on={}));class tu extends Error{constructor(r,d){super(`${d} (${r})`),this.name="ULIDError",this.code=r}}function wv(i){const r=Math.floor(i()*zi)%zi;return Pm.charAt(r)}function Uv(i){const r=Hv(),d=r&&(r.crypto||r.msCrypto)||null;if(typeof(d==null?void 0:d.getRandomValues)=="function")return()=>{const o=new Uint8Array(1);return d.getRandomValues(o),o[0]/256};if(typeof(d==null?void 0:d.randomBytes)=="function")return()=>d.randomBytes(1).readUInt8()/256;throw new tu(on.PRNGDetectFailure,"Failed to find a reliable PRNG")}function Hv(){return Bv()?self:typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:null}function Lv(i,r){let d="";for(;i>0;i--)d=wv(r)+d;return d}function qv(i,r=eh){if(isNaN(i))throw new tu(on.EncodeTimeValueMalformed,`Time must be a number: ${i}`);if(i>Dm)throw new tu(on.EncodeTimeSizeExceeded,`Cannot encode a time larger than ${Dm}: ${i}`);if(i<0)throw new tu(on.EncodeTimeNegative,`Time must be positive: ${i}`);if(Number.isInteger(i)===!1)throw new tu(on.EncodeTimeValueMalformed,`Time must be an integer: ${i}`);let d,o="";for(let p=r;p>0;p--)d=i%zi,o=Pm.charAt(d)+o,i=(i-d)/zi;return o}function Bv(){return typeof WorkerGlobalScope<"u"&&self instanceof WorkerGlobalScope}function Yv(i,r){const d=Uv(),o=Date.now();return qv(o,eh)+Lv(Rv,d)}const Om=i=>{let r;const d=new Set,o=(v,D)=>{const M=typeof v=="function"?v(r):v;if(!Object.is(M,r)){const q=r;r=D??(typeof M!="object"||M===null)?M:Object.assign({},r,M),d.forEach(Z=>Z(r,q))}},p=()=>r,w={setState:o,getState:p,getInitialState:()=>O,subscribe:v=>(d.add(v),()=>d.delete(v))},O=r=i(o,p,w);return w},Gv=(i=>i?Om(i):Om),Xv=i=>i;function Qv(i,r=Xv){const d=Pa.useSyncExternalStore(i.subscribe,Pa.useCallback(()=>r(i.getState()),[i,r]),Pa.useCallback(()=>r(i.getInitialState()),[i,r]));return Pa.useDebugValue(d),d}const Cm=i=>{const r=Gv(i),d=o=>Qv(r,o);return Object.assign(d,r),d},Vv=(i=>i?Cm(i):Cm),gt=Vv((i,r)=>({comments:[],resolution:null,draft:null,setDraft:d=>i({draft:d}),hydrateComments:d=>i({comments:d,resolution:null,draft:null}),hydrateReview:(d,o=null)=>i({comments:d,resolution:o,draft:null}),addComment:d=>{const o=r().draft;!o||d.trim().length===0||i(p=>({comments:[...p.comments,{id:Yv(),filePath:o.filePath,side:o.side,startLine:Math.min(o.startLine,o.endLine),endLine:Math.max(o.startLine,o.endLine),body:d.trim(),originalSnippet:o.originalSnippet,createdAt:new Date().toISOString()}],draft:null}))},removeComment:d=>i(o=>({comments:o.comments.filter(p=>p.id!==d)})),reset:()=>i({comments:[],resolution:null,draft:null})}));function Zv(i){return th(i)&&!i.shiftKey}function kv(i){return th(i)&&i.shiftKey===!0}function th(i){var r;return i.key==="Enter"&&i.metaKey===!0&&i.ctrlKey!==!0&&i.altKey!==!0&&i.repeat!==!0&&i.defaultPrevented!==!0&&i.isComposing!==!0&&((r=i.nativeEvent)==null?void 0:r.isComposing)!==!0}function Kv({tone:i}){const r=gt(D=>D.draft),d=gt(D=>D.setDraft),o=gt(D=>D.addComment),[p,N]=B.useState(""),R=B.useRef(null);if(B.useEffect(()=>{var D;r&&((D=R.current)==null||D.focus({preventScroll:!0}))},[r]),!r)return null;const w=r.startLine===r.endLine?`Comment on line ${lu(r)}`:`Comment on range ${lu(r)}`,O=()=>{N(""),d(null)},v=()=>{o(p),N("")};return s.jsx("div",{className:`draft-comment-shell tone-${i}`,children:s.jsxs("div",{className:"draft-comment-card",children:[s.jsxs("div",{className:"draft-comment-title",children:[s.jsxs("span",{className:"draft-comment-heading",children:[s.jsx("span",{className:"draft-comment-icon","aria-hidden":"true",children:s.jsx(m1,{size:15})}),s.jsx("span",{children:"Local comment"})]}),s.jsx("span",{className:"draft-comment-label",children:w})]}),s.jsx("textarea",{"aria-label":w,placeholder:"Request change",ref:R,value:p,onChange:D=>N(D.target.value),onKeyDown:D=>{Zv(D)&&(D.preventDefault(),v())}}),s.jsxs("div",{className:"draft-comment-actions",children:[s.jsx("button",{className:"secondary-button",type:"button",onClick:O,children:"Cancel"}),s.jsx("button",{"aria-keyshortcuts":"Meta+Enter",className:"primary-button",title:"Comment (Command+Enter)",type:"button",onClick:v,children:"Comment"})]})]})})}function lh(i){return`gloss-file-${encodeURIComponent(i)}`}function Jv({file:i,collapsed:r,viewed:d,onToggle:o,onViewedChange:p,onOpenFile:N}){const[R,w]=B.useState(!1),O=B.useRef(null);return B.useEffect(()=>{if(!R)return;const v=M=>{var q;(q=O.current)!=null&&q.contains(M.target)||w(!1)},D=M=>{M.key==="Escape"&&w(!1)};return window.addEventListener("pointerdown",v),window.addEventListener("keydown",D),()=>{window.removeEventListener("pointerdown",v),window.removeEventListener("keydown",D)}},[R]),s.jsxs("div",{className:"file-header",children:[s.jsxs("button",{className:"file-header-toggle",type:"button",onClick:o,children:[r?s.jsx(Gm,{size:18}):s.jsx(au,{size:18}),s.jsx(rf,{size:17}),s.jsx("span",{className:"file-path",children:i.path}),i.oldPath&&i.oldPath!==i.path?s.jsxs("span",{className:"rename-path",children:["from ",i.oldPath]}):null]}),s.jsxs("span",{className:"stat add",children:["+",i.additions]}),s.jsxs("span",{className:"stat del",children:["-",i.deletions]}),s.jsxs("label",{className:"viewed-toggle",children:[s.jsx("input",{type:"checkbox",checked:d,onChange:v=>p(v.currentTarget.checked)}),s.jsx("span",{children:"Viewed"})]}),s.jsxs("div",{className:"file-menu",ref:O,children:[s.jsx("button",{"aria-expanded":R,"aria-haspopup":"menu","aria-label":`Open actions for ${i.path}`,className:"icon-button file-menu-button",title:"File actions",type:"button",onClick:()=>w(v=>!v),children:s.jsx(W0,{size:17})}),R?s.jsx("div",{className:"file-menu-popover",role:"menu",children:s.jsxs("button",{role:"menuitem",type:"button",onClick:()=>{w(!1),N()},children:[s.jsx(P0,{size:16}),s.jsx("span",{children:"Open locally"})]})}):null]})]})}function $v({activeFilePath:i=null,emptyState:r=null,files:d,record:o,diff:p=o.diff,readOnly:N=!1,wrapLines:R=!1,viewedFiles:w=new Set,onViewedChange:O=()=>{},onOpenFile:v=()=>{}}){const[D,M]=B.useState(new Set),q=B.useRef(i),Z=gt(L=>L.draft),k=gt(L=>L.setDraft),fe=d??p.files;if(i!==q.current&&(q.current=i,i&&D.has(i))){const L=new Set(D);L.delete(i),M(L)}const Ae=(L,je)=>{je&&((Z==null?void 0:Z.filePath)===L&&k(null),M(me=>{const te=new Set(me);return te.add(L),te})),O(L,je)};return s.jsx("section",{className:"diff-stack",children:fe.length===0?r??s.jsx(Fv,{record:o}):fe.map(L=>{const je=D.has(L.path);return s.jsxs("article",{className:`file-card ${i===L.path?"active":""}`,id:lh(L.path),children:[s.jsx(Jv,{file:L,collapsed:je,viewed:w.has(L.path),onToggle:()=>{!je&&(Z==null?void 0:Z.filePath)===L.path&&k(null),M(me=>{const te=new Set(me);return te.has(L.path)?te.delete(L.path):te.add(L.path),te})},onViewedChange:me=>Ae(L.path,me),onOpenFile:()=>v(L.path)}),je?null:s.jsx(Wv,{file:L,readOnly:N,wrapLines:R})]},`${L.oldPath??L.path}:${L.path}`)})})}function Fv({record:i}){const r=i.diff.scope;return r.mode==="branch"?s.jsxs("div",{className:"empty-diff",children:[s.jsx("h2",{children:"No branch changes"}),s.jsxs("p",{children:["Working tree is clean, and ",r.comparison.ref," matches ",r.base.ref,"."]})]}):r.fallbackReason==="missing-branch-base"?s.jsxs("div",{className:"empty-diff",children:[s.jsx("h2",{children:"No changes to review"}),s.jsx("p",{children:"Working tree is clean and no upstream or default branch ref was found."})]}):r.mode==="explicit"?s.jsxs("div",{className:"empty-diff",children:[s.jsxs("h2",{children:["No changes against ",r.base.ref]}),s.jsx("p",{children:"The captured diff for this explicit base is empty."})]}):s.jsxs("div",{className:"empty-diff",children:[s.jsx("h2",{children:"No working changes"}),s.jsx("p",{children:"Working tree is clean."})]})}function Wv({file:i,readOnly:r,wrapLines:d}){const o=gt(H=>H.comments),p=gt(H=>H.resolution),N=gt(H=>H.draft),R=gt(H=>H.setDraft),[w,O]=B.useState(null),[v,D]=B.useState(null),[M,q]=B.useState(null),Z=B.useRef(null),k=B.useRef(null),fe=B.useMemo(()=>tg(i),[i]),Ae=B.useMemo(()=>new Map(((p==null?void 0:p.comments)??[]).map(H=>[H.commentId,H])),[p]);let L=0;const je=o.filter(H=>H.filePath===i.path),me=w&&v&&w.filePath===i.path&&w.side===v.side?ff(fe,w.side,w.line,v.line):null,te=N&&N.filePath===i.path?ff(fe,N.side,N.startLine,N.endLine):null,Ne=(M==null?void 0:M.file)===i?M.lines:null,ne=H=>{const{start:V,end:le}=H,S=Math.min(V.line,le.line),C=Math.max(V.line,le.line),K=lg(i,fe,V.side,S,C)||V.snippet;R({filePath:i.path,side:V.side,startLine:S,endLine:C,originalSnippet:K})};B.useEffect(()=>()=>{var H;return(H=k.current)==null?void 0:H.call(k)},[]);const W=H=>{var S;if(H.dataset.filePath!==i.path)return null;const V=H.dataset.side,le=Number(H.dataset.line);return V!=="L"&&V!=="R"||!Number.isFinite(le)?null:{filePath:i.path,side:V,line:le,snippet:((S=H.querySelector("code"))==null?void 0:S.textContent)??""}},pe=H=>{const V=W(H);V&&Ie(V)},Qe=(H,V)=>{var K;if(V.button!==0)return;V.preventDefault(),(K=k.current)==null||K.call(k),Z.current={start:H,end:H},O(H),D(H);const le=ae=>{var h;const ee=(h=document.elementFromPoint(ae.clientX,ae.clientY))==null?void 0:h.closest(".diff-row");ee&&pe(ee)},S=ae=>{le(ae);const ee=Z.current;ee&&ne(ee),G()},C=()=>G();window.addEventListener("mousemove",le),window.addEventListener("mouseup",S),window.addEventListener("blur",C),k.current=()=>{window.removeEventListener("mousemove",le),window.removeEventListener("mouseup",S),window.removeEventListener("blur",C),k.current=null}},pt=(H,V)=>{var le;V.key!=="Enter"&&V.key!==" "||V.repeat||V.defaultPrevented||V.nativeEvent.isComposing||(V.preventDefault(),(le=k.current)==null||le.call(k),Z.current=null,O(null),D(null),ne({start:H,end:H}))},Ie=H=>{const V=Z.current;(V==null?void 0:V.start.filePath)===i.path&&V.start.side===H.side&&(Z.current={...V,end:H},D(H))},G=()=>{var H;(H=k.current)==null||H.call(k),Z.current=null,O(null),D(null)};return B.useEffect(()=>{let H=!1;return Cv(async()=>{const{highlightDiffFile:V}=await import("./syntax-B7bGuVNL.js");return{highlightDiffFile:V}},[]).then(({highlightDiffFile:V})=>V(i)).then(V=>{H||q({file:i,lines:V})}).catch(()=>{H||q({file:i,lines:null})}),()=>{H=!0}},[i]),s.jsx("section",{"aria-label":`${i.path} diff`,className:`diff-scroller ${d?"wrap-lines":""}`,children:s.jsxs("div",{className:`diff-table ${w?"selecting":""}`,children:[i.isBinary?s.jsx("div",{className:"binary-note",children:"Binary file changed"}):null,i.hunks.map(H=>{const V=H.newStart>L+1?H.newStart-L-1:0;return L=H.newStart+H.newLines-1,s.jsxs("div",{className:"hunk",children:[V>0?s.jsxs("button",{className:"hidden-lines",type:"button",children:[V," unmodified lines"]}):null,s.jsx("div",{className:"hunk-header",children:H.header||`@@ -${H.oldStart},${H.oldLines} +${H.newStart},${H.newLines} @@`}),H.lines.map(le=>{const S=yf(le),C=vf(le);if(C==null)return null;const K={filePath:i.path,side:S,line:C,snippet:le.content},ae=fe.get(nu(S,C)),ee=ae!=null&&Rm(ae,me)?me:ae!=null&&Rm(ae,te)?te:null,h=ae!=null&&ee?eg(ae,ee.start,ee.end):"",A=N&&N.filePath===i.path&&N.side===S&&C===N.endLine,U=je.filter(Y=>Y.side===S&&C===Math.max(Y.startLine,Y.endLine));return s.jsxs("div",{children:[s.jsxs("div",{className:`diff-row ${le.type} ${r?"read-only":""} ${h} ${A?"range-continues":""}`,"data-file-path":i.path,"data-line":C,"data-side":S,children:[h?s.jsx("span",{className:"selection-rail","aria-hidden":"true"}):null,s.jsxs("div",{className:"diff-gutter",children:[s.jsx("span",{className:"line-number old",children:le.oldLine??""}),s.jsx("span",{className:"line-number new",children:le.newLine??""}),s.jsx("span",{className:"marker",children:nh(le)}),r?null:s.jsx("button",{"aria-label":`Comment on ${i.path} line ${C}`,className:"comment-handle",type:"button",onMouseDown:Y=>Qe(K,Y),onKeyDown:Y=>pt(K,Y),children:s.jsx(N1,{size:16,strokeWidth:2.4})})]}),s.jsx(Iv,{content:le.content,tokens:(Ne==null?void 0:Ne.get(nu(S,C)))??null})]}),U.map(Y=>{const F=Ae.get(Y.id);return s.jsxs("div",{className:`inline-comment ${F?"resolved":"open"}`,children:[F?s.jsx(Xm,{size:14}):s.jsx(Qm,{size:14}),s.jsxs("span",{className:"inline-comment-content",children:[r?s.jsx("span",{className:"inline-comment-status",children:F?"Resolved":"Open · Needs fix"}):null,s.jsx("span",{className:"inline-comment-body",children:Y.body}),F!=null&&F.summary?s.jsx("span",{className:"inline-comment-summary",children:F.summary}):null]})]},Y.id)}),A&&!r?s.jsx(Kv,{tone:le.type}):null]},`${le.type}:${le.oldLine??"x"}:${le.newLine??"x"}:${le.content}`)})]},`${H.oldStart}:${H.newStart}`)})]})},d?"wrapped":"unwrapped")}function Iv({content:i,tokens:r}){return!r||r.length===0?s.jsx("code",{children:i||" "}):s.jsx("code",{children:r.map(d=>s.jsx("span",{style:Pv(d),children:d.content},`${d.offset}:${d.content}`))})}function Pv(i){const r={};i.color&&(r.color=i.color),i.fontStyle&&(i.fontStyle&1)!==0&&(r.fontStyle="italic"),i.fontStyle&&(i.fontStyle&2)!==0&&(r.fontWeight=700);const d=[];return i.fontStyle&&(i.fontStyle&4)!==0&&d.push("underline"),i.fontStyle&&(i.fontStyle&8)!==0&&d.push("line-through"),d.length>0&&(r.textDecorationLine=d.join(" ")),r}function nh(i){return i.type==="add"?"+":i.type==="delete"?"-":" "}function eg(i,r,d){return r===d?"range-selected range-single":i===r?"range-selected range-start":i===d?"range-selected range-end":"range-selected range-middle"}function tg(i){const r=new Map;let d=0;for(const o of i.hunks)for(const p of o.lines){const N=yf(p),R=vf(p);R!=null&&(r.set(nu(N,R),d),d+=1)}return r}function ff(i,r,d,o){const p=i.get(nu(r,d)),N=i.get(nu(r,o));return p==null||N==null?null:{start:Math.min(p,N),end:Math.max(p,N)}}function Rm(i,r){return!!(r&&i>=r.start&&i<=r.end)}function lg(i,r,d,o,p){const N=[],R=ff(r,d,o,p);if(!R)return"";let w=0;for(const v of i.hunks)for(const D of v.lines)vf(D)!=null&&(w>=R.start&&w<=R.end&&N.push(D),w+=1);const O=new Set(N.map(v=>v.type)).size>1;return N.map(v=>O?`${nh(v)}${v.content}`:v.content).join(`
237
237
  `)}const Ni="__gloss_no_extension__";function ng(i){const r=[i.name];let d=i;for(;d.children.length===1&&d.children[0].type==="directory";)d=d.children[0],r.push(d.name);return{name:r.join("/"),node:d}}function ag(i){const r=new Map;for(const d of i){const o=ah(d.path),p=r.get(o);p?p.count+=1:r.set(o,{id:o,label:o===Ni?"No extension":o,count:1})}return Array.from(r.values()).sort((d,o)=>d.id===Ni?1:o.id===Ni?-1:d.label.localeCompare(o.label,void 0,{sensitivity:"base"}))}function ug(i,r,d){const o=r.trim().toLowerCase();return d.size===0?[]:i.filter(p=>{const N=d.has(ah(p.path)),R=o.length===0||p.path.toLowerCase().includes(o);return N&&R})}function ig(i){const r={type:"directory",id:"root",name:"",path:"",children:[]},d=new Map;for(const o of i){const p=o.path.split("/").filter(Boolean);let N=r;for(const[R,w]of p.entries()){const O=R===p.length-1,v=p.slice(0,R+1).join("/");O?N.children.push({type:"file",id:`file:${o.path}`,name:w,path:o.path,file:o}):N=cg(N,w,v,d)}}return uh(r),r}function cg(i,r,d,o){let p=o.get(i);p||(p=new Map,o.set(i,p));const N=p.get(r);if(N)return N;const R={type:"directory",id:`dir:${d}`,name:r,path:d,children:[]};return i.children.push(R),p.set(r,R),R}function ah(i){const r=i.split("/").pop()??i,d=r.lastIndexOf(".");return d<=0||d===r.length-1?Ni:r.slice(d).toLowerCase()}function uh(i){i.children.sort((r,d)=>r.type!==d.type?r.type==="directory"?-1:1:r.name.localeCompare(d.name,void 0,{sensitivity:"base"}));for(const r of i.children)r.type==="directory"&&uh(r)}function wm({activeFilePath:i,extensionBuckets:r,files:d,filteredFiles:o,onCollapse:p,onClearExtensions:N,onFileSelect:R,onSearchChange:w,onSelectAllExtensions:O,onToggleExtension:v,searchQuery:D,selectedExtensionIds:M}){const[q,Z]=B.useState(!1),[k,fe]=B.useState(new Set),Ae=B.useRef(null),L=B.useMemo(()=>ig(o),[o]),je=B.useMemo(()=>{const ne=fg(L);for(const W of k)ne.delete(W);return ne},[k,L]),te=M.size!==r.length;B.useEffect(()=>{if(!q)return;const ne=pe=>{var Qe;(Qe=Ae.current)!=null&&Qe.contains(pe.target)||Z(!1)},W=pe=>{pe.key==="Escape"&&Z(!1)};return window.addEventListener("pointerdown",ne),window.addEventListener("keydown",W),()=>{window.removeEventListener("pointerdown",ne),window.removeEventListener("keydown",W)}},[q]);const Ne=ne=>{fe(W=>{const pe=new Set(W);return je.has(ne)?pe.add(ne):pe.delete(ne),pe})};return s.jsxs("section",{className:"file-tree-panel","aria-label":"Changed files",children:[s.jsxs("div",{className:"file-tree-header",children:[s.jsx("span",{children:"Changed files"}),p?s.jsx("button",{"aria-label":"Collapse file tree",className:"file-tree-icon-button",title:"Collapse file tree",type:"button",onClick:p,children:s.jsx(p1,{size:15})}):null]}),s.jsxs("div",{className:"file-tree-controls",children:[s.jsxs("label",{className:"file-tree-search",children:[s.jsx(z1,{size:18}),s.jsx("span",{className:"sr-only",children:"Filter files"}),s.jsx("input",{type:"search",value:D,placeholder:"Filter files...",onChange:ne=>w(ne.target.value)}),D?s.jsx("button",{"aria-label":"Clear file search",className:"file-tree-clear",type:"button",onClick:()=>w(""),children:s.jsx(df,{size:14})}):null]}),s.jsxs("div",{className:"file-tree-filter-shell",ref:Ae,children:[s.jsx("button",{"aria-label":"Filter by file extension","aria-expanded":q,className:`file-tree-filter-button ${te?"active":""}`,title:"Filter by file extension",type:"button",onClick:()=>Z(ne=>!ne),children:s.jsx(D1,{size:17})}),q?s.jsx(sg,{buckets:r,selectedExtensionIds:M,onClear:N,onSelectAll:O,onToggle:v}):null]})]}),s.jsx("div",{className:"file-tree-summary",children:s.jsxs("span",{children:[o.length," of ",d.length," ",d.length===1?"file":"files"]})}),o.length===0?s.jsx("div",{className:"file-tree-empty",children:d.length===0?"No files changed":"No files match"}):s.jsx("div",{className:"file-tree-list",children:L.children.map(ne=>s.jsx(ih,{activeFilePath:i,expandedDirectoryIds:je,node:ne,depth:0,onFileSelect:R,onToggleDirectory:Ne},ne.id))})]})}function sg({buckets:i,onClear:r,onSelectAll:d,onToggle:o,selectedExtensionIds:p}){return s.jsxs("div",{className:"extension-popover",role:"menu","aria-label":"File extensions",children:[s.jsxs("div",{className:"extension-popover-header",children:[s.jsx("span",{children:"File extensions"}),s.jsxs("div",{className:"extension-popover-actions",children:[s.jsx("button",{type:"button",onClick:d,children:"All"}),s.jsx("button",{type:"button",onClick:r,children:"None"})]})]}),s.jsx("div",{className:"extension-options",children:i.map(N=>{const R=p.has(N.id);return s.jsxs("button",{"aria-checked":R,className:"extension-option",role:"menuitemcheckbox",type:"button",onClick:()=>o(N.id),children:[s.jsx("span",{className:"extension-check",children:R?s.jsx(rn,{size:16}):null}),s.jsx("span",{className:"extension-label",children:N.label}),s.jsx("span",{className:"extension-count",children:N.count})]},N.id)})})]})}function ih({activeFilePath:i,depth:r,expandedDirectoryIds:d,node:o,onFileSelect:p,onToggleDirectory:N}){const R={paddingLeft:8+r*14};if(o.type==="directory"){const w=ng(o),O=d.has(w.node.id);return s.jsxs("div",{children:[s.jsxs("button",{"aria-expanded":O,className:"file-tree-row directory",style:R,title:w.node.path,type:"button",onClick:()=>N(w.node.id),children:[O?s.jsx(au,{size:16}):s.jsx(Gm,{size:16}),O?s.jsx(a1,{size:17}):s.jsx(i1,{size:17}),s.jsx("span",{className:"file-tree-name",children:w.name})]}),O?s.jsx("div",{children:w.node.children.map(v=>s.jsx(ih,{activeFilePath:i,expandedDirectoryIds:d,node:v,depth:r+1,onFileSelect:p,onToggleDirectory:N},v.id))}):null]})}return s.jsx("div",{children:s.jsxs("button",{className:`file-tree-row file ${i===o.path?"active":""}`,style:R,title:o.path,type:"button",onClick:()=>p(o.path),children:[s.jsx("span",{className:"file-tree-spacer"}),s.jsx(rf,{size:16}),s.jsx("span",{className:"file-tree-name",children:o.name}),s.jsxs("span",{className:"file-tree-stats",children:[s.jsxs("span",{className:"stat add",children:["+",o.file.additions]}),s.jsxs("span",{className:"stat del",children:["-",o.file.deletions]})]})]})})}function fg(i){const r=new Set,d=o=>{for(const p of o.children)p.type==="directory"&&(r.add(p.id),d(p))};return d(i),r}function Um(i){return i instanceof Error?i.message:String(i)}function og({reviewId:i,reviewScope:r,onSubmitted:d}){const o=gt(q=>q.comments),p=gt(q=>q.removeComment),[N,R]=B.useState("idle"),[w,O]=B.useState(null),v=B.useRef(!1),D=N!=="submitting"&&N!=="done",M=B.useCallback(async()=>{if(!(!D||v.current)){v.current=!0,R("submitting"),O(null);try{await Av(i,o,r),R("done"),O("Submitted");try{await(d==null?void 0:d())}catch(q){O(`Submitted, but refresh failed: ${Um(q)}`)}}catch(q){v.current=!1,R("error"),O(Um(q))}}},[D,o,d,i,r]);return B.useEffect(()=>{const q=Z=>{kv(Z)&&(Z.preventDefault(),M())};return window.addEventListener("keydown",q),()=>window.removeEventListener("keydown",q)},[M]),s.jsxs("aside",{className:"submit-bar",children:[s.jsx("div",{className:"comment-list",children:o.length===0?s.jsx("span",{className:"muted",children:"No comments yet"}):o.map(q=>s.jsxs("div",{className:"comment-chip",children:[s.jsxs("span",{children:[q.filePath,":",lu(q,{repeatSideOnEnd:!1})]}),s.jsx("button",{className:"icon-button",type:"button",title:"Remove comment",onClick:()=>p(q.id),children:s.jsx(Vm,{size:14})})]},q.id))}),s.jsxs("div",{className:"submit-actions",children:[w?s.jsx("span",{className:`submit-message ${N}`,children:w}):null,s.jsxs("button",{"aria-keyshortcuts":"Meta+Shift+Enter",className:"primary-button",type:"button",disabled:!D,title:"Submit review (Command+Shift+Enter)",onClick:M,children:[N==="done"?s.jsx(rn,{size:16}):s.jsx(_1,{size:16}),"Submit ",o.length]})]})]})}const rg="gloss:viewed-files:";function ch(i){return`${rg}${i}`}function af(i,r=sh()){if(!r)return new Set;const d=r.getItem(ch(i));if(!d)return new Set;try{const o=JSON.parse(d);return new Set(Array.isArray(o)?o.filter(p=>typeof p=="string"):[])}catch{return new Set}}function dg(i,r,d=sh()){if(!d)return;const o=ch(i);if(r.size===0){d.removeItem(o);return}d.setItem(o,JSON.stringify(Array.from(r).toSorted()))}function sh(){try{return typeof window>"u"?null:window.localStorage}catch{return null}}function mg(i){return i.type==="review.turn.created"||i.type==="review.submitted"||i.type==="review.updated"}function hg(i,r,d){return i.reviewId!==r||!i.selectedExtensionIds?new Set(d):new Set(d.filter(o=>{var p;return(p=i.selectedExtensionIds)==null?void 0:p.has(o)}))}function yg(i,r){return{icon:(i==null?void 0:i.trim())===r.trim()?"branch":null}}function vg(i,r){const d=(i==null?void 0:i.trim())??"",o=d||"detached";return o===r.trim()?null:{label:o,title:d||"Detached HEAD"}}function fh(i){return i.length>1}const gg=300,pg=560,Sg=360,bg={files:[],stats:{files:0,additions:0,deletions:0}},xg=[],jg=[],oh={diff:null,error:null,loading:!1},Eg=new Intl.RelativeTimeFormat(void 0,{numeric:"auto"}),Ng=new Intl.DateTimeFormat(void 0,{dateStyle:"medium",timeStyle:"short"}),uf=[["year",3600*24*365],["month",3600*24*30],["week",3600*24*7],["day",3600*24],["hour",3600],["minute",60],["second",1]];function Tg({reviewId:i}){return s.jsx(Ag,{reviewId:i},i)}function zg(i){const r=document.getElementById(lh(i));if(!r)return;const o=r.getBoundingClientRect().top+window.scrollY-156;window.scrollTo({behavior:"smooth",top:Math.max(o,0)})}function Ag({reviewId:i}){const[r,d]=B.useState(null),[o,p]=B.useState(null),[N,R]=B.useState(!1),[w,O]=B.useState(null),[v,D]=B.useState(!0),[M,q]=B.useState(!1),[Z,k]=B.useState(Sg),[fe,Ae]=B.useState({reviewId:null,searchQuery:"",selectedExtensionIds:null}),[L,je]=B.useState(null),[me,te]=B.useState({mode:"all"}),[Ne,ne]=B.useReducer(Rg,oh),[W,pe]=B.useState(()=>({storageKey:i,files:af(i)})),[Qe,pt]=B.useState(null),Ie=gt(X=>X.reset),G=gt(X=>X.hydrateReview),H=gt(X=>X.setDraft),V=(r==null?void 0:r.turns[r.turns.length-1])??null,le=(V==null?void 0:V.id)??null,S=r&&V?r.turns.find(X=>X.id===L)??V:null,C=r&&S?_g(r,S):null,K=C?zm(C):null,ae=(S==null?void 0:S.diff.commitDiffs)??jg,ee=B.useMemo(()=>Cg(me,ae),[ae,me]),h=S&&ee.mode==="single"?ae.find(X=>X.commit.sha===ee.sha)??null:null,A=S&&ee.mode==="range"?Ne.diff??bg:null,U=S?A??h??S.diff:null,Y=(U==null?void 0:U.files)??xg,F=B.useMemo(()=>ag(Y),[Y]),ie=B.useMemo(()=>F.map(X=>X.id),[F]),he=(r==null?void 0:r.meta.id)??null,Pe=!!(he&&fe.reviewId===he),Re=B.useMemo(()=>he?hg(fe,he,ie):new Set(ie),[ie,fe,he]),$t=Pe?fe.searchQuery:"",Ft=B.useMemo(()=>ug(Y,$t,Re),[Y,$t,Re]),qt=S?`${i}:${S.id}`:i;let Xl=W.files;W.storageKey!==qt&&(Xl=af(qt),pe({storageKey:qt,files:Xl}));const Xt=w&&Ft.some(X=>X.path===w)?w:null,vl=B.useCallback(X=>{d(X),document.title=zm(X)},[]),Ql=B.useCallback(()=>{te({mode:"all"}),ne({type:"idle"}),H(null)},[H]),ta=B.useCallback(async()=>{var Le;const X=await _m(i),oe=((Le=X.turns[X.turns.length-1])==null?void 0:Le.id)??null;L===null&&le&&oe!==le&&Ql(),vl(X)},[i,L,le,Ql,vl]);if(B.useEffect(()=>{let X=!1;return Ie(),_m(i).then(oe=>{X||vl(oe)}).catch(oe=>{X||p(oe instanceof Error?oe.message:String(oe))}),()=>{X=!0}},[i,Ie,vl]),B.useEffect(()=>{var X;S&&G(((X=S.feedback)==null?void 0:X.comments)??[],S.resolution??null)},[G,S]),B.useEffect(()=>{if(!S||ee.mode!=="range")return;let X=!1;return ne({type:"loading"}),Mv(i,ee.fromSha,ee.toSha,S.id).then(oe=>{X||ne({type:"loaded",diff:oe})}).catch(oe=>{X||ne({error:oe instanceof Error?oe.message:String(oe),type:"failed"})}),()=>{X=!0}},[ee,S,i]),B.useEffect(()=>{const X=new EventSource(`/api/reviews/${i}/events`);return X.onmessage=oe=>{const Le=cv(oe.data,hv,"review event");mg(Le)&&ta().catch(St=>{p(St instanceof Error?St.message:String(St))})},()=>{X.close()}},[i,ta]),o)return s.jsx("main",{className:"empty-shell",children:s.jsxs("section",{className:"empty-panel",children:[s.jsx("h1",{children:"Review unavailable"}),s.jsx("p",{children:o})]})});if(!r||!S||!C||!U||!K)return s.jsx("main",{className:"empty-shell",children:s.jsxs("section",{className:"empty-panel",children:[s.jsx(r1,{className:"spin",size:24}),s.jsx("p",{children:"Loading review"})]})});const uu=S.diff.scope,la=U.stats,na=yg(C.meta.branch,K),Vl=vg(C.meta.branch,K),Di=qg(ee),aa=S.id!==le||I1(S.status),it=fh(r.turns),iu=ee.mode==="range"?Ne.error:null,cu=ee.mode==="range"&&Ne.loading,ua=U.files.filter(X=>Xl.has(X.path)).length,mn=U.files.length===0?0:Math.round(ua/U.files.length*100),Oi=X=>{Ae(oe=>({reviewId:r.meta.id,searchQuery:X,selectedExtensionIds:oe.reviewId===r.meta.id?oe.selectedExtensionIds:null}))},su=X=>{Ae(oe=>{const Le=oe.reviewId===r.meta.id&&oe.selectedExtensionIds?new Set(oe.selectedExtensionIds):new Set(ie);return Le.has(X)?Le.delete(X):Le.add(X),{reviewId:r.meta.id,searchQuery:oe.reviewId===r.meta.id?oe.searchQuery:"",selectedExtensionIds:Le}})},Ci=()=>{Ae(X=>({reviewId:r.meta.id,searchQuery:X.reviewId===r.meta.id?X.searchQuery:"",selectedExtensionIds:null}))},Ri=()=>{Ae(X=>({reviewId:r.meta.id,searchQuery:X.reviewId===r.meta.id?X.searchQuery:"",selectedExtensionIds:new Set}))},Zl=X=>{O(X),q(!1),window.requestAnimationFrame(()=>{window.setTimeout(()=>zg(X),0)})},ct=X=>{X.preventDefault();const oe=X.clientX,Le=Z,St=Hi=>{const ou=Le+Hi.clientX-oe;k(Math.min(pg,Math.max(gg,ou)))},bt=()=>{window.removeEventListener("pointermove",St),window.removeEventListener("pointerup",bt)};window.addEventListener("pointermove",St),window.addEventListener("pointerup",bt,{once:!0})},Qt=(X,oe)=>{pe(Le=>{const St=Le.storageKey===qt?Le.files:af(qt),bt=new Set(St);return oe?bt.add(X):bt.delete(X),dg(qt,bt),{storageKey:qt,files:bt}})},st=async X=>{pt(null);try{await _v(i,X,S.id)}catch(oe){pt(oe instanceof Error?oe.message:String(oe))}},fu={activeFilePath:Xt,extensionBuckets:F,files:U.files,filteredFiles:Ft,searchQuery:$t,selectedExtensionIds:Re,onClearExtensions:Ri,onFileSelect:Zl,onSearchChange:Oi,onSelectAllExtensions:Ci,onToggleExtension:su},wi=s.jsx(wm,{...fu,onCollapse:()=>D(!0)}),Ui=s.jsx(wm,{...fu}),hn=U.files.length===0?null:s.jsxs("div",{className:"empty-diff filtered-empty",children:[s.jsx("h2",{children:"No matching files"}),s.jsx("p",{children:"Adjust the file search or extension filters to show changed files."})]});return s.jsxs("main",{className:"review-shell",children:[s.jsxs("header",{className:"topbar",children:[s.jsxs("div",{className:"topbar-header",children:[s.jsxs("div",{className:"topbar-title",children:[s.jsx("img",{className:"brand-mark",src:"/logo.svg",alt:""}),s.jsxs("div",{className:"review-heading",children:[s.jsx("p",{className:"product-name",children:"Gloss"}),s.jsxs("h1",{children:[na.icon==="branch"?s.jsx(Ti,{className:"review-title-icon",size:18}):null,s.jsx("span",{className:"review-title-text",children:K})]})]})]}),s.jsxs("div",{className:"topbar-actions",children:[s.jsx(wg,{commitDiffs:ae,value:ee,onChange:X=>{te(X),X.mode!=="range"&&ne({type:"idle"}),H(null)}}),s.jsxs("div",{className:"viewed-progress",title:"Viewed files",children:[s.jsx("span",{"aria-hidden":"true",className:"viewed-progress-ring",style:{"--viewed-progress":`${mn}%`}}),ua," / ",U.files.length," viewed"]}),s.jsx("button",{"aria-label":"Open file tree",className:"icon-button file-tree-mobile-toggle",title:"Open file tree",type:"button",onClick:()=>q(!0),children:s.jsx(rf,{size:16})}),s.jsx("button",{"aria-label":N?"Unwrap lines":"Wrap lines","aria-pressed":N,className:"icon-button wrap-toggle",title:N?"Unwrap lines":"Wrap lines",type:"button",onClick:()=>R(X=>!X),children:N?s.jsx(v1,{size:16}):s.jsx(R1,{size:16})}),Vl?s.jsxs("div",{className:"branch-pill",title:Vl.title,children:[s.jsx(Ti,{size:16}),s.jsx("span",{children:Vl.label})]}):null]})]}),s.jsx(Mg,{scope:uu,selectedTurn:S,stats:la,turns:r.turns,onSelectTurn:X=>{X!==S.id&&Ql(),je(X===le?null:X)}})]}),Qe?s.jsx("div",{className:"open-file-message error",children:Qe}):null,iu?s.jsx("div",{className:"open-file-message error",children:iu}):null,cu?s.jsx("div",{className:"range-loading",children:"Loading range diff"}):null,s.jsxs("div",{className:`review-body ${v?"file-tree-collapsed":""}`,style:{"--file-tree-width":`${Z}px`},children:[s.jsx("aside",{className:`review-sidebar ${v?"collapsed":""}`,children:v?s.jsxs("button",{"aria-label":"Expand file tree",className:"file-tree-rail",title:"Expand file tree",type:"button",onClick:()=>D(!1),children:[s.jsx(b1,{size:17}),s.jsx("span",{children:"Files"}),s.jsx("span",{children:Ft.length})]}):s.jsxs(s.Fragment,{children:[wi,s.jsx("button",{"aria-label":"Resize file tree",className:"file-tree-resize-handle",title:"Resize file tree",type:"button",onPointerDown:ct})]})}),s.jsxs("section",{className:"review-diff-column",children:[aa&&!it?s.jsx(Gg,{record:C}):null,s.jsx($v,{activeFilePath:Xt,diff:U,emptyState:hn,files:Ft,record:C,readOnly:aa,viewedFiles:Xl,wrapLines:N,onOpenFile:st,onViewedChange:Qt})]})]}),M?s.jsx("dialog",{className:"file-tree-drawer-backdrop","aria-label":"Files",open:!0,children:s.jsxs("aside",{className:"file-tree-drawer",children:[s.jsxs("div",{className:"file-tree-drawer-header",children:[s.jsx("span",{children:"Changed files"}),s.jsx("button",{"aria-label":"Close file tree",className:"icon-button",type:"button",onClick:()=>q(!1),children:s.jsx(df,{size:16})})]}),Ui]})}):null,aa?null:s.jsx(og,{reviewId:i,reviewScope:Di,onSubmitted:ta})]})}function _g(i,r){return{...i,meta:{...i.meta,activeTurnId:r.id,status:r.status,submittedAt:r.submittedAt,resolvedAt:r.resolvedAt,feedbackPath:r.feedbackPath,markdownPath:r.markdownPath},diff:r.diff,...r.feedback?{feedback:r.feedback}:{feedback:void 0},...r.resolution?{resolution:r.resolution}:{resolution:void 0}}}function Mg({scope:i,selectedTurn:r,stats:d,turns:o,onSelectTurn:p}){return s.jsxs("div",{className:"review-context-bar",children:[s.jsxs("div",{className:"review-context-range",title:`${Lm("Base",i.base.ref,i.base.sha)} to ${Lm("Compare",i.comparison.ref,i.comparison.sha)}`,children:[s.jsx("span",{className:"review-context-ref",children:Hm(i.base.ref,i.base.sha)}),s.jsx(Ym,{className:"review-context-arrow",size:14}),s.jsx("span",{className:"review-context-ref",children:Hm(i.comparison.ref,i.comparison.sha)})]}),s.jsx("span",{className:"review-context-divider","aria-hidden":"true"}),s.jsxs("div",{className:"review-context-stats",title:"Changed files",children:[s.jsxs("span",{children:[d.files," ",d.files===1?"file":"files"]}),s.jsxs("span",{className:"summary-add",children:["+",d.additions]}),s.jsxs("span",{className:"summary-del",children:["-",d.deletions]})]}),s.jsx(Dg,{selectedTurn:r,turns:o,onSelect:p})]})}function Dg({selectedTurn:i,turns:r,onSelect:d}){var O;const[o,p]=B.useState(!1),N=B.useRef(null);if(B.useEffect(()=>{if(!o)return;const v=M=>{var q;(q=N.current)!=null&&q.contains(M.target)||p(!1)},D=M=>{M.key==="Escape"&&p(!1)};return window.addEventListener("pointerdown",v),window.addEventListener("keydown",D),()=>{window.removeEventListener("pointerdown",v),window.removeEventListener("keydown",D)}},[o]),!fh(r))return null;const R=(O=r[r.length-1])==null?void 0:O.id,w=[...r].reverse();return s.jsxs("div",{className:"turn-selector",ref:N,children:[s.jsxs("button",{"aria-expanded":o,"aria-haspopup":"menu",className:"turn-selector-trigger",type:"button",onClick:()=>p(v=>!v),children:[s.jsxs("span",{children:["Turn ",i.index," of ",r.length]}),s.jsx("span",{className:`turn-selector-status ${i.status}`,children:i.status}),s.jsx(au,{size:14})]}),o?s.jsx("div",{className:"turn-menu",role:"menu","aria-label":"Review turns",children:w.map(v=>{var fe;const D=Zm(v),M=v.id===i.id,q=v.id===R,Z=(fe=v.feedback)!=null&&fe.reviewScope?F1(v.feedback.reviewScope,v.diff.commitDiffs??[]):null,k=Og(v);return s.jsxs("button",{"aria-checked":M,className:`turn-menu-item ${M?"selected":""}`,role:"menuitemradio",type:"button",onClick:()=>{d(v.id),p(!1)},children:[s.jsxs("span",{className:"turn-menu-title",children:["Turn ",v.index,q?s.jsx("span",{className:"turn-menu-latest",children:"Latest"}):null]}),s.jsxs("span",{className:`turn-menu-meta ${v.status}`,children:[v.status,D.total>0?` · ${D.open} open / ${D.total}`:" · no comments"]}),k?s.jsx("time",{className:"turn-menu-time",dateTime:k,children:dh(k)}):null,Z?s.jsxs("span",{className:"turn-menu-scope",children:["Scope: ",Z]}):null]},v.id)})}):null]})}function Hm(i,r){return r?`${i} ${r.slice(0,7)}`:i}function Lm(i,r,d){return`${i} ${r}${d?` (${d})`:""}`}function Og(i){var r;return i.status==="resolved"?i.resolvedAt??((r=i.resolution)==null?void 0:r.resolvedAt)??null:i.status==="submitted"?i.submittedAt??null:null}function Cg(i,r){if(i.mode==="all")return i;if(i.mode==="single")return r.some(p=>p.commit.sha===i.sha)?i:{mode:"all"};const d=r.findIndex(p=>p.commit.sha===i.fromSha),o=r.findIndex(p=>p.commit.sha===i.toSha);return d>=0&&o>=d?i:{mode:"all"}}function Rg(i,r){switch(r.type){case"idle":return oh;case"loading":return{diff:null,error:null,loading:!0};case"loaded":return{diff:r.diff,error:null,loading:!1};case"failed":return{diff:null,error:r.error,loading:!1}}}function wg({commitDiffs:i,value:r,onChange:d}){const[o,p]=B.useState(!1),[N,R]=B.useState("all"),[w,O]=B.useState(new Set),v=B.useRef(null),D=B.useRef(null),M=B.useMemo(()=>i.map(L=>({sha:L.commit.sha,shortSha:L.commit.shortSha,subject:L.commit.subject,authorName:L.commit.authorName,committedAt:L.commit.committedAt,fileCount:L.files.length})),[i]);if(B.useEffect(()=>{if(!o)return;D.current=document.activeElement instanceof HTMLElement?document.activeElement:null;const L=["button:not(:disabled)","input:not(:disabled)","select:not(:disabled)","textarea:not(:disabled)","a[href]",'[tabindex]:not([tabindex="-1"])'].join(","),je=()=>{var te;return Array.from(((te=v.current)==null?void 0:te.querySelectorAll(L))??[]).filter(Ne=>Ne.offsetParent!==null)};window.requestAnimationFrame(()=>{var te;(te=je()[0]??v.current)==null||te.focus()});const me=te=>{var pe;if(te.key==="Escape"&&p(!1),te.key!=="Tab")return;const Ne=je();if(Ne.length===0){te.preventDefault(),(pe=v.current)==null||pe.focus();return}const ne=Ne[0],W=Ne[Ne.length-1];te.shiftKey&&document.activeElement===ne?(te.preventDefault(),W.focus()):!te.shiftKey&&document.activeElement===W&&(te.preventDefault(),ne.focus())};return window.addEventListener("keydown",me),()=>{var te;window.removeEventListener("keydown",me),(te=D.current)==null||te.focus(),D.current=null}},[o]),M.length===0)return null;const q=()=>{const L=Ug(r,M);R(r.mode==="all"||L.size===0?"all":"selected"),O(L),p(!0)},Z=rh(w,M),k=Z.length>0?{from:M[Z[0]],to:M[Z[Z.length-1]],count:Z[Z.length-1]-Z[0]+1}:null,fe=N==="all"?`${M.length} ${M.length===1?"commit":"commits"}`:k?k.from.sha===k.to.sha?k.from.shortSha:`${k.count} commits · ${k.from.shortSha} to ${k.to.shortSha}`:"No commits selected",Ae=N==="all"||Z.length>0;return s.jsxs("div",{className:"commit-selector",children:[s.jsxs("button",{"aria-expanded":o,className:"commit-picker-trigger",type:"button",onClick:q,children:[s.jsx(f1,{size:16}),s.jsx("span",{className:"commit-picker-trigger-text",children:Bg(r,M)}),s.jsx(au,{size:16})]}),o?J1.createPortal(s.jsx("div",{className:"commit-picker-backdrop",children:s.jsxs("dialog",{"aria-labelledby":"commit-picker-title","aria-modal":"true",className:"commit-picker-dialog",ref:v,open:!0,tabIndex:-1,children:[s.jsxs("header",{className:"commit-picker-header",children:[s.jsx("h2",{id:"commit-picker-title",children:"Select commits to view"}),s.jsx("button",{"aria-label":"Close commit picker",className:"icon-button commit-picker-close",type:"button",onClick:()=>p(!1),children:s.jsx(df,{size:20})})]}),s.jsxs("div",{className:"commit-picker-body",children:[s.jsxs("label",{className:`commit-picker-all ${N==="all"?"selected":""}`,children:[s.jsx("input",{checked:N==="all",className:"commit-picker-checkbox",type:"checkbox",onChange:()=>{R("all"),O(new Set)}}),s.jsxs("span",{className:"commit-picker-all-copy",children:[s.jsx("span",{children:"All commits"}),s.jsxs("span",{children:[M.length," ",M.length===1?"commit":"commits"]})]})]}),s.jsx("div",{className:"commit-picker-section-label",children:"Select a range of commits"}),s.jsx("div",{className:"commit-picker-list",children:M.map(L=>{const je=N==="selected"&&w.has(L.sha);return s.jsxs("label",{className:`commit-picker-row ${je?"selected":""}`,children:[s.jsx("input",{checked:je,className:"commit-picker-checkbox",type:"checkbox",onChange:()=>{R("selected"),O(me=>Hg(me,L.sha,M))}}),s.jsxs("span",{className:"commit-picker-row-copy",children:[s.jsx("span",{className:"commit-picker-subject",children:L.subject}),s.jsxs("span",{className:"commit-picker-meta",children:[L.authorName," committed ",Yg(L.committedAt)," ","· ",L.fileCount," ",L.fileCount===1?"file":"files"]})]}),s.jsx("span",{className:"commit-picker-sha",children:L.shortSha})]},L.sha)})})]}),s.jsxs("footer",{className:"commit-picker-footer",children:[s.jsx("span",{className:"commit-picker-summary",children:fe}),s.jsx("button",{className:"secondary-button",type:"button",onClick:()=>p(!1),children:"Cancel"}),s.jsxs("button",{className:"primary-button",disabled:!Ae,type:"button",onClick:()=>{if(N==="all"){d({mode:"all"}),p(!1);return}const L=Lg(Z,M);L&&(d(L),p(!1))},children:[s.jsx(rn,{size:16}),"Save"]})]})]})}),document.body):null]})}function Ug(i,r){if(i.mode==="all")return new Set;if(i.mode==="single")return r.some(p=>p.sha===i.sha)?new Set([i.sha]):new Set;const d=r.findIndex(p=>p.sha===i.fromSha),o=r.findIndex(p=>p.sha===i.toSha);return d<0||o<d?new Set:Pn(d,o,r)}function rh(i,r){const d=[];for(const[o,p]of r.entries())i.has(p.sha)&&d.push(o);return d}function Hg(i,r,d){const o=d.findIndex(v=>v.sha===r);if(o<0)return i;const p=rh(i,d);if(!i.has(r)){const v=p.length>0?Math.min(p[0],o):o,D=p.length>0?Math.max(p[p.length-1],o):o;return Pn(v,D,d)}if(p.length<=1)return new Set;const N=p[0],R=p[p.length-1];if(o<=N)return Pn(N+1,R,d);if(o>=R)return Pn(N,R-1,d);const w=o-N,O=R-o;return w>=O?Pn(N,o-1,d):Pn(o+1,R,d)}function Pn(i,r,d){return i<0||r<i?new Set:new Set(d.slice(i,r+1).map(o=>o.sha))}function Lg(i,r){if(i.length===0)return null;const d=i[0],o=i[i.length-1];return d===o?{mode:"single",sha:r[d].sha}:{mode:"range",fromSha:r[d].sha,toSha:r[o].sha}}function qg(i){return i.mode==="all"?{mode:"all"}:i.mode==="single"?{mode:"single",sha:i.sha}:{mode:"range",fromSha:i.fromSha,toSha:i.toSha}}function Bg(i,r){if(i.mode==="all")return"All commits";if(i.mode==="single"){const N=r.find(R=>R.sha===i.sha);return N?`${N.shortSha} ${N.subject}`:"One commit"}const d=r.findIndex(N=>N.sha===i.fromSha),o=r.findIndex(N=>N.sha===i.toSha);return d<0||o<d?"Commit range":`${o-d+1} commits · ${r[d].shortSha} to ${r[o].shortSha}`}function Yg(i){const r=new Date(i);if(Number.isNaN(r.getTime()))return"recently";const d=Math.round((r.getTime()-Date.now())/1e3),[o,p]=uf.find(([,N])=>Math.abs(d)>=N)??uf[uf.length-1];return Eg.format(Math.round(d/p),o)}function Gg({record:i}){var o;const r=Xg(i);if(!r)return null;const d=i.meta.status==="resolved"?i.meta.resolvedAt??((o=i.resolution)==null?void 0:o.resolvedAt):i.meta.submittedAt;return s.jsxs("section",{className:`review-state-banner ${i.meta.status}`,children:[s.jsxs("div",{className:"review-state-title",children:[s.jsx(Xm,{size:16}),s.jsx("span",{children:r.title})]}),s.jsx("p",{children:r.body}),d?s.jsx("time",{dateTime:d,children:dh(d)}):null]})}function Xg(i){const r=i.meta.status,d=Zm(i),o=d.total>0?`${d.resolved} of ${d.total} comments resolved`:null;return r==="submitted"?{title:d.resolved>0&&o?`Submitted · ${o}`:"Submitted",body:d.resolved>0?"Feedback is being handled.":"Feedback has been submitted."}:r==="resolved"?{title:o?`Resolved · ${o}`:"Resolved",body:"This feedback turn is resolved."}:null}function dh(i){return Ng.format(new Date(i))}const Qg="npx skills add iamrajjoshi/gloss --skill gloss -g -a claude-code",Vg=`1. Run gloss open --json from the repo root unless the user names a base ref.
238
238
  2. Wait for the browser review to be submitted.
239
239
  3. Read feedbackPath from the JSON output.
@@ -0,0 +1 @@
1
+ @import"https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;500;700;800&display=swap";/*! tailwindcss v4.3.0 | MIT License | https://tailwindcss.com */@layer properties{@supports (((-webkit-hyphens:none)) and (not (margin-trim:inline))) or ((-moz-orient:inline) and (not (color:rgb(from red r g b)))){*,:before,:after,::backdrop{--tw-border-style:solid;--tw-outline-style:solid;--tw-blur:initial;--tw-brightness:initial;--tw-contrast:initial;--tw-grayscale:initial;--tw-hue-rotate:initial;--tw-invert:initial;--tw-opacity:initial;--tw-saturate:initial;--tw-sepia:initial;--tw-drop-shadow:initial;--tw-drop-shadow-color:initial;--tw-drop-shadow-alpha:100%;--tw-drop-shadow-size:initial;--tw-backdrop-blur:initial;--tw-backdrop-brightness:initial;--tw-backdrop-contrast:initial;--tw-backdrop-grayscale:initial;--tw-backdrop-hue-rotate:initial;--tw-backdrop-invert:initial;--tw-backdrop-opacity:initial;--tw-backdrop-saturate:initial;--tw-backdrop-sepia:initial}}}@layer theme{:root,:host{--font-sans:ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji";--font-mono:ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;--font-weight-medium:500;--default-font-family:var(--font-sans);--default-mono-font-family:var(--font-mono)}}@layer base{*,:after,:before,::backdrop{box-sizing:border-box;border:0 solid;margin:0;padding:0}::file-selector-button{box-sizing:border-box;border:0 solid;margin:0;padding:0}html,:host{-webkit-text-size-adjust:100%;-moz-tab-size:4;tab-size:4;line-height:1.5;font-family:var(--default-font-family,ui-sans-serif, system-ui, sans-serif, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", "Noto Color Emoji");font-feature-settings:var(--default-font-feature-settings,normal);font-variation-settings:var(--default-font-variation-settings,normal);-webkit-tap-highlight-color:transparent}hr{height:0;color:inherit;border-top-width:1px}abbr:where([title]){-webkit-text-decoration:underline dotted;text-decoration:underline dotted}h1,h2,h3,h4,h5,h6{font-size:inherit;font-weight:inherit}a{color:inherit;-webkit-text-decoration:inherit;text-decoration:inherit}b,strong{font-weight:bolder}code,kbd,samp,pre{font-family:var(--default-mono-font-family,ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace);font-feature-settings:var(--default-mono-font-feature-settings,normal);font-variation-settings:var(--default-mono-font-variation-settings,normal);font-size:1em}small{font-size:80%}sub,sup{vertical-align:baseline;font-size:75%;line-height:0;position:relative}sub{bottom:-.25em}sup{top:-.5em}table{text-indent:0;border-color:inherit;border-collapse:collapse}:-moz-focusring{outline:auto}progress{vertical-align:baseline}summary{display:list-item}ol,ul,menu{list-style:none}img,svg,video,canvas,audio,iframe,embed,object{vertical-align:middle;display:block}img,video{max-width:100%;height:auto}button,input,select,optgroup,textarea{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}::file-selector-button{font:inherit;font-feature-settings:inherit;font-variation-settings:inherit;letter-spacing:inherit;color:inherit;opacity:1;background-color:#0000;border-radius:0}:where(select:is([multiple],[size])) optgroup{font-weight:bolder}:where(select:is([multiple],[size])) optgroup option{padding-inline-start:20px}::file-selector-button{margin-inline-end:4px}::placeholder{opacity:1}@supports (not ((-webkit-appearance:-apple-pay-button))) or (contain-intrinsic-size:1px){::placeholder{color:currentColor}@supports (color:color-mix(in lab,red,red)){::placeholder{color:color-mix(in oklab,currentcolor 50%,transparent)}}}textarea{resize:vertical}::-webkit-search-decoration{-webkit-appearance:none}::-webkit-date-and-time-value{min-height:1lh;text-align:inherit}::-webkit-datetime-edit{display:inline-flex}::-webkit-datetime-edit-fields-wrapper{padding:0}::-webkit-datetime-edit{padding-block:0}::-webkit-datetime-edit-year-field{padding-block:0}::-webkit-datetime-edit-month-field{padding-block:0}::-webkit-datetime-edit-day-field{padding-block:0}::-webkit-datetime-edit-hour-field{padding-block:0}::-webkit-datetime-edit-minute-field{padding-block:0}::-webkit-datetime-edit-second-field{padding-block:0}::-webkit-datetime-edit-millisecond-field{padding-block:0}::-webkit-datetime-edit-meridiem-field{padding-block:0}::-webkit-calendar-picker-indicator{line-height:1}:-moz-ui-invalid{box-shadow:none}button,input:where([type=button],[type=reset],[type=submit]){-webkit-appearance:button;-moz-appearance:button;appearance:button}::file-selector-button{-webkit-appearance:button;-moz-appearance:button;appearance:button}::-webkit-inner-spin-button{height:auto}::-webkit-outer-spin-button{height:auto}[hidden]:where(:not([hidden=until-found])){display:none!important}}@layer components;@layer utilities{.sr-only{clip-path:inset(50%);white-space:nowrap;border-width:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.fixed{position:fixed}.relative{position:relative}.block{display:block}.contents{display:contents}.hidden{display:none}.rounded{border-radius:.25rem}.border{border-style:var(--tw-border-style);border-width:1px}.italic{font-style:italic}.line-through{text-decoration-line:line-through}.underline{text-decoration-line:underline}.outline{outline-style:var(--tw-outline-style);outline-width:1px}.blur{--tw-blur:blur(8px);filter:var(--tw-blur,) var(--tw-brightness,) var(--tw-contrast,) var(--tw-grayscale,) var(--tw-hue-rotate,) var(--tw-invert,) var(--tw-saturate,) var(--tw-sepia,) var(--tw-drop-shadow,)}.backdrop-filter{-webkit-backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,);backdrop-filter:var(--tw-backdrop-blur,) var(--tw-backdrop-brightness,) var(--tw-backdrop-contrast,) var(--tw-backdrop-grayscale,) var(--tw-backdrop-hue-rotate,) var(--tw-backdrop-invert,) var(--tw-backdrop-opacity,) var(--tw-backdrop-saturate,) var(--tw-backdrop-sepia,)}}:root{color-scheme:dark;--color-midnight-ink:#111;--color-ghost-ash:#f9f9f9;--color-deep-graphite:#2b2b2b;--color-muted-stone:#b7b3a2;--color-light-grayscale:#eee;--color-shadow-ink:#000;--color-subtle-gray:#d6d6d6;--color-midtone-gray:#6e6e6e;--color-silver-mist:#9c9c9c;--color-dark-frost:#222;--color-slate-border:#565656;--font-primary:"JetBrains Mono", "SFMono-Regular", Consolas, "Liberation Mono", Menlo, monospace;--font-mono:var(--font-primary);--text-caption:10px;--text-small:12px;--text-body:16px;--text-subheading:20px;--text-heading:24px;--text-display:80px;--leading-caption:1.73;--leading-body:1.5;--leading-subheading:1.3;--leading-heading:1.2;--leading-display:.9;--font-weight-regular:400;--font-weight-medium:500;--spacing-8:8px;--spacing-16:16px;--spacing-24:24px;--spacing-32:32px;--spacing-40:40px;--spacing-48:48px;--spacing-64:64px;--spacing-80:80px;--spacing-96:96px;--spacing-128:128px;--spacing-144:144px;--spacing-192:192px;--page-max-width:1200px;--section-gap:48px;--card-padding:32px;--element-gap:16px;--radius-nav:4px;--radius-cards:12px;--radius-buttons:4px;--radius-decorative:20px;--radius-panel:8px;--grid-line:#f9f9f90e;--surface-dark:var(--color-midnight-ink);--surface-inset:#191919;--surface-raised:var(--color-dark-frost);--surface-strong:var(--color-deep-graphite);--surface-soft:#f9f9f90b;--border-soft:#d6d6d62e;--border-strong:var(--color-slate-border);--text-primary:var(--color-ghost-ash);--text-secondary:var(--color-silver-mist);--text-muted:var(--color-muted-stone);--site-accent:#3fb950;--site-accent-hover:#56d364;--site-accent-muted:#2ea04326;--accent:var(--site-accent);--review-sticky-top:112px;--ide-bg:#0d1117;--ide-bg-muted:#151b23;--ide-fg:#f0f6fc;--ide-fg-muted:#9198a1;--ide-border:#3d444d;--ide-success:#3fb950;--ide-success-muted:#2ea04326;--ide-success-gutter:#3fb9504d;--ide-success-word:#2ea04366;--ide-danger:#f85149;--ide-danger-muted:#f851491a;--ide-danger-gutter:#f851494d;--ide-danger-word:#f8514966;--ide-warning:#d29922;--ide-warning-muted:#bb800926;--ide-warning-border:#bb800966;--ide-accent:#4493f8;--ide-accent-muted:#388bfd1a;--ide-accent-border:#388bfd66;font-family:var(--font-primary);background:var(--surface-dark);color:var(--text-primary);font-weight:var(--font-weight-regular)}*{box-sizing:border-box}html{background:var(--surface-dark);scroll-behavior:smooth}body{background:linear-gradient(var(--grid-line) 1px,transparent 1px),linear-gradient(90deg,var(--grid-line) 1px,transparent 1px),var(--surface-dark);min-width:320px;min-height:100vh;color:var(--text-primary);background-size:32px 32px;margin:0}button,textarea{font:inherit}button{color:inherit}a,button{-webkit-tap-highlight-color:transparent}a:focus-visible,button:focus-visible,textarea:focus-visible,.diff-scroller:focus-visible{outline:2px solid var(--accent);outline-offset:2px}code,pre{font-family:var(--font-mono)}.sr-only{clip:rect(0,0,0,0);white-space:nowrap;border:0;width:1px;height:1px;margin:-1px;padding:0;position:absolute;overflow:hidden}.brand-mark{border:1px solid var(--border-soft);border-radius:var(--radius-nav);background:var(--color-shadow-ink);width:32px;height:32px;display:block}.muted{color:var(--text-secondary);font-size:var(--text-small);line-height:var(--leading-body);margin:4px 0 0}.primary-button,.secondary-button,.icon-button,.marketing-copy,.hero-primary,.hero-secondary,.scene-composer button,.scene-inline-comment button,.scene-submit button{border-radius:var(--radius-buttons)}.primary-button,.secondary-button,.icon-button{cursor:pointer;border:1px solid #0000;justify-content:center;align-items:center;display:inline-flex}.primary-button{gap:var(--spacing-8);min-height:36px;padding:0 var(--spacing-16);background:var(--accent);color:var(--color-midnight-ink);font-size:var(--text-small);font-weight:var(--font-weight-medium)}.primary-button:hover:not(:disabled){background:var(--site-accent-hover)}.primary-button:disabled{cursor:default;opacity:.58}.secondary-button{gap:var(--spacing-8);min-height:36px;padding:0 var(--spacing-16);border:1px solid var(--ide-border);color:var(--ide-fg);font-size:var(--text-small);font-weight:var(--font-weight-medium);background:0 0}.secondary-button:hover{border-color:var(--ide-warning-border);background:var(--ide-warning-muted)}.icon-button{width:28px;height:28px;color:var(--text-secondary);background:0 0}.icon-button:hover{border-color:var(--border-soft);background:var(--surface-strong);color:var(--text-primary)}.spin{animation:1s linear infinite spin}@keyframes spin{to{transform:rotate(360deg)}}.review-shell{width:calc(100vw - 32px);max-width:1600px;padding:var(--spacing-16) 0 112px;margin:0 auto}.topbar{z-index:5;-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border-bottom:1px solid var(--border-soft);background:#111111f0;gap:12px;padding:14px 0;display:grid;position:sticky;top:0}.topbar-header{justify-content:space-between;align-items:center;gap:var(--spacing-16);min-width:0;display:flex}.topbar-title{flex:auto;align-items:flex-start;gap:14px;min-width:0;display:flex}.review-heading{flex:auto;min-width:0}.review-heading h1{align-items:center;gap:var(--spacing-8);min-width:0;color:var(--text-primary);font-size:var(--text-subheading);font-weight:var(--font-weight-medium);letter-spacing:0;white-space:nowrap;margin:0;display:flex}.review-title-icon{color:var(--text-secondary);flex:none}.review-title-text{text-overflow:ellipsis;min-width:0;overflow:hidden}.product-name{color:var(--text-secondary);font-size:var(--text-small);font-weight:var(--font-weight-medium);margin:0 0 2px}.review-context-bar{min-width:0;color:var(--text-secondary);font-size:var(--text-small);align-items:center;gap:10px;padding-left:46px;line-height:1.3;display:flex;overflow:visible}.review-context-range,.review-context-stats{border:1px solid var(--border-soft);border-radius:var(--radius-nav);background:var(--surface-raised);align-items:center;gap:7px;min-width:0;min-height:28px;padding:0 9px;display:inline-flex}.review-context-range{max-width:min(520px,45vw);color:var(--text-primary)}.review-context-ref{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.review-context-arrow{color:var(--text-secondary);flex:none}.review-context-divider{background:var(--border-soft);flex:none;width:1px;height:14px;display:none}.review-context-stats{flex:none}.summary-add{color:var(--ide-success)}.summary-del{color:var(--ide-danger)}.turn-selector{flex:none;position:relative}.turn-selector-trigger{border:1px solid var(--border-soft);border-radius:var(--radius-nav);background:var(--surface-raised);min-height:28px;color:var(--text-primary);cursor:pointer;font:inherit;align-items:center;gap:6px;padding:0 9px;display:inline-flex}.turn-selector-trigger:hover,.turn-selector-trigger[aria-expanded=true]{border-color:var(--ide-accent-border);background:var(--ide-accent-muted)}.turn-selector-status:before{content:"·";color:var(--text-secondary);margin-right:6px}.turn-selector-status.resolved,.turn-menu-meta.resolved{color:var(--ide-success)}.turn-menu{z-index:35;border:1px solid var(--ide-border);border-radius:var(--radius-panel);background:#05080d;width:min(320px,100vw - 32px);padding:6px;display:grid;position:absolute;top:calc(100% + 8px);right:0;box-shadow:0 18px 48px #0000007a}.turn-menu-item{border-radius:var(--radius-nav);color:var(--text-secondary);cursor:pointer;font:inherit;text-align:left;background:0 0;border:1px solid #0000;gap:3px;padding:9px 10px;display:grid}.turn-menu-item:hover,.turn-menu-item.selected{border-color:var(--ide-accent-border);background:var(--ide-accent-muted)}.turn-menu-title{color:var(--text-primary);font-size:var(--text-small);font-weight:var(--font-weight-medium);align-items:center;gap:6px;display:inline-flex}.turn-menu-latest{color:var(--ide-accent);font-size:10px;font-weight:var(--font-weight-medium);text-transform:uppercase}.turn-menu-meta,.turn-menu-time,.turn-menu-scope{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.turn-menu-meta{font-size:11px}.turn-menu-time,.turn-menu-scope{color:var(--ide-fg-muted);font-size:10px}.topbar-actions{justify-content:flex-end;align-items:center;gap:var(--spacing-8);flex-wrap:wrap;flex:0 auto;min-width:0;display:flex}.branch-pill{align-items:center;gap:var(--spacing-8);border:1px solid var(--border-soft);border-radius:var(--radius-nav);background:var(--surface-raised);min-width:0;max-width:220px;min-height:36px;color:var(--text-primary);font-size:var(--text-small);padding:0 11px;display:inline-flex}.branch-pill span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.viewed-progress{align-items:center;gap:var(--spacing-8);border:1px solid var(--border-soft);border-radius:var(--radius-nav);background:var(--surface-raised);min-height:36px;color:var(--text-secondary);font-size:var(--text-small);display:inline-flex}.commit-selector{flex:0 320px;min-width:0;max-width:min(360px,100%);position:relative}.commit-picker-trigger{align-items:center;gap:var(--spacing-8);border:1px solid var(--border-soft);border-radius:var(--radius-nav);background:var(--surface-raised);width:100%;min-height:36px;color:var(--text-primary);cursor:pointer;font:inherit;font-size:var(--text-small);padding:0 10px;display:inline-flex}.commit-picker-trigger:hover{border-color:var(--ide-accent-border);background:var(--ide-accent-muted)}.commit-picker-trigger svg{color:var(--text-secondary);flex:none}.commit-picker-trigger-text{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.commit-picker-backdrop{z-index:40;background:#0000009e;place-items:center;padding:24px;display:grid;position:fixed;top:0;right:0;bottom:0;left:0}.commit-picker-dialog{border:1px solid var(--ide-border);border-radius:var(--radius-panel);width:min(560px,100vw - 32px);max-height:min(780px,100vh - 48px);color:var(--ide-fg);background:#05080d;grid-template-rows:auto minmax(0,1fr) auto;margin:0;padding:0;display:grid;overflow:hidden;box-shadow:0 24px 80px #00000085}.commit-picker-header,.commit-picker-footer{padding:14px var(--spacing-16);border-color:var(--ide-border);align-items:center;gap:12px;display:flex}.commit-picker-header{border-bottom:1px solid var(--ide-border);justify-content:space-between}.commit-picker-header h2{color:var(--ide-fg);font-size:18px;font-weight:var(--font-weight-medium);letter-spacing:0;margin:0}.commit-picker-close{border-color:var(--ide-border);background:0 0;width:36px;height:36px}.commit-picker-body{min-height:0;overflow-y:auto}.commit-picker-all,.commit-picker-row{cursor:pointer}.commit-picker-all{border-radius:var(--radius-panel);background:var(--surface-inset);grid-template-columns:auto minmax(0,1fr);gap:12px;margin:10px;padding:12px;display:grid}.commit-picker-all.selected{background:var(--ide-bg-muted)}.commit-picker-all-copy,.commit-picker-row-copy{gap:5px;min-width:0;display:grid}.commit-picker-all-copy span:first-child,.commit-picker-subject{color:var(--ide-fg);text-overflow:ellipsis;white-space:nowrap;font-size:14px;font-weight:700;line-height:1.35;overflow:hidden}.commit-picker-all-copy span:last-child,.commit-picker-meta{color:var(--ide-fg-muted);font-size:var(--text-small);text-overflow:ellipsis;white-space:nowrap;line-height:1.35;overflow:hidden}.commit-picker-section-label{padding:10px var(--spacing-16);border-top:1px solid var(--ide-border);border-bottom:1px solid var(--ide-border);background:var(--ide-bg-muted);color:var(--ide-fg-muted);font-size:var(--text-small);font-weight:var(--font-weight-medium)}.commit-picker-list{display:grid}.commit-picker-row{min-height:64px;padding:12px var(--spacing-16);grid-template-columns:auto minmax(0,1fr) auto;align-items:flex-start;gap:12px;display:grid}.commit-picker-row:hover,.commit-picker-row.selected{background:#151b23b8}.commit-picker-checkbox{width:18px;height:18px;accent-color:var(--ide-accent);cursor:pointer;flex:none;margin:2px 0 0}.commit-picker-sha{color:var(--ide-fg-muted);font-size:13px;font-weight:var(--font-weight-medium)}.commit-picker-footer{border-top:1px solid var(--ide-border);background:#05080d;justify-content:flex-end}.commit-picker-summary{min-width:0;color:var(--ide-fg-muted);font-size:var(--text-small);text-overflow:ellipsis;white-space:nowrap;margin-right:auto;overflow:hidden}.viewed-progress{white-space:nowrap;flex:none;padding:0 10px}.viewed-progress-ring{background:conic-gradient(var(--ide-success) 0 var(--viewed-progress),transparent var(--viewed-progress) 100%);border:2px solid var(--ide-fg-muted);border-radius:999px;width:15px;height:15px}.open-file-message{width:max-content;max-width:100%;margin:var(--spacing-16) 0 0 auto;border:1px solid var(--ide-border);border-radius:var(--radius-nav);background:var(--ide-bg-muted);color:var(--ide-fg-muted);font-size:var(--text-small);padding:7px 10px}.open-file-message.error{border-color:var(--ide-danger)}@supports (color:color-mix(in lab,red,red)){.open-file-message.error{border-color:color-mix(in srgb,var(--ide-danger) 50%,var(--ide-border))}}.open-file-message.error{color:var(--ide-danger)}.range-loading{width:max-content;max-width:100%;margin:var(--spacing-16) 0 0 auto;color:var(--text-secondary);font-size:var(--text-small)}.wrap-toggle{border-color:var(--border-soft);background:var(--surface-raised);flex:none;width:36px;height:36px}.wrap-toggle[aria-pressed=true]{border-color:var(--ide-accent-border);background:var(--ide-accent-muted);color:var(--ide-accent)}.file-tree-mobile-toggle{border-color:var(--border-soft);background:var(--surface-raised);flex:none;display:none}.review-state-banner{align-items:center;gap:var(--spacing-16);margin:0 0 var(--spacing-8);border:1px solid var(--ide-border);border-radius:var(--radius-panel);color:var(--ide-fg-muted);font-size:var(--text-small);background:#151b23e6;padding:10px 12px;display:flex}.review-state-banner.resolved{border-color:var(--ide-success)}@supports (color:color-mix(in lab,red,red)){.review-state-banner.resolved{border-color:color-mix(in srgb,var(--ide-success) 50%,var(--ide-border))}}.review-state-banner.resolved{background:var(--ide-success)}@supports (color:color-mix(in lab,red,red)){.review-state-banner.resolved{background:color-mix(in srgb,var(--ide-success) 12%,#151b23e6)}}.review-state-title{align-items:center;gap:var(--spacing-8);color:var(--ide-fg);font-weight:var(--font-weight-medium);flex:none;display:inline-flex}.review-state-title svg{color:var(--ide-success)}.review-state-banner p{text-overflow:ellipsis;white-space:nowrap;min-width:0;margin:0;overflow:hidden}.review-state-banner time{color:var(--ide-fg-muted);white-space:nowrap;margin-left:auto}.review-body{grid-template-columns:var(--file-tree-width,360px) minmax(0,1fr);align-items:start;gap:var(--spacing-16);padding-top:var(--spacing-8);display:grid}.review-body.file-tree-collapsed{grid-template-columns:52px minmax(0,1fr)}.review-sidebar{top:calc(var(--review-sticky-top) + var(--spacing-16));z-index:4;min-width:0;max-height:calc(100vh - var(--review-sticky-top) - var(--spacing-16) - 32px);position:sticky}.review-sidebar.collapsed{max-height:none}.review-diff-column{min-width:0}.file-tree-panel{max-height:inherit;border:1px solid var(--ide-border);border-radius:var(--radius-panel);background:#0d1117f5;flex-direction:column;min-height:0;display:flex}.file-tree-resize-handle{cursor:col-resize;background:0 0;border:0;border-radius:999px;width:10px;height:calc(100% - 16px);position:absolute;top:8px;right:-5px}.file-tree-resize-handle:after{content:"";background:0 0;border-radius:999px;width:2px;height:calc(100% - 24px);position:absolute;top:12px;right:4px}.file-tree-resize-handle:hover:after,.file-tree-resize-handle:focus-visible:after{background:var(--ide-accent-border)}.file-tree-header{justify-content:space-between;align-items:center;gap:var(--spacing-8);min-height:36px;color:var(--ide-fg);font-size:13px;font-weight:var(--font-weight-medium);padding:8px 10px 0;display:flex}.file-tree-icon-button{border-radius:var(--radius-nav);width:28px;height:28px;color:var(--ide-fg-muted);cursor:pointer;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;display:inline-flex}.file-tree-icon-button:hover{border-color:var(--ide-border);background:var(--surface-soft);color:var(--ide-fg)}.file-tree-controls{gap:var(--spacing-8);border-bottom:1px solid var(--ide-border);grid-template-columns:minmax(0,1fr) 36px;padding:8px 10px 10px;display:grid}.file-tree-search{align-items:center;gap:var(--spacing-8);border:1px solid var(--ide-border);border-radius:var(--radius-panel);background:var(--ide-bg-muted);min-width:0;height:36px;color:var(--ide-fg-muted);grid-template-columns:auto minmax(0,1fr) auto;padding:0 10px;display:grid}.file-tree-search:focus-within{border-color:var(--ide-accent-border);box-shadow:0 0 0 1px var(--ide-accent-border);color:var(--ide-fg)}.file-tree-search input{min-width:0;color:var(--ide-fg);font:inherit;background:0 0;border:0;outline:0;font-size:13px}.file-tree-search input::placeholder{color:var(--ide-fg-muted)}.file-tree-clear{border-radius:var(--radius-nav);width:22px;height:22px;color:var(--ide-fg-muted);cursor:pointer;background:0 0;border:0;justify-content:center;align-items:center;display:inline-flex}.file-tree-clear:hover{background:var(--surface-soft);color:var(--ide-fg)}.file-tree-filter-shell{position:relative}.file-tree-filter-button{border:1px solid var(--ide-border);border-radius:var(--radius-panel);background:var(--ide-bg-muted);width:36px;height:36px;color:var(--ide-fg-muted);cursor:pointer;justify-content:center;align-items:center;display:inline-flex}.file-tree-filter-button:hover,.file-tree-filter-button[aria-expanded=true],.file-tree-filter-button.active{border-color:var(--ide-accent-border);background:var(--ide-accent-muted);color:var(--ide-accent)}.extension-popover{z-index:30;border:1px solid var(--ide-border);border-radius:var(--radius-panel);width:min(236px,100vw - 32px);font-family:var(--font-primary);font-size:var(--text-small);background:#05080d;padding:8px;position:absolute;top:calc(100% + 8px);right:0;box-shadow:0 16px 42px #00000070}.extension-popover-header{justify-content:space-between;align-items:center;gap:var(--spacing-8);color:var(--ide-fg-muted);font-size:var(--text-small);font-weight:var(--font-weight-medium);padding:1px 3px 6px;display:flex}.extension-popover-actions{gap:4px;display:inline-flex}.extension-popover-actions button{border-radius:var(--radius-nav);color:var(--ide-fg-muted);cursor:pointer;background:0 0;border:1px solid #0000;padding:2px 5px;font-family:inherit;font-size:11px}.extension-popover-actions button:hover{border-color:var(--ide-border);color:var(--ide-fg)}.extension-options{gap:3px;max-height:min(300px,100vh - 180px);display:grid;overflow:auto}.extension-option{align-items:center;gap:var(--spacing-8);border-radius:var(--radius-panel);width:100%;min-height:30px;color:var(--ide-fg);cursor:pointer;font-family:inherit;font-size:inherit;padding:0 var(--spacing-8);text-align:left;background:0 0;border:1px solid #0000;grid-template-columns:20px minmax(0,1fr) auto;display:grid}.extension-option:hover,.extension-option:focus-visible{border-color:var(--ide-accent-border);background:var(--ide-accent-muted)}.extension-check{color:var(--ide-fg-muted);display:inline-flex}.extension-label{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.extension-count{background:var(--ide-bg-muted);min-width:22px;color:var(--ide-fg);font-family:inherit;font-size:var(--text-small);text-align:center;border-radius:999px;line-height:20px}.file-tree-summary{color:var(--ide-fg-muted);font-size:var(--text-small);justify-content:space-between;padding:9px 12px 0;display:flex}.file-tree-list{min-height:0;padding:10px 14px 10px 12px;overflow-y:auto}.file-tree-row{align-items:center;gap:var(--spacing-8);border-radius:var(--radius-nav);width:100%;min-height:32px;color:var(--ide-fg);cursor:pointer;text-align:left;background:0 0;border:1px solid #0000;grid-template-columns:16px 18px minmax(0,1fr) auto;padding-right:28px;font-size:13px;display:grid}.file-tree-row.directory{color:var(--ide-fg);font-weight:var(--font-weight-medium);grid-template-columns:16px 18px minmax(0,1fr)}.file-tree-row.file{color:var(--ide-fg-muted)}.file-tree-row:hover,.file-tree-row.active{border-color:var(--ide-accent-border);background:var(--ide-accent-muted);color:var(--ide-fg)}.file-tree-row.active{box-shadow:none}.file-tree-row svg{flex:none}.file-tree-name{text-overflow:ellipsis;white-space:nowrap;min-width:0;overflow:hidden}.file-tree-spacer{width:16px}.file-tree-stats{gap:6px;padding-left:18px;padding-right:18px;display:inline-flex}.file-tree-empty{margin:var(--spacing-8);padding:var(--spacing-16);border:1px dashed var(--ide-border);border-radius:var(--radius-panel);color:var(--ide-fg-muted);font-size:13px}.file-tree-rail{border:1px solid var(--ide-border);border-radius:var(--radius-panel);width:52px;min-height:184px;color:var(--ide-fg-muted);cursor:pointer;background:#0d1117f5;place-items:center;gap:12px;padding:16px 0;display:grid}.file-tree-rail:hover{border-color:var(--ide-accent-border);background:var(--ide-accent-muted);color:var(--ide-fg)}.file-tree-rail span:first-of-type{writing-mode:vertical-rl;color:var(--ide-fg);font-size:var(--text-small);font-weight:var(--font-weight-medium);letter-spacing:0;text-orientation:mixed}.file-tree-rail span:last-of-type{background:var(--ide-bg-muted);min-width:24px;color:var(--ide-fg);font-size:var(--text-small);text-align:center;border-radius:999px;line-height:22px}.file-tree-drawer-backdrop{z-index:40;color:var(--ide-fg);max-width:none;height:auto;max-height:none;padding:var(--spacing-16);background:#00000094;border:0;width:auto;margin:0;display:none;position:fixed;top:0;right:0;bottom:0;left:0}.file-tree-drawer{border:1px solid var(--ide-border);border-radius:var(--radius-panel);background:var(--ide-bg);flex-direction:column;width:min(420px,100%);min-height:0;display:flex;box-shadow:0 24px 72px #00000085}.file-tree-drawer-header{border-bottom:1px solid var(--ide-border);color:var(--ide-fg);font-size:13px;font-weight:var(--font-weight-medium);justify-content:space-between;align-items:center;padding:10px 12px;display:flex}.file-tree-drawer-header .icon-button{border-color:var(--ide-border);background:var(--ide-bg-muted);width:30px;height:30px}.file-tree-drawer .file-tree-panel{border-radius:0 0 var(--radius-panel) var(--radius-panel);border:0;flex:1}.file-tree-drawer .file-tree-header{display:none}.diff-stack{gap:var(--spacing-16);padding-top:var(--spacing-16);display:grid}.review-diff-column .diff-stack{padding-top:0}.file-card{border:1px solid var(--ide-border);border-radius:var(--radius-cards);background:var(--ide-bg);scroll-margin-top:140px;overflow:hidden}.file-card.active{border-color:var(--ide-accent-border);box-shadow:0 0 0 1px var(--ide-accent-border)}.file-header{width:100%;padding:11px var(--spacing-16);border:0;border-bottom:1px solid var(--ide-border);background:var(--ide-bg-muted);text-align:left;grid-template-columns:minmax(0,1fr) auto auto auto auto;align-items:center;gap:10px;display:grid;position:relative}.file-header:hover{background:var(--ide-accent-muted)}.file-header-toggle{cursor:pointer;text-align:left;background:0 0;border:0;grid-template-columns:auto auto minmax(0,1fr) auto;align-items:center;gap:10px;min-width:0;padding:0;display:grid}.file-path,.rename-path{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.file-path{color:var(--ide-fg);font-family:var(--font-mono);font-size:13px}.rename-path{max-width:240px;color:var(--ide-fg-muted);font-size:var(--text-small)}.stat{font-family:var(--font-mono);font-size:var(--text-small);font-weight:var(--font-weight-medium)}.stat.add{color:var(--ide-success)}.stat.del{color:var(--ide-danger)}.viewed-toggle{border:1px solid var(--ide-border);border-radius:var(--radius-buttons);min-height:30px;color:var(--ide-fg);cursor:pointer;font-size:var(--text-small);font-weight:var(--font-weight-medium);align-items:center;gap:6px;padding:0 8px;display:inline-flex}.viewed-toggle:hover{border-color:var(--ide-accent-border);background:var(--ide-accent-muted)}.viewed-toggle input{width:14px;height:14px;accent-color:var(--ide-accent);margin:0}.file-menu{position:relative}.file-menu-button{border-color:#0000}.file-menu-popover{z-index:12;border:1px solid var(--ide-border);border-radius:var(--radius-panel);background:var(--ide-bg-muted);width:190px;padding:6px;position:absolute;top:calc(100% + 6px);right:0;box-shadow:0 16px 40px #00000057}.file-menu-popover button{border-radius:var(--radius-buttons);width:100%;min-height:34px;color:var(--ide-fg);cursor:pointer;text-align:left;background:0 0;border:0;align-items:center;gap:10px;padding:0 10px;display:flex}.file-menu-popover button:hover{background:var(--surface-strong)}.diff-scroller{width:100%;padding:6px 0;overflow-x:auto}.diff-table{border:0;width:max-content;min-width:100%;margin:0}.hunk+.hunk{border-top:1px solid var(--ide-border)}.hunk-header,.hidden-lines,.binary-note{background:var(--ide-accent-muted);width:100%;color:var(--ide-fg-muted);font-family:var(--font-mono);font-size:var(--text-small);text-align:left;border:0}.hunk-header{padding:var(--spacing-8) var(--spacing-16)}.hidden-lines{padding:7px var(--spacing-16);cursor:pointer;display:block}.hidden-lines:hover{color:var(--ide-accent)}.binary-note{padding:var(--spacing-16)}.diff-row{--range-background:var(--ide-accent)}@supports (color:color-mix(in lab,red,red)){.diff-row{--range-background:color-mix(in srgb, var(--ide-accent) 28%, var(--ide-bg-muted))}}.diff-row{--range-border:var(--ide-accent-border);--range-gutter-background:var(--ide-accent)}@supports (color:color-mix(in lab,red,red)){.diff-row{--range-gutter-background:color-mix(in srgb, var(--ide-accent) 40%, var(--ide-bg-muted))}}.diff-row{--range-rail:var(--ide-accent);width:100%;min-height:26px;color:var(--ide-fg);text-align:left;background:0 0;border:0;grid-template-columns:140px minmax(680px,max-content);align-items:stretch;display:grid;position:relative}.diff-row:hover{background:var(--ide-accent-muted)}.diff-row.read-only{cursor:default}.diff-row.read-only:hover{background:0 0}.diff-row.add.read-only:hover{background:var(--ide-success-muted)}.diff-row.delete.read-only:hover{background:var(--ide-danger-muted)}.diff-row.add{background:var(--ide-success-muted)}.diff-row.delete{background:var(--ide-danger-muted)}.diff-row.add:hover{background:var(--ide-success-gutter)}.diff-row.delete:hover{background:var(--ide-danger-gutter)}.diff-row.range-selected{background:var(--range-background);box-shadow:none}.diff-row.add.range-selected{--range-background:var(--ide-success)}@supports (color:color-mix(in lab,red,red)){.diff-row.add.range-selected{--range-background:color-mix(in srgb, var(--ide-success) 28%, color-mix(in srgb, var(--ide-accent) 24%, var(--ide-bg-muted)))}}.diff-row.add.range-selected{--range-border:var(--ide-success)}@supports (color:color-mix(in lab,red,red)){.diff-row.add.range-selected{--range-border:color-mix(in srgb, var(--ide-success) 70%, var(--ide-accent))}}.diff-row.add.range-selected{--range-gutter-background:var(--ide-accent)}@supports (color:color-mix(in lab,red,red)){.diff-row.add.range-selected{--range-gutter-background:color-mix(in srgb, var(--ide-accent) 40%, color-mix(in srgb, var(--ide-success) 18%, var(--ide-bg-muted)))}}.diff-row.add.range-selected{--range-rail:var(--ide-accent)}.diff-row.delete.range-selected{--range-background:var(--ide-danger)}@supports (color:color-mix(in lab,red,red)){.diff-row.delete.range-selected{--range-background:color-mix(in srgb, var(--ide-danger) 30%, color-mix(in srgb, var(--ide-accent) 28%, var(--ide-bg-muted)))}}.diff-row.delete.range-selected{--range-border:var(--ide-danger)}@supports (color:color-mix(in lab,red,red)){.diff-row.delete.range-selected{--range-border:color-mix(in srgb, var(--ide-danger) 72%, var(--ide-accent))}}.diff-row.delete.range-selected{--range-gutter-background:var(--ide-accent)}@supports (color:color-mix(in lab,red,red)){.diff-row.delete.range-selected{--range-gutter-background:color-mix(in srgb, var(--ide-accent) 42%, color-mix(in srgb, var(--ide-danger) 18%, var(--ide-bg-muted)))}}.diff-row.delete.range-selected{--range-rail:var(--ide-accent)}.selection-rail{z-index:2;background:var(--range-rail);pointer-events:none;border-radius:999px;width:3px;position:absolute;top:0;bottom:0;left:138px}.diff-row.range-start{box-shadow:inset 0 1px var(--range-border)}.diff-row.range-end{box-shadow:inset 0 -1px var(--range-border)}.diff-row.range-single{box-shadow:inset 0 1px var(--range-border),inset 0 -1px var(--range-border)}.diff-row.range-continues{box-shadow:none}.diff-row.range-single.range-continues{box-shadow:inset 0 1px var(--range-border)}.diff-gutter{min-height:26px;color:inherit;text-align:left;-webkit-user-select:none;user-select:none;grid-template-columns:58px 58px 24px;padding:0;display:grid;position:relative}.comment-handle{z-index:3;background:var(--ide-accent);color:#fff;cursor:cell;opacity:0;pointer-events:none;-webkit-user-select:none;user-select:none;border:0;border-radius:7px;justify-content:center;align-items:center;width:24px;height:24px;padding:0;transition:opacity .12s,background-color .12s;display:inline-flex;position:absolute;top:50%;right:6px;transform:translateY(-50%)}.comment-handle:hover,.comment-handle:focus-visible{background:var(--ide-accent)}@supports (color:color-mix(in lab,red,red)){.comment-handle:hover,.comment-handle:focus-visible{background:color-mix(in srgb,var(--ide-accent) 82%,white)}}.diff-row:hover .comment-handle,.comment-handle:focus-visible,.diff-row.range-start .comment-handle,.diff-row.range-single .comment-handle{opacity:1;pointer-events:auto}.diff-table.selecting .diff-row:hover .comment-handle{opacity:0;pointer-events:none}.diff-table.selecting .diff-row.range-start .comment-handle,.diff-table.selecting .diff-row.range-single .comment-handle{opacity:1;pointer-events:auto}.line-number{-webkit-user-select:none;user-select:none;border-right:1px solid var(--ide-border);color:var(--ide-fg-muted);font-family:var(--font-mono);font-size:var(--text-small);text-align:right;padding-right:10px;line-height:26px}.marker{-webkit-user-select:none;user-select:none;color:var(--ide-fg-muted);font-family:var(--font-mono);font-size:var(--text-small);text-align:center;line-height:26px}.diff-row.add .line-number{background:var(--ide-success-gutter)}.diff-row.delete .line-number{background:var(--ide-danger-gutter)}.diff-row.add .marker{color:var(--ide-success)}.diff-row.delete .marker{color:var(--ide-danger)}.diff-row.range-selected .line-number{background:var(--range-gutter-background);color:var(--ide-fg)}.diff-row.range-selected .marker{color:var(--range-rail)}.diff-row code{white-space:pre;font-family:var(--font-mono);cursor:text;-webkit-user-select:text;user-select:text;font-size:12.5px;line-height:26px;overflow:visible}.diff-scroller.wrap-lines{overflow-x:hidden}.diff-scroller.wrap-lines .diff-table{width:100%;min-width:0}.diff-scroller.wrap-lines .diff-row{grid-template-columns:140px minmax(0,1fr)}.diff-scroller.wrap-lines .diff-row code{overflow-wrap:anywhere;white-space:pre-wrap;min-width:0}.inline-comment{gap:var(--spacing-8);padding:var(--spacing-8) 10px;border:1px solid var(--ide-warning-border);border-radius:var(--radius-nav);background:var(--ide-warning-muted);color:var(--ide-fg);align-items:flex-start;margin:4px 12px 8px 140px;font-size:13px;display:flex}.inline-comment.resolved{border-color:var(--ide-success)}@supports (color:color-mix(in lab,red,red)){.inline-comment.resolved{border-color:color-mix(in srgb,var(--ide-success) 45%,var(--ide-border))}}.inline-comment.resolved{background:var(--ide-success-muted)}@supports (color:color-mix(in lab,red,red)){.inline-comment.resolved{background:color-mix(in srgb,var(--ide-success-muted) 70%,var(--ide-bg-muted))}}.inline-comment.resolved{color:var(--ide-fg)}@supports (color:color-mix(in lab,red,red)){.inline-comment.resolved{color:color-mix(in srgb,var(--ide-fg) 76%,var(--ide-fg-muted))}}.inline-comment svg{color:var(--ide-warning);flex:none}.inline-comment.resolved svg{color:var(--ide-success)}.inline-comment-content{gap:4px;min-width:0;display:grid}.inline-comment-status{color:var(--ide-fg-muted);font-size:11px;font-weight:var(--font-weight-medium);text-transform:uppercase;line-height:1.2}.inline-comment-body,.inline-comment-summary{overflow-wrap:anywhere}.inline-comment-summary{color:var(--ide-fg-muted);font-size:12px;line-height:1.4}.draft-comment-shell{--draft-range-background:var(--ide-accent)}@supports (color:color-mix(in lab,red,red)){.draft-comment-shell{--draft-range-background:color-mix(in srgb, var(--ide-accent) 28%, var(--ide-bg-muted))}}.draft-comment-shell{--draft-range-border:var(--ide-accent-border);background:var(--draft-range-background);width:100%;box-shadow:inset 0 -1px var(--draft-range-border);padding:10px 12px 10px 140px}.draft-comment-card{border:1px solid var(--ide-border);border-radius:var(--radius-cards);width:min(1040px,100%);color:var(--ide-fg);background:#262626;gap:0;display:grid;overflow:hidden}.draft-comment-title{justify-content:space-between;align-items:center;gap:var(--spacing-16);min-height:48px;padding:0 var(--spacing-16);color:var(--ide-fg);font-size:14px;font-weight:var(--font-weight-medium);border-bottom:1px solid #f0f6fc0f;display:flex}.draft-comment-heading{align-items:center;gap:12px;min-width:0;display:inline-flex}.draft-comment-icon{width:28px;height:28px;color:var(--ide-fg);background:#151515;border:1px solid #f0f6fc21;border-radius:999px;flex:none;justify-content:center;align-items:center;display:inline-flex}.draft-comment-label{color:var(--ide-fg-muted);font-size:var(--text-small);font-weight:var(--font-weight-regular);text-align:right;white-space:nowrap;flex:0 auto}.draft-comment-card textarea{resize:vertical;width:100%;min-height:72px;color:var(--ide-fg);padding:14px var(--spacing-16);font-family:var(--font-mono);background:0 0;border:0;border-radius:0;outline:none;font-size:14px;line-height:1.45}.draft-comment-card textarea::placeholder{color:#f0f6fc57}.draft-comment-actions{justify-content:flex-end;align-items:center;gap:var(--spacing-8);padding:0 var(--spacing-16) 12px;display:flex}.draft-comment-actions .secondary-button{min-height:34px;color:var(--ide-fg-muted);background:0 0;border-color:#0000;padding:0 10px;font-size:14px}.draft-comment-actions .secondary-button:hover{color:var(--ide-fg);background:0 0;border-color:#0000}.draft-comment-actions .primary-button{min-height:34px;padding:0 var(--spacing-16);color:var(--ide-bg);background:#8b949e;border-color:#8b949e;font-size:14px}.draft-comment-actions .primary-button:hover:not(:disabled){background:#b1bac4;border-color:#b1bac4}.popover{z-index:20;width:min(360px,100vw - 24px);padding:var(--spacing-16);border:1px solid var(--ide-border);border-radius:var(--radius-panel);background:var(--ide-bg-muted);position:fixed}.popover-title{color:var(--ide-fg);font-size:13px;font-weight:var(--font-weight-medium);justify-content:space-between;align-items:center;display:flex}.popover-subtitle{color:var(--ide-fg-muted);font-size:var(--text-small);margin-top:2px}.popover textarea{resize:vertical;border:1px solid var(--ide-border);background:var(--ide-bg);width:100%;min-height:96px;color:var(--ide-fg);border-radius:0;outline:none;margin-top:10px;padding:9px}.popover textarea:focus{border-color:var(--ide-accent)}.popover-actions,.submit-actions{justify-content:flex-end;align-items:center;gap:10px;display:flex}.popover-actions{margin-top:10px}.submit-bar{right:var(--spacing-16);bottom:var(--spacing-16);left:var(--spacing-16);z-index:10;justify-content:space-between;align-items:center;gap:var(--spacing-16);border:1px solid var(--ide-border);border-radius:var(--radius-cards);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);background:#151b23f5;width:auto;margin:0;padding:12px;display:flex;position:fixed}.comment-list{gap:var(--spacing-8);flex:1;min-width:0;display:flex;overflow-x:auto}.comment-chip{align-items:center;gap:var(--spacing-8);border:1px solid var(--ide-warning-border);border-radius:var(--radius-nav);background:var(--ide-warning-muted);min-width:max-content;color:var(--ide-fg);font-family:var(--font-mono);font-size:var(--text-small);padding:5px 7px 5px 10px;display:inline-flex}.comment-chip .icon-button{color:var(--ide-warning)}.submit-message{max-width:36vw;color:var(--ide-fg-muted);text-overflow:ellipsis;white-space:nowrap;font-size:13px;overflow:hidden}.submit-message.error{color:var(--ide-danger)}.submit-message.done{color:var(--ide-success)}.empty-shell{min-height:100vh;padding:var(--spacing-24);place-items:center;display:grid}.empty-panel,.empty-diff{border:1px solid var(--border-soft);border-radius:var(--radius-cards);background:var(--surface-raised)}.empty-panel{width:min(420px,100%);padding:var(--spacing-24);text-align:center}.empty-panel h1{margin:0 0 var(--spacing-8);font-size:var(--text-heading);font-weight:var(--font-weight-medium)}.empty-panel p{color:var(--text-secondary)}.empty-diff{padding:var(--spacing-24);color:var(--text-secondary)}.setup-page{width:min(860px,100vw - 32px);padding:var(--spacing-32) 0 var(--spacing-80);margin:0 auto}.setup-nav{z-index:3;justify-content:space-between;align-items:center;gap:var(--spacing-16);margin-bottom:var(--spacing-64);padding:var(--spacing-16) 0;border-bottom:1px solid var(--border-soft);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);font-size:var(--text-small);background:#111111f0;display:flex;position:sticky;top:0}.setup-nav>a:not(.marketing-wordmark),.setup-note a{color:var(--accent);text-decoration:none}.setup-nav>a:not(.marketing-wordmark):hover,.setup-note a:hover{text-decoration:underline}.setup-header h1{max-width:760px;color:var(--text-primary);font-size:64px;font-weight:var(--font-weight-medium);line-height:var(--leading-display);letter-spacing:0;margin:0}.setup-header p{max-width:660px;margin:var(--spacing-16) 0 0;color:var(--text-secondary);font-size:var(--text-body);line-height:var(--leading-body)}.setup-section{margin-top:var(--section-gap);border-top:1px solid var(--border-soft);padding-top:var(--spacing-32)}.setup-section h2{margin:0 0 var(--spacing-16);color:var(--accent);font-size:var(--text-small);font-weight:var(--font-weight-medium);letter-spacing:0;text-transform:uppercase}.setup-section p,.setup-section li{color:var(--color-subtle-gray);font-size:15px;line-height:1.65}.setup-section ul{margin:12px 0 0;padding-left:22px}.setup-section pre{overflow-wrap:anywhere;border:1px solid var(--border-soft);border-radius:var(--radius-panel);background:var(--surface-raised);color:var(--text-primary);padding:var(--spacing-16);white-space:pre-wrap;margin:12px 0 0;font-size:13px;line-height:1.7;overflow-x:auto}.setup-section code{color:var(--text-primary)}.setup-note{margin-top:var(--section-gap);border:1px solid var(--border-strong);border-radius:var(--radius-cards);background:var(--surface-raised);padding:var(--spacing-16)}.setup-note p{color:var(--color-subtle-gray);margin:0;font-size:15px;line-height:1.65}.marketing-page{--marketing-max:var(--page-max-width);background:var(--surface-dark);min-height:100vh}.marketing-hero{border-bottom:1px solid var(--border-soft);background:linear-gradient(to bottom,transparent 68%,var(--surface-dark) 100%),linear-gradient(var(--grid-line) 1px,transparent 1px),linear-gradient(90deg,var(--grid-line) 1px,transparent 1px),var(--surface-dark);min-height:100vh;padding-bottom:var(--spacing-64);background-size:100% 100%,32px 32px,32px 32px}.marketing-wordmark{color:var(--text-primary);font-weight:var(--font-weight-medium);align-items:center;gap:9px;margin-right:auto;text-decoration:none;display:inline-flex}.marketing-wordmark .brand-mark{width:26px;height:26px}.hero-copy{width:min(var(--marketing-max),calc(100vw - 40px));gap:var(--spacing-64);padding:var(--spacing-80) 0 var(--spacing-32);grid-template-columns:minmax(0,760px) minmax(260px,360px);align-items:end;margin:0 auto;display:grid}.hero-copy-main{min-width:0}.hero-logo{margin-bottom:var(--spacing-32);display:inline-flex}.hero-logo .brand-mark{width:76px;height:76px}.hero-kicker,.section-heading p{color:var(--accent);font-size:var(--text-small);font-weight:var(--font-weight-medium);letter-spacing:0;text-transform:uppercase;margin:0}.hero-copy h1{color:var(--text-primary);font-size:var(--text-display);font-weight:var(--font-weight-medium);line-height:var(--leading-display);letter-spacing:0;margin:0}.hero-subtitle{max-width:720px;margin:var(--spacing-16) 0 0;color:var(--text-primary);font-size:40px;font-weight:var(--font-weight-medium);line-height:1}.hero-body{max-width:640px;margin:var(--spacing-16) 0 0;color:var(--color-subtle-gray);font-size:var(--text-body);line-height:var(--leading-body)}.hero-actions{margin-top:var(--spacing-24);flex-wrap:wrap;gap:10px;display:flex}.hero-primary,.hero-secondary{justify-content:center;align-items:center;gap:var(--spacing-8);min-height:42px;padding:0 var(--spacing-16);font-size:var(--text-body);font-weight:var(--font-weight-medium);text-decoration:none;display:inline-flex}.hero-primary{border:1px solid var(--accent);background:var(--accent);color:var(--color-midnight-ink)}.hero-primary:hover{border-color:var(--site-accent-hover);background:var(--site-accent-hover);color:var(--color-midnight-ink);text-decoration:none}.hero-secondary{border:1px solid var(--accent);color:var(--accent);background:0 0}.hero-secondary:hover{background:var(--site-accent-muted);text-decoration:none}.hero-quickstart{border-left:2px solid var(--accent);padding:2px 0 2px var(--spacing-16);justify-items:start;gap:10px;display:grid}.hero-quickstart span{color:var(--text-secondary);font-size:var(--text-small);font-weight:var(--font-weight-medium)}.hero-quickstart code{max-width:100%;color:var(--text-primary);font-family:var(--font-mono);font-size:var(--text-small);white-space:nowrap;line-height:1.55;overflow-x:auto}.hero-scene{width:min(var(--marketing-max),calc(100vw - 40px));border:1px solid var(--ide-border);border-radius:var(--radius-cards);background:var(--ide-bg);margin:0 auto;overflow:hidden}.scene-topbar,.scene-shell,.scene-submit{min-width:0}.scene-topbar{justify-content:space-between;align-items:center;gap:var(--spacing-16);border-bottom:1px solid var(--ide-border);background:var(--ide-bg-muted);padding:10px 12px;display:flex}.scene-brand,.scene-meta,.terminal-header,.feedback-title{align-items:center;gap:var(--spacing-8);min-width:0;color:var(--ide-fg-muted);font-size:var(--text-small);display:flex}.scene-meta span,.feedback-title span{text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.scene-shell{background:var(--ide-bg);grid-template-rows:auto minmax(0,1fr);grid-template-columns:minmax(0,1fr) minmax(320px,.42fr);display:grid}.scene-terminal{border-bottom:1px solid var(--ide-border);background:var(--ide-bg);grid-column:1/-1;grid-template-columns:auto minmax(0,1fr);align-items:center;gap:14px;padding:10px 12px;display:grid}.terminal-lines{min-width:0;color:var(--ide-fg-muted);font-family:var(--font-mono);font-size:var(--text-small);white-space:nowrap;gap:14px;display:flex;overflow:hidden}.terminal-lines p{margin:0}.terminal-lines span{color:var(--ide-success)}.scene-review{min-height:520px;position:relative;overflow:hidden}.scene-file-header{align-items:center;gap:var(--spacing-8);border:0;border-bottom:1px solid var(--ide-border);background:var(--ide-bg-muted);width:100%;color:var(--ide-fg);cursor:default;text-align:left;grid-template-columns:auto auto minmax(0,1fr) auto auto;padding:9px 12px;display:grid}.scene-file-header span{font-family:var(--font-mono);font-size:var(--text-small);text-overflow:ellipsis;white-space:nowrap;overflow:hidden}.scene-add{color:var(--ide-success);font-size:var(--text-small)}.scene-del{color:var(--ide-danger);font-size:var(--text-small)}.scene-hidden,.scene-hunk{background:var(--ide-accent-muted);width:100%;color:var(--ide-fg-muted);font-family:var(--font-mono);font-size:var(--text-small);text-align:left;border:0}.scene-hidden{padding:var(--spacing-8) 12px;cursor:pointer}.scene-hidden:hover{color:var(--ide-accent)}.scene-hunk{padding:var(--spacing-8) 12px}.scene-row{width:100%;min-height:27px;color:var(--ide-fg);cursor:pointer;font-family:var(--font-mono);font-size:var(--text-small);text-align:left;background:0 0;border:0;grid-template-columns:48px 48px minmax(480px,1fr);align-items:center;padding:0;display:grid}.scene-row:hover{background:var(--ide-accent-muted)}.scene-row span{border-right:1px solid var(--ide-border);color:var(--ide-fg-muted);text-align:right;padding-right:9px;line-height:27px}.scene-row.add span{background:var(--ide-success-gutter)}.scene-row.remove span{background:var(--ide-danger-gutter)}.scene-row code{text-overflow:ellipsis;white-space:pre;min-width:0;padding-left:12px;display:block;overflow:hidden}.scene-row.add{background:var(--ide-success-muted)}.scene-row.add:hover{background:var(--ide-success-gutter)}.scene-row.remove{background:var(--ide-danger-muted)}.scene-row.remove:hover{background:var(--ide-danger-gutter)}.scene-row.selected{outline:1px solid var(--ide-accent-border);outline-offset:-1px}.scene-row.dimmed{color:var(--ide-fg-muted)}.scene-row.agent-dimmed{opacity:.5}.scene-row.agent-applied{outline:1px solid var(--ide-success)}@supports (color:color-mix(in lab,red,red)){.scene-row.agent-applied{outline:1px solid color-mix(in srgb,var(--ide-success) 42%,transparent)}}.scene-row.agent-applied{outline-offset:-1px}.scene-applied-status{border-left:2px solid var(--ide-success);color:var(--ide-success);font-size:var(--text-small);align-items:center;gap:7px;margin:4px 12px 4px 112px;padding:4px 0 4px 10px;display:inline-flex}.scene-inline-comment{border:1px solid var(--ide-warning-border);border-radius:var(--radius-nav);background:var(--ide-warning-muted);color:var(--ide-fg);grid-template-columns:minmax(0,1fr) auto;align-items:stretch;gap:0;margin:4px 12px 4px 112px;font-size:13px;line-height:1.45;display:grid;overflow:hidden}.scene-inline-comment-body{align-items:start;gap:var(--spacing-8);min-width:0;color:inherit;padding:var(--spacing-8) 10px;cursor:pointer;font:inherit;text-align:left;background:0 0;border:0;grid-template-columns:auto minmax(0,1fr);display:grid}.scene-inline-comment-body:hover{background:var(--ide-warning)}@supports (color:color-mix(in lab,red,red)){.scene-inline-comment-body:hover{background:color-mix(in srgb,var(--ide-warning) 14%,transparent)}}.scene-inline-comment svg{color:var(--ide-warning);flex:none}.scene-inline-comment span{overflow-wrap:anywhere;min-width:0}.scene-inline-comment-remove{width:32px;color:var(--ide-fg-muted);cursor:pointer;background:0 0;border:1px solid #0000;justify-content:center;align-items:center;display:inline-flex}.scene-inline-comment-remove:hover{background:var(--ide-warning)}@supports (color:color-mix(in lab,red,red)){.scene-inline-comment-remove:hover{background:color-mix(in srgb,var(--ide-warning) 14%,transparent)}}.scene-inline-comment-remove:hover{color:var(--ide-fg)}.scene-composer{width:min(560px,100% - 124px);margin:var(--spacing-8) 12px 12px 112px;border:1px solid var(--ide-border);border-radius:var(--radius-panel);background:var(--ide-bg-muted);display:grid;overflow:hidden}.scene-composer-title{justify-content:space-between;align-items:center;gap:var(--spacing-16);border-bottom:1px solid #f0f6fc0f;min-height:42px;padding:0 12px;display:flex}.scene-composer-title strong{color:var(--ide-fg);font-size:13px;font-weight:var(--font-weight-medium)}.scene-composer-title span{color:var(--ide-fg-muted);font-size:var(--text-small);text-align:right}.scene-composer textarea{resize:vertical;width:100%;min-height:72px;color:var(--ide-fg);font-family:var(--font-mono);background:0 0;border:0;outline:none;padding:12px;font-size:13px;line-height:1.45}.scene-composer textarea::placeholder{color:#f0f6fc57}.scene-composer-actions{justify-content:flex-end;gap:var(--spacing-8);padding:0 12px 12px;display:flex}.scene-composer button,.scene-submit button{border:1px solid var(--accent);background:var(--accent);min-height:30px;color:var(--color-midnight-ink);font-size:var(--text-small);font-weight:var(--font-weight-medium);cursor:pointer;align-items:center;gap:7px;padding:0 10px;display:inline-flex}.scene-composer button:disabled,.scene-submit button:disabled{cursor:default;opacity:.56}.scene-composer .scene-secondary-action{color:var(--ide-fg-muted);background:0 0;border-color:#0000}.scene-composer .scene-secondary-action:hover{color:var(--ide-fg)}.scene-feedback{border-left:1px solid var(--ide-border);background:var(--ide-bg-muted);grid-template-rows:auto minmax(0,1fr);align-items:stretch;gap:12px;padding:12px;display:grid}.scene-feedback pre{border-radius:var(--radius-nav);background:var(--ide-bg);min-height:0;max-height:100%;color:var(--ide-fg-muted);font-family:var(--font-mono);white-space:pre-wrap;border:1px solid #f0f6fc14;margin:0;padding:10px;font-size:11px;line-height:1.5;overflow:auto}.agent-update-card{align-content:start;gap:var(--spacing-16);border-radius:var(--radius-nav);background:var(--ide-bg);min-height:0;color:var(--ide-fg-muted);border:1px solid #f0f6fc14;padding:12px;display:grid}.agent-update-card code{color:var(--ide-fg);font-family:var(--font-mono);text-overflow:ellipsis;white-space:nowrap;font-size:11px;line-height:1.45;display:block;overflow:hidden}.agent-update-card ul{gap:10px;margin:0;padding:0;display:grid}.agent-update-card li{align-items:center;gap:var(--spacing-8);color:var(--ide-fg);font-size:13px;list-style:none;display:flex}.agent-update-card li svg{color:var(--ide-success);flex:none}.scene-submit{border-top:1px solid var(--ide-border);background:var(--ide-bg-muted);color:var(--ide-fg-muted);justify-content:flex-end;align-items:center;gap:12px;padding:10px;font-size:13px;display:flex}.marketing-band{border-bottom:1px solid var(--border-soft);padding:var(--spacing-80) max(20px,calc((100vw - var(--marketing-max)) / 2));scroll-margin-top:var(--spacing-24)}.section-heading{gap:10px;max-width:760px;display:grid}.section-heading h2{max-width:720px;color:var(--text-primary);font-size:40px;font-weight:var(--font-weight-medium);letter-spacing:0;margin:0;line-height:1.06}.demo-video-band{gap:var(--spacing-32);display:grid}.demo-video-header{gap:var(--spacing-32);grid-template-columns:minmax(0,1fr) minmax(280px,.48fr);align-items:end;display:grid}.demo-video-caption{border-left:2px solid var(--accent);color:var(--color-subtle-gray);padding-left:var(--spacing-16);margin:0;font-size:14px;line-height:1.65}.demo-video-frame{border:1px solid var(--ide-border);border-radius:var(--radius-cards);aspect-ratio:16/9;background:var(--ide-bg);width:100%;overflow:hidden}.demo-video-frame video{background:var(--ide-bg);object-fit:cover;width:100%;height:100%;display:block}.install-grid{margin-top:var(--spacing-32);border-top:1px solid var(--border-soft);gap:0;display:grid}.command-line{border-bottom:1px solid var(--border-soft);color:var(--color-subtle-gray);grid-template-columns:auto minmax(0,1fr) auto;align-items:center;gap:10px;padding:13px 0;display:grid}.command-line>span{color:var(--accent);font-family:var(--font-mono)}.command-line code{color:var(--text-primary);font-family:var(--font-mono);white-space:nowrap;font-size:13px;overflow:auto}.marketing-copy{border:1px solid var(--accent);min-height:30px;color:var(--accent);font-size:var(--text-small);font-weight:var(--font-weight-medium);cursor:pointer;background:0 0;justify-content:center;align-items:center;gap:7px;padding:0 10px;display:inline-flex}.marketing-copy:hover{background:var(--site-accent-muted)}.agent-prompt{align-items:center;gap:var(--spacing-16);margin-top:var(--spacing-24);border-left:2px solid var(--accent);padding:2px 0 2px var(--spacing-16);grid-template-columns:auto minmax(0,1fr) auto;display:grid}.agent-prompt-label,.agent-prompt-links{align-items:center;gap:var(--spacing-8);display:flex}.agent-prompt-label{color:var(--accent);font-size:13px;font-weight:var(--font-weight-medium)}.agent-prompt p{color:var(--text-primary);margin:0;font-size:14px;line-height:1.55}.agent-skill-command{border:1px solid var(--border-soft);border-radius:var(--radius-panel);background:var(--surface-raised);grid-column:1/-1;grid-template-columns:minmax(0,1fr) auto;align-items:center;gap:10px;padding:10px 12px;display:grid}.agent-skill-command code{white-space:nowrap;font-size:12px;overflow:auto}.agent-prompt pre{border:1px solid var(--border-soft);border-radius:var(--radius-panel);background:var(--surface-raised);color:var(--text-primary);font-family:var(--font-mono);white-space:pre-wrap;grid-column:1/-2;margin:0;padding:12px;font-size:12px;line-height:1.65;overflow-x:auto}.agent-prompt>.marketing-copy{place-self:start end}.agent-prompt code,.contract-copy code{color:var(--text-primary);font-family:var(--font-mono);font-size:.92em}.agent-prompt-links{white-space:nowrap;justify-content:flex-end}.agent-prompt-links a{color:var(--accent);font-size:13px;font-weight:var(--font-weight-medium);text-decoration:none}.agent-prompt-links a:hover{text-decoration:underline}.workflow-story{margin-top:var(--spacing-32);border-top:1px solid var(--border-soft);gap:0;display:grid}.workflow-step{gap:var(--spacing-24);border-bottom:1px solid var(--border-soft);padding:var(--spacing-24) 0;grid-template-columns:56px minmax(0,1fr);display:grid}.workflow-step:last-child{border-bottom:0}.workflow-step span{color:var(--accent);font-family:var(--font-mono);font-size:var(--text-small)}.workflow-step h3{color:var(--text-primary);font-size:var(--text-subheading);font-weight:var(--font-weight-medium);letter-spacing:0;margin:0}.workflow-step p,.contract-copy p{color:var(--color-subtle-gray);margin:6px 0 0;font-size:14px;line-height:1.65}.contract-layout{gap:var(--spacing-24);margin-top:var(--spacing-32);border-top:1px solid var(--border-soft);padding-top:var(--spacing-24);grid-template-columns:minmax(0,1fr) minmax(280px,.62fr);align-items:center;display:grid}.contract-layout pre{border-left:2px solid var(--border-soft);color:var(--color-subtle-gray);font-family:var(--font-mono);padding:2px 0 2px var(--spacing-16);margin:0;font-size:13px;line-height:1.7;overflow:auto}.contract-copy{max-width:460px}.contract-copy p{border-left:2px solid var(--accent);margin:0;padding-left:12px}.marketing-footer{padding:var(--spacing-32) max(20px,calc((100vw - var(--marketing-max)) / 2));justify-content:center;display:flex}.marketing-footer a{align-items:center;gap:var(--spacing-8);color:var(--accent);font-size:13px;font-weight:var(--font-weight-medium);text-decoration:none;display:inline-flex}.marketing-footer a:hover{text-underline-offset:6px;text-decoration:underline}@media(max-width:980px){.hero-copy,.hero-scene{width:min(720px,100vw - 32px)}.hero-copy{gap:var(--spacing-32);padding:var(--spacing-64) 0 var(--spacing-32);grid-template-columns:1fr}.hero-copy h1{font-size:64px}.hero-subtitle,.section-heading h2{font-size:32px}.hero-quickstart{max-width:460px}.scene-terminal,.scene-feedback{grid-template-columns:1fr}.scene-shell{grid-template-columns:minmax(0,1fr)}.scene-feedback{border-top:1px solid var(--ide-border);border-left:0}.terminal-lines{gap:3px;display:grid}.scene-submit{justify-content:space-between}.review-body,.review-body.file-tree-collapsed{grid-template-columns:minmax(0,1fr)}.review-sidebar{display:none}.file-tree-mobile-toggle{display:inline-flex}.file-tree-drawer-backdrop{display:flex}.contract-layout,.demo-video-header{grid-template-columns:1fr}.demo-video-caption{max-width:560px}}@media(max-width:720px){.review-shell{width:calc(100vw - 18px)}.topbar-header{flex-direction:column;align-items:stretch}.review-context-bar{flex-direction:column;align-items:flex-start;gap:7px}.review-context-range{max-width:100%}.review-context-divider{display:none}.turn-menu{left:0;right:auto}.topbar-actions{flex-wrap:wrap;justify-content:flex-start;width:100%}.commit-selector{flex:260px;max-width:none}.commit-picker-backdrop{align-items:stretch;padding:8px}.commit-picker-dialog{width:100%;max-height:calc(100vh - 16px)}.commit-picker-row{grid-template-columns:auto minmax(0,1fr)}.commit-picker-sha{font-size:var(--text-small);grid-column:2}.file-tree-drawer-backdrop{padding:var(--spacing-8)}.file-tree-drawer{width:100%}.extension-popover{width:min(236px,100vw - 36px);position:fixed;top:68px;left:auto;right:18px}.branch-pill{max-width:100%}.review-state-banner{flex-direction:column;align-items:flex-start;gap:6px}.review-state-banner p{white-space:normal}.review-state-banner time{margin-left:0}.file-header{grid-template-columns:minmax(0,1fr) auto auto auto auto}.rename-path{display:none}.diff-row{grid-template-columns:46px 46px 22px minmax(520px,max-content)}.diff-scroller.wrap-lines .diff-row{grid-template-columns:46px 46px 22px minmax(0,1fr)}.inline-comment{margin-left:108px}.draft-comment-shell{padding-left:114px}.draft-comment-title{min-height:auto;padding:12px var(--spacing-16);flex-direction:column;align-items:flex-start;gap:4px}.draft-comment-label{text-align:left;white-space:normal}.submit-bar{flex-direction:column;align-items:stretch}.submit-actions{justify-content:space-between}}@media(max-width:640px){.setup-nav{white-space:nowrap;justify-content:flex-start;gap:14px;overflow-x:auto}.marketing-wordmark{min-width:max-content}.hero-copy,.hero-scene{width:calc(100vw - 28px)}.hero-copy{padding-top:var(--spacing-48)}.hero-copy h1,.setup-header h1{font-size:48px}.hero-logo .brand-mark{width:58px;height:58px}.hero-subtitle,.section-heading h2{font-size:var(--text-heading);line-height:var(--leading-heading)}.hero-body{font-size:15px}.hero-quickstart{max-width:none}.demo-video-band{gap:var(--spacing-24)}.scene-meta,.scene-terminal,.scene-feedback{display:none}.scene-review{min-height:560px}.scene-row{grid-template-columns:38px 38px minmax(0,1fr)}.scene-inline-comment,.scene-composer{width:calc(100% - 100px);margin-left:88px}.scene-composer-title{flex-direction:column;align-items:flex-start;gap:3px;padding:10px 12px}.scene-composer-title span{text-align:left}.command-line,.agent-prompt{grid-template-columns:1fr}.agent-prompt-links{justify-content:flex-start}.agent-prompt pre,.agent-skill-command,.agent-prompt>.marketing-copy{grid-column:auto;justify-self:stretch}.agent-skill-command{grid-template-columns:1fr}.agent-skill-command .marketing-copy{justify-self:stretch}.workflow-step{gap:var(--spacing-8);grid-template-columns:1fr}.workflow-step:last-child{border-bottom:0}.marketing-band{padding:var(--spacing-64) var(--spacing-16)}.marketing-footer{padding:var(--spacing-32) var(--spacing-16);justify-content:center}}@property --tw-border-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-outline-style{syntax:"*";inherits:false;initial-value:solid}@property --tw-blur{syntax:"*";inherits:false}@property --tw-brightness{syntax:"*";inherits:false}@property --tw-contrast{syntax:"*";inherits:false}@property --tw-grayscale{syntax:"*";inherits:false}@property --tw-hue-rotate{syntax:"*";inherits:false}@property --tw-invert{syntax:"*";inherits:false}@property --tw-opacity{syntax:"*";inherits:false}@property --tw-saturate{syntax:"*";inherits:false}@property --tw-sepia{syntax:"*";inherits:false}@property --tw-drop-shadow{syntax:"*";inherits:false}@property --tw-drop-shadow-color{syntax:"*";inherits:false}@property --tw-drop-shadow-alpha{syntax:"<percentage>";inherits:false;initial-value:100%}@property --tw-drop-shadow-size{syntax:"*";inherits:false}@property --tw-backdrop-blur{syntax:"*";inherits:false}@property --tw-backdrop-brightness{syntax:"*";inherits:false}@property --tw-backdrop-contrast{syntax:"*";inherits:false}@property --tw-backdrop-grayscale{syntax:"*";inherits:false}@property --tw-backdrop-hue-rotate{syntax:"*";inherits:false}@property --tw-backdrop-invert{syntax:"*";inherits:false}@property --tw-backdrop-opacity{syntax:"*";inherits:false}@property --tw-backdrop-saturate{syntax:"*";inherits:false}@property --tw-backdrop-sepia{syntax:"*";inherits:false}