@dubusoft/toodo-linux-arm64 1.3.3-dev.64 → 1.3.3-dev.66
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/toodo +0 -0
- package/bin/toodo-server +0 -0
- package/package.json +1 -1
- package/web/assets/{details-sheet-BHRfmUm7.js → details-sheet-BkbfhjmH.js} +1 -1
- package/web/assets/index-BvuTpyHr.js +16 -0
- package/web/assets/index-QECYQy_u.css +2 -0
- package/web/assets/{markdown-4g2NTZpH.js → markdown-BvSlCbQw.js} +1 -1
- package/web/assets/{offline-screen-BSGAT4r-.js → offline-screen-1jXGEyFA.js} +1 -1
- package/web/assets/review-D2l19Z_N.js +1 -0
- package/web/assets/{server-access-CnP0j-8e.js → server-access-CQCM9Ulf.js} +1 -1
- package/web/assets/{status-styles-DLZB0S-A.js → status-styles-CWr1GU7t.js} +1 -1
- package/web/assets/task-details-Cxh6BM42.js +4 -0
- package/web/assets/{task-graph-D1MVyhVc.js → task-graph-B92qItLx.js} +4 -4
- package/web/assets/{workspace-list-CbAQLx7f.js → workspace-list-CT3KgOeR.js} +1 -1
- package/web/index.html +4 -4
- package/web/sw.js +2 -2
- package/web/assets/index-BGPTeYT3.css +0 -2
- package/web/assets/index-CEjVLKaZ.js +0 -19
- package/web/assets/review-x0gUUMTL.js +0 -1
- package/web/assets/task-details-BeFv75VE.js +0 -4
|
@@ -1 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,s as r,t as i}from"./dist-ZmB2kPfR.js";import{C as a,S as o,Vt as ee,d as s,ht as c,nn as l,o as u,s as d}from"./status-styles-DLZB0S-A.js";import{_ as te,c as f,g as p}from"./workspace-list-CbAQLx7f.js";import{A as m,At as h,B as g,C as _,D as v,E as ne,F as re,I as ie,L as y,M as b,N as x,O as S,P as ae,R as C,S as w,St as T,T as E,U as D,V as O,Y as k,_ as A,b as j,bt as M,g as oe,h as N,j as P,k as se,m as F,p as I,s as L,v as R,w as z,x as B,y as V,z as H}from"./index-CEjVLKaZ.js";import{t as U}from"./opener-DWhHPoCL.js";var W={name:`calendar-check`,size:24,node:[[`path`,{d:`M8 2v3`,key:`1ioesn`}],[`path`,{d:`M16 2v3`,key:`otl347`}],[`rect`,{x:`3`,y:`3`,width:`18`,height:`18`,rx:`2`,key:`h1oib`}],[`path`,{d:`M3 9h18`,key:`1pudct`}],[`path`,{d:`m9 15 2 2 4-4`,key:`1grp1n`}]]};W.node;var G=t(W),K=r(e(),1),q=n(),ce={completed:s.success,opened_for_review:s.review,started:s.progress,worked_on:s.progress,planned:s.neutral},J=i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,u.neutral),le=[{kind:`week`,label:`Week`},{kind:`month`,label:`Month`},{kind:`quarter`,label:`Quarter`},{kind:`year`,label:`Year`},{kind:`custom`,label:`Custom`}];function ue(e,t,n){let r=URL.createObjectURL(new Blob([t],{type:`${n};charset=utf-8`})),i=document.createElement(`a`);i.href=r,i.download=e,i.click(),URL.revokeObjectURL(r)}function de({disabled:e,children:t}){let[n,r]=(0,K.useState)(!1),i=(0,K.useRef)(null);return(0,K.useEffect)(()=>{if(!n)return;let e=e=>{i.current?.contains(e.target)||r(!1)},t=e=>e.key===`Escape`&&r(!1);return document.addEventListener(`pointerdown`,e),document.addEventListener(`keydown`,t),()=>{document.removeEventListener(`pointerdown`,e),document.removeEventListener(`keydown`,t)}},[n]),(0,q.jsxs)(`div`,{ref:i,className:`relative`,children:[(0,q.jsxs)(l,{size:`sm`,"aria-haspopup":`menu`,"aria-expanded":n,disabled:e,onClick:()=>r(!n),children:[(0,q.jsx)(h,{}),(0,q.jsx)(`span`,{className:`max-md:sr-only`,children:`Export`})]}),n&&(0,q.jsx)(`div`,{role:`menu`,"aria-label":`Export review`,className:`absolute right-0 z-10 mt-1 flex w-48 flex-col rounded-lg border bg-popover p-1 text-popover-foreground shadow-md`,children:t(()=>r(!1))})]})}function Y(e,t){return`${e} ${t}${e===1?``:`s`}`}function fe(e,t){let n=e.skipped>0?` Left out ${Y(e.skipped,`pull request`)} a task already records.`:``;return e.imported===0?`Found no new pull requests you merged in this ${t}.${n}`:`Imported ${Y(e.imported,`merged pull request`)} as done tasks.${n}`}function X({onSelect:e,children:t}){return(0,q.jsx)(`button`,{type:`button`,role:`menuitem`,onClick:e,className:`rounded-md px-2 py-1.5 text-left text-sm hover:bg-muted max-md:min-h-11`,children:t})}function Z({onShowTask:e}){let[t,n]=(0,K.useState)(()=>v(`week`,T(Date.now()/1e3))),[r,s]=(0,K.useState)(null),[d,h]=(0,K.useState)(z),{start:_,end:b}=ne(t),x=c(_,b),O=ee(),A=o(),j=a(),[N,P]=(0,K.useState)([]),F=O.data?.some(e=>e.source===`github`)??!1,R=[...O.data??[],...A.data?.workspaces??[]],B=new Map(R.map(e=>[e.id,e.name])),V=x.data&&oe(x.data,d),H=ie(x.data??[]);d.label!==null&&!H.includes(d.label)&&H.push(d.label);let U=[d.workspaceId===null?`across all workspaces`:`in ${B.get(d.workspaceId)??`workspace ${d.workspaceId}`}`,d.label!==null&&`labelled ${d.label}`].filter(Boolean).join(`, `),W=se[t.kind];function Y(e){s(null),P([]),n(e)}async function Z(){s(null),P([]);try{let e=await j.mutateAsync({start:_,end:b});s(fe(e,W)),P(e.failures)}catch(e){s(`Could not import pull requests: ${e instanceof Error?e.message:String(e)}`)}}function ge(e){e!==t.kind&&Y(e===`custom`?{...t,kind:e}:v(e,t.from))}async function _e(e){try{await navigator.clipboard.writeText(y(t,e,R,Date.now()/1e3)),s(`Copied as Markdown.`)}catch(e){s(`Could not copy: ${String(e)}`)}}function $(e,n){let r=e===`csv`?ae(n,R,Date.now()/1e3):y(t,n,R,Date.now()/1e3),i=re(t,e);ue(i,r,e===`csv`?`text/csv`:`text/markdown`),s(`Downloaded ${i}`)}return(0,q.jsxs)(`section`,{"aria-labelledby":`review-heading`,className:`flex flex-col gap-4`,children:[(0,q.jsxs)(`header`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`h2`,{id:`review-heading`,className:`text-xl font-semibold tracking-tight`,children:m[t.kind]}),(0,q.jsxs)(`p`,{className:`text-sm text-muted-foreground`,children:[`Work recorded from `,t.from,` to `,t.to,` `,U,`.`]})]}),(0,q.jsxs)(`div`,{className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,q.jsx)(`div`,{role:`group`,"aria-label":`Review period`,className:`flex rounded-md border p-0.5 max-md:w-full`,children:le.map(({kind:e,label:n})=>(0,q.jsx)(l,{size:`sm`,variant:t.kind===e?`default`:`ghost`,"aria-pressed":t.kind===e,onClick:()=>ge(e),children:n},e))}),t.kind===`week`&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`label`,{htmlFor:`week-start`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`Week starting`}),(0,q.jsx)(`input`,{id:`week-start`,type:`date`,required:!0,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40 max-md:w-0 max-md:min-w-0 max-md:flex-1`),value:t.from,onChange:e=>e.target.value&&Y(g(e.target.value))})]}),t.kind===`custom`&&(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(`label`,{htmlFor:`review-from`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`From`}),(0,q.jsx)(`input`,{id:`review-from`,type:`date`,required:!0,max:t.to,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40`),value:t.from,onChange:e=>e.target.value&&e.target.value<=t.to&&Y({...t,from:e.target.value})}),(0,q.jsx)(`label`,{htmlFor:`review-to`,className:`text-xs text-muted-foreground max-md:sr-only`,children:`To`}),(0,q.jsx)(`input`,{id:`review-to`,type:`date`,required:!0,min:t.from,className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`w-40`),value:t.to,onChange:e=>e.target.value&&e.target.value>=t.from&&Y({...t,to:e.target.value})})]}),t.kind!==`week`&&t.kind!==`custom`&&(0,q.jsx)(`span`,{className:`px-1 text-sm font-medium`,children:S(t)}),(0,q.jsx)(l,{size:`icon-sm`,variant:`outline`,"aria-label":`Previous ${W}`,title:`Previous ${W}`,onClick:()=>Y(C(t,-1)),children:(0,q.jsx)(p,{})}),(0,q.jsx)(l,{size:`icon-sm`,variant:`outline`,"aria-label":`Next ${W}`,title:`Next ${W}`,onClick:()=>Y(C(t,1)),children:(0,q.jsx)(te,{})}),t.kind!==`custom`&&(0,q.jsxs)(l,{size:`sm`,variant:`ghost`,onClick:()=>Y(v(t.kind,T(Date.now()/1e3))),children:[(0,q.jsx)(G,{className:`md:hidden`,"aria-hidden":!0}),(0,q.jsxs)(`span`,{className:`max-md:sr-only`,children:[`This `,W]})]}),(0,q.jsx)(`div`,{className:`ml-auto`,children:(0,q.jsx)(de,{disabled:!V,children:e=>(0,q.jsxs)(q.Fragment,{children:[(0,q.jsx)(X,{onSelect:()=>{e(),V&&_e(V)},children:`Copy as Markdown`}),(0,q.jsx)(X,{onSelect:()=>{e(),V&&$(`md`,V)},children:`Save as Markdown`}),(0,q.jsx)(X,{onSelect:()=>{e(),V&&$(`csv`,V)},children:`Save as CSV`}),(0,q.jsx)(X,{onSelect:()=>{e(),window.print()},children:`Print or save as PDF`})]})})})]}),(0,q.jsxs)(`div`,{role:`group`,"aria-label":`Review filters`,className:`flex flex-wrap items-center gap-2 print:hidden`,children:[(0,q.jsxs)(`select`,{"aria-label":`Workspace`,className:i(f,`w-auto max-md:min-w-0 max-md:flex-1`),value:d.workspaceId??``,onChange:e=>h({...d,workspaceId:e.target.value===``?null:Number(e.target.value)}),children:[(0,q.jsx)(`option`,{value:``,children:`All workspaces`}),R.map(e=>(0,q.jsx)(`option`,{value:e.id,children:e.name},e.id))]}),(0,q.jsxs)(`select`,{"aria-label":`Label`,className:i(f,`w-auto max-md:min-w-0 max-md:flex-1`),value:d.label??``,onChange:e=>h({...d,label:e.target.value===``?null:e.target.value}),children:[(0,q.jsx)(`option`,{value:``,children:H.length===0?`No labels in this period`:`Any label`}),H.map(e=>(0,q.jsx)(`option`,{value:e,children:e},e))]}),(d.workspaceId!==null||d.label!==null)&&(0,q.jsx)(l,{size:`sm`,variant:`ghost`,onClick:()=>h(z),children:`Clear filters`})]}),r&&(0,q.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground print:hidden`,children:r}),N.length>0&&(0,q.jsx)(`ul`,{role:`alert`,"aria-label":`Pull requests not imported`,className:`text-xs text-destructive print:hidden`,children:N.map(e=>(0,q.jsx)(`li`,{children:e},e))}),(0,q.jsx)(`p`,{role:`status`,className:i(`text-sm text-muted-foreground`,!x.isPending&&`sr-only`),children:x.isPending?`Loading the review...`:V?`Showing ${V.length} ${V.length===1?`task`:`tasks`} with activity in this ${W}.`:``}),x.isError&&(0,q.jsxs)(`p`,{role:`alert`,className:`text-sm text-destructive`,children:[`Failed to load the review: `,x.error.message]}),V?.length===0&&(0,q.jsx)(L,{title:x.data?.length===0?`No recorded activity in this ${W}.`:`No recorded activity in this ${W} matches the filters.`,hint:x.data?.length===0?`Toodo records each task as it is planned, started, opened for review, and completed, with the commits of its branch, so reviews fill up as you work. Work merged before Toodo tracked it is not here: ${F?`import the pull requests you merged in this ${W} to add it.`:`add a workspace with a GitHub repository to import the pull requests you merged.`}`:`Pick another period or change the filters to look at other work.`,action:(0,q.jsxs)(`div`,{className:`flex flex-wrap justify-center gap-2 print:hidden`,children:[x.data?.length===0&&F&&(0,q.jsx)(l,{size:`sm`,disabled:j.isPending,onClick:()=>void Z(),children:j.isPending?`Importing...`:`Import merged pull requests`}),(0,q.jsxs)(l,{size:`sm`,variant:`outline`,onClick:()=>Y(C(t,-1)),children:[`Show the `,W,` before`]})]})}),V&&V.length>0&&(0,q.jsx)(he,{period:t,entries:V,workspaces:R}),V&&(0,q.jsx)(me,{period:t,entries:V}),t.kind===`year`&&V&&(0,q.jsx)(pe,{entries:V}),V&&w(V).map(t=>(0,q.jsxs)(`section`,{"aria-label":E[t.outcome],className:`flex flex-col gap-2`,children:[(0,q.jsxs)(`h3`,{className:i(`text-sm font-semibold`,ce[t.outcome]),children:[E[t.outcome],` `,(0,q.jsxs)(`span`,{className:`font-normal text-muted-foreground`,children:[`(`,t.entries.length,`)`]})]}),(0,q.jsx)(`ul`,{className:`flex flex-col divide-y rounded-lg border`,children:t.entries.map(({task:t,at:n,commits:r,archived:a})=>(0,q.jsxs)(`li`,{className:`flex flex-col gap-1 px-3 py-2`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 items-center gap-2`,children:[(0,q.jsx)(D,{type:t.taskType}),(0,q.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground`,children:[`#`,t.id]}),(0,q.jsx)(`button`,{type:`button`,"aria-label":`Open #${t.id} ${t.title}`,title:t.title,onClick:()=>e?.(t.id),className:`min-w-0 flex-1 truncate text-left text-sm font-medium hover:underline max-md:min-h-11`,children:t.title}),t.resolution===`not_adopted`&&(0,q.jsx)(`span`,{className:J,children:`Not adopted`}),a&&(0,q.jsx)(`span`,{className:J,children:`Archived`}),t.resolution===`completed`&&(0,q.jsx)(`span`,{className:i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,u.success),children:`Completed`}),t.pullRequestUrl&&(0,q.jsx)(Q,{url:t.pullRequestUrl,stats:t.pullRequest}),(0,q.jsxs)(`span`,{className:`shrink-0 text-xs text-muted-foreground max-md:hidden print:inline`,children:[B.get(t.workspaceId)??`Workspace ${t.workspaceId}`,` · `,(0,q.jsx)(M,{at:n})]})]}),(0,q.jsx)(k,{task:t}),t.completionNote&&(0,q.jsx)(`p`,{"aria-label":`Completion note of #${t.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:t.completionNote}),r.length>0&&(0,q.jsx)(`ul`,{"aria-label":`Commits of #${t.id} this ${W}`,className:`flex flex-col gap-0.5`,children:r.map(e=>(0,q.jsxs)(`li`,{className:`flex gap-2 text-xs`,title:e.author,children:[(0,q.jsx)(`code`,{className:`shrink-0 text-muted-foreground`,children:e.sha.slice(0,7)}),(0,q.jsx)(`span`,{className:`truncate`,children:I(e.message)})]},e.sha))})]},t.id))})]},t.outcome))]})}function Q({url:e,stats:t}){let n=b(e),r=t=>{t.preventDefault(),U(e).catch(t=>console.error(`Failed to open ${e}`,t))};return(0,q.jsx)(`a`,{href:e,title:t?`${e} \u00b7 ${x(t)}`:e,"aria-label":n?`Pull request #${n}`:`Pull request`,onClick:r,onAuxClick:r,className:`shrink-0 text-xs text-primary underline underline-offset-2 hover:no-underline max-md:inline-flex max-md:min-h-11 max-md:items-center`,children:n?`#${n}`:`PR`})}function pe({entries:e}){let t=O(e);return t===null?null:(0,q.jsxs)(`section`,{"aria-labelledby":`year-in-review-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,q.jsx)(`h3`,{id:`year-in-review-heading`,className:`text-sm font-semibold`,children:`Year in review`}),t.pullRequests&&(0,q.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[(0,q.jsxs)(`div`,{className:`flex flex-col`,children:[(0,q.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Merged pull requests`}),(0,q.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.pullRequests})]}),(0,q.jsxs)(`div`,{className:`flex flex-col`,children:[(0,q.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Lines changed`}),(0,q.jsxs)(`dd`,{className:`text-lg font-semibold`,children:[(0,q.jsxs)(`span`,{children:[`+`,t.pullRequests.additions]}),(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:` / `}),(0,q.jsxs)(`span`,{children:[`-`,t.pullRequests.deletions]})]})]}),(0,q.jsxs)(`div`,{className:`flex flex-col`,children:[(0,q.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Files changed`}),(0,q.jsx)(`dd`,{className:`text-lg font-semibold`,children:t.pullRequests.changedFiles})]}),(0,q.jsxs)(`div`,{className:`flex flex-col`,children:[(0,q.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Reviews`}),(0,q.jsxs)(`dd`,{className:`text-lg font-semibold`,title:B(t.pullRequests),children:[t.pullRequests.reviews,(0,q.jsxs)(`span`,{className:`ml-1 text-xs font-normal text-muted-foreground`,children:[`on `,t.pullRequests.reviewed,` of `,t.pullRequests.pullRequests]})]})]})]}),t.largest.length>0&&(0,q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest pull requests`}),(0,q.jsx)(`ol`,{"aria-label":`Largest pull requests`,className:`flex flex-col gap-1`,children:t.largest.map(({task:e,pullRequest:t})=>(0,q.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,q.jsx)(D,{type:e.taskType}),(0,q.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,q.jsx)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:x(t)})]},e.id))})]}),t.research.length>0&&(0,q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Research conclusions`}),(0,q.jsx)(`ul`,{"aria-label":`Research conclusions`,className:`flex flex-col divide-y rounded-md border`,children:t.research.map(({task:e,at:t,adopted:n})=>(0,q.jsxs)(`li`,{className:`flex flex-col gap-1 px-2 py-1.5`,children:[(0,q.jsxs)(`div`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,q.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,q.jsx)(`span`,{className:i(`shrink-0 rounded-full px-2 py-0.5 text-xs font-medium`,n?u.success:u.neutral),children:n?`Adopted`:`Not adopted`}),(0,q.jsx)(M,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,at:t})]}),(0,q.jsx)(`p`,{"aria-label":`Research conclusion of #${e.id}`,className:`whitespace-pre-line break-words-keep text-xs`,children:e.completionNote??(0,q.jsx)(`span`,{className:`text-muted-foreground`,children:`No conclusion written.`})})]},e.id))})]}),t.overruns.length>0&&(0,q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Largest estimate overruns`}),(0,q.jsx)(`ol`,{"aria-label":`Largest estimate overruns`,className:`flex flex-col gap-1`,children:t.overruns.map(({task:e,estimated:t,actual:n})=>(0,q.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,q.jsx)(D,{type:e.taskType}),(0,q.jsx)(`span`,{className:`truncate font-medium`,children:e.title}),(0,q.jsxs)(`span`,{className:`ml-auto shrink-0 text-xs text-muted-foreground`,children:[`estimated `,V(t),`, `,V(n),` active`]})]},e.id))})]})]})}function me({period:e,entries:t}){let n=P(e,t,Date.now()/1e3);return n===null?null:(0,q.jsxs)(`section`,{"aria-labelledby":`plan-heading`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,q.jsx)(`h3`,{id:`plan-heading`,className:`text-sm font-semibold`,children:`Plan vs actual`}),(0,q.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[(0,q.jsxs)(`div`,{className:`contents`,children:[(0,q.jsx)(`dt`,{className:`text-muted-foreground`,children:`Estimate vs active time`}),(0,q.jsx)(`dd`,{children:n.time?j(n.time):`No completed task had an estimate`})]}),(0,q.jsxs)(`div`,{className:`contents`,children:[(0,q.jsx)(`dt`,{className:`text-muted-foreground`,children:`Due dates met`}),(0,q.jsx)(`dd`,{children:n.dueDates?R(n.dueDates):`No completed task had a due date`})]})]}),n.late.length>0&&(0,q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`h4`,{className:`text-xs text-muted-foreground`,children:`Late tasks`}),(0,q.jsx)(`ul`,{"aria-label":`Late tasks`,className:`flex flex-col gap-1`,children:n.late.map(e=>(0,q.jsxs)(`li`,{className:`flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 text-sm`,children:[(0,q.jsxs)(`span`,{className:`flex min-w-0 max-w-full items-center gap-2`,children:[(0,q.jsx)(D,{type:e.task.taskType}),(0,q.jsx)(`span`,{className:`truncate font-medium`,children:e.task.title})]}),(0,q.jsx)(`span`,{className:i(`ml-auto shrink-0 text-xs`,s.danger),children:_(e)})]},e.task.id))})]})]})}function he({period:e,entries:t,workspaces:n}){let r=H(e,t,n),a=Math.max(1,...(r.completedPerMonth??[]).map(({count:e})=>e));return(0,q.jsxs)(`section`,{"aria-label":`Summary`,className:`flex flex-col gap-3 rounded-lg border p-3`,children:[(0,q.jsxs)(`dl`,{className:`flex flex-wrap gap-x-6 gap-y-2`,children:[r.outcomes.map(({outcome:e,count:t})=>(0,q.jsxs)(`div`,{className:`flex flex-col`,children:[(0,q.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:E[e]}),(0,q.jsx)(`dd`,{className:`text-lg font-semibold`,children:t})]},e)),r.notAdopted>0&&(0,q.jsxs)(`div`,{className:`flex flex-col`,children:[(0,q.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Not adopted`}),(0,q.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.notAdopted})]}),(0,q.jsxs)(`div`,{className:`flex flex-col`,children:[(0,q.jsx)(`dt`,{className:`text-xs text-muted-foreground`,children:`Commits`}),(0,q.jsx)(`dd`,{className:`text-lg font-semibold`,children:r.commits})]})]}),(0,q.jsxs)(`dl`,{className:`grid gap-x-4 gap-y-1 text-sm sm:grid-cols-[auto_1fr]`,children:[F.map(e=>{let t=r[e];return(0,q.jsxs)(`div`,{className:`contents`,children:[(0,q.jsx)(`dt`,{className:`text-muted-foreground`,children:N[e]}),(0,q.jsx)(`dd`,{children:t===null?`No data`:`${V(t.median)} (${t.tasks} ${t.tasks===1?`task`:`tasks`})`})]},e)}),r.changes&&(0,q.jsxs)(`div`,{className:`contents`,children:[(0,q.jsx)(`dt`,{className:`text-muted-foreground`,children:`Changes in completed pull requests`}),(0,q.jsx)(`dd`,{children:A(r.changes)})]}),r.completedByType.length>0&&(0,q.jsxs)(`div`,{className:`contents`,children:[(0,q.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by type`}),(0,q.jsx)(`dd`,{children:r.completedByType.map(({taskType:e,count:t})=>`${e} ${t}`).join(`, `)})]}),r.completedByWorkspace.length>0&&(0,q.jsxs)(`div`,{className:`contents`,children:[(0,q.jsx)(`dt`,{className:`text-muted-foreground`,children:`Completed by workspace`}),(0,q.jsx)(`dd`,{children:r.completedByWorkspace.map(({workspace:e,count:t})=>`${e} ${t}`).join(`, `)})]})]}),r.completedPerMonth&&(0,q.jsxs)(`div`,{className:`flex flex-col gap-1`,children:[(0,q.jsx)(`h3`,{className:`text-xs text-muted-foreground`,children:`Completed per month`}),(0,q.jsx)(`ul`,{"aria-label":`Completed per month`,className:`flex flex-col gap-0.5`,children:r.completedPerMonth.map(({month:e,count:t})=>(0,q.jsxs)(`li`,{className:`flex items-center gap-2 text-xs`,children:[(0,q.jsx)(`span`,{className:`w-16 shrink-0 font-mono text-muted-foreground`,children:e}),(0,q.jsx)(`span`,{"aria-hidden":!0,className:i(`h-2 rounded-sm`,d.success),style:{width:`${t/a*60}%`,minWidth:t>0?4:0}}),(0,q.jsx)(`span`,{children:t})]},e))})]})]})}export{Z as Review};
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
import{i as e,n as t,r as n,s as r,t as i}from"./dist-ZmB2kPfR.js";import{A as a,D as o,O as s,b as c,d as l,jt as u,kt as d,lt as f,nn as p,o as m,y as h}from"./status-styles-DLZB0S-A.js";import{p as g}from"./workspace-list-CbAQLx7f.js";import{Ct as _,Dt as v,J as y,K as b,M as x,Mt as S,Nt as C,Ot as ee,Tt as te,X as w,Y as T,Z as E,_t as D,bt as O,c as ne,d as re,f as ie,it as k,kt as A,l as j,nt as M,q as N,u as P,wt as F}from"./index-CEjVLKaZ.js";import{t as I}from"./opener-DWhHPoCL.js";import{t as L}from"./details-sheet-BHRfmUm7.js";var R={name:`circle-x`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`10`,key:`1mglay`}],[`path`,{d:`m15 9-6 6`,key:`1uzhvr`}],[`path`,{d:`m9 9 6 6`,key:`z0biqf`}]],aliases:[`x-circle`]};R.node;var z=t(R),B={name:`git-commit-horizontal`,size:24,node:[[`circle`,{cx:`12`,cy:`12`,r:`3`,key:`1v7zrd`}],[`line`,{x1:`3`,x2:`9`,y1:`12`,y2:`12`,key:`1dyftd`}],[`line`,{x1:`15`,x2:`21`,y1:`12`,y2:`12`,key:`oup4p8`}]],aliases:[`git-commit`]};B.node;var V=t(B),H=r(e(),1),U=n();function W({onClose:e,children:t}){let n=(0,H.useRef)(null),[r,i]=(0,H.useState)(!1);function a(){n.current?.querySelector(`form[data-dirty]`)?i(!0):e()}return(0,H.useEffect)(()=>{function e(e){e.key!==`Escape`||e.defaultPrevented||document.querySelector(`[role=menu]`)||(r?i(!1):e.target instanceof HTMLElement&&e.target.closest(`input, textarea, select`)||a())}return document.addEventListener(`keydown`,e),()=>document.removeEventListener(`keydown`,e)}),(0,U.jsx)(L,{ref:n,width:`min(480px, max(360px, 40vw), calc(100vw - 32px))`,onClose:a,banner:r&&(0,U.jsxs)(`div`,{role:`group`,"aria-label":`Unsaved changes`,className:`flex shrink-0 flex-wrap items-center gap-2 border-b bg-muted px-4 py-2 text-xs`,children:[(0,U.jsx)(`span`,{className:`min-w-0 flex-1`,children:`Discard your unsaved changes?`}),(0,U.jsx)(p,{size:`xs`,variant:`outline`,autoFocus:!0,onClick:()=>i(!1),children:`Keep editing`}),(0,U.jsx)(p,{size:`xs`,variant:`destructive`,onClick:e,children:`Discard changes`})]}),children:t})}function G({task:e,detailed:t}){let n=te(e.milestones);return n.length===0?null:t?(0,U.jsx)(b,{label:`Timeline`,children:(0,U.jsx)(`dl`,{"aria-label":`Timeline of #${e.id}`,className:`grid grid-cols-[auto_1fr] gap-x-3 gap-y-0.5`,children:n.map(({label:e,at:t})=>(0,U.jsxs)(`div`,{className:`contents`,children:[(0,U.jsx)(`dt`,{className:`text-muted-foreground`,children:e}),(0,U.jsx)(`dd`,{children:(0,U.jsx)(O,{at:t})})]},e))})}):(0,U.jsx)(`p`,{"aria-label":`Timeline of #${e.id}`,className:`flex flex-wrap gap-x-2 text-xs text-muted-foreground`,children:n.map(({label:e,at:t})=>(0,U.jsx)(O,{at:t,prefix:`${e} `},e))})}function K({taskId:e}){let t=o(e,!0),n=`Base freshness of #${e}`,r=(0,U.jsxs)(p,{type:`button`,variant:`ghost`,size:`xs`,className:`ml-1.5 h-5 px-1.5 align-middle`,"aria-label":`Recheck base freshness of #${e}`,title:`Check again whether the branch is behind its base`,disabled:t.isFetching,onClick:()=>void t.refetch(),children:[(0,U.jsx)(v,{className:i(`size-3`,t.isFetching&&`animate-spin`)}),`Recheck`]});if(t.error)return(0,U.jsxs)(`p`,{role:`note`,"aria-label":n,className:`text-xs text-muted-foreground`,title:t.error.message,children:[`Could not check whether the branch is behind its base`,r]});let a=t.data,s=a?M(a):null;if(!a||s===null)return null;let c=a.mergeable===`conflicting`;return(0,U.jsxs)(`p`,{role:`note`,"aria-label":n,"data-conflicting":c||void 0,className:i(`text-xs`,c?l.danger:l.attention),title:[a.fetchError&&`Fetching origin failed: ${a.fetchError}`,a.mergeableError].filter(Boolean).join(`
|
|
2
|
-
`)||void 0,children:[s,a.fetchError&&` (not up to date: fetching origin failed)`,r]})}function ae({task:e,mergedWith:t,through:n,detailed:r}){let i=t.pullRequestUrl;if(i===null){let t=`Shipped with task of #${e.id}`;return r?(0,U.jsx)(b,{label:`Shipped with`,children:(0,U.jsx)(`span`,{"aria-label":t,children:n??`A deleted task`})}):(0,U.jsxs)(`p`,{className:`flex min-w-0 items-center gap-1 text-xs`,children:[(0,U.jsx)(A,{"aria-hidden":!0,className:`size-3 shrink-0 text-muted-foreground`}),(0,U.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`Shipped with`}),(0,U.jsx)(`span`,{"aria-label":t,children:n??`a deleted task`})]})}let a=`Shipped with pull request of #${e.id}`;return r?(0,U.jsxs)(b,{label:`Shipped with`,children:[(0,U.jsx)(`span`,{"aria-label":a,className:`break-all font-mono select-all`,children:i}),n&&(0,U.jsxs)(`span`,{className:`text-muted-foreground`,children:[`Pull request of `,n]})]}):(0,U.jsxs)(`p`,{className:`flex min-w-0 items-center gap-1 text-xs`,children:[(0,U.jsx)(A,{"aria-hidden":!0,className:`size-3 shrink-0 text-muted-foreground`}),(0,U.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`Shipped with`}),(0,U.jsx)(`span`,{"aria-label":a,className:`truncate select-all font-mono`,children:i}),n&&(0,U.jsxs)(`span`,{className:`shrink-0 text-muted-foreground`,children:[`of `,n]})]})}function q({task:e,tasks:t,context:n,navigation:r}){let a=u(),o=h(),s=f(),c=(a.data??[]).flatMap(({taskId:t,relatedId:n})=>t===e.id?[n]:n===e.id?[t]:[]).filter(e=>n.byId.has(e)),l=t.filter(t=>t.id!==e.id&&!c.includes(t.id)),d=[...new Set([e.workspaceId,...l.map(e=>e.workspaceId)])].map(e=>({workspaceId:e,tasks:l.filter(t=>t.workspaceId===e)})).filter(e=>e.tasks.length>0),p=E(),m=o.isPending||s.isPending||p,_=o.error??s.error;if(c.length===0&&d.length===0)return null;let v=d.length>0&&(0,U.jsxs)(`select`,{"aria-label":`Add related task to #${e.id}`,className:i(`h-6 rounded-md border border-input bg-background px-1.5 text-xs outline-none max-md:h-11 max-md:px-2.5 max-md:text-sm focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50 disabled:opacity-50`,`max-w-48`),value:``,disabled:m,onChange:t=>{t.target.value&&o.mutate({taskId:e.id,relatedId:Number(t.target.value)})},children:[(0,U.jsx)(`option`,{value:``,children:`Add related task...`}),d.map(e=>(0,U.jsx)(`optgroup`,{label:n.workspaceName(e.workspaceId),children:e.tasks.map(e=>(0,U.jsxs)(`option`,{value:e.id,children:[`#`,e.id,` `,e.title]},e.id))},e.workspaceId))]}),y=_&&(0,U.jsx)(`p`,{role:`alert`,className:`text-destructive`,children:_.message});return c.length===0?(0,U.jsxs)(`div`,{className:`flex flex-col gap-1 text-xs`,children:[v,y]}):(0,U.jsxs)(b,{label:`Related`,children:[(0,U.jsxs)(`ul`,{"aria-label":`Related tasks of #${e.id}`,className:`flex flex-wrap items-center gap-1 max-md:gap-2`,children:[c.map(t=>{let i=n.byId.get(t),a=w(t,e.workspaceId,n);return(0,U.jsxs)(`li`,{className:`inline-flex h-6 min-w-0 items-center rounded-md border max-md:h-11 max-md:gap-2 max-md:border-0`,children:[(0,U.jsxs)(`button`,{type:`button`,"aria-label":`Open related task ${a}`,title:i?.title,className:`h-full min-w-0 max-w-56 truncate rounded-l-md px-1.5 tabular-nums hover:bg-muted max-md:rounded-md max-md:border max-md:px-3 disabled:cursor-default disabled:hover:bg-transparent`,disabled:r===void 0||!r.canOpen(t),onClick:()=>r?.open(t),children:[a,` `,i?.title]}),(0,U.jsx)(`button`,{type:`button`,"aria-label":`Remove related task #${t} from #${e.id}`,title:`Remove related task`,className:`flex h-full items-center justify-center rounded-r-md p-1 text-muted-foreground hover:bg-muted max-md:w-11 max-md:rounded-md max-md:border hover:text-foreground disabled:opacity-50`,disabled:m,onClick:()=>s.mutate({taskId:e.id,relatedId:t}),children:(0,U.jsx)(g,{className:`size-3`})})]},t)}),v]}),y]})}function J({task:e,detailed:t}){let n=e.status!==`planned`||k(e),r=a(e.id,n);if(r.isError)return(0,U.jsxs)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:[`Failed to load commits: `,r.error.message]});if(!r.data||r.data.length===0)return null;let o=(0,U.jsx)(`ul`,{"aria-label":`Commits of #${e.id}`,className:i(`flex flex-col gap-0.5`,!t&&`mt-1`),children:r.data.map(e=>(0,U.jsxs)(`li`,{className:`flex gap-2 text-xs`,title:e.author,children:[(0,U.jsx)(`code`,{className:`shrink-0 text-muted-foreground`,children:e.sha.slice(0,7)}),(0,U.jsx)(`span`,{className:t?`min-w-0 break-words-keep`:`truncate`,children:e.message.split(`
|
|
3
|
-
`,1)[0]})]},e.sha))});return t?(0,U.jsx)(b,{label:`Commits (${r.data.length})`,children:o}):o}function oe({task:e}){return(0,U.jsxs)(U.Fragment,{children:[(e.estimate!==null||e.dueDate!==null)&&(0,U.jsxs)(`p`,{"aria-label":`Plan of #${e.id}`,className:`flex flex-wrap gap-x-2 text-xs text-muted-foreground`,children:[e.estimate!==null&&(0,U.jsxs)(`span`,{children:[`Estimate `,D(e.estimate)]}),e.dueDate!==null&&(0,U.jsx)(N,{task:e})]}),(0,U.jsx)(T,{task:e})]})}var se={commit:{label:`Commit`,icon:V,tone:`neutral`},pr_opened:{label:`Pull request opened`,icon:ee,tone:`review`},checks_passed:{label:`CI passed`,icon:C,tone:`success`},checks_failed:{label:`CI failed`,icon:z,tone:`danger`},pr_merged:{label:`Merged`,icon:A,tone:`success`}};function ce({url:e}){let t=x(e),n=t=>{t.preventDefault(),I(e).catch(t=>console.error(`Failed to open ${e}`,t))};return(0,U.jsx)(`a`,{href:e,title:e,"aria-label":t?`Pull request #${t}`:`Pull request`,onClick:n,onAuxClick:n,className:`shrink-0 text-primary underline underline-offset-2 hover:no-underline`,children:t?`#${t}`:`PR`})}function le({task:e,capabilities:t}){let n=t.git&&t.merge,r=d(e.id,n&&(e.status!==`planned`||k(e)));return n?r.isError?(0,U.jsxs)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:[`Failed to load git activity: `,r.error.message]}):!r.data||r.data.length===0?null:(0,U.jsx)(b,{label:`Git activity`,children:(0,U.jsx)(`ol`,{"aria-label":`Git activity of #${e.id}`,className:`grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-0.5 max-md:gap-y-1.5`,children:r.data.map(({kind:e,externalRef:t,title:n,author:r,occurredAt:a})=>{let{label:o,icon:s,tone:c}=se[e];return(0,U.jsxs)(`li`,{className:`col-span-full grid grid-cols-subgrid items-baseline`,title:r??void 0,children:[(0,U.jsx)(O,{className:`text-muted-foreground`,at:a}),(0,U.jsxs)(`span`,{className:`flex min-w-0 items-baseline gap-2 max-md:flex-wrap max-md:gap-y-0`,children:[(0,U.jsxs)(`span`,{className:i(`inline-flex shrink-0 items-baseline gap-1`,l[c]),children:[(0,U.jsx)(s,{"aria-hidden":!0,className:`size-3 self-center`}),o]}),e===`pr_opened`||e===`pr_merged`?(0,U.jsx)(ce,{url:t}):(0,U.jsx)(`code`,{className:`shrink-0 text-muted-foreground`,children:t.slice(0,7)}),(0,U.jsx)(`span`,{className:`min-w-0 break-words-keep max-md:basis-full`,children:n})]})]},`${e}:${t}`)})})}):null}var Y={idle:{label:`Idle`,tone:`neutral`},working:{label:`Working`,tone:`info`},blocked:{label:`Needs input`,tone:`attention`},done:{label:`Done`,tone:`success`}};function ue(e,t){return e.reduce((n,{status:r,at:i},a)=>{if(r!==`working`)return n;let o=e[a+1]?.at??t;return n+Math.max(0,o-i)},0)}function de(e){let t=Math.floor(e/60);return t<1?`<1m`:t<60?`${t}m`:`${Math.floor(t/60)}h ${t%60}m`}function fe({task:e,capabilities:t}){let n=t.herdr,r=c(e.id,n&&(e.status!==`planned`||k(e)));if(!n)return null;if(r.isError)return(0,U.jsxs)(`p`,{role:`alert`,className:`text-xs text-destructive`,children:[`Failed to load the agent's history: `,r.error.message]});let i=r.data??[];if(i.length===0)return null;let a=i.slice(-20),o=de(ue(i,Date.now()/1e3));return(0,U.jsxs)(b,{label:`Agent activity`,children:[(0,U.jsxs)(`p`,{"aria-label":`Time the agent of #${e.id} worked`,className:`text-muted-foreground`,children:[`Worked `,o,i.length>a.length&&`; the last ${a.length} of ${i.length} changes:`]}),(0,U.jsx)(`ol`,{"aria-label":`Agent activity of #${e.id}`,className:`grid grid-cols-[auto_minmax(0,1fr)] gap-x-3 gap-y-0.5 max-md:gap-y-1.5`,children:a.map(({status:e,at:t},n)=>(0,U.jsxs)(`li`,{className:`col-span-full grid grid-cols-subgrid items-baseline`,children:[(0,U.jsx)(O,{className:`text-muted-foreground`,at:t}),e===null?(0,U.jsx)(`span`,{className:`text-muted-foreground`,children:`No agent`}):(0,U.jsx)(`span`,{className:l[Y[e].tone],children:Y[e].label})]},n))})]})}var pe={progress:`Progress`,blocker:`Blocker`};function X({kind:e}){return(0,U.jsx)(`span`,{"data-note-kind":e,className:i(`shrink-0 rounded-md px-1.5 font-medium`,e===`blocker`?m.attention:m.neutral),children:pe[e]})}function me({task:e,detailed:t}){let n=e.notes;if(n.length===0)return null;if(!t){let t=n[n.length-1];return(0,U.jsxs)(`p`,{"aria-label":`Latest note of #${e.id}`,className:`flex min-w-0 items-center gap-1.5 text-xs`,title:_(t.at),children:[(0,U.jsx)(X,{kind:t.kind}),(0,U.jsx)(`span`,{className:`min-w-0 truncate text-muted-foreground`,children:ie(t.body)}),n.length>1&&(0,U.jsx)(`span`,{className:`shrink-0 text-muted-foreground`,children:`+${n.length-1} more`})]})}return(0,U.jsx)(b,{label:`Notes (${n.length})`,children:(0,U.jsx)(`ol`,{"aria-label":`Notes of #${e.id}`,className:`flex flex-col gap-2`,children:n.map((e,t)=>(0,U.jsxs)(`li`,{className:`flex flex-col gap-0.5`,children:[(0,U.jsxs)(`div`,{className:`flex items-center gap-1.5`,children:[(0,U.jsx)(X,{kind:e.kind}),(0,U.jsx)(O,{className:`text-muted-foreground`,at:e.at})]}),(0,U.jsx)(H.Suspense,{fallback:(0,U.jsx)(`p`,{className:`whitespace-pre-line break-words-keep`,children:e.body}),children:(0,U.jsx)(y,{source:e.body})})]},t))})})}var he={pending:`Pending`,met:`Met`,failed:`Failed`},Z={pending:l.neutral,met:l.success,failed:l.danger},Q={user:`you`,agent:`an agent`,toodo:`Toodo`};function $({state:e}){let t=e===`met`?C:e===`failed`?z:S;return(0,U.jsx)(`span`,{role:`img`,"aria-label":he[e],className:i(`flex size-4 shrink-0 items-center justify-center`,Z[e]),children:(0,U.jsx)(t,{"aria-hidden":!0,className:`size-3.5`})})}function ge(e){if(e.checkedBy===null)return null;let t=e.checkedAt===null?``:` ${F(e.checkedAt)}`;return`Checked by ${Q[e.checkedBy]}${t}`}function _e({task:e,detailed:t}){let n=e.criteria;if(n.length===0)return null;let r=(0,U.jsx)(`ul`,{"aria-label":`Criteria of #${e.id}`,className:`flex flex-col gap-0.5`,children:n.map(n=>(0,U.jsx)(ve,{task:e,criterion:n,detailed:t},n.id))});if(!t)return r;let i=n.filter(e=>e.state===`met`).length;return(0,U.jsx)(b,{label:`Criteria (${i} of ${n.length} met)`,children:r})}function ve({task:e,criterion:t,detailed:n}){let r=s(),a=E(),[o,c]=(0,H.useState)(!1),[u,d]=(0,H.useState)(``),f=t.kind===`manual`&&e.status!==`done`,m=ge(t),h=j(t.kind)?t.target:null;function g(){c(!1),d(``)}let _=re(u.trim()!==``,g,r.isPending);function v(n){o?g():n?(r.reset(),c(!0)):r.mutate({taskId:e.id,criterionId:t.id,met:!1,evidence:null})}function y(n){n.preventDefault(),r.mutate({taskId:e.id,criterionId:t.id,met:!0,evidence:u.trim()||null},{onSuccess:g})}return(0,U.jsxs)(`li`,{"data-criterion-state":t.state,className:`flex min-w-0 flex-col gap-0.5 text-xs`,children:[(0,U.jsxs)(`div`,{className:`flex min-w-0 items-center gap-1.5`,title:n?void 0:[m,t.evidence,h].filter(Boolean).join(`
|
|
4
|
-
`)||void 0,children:[f?(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(`label`,{className:`flex size-4 shrink-0 items-center justify-center max-md:-mx-3.5 max-md:size-11`,children:(0,U.jsx)(`input`,{type:`checkbox`,"aria-label":`Check criterion ${t.id} of #${e.id}`,checked:t.state===`met`||o,disabled:r.isPending||a,onChange:e=>v(e.target.checked)})}),t.state===`failed`&&(0,U.jsx)($,{state:`failed`})]}):(0,U.jsx)($,{state:t.state}),(0,U.jsx)(`span`,{className:i(`min-w-0`,n?`break-words-keep`:`truncate`,t.state===`failed`&&l.danger),children:t.text}),t.kind!==`manual`&&(0,U.jsx)(`span`,{className:`shrink-0 rounded-md bg-muted px-1.5 text-muted-foreground`,children:ne[t.kind]}),!n&&t.evidence&&(0,U.jsx)(`span`,{className:`min-w-0 flex-1 truncate text-muted-foreground`,children:t.evidence})]}),n&&h&&(0,U.jsx)(`code`,{className:`ml-5.5 break-all text-muted-foreground`,children:h}),n&&(t.evidence||m)&&(0,U.jsxs)(`p`,{className:`ml-5.5 whitespace-pre-line break-words-keep text-muted-foreground`,children:[t.evidence,t.evidence&&m&&` · `,t.checkedBy!==null&&(0,U.jsxs)(U.Fragment,{children:[`Checked by `,Q[t.checkedBy],t.checkedAt!==null&&(0,U.jsxs)(U.Fragment,{children:[` `,(0,U.jsx)(O,{at:t.checkedAt})]})]})]}),o&&(0,U.jsxs)(`form`,{onSubmit:y,className:`ml-5.5 flex flex-wrap items-center gap-1`,onKeyDown:_.onKeyDown,children:[(0,U.jsx)(`input`,{className:i(`h-8 w-full min-w-0 rounded-lg border border-input bg-background px-2.5 text-sm outline-none max-md:h-11 focus-visible:border-ring focus-visible:ring-3 focus-visible:ring-ring/50`,`h-7 flex-1 basis-48`),"aria-label":`Evidence for criterion ${t.id}`,placeholder:`Evidence (optional), e.g. a link or what you checked`,value:u,onChange:e=>d(e.target.value),autoFocus:!0}),_.asking?(0,U.jsx)(P,{label:`Discard evidence for criterion ${t.id}`,question:`Discard the evidence?`,onKeep:_.keep,onDiscard:_.discard}):(0,U.jsxs)(U.Fragment,{children:[(0,U.jsx)(p,{type:`submit`,size:`xs`,disabled:r.isPending,children:r.isPending?`Saving...`:`Save`}),(0,U.jsx)(p,{type:`button`,size:`xs`,variant:`ghost`,onClick:_.request,children:`Cancel`})]})]}),r.isError&&(0,U.jsx)(`p`,{role:`alert`,className:`ml-5.5 text-destructive`,children:r.error.message})]})}export{fe as AgentActivity,K as BranchFreshnessNote,J as CommitList,q as RelatedTasks,ae as ShippedWith,le as TaskActivity,_e as TaskCriteria,W as TaskDetailsSheet,me as TaskNotes,oe as TaskPlan,G as TaskTimeline};
|