@usine/server 0.4.1-next.297.g24dc884 → 0.4.1-next.303.g1c1e516

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 (81) hide show
  1. package/README.md +6 -0
  2. package/dist/backend.d.ts.map +1 -1
  3. package/dist/backend.js +1 -1
  4. package/dist/backend.js.map +1 -1
  5. package/dist/web/assets/_agent-XvGye5Za.js +1 -0
  6. package/dist/web/assets/_label-DXCIxlFr.js +1 -0
  7. package/dist/web/assets/{_loop-CXLM87nD.js → _loop-BZT_ZCg1.js} +1 -1
  8. package/dist/web/assets/{_name-D_6q0i39.js → _name-m-K_Cgdd.js} +1 -1
  9. package/dist/web/assets/{_number-DzlrHGHc.js → _number-C9NqNnd9.js} +1 -1
  10. package/dist/web/assets/{_number-CuFa_cu0.js → _number-CwuwfQPJ.js} +1 -1
  11. package/dist/web/assets/_number-cLPgAC29.js +1 -0
  12. package/dist/web/assets/{_project-xTXvJAEk.js → _project-BQemOF4E.js} +1 -1
  13. package/dist/web/assets/{_project-BWOVq6Oz.js → _project-DxPpw_iN.js} +1 -1
  14. package/dist/web/assets/_project-cLPgAC29.js +1 -0
  15. package/dist/web/assets/{_run-Ctv5G8db.js → _run-117_cB2A.js} +1 -1
  16. package/dist/web/assets/_run-cLPgAC29.js +1 -0
  17. package/dist/web/assets/{_worker-DjSAUqR6.js → _worker-CIgttuup.js} +1 -1
  18. package/dist/web/assets/{action-DJYOLxhn.js → action-CFZDB6qU.js} +1 -1
  19. package/dist/web/assets/{actions-DsEnZXEu.js → actions-cinYAAbK.js} +1 -1
  20. package/dist/web/assets/agents-C56TPzq3.js +1 -0
  21. package/dist/web/assets/{agents-g1sk70Cp.js → agents-DWLVylHN.js} +1 -1
  22. package/dist/web/assets/api-DkY40iRU.js +335 -0
  23. package/dist/web/assets/{code-block-Nn1IIrfL.js → code-block-CrqbSTiZ.js} +1 -1
  24. package/dist/web/assets/{drawer-B6zDeWLW.js → drawer-CupsszcH.js} +1 -1
  25. package/dist/web/assets/{edit-and-retry-B0OtOtfz.js → edit-and-retry-C1_0Xdfi.js} +1 -1
  26. package/dist/web/assets/{file-error-BJK6op1P.js → file-error-CHMwps56.js} +1 -1
  27. package/dist/web/assets/{history-BndVmB4C.js → history-Vm6IThJl.js} +1 -1
  28. package/dist/web/assets/{index-CbRNTyi8.js → index-BcpuCkDJ.js} +3 -3
  29. package/dist/web/assets/{label-badge-QOx_nH-H.js → label-badge-C-DfO6Xp.js} +1 -1
  30. package/dist/web/assets/{labels-BIiPC4kS.js → labels-gIs7kFFn.js} +1 -1
  31. package/dist/web/assets/{list-6u0axepP.js → list-BTglr2qR.js} +1 -1
  32. package/dist/web/assets/loops-CsTMQzbj.js +1 -0
  33. package/dist/web/assets/{members-DecnwgrL.js → members-BQZTiA5d.js} +1 -1
  34. package/dist/web/assets/{model-F1HLQfrf.js → model-B0SWT7RV.js} +1 -1
  35. package/dist/web/assets/{moves-D9SXmgnd.js → moves-BGi38htc.js} +1 -1
  36. package/dist/web/assets/{not-found-CgbvvS9i.js → not-found-Cc4tYfdl.js} +1 -1
  37. package/dist/web/assets/{outcome-DdTW8YJ8.js → outcome-DZAXlTj5.js} +1 -1
  38. package/dist/web/assets/{overview-CTpxkXVa.js → overview-BiHYfnVn.js} +1 -1
  39. package/dist/web/assets/{page-CxChE1f9.js → page-B1KSx6Jj.js} +1 -1
  40. package/dist/web/assets/{projects-DEct3qvm.js → projects-D-k9vmta.js} +1 -1
  41. package/dist/web/assets/{queries-B8vjCIOC.js → queries-CdCZ0ZPh.js} +1 -1
  42. package/dist/web/assets/{queries-BNYw2mY-.js → queries-DDLs_9Fj.js} +1 -1
  43. package/dist/web/assets/{queries-B4QNhfM4.js → queries-Di7NtDlt.js} +1 -1
  44. package/dist/web/assets/{queries-C46qdn9C.js → queries-oDOwQQMa.js} +1 -1
  45. package/dist/web/assets/{repositories-QuiwvY4J.js → repositories-41YE_UtP.js} +1 -1
  46. package/dist/web/assets/{repository-link-dmlmZuZQ.js → repository-link-Cl0kRzqp.js} +1 -1
  47. package/dist/web/assets/route-CD7IO5UL.js +1 -0
  48. package/dist/web/assets/{route-status-CC7nI7CP.js → route-status-5PZz-oup.js} +1 -1
  49. package/dist/web/assets/route-tKxDCMRv.js +1 -0
  50. package/dist/web/assets/{routes-Dsc1R9Cf.js → routes-CpAvp0ra.js} +1 -1
  51. package/dist/web/assets/routes-cLPgAC29.js +1 -0
  52. package/dist/web/assets/{run-again-mx4hRPEd.js → run-again-C5FLY1Vp.js} +1 -1
  53. package/dist/web/assets/section-4wsGlTvH.js +24 -0
  54. package/dist/web/assets/{section-BBmCxyXo.js → section-DTAw1Xss.js} +1 -1
  55. package/dist/web/assets/{section-BiX8mjQ0.js → section-qKjEScT7.js} +1 -1
  56. package/dist/web/assets/settings-CRwH-1wM.js +1 -0
  57. package/dist/web/assets/{sign-in-CX6zObk3.js → sign-in-cwQtxWMt.js} +1 -1
  58. package/dist/web/assets/{strings-CfIaIMiC.js → strings-DCFq7v6a.js} +1 -1
  59. package/dist/web/assets/{tasks-Dw7FKak4.js → tasks-DfKVRFF7.js} +1 -1
  60. package/dist/web/assets/tasks-cLPgAC29.js +1 -0
  61. package/dist/web/assets/{tokens-Cm3gOC7v.js → tokens-3nLWOp1j.js} +1 -1
  62. package/dist/web/assets/{usage-DmmcUq-E.js → usage-u-eMccBg.js} +1 -1
  63. package/dist/web/assets/{use-project-links-Bdqs6H65.js → use-project-links-BP4qs0BZ.js} +1 -1
  64. package/dist/web/assets/{useTriggerFocusGuards-Czjr5yfU.js → useTriggerFocusGuards-CohVC-CG.js} +1 -1
  65. package/dist/web/assets/{workers-rSZGoHvC.js → workers-DlU8Ab8P.js} +1 -1
  66. package/dist/web/index.html +12 -12
  67. package/package.json +9 -9
  68. package/dist/web/assets/_agent-C7EWtNTG.js +0 -1
  69. package/dist/web/assets/_label-CUKWo0MS.js +0 -1
  70. package/dist/web/assets/_number-wrLl9KpP.js +0 -1
  71. package/dist/web/assets/_project-wrLl9KpP.js +0 -1
  72. package/dist/web/assets/_run-wrLl9KpP.js +0 -1
  73. package/dist/web/assets/agents-BTEdI1so.js +0 -1
  74. package/dist/web/assets/api-DsTuvRlt.js +0 -313
  75. package/dist/web/assets/loops-CyFWFsxO.js +0 -1
  76. package/dist/web/assets/route-6_pyjeyO.js +0 -1
  77. package/dist/web/assets/route-D9jsgvh7.js +0 -1
  78. package/dist/web/assets/routes-wrLl9KpP.js +0 -1
  79. package/dist/web/assets/section-C2BsZ62c.js +0 -24
  80. package/dist/web/assets/settings-C7py9fR6.js +0 -1
  81. package/dist/web/assets/tasks-wrLl9KpP.js +0 -1
