@codeuxai/codeux 0.8.1 → 0.8.2

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 (26) hide show
  1. package/dashboard/dist/assets/{AgentAvatarScene-DAjdNR8q.js → AgentAvatarScene-3Fa3RQHc.js} +1 -1
  2. package/dashboard/dist/assets/{AgentsPage-dG7HaQww.js → AgentsPage-woorcNHq.js} +2 -2
  3. package/dashboard/dist/assets/{BackgroundManager-CxjNC7ME.js → BackgroundManager-DbgGcx7x.js} +1 -1
  4. package/dashboard/dist/assets/{BranchNameSchemeEditor-wfv629Ml.js → BranchNameSchemeEditor-Bk2p-g2z.js} +1 -1
  5. package/dashboard/dist/assets/{BrowserPage-5eFh6pZt.js → BrowserPage-BLTJo_tK.js} +1 -1
  6. package/dashboard/dist/assets/{ChatPage-CfunB4-0.js → ChatPage-BljTU3OV.js} +1 -1
  7. package/dashboard/dist/assets/{ErrorPage-CEHtK2Hk.js → ErrorPage-DgYd7CGv.js} +1 -1
  8. package/dashboard/dist/assets/{FileBrowserPage-BOVIkrrv.js → FileBrowserPage-ChIelEM6.js} +1 -1
  9. package/dashboard/dist/assets/{KnowledgePage-CeKSiAys.js → KnowledgePage-DP7v0vk3.js} +1 -1
  10. package/dashboard/dist/assets/{ListWindowSelector-cshzGFot.js → ListWindowSelector-DtKcmXGY.js} +1 -1
  11. package/dashboard/dist/assets/{MemoryPage-Cctk6NFp.js → MemoryPage-2N_EfqqO.js} +1 -1
  12. package/dashboard/dist/assets/{OverviewTelemetry-D_V7-M2H.js → OverviewTelemetry-C1hoOMVQ.js} +1 -1
  13. package/dashboard/dist/assets/{ProjectsPage-D8ICYJVv.js → ProjectsPage-CEn6QDXI.js} +1 -1
  14. package/dashboard/dist/assets/{SchedulerPage-BM0sGrEZ.js → SchedulerPage-BDTm8Q3w.js} +1 -1
  15. package/dashboard/dist/assets/{SettingsPage-BlDplYC7.js → SettingsPage-CvSsreD8.js} +1 -1
  16. package/dashboard/dist/assets/{SprintBoatRace-DaP10JYZ.js → SprintBoatRace-Ryphd2ZR.js} +1 -1
  17. package/dashboard/dist/assets/{SprintDag-DbxJdjBK.js → SprintDag-BLP6gb8k.js} +1 -1
  18. package/dashboard/dist/assets/{SprintsPage-XGhd04Sn.js → SprintsPage-DORSqECT.js} +1 -1
  19. package/dashboard/dist/assets/{StatsPage-CrSwtTGq.js → StatsPage-BODQk1cJ.js} +1 -1
  20. package/dashboard/dist/assets/{TasksPage-DNpVBxt6.js → TasksPage-PeouQ4EB.js} +1 -1
  21. package/dashboard/dist/assets/{index-BViPTeJx.js → index-DddY8OV0.js} +5 -5
  22. package/dashboard/dist/assets/{monaco.contribution-KtWzfVt5.js → monaco.contribution-Bxle9Jvf.js} +2 -2
  23. package/dashboard/dist/assets/{tsMode-CalcmZZa.js → tsMode-BYb4cdGe.js} +1 -1
  24. package/dashboard/dist/index.html +1 -1
  25. package/package.json +1 -1
  26. package/.code-ux/debug.log +0 -97190
