PageSourceSearch

https://app.vixpro.ai/assets/ActionsPage-CPOtu3cf.js

js vixpro.ai collected 2026-10-05 14:48:10 UTC 23,662 bytes, 2 lines download raw bytes

1import{j as e,r as i}from"./vendor-react-BenwEZ-b.js";import{b as Ae,c as Ie}from"./vendor-router-D8mXmlbA.js";import{H as oe}from"./Header-43mo69Rn.js";import{S as Pe}from"./ServerStatusChart-BhtCTuxE.js";import{D as ze}from"./DateFilter-CcDdkSSc.js";import{_ as Le,R as T,ag as k,v as ie,U,n as ce,G as ee,c as Ee,t as De,b as Me,a4 as Be,E as He,M as se,S as Oe}from"./vendor-icons-BFVy5pDx.js";import{u as Re}from"./index-DCh_f_2J.js";import{p as Ue}from"./dates-CpQPKctL.js";import"./ServerStatusChart.module-B8YEEYG9.js";import"./vendor-recharts-sfhzydZ_.js";import"./vendor-query-pLV57elM.js";function Fe({charts:o}){return!o?.data?.length||!o?.servers?.length?null:e.jsx(Pe,{data:o.data,servers:o.servers,xKey:"status",title:"Action Items Overview",lineKey:"assigneeCount",lineLabel:"Distinct Assignees"})}const Ve="_container_m9jh4_1",Je="_button_m9jh4_5",We="_label_m9jh4_31",qe="_chevron_m9jh4_36",Ke="_open_m9jh4_41",Ge="_dropdown_m9jh4_45",Xe="_option_m9jh4_59",Qe="_selected_m9jh4_78",Ye="_optionName_m9jh4_83",Ze="_optionCount_m9jh4_87",es="_checkIcon_m9jh4_100",ss="_divider_m9jh4_104",m={container:Ve,button:Je,label:We,chevron:qe,open:Ke,dropdown:Ge,option:Xe,selected:Qe,optionName:Ye,optionCount:Ze,checkIcon:es,divider:ss};function ts({selectedStackId:o,onSelect:a}){const[g,p]=i.useState([]),[d,h]=i.useState(!1),[v,S]=i.useState(!0),r=i.useRef(null);i.useEffect(()=>{(async()=>{try{const b=await fetch("/api/servers/stacks",{credentials:"include"});if(b.ok){const I=await b.json();p(I.stacks||[])}}catch(b){console.error("Failed to load stacks:",b)}finally{S(!1)}})()},[]),i.useEffect(()=>{const l=b=>{r.current&&!r.current.contains(b.target)&&h(!1)};return document.addEventListener("mousedown",l),()=>document.removeEventListener("mousedown",l)},[]);const N=g.find(l=>l.id===o),y=o==="unassigned"?"Unassigned":N?.name||"All Stacks",_=g.reduce((l,b)=>l+b.server_count,0);return e.jsxs("div",{className:m.container,ref:r,children:[e.jsxs("button",{onClick:()=>h(!d),className:m.button,disabled:v,"aria-expanded":d,"aria-haspopup":"listbox","aria-label":"Filter by stack",children:[e.jsx(Le,{size:16,"aria-hidden":"true"}),e.jsx("span",{className:m.label,children:y}),e.jsx(T,{size:14,className:`${m.chevron} ${d?m.open:""}`,"aria-hidden":"true"})]}),d&&e.jsxs("div",{className:m.dropdown,role:"listbox","aria-label":"Stack options",children:[e.jsxs("button",{role:"option","aria-selected":o===null,className:`${m.option} ${o===null?m.selected:""}`,onClick:()=>{a(null),h(!1)},children:[e.jsx("span",{className:m.optionName,children:"All Stacks"}),e.jsx("span",{className:m.optionCount,children:_}),o===null&&e.jsx(k,{size:14,className:m.checkIcon,"aria-hidden":"true"})]}),g.length>0&&e.jsx("div",{className:m.divider}),g.map(l=>e.jsxs("button",{role:"option","aria-selected":o===l.id,className:`${m.option} ${o===l.id?m.selected:""}`,onClick:()=>{a(l.id),h(!1)},children:[e.jsx("span",{className:m.optionName,children:l.name}),e.jsx("span",{className:m.optionCount,children:l.server_count}),o===l.id&&e.jsx(k,{size:14,className:m.checkIcon,"aria-hidden":"true"})]},l.id)),g.length>0&&e.jsx("div",{className:m.divider}),e.jsxs("button",{role:"option","aria-selected":o==="unassigned",className:`${m.option} ${o==="unassigned"?m.selected:""}`,onClick:()=>{a("unassigned"),h(!1)},children:[e.jsx("span",{className:m.optionName,children:"Unassigned"}),o==="unassigned"&&e.jsx(k,{size:14,className:m.checkIcon,"aria-hidden":"true"})]})]})]})}const ns="_container_7nihn_1",as="_button_7nihn_5",os="_label_7nihn_31",is="_chevron_7nihn_36",cs="_open_7nihn_41",rs="_dropdown_7nihn_45",ls="_option_7nihn_59",ds="_selected_7nihn_78",us="_optionName_7nihn_83",ms="_optionHost_7nihn_87",hs="_optionCount_7nihn_97",ps="_checkIcon_7nihn_110",_s="_divider_7nihn_114",x={container:ns,button:as,label:os,chevron:is,open:cs,dropdown:rs,option:ls,selected:ds,optionName:us,optionHost:ms,optionCount:hs,checkIcon:ps,divider:_s};function fs({selectedServerId:o,onSelect:a}){const[g,p]=i.useState([]),[d,h]=i.useState(!1),[v,S]=i.useState(!0),r=i.useRef(null);i.useEffect(()=>{(async()=>{try{const l=await fetch("/api/servers",{credentials:"include"});if(l.ok){const b=await l.json();p(b.servers||[])}}catch(l){console.error("Failed to load servers:",l)}finally{S(!1)}})()},[]),i.useEffect(()=>{const _=l=>{r.current&&!r.current.contains(l.target)&&h(!1)};return document.addEventListener("mousedown",_),()=>document.removeEventListener("mousedown",_)},[]);const N=g.find(_=>_.id===o),y=N?.display_name||N?.name||"All Servers";return e.jsxs("div",{className:x.container,ref:r,children:[e.jsxs("button",{onClick:()=>h(!d),className:x.button,disabled:v,"aria-expanded":d,"aria-haspopup":"listbox","aria-label":"Filter by server",children:[e.jsx(ie,{size:16,"aria-hidden":"true"}),e.jsx("span",{className:x.label,children:y}),e.jsx(T,{size:14,className:`${x.chevron} ${d?x.open:""}`,"aria-hidden":"true"})]}),d&&e.jsxs("div",{className:x.dropdown,role:"listbox","aria-label":"Server options",children:[e.jsxs("button",{role:"option","aria-selected":o===null,className:`${x.option} ${o===null?x.selected:""}`,onClick:()=>{a(null),h(!1)},children:[e.jsx("span",{className:x.optionName,children:"All Servers"}),e.jsx("span",{className:x.optionCount,children:g.length}),o===null&&e.jsx(k,{size:14,className:x.checkIcon,"aria-hidden":"true"})]}),g.length>0&&e.jsx("div",{className:x.divider}),g.map(_=>e.jsxs("button",{role:"option","aria-selected":o===_.id,className:`${x.option} ${o===_.id?x.selected:""}`,onClick:()=>{a(_.id),h(!1)},children:[e.jsx("span",{className:x.optionName,children:_.display_name||_.name}),e.jsx("span",{className:x.optionHost,children:_.host}),o===_.id&&e.jsx(k,{size:14,className:x.checkIcon,"aria-hidden":"true"})]},_.id))]})]})}const xs="_container_1kfrn_1",gs="_button_1kfrn_5",js="_label_1kfrn_26",vs="_chevron_1kfrn_3
11",Ns="_open_1kfrn_36",bs="_dropdown_1kfrn_40",Cs="_option_1kfrn_54",Ss="_selected_1kfrn_73",ys="_optionName_1kfrn_78",ks="_optionRole_1kfrn_82",$s="_checkIcon_1kfrn_92",ws="_divider_1kfrn_96",j={container:xs,button:gs,label:js,chevron:vs,open:Ns,dropdown:bs,option:Cs,selected:Ss,optionName:ys,optionRole:ks,checkIcon:$s,divider:ws};function Ts({assignees:o,selectedAssignee:a,onSelect:g}){const[p,d]=i.useState(!1),h=i.useRef(null);i.useEffect(()=>{const r=N=>{h.current&&!h.current.contains(N.target)&&d(!1)};return document.addEventListener("mousedown",r),()=>document.removeEventListener("mousedown",r)},[]);const v=o.find(r=>r.id===a),S=v?.name||v?.email||"All Assignees";return e.jsxs("div",{className:j.container,ref:h,children:[e.jsxs("button",{onClick:()=>d(!p),className:j.button,"aria-expanded":p,"aria-haspopup":"listbox","aria-label":"Filter by assignee",children:[e.jsx(U,{size:16,"aria-hidden":"true"}),e.jsx("span",{className:j.label,children:S}),e.jsx(T,{size:14,className:`${j.chevron} ${p?j.open:""}`,"aria-hidden":"true"})]}),p&&e.jsxs("div",{className:j.dropdown,role:"listbox","aria-label":"Assignee options",children:[e.jsxs("button",{role:"option","aria-selected":a===null,className:`${j.option} ${a===null?j.selected:""}`,onClick:()=>{g(null),d(!1)},children:[e.jsx("span",{className:j.optionName,children:"All Assignees"}),a===null&&e.jsx(k,{size:14,className:j.checkIcon,"aria-hidden":"true"})]}),o.length>0&&e.jsx("div",{className:j.divider}),o.map(r=>e.jsxs("button",{role:"option","aria-selected":a===r.id,className:`${j.option} ${a===r.id?j.selected:""}`,onClick:()=>{g(r.id),d(!1)},children:[e.jsx("span",{className:j.optionName,children:r.name||r.email}),e.jsx("span",{className:j.optionRole,children:r.role}),a===r.id&&e.jsx(k,{size:14,className:j.checkIcon,"aria-hidden":"true"})]},r.id))]})]})}const As="_pageHeader_hd29l_3",Is="_headerIcon_hd29l_10",Ps="_topBar_hd29l_35",zs="_statusPills_hd29l_44",Ls="_statusPill_hd29l_44",Es="_statusPillActive_hd29l_76",Ds="_pillCount_hd29l_83",Ms="_statusDot_hd29l_88",Bs="_moreDropdown_hd29l_104",Hs="_moreButton_hd29l_108",Os="_moreMenu_hd29l_128",Rs="_filterBar_hd29l_152",Us="_filterSelect_hd29l_164",Fs="_searchWrapper_hd29l_185",Vs="_searchIcon_hd29l_193",Js="_searchInput_hd29l_201",Ws="_chartSection_hd29l_223",qs="_chartToggle_hd29l_227",Ks="_activityList_hd29l_249",Gs="_activityItem_hd29l_255",Xs="_priorityBar_hd29l_274",Qs="_itemContent_hd29l_280",Ys="_itemTitleRow_hd29l_287",Zs="_itemNumber_hd29l_294",et="_priorityBadge_hd29l_303",st="_itemTitle_hd29l_287",tt="_timeInfo_hd29l_326",nt="_expandIcon_hd29l_336",at="_itemMeta_hd29l_345",ot="_metaControl_hd29l_353",it="_statusDotInline_hd29l_370",ct="_statusSelect_hd29l_377",rt="_statusBadge_hd29l_395",lt="_statusSuccess_hd29l_406",dt="_statusError_hd29l_411",ut="_statusActive_hd29l_416",mt="_statusPending_hd29l_421",ht="_metaTag_hd29l_427",pt="_metaTagMuted_hd29l_439",_t="_metaSpacer_hd29l_449",ft="_assigneeSelect_hd29l_454",xt="_commentCount_hd29l_474",gt="_loadingState_hd29l_514",jt="_emptyState_hd29l_515",vt="_emptyHint_hd29l_530",Nt="_spinner_hd29l_535",bt="_highlighted_hd29l_718",Ct="_expandedContent_hd29l_765",St="_description_hd29l_771",yt="_sourceLink_hd29l_796",kt="_commentsSection_hd29l_816",$t="_commentsHeader_hd29l_822",wt="_commentsList_hd29l_832",Tt="_comment_hd29l_474",At="_commentMeta_hd29l_845",It="_commentUser_hd29l_852",Pt="_commentTime_hd29l_858",zt="_commentText_hd29l_863",Lt="_noComments_hd29l_870",Et="_addComment_hd29l_876",t={pageHeader:As,headerIcon:Is,topBar:Ps,statusPills:zs,statusPill:Ls,statusPillActive:Es,pillCount:Ds,statusDot:Ms,moreDropdown:Bs,moreButton:Hs,moreMenu:Os,filterBar:Rs,filterSelect:Us,searchWrapper:Fs,searchIcon:Vs,searchInput:Js,chartSection:Ws,chartToggle:qs,activityList:Ks,activityItem:Gs,priorityBar:Xs,itemContent:Qs,itemTitleRow:Ys,itemNumber:Zs,priorityBadge:et,itemTitle:st,timeInfo:tt,expandIcon:nt,itemMeta:at,metaControl:ot,statusDotInline:it,statusSelect:ct,statusBadge:rt,statusSuccess:lt,statusError:dt,statusActive:ut,statusPending:mt,metaTag:ht,metaTagMuted:pt,metaSpacer:_t,assigneeSelect:ft,commentCount:xt,loadingState:gt,emptyState:jt,emptyHint:vt,spinner:Nt,highlighted:bt,expandedContent:Ct,description:St,sourceLink:yt,commentsSection:kt,commentsHeader:$t,commentsList:wt,comment:Tt,commentMeta:At,commentUser:It,commentTime:Pt,commentText:zt,noComments:Lt,addComment:Et},Dt=["pending","open","in_progress","testing","pending_review","pending_client","pending_release","pending_VixProAI_fix","pending_org_review","reported","completed","dismissed","cancelled","tech_debt"],te={critical:{color:"var(--error-text)",bgColor:"var(--error-bg)"},urgent:{color:"var(--error-text)",bgColor:"var(--error-bg)"},high:{color:"#f97316",bgColor:"rgba(249, 115, 22, 0.12)"},medium:{color:"#3b82f6",bgColor:"rgba(59, 130, 246, 0.12)"},low:{color:"var(--success-text)",bgColor:"var(--success-bg)"}};function ne(o){const a=o.toLowerCase();return["completed","resolved","dismissed"].includes(a)?t.statusSuccess:["cancelled","failed"].includes(a)?t.statusError:["in_progress","testing","pending_review"].includes(a)?t.statusActive:["pending_VixProAI_fix"].includes(a)?t.statusError:["pending_org_review"].includes(a)?t.statusActive:["reported"].includes(a)?t.statusSuccess:t.statusPending}function O(o){const a=o.toLowerCase();return["completed","resolved"].includes(a)?"#34d399":["dismissed"].includes(a)?"#6b7280":["cancelled","failed"].includes(a)?"#f87171":["in_progress"].includes(a)?"#818cf8":["testing"].includes(a)?"#a78bfa":["pending_review"].includes(a)?"#c084fc":["pending_client"].includes(a)?"#f0abfc":["pending_release"].includes(a)?"#67e8f9":["open"].includes(a)?"#60a5fa":["tech_debt"].includes(a)?"#fbbf24":["pending_VixProAI_fix"].includes(a)?"#ef4444":["pending_org_review"].includes(a)?"#06b6d4":["reported"].includes(a)?"#34d399":"#94a3b8"}function ae(o){const a=Ue(o),p=new Date().getTime()-a.getTime(),d=Math.floor(p/6e4),h=Math.floor(p/36e5),v=Math.floor(p/864e5);return d<1?"Just now":d<60?`${d}m ago`:h<24?`${h}h ago`:v<7?`${v}d ago`:a.toLocaleDateString()}function R(o){return o.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}const re=new Set(["task","manual","l1_pulse","l2_checkup","l3_comprehensive","nlp_query","daily_summary","discovery","universal_check","triage"]),le=new Set(["incident","reactive"]),de=new Set(["change","maintenance"]),ue=new Set(["problem"]);function G(o,a){return re.has(o)?`/activity/task/${a}`:le.has(o)?`/activity/incident/${a}`:de.has(o)?`/changes/${a}`:ue.has(o)?`/activity/problem/${a}`:null}function Mt(o){return re.has(o)?"Task":le.has(o)?"Incident":de.has(o)?"Change":ue.has(o)?"Problem":o.replace(/_/g," ").replace(/\b\w/g,a=>a.toUpperCase())}function Bt(){const o=Ae(),[a]=Ie(),g=a.get("status")||"all",p=a.get("highlight"),[d,h]=i.useState(g),[v,S]=i.useState(""),[r,N]=i.useState([]),[y,_]=i.useState(!0),[l,b]=i.useState({all:0}),[I,me]=i.useState(null),[P,he]=i.useState(!1),[X,Q]=i.useState(null),[z,pe]=i.useState([]),[_e,$]=i.useState(null),[F,Y]=i.useState({}),[L,fe]=i.useState(""),[E,xe]=i.useState(""),[Ht,ge]=i.useState("All Time"),[je,ve]=i.useState("UTC"),[D,Ne]=i.useState(null),[M,be]=i.useState(null),[B,Ce]=i.useState(null),[H,Se]=i.useState(null),[A,V]=i.useState(!1),J=i.useRef(null),{isReadOnly:ye}=Re(),w=!ye;i.useEffect(()=>{fetch("/api/organization",{credentials:"include"}).then(s=>s.ok?s.json():null).then(s=>{s?.timezone&&ve(s.timezone)}).catch(()=>{})},[]),i.useEffect(()=>{const s=c=>{J.current&&!J.current.contains(c.target)&&V(!1)};return A&&document.addEventListener("mousedown",s),()=>document.removeEventListener("mousedown",s)},[A]),i.useEffect(()=>{const s=a.get("status")||"all";s!==d&&h(s)},[a]);const W=async(s=!1)=>{s||_(!0);try{const c=new URLSearchParams;d!=="all"&&c.set("status",d),v&&c.set("search",v),L&&c.set("startDate",L),E&&c.set("endDate",E),D&&c.set("stack_id",D),M&&c.set("server_id",M),B&&c.set("assignee",B),H&&c.set("source_type",H);const u=await fetch(`/api/actions?${c.toString()}`,{credentials:"include"});if(u.ok){const f=await u.json();N(f.actions||[]),b(f.counts||{all:0}),me(f.charts||null),pe(f.assignees||[])}}catch(c){console.error("Failed to fetch actions:",c)}finally{s||_(!1)}};i.useEffect(()=>{W()},[d,v,L,E,D,M,B,H]),i.useEffect(()=>{if(!p||y||r.length===0)return;r.some(c=>
1c.id===p)&&(Q(p),requestAnimationFrame(()=>{document.getElementById(`action-item-${p}`)?.scrollIntoView({behavior:"smooth",block:"center"})}))},[p,y,r]);const q=s=>{h(s);const c=s==="all"?"/actions":`/actions?status=${s}`;o(c,{replace:!0})},Z=async(s,c)=>{const u=s.target;if(u.closest("select")||u.closest("button")||u.closest("input")||u.closest("textarea"))return;const f=X===c.id?null:c.id;Q(f)},ke=async(s,c)=>{if(w){$(s);try{(await fetch("/api/actions",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:s,status:c})})).ok&&(N(c==="cancelled"?f=>f.filter(n=>n.id!==s):f=>f.map(n=>n.id===s?{...n,status:c}:n)),W(!0))}catch(u){console.error("Failed to update status:",u)}finally{$(null)}}},$e=async(s,c)=>{if(w){$(s);try{(await fetch("/api/actions",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:s,assigned_to:c||null})})).ok&&(N(f=>f.map(n=>n.id===s?{...n,assignedTo:c||void 0}:n)),W(!0))}catch(u){console.error("Failed to update assignee:",u)}finally{$(null)}}},we=async s=>{if(!w)return;const c=F[s]?.trim();if(c){$(s);try{const u=await fetch("/api/actions",{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify({id:s,comment:c})});if(u.ok){const f=await u.json();N(n=>n.map(C=>C.id===s?{...C,comments:f.action?.comments}:C)),Y(n=>({...n,[s]:""}))}}catch(u){console.error("Failed to add comment:",u)}finally{$(null)}}},K=Object.keys(l).filter(s=>s!=="all").sort();return e.jsx("div",{className:"main-layout",children:e.jsxs("div",{className:"main-content-wrapper",children:[e.jsx(oe,{}),e.jsx("main",{className:"main-content",children:e.jsxs("div",{className:"content-container page-fade-in",children:[e.jsxs("div",{className:t.pageHeader,children:[e.jsx("div",{className:t.headerIcon,children:e.jsx(ee,{size:28,"aria-hidden":"true"})}),e.jsxs("div",{children:[e.jsx("h1",{children:"Action Items"}),e.jsx("p",{children:"Track and manage AI-recommended actions"})]})]}),e.jsx("div",{className:t.topBar,children:e.jsxs("div",{className:t.statusPills,children:[e.jsxs("button",{className:`${t.statusPill} ${d==="all"?t.statusPillActive:""}`,onClick:()=>q("all"),children:["All",e.jsx("span",{className:t.pillCount,children:l.all})]}),K.slice(0,6).map(s=>e.jsxs("button",{className:`${t.statusPill} ${d===s?t.statusPillActive:""}`,onClick:()=>q(s),children:[e.jsx("span",{className:t.statusDot,style:{backgroundColor:O(s)}}),R(s),e.jsx("span",{className:t.pillCount,children:l[s]||0})]},s)),K.length>6&&e.jsxs("div",{className:t.moreDropdown,ref:J,children:[e.jsxs("button",{className:t.moreButton,onClick:()=>V(!A),"aria-expanded":A,children:["More",e.jsx(T,{size:12,"aria-hidden":"true"})]}),A&&e.jsx("div",{className:t.moreMenu,role:"menu",children:K.slice(6).map(s=>e.jsxs("button",{className:`${t.statusPill} ${d===s?t.statusPillActive:""}`,onClick:()=>{q(s),V(!1)},role:"menuitem",children:[e.jsx("span",{className:t.statusDot,style:{backgroundColor:O(s)}}),R(s),e.jsx("span",{className:t.pillCount,children:l[s]||0})]},s))})]})]})}),e.jsxs("div",{className:t.filterBar,children:[e.jsx(ts,{selectedStackId:D,onSelect:Ne}),e.jsx(fs,{selectedServerId:M,onSelect:be}),e.jsx(Ts,{assignees:z,selectedAssignee:B,onSelect:Ce}),e.jsxs("select",{className:t.filterSelect,value:H||"",onChange:s=>Se(s.target.value||null),"aria-label":"Filter by source type",children:[e.jsx("option",{value:"",children:"All Sources"}),e.jsx("option",{value:"incident",children:"Incident"}),e.jsx("option",{value:"task",children:"Task"}),e.jsx("option",{value:"change",children:"Change"}),e.jsx("option",{value:"problem",children:"Problem"})]}),e.jsxs("div",{className:t.searchWrapper,children:[e.jsx(Ee,{size:16,className:t.searchIcon,"aria-hidden":"true"}),e.jsx("input",{type:"text",placeholder:"Search action items...","aria-label":"Search action items",value:v,onChange:s=>S(s.target.value),className:t.searchInput})]}),e.jsx(ze,{startDate:L,endDate:E,timezone:je,onChange:(s,c,u)=>{fe(s),xe(c),ge(u)}})]}),I&&e.jsxs("div",{className:t.chartSection,children:[e.jsxs("button",{className:t.chartToggle,onClick:()=>he(!P),"aria-expanded":!P,children:[P?e.jsx(De,{size:16}):e.jsx(T,{size:16}),e.jsx("span",{children:"Charts"})]}),!P&&e.jsx(Fe,{charts:I})]}),e.jsx("div",{className:t.activityList,"aria-live":"polite",children:y?e.jsxs("div",{className:t.loadingState,role:"status","aria-live":"polite",children:[e.jsx(ce,{size:32,className:t.
1spinner,"aria-hidden":"true"}),e.jsx("p",{children:"Loading action items..."})]}):r.length===0?e.jsxs("div",{className:t.emptyState,children:[e.jsx(ee,{size:48,"aria-hidden":"true"}),e.jsx("p",{children:"No action items found"}),e.jsx("p",{className:t.emptyHint,children:v?"Try a different search term":"Action items will appear here as VixPro AI identifies them"})]}):r.map(s=>{const c=X===s.id,u=te[s.priority]||te.medium,f=_e===s.id;return e.jsxs("div",{id:`action-item-${s.id}`,className:`${t.activityItem} ${p===s.id?t.highlighted:""}`,onClick:n=>Z(n,s),role:"button",tabIndex:0,onKeyDown:n=>{const C=n.target.tagName;C==="TEXTAREA"||C==="INPUT"||(n.key==="Enter"||n.key===" ")&&(n.preventDefault(),Z(n,s))},"aria-expanded":c,children:[e.jsx("div",{className:t.priorityBar,style:{backgroundColor:u.color},title:`${s.priority} priority`}),e.jsxs("div",{className:t.itemContent,children:[e.jsxs("div",{className:t.itemTitleRow,children:[s.actionNumber&&e.jsx("span",{className:t.itemNumber,children:s.actionNumber}),e.jsx("span",{className:t.priorityBadge,style:{color:u.color,backgroundColor:u.bgColor},children:s.priority}),e.jsx("h3",{className:t.itemTitle,children:s.title}),e.jsxs("span",{className:t.timeInfo,children:[e.jsx(Me,{size:12,"aria-hidden":"true"}),ae(s.createdAt)]}),e.jsx("div",{className:t.expandIcon,"aria-hidden":"true",children:c?e.jsx(Be,{size:16}):e.jsx(T,{size:16})})]}),e.jsxs("div",{className:t.itemMeta,children:[w?e.jsxs("div",{className:`${t.metaControl} ${ne(s.status)}`,children:[e.jsx("span",{className:t.statusDotInline,style:{backgroundColor:O(s.status)}}),e.jsx("select",{className:t.statusSelect,value:s.status,onChange:n=>ke(s.id,n.target.value),disabled:f,onClick:n=>n.stopPropagation(),"aria-label":"Action status",children:Dt.map(n=>e.jsx("option",{value:n,children:R(n)},n))})]}):e.jsxs("span",{className:`${t.statusBadge} ${ne(s.status)}`,children:[e.jsx("span",{className:t.statusDotInline,style:{backgroundColor:O(s.status)}}),R(s.status)]}),s.serverName&&e.jsxs("span",{className:t.metaTag,children:[e.jsx(ie,{size:12,"aria-hidden":"true"}),s.serverName]}),s.category&&e.jsx("span",{className:t.metaTag,children:s.category}),s.sourceType&&s.sourceId&&G(s.sourceType,s.sourceId)&&e.jsxs("a",{href:G(s.sourceType,s.sourceId),className:t.sourceLink,onClick:n=>{n.stopPropagation(),n.preventDefault(),o(G(s.sourceType,s.sourceId)
1)},children:[e.jsx(He,{size:12,"aria-hidden":"true"}),s.sourceLabel||Mt(s.sourceType)]}),e.jsx("span",{className:t.metaSpacer}),w?e.jsxs("div",{className:t.metaControl,children:[e.jsx(U,{size:12,"aria-hidden":"true"}),e.jsxs("select",{className:t.assigneeSelect,value:s.assignedTo||"",onChange:n=>$e(s.id,n.target.value),disabled:f,onClick:n=>n.stopPropagation(),"aria-label":"Assignee",children:[e.jsx("option",{value:"",children:"Unassigned"}),z.map(n=>e.jsx("option",{value:n.id,children:n.name||n.email},n.id))]})]}):s.assignedTo?e.jsxs("span",{className:t.metaTag,children:[e.jsx(U,{size:12,"aria-hidden":"true"}),z.find(n=>n.id===s.assignedTo)?.name||z.find(n=>n.id===s.assignedTo)?.email||s.assignedTo]}):e.jsxs("span",{className:t.metaTagMuted,children:[e.jsx(U,{size:12,"aria-hidden":"true"}),"Unassigned"]}),s.comments&&s.comments.length>0&&e.jsxs("span",{className:t.commentCount,children:[e.jsx(se,{size:12,"aria-hidden":"true"}),s.comments.length]})]}),c&&e.jsxs("div",{className:t.expandedContent,children:[e.jsx("p",{className:t.description,children:s.description}),e.jsxs("div",{className:t.commentsSection,children:[e.jsxs("h4",{className:t.commentsHeader,children:[e.jsx(se,{size:16,"aria-hidden":"true"}),"Comments"]}),(()=>{const n=s.comments;return n&&n.length>0?e.jsx("div",{className:t.commentsList,children:n.map((C,Te)=>e.jsxs("div",{className:t.comment,children:[e.jsxs("div",{className:t.commentMeta,children:[e.jsx("span",{className:t.commentUser,children:C.user}),e.jsx("span",{className:t.commentTime,children:ae(C.timestamp)})]}),e.jsx("p",{className:t.commentText,children:C.text})]},Te))}):e.jsx("p",{className:t.noComments,children:"No comments yet"})})(),w&&!0&&e.jsxs("div",{className:t.addComment,children:[e.jsx("textarea",{placeholder:"Add a comment...","aria-label":"Add a comment",value:F[s.id]||"",onChange:n=>Y(C=>({...C,[s.id]:n.target.value})),onClick:n=>n.stopPropagation(),rows:2}),e.jsx("button",{onClick:n=>{n.stopPropagation(),we(s.id)},disabled:f||!F[s.id]?.trim(),"aria-label":"Send comment",children:e.jsx(Oe,{size:16,"aria-hidden":"true"})})]})]})]})]})]},s.id)})})]})})]})})}function Qt(){return e.jsx(i.Suspense,{fallback:e.jsx("div",{className:"main-layout",children:e.jsxs("div",{className:"main-content-wrapper",children:[e.jsx(oe,{}),e.jsx("main",{className:"main-content",children:e.jsx("div",{className:"content-container",children:e.jsxs("div",{className:t.loadingState,role:"status","aria-live":"polite",children:[e.jsx(ce,{size:32,className:t.spinner,"aria-hidden":"true"}),e.jsx("p",{children:"Loading action items..."})]})})})]})}),children:e.jsx(Bt,{})})}export{Qt as default};
2//# sourceMappingURL=ActionsPage-CPOtu3cf.js.map

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.