package/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  The foreground CLI for a local [usine](https://github.com/basaltbytes/usine) factory: a thin Node adapter over `@usine/orchestrator`. The library does the polling, schedule triggers, durable execution, worker composition, and operator actions; this package serves their JSON and web surfaces. The [CLI reference](https://docs.usine.dev/reference/configuration/cli/) lists every command, flag, and variable, and [Operate runs](https://docs.usine.dev/guides/operate-runs/) covers day-to-day use.
4
4
 
5
+ The run reader matches GitHub changes to each attempt's worker identity, including exe.dev's integration bot. Board moves retain their operator attribution.
6
+
5
7
  Run it from an instance folder:
6
8
 
7
9
  ```sh
@@ -64,6 +66,10 @@ Direct browser requests for UI routes serve the app shell, so refreshing or shar
64
66
 
65
67
  After `pnpm build`, reload the page to use the new web bundle; no restart is needed.
66
68
 
69
+ ## Webhook delivery hints
70
+
71
+ Set `webhooks.mode: deliveries` in `usine.yaml` and restart `usine up` to check the GitHub App's delivery summaries about every 10 seconds. The App webhook must be active, but it does not need a reachable endpoint. The runtime persists its delivery cursor and uses hints to refresh registered repositories sooner; the normal poll remains active. **Configuration > Settings** shows the running mode and the last hint received since startup.
72
+
67
73
  ## Change the configuration
68
74
 
69
75
  The web UI edits stored entities in their export format, validates each save, and shows revision history and diffs. Concurrent writes return a conflict; the editor retains the draft while the operator reviews the newer text. Create, delete, and revert actions use the same API as other configuration writes. New loops start paused.
@@ -1 +1 @@
1
- {"version":3,"file":"backend.d.ts","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAEA,OAAO,EAEL,KAAK,yBAAyB,EAC9B,KAAK,YAAY,EAClB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAC9C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AAC3D,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,sCAAsC,CAAC;AAC5E,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AACrD,OAAO,EACL,KAAK,SAAS,EACd,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,eAAe,EAEpB,KAAK,aAAa,EAClB,KAAK,oBAAoB,EACzB,KAAK,iBAAiB,EACtB,KAAK,QAAQ,EACb,KAAK,qBAAqB,EAC1B,KAAK,aAAa,EAElB,KAAK,mBAAmB,EACxB,KAAK,YAAY,EACjB,KAAK,mBAAmB,EACxB,KAAK,iBAAiB,EACtB,KAAK,cAAc,EACnB,KAAK,gBAAgB,EACrB,KAAK,QAAQ,EACd,MAAM,8BAA8B,CAAC;AACtC,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,kBAAkB,CAAC;AACnD,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAC7D,OAAO,EAAE,OAAO,EAAY,MAAM,EAAE,KAAK,EAAU,MAAM,EAAE,MAAM,QAAQ,CAAC;;;;AAE1E,qBAAa,uBAAwB,SAAQ,4BAI3C;CAAG;AAEL,MAAM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AK,CAAC,cAAc,CAyCzB,CAAC;AAEL;;;GAGG;AACH,eAAO,MAAM,sBAAsB,cACtB,eAAe,YAChB,MAAM,eACH,mBAAmB,CAAC,SAAS,CAAC,iBAC5B,qBAAqB,CAAC,SAAS,CAAC,oBAC7B,yBAAyB,CAAC,SAAS,CAAC,KACrD,KAAK,CAAC,KAAK,CAAC,cAAc,CAmD5B,CAAC"}
package/dist/backend.js CHANGED
@@ -30,7 +30,7 @@ const loopOf = Effect.fn("FactoryBackend.resolveLoop")(function* (instances, loo
30
30
  export const liveBackendLayer = (instances, operator, configuration) => Layer.succeed(FactoryBackend)({
31
31
  overview: Effect.flatMap(instances.get, operator.overview),
32
32
  detail: (runId, request) => Effect.flatMap(instances.get, (instance) => operator.detail(instance, runId, request)),
33
- githubChanges: operator.githubChanges,
33
+ githubChanges: (runId) => Effect.flatMap(instances.get, (instance) => operator.githubChanges(instance, runId)),
34
34
  approve: (runId) => Effect.flatMap(instances.get, (instance) => operator.approve(instance, runId)),
35
35
  dismissNeed: (key) => Effect.flatMap(instances.get, (instance) => operator.dismissNeed(instance, key)),
36
36
  undoDismissNeed: operator.undoDismissNeed,
@@ -1 +1 @@
1
- {"version":3,"file":"backend.js","sourceRoot":"","sources":["../src/backend.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,uBAAuB,CAAC;AACxD,OAAO,EAAE,YAAY,EAAE,MAAM,sBAAsB,CAAC;AACpD,OAAO,EACL,wBAAwB,GAGzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,QAAQ,EAAE,MAAM,kBAAkB,CAAC;AAC5C,OAAO,EAAE,gBAAgB,EAAE,MAAM,0BAA0B,CAAC;AAC5D,OAAO,EAAE,SAAS,EAAE,MAAM,qBAAqB,CAAC;AAChD,OAAO,EAAE,KAAK,EAAE,MAAM,iBAAiB,CAAC;AACxC,OAAO,EAAE,SAAS,EAAE,MAAM,mBAAmB,CAAC;AAI9C,OAAO,EAKL,kBAAkB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,CACrB,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,WAAW,CAAC,UAAU,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;QACvF,aAAa,EAAE,CAAC,MAAM,EAAE,EAAE,CACxB,MAAM,CAAC,OAAO,CAAC,SAAS,CAAC,GAAG,EAAE,CAAC,QAAQ,EAAE,EAAE,CAAC,WAAW,CAAC,aAAa,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAC;KAC3F,CAAC,CAAC;AACL,CAAC,CAAC"}
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{t}from"./useSuspenseQuery-ajaZl96Y.js";import{n}from"./queries-Di7NtDlt.js";import{d as r}from"./index-BcpuCkDJ.js";import{t as i}from"./agents-DWLVylHN.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};
@@ -0,0 +1 @@
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{Z as t,t as n}from"./section-4wsGlTvH.js";import{u as r}from"./index-BcpuCkDJ.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{D as t,E as n,X as r,a as i,c as a,i as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m,v as h}from"./section-C2BsZ62c.js";import{t as g}from"./useSuspenseQuery-ajaZl96Y.js";import{t as _}from"./link-CXTzqBsX.js";import{n as v,r as y}from"./list-6u0axepP.js";import{r as b}from"./strings-BIVdGoBr.js";import{t as x}from"./error-alert-BOLTerP9.js";import{n as S}from"./queries-B4QNhfM4.js";import{at as C,l as w,v as T}from"./index-CbRNTyi8.js";import{t as E}from"./file-error-BJK6op1P.js";import{t as D}from"./repository-link-dmlmZuZQ.js";var O=e(),k=({loop:e,configuration:t})=>{let r=t.projects.find(t=>e.name.startsWith(`${t.id}/`)),a=t.agents.find(({name:t})=>t===e.agent);return(0,O.jsxs)(i,{children:[r!==void 0&&(0,O.jsx)(o,{label:`Project`,children:(0,O.jsx)(_,{to:`/configuration/projects/$project`,params:{project:r.id},className:`text-primary hover:underline`,children:r.name})}),(0,O.jsxs)(o,{label:`Agent`,children:[(0,O.jsx)(_,{to:`/configuration/agents/$agent`,params:{agent:e.agent},className:`text-primary hover:underline`,children:e.agent}),a!==void 0&&(0,O.jsx)(`p`,{className:`mt-0.5 font-mono text-xs text-muted-foreground`,children:b(a)})]}),(0,O.jsx)(o,{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.jsx)(o,{label:`Approval`,children:h[e.approval]}),(0,O.jsxs)(o,{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)(o,{label:`Permissions`,children:n[e.permissions]}),(0,O.jsx)(o,{label:`Priority`,children:e.priority===null?(0,O.jsx)(m,{children:`None; runs wait in lane order`}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`tabular-nums`,children:e.priority}),` `,(0,O.jsx)(m,{children:`queued ahead of runs in lane order`})]})}),(0,O.jsx)(o,{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:n,pause:r})=>{let i=s(e.prompt).length;return(0,O.jsxs)(O.Fragment,{children:[r?.isError===!0&&(0,O.jsx)(x,{message:r.error.message}),(0,O.jsxs)(c,{facts:(0,O.jsx)(k,{loop:e,configuration:n}),children:[(0,O.jsxs)(d,{title:`Trigger`,children:[(0,O.jsx)(l,{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)(d,{title:`Selector`,children:e.selector===null?(0,O.jsx)(`p`,{className:`text-muted-foreground`,children:`No selector: every registered repository`}):(0,O.jsx)(l,{entries:j(e.selector)})}),(0,O.jsx)(d,{title:`Prompt`,aside:i===0?`Same text for every run`:`${t(i,`outlined expression`)} filled in from each item`,children:(0,O.jsx)(u,{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:r(`loop`,e),title:i.name,marks:(0,O.jsx)(y,{paused:i.paused}),file:i.file,actions:n!==null&&(0,O.jsx)(v,{loop:i,pause:n,variant:`outline`}),children:(0,O.jsx)(M,{loop:i,configuration:t,pause:n})});let o=t.quarantinedLoops.find(t=>t.name===e);return o===void 0?(0,O.jsx)(p,{entity:r(`loop`,e),title:e,children:(0,O.jsxs)(f,{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:r(`loop`,e),title:o.name,marks:(0,O.jsx)(a,{}),file:o.file,children:(0,O.jsx)(E,{error:o.error,consequence:`No runs until the file loads.`})})},P=()=>{let{loop:e}=w.useParams(),{data:t}=g(S());return(0,O.jsx)(N,{name:e,configuration:t,pause:T()})};export{P as component};
1
+ import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{D as t,E as n,Z as r,a as i,c as a,i as o,m as s,n as c,o as l,p as u,r as d,s as f,t as p,u as m,v as h}from"./section-4wsGlTvH.js";import{t as g}from"./useSuspenseQuery-ajaZl96Y.js";import{t as _}from"./link-CXTzqBsX.js";import{n as v,r as y}from"./list-BTglr2qR.js";import{r as b}from"./strings-BIVdGoBr.js";import{t as x}from"./error-alert-BOLTerP9.js";import{n as S}from"./queries-Di7NtDlt.js";import{at as C,l as w,v as T}from"./index-BcpuCkDJ.js";import{t as E}from"./file-error-CHMwps56.js";import{t as D}from"./repository-link-Cl0kRzqp.js";var O=e(),k=({loop:e,configuration:t})=>{let r=t.projects.find(t=>e.name.startsWith(`${t.id}/`)),a=t.agents.find(({name:t})=>t===e.agent);return(0,O.jsxs)(i,{children:[r!==void 0&&(0,O.jsx)(o,{label:`Project`,children:(0,O.jsx)(_,{to:`/configuration/projects/$project`,params:{project:r.id},className:`text-primary hover:underline`,children:r.name})}),(0,O.jsxs)(o,{label:`Agent`,children:[(0,O.jsx)(_,{to:`/configuration/agents/$agent`,params:{agent:e.agent},className:`text-primary hover:underline`,children:e.agent}),a!==void 0&&(0,O.jsx)(`p`,{className:`mt-0.5 font-mono text-xs text-muted-foreground`,children:b(a)})]}),(0,O.jsx)(o,{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.jsx)(o,{label:`Approval`,children:h[e.approval]}),(0,O.jsxs)(o,{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)(o,{label:`Permissions`,children:n[e.permissions]}),(0,O.jsx)(o,{label:`Priority`,children:e.priority===null?(0,O.jsx)(m,{children:`None; runs wait in lane order`}):(0,O.jsxs)(O.Fragment,{children:[(0,O.jsx)(`span`,{className:`tabular-nums`,children:e.priority}),` `,(0,O.jsx)(m,{children:`queued ahead of runs in lane order`})]})}),(0,O.jsx)(o,{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:n,pause:r})=>{let i=s(e.prompt).length;return(0,O.jsxs)(O.Fragment,{children:[r?.isError===!0&&(0,O.jsx)(x,{message:r.error.message}),(0,O.jsxs)(c,{facts:(0,O.jsx)(k,{loop:e,configuration:n}),children:[(0,O.jsxs)(d,{title:`Trigger`,children:[(0,O.jsx)(l,{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)(d,{title:`Selector`,children:e.selector===null?(0,O.jsx)(`p`,{className:`text-muted-foreground`,children:`No selector: every registered repository`}):(0,O.jsx)(l,{entries:j(e.selector)})}),(0,O.jsx)(d,{title:`Prompt`,aside:i===0?`Same text for every run`:`${t(i,`outlined expression`)} filled in from each item`,children:(0,O.jsx)(u,{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:r(`loop`,e),title:i.name,marks:(0,O.jsx)(y,{paused:i.paused}),file:i.file,actions:n!==null&&(0,O.jsx)(v,{loop:i,pause:n,variant:`outline`}),children:(0,O.jsx)(M,{loop:i,configuration:t,pause:n})});let o=t.quarantinedLoops.find(t=>t.name===e);return o===void 0?(0,O.jsx)(p,{entity:r(`loop`,e),title:e,children:(0,O.jsxs)(f,{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:r(`loop`,e),title:o.name,marks:(0,O.jsx)(a,{}),file:o.file,children:(0,O.jsx)(E,{error:o.error,consequence:`No runs until the file loads.`})})},P=()=>{let{loop:e}=w.useParams(),{data:t}=g(S());return(0,O.jsx)(N,{name:e,configuration:t,pause:T()})};export{P as component};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{A as t,X as n,a as r,i,n as a,r as o,s,t as c,u as l}from"./section-C2BsZ62c.js";import{t as u}from"./useSuspenseQuery-ajaZl96Y.js";import{t as d}from"./link-CXTzqBsX.js";import{n as f}from"./queries-B4QNhfM4.js";import{Y as p,a as m}from"./index-CbRNTyi8.js";import{t as h}from"./label-badge-QOx_nH-H.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:n})=>(0,g.jsxs)(r,{children:[(0,g.jsx)(i,{label:t.project,children:n===void 0?(0,g.jsx)(l,{children:t.unassignedProject}):(0,g.jsx)(d,{to:`/configuration/projects/$project`,params:{project:n.id},className:`text-primary hover:underline`,children:n.name})}),n!==void 0&&(0,g.jsx)(i,{label:`Board`,children:(0,g.jsx)(d,{to:`/projects/$project`,params:{project:n.id},className:`text-primary hover:underline`,children:t.board})}),(0,g.jsx)(i,{label:`Tags`,children:e.tags.length===0?(0,g.jsx)(l,{children:`None`}):e.tags.join(`, `)}),(0,g.jsx)(i,{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:r})=>{let i=`${e}/${t}`,u=r.repositories.find(e=>e.name.toLowerCase()===i.toLowerCase());return u===void 0?(0,g.jsx)(c,{entity:n(`repository`,i),title:i,children:(0,g.jsxs)(s,{title:`Repository not registered`,children:[i,` 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:n(`repository`,u.name),title:u.name,leading:(0,g.jsx)(p,{repository:u.name,size:`title`}),children:(0,g.jsx)(a,{facts:(0,g.jsx)(v,{repository:u,project:r.projects.find(e=>e.includes(u.name))}),children:(0,g.jsx)(o,{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{A as t,Z as n,a as r,i,n as a,r as o,s,t as c,u as l}from"./section-4wsGlTvH.js";import{t as u}from"./useSuspenseQuery-ajaZl96Y.js";import{t as d}from"./link-CXTzqBsX.js";import{n as f}from"./queries-Di7NtDlt.js";import{Y as p,a as m}from"./index-BcpuCkDJ.js";import{t as h}from"./label-badge-C-DfO6Xp.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:n})=>(0,g.jsxs)(r,{children:[(0,g.jsx)(i,{label:t.project,children:n===void 0?(0,g.jsx)(l,{children:t.unassignedProject}):(0,g.jsx)(d,{to:`/configuration/projects/$project`,params:{project:n.id},className:`text-primary hover:underline`,children:n.name})}),n!==void 0&&(0,g.jsx)(i,{label:`Board`,children:(0,g.jsx)(d,{to:`/projects/$project`,params:{project:n.id},className:`text-primary hover:underline`,children:t.board})}),(0,g.jsx)(i,{label:`Tags`,children:e.tags.length===0?(0,g.jsx)(l,{children:`None`}):e.tags.join(`, `)}),(0,g.jsx)(i,{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:r})=>{let i=`${e}/${t}`,u=r.repositories.find(e=>e.name.toLowerCase()===i.toLowerCase());return u===void 0?(0,g.jsx)(c,{entity:n(`repository`,i),title:i,children:(0,g.jsxs)(s,{title:`Repository not registered`,children:[i,` 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:n(`repository`,u.name),title:u.name,leading:(0,g.jsx)(p,{repository:u.name,size:`title`}),children:(0,g.jsx)(a,{facts:(0,g.jsx)(v,{repository:u,project:r.projects.find(e=>e.includes(u.name))}),children:(0,g.jsx)(o,{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 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{t}from"./index-CbRNTyi8.js";import{n,t as r}from"./not-found-CgbvvS9i.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-BcpuCkDJ.js";import{n,t as r}from"./not-found-Cc4tYfdl.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 +1 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{t as r}from"./use-project-links-Bdqs6H65.js";import{t as i}from"./useSuspenseQuery-ajaZl96Y.js";import{a,c as o,h as s,i as c,l,n as u,o as d,s as f,v as p}from"./actions-DsEnZXEu.js";import{n as m,t as h}from"./useNavigate-I5E4IRt2.js";import{t as g}from"./link-CXTzqBsX.js";import{r as _,t as v}from"./mark-Bcl_OnGe.js";import{c as y,l as b,n as x,s as S,t as ee}from"./moves-D9SXmgnd.js";import{r as te}from"./native-select-B1ICB22h.js";import{r as C,t as w}from"./button-C-mC9M4I.js";import{l as ne,s as T}from"./useTriggerFocusGuards-Czjr5yfU.js";import{i as E}from"./context-8jHKzDOY.js";import{Dn as re,En as ie,Ln as ae,Pn as D,a as oe,wn as se}from"./api-DsTuvRlt.js";import{o as O,s as ce,v as k}from"./strings-BIVdGoBr.js";import{D as le,E as A,F as ue,M as j,N as de,P as fe,i as M,j as N,n as pe,r as me}from"./overview-CTpxkXVa.js";import{a as he,n as ge,r as _e}from"./page-CxChE1f9.js";import{t as P}from"./error-alert-BOLTerP9.js";import{A as F,F as I,I as ve,M as ye,N as be,O as xe,P as Se,R as Ce,j as we,k as Te,lt as Ee,n as De,t as Oe}from"./index-CbRNTyi8.js";import{t as ke}from"./pull-request-marks-DIYk7AMY.js";import{n as L,t as Ae}from"./status-badge-DINlptKX.js";import{n as je,t as Me}from"./edit-and-retry-B0OtOtfz.js";import{a as Ne,i as R,n as z,o as B,r as V,t as H}from"./table-D3--FtAd.js";import{t as U}from"./fill-cell-5J3dwnZY.js";import{t as W}from"./label-badge-QOx_nH-H.js";import{a as Pe,n as Fe,t as Ie}from"./model-F1HLQfrf.js";import{n as Le,t as Re}from"./run-again-mx4hRPEd.js";import{a as ze,i as G,n as K,r as q,t as J}from"./section-BBmCxyXo.js";import{t as Be}from"./not-found-CgbvvS9i.js";var Y=n(),Ve=e=>e.postedAt===null?e.attemptEndedAt===null?null:{at:e.attemptEndedAt,title:`Posted during the attempt that ended ${k(e.attemptEndedAt)}`}:{at:e.postedAt,title:`Posted ${k(e.postedAt)}`},He=({task:e})=>{let t=r(),n=new Map(e.runs.map(e=>[e.id,e])),i=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)(H,{"aria-labelledby":`task-comments`,children:(0,Y.jsx)(z,{className:`border-t`,children:e.comments.map(e=>{let r=n.get(e.runId),a=r===void 0?void 0:i.get(r.itemKey),o=Ve(e);return(0,Y.jsxs)(B,{className:q,children:[(0,Y.jsx)(U,{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:[Fe(e.kind),a!==void 0&&(0,Y.jsxs)(`span`,{className:`ml-2 text-xs font-normal text-muted-foreground`,children:[`on `,(0,Y.jsx)(v,{item:a,linked:!1})]})]})}),(0,Y.jsx)(V,{className:`py-3`,children:r!==void 0&&(0,Y.jsx)(g,{...t.run(r.repository,r.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:r.loop})}),(0,Y.jsx)(V,{className:`py-3 text-right`,children:o!==null&&(0,Y.jsx)(`time`,{dateTime:o.at,title:o.title,className:`font-mono text-xs text-muted-foreground tabular-nums`,children:O(o.at)})})]},e.url)})})})})]})},Ue=({task:e,project:t,disabled:n})=>{let r=ee(t),[i]=e.items,a=e.items.find(({itemKey:t})=>t===e.current)??i,c=t.board.lanes.flatMap(e=>e.items.map(t=>({lane:e,card:t}))).find(({card:t})=>t.itemKey===e.current),u=c===void 0?void 0:r.moves.find(({itemKey:e})=>e===c.card.itemKey),p=c===void 0?[]:t.board.lanes.filter(e=>e._tag===`WritableBoardLane`&&e.id!==c.lane.id),m=t.board.lanes.find(({id:e})=>e===u?.toLane)?.name??c?.lane.name??e.lane.name,h=new Set(t.board.lanes.flatMap(e=>e._tag===`WritableBoardLane`?e.labels:[])),g=c===void 0?a.labels:x(c.card,c.lane).filter(e=>u===void 0||!h.has(e)),v=new Map(t.labels.map(e=>[e.name,e])),b=!n&&!r.isPending&&u===void 0&&p.length>0;E(c!==void 0&&b?p.map(e=>({label:y(e.name),run:()=>r.moveItem(c.card,e)})):[]);let{origin:C,pullRequests:T}=ne(e.items);return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Y.jsx)(_e,{actionsBeside:`sm`,heading:(0,Y.jsx)(Ce,{variant:`page`,item:ae(C),title:e.title}),facts:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(ke,{pullRequests:T}),(0,Y.jsx)(ge,{icon:Ee,title:`Lane`,children:(0,Y.jsx)(`span`,{className:`text-foreground`,children:m})}),u!==void 0&&(0,Y.jsx)(`span`,{role:`status`,children:S(u.phase)}),g.length>0&&(0,Y.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:g.map(e=>(0,Y.jsx)(W,{name:e,label:v.get(e)},e))}),e.needsYou&&(0,Y.jsx)(Ae,{})]}),...c!==void 0&&b?{actions:(0,Y.jsxs)(d,{children:[(0,Y.jsxs)(s,{render:(0,Y.jsx)(w,{variant:`outline`}),"aria-label":`Move ${_(a)} to another lane`,children:[`Move to`,(0,Y.jsx)(te,{"data-icon":`inline-end`,"aria-hidden":`true`})]}),(0,Y.jsx)(f,{align:`end`,className:`w-auto min-w-40`,children:(0,Y.jsx)(o,{children:p.map(e=>(0,Y.jsx)(l,{onClick:()=>r.moveItem(c.card,e),children:e.name},e.id))})})]})}:{}}),r.error!==null&&(0,Y.jsx)(P,{className:`max-w-3xl`,message:r.error.message})]})},We=({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)(H,{"aria-labelledby":`task-pull-requests`,children:(0,Y.jsx)(z,{className:`border-t`,children:t.map(e=>(0,Y.jsxs)(B,{className:q,children:[(0,Y.jsx)(V,{className:`w-0 py-3`,children:(0,Y.jsx)(v,{item:e,linked:!1})}),(0,Y.jsx)(U,{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)(b,{className:`ml-1.5 inline size-3.5 text-muted-foreground`,"aria-label":`Opens on GitHub`})]})}),(0,Y.jsx)(V,{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=he(3e4);return D(Ie(e,t),{onNone:()=>null,onSome:e=>(0,Y.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,title:`Total attempt time`,children:ce(e)})})},Ge=({run:e})=>D(Pe(e),{onNone:()=>null,onSome:e=>(0,Y.jsxs)(`p`,{className:`line-clamp-2 text-xs wrap-anywhere`,title:A(e),children:[(0,Y.jsx)(`span`,{className:`font-medium text-destructive`,children:le(e)}),` `,(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:A(e)})]})}),Q=({run:e})=>(0,Y.jsx)(`time`,{dateTime:e.openedAt,title:`Opened ${k(e.openedAt)}`,className:`font-mono text-xs whitespace-nowrap tabular-nums`,children:O(e.openedAt)}),$=({pullRequest:e})=>D(e,{onNone:()=>null,onSome:e=>(0,Y.jsx)(v,{item:e,className:`relative z-10`})}),Ke=(e,t)=>`${e} ${t}${e===1?``:`s`}`,qe=({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:Ke(e.attempts.length,`attempt`)}),(0,Y.jsx)(Z,{run:e}),(0,Y.jsx)(Q,{run:e}),(0,Y.jsx)($,{pullRequest:t})]}),Je=e=>e.canApprove?`approve`:e.canRetry&&e.canResolveFailure?`retry`:null,Ye=({run:e,onEdit:t,openRun:n,status:r})=>{let i=c(),m=a(),[h,g]=(0,X.useState)(!1),_=t=>i.mutate({runId:e.id,request:t},{onSuccess:()=>r(null),onError:e=>r((0,Y.jsx)(`span`,{className:`text-destructive`,children:e.message}))}),v=()=>m.mutate(u(e),{onSuccess:e=>{e._tag===`Claimed`?(r(null),n(e.runId)):r((0,Y.jsx)(`span`,{className:`text-needs-you`,children:fe}))},onError:e=>r((0,Y.jsx)(`span`,{className:`text-destructive`,children:e.message}))}),y=e.attempts.at(-1),b=Je(e),x=y?.outcome?._tag===`Failed`&&y.outcome.failure._tag===`QuestionFailure`,S=[];return e.canApprove&&b!==`approve`&&S.push({label:j.approve,select:()=>_({action:`approve`})}),e.canRetry&&b!==`retry`&&S.push({label:j.retry,description:N(e.agentBrain),select:()=>_({action:`retry`})}),e.canRetry&&S.push({label:`Edit and retry`,select:()=>t(`retry`)}),e.canRunAgain&&(S.push({label:j.runAgain,select:v}),S.push({label:`Edit and run again`,select:()=>t(`runAgain`)})),e.canResolveFailure&&y!==void 0&&S.push({label:x?`Mark answered`:`Mark resolved`,select:()=>_({action:`resolveFailure`,attemptId:y.id})}),e.canCancel&&S.push({label:j.cancel,destructive:!0,select:()=>g(!0)}),E(i.isPending||m.isPending||h?[]:[...b===null?[]:[{label:j[b],select:()=>_({action:b})}],...S].map(({label:t,select:n})=>({label:`${t} · ${e.loop} · ${e.id.slice(0,8)}`,run:n}))),i.isPending&&i.variables!==void 0?(0,Y.jsx)(`span`,{role:`status`,className:`text-xs text-muted-foreground`,children:de[i.variables.request.action]}):m.isPending?(0,Y.jsx)(`span`,{role:`status`,className:`text-xs text-muted-foreground`,children:ue}):(0,Y.jsxs)(`div`,{className:`relative z-10 flex items-center justify-end gap-1`,children:[b!==null&&(0,Y.jsx)(w,{variant:`outline`,size:`sm`,title:b===`retry`?N(e.agentBrain):void 0,onClick:()=>_({action:b}),children:j[b]}),S.length>0&&(0,Y.jsxs)(d,{children:[(0,Y.jsx)(s,{render:(0,Y.jsx)(w,{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 ${O(e.openedAt)}`,children:(0,Y.jsx)(p,{weight:`bold`,className:`size-4`,"aria-hidden":`true`})}),(0,Y.jsx)(f,{align:`end`,className:`w-auto min-w-44`,children:(0,Y.jsx)(o,{children:S.map(({label:e,description:t,destructive:n,select:r})=>(0,Y.jsx)(l,{title:t,variant:n===!0?`destructive`:`default`,onClick:r,children:e},e))})})]}),e.canCancel&&(0,Y.jsx)(Te,{open:h,onOpenChange:g,children:(0,Y.jsxs)(ye,{children:[(0,Y.jsxs)(I,{children:[(0,Y.jsxs)(ve,{children:[`Cancel `,e.loop,`?`]}),(0,Y.jsx)(be,{children:`The run stops, including any attempt in progress.`})]}),(0,Y.jsxs)(Se,{children:[(0,Y.jsx)(we,{children:j.keepRunning}),(0,Y.jsx)(F,{variant:`destructive`,onClick:()=>{g(!1),_({action:`cancel`})},children:j.confirmCancel})]})]})})]})},Xe=8,Ze=({run:e,item:t,pullRequest:n,openRun:i})=>{let a=r(),[o,s]=(0,X.useState)(null),[c,l]=(0,X.useState)(null);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(B,{className:C(q,`[&>td]:align-top`),children:[(0,Y.jsx)(V,{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)(L,{state:e.state,className:`ml-0.75`}),e.state]})}),(0,Y.jsx)(U,{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)(L,{state:e.state,className:`ml-0.75 self-center sm:hidden`}),(0,Y.jsx)(g,{"data-row-link":!0,...a.run(e.repository,e.id),className:C(`font-medium wrap-anywhere`,G),children:e.loop}),t!==null&&(0,Y.jsx)(v,{item:t,className:`relative z-10 shrink-0`})]}),(0,Y.jsx)(Ge,{run:e}),e.runAgain!==null&&(0,Y.jsx)(Re,{run:e,source:`link`,className:`text-xs`}),e.approval!==null&&(0,Y.jsx)(Le,{approval:e.approval,className:`text-xs`}),(0,Y.jsx)(qe,{run:e,pullRequest:n}),c!==null&&(0,Y.jsx)(`p`,{role:`status`,className:`text-xs`,children:c})]})}),(0,Y.jsx)(V,{className:`hidden py-3 xl:table-cell`,children:e.agent}),(0,Y.jsx)(V,{className:`hidden py-3 text-right tabular-nums xl:table-cell`,children:e.attempts.length}),(0,Y.jsx)(V,{className:`hidden py-3 text-right xl:table-cell`,children:(0,Y.jsx)(Z,{run:e})}),(0,Y.jsx)(V,{className:`hidden py-3 xl:table-cell`,children:(0,Y.jsx)(Q,{run:e})}),(0,Y.jsx)(V,{className:`hidden py-3 xl:table-cell`,children:(0,Y.jsx)($,{pullRequest:n})}),(0,Y.jsx)(V,{className:`py-2.5`,children:(0,Y.jsx)(Ye,{run:e,onEdit:s,openRun:i,status:l})})]}),o!==null&&je(e,o)&&(0,Y.jsx)(B,{className:`hover:bg-transparent`,children:(0,Y.jsx)(V,{colSpan:Xe,className:`px-2 pt-1 pb-4 whitespace-normal`,children:(0,Y.jsx)(Me,{run:e,intent:o,close:()=>s(null),openRun:i,className:`max-w-2xl rounded-lg border p-4`},`${e.id}:${o}`)})})]})},Qe=({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)(H,{children:[(0,Y.jsx)(Ne,{children:(0,Y.jsxs)(B,{className:`hover:bg-transparent`,children:[(0,Y.jsx)(R,{className:`hidden sm:table-cell`,children:`State`}),(0,Y.jsx)(R,{children:`Run`}),(0,Y.jsx)(R,{className:`hidden xl:table-cell`,children:`Agent`}),(0,Y.jsx)(R,{className:`hidden text-right xl:table-cell`,children:`Attempts`}),(0,Y.jsx)(R,{className:`hidden text-right xl:table-cell`,children:`Duration`}),(0,Y.jsx)(R,{className:`hidden xl:table-cell`,children:`Opened`}),(0,Y.jsx)(R,{className:`hidden xl:table-cell`,children:`Pull request`}),(0,Y.jsx)(R,{children:(0,Y.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,Y.jsx)(z,{children:e.runs.map(i=>{let a=ie(re(i.pullRequestUrl),t=>T(t,e.items)),o=r?n.get(i.itemKey)??null:null;return(0,Y.jsx)(Ze,{run:i,item:o===null||se(a,({number:e})=>e===o.number)?null:o,pullRequest:a,openRun:t},i.id)})})]})})]})},$e=({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})}),et=({repository:e,number:t})=>{let{data:n}=i(pe()),r=me(n.projects,e),a=m(),o=xe(),s=i(De(e,t));if(s.error instanceof oe&&s.error.error===`BoardItemNotFoundError`)return(0,Y.jsx)(Be,{repository:e,number:String(t)});let c=s.isError&&(0,Y.jsx)(P,{className:`max-w-3xl`,title:`Could not refresh the task`,message:s.error.message}),l=s.data;return l.number!==t&&r!==void 0?(0,Y.jsx)(h,{to:`/projects/$project/tasks/$number`,params:{project:M(r),number:String(l.number)},search:t=>({...t,repository:e}),replace:!0}):(0,Y.jsxs)($e,{children:[r!==void 0&&r.repositories.length>1&&(0,Y.jsx)(ze,{repositories:r.repositories,value:e,onChange:e=>void a({to:`/projects/$project/tasks`,params:{project:M(r)},search:{repository:e}})}),c,r!==void 0&&(0,Y.jsx)(Ue,{task:l,project:r,disabled:n._tag===`NeedsSetup`}),(0,Y.jsx)(Qe,{task:l,openRun:o}),(0,Y.jsx)(We,{task:l}),(0,Y.jsx)(He,{task:l})]})},tt=()=>{let{repository:e,number:t}=Oe.useLoaderData();return(0,Y.jsx)(et,{repository:e,number:t},`${e}#${t}`)};export{tt as component};
1
+ import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{t as r}from"./use-project-links-BP4qs0BZ.js";import{t as i}from"./useSuspenseQuery-ajaZl96Y.js";import{a,c as o,h as s,i as c,l,n as u,o as d,s as f,v as p}from"./actions-cinYAAbK.js";import{n as m,t as h}from"./useNavigate-I5E4IRt2.js";import{t as g}from"./link-CXTzqBsX.js";import{r as _,t as v}from"./mark-Bcl_OnGe.js";import{c as y,l as b,n as x,s as S,t as ee}from"./moves-BGi38htc.js";import{r as te}from"./native-select-B1ICB22h.js";import{r as C,t as w}from"./button-C-mC9M4I.js";import{l as ne,s as T}from"./useTriggerFocusGuards-CohVC-CG.js";import{i as E}from"./context-8jHKzDOY.js";import{Dn as re,En as ie,Ln as ae,Pn as D,a as oe,wn as se}from"./api-DkY40iRU.js";import{o as O,s as ce,v as k}from"./strings-BIVdGoBr.js";import{D as le,E as A,F as ue,M as j,N as de,P as fe,i as M,j as N,n as pe,r as me}from"./overview-BiHYfnVn.js";import{a as he,n as ge,r as _e}from"./page-B1KSx6Jj.js";import{t as P}from"./error-alert-BOLTerP9.js";import{A as F,F as I,I as ve,M as ye,N as be,O as xe,P as Se,R as Ce,j as we,k as Te,lt as Ee,n as De,t as Oe}from"./index-BcpuCkDJ.js";import{t as ke}from"./pull-request-marks-DIYk7AMY.js";import{n as L,t as Ae}from"./status-badge-DINlptKX.js";import{n as je,t as Me}from"./edit-and-retry-C1_0Xdfi.js";import{a as Ne,i as R,n as z,o as B,r as V,t as H}from"./table-D3--FtAd.js";import{t as U}from"./fill-cell-5J3dwnZY.js";import{t as W}from"./label-badge-C-DfO6Xp.js";import{a as Pe,n as Fe,t as Ie}from"./model-B0SWT7RV.js";import{n as Le,t as Re}from"./run-again-C5FLY1Vp.js";import{a as ze,i as G,n as K,r as q,t as J}from"./section-DTAw1Xss.js";import{t as Be}from"./not-found-Cc4tYfdl.js";var Y=n(),Ve=e=>e.postedAt===null?e.attemptEndedAt===null?null:{at:e.attemptEndedAt,title:`Posted during the attempt that ended ${k(e.attemptEndedAt)}`}:{at:e.postedAt,title:`Posted ${k(e.postedAt)}`},He=({task:e})=>{let t=r(),n=new Map(e.runs.map(e=>[e.id,e])),i=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)(H,{"aria-labelledby":`task-comments`,children:(0,Y.jsx)(z,{className:`border-t`,children:e.comments.map(e=>{let r=n.get(e.runId),a=r===void 0?void 0:i.get(r.itemKey),o=Ve(e);return(0,Y.jsxs)(B,{className:q,children:[(0,Y.jsx)(U,{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:[Fe(e.kind),a!==void 0&&(0,Y.jsxs)(`span`,{className:`ml-2 text-xs font-normal text-muted-foreground`,children:[`on `,(0,Y.jsx)(v,{item:a,linked:!1})]})]})}),(0,Y.jsx)(V,{className:`py-3`,children:r!==void 0&&(0,Y.jsx)(g,{...t.run(r.repository,r.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:r.loop})}),(0,Y.jsx)(V,{className:`py-3 text-right`,children:o!==null&&(0,Y.jsx)(`time`,{dateTime:o.at,title:o.title,className:`font-mono text-xs text-muted-foreground tabular-nums`,children:O(o.at)})})]},e.url)})})})})]})},Ue=({task:e,project:t,disabled:n})=>{let r=ee(t),[i]=e.items,a=e.items.find(({itemKey:t})=>t===e.current)??i,c=t.board.lanes.flatMap(e=>e.items.map(t=>({lane:e,card:t}))).find(({card:t})=>t.itemKey===e.current),u=c===void 0?void 0:r.moves.find(({itemKey:e})=>e===c.card.itemKey),p=c===void 0?[]:t.board.lanes.filter(e=>e._tag===`WritableBoardLane`&&e.id!==c.lane.id),m=t.board.lanes.find(({id:e})=>e===u?.toLane)?.name??c?.lane.name??e.lane.name,h=new Set(t.board.lanes.flatMap(e=>e._tag===`WritableBoardLane`?e.labels:[])),g=c===void 0?a.labels:x(c.card,c.lane).filter(e=>u===void 0||!h.has(e)),v=new Map(t.labels.map(e=>[e.name,e])),b=!n&&!r.isPending&&u===void 0&&p.length>0;E(c!==void 0&&b?p.map(e=>({label:y(e.name),run:()=>r.moveItem(c.card,e)})):[]);let{origin:C,pullRequests:T}=ne(e.items);return(0,Y.jsxs)(`div`,{className:`flex flex-col gap-3`,children:[(0,Y.jsx)(_e,{actionsBeside:`sm`,heading:(0,Y.jsx)(Ce,{variant:`page`,item:ae(C),title:e.title}),facts:(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsx)(ke,{pullRequests:T}),(0,Y.jsx)(ge,{icon:Ee,title:`Lane`,children:(0,Y.jsx)(`span`,{className:`text-foreground`,children:m})}),u!==void 0&&(0,Y.jsx)(`span`,{role:`status`,children:S(u.phase)}),g.length>0&&(0,Y.jsx)(`span`,{className:`flex flex-wrap gap-1`,children:g.map(e=>(0,Y.jsx)(W,{name:e,label:v.get(e)},e))}),e.needsYou&&(0,Y.jsx)(Ae,{})]}),...c!==void 0&&b?{actions:(0,Y.jsxs)(d,{children:[(0,Y.jsxs)(s,{render:(0,Y.jsx)(w,{variant:`outline`}),"aria-label":`Move ${_(a)} to another lane`,children:[`Move to`,(0,Y.jsx)(te,{"data-icon":`inline-end`,"aria-hidden":`true`})]}),(0,Y.jsx)(f,{align:`end`,className:`w-auto min-w-40`,children:(0,Y.jsx)(o,{children:p.map(e=>(0,Y.jsx)(l,{onClick:()=>r.moveItem(c.card,e),children:e.name},e.id))})})]})}:{}}),r.error!==null&&(0,Y.jsx)(P,{className:`max-w-3xl`,message:r.error.message})]})},We=({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)(H,{"aria-labelledby":`task-pull-requests`,children:(0,Y.jsx)(z,{className:`border-t`,children:t.map(e=>(0,Y.jsxs)(B,{className:q,children:[(0,Y.jsx)(V,{className:`w-0 py-3`,children:(0,Y.jsx)(v,{item:e,linked:!1})}),(0,Y.jsx)(U,{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)(b,{className:`ml-1.5 inline size-3.5 text-muted-foreground`,"aria-label":`Opens on GitHub`})]})}),(0,Y.jsx)(V,{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=he(3e4);return D(Ie(e,t),{onNone:()=>null,onSome:e=>(0,Y.jsx)(`span`,{className:`font-mono text-xs tabular-nums`,title:`Total attempt time`,children:ce(e)})})},Ge=({run:e})=>D(Pe(e),{onNone:()=>null,onSome:e=>(0,Y.jsxs)(`p`,{className:`line-clamp-2 text-xs wrap-anywhere`,title:A(e),children:[(0,Y.jsx)(`span`,{className:`font-medium text-destructive`,children:le(e)}),` `,(0,Y.jsx)(`span`,{className:`text-muted-foreground`,children:A(e)})]})}),Q=({run:e})=>(0,Y.jsx)(`time`,{dateTime:e.openedAt,title:`Opened ${k(e.openedAt)}`,className:`font-mono text-xs whitespace-nowrap tabular-nums`,children:O(e.openedAt)}),$=({pullRequest:e})=>D(e,{onNone:()=>null,onSome:e=>(0,Y.jsx)(v,{item:e,className:`relative z-10`})}),Ke=(e,t)=>`${e} ${t}${e===1?``:`s`}`,qe=({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:Ke(e.attempts.length,`attempt`)}),(0,Y.jsx)(Z,{run:e}),(0,Y.jsx)(Q,{run:e}),(0,Y.jsx)($,{pullRequest:t})]}),Je=e=>e.canApprove?`approve`:e.canRetry&&e.canResolveFailure?`retry`:null,Ye=({run:e,onEdit:t,openRun:n,status:r})=>{let i=c(),m=a(),[h,g]=(0,X.useState)(!1),_=t=>i.mutate({runId:e.id,request:t},{onSuccess:()=>r(null),onError:e=>r((0,Y.jsx)(`span`,{className:`text-destructive`,children:e.message}))}),v=()=>m.mutate(u(e),{onSuccess:e=>{e._tag===`Claimed`?(r(null),n(e.runId)):r((0,Y.jsx)(`span`,{className:`text-needs-you`,children:fe}))},onError:e=>r((0,Y.jsx)(`span`,{className:`text-destructive`,children:e.message}))}),y=e.attempts.at(-1),b=Je(e),x=y?.outcome?._tag===`Failed`&&y.outcome.failure._tag===`QuestionFailure`,S=[];return e.canApprove&&b!==`approve`&&S.push({label:j.approve,select:()=>_({action:`approve`})}),e.canRetry&&b!==`retry`&&S.push({label:j.retry,description:N(e.agentBrain),select:()=>_({action:`retry`})}),e.canRetry&&S.push({label:`Edit and retry`,select:()=>t(`retry`)}),e.canRunAgain&&(S.push({label:j.runAgain,select:v}),S.push({label:`Edit and run again`,select:()=>t(`runAgain`)})),e.canResolveFailure&&y!==void 0&&S.push({label:x?`Mark answered`:`Mark resolved`,select:()=>_({action:`resolveFailure`,attemptId:y.id})}),e.canCancel&&S.push({label:j.cancel,destructive:!0,select:()=>g(!0)}),E(i.isPending||m.isPending||h?[]:[...b===null?[]:[{label:j[b],select:()=>_({action:b})}],...S].map(({label:t,select:n})=>({label:`${t} · ${e.loop} · ${e.id.slice(0,8)}`,run:n}))),i.isPending&&i.variables!==void 0?(0,Y.jsx)(`span`,{role:`status`,className:`text-xs text-muted-foreground`,children:de[i.variables.request.action]}):m.isPending?(0,Y.jsx)(`span`,{role:`status`,className:`text-xs text-muted-foreground`,children:ue}):(0,Y.jsxs)(`div`,{className:`relative z-10 flex items-center justify-end gap-1`,children:[b!==null&&(0,Y.jsx)(w,{variant:`outline`,size:`sm`,title:b===`retry`?N(e.agentBrain):void 0,onClick:()=>_({action:b}),children:j[b]}),S.length>0&&(0,Y.jsxs)(d,{children:[(0,Y.jsx)(s,{render:(0,Y.jsx)(w,{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 ${O(e.openedAt)}`,children:(0,Y.jsx)(p,{weight:`bold`,className:`size-4`,"aria-hidden":`true`})}),(0,Y.jsx)(f,{align:`end`,className:`w-auto min-w-44`,children:(0,Y.jsx)(o,{children:S.map(({label:e,description:t,destructive:n,select:r})=>(0,Y.jsx)(l,{title:t,variant:n===!0?`destructive`:`default`,onClick:r,children:e},e))})})]}),e.canCancel&&(0,Y.jsx)(Te,{open:h,onOpenChange:g,children:(0,Y.jsxs)(ye,{children:[(0,Y.jsxs)(I,{children:[(0,Y.jsxs)(ve,{children:[`Cancel `,e.loop,`?`]}),(0,Y.jsx)(be,{children:`The run stops, including any attempt in progress.`})]}),(0,Y.jsxs)(Se,{children:[(0,Y.jsx)(we,{children:j.keepRunning}),(0,Y.jsx)(F,{variant:`destructive`,onClick:()=>{g(!1),_({action:`cancel`})},children:j.confirmCancel})]})]})})]})},Xe=8,Ze=({run:e,item:t,pullRequest:n,openRun:i})=>{let a=r(),[o,s]=(0,X.useState)(null),[c,l]=(0,X.useState)(null);return(0,Y.jsxs)(Y.Fragment,{children:[(0,Y.jsxs)(B,{className:C(q,`[&>td]:align-top`),children:[(0,Y.jsx)(V,{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)(L,{state:e.state,className:`ml-0.75`}),e.state]})}),(0,Y.jsx)(U,{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)(L,{state:e.state,className:`ml-0.75 self-center sm:hidden`}),(0,Y.jsx)(g,{"data-row-link":!0,...a.run(e.repository,e.id),className:C(`font-medium wrap-anywhere`,G),children:e.loop}),t!==null&&(0,Y.jsx)(v,{item:t,className:`relative z-10 shrink-0`})]}),(0,Y.jsx)(Ge,{run:e}),e.runAgain!==null&&(0,Y.jsx)(Re,{run:e,source:`link`,className:`text-xs`}),e.approval!==null&&(0,Y.jsx)(Le,{approval:e.approval,className:`text-xs`}),(0,Y.jsx)(qe,{run:e,pullRequest:n}),c!==null&&(0,Y.jsx)(`p`,{role:`status`,className:`text-xs`,children:c})]})}),(0,Y.jsx)(V,{className:`hidden py-3 xl:table-cell`,children:e.agent}),(0,Y.jsx)(V,{className:`hidden py-3 text-right tabular-nums xl:table-cell`,children:e.attempts.length}),(0,Y.jsx)(V,{className:`hidden py-3 text-right xl:table-cell`,children:(0,Y.jsx)(Z,{run:e})}),(0,Y.jsx)(V,{className:`hidden py-3 xl:table-cell`,children:(0,Y.jsx)(Q,{run:e})}),(0,Y.jsx)(V,{className:`hidden py-3 xl:table-cell`,children:(0,Y.jsx)($,{pullRequest:n})}),(0,Y.jsx)(V,{className:`py-2.5`,children:(0,Y.jsx)(Ye,{run:e,onEdit:s,openRun:i,status:l})})]}),o!==null&&je(e,o)&&(0,Y.jsx)(B,{className:`hover:bg-transparent`,children:(0,Y.jsx)(V,{colSpan:Xe,className:`px-2 pt-1 pb-4 whitespace-normal`,children:(0,Y.jsx)(Me,{run:e,intent:o,close:()=>s(null),openRun:i,className:`max-w-2xl rounded-lg border p-4`},`${e.id}:${o}`)})})]})},Qe=({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)(H,{children:[(0,Y.jsx)(Ne,{children:(0,Y.jsxs)(B,{className:`hover:bg-transparent`,children:[(0,Y.jsx)(R,{className:`hidden sm:table-cell`,children:`State`}),(0,Y.jsx)(R,{children:`Run`}),(0,Y.jsx)(R,{className:`hidden xl:table-cell`,children:`Agent`}),(0,Y.jsx)(R,{className:`hidden text-right xl:table-cell`,children:`Attempts`}),(0,Y.jsx)(R,{className:`hidden text-right xl:table-cell`,children:`Duration`}),(0,Y.jsx)(R,{className:`hidden xl:table-cell`,children:`Opened`}),(0,Y.jsx)(R,{className:`hidden xl:table-cell`,children:`Pull request`}),(0,Y.jsx)(R,{children:(0,Y.jsx)(`span`,{className:`sr-only`,children:`Actions`})})]})}),(0,Y.jsx)(z,{children:e.runs.map(i=>{let a=ie(re(i.pullRequestUrl),t=>T(t,e.items)),o=r?n.get(i.itemKey)??null:null;return(0,Y.jsx)(Ze,{run:i,item:o===null||se(a,({number:e})=>e===o.number)?null:o,pullRequest:a,openRun:t},i.id)})})]})})]})},$e=({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})}),et=({repository:e,number:t})=>{let{data:n}=i(pe()),r=me(n.projects,e),a=m(),o=xe(),s=i(De(e,t));if(s.error instanceof oe&&s.error.error===`BoardItemNotFoundError`)return(0,Y.jsx)(Be,{repository:e,number:String(t)});let c=s.isError&&(0,Y.jsx)(P,{className:`max-w-3xl`,title:`Could not refresh the task`,message:s.error.message}),l=s.data;return l.number!==t&&r!==void 0?(0,Y.jsx)(h,{to:`/projects/$project/tasks/$number`,params:{project:M(r),number:String(l.number)},search:t=>({...t,repository:e}),replace:!0}):(0,Y.jsxs)($e,{children:[r!==void 0&&r.repositories.length>1&&(0,Y.jsx)(ze,{repositories:r.repositories,value:e,onChange:e=>void a({to:`/projects/$project/tasks`,params:{project:M(r)},search:{repository:e}})}),c,r!==void 0&&(0,Y.jsx)(Ue,{task:l,project:r,disabled:n._tag===`NeedsSetup`}),(0,Y.jsx)(Qe,{task:l,openRun:o}),(0,Y.jsx)(We,{task:l}),(0,Y.jsx)(He,{task:l})]})},tt=()=>{let{repository:e,number:t}=Oe.useLoaderData();return(0,Y.jsx)(et,{repository:e,number:t},`${e}#${t}`)};export{tt as component};
@@ -0,0 +1 @@
1
+ import{t as e}from"./route-status-5PZz-oup.js";var t=e;export{t as errorComponent};
@@ -1 +1 @@
1
- import{t as e}from"./jsx-runtime-Wy9s6hX0.js";import{A as t,X as n,r,s as i,t as a}from"./section-C2BsZ62c.js";import{t as o}from"./useSuspenseQuery-ajaZl96Y.js";import{t as s}from"./link-CXTzqBsX.js";import{n as c}from"./queries-B4QNhfM4.js";import{c as l}from"./index-CbRNTyi8.js";import{t as u}from"./repository-link-dmlmZuZQ.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:n(`project`,e),children:c===void 0?(0,d.jsx)(i,{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)(r,{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)(r,{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{A as t,Z as n,r,s as i,t as a}from"./section-4wsGlTvH.js";import{t as o}from"./useSuspenseQuery-ajaZl96Y.js";import{t as s}from"./link-CXTzqBsX.js";import{n as c}from"./queries-Di7NtDlt.js";import{c as l}from"./index-BcpuCkDJ.js";import{t as u}from"./repository-link-Cl0kRzqp.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:n(`project`,e),children:c===void 0?(0,d.jsx)(i,{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)(r,{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)(r,{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,2 +1,2 @@
1
- import{a as e,n as t,t as n}from"./jsx-runtime-Wy9s6hX0.js";import{t as r}from"./use-project-links-Bdqs6H65.js";import{t as i}from"./useSuspenseQuery-ajaZl96Y.js";import{a,b as o,c as s,d as c,f as l,h as u,i as d,l as f,m as p,n as m,o as h,p as g,s as _,u as v,v as y}from"./actions-DsEnZXEu.js";import{t as b}from"./link-CXTzqBsX.js";import{r as x,t as S}from"./mark-Bcl_OnGe.js";import{a as C,i as w,l as ee,n as T,o as E,r as D,s as te,t as ne}from"./moves-D9SXmgnd.js";import{W as O,r as k,t as A}from"./button-C-mC9M4I.js";import{i as re}from"./context-8jHKzDOY.js";import{X as ie}from"./api-DsTuvRlt.js";import{c as ae,v as j}from"./strings-BIVdGoBr.js";import{F as oe,M,N as se,O as N,a as P,i as F,j as I,n as ce}from"./overview-CTpxkXVa.js";import{a as L,i as le}from"./page-CxChE1f9.js";import{t as R}from"./error-alert-BOLTerP9.js";import{t as ue}from"./queries-C46qdn9C.js";import{A as de,F as fe,I as pe,M as me,N as he,O as ge,P as _e,Y as z,j as ve,k as ye,o as be,w as B}from"./index-CbRNTyi8.js";import{n as V,r as xe,t as Se}from"./status-badge-DINlptKX.js";import{a as Ce,i as H,n as we,o as U,r as W,t as Te}from"./table-D3--FtAd.js";import{a as Ee,c as De,d as G,f as Oe,g as ke,h as Ae,i as je,l as Me,m as K,o as Ne,p as Pe,r as Fe,s as Ie,t as Le}from"./sortable.esm-Z2V3kAIY.js";import{t as q}from"./label-badge-QOx_nH-H.js";import{t as Re}from"./action-DJYOLxhn.js";import{f as ze,o as Be,u as J}from"./model-F1HLQfrf.js";import{n as Ve,t as He}from"./strings-CfIaIMiC.js";import{t as Ue}from"./project-not-found-DrMlF8K5.js";var Y=e(t(),1),We=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M192,64V168L88,64Z`,opacity:`0.2`}),Y.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`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`}))]]),Ge=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`}),Y.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`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`}))]]),X=Y.forwardRef((e,t)=>Y.createElement(O,{ref:t,...e,weights:We}));X.displayName=`ArrowUpRightIcon`;var Z=Y.forwardRef((e,t)=>Y.createElement(O,{ref:t,...e,weights:Ge}));Z.displayName=`ArrowsInLineHorizontalIcon`;var Ke=(e,t)=>e===`Running`?`Running since ${j(t)}`:e===`Failed`?`Failed at ${j(t)}`:N(t),qe={above:!1,below:!1},Je=()=>{let[e,t]=(0,Y.useState)(qe),n=(0,Y.useRef)(null);return[(0,Y.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]},Q=n();function $({className:e,size:t=`default`,...n}){return(0,Q.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:k(`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 Ye({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`card-header`,className:k(`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 Xe({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`card-title`,className:k(`text-lg font-semibold`,e),...t})}function Ze({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`card-description`,className:k(`text-sm text-muted-foreground`,e),...t})}function Qe({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`card-content`,className:k(`px-(--card-spacing)`,e),...t})}var $e=3,et=({labels:e,catalog:t})=>{if(e.length===0)return null;let n=e.slice($e);return(0,Q.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[e.slice(0,$e).map(e=>(0,Q.jsx)(q,{name:e,label:t.get(e)},e)),n.length>0&&(0,Q.jsxs)(B,{variant:`outline`,className:`text-muted-foreground tabular-nums`,title:n.join(`, `),"aria-label":`${n.length} more: ${n.join(`, `)}`,children:[`+`,n.length]})]})},tt=`block w-full cursor-pointer text-left outline-none after:absolute after:inset-0 after:rounded-lg`,nt=({item:e,project:t})=>{let n=r();return(0,Q.jsx)(`h3`,{className:`text-sm/snug font-medium text-card-foreground`,title:e.title,children:(0,Q.jsx)(b,{...t===void 0?{...n.task(e.repository,J(e))}:{to:`/projects/$project/tasks/$number`,params:{project:t,number:J(e)},search:{repository:e.repository}},draggable:!1,className:tt,children:(0,Q.jsx)(`span`,{className:`line-clamp-2`,children:e.title})})})},rt=({failure:e,children:t})=>(0,Q.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,Q.jsx)(`p`,{className:`line-clamp-2 wrap-anywhere`,title:e.message,children:e.message}),t]}),it=({failure:e,action:t})=>t!==null&&e.run.canRetry&&!t.isPending?(0,Q.jsx)(A,{variant:`outline`,size:`xs`,className:`relative z-10`,title:I(e.run.agentBrain),onClick:()=>t.mutate({runId:e.run.id,request:{action:`retry`}}),children:M.retry}):null,at=({run:e})=>{let t=L(3e4),n=w(e);return(0,Q.jsxs)(`p`,{className:`flex min-w-0 items-center gap-1.5 text-xs whitespace-nowrap text-muted-foreground`,children:[(0,Q.jsx)(V,{state:e.state,className:`mr-0.5 ml-0.75`}),(0,Q.jsx)(`span`,{className:`truncate text-foreground`,children:e.loop}),(0,Q.jsx)(`span`,{className:`shrink-0`,children:e.state}),n!==null&&(0,Q.jsx)(`time`,{className:`shrink-0 font-mono tabular-nums`,dateTime:n,title:Ke(e.state,n),children:ae(n,t)}),(0,Q.jsx)(`span`,{className:`ml-auto truncate pl-2`,children:e.agent})]})},ot=({stalled:e,named:t,children:n})=>{let r=L(3e4),i=Ve(e,r);return(0,Q.jsxs)(`div`,{"data-slot":`stall-note`,className:`flex flex-col items-start gap-1.5 text-xs`,children:[(0,Q.jsxs)(`p`,{className:`line-clamp-3 text-muted-foreground`,title:`${e.loop}: ${i}`,children:[t&&(0,Q.jsxs)(`span`,{className:`font-medium text-foreground`,children:[e.loop,` `]}),i]}),n]})},st=e=>[`run-again`,`board-card`,e],ct=(e,t)=>{let n=st(e),r=a({mutationKey:n,onClaimed:t}),i=o({filters:{mutationKey:n,exact:!0},select:({state:e})=>e}).at(-1);return{isPending:i?.status===`pending`,data:i?.data,error:i?.error??null,send:e=>r.mutate(m(e))}},lt=({project:e,showRepository:t,item:n,lane:r,catalog:i,stall:a,readOnly:o,action:s,again:c,progress:l})=>{let u=C(n),d=D(n),f=s?.error?.message??null,p=c?.error?.message??null,m=a!==null&&u!==null&&(a.reason._tag===`RunFailed`||a.reason._tag===`SuppressedForOperator`)&&a.reason.run.id===u.run.id,h=a===null||s===null?null:(0,Q.jsx)(Re,{stalled:a,readOnly:o,appearance:`card`}),g=n.needsYou&&!(d?.canApprove||d?.canResolveFailure)&&a===null;return(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5 px-3`,children:[(0,Q.jsx)(`p`,{className:`flex flex-wrap items-baseline gap-x-2.5 pr-6`,children:n.items.map(e=>(0,Q.jsx)(S,{item:e,className:`relative z-10`},e.itemKey))}),t&&(0,Q.jsxs)(`p`,{className:`flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,Q.jsx)(z,{repository:n.repository}),(0,Q.jsx)(`span`,{className:`truncate`,children:n.repository})]}),(0,Q.jsx)(nt,{item:n,project:e}),(0,Q.jsx)(et,{labels:T(n,r),catalog:i}),d!==null&&(0,Q.jsx)(at,{run:d}),l!==null&&(0,Q.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:l}),u!==null&&(0,Q.jsx)(rt,{failure:u,children:m&&a?.reason._tag===`SuppressedForOperator`?h:(0,Q.jsx)(it,{failure:u,action:s})}),a!==null&&!m&&(0,Q.jsx)(ot,{stalled:a,named:(d===null||Be(a)?.id!==d.id)&&!He(a),children:h}),c?.data?._tag===`CycleBlocked`&&(0,Q.jsx)(`p`,{role:`status`,className:`text-xs text-needs-you`,children:`No run opened: cycle budget used up. Reset it in Needs attention`}),f!==null&&(0,Q.jsx)(`p`,{className:`text-xs text-destructive wrap-anywhere`,children:f}),p!==null&&(0,Q.jsx)(`p`,{className:`text-xs text-destructive wrap-anywhere`,children:p}),n.conflicting&&(0,Q.jsx)(`p`,{className:`text-xs text-destructive`,children:`Conflicts with base`}),g&&(0,Q.jsx)(`p`,{className:`text-xs text-needs-you`,children:`Needs attention`})]})},ut=({runs:e,openRun:t})=>(0,Q.jsxs)(l,{children:[(0,Q.jsx)(p,{children:`Run history`}),(0,Q.jsx)(g,{className:`min-w-48`,children:[...e].reverse().map(e=>(0,Q.jsxs)(f,{onClick:()=>t(e.id),children:[(0,Q.jsx)(`span`,{className:`truncate`,children:e.loop}),(0,Q.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2 pl-4 text-xs text-muted-foreground`,children:[(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(V,{state:e.state}),e.state]}),(0,Q.jsx)(`time`,{dateTime:e.openedAt,title:N(e.openedAt),className:`font-mono tabular-nums`,children:ae(e.openedAt)})]})]},e.id))})]}),dt=({item:e,run:t,moves:n,openRun:r,action:i,again:a,className:o})=>{let[d,m]=(0,Y.useState)(!1),b=x(e),C=e.runs.filter(({id:e})=>e!==t?.id),w=e.run?.canRunAgain===!0?e.run:null,T=[{key:`links`,content:e.items.map(e=>(0,Q.jsxs)(v,{href:e.url,target:`_blank`,rel:`noreferrer`,closeOnClick:!0,children:[`Open `,(0,Q.jsx)(S,{item:e,linked:!1}),` on GitHub`,(0,Q.jsx)(ee,{className:`ml-auto text-muted-foreground`,"aria-hidden":`true`})]},e.itemKey))}];(t!==null||C.length>0)&&T.push({key:`runs`,content:(0,Q.jsxs)(Q.Fragment,{children:[t!==null&&(0,Q.jsx)(f,{onClick:()=>r(t.id),children:`Open run`}),C.length>0&&(0,Q.jsx)(ut,{runs:C,openRun:r})]})});let E=i.isPending||a.isPending,D=w!==null||t!==null&&(t.canApprove||t.canRetry||t.canCancel);return!E&&D&&T.push({key:`actions`,content:(0,Q.jsxs)(Q.Fragment,{children:[t?.canApprove&&(0,Q.jsx)(f,{onClick:()=>i.mutate({runId:t.id,request:{action:`approve`}}),children:M.approve}),t?.canRetry&&(0,Q.jsx)(f,{title:I(t.agentBrain),onClick:()=>i.mutate({runId:t.id,request:{action:`retry`}}),children:M.retry}),w!==null&&(0,Q.jsxs)(f,{onClick:()=>a.send(w),children:[M.runAgain,(0,Q.jsx)(`span`,{className:`ml-auto truncate pl-4 text-xs text-muted-foreground`,children:w.loop})]}),t?.canCancel&&(0,Q.jsx)(f,{variant:`destructive`,onClick:()=>m(!0),children:M.cancel})]})}),!n.disabled&&n.targets.length>0&&T.push({key:`move`,content:(0,Q.jsxs)(l,{children:[(0,Q.jsx)(p,{children:`Move to`}),(0,Q.jsx)(g,{className:`min-w-40`,children:n.targets.map(t=>(0,Q.jsx)(f,{onClick:()=>n.onMove(e,t),children:t.name},t.id))})]})}),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(h,{children:[(0,Q.jsx)(u,{render:(0,Q.jsx)(A,{variant:`ghost`,size:`icon-sm`,className:k(`text-muted-foreground hover:text-foreground aria-expanded:text-foreground`,o)}),"aria-label":`Actions for ${b}`,children:(0,Q.jsx)(y,{weight:`bold`,className:`size-4`,"aria-hidden":`true`})}),(0,Q.jsx)(_,{align:`end`,className:`w-auto min-w-48`,children:T.map(({key:e,content:t},n)=>(0,Q.jsxs)(Y.Fragment,{children:[n>0&&(0,Q.jsx)(c,{}),(0,Q.jsx)(s,{children:t})]},e))})]}),t!==null&&(0,Q.jsx)(ye,{open:d,onOpenChange:m,children:(0,Q.jsxs)(me,{children:[(0,Q.jsxs)(fe,{children:[(0,Q.jsxs)(pe,{children:[`Cancel `,t.loop,`?`]}),(0,Q.jsxs)(he,{children:[`The run on `,b,` stops, including any attempt in progress.`]})]}),(0,Q.jsxs)(_e,{children:[(0,Q.jsx)(ve,{children:M.keepRunning}),(0,Q.jsx)(de,{variant:`destructive`,onClick:()=>{m(!1),i.mutate({runId:t.id,request:{action:`cancel`}})},children:M.confirmCancel})]})]})})]})},ft=e=>k(`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`),pt=(e,t,n)=>e.isPending&&e.variables!==void 0?se[e.variables.request.action]:t.isPending?oe:n===void 0?null:te(n),mt=({project:e,showRepository:t,item:n,lane:r,catalog:i,draggable:a,phase:o,moves:s,stall:c,readOnly:l,openRun:u})=>{let f=d(),p=ct(n.itemKey,u),{attributes:m,listeners:h,setNodeRef:g,setActivatorNodeRef:_,transform:v,transition:y,isDragging:b}=je({id:n.itemKey,disabled:{draggable:!a,droppable:r._tag!==`WritableBoardLane`}});return(0,Q.jsxs)(`div`,{ref:g,style:{transform:ke.Translate.toString(v),transition:y},className:k(`group/task relative`,b&&`opacity-40`),children:[(0,Q.jsx)($,{ref:_,size:`sm`,className:k(ft(n.needsYou),a&&`touch-none focus-visible:ring-2 focus-visible:ring-ring/70`),...a&&m,...a&&h,children:(0,Q.jsx)(lt,{project:e,showRepository:t,item:n,lane:r,catalog:i,stall:c,readOnly:l,action:f,again:p,progress:pt(f,p,o)})}),(0,Q.jsx)(dt,{item:n,run:D(n),moves:s,openRun:u,action:f,again:p,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`})]})},ht=new Set([`Waiting`,`Queued`,`Running`]),gt=(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})=>ht.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]]})),_t=e=>e.map(({name:e,paused:t})=>t?`${e} (paused)`:e).join(`, `),vt=({flow:e})=>{let t=e.loops.length>0;return(0,Q.jsxs)(`p`,{"data-slot":`flow-arrow`,className:k(`-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: ${_t(e.loops)}. Flows to ${e.next.name}`:void 0,children:[(0,Q.jsxs)(`span`,{className:`sr-only`,children:[`Flows to `,e.next.name]}),t&&(0,Q.jsx)(`span`,{className:`truncate`,children:e.loops.map(({name:e,paused:t},n)=>(0,Q.jsxs)(Y.Fragment,{children:[n>0&&`, `,e,t&&(0,Q.jsx)(`span`,{className:`text-muted-foreground`,children:` paused`})]},e))}),(0,Q.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 22 8`,className:k(`h-2 w-5.5 shrink-0 fill-none stroke-current`,e.tone===`idle`&&`text-faint`),strokeWidth:`1`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,Q.jsx)(`path`,{d:`M0.5 4h18M15.5 1l3 3-3 3`})})]})},yt=e=>e.origin===`fallback`||e.sources.length>0&&e.sources.every(e=>`state`in e&&ie(e.state)),bt=({sources:e,catalog:t})=>(0,Q.jsx)(`ul`,{"aria-label":`Lane sources`,className:`flex flex-wrap gap-1`,children:e.map(e=>(0,Q.jsx)(`li`,{className:`flex`,children:`label`in e?(0,Q.jsx)(q,{name:e.label,label:t.get(e.label)}):(0,Q.jsx)(B,{variant:`outline`,className:`text-muted-foreground`,children:e.state})},`label`in e?`label:${e.label}`:`state:${e.state}`))}),xt=({lane:e,open:t})=>(0,Q.jsx)(`section`,{"aria-label":`${e.name} lane`,className:`w-10 shrink-0`,children:(0,Q.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,Q.jsxs)(`span`,{className:`sticky top-0 flex flex-col-reverse items-center gap-2 py-3`,children:[(0,Q.jsx)(`span`,{className:`max-h-60 truncate text-sm font-semibold [writing-mode:vertical-rl]`,children:e.name}),` `,(0,Q.jsx)(`span`,{className:`text-sm text-muted-foreground tabular-nums`,children:e.items.length})]})})}),St=({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=yt(n),[m,h]=(0,Y.useState)(p),g=n._tag===`WritableBoardLane`,{setNodeRef:_}=Pe({id:n.id,disabled:!g||s}),v=r.filter(e=>e._tag===`WritableBoardLane`&&e.id!==n.id),y=n.items.length,[b,x]=Je();return re(p?[{label:E(n.name,m),run:()=>h(!m)}]:[]),p&&m?(0,Q.jsx)(xt,{lane:n,open:()=>h(!1)}):(0,Q.jsxs)(`section`,{ref:_,"aria-label":`${n.name} lane`,className:k(`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,Q.jsxs)(`header`,{className:k(`z-20 -mx-0.5 flex shrink-0 flex-col gap-1.5 px-1 pt-1 pb-1`,!o&&`bg-background`),children:[(0,Q.jsxs)(`div`,{className:`flex h-6 items-center`,children:[(0,Q.jsxs)(`h2`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,Q.jsx)(`span`,{className:`truncate text-sm font-semibold`,children:n.name}),(0,Q.jsx)(`span`,{className:`text-sm text-muted-foreground tabular-nums`,children:y})]}),i!==void 0&&(0,Q.jsx)(vt,{flow:i}),p&&(0,Q.jsx)(A,{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,Q.jsx)(Z,{"aria-hidden":`true`})})]}),(0,Q.jsx)(`div`,{className:`min-h-5`,children:n.sources.length>0&&(0,Q.jsx)(bt,{sources:n.sources,catalog:a})})]}),(0,Q.jsx)(`div`,{ref:b,"aria-label":`${n.name} cards`,tabIndex:x.above||x.below?0:void 0,className:k(`-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,Q.jsxs)(Le,{items:n.items.map(({itemKey:e})=>e),strategy:Ee,children:[y===0&&(0,Q.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,Q.jsx)(mt,{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)})]})})]})},Ct=({item:e,lane:t,catalog:n,stall:r,project:i,showRepository:a})=>(0,Q.jsx)($,{size:`sm`,className:k(ft(e.needsYou),`cursor-grabbing shadow-raised`),children:(0,Q.jsx)(lt,{project:i,showRepository:a,item:e,lane:t,catalog:n,stall:r,readOnly:!0,action:null,again:null,progress:null})}),wt=({runs:e,openRun:t})=>(0,Q.jsxs)($,{className:`sticky left-4 w-[min(64rem,calc(100cqw-2rem))] md:left-5 md:w-[min(64rem,calc(100cqw-2.5rem))]`,children:[(0,Q.jsxs)(Ye,{children:[(0,Q.jsx)(Xe,{children:`Runs without a card`}),(0,Q.jsxs)(Ze,{children:[e.length,` run`,e.length===1?``:`s`,` with no card on this board`]})]}),(0,Q.jsx)(Qe,{children:(0,Q.jsxs)(Te,{children:[(0,Q.jsx)(Ce,{children:(0,Q.jsxs)(U,{children:[(0,Q.jsx)(H,{children:`Loop`}),(0,Q.jsx)(H,{children:`Agent`}),(0,Q.jsx)(H,{children:`Item`}),(0,Q.jsx)(H,{children:`State`}),(0,Q.jsx)(H,{className:`w-0`})]})}),(0,Q.jsx)(we,{children:e.map(e=>(0,Q.jsxs)(U,{className:`cursor-pointer`,onClick:()=>t(e.id),children:[(0,Q.jsx)(W,{className:`font-medium`,children:e.loop}),(0,Q.jsx)(W,{children:e.agent}),(0,Q.jsx)(W,{className:`max-w-64 truncate font-mono text-xs`,children:e.itemKey}),(0,Q.jsx)(W,{children:(0,Q.jsx)(xe,{state:e.state})}),(0,Q.jsx)(W,{className:`text-right`,children:(0,Q.jsx)(A,{variant:`ghost`,size:`icon-sm`,"aria-label":`Open run ${e.id}`,onClick:n=>{n.stopPropagation(),t(e.id)},children:(0,Q.jsx)(X,{"aria-hidden":`true`})})})]},e.id))})]})})]}),Tt=e=>[...e.filter(({_tag:e})=>e===`WritableBoardLane`),...e.filter(({_tag:e,origin:t})=>e!==`WritableBoardLane`&&t!==`fallback`),...e.filter(({origin:e})=>e===`fallback`)],Et=(e,t)=>t.find(t=>t.id===e)??t.find(t=>t.items.some(({itemKey:t})=>t===e)),Dt=e=>{let t=G(e);if(t.length>0)return t;if(e.pointerCoordinates===null){let t=G({...e,pointerCoordinates:{x:e.collisionRect.left+1,y:e.collisionRect.top+1}});if(t.length>0)return t}return Oe(e)},Ot=e=>(t,n)=>{let r=t.code===`ArrowRight`;if(!r&&t.code!==`ArrowLeft`)return Fe(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}},kt=(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}})},At=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))},jt=({project:e,loops:t,stalled:n,disabled:r,openRun:i})=>{let[a,o]=(0,Y.useState)(null),[s,c]=(0,Y.useState)(null),{moves:l,moveItem:u,isPending:d,error:f}=ne(e),p=At(e),m=l.reduce(kt,Tt(e.board.lanes)),h=Ae(K(Me,{activationConstraint:{distance:6}}),K(De,{coordinateGetter:Ot(m)})),g=gt(m,e.id===void 0?t:t.filter(t=>t.name.startsWith(`${e.id}/`))),_=m.reduce((e,t)=>e+t.items.length,0),v=e=>ze(n,e),y=new Map(e.labels.map(e=>[e.name,e])),b=r||d,x=()=>{o(null),c(null)};return(0,Q.jsxs)(`div`,{className:`flex min-w-0 min-h-96 flex-1 flex-col gap-4 pt-5`,children:[(0,Q.jsx)(le,{title:P(e),leading:(0,Q.jsx)(z,{repository:e.repository,size:`title`}),counts:`${m.length} lane${m.length===1?``:`s`}, ${_} item${_===1?``:`s`}`,className:`px-4 md:px-5`,children:e.status===`needs-you`&&(0,Q.jsx)(Se,{})}),e.board.lanes.some(({origin:e})=>e===`proposed`)&&(0,Q.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,Q.jsx)(R,{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"./use-project-links-BP4qs0BZ.js";import{t as i}from"./useSuspenseQuery-ajaZl96Y.js";import{a,b as o,c as s,d as c,f as l,h as u,i as d,l as f,m as p,n as m,o as h,p as g,s as _,u as v,v as y}from"./actions-cinYAAbK.js";import{t as b}from"./link-CXTzqBsX.js";import{r as x,t as S}from"./mark-Bcl_OnGe.js";import{a as C,i as w,l as ee,n as T,o as E,r as D,s as te,t as ne}from"./moves-BGi38htc.js";import{W as O,r as k,t as A}from"./button-C-mC9M4I.js";import{i as re}from"./context-8jHKzDOY.js";import{X as ie}from"./api-DkY40iRU.js";import{c as ae,v as j}from"./strings-BIVdGoBr.js";import{F as oe,M,N as se,O as N,a as P,i as F,j as I,n as ce}from"./overview-BiHYfnVn.js";import{a as L,i as le}from"./page-B1KSx6Jj.js";import{t as R}from"./error-alert-BOLTerP9.js";import{t as ue}from"./queries-oDOwQQMa.js";import{A as de,F as fe,I as pe,M as me,N as he,O as ge,P as _e,Y as z,j as ve,k as ye,o as be,w as B}from"./index-BcpuCkDJ.js";import{n as V,r as xe,t as Se}from"./status-badge-DINlptKX.js";import{a as Ce,i as H,n as we,o as U,r as W,t as Te}from"./table-D3--FtAd.js";import{a as Ee,c as De,d as G,f as Oe,g as ke,h as Ae,i as je,l as Me,m as K,o as Ne,p as Pe,r as Fe,s as Ie,t as Le}from"./sortable.esm-Z2V3kAIY.js";import{t as q}from"./label-badge-C-DfO6Xp.js";import{t as Re}from"./action-CFZDB6qU.js";import{f as ze,o as Be,u as J}from"./model-B0SWT7RV.js";import{n as Ve,t as He}from"./strings-DCFq7v6a.js";import{t as Ue}from"./project-not-found-DrMlF8K5.js";var Y=e(t(),1),We=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.createElement(`path`,{d:`M192,64V168L88,64Z`,opacity:`0.2`}),Y.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`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`}))]]),Ge=new Map([[`bold`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`}),Y.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`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`,Y.createElement(Y.Fragment,null,Y.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`}))]]),X=Y.forwardRef((e,t)=>Y.createElement(O,{ref:t,...e,weights:We}));X.displayName=`ArrowUpRightIcon`;var Z=Y.forwardRef((e,t)=>Y.createElement(O,{ref:t,...e,weights:Ge}));Z.displayName=`ArrowsInLineHorizontalIcon`;var Ke=(e,t)=>e===`Running`?`Running since ${j(t)}`:e===`Failed`?`Failed at ${j(t)}`:N(t),qe={above:!1,below:!1},Je=()=>{let[e,t]=(0,Y.useState)(qe),n=(0,Y.useRef)(null);return[(0,Y.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]},Q=n();function $({className:e,size:t=`default`,...n}){return(0,Q.jsx)(`div`,{"data-slot":`card`,"data-size":t,className:k(`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 Ye({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`card-header`,className:k(`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 Xe({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`card-title`,className:k(`text-lg font-semibold`,e),...t})}function Ze({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`card-description`,className:k(`text-sm text-muted-foreground`,e),...t})}function Qe({className:e,...t}){return(0,Q.jsx)(`div`,{"data-slot":`card-content`,className:k(`px-(--card-spacing)`,e),...t})}var $e=3,et=({labels:e,catalog:t})=>{if(e.length===0)return null;let n=e.slice($e);return(0,Q.jsxs)(`div`,{className:`flex flex-wrap gap-1`,children:[e.slice(0,$e).map(e=>(0,Q.jsx)(q,{name:e,label:t.get(e)},e)),n.length>0&&(0,Q.jsxs)(B,{variant:`outline`,className:`text-muted-foreground tabular-nums`,title:n.join(`, `),"aria-label":`${n.length} more: ${n.join(`, `)}`,children:[`+`,n.length]})]})},tt=`block w-full cursor-pointer text-left outline-none after:absolute after:inset-0 after:rounded-lg`,nt=({item:e,project:t})=>{let n=r();return(0,Q.jsx)(`h3`,{className:`text-sm/snug font-medium text-card-foreground`,title:e.title,children:(0,Q.jsx)(b,{...t===void 0?{...n.task(e.repository,J(e))}:{to:`/projects/$project/tasks/$number`,params:{project:t,number:J(e)},search:{repository:e.repository}},draggable:!1,className:tt,children:(0,Q.jsx)(`span`,{className:`line-clamp-2`,children:e.title})})})},rt=({failure:e,children:t})=>(0,Q.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,Q.jsx)(`p`,{className:`line-clamp-2 wrap-anywhere`,title:e.message,children:e.message}),t]}),it=({failure:e,action:t})=>t!==null&&e.run.canRetry&&!t.isPending?(0,Q.jsx)(A,{variant:`outline`,size:`xs`,className:`relative z-10`,title:I(e.run.agentBrain),onClick:()=>t.mutate({runId:e.run.id,request:{action:`retry`}}),children:M.retry}):null,at=({run:e})=>{let t=L(3e4),n=w(e);return(0,Q.jsxs)(`p`,{className:`flex min-w-0 items-center gap-1.5 text-xs whitespace-nowrap text-muted-foreground`,children:[(0,Q.jsx)(V,{state:e.state,className:`mr-0.5 ml-0.75`}),(0,Q.jsx)(`span`,{className:`truncate text-foreground`,children:e.loop}),(0,Q.jsx)(`span`,{className:`shrink-0`,children:e.state}),n!==null&&(0,Q.jsx)(`time`,{className:`shrink-0 font-mono tabular-nums`,dateTime:n,title:Ke(e.state,n),children:ae(n,t)}),(0,Q.jsx)(`span`,{className:`ml-auto truncate pl-2`,children:e.agent})]})},ot=({stalled:e,named:t,children:n})=>{let r=L(3e4),i=Ve(e,r);return(0,Q.jsxs)(`div`,{"data-slot":`stall-note`,className:`flex flex-col items-start gap-1.5 text-xs`,children:[(0,Q.jsxs)(`p`,{className:`line-clamp-3 text-muted-foreground`,title:`${e.loop}: ${i}`,children:[t&&(0,Q.jsxs)(`span`,{className:`font-medium text-foreground`,children:[e.loop,` `]}),i]}),n]})},st=e=>[`run-again`,`board-card`,e],ct=(e,t)=>{let n=st(e),r=a({mutationKey:n,onClaimed:t}),i=o({filters:{mutationKey:n,exact:!0},select:({state:e})=>e}).at(-1);return{isPending:i?.status===`pending`,data:i?.data,error:i?.error??null,send:e=>r.mutate(m(e))}},lt=({project:e,showRepository:t,item:n,lane:r,catalog:i,stall:a,readOnly:o,action:s,again:c,progress:l})=>{let u=C(n),d=D(n),f=s?.error?.message??null,p=c?.error?.message??null,m=a!==null&&u!==null&&(a.reason._tag===`RunFailed`||a.reason._tag===`SuppressedForOperator`)&&a.reason.run.id===u.run.id,h=a===null||s===null?null:(0,Q.jsx)(Re,{stalled:a,readOnly:o,appearance:`card`}),g=n.needsYou&&!(d?.canApprove||d?.canResolveFailure)&&a===null;return(0,Q.jsxs)(`div`,{className:`flex min-w-0 flex-col gap-1.5 px-3`,children:[(0,Q.jsx)(`p`,{className:`flex flex-wrap items-baseline gap-x-2.5 pr-6`,children:n.items.map(e=>(0,Q.jsx)(S,{item:e,className:`relative z-10`},e.itemKey))}),t&&(0,Q.jsxs)(`p`,{className:`flex min-w-0 items-center gap-1.5 text-xs text-muted-foreground`,children:[(0,Q.jsx)(z,{repository:n.repository}),(0,Q.jsx)(`span`,{className:`truncate`,children:n.repository})]}),(0,Q.jsx)(nt,{item:n,project:e}),(0,Q.jsx)(et,{labels:T(n,r),catalog:i}),d!==null&&(0,Q.jsx)(at,{run:d}),l!==null&&(0,Q.jsx)(`p`,{role:`status`,className:`text-xs text-muted-foreground`,children:l}),u!==null&&(0,Q.jsx)(rt,{failure:u,children:m&&a?.reason._tag===`SuppressedForOperator`?h:(0,Q.jsx)(it,{failure:u,action:s})}),a!==null&&!m&&(0,Q.jsx)(ot,{stalled:a,named:(d===null||Be(a)?.id!==d.id)&&!He(a),children:h}),c?.data?._tag===`CycleBlocked`&&(0,Q.jsx)(`p`,{role:`status`,className:`text-xs text-needs-you`,children:`No run opened: cycle budget used up. Reset it in Needs attention`}),f!==null&&(0,Q.jsx)(`p`,{className:`text-xs text-destructive wrap-anywhere`,children:f}),p!==null&&(0,Q.jsx)(`p`,{className:`text-xs text-destructive wrap-anywhere`,children:p}),n.conflicting&&(0,Q.jsx)(`p`,{className:`text-xs text-destructive`,children:`Conflicts with base`}),g&&(0,Q.jsx)(`p`,{className:`text-xs text-needs-you`,children:`Needs attention`})]})},ut=({runs:e,openRun:t})=>(0,Q.jsxs)(l,{children:[(0,Q.jsx)(p,{children:`Run history`}),(0,Q.jsx)(g,{className:`min-w-48`,children:[...e].reverse().map(e=>(0,Q.jsxs)(f,{onClick:()=>t(e.id),children:[(0,Q.jsx)(`span`,{className:`truncate`,children:e.loop}),(0,Q.jsxs)(`span`,{className:`ml-auto flex shrink-0 items-center gap-2 pl-4 text-xs text-muted-foreground`,children:[(0,Q.jsxs)(`span`,{className:`flex items-center gap-2`,children:[(0,Q.jsx)(V,{state:e.state}),e.state]}),(0,Q.jsx)(`time`,{dateTime:e.openedAt,title:N(e.openedAt),className:`font-mono tabular-nums`,children:ae(e.openedAt)})]})]},e.id))})]}),dt=({item:e,run:t,moves:n,openRun:r,action:i,again:a,className:o})=>{let[d,m]=(0,Y.useState)(!1),b=x(e),C=e.runs.filter(({id:e})=>e!==t?.id),w=e.run?.canRunAgain===!0?e.run:null,T=[{key:`links`,content:e.items.map(e=>(0,Q.jsxs)(v,{href:e.url,target:`_blank`,rel:`noreferrer`,closeOnClick:!0,children:[`Open `,(0,Q.jsx)(S,{item:e,linked:!1}),` on GitHub`,(0,Q.jsx)(ee,{className:`ml-auto text-muted-foreground`,"aria-hidden":`true`})]},e.itemKey))}];(t!==null||C.length>0)&&T.push({key:`runs`,content:(0,Q.jsxs)(Q.Fragment,{children:[t!==null&&(0,Q.jsx)(f,{onClick:()=>r(t.id),children:`Open run`}),C.length>0&&(0,Q.jsx)(ut,{runs:C,openRun:r})]})});let E=i.isPending||a.isPending,D=w!==null||t!==null&&(t.canApprove||t.canRetry||t.canCancel);return!E&&D&&T.push({key:`actions`,content:(0,Q.jsxs)(Q.Fragment,{children:[t?.canApprove&&(0,Q.jsx)(f,{onClick:()=>i.mutate({runId:t.id,request:{action:`approve`}}),children:M.approve}),t?.canRetry&&(0,Q.jsx)(f,{title:I(t.agentBrain),onClick:()=>i.mutate({runId:t.id,request:{action:`retry`}}),children:M.retry}),w!==null&&(0,Q.jsxs)(f,{onClick:()=>a.send(w),children:[M.runAgain,(0,Q.jsx)(`span`,{className:`ml-auto truncate pl-4 text-xs text-muted-foreground`,children:w.loop})]}),t?.canCancel&&(0,Q.jsx)(f,{variant:`destructive`,onClick:()=>m(!0),children:M.cancel})]})}),!n.disabled&&n.targets.length>0&&T.push({key:`move`,content:(0,Q.jsxs)(l,{children:[(0,Q.jsx)(p,{children:`Move to`}),(0,Q.jsx)(g,{className:`min-w-40`,children:n.targets.map(t=>(0,Q.jsx)(f,{onClick:()=>n.onMove(e,t),children:t.name},t.id))})]})}),(0,Q.jsxs)(Q.Fragment,{children:[(0,Q.jsxs)(h,{children:[(0,Q.jsx)(u,{render:(0,Q.jsx)(A,{variant:`ghost`,size:`icon-sm`,className:k(`text-muted-foreground hover:text-foreground aria-expanded:text-foreground`,o)}),"aria-label":`Actions for ${b}`,children:(0,Q.jsx)(y,{weight:`bold`,className:`size-4`,"aria-hidden":`true`})}),(0,Q.jsx)(_,{align:`end`,className:`w-auto min-w-48`,children:T.map(({key:e,content:t},n)=>(0,Q.jsxs)(Y.Fragment,{children:[n>0&&(0,Q.jsx)(c,{}),(0,Q.jsx)(s,{children:t})]},e))})]}),t!==null&&(0,Q.jsx)(ye,{open:d,onOpenChange:m,children:(0,Q.jsxs)(me,{children:[(0,Q.jsxs)(fe,{children:[(0,Q.jsxs)(pe,{children:[`Cancel `,t.loop,`?`]}),(0,Q.jsxs)(he,{children:[`The run on `,b,` stops, including any attempt in progress.`]})]}),(0,Q.jsxs)(_e,{children:[(0,Q.jsx)(ve,{children:M.keepRunning}),(0,Q.jsx)(de,{variant:`destructive`,onClick:()=>{m(!1),i.mutate({runId:t.id,request:{action:`cancel`}})},children:M.confirmCancel})]})]})})]})},ft=e=>k(`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`),pt=(e,t,n)=>e.isPending&&e.variables!==void 0?se[e.variables.request.action]:t.isPending?oe:n===void 0?null:te(n),mt=({project:e,showRepository:t,item:n,lane:r,catalog:i,draggable:a,phase:o,moves:s,stall:c,readOnly:l,openRun:u})=>{let f=d(),p=ct(n.itemKey,u),{attributes:m,listeners:h,setNodeRef:g,setActivatorNodeRef:_,transform:v,transition:y,isDragging:b}=je({id:n.itemKey,disabled:{draggable:!a,droppable:r._tag!==`WritableBoardLane`}});return(0,Q.jsxs)(`div`,{ref:g,style:{transform:ke.Translate.toString(v),transition:y},className:k(`group/task relative`,b&&`opacity-40`),children:[(0,Q.jsx)($,{ref:_,size:`sm`,className:k(ft(n.needsYou),a&&`touch-none focus-visible:ring-2 focus-visible:ring-ring/70`),...a&&m,...a&&h,children:(0,Q.jsx)(lt,{project:e,showRepository:t,item:n,lane:r,catalog:i,stall:c,readOnly:l,action:f,again:p,progress:pt(f,p,o)})}),(0,Q.jsx)(dt,{item:n,run:D(n),moves:s,openRun:u,action:f,again:p,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`})]})},ht=new Set([`Waiting`,`Queued`,`Running`]),gt=(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})=>ht.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]]})),_t=e=>e.map(({name:e,paused:t})=>t?`${e} (paused)`:e).join(`, `),vt=({flow:e})=>{let t=e.loops.length>0;return(0,Q.jsxs)(`p`,{"data-slot":`flow-arrow`,className:k(`-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: ${_t(e.loops)}. Flows to ${e.next.name}`:void 0,children:[(0,Q.jsxs)(`span`,{className:`sr-only`,children:[`Flows to `,e.next.name]}),t&&(0,Q.jsx)(`span`,{className:`truncate`,children:e.loops.map(({name:e,paused:t},n)=>(0,Q.jsxs)(Y.Fragment,{children:[n>0&&`, `,e,t&&(0,Q.jsx)(`span`,{className:`text-muted-foreground`,children:` paused`})]},e))}),(0,Q.jsx)(`svg`,{"aria-hidden":`true`,viewBox:`0 0 22 8`,className:k(`h-2 w-5.5 shrink-0 fill-none stroke-current`,e.tone===`idle`&&`text-faint`),strokeWidth:`1`,strokeLinecap:`round`,strokeLinejoin:`round`,children:(0,Q.jsx)(`path`,{d:`M0.5 4h18M15.5 1l3 3-3 3`})})]})},yt=e=>e.origin===`fallback`||e.sources.length>0&&e.sources.every(e=>`state`in e&&ie(e.state)),bt=({sources:e,catalog:t})=>(0,Q.jsx)(`ul`,{"aria-label":`Lane sources`,className:`flex flex-wrap gap-1`,children:e.map(e=>(0,Q.jsx)(`li`,{className:`flex`,children:`label`in e?(0,Q.jsx)(q,{name:e.label,label:t.get(e.label)}):(0,Q.jsx)(B,{variant:`outline`,className:`text-muted-foreground`,children:e.state})},`label`in e?`label:${e.label}`:`state:${e.state}`))}),xt=({lane:e,open:t})=>(0,Q.jsx)(`section`,{"aria-label":`${e.name} lane`,className:`w-10 shrink-0`,children:(0,Q.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,Q.jsxs)(`span`,{className:`sticky top-0 flex flex-col-reverse items-center gap-2 py-3`,children:[(0,Q.jsx)(`span`,{className:`max-h-60 truncate text-sm font-semibold [writing-mode:vertical-rl]`,children:e.name}),` `,(0,Q.jsx)(`span`,{className:`text-sm text-muted-foreground tabular-nums`,children:e.items.length})]})})}),St=({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=yt(n),[m,h]=(0,Y.useState)(p),g=n._tag===`WritableBoardLane`,{setNodeRef:_}=Pe({id:n.id,disabled:!g||s}),v=r.filter(e=>e._tag===`WritableBoardLane`&&e.id!==n.id),y=n.items.length,[b,x]=Je();return re(p?[{label:E(n.name,m),run:()=>h(!m)}]:[]),p&&m?(0,Q.jsx)(xt,{lane:n,open:()=>h(!1)}):(0,Q.jsxs)(`section`,{ref:_,"aria-label":`${n.name} lane`,className:k(`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,Q.jsxs)(`header`,{className:k(`z-20 -mx-0.5 flex shrink-0 flex-col gap-1.5 px-1 pt-1 pb-1`,!o&&`bg-background`),children:[(0,Q.jsxs)(`div`,{className:`flex h-6 items-center`,children:[(0,Q.jsxs)(`h2`,{className:`flex min-w-0 items-baseline gap-2`,children:[(0,Q.jsx)(`span`,{className:`truncate text-sm font-semibold`,children:n.name}),(0,Q.jsx)(`span`,{className:`text-sm text-muted-foreground tabular-nums`,children:y})]}),i!==void 0&&(0,Q.jsx)(vt,{flow:i}),p&&(0,Q.jsx)(A,{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,Q.jsx)(Z,{"aria-hidden":`true`})})]}),(0,Q.jsx)(`div`,{className:`min-h-5`,children:n.sources.length>0&&(0,Q.jsx)(bt,{sources:n.sources,catalog:a})})]}),(0,Q.jsx)(`div`,{ref:b,"aria-label":`${n.name} cards`,tabIndex:x.above||x.below?0:void 0,className:k(`-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,Q.jsxs)(Le,{items:n.items.map(({itemKey:e})=>e),strategy:Ee,children:[y===0&&(0,Q.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,Q.jsx)(mt,{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)})]})})]})},Ct=({item:e,lane:t,catalog:n,stall:r,project:i,showRepository:a})=>(0,Q.jsx)($,{size:`sm`,className:k(ft(e.needsYou),`cursor-grabbing shadow-raised`),children:(0,Q.jsx)(lt,{project:i,showRepository:a,item:e,lane:t,catalog:n,stall:r,readOnly:!0,action:null,again:null,progress:null})}),wt=({runs:e,openRun:t})=>(0,Q.jsxs)($,{className:`sticky left-4 w-[min(64rem,calc(100cqw-2rem))] md:left-5 md:w-[min(64rem,calc(100cqw-2.5rem))]`,children:[(0,Q.jsxs)(Ye,{children:[(0,Q.jsx)(Xe,{children:`Runs without a card`}),(0,Q.jsxs)(Ze,{children:[e.length,` run`,e.length===1?``:`s`,` with no card on this board`]})]}),(0,Q.jsx)(Qe,{children:(0,Q.jsxs)(Te,{children:[(0,Q.jsx)(Ce,{children:(0,Q.jsxs)(U,{children:[(0,Q.jsx)(H,{children:`Loop`}),(0,Q.jsx)(H,{children:`Agent`}),(0,Q.jsx)(H,{children:`Item`}),(0,Q.jsx)(H,{children:`State`}),(0,Q.jsx)(H,{className:`w-0`})]})}),(0,Q.jsx)(we,{children:e.map(e=>(0,Q.jsxs)(U,{className:`cursor-pointer`,onClick:()=>t(e.id),children:[(0,Q.jsx)(W,{className:`font-medium`,children:e.loop}),(0,Q.jsx)(W,{children:e.agent}),(0,Q.jsx)(W,{className:`max-w-64 truncate font-mono text-xs`,children:e.itemKey}),(0,Q.jsx)(W,{children:(0,Q.jsx)(xe,{state:e.state})}),(0,Q.jsx)(W,{className:`text-right`,children:(0,Q.jsx)(A,{variant:`ghost`,size:`icon-sm`,"aria-label":`Open run ${e.id}`,onClick:n=>{n.stopPropagation(),t(e.id)},children:(0,Q.jsx)(X,{"aria-hidden":`true`})})})]},e.id))})]})})]}),Tt=e=>[...e.filter(({_tag:e})=>e===`WritableBoardLane`),...e.filter(({_tag:e,origin:t})=>e!==`WritableBoardLane`&&t!==`fallback`),...e.filter(({origin:e})=>e===`fallback`)],Et=(e,t)=>t.find(t=>t.id===e)??t.find(t=>t.items.some(({itemKey:t})=>t===e)),Dt=e=>{let t=G(e);if(t.length>0)return t;if(e.pointerCoordinates===null){let t=G({...e,pointerCoordinates:{x:e.collisionRect.left+1,y:e.collisionRect.top+1}});if(t.length>0)return t}return Oe(e)},Ot=e=>(t,n)=>{let r=t.code===`ArrowRight`;if(!r&&t.code!==`ArrowLeft`)return Fe(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}},kt=(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}})},At=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))},jt=({project:e,loops:t,stalled:n,disabled:r,openRun:i})=>{let[a,o]=(0,Y.useState)(null),[s,c]=(0,Y.useState)(null),{moves:l,moveItem:u,isPending:d,error:f}=ne(e),p=At(e),m=l.reduce(kt,Tt(e.board.lanes)),h=Ae(K(Me,{activationConstraint:{distance:6}}),K(De,{coordinateGetter:Ot(m)})),g=gt(m,e.id===void 0?t:t.filter(t=>t.name.startsWith(`${e.id}/`))),_=m.reduce((e,t)=>e+t.items.length,0),v=e=>ze(n,e),y=new Map(e.labels.map(e=>[e.name,e])),b=r||d,x=()=>{o(null),c(null)};return(0,Q.jsxs)(`div`,{className:`flex min-w-0 min-h-96 flex-1 flex-col gap-4 pt-5`,children:[(0,Q.jsx)(le,{title:P(e),leading:(0,Q.jsx)(z,{repository:e.repository,size:`title`}),counts:`${m.length} lane${m.length===1?``:`s`}, ${_} item${_===1?``:`s`}`,className:`px-4 md:px-5`,children:e.status===`needs-you`&&(0,Q.jsx)(Se,{})}),e.board.lanes.some(({origin:e})=>e===`proposed`)&&(0,Q.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,Q.jsx)(R,{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
  `)}),f!==null&&(0,Q.jsx)(R,{className:`mx-4 max-w-3xl md:mx-5`,message:f.message}),(0,Q.jsxs)(Ne,{sensors:h,collisionDetection:Dt,onDragStart:({active:e})=>{let t=m.find(({items:t})=>t.some(({itemKey:t})=>t===e.id)),n=t?.items.find(({itemKey:t})=>t===e.id);o(t===void 0||n===void 0?null:{item:n,lane:t})},onDragOver:({over:e})=>c(e===null?null:Et(e.id,m)?.id??null),onDragEnd:({over:e})=>{if(x(),e===null||a===null)return;let t=Et(e.id,m);t!==void 0&&u(a.item,t)},onDragCancel:x,children:[(0,Q.jsx)(`div`,{className:`min-h-0 flex-1 overflow-auto overscroll-contain [container-type:size]`,"aria-label":`${P(e)} project board`,children:(0,Q.jsxs)(`div`,{className:`flex w-max min-w-full flex-col gap-6 px-4 pb-4 md:px-5`,children:[(0,Q.jsx)(`div`,{className:`flex h-[calc(100cqh-1rem)] min-h-80 shrink-0 gap-3`,children:m.map(t=>(0,Q.jsx)(St,{project:F(e),showRepository:e.repositories.length>1,lane:t,lanes:m,flow:g.get(t.id),catalog:y,targeted:a!==null&&s===t.id&&t.id!==a.lane.id&&t._tag===`WritableBoardLane`,pending:b,readOnly:r,moves:l,stallOf:v,openRun:i,onMove:u},t.id))}),p.length>0&&(0,Q.jsx)(wt,{runs:p,openRun:i})]})}),(0,Q.jsx)(Ie,{children:a!==null&&(0,Q.jsx)(Ct,{item:a.item,project:F(e),showRepository:e.repositories.length>1,lane:a.lane,catalog:y,stall:v(a.item)})})]})]})},Mt=()=>{let{project:e}=be.useParams(),{data:t}=i(ce()),n=i(ue()),r=ge(),a=t.projects.find(t=>F(t)===e);return a===void 0?(0,Q.jsx)(Ue,{}):(0,Q.jsx)(jt,{project:a,loops:t.loops,stalled:n.data.notMoving,disabled:t._tag===`NeedsSetup`,openRun:r})};export{Mt as component};
@@ -0,0 +1 @@
1
+ import{t as e}from"./route-status-5PZz-oup.js";var t=e;export{t as errorComponent};