@@ -1 +1 @@
1
- import{S as e,_ as t,a as n,c as r,f as i,h as a,v as o,w as s,x as c,y as l}from"./vendor-Dl0fhdV0.js";import{t as u}from"./createLucideIcon-BshUfn15.js";import{t as d}from"./arrow-up-right-CzhTwjos.js";import{t as f}from"./ListWindowSelector-cshzGFot.js";import{t as p}from"./save-DFYp4CAL.js";import{A as m,M as h,Y as g,r as _}from"./project-data-BSCsMQnj.js";import{r as v,t as y}from"./use-reduced-motion-Dxh6NCDM.js";import{Ai as b,Bi as x,Cr as S,Dr as ee,Et as C,Hr as w,Kt as T,Li as E,Mi as D,Mr as O,S as k,St as te,Xr as ne,_t as re,an as A,b as j,bi as M,cn as N,cr as P,di as F,en as I,fn as ie,ft as L,gi as ae,hr as oe,jt as R,kt as se,mi as ce,nn as le,on as ue,or as z,pr as B,pt as V,qt as de,sn as fe,sr as H,ti as pe,vi as me,wi as U,wn as he,y as W,yr as G,yt as ge}from"./index-BViPTeJx.js";import{n as K}from"./list-window-BtcrCL8y.js";var _e=u(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]);i(),c();var ve=(e,n,r,i)=>{let[a,o]=l(r?.sprintId||i||e[0]?.id||``),[c,u]=l(r?.title||``),[d,f]=l(r?.description||``),[p,m]=l(r?.promptMarkdown||``),[h,g]=l(r?.status||`pending`),[_,v]=l(r?.priority||`medium`),[y,b]=l(r?.executorType||`auto`),[x,S]=l(r?.dependsOnTaskIds||[]),ee=!!r,[C,w]=l(``),[T,E]=l(!1),[D,O]=l(null),[k,te]=l({}),[ne,re]=l(!1),A=e=>{te(t=>({...t,[e]:!0}))},j=t(()=>{let e={};return a||(e.sprintId=`Sprint selection is required.`),c.trim()?c.trim().length<3&&(e.title=`Task title must be at least 3 characters long.`):e.title=`Task title is required.`,d.trim()||(e.description=`Task details are required.`),p.trim()||(e.promptMarkdown=`Execution prompt is required.`),y||(e.executorType=`Executor selection is required.`),_||(e.priority=`Priority selection is required.`),h||(e.status=`Status selection is required.`),e},[a,c,d,p,y,_,h]);return s(()=>{r?(o(r.sprintId),u(r.title),f(r.description||``),m(r.promptMarkdown||``),g(r.status),v(r.priority),b(r.executorType),S(r.dependsOnTaskIds||[])):(o(i||e[0]?.id||``),u(``),f(``),m(``),g(`pending`),v(`medium`),b(`auto`),S([]))},[r,i,e]),s(()=>{r&&a===r.sprintId||a!==(r?.sprintId||i||e[0]?.id||``)&&S([])},[a]),{sprintId:a,setSprintId:o,title:c,setTitle:u,description:d,setDescription:f,promptMarkdown:p,setPromptMarkdown:m,status:h,setStatus:g,priority:_,setPriority:v,executorType:y,setExecutorType:b,dependsOnTaskIds:x,setDependsOnTaskIds:S,toggleDependency:e=>{S(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},dependencyOptions:t(()=>n.filter(e=>{if(e.sprintId!==a||e.recordId===r?.recordId)return!1;if(r?.recordId){let t=new Set,i=e=>{if(e===r.recordId)return!0;if(t.has(e))return!1;t.add(e);let a=n.find(t=>t.recordId===e);return a?a.dependsOnTaskIds.some(i):!1};if(i(e.recordId))return!1}if(C){let t=C.toLowerCase(),n=e.id?e.id.toLowerCase().includes(t):!1,r=e.recordId.toLowerCase().includes(t),i=e.title.toLowerCase().includes(t);return n||r||i}return!0}),[n,a,r?.recordId,C]),isEditing:ee,isValid:Object.keys(j).length===0,dependencySearchQuery:C,setDependencySearchQuery:w,isSubmitting:T,setIsSubmitting:E,submitError:D,setSubmitError:O,validationErrors:j,touchedFields:k,setFieldTouched:A,hasAttemptedSubmit:ne,setHasAttemptedSubmit:re,isTitleValid:!j.title,titleError:j.title,isSprintIdValid:!j.sprintId,sprintIdError:j.sprintId,isDescriptionValid:!j.description,descriptionError:j.description,isPromptMarkdownValid:!j.promptMarkdown,promptMarkdownError:j.promptMarkdown,isExecutorTypeValid:!j.executorType,executorTypeError:j.executorType,isPriorityValid:!j.priority,priorityError:j.priority,isStatusValid:!j.status,statusError:j.status,getPayload:()=>({sprintId:a,title:c.trim(),description:d.trim(),promptMarkdown:p.trim(),status:h,priority:_,executorType:y,dependsOnTaskIds:x})}};c();var ye=[`critical`,`high`,`medium`,`low`],q=[`pending`,`in_progress`,`completed`],be=[{value:`auto`,label:`Auto`,description:`Use the default Code UX routing.`},{value:`docker_cli`,label:`CLI`,description:`Run through the isolated Docker workspace.`},{value:`jules`,label:`Jules`,description:`Force remote Jules execution.`}],xe=({sprints:e,availableTasks:t,initialTask:r,initialSprintId:i,onClose:s,onSubmit:c})=>{let l=a(null),u=a(null),d=a(null),f=ve(e,t,r,i),m=y();o(()=>{let e=B.context(()=>{let e=B.timeline(),t=m?0:z.entry.duration,n=m?0:z.entry.duration,r=m?0:.055;l.current&&e.fromTo(l.current,{y:m?0:z.entry.yStart,opacity:z.entry.opacityStart,scale:m?1:z.entry.scaleStart,filter:m?z.entry.filterEnd:z.entry.filterStart},{y:z.entry.yEnd,opacity:z.entry.opacityEnd,scale:z.entry.scaleEnd,filter:z.entry.filterEnd,duration:t,ease:z.entry.ease}),d.current&&e.fromTo(Array.from(d.current.querySelectorAll(`[data-composer-stagger]`)),{y:m?0:18,opacity:0},{y:0,opacity:1,stagger:r,duration:n,ease:`power3.out`},m?`+=0`:`-=0.45`)});return()=>e.revert()},[r?.recordId,m]);let{feedback:h,setPending:g,setSuccess:_,setError:v,clearFeedback:x}=R();return n(`section`,{ref:l,className:`relative w-full overflow-hidden rounded-[2rem] border border-black/[0.06] bg-white/78 shadow-[0_20px_50px_rgba(15,23,42,0.08)] backdrop-blur-2xl dark:border-white/[0.06] dark:bg-void-800/72 dark:shadow-[0_24px_56px_rgba(0,0,0,0.28)]`,children:[n(`div`,{className:`pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_top_left,rgba(0,224,160,0.08),transparent_28%),radial-gradient(circle_at_bottom_right,rgba(255,184,0,0.08),transparent_34%)] dark:bg-[radial-gradient(circle_at_top_left,rgba(0,224,160,0.1),transparent_28%),radial-gradient(circle_at_bottom_right,rgba(255,184,0,0.09),transparent_34%)]`}),n(`form`,{ref:d,onSubmit:async e=>{if(e.preventDefault(),!f.isValid){f.setHasAttemptedSubmit(!0),setTimeout(()=>{let e=d.current?.querySelector(`[aria-invalid="true"]`);e instanceof HTMLElement&&e.focus()},0),!f.isTitleValid&&u.current&&(m||B.to(u.current,{keyframes:[{x:-6},{x:6},{x:-4},{x:4},{x:0}],duration:.4,ease:`power2.inOut`}));return}f.setIsSubmitting(!0),f.setSubmitError(null),x(),g(`Submitting task...`);try{await c(f.getPayload()),f.setIsSubmitting(!1),_(`Task submitted successfully.`),s()}catch(e){f.setIsSubmitting(!1);let t=e instanceof Error?e.message:String(e);f.setSubmitError(t),v(t,{retryAction:()=>d.current?.requestSubmit(),retryLabel:`Retry`,autoDismiss:!1})}},className:`relative z-10 grid gap-0 xl:grid-cols-[minmax(0,1fr)_21rem]`,children:[n(`div`,{className:`border-b border-black/[0.06] p-6 dark:border-white/[0.06] sm:p-8 lg:p-10 xl:border-b-0 xl:border-r`,children:[n(`div`,{"data-composer-stagger":!0,className:`flex items-start justify-between gap-4`,children:[n(`div`,{className:`space-y-4`,children:[n(`div`,{className:`inline-flex items-center gap-2 rounded-full border border-signal-500/15 bg-signal-500/[0.07] px-3 py-1.5 text-[10px] font-bold uppercase tracking-[0.16em] text-signal-600 dark:text-signal-300`,children:[n(S,{className:`h-3.5 w-3.5`,strokeWidth:2.3}),f.isEditing?`Edit Task`:`Task Composer`]}),n(`div`,{className:`space-y-3`,children:[n(`h2`,{className:`font-display text-[2rem] font-black leading-none tracking-tight text-slate-900 dark:text-white sm:text-[2.35rem]`,children:f.isEditing?`Refine The Task.`:`Create A New Task.`}),n(`p`,{className:`max-w-2xl text-sm leading-relaxed text-slate-500 dark:text-slate-400 sm:text-[15px]`,children:`Define the task scope, execution prompt, and specify any dependencies required before starting.`})]})]}),n(`button`,{type:`button`,onClick:s,className:`inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full border border-black/[0.06] bg-white/78 text-slate-400 transition-all hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal-500 active:scale-95 dark:border-white/[0.06] dark:bg-white/[0.03] dark:hover:text-white`,"aria-label":`Close task composer`,disabled:f.isSubmitting,children:n(oe,{className:`h-4 w-4`})})]}),n(`div`,{"data-composer-stagger":!0,className:`mt-8 grid gap-4 sm:grid-cols-2`,children:[n(`div`,{className:`rounded-[1.4rem] border border-black/[0.06] bg-black/[0.025] p-4 dark:border-white/[0.06] dark:bg-white/[0.03]`,children:[n(`div`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-slate-400 mb-2`,children:`Sprint`}),n(`select`,{value:f.sprintId,onInput:e=>f.setSprintId(e.target.value),onBlur:()=>f.setFieldTouched(`sprintId`),className:`w-full bg-transparent text-sm font-semibold text-slate-700 dark:text-slate-300 focus:outline-none focus-visible:ring-2 focus-visible:ring-signal-500/50 rounded-lg px-1 py-0.5 -ml-1 border ${(f.hasAttemptedSubmit||f.touchedFields.sprintId)&&!f.isSprintIdValid?`border-red-500`:`border-transparent`}`,"aria-invalid":f.isSprintIdValid?`false`:`true`,"aria-describedby":(f.hasAttemptedSubmit||f.touchedFields.sprintId)&&f.sprintIdError?`task-composer-sprint-error`:void 0,required:!0,children:[n(`option`,{value:``,disabled:!0,children:`Select sprint`}),e.map(e=>n(`option`,{value:e.id,children:e.name},e.id))]}),n(`div`,{className:`min-h-[1.5rem] mt-1`,children:(f.hasAttemptedSubmit||f.touchedFields.sprintId)&&f.sprintIdError&&n(`div`,{id:`task-composer-sprint-error`,className:`flex items-center gap-1.5 text-xs text-red-500 font-medium`,children:[n(M,{className:`w-3.5 h-3.5`}),f.sprintIdError]})})]}),n(`div`,{className:`rounded-[1.4rem] border border-black/[0.06] bg-black/[0.025] p-4 dark:border-white/[0.06] dark:bg-white/[0.03]`,children:[n(`div`,{className:`flex items-center gap-2 mb-2`,children:[n(`div`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-slate-400`,children:`Status`}),(f.hasAttemptedSubmit||f.touchedFields.status)&&f.statusError&&n(`div`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-red-500 bg-red-500/10 px-1.5 py-0.5 rounded`,children:f.statusError})]}),n(`div`,{className:`flex gap-2 flex-wrap`,onBlur:()=>f.setFieldTouched(`status`),children:q.map(e=>n(`button`,{type:`button`,onClick:()=>f.setStatus(e),className:`px-3 py-1.5 rounded-xl text-[10px] font-bold uppercase tracking-[0.14em] transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal-500/50 focus-visible:ring-offset-1 focus-visible:ring-offset-white dark:focus-visible:ring-offset-void-900 ${f.status===e?`bg-signal-500 text-void-900 shadow-[0_2px_12px_rgba(0,224,160,0.3)]`:`text-slate-500 dark:text-slate-400 hover:text-slate-800 dark:hover:text-slate-200`}`,children:e.replace(`_`,` `)},e))})]})]}),n(`label`,{"data-composer-stagger":!0,className:`mt-8 block space-y-2`,children:[n(`span`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-slate-400`,children:`Task Title`}),n(`input`,{ref:u,type:`text`,value:f.title,onInput:e=>f.setTitle(e.target.value),onBlur:()=>f.setFieldTouched(`title`),placeholder:`Fix navigation layout shift`,className:`w-full border-0 border-b-2 bg-transparent pb-3 font-display text-[1.65rem] font-black leading-none tracking-tight text-slate-900 outline-none transition-colors placeholder:text-slate-200 focus:border-signal-500 dark:text-white dark:placeholder:text-slate-700 sm:text-[1.9rem] ${(f.hasAttemptedSubmit||f.touchedFields.title)&&!f.isTitleValid?`border-red-500`:`border-black/[0.08] dark:border-white/[0.08]`}`,"aria-invalid":f.isTitleValid?`false`:`true`,"aria-describedby":(f.hasAttemptedSubmit||f.touchedFields.title)&&f.titleError?`task-composer-title-error`:void 0,required:!0,autoFocus:!0}),n(`div`,{className:`grid transition-all duration-200 ease-out mt-1`,style:{gridTemplateRows:(f.hasAttemptedSubmit||f.touchedFields.title)&&f.titleError?`1fr`:`0fr`,opacity:(f.hasAttemptedSubmit||f.touchedFields.title)&&f.titleError?1:0},"aria-live":`assertive`,children:n(`div`,{className:`overflow-hidden`,children:n(`div`,{id:`task-composer-title-error`,className:`flex items-center gap-1.5 text-xs text-red-500 font-medium pt-1`,children:[n(M,{className:`w-4 h-4`}),f.titleError]})})})]}),n(`div`,{"data-composer-stagger":!0,className:`mt-8 space-y-3`,children:[n(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:n(`label`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-slate-400`,children:`Task Details`})}),n(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[n(`div`,{className:`flex flex-col`,children:[n(`div`,{className:`rounded-[1.7rem] border bg-black/[0.025] dark:bg-white/[0.03] transition-colors ${(f.hasAttemptedSubmit||f.touchedFields.description)&&!f.isDescriptionValid?`border-red-500`:`border-black/[0.07] dark:border-white/[0.08]`}`,children:n(`textarea`,{value:f.description,onInput:e=>f.setDescription(e.target.value),onBlur:()=>f.setFieldTouched(`description`),placeholder:`Summarize the intent and outcome.`,className:`min-h-[160px] w-full resize-none rounded-[1.7rem] bg-transparent px-4 py-4 text-sm leading-relaxed text-slate-700 outline-none placeholder:text-slate-300 focus-visible:ring-2 focus-visible:ring-signal-500/50 dark:text-slate-300 dark:placeholder:text-slate-600 sm:px-5`,"aria-invalid":f.isDescriptionValid?`false`:`true`,"aria-describedby":(f.hasAttemptedSubmit||f.touchedFields.description)&&f.descriptionError?`task-composer-description-error`:void 0})}),n(`div`,{className:`grid transition-all duration-200 ease-out mt-1 ml-4`,style:{gridTemplateRows:(f.hasAttemptedSubmit||f.touchedFields.description)&&f.descriptionError?`1fr`:`0fr`,opacity:(f.hasAttemptedSubmit||f.touchedFields.description)&&f.descriptionError?1:0},"aria-live":`assertive`,children:n(`div`,{className:`overflow-hidden`,children:n(`div`,{id:`task-composer-description-error`,className:`flex items-center gap-1.5 text-xs text-red-500 font-medium pt-1`,children:[n(M,{className:`w-4 h-4`}),f.descriptionError]})})})]}),n(`div`,{className:`flex flex-col`,children:[n(`div`,{className:`rounded-[1.7rem] border bg-black/[0.025] dark:bg-white/[0.03] transition-colors ${(f.hasAttemptedSubmit||f.touchedFields.promptMarkdown)&&!f.isPromptMarkdownValid?`border-red-500`:`border-black/[0.07] dark:border-white/[0.08]`}`,children:n(`textarea`,{value:f.promptMarkdown,onInput:e=>f.setPromptMarkdown(e.target.value),onBlur:()=>f.setFieldTouched(`promptMarkdown`),placeholder:`Detailed markdown instructions for the agent.`,className:`min-h-[160px] w-full resize-none rounded-[1.7rem] bg-transparent px-4 py-4 text-sm leading-relaxed font-mono text-slate-700 outline-none placeholder:text-slate-300 focus-visible:ring-2 focus-visible:ring-signal-500/50 dark:text-slate-300 dark:placeholder:text-slate-600 sm:px-5`,"aria-invalid":f.isPromptMarkdownValid?`false`:`true`,"aria-describedby":(f.hasAttemptedSubmit||f.touchedFields.promptMarkdown)&&f.promptMarkdownError?`task-composer-prompt-error`:void 0})}),n(`div`,{className:`grid transition-all duration-200 ease-out mt-1 ml-4`,style:{gridTemplateRows:(f.hasAttemptedSubmit||f.touchedFields.promptMarkdown)&&f.promptMarkdownError?`1fr`:`0fr`,opacity:(f.hasAttemptedSubmit||f.touchedFields.promptMarkdown)&&f.promptMarkdownError?1:0},"aria-live":`assertive`,children:n(`div`,{className:`overflow-hidden`,children:n(`div`,{id:`task-composer-prompt-error`,className:`flex items-center gap-1.5 text-xs text-red-500 font-medium pt-1`,children:[n(M,{className:`w-4 h-4`}),f.promptMarkdownError]})})})]})]})]}),n(`div`,{"data-composer-stagger":!0,className:`mt-8`,children:[n(`div`,{className:`flex items-center justify-between mb-3`,children:[n(`div`,{className:`flex items-center gap-2`,children:[n(S,{className:`w-3.5 h-3.5 text-ember-500`,strokeWidth:2.3}),n(`label`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-slate-400`,children:`Dependencies`}),f.dependencyOptions.length===0&&t.filter(e=>e.sprintId===f.sprintId&&e.recordId!==r?.recordId).length>0&&n(`span`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-amber-500 ml-2 bg-amber-500/10 px-1.5 py-0.5 rounded`,children:`Cycle Prevented`})]}),t.filter(e=>e.sprintId===f.sprintId&&e.recordId!==r?.recordId).length>5&&n(`input`,{type:`search`,placeholder:`Filter tasks...`,value:f.dependencySearchQuery,onInput:e=>f.setDependencySearchQuery(e.target.value),className:`w-48 bg-black/[0.03] dark:bg-white/[0.03] border border-black/[0.08] dark:border-white/[0.08] px-3 py-1.5 text-xs rounded-xl focus:outline-none focus:border-ember-500 focus-visible:ring-1 focus-visible:ring-ember-500/50`})]}),f.dependencyOptions.length===0?n(`div`,{className:`rounded-2xl border border-dashed border-black/[0.08] dark:border-white/[0.08] px-4 py-4 text-xs text-slate-400`,children:`No existing tasks in this sprint yet.`}):n(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-2 max-h-44 overflow-y-auto pr-1`,children:f.dependencyOptions.map(e=>{let t=f.dependsOnTaskIds.includes(e.recordId);return n(`button`,{type:`button`,onClick:()=>f.toggleDependency(e.recordId),"aria-pressed":t?`true`:`false`,className:`flex items-center justify-between gap-3 px-4 py-3 rounded-2xl border text-left transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal-500/50 focus-visible:ring-offset-1 focus-visible:ring-offset-white dark:focus-visible:ring-offset-void-900 ${t?`border-ember-500/45 bg-ember-500/[0.08] text-ember-600 dark:text-ember-400`:`border-black/[0.07] dark:border-white/[0.07] bg-black/[0.02] dark:bg-white/[0.02] text-slate-500`}`,children:[n(`div`,{className:`min-w-0 flex-1 pr-2`,children:[n(`div`,{className:`flex items-center gap-2 mb-1`,children:[n(`span`,{className:`text-[10px] font-mono uppercase tracking-[0.14em] text-slate-400`,children:e.id}),n(`span`,{className:`text-[9px] px-1.5 py-0.5 rounded uppercase font-bold tracking-wider ${e.priority===`critical`?`bg-red-500/10 text-red-500`:e.priority===`high`?`bg-orange-500/10 text-orange-500`:`bg-slate-500/10 text-slate-500`}`,children:e.priority})]}),n(`div`,{className:`text-sm font-semibold truncate leading-tight`,children:e.title})]}),n(`span`,{className:`w-4 h-4 rounded-full border ${t?`border-ember-500 bg-ember-500`:`border-slate-300 dark:border-slate-600`}`})]},e.recordId)})})]})]}),n(`aside`,{className:`flex flex-col gap-4 p-6 sm:p-8`,children:[n(`div`,{"data-composer-stagger":!0,children:[n(`div`,{className:`flex items-center gap-2 mb-3`,children:[n(`div`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-slate-400`,children:`Priority`}),(f.hasAttemptedSubmit||f.touchedFields.priority)&&f.priorityError&&n(`div`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-red-500 bg-red-500/10 px-1.5 py-0.5 rounded`,children:f.priorityError})]}),n(`div`,{className:`grid grid-cols-2 gap-2`,onBlur:()=>f.setFieldTouched(`priority`),children:ye.map(e=>n(`button`,{type:`button`,onClick:()=>f.setPriority(e),className:`px-3 py-2 rounded-[1.1rem] border text-[10px] font-bold uppercase tracking-[0.14em] transition-all text-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal-500 active:scale-95 ${f.priority===e?`border-ember-500/45 bg-ember-500/[0.08] text-ember-600 dark:text-ember-400 shadow-[0_4px_12px_rgba(255,184,0,0.15)]`:`border-black/[0.06] bg-black/[0.025] text-slate-500 dark:border-white/[0.06] dark:bg-white/[0.03] dark:text-slate-400`}`,children:e},e))})]}),n(`div`,{"data-composer-stagger":!0,children:[n(`div`,{className:`flex items-center gap-2 mb-3`,children:[n(b,{className:`w-3.5 h-3.5 text-signal-500`,strokeWidth:2.3}),n(`label`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-slate-400`,children:`Executor`}),(f.hasAttemptedSubmit||f.touchedFields.executorType)&&f.executorTypeError&&n(`div`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-red-500 bg-red-500/10 px-1.5 py-0.5 rounded`,children:f.executorTypeError})]}),n(`div`,{className:`grid gap-3`,onBlur:()=>f.setFieldTouched(`executorType`),children:be.map(e=>{let t=f.executorType===e.value;return n(`button`,{type:`button`,onClick:()=>f.setExecutorType(e.value),className:`rounded-[1.35rem] border p-4 text-left transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal-500 active:scale-[0.98] ${t?`border-signal-500/30 bg-signal-500/[0.08] shadow-[0_12px_24px_rgba(0,224,160,0.08)]`:`border-black/[0.06] bg-white/66 hover:border-black/[0.1] hover:bg-white dark:border-white/[0.06] dark:bg-white/[0.02] dark:hover:border-white/[0.1]`}`,children:[n(`div`,{className:`flex items-center gap-2 text-[10px] font-bold uppercase tracking-[0.14em] text-slate-700 dark:text-white`,children:[n(`span`,{className:`w-2 h-2 rounded-full ${t?`bg-signal-500`:`bg-slate-300 dark:bg-slate-600`}`}),e.label]}),n(`div`,{className:`mt-2 text-xs leading-relaxed text-slate-500 dark:text-slate-400`,children:e.description})]},e.value)})})]}),n(`div`,{"data-composer-stagger":!0,className:`mt-auto flex flex-col gap-3 pt-2`,children:[n(N,{status:h.status,message:h.message,onDismiss:x,autoDismiss:h.autoDismiss,retryAction:h.retryAction,retryLabel:h.retryLabel}),n(I,{content:f.isValid?null:`Please fix the validation errors before submitting.`,position:`top`,className:`bg-red-600`,children:n(se,{type:`submit`,variant:`primary`,icon:f.isEditing?p:O,disabled:!f.isValid||f.isSubmitting,isLoading:f.isSubmitting,className:`!w-full !inline-flex !items-center !justify-center !gap-2.5 !rounded-[1.2rem] !px-5 !py-3 !text-sm !font-bold !shadow-[0_12px_28px_rgba(15,23,42,0.16)] !transition-all hover:!-translate-y-px hover:!opacity-92 active:!scale-95 disabled:!cursor-not-allowed disabled:!opacity-50`,children:f.isEditing?`Save Task`:`Create Task`})}),n(`button`,{type:`button`,onClick:s,disabled:f.isSubmitting,className:`rounded-[1.2rem] border border-black/[0.06] bg-white/66 px-5 py-3 text-sm font-semibold text-slate-500 transition-all hover:text-slate-900 active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal-500 disabled:opacity-50 disabled:cursor-not-allowed dark:border-white/[0.06] dark:bg-white/[0.02] dark:text-slate-300 dark:hover:text-white`,children:`Cancel`})]})]})]})]})},Se=[`pending`,`in_progress`,`completed`],J=e=>e===`coding_completed`||e===`QA_REVIEW_FAILED`?`in_progress`:e;function Ce(e,t,n,r){let i=e.filter(e=>!(t!==`all`&&J(e.status)!==t||n!==`all`&&e.priority!==n)),a=K(r,i.length),o=i.slice(0,a),s={total:i.length,inProgress:i.filter(e=>J(e.status)===`in_progress`).length,completed:i.filter(e=>J(e.status)===`completed`).length,critical:i.filter(e=>e.priority===`critical`).length},c=Se.map(e=>({status:e,count:i.filter(t=>J(t.status)===e).length,tasks:o.filter(t=>J(t.status)===e)}));return{filteredTasks:i,visibleTasks:o,stats:s,columns:t===`all`?c:c.filter(e=>e.count>0)}}var we={critical:{label:`Critical`,color:`text-status-red`,dot:`bg-status-red shadow-[0_0_8px_rgba(227,0,15,0.6)]`,bg:`bg-status-red/[0.08] border-status-red/20`},high:{label:`High`,color:`text-ember-500`,dot:`bg-ember-500 shadow-[0_0_8px_rgba(255,184,0,0.5)]`,bg:`bg-ember-500/[0.08] border-ember-500/20`},medium:{label:`Medium`,color:`text-signal-500`,dot:`bg-signal-500 shadow-[0_0_6px_rgba(0,224,160,0.4)]`,bg:`bg-signal-500/[0.06] border-signal-500/15`},low:{label:`Low`,color:`text-slate-400`,dot:`bg-slate-400`,bg:`bg-slate-400/[0.06] border-slate-400/15`}},Y={pending:{label:`Queued`,color:`text-slate-400 dark:text-slate-500`,hex:`#64748b`,icon:ce},in_progress:{label:`In Progress`,color:`text-signal-500`,hex:`#00E0A0`,icon:ae},coding_completed:{label:`Coding Completed`,color:`text-cyan-500`,hex:`#0F9FA8`,icon:me},completed:{label:`Completed`,color:`text-status-green`,hex:`#00AB84`,icon:me},QA_REVIEW_FAILED:{label:`QA Failed`,color:`text-red-500`,hex:`#ef4444`,icon:M}};c();function X(e,t,n,r=0){let i=a(!1);o(()=>{if(e.current){if(n){B.set(e.current,{opacity:1,y:0,clearProps:`transform`});return}B.fromTo(e.current,{opacity:0,y:15},{opacity:1,y:0,duration:parseFloat(H.enterExit.duration)/1e3,ease:H.enterExit.ease,delay:r*(parseFloat(H.listReorder.duration)/1e3)*.2,clearProps:`transform,opacity`,overwrite:`auto`})}},[n,r]),s(()=>{if(!i.current){i.current=!0;return}if(e.current){if(n){B.set(e.current,{boxShadow:`0 0 0 2px rgba(0, 224, 160, 0.4)`}),setTimeout(()=>{e.current&&B.set(e.current,{clearProps:`boxShadow`})},parseFloat(H.controlFeedback.duration));return}B.fromTo(e.current,{scale:1.02,boxShadow:`0 0 0 2px rgba(0, 224, 160, 0.4)`},{scale:1,boxShadow:`none`,duration:parseFloat(H.controlFeedback.duration)/1e3,ease:H.controlFeedback.ease,clearProps:`boxShadow,transform`,overwrite:`auto`})}},[t,n])}function Te(e,t,n){s(()=>{if(e.current){if(n){t?B.set(e.current,{opacity:.6,boxShadow:`0 20px 40px rgba(0,0,0,0.2)`}):B.set(e.current,{clearProps:`boxShadow,opacity`});return}t?(B.killTweensOf(e.current),B.to(e.current,{scale:1.05,opacity:.6,boxShadow:`0 20px 40px rgba(0,0,0,0.2)`,duration:parseFloat(H.selectionMovement.duration)/1e3,ease:H.selectionMovement.ease,overwrite:`auto`})):(B.killTweensOf(e.current),B.to(e.current,{scale:1,opacity:1,boxShadow:`none`,duration:parseFloat(H.selectionMovement.duration)/1e3,ease:P.easing.bounce,clearProps:`boxShadow,transform,opacity`,overwrite:`auto`}))}},[t,n])}var Z={auto:`Auto`,docker_cli:`CLI`,jules:`Jules`};function Ee(e){if(e<=0)return`0s`;let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return t>0?`${t}h ${n}m ${r}s`:n>0?`${n}m ${r}s`:`${r}s`}function De(e,t=Date.now()){let n=new Date(e).getTime();if(isNaN(n))return`--`;let r=Math.floor((t-n)/6e4);if(r<0)return`just now`;if(r<60)return`${r}m ago`;let i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function Oe(e){return Z[e]||`Unknown`}function ke(e,t,n){let r=(e.dependsOnTaskIds||[]).map(e=>{let n=t.get(e);return n?{recordId:n.recordId,id:n.id,title:n.title,status:n.status}:{recordId:e,id:e,title:`Unknown Task (${e})`,status:`pending`}});return{task:e,humanizedCreatedAt:De(e.createdAt),executorLabel:Oe(e.executorType),dependencyIndicators:r,sessionId:n?.sessionId,sessionState:n?.sessionState,prUrl:n?.prUrl,liveRunningTime:n?.liveTotalSeconds&&n.liveTotalSeconds>0?Ee(n.liveTotalSeconds):void 0,liveStartedAt:n?.liveStartedAt}}var Q=r(({indicators:e})=>!e||e.length===0?null:n(`div`,{className:`relative z-10 mt-3 flex flex-wrap gap-1.5`,children:e.map(e=>{let t=e.title.startsWith(`Unknown Task`),r=e.status.replace(`_`,` `),i=`bg-slate-400/[0.08] border-slate-400/20 text-slate-500`;return t?i=`bg-slate-400/[0.08] border-slate-400/30 text-slate-500 border-dashed`:e.status===`completed`?i=`bg-status-green/[0.08] border-status-green/20 text-status-green`:e.status===`QA_REVIEW_FAILED`?i=`bg-red-500/[0.08] border-red-500/20 text-red-500`:(e.status===`coding_completed`||e.status===`in_progress`)&&(i=`bg-signal-500/[0.08] border-signal-500/20 text-signal-500`),n(`div`,{className:`flex items-center gap-1.5 px-2 py-1 rounded-lg border text-[9px] font-bold uppercase tracking-[0.14em] ${i}`,title:`Depends on ${e.title} (${r})`,children:[n(`span`,{className:`sr-only`,children:[`Depends on task `,e.id,`, status: `,r,`. Title: `,e.title]}),n(D,{className:`w-2.5 h-2.5`,strokeWidth:2.5,"aria-hidden":`true`}),n(`span`,{"aria-hidden":`true`,children:e.id})]},e.recordId)})}));c();var Ae=({durationText:e,flashTriggerCount:t})=>{let r=a(null),i=a(t),o=y();return s(()=>{t>i.current&&r.current&&(o?(B.set(r.current,{backgroundColor:`rgba(0, 224, 160, 0.10)`}),setTimeout(()=>{r.current&&B.set(r.current,{backgroundColor:`transparent`})},500)):B.fromTo(r.current,{backgroundColor:`rgba(0, 224, 160, 0.10)`},{backgroundColor:`transparent`,duration:.5,ease:`power2.out`})),i.current=t},[t,o]),n(`span`,{ref:r,className:`font-mono truncate tabular-nums rounded px-0.5 -ml-0.5`,children:e})};i(),c();var je=r(({viewModel:e,index:t=0,onEdit:r,onDelete:i,agentPresetName:o,agentPresetAvatarConfig:c,isDragging:u=!1,onDragStart:d,onDragEnd:f})=>{let{task:p,humanizedCreatedAt:m,dependencyIndicators:h,sessionId:g,sessionState:_,prUrl:v,liveRunningTime:b,liveStartedAt:x}=e,S=a(null),C=we[p.priority],w=y(),T=Y[p.status].icon,{isOpen:E,options:D,requestConfirm:O,handleConfirm:te,handleCancel:re,triggerRef:A}=j(),[M,N]=l(0),P=a(p.status),I=a(b);return s(()=>{let e=!1;P.current!==p.status&&(e=!0),I.current===null&&b!==null&&(e=!0),e&&N(e=>e+1),P.current=p.status,I.current=b},[p.status,b]),X(S,p.status,w,t),Te(S,u,w),n(`div`,{ref:S,tabIndex:0,draggable:!w,onDragStart:w?void 0:d,onDragEnd:w?void 0:f,"aria-roledescription":`sortable`,"aria-describedby":`task-card-kbd-${p.recordId}`,onKeyDown:e=>{(e.key===` `||e.key===`Enter`)&&e.preventDefault()},className:`kanban-card group relative flex flex-col bg-white/80 dark:bg-void-800/75 backdrop-blur-sm rounded-[1.75rem] p-7 shadow-[0_2px_20px_rgba(0,0,0,0.04)] dark:shadow-[0_4px_24px_rgba(0,0,0,0.2)] overflow-hidden focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal-500/30 focus-visible:ring-offset-2 ${p.isOptimistic?`border-dashed border-2 border-slate-300 dark:border-slate-600 opacity-60 pointer-events-none`:`border border-black/[0.06] dark:border-white/[0.06]`} ${w?`kanban-card-reduced-motion`:``} ${u?`is-dragging opacity-50 ring-2 ring-signal-500 scale-[1.02] shadow-[0_20px_40px_rgba(0,0,0,0.2)]`:``}`,style:{transformStyle:`preserve-3d`,willChange:`transform`},children:[n(`span`,{id:`task-card-kbd-${p.recordId}`,className:`sr-only`,children:w?`Draggable reordering is disabled in reduced motion mode.`:d?`Draggable task. Use drag and drop to reorder.`:`Keyboard reordering is not supported. Use drag and drop to reorder.`}),n(`div`,{className:`absolute inset-0 pointer-events-none transition-colors duration-300 group-hover:bg-signal-500/[0.02] dark:group-hover:bg-signal-500/[0.02]`}),n(V,{accentHex:Y[p.status].hex}),n(L,{accentHex:Y[p.status].hex}),n(`div`,{className:`flex items-center justify-between mb-3 relative z-10`,children:[n(`div`,{className:`flex items-center gap-2`,children:[n(`span`,{className:`font-mono text-[10px] font-bold text-slate-300 dark:text-slate-600 uppercase tracking-[0.1em]`,children:p.id.toUpperCase()}),n(`div`,{className:`flex items-center gap-1 text-[9px] font-bold uppercase tracking-[0.1em] text-slate-400`,children:[n(`span`,{className:`sr-only`,children:[`, Status: `,p.status.replace(`_`,` `)]}),n(T,{className:`w-3 h-3`,"aria-hidden":`true`,style:{color:Y[p.status].hex}})]})]}),n(`div`,{className:`flex items-center gap-1.5 px-2.5 py-1 rounded-full border text-[9px] font-bold uppercase tracking-[0.14em] ${C.bg} ${C.color}`,children:[n(`span`,{className:`w-1.5 h-1.5 rounded-full shrink-0 ${C.dot}`}),n(`span`,{className:`sr-only`,children:`Priority: `}),C.label]})]}),n(`h4`,{className:`text-[15px] font-bold tracking-tight leading-snug mb-4 relative z-10 group-hover:translate-x-0.5 transition-transform duration-300 ${p.status===`completed`?`text-slate-400 dark:text-slate-500 line-through decoration-slate-300 dark:decoration-slate-700`:`text-slate-900 dark:text-white`}`,children:p.title}),n(`div`,{className:`relative z-10 mb-4 flex flex-wrap items-center gap-2 text-[9px] font-bold uppercase tracking-[0.14em] text-slate-400`,children:[n(`span`,{className:`rounded-full border border-black/[0.06] dark:border-white/[0.08] bg-black/[0.03] dark:bg-white/[0.03] px-2.5 py-1`,children:e.executorLabel}),o&&n(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-black/[0.06] dark:border-white/[0.08] bg-black/[0.03] dark:bg-white/[0.03] px-2 py-0.5`,children:[n(k,{avatarConfig:c,seed:o}),n(`span`,{className:`max-w-[120px] truncate`,children:o})]}),_&&n(`span`,{className:`rounded-full border border-black/[0.06] dark:border-white/[0.08] bg-black/[0.03] dark:bg-white/[0.03] px-2.5 py-1 max-w-[120px] truncate`,children:_}),g&&n(`span`,{className:`rounded-full border border-black/[0.06] dark:border-white/[0.08] bg-black/[0.03] dark:bg-white/[0.03] px-2.5 py-1 font-mono max-w-[120px] truncate`,children:g})]}),n(`div`,{className:`flex items-center gap-3 mt-auto relative z-10`,children:[n(`div`,{className:`flex items-center gap-1.5 text-[10px] font-semibold text-slate-400 dark:text-slate-500`,children:[n(pe,{className:`w-3 h-3 text-slate-300 dark:text-slate-600 group-hover:text-signal-500 transition-colors`,strokeWidth:2}),n(`span`,{className:`font-mono truncate max-w-[120px]`,children:p.source})]}),n(`span`,{className:`text-slate-200 dark:text-slate-700 text-[9px]`,children:`·`}),n(`div`,{className:`flex items-center gap-1.5 text-[10px] text-slate-400 dark:text-slate-500`,children:[n(`div`,{className:`w-6 h-6 rounded-lg flex items-center justify-center bg-black/[0.03] dark:bg-white/[0.03]`,children:n(`span`,{className:`text-[9px] font-black font-display text-slate-500 dark:text-slate-400`,children:p.assignee[0]})}),n(`span`,{className:`font-medium`,children:p.assignee})]})]}),n(Q,{indicators:h}),n(`div`,{className:`flex items-center justify-between mt-3 pt-3 border-t border-black/[0.04] dark:border-white/[0.04] relative z-10`,children:[n(`div`,{className:`flex items-center gap-3`,children:[n(`div`,{className:`flex min-w-0 items-center gap-1.5 text-[10px] text-slate-300 dark:text-slate-600`,children:[n(F,{className:`w-3 h-3 shrink-0`,strokeWidth:2,"aria-hidden":`true`}),n(`span`,{className:`sr-only`,children:`Duration: `}),n(Ae,{durationText:b??p.time??`Not started`,flashTriggerCount:M})]}),v&&n(`a`,{href:le(v),target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1 text-[9px] font-mono text-signal-500 hover:text-signal-400 transition-colors`,onClick:e=>e.stopPropagation(),children:[n(ne,{className:`w-3 h-3`,strokeWidth:2}),n(`span`,{children:`PR`})]})]}),n(`span`,{className:`text-[9px] font-mono text-slate-300 dark:text-slate-700`,children:x?`· ${De(x)}`:m})]}),n(`div`,{className:`absolute top-3 right-3 flex items-center gap-1 p-1 bg-white/90 dark:bg-void-700/95 backdrop-blur-md rounded-full shadow-[0_2px_12px_rgba(0,0,0,0.06)] dark:shadow-[0_2px_12px_rgba(0,0,0,0.4)] border border-black/[0.05] dark:border-white/[0.08] translate-y-[-8px] opacity-0 pointer-events-none group-hover:pointer-events-auto group-hover:translate-y-0 group-hover:opacity-100 group-focus:pointer-events-auto group-focus:translate-y-0 group-focus:opacity-100 group-focus-visible:pointer-events-auto group-focus-visible:translate-y-0 group-focus-visible:opacity-100 focus-within:pointer-events-auto focus-within:opacity-100 focus-within:translate-y-0 group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-focus-within:translate-y-0 transition-all duration-300 ease-[cubic-bezier(0.175,0.885,0.32,1.275)] z-20`,children:[n(`button`,{type:`button`,className:`p-1.5 text-slate-500 dark:text-slate-400 hover:text-signal-600 dark:hover:text-signal-400 rounded-full transition-colors active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal-500/30`,title:`Edit task ${p.id}`,"aria-label":`Edit task ${p.id}`,onClick:()=>r(p),children:n(ee,{className:`w-3 h-3`})}),n(`button`,{type:`button`,ref:A,className:`p-1.5 text-slate-500 dark:text-slate-400 hover:text-status-red rounded-full transition-colors active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-status-red/30`,title:`Delete task ${p.id}`,"aria-label":`Delete task ${p.id}`,onClick:async e=>{e.stopPropagation(),await O({title:`Delete Task`,body:`Are you sure you want to delete "${p.title}"?`,confirmLabel:`Delete Task`,cancelLabel:`Cancel`,destructive:!0})&&i(p)},children:n(G,{className:`w-3 h-3`})})]}),n(W,{isOpen:E,options:D,onConfirm:te,onCancel:re,triggerRef:A})]})},(e,t)=>{let n=e.viewModel.task,r=t.viewModel.task,i=n.recordId===r.recordId&&n.status===r.status&&n.priority===r.priority&&n.title===r.title,a=e.viewModel.dependencyIndicators.length===t.viewModel.dependencyIndicators.length&&e.viewModel.dependencyIndicators.every((e,n)=>e.status===t.viewModel.dependencyIndicators[n].status&&e.recordId===t.viewModel.dependencyIndicators[n].recordId);return i&&a&&e.viewModel.prUrl===t.viewModel.prUrl&&e.viewModel.sessionId===t.viewModel.sessionId&&e.viewModel.liveRunningTime===t.viewModel.liveRunningTime&&e.agentPresetName===t.agentPresetName&&e.onEdit===t.onEdit&&e.onDelete===t.onDelete&&e.isDragging===t.isDragging});function Me(e,t,n){let r=new Map;for(let i of e){let e=ge({task:i,dispatches:t,events:n}),a={};i.session_id&&(a.sessionId=i.session_id.replace(/^sessions\//,``)),e.startedAt&&(a.liveStartedAt=e.startedAt),e.totalSeconds>0&&(a.liveTotalSeconds=e.totalSeconds);let o=i.record_id,s=i.id;o&&r.set(o,a),s&&s!==o&&r.set(s,a)}return r}i(),c();var Ne=({mode:e,hasProjects:t,onAddProject:r})=>{let i=e===`project`;return n(`section`,{className:`relative overflow-hidden rounded-[2.2rem] border border-black/[0.06] bg-white/72 p-8 shadow-[0_18px_48px_rgba(15,23,42,0.07)] backdrop-blur-2xl dark:border-white/[0.06] dark:bg-void-800/62 dark:shadow-[0_18px_48px_rgba(0,0,0,0.28)] md:p-10`,children:[n(`div`,{className:`pointer-events-none absolute inset-0 bg-[radial-gradient(ellipse_72%_58%_at_48%_25%,rgba(0,224,160,0.09),transparent_64%)] dark:bg-[radial-gradient(ellipse_72%_58%_at_48%_25%,rgba(0,224,160,0.13),transparent_64%)]`}),n(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:[n(`div`,{className:`h-52 w-52 rounded-full border border-signal-500/14 animate-[ping_5.8s_cubic-bezier(0.1,0.5,0.8,1)_infinite]`}),n(`div`,{className:`absolute h-80 w-80 rounded-full border border-ember-500/10 animate-[ping_8.4s_cubic-bezier(0.1,0.5,0.8,1)_infinite]`}),n(`div`,{className:`absolute h-[28rem] w-[28rem] rounded-full border border-black/[0.035] animate-[ping_11s_cubic-bezier(0.1,0.5,0.8,1)_infinite] dark:border-white/[0.04]`})]}),n(`div`,{className:`relative z-10 grid gap-8 lg:grid-cols-[minmax(0,1fr)_22rem] lg:items-center`,children:[n(`div`,{children:[n(`div`,{className:`mb-6 flex h-16 w-16 items-center justify-center rounded-[1.35rem] border border-signal-500/20 bg-signal-500/10 text-signal-500 shadow-[0_0_32px_rgba(0,224,160,0.16)]`,children:n(w,{className:`h-7 w-7`,strokeWidth:1.7})}),n(`div`,{className:`text-[10px] font-bold uppercase tracking-[0.22em] text-signal-500`,children:i?`Task Board Standby`:`Sprint Scope Required`}),n(`h1`,{className:`mt-3 max-w-3xl font-display text-4xl font-black leading-[0.98] tracking-tight text-slate-900 dark:text-white md:text-5xl`,children:i?`Task work starts with a project.`:`Create a sprint to unlock tasks.`}),n(`p`,{className:`mt-5 max-w-2xl text-sm font-medium leading-relaxed text-slate-500 dark:text-slate-400 md:text-base`,children:i?`Connect a project before the task board starts tracking queued work, active implementation, QA review, and completed delivery.`:`Tasks are organized inside sprint scope. Create or select a sprint before adding implementation work to the board.`}),n(`div`,{className:`mt-8 flex flex-wrap gap-3`,children:[i?n(se,{type:`button`,onClick:r,variant:`signal`,icon:O,className:`!inline-flex !min-h-[44px] !items-center !gap-2.5 !rounded-full !px-5 !py-2.5 !text-[10px] !font-bold !uppercase !tracking-[0.14em] !shadow-[0_10px_30px_rgba(0,224,160,0.22)] hover:!-translate-y-px focus-visible:!ring-2 focus-visible:!ring-signal-500/40`,children:t?`Add Project`:`Add First Project`}):n(E,{to:`/sprints`,className:`inline-flex min-h-[44px] items-center gap-2.5 rounded-full bg-signal-500 px-5 py-2.5 text-[10px] font-bold uppercase tracking-[0.14em] text-void-900 shadow-[0_10px_30px_rgba(0,224,160,0.22)] transition-all hover:-translate-y-px hover:bg-signal-400 focus-visible:ring-2 focus-visible:ring-signal-500/40`,children:[n(O,{className:`h-3.5 w-3.5`,strokeWidth:2.3}),`Plan Sprint`]}),n(E,{to:i?`/projects`:`/sprints`,className:`inline-flex min-h-[44px] items-center gap-2.5 rounded-full border border-black/[0.06] bg-white/75 px-5 py-2.5 text-[10px] font-bold uppercase tracking-[0.14em] text-slate-600 transition-all hover:-translate-y-px hover:text-slate-900 focus-visible:ring-2 focus-visible:ring-signal-500/40 dark:border-white/[0.06] dark:bg-white/[0.04] dark:text-slate-300 dark:hover:text-white`,children:[n(pe,{className:`h-3.5 w-3.5 text-ember-500`,strokeWidth:2.1}),i?`Manage Projects`:`Open Sprints`,n(D,{className:`h-3.5 w-3.5`,strokeWidth:2.1})]})]})]}),n(`div`,{className:`relative overflow-hidden rounded-[1.7rem] border border-black/[0.06] bg-black/[0.025] p-5 dark:border-white/[0.06] dark:bg-white/[0.035]`,children:[n(`div`,{className:`pointer-events-none absolute inset-0 bg-[radial-gradient(ellipse_85%_65%_at_50%_0%,rgba(255,184,0,0.12),transparent_68%)]`}),n(`div`,{className:`relative z-10 space-y-3`,children:[{label:`Project`,value:i?`required`:`ready`,tone:i?`text-ember-500`:`text-status-green`},{label:`Sprint`,value:i?`waiting`:`required`,tone:i?`text-signal-500`:`text-ember-500`},{label:`Tasks`,value:`locked`,tone:`text-slate-500 dark:text-slate-400`}].map((e,t)=>n(`div`,{className:`rounded-[1.15rem] border border-white/60 bg-white/72 p-4 shadow-sm dark:border-white/[0.06] dark:bg-white/[0.04]`,children:n(`div`,{className:`flex items-center justify-between gap-4`,children:[n(`div`,{children:[n(`div`,{className:`text-[9px] font-bold uppercase tracking-[0.16em] text-slate-400`,children:e.label}),n(`div`,{className:`mt-1 text-xs font-bold uppercase tracking-[0.12em] ${e.tone}`,children:e.value})]}),n(`div`,{className:`h-2.5 w-2.5 rounded-full ${t===0?`bg-ember-500`:t===1?`bg-signal-500`:`bg-slate-300 dark:bg-slate-600`}`,children:n(`span`,{className:`block h-full w-full rounded-full animate-ping bg-current opacity-40`})})]})},e.label))})]})]})]})},Pe=r(({status:e,count:t})=>{let r=Y[e],i=r.icon;return n(`div`,{className:`flex items-center justify-between mb-6`,children:[n(`div`,{className:`flex items-center gap-2.5`,children:[n(i,{className:`w-5 h-5 ${r.color}`,strokeWidth:2}),n(`span`,{className:`font-display text-lg font-bold tracking-tight ${r.color}`,children:r.label})]}),n(`span`,{className:`text-[10px] font-mono font-bold px-2.5 py-1 rounded-lg bg-black/[0.03] dark:bg-white/[0.03] ${r.color}`,children:t})]})}),Fe=r(({sprints:e,selectedId:t,onSelect:r,sprintKeyPrefix:i})=>{let[a,o]=l(!1),s=t?e.find(e=>e.id===t):null;return n(`div`,{className:`relative`,children:[n(`button`,{onClick:()=>o(e=>!e),className:`group flex items-center gap-3 px-5 py-3 rounded-2xl border transition-all duration-300 ${s?`bg-ember-500/[0.06] dark:bg-ember-500/[0.08] border-ember-500/20 dark:border-ember-500/25 shadow-[0_0_20px_rgba(255,184,0,0.06)]`:`bg-black/[0.03] dark:bg-white/[0.03] border-black/[0.06] dark:border-white/[0.06]`} hover:border-ember-500/40 dark:hover:border-ember-500/40`,children:[n(S,{className:`w-4 h-4 ${s?`text-ember-500`:`text-slate-400`} transition-colors`,strokeWidth:2}),n(`span`,{className:`text-sm font-bold tracking-tight ${s?`text-ember-600 dark:text-ember-400`:`text-slate-600 dark:text-slate-400`}`,children:s?A(s,i):`All Sprints`}),n(U,{className:`w-4 h-4 text-slate-400 transition-transform duration-300 ${a?`rotate-180`:``}`,strokeWidth:2})]}),a&&n(`div`,{className:`absolute left-0 top-full mt-2 w-80 z-50 bg-white/95 dark:bg-void-800/95 backdrop-blur-2xl border border-black/[0.06] dark:border-white/[0.08] rounded-2xl shadow-[0_20px_40px_rgba(0,0,0,0.12)] dark:shadow-[0_20px_40px_rgba(0,0,0,0.4)] overflow-hidden`,children:[n(`button`,{onClick:()=>{r(null),o(!1)},className:`w-full flex items-center gap-3 px-5 py-3.5 text-left transition-colors duration-200 ${t?`hover:bg-black/[0.03] dark:hover:bg-white/[0.03]`:`bg-signal-500/[0.06] dark:bg-signal-500/[0.08]`}`,children:[n(w,{className:`w-4 h-4 text-signal-500`,strokeWidth:2}),n(`div`,{className:`flex-1`,children:n(`span`,{className:`text-sm font-bold text-slate-800 dark:text-white`,children:`All Sprints`})})]}),n(`div`,{className:`h-px bg-black/[0.04] dark:bg-white/[0.04]`}),e.map(e=>{let a=t===e.id;return n(`button`,{onClick:()=>{r(e.id),o(!1)},className:`w-full flex items-center gap-3 px-5 py-3.5 text-left transition-colors duration-200 ${a?`bg-ember-500/[0.06] dark:bg-ember-500/[0.08]`:`hover:bg-black/[0.03] dark:hover:bg-white/[0.03]`}`,children:[n(`div`,{className:`w-2 h-2 rounded-full shrink-0 ${e.status===`running`?`bg-status-green shadow-[0_0_8px_rgba(0,171,132,0.6)] animate-pulse`:e.status===`paused`?`bg-status-amber shadow-[0_0_8px_rgba(245,158,11,0.45)]`:e.status===`completed`?`bg-signal-500`:e.status===`failed`?`bg-status-red`:e.status===`cancelled`?`bg-slate-400 dark:bg-slate-500`:`bg-slate-400 dark:bg-slate-600`}`}),n(`div`,{className:`flex-1 min-w-0`,children:[n(`span`,{className:`text-sm font-bold tracking-tight ${a?`text-ember-600 dark:text-ember-400`:`text-slate-800 dark:text-white`}`,children:A(e,i)}),n(`div`,{className:`flex items-center gap-2 mt-0.5`,children:n(`span`,{className:`text-[9px] font-mono text-slate-400 uppercase tracking-[0.1em]`,children:e.date})})]}),n(`div`,{className:`flex flex-col items-end gap-0.5`,children:[n(`span`,{className:`text-[10px] font-mono font-bold text-slate-500`,children:e.tasksCount}),n(`div`,{className:`w-12 h-1 rounded-full bg-black/[0.06] dark:bg-white/[0.06] overflow-hidden`,children:n(`div`,{className:`h-full rounded-full bg-signal-500 transition-all duration-500`,style:{width:`${e.completion}%`}})})]})]},e.id)})]})]})}),Ie=r(({sprint:e,tasks:t})=>{let r=t.filter(e=>e.status===`completed`).length,i=t.filter(e=>e.status===`in_progress`).length,a=t.filter(e=>e.status===`pending`).length,o=t.length,s=o>0?Math.round(r/o*100):0;return n(`div`,{className:`relative overflow-hidden bg-white/70 dark:bg-void-800/60 backdrop-blur-2xl border border-black/[0.06] dark:border-white/[0.06] rounded-[1.75rem] p-7 shadow-[0_2px_20px_rgba(0,0,0,0.04)] dark:shadow-[0_4px_24px_rgba(0,0,0,0.2)]`,children:[n(`div`,{"aria-hidden":!0,className:`absolute -right-4 -bottom-6 text-[6rem] font-black tracking-tighter text-black/[0.025] dark:text-white/[0.02] pointer-events-none select-none font-display leading-none`,children:[s,`%`]}),n(`div`,{className:`flex items-center gap-3 mb-5`,children:[n(`div`,{className:`w-10 h-10 rounded-xl bg-ember-500/[0.1] dark:bg-ember-500/[0.15] flex items-center justify-center`,children:n(S,{className:`w-5 h-5 text-ember-500`,strokeWidth:2})}),n(`div`,{children:[n(`h3`,{className:`text-lg font-black font-display tracking-tight text-slate-900 dark:text-white`,children:e.name}),n(`p`,{className:`text-[10px] font-mono text-slate-400 uppercase tracking-[0.1em]`,children:e.date})]})]}),n(`div`,{className:`flex gap-1 h-2.5 rounded-full overflow-hidden mb-5`,role:`progressbar`,"aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Sprint progress: ${s}%`,children:[r>0&&n(`div`,{className:`bg-status-green rounded-full transition-all duration-700`,style:{width:`${r/o*100}%`}}),i>0&&n(`div`,{className:`bg-signal-500 rounded-full transition-all duration-700`,style:{width:`${i/o*100}%`}}),a>0&&n(`div`,{className:`bg-slate-200 dark:bg-slate-700 rounded-full transition-all duration-700`,style:{width:`${a/o*100}%`}})]}),n(`div`,{className:`grid grid-cols-3 gap-2`,children:[{label:`Completed`,value:r,color:`text-status-green`},{label:`Running`,value:i,color:`text-signal-500`},{label:`Queued`,value:a,color:`text-slate-400`}].map(({label:e,value:t,color:r})=>n(`div`,{className:`flex flex-col items-center py-2.5 rounded-xl bg-black/[0.03] dark:bg-white/[0.03] border border-black/[0.04] dark:border-white/[0.04]`,children:[n(`span`,{className:`text-xl font-black font-mono leading-none ${r}`,children:t}),n(`span`,{className:`text-[8px] font-bold uppercase tracking-[0.14em] text-slate-400 mt-1`,children:e})]},e))}),n(E,{to:`/sprints`,className:`flex items-center gap-1.5 mt-5 pt-4 border-t border-black/[0.05] dark:border-white/[0.04] text-[10px] font-bold uppercase tracking-[0.14em] text-slate-400 hover:text-ember-500 transition-colors duration-200 group/link`,children:[n(d,{className:`w-3 h-3 group-hover/link:translate-x-0.5 group-hover/link:-translate-y-0.5 transition-transform duration-200`,strokeWidth:2.5}),`View Sprint`]})]})}),Le=()=>{let r=a(null),i=a(null),{projects:c,selectedProject:u,createProject:d}=_(),p=u?.id||null,{execution:b,status:S}=re(p,!!u),ee=v(p).data?.settings?.git?.sprintKeyPrefix||`SPR`,[E,D]=l(new Map);s(()=>{if(!p)return;let e=!1;return ie(p).then(t=>{e||D(new Map(t.map(e=>[e.id,e])))}).catch(()=>{}),()=>{e=!0}},[p]);let{data:k,loading:ne,selectedSprintId:A,selectSprint:j,refetch:M}=ue(u?.id||null),N=x({select:e=>e.location.searchStr}),P=t(()=>{let e=new URLSearchParams(N);return e.get(`sprintId`)||e.get(`sprint`)},[N]),F=t(()=>P&&k.some(e=>e.id===P)?P:null,[P,k]),I=F??A;s(()=>{!F||F===A||j(F)},[F,A,j]);let[L,ae]=l(`all`),[R,ce]=l(`all`),[le,z]=l(20),[V,H]=l(!1),[pe,me]=l(!1),[U,W]=l(null),[G,ge]=l(null),[K,ve]=l(null),[ye,q]=l([]),[be,Se]=l(null),we=a(null),{tasks:Y,loading:X,error:Te,refresh:Z}=he(u?.id||null,c,k,I);s(()=>{if(!X&&Y.length>0){let e=new URLSearchParams(N),t=e.get(`taskId`);if(t&&Y.some(e=>e.id===t||e.recordId===t)){let n=Y.find(e=>e.id===t||e.recordId===t);if(n){Se(n.recordId),e.delete(`taskId`);let t=e.toString(),r=`${window.location.pathname}${t?`?${t}`:``}${window.location.hash}`;window.history.replaceState(window.history.state,``,r)}}}},[N,X,Y]);let Ee=y(),[De,Oe]=l(!1);s(()=>{let e;return X?e=window.setTimeout(()=>Oe(!0),200):Oe(!1),()=>window.clearTimeout(e)},[X]),o(()=>{if(!r.current)return;let e=B.context(()=>{B.fromTo(Array.from(r.current.children),{opacity:0,y:40},{opacity:1,y:0,stagger:.1,duration:.9,ease:`power4.out`,delay:.05})});return()=>e.revert()},[]),o(()=>{if(!i.current||X||De)return;let e=Array.from(i.current.querySelectorAll(`.task-card-entry`));if(e.length===0)return;let t=B.context(()=>{Ee?B.set(e,{opacity:1,y:0,scale:1}):B.fromTo(e,{opacity:0,y:15,scale:.98},{opacity:1,y:0,scale:1,stagger:.05,duration:.6,ease:`power2.out`,delay:.05})});return()=>t.revert()},[u?.id,L,R,I,X,De,Ee]),o(()=>{if(!be||!i.current)return;let e=i.current.querySelector(`[data-task-id="${be}"] .kanban-card`);if(!e)return;e.scrollIntoView({behavior:`smooth`,block:`nearest`});let t=document.createElement(`div`);t.style.position=`absolute`,t.style.inset=`0`,t.style.backgroundColor=`rgba(0, 224, 160, 0.2)`,t.style.borderRadius=`1.75rem`,t.style.pointerEvents=`none`,t.style.zIndex=`50`,e.appendChild(t);let n=B.context(()=>{B.to(t,{opacity:0,duration:.4,ease:`power2.out`,onComplete:()=>t.remove()}),B.fromTo(e,{opacity:.6,borderWidth:`2px`,borderColor:`rgba(148, 163, 184, 0.5)`,borderStyle:`dashed`},{opacity:1,borderWidth:`1px`,borderColor:`rgba(0,0,0,0.06)`,borderStyle:`solid`,duration:.4,ease:`power2.out`,clearProps:`opacity,borderWidth,borderStyle,borderColor`})});return Se(null),()=>n.revert()},[be,Y]);let Q=t(()=>[...ye,...Y],[ye,Y]),Ae=t(()=>new Map(Q.map(e=>[e.recordId,e])),[Q]),{filteredTasks:Le,visibleTasks:Re,stats:ze,columns:Be}=t(()=>Ce(Q,L,R,le),[Q,L,R,le]),Ve=t(()=>I?b.taskDispatches.filter(e=>e.sprintId===I):b.taskDispatches,[b.taskDispatches,I]),He=t(()=>I?b.recentEvents.filter(e=>e.sprintId===I):b.recentEvents,[b.recentEvents,I]),Ue=t(()=>Me(S.subtasks??[],Ve,He),[S.subtasks,Ve,He]),We=t(()=>{let e=new Map;return Q.forEach(t=>{e.set(t.recordId,ke(t,Ae,Ue.get(t.recordId)))}),e},[Q,Ae,Ue]),Ge=I&&k.find(e=>e.id===I)||null,$=!!u&&k.length>0,Ke=e(e=>{let t=new URLSearchParams(N);if(t.has(`sprint`)){e?t.set(`sprint`,e):t.delete(`sprint`);let n=t.toString(),r=`${window.location.pathname}${n?`?${n}`:``}${window.location.hash}`;window.history.replaceState(window.history.state,``,r)}j(e)},[N,j]),qe=e(async e=>{if(!u)return;let t=!!U,n=`opt-${Date.now()}`;if(!t){let t={recordId:n,id:`OPT-...`,source:`dash`,sprint:k.find(t=>t.id===e.sprintId)?.name||`...`,sprintId:e.sprintId,title:e.title,status:e.status,priority:e.priority,executorType:e.executorType,assignee:`Pending`,time:`...`,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),promptMarkdown:e.promptMarkdown,description:e.description,dependsOnTaskIds:e.dependsOnTaskIds,isIndependent:!1,isMerged:!1,mergeIndicator:null,isOptimistic:!0};q(e=>[t,...e])}try{let n=null;t?await g(U.recordId,e):n=(await m(u.id,e)).id,await Promise.all([Z(),M()]),W(null),H(!1),n&&Se(n)}finally{t||q(e=>e.filter(e=>e.recordId!==n))}},[u,U,Z,M,k]),Je=e((e,t)=>{Ee||(ge(e),t.dataTransfer&&(t.dataTransfer.effectAllowed=`move`))},[Ee]),Ye=e(()=>{ge(null),ve(null)},[]),Xe=e((e,t,n)=>{n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect=`move`),ve({status:e,index:t})},[]),Ze=e(async(e,t,n)=>{if(n.preventDefault(),!G)return;let r=Y.find(e=>e.recordId===G);if(!r)return;e===`in_progress`&&r.status!==`coding_completed`&&r.status!==`QA_REVIEW_FAILED`||e===`pending`||e===`completed`||r.status;let i={pending:`pending`,in_progress:`in_progress`,completed:`completed`};if(J(r.status)!==e){let t=i[e]||r.status,n={...r,status:t};q(e=>[n,...e.filter(e=>e.recordId!==n.recordId)]);try{await g(r.recordId,{status:t}),await Z()}finally{q(e=>e.filter(e=>e.recordId!==n.recordId))}}else{let t=i[e]||r.status;if(r.status!==t){let e={...r,status:t};q(t=>[e,...t.filter(t=>t.recordId!==e.recordId)]);try{await g(r.recordId,{status:t}),await Z()}finally{q(t=>t.filter(t=>t.recordId!==e.recordId))}}}ge(null),ve(null)},[G,Y,Z]),Qe=e(async e=>{await h(e.recordId),await Promise.all([Z(),M()]),W(t=>t?.recordId===e.recordId?null:t)},[Z,M]),$e=e(e=>{W(e),H(!0),setTimeout(()=>we.current?.scrollIntoView({behavior:`smooth`,block:`start`}),50)},[]),et=e(async e=>{if(e.type===`new_project`){let t=e.initMode===`new-local`?e.path||e.name:e.repoSlug||e.name;await d({name:e.name,sourceType:e.initMode===`new-local`?`local`:`git`,sourceRef:t,initMode:e.initMode,remoteProvider:e.remoteProvider,isPrivate:e.isPrivate});return}await d({name:e.name,sourceType:e.type,sourceRef:e.path,cloneDir:e.cloneDir})},[d]);return n(te,{className:$?`gap-16`:`gap-10`,padding:$?`standard`:`sprintsEmpty`,children:[n(`div`,{ref:r,className:`flex flex-col lg:flex-row lg:items-end justify-between gap-8`,children:[n(`div`,{className:`flex flex-col gap-5`,children:[n(`div`,{className:`flex items-center gap-2.5 text-signal-500 font-mono text-[10px] font-bold uppercase tracking-[0.2em]`,children:[n(w,{className:`w-3.5 h-3.5`,strokeWidth:2.5}),`Task Pipeline`]}),n(`div`,{className:`relative overflow-hidden`,children:[n(`h2`,{"aria-hidden":!0,className:`absolute -top-10 -left-3 text-[7rem] font-black tracking-tighter text-black/[0.04] dark:text-white/[0.03] pointer-events-none select-none font-display leading-none`,children:`FLOW`}),n(`h1`,{className:`text-5xl md:text-7xl font-black tracking-tighter text-slate-900 dark:text-white leading-[0.92] font-display relative z-10`,children:[`Task `,n(`br`,{}),n(`span`,{className:`text-signal-500`,children:`Board.`})]})]}),n(`p`,{className:`text-lg text-slate-500 dark:text-slate-500 font-medium max-w-xl mt-1 leading-relaxed`,children:[u?I?`Task execution for ${u.name}, scoped to Sprint ${k.find(e=>e.id===I)?.number??`...`}.`:`Task execution for ${u.name}. Showing all tasks across the project.`:`Select a project to manage sprint tasks.`,u&&(L!==`all`||R!==`all`)&&n(`span`,{className:`block text-sm text-signal-600 dark:text-signal-500 mt-1`,children:[`Filtered to show `,L===`all`?`all`:L.replace(`_`,` `),` status and `,R===`all`?`any`:R,` priority.`]})]})]}),n(`div`,{className:`flex flex-col items-start lg:items-end gap-4 shrink-0`,children:[n(`div`,{className:`flex items-center gap-2.5 flex-wrap`,children:[ze.inProgress>0&&n(`div`,{className:`flex items-center gap-2 px-4 py-2 rounded-full bg-signal-500/[0.08] border border-signal-500/20 text-[10px] font-bold uppercase tracking-[0.14em] text-signal-600 dark:text-signal-400`,children:[n(`span`,{className:`w-1.5 h-1.5 rounded-full bg-signal-500 relative`,children:n(`span`,{className:`absolute inset-0 rounded-full animate-ping bg-signal-400 opacity-70`})}),ze.inProgress,` Running`]}),ze.critical>0&&n(`div`,{className:`flex items-center gap-2 px-4 py-2 rounded-full bg-status-red/[0.06] border border-status-red/20 text-[10px] font-bold uppercase tracking-[0.14em] text-status-red`,children:[n(_e,{className:`w-3 h-3`,strokeWidth:2.5}),ze.critical,` Critical`]}),n(`div`,{className:`flex items-center gap-2 px-4 py-2 rounded-full bg-black/[0.04] dark:bg-white/[0.04] border border-black/[0.06] dark:border-white/[0.06] text-[10px] font-bold uppercase tracking-[0.14em] text-slate-500`,children:[n(w,{className:`w-3 h-3`,strokeWidth:2}),ze.total,` Total`]})]}),n(se,{onClick:()=>{V||U?(H(!1),W(null)):(H(!0),setTimeout(()=>we.current?.scrollIntoView({behavior:`smooth`,block:`start`}),50))},variant:`signal`,icon:V||U?oe:O,disabled:!u||k.length===0,className:`!flex !items-center !gap-2.5 !px-6 !py-3.5 !font-bold !text-sm !rounded-2xl !transition-all !duration-300 !shadow-[0_4px_20px_rgba(0,224,160,0.25)] hover:!shadow-[0_8px_32px_rgba(0,224,160,0.45)] hover:!-translate-y-px !shrink-0`,children:V||U?`Close Composer`:`New Task`})]})]}),$&&n(`div`,{className:`flex flex-col sm:flex-row items-start sm:items-center gap-4 -mt-4`,children:[n(Fe,{sprints:k,selectedId:I,onSelect:Ke,sprintKeyPrefix:ee}),n(C,{options:[{value:`all`,label:`All`},{value:`in_progress`,label:`Running`},{value:`pending`,label:`Queued`},{value:`completed`,label:`Done`}],active:L,onChange:e=>ae(e)}),n(C,{options:[{value:`all`,label:`Any Priority`},{value:`critical`,label:`Critical`},{value:`high`,label:`High`},{value:`medium`,label:`Medium`},{value:`low`,label:`Low`}],active:R,onChange:e=>ce(e)}),n(`div`,{className:`ml-auto`,children:n(f,{value:le,onChange:z,label:`Show`})})]}),$&&Ge&&n(`div`,{className:`-mt-6`,children:n(Ie,{sprint:Ge,tasks:Le})}),!u&&n(Ne,{mode:`project`,hasProjects:c.length>0,onAddProject:()=>me(!0)}),u&&!ne&&k.length===0&&n(Ne,{mode:`sprint`,hasProjects:c.length>0,onAddProject:()=>me(!0)}),$&&Te&&n(`div`,{role:`alert`,className:`px-6 py-4 rounded-2xl border border-status-red/20 bg-status-red/[0.06] text-status-red text-sm`,children:Te}),$&&(V||U)&&n(`div`,{ref:we,className:`scroll-mt-8`,children:n(xe,{sprints:k,availableTasks:Y,initialTask:U,initialSprintId:A,onClose:()=>{H(!1),W(null)},onSubmit:qe},U?.recordId||`new`)}),$&&n(`div`,{ref:i,className:`grid gap-6 ${Be.length===1?`grid-cols-1`:Be.length===2?`grid-cols-1 lg:grid-cols-2`:`grid-cols-1 lg:grid-cols-3`}`,children:Be.map(({status:e,count:t,tasks:r})=>n(`div`,{className:`flex flex-col`,children:[n(Pe,{status:e,count:t}),n(`div`,{className:`flex-1 grid grid-cols-1 grid-rows-1 p-4 rounded-[1.5rem] min-h-[200px] bg-black/[0.015] dark:bg-white/[0.015] border relative transition-colors duration-300 ${K?.status===e?`border-signal-500/50 bg-signal-500/5`:`border-black/[0.03] dark:border-white/[0.03]`}`,onDragOver:t=>Xe(e,r.length,t),onDrop:t=>Ze(e,r.length,t),children:n(de,{show:De,className:`col-start-1 row-start-1`,skeleton:n(`div`,{className:`flex flex-col gap-4`,children:[n(T,{}),n(T,{}),n(T,{})]}),children:!X&&r.length===0?n(`div`,{className:`col-start-1 row-start-1 flex items-center justify-center text-center p-6 text-xs font-medium text-slate-400 dark:text-slate-500 border-2 border-dashed rounded-[1.5rem] bg-black/[0.015] dark:bg-white/[0.015] transition-colors ${K?.status===e?`border-signal-500/30`:`border-black/[0.05] dark:border-white/[0.05]`}`,children:[`No `,e.replace(`_`,` `),` tasks`,n(`br`,{}),L!==`all`||R!==`all`?`matching current filters`:I?`in this sprint`:`in this project`,`.`]}):X?null:n(`div`,{className:`col-start-1 row-start-1 flex flex-col gap-4`,children:[r.map((t,r)=>{let i=K?.status===e&&K?.index===r,a=We.get(t.recordId);return a?n(`div`,{className:`contents`,children:[i&&G!==t.recordId&&n(`div`,{className:`h-24 mb-4 rounded-[1.5rem] border-2 border-dashed border-signal-500/50 bg-signal-500/10 transition-all duration-300`}),n(`div`,{className:`task-card-entry`,"data-task-id":t.recordId,onDragOver:t=>{t.stopPropagation(),Xe(e,r,t)},onDrop:t=>{t.stopPropagation(),Ze(e,r,t)},children:n(je,{viewModel:a,index:r,onEdit:$e,onDelete:Qe,agentPresetName:t.agentPresetId?E.get(t.agentPresetId)?.name??null:null,agentPresetAvatarConfig:t.agentPresetId?E.get(t.agentPresetId)?.avatarConfig:void 0,isDragging:G===t.recordId,onDragStart:e=>Je(t.recordId,e),onDragEnd:Ye})},t.recordId)]},t.recordId):null}),K?.status===e&&K?.index===r.length&&n(`div`,{className:`h-24 mt-4 rounded-[1.5rem] border-2 border-dashed border-signal-500/50 bg-signal-500/10 transition-all duration-300`})]})})})]},e))}),pe&&n(fe,{onClose:()=>me(!1),onAdd:et})]})};export{Le as TasksPage};
1
+ import{S as e,_ as t,a as n,c as r,f as i,h as a,v as o,w as s,x as c,y as l}from"./vendor-Dl0fhdV0.js";import{t as u}from"./createLucideIcon-BshUfn15.js";import{t as d}from"./arrow-up-right-CzhTwjos.js";import{t as f}from"./ListWindowSelector-DtKcmXGY.js";import{t as p}from"./save-DFYp4CAL.js";import{A as m,M as h,Y as g,r as _}from"./project-data-BSCsMQnj.js";import{r as v,t as y}from"./use-reduced-motion-Dxh6NCDM.js";import{Ai as b,Bi as x,Cr as S,Dr as ee,Et as C,Hr as w,Kt as T,Li as E,Mi as D,Mr as O,S as k,St as te,Xr as ne,_t as re,an as A,b as j,bi as M,cn as N,cr as P,di as F,en as I,fn as ie,ft as L,gi as ae,hr as oe,jt as R,kt as se,mi as ce,nn as le,on as ue,or as z,pr as B,pt as V,qt as de,sn as fe,sr as H,ti as pe,vi as me,wi as U,wn as he,y as W,yr as G,yt as ge}from"./index-DddY8OV0.js";import{n as K}from"./list-window-BtcrCL8y.js";var _e=u(`flame`,[[`path`,{d:`M12 3q1 4 4 6.5t3 5.5a1 1 0 0 1-14 0 5 5 0 0 1 1-3 1 1 0 0 0 5 0c0-2-1.5-3-1.5-5q0-2 2.5-4`,key:`1slcih`}]]);i(),c();var ve=(e,n,r,i)=>{let[a,o]=l(r?.sprintId||i||e[0]?.id||``),[c,u]=l(r?.title||``),[d,f]=l(r?.description||``),[p,m]=l(r?.promptMarkdown||``),[h,g]=l(r?.status||`pending`),[_,v]=l(r?.priority||`medium`),[y,b]=l(r?.executorType||`auto`),[x,S]=l(r?.dependsOnTaskIds||[]),ee=!!r,[C,w]=l(``),[T,E]=l(!1),[D,O]=l(null),[k,te]=l({}),[ne,re]=l(!1),A=e=>{te(t=>({...t,[e]:!0}))},j=t(()=>{let e={};return a||(e.sprintId=`Sprint selection is required.`),c.trim()?c.trim().length<3&&(e.title=`Task title must be at least 3 characters long.`):e.title=`Task title is required.`,d.trim()||(e.description=`Task details are required.`),p.trim()||(e.promptMarkdown=`Execution prompt is required.`),y||(e.executorType=`Executor selection is required.`),_||(e.priority=`Priority selection is required.`),h||(e.status=`Status selection is required.`),e},[a,c,d,p,y,_,h]);return s(()=>{r?(o(r.sprintId),u(r.title),f(r.description||``),m(r.promptMarkdown||``),g(r.status),v(r.priority),b(r.executorType),S(r.dependsOnTaskIds||[])):(o(i||e[0]?.id||``),u(``),f(``),m(``),g(`pending`),v(`medium`),b(`auto`),S([]))},[r,i,e]),s(()=>{r&&a===r.sprintId||a!==(r?.sprintId||i||e[0]?.id||``)&&S([])},[a]),{sprintId:a,setSprintId:o,title:c,setTitle:u,description:d,setDescription:f,promptMarkdown:p,setPromptMarkdown:m,status:h,setStatus:g,priority:_,setPriority:v,executorType:y,setExecutorType:b,dependsOnTaskIds:x,setDependsOnTaskIds:S,toggleDependency:e=>{S(t=>t.includes(e)?t.filter(t=>t!==e):[...t,e])},dependencyOptions:t(()=>n.filter(e=>{if(e.sprintId!==a||e.recordId===r?.recordId)return!1;if(r?.recordId){let t=new Set,i=e=>{if(e===r.recordId)return!0;if(t.has(e))return!1;t.add(e);let a=n.find(t=>t.recordId===e);return a?a.dependsOnTaskIds.some(i):!1};if(i(e.recordId))return!1}if(C){let t=C.toLowerCase(),n=e.id?e.id.toLowerCase().includes(t):!1,r=e.recordId.toLowerCase().includes(t),i=e.title.toLowerCase().includes(t);return n||r||i}return!0}),[n,a,r?.recordId,C]),isEditing:ee,isValid:Object.keys(j).length===0,dependencySearchQuery:C,setDependencySearchQuery:w,isSubmitting:T,setIsSubmitting:E,submitError:D,setSubmitError:O,validationErrors:j,touchedFields:k,setFieldTouched:A,hasAttemptedSubmit:ne,setHasAttemptedSubmit:re,isTitleValid:!j.title,titleError:j.title,isSprintIdValid:!j.sprintId,sprintIdError:j.sprintId,isDescriptionValid:!j.description,descriptionError:j.description,isPromptMarkdownValid:!j.promptMarkdown,promptMarkdownError:j.promptMarkdown,isExecutorTypeValid:!j.executorType,executorTypeError:j.executorType,isPriorityValid:!j.priority,priorityError:j.priority,isStatusValid:!j.status,statusError:j.status,getPayload:()=>({sprintId:a,title:c.trim(),description:d.trim(),promptMarkdown:p.trim(),status:h,priority:_,executorType:y,dependsOnTaskIds:x})}};c();var ye=[`critical`,`high`,`medium`,`low`],q=[`pending`,`in_progress`,`completed`],be=[{value:`auto`,label:`Auto`,description:`Use the default Code UX routing.`},{value:`docker_cli`,label:`CLI`,description:`Run through the isolated Docker workspace.`},{value:`jules`,label:`Jules`,description:`Force remote Jules execution.`}],xe=({sprints:e,availableTasks:t,initialTask:r,initialSprintId:i,onClose:s,onSubmit:c})=>{let l=a(null),u=a(null),d=a(null),f=ve(e,t,r,i),m=y();o(()=>{let e=B.context(()=>{let e=B.timeline(),t=m?0:z.entry.duration,n=m?0:z.entry.duration,r=m?0:.055;l.current&&e.fromTo(l.current,{y:m?0:z.entry.yStart,opacity:z.entry.opacityStart,scale:m?1:z.entry.scaleStart,filter:m?z.entry.filterEnd:z.entry.filterStart},{y:z.entry.yEnd,opacity:z.entry.opacityEnd,scale:z.entry.scaleEnd,filter:z.entry.filterEnd,duration:t,ease:z.entry.ease}),d.current&&e.fromTo(Array.from(d.current.querySelectorAll(`[data-composer-stagger]`)),{y:m?0:18,opacity:0},{y:0,opacity:1,stagger:r,duration:n,ease:`power3.out`},m?`+=0`:`-=0.45`)});return()=>e.revert()},[r?.recordId,m]);let{feedback:h,setPending:g,setSuccess:_,setError:v,clearFeedback:x}=R();return n(`section`,{ref:l,className:`relative w-full overflow-hidden rounded-[2rem] border border-black/[0.06] bg-white/78 shadow-[0_20px_50px_rgba(15,23,42,0.08)] backdrop-blur-2xl dark:border-white/[0.06] dark:bg-void-800/72 dark:shadow-[0_24px_56px_rgba(0,0,0,0.28)]`,children:[n(`div`,{className:`pointer-events-none absolute inset-0 bg-[radial-gradient(circle_at_top_left,rgba(0,224,160,0.08),transparent_28%),radial-gradient(circle_at_bottom_right,rgba(255,184,0,0.08),transparent_34%)] dark:bg-[radial-gradient(circle_at_top_left,rgba(0,224,160,0.1),transparent_28%),radial-gradient(circle_at_bottom_right,rgba(255,184,0,0.09),transparent_34%)]`}),n(`form`,{ref:d,onSubmit:async e=>{if(e.preventDefault(),!f.isValid){f.setHasAttemptedSubmit(!0),setTimeout(()=>{let e=d.current?.querySelector(`[aria-invalid="true"]`);e instanceof HTMLElement&&e.focus()},0),!f.isTitleValid&&u.current&&(m||B.to(u.current,{keyframes:[{x:-6},{x:6},{x:-4},{x:4},{x:0}],duration:.4,ease:`power2.inOut`}));return}f.setIsSubmitting(!0),f.setSubmitError(null),x(),g(`Submitting task...`);try{await c(f.getPayload()),f.setIsSubmitting(!1),_(`Task submitted successfully.`),s()}catch(e){f.setIsSubmitting(!1);let t=e instanceof Error?e.message:String(e);f.setSubmitError(t),v(t,{retryAction:()=>d.current?.requestSubmit(),retryLabel:`Retry`,autoDismiss:!1})}},className:`relative z-10 grid gap-0 xl:grid-cols-[minmax(0,1fr)_21rem]`,children:[n(`div`,{className:`border-b border-black/[0.06] p-6 dark:border-white/[0.06] sm:p-8 lg:p-10 xl:border-b-0 xl:border-r`,children:[n(`div`,{"data-composer-stagger":!0,className:`flex items-start justify-between gap-4`,children:[n(`div`,{className:`space-y-4`,children:[n(`div`,{className:`inline-flex items-center gap-2 rounded-full border border-signal-500/15 bg-signal-500/[0.07] px-3 py-1.5 text-[10px] font-bold uppercase tracking-[0.16em] text-signal-600 dark:text-signal-300`,children:[n(S,{className:`h-3.5 w-3.5`,strokeWidth:2.3}),f.isEditing?`Edit Task`:`Task Composer`]}),n(`div`,{className:`space-y-3`,children:[n(`h2`,{className:`font-display text-[2rem] font-black leading-none tracking-tight text-slate-900 dark:text-white sm:text-[2.35rem]`,children:f.isEditing?`Refine The Task.`:`Create A New Task.`}),n(`p`,{className:`max-w-2xl text-sm leading-relaxed text-slate-500 dark:text-slate-400 sm:text-[15px]`,children:`Define the task scope, execution prompt, and specify any dependencies required before starting.`})]})]}),n(`button`,{type:`button`,onClick:s,className:`inline-flex h-10 w-10 shrink-0 items-center justify-center rounded-full border border-black/[0.06] bg-white/78 text-slate-400 transition-all hover:text-slate-900 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal-500 active:scale-95 dark:border-white/[0.06] dark:bg-white/[0.03] dark:hover:text-white`,"aria-label":`Close task composer`,disabled:f.isSubmitting,children:n(oe,{className:`h-4 w-4`})})]}),n(`div`,{"data-composer-stagger":!0,className:`mt-8 grid gap-4 sm:grid-cols-2`,children:[n(`div`,{className:`rounded-[1.4rem] border border-black/[0.06] bg-black/[0.025] p-4 dark:border-white/[0.06] dark:bg-white/[0.03]`,children:[n(`div`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-slate-400 mb-2`,children:`Sprint`}),n(`select`,{value:f.sprintId,onInput:e=>f.setSprintId(e.target.value),onBlur:()=>f.setFieldTouched(`sprintId`),className:`w-full bg-transparent text-sm font-semibold text-slate-700 dark:text-slate-300 focus:outline-none focus-visible:ring-2 focus-visible:ring-signal-500/50 rounded-lg px-1 py-0.5 -ml-1 border ${(f.hasAttemptedSubmit||f.touchedFields.sprintId)&&!f.isSprintIdValid?`border-red-500`:`border-transparent`}`,"aria-invalid":f.isSprintIdValid?`false`:`true`,"aria-describedby":(f.hasAttemptedSubmit||f.touchedFields.sprintId)&&f.sprintIdError?`task-composer-sprint-error`:void 0,required:!0,children:[n(`option`,{value:``,disabled:!0,children:`Select sprint`}),e.map(e=>n(`option`,{value:e.id,children:e.name},e.id))]}),n(`div`,{className:`min-h-[1.5rem] mt-1`,children:(f.hasAttemptedSubmit||f.touchedFields.sprintId)&&f.sprintIdError&&n(`div`,{id:`task-composer-sprint-error`,className:`flex items-center gap-1.5 text-xs text-red-500 font-medium`,children:[n(M,{className:`w-3.5 h-3.5`}),f.sprintIdError]})})]}),n(`div`,{className:`rounded-[1.4rem] border border-black/[0.06] bg-black/[0.025] p-4 dark:border-white/[0.06] dark:bg-white/[0.03]`,children:[n(`div`,{className:`flex items-center gap-2 mb-2`,children:[n(`div`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-slate-400`,children:`Status`}),(f.hasAttemptedSubmit||f.touchedFields.status)&&f.statusError&&n(`div`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-red-500 bg-red-500/10 px-1.5 py-0.5 rounded`,children:f.statusError})]}),n(`div`,{className:`flex gap-2 flex-wrap`,onBlur:()=>f.setFieldTouched(`status`),children:q.map(e=>n(`button`,{type:`button`,onClick:()=>f.setStatus(e),className:`px-3 py-1.5 rounded-xl text-[10px] font-bold uppercase tracking-[0.14em] transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal-500/50 focus-visible:ring-offset-1 focus-visible:ring-offset-white dark:focus-visible:ring-offset-void-900 ${f.status===e?`bg-signal-500 text-void-900 shadow-[0_2px_12px_rgba(0,224,160,0.3)]`:`text-slate-500 dark:text-slate-400 hover:text-slate-800 dark:hover:text-slate-200`}`,children:e.replace(`_`,` `)},e))})]})]}),n(`label`,{"data-composer-stagger":!0,className:`mt-8 block space-y-2`,children:[n(`span`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-slate-400`,children:`Task Title`}),n(`input`,{ref:u,type:`text`,value:f.title,onInput:e=>f.setTitle(e.target.value),onBlur:()=>f.setFieldTouched(`title`),placeholder:`Fix navigation layout shift`,className:`w-full border-0 border-b-2 bg-transparent pb-3 font-display text-[1.65rem] font-black leading-none tracking-tight text-slate-900 outline-none transition-colors placeholder:text-slate-200 focus:border-signal-500 dark:text-white dark:placeholder:text-slate-700 sm:text-[1.9rem] ${(f.hasAttemptedSubmit||f.touchedFields.title)&&!f.isTitleValid?`border-red-500`:`border-black/[0.08] dark:border-white/[0.08]`}`,"aria-invalid":f.isTitleValid?`false`:`true`,"aria-describedby":(f.hasAttemptedSubmit||f.touchedFields.title)&&f.titleError?`task-composer-title-error`:void 0,required:!0,autoFocus:!0}),n(`div`,{className:`grid transition-all duration-200 ease-out mt-1`,style:{gridTemplateRows:(f.hasAttemptedSubmit||f.touchedFields.title)&&f.titleError?`1fr`:`0fr`,opacity:(f.hasAttemptedSubmit||f.touchedFields.title)&&f.titleError?1:0},"aria-live":`assertive`,children:n(`div`,{className:`overflow-hidden`,children:n(`div`,{id:`task-composer-title-error`,className:`flex items-center gap-1.5 text-xs text-red-500 font-medium pt-1`,children:[n(M,{className:`w-4 h-4`}),f.titleError]})})})]}),n(`div`,{"data-composer-stagger":!0,className:`mt-8 space-y-3`,children:[n(`div`,{className:`flex flex-wrap items-center justify-between gap-3`,children:n(`label`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-slate-400`,children:`Task Details`})}),n(`div`,{className:`grid gap-4 xl:grid-cols-2`,children:[n(`div`,{className:`flex flex-col`,children:[n(`div`,{className:`rounded-[1.7rem] border bg-black/[0.025] dark:bg-white/[0.03] transition-colors ${(f.hasAttemptedSubmit||f.touchedFields.description)&&!f.isDescriptionValid?`border-red-500`:`border-black/[0.07] dark:border-white/[0.08]`}`,children:n(`textarea`,{value:f.description,onInput:e=>f.setDescription(e.target.value),onBlur:()=>f.setFieldTouched(`description`),placeholder:`Summarize the intent and outcome.`,className:`min-h-[160px] w-full resize-none rounded-[1.7rem] bg-transparent px-4 py-4 text-sm leading-relaxed text-slate-700 outline-none placeholder:text-slate-300 focus-visible:ring-2 focus-visible:ring-signal-500/50 dark:text-slate-300 dark:placeholder:text-slate-600 sm:px-5`,"aria-invalid":f.isDescriptionValid?`false`:`true`,"aria-describedby":(f.hasAttemptedSubmit||f.touchedFields.description)&&f.descriptionError?`task-composer-description-error`:void 0})}),n(`div`,{className:`grid transition-all duration-200 ease-out mt-1 ml-4`,style:{gridTemplateRows:(f.hasAttemptedSubmit||f.touchedFields.description)&&f.descriptionError?`1fr`:`0fr`,opacity:(f.hasAttemptedSubmit||f.touchedFields.description)&&f.descriptionError?1:0},"aria-live":`assertive`,children:n(`div`,{className:`overflow-hidden`,children:n(`div`,{id:`task-composer-description-error`,className:`flex items-center gap-1.5 text-xs text-red-500 font-medium pt-1`,children:[n(M,{className:`w-4 h-4`}),f.descriptionError]})})})]}),n(`div`,{className:`flex flex-col`,children:[n(`div`,{className:`rounded-[1.7rem] border bg-black/[0.025] dark:bg-white/[0.03] transition-colors ${(f.hasAttemptedSubmit||f.touchedFields.promptMarkdown)&&!f.isPromptMarkdownValid?`border-red-500`:`border-black/[0.07] dark:border-white/[0.08]`}`,children:n(`textarea`,{value:f.promptMarkdown,onInput:e=>f.setPromptMarkdown(e.target.value),onBlur:()=>f.setFieldTouched(`promptMarkdown`),placeholder:`Detailed markdown instructions for the agent.`,className:`min-h-[160px] w-full resize-none rounded-[1.7rem] bg-transparent px-4 py-4 text-sm leading-relaxed font-mono text-slate-700 outline-none placeholder:text-slate-300 focus-visible:ring-2 focus-visible:ring-signal-500/50 dark:text-slate-300 dark:placeholder:text-slate-600 sm:px-5`,"aria-invalid":f.isPromptMarkdownValid?`false`:`true`,"aria-describedby":(f.hasAttemptedSubmit||f.touchedFields.promptMarkdown)&&f.promptMarkdownError?`task-composer-prompt-error`:void 0})}),n(`div`,{className:`grid transition-all duration-200 ease-out mt-1 ml-4`,style:{gridTemplateRows:(f.hasAttemptedSubmit||f.touchedFields.promptMarkdown)&&f.promptMarkdownError?`1fr`:`0fr`,opacity:(f.hasAttemptedSubmit||f.touchedFields.promptMarkdown)&&f.promptMarkdownError?1:0},"aria-live":`assertive`,children:n(`div`,{className:`overflow-hidden`,children:n(`div`,{id:`task-composer-prompt-error`,className:`flex items-center gap-1.5 text-xs text-red-500 font-medium pt-1`,children:[n(M,{className:`w-4 h-4`}),f.promptMarkdownError]})})})]})]})]}),n(`div`,{"data-composer-stagger":!0,className:`mt-8`,children:[n(`div`,{className:`flex items-center justify-between mb-3`,children:[n(`div`,{className:`flex items-center gap-2`,children:[n(S,{className:`w-3.5 h-3.5 text-ember-500`,strokeWidth:2.3}),n(`label`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-slate-400`,children:`Dependencies`}),f.dependencyOptions.length===0&&t.filter(e=>e.sprintId===f.sprintId&&e.recordId!==r?.recordId).length>0&&n(`span`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-amber-500 ml-2 bg-amber-500/10 px-1.5 py-0.5 rounded`,children:`Cycle Prevented`})]}),t.filter(e=>e.sprintId===f.sprintId&&e.recordId!==r?.recordId).length>5&&n(`input`,{type:`search`,placeholder:`Filter tasks...`,value:f.dependencySearchQuery,onInput:e=>f.setDependencySearchQuery(e.target.value),className:`w-48 bg-black/[0.03] dark:bg-white/[0.03] border border-black/[0.08] dark:border-white/[0.08] px-3 py-1.5 text-xs rounded-xl focus:outline-none focus:border-ember-500 focus-visible:ring-1 focus-visible:ring-ember-500/50`})]}),f.dependencyOptions.length===0?n(`div`,{className:`rounded-2xl border border-dashed border-black/[0.08] dark:border-white/[0.08] px-4 py-4 text-xs text-slate-400`,children:`No existing tasks in this sprint yet.`}):n(`div`,{className:`grid grid-cols-1 md:grid-cols-2 gap-2 max-h-44 overflow-y-auto pr-1`,children:f.dependencyOptions.map(e=>{let t=f.dependsOnTaskIds.includes(e.recordId);return n(`button`,{type:`button`,onClick:()=>f.toggleDependency(e.recordId),"aria-pressed":t?`true`:`false`,className:`flex items-center justify-between gap-3 px-4 py-3 rounded-2xl border text-left transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal-500/50 focus-visible:ring-offset-1 focus-visible:ring-offset-white dark:focus-visible:ring-offset-void-900 ${t?`border-ember-500/45 bg-ember-500/[0.08] text-ember-600 dark:text-ember-400`:`border-black/[0.07] dark:border-white/[0.07] bg-black/[0.02] dark:bg-white/[0.02] text-slate-500`}`,children:[n(`div`,{className:`min-w-0 flex-1 pr-2`,children:[n(`div`,{className:`flex items-center gap-2 mb-1`,children:[n(`span`,{className:`text-[10px] font-mono uppercase tracking-[0.14em] text-slate-400`,children:e.id}),n(`span`,{className:`text-[9px] px-1.5 py-0.5 rounded uppercase font-bold tracking-wider ${e.priority===`critical`?`bg-red-500/10 text-red-500`:e.priority===`high`?`bg-orange-500/10 text-orange-500`:`bg-slate-500/10 text-slate-500`}`,children:e.priority})]}),n(`div`,{className:`text-sm font-semibold truncate leading-tight`,children:e.title})]}),n(`span`,{className:`w-4 h-4 rounded-full border ${t?`border-ember-500 bg-ember-500`:`border-slate-300 dark:border-slate-600`}`})]},e.recordId)})})]})]}),n(`aside`,{className:`flex flex-col gap-4 p-6 sm:p-8`,children:[n(`div`,{"data-composer-stagger":!0,children:[n(`div`,{className:`flex items-center gap-2 mb-3`,children:[n(`div`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-slate-400`,children:`Priority`}),(f.hasAttemptedSubmit||f.touchedFields.priority)&&f.priorityError&&n(`div`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-red-500 bg-red-500/10 px-1.5 py-0.5 rounded`,children:f.priorityError})]}),n(`div`,{className:`grid grid-cols-2 gap-2`,onBlur:()=>f.setFieldTouched(`priority`),children:ye.map(e=>n(`button`,{type:`button`,onClick:()=>f.setPriority(e),className:`px-3 py-2 rounded-[1.1rem] border text-[10px] font-bold uppercase tracking-[0.14em] transition-all text-center focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal-500 active:scale-95 ${f.priority===e?`border-ember-500/45 bg-ember-500/[0.08] text-ember-600 dark:text-ember-400 shadow-[0_4px_12px_rgba(255,184,0,0.15)]`:`border-black/[0.06] bg-black/[0.025] text-slate-500 dark:border-white/[0.06] dark:bg-white/[0.03] dark:text-slate-400`}`,children:e},e))})]}),n(`div`,{"data-composer-stagger":!0,children:[n(`div`,{className:`flex items-center gap-2 mb-3`,children:[n(b,{className:`w-3.5 h-3.5 text-signal-500`,strokeWidth:2.3}),n(`label`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-slate-400`,children:`Executor`}),(f.hasAttemptedSubmit||f.touchedFields.executorType)&&f.executorTypeError&&n(`div`,{className:`text-[9px] font-bold uppercase tracking-[0.2em] text-red-500 bg-red-500/10 px-1.5 py-0.5 rounded`,children:f.executorTypeError})]}),n(`div`,{className:`grid gap-3`,onBlur:()=>f.setFieldTouched(`executorType`),children:be.map(e=>{let t=f.executorType===e.value;return n(`button`,{type:`button`,onClick:()=>f.setExecutorType(e.value),className:`rounded-[1.35rem] border p-4 text-left transition-all focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal-500 active:scale-[0.98] ${t?`border-signal-500/30 bg-signal-500/[0.08] shadow-[0_12px_24px_rgba(0,224,160,0.08)]`:`border-black/[0.06] bg-white/66 hover:border-black/[0.1] hover:bg-white dark:border-white/[0.06] dark:bg-white/[0.02] dark:hover:border-white/[0.1]`}`,children:[n(`div`,{className:`flex items-center gap-2 text-[10px] font-bold uppercase tracking-[0.14em] text-slate-700 dark:text-white`,children:[n(`span`,{className:`w-2 h-2 rounded-full ${t?`bg-signal-500`:`bg-slate-300 dark:bg-slate-600`}`}),e.label]}),n(`div`,{className:`mt-2 text-xs leading-relaxed text-slate-500 dark:text-slate-400`,children:e.description})]},e.value)})})]}),n(`div`,{"data-composer-stagger":!0,className:`mt-auto flex flex-col gap-3 pt-2`,children:[n(N,{status:h.status,message:h.message,onDismiss:x,autoDismiss:h.autoDismiss,retryAction:h.retryAction,retryLabel:h.retryLabel}),n(I,{content:f.isValid?null:`Please fix the validation errors before submitting.`,position:`top`,className:`bg-red-600`,children:n(se,{type:`submit`,variant:`primary`,icon:f.isEditing?p:O,disabled:!f.isValid||f.isSubmitting,isLoading:f.isSubmitting,className:`!w-full !inline-flex !items-center !justify-center !gap-2.5 !rounded-[1.2rem] !px-5 !py-3 !text-sm !font-bold !shadow-[0_12px_28px_rgba(15,23,42,0.16)] !transition-all hover:!-translate-y-px hover:!opacity-92 active:!scale-95 disabled:!cursor-not-allowed disabled:!opacity-50`,children:f.isEditing?`Save Task`:`Create Task`})}),n(`button`,{type:`button`,onClick:s,disabled:f.isSubmitting,className:`rounded-[1.2rem] border border-black/[0.06] bg-white/66 px-5 py-3 text-sm font-semibold text-slate-500 transition-all hover:text-slate-900 active:scale-95 focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal-500 disabled:opacity-50 disabled:cursor-not-allowed dark:border-white/[0.06] dark:bg-white/[0.02] dark:text-slate-300 dark:hover:text-white`,children:`Cancel`})]})]})]})]})},Se=[`pending`,`in_progress`,`completed`],J=e=>e===`coding_completed`||e===`QA_REVIEW_FAILED`?`in_progress`:e;function Ce(e,t,n,r){let i=e.filter(e=>!(t!==`all`&&J(e.status)!==t||n!==`all`&&e.priority!==n)),a=K(r,i.length),o=i.slice(0,a),s={total:i.length,inProgress:i.filter(e=>J(e.status)===`in_progress`).length,completed:i.filter(e=>J(e.status)===`completed`).length,critical:i.filter(e=>e.priority===`critical`).length},c=Se.map(e=>({status:e,count:i.filter(t=>J(t.status)===e).length,tasks:o.filter(t=>J(t.status)===e)}));return{filteredTasks:i,visibleTasks:o,stats:s,columns:t===`all`?c:c.filter(e=>e.count>0)}}var we={critical:{label:`Critical`,color:`text-status-red`,dot:`bg-status-red shadow-[0_0_8px_rgba(227,0,15,0.6)]`,bg:`bg-status-red/[0.08] border-status-red/20`},high:{label:`High`,color:`text-ember-500`,dot:`bg-ember-500 shadow-[0_0_8px_rgba(255,184,0,0.5)]`,bg:`bg-ember-500/[0.08] border-ember-500/20`},medium:{label:`Medium`,color:`text-signal-500`,dot:`bg-signal-500 shadow-[0_0_6px_rgba(0,224,160,0.4)]`,bg:`bg-signal-500/[0.06] border-signal-500/15`},low:{label:`Low`,color:`text-slate-400`,dot:`bg-slate-400`,bg:`bg-slate-400/[0.06] border-slate-400/15`}},Y={pending:{label:`Queued`,color:`text-slate-400 dark:text-slate-500`,hex:`#64748b`,icon:ce},in_progress:{label:`In Progress`,color:`text-signal-500`,hex:`#00E0A0`,icon:ae},coding_completed:{label:`Coding Completed`,color:`text-cyan-500`,hex:`#0F9FA8`,icon:me},completed:{label:`Completed`,color:`text-status-green`,hex:`#00AB84`,icon:me},QA_REVIEW_FAILED:{label:`QA Failed`,color:`text-red-500`,hex:`#ef4444`,icon:M}};c();function X(e,t,n,r=0){let i=a(!1);o(()=>{if(e.current){if(n){B.set(e.current,{opacity:1,y:0,clearProps:`transform`});return}B.fromTo(e.current,{opacity:0,y:15},{opacity:1,y:0,duration:parseFloat(H.enterExit.duration)/1e3,ease:H.enterExit.ease,delay:r*(parseFloat(H.listReorder.duration)/1e3)*.2,clearProps:`transform,opacity`,overwrite:`auto`})}},[n,r]),s(()=>{if(!i.current){i.current=!0;return}if(e.current){if(n){B.set(e.current,{boxShadow:`0 0 0 2px rgba(0, 224, 160, 0.4)`}),setTimeout(()=>{e.current&&B.set(e.current,{clearProps:`boxShadow`})},parseFloat(H.controlFeedback.duration));return}B.fromTo(e.current,{scale:1.02,boxShadow:`0 0 0 2px rgba(0, 224, 160, 0.4)`},{scale:1,boxShadow:`none`,duration:parseFloat(H.controlFeedback.duration)/1e3,ease:H.controlFeedback.ease,clearProps:`boxShadow,transform`,overwrite:`auto`})}},[t,n])}function Te(e,t,n){s(()=>{if(e.current){if(n){t?B.set(e.current,{opacity:.6,boxShadow:`0 20px 40px rgba(0,0,0,0.2)`}):B.set(e.current,{clearProps:`boxShadow,opacity`});return}t?(B.killTweensOf(e.current),B.to(e.current,{scale:1.05,opacity:.6,boxShadow:`0 20px 40px rgba(0,0,0,0.2)`,duration:parseFloat(H.selectionMovement.duration)/1e3,ease:H.selectionMovement.ease,overwrite:`auto`})):(B.killTweensOf(e.current),B.to(e.current,{scale:1,opacity:1,boxShadow:`none`,duration:parseFloat(H.selectionMovement.duration)/1e3,ease:P.easing.bounce,clearProps:`boxShadow,transform,opacity`,overwrite:`auto`}))}},[t,n])}var Z={auto:`Auto`,docker_cli:`CLI`,jules:`Jules`};function Ee(e){if(e<=0)return`0s`;let t=Math.floor(e/3600),n=Math.floor(e%3600/60),r=e%60;return t>0?`${t}h ${n}m ${r}s`:n>0?`${n}m ${r}s`:`${r}s`}function De(e,t=Date.now()){let n=new Date(e).getTime();if(isNaN(n))return`--`;let r=Math.floor((t-n)/6e4);if(r<0)return`just now`;if(r<60)return`${r}m ago`;let i=Math.floor(r/60);return i<24?`${i}h ago`:`${Math.floor(i/24)}d ago`}function Oe(e){return Z[e]||`Unknown`}function ke(e,t,n){let r=(e.dependsOnTaskIds||[]).map(e=>{let n=t.get(e);return n?{recordId:n.recordId,id:n.id,title:n.title,status:n.status}:{recordId:e,id:e,title:`Unknown Task (${e})`,status:`pending`}});return{task:e,humanizedCreatedAt:De(e.createdAt),executorLabel:Oe(e.executorType),dependencyIndicators:r,sessionId:n?.sessionId,sessionState:n?.sessionState,prUrl:n?.prUrl,liveRunningTime:n?.liveTotalSeconds&&n.liveTotalSeconds>0?Ee(n.liveTotalSeconds):void 0,liveStartedAt:n?.liveStartedAt}}var Q=r(({indicators:e})=>!e||e.length===0?null:n(`div`,{className:`relative z-10 mt-3 flex flex-wrap gap-1.5`,children:e.map(e=>{let t=e.title.startsWith(`Unknown Task`),r=e.status.replace(`_`,` `),i=`bg-slate-400/[0.08] border-slate-400/20 text-slate-500`;return t?i=`bg-slate-400/[0.08] border-slate-400/30 text-slate-500 border-dashed`:e.status===`completed`?i=`bg-status-green/[0.08] border-status-green/20 text-status-green`:e.status===`QA_REVIEW_FAILED`?i=`bg-red-500/[0.08] border-red-500/20 text-red-500`:(e.status===`coding_completed`||e.status===`in_progress`)&&(i=`bg-signal-500/[0.08] border-signal-500/20 text-signal-500`),n(`div`,{className:`flex items-center gap-1.5 px-2 py-1 rounded-lg border text-[9px] font-bold uppercase tracking-[0.14em] ${i}`,title:`Depends on ${e.title} (${r})`,children:[n(`span`,{className:`sr-only`,children:[`Depends on task `,e.id,`, status: `,r,`. Title: `,e.title]}),n(D,{className:`w-2.5 h-2.5`,strokeWidth:2.5,"aria-hidden":`true`}),n(`span`,{"aria-hidden":`true`,children:e.id})]},e.recordId)})}));c();var Ae=({durationText:e,flashTriggerCount:t})=>{let r=a(null),i=a(t),o=y();return s(()=>{t>i.current&&r.current&&(o?(B.set(r.current,{backgroundColor:`rgba(0, 224, 160, 0.10)`}),setTimeout(()=>{r.current&&B.set(r.current,{backgroundColor:`transparent`})},500)):B.fromTo(r.current,{backgroundColor:`rgba(0, 224, 160, 0.10)`},{backgroundColor:`transparent`,duration:.5,ease:`power2.out`})),i.current=t},[t,o]),n(`span`,{ref:r,className:`font-mono truncate tabular-nums rounded px-0.5 -ml-0.5`,children:e})};i(),c();var je=r(({viewModel:e,index:t=0,onEdit:r,onDelete:i,agentPresetName:o,agentPresetAvatarConfig:c,isDragging:u=!1,onDragStart:d,onDragEnd:f})=>{let{task:p,humanizedCreatedAt:m,dependencyIndicators:h,sessionId:g,sessionState:_,prUrl:v,liveRunningTime:b,liveStartedAt:x}=e,S=a(null),C=we[p.priority],w=y(),T=Y[p.status].icon,{isOpen:E,options:D,requestConfirm:O,handleConfirm:te,handleCancel:re,triggerRef:A}=j(),[M,N]=l(0),P=a(p.status),I=a(b);return s(()=>{let e=!1;P.current!==p.status&&(e=!0),I.current===null&&b!==null&&(e=!0),e&&N(e=>e+1),P.current=p.status,I.current=b},[p.status,b]),X(S,p.status,w,t),Te(S,u,w),n(`div`,{ref:S,tabIndex:0,draggable:!w,onDragStart:w?void 0:d,onDragEnd:w?void 0:f,"aria-roledescription":`sortable`,"aria-describedby":`task-card-kbd-${p.recordId}`,onKeyDown:e=>{(e.key===` `||e.key===`Enter`)&&e.preventDefault()},className:`kanban-card group relative flex flex-col bg-white/80 dark:bg-void-800/75 backdrop-blur-sm rounded-[1.75rem] p-7 shadow-[0_2px_20px_rgba(0,0,0,0.04)] dark:shadow-[0_4px_24px_rgba(0,0,0,0.2)] overflow-hidden focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal-500/30 focus-visible:ring-offset-2 ${p.isOptimistic?`border-dashed border-2 border-slate-300 dark:border-slate-600 opacity-60 pointer-events-none`:`border border-black/[0.06] dark:border-white/[0.06]`} ${w?`kanban-card-reduced-motion`:``} ${u?`is-dragging opacity-50 ring-2 ring-signal-500 scale-[1.02] shadow-[0_20px_40px_rgba(0,0,0,0.2)]`:``}`,style:{transformStyle:`preserve-3d`,willChange:`transform`},children:[n(`span`,{id:`task-card-kbd-${p.recordId}`,className:`sr-only`,children:w?`Draggable reordering is disabled in reduced motion mode.`:d?`Draggable task. Use drag and drop to reorder.`:`Keyboard reordering is not supported. Use drag and drop to reorder.`}),n(`div`,{className:`absolute inset-0 pointer-events-none transition-colors duration-300 group-hover:bg-signal-500/[0.02] dark:group-hover:bg-signal-500/[0.02]`}),n(V,{accentHex:Y[p.status].hex}),n(L,{accentHex:Y[p.status].hex}),n(`div`,{className:`flex items-center justify-between mb-3 relative z-10`,children:[n(`div`,{className:`flex items-center gap-2`,children:[n(`span`,{className:`font-mono text-[10px] font-bold text-slate-300 dark:text-slate-600 uppercase tracking-[0.1em]`,children:p.id.toUpperCase()}),n(`div`,{className:`flex items-center gap-1 text-[9px] font-bold uppercase tracking-[0.1em] text-slate-400`,children:[n(`span`,{className:`sr-only`,children:[`, Status: `,p.status.replace(`_`,` `)]}),n(T,{className:`w-3 h-3`,"aria-hidden":`true`,style:{color:Y[p.status].hex}})]})]}),n(`div`,{className:`flex items-center gap-1.5 px-2.5 py-1 rounded-full border text-[9px] font-bold uppercase tracking-[0.14em] ${C.bg} ${C.color}`,children:[n(`span`,{className:`w-1.5 h-1.5 rounded-full shrink-0 ${C.dot}`}),n(`span`,{className:`sr-only`,children:`Priority: `}),C.label]})]}),n(`h4`,{className:`text-[15px] font-bold tracking-tight leading-snug mb-4 relative z-10 group-hover:translate-x-0.5 transition-transform duration-300 ${p.status===`completed`?`text-slate-400 dark:text-slate-500 line-through decoration-slate-300 dark:decoration-slate-700`:`text-slate-900 dark:text-white`}`,children:p.title}),n(`div`,{className:`relative z-10 mb-4 flex flex-wrap items-center gap-2 text-[9px] font-bold uppercase tracking-[0.14em] text-slate-400`,children:[n(`span`,{className:`rounded-full border border-black/[0.06] dark:border-white/[0.08] bg-black/[0.03] dark:bg-white/[0.03] px-2.5 py-1`,children:e.executorLabel}),o&&n(`span`,{className:`inline-flex items-center gap-1 rounded-full border border-black/[0.06] dark:border-white/[0.08] bg-black/[0.03] dark:bg-white/[0.03] px-2 py-0.5`,children:[n(k,{avatarConfig:c,seed:o}),n(`span`,{className:`max-w-[120px] truncate`,children:o})]}),_&&n(`span`,{className:`rounded-full border border-black/[0.06] dark:border-white/[0.08] bg-black/[0.03] dark:bg-white/[0.03] px-2.5 py-1 max-w-[120px] truncate`,children:_}),g&&n(`span`,{className:`rounded-full border border-black/[0.06] dark:border-white/[0.08] bg-black/[0.03] dark:bg-white/[0.03] px-2.5 py-1 font-mono max-w-[120px] truncate`,children:g})]}),n(`div`,{className:`flex items-center gap-3 mt-auto relative z-10`,children:[n(`div`,{className:`flex items-center gap-1.5 text-[10px] font-semibold text-slate-400 dark:text-slate-500`,children:[n(pe,{className:`w-3 h-3 text-slate-300 dark:text-slate-600 group-hover:text-signal-500 transition-colors`,strokeWidth:2}),n(`span`,{className:`font-mono truncate max-w-[120px]`,children:p.source})]}),n(`span`,{className:`text-slate-200 dark:text-slate-700 text-[9px]`,children:`·`}),n(`div`,{className:`flex items-center gap-1.5 text-[10px] text-slate-400 dark:text-slate-500`,children:[n(`div`,{className:`w-6 h-6 rounded-lg flex items-center justify-center bg-black/[0.03] dark:bg-white/[0.03]`,children:n(`span`,{className:`text-[9px] font-black font-display text-slate-500 dark:text-slate-400`,children:p.assignee[0]})}),n(`span`,{className:`font-medium`,children:p.assignee})]})]}),n(Q,{indicators:h}),n(`div`,{className:`flex items-center justify-between mt-3 pt-3 border-t border-black/[0.04] dark:border-white/[0.04] relative z-10`,children:[n(`div`,{className:`flex items-center gap-3`,children:[n(`div`,{className:`flex min-w-0 items-center gap-1.5 text-[10px] text-slate-300 dark:text-slate-600`,children:[n(F,{className:`w-3 h-3 shrink-0`,strokeWidth:2,"aria-hidden":`true`}),n(`span`,{className:`sr-only`,children:`Duration: `}),n(Ae,{durationText:b??p.time??`Not started`,flashTriggerCount:M})]}),v&&n(`a`,{href:le(v),target:`_blank`,rel:`noopener noreferrer`,className:`flex items-center gap-1 text-[9px] font-mono text-signal-500 hover:text-signal-400 transition-colors`,onClick:e=>e.stopPropagation(),children:[n(ne,{className:`w-3 h-3`,strokeWidth:2}),n(`span`,{children:`PR`})]})]}),n(`span`,{className:`text-[9px] font-mono text-slate-300 dark:text-slate-700`,children:x?`· ${De(x)}`:m})]}),n(`div`,{className:`absolute top-3 right-3 flex items-center gap-1 p-1 bg-white/90 dark:bg-void-700/95 backdrop-blur-md rounded-full shadow-[0_2px_12px_rgba(0,0,0,0.06)] dark:shadow-[0_2px_12px_rgba(0,0,0,0.4)] border border-black/[0.05] dark:border-white/[0.08] translate-y-[-8px] opacity-0 pointer-events-none group-hover:pointer-events-auto group-hover:translate-y-0 group-hover:opacity-100 group-focus:pointer-events-auto group-focus:translate-y-0 group-focus:opacity-100 group-focus-visible:pointer-events-auto group-focus-visible:translate-y-0 group-focus-visible:opacity-100 focus-within:pointer-events-auto focus-within:opacity-100 focus-within:translate-y-0 group-focus-within:pointer-events-auto group-focus-within:opacity-100 group-focus-within:translate-y-0 transition-all duration-300 ease-[cubic-bezier(0.175,0.885,0.32,1.275)] z-20`,children:[n(`button`,{type:`button`,className:`p-1.5 text-slate-500 dark:text-slate-400 hover:text-signal-600 dark:hover:text-signal-400 rounded-full transition-colors active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-signal-500/30`,title:`Edit task ${p.id}`,"aria-label":`Edit task ${p.id}`,onClick:()=>r(p),children:n(ee,{className:`w-3 h-3`})}),n(`button`,{type:`button`,ref:A,className:`p-1.5 text-slate-500 dark:text-slate-400 hover:text-status-red rounded-full transition-colors active:scale-95 disabled:opacity-50 disabled:cursor-not-allowed focus-visible:outline-none focus-visible:ring-2 focus-visible:ring-status-red/30`,title:`Delete task ${p.id}`,"aria-label":`Delete task ${p.id}`,onClick:async e=>{e.stopPropagation(),await O({title:`Delete Task`,body:`Are you sure you want to delete "${p.title}"?`,confirmLabel:`Delete Task`,cancelLabel:`Cancel`,destructive:!0})&&i(p)},children:n(G,{className:`w-3 h-3`})})]}),n(W,{isOpen:E,options:D,onConfirm:te,onCancel:re,triggerRef:A})]})},(e,t)=>{let n=e.viewModel.task,r=t.viewModel.task,i=n.recordId===r.recordId&&n.status===r.status&&n.priority===r.priority&&n.title===r.title,a=e.viewModel.dependencyIndicators.length===t.viewModel.dependencyIndicators.length&&e.viewModel.dependencyIndicators.every((e,n)=>e.status===t.viewModel.dependencyIndicators[n].status&&e.recordId===t.viewModel.dependencyIndicators[n].recordId);return i&&a&&e.viewModel.prUrl===t.viewModel.prUrl&&e.viewModel.sessionId===t.viewModel.sessionId&&e.viewModel.liveRunningTime===t.viewModel.liveRunningTime&&e.agentPresetName===t.agentPresetName&&e.onEdit===t.onEdit&&e.onDelete===t.onDelete&&e.isDragging===t.isDragging});function Me(e,t,n){let r=new Map;for(let i of e){let e=ge({task:i,dispatches:t,events:n}),a={};i.session_id&&(a.sessionId=i.session_id.replace(/^sessions\//,``)),e.startedAt&&(a.liveStartedAt=e.startedAt),e.totalSeconds>0&&(a.liveTotalSeconds=e.totalSeconds);let o=i.record_id,s=i.id;o&&r.set(o,a),s&&s!==o&&r.set(s,a)}return r}i(),c();var Ne=({mode:e,hasProjects:t,onAddProject:r})=>{let i=e===`project`;return n(`section`,{className:`relative overflow-hidden rounded-[2.2rem] border border-black/[0.06] bg-white/72 p-8 shadow-[0_18px_48px_rgba(15,23,42,0.07)] backdrop-blur-2xl dark:border-white/[0.06] dark:bg-void-800/62 dark:shadow-[0_18px_48px_rgba(0,0,0,0.28)] md:p-10`,children:[n(`div`,{className:`pointer-events-none absolute inset-0 bg-[radial-gradient(ellipse_72%_58%_at_48%_25%,rgba(0,224,160,0.09),transparent_64%)] dark:bg-[radial-gradient(ellipse_72%_58%_at_48%_25%,rgba(0,224,160,0.13),transparent_64%)]`}),n(`div`,{className:`pointer-events-none absolute inset-0 flex items-center justify-center`,children:[n(`div`,{className:`h-52 w-52 rounded-full border border-signal-500/14 animate-[ping_5.8s_cubic-bezier(0.1,0.5,0.8,1)_infinite]`}),n(`div`,{className:`absolute h-80 w-80 rounded-full border border-ember-500/10 animate-[ping_8.4s_cubic-bezier(0.1,0.5,0.8,1)_infinite]`}),n(`div`,{className:`absolute h-[28rem] w-[28rem] rounded-full border border-black/[0.035] animate-[ping_11s_cubic-bezier(0.1,0.5,0.8,1)_infinite] dark:border-white/[0.04]`})]}),n(`div`,{className:`relative z-10 grid gap-8 lg:grid-cols-[minmax(0,1fr)_22rem] lg:items-center`,children:[n(`div`,{children:[n(`div`,{className:`mb-6 flex h-16 w-16 items-center justify-center rounded-[1.35rem] border border-signal-500/20 bg-signal-500/10 text-signal-500 shadow-[0_0_32px_rgba(0,224,160,0.16)]`,children:n(w,{className:`h-7 w-7`,strokeWidth:1.7})}),n(`div`,{className:`text-[10px] font-bold uppercase tracking-[0.22em] text-signal-500`,children:i?`Task Board Standby`:`Sprint Scope Required`}),n(`h1`,{className:`mt-3 max-w-3xl font-display text-4xl font-black leading-[0.98] tracking-tight text-slate-900 dark:text-white md:text-5xl`,children:i?`Task work starts with a project.`:`Create a sprint to unlock tasks.`}),n(`p`,{className:`mt-5 max-w-2xl text-sm font-medium leading-relaxed text-slate-500 dark:text-slate-400 md:text-base`,children:i?`Connect a project before the task board starts tracking queued work, active implementation, QA review, and completed delivery.`:`Tasks are organized inside sprint scope. Create or select a sprint before adding implementation work to the board.`}),n(`div`,{className:`mt-8 flex flex-wrap gap-3`,children:[i?n(se,{type:`button`,onClick:r,variant:`signal`,icon:O,className:`!inline-flex !min-h-[44px] !items-center !gap-2.5 !rounded-full !px-5 !py-2.5 !text-[10px] !font-bold !uppercase !tracking-[0.14em] !shadow-[0_10px_30px_rgba(0,224,160,0.22)] hover:!-translate-y-px focus-visible:!ring-2 focus-visible:!ring-signal-500/40`,children:t?`Add Project`:`Add First Project`}):n(E,{to:`/sprints`,className:`inline-flex min-h-[44px] items-center gap-2.5 rounded-full bg-signal-500 px-5 py-2.5 text-[10px] font-bold uppercase tracking-[0.14em] text-void-900 shadow-[0_10px_30px_rgba(0,224,160,0.22)] transition-all hover:-translate-y-px hover:bg-signal-400 focus-visible:ring-2 focus-visible:ring-signal-500/40`,children:[n(O,{className:`h-3.5 w-3.5`,strokeWidth:2.3}),`Plan Sprint`]}),n(E,{to:i?`/projects`:`/sprints`,className:`inline-flex min-h-[44px] items-center gap-2.5 rounded-full border border-black/[0.06] bg-white/75 px-5 py-2.5 text-[10px] font-bold uppercase tracking-[0.14em] text-slate-600 transition-all hover:-translate-y-px hover:text-slate-900 focus-visible:ring-2 focus-visible:ring-signal-500/40 dark:border-white/[0.06] dark:bg-white/[0.04] dark:text-slate-300 dark:hover:text-white`,children:[n(pe,{className:`h-3.5 w-3.5 text-ember-500`,strokeWidth:2.1}),i?`Manage Projects`:`Open Sprints`,n(D,{className:`h-3.5 w-3.5`,strokeWidth:2.1})]})]})]}),n(`div`,{className:`relative overflow-hidden rounded-[1.7rem] border border-black/[0.06] bg-black/[0.025] p-5 dark:border-white/[0.06] dark:bg-white/[0.035]`,children:[n(`div`,{className:`pointer-events-none absolute inset-0 bg-[radial-gradient(ellipse_85%_65%_at_50%_0%,rgba(255,184,0,0.12),transparent_68%)]`}),n(`div`,{className:`relative z-10 space-y-3`,children:[{label:`Project`,value:i?`required`:`ready`,tone:i?`text-ember-500`:`text-status-green`},{label:`Sprint`,value:i?`waiting`:`required`,tone:i?`text-signal-500`:`text-ember-500`},{label:`Tasks`,value:`locked`,tone:`text-slate-500 dark:text-slate-400`}].map((e,t)=>n(`div`,{className:`rounded-[1.15rem] border border-white/60 bg-white/72 p-4 shadow-sm dark:border-white/[0.06] dark:bg-white/[0.04]`,children:n(`div`,{className:`flex items-center justify-between gap-4`,children:[n(`div`,{children:[n(`div`,{className:`text-[9px] font-bold uppercase tracking-[0.16em] text-slate-400`,children:e.label}),n(`div`,{className:`mt-1 text-xs font-bold uppercase tracking-[0.12em] ${e.tone}`,children:e.value})]}),n(`div`,{className:`h-2.5 w-2.5 rounded-full ${t===0?`bg-ember-500`:t===1?`bg-signal-500`:`bg-slate-300 dark:bg-slate-600`}`,children:n(`span`,{className:`block h-full w-full rounded-full animate-ping bg-current opacity-40`})})]})},e.label))})]})]})]})},Pe=r(({status:e,count:t})=>{let r=Y[e],i=r.icon;return n(`div`,{className:`flex items-center justify-between mb-6`,children:[n(`div`,{className:`flex items-center gap-2.5`,children:[n(i,{className:`w-5 h-5 ${r.color}`,strokeWidth:2}),n(`span`,{className:`font-display text-lg font-bold tracking-tight ${r.color}`,children:r.label})]}),n(`span`,{className:`text-[10px] font-mono font-bold px-2.5 py-1 rounded-lg bg-black/[0.03] dark:bg-white/[0.03] ${r.color}`,children:t})]})}),Fe=r(({sprints:e,selectedId:t,onSelect:r,sprintKeyPrefix:i})=>{let[a,o]=l(!1),s=t?e.find(e=>e.id===t):null;return n(`div`,{className:`relative`,children:[n(`button`,{onClick:()=>o(e=>!e),className:`group flex items-center gap-3 px-5 py-3 rounded-2xl border transition-all duration-300 ${s?`bg-ember-500/[0.06] dark:bg-ember-500/[0.08] border-ember-500/20 dark:border-ember-500/25 shadow-[0_0_20px_rgba(255,184,0,0.06)]`:`bg-black/[0.03] dark:bg-white/[0.03] border-black/[0.06] dark:border-white/[0.06]`} hover:border-ember-500/40 dark:hover:border-ember-500/40`,children:[n(S,{className:`w-4 h-4 ${s?`text-ember-500`:`text-slate-400`} transition-colors`,strokeWidth:2}),n(`span`,{className:`text-sm font-bold tracking-tight ${s?`text-ember-600 dark:text-ember-400`:`text-slate-600 dark:text-slate-400`}`,children:s?A(s,i):`All Sprints`}),n(U,{className:`w-4 h-4 text-slate-400 transition-transform duration-300 ${a?`rotate-180`:``}`,strokeWidth:2})]}),a&&n(`div`,{className:`absolute left-0 top-full mt-2 w-80 z-50 bg-white/95 dark:bg-void-800/95 backdrop-blur-2xl border border-black/[0.06] dark:border-white/[0.08] rounded-2xl shadow-[0_20px_40px_rgba(0,0,0,0.12)] dark:shadow-[0_20px_40px_rgba(0,0,0,0.4)] overflow-hidden`,children:[n(`button`,{onClick:()=>{r(null),o(!1)},className:`w-full flex items-center gap-3 px-5 py-3.5 text-left transition-colors duration-200 ${t?`hover:bg-black/[0.03] dark:hover:bg-white/[0.03]`:`bg-signal-500/[0.06] dark:bg-signal-500/[0.08]`}`,children:[n(w,{className:`w-4 h-4 text-signal-500`,strokeWidth:2}),n(`div`,{className:`flex-1`,children:n(`span`,{className:`text-sm font-bold text-slate-800 dark:text-white`,children:`All Sprints`})})]}),n(`div`,{className:`h-px bg-black/[0.04] dark:bg-white/[0.04]`}),e.map(e=>{let a=t===e.id;return n(`button`,{onClick:()=>{r(e.id),o(!1)},className:`w-full flex items-center gap-3 px-5 py-3.5 text-left transition-colors duration-200 ${a?`bg-ember-500/[0.06] dark:bg-ember-500/[0.08]`:`hover:bg-black/[0.03] dark:hover:bg-white/[0.03]`}`,children:[n(`div`,{className:`w-2 h-2 rounded-full shrink-0 ${e.status===`running`?`bg-status-green shadow-[0_0_8px_rgba(0,171,132,0.6)] animate-pulse`:e.status===`paused`?`bg-status-amber shadow-[0_0_8px_rgba(245,158,11,0.45)]`:e.status===`completed`?`bg-signal-500`:e.status===`failed`?`bg-status-red`:e.status===`cancelled`?`bg-slate-400 dark:bg-slate-500`:`bg-slate-400 dark:bg-slate-600`}`}),n(`div`,{className:`flex-1 min-w-0`,children:[n(`span`,{className:`text-sm font-bold tracking-tight ${a?`text-ember-600 dark:text-ember-400`:`text-slate-800 dark:text-white`}`,children:A(e,i)}),n(`div`,{className:`flex items-center gap-2 mt-0.5`,children:n(`span`,{className:`text-[9px] font-mono text-slate-400 uppercase tracking-[0.1em]`,children:e.date})})]}),n(`div`,{className:`flex flex-col items-end gap-0.5`,children:[n(`span`,{className:`text-[10px] font-mono font-bold text-slate-500`,children:e.tasksCount}),n(`div`,{className:`w-12 h-1 rounded-full bg-black/[0.06] dark:bg-white/[0.06] overflow-hidden`,children:n(`div`,{className:`h-full rounded-full bg-signal-500 transition-all duration-500`,style:{width:`${e.completion}%`}})})]})]},e.id)})]})]})}),Ie=r(({sprint:e,tasks:t})=>{let r=t.filter(e=>e.status===`completed`).length,i=t.filter(e=>e.status===`in_progress`).length,a=t.filter(e=>e.status===`pending`).length,o=t.length,s=o>0?Math.round(r/o*100):0;return n(`div`,{className:`relative overflow-hidden bg-white/70 dark:bg-void-800/60 backdrop-blur-2xl border border-black/[0.06] dark:border-white/[0.06] rounded-[1.75rem] p-7 shadow-[0_2px_20px_rgba(0,0,0,0.04)] dark:shadow-[0_4px_24px_rgba(0,0,0,0.2)]`,children:[n(`div`,{"aria-hidden":!0,className:`absolute -right-4 -bottom-6 text-[6rem] font-black tracking-tighter text-black/[0.025] dark:text-white/[0.02] pointer-events-none select-none font-display leading-none`,children:[s,`%`]}),n(`div`,{className:`flex items-center gap-3 mb-5`,children:[n(`div`,{className:`w-10 h-10 rounded-xl bg-ember-500/[0.1] dark:bg-ember-500/[0.15] flex items-center justify-center`,children:n(S,{className:`w-5 h-5 text-ember-500`,strokeWidth:2})}),n(`div`,{children:[n(`h3`,{className:`text-lg font-black font-display tracking-tight text-slate-900 dark:text-white`,children:e.name}),n(`p`,{className:`text-[10px] font-mono text-slate-400 uppercase tracking-[0.1em]`,children:e.date})]})]}),n(`div`,{className:`flex gap-1 h-2.5 rounded-full overflow-hidden mb-5`,role:`progressbar`,"aria-valuenow":s,"aria-valuemin":0,"aria-valuemax":100,"aria-label":`Sprint progress: ${s}%`,children:[r>0&&n(`div`,{className:`bg-status-green rounded-full transition-all duration-700`,style:{width:`${r/o*100}%`}}),i>0&&n(`div`,{className:`bg-signal-500 rounded-full transition-all duration-700`,style:{width:`${i/o*100}%`}}),a>0&&n(`div`,{className:`bg-slate-200 dark:bg-slate-700 rounded-full transition-all duration-700`,style:{width:`${a/o*100}%`}})]}),n(`div`,{className:`grid grid-cols-3 gap-2`,children:[{label:`Completed`,value:r,color:`text-status-green`},{label:`Running`,value:i,color:`text-signal-500`},{label:`Queued`,value:a,color:`text-slate-400`}].map(({label:e,value:t,color:r})=>n(`div`,{className:`flex flex-col items-center py-2.5 rounded-xl bg-black/[0.03] dark:bg-white/[0.03] border border-black/[0.04] dark:border-white/[0.04]`,children:[n(`span`,{className:`text-xl font-black font-mono leading-none ${r}`,children:t}),n(`span`,{className:`text-[8px] font-bold uppercase tracking-[0.14em] text-slate-400 mt-1`,children:e})]},e))}),n(E,{to:`/sprints`,className:`flex items-center gap-1.5 mt-5 pt-4 border-t border-black/[0.05] dark:border-white/[0.04] text-[10px] font-bold uppercase tracking-[0.14em] text-slate-400 hover:text-ember-500 transition-colors duration-200 group/link`,children:[n(d,{className:`w-3 h-3 group-hover/link:translate-x-0.5 group-hover/link:-translate-y-0.5 transition-transform duration-200`,strokeWidth:2.5}),`View Sprint`]})]})}),Le=()=>{let r=a(null),i=a(null),{projects:c,selectedProject:u,createProject:d}=_(),p=u?.id||null,{execution:b,status:S}=re(p,!!u),ee=v(p).data?.settings?.git?.sprintKeyPrefix||`SPR`,[E,D]=l(new Map);s(()=>{if(!p)return;let e=!1;return ie(p).then(t=>{e||D(new Map(t.map(e=>[e.id,e])))}).catch(()=>{}),()=>{e=!0}},[p]);let{data:k,loading:ne,selectedSprintId:A,selectSprint:j,refetch:M}=ue(u?.id||null),N=x({select:e=>e.location.searchStr}),P=t(()=>{let e=new URLSearchParams(N);return e.get(`sprintId`)||e.get(`sprint`)},[N]),F=t(()=>P&&k.some(e=>e.id===P)?P:null,[P,k]),I=F??A;s(()=>{!F||F===A||j(F)},[F,A,j]);let[L,ae]=l(`all`),[R,ce]=l(`all`),[le,z]=l(20),[V,H]=l(!1),[pe,me]=l(!1),[U,W]=l(null),[G,ge]=l(null),[K,ve]=l(null),[ye,q]=l([]),[be,Se]=l(null),we=a(null),{tasks:Y,loading:X,error:Te,refresh:Z}=he(u?.id||null,c,k,I);s(()=>{if(!X&&Y.length>0){let e=new URLSearchParams(N),t=e.get(`taskId`);if(t&&Y.some(e=>e.id===t||e.recordId===t)){let n=Y.find(e=>e.id===t||e.recordId===t);if(n){Se(n.recordId),e.delete(`taskId`);let t=e.toString(),r=`${window.location.pathname}${t?`?${t}`:``}${window.location.hash}`;window.history.replaceState(window.history.state,``,r)}}}},[N,X,Y]);let Ee=y(),[De,Oe]=l(!1);s(()=>{let e;return X?e=window.setTimeout(()=>Oe(!0),200):Oe(!1),()=>window.clearTimeout(e)},[X]),o(()=>{if(!r.current)return;let e=B.context(()=>{B.fromTo(Array.from(r.current.children),{opacity:0,y:40},{opacity:1,y:0,stagger:.1,duration:.9,ease:`power4.out`,delay:.05})});return()=>e.revert()},[]),o(()=>{if(!i.current||X||De)return;let e=Array.from(i.current.querySelectorAll(`.task-card-entry`));if(e.length===0)return;let t=B.context(()=>{Ee?B.set(e,{opacity:1,y:0,scale:1}):B.fromTo(e,{opacity:0,y:15,scale:.98},{opacity:1,y:0,scale:1,stagger:.05,duration:.6,ease:`power2.out`,delay:.05})});return()=>t.revert()},[u?.id,L,R,I,X,De,Ee]),o(()=>{if(!be||!i.current)return;let e=i.current.querySelector(`[data-task-id="${be}"] .kanban-card`);if(!e)return;e.scrollIntoView({behavior:`smooth`,block:`nearest`});let t=document.createElement(`div`);t.style.position=`absolute`,t.style.inset=`0`,t.style.backgroundColor=`rgba(0, 224, 160, 0.2)`,t.style.borderRadius=`1.75rem`,t.style.pointerEvents=`none`,t.style.zIndex=`50`,e.appendChild(t);let n=B.context(()=>{B.to(t,{opacity:0,duration:.4,ease:`power2.out`,onComplete:()=>t.remove()}),B.fromTo(e,{opacity:.6,borderWidth:`2px`,borderColor:`rgba(148, 163, 184, 0.5)`,borderStyle:`dashed`},{opacity:1,borderWidth:`1px`,borderColor:`rgba(0,0,0,0.06)`,borderStyle:`solid`,duration:.4,ease:`power2.out`,clearProps:`opacity,borderWidth,borderStyle,borderColor`})});return Se(null),()=>n.revert()},[be,Y]);let Q=t(()=>[...ye,...Y],[ye,Y]),Ae=t(()=>new Map(Q.map(e=>[e.recordId,e])),[Q]),{filteredTasks:Le,visibleTasks:Re,stats:ze,columns:Be}=t(()=>Ce(Q,L,R,le),[Q,L,R,le]),Ve=t(()=>I?b.taskDispatches.filter(e=>e.sprintId===I):b.taskDispatches,[b.taskDispatches,I]),He=t(()=>I?b.recentEvents.filter(e=>e.sprintId===I):b.recentEvents,[b.recentEvents,I]),Ue=t(()=>Me(S.subtasks??[],Ve,He),[S.subtasks,Ve,He]),We=t(()=>{let e=new Map;return Q.forEach(t=>{e.set(t.recordId,ke(t,Ae,Ue.get(t.recordId)))}),e},[Q,Ae,Ue]),Ge=I&&k.find(e=>e.id===I)||null,$=!!u&&k.length>0,Ke=e(e=>{let t=new URLSearchParams(N);if(t.has(`sprint`)){e?t.set(`sprint`,e):t.delete(`sprint`);let n=t.toString(),r=`${window.location.pathname}${n?`?${n}`:``}${window.location.hash}`;window.history.replaceState(window.history.state,``,r)}j(e)},[N,j]),qe=e(async e=>{if(!u)return;let t=!!U,n=`opt-${Date.now()}`;if(!t){let t={recordId:n,id:`OPT-...`,source:`dash`,sprint:k.find(t=>t.id===e.sprintId)?.name||`...`,sprintId:e.sprintId,title:e.title,status:e.status,priority:e.priority,executorType:e.executorType,assignee:`Pending`,time:`...`,createdAt:new Date().toISOString(),updatedAt:new Date().toISOString(),promptMarkdown:e.promptMarkdown,description:e.description,dependsOnTaskIds:e.dependsOnTaskIds,isIndependent:!1,isMerged:!1,mergeIndicator:null,isOptimistic:!0};q(e=>[t,...e])}try{let n=null;t?await g(U.recordId,e):n=(await m(u.id,e)).id,await Promise.all([Z(),M()]),W(null),H(!1),n&&Se(n)}finally{t||q(e=>e.filter(e=>e.recordId!==n))}},[u,U,Z,M,k]),Je=e((e,t)=>{Ee||(ge(e),t.dataTransfer&&(t.dataTransfer.effectAllowed=`move`))},[Ee]),Ye=e(()=>{ge(null),ve(null)},[]),Xe=e((e,t,n)=>{n.preventDefault(),n.dataTransfer&&(n.dataTransfer.dropEffect=`move`),ve({status:e,index:t})},[]),Ze=e(async(e,t,n)=>{if(n.preventDefault(),!G)return;let r=Y.find(e=>e.recordId===G);if(!r)return;e===`in_progress`&&r.status!==`coding_completed`&&r.status!==`QA_REVIEW_FAILED`||e===`pending`||e===`completed`||r.status;let i={pending:`pending`,in_progress:`in_progress`,completed:`completed`};if(J(r.status)!==e){let t=i[e]||r.status,n={...r,status:t};q(e=>[n,...e.filter(e=>e.recordId!==n.recordId)]);try{await g(r.recordId,{status:t}),await Z()}finally{q(e=>e.filter(e=>e.recordId!==n.recordId))}}else{let t=i[e]||r.status;if(r.status!==t){let e={...r,status:t};q(t=>[e,...t.filter(t=>t.recordId!==e.recordId)]);try{await g(r.recordId,{status:t}),await Z()}finally{q(t=>t.filter(t=>t.recordId!==e.recordId))}}}ge(null),ve(null)},[G,Y,Z]),Qe=e(async e=>{await h(e.recordId),await Promise.all([Z(),M()]),W(t=>t?.recordId===e.recordId?null:t)},[Z,M]),$e=e(e=>{W(e),H(!0),setTimeout(()=>we.current?.scrollIntoView({behavior:`smooth`,block:`start`}),50)},[]),et=e(async e=>{if(e.type===`new_project`){let t=e.initMode===`new-local`?e.path||e.name:e.repoSlug||e.name;await d({name:e.name,sourceType:e.initMode===`new-local`?`local`:`git`,sourceRef:t,initMode:e.initMode,remoteProvider:e.remoteProvider,isPrivate:e.isPrivate});return}await d({name:e.name,sourceType:e.type,sourceRef:e.path,cloneDir:e.cloneDir})},[d]);return n(te,{className:$?`gap-16`:`gap-10`,padding:$?`standard`:`sprintsEmpty`,children:[n(`div`,{ref:r,className:`flex flex-col lg:flex-row lg:items-end justify-between gap-8`,children:[n(`div`,{className:`flex flex-col gap-5`,children:[n(`div`,{className:`flex items-center gap-2.5 text-signal-500 font-mono text-[10px] font-bold uppercase tracking-[0.2em]`,children:[n(w,{className:`w-3.5 h-3.5`,strokeWidth:2.5}),`Task Pipeline`]}),n(`div`,{className:`relative overflow-hidden`,children:[n(`h2`,{"aria-hidden":!0,className:`absolute -top-10 -left-3 text-[7rem] font-black tracking-tighter text-black/[0.04] dark:text-white/[0.03] pointer-events-none select-none font-display leading-none`,children:`FLOW`}),n(`h1`,{className:`text-5xl md:text-7xl font-black tracking-tighter text-slate-900 dark:text-white leading-[0.92] font-display relative z-10`,children:[`Task `,n(`br`,{}),n(`span`,{className:`text-signal-500`,children:`Board.`})]})]}),n(`p`,{className:`text-lg text-slate-500 dark:text-slate-500 font-medium max-w-xl mt-1 leading-relaxed`,children:[u?I?`Task execution for ${u.name}, scoped to Sprint ${k.find(e=>e.id===I)?.number??`...`}.`:`Task execution for ${u.name}. Showing all tasks across the project.`:`Select a project to manage sprint tasks.`,u&&(L!==`all`||R!==`all`)&&n(`span`,{className:`block text-sm text-signal-600 dark:text-signal-500 mt-1`,children:[`Filtered to show `,L===`all`?`all`:L.replace(`_`,` `),` status and `,R===`all`?`any`:R,` priority.`]})]})]}),n(`div`,{className:`flex flex-col items-start lg:items-end gap-4 shrink-0`,children:[n(`div`,{className:`flex items-center gap-2.5 flex-wrap`,children:[ze.inProgress>0&&n(`div`,{className:`flex items-center gap-2 px-4 py-2 rounded-full bg-signal-500/[0.08] border border-signal-500/20 text-[10px] font-bold uppercase tracking-[0.14em] text-signal-600 dark:text-signal-400`,children:[n(`span`,{className:`w-1.5 h-1.5 rounded-full bg-signal-500 relative`,children:n(`span`,{className:`absolute inset-0 rounded-full animate-ping bg-signal-400 opacity-70`})}),ze.inProgress,` Running`]}),ze.critical>0&&n(`div`,{className:`flex items-center gap-2 px-4 py-2 rounded-full bg-status-red/[0.06] border border-status-red/20 text-[10px] font-bold uppercase tracking-[0.14em] text-status-red`,children:[n(_e,{className:`w-3 h-3`,strokeWidth:2.5}),ze.critical,` Critical`]}),n(`div`,{className:`flex items-center gap-2 px-4 py-2 rounded-full bg-black/[0.04] dark:bg-white/[0.04] border border-black/[0.06] dark:border-white/[0.06] text-[10px] font-bold uppercase tracking-[0.14em] text-slate-500`,children:[n(w,{className:`w-3 h-3`,strokeWidth:2}),ze.total,` Total`]})]}),n(se,{onClick:()=>{V||U?(H(!1),W(null)):(H(!0),setTimeout(()=>we.current?.scrollIntoView({behavior:`smooth`,block:`start`}),50))},variant:`signal`,icon:V||U?oe:O,disabled:!u||k.length===0,className:`!flex !items-center !gap-2.5 !px-6 !py-3.5 !font-bold !text-sm !rounded-2xl !transition-all !duration-300 !shadow-[0_4px_20px_rgba(0,224,160,0.25)] hover:!shadow-[0_8px_32px_rgba(0,224,160,0.45)] hover:!-translate-y-px !shrink-0`,children:V||U?`Close Composer`:`New Task`})]})]}),$&&n(`div`,{className:`flex flex-col sm:flex-row items-start sm:items-center gap-4 -mt-4`,children:[n(Fe,{sprints:k,selectedId:I,onSelect:Ke,sprintKeyPrefix:ee}),n(C,{options:[{value:`all`,label:`All`},{value:`in_progress`,label:`Running`},{value:`pending`,label:`Queued`},{value:`completed`,label:`Done`}],active:L,onChange:e=>ae(e)}),n(C,{options:[{value:`all`,label:`Any Priority`},{value:`critical`,label:`Critical`},{value:`high`,label:`High`},{value:`medium`,label:`Medium`},{value:`low`,label:`Low`}],active:R,onChange:e=>ce(e)}),n(`div`,{className:`ml-auto`,children:n(f,{value:le,onChange:z,label:`Show`})})]}),$&&Ge&&n(`div`,{className:`-mt-6`,children:n(Ie,{sprint:Ge,tasks:Le})}),!u&&n(Ne,{mode:`project`,hasProjects:c.length>0,onAddProject:()=>me(!0)}),u&&!ne&&k.length===0&&n(Ne,{mode:`sprint`,hasProjects:c.length>0,onAddProject:()=>me(!0)}),$&&Te&&n(`div`,{role:`alert`,className:`px-6 py-4 rounded-2xl border border-status-red/20 bg-status-red/[0.06] text-status-red text-sm`,children:Te}),$&&(V||U)&&n(`div`,{ref:we,className:`scroll-mt-8`,children:n(xe,{sprints:k,availableTasks:Y,initialTask:U,initialSprintId:A,onClose:()=>{H(!1),W(null)},onSubmit:qe},U?.recordId||`new`)}),$&&n(`div`,{ref:i,className:`grid gap-6 ${Be.length===1?`grid-cols-1`:Be.length===2?`grid-cols-1 lg:grid-cols-2`:`grid-cols-1 lg:grid-cols-3`}`,children:Be.map(({status:e,count:t,tasks:r})=>n(`div`,{className:`flex flex-col`,children:[n(Pe,{status:e,count:t}),n(`div`,{className:`flex-1 grid grid-cols-1 grid-rows-1 p-4 rounded-[1.5rem] min-h-[200px] bg-black/[0.015] dark:bg-white/[0.015] border relative transition-colors duration-300 ${K?.status===e?`border-signal-500/50 bg-signal-500/5`:`border-black/[0.03] dark:border-white/[0.03]`}`,onDragOver:t=>Xe(e,r.length,t),onDrop:t=>Ze(e,r.length,t),children:n(de,{show:De,className:`col-start-1 row-start-1`,skeleton:n(`div`,{className:`flex flex-col gap-4`,children:[n(T,{}),n(T,{}),n(T,{})]}),children:!X&&r.length===0?n(`div`,{className:`col-start-1 row-start-1 flex items-center justify-center text-center p-6 text-xs font-medium text-slate-400 dark:text-slate-500 border-2 border-dashed rounded-[1.5rem] bg-black/[0.015] dark:bg-white/[0.015] transition-colors ${K?.status===e?`border-signal-500/30`:`border-black/[0.05] dark:border-white/[0.05]`}`,children:[`No `,e.replace(`_`,` `),` tasks`,n(`br`,{}),L!==`all`||R!==`all`?`matching current filters`:I?`in this sprint`:`in this project`,`.`]}):X?null:n(`div`,{className:`col-start-1 row-start-1 flex flex-col gap-4`,children:[r.map((t,r)=>{let i=K?.status===e&&K?.index===r,a=We.get(t.recordId);return a?n(`div`,{className:`contents`,children:[i&&G!==t.recordId&&n(`div`,{className:`h-24 mb-4 rounded-[1.5rem] border-2 border-dashed border-signal-500/50 bg-signal-500/10 transition-all duration-300`}),n(`div`,{className:`task-card-entry`,"data-task-id":t.recordId,onDragOver:t=>{t.stopPropagation(),Xe(e,r,t)},onDrop:t=>{t.stopPropagation(),Ze(e,r,t)},children:n(je,{viewModel:a,index:r,onEdit:$e,onDelete:Qe,agentPresetName:t.agentPresetId?E.get(t.agentPresetId)?.name??null:null,agentPresetAvatarConfig:t.agentPresetId?E.get(t.agentPresetId)?.avatarConfig:void 0,isDragging:G===t.recordId,onDragStart:e=>Je(t.recordId,e),onDragEnd:Ye})},t.recordId)]},t.recordId):null}),K?.status===e&&K?.index===r.length&&n(`div`,{className:`h-24 mt-4 rounded-[1.5rem] border-2 border-dashed border-signal-500/50 bg-signal-500/10 transition-all duration-300`})]})})})]},e))}),pe&&n(fe,{onClose:()=>me(!1),onAdd:et})]})};export{Le as TasksPage};