@usine/server 0.5.1-next.361.g153d3ea.1.1 → 0.5.1-next.363.ge3cddea.1.1

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.
Files changed (78) hide show
  1. package/dist/web/assets/_agent-D5GKJj9b.js +1 -0
  2. package/dist/web/assets/{_binding-C36x48nI.js → _binding-BLNoptlm.js} +1 -1
  3. package/dist/web/assets/_label-CvqOo9rv.js +1 -0
  4. package/dist/web/assets/{_loop-BH6CyZqJ.js → _loop-Cbio1Z5l.js} +1 -1
  5. package/dist/web/assets/{_name-BD4_mou9.js → _name-CaT-DdcP.js} +1 -1
  6. package/dist/web/assets/_number-BsuDWuEr.js +1 -0
  7. package/dist/web/assets/{_number-Ce3iXHWo.js → _number-Cd1AyBE_.js} +1 -1
  8. package/dist/web/assets/{_number-Bo8Gp95s.js → _number-_lVXaRia.js} +1 -1
  9. package/dist/web/assets/{_project-BewINovU.js → _project-8-ebmqgM.js} +1 -1
  10. package/dist/web/assets/{_project-BaAh9w_P.js → _project-B2xbZilE.js} +1 -1
  11. package/dist/web/assets/_project-BsuDWuEr.js +1 -0
  12. package/dist/web/assets/_run-BsuDWuEr.js +1 -0
  13. package/dist/web/assets/{_run-FhE-Xq5C.js → _run-ircT7Gbk.js} +1 -1
  14. package/dist/web/assets/{_worker-BhWAkQzS.js → _worker-DCFKCaXz.js} +1 -1
  15. package/dist/web/assets/{action-JvwOtX_J.js → action-DhGZbq8s.js} +1 -1
  16. package/dist/web/assets/agents-DkTHYQqZ.js +1 -0
  17. package/dist/web/assets/{agents-BSAY5RHb.js → agents-Nt6nKPTQ.js} +1 -1
  18. package/dist/web/assets/{api-em6k9a2t.js → api-C-F05axZ.js} +1 -1
  19. package/dist/web/assets/{bindings-CRfWNIoV.js → bindings-CEIeJViC.js} +1 -1
  20. package/dist/web/assets/{checkbox-De_QkOXB.js → checkbox-B608UJ33.js} +1 -1
  21. package/dist/web/assets/{ci-zupxJ_T1.js → ci-6rWFJZh4.js} +1 -1
  22. package/dist/web/assets/{code-block-D1IZxGx6.js → code-block-BymRTPgO.js} +1 -1
  23. package/dist/web/assets/{drawer-C1za3OAM.js → drawer-BPySeCyq.js} +1 -1
  24. package/dist/web/assets/{edit-and-retry-vdw4SJW2.js → edit-and-retry-ECmelXtL.js} +1 -1
  25. package/dist/web/assets/{file-error-VW4TA6FC.js → file-error-DBE-c2Cf.js} +1 -1
  26. package/dist/web/assets/{history-HY_6dISw.js → history-CGjhuLWm.js} +1 -1
  27. package/dist/web/assets/{index-C_emtD3X.js → index-DUgI_VkE.js} +3 -3
  28. package/dist/web/assets/{label-badge-DC_gSG2U.js → label-badge-Ct7F8sHj.js} +1 -1
  29. package/dist/web/assets/{labels-3lNPyOKF.js → labels-BMH3hLPC.js} +1 -1
  30. package/dist/web/assets/{list-CpJWoW35.js → list-BsnLuscB.js} +1 -1
  31. package/dist/web/assets/loops-DBt8RUSy.js +1 -0
  32. package/dist/web/assets/{members-2tfKHVCo.js → members-BOf_2GHy.js} +1 -1
  33. package/dist/web/assets/{model-3iMuy1GK.js → model-DoNfSmpn.js} +1 -1
  34. package/dist/web/assets/{moves-C8LmlI9G.js → moves-DvXvTqPv.js} +1 -1
  35. package/dist/web/assets/{not-found-BQmVi3gG.js → not-found-B0p_Ar0N.js} +1 -1
  36. package/dist/web/assets/{outcome-C3YkCoP1.js → outcome-S3FFy-PM.js} +1 -1
  37. package/dist/web/assets/{overview-B6WVtEU1.js → overview-CepWZt0q.js} +1 -1
  38. package/dist/web/assets/{page-SCXRVE8o.js → page-mSAm7lAb.js} +1 -1
  39. package/dist/web/assets/{projects-DDA1UNj8.js → projects-BR5Aup-I.js} +1 -1
  40. package/dist/web/assets/{queries-qu-pAHiz.js → queries-BCGlJZOP.js} +1 -1
  41. package/dist/web/assets/{queries-DZCDfTzj.js → queries-BSzIhHrR.js} +1 -1
  42. package/dist/web/assets/{queries-BdQSLORJ.js → queries-DNwL3iH8.js} +1 -1
  43. package/dist/web/assets/{queries-BTiSv8Uz.js → queries-Wul8SCcf.js} +1 -1
  44. package/dist/web/assets/{repositories-C9LmRA87.js → repositories-DxwnPPsK.js} +1 -1
  45. package/dist/web/assets/{repository-link-DQuPFe84.js → repository-link-XE85basL.js} +1 -1
  46. package/dist/web/assets/route-BEw16vcC.js +1 -0
  47. package/dist/web/assets/route-C1ia5OX-.js +1 -0
  48. package/dist/web/assets/{route-status-CvGVCVmy.js → route-status-CRkUsWbT.js} +1 -1
  49. package/dist/web/assets/{routes-BlssBumS.js → routes-BQf8X7mw.js} +1 -1
  50. package/dist/web/assets/routes-BsuDWuEr.js +1 -0
  51. package/dist/web/assets/{run-again-DoVMI2-M.js → run-again-CZ3sFwrA.js} +1 -1
  52. package/dist/web/assets/{section-DOT3oY3x.js → section-5JEIJP9Q.js} +1 -1
  53. package/dist/web/assets/{section-o3RiYp4A.js → section-CuPGXQHz.js} +1 -1
  54. package/dist/web/assets/{section-BzCcACXc.js → section-D_K-jp9U.js} +1 -1
  55. package/dist/web/assets/{settings-DqMxOkz9.js → settings-CY01K1Sp.js} +1 -1
  56. package/dist/web/assets/{setup-B1E82AQR.js → setup-BJhIggBw.js} +1 -1
  57. package/dist/web/assets/{sign-in-DB4xOafd.js → sign-in-DG5B1L4s.js} +1 -1
  58. package/dist/web/assets/{slots-DJB2epQV.js → slots-ym7go2th.js} +1 -1
  59. package/dist/web/assets/{strings-QYBiammf.js → strings-D9neIsYo.js} +1 -1
  60. package/dist/web/assets/tasks-BsuDWuEr.js +1 -0
  61. package/dist/web/assets/{tasks-1BYlbc5t.js → tasks-Cj8GEXQ3.js} +1 -1
  62. package/dist/web/assets/{tokens-CopdYy0x.js → tokens-BholVzl1.js} +1 -1
  63. package/dist/web/assets/{usage-Ag_8vgJ9.js → usage-hielNwn1.js} +1 -1
  64. package/dist/web/assets/{useTriggerFocusGuards-6__LUK4p.js → useTriggerFocusGuards-tBHNKdun.js} +1 -1
  65. package/dist/web/assets/{workers-BGZqmuKT.js → workers-Znn9vY-2.js} +1 -1
  66. package/dist/web/index.html +10 -10
  67. package/package.json +9 -9
  68. package/dist/web/assets/_agent-CuzLpo4D.js +0 -1
  69. package/dist/web/assets/_label-Bpx3I_eV.js +0 -1
  70. package/dist/web/assets/_number-DCzR7k7I.js +0 -1
  71. package/dist/web/assets/_project-DCzR7k7I.js +0 -1
  72. package/dist/web/assets/_run-DCzR7k7I.js +0 -1
  73. package/dist/web/assets/agents-MZwU7wEk.js +0 -1
  74. package/dist/web/assets/loops-B-bQfEL_.js +0 -1
  75. package/dist/web/assets/route-BNmlXxC6.js +0 -1
  76. package/dist/web/assets/route-DTm7T2cJ.js +0 -1
  77. package/dist/web/assets/routes-DCzR7k7I.js +0 -1
  78. package/dist/web/assets/tasks-DCzR7k7I.js +0 -1
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{t}from"./useSuspenseQuery-ajaZl96Y.js";import{n}from"./queries-BCGlJZOP.js";import{f as r}from"./index-DUgI_VkE.js";import{t as i}from"./agents-Nt6nKPTQ.js";var a=e(),o=()=>{let{agent:e}=r.useParams(),{data:o}=t(n());return(0,a.jsx)(i,{name:e,configuration:o})};export{o as component};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{st as t,t as n,y as r}from"./section-DOT3oY3x.js";import{t as i}from"./useSuspenseQuery-ajaZl96Y.js";import{n as a}from"./queries-qu-pAHiz.js";import{d as o}from"./index-C_emtD3X.js";var s=e(),c=()=>{let{binding:e}=o.useParams(),{data:c}=i(a()),l=c.bindings.find(t=>t.name===e);return(0,s.jsx)(n,{title:e,entity:t(`binding`,e),children:l!==void 0&&(0,s.jsxs)(`p`,{children:[r.member,` `,l.member,` · `,l.role,` ·`,` `,l.scope._tag===`Instance`?r.instance:l.scope.project]})})};export{c as component};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{st as t,t as n,y as r}from"./section-5JEIJP9Q.js";import{t as i}from"./useSuspenseQuery-ajaZl96Y.js";import{n as a}from"./queries-BCGlJZOP.js";import{d as o}from"./index-DUgI_VkE.js";var s=e(),c=()=>{let{binding:e}=o.useParams(),{data:c}=i(a()),l=c.bindings.find(t=>t.name===e);return(0,s.jsx)(n,{title:e,entity:t(`binding`,e),children:l!==void 0&&(0,s.jsxs)(`p`,{children:[r.member,` `,l.member,` · `,l.role,` ·`,` `,l.scope._tag===`Instance`?r.instance:l.scope.project]})})};export{c as component};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{st as t,t as n}from"./section-5JEIJP9Q.js";import{u as r}from"./index-DUgI_VkE.js";var i=e(),a=()=>{let{label:e}=r.useParams();return(0,i.jsx)(n,{title:e,entity:t(`label`,e),children:null})};export{a as component};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{O as t,a as n,c as r,i,k as a,m as o,n as s,o as c,p as l,r as u,s as d,st as f,t as p,u as m,v as h}from"./section-DOT3oY3x.js";import{t as g}from"./useSuspenseQuery-ajaZl96Y.js";import{t as _}from"./link-3oQYoIpm.js";import{i as v}from"./strings-BqjRDV62.js";import{n as y,r as b}from"./list-CpJWoW35.js";import{t as x}from"./error-alert-CtUHST2S.js";import{n as S}from"./queries-qu-pAHiz.js";import{Qt as C,W as w,l as T}from"./index-C_emtD3X.js";import{t as E}from"./file-error-VW4TA6FC.js";import{t as D}from"./repository-link-DQuPFe84.js";var O=e(),k=({loop:e,configuration:r})=>{let a=r.projects.find(t=>e.name.startsWith(`${t.id}/`)),o=r.agents.find(({name:t})=>t===e.agent);return(0,O.jsxs)(n,{children:[a!==void 0&&(0,O.jsx)(i,{label:`Project`,children:(0,O.jsx)(_,{to:`/configuration/projects/$project`,params:{project:a.id},className:`text-primary hover:underline`,children:a.name})}),(0,O.jsxs)(i,{label:`Agent`,children:[(0,O.jsx)(_,{to:`/configuration/agents/$agent`,params:{agent:e.agent},className:`text-primary hover:underline`,children:e.agent}),o!==void 0&&(0,O.jsx)(`p`,{className:`mt-0.5 font-mono text-xs text-muted-foreground`,children:v(o)})]}),(0,O.jsx)(i,{label:`Repositories`,children:e.repositories.length===0?(0,O.jsx)(m,{children:`No registered repository matches the selector`}):(0,O.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:e.repositories.map(e=>(0,O.jsx)(`li`,{children:(0,O.jsx)(D,{repository:e})},e))})}),(0,O.jsxs)(i,{label:`Approval`,children:[h(e.approval),e.approval!==`none`&&e.approval!==`required`&&(0,O.jsx)(`code`,{className:`block text-xs wrap-anywhere`,children:e.approval})]}),(0,O.jsxs)(i,{label:`Max cycles`,children:[(0,O.jsx)(`span`,{className:`tabular-nums`,children:e.maxCycles}),` `,(0,O.jsx)(m,{children:`runs per item before a reset`})]}),(0,O.jsx)(i,{label:`Permissions`,children:t[e.permissions]}),(0,O.jsx)(i,{label:`Priority`,children:e.priority===null?(0,O.jsx)(m,{children:`0; ties use lane order`}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`tabular-nums`,children:e.priority}),` `,(0,O.jsx)(m,{children:`higher values go first; ties use lane order`})]})}),(0,O.jsx)(i,{label:`Step`,children:(0,O.jsx)(`code`,{className:`font-mono text-xs`,children:e.step})})]})},A=e=>[[`on`,e.stream],[`if`,e.condition],...e.cron===null?[]:[[`cron`,e.cron]],...e.timeZone===null?[]:[[`tz`,e.timeZone]]],j=({repos:e,tags:t})=>[...e===null?[]:[[`repos`,e.join(`, `)]],...t===null?[]:[[`tags`,t.join(`, `)]]],M=({loop:e,configuration:t,pause:n})=>{let r=o(e.prompt).length;return(0,O.jsxs)(O.Fragment,{children:[n?.isError===!0&&(0,O.jsx)(x,{message:n.error.message}),(0,O.jsxs)(s,{facts:(0,O.jsx)(k,{loop:e,configuration:t}),children:[(0,O.jsxs)(u,{title:`Trigger`,children:[(0,O.jsx)(c,{entries:A(e)}),e.undeclaredLabels.length>0&&(0,O.jsxs)(`p`,{className:`flex items-start gap-1.5 text-xs text-muted-foreground`,children:[(0,O.jsx)(C,{weight:`fill`,className:`mt-0.5 size-3 shrink-0 text-warning`}),(0,O.jsxs)(`span`,{children:[`Condition uses`,` `,e.undeclaredLabels.length===1?`an undeclared label`:`undeclared labels`,`:`,` `,e.undeclaredLabels.join(`, `),`. usine creates only the labels under`,` `,(0,O.jsx)(`code`,{children:`labels`}),` in `,(0,O.jsx)(`code`,{children:`usine.yaml`}),`.`]})]})]}),(0,O.jsx)(u,{title:`Selector`,children:e.selector===null?(0,O.jsx)(`p`,{className:`text-muted-foreground`,children:`No selector: every registered repository`}):(0,O.jsx)(c,{entries:j(e.selector)})}),(0,O.jsx)(u,{title:`Prompt`,aside:r===0?`Same text for every run`:`${a(r,`outlined expression`)} filled in from each item`,children:(0,O.jsx)(l,{template:e.prompt})})]})]})},N=({name:e,configuration:t,pause:n})=>{let i=t.loops.find(t=>t.name===e);if(i!==void 0)return(0,O.jsx)(p,{entity:f(`loop`,e),title:i.name,marks:(0,O.jsx)(b,{paused:i.paused}),file:i.file,actions:n!==null&&(0,O.jsx)(y,{loop:i,pause:n,variant:`outline`}),children:(0,O.jsx)(M,{loop:i,configuration:t,pause:n})});let a=t.quarantinedLoops.find(t=>t.name===e);return a===void 0?(0,O.jsx)(p,{entity:f(`loop`,e),title:e,children:(0,O.jsxs)(d,{title:`Loop not found`,children:[`The configuration has no file `,(0,O.jsxs)(`code`,{children:[`loops/`,e,`.md`]}),`.`,` `,(0,O.jsx)(_,{to:`/configuration/loops`,className:`text-primary hover:underline`,children:`See all loops`}),`.`]})}):(0,O.jsx)(p,{entity:f(`loop`,e),title:a.name,marks:(0,O.jsx)(r,{}),file:a.file,children:(0,O.jsx)(E,{error:a.error,consequence:`No runs until the file loads.`})})},P=()=>{let{loop:e}=T.useParams(),{data:t}=g(S());return(0,O.jsx)(N,{name:e,configuration:t,pause:w()})};export{P as component};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{O as t,a as n,c as r,i,k as a,m as o,n as s,o as c,p as l,r as u,s as d,st as f,t as p,u as m,v as h}from"./section-5JEIJP9Q.js";import{t as g}from"./useSuspenseQuery-ajaZl96Y.js";import{t as _}from"./link-3oQYoIpm.js";import{i as v}from"./strings-BqjRDV62.js";import{n as y,r as b}from"./list-BsnLuscB.js";import{t as x}from"./error-alert-CtUHST2S.js";import{n as S}from"./queries-BCGlJZOP.js";import{Qt as C,W as w,l as T}from"./index-DUgI_VkE.js";import{t as E}from"./file-error-DBE-c2Cf.js";import{t as D}from"./repository-link-XE85basL.js";var O=e(),k=({loop:e,configuration:r})=>{let a=r.projects.find(t=>e.name.startsWith(`${t.id}/`)),o=r.agents.find(({name:t})=>t===e.agent);return(0,O.jsxs)(n,{children:[a!==void 0&&(0,O.jsx)(i,{label:`Project`,children:(0,O.jsx)(_,{to:`/configuration/projects/$project`,params:{project:a.id},className:`text-primary hover:underline`,children:a.name})}),(0,O.jsxs)(i,{label:`Agent`,children:[(0,O.jsx)(_,{to:`/configuration/agents/$agent`,params:{agent:e.agent},className:`text-primary hover:underline`,children:e.agent}),o!==void 0&&(0,O.jsx)(`p`,{className:`mt-0.5 font-mono text-xs text-muted-foreground`,children:v(o)})]}),(0,O.jsx)(i,{label:`Repositories`,children:e.repositories.length===0?(0,O.jsx)(m,{children:`No registered repository matches the selector`}):(0,O.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:e.repositories.map(e=>(0,O.jsx)(`li`,{children:(0,O.jsx)(D,{repository:e})},e))})}),(0,O.jsxs)(i,{label:`Approval`,children:[h(e.approval),e.approval!==`none`&&e.approval!==`required`&&(0,O.jsx)(`code`,{className:`block text-xs wrap-anywhere`,children:e.approval})]}),(0,O.jsxs)(i,{label:`Max cycles`,children:[(0,O.jsx)(`span`,{className:`tabular-nums`,children:e.maxCycles}),` `,(0,O.jsx)(m,{children:`runs per item before a reset`})]}),(0,O.jsx)(i,{label:`Permissions`,children:t[e.permissions]}),(0,O.jsx)(i,{label:`Priority`,children:e.priority===null?(0,O.jsx)(m,{children:`0; ties use lane order`}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`tabular-nums`,children:e.priority}),` `,(0,O.jsx)(m,{children:`higher values go first; ties use lane order`})]})}),(0,O.jsx)(i,{label:`Step`,children:(0,O.jsx)(`code`,{className:`font-mono text-xs`,children:e.step})})]})},A=e=>[[`on`,e.stream],[`if`,e.condition],...e.cron===null?[]:[[`cron`,e.cron]],...e.timeZone===null?[]:[[`tz`,e.timeZone]]],j=({repos:e,tags:t})=>[...e===null?[]:[[`repos`,e.join(`, `)]],...t===null?[]:[[`tags`,t.join(`, `)]]],M=({loop:e,configuration:t,pause:n})=>{let r=o(e.prompt).length;return(0,O.jsxs)(O.Fragment,{children:[n?.isError===!0&&(0,O.jsx)(x,{message:n.error.message}),(0,O.jsxs)(s,{facts:(0,O.jsx)(k,{loop:e,configuration:t}),children:[(0,O.jsxs)(u,{title:`Trigger`,children:[(0,O.jsx)(c,{entries:A(e)}),e.undeclaredLabels.length>0&&(0,O.jsxs)(`p`,{className:`flex items-start gap-1.5 text-xs text-muted-foreground`,children:[(0,O.jsx)(C,{weight:`fill`,className:`mt-0.5 size-3 shrink-0 text-warning`}),(0,O.jsxs)(`span`,{children:[`Condition uses`,` `,e.undeclaredLabels.length===1?`an undeclared label`:`undeclared labels`,`:`,` `,e.undeclaredLabels.join(`, `),`. usine creates only the labels under`,` `,(0,O.jsx)(`code`,{children:`labels`}),` in `,(0,O.jsx)(`code`,{children:`usine.yaml`}),`.`]})]})]}),(0,O.jsx)(u,{title:`Selector`,children:e.selector===null?(0,O.jsx)(`p`,{className:`text-muted-foreground`,children:`No selector: every registered repository`}):(0,O.jsx)(c,{entries:j(e.selector)})}),(0,O.jsx)(u,{title:`Prompt`,aside:r===0?`Same text for every run`:`${a(r,`outlined expression`)} filled in from each item`,children:(0,O.jsx)(l,{template:e.prompt})})]})]})},N=({name:e,configuration:t,pause:n})=>{let i=t.loops.find(t=>t.name===e);if(i!==void 0)return(0,O.jsx)(p,{entity:f(`loop`,e),title:i.name,marks:(0,O.jsx)(b,{paused:i.paused}),file:i.file,actions:n!==null&&(0,O.jsx)(y,{loop:i,pause:n,variant:`outline`}),children:(0,O.jsx)(M,{loop:i,configuration:t,pause:n})});let a=t.quarantinedLoops.find(t=>t.name===e);return a===void 0?(0,O.jsx)(p,{entity:f(`loop`,e),title:e,children:(0,O.jsxs)(d,{title:`Loop not found`,children:[`The configuration has no file `,(0,O.jsxs)(`code`,{children:[`loops/`,e,`.md`]}),`.`,` `,(0,O.jsx)(_,{to:`/configuration/loops`,className:`text-primary hover:underline`,children:`See all loops`}),`.`]})}):(0,O.jsx)(p,{entity:f(`loop`,e),title:a.name,marks:(0,O.jsx)(r,{}),file:a.file,children:(0,O.jsx)(E,{error:a.error,consequence:`No runs until the file loads.`})})},P=()=>{let{loop:e}=T.useParams(),{data:t}=g(S());return(0,O.jsx)(N,{name:e,configuration:t,pause:w()})};export{P as component};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{I as t,a as n,i as r,n as i,r as a,s as o,st as s,t as c,u as l}from"./section-DOT3oY3x.js";import{t as u}from"./useSuspenseQuery-ajaZl96Y.js";import{t as d}from"./link-3oQYoIpm.js";import{n as f}from"./queries-qu-pAHiz.js";import{Dt as p,a as m}from"./index-C_emtD3X.js";import{t as h}from"./label-badge-DC_gSG2U.js";var g=e(),_=({label:e})=>e.failure===null?e.onGitHub===!1?(0,g.jsxs)(`span`,{className:`text-destructive`,children:[`Missing on GitHub`,e.declared?`, created at the next poll`:``]}):null:(0,g.jsx)(`span`,{className:`text-destructive`,children:e.failure.message}),v=({repository:e,project:i})=>(0,g.jsxs)(n,{children:[(0,g.jsx)(r,{label:t.project,children:i===void 0?(0,g.jsx)(l,{children:t.unassignedProject}):(0,g.jsx)(d,{to:`/configuration/projects/$project`,params:{project:i.id},className:`text-primary hover:underline`,children:i.name})}),i!==void 0&&(0,g.jsx)(r,{label:`Board`,children:(0,g.jsx)(d,{to:`/projects/$project`,params:{project:i.id},className:`text-primary hover:underline`,children:t.board})}),(0,g.jsx)(r,{label:`Tags`,children:e.tags.length===0?(0,g.jsx)(l,{children:`None`}):e.tags.join(`, `)}),(0,g.jsx)(r,{label:`Loops`,children:e.loops.length===0?(0,g.jsx)(l,{children:`Not selected by any loop`}):(0,g.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:e.loops.map(e=>(0,g.jsx)(`li`,{children:(0,g.jsx)(d,{to:`/configuration/loops/$loop`,params:{loop:e},className:`text-primary hover:underline`,children:e})},e))})})]}),y=({owner:e,name:t,configuration:n})=>{let r=`${e}/${t}`,u=n.repositories.find(e=>e.name.toLowerCase()===r.toLowerCase());return u===void 0?(0,g.jsx)(c,{entity:s(`repository`,r),title:r,children:(0,g.jsxs)(o,{title:`Repository not registered`,children:[r,` is not under `,(0,g.jsx)(`code`,{children:`repos`}),` in `,(0,g.jsx)(`code`,{children:`usine.yaml`}),`.`,` `,(0,g.jsx)(d,{to:`/configuration/repositories`,className:`text-primary hover:underline`,children:`See all repositories`}),`.`]})}):(0,g.jsx)(c,{entity:s(`repository`,u.name),title:u.name,leading:(0,g.jsx)(p,{repository:u.name,size:`title`}),children:(0,g.jsx)(i,{facts:(0,g.jsx)(v,{repository:u,project:n.projects.find(e=>e.includes(u.name))}),children:(0,g.jsx)(a,{title:`Labels usine creates`,aside:`From labels in usine.yaml`,children:u.declaredLabels.length===0?(0,g.jsxs)(`p`,{className:`text-muted-foreground`,children:[`No labels under `,(0,g.jsx)(`code`,{children:`labels`}),` in `,(0,g.jsx)(`code`,{children:`usine.yaml`}),`.`]}):(0,g.jsx)(`ul`,{className:`flex flex-col gap-2`,children:u.declaredLabels.map(e=>(0,g.jsxs)(`li`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,g.jsx)(h,{name:e.name,label:e}),(0,g.jsx)(`span`,{className:`text-xs`,children:e.onGitHub===!0&&e.failure===null?(0,g.jsx)(l,{children:`On GitHub`}):(0,g.jsx)(_,{label:e})})]},e.name))})})})})},b=()=>{let{owner:e,name:t}=m.useParams(),{data:n}=u(f());return(0,g.jsx)(y,{owner:e,name:t,configuration:n})};export{b as component};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{I as t,a as n,i as r,n as i,r as a,s as o,st as s,t as c,u as l}from"./section-5JEIJP9Q.js";import{t as u}from"./useSuspenseQuery-ajaZl96Y.js";import{t as d}from"./link-3oQYoIpm.js";import{n as f}from"./queries-BCGlJZOP.js";import{Dt as p,a as m}from"./index-DUgI_VkE.js";import{t as h}from"./label-badge-Ct7F8sHj.js";var g=e(),_=({label:e})=>e.failure===null?e.onGitHub===!1?(0,g.jsxs)(`span`,{className:`text-destructive`,children:[`Missing on GitHub`,e.declared?`, created at the next poll`:``]}):null:(0,g.jsx)(`span`,{className:`text-destructive`,children:e.failure.message}),v=({repository:e,project:i})=>(0,g.jsxs)(n,{children:[(0,g.jsx)(r,{label:t.project,children:i===void 0?(0,g.jsx)(l,{children:t.unassignedProject}):(0,g.jsx)(d,{to:`/configuration/projects/$project`,params:{project:i.id},className:`text-primary hover:underline`,children:i.name})}),i!==void 0&&(0,g.jsx)(r,{label:`Board`,children:(0,g.jsx)(d,{to:`/projects/$project`,params:{project:i.id},className:`text-primary hover:underline`,children:t.board})}),(0,g.jsx)(r,{label:`Tags`,children:e.tags.length===0?(0,g.jsx)(l,{children:`None`}):e.tags.join(`, `)}),(0,g.jsx)(r,{label:`Loops`,children:e.loops.length===0?(0,g.jsx)(l,{children:`Not selected by any loop`}):(0,g.jsx)(`ul`,{className:`flex flex-col gap-0.5`,children:e.loops.map(e=>(0,g.jsx)(`li`,{children:(0,g.jsx)(d,{to:`/configuration/loops/$loop`,params:{loop:e},className:`text-primary hover:underline`,children:e})},e))})})]}),y=({owner:e,name:t,configuration:n})=>{let r=`${e}/${t}`,u=n.repositories.find(e=>e.name.toLowerCase()===r.toLowerCase());return u===void 0?(0,g.jsx)(c,{entity:s(`repository`,r),title:r,children:(0,g.jsxs)(o,{title:`Repository not registered`,children:[r,` is not under `,(0,g.jsx)(`code`,{children:`repos`}),` in `,(0,g.jsx)(`code`,{children:`usine.yaml`}),`.`,` `,(0,g.jsx)(d,{to:`/configuration/repositories`,className:`text-primary hover:underline`,children:`See all repositories`}),`.`]})}):(0,g.jsx)(c,{entity:s(`repository`,u.name),title:u.name,leading:(0,g.jsx)(p,{repository:u.name,size:`title`}),children:(0,g.jsx)(i,{facts:(0,g.jsx)(v,{repository:u,project:n.projects.find(e=>e.includes(u.name))}),children:(0,g.jsx)(a,{title:`Labels usine creates`,aside:`From labels in usine.yaml`,children:u.declaredLabels.length===0?(0,g.jsxs)(`p`,{className:`text-muted-foreground`,children:[`No labels under `,(0,g.jsx)(`code`,{children:`labels`}),` in `,(0,g.jsx)(`code`,{children:`usine.yaml`}),`.`]}):(0,g.jsx)(`ul`,{className:`flex flex-col gap-2`,children:u.declaredLabels.map(e=>(0,g.jsxs)(`li`,{className:`flex flex-wrap items-center gap-x-2 gap-y-1`,children:[(0,g.jsx)(h,{name:e.name,label:e}),(0,g.jsx)(`span`,{className:`text-xs`,children:e.onGitHub===!0&&e.failure===null?(0,g.jsx)(l,{children:`On GitHub`}):(0,g.jsx)(_,{label:e})})]},e.name))})})})})},b=()=>{let{owner:e,name:t}=m.useParams(),{data:n}=u(f());return(0,g.jsx)(y,{owner:e,name:t,configuration:n})};export{b as component};
@@ -0,0 +1 @@
1
+ import{t as e}from"./route-status-CRkUsWbT.js";var t=e;export{t as errorComponent};
@@ -1 +1 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{t as r}from"./useSuspenseQuery-ajaZl96Y.js";import{n as i,t as a}from"./useNavigate-I5E4IRt2.js";import{t as o}from"./link-3oQYoIpm.js";import{Fn as s,Gn as c,Hn as l,Mn as u,Pn as d,a as f}from"./api-em6k9a2t.js";import{c as p,s as m,x as h}from"./strings-BqjRDV62.js";import{A as g,B as ee,H as te,R as _,V as v,i as y,j as ne,n as re,r as b,z as x}from"./overview-B6WVtEU1.js";import{c as ie,l as ae,n as oe,s as se,t as ce}from"./moves-C8LmlI9G.js";import{r as le}from"./native-select-DapSbf49.js";import{A as S,t as C}from"./button-73ghQ8AF.js";import{l as ue,s as de}from"./useTriggerFocusGuards-6__LUK4p.js";import{t as w}from"./error-alert-CtUHST2S.js";import{i as T}from"./context-8jHKzDOY.js";import{r as fe,t as E}from"./mark-D4e5SjpF.js";import{a as D,n as pe,r as me}from"./page-SCXRVE8o.js";import{$ as he,Et as ge,St as O,Tt as k,at as _e,ct as ve,dn as A,et as j,gt as M,ht as N,in as P,it as F,lt as ye,mt as I,n as be,nn as xe,nt as Se,ot as Ce,pt as L,rt as we,st as Te,t as Ee,tt as De,ut as Oe}from"./index-C_emtD3X.js";import{t as ke}from"./pull-request-marks-CwgQU6BU.js";import{n as R,t as Ae}from"./status-badge-PZxds9pW.js";import{n as je,t as Me}from"./edit-and-retry-vdw4SJW2.js";import{a as Ne,i as z,n as B,o as V,r as H,t as U}from"./table-iibRgprN.js";import{t as W}from"./fill-cell-CdlZ2qES.js";import{t as Pe}from"./label-badge-DC_gSG2U.js";import{a as Fe,n as Ie,t as Le}from"./model-3iMuy1GK.js";import{n as Re,t as ze}from"./run-again-DoVMI2-M.js";import{a as Be,i as G,n as K,r as q,t as J}from"./section-BzCcACXc.js";import{t as Ve}from"./not-found-BQmVi3gG.js";var Y=n(),He=e=>e.postedAt===null?e.attemptEndedAt===null?null:{at:e.attemptEndedAt,title:`Posted during the attempt that ended ${h(e.attemptEndedAt)}`}:{at:e.postedAt,title:`Posted ${h(e.postedAt)}`},Ue=({task:e})=>{let t=k(),n=new Map(e.runs.map(e=>[e.id,e])),r=new Map(e.items.map(e=>[e.itemKey,e]));return(0,Y.jsxs)(`section`,{"aria-labelledby":`task-comments`,className:`flex flex-col gap-2`,children:[(0,Y.jsx)(K,{id:`task-comments`,title:`Comments and reviews`,count:e.comments.length}),e.comments.length===0?(0,Y.jsx)(J,{title:`No comments or reviews`,children:`Comments and reviews an agent posts on the task's items appear here after the attempt ends`}):(0,Y.jsx)(`div`,{className:`-mx-2`,children:(0,Y.jsx)(U,{"aria-labelledby":`task-comments`,children:(0,Y.jsx)(B,{className:`border-t`,children:e.comments.map(e=>{let i=n.get(e.runId),a=i===void 0?void 0:r.get(i.itemKey),s=He(e);return(0,Y.jsxs)(V,{className:q,children:[(0,Y.jsx)(W,{className:`py-3 whitespace-normal`,children:(0,Y.jsxs)(`a`,{"data-row-link":!0,href:e.url,target:`_blank`,rel:`noreferrer`,className:`font-medium ${G}`,children:[Ie(e.kind),a!==void 0&&(0,Y.jsxs)(`span`,{className:`ml-2 text-xs font-normal text-muted-foreground`,children:[`on `,(0,Y.jsx)(E,{item:a,linked:!1})]})]})}),(0,Y.jsx)(H,{className:`py-3`,children:i!==void 0&&(0,Y.jsx)(o,{...t.run(i.repository,i.id),className:`relative z-10 rounded-sm text-muted-foreground underline-offset-4 outline-none hover:text-foreground hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring/70 focus-visible:outline-solid`,children:i.loop})}),(0,Y.jsx)(H,{className:`py-3 text-right`,children:s!==null&&(0,Y.jsx)(`time`,{dateTime:s.at,title:s.title,className:`font-mono text-xs text-muted-foreground tabular-nums`,children:m(s.at)})})]},e.url)})})})})]})},We=({task:e,project:t,disabled:n})=>{let r=ce(t),[i]=e.items,a=e.items.find(({itemKey:t})=>t===e.current)??i,o=t.board.lanes.flatMap(e=>e.items.map(t=>({lane:e,card:t}))).find(({card:t})=>t.itemKey===e.current),s=o===void 0?void 0:r.moves.find(({itemKey:e})=>e===o.card.itemKey),l=o===void 0?[]:t.board.lanes.filter(e=>e._tag===`WritableBoardLane`&&e.id!==o.lane.id),u=t.board.lanes.find(({id:e})=>e===s?.toLane)?.name??o?.lane.name??e.lane.name,d=new Set(t.board.lanes.flatMap(e=>e._tag===`WritableBoardLane`?e.labels:[])),f=o===void 0?a.labels:oe(o.card,o.lane).filter(e=>s===void 0||!d.has(e)),p=new Map(t.labels.map(e=>[e.name,e])),m=!n&&!r.isPending&&s===void 0&&l.length>0;T(o!==void 0&&m?l.map(e=>({label:ie(e.name),run:()=>r.moveItem(o.card,e)})):[]);let{origin:h,pullRequests:g}=ue(e.items);return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Y.jsx)(me,{actionsBeside:`sm`,heading:(0,Y.jsx)(ge,{variant:`page`,item:c(h),title:e.title}),facts:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(ke,{pullRequests:g}),(0,Y.jsx)(pe,{icon:xe,title:`Lane`,children:(0,Y.jsx)(`span`,{className:`text-foreground`,children:u})}),s!==void 0&&(0,Y.jsx)(`span`,{role:`status`,children:se(s.phase)}),f.length>0&&(0,Y.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:f.map(e=>(0,Y.jsx)(Pe,{name:e,label:p.get(e)},e))}),e.needsYou&&(0,Y.jsx)(Ae,{})]}),...o!==void 0&&m?{actions:(0,Y.jsxs)(L,{children:[(0,Y.jsxs)(O,{render:(0,Y.jsx)(C,{variant:`outline`}),"aria-label":`Move ${fe(a)} to another lane`,children:[`Move to`,(0,Y.jsx)(le,{"data-icon":`inline-end`,"aria-hidden":`true`})]}),(0,Y.jsx)(I,{align:`end`,className:`w-auto min-w-40`,children:(0,Y.jsx)(N,{children:l.map(e=>(0,Y.jsx)(M,{onClick:()=>r.moveItem(o.card,e),children:e.name},e.id))})})]})}:{}}),r.error!==null&&(0,Y.jsx)(w,{className:`max-w-3xl`,message:r.error.message})]})},Ge=({task:e})=>{let t=e.items.filter(({kind:e})=>e===`pr`);return(0,Y.jsxs)(`section`,{"aria-labelledby":`task-pull-requests`,className:`flex flex-col gap-2`,children:[(0,Y.jsx)(K,{id:`task-pull-requests`,title:`Pull requests`,count:t.length}),t.length===0?(0,Y.jsx)(J,{title:`No pull requests`,children:`Pull requests that close the issue, or that a run on the issue opened, appear here`}):(0,Y.jsx)(`div`,{className:`-mx-2`,children:(0,Y.jsx)(U,{"aria-labelledby":`task-pull-requests`,children:(0,Y.jsx)(B,{className:`border-t`,children:t.map(e=>(0,Y.jsxs)(V,{className:q,children:[(0,Y.jsx)(H,{className:`w-0 py-3`,children:(0,Y.jsx)(E,{item:e,linked:!1})}),(0,Y.jsx)(W,{className:`py-3 whitespace-normal`,children:(0,Y.jsxs)(`a`,{"data-row-link":!0,href:e.url,target:`_blank`,rel:`noreferrer`,className:`font-medium wrap-anywhere ${G}`,children:[e.title,(0,Y.jsx)(ae,{className:`ml-1.5 inline size-3.5 text-muted-foreground`,"aria-label":`Opens on GitHub`})]})}),(0,Y.jsx)(H,{className:`py-3 text-right`,children:e.conflicting&&(0,Y.jsx)(`span`,{className:`text-xs text-destructive`,children:`Conflicts with base`})})]},e.itemKey))})})})]})},X=e(t(),1),Z=({run:e})=>{let t=D(3e4);return l(Le(e,t),{onNone:()=>null,onSome:e=>(0,Y.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,title:`Total attempt time`,children:p(e)})})},Ke=({run:e})=>l(Fe(e),{onNone:()=>null,onSome:e=>(0,Y.jsxs)(`p`,{className:`line-clamp-2 text-xs wrap-anywhere`,title:g(e),children:[(0,Y.jsx)(`span`,{className:`font-medium text-destructive`,children:ne(e)}),` `,(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:g(e)})]})}),Q=({run:e})=>(0,Y.jsx)(`time`,{dateTime:e.openedAt,title:`Opened ${h(e.openedAt)}`,className:`font-mono text-xs whitespace-nowrap tabular-nums`,children:m(e.openedAt)}),$=({pullRequest:e})=>l(e,{onNone:()=>null,onSome:e=>(0,Y.jsx)(E,{item:e,className:`relative z-10`})}),qe=(e,t)=>`${e} ${t}${e===1?``:`s`}`,Je=({run:e,pullRequest:t})=>(0,Y.jsxs)(`p`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-0.5 text-xs text-muted-foreground xl:hidden`,children:[(0,Y.jsx)(`span`,{className:`font-medium text-foreground sm:hidden`,children:e.state}),(0,Y.jsx)(`span`,{children:e.agent}),(0,Y.jsx)(`span`,{children:qe(e.attempts.length,`attempt`)}),(0,Y.jsx)(Z,{run:e}),(0,Y.jsx)(Q,{run:e}),(0,Y.jsx)($,{pullRequest:t})]}),Ye=e=>e.canApprove?`approve`:e.canRetry&&e.canResolveFailure?`retry`:null,Xe=({run:e,onEdit:t,openRun:n,status:r})=>{let i=A(e.repository),a=j(),o=De(),[s,c]=(0,X.useState)(!1),l=t=>a.mutate({runId:e.id,request:t},{onSuccess:()=>r(null),onError:e=>r((0,Y.jsx)(`span`,{className:`text-destructive`,children:e.message}))}),u=()=>o.mutate(he(e),{onSuccess:e=>{e._tag===`Claimed`?(r(null),n(e.runId)):r((0,Y.jsx)(`span`,{className:`text-needs-you`,children:v}))},onError:e=>r((0,Y.jsx)(`span`,{className:`text-destructive`,children:e.message}))}),d=e.attempts.at(-1),f=Ye(e),p=d?.outcome?._tag===`Failed`&&d.outcome.failure._tag===`QuestionFailure`,h=[];return e.canApprove&&f!==`approve`&&h.push({label:x.approve,select:()=>l({action:`approve`})}),e.canRetry&&f!==`retry`&&h.push({label:x.retry,description:_(e.agentBrain),select:()=>l({action:`retry`})}),e.canRetry&&h.push({label:`Edit and retry`,select:()=>t(`retry`)}),e.canRunAgain&&(h.push({label:x.runAgain,select:u}),h.push({label:`Edit and run again`,select:()=>t(`runAgain`)})),e.canResolveFailure&&d!==void 0&&h.push({label:p?`Mark answered`:`Mark resolved`,select:()=>l({action:`resolveFailure`,attemptId:d.id})}),e.canCancel&&h.push({label:x.cancel,destructive:!0,select:()=>c(!0)}),T(!i||a.isPending||o.isPending||s?[]:[...f===null?[]:[{label:x[f],select:()=>l({action:f})}],...h].map(({label:t,select:n})=>({label:`${t} · ${e.loop} · ${e.id.slice(0,8)}`,run:n}))),i?a.isPending&&a.variables!==void 0?(0,Y.jsx)(`span`,{role:`status`,className:`text-xs text-muted-foreground`,children:ee[a.variables.request.action]}):o.isPending?(0,Y.jsx)(`span`,{role:`status`,className:`text-xs text-muted-foreground`,children:te}):(0,Y.jsxs)(`div`,{className:`relative z-10 flex items-center justify-end gap-1`,children:[f!==null&&(0,Y.jsx)(C,{variant:`outline`,size:`sm`,title:f===`retry`?_(e.agentBrain):void 0,onClick:()=>l({action:f}),children:x[f]}),h.length>0&&(0,Y.jsxs)(L,{children:[(0,Y.jsx)(O,{render:(0,Y.jsx)(C,{variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground hover:text-foreground aria-expanded:text-foreground`}),"aria-label":`Actions for the ${e.loop} run opened ${m(e.openedAt)}`,children:(0,Y.jsx)(P,{weight:`bold`,className:`size-4`,"aria-hidden":`true`})}),(0,Y.jsx)(I,{align:`end`,className:`w-auto min-w-44`,children:(0,Y.jsx)(N,{children:h.map(({label:e,description:t,destructive:n,select:r})=>(0,Y.jsx)(M,{title:t,variant:n===!0?`destructive`:`default`,onClick:r,children:e},e))})})]}),e.canCancel&&(0,Y.jsx)(we,{open:s,onOpenChange:c,children:(0,Y.jsxs)(Ce,{children:[(0,Y.jsxs)(ye,{children:[(0,Y.jsxs)(Oe,{children:[`Cancel `,e.loop,`?`]}),(0,Y.jsx)(Te,{children:`The run stops, including any attempt in progress.`})]}),(0,Y.jsxs)(ve,{children:[(0,Y.jsx)(_e,{children:x.keepRunning}),(0,Y.jsx)(F,{variant:`destructive`,onClick:()=>{c(!1),l({action:`cancel`})},children:x.confirmCancel})]})]})})]}):null},Ze=8,Qe=({run:e,item:t,pullRequest:n,openRun:r})=>{let i=k(),[a,s]=(0,X.useState)(null),[c,l]=(0,X.useState)(null);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(V,{className:S(q,`[&>td]:align-top`),children:[(0,Y.jsx)(H,{className:`hidden py-3 sm:table-cell`,children:(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-2 text-foreground`,children:[(0,Y.jsx)(R,{state:e.state,className:`ml-0.75`}),e.state]})}),(0,Y.jsx)(W,{className:`py-3 whitespace-normal`,children:(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Y.jsxs)(`p`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,Y.jsx)(R,{state:e.state,className:`ml-0.75 self-center sm:hidden`}),(0,Y.jsx)(o,{"data-row-link":!0,...i.run(e.repository,e.id),className:S(`font-medium wrap-anywhere`,G),children:e.loop}),t!==null&&(0,Y.jsx)(E,{item:t,className:`relative z-10 shrink-0`})]}),(0,Y.jsx)(Ke,{run:e}),e.runAgain!==null&&(0,Y.jsx)(ze,{run:e,source:`link`,className:`text-xs`}),e.approval!==null&&(0,Y.jsx)(Re,{approval:e.approval,className:`text-xs`}),(0,Y.jsx)(Je,{run:e,pullRequest:n}),c!==null&&(0,Y.jsx)(`p`,{role:`status`,className:`text-xs`,children:c})]})}),(0,Y.jsx)(H,{className:`hidden py-3 xl:table-cell`,children:e.agent}),(0,Y.jsx)(H,{className:`hidden py-3 text-right tabular-nums xl:table-cell`,children:e.attempts.length}),(0,Y.jsx)(H,{className:`hidden py-3 text-right xl:table-cell`,children:(0,Y.jsx)(Z,{run:e})}),(0,Y.jsx)(H,{className:`hidden py-3 xl:table-cell`,children:(0,Y.jsx)(Q,{run:e})}),(0,Y.jsx)(H,{className:`hidden py-3 xl:table-cell`,children:(0,Y.jsx)($,{pullRequest:n})}),(0,Y.jsx)(H,{className:`py-2.5`,children:(0,Y.jsx)(Xe,{run:e,onEdit:s,openRun:r,status:l})})]}),a!==null&&je(e,a)&&(0,Y.jsx)(V,{className:`hover:bg-transparent`,children:(0,Y.jsx)(H,{colSpan:Ze,className:`px-2 pt-1 pb-4 whitespace-normal`,children:(0,Y.jsx)(Me,{run:e,intent:a,close:()=>s(null),openRun:r,className:`max-w-2xl rounded-lg border p-4`},`${e.id}:${a}`)})})]})},$e=({task:e,openRun:t})=>{let n=new Map(e.items.map(e=>[e.itemKey,e])),r=e.items.length>1;return(0,Y.jsxs)(`section`,{"aria-labelledby":`task-runs`,className:`flex flex-col gap-2`,children:[(0,Y.jsx)(K,{id:`task-runs`,title:`Runs`,count:e.runs.length}),e.runs.length===0?(0,Y.jsx)(J,{title:`No runs yet`,children:`A run opens when a loop's trigger matches one of the task's items`}):(0,Y.jsx)(`div`,{className:`-mx-2`,children:(0,Y.jsxs)(U,{children:[(0,Y.jsx)(Ne,{children:(0,Y.jsxs)(V,{className:`hover:bg-transparent`,children:[(0,Y.jsx)(z,{className:`hidden sm:table-cell`,children:`State`}),(0,Y.jsx)(z,{children:`Run`}),(0,Y.jsx)(z,{className:`hidden xl:table-cell`,children:`Agent`}),(0,Y.jsx)(z,{className:`hidden text-right xl:table-cell`,children:`Attempts`}),(0,Y.jsx)(z,{className:`hidden text-right xl:table-cell`,children:`Duration`}),(0,Y.jsx)(z,{className:`hidden xl:table-cell`,children:`Opened`}),(0,Y.jsx)(z,{className:`hidden xl:table-cell`,children:`Pull request`}),(0,Y.jsx)(z,{children:(0,Y.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,Y.jsx)(B,{children:e.runs.map(i=>{let a=d(s(i.pullRequestUrl),t=>de(t,e.items)),o=r?n.get(i.itemKey)??null:null;return(0,Y.jsx)(Qe,{run:i,item:o===null||u(a,({number:e})=>e===o.number)?null:o,pullRequest:a,openRun:t},i.id)})})]})})]})},et=({children:e})=>(0,Y.jsx)(`main`,{className:`px-4 pt-5 pb-10 md:px-5`,children:(0,Y.jsx)(`div`,{className:`flex max-w-5xl flex-col gap-8`,children:e})}),tt=({repository:e,number:t})=>{let{data:n}=r(re()),o=b(n.projects,e),s=i(),c=Se(),l=r(be(e,t));if(l.error instanceof f&&l.error.error===`BoardItemNotFoundError`)return(0,Y.jsx)(Ve,{repository:e,number:String(t)});let u=l.isError&&(0,Y.jsx)(w,{className:`max-w-3xl`,title:`Could not refresh the task`,message:l.error.message}),d=l.data;return d.number!==t&&o!==void 0?(0,Y.jsx)(a,{to:`/projects/$project/tasks/$number`,params:{project:y(o),number:String(d.number)},search:t=>({...t,repository:e}),replace:!0}):(0,Y.jsxs)(et,{children:[o!==void 0&&o.repositories.length>1&&(0,Y.jsx)(Be,{repositories:o.repositories,value:e,onChange:e=>void s({to:`/projects/$project/tasks`,params:{project:y(o)},search:{repository:e}})}),u,o!==void 0&&(0,Y.jsx)(We,{task:d,project:o,disabled:n._tag===`NeedsSetup`}),(0,Y.jsx)($e,{task:d,openRun:c}),(0,Y.jsx)(Ge,{task:d}),(0,Y.jsx)(Ue,{task:d})]})},nt=()=>{let{repository:e,number:t}=Ee.useLoaderData();return(0,Y.jsx)(tt,{repository:e,number:t},`${e}#${t}`)};export{nt as component};
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{t as r}from"./useSuspenseQuery-ajaZl96Y.js";import{n as i,t as a}from"./useNavigate-I5E4IRt2.js";import{t as o}from"./link-3oQYoIpm.js";import{Fn as s,Gn as c,Hn as l,Mn as u,Pn as d,a as f}from"./api-C-F05axZ.js";import{c as p,s as m,x as h}from"./strings-BqjRDV62.js";import{A as g,B as ee,H as te,R as _,V as v,i as y,j as ne,n as re,r as b,z as x}from"./overview-CepWZt0q.js";import{c as ie,l as ae,n as oe,s as se,t as ce}from"./moves-DvXvTqPv.js";import{r as le}from"./native-select-DapSbf49.js";import{A as S,t as C}from"./button-73ghQ8AF.js";import{l as ue,s as de}from"./useTriggerFocusGuards-tBHNKdun.js";import{t as w}from"./error-alert-CtUHST2S.js";import{i as T}from"./context-8jHKzDOY.js";import{r as fe,t as E}from"./mark-D4e5SjpF.js";import{a as D,n as pe,r as me}from"./page-mSAm7lAb.js";import{$ as he,Et as ge,St as O,Tt as k,at as _e,ct as ve,dn as A,et as j,gt as M,ht as N,in as P,it as F,lt as ye,mt as I,n as be,nn as xe,nt as Se,ot as Ce,pt as L,rt as we,st as Te,t as Ee,tt as De,ut as Oe}from"./index-DUgI_VkE.js";import{t as ke}from"./pull-request-marks-CwgQU6BU.js";import{n as R,t as Ae}from"./status-badge-PZxds9pW.js";import{n as je,t as Me}from"./edit-and-retry-ECmelXtL.js";import{a as Ne,i as z,n as B,o as V,r as H,t as U}from"./table-iibRgprN.js";import{t as W}from"./fill-cell-CdlZ2qES.js";import{t as Pe}from"./label-badge-Ct7F8sHj.js";import{a as Fe,n as Ie,t as Le}from"./model-DoNfSmpn.js";import{n as Re,t as ze}from"./run-again-CZ3sFwrA.js";import{a as Be,i as G,n as K,r as q,t as J}from"./section-D_K-jp9U.js";import{t as Ve}from"./not-found-B0p_Ar0N.js";var Y=n(),He=e=>e.postedAt===null?e.attemptEndedAt===null?null:{at:e.attemptEndedAt,title:`Posted during the attempt that ended ${h(e.attemptEndedAt)}`}:{at:e.postedAt,title:`Posted ${h(e.postedAt)}`},Ue=({task:e})=>{let t=k(),n=new Map(e.runs.map(e=>[e.id,e])),r=new Map(e.items.map(e=>[e.itemKey,e]));return(0,Y.jsxs)(`section`,{"aria-labelledby":`task-comments`,className:`flex flex-col gap-2`,children:[(0,Y.jsx)(K,{id:`task-comments`,title:`Comments and reviews`,count:e.comments.length}),e.comments.length===0?(0,Y.jsx)(J,{title:`No comments or reviews`,children:`Comments and reviews an agent posts on the task's items appear here after the attempt ends`}):(0,Y.jsx)(`div`,{className:`-mx-2`,children:(0,Y.jsx)(U,{"aria-labelledby":`task-comments`,children:(0,Y.jsx)(B,{className:`border-t`,children:e.comments.map(e=>{let i=n.get(e.runId),a=i===void 0?void 0:r.get(i.itemKey),s=He(e);return(0,Y.jsxs)(V,{className:q,children:[(0,Y.jsx)(W,{className:`py-3 whitespace-normal`,children:(0,Y.jsxs)(`a`,{"data-row-link":!0,href:e.url,target:`_blank`,rel:`noreferrer`,className:`font-medium ${G}`,children:[Ie(e.kind),a!==void 0&&(0,Y.jsxs)(`span`,{className:`ml-2 text-xs font-normal text-muted-foreground`,children:[`on `,(0,Y.jsx)(E,{item:a,linked:!1})]})]})}),(0,Y.jsx)(H,{className:`py-3`,children:i!==void 0&&(0,Y.jsx)(o,{...t.run(i.repository,i.id),className:`relative z-10 rounded-sm text-muted-foreground underline-offset-4 outline-none hover:text-foreground hover:underline focus-visible:outline-2 focus-visible:outline-offset-2 focus-visible:outline-ring/70 focus-visible:outline-solid`,children:i.loop})}),(0,Y.jsx)(H,{className:`py-3 text-right`,children:s!==null&&(0,Y.jsx)(`time`,{dateTime:s.at,title:s.title,className:`font-mono text-xs text-muted-foreground tabular-nums`,children:m(s.at)})})]},e.url)})})})})]})},We=({task:e,project:t,disabled:n})=>{let r=ce(t),[i]=e.items,a=e.items.find(({itemKey:t})=>t===e.current)??i,o=t.board.lanes.flatMap(e=>e.items.map(t=>({lane:e,card:t}))).find(({card:t})=>t.itemKey===e.current),s=o===void 0?void 0:r.moves.find(({itemKey:e})=>e===o.card.itemKey),l=o===void 0?[]:t.board.lanes.filter(e=>e._tag===`WritableBoardLane`&&e.id!==o.lane.id),u=t.board.lanes.find(({id:e})=>e===s?.toLane)?.name??o?.lane.name??e.lane.name,d=new Set(t.board.lanes.flatMap(e=>e._tag===`WritableBoardLane`?e.labels:[])),f=o===void 0?a.labels:oe(o.card,o.lane).filter(e=>s===void 0||!d.has(e)),p=new Map(t.labels.map(e=>[e.name,e])),m=!n&&!r.isPending&&s===void 0&&l.length>0;T(o!==void 0&&m?l.map(e=>({label:ie(e.name),run:()=>r.moveItem(o.card,e)})):[]);let{origin:h,pullRequests:g}=ue(e.items);return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Y.jsx)(me,{actionsBeside:`sm`,heading:(0,Y.jsx)(ge,{variant:`page`,item:c(h),title:e.title}),facts:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(ke,{pullRequests:g}),(0,Y.jsx)(pe,{icon:xe,title:`Lane`,children:(0,Y.jsx)(`span`,{className:`text-foreground`,children:u})}),s!==void 0&&(0,Y.jsx)(`span`,{role:`status`,children:se(s.phase)}),f.length>0&&(0,Y.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:f.map(e=>(0,Y.jsx)(Pe,{name:e,label:p.get(e)},e))}),e.needsYou&&(0,Y.jsx)(Ae,{})]}),...o!==void 0&&m?{actions:(0,Y.jsxs)(L,{children:[(0,Y.jsxs)(O,{render:(0,Y.jsx)(C,{variant:`outline`}),"aria-label":`Move ${fe(a)} to another lane`,children:[`Move to`,(0,Y.jsx)(le,{"data-icon":`inline-end`,"aria-hidden":`true`})]}),(0,Y.jsx)(I,{align:`end`,className:`w-auto min-w-40`,children:(0,Y.jsx)(N,{children:l.map(e=>(0,Y.jsx)(M,{onClick:()=>r.moveItem(o.card,e),children:e.name},e.id))})})]})}:{}}),r.error!==null&&(0,Y.jsx)(w,{className:`max-w-3xl`,message:r.error.message})]})},Ge=({task:e})=>{let t=e.items.filter(({kind:e})=>e===`pr`);return(0,Y.jsxs)(`section`,{"aria-labelledby":`task-pull-requests`,className:`flex flex-col gap-2`,children:[(0,Y.jsx)(K,{id:`task-pull-requests`,title:`Pull requests`,count:t.length}),t.length===0?(0,Y.jsx)(J,{title:`No pull requests`,children:`Pull requests that close the issue, or that a run on the issue opened, appear here`}):(0,Y.jsx)(`div`,{className:`-mx-2`,children:(0,Y.jsx)(U,{"aria-labelledby":`task-pull-requests`,children:(0,Y.jsx)(B,{className:`border-t`,children:t.map(e=>(0,Y.jsxs)(V,{className:q,children:[(0,Y.jsx)(H,{className:`w-0 py-3`,children:(0,Y.jsx)(E,{item:e,linked:!1})}),(0,Y.jsx)(W,{className:`py-3 whitespace-normal`,children:(0,Y.jsxs)(`a`,{"data-row-link":!0,href:e.url,target:`_blank`,rel:`noreferrer`,className:`font-medium wrap-anywhere ${G}`,children:[e.title,(0,Y.jsx)(ae,{className:`ml-1.5 inline size-3.5 text-muted-foreground`,"aria-label":`Opens on GitHub`})]})}),(0,Y.jsx)(H,{className:`py-3 text-right`,children:e.conflicting&&(0,Y.jsx)(`span`,{className:`text-xs text-destructive`,children:`Conflicts with base`})})]},e.itemKey))})})})]})},X=e(t(),1),Z=({run:e})=>{let t=D(3e4);return l(Le(e,t),{onNone:()=>null,onSome:e=>(0,Y.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,title:`Total attempt time`,children:p(e)})})},Ke=({run:e})=>l(Fe(e),{onNone:()=>null,onSome:e=>(0,Y.jsxs)(`p`,{className:`line-clamp-2 text-xs wrap-anywhere`,title:g(e),children:[(0,Y.jsx)(`span`,{className:`font-medium text-destructive`,children:ne(e)}),` `,(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:g(e)})]})}),Q=({run:e})=>(0,Y.jsx)(`time`,{dateTime:e.openedAt,title:`Opened ${h(e.openedAt)}`,className:`font-mono text-xs whitespace-nowrap tabular-nums`,children:m(e.openedAt)}),$=({pullRequest:e})=>l(e,{onNone:()=>null,onSome:e=>(0,Y.jsx)(E,{item:e,className:`relative z-10`})}),qe=(e,t)=>`${e} ${t}${e===1?``:`s`}`,Je=({run:e,pullRequest:t})=>(0,Y.jsxs)(`p`,{className:`flex flex-wrap items-baseline gap-x-3 gap-y-0.5 text-xs text-muted-foreground xl:hidden`,children:[(0,Y.jsx)(`span`,{className:`font-medium text-foreground sm:hidden`,children:e.state}),(0,Y.jsx)(`span`,{children:e.agent}),(0,Y.jsx)(`span`,{children:qe(e.attempts.length,`attempt`)}),(0,Y.jsx)(Z,{run:e}),(0,Y.jsx)(Q,{run:e}),(0,Y.jsx)($,{pullRequest:t})]}),Ye=e=>e.canApprove?`approve`:e.canRetry&&e.canResolveFailure?`retry`:null,Xe=({run:e,onEdit:t,openRun:n,status:r})=>{let i=A(e.repository),a=j(),o=De(),[s,c]=(0,X.useState)(!1),l=t=>a.mutate({runId:e.id,request:t},{onSuccess:()=>r(null),onError:e=>r((0,Y.jsx)(`span`,{className:`text-destructive`,children:e.message}))}),u=()=>o.mutate(he(e),{onSuccess:e=>{e._tag===`Claimed`?(r(null),n(e.runId)):r((0,Y.jsx)(`span`,{className:`text-needs-you`,children:v}))},onError:e=>r((0,Y.jsx)(`span`,{className:`text-destructive`,children:e.message}))}),d=e.attempts.at(-1),f=Ye(e),p=d?.outcome?._tag===`Failed`&&d.outcome.failure._tag===`QuestionFailure`,h=[];return e.canApprove&&f!==`approve`&&h.push({label:x.approve,select:()=>l({action:`approve`})}),e.canRetry&&f!==`retry`&&h.push({label:x.retry,description:_(e.agentBrain),select:()=>l({action:`retry`})}),e.canRetry&&h.push({label:`Edit and retry`,select:()=>t(`retry`)}),e.canRunAgain&&(h.push({label:x.runAgain,select:u}),h.push({label:`Edit and run again`,select:()=>t(`runAgain`)})),e.canResolveFailure&&d!==void 0&&h.push({label:p?`Mark answered`:`Mark resolved`,select:()=>l({action:`resolveFailure`,attemptId:d.id})}),e.canCancel&&h.push({label:x.cancel,destructive:!0,select:()=>c(!0)}),T(!i||a.isPending||o.isPending||s?[]:[...f===null?[]:[{label:x[f],select:()=>l({action:f})}],...h].map(({label:t,select:n})=>({label:`${t} · ${e.loop} · ${e.id.slice(0,8)}`,run:n}))),i?a.isPending&&a.variables!==void 0?(0,Y.jsx)(`span`,{role:`status`,className:`text-xs text-muted-foreground`,children:ee[a.variables.request.action]}):o.isPending?(0,Y.jsx)(`span`,{role:`status`,className:`text-xs text-muted-foreground`,children:te}):(0,Y.jsxs)(`div`,{className:`relative z-10 flex items-center justify-end gap-1`,children:[f!==null&&(0,Y.jsx)(C,{variant:`outline`,size:`sm`,title:f===`retry`?_(e.agentBrain):void 0,onClick:()=>l({action:f}),children:x[f]}),h.length>0&&(0,Y.jsxs)(L,{children:[(0,Y.jsx)(O,{render:(0,Y.jsx)(C,{variant:`ghost`,size:`icon-sm`,className:`text-muted-foreground hover:text-foreground aria-expanded:text-foreground`}),"aria-label":`Actions for the ${e.loop} run opened ${m(e.openedAt)}`,children:(0,Y.jsx)(P,{weight:`bold`,className:`size-4`,"aria-hidden":`true`})}),(0,Y.jsx)(I,{align:`end`,className:`w-auto min-w-44`,children:(0,Y.jsx)(N,{children:h.map(({label:e,description:t,destructive:n,select:r})=>(0,Y.jsx)(M,{title:t,variant:n===!0?`destructive`:`default`,onClick:r,children:e},e))})})]}),e.canCancel&&(0,Y.jsx)(we,{open:s,onOpenChange:c,children:(0,Y.jsxs)(Ce,{children:[(0,Y.jsxs)(ye,{children:[(0,Y.jsxs)(Oe,{children:[`Cancel `,e.loop,`?`]}),(0,Y.jsx)(Te,{children:`The run stops, including any attempt in progress.`})]}),(0,Y.jsxs)(ve,{children:[(0,Y.jsx)(_e,{children:x.keepRunning}),(0,Y.jsx)(F,{variant:`destructive`,onClick:()=>{c(!1),l({action:`cancel`})},children:x.confirmCancel})]})]})})]}):null},Ze=8,Qe=({run:e,item:t,pullRequest:n,openRun:r})=>{let i=k(),[a,s]=(0,X.useState)(null),[c,l]=(0,X.useState)(null);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(V,{className:S(q,`[&>td]:align-top`),children:[(0,Y.jsx)(H,{className:`hidden py-3 sm:table-cell`,children:(0,Y.jsxs)(`span`,{className:`inline-flex items-center gap-2 text-foreground`,children:[(0,Y.jsx)(R,{state:e.state,className:`ml-0.75`}),e.state]})}),(0,Y.jsx)(W,{className:`py-3 whitespace-normal`,children:(0,Y.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1`,children:[(0,Y.jsxs)(`p`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,Y.jsx)(R,{state:e.state,className:`ml-0.75 self-center sm:hidden`}),(0,Y.jsx)(o,{"data-row-link":!0,...i.run(e.repository,e.id),className:S(`font-medium wrap-anywhere`,G),children:e.loop}),t!==null&&(0,Y.jsx)(E,{item:t,className:`relative z-10 shrink-0`})]}),(0,Y.jsx)(Ke,{run:e}),e.runAgain!==null&&(0,Y.jsx)(ze,{run:e,source:`link`,className:`text-xs`}),e.approval!==null&&(0,Y.jsx)(Re,{approval:e.approval,className:`text-xs`}),(0,Y.jsx)(Je,{run:e,pullRequest:n}),c!==null&&(0,Y.jsx)(`p`,{role:`status`,className:`text-xs`,children:c})]})}),(0,Y.jsx)(H,{className:`hidden py-3 xl:table-cell`,children:e.agent}),(0,Y.jsx)(H,{className:`hidden py-3 text-right tabular-nums xl:table-cell`,children:e.attempts.length}),(0,Y.jsx)(H,{className:`hidden py-3 text-right xl:table-cell`,children:(0,Y.jsx)(Z,{run:e})}),(0,Y.jsx)(H,{className:`hidden py-3 xl:table-cell`,children:(0,Y.jsx)(Q,{run:e})}),(0,Y.jsx)(H,{className:`hidden py-3 xl:table-cell`,children:(0,Y.jsx)($,{pullRequest:n})}),(0,Y.jsx)(H,{className:`py-2.5`,children:(0,Y.jsx)(Xe,{run:e,onEdit:s,openRun:r,status:l})})]}),a!==null&&je(e,a)&&(0,Y.jsx)(V,{className:`hover:bg-transparent`,children:(0,Y.jsx)(H,{colSpan:Ze,className:`px-2 pt-1 pb-4 whitespace-normal`,children:(0,Y.jsx)(Me,{run:e,intent:a,close:()=>s(null),openRun:r,className:`max-w-2xl rounded-lg border p-4`},`${e.id}:${a}`)})})]})},$e=({task:e,openRun:t})=>{let n=new Map(e.items.map(e=>[e.itemKey,e])),r=e.items.length>1;return(0,Y.jsxs)(`section`,{"aria-labelledby":`task-runs`,className:`flex flex-col gap-2`,children:[(0,Y.jsx)(K,{id:`task-runs`,title:`Runs`,count:e.runs.length}),e.runs.length===0?(0,Y.jsx)(J,{title:`No runs yet`,children:`A run opens when a loop's trigger matches one of the task's items`}):(0,Y.jsx)(`div`,{className:`-mx-2`,children:(0,Y.jsxs)(U,{children:[(0,Y.jsx)(Ne,{children:(0,Y.jsxs)(V,{className:`hover:bg-transparent`,children:[(0,Y.jsx)(z,{className:`hidden sm:table-cell`,children:`State`}),(0,Y.jsx)(z,{children:`Run`}),(0,Y.jsx)(z,{className:`hidden xl:table-cell`,children:`Agent`}),(0,Y.jsx)(z,{className:`hidden text-right xl:table-cell`,children:`Attempts`}),(0,Y.jsx)(z,{className:`hidden text-right xl:table-cell`,children:`Duration`}),(0,Y.jsx)(z,{className:`hidden xl:table-cell`,children:`Opened`}),(0,Y.jsx)(z,{className:`hidden xl:table-cell`,children:`Pull request`}),(0,Y.jsx)(z,{children:(0,Y.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,Y.jsx)(B,{children:e.runs.map(i=>{let a=d(s(i.pullRequestUrl),t=>de(t,e.items)),o=r?n.get(i.itemKey)??null:null;return(0,Y.jsx)(Qe,{run:i,item:o===null||u(a,({number:e})=>e===o.number)?null:o,pullRequest:a,openRun:t},i.id)})})]})})]})},et=({children:e})=>(0,Y.jsx)(`main`,{className:`px-4 pt-5 pb-10 md:px-5`,children:(0,Y.jsx)(`div`,{className:`flex max-w-5xl flex-col gap-8`,children:e})}),tt=({repository:e,number:t})=>{let{data:n}=r(re()),o=b(n.projects,e),s=i(),c=Se(),l=r(be(e,t));if(l.error instanceof f&&l.error.error===`BoardItemNotFoundError`)return(0,Y.jsx)(Ve,{repository:e,number:String(t)});let u=l.isError&&(0,Y.jsx)(w,{className:`max-w-3xl`,title:`Could not refresh the task`,message:l.error.message}),d=l.data;return d.number!==t&&o!==void 0?(0,Y.jsx)(a,{to:`/projects/$project/tasks/$number`,params:{project:y(o),number:String(d.number)},search:t=>({...t,repository:e}),replace:!0}):(0,Y.jsxs)(et,{children:[o!==void 0&&o.repositories.length>1&&(0,Y.jsx)(Be,{repositories:o.repositories,value:e,onChange:e=>void s({to:`/projects/$project/tasks`,params:{project:y(o)},search:{repository:e}})}),u,o!==void 0&&(0,Y.jsx)(We,{task:d,project:o,disabled:n._tag===`NeedsSetup`}),(0,Y.jsx)($e,{task:d,openRun:c}),(0,Y.jsx)(Ge,{task:d}),(0,Y.jsx)(Ue,{task:d})]})},nt=()=>{let{repository:e,number:t}=Ee.useLoaderData();return(0,Y.jsx)(tt,{repository:e,number:t},`${e}#${t}`)};export{nt as component};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{t}from"./index-C_emtD3X.js";import{n,t as r}from"./not-found-BQmVi3gG.js";var i=e(),a=()=>{let{repository:e}=t.useSearch(),{number:a}=t.useParams();return e===void 0?(0,i.jsx)(`p`,{children:n}):(0,i.jsx)(r,{repository:e,number:a})};export{a as notFoundComponent};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{t}from"./index-DUgI_VkE.js";import{n,t as r}from"./not-found-B0p_Ar0N.js";var i=e(),a=()=>{let{repository:e}=t.useSearch(),{number:a}=t.useParams();return e===void 0?(0,i.jsx)(`p`,{children:n}):(0,i.jsx)(r,{repository:e,number:a})};export{a as notFoundComponent};
@@ -1,2 +1,2 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{t as r}from"./useSuspenseQuery-ajaZl96Y.js";import{s as i}from"./queries-BdQSLORJ.js";import{t as a}from"./link-3oQYoIpm.js";import{st as o}from"./api-em6k9a2t.js";import{l as s,x as c}from"./strings-BqjRDV62.js";import{B as l,F as u,H as d,N as f,R as p,a as m,i as h,n as g,z as _}from"./overview-B6WVtEU1.js";import{a as v,i as y,l as b,n as x,o as S,r as C,s as w,t as ee}from"./moves-C8LmlI9G.js";import{A as T,W as E,t as D}from"./button-73ghQ8AF.js";import{t as O}from"./error-alert-CtUHST2S.js";import{i as te}from"./context-8jHKzDOY.js";import{r as ne,t as k}from"./mark-D4e5SjpF.js";import{a as A,i as re}from"./page-SCXRVE8o.js";import{t as ie}from"./queries-DZCDfTzj.js";import{Dt as j,St as ae,Tt as oe,X as M,_t as se,at as ce,bt as N,ct as le,et as ue,gt as P,ht as de,in as fe,it as pe,ln as me,lt as he,mt as ge,nt as _e,o as ve,ot as ye,pt as be,rt as xe,st as Se,tt as Ce,ut as we,vt as Te,xt as F,yt as I}from"./index-C_emtD3X.js";import{n as Ee,t as De}from"./ci-zupxJ_T1.js";import{n as L,r as Oe,t as ke}from"./status-badge-PZxds9pW.js";import{a as Ae,i as R,n as je,o as z,r as B,t as Me}from"./table-iibRgprN.js";import{a as Ne,c as Pe,d as V,f as Fe,g as Ie,h as Le,i as Re,l as ze,m as H,o as Be,p as Ve,r as He,s as Ue,t as We}from"./sortable.esm-BUoggwyH.js";import{t as U}from"./label-badge-DC_gSG2U.js";import{t as Ge}from"./action-JvwOtX_J.js";import{f as Ke,o as qe,u as W}from"./model-3iMuy1GK.js";import{n as Je,t as Ye}from"./strings-QYBiammf.js";import{t as Xe}from"./project-not-found-BKFsSrLV.js";var G=e(t(),1),Ze=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M204,64V168a12,12,0,0,1-24,0V93L72.49,200.49a12,12,0,0,1-17-17L163,76H88a12,12,0,0,1,0-24H192A12,12,0,0,1,204,64Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M192,64V168L88,64Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M192,56H88a8,8,0,0,0-5.66,13.66L128.69,116,58.34,186.34a8,8,0,0,0,11.32,11.32L140,127.31l46.34,46.35A8,8,0,0,0,200,168V64A8,8,0,0,0,192,56Zm-8,92.69-38.34-38.34h0L107.31,72H184Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-13.66,5.66L140,127.31,69.66,197.66a8,8,0,0,1-11.32-11.32L128.69,116,82.34,69.66A8,8,0,0,1,88,56H192A8,8,0,0,1,200,64Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M198,64V168a6,6,0,0,1-12,0V78.48L68.24,196.24a6,6,0,0,1-8.48-8.48L177.52,70H88a6,6,0,0,1,0-12H192A6,6,0,0,1,198,64Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M196,64V168a4,4,0,0,1-8,0V73.66L66.83,194.83a4,4,0,0,1-5.66-5.66L182.34,68H88a4,4,0,0,1,0-8H192A4,4,0,0,1,196,64Z`}))]]),Qe=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M140,40V216a12,12,0,0,1-24,0V40a12,12,0,0,1,24,0ZM64.49,87.51a12,12,0,0,0-17,17L59,116H16a12,12,0,0,0,0,24H59L47.51,151.51a12,12,0,0,0,17,17l32-32a12,12,0,0,0,0-17ZM240,116H197l11.52-11.51a12,12,0,0,0-17-17l-32,32a12,12,0,0,0,0,17l32,32a12,12,0,0,0,17-17L197,140h43a12,12,0,0,0,0-24Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M240,56V200a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V56A16,16,0,0,1,32,40H224A16,16,0,0,1,240,56Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M136,40V216a8,8,0,0,1-16,0V40a8,8,0,0,1,16,0ZM69.66,90.34a8,8,0,0,0-11.32,11.32L76.69,120H16a8,8,0,0,0,0,16H76.69L58.34,154.34a8,8,0,0,0,11.32,11.32l32-32a8,8,0,0,0,0-11.32ZM240,120H179.31l18.35-18.34a8,8,0,0,0-11.32-11.32l-32,32a8,8,0,0,0,0,11.32l32,32a8,8,0,0,0,11.32-11.32L179.31,136H240a8,8,0,0,0,0-16Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M101.66,122.34a8,8,0,0,1,0,11.32l-32,32A8,8,0,0,1,56,160V136H16a8,8,0,0,1,0-16H56V96a8,8,0,0,1,13.66-5.66ZM240,120H200V96a8,8,0,0,0-13.66-5.66l-32,32a8,8,0,0,0,0,11.32l32,32A8,8,0,0,0,200,160V136h40a8,8,0,0,0,0-16ZM128,32a8,8,0,0,0-8,8V216a8,8,0,0,0,16,0V40A8,8,0,0,0,128,32Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M134,40V216a6,6,0,0,1-12,0V40a6,6,0,0,1,12,0ZM68.24,91.76a6,6,0,0,0-8.48,8.48L81.51,122H16a6,6,0,0,0,0,12H81.51L59.76,155.76a6,6,0,1,0,8.48,8.48l32-32a6,6,0,0,0,0-8.48ZM240,122H174.49l21.75-21.76a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48l32,32a6,6,0,0,0,8.48-8.48L174.49,134H240a6,6,0,0,0,0-12Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M136,40V216a8,8,0,0,1-16,0V40a8,8,0,0,1,16,0ZM69.66,90.34a8,8,0,0,0-11.32,11.32L76.69,120H16a8,8,0,0,0,0,16H76.69L58.34,154.34a8,8,0,0,0,11.32,11.32l32-32a8,8,0,0,0,0-11.32ZM240,120H179.31l18.35-18.34a8,8,0,0,0-11.32-11.32l-32,32a8,8,0,0,0,0,11.32l32,32a8,8,0,0,0,11.32-11.32L179.31,136H240a8,8,0,0,0,0-16Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M132,40V216a4,4,0,0,1-8,0V40a4,4,0,0,1,8,0ZM66.83,93.17a4,4,0,0,0-5.66,5.66L86.34,124H16a4,4,0,0,0,0,8H86.34L61.17,157.17a4,4,0,0,0,5.66,5.66l32-32a4,4,0,0,0,0-5.66ZM240,124H169.66l25.17-25.17a4,4,0,1,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66l32,32a4,4,0,0,0,5.66-5.66L169.66,132H240a4,4,0,0,0,0-8Z`}))]]),K=G.forwardRef((e,t)=>G.createElement(E,{ref:t,...e,weights:Ze}));K.displayName=`ArrowUpRightIcon`;var q=G.forwardRef((e,t)=>G.createElement(E,{ref:t,...e,weights:Qe}));q.displayName=`ArrowsInLineHorizontalIcon`;var $e=(e,t)=>e===`Running`?`Running since ${c(t)}`:e===`Failed`?`Failed at ${c(t)}`:u(t),et={above:!1,below:!1},tt=()=>{let[e,t]=(0,G.useState)(et),n=(0,G.useRef)(null);return[(0,G.useCallback)(e=>{if(n.current?.(),n.current=null,e===null)return;let r=()=>{let n=e.scrollTop>1,r=e.scrollHeight-e.clientHeight-e.scrollTop>1;t(e=>e.above===n&&e.below===r?e:{above:n,below:r})},i=new ResizeObserver(r),a=()=>{i.observe(e);for(let t of e.children)i.observe(t)},o=new MutationObserver(()=>{i.disconnect(),a(),r()});a(),o.observe(e,{childList:!0}),e.addEventListener(`scroll`,r,{passive:!0}),r(),n.current=()=>{e.removeEventListener(`scroll`,r),o.disconnect(),i.disconnect()}},[]),e]},J=n();function Y({className:e,size:t=`default`,...n}){return(0,J.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:T(`group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-lg bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-border [--card-spacing:--spacing(4)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg`,e),...n})}function nt({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`card-header`,className:T(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)`,e),...t})}function rt({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`card-title`,className:T(`text-lg font-semibold`,e),...t})}function it({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`card-description`,className:T(`text-sm text-muted-foreground`,e),...t})}function at({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`card-content`,className:T(`px-(--card-spacing)`,e),...t})}var X=3,ot=({labels:e,catalog:t})=>{if(e.length===0)return null;let n=e.slice(X);return(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[e.slice(0,X).map(e=>(0,J.jsx)(U,{name:e,label:t.get(e)},e)),n.length>0&&(0,J.jsxs)(M,{variant:`outline`,className:`text-muted-foreground tabular-nums`,title:n.join(`, `),"aria-label":`${n.length} more: ${n.join(`, `)}`,children:[`+`,n.length]})]})},st=`block w-full cursor-pointer text-left outline-none after:absolute after:inset-0 after:rounded-lg`,ct=({item:e,project:t})=>{let n=oe();return(0,J.jsx)(`h3`,{className:`text-sm/snug font-medium text-card-foreground`,title:e.title,children:(0,J.jsx)(a,{...t===void 0?{...n.task(e.repository,W(e))}:{to:`/projects/$project/tasks/$number`,params:{project:t,number:W(e)},search:{repository:e.repository}},draggable:!1,className:st,children:(0,J.jsx)(`span`,{className:`line-clamp-2`,children:e.title})})})},lt=({failure:e,children:t})=>(0,J.jsxs)(`div`,{className:`flex flex-col items-start gap-1.5 rounded-md bg-destructive/8 px-2 py-1.5 text-xs text-destructive`,children:[(0,J.jsx)(`p`,{className:`line-clamp-2 wrap-anywhere`,title:e.message,children:e.message}),t]}),ut=({failure:e,action:t})=>t!==null&&e.run.canRetry&&!t.isPending?(0,J.jsx)(D,{variant:`outline`,size:`xs`,className:`relative z-10`,title:p(e.run.agentBrain),onClick:()=>t.mutate({runId:e.run.id,request:{action:`retry`}}),children:_.retry}):null,dt=({run:e})=>{let t=A(3e4),n=y(e);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`p`,{className:`flex min-w-0 items-center gap-1.5 text-xs whitespace-nowrap text-muted-foreground`,children:[(0,J.jsx)(L,{state:e.state,className:`mr-0.5 ml-0.75`}),(0,J.jsx)(`span`,{className:`truncate text-foreground`,children:e.loop}),e.state!==`AwaitingCi`&&(0,J.jsx)(`span`,{className:`shrink-0`,children:e.state}),n!==null&&(0,J.jsx)(`time`,{className:`shrink-0 font-mono tabular-nums`,dateTime:n,title:$e(e.state,n),children:s(n,t)}),(0,J.jsx)(`span`,{className:`ml-auto truncate pl-2`,children:e.agent})]}),e.ciWait!==null&&(0,J.jsx)(`p`,{className:`text-xs`,children:(0,J.jsx)(Ee,{run:e})}),e.machineWait!==null&&(0,J.jsx)(`p`,{className:`text-xs break-words text-muted-foreground`,children:f(e.machineWait)})]})},ft=({stalled:e,named:t,children:n})=>{let r=A(3e4),i=Je(e,r);return(0,J.jsxs)(`div`,{"data-slot":`stall-note`,className:`flex flex-col items-start gap-1.5 text-xs`,children:[(0,J.jsxs)(`p`,{className:`line-clamp-3 text-muted-foreground`,title:`${e.loop}: ${i}`,children:[t&&(0,J.jsxs)(`span`,{className:`font-medium text-foreground`,children:[e.loop,` `]}),i]}),n]})},pt=e=>[`run-again`,`board-card`,e],mt=(e,t)=>{let n=pt(e),r=Ce({mutationKey:n,onClaimed:t}),a=i({filters:{mutationKey:n,exact:!0},select:({state:e})=>e}).at(-1);return{isPending:a?.status===`pending`,data:a?.data,error:a?.error??null,send:e=>r.mutate({runId:e.id,amendment:`unchanged`})}},Z=({project:e,showRepository:t,item:n,lane:r,catalog:i,stall:a,readOnly:o,action:s,again:c,progress:l})=>{let u=v(n),d=C(n),f=d===null?void 0:n.runs.find(({handoff:e})=>e?.fixRunId===d.id),p=s?.error?.message??null,m=c?.error?.message??null,h=a!==null&&u!==null&&(a.reason._tag===`RunFailed`||a.reason._tag===`SuppressedForOperator`)&&a.reason.run.id===u.run.id,g=a===null||s===null?null:(0,J.jsx)(Ge,{stalled:a,readOnly:o,appearance:`card`}),_=n.needsYou&&!(d?.canApprove||d?.canResolveFailure)&&a===null;return(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5 px-3`,children:[(0,J.jsx)(`p`,{className:`flex flex-wrap items-baseline gap-x-2.5 pr-6`,children:n.items.map(e=>(0,J.jsx)(k,{item:e,className:`relative z-10`},e.itemKey))}),t&&(0,J.jsxs)(`p`,{className:`flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,J.jsx)(j,{repository:n.repository}),(0,J.jsx)(`span`,{className:`truncate`,children:n.repository})]}),(0,J.jsx)(ct,{item:n,project:e}),(0,J.jsx)(ot,{labels:x(n,r),catalog:i}),d!==null&&(0,J.jsx)(dt,{run:d}),f!==void 0&&(0,J.jsx)(`p`,{className:`text-xs`,children:(0,J.jsx)(De,{run:f})}),l!==null&&(0,J.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:l}),u!==null&&(0,J.jsx)(lt,{failure:u,children:h&&a?.reason._tag===`SuppressedForOperator`?g:(0,J.jsx)(ut,{failure:u,action:o?null:s})}),a!==null&&!h&&(0,J.jsx)(ft,{stalled:a,named:(d===null||qe(a)?.id!==d.id)&&!Ye(a),children:g}),c?.data?._tag===`CycleBlocked`&&(0,J.jsx)(`p`,{role:`status`,className:`text-xs text-needs-you`,children:`No run opened: cycle budget used up. Reset it in Needs attention`}),p!==null&&(0,J.jsx)(`p`,{className:`text-xs text-destructive wrap-anywhere`,children:p}),m!==null&&(0,J.jsx)(`p`,{className:`text-xs text-destructive wrap-anywhere`,children:m}),n.conflicting&&(0,J.jsx)(`p`,{className:`text-xs text-destructive`,children:`Conflicts with base`}),_&&(0,J.jsx)(`p`,{className:`text-xs text-needs-you`,children:`Needs attention`})]})},ht=({runs:e,openRun:t})=>(0,J.jsxs)(I,{children:[(0,J.jsx)(F,{children:`Run history`}),(0,J.jsx)(N,{className:`min-w-48`,children:[...e].reverse().map(e=>(0,J.jsxs)(P,{onClick:()=>t(e.id),children:[(0,J.jsx)(`span`,{className:`truncate`,children:e.loop}),(0,J.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2 pl-4 text-xs text-muted-foreground`,children:[(0,J.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(L,{state:e.state}),e.state]}),(0,J.jsx)(`time`,{dateTime:e.openedAt,title:u(e.openedAt),className:`font-mono tabular-nums`,children:s(e.openedAt)})]})]},e.id))})]}),gt=({readOnly:e,item:t,run:n,moves:r,openRun:i,action:a,again:o,className:s})=>{let[c,l]=(0,G.useState)(!1),u=ne(t),d=t.runs.filter(({id:e})=>e!==n?.id),f=t.run?.canRunAgain===!0?t.run:null,m=[{key:`links`,content:t.items.map(e=>(0,J.jsxs)(se,{href:e.url,target:`_blank`,rel:`noreferrer`,closeOnClick:!0,children:[`Open `,(0,J.jsx)(k,{item:e,linked:!1}),` on GitHub`,(0,J.jsx)(b,{className:`ml-auto text-muted-foreground`,"aria-hidden":`true`})]},e.itemKey))}];(n!==null||d.length>0)&&m.push({key:`runs`,content:(0,J.jsxs)(J.Fragment,{children:[n!==null&&(0,J.jsx)(P,{onClick:()=>i(n.id),children:`Open run`}),d.length>0&&(0,J.jsx)(ht,{runs:d,openRun:i})]})});let h=a.isPending||o.isPending,g=f!==null||n!==null&&(n.canApprove||n.canRetry||n.canCancel);return!e&&!h&&g&&m.push({key:`actions`,content:(0,J.jsxs)(J.Fragment,{children:[n?.canApprove&&(0,J.jsx)(P,{onClick:()=>a.mutate({runId:n.id,request:{action:`approve`}}),children:_.approve}),n?.canRetry&&(0,J.jsx)(P,{title:p(n.agentBrain),onClick:()=>a.mutate({runId:n.id,request:{action:`retry`}}),children:_.retry}),f!==null&&(0,J.jsxs)(P,{onClick:()=>o.send(f),children:[_.runAgain,(0,J.jsx)(`span`,{className:`ml-auto truncate pl-4 text-xs text-muted-foreground`,children:f.loop})]}),n?.canCancel&&(0,J.jsx)(P,{variant:`destructive`,onClick:()=>l(!0),children:_.cancel})]})}),!e&&!r.disabled&&r.targets.length>0&&m.push({key:`move`,content:(0,J.jsxs)(I,{children:[(0,J.jsx)(F,{children:`Move to`}),(0,J.jsx)(N,{className:`min-w-40`,children:r.targets.map(e=>(0,J.jsx)(P,{onClick:()=>r.onMove(t,e),children:e.name},e.id))})]})}),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(be,{children:[(0,J.jsx)(ae,{render:(0,J.jsx)(D,{variant:`ghost`,size:`icon-sm`,className:T(`text-muted-foreground hover:text-foreground aria-expanded:text-foreground`,s)}),"aria-label":`Actions for ${u}`,children:(0,J.jsx)(fe,{weight:`bold`,className:`size-4`,"aria-hidden":`true`})}),(0,J.jsx)(ge,{align:`end`,className:`w-auto min-w-48`,children:m.map(({key:e,content:t},n)=>(0,J.jsxs)(G.Fragment,{children:[n>0&&(0,J.jsx)(Te,{}),(0,J.jsx)(de,{children:t})]},e))})]}),n!==null&&(0,J.jsx)(xe,{open:c,onOpenChange:l,children:(0,J.jsxs)(ye,{children:[(0,J.jsxs)(he,{children:[(0,J.jsxs)(we,{children:[`Cancel `,n.loop,`?`]}),(0,J.jsxs)(Se,{children:[`The run on `,u,` stops, including any attempt in progress.`]})]}),(0,J.jsxs)(le,{children:[(0,J.jsx)(ce,{children:_.keepRunning}),(0,J.jsx)(pe,{variant:`destructive`,onClick:()=>{l(!1),a.mutate({runId:n.id,request:{action:`cancel`}})},children:_.confirmCancel})]})]})})]})},Q=e=>T(`relative gap-0 py-2.5 transition-[box-shadow] hover:ring-foreground/15 has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-ring/70`,e&&`ring-needs-you/45 hover:ring-needs-you/65`),_t=(e,t,n)=>e.isPending&&e.variables!==void 0?l[e.variables.request.action]:t.isPending?d:n===void 0?null:w(n),vt=({project:e,showRepository:t,item:n,lane:r,catalog:i,draggable:a,phase:o,moves:s,stall:c,readOnly:l,openRun:u})=>{let d=ue(),f=mt(n.itemKey,u),{attributes:p,listeners:m,setNodeRef:h,setActivatorNodeRef:g,transform:_,transition:v,isDragging:y}=Re({id:n.itemKey,disabled:{draggable:!a,droppable:r._tag!==`WritableBoardLane`}});return(0,J.jsxs)(`div`,{ref:h,style:{transform:Ie.Translate.toString(_),transition:v},className:T(`group/task relative`,y&&`opacity-40`),children:[(0,J.jsx)(Y,{ref:g,size:`sm`,className:T(Q(n.needsYou),a&&`touch-none focus-visible:ring-2 focus-visible:ring-ring/70`),...a&&p,...a&&m,children:(0,J.jsx)(Z,{project:e,showRepository:t,item:n,lane:r,catalog:i,stall:c,readOnly:l,action:d,again:f,progress:_t(d,f,o)})}),(0,J.jsx)(gt,{readOnly:l,item:n,run:C(n),moves:s,openRun:u,action:d,again:f,className:`absolute top-1.5 right-1.5 transition-opacity [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-hover/task:opacity-100 [@media(hover:hover)]:group-focus-within/task:opacity-100 [@media(hover:hover)]:aria-expanded:opacity-100`})]})},yt=new Set([`Waiting`,`Queued`,`Running`]),bt=(e,t)=>new Map(e.flatMap((n,r)=>{let i=e[r+1];if(i===void 0||n._tag!==`WritableBoardLane`||i._tag!==`WritableBoardLane`)return[];let a=new Set(n.items.flatMap(e=>e.loops)),o=n.items.flatMap(({runs:e})=>e.filter(({state:e,loop:t})=>yt.has(e)&&a.has(t))),s={next:i,loops:t.filter(({name:e})=>a.has(e)).map(({name:e,paused:t})=>({name:e,paused:t})),tone:o.some(({state:e})=>e!==`Waiting`)?`active`:o.length>0?`waiting`:`idle`};return[[n.id,s]]})),xt=e=>e.map(({name:e,paused:t})=>t?`${e} (paused)`:e).join(`, `),St=({flow:e})=>{let t=e.loops.length>0;return(0,J.jsxs)(`p`,{"data-slot":`flow-arrow`,className:T(`-mr-3 ml-auto flex min-w-0 items-center gap-1.5 pl-2 text-xs`,e.tone===`active`?`text-run-active`:e.tone===`waiting`?`text-run-waiting`:`text-muted-foreground`),title:t?`Loops matching this lane: ${xt(e.loops)}. Flows to ${e.next.name}`:void 0,children:[(0,J.jsxs)(`span`,{className:`sr-only`,children:[`Flows to `,e.next.name]}),t&&(0,J.jsx)(`span`,{className:`truncate`,children:e.loops.map(({name:e,paused:t},n)=>(0,J.jsxs)(G.Fragment,{children:[n>0&&`, `,e,t&&(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:` paused`})]},e))}),(0,J.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 22 8`,className:T(`h-2 w-5.5 shrink-0 fill-none stroke-current`,e.tone===`idle`&&`text-faint`),strokeWidth:`1`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,J.jsx)(`path`,{d:`M0.5 4h18M15.5 1l3 3-3 3`})})]})},Ct=e=>e.origin===`fallback`||e.sources.length>0&&e.sources.every(e=>`state`in e&&o(e.state)),wt=({sources:e,catalog:t})=>(0,J.jsx)(`ul`,{"aria-label":`Lane sources`,className:`flex flex-wrap gap-1`,children:e.map(e=>(0,J.jsx)(`li`,{className:`flex`,children:`label`in e?(0,J.jsx)(U,{name:e.label,label:t.get(e.label)}):(0,J.jsx)(M,{variant:`outline`,className:`text-muted-foreground`,children:e.state})},`label`in e?`label:${e.label}`:`state:${e.state}`))}),Tt=({lane:e,open:t})=>(0,J.jsx)(`section`,{"aria-label":`${e.name} lane`,className:`w-10 shrink-0`,children:(0,J.jsx)(`button`,{type:`button`,"aria-expanded":!1,title:`Open ${e.name}`,onClick:t,className:`flex h-full min-h-40 w-full items-start justify-center rounded-lg bg-card/60 ring-1 ring-border transition-colors outline-none hover:bg-muted/50 focus-visible:ring-2 focus-visible:ring-ring/70`,children:(0,J.jsxs)(`span`,{className:`sticky top-0 flex flex-col-reverse items-center gap-2 py-3`,children:[(0,J.jsx)(`span`,{className:`max-h-60 truncate text-sm font-semibold [writing-mode:vertical-rl]`,children:e.name}),` `,(0,J.jsx)(`span`,{className:`text-sm text-muted-foreground tabular-nums`,children:e.items.length})]})})}),Et=({project:e,showRepository:t,lane:n,lanes:r,flow:i,catalog:a,targeted:o,pending:s,readOnly:c,moves:l,stallOf:u,openRun:d,onMove:f})=>{let p=Ct(n),[m,h]=(0,G.useState)(p),g=n._tag===`WritableBoardLane`,{setNodeRef:_}=Ve({id:n.id,disabled:!g||s}),v=r.filter(e=>e._tag===`WritableBoardLane`&&e.id!==n.id),y=n.items.length,[b,x]=tt();return te(p?[{label:S(n.name,m),run:()=>h(!m)}]:[]),p&&m?(0,J.jsx)(Tt,{lane:n,open:()=>h(!1)}):(0,J.jsxs)(`section`,{ref:_,"aria-label":`${n.name} lane`,className:T(`flex w-68 shrink-0 flex-col gap-2 rounded-lg transition-[background-color,box-shadow]`,o&&`bg-muted/40 ring-6 ring-muted/40`),children:[(0,J.jsxs)(`header`,{className:T(`z-20 -mx-0.5 flex shrink-0 flex-col gap-1.5 px-1 pt-1 pb-1`,!o&&`bg-background`),children:[(0,J.jsxs)(`div`,{className:`flex h-6 items-center`,children:[(0,J.jsxs)(`h2`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,J.jsx)(`span`,{className:`truncate text-sm font-semibold`,children:n.name}),(0,J.jsx)(`span`,{className:`text-sm text-muted-foreground tabular-nums`,children:y})]}),i!==void 0&&(0,J.jsx)(St,{flow:i}),p&&(0,J.jsx)(D,{variant:`ghost`,size:`icon-xs`,"aria-expanded":!0,"aria-label":`Fold ${n.name}`,title:`Fold ${n.name}`,className:`ml-auto text-muted-foreground hover:text-foreground`,onClick:()=>h(!0),children:(0,J.jsx)(q,{"aria-hidden":`true`})})]}),(0,J.jsx)(`div`,{className:`min-h-5`,children:n.sources.length>0&&(0,J.jsx)(wt,{sources:n.sources,catalog:a})})]}),(0,J.jsx)(`div`,{ref:b,"aria-label":`${n.name} cards`,tabIndex:x.above||x.below?0:void 0,className:T(`-mx-1 flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto overscroll-y-contain px-1 pb-1 outline-none focus-visible:ring-2 focus-visible:ring-ring/70`,x.above&&`mask-t-from-[calc(100%-2.5rem)]`,x.below&&`mask-b-from-[calc(100%-2.5rem)]`),children:(0,J.jsxs)(We,{items:n.items.map(({itemKey:e})=>e),strategy:Ne,children:[y===0&&(0,J.jsx)(`p`,{className:`rounded-lg border border-dashed border-input px-3 py-2.5 text-xs text-muted-foreground`,children:`No tasks`}),n.items.map(r=>{let i=l.find(({itemKey:e})=>e===r.itemKey)?.phase,o=s||i!==void 0;return(0,J.jsx)(vt,{item:r,project:e,showRepository:t,lane:n,catalog:a,draggable:!o&&v.length>0,phase:i,moves:{targets:v,disabled:o,onMove:f},stall:u(r),readOnly:c,openRun:d},r.itemKey)})]})})]})},Dt=({item:e,lane:t,catalog:n,stall:r,project:i,showRepository:a})=>(0,J.jsx)(Y,{size:`sm`,className:T(Q(e.needsYou),`cursor-grabbing shadow-raised`),children:(0,J.jsx)(Z,{project:i,showRepository:a,item:e,lane:t,catalog:n,stall:r,readOnly:!0,action:null,again:null,progress:null})}),Ot=({runs:e,openRun:t})=>(0,J.jsxs)(Y,{className:`sticky left-4 w-[min(64rem,calc(100cqw-2rem))] md:left-5 md:w-[min(64rem,calc(100cqw-2.5rem))]`,children:[(0,J.jsxs)(nt,{children:[(0,J.jsx)(rt,{children:`Runs without a card`}),(0,J.jsxs)(it,{children:[e.length,` run`,e.length===1?``:`s`,` with no card on this board`]})]}),(0,J.jsx)(at,{children:(0,J.jsxs)(Me,{children:[(0,J.jsx)(Ae,{children:(0,J.jsxs)(z,{children:[(0,J.jsx)(R,{children:`Loop`}),(0,J.jsx)(R,{children:`Agent`}),(0,J.jsx)(R,{children:`Item`}),(0,J.jsx)(R,{children:`State`}),(0,J.jsx)(R,{className:`w-0`})]})}),(0,J.jsx)(je,{children:e.map(e=>(0,J.jsxs)(z,{className:`cursor-pointer`,onClick:()=>t(e.id),children:[(0,J.jsx)(B,{className:`font-medium`,children:e.loop}),(0,J.jsx)(B,{children:e.agent}),(0,J.jsx)(B,{className:`max-w-64 truncate font-mono text-xs`,children:e.itemKey}),(0,J.jsx)(B,{children:(0,J.jsx)(Oe,{state:e.state})}),(0,J.jsx)(B,{className:`text-right`,children:(0,J.jsx)(D,{variant:`ghost`,size:`icon-sm`,"aria-label":`Open run ${e.id}`,onClick:n=>{n.stopPropagation(),t(e.id)},children:(0,J.jsx)(K,{"aria-hidden":`true`})})})]},e.id))})]})})]}),kt=e=>[...e.filter(({_tag:e})=>e===`WritableBoardLane`),...e.filter(({_tag:e,origin:t})=>e!==`WritableBoardLane`&&t!==`fallback`),...e.filter(({origin:e})=>e===`fallback`)],$=(e,t)=>t.find(t=>t.id===e)??t.find(t=>t.items.some(({itemKey:t})=>t===e)),At=e=>{let t=V(e);if(t.length>0)return t;if(e.pointerCoordinates===null){let t=V({...e,pointerCoordinates:{x:e.collisionRect.left+1,y:e.collisionRect.top+1}});if(t.length>0)return t}return Fe(e)},jt=e=>(t,n)=>{let r=t.code===`ArrowRight`;if(!r&&t.code!==`ArrowLeft`)return He(t,n);t.preventDefault();let{collisionRect:i,droppableRects:a,droppableContainers:o}=n.context;if(i===null)return;let s=new Set(e.map(({id:e})=>e)),[c]=o.getEnabled().flatMap(({id:e})=>{let t=a.get(e);return t!==void 0&&s.has(e)?[t]:[]}).filter(({left:e})=>r?e>i.left:e<i.left).sort((e,t)=>r?e.left-t.left:t.left-e.left);return c===void 0?void 0:{x:c.left,y:c.top}},Mt=(e,t)=>{let n=e.flatMap(({items:e})=>e).find(({itemKey:e})=>e===t.itemKey);if(n===void 0)return e;let r=new Set(e.flatMap(e=>e._tag===`WritableBoardLane`?e.labels:[])),i={...n,labels:n.labels.filter(e=>!r.has(e))};return e.map(e=>{let n=e.items.filter(({itemKey:e})=>e!==t.itemKey);return e.id===t.toLane?{...e,items:[i,...n]}:{...e,items:n}})},Nt=e=>{let t=new Set(e.board.lanes.flatMap(({items:e})=>e.flatMap(({items:e})=>e.map(({itemKey:e})=>e))));return e.runs.filter(({itemKey:e})=>!t.has(e))},Pt=({project:e,loops:t,stalled:n,disabled:r,openRun:i})=>{let a=me(`operate`,e.id),o=r||!a,[s,c]=(0,G.useState)(null),[l,u]=(0,G.useState)(null),{moves:d,moveItem:f,isPending:p,error:g}=ee(e),_=Nt(e),v=d.reduce(Mt,kt(e.board.lanes)),y=Le(H(ze,{activationConstraint:{distance:6}}),H(Pe,{coordinateGetter:jt(v)})),b=bt(v,e.id===void 0?t:t.filter(t=>t.name.startsWith(`${e.id}/`))),x=v.reduce((e,t)=>e+t.items.length,0),S=e=>Ke(n,e),C=new Map(e.labels.map(e=>[e.name,e])),w=o||p,T=()=>{c(null),u(null)};return(0,J.jsxs)(`div`,{className:`flex min-w-0 min-h-96 flex-1 flex-col gap-4 pt-5`,children:[(0,J.jsx)(re,{title:m(e),leading:(0,J.jsx)(j,{repository:e.repository,size:`title`}),counts:`${v.length} lane${v.length===1?``:`s`}, ${x} item${x===1?``:`s`}`,className:`px-4 md:px-5`,children:e.status===`needs-you`&&(0,J.jsx)(ke,{})}),e.board.lanes.some(({origin:e})=>e===`proposed`)&&(0,J.jsx)(`p`,{className:`mx-4 max-w-3xl text-muted-foreground md:mx-5`,children:`Proposed lanes are read-only. Add lanes with labels in Configuration > Projects to enable moves.`}),e.board.failures.length>0&&(0,J.jsx)(O,{className:`mx-4 max-w-3xl md:mx-5`,title:`${e.board.failures.length} ${e.board.failures.length===1?`item`:`items`} not shown on the board`,message:e.board.failures.map(e=>e.message).join(`
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{t as r}from"./useSuspenseQuery-ajaZl96Y.js";import{s as i}from"./queries-DNwL3iH8.js";import{t as a}from"./link-3oQYoIpm.js";import{st as o}from"./api-C-F05axZ.js";import{l as s,x as c}from"./strings-BqjRDV62.js";import{B as l,F as u,H as d,N as f,R as p,a as m,i as h,n as g,z as _}from"./overview-CepWZt0q.js";import{a as v,i as y,l as b,n as x,o as S,r as C,s as w,t as ee}from"./moves-DvXvTqPv.js";import{A as T,W as E,t as D}from"./button-73ghQ8AF.js";import{t as O}from"./error-alert-CtUHST2S.js";import{i as te}from"./context-8jHKzDOY.js";import{r as ne,t as k}from"./mark-D4e5SjpF.js";import{a as A,i as re}from"./page-mSAm7lAb.js";import{t as ie}from"./queries-BSzIhHrR.js";import{Dt as j,St as ae,Tt as oe,X as M,_t as se,at as ce,bt as N,ct as le,et as ue,gt as P,ht as de,in as fe,it as pe,ln as me,lt as he,mt as ge,nt as _e,o as ve,ot as ye,pt as be,rt as xe,st as Se,tt as Ce,ut as we,vt as Te,xt as F,yt as I}from"./index-DUgI_VkE.js";import{n as Ee,t as De}from"./ci-6rWFJZh4.js";import{n as L,r as Oe,t as ke}from"./status-badge-PZxds9pW.js";import{a as Ae,i as R,n as je,o as z,r as B,t as Me}from"./table-iibRgprN.js";import{a as Ne,c as Pe,d as V,f as Fe,g as Ie,h as Le,i as Re,l as ze,m as H,o as Be,p as Ve,r as He,s as Ue,t as We}from"./sortable.esm-BUoggwyH.js";import{t as U}from"./label-badge-Ct7F8sHj.js";import{t as Ge}from"./action-DhGZbq8s.js";import{f as Ke,o as qe,u as W}from"./model-DoNfSmpn.js";import{n as Je,t as Ye}from"./strings-D9neIsYo.js";import{t as Xe}from"./project-not-found-BKFsSrLV.js";var G=e(t(),1),Ze=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M204,64V168a12,12,0,0,1-24,0V93L72.49,200.49a12,12,0,0,1-17-17L163,76H88a12,12,0,0,1,0-24H192A12,12,0,0,1,204,64Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M192,64V168L88,64Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M192,56H88a8,8,0,0,0-5.66,13.66L128.69,116,58.34,186.34a8,8,0,0,0,11.32,11.32L140,127.31l46.34,46.35A8,8,0,0,0,200,168V64A8,8,0,0,0,192,56Zm-8,92.69-38.34-38.34h0L107.31,72H184Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-13.66,5.66L140,127.31,69.66,197.66a8,8,0,0,1-11.32-11.32L128.69,116,82.34,69.66A8,8,0,0,1,88,56H192A8,8,0,0,1,200,64Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M198,64V168a6,6,0,0,1-12,0V78.48L68.24,196.24a6,6,0,0,1-8.48-8.48L177.52,70H88a6,6,0,0,1,0-12H192A6,6,0,0,1,198,64Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M200,64V168a8,8,0,0,1-16,0V83.31L69.66,197.66a8,8,0,0,1-11.32-11.32L172.69,72H88a8,8,0,0,1,0-16H192A8,8,0,0,1,200,64Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M196,64V168a4,4,0,0,1-8,0V73.66L66.83,194.83a4,4,0,0,1-5.66-5.66L182.34,68H88a4,4,0,0,1,0-8H192A4,4,0,0,1,196,64Z`}))]]),Qe=new Map([[`bold`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M140,40V216a12,12,0,0,1-24,0V40a12,12,0,0,1,24,0ZM64.49,87.51a12,12,0,0,0-17,17L59,116H16a12,12,0,0,0,0,24H59L47.51,151.51a12,12,0,0,0,17,17l32-32a12,12,0,0,0,0-17ZM240,116H197l11.52-11.51a12,12,0,0,0-17-17l-32,32a12,12,0,0,0,0,17l32,32a12,12,0,0,0,17-17L197,140h43a12,12,0,0,0,0-24Z`}))],[`duotone`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M240,56V200a16,16,0,0,1-16,16H32a16,16,0,0,1-16-16V56A16,16,0,0,1,32,40H224A16,16,0,0,1,240,56Z`,opacity:`0.2`}),G.createElement(`path`,{d:`M136,40V216a8,8,0,0,1-16,0V40a8,8,0,0,1,16,0ZM69.66,90.34a8,8,0,0,0-11.32,11.32L76.69,120H16a8,8,0,0,0,0,16H76.69L58.34,154.34a8,8,0,0,0,11.32,11.32l32-32a8,8,0,0,0,0-11.32ZM240,120H179.31l18.35-18.34a8,8,0,0,0-11.32-11.32l-32,32a8,8,0,0,0,0,11.32l32,32a8,8,0,0,0,11.32-11.32L179.31,136H240a8,8,0,0,0,0-16Z`}))],[`fill`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M101.66,122.34a8,8,0,0,1,0,11.32l-32,32A8,8,0,0,1,56,160V136H16a8,8,0,0,1,0-16H56V96a8,8,0,0,1,13.66-5.66ZM240,120H200V96a8,8,0,0,0-13.66-5.66l-32,32a8,8,0,0,0,0,11.32l32,32A8,8,0,0,0,200,160V136h40a8,8,0,0,0,0-16ZM128,32a8,8,0,0,0-8,8V216a8,8,0,0,0,16,0V40A8,8,0,0,0,128,32Z`}))],[`light`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M134,40V216a6,6,0,0,1-12,0V40a6,6,0,0,1,12,0ZM68.24,91.76a6,6,0,0,0-8.48,8.48L81.51,122H16a6,6,0,0,0,0,12H81.51L59.76,155.76a6,6,0,1,0,8.48,8.48l32-32a6,6,0,0,0,0-8.48ZM240,122H174.49l21.75-21.76a6,6,0,0,0-8.48-8.48l-32,32a6,6,0,0,0,0,8.48l32,32a6,6,0,0,0,8.48-8.48L174.49,134H240a6,6,0,0,0,0-12Z`}))],[`regular`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M136,40V216a8,8,0,0,1-16,0V40a8,8,0,0,1,16,0ZM69.66,90.34a8,8,0,0,0-11.32,11.32L76.69,120H16a8,8,0,0,0,0,16H76.69L58.34,154.34a8,8,0,0,0,11.32,11.32l32-32a8,8,0,0,0,0-11.32ZM240,120H179.31l18.35-18.34a8,8,0,0,0-11.32-11.32l-32,32a8,8,0,0,0,0,11.32l32,32a8,8,0,0,0,11.32-11.32L179.31,136H240a8,8,0,0,0,0-16Z`}))],[`thin`,G.createElement(G.Fragment,null,G.createElement(`path`,{d:`M132,40V216a4,4,0,0,1-8,0V40a4,4,0,0,1,8,0ZM66.83,93.17a4,4,0,0,0-5.66,5.66L86.34,124H16a4,4,0,0,0,0,8H86.34L61.17,157.17a4,4,0,0,0,5.66,5.66l32-32a4,4,0,0,0,0-5.66ZM240,124H169.66l25.17-25.17a4,4,0,1,0-5.66-5.66l-32,32a4,4,0,0,0,0,5.66l32,32a4,4,0,0,0,5.66-5.66L169.66,132H240a4,4,0,0,0,0-8Z`}))]]),K=G.forwardRef((e,t)=>G.createElement(E,{ref:t,...e,weights:Ze}));K.displayName=`ArrowUpRightIcon`;var q=G.forwardRef((e,t)=>G.createElement(E,{ref:t,...e,weights:Qe}));q.displayName=`ArrowsInLineHorizontalIcon`;var $e=(e,t)=>e===`Running`?`Running since ${c(t)}`:e===`Failed`?`Failed at ${c(t)}`:u(t),et={above:!1,below:!1},tt=()=>{let[e,t]=(0,G.useState)(et),n=(0,G.useRef)(null);return[(0,G.useCallback)(e=>{if(n.current?.(),n.current=null,e===null)return;let r=()=>{let n=e.scrollTop>1,r=e.scrollHeight-e.clientHeight-e.scrollTop>1;t(e=>e.above===n&&e.below===r?e:{above:n,below:r})},i=new ResizeObserver(r),a=()=>{i.observe(e);for(let t of e.children)i.observe(t)},o=new MutationObserver(()=>{i.disconnect(),a(),r()});a(),o.observe(e,{childList:!0}),e.addEventListener(`scroll`,r,{passive:!0}),r(),n.current=()=>{e.removeEventListener(`scroll`,r),o.disconnect(),i.disconnect()}},[]),e]},J=n();function Y({className:e,size:t=`default`,...n}){return(0,J.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:T(`group/card flex flex-col gap-(--card-spacing) overflow-hidden rounded-lg bg-card py-(--card-spacing) text-sm text-card-foreground ring-1 ring-border [--card-spacing:--spacing(4)] has-[>img:first-child]:pt-0 data-[size=sm]:[--card-spacing:--spacing(3)] *:[img:first-child]:rounded-t-lg *:[img:last-child]:rounded-b-lg`,e),...n})}function nt({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`card-header`,className:T(`group/card-header @container/card-header grid auto-rows-min items-start gap-1 rounded-t-lg px-(--card-spacing) has-data-[slot=card-action]:grid-cols-[1fr_auto] has-data-[slot=card-description]:grid-rows-[auto_auto] [.border-b]:pb-(--card-spacing)`,e),...t})}function rt({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`card-title`,className:T(`text-lg font-semibold`,e),...t})}function it({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`card-description`,className:T(`text-sm text-muted-foreground`,e),...t})}function at({className:e,...t}){return(0,J.jsx)(`div`,{"data-slot":`card-content`,className:T(`px-(--card-spacing)`,e),...t})}var X=3,ot=({labels:e,catalog:t})=>{if(e.length===0)return null;let n=e.slice(X);return(0,J.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[e.slice(0,X).map(e=>(0,J.jsx)(U,{name:e,label:t.get(e)},e)),n.length>0&&(0,J.jsxs)(M,{variant:`outline`,className:`text-muted-foreground tabular-nums`,title:n.join(`, `),"aria-label":`${n.length} more: ${n.join(`, `)}`,children:[`+`,n.length]})]})},st=`block w-full cursor-pointer text-left outline-none after:absolute after:inset-0 after:rounded-lg`,ct=({item:e,project:t})=>{let n=oe();return(0,J.jsx)(`h3`,{className:`text-sm/snug font-medium text-card-foreground`,title:e.title,children:(0,J.jsx)(a,{...t===void 0?{...n.task(e.repository,W(e))}:{to:`/projects/$project/tasks/$number`,params:{project:t,number:W(e)},search:{repository:e.repository}},draggable:!1,className:st,children:(0,J.jsx)(`span`,{className:`line-clamp-2`,children:e.title})})})},lt=({failure:e,children:t})=>(0,J.jsxs)(`div`,{className:`flex flex-col items-start gap-1.5 rounded-md bg-destructive/8 px-2 py-1.5 text-xs text-destructive`,children:[(0,J.jsx)(`p`,{className:`line-clamp-2 wrap-anywhere`,title:e.message,children:e.message}),t]}),ut=({failure:e,action:t})=>t!==null&&e.run.canRetry&&!t.isPending?(0,J.jsx)(D,{variant:`outline`,size:`xs`,className:`relative z-10`,title:p(e.run.agentBrain),onClick:()=>t.mutate({runId:e.run.id,request:{action:`retry`}}),children:_.retry}):null,dt=({run:e})=>{let t=A(3e4),n=y(e);return(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(`p`,{className:`flex min-w-0 items-center gap-1.5 text-xs whitespace-nowrap text-muted-foreground`,children:[(0,J.jsx)(L,{state:e.state,className:`mr-0.5 ml-0.75`}),(0,J.jsx)(`span`,{className:`truncate text-foreground`,children:e.loop}),e.state!==`AwaitingCi`&&(0,J.jsx)(`span`,{className:`shrink-0`,children:e.state}),n!==null&&(0,J.jsx)(`time`,{className:`shrink-0 font-mono tabular-nums`,dateTime:n,title:$e(e.state,n),children:s(n,t)}),(0,J.jsx)(`span`,{className:`ml-auto truncate pl-2`,children:e.agent})]}),e.ciWait!==null&&(0,J.jsx)(`p`,{className:`text-xs`,children:(0,J.jsx)(Ee,{run:e})}),e.machineWait!==null&&(0,J.jsx)(`p`,{className:`text-xs break-words text-muted-foreground`,children:f(e.machineWait)})]})},ft=({stalled:e,named:t,children:n})=>{let r=A(3e4),i=Je(e,r);return(0,J.jsxs)(`div`,{"data-slot":`stall-note`,className:`flex flex-col items-start gap-1.5 text-xs`,children:[(0,J.jsxs)(`p`,{className:`line-clamp-3 text-muted-foreground`,title:`${e.loop}: ${i}`,children:[t&&(0,J.jsxs)(`span`,{className:`font-medium text-foreground`,children:[e.loop,` `]}),i]}),n]})},pt=e=>[`run-again`,`board-card`,e],mt=(e,t)=>{let n=pt(e),r=Ce({mutationKey:n,onClaimed:t}),a=i({filters:{mutationKey:n,exact:!0},select:({state:e})=>e}).at(-1);return{isPending:a?.status===`pending`,data:a?.data,error:a?.error??null,send:e=>r.mutate({runId:e.id,amendment:`unchanged`})}},Z=({project:e,showRepository:t,item:n,lane:r,catalog:i,stall:a,readOnly:o,action:s,again:c,progress:l})=>{let u=v(n),d=C(n),f=d===null?void 0:n.runs.find(({handoff:e})=>e?.fixRunId===d.id),p=s?.error?.message??null,m=c?.error?.message??null,h=a!==null&&u!==null&&(a.reason._tag===`RunFailed`||a.reason._tag===`SuppressedForOperator`)&&a.reason.run.id===u.run.id,g=a===null||s===null?null:(0,J.jsx)(Ge,{stalled:a,readOnly:o,appearance:`card`}),_=n.needsYou&&!(d?.canApprove||d?.canResolveFailure)&&a===null;return(0,J.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5 px-3`,children:[(0,J.jsx)(`p`,{className:`flex flex-wrap items-baseline gap-x-2.5 pr-6`,children:n.items.map(e=>(0,J.jsx)(k,{item:e,className:`relative z-10`},e.itemKey))}),t&&(0,J.jsxs)(`p`,{className:`flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,J.jsx)(j,{repository:n.repository}),(0,J.jsx)(`span`,{className:`truncate`,children:n.repository})]}),(0,J.jsx)(ct,{item:n,project:e}),(0,J.jsx)(ot,{labels:x(n,r),catalog:i}),d!==null&&(0,J.jsx)(dt,{run:d}),f!==void 0&&(0,J.jsx)(`p`,{className:`text-xs`,children:(0,J.jsx)(De,{run:f})}),l!==null&&(0,J.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:l}),u!==null&&(0,J.jsx)(lt,{failure:u,children:h&&a?.reason._tag===`SuppressedForOperator`?g:(0,J.jsx)(ut,{failure:u,action:o?null:s})}),a!==null&&!h&&(0,J.jsx)(ft,{stalled:a,named:(d===null||qe(a)?.id!==d.id)&&!Ye(a),children:g}),c?.data?._tag===`CycleBlocked`&&(0,J.jsx)(`p`,{role:`status`,className:`text-xs text-needs-you`,children:`No run opened: cycle budget used up. Reset it in Needs attention`}),p!==null&&(0,J.jsx)(`p`,{className:`text-xs text-destructive wrap-anywhere`,children:p}),m!==null&&(0,J.jsx)(`p`,{className:`text-xs text-destructive wrap-anywhere`,children:m}),n.conflicting&&(0,J.jsx)(`p`,{className:`text-xs text-destructive`,children:`Conflicts with base`}),_&&(0,J.jsx)(`p`,{className:`text-xs text-needs-you`,children:`Needs attention`})]})},ht=({runs:e,openRun:t})=>(0,J.jsxs)(I,{children:[(0,J.jsx)(F,{children:`Run history`}),(0,J.jsx)(N,{className:`min-w-48`,children:[...e].reverse().map(e=>(0,J.jsxs)(P,{onClick:()=>t(e.id),children:[(0,J.jsx)(`span`,{className:`truncate`,children:e.loop}),(0,J.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2 pl-4 text-xs text-muted-foreground`,children:[(0,J.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,J.jsx)(L,{state:e.state}),e.state]}),(0,J.jsx)(`time`,{dateTime:e.openedAt,title:u(e.openedAt),className:`font-mono tabular-nums`,children:s(e.openedAt)})]})]},e.id))})]}),gt=({readOnly:e,item:t,run:n,moves:r,openRun:i,action:a,again:o,className:s})=>{let[c,l]=(0,G.useState)(!1),u=ne(t),d=t.runs.filter(({id:e})=>e!==n?.id),f=t.run?.canRunAgain===!0?t.run:null,m=[{key:`links`,content:t.items.map(e=>(0,J.jsxs)(se,{href:e.url,target:`_blank`,rel:`noreferrer`,closeOnClick:!0,children:[`Open `,(0,J.jsx)(k,{item:e,linked:!1}),` on GitHub`,(0,J.jsx)(b,{className:`ml-auto text-muted-foreground`,"aria-hidden":`true`})]},e.itemKey))}];(n!==null||d.length>0)&&m.push({key:`runs`,content:(0,J.jsxs)(J.Fragment,{children:[n!==null&&(0,J.jsx)(P,{onClick:()=>i(n.id),children:`Open run`}),d.length>0&&(0,J.jsx)(ht,{runs:d,openRun:i})]})});let h=a.isPending||o.isPending,g=f!==null||n!==null&&(n.canApprove||n.canRetry||n.canCancel);return!e&&!h&&g&&m.push({key:`actions`,content:(0,J.jsxs)(J.Fragment,{children:[n?.canApprove&&(0,J.jsx)(P,{onClick:()=>a.mutate({runId:n.id,request:{action:`approve`}}),children:_.approve}),n?.canRetry&&(0,J.jsx)(P,{title:p(n.agentBrain),onClick:()=>a.mutate({runId:n.id,request:{action:`retry`}}),children:_.retry}),f!==null&&(0,J.jsxs)(P,{onClick:()=>o.send(f),children:[_.runAgain,(0,J.jsx)(`span`,{className:`ml-auto truncate pl-4 text-xs text-muted-foreground`,children:f.loop})]}),n?.canCancel&&(0,J.jsx)(P,{variant:`destructive`,onClick:()=>l(!0),children:_.cancel})]})}),!e&&!r.disabled&&r.targets.length>0&&m.push({key:`move`,content:(0,J.jsxs)(I,{children:[(0,J.jsx)(F,{children:`Move to`}),(0,J.jsx)(N,{className:`min-w-40`,children:r.targets.map(e=>(0,J.jsx)(P,{onClick:()=>r.onMove(t,e),children:e.name},e.id))})]})}),(0,J.jsxs)(J.Fragment,{children:[(0,J.jsxs)(be,{children:[(0,J.jsx)(ae,{render:(0,J.jsx)(D,{variant:`ghost`,size:`icon-sm`,className:T(`text-muted-foreground hover:text-foreground aria-expanded:text-foreground`,s)}),"aria-label":`Actions for ${u}`,children:(0,J.jsx)(fe,{weight:`bold`,className:`size-4`,"aria-hidden":`true`})}),(0,J.jsx)(ge,{align:`end`,className:`w-auto min-w-48`,children:m.map(({key:e,content:t},n)=>(0,J.jsxs)(G.Fragment,{children:[n>0&&(0,J.jsx)(Te,{}),(0,J.jsx)(de,{children:t})]},e))})]}),n!==null&&(0,J.jsx)(xe,{open:c,onOpenChange:l,children:(0,J.jsxs)(ye,{children:[(0,J.jsxs)(he,{children:[(0,J.jsxs)(we,{children:[`Cancel `,n.loop,`?`]}),(0,J.jsxs)(Se,{children:[`The run on `,u,` stops, including any attempt in progress.`]})]}),(0,J.jsxs)(le,{children:[(0,J.jsx)(ce,{children:_.keepRunning}),(0,J.jsx)(pe,{variant:`destructive`,onClick:()=>{l(!1),a.mutate({runId:n.id,request:{action:`cancel`}})},children:_.confirmCancel})]})]})})]})},Q=e=>T(`relative gap-0 py-2.5 transition-[box-shadow] hover:ring-foreground/15 has-[:focus-visible]:ring-2 has-[:focus-visible]:ring-ring/70`,e&&`ring-needs-you/45 hover:ring-needs-you/65`),_t=(e,t,n)=>e.isPending&&e.variables!==void 0?l[e.variables.request.action]:t.isPending?d:n===void 0?null:w(n),vt=({project:e,showRepository:t,item:n,lane:r,catalog:i,draggable:a,phase:o,moves:s,stall:c,readOnly:l,openRun:u})=>{let d=ue(),f=mt(n.itemKey,u),{attributes:p,listeners:m,setNodeRef:h,setActivatorNodeRef:g,transform:_,transition:v,isDragging:y}=Re({id:n.itemKey,disabled:{draggable:!a,droppable:r._tag!==`WritableBoardLane`}});return(0,J.jsxs)(`div`,{ref:h,style:{transform:Ie.Translate.toString(_),transition:v},className:T(`group/task relative`,y&&`opacity-40`),children:[(0,J.jsx)(Y,{ref:g,size:`sm`,className:T(Q(n.needsYou),a&&`touch-none focus-visible:ring-2 focus-visible:ring-ring/70`),...a&&p,...a&&m,children:(0,J.jsx)(Z,{project:e,showRepository:t,item:n,lane:r,catalog:i,stall:c,readOnly:l,action:d,again:f,progress:_t(d,f,o)})}),(0,J.jsx)(gt,{readOnly:l,item:n,run:C(n),moves:s,openRun:u,action:d,again:f,className:`absolute top-1.5 right-1.5 transition-opacity [@media(hover:hover)]:opacity-0 [@media(hover:hover)]:group-hover/task:opacity-100 [@media(hover:hover)]:group-focus-within/task:opacity-100 [@media(hover:hover)]:aria-expanded:opacity-100`})]})},yt=new Set([`Waiting`,`Queued`,`Running`]),bt=(e,t)=>new Map(e.flatMap((n,r)=>{let i=e[r+1];if(i===void 0||n._tag!==`WritableBoardLane`||i._tag!==`WritableBoardLane`)return[];let a=new Set(n.items.flatMap(e=>e.loops)),o=n.items.flatMap(({runs:e})=>e.filter(({state:e,loop:t})=>yt.has(e)&&a.has(t))),s={next:i,loops:t.filter(({name:e})=>a.has(e)).map(({name:e,paused:t})=>({name:e,paused:t})),tone:o.some(({state:e})=>e!==`Waiting`)?`active`:o.length>0?`waiting`:`idle`};return[[n.id,s]]})),xt=e=>e.map(({name:e,paused:t})=>t?`${e} (paused)`:e).join(`, `),St=({flow:e})=>{let t=e.loops.length>0;return(0,J.jsxs)(`p`,{"data-slot":`flow-arrow`,className:T(`-mr-3 ml-auto flex min-w-0 items-center gap-1.5 pl-2 text-xs`,e.tone===`active`?`text-run-active`:e.tone===`waiting`?`text-run-waiting`:`text-muted-foreground`),title:t?`Loops matching this lane: ${xt(e.loops)}. Flows to ${e.next.name}`:void 0,children:[(0,J.jsxs)(`span`,{className:`sr-only`,children:[`Flows to `,e.next.name]}),t&&(0,J.jsx)(`span`,{className:`truncate`,children:e.loops.map(({name:e,paused:t},n)=>(0,J.jsxs)(G.Fragment,{children:[n>0&&`, `,e,t&&(0,J.jsx)(`span`,{className:`text-muted-foreground`,children:` paused`})]},e))}),(0,J.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 22 8`,className:T(`h-2 w-5.5 shrink-0 fill-none stroke-current`,e.tone===`idle`&&`text-faint`),strokeWidth:`1`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,J.jsx)(`path`,{d:`M0.5 4h18M15.5 1l3 3-3 3`})})]})},Ct=e=>e.origin===`fallback`||e.sources.length>0&&e.sources.every(e=>`state`in e&&o(e.state)),wt=({sources:e,catalog:t})=>(0,J.jsx)(`ul`,{"aria-label":`Lane sources`,className:`flex flex-wrap gap-1`,children:e.map(e=>(0,J.jsx)(`li`,{className:`flex`,children:`label`in e?(0,J.jsx)(U,{name:e.label,label:t.get(e.label)}):(0,J.jsx)(M,{variant:`outline`,className:`text-muted-foreground`,children:e.state})},`label`in e?`label:${e.label}`:`state:${e.state}`))}),Tt=({lane:e,open:t})=>(0,J.jsx)(`section`,{"aria-label":`${e.name} lane`,className:`w-10 shrink-0`,children:(0,J.jsx)(`button`,{type:`button`,"aria-expanded":!1,title:`Open ${e.name}`,onClick:t,className:`flex h-full min-h-40 w-full items-start justify-center rounded-lg bg-card/60 ring-1 ring-border transition-colors outline-none hover:bg-muted/50 focus-visible:ring-2 focus-visible:ring-ring/70`,children:(0,J.jsxs)(`span`,{className:`sticky top-0 flex flex-col-reverse items-center gap-2 py-3`,children:[(0,J.jsx)(`span`,{className:`max-h-60 truncate text-sm font-semibold [writing-mode:vertical-rl]`,children:e.name}),` `,(0,J.jsx)(`span`,{className:`text-sm text-muted-foreground tabular-nums`,children:e.items.length})]})})}),Et=({project:e,showRepository:t,lane:n,lanes:r,flow:i,catalog:a,targeted:o,pending:s,readOnly:c,moves:l,stallOf:u,openRun:d,onMove:f})=>{let p=Ct(n),[m,h]=(0,G.useState)(p),g=n._tag===`WritableBoardLane`,{setNodeRef:_}=Ve({id:n.id,disabled:!g||s}),v=r.filter(e=>e._tag===`WritableBoardLane`&&e.id!==n.id),y=n.items.length,[b,x]=tt();return te(p?[{label:S(n.name,m),run:()=>h(!m)}]:[]),p&&m?(0,J.jsx)(Tt,{lane:n,open:()=>h(!1)}):(0,J.jsxs)(`section`,{ref:_,"aria-label":`${n.name} lane`,className:T(`flex w-68 shrink-0 flex-col gap-2 rounded-lg transition-[background-color,box-shadow]`,o&&`bg-muted/40 ring-6 ring-muted/40`),children:[(0,J.jsxs)(`header`,{className:T(`z-20 -mx-0.5 flex shrink-0 flex-col gap-1.5 px-1 pt-1 pb-1`,!o&&`bg-background`),children:[(0,J.jsxs)(`div`,{className:`flex h-6 items-center`,children:[(0,J.jsxs)(`h2`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,J.jsx)(`span`,{className:`truncate text-sm font-semibold`,children:n.name}),(0,J.jsx)(`span`,{className:`text-sm text-muted-foreground tabular-nums`,children:y})]}),i!==void 0&&(0,J.jsx)(St,{flow:i}),p&&(0,J.jsx)(D,{variant:`ghost`,size:`icon-xs`,"aria-expanded":!0,"aria-label":`Fold ${n.name}`,title:`Fold ${n.name}`,className:`ml-auto text-muted-foreground hover:text-foreground`,onClick:()=>h(!0),children:(0,J.jsx)(q,{"aria-hidden":`true`})})]}),(0,J.jsx)(`div`,{className:`min-h-5`,children:n.sources.length>0&&(0,J.jsx)(wt,{sources:n.sources,catalog:a})})]}),(0,J.jsx)(`div`,{ref:b,"aria-label":`${n.name} cards`,tabIndex:x.above||x.below?0:void 0,className:T(`-mx-1 flex min-h-0 flex-1 flex-col gap-2 overflow-y-auto overscroll-y-contain px-1 pb-1 outline-none focus-visible:ring-2 focus-visible:ring-ring/70`,x.above&&`mask-t-from-[calc(100%-2.5rem)]`,x.below&&`mask-b-from-[calc(100%-2.5rem)]`),children:(0,J.jsxs)(We,{items:n.items.map(({itemKey:e})=>e),strategy:Ne,children:[y===0&&(0,J.jsx)(`p`,{className:`rounded-lg border border-dashed border-input px-3 py-2.5 text-xs text-muted-foreground`,children:`No tasks`}),n.items.map(r=>{let i=l.find(({itemKey:e})=>e===r.itemKey)?.phase,o=s||i!==void 0;return(0,J.jsx)(vt,{item:r,project:e,showRepository:t,lane:n,catalog:a,draggable:!o&&v.length>0,phase:i,moves:{targets:v,disabled:o,onMove:f},stall:u(r),readOnly:c,openRun:d},r.itemKey)})]})})]})},Dt=({item:e,lane:t,catalog:n,stall:r,project:i,showRepository:a})=>(0,J.jsx)(Y,{size:`sm`,className:T(Q(e.needsYou),`cursor-grabbing shadow-raised`),children:(0,J.jsx)(Z,{project:i,showRepository:a,item:e,lane:t,catalog:n,stall:r,readOnly:!0,action:null,again:null,progress:null})}),Ot=({runs:e,openRun:t})=>(0,J.jsxs)(Y,{className:`sticky left-4 w-[min(64rem,calc(100cqw-2rem))] md:left-5 md:w-[min(64rem,calc(100cqw-2.5rem))]`,children:[(0,J.jsxs)(nt,{children:[(0,J.jsx)(rt,{children:`Runs without a card`}),(0,J.jsxs)(it,{children:[e.length,` run`,e.length===1?``:`s`,` with no card on this board`]})]}),(0,J.jsx)(at,{children:(0,J.jsxs)(Me,{children:[(0,J.jsx)(Ae,{children:(0,J.jsxs)(z,{children:[(0,J.jsx)(R,{children:`Loop`}),(0,J.jsx)(R,{children:`Agent`}),(0,J.jsx)(R,{children:`Item`}),(0,J.jsx)(R,{children:`State`}),(0,J.jsx)(R,{className:`w-0`})]})}),(0,J.jsx)(je,{children:e.map(e=>(0,J.jsxs)(z,{className:`cursor-pointer`,onClick:()=>t(e.id),children:[(0,J.jsx)(B,{className:`font-medium`,children:e.loop}),(0,J.jsx)(B,{children:e.agent}),(0,J.jsx)(B,{className:`max-w-64 truncate font-mono text-xs`,children:e.itemKey}),(0,J.jsx)(B,{children:(0,J.jsx)(Oe,{state:e.state})}),(0,J.jsx)(B,{className:`text-right`,children:(0,J.jsx)(D,{variant:`ghost`,size:`icon-sm`,"aria-label":`Open run ${e.id}`,onClick:n=>{n.stopPropagation(),t(e.id)},children:(0,J.jsx)(K,{"aria-hidden":`true`})})})]},e.id))})]})})]}),kt=e=>[...e.filter(({_tag:e})=>e===`WritableBoardLane`),...e.filter(({_tag:e,origin:t})=>e!==`WritableBoardLane`&&t!==`fallback`),...e.filter(({origin:e})=>e===`fallback`)],$=(e,t)=>t.find(t=>t.id===e)??t.find(t=>t.items.some(({itemKey:t})=>t===e)),At=e=>{let t=V(e);if(t.length>0)return t;if(e.pointerCoordinates===null){let t=V({...e,pointerCoordinates:{x:e.collisionRect.left+1,y:e.collisionRect.top+1}});if(t.length>0)return t}return Fe(e)},jt=e=>(t,n)=>{let r=t.code===`ArrowRight`;if(!r&&t.code!==`ArrowLeft`)return He(t,n);t.preventDefault();let{collisionRect:i,droppableRects:a,droppableContainers:o}=n.context;if(i===null)return;let s=new Set(e.map(({id:e})=>e)),[c]=o.getEnabled().flatMap(({id:e})=>{let t=a.get(e);return t!==void 0&&s.has(e)?[t]:[]}).filter(({left:e})=>r?e>i.left:e<i.left).sort((e,t)=>r?e.left-t.left:t.left-e.left);return c===void 0?void 0:{x:c.left,y:c.top}},Mt=(e,t)=>{let n=e.flatMap(({items:e})=>e).find(({itemKey:e})=>e===t.itemKey);if(n===void 0)return e;let r=new Set(e.flatMap(e=>e._tag===`WritableBoardLane`?e.labels:[])),i={...n,labels:n.labels.filter(e=>!r.has(e))};return e.map(e=>{let n=e.items.filter(({itemKey:e})=>e!==t.itemKey);return e.id===t.toLane?{...e,items:[i,...n]}:{...e,items:n}})},Nt=e=>{let t=new Set(e.board.lanes.flatMap(({items:e})=>e.flatMap(({items:e})=>e.map(({itemKey:e})=>e))));return e.runs.filter(({itemKey:e})=>!t.has(e))},Pt=({project:e,loops:t,stalled:n,disabled:r,openRun:i})=>{let a=me(`operate`,e.id),o=r||!a,[s,c]=(0,G.useState)(null),[l,u]=(0,G.useState)(null),{moves:d,moveItem:f,isPending:p,error:g}=ee(e),_=Nt(e),v=d.reduce(Mt,kt(e.board.lanes)),y=Le(H(ze,{activationConstraint:{distance:6}}),H(Pe,{coordinateGetter:jt(v)})),b=bt(v,e.id===void 0?t:t.filter(t=>t.name.startsWith(`${e.id}/`))),x=v.reduce((e,t)=>e+t.items.length,0),S=e=>Ke(n,e),C=new Map(e.labels.map(e=>[e.name,e])),w=o||p,T=()=>{c(null),u(null)};return(0,J.jsxs)(`div`,{className:`flex min-w-0 min-h-96 flex-1 flex-col gap-4 pt-5`,children:[(0,J.jsx)(re,{title:m(e),leading:(0,J.jsx)(j,{repository:e.repository,size:`title`}),counts:`${v.length} lane${v.length===1?``:`s`}, ${x} item${x===1?``:`s`}`,className:`px-4 md:px-5`,children:e.status===`needs-you`&&(0,J.jsx)(ke,{})}),e.board.lanes.some(({origin:e})=>e===`proposed`)&&(0,J.jsx)(`p`,{className:`mx-4 max-w-3xl text-muted-foreground md:mx-5`,children:`Proposed lanes are read-only. Add lanes with labels in Configuration > Projects to enable moves.`}),e.board.failures.length>0&&(0,J.jsx)(O,{className:`mx-4 max-w-3xl md:mx-5`,title:`${e.board.failures.length} ${e.board.failures.length===1?`item`:`items`} not shown on the board`,message:e.board.failures.map(e=>e.message).join(`
2
2
  `)}),g!==null&&(0,J.jsx)(O,{className:`mx-4 max-w-3xl md:mx-5`,message:g.message}),(0,J.jsxs)(Be,{sensors:y,collisionDetection:At,onDragStart:({active:e})=>{let t=v.find(({items:t})=>t.some(({itemKey:t})=>t===e.id)),n=t?.items.find(({itemKey:t})=>t===e.id);c(t===void 0||n===void 0?null:{item:n,lane:t})},onDragOver:({over:e})=>u(e===null?null:$(e.id,v)?.id??null),onDragEnd:({over:e})=>{if(T(),e===null||s===null)return;let t=$(e.id,v);t!==void 0&&f(s.item,t)},onDragCancel:T,children:[(0,J.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto overscroll-contain [container-type:size]`,"aria-label":`${m(e)} project board`,children:(0,J.jsxs)(`div`,{className:`flex w-max min-w-full flex-col gap-6 px-4 pb-4 md:px-5`,children:[(0,J.jsx)(`div`,{className:`flex h-[calc(100cqh-1rem)] min-h-80 shrink-0 gap-3`,children:v.map(t=>(0,J.jsx)(Et,{project:h(e),showRepository:e.repositories.length>1,lane:t,lanes:v,flow:b.get(t.id),catalog:C,targeted:s!==null&&l===t.id&&t.id!==s.lane.id&&t._tag===`WritableBoardLane`,pending:w,readOnly:o,moves:d,stallOf:S,openRun:i,onMove:f},t.id))}),_.length>0&&(0,J.jsx)(Ot,{runs:_,openRun:i})]})}),(0,J.jsx)(Ue,{children:s!==null&&(0,J.jsx)(Dt,{item:s.item,project:h(e),showRepository:e.repositories.length>1,lane:s.lane,catalog:C,stall:S(s.item)})})]})]})},Ft=()=>{let{project:e}=ve.useParams(),{data:t}=r(g()),n=r(ie()),i=_e(),a=t.projects.find(t=>h(t)===e);return a===void 0?(0,J.jsx)(Xe,{}):(0,J.jsx)(Pt,{project:a,loops:t.loops,stalled:n.data.notMoving,disabled:t._tag===`NeedsSetup`,openRun:i})};export{Ft as component};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{I as t,r as n,s as r,st as i,t as a}from"./section-DOT3oY3x.js";import{t as o}from"./useSuspenseQuery-ajaZl96Y.js";import{t as s}from"./link-3oQYoIpm.js";import{n as c}from"./queries-qu-pAHiz.js";import{c as l}from"./index-C_emtD3X.js";import{t as u}from"./repository-link-DQuPFe84.js";var d=e(),f=({id:e,configuration:o})=>{let c=o.projects.find(t=>t.id===e);return(0,d.jsx)(a,{title:c?.name??e,entity:i(`project`,e),children:c===void 0?(0,d.jsx)(r,{title:t.missing,children:null}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s,{to:`/projects/$project`,params:{project:e},className:`text-primary hover:underline`,children:t.board}),(0,d.jsx)(n,{title:t.repositories,children:(0,d.jsx)(`ol`,{className:`space-y-2`,children:c.repositories.map(e=>(0,d.jsx)(`li`,{children:(0,d.jsx)(u,{repository:e})},e))})}),(0,d.jsx)(n,{title:t.lanes,children:(0,d.jsx)(`ol`,{className:`space-y-2`,children:c.lanes.map(e=>(0,d.jsxs)(`li`,{className:`flex flex-wrap gap-2`,children:[(0,d.jsx)(`span`,{children:e.name}),(0,d.jsx)(`span`,{className:`text-muted-foreground`,children:e.sources.map(e=>`label`in e?e.label:e.state).join(`, `)})]},e.name))})})]})})},p=()=>{let{project:e}=l.useParams(),{data:t}=o(c());return(0,d.jsx)(f,{id:e,configuration:t})};export{p as component};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{I as t,r as n,s as r,st as i,t as a}from"./section-5JEIJP9Q.js";import{t as o}from"./useSuspenseQuery-ajaZl96Y.js";import{t as s}from"./link-3oQYoIpm.js";import{n as c}from"./queries-BCGlJZOP.js";import{c as l}from"./index-DUgI_VkE.js";import{t as u}from"./repository-link-XE85basL.js";var d=e(),f=({id:e,configuration:o})=>{let c=o.projects.find(t=>t.id===e);return(0,d.jsx)(a,{title:c?.name??e,entity:i(`project`,e),children:c===void 0?(0,d.jsx)(r,{title:t.missing,children:null}):(0,d.jsxs)(d.Fragment,{children:[(0,d.jsx)(s,{to:`/projects/$project`,params:{project:e},className:`text-primary hover:underline`,children:t.board}),(0,d.jsx)(n,{title:t.repositories,children:(0,d.jsx)(`ol`,{className:`space-y-2`,children:c.repositories.map(e=>(0,d.jsx)(`li`,{children:(0,d.jsx)(u,{repository:e})},e))})}),(0,d.jsx)(n,{title:t.lanes,children:(0,d.jsx)(`ol`,{className:`space-y-2`,children:c.lanes.map(e=>(0,d.jsxs)(`li`,{className:`flex flex-wrap gap-2`,children:[(0,d.jsx)(`span`,{children:e.name}),(0,d.jsx)(`span`,{className:`text-muted-foreground`,children:e.sources.map(e=>`label`in e?e.label:e.state).join(`, `)})]},e.name))})})]})})},p=()=>{let{project:e}=l.useParams(),{data:t}=o(c());return(0,d.jsx)(f,{id:e,configuration:t})};export{p as component};
@@ -0,0 +1 @@
1
+ import{t as e}from"./route-status-CRkUsWbT.js";var t=e;export{t as errorComponent};
@@ -0,0 +1 @@
1
+ import{t as e}from"./route-status-CRkUsWbT.js";var t=e;export{t as errorComponent};