@xenon-device-management/xenon 1.7.7 → 1.7.9

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 (66) hide show
  1. package/lib/package.json +1 -1
  2. package/lib/public/assets/{ApiKeyGate-BVaB1Eg_.js → ApiKeyGate-DstjGHCV.js} +1 -1
  3. package/lib/public/assets/{BugReportButton-CioDV7QP.js → BugReportButton-CCFNeE8T.js} +1 -1
  4. package/lib/public/assets/DeviceMosaicView-CeSU4Cin.js +2 -0
  5. package/lib/public/assets/{EmptyState-UcJej2vi.js → EmptyState-BLKITXvX.js} +1 -1
  6. package/lib/public/assets/{FieldGroup-CYlyr34Q.js → FieldGroup-DnJ8AU1V.js} +1 -1
  7. package/lib/public/assets/{Modal-CjmzIR4Y.js → Modal-QVER5CZo.js} +1 -1
  8. package/lib/public/assets/{SegmentedControl-wRDvkYAQ.js → SegmentedControl-C2vcRRnn.js} +1 -1
  9. package/lib/public/assets/{SettingCard-BzjYlAYS.js → SettingCard-BCRyZfOg.js} +1 -1
  10. package/lib/public/assets/{Table-ta1UYEeC.js → Table-CEvMaA5P.js} +1 -1
  11. package/lib/public/assets/{activity-jltyhcrF.js → activity-C9XYmP_g.js} +1 -1
  12. package/lib/public/assets/{ai-settings-Dfjxb1SZ.js → ai-settings-CUkrWRb4.js} +1 -1
  13. package/lib/public/assets/{api-keys-cFOese97.js → api-keys-DOEqEyCC.js} +1 -1
  14. package/lib/public/assets/{apps-sHtZU8T_.js → apps-kS8notsd.js} +1 -1
  15. package/lib/public/assets/{arrow-left-DGZzN6Sl.js → arrow-left-USNjWr3g.js} +1 -1
  16. package/lib/public/assets/{arrow-up-right-DtZUe0YH.js → arrow-up-right-CA-0ObXb.js} +1 -1
  17. package/lib/public/assets/{auth-shell-D0eF5eyS.js → auth-shell-0GDuDM6t.js} +1 -1
  18. package/lib/public/assets/builds-page-B3hcVeUY.js +6 -0
  19. package/lib/public/assets/{button-3RkAu6xE.js → button-30pnTauc.js} +1 -1
  20. package/lib/public/assets/{check-D6DDcFwM.js → check-CVbtgHOC.js} +1 -1
  21. package/lib/public/assets/{chevron-right-BtA7DR8A.js → chevron-right-BpHMOuL1.js} +1 -1
  22. package/lib/public/assets/{circle-check-Bjgvpq5F.js → circle-check-BR3SeBx6.js} +1 -1
  23. package/lib/public/assets/{circle-x-_TOawobA.js → circle-x-BISG5iH-.js} +1 -1
  24. package/lib/public/assets/{clock-pm4LDp97.js → clock-BiZmZWEe.js} +1 -1
  25. package/lib/public/assets/{copy-x-UuUQkc.js → copy-E317aAW3.js} +1 -1
  26. package/lib/public/assets/{device-explorer-BDih8ZO9.js → device-explorer-DTj4kvcs.js} +8 -8
  27. package/lib/public/assets/{download-CuDjBGgs.js → download-Blklg-SX.js} +1 -1
  28. package/lib/public/assets/{forgot-password-lgHuL3gW.js → forgot-password-Bwo7pGp7.js} +1 -1
  29. package/lib/public/assets/{funnel-DQuWVevA.js → funnel-C8pl8r9F.js} +1 -1
  30. package/lib/public/assets/{index--TKsSVZp.js → index-Doq8HO3X.js} +14 -14
  31. package/lib/public/assets/index-TkL430dq.css +1 -0
  32. package/lib/public/assets/{layers-CdE4q4fN.js → layers-C2U3k-wh.js} +1 -1
  33. package/lib/public/assets/{lock-D2Vg6I6G.js → lock-pCxyVW83.js} +1 -1
  34. package/lib/public/assets/{login-C2dtnYcH.js → login-Cn6qENaF.js} +1 -1
  35. package/lib/public/assets/{maintenance-settings-Ck0suBTt.js → maintenance-settings-DybzeKfb.js} +1 -1
  36. package/lib/public/assets/{mouse-pointer-2-JuM7rDhC.js → mouse-pointer-2-cmVLOY6H.js} +1 -1
  37. package/lib/public/assets/overview-Dqw_olJm.js +11 -0
  38. package/lib/public/assets/{page-header-D5tpZwkI.js → page-header-Qk9pGEaH.js} +1 -1
  39. package/lib/public/assets/{plus-tcA3_CAo.js → plus-DkzZBN8d.js} +1 -1
  40. package/lib/public/assets/{profile-page-BuuLTEtS.js → profile-page-D_BlUsba.js} +1 -1
  41. package/lib/public/assets/{reset-password-ERq0WAyA.js → reset-password-vxmC3PEa.js} +1 -1
  42. package/lib/public/assets/{runbook-page-BubL06xm.js → runbook-page-rzVHVBte.js} +1 -1
  43. package/lib/public/assets/{selector-detail-page-DgL7bNdy.js → selector-detail-page-DUPHHW7E.js} +1 -1
  44. package/lib/public/assets/selector-health-C4Sv_nTk.css +1 -0
  45. package/lib/public/assets/{selector-health-B-V7vomq.js → selector-health-CS_wYWYA.js} +1 -1
  46. package/lib/public/assets/{selector-health-page-DWy7bTdU.js → selector-health-page-CQT_ghIj.js} +1 -1
  47. package/lib/public/assets/{session-detail-page-COgS5oAy.js → session-detail-page-Md2BJeDW.js} +1 -1
  48. package/lib/public/assets/{settings-D0fQ4JNR.js → settings-DcRs-Ksu.js} +1 -1
  49. package/lib/public/assets/{shield-DINNxWHp.js → shield-DKOl26Qj.js} +1 -1
  50. package/lib/public/assets/{shield-alert-DDDbE5ER.js → shield-alert-B6RlIJqv.js} +1 -1
  51. package/lib/public/assets/status-pill-outline-Df9QaRNJ.js +1 -0
  52. package/lib/public/assets/{tablet-DoE7LIzI.js → tablet-1xXXhpqC.js} +1 -1
  53. package/lib/public/assets/{teams-DpW-IUPC.js → teams-DnBnZECm.js} +1 -1
  54. package/lib/public/assets/{trash-2-Dvr08Dpq.js → trash-2-D-ONhY9W.js} +1 -1
  55. package/lib/public/assets/{useSocket-COssbQIj.js → useSocket-D9iZtppJ.js} +1 -1
  56. package/lib/public/assets/{users-DKmLh2WK.js → users-BFrjP_42.js} +1 -1
  57. package/lib/public/assets/{webhook-settings-nwtLvp2Q.js → webhook-settings-DgJKt5Wf.js} +1 -1
  58. package/lib/public/assets/{zap-CM2cWetx.js → zap-C8F21kM1.js} +1 -1
  59. package/lib/public/index.html +2 -2
  60. package/package.json +1 -1
  61. package/lib/public/assets/DeviceMosaicView-BtRxZTXc.js +0 -2
  62. package/lib/public/assets/builds-page-DxDwaq_t.js +0 -6
  63. package/lib/public/assets/index-BW3kENYH.css +0 -1
  64. package/lib/public/assets/overview-BBzmQBEl.js +0 -11
  65. package/lib/public/assets/selector-health-BwHGcem9.css +0 -1
  66. package/lib/public/assets/status-pill-outline-CFz5xaoF.js +0 -1
@@ -1,11 +0,0 @@
1
- import{g as R,r as b,X as S,j as e,u as U,T as X,S as Y}from"./index--TKsSVZp.js";import{u as z}from"./useSocket-COssbQIj.js";import{F as V}from"./funnel-DQuWVevA.js";import{T as W,M as K}from"./tablet-DoE7LIzI.js";import{A as Q}from"./activity-jltyhcrF.js";import{P as G}from"./plus-tcA3_CAo.js";/**
2
- * @license lucide-react v0.555.0 - ISC
3
- *
4
- * This source code is licensed under the ISC license.
5
- * See the LICENSE file in the root directory of this source tree.
6
- */const J=[["path",{d:"M5 12h14",key:"1ays0h"}],["path",{d:"m12 5 7 7-7 7",key:"xquz4c"}]],Z=R("arrow-right",J);/**
7
- * @license lucide-react v0.555.0 - ISC
8
- *
9
- * This source code is licensed under the ISC license.
10
- * See the LICENSE file in the root directory of this source tree.
11
- */const ee=[["path",{d:"M5 5a2 2 0 0 1 3.008-1.728l11.997 6.998a2 2 0 0 1 .003 3.458l-12 7A2 2 0 0 1 5 19z",key:"10ikf1"}]],se=R("play",ee),F=20;function te(s,n){if(!s)return!1;const t=Date.parse(s);return Number.isFinite(t)&&Date.now()-t<n}function ne(s){const t=new Date().getHours(),l=[];for(let a=0;a<24;a++){const d=(t-(23-a)+24)%24;l.push({hour:`${String(d).padStart(2,"0")}:00`,sessions:0,heals:0})}const u=Date.now()-24*60*60*1e3;let i=0;for(const a of s){const d=a.startTime?Date.parse(a.startTime):NaN;if(!Number.isFinite(d)||d<u)continue;const v=23-Math.floor((Date.now()-d)/(60*60*1e3));v>=0&&v<24&&(l[v].sessions+=1,i+=1)}return{trend:l,total:i}}function re(s){const n=new Map;for(const i of s){const a=i.platform||i.device_platform||"unknown",d=i.platformVersion||i.version||i.device_version||"",h=a==="ios"?"iOS":a==="tvos"?"tvOS":a.charAt(0).toUpperCase()+a.slice(1),v=d?`${h} ${d}`:h;n.set(v,(n.get(v)??0)+1)}const t=Array.from(n.entries()).sort((i,a)=>a[1]-i[1]);if(t.length<=6)return t.map(([i,a])=>({label:i,count:a}));const l=t.slice(0,5),u=t.slice(5).reduce((i,[,a])=>i+a,0);return[...l.map(([i,a])=>({label:i,count:a})),{label:"Other",count:u}]}function ae(s){return s.deviceName||(s.deviceUdid?s.deviceUdid.slice(0,8):"device")}function I(s){const n=s.commandName||"selector",t=ae(s);return s.tier?e.jsxs(e.Fragment,{children:[e.jsx("strong",{children:s.tier})," healed ",e.jsx("strong",{children:n})," on ",e.jsx("strong",{children:t})]}):e.jsxs(e.Fragment,{children:["Healed ",e.jsx("strong",{children:n})," on ",e.jsx("strong",{children:t})]})}function ie(){const[s,n]=b.useState([]),[t,l]=b.useState([]),[u,i]=b.useState(0),[a,d]=b.useState([]),[h,v]=b.useState(null),{on:c}=z(),w=b.useRef(0);b.useEffect(()=>{let m=!1;return S.getDevices().then(o=>{!m&&Array.isArray(o)&&n(o)}).catch(()=>{}),S.getSessions().then(o=>{!m&&Array.isArray(o)&&l(o)}).catch(()=>{}),S.getPendingSessionsCount().then(o=>{if(m)return;const N=typeof o=="number"?o:typeof(o==null?void 0:o.count)=="number"?o.count:0;i(N)}).catch(()=>{}),S.getRecentHealingEvents().then(o=>{if(m||!o)return;v(typeof o.todayCount=="number"?o.todayCount:0);const N=Array.isArray(o.events)?o.events:[];N.length!==0&&d(y=>{const T=new Set(y.map(g=>g.id));return[...N.filter(g=>!T.has(g.id)).map(g=>({id:g.id,ts:Date.parse(g.createdAt)||Date.now(),kind:"heal",message:I(g)})),...y].sort((g,r)=>r.ts-g.ts).slice(0,F)})}).catch(()=>{}),()=>{m=!0}},[]),b.useEffect(()=>{const m=[],o=(r,x)=>{w.current+=1;const p={id:`${Date.now()}-${w.current}`,ts:Date.now(),kind:r,message:x};d(f=>[p,...f].slice(0,F))},N=r=>{var f;r&&r.session&&l(j=>j.find(C=>C.id===r.session.id)?j:[r.session,...j]);const x=((f=r==null?void 0:r.session)==null?void 0:f.id)||(r==null?void 0:r.sessionId)||"",p=x?x.slice(0,6):"";o("session",e.jsxs(e.Fragment,{children:["Session ",e.jsx("strong",{children:p||"—"})," started"]}))},y=r=>{var j,A;const x=((j=r==null?void 0:r.session)==null?void 0:j.id)||(r==null?void 0:r.sessionId)||"",p=!!((A=r==null?void 0:r.session)!=null&&A.failure_reason||r!=null&&r.failure_reason);x&&l(C=>C.map(E=>E.id===x?{...E,status:p?"failed":"finished"}:E));const f=x?x.slice(0,6):"";o(p?"session-failed":"session-end",p?e.jsxs(e.Fragment,{children:["Session ",e.jsx("strong",{children:f||"—"})," failed"]}):e.jsxs(e.Fragment,{children:["Session ",e.jsx("strong",{children:f||"—"})," ended"]}))},T=r=>{const x=(r==null?void 0:r.nodeId)||(r==null?void 0:r.id)||"node";o("node",e.jsxs(e.Fragment,{children:["Node ",e.jsx("strong",{children:String(x)})," connected"]}))},_=r=>{const x=(r==null?void 0:r.nodeId)||(r==null?void 0:r.id)||"node";o("node",e.jsxs(e.Fragment,{children:["Node ",e.jsx("strong",{children:String(x)})," disconnected"]}))},g=r=>{const x=r;if(!x||!x.id)return;v(f=>f===null?1:f+1),w.current+=1;const p={id:x.id,ts:Date.parse(x.createdAt)||Date.now(),kind:"heal",message:I(x)};d(f=>f.some(j=>j.id===p.id)?f:[p,...f].slice(0,F))};return m.push(c("session_started",N)),m.push(c("session_stopped",y)),m.push(c("node_connected",T)),m.push(c("node_disconnected",_)),m.push(c("healing_event",g)),()=>{m.forEach(r=>r&&r())}},[c]);const $=t.filter(m=>m.status==="running"),D=t.filter(m=>m.failure_reason&&te(m.endTime||m.startTime,24*60*60*1e3)).length,{trend:L,total:q}=b.useMemo(()=>ne(t),[t]),P=b.useMemo(()=>re(s),[s]);return{devices:s,activeSessions:$,queuedSessions:u,healsToday:h,failures24h:D,failuresDelta:null,activity:a,sessionTrend:L,totalSessions24h:q,osBreakdown:P}}const oe={healthy:"bg-[var(--green)]",neutral:"bg-[var(--border-strong)]",warn:"bg-[var(--amber)]",critical:"bg-[var(--red)]"},le={healthy:"bg-[var(--green)]",neutral:"bg-[var(--text-dim)]",warn:"bg-[var(--amber)]",critical:"bg-[var(--red)]"},ce={healthy:"text-[var(--green)]",neutral:"text-[var(--text-muted)]",warn:"text-[var(--amber)]",critical:"text-[var(--red)]"},k=({label:s,value:n,secondaryValue:t,subtitle:l,state:u="neutral"})=>e.jsxs("div",{className:"relative overflow-hidden rounded-lg border border-[var(--border)] bg-[var(--surface)] p-4 hover:border-[var(--border-strong)] transition-colors",children:[e.jsx("span",{className:`absolute left-0 top-0 bottom-0 w-[2px] ${oe[u]}`}),e.jsx("div",{className:"text-[10px] font-mono font-semibold uppercase tracking-widest text-[var(--text-muted)]",children:s}),e.jsxs("div",{className:"mt-3 flex items-baseline gap-2",children:[e.jsx("span",{className:"text-3xl font-semibold text-[var(--text)] tabular-nums",children:n}),t!=null&&e.jsxs("span",{className:"text-sm font-mono text-[var(--text-dim)]",children:["/ ",t]})]}),e.jsxs("div",{className:`mt-3 flex items-center gap-1.5 text-xs ${ce[u]}`,children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${le[u]}`}),e.jsx("span",{children:l})]})]});function H(s){return s.offline?"offline":s.reservedBy?"reserved":s.busy?"busy":"ready"}function de(s){const n=(s.platform||"").toLowerCase();return n==="tvos"?X:/pad|tablet/i.test(s.name||"")?W:n==="ios"||n==="android"?Y:K}const xe={ready:{dot:"bg-[var(--green)]",text:"text-[var(--green)]",label:"READY"},busy:{dot:"bg-[var(--amber)]",text:"text-[var(--amber)]",label:"BUSY"},reserved:{dot:"bg-[var(--blue)]",text:"text-[var(--blue)]",label:"RESERVED"},offline:{dot:"bg-[var(--text-dim)]",text:"text-[var(--text-dim)]",label:"OFFLINE"}};function me(s){return s?s.length<=16?s:`${s.slice(0,8)}…${s.slice(-4)}`:""}const ue=({devices:s,maxRows:n=6})=>{const[t,l]=b.useState("all"),u=U(),i=(t==="all"?s:s.filter(a=>H(a)!=="ready")).slice(0,n);return e.jsxs("section",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface)] flex flex-col",children:[e.jsxs("header",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text)]",children:"Fleet status"}),e.jsxs("span",{className:"text-xs font-mono text-[var(--text-dim)]",children:[s.length," devices"]})]}),e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsxs("div",{className:"flex items-center gap-0.5 bg-[var(--surface-2)] border border-[var(--border)] rounded-md p-0.5",children:[e.jsx("button",{type:"button",onClick:()=>l("all"),className:`px-2 py-1 text-[11px] rounded transition-colors ${t==="all"?"bg-[var(--border-strong)] text-[var(--text)]":"text-[var(--text-dim)] hover:text-[var(--text)]"}`,children:"All"}),e.jsxs("button",{type:"button",onClick:()=>l("issues"),className:`px-2 py-1 text-[11px] rounded transition-colors flex items-center gap-1 ${t==="issues"?"bg-[var(--border-strong)] text-[var(--text)]":"text-[var(--text-dim)] hover:text-[var(--text)]"}`,children:[e.jsx(V,{className:"h-3 w-3"}),"Non-ready"]})]}),e.jsxs("button",{type:"button",onClick:()=>u("/devices"),className:"ml-1 inline-flex items-center gap-1 text-xs text-[var(--text-muted)] hover:text-[var(--text)] transition-colors",children:["View all ",e.jsx(Z,{className:"h-3 w-3"})]})]})]}),e.jsx("div",{className:"divide-y divide-[var(--border)]",children:i.length===0?e.jsx("div",{className:"px-4 py-8 text-center text-xs text-[var(--text-dim)]",children:t==="issues"?"All devices are ready.":"No devices registered."}):i.map(a=>{const d=de(a),h=xe[H(a)];return e.jsxs("button",{type:"button",onClick:()=>a.udid&&u(`/devices/${a.udid}/control/screen`),className:"w-full flex items-center gap-3 px-4 py-2.5 hover:bg-[var(--surface-2)] transition-colors text-left",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full shrink-0 ${h.dot}`}),e.jsx(d,{className:"h-4 w-4 text-[var(--text-dim)] shrink-0"}),e.jsxs("div",{className:"flex-1 min-w-0 flex items-center gap-3",children:[e.jsx("div",{className:"min-w-0 flex-1",children:e.jsx("div",{className:"text-xs text-[var(--text)] truncate",children:a.name||a.udid})}),e.jsxs("div",{className:"hidden md:block text-[11px] font-mono text-[var(--text-dim)] w-24 text-right",children:[(a.platform||"").toUpperCase()," ",a.sdk||""]}),e.jsx("div",{className:"hidden lg:block text-[11px] font-mono text-[var(--text-dim)] w-32 text-right",children:me(a.udid)})]}),e.jsx("span",{className:`font-mono text-[10px] font-semibold tracking-wider w-20 text-right ${h.text}`,children:h.label})]},a.udid||a.name)})})]})},he={session:"bg-[var(--green)]","session-end":"bg-[var(--text-dim)]","session-failed":"bg-[var(--red)]",node:"bg-[var(--blue)]",heal:"bg-[var(--amber)]"};function ve(s){const n=new Date(s);return`${String(n.getHours()).padStart(2,"0")}:${String(n.getMinutes()).padStart(2,"0")}`}const fe=[{tag:"session.start",desc:"when a new session begins"},{tag:"device.heal",desc:"when a device self-recovers"},{tag:"fleet.offline",desc:"when a device drops offline"}],ge=({events:s,live:n=!0})=>e.jsxs("section",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface)] flex flex-col",children:[e.jsx("header",{className:"flex items-center justify-between px-4 py-3 border-b border-[var(--border)]",children:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text)]",children:"Recent activity"}),e.jsxs("span",{className:"flex items-center gap-1 text-[10px] font-mono text-[var(--text-dim)] uppercase tracking-widest",children:[e.jsx("span",{className:`h-1.5 w-1.5 rounded-full ${n?"bg-[var(--green)] pulse-dot":"bg-[var(--text-dim)]"}`}),n?"Live":"Offline"]})]})}),s.length===0?e.jsxs("div",{className:"flex-1 flex flex-col items-center justify-center px-6 py-10 text-center gap-2",children:[e.jsx("div",{className:"h-10 w-10 rounded-full bg-[var(--surface-2)] border border-[var(--border)] flex items-center justify-center",children:e.jsx(Q,{className:"h-5 w-5 text-[var(--text-dim)]"})}),e.jsx("div",{className:"text-sm font-medium text-[var(--text)]",children:"No activity yet"}),e.jsx("div",{className:"text-xs text-[var(--text-dim)] max-w-xs",children:"Start a session to see events stream here in real-time."}),e.jsxs("button",{type:"button",onClick:()=>window.dispatchEvent(new CustomEvent("xenon.open-command-palette")),className:"mt-2 inline-flex items-center gap-1.5 text-xs text-[var(--text)] border border-[var(--border-strong)] hover:border-[var(--green)]/50 hover:text-[var(--green)] rounded-md px-3 py-1.5 transition-colors",children:[e.jsx(se,{className:"h-3 w-3"})," Start a session"]}),e.jsxs("div",{className:"mt-4 w-full max-w-xs text-left",children:[e.jsx("div",{className:"text-[10px] font-mono uppercase tracking-widest text-[var(--text-dim)] mb-2",children:"Event types you'll see"}),e.jsx("div",{className:"space-y-1",children:fe.map(t=>e.jsxs("div",{className:"flex items-baseline gap-2 text-[11px]",children:[e.jsx("span",{className:"font-mono text-[var(--green)]",children:t.tag}),e.jsxs("span",{className:"text-[var(--text-dim)] truncate",children:["— ",t.desc]})]},t.tag))})]})]}):e.jsx("div",{className:"flex-1 overflow-y-auto divide-y divide-[var(--border)]",children:s.map(t=>e.jsxs("div",{className:"flex items-center gap-3 px-4 py-2.5",children:[e.jsx("span",{className:"font-mono text-[10px] text-[var(--text-dim)] w-10 shrink-0",children:ve(t.ts)}),e.jsx("span",{className:`h-1.5 w-1.5 rounded-full shrink-0 ${he[t.kind]}`}),e.jsx("span",{className:"text-xs text-[var(--text-muted)] truncate",children:t.message})]},t.id))})]}),be=({data:s,totalSessions:n,totalHeals:t})=>{var d,h,v;const l=Math.max(1,...s.map(c=>c.sessions)),u=s.length-1,i=Math.floor(s.length/2),a=s.every(c=>c.sessions===0&&c.heals===0);return e.jsxs("section",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface)]",children:[e.jsxs("header",{className:"flex items-start justify-between px-4 py-3 border-b border-[var(--border)]",children:[e.jsxs("div",{children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text)]",children:"Session activity"}),e.jsx("div",{className:"text-xs text-[var(--text-dim)] mt-0.5",children:"Last 24 hours"})]}),e.jsxs("div",{className:"flex items-center gap-4 text-right",children:[e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-mono uppercase tracking-widest text-[var(--text-dim)]",children:"Sessions"}),e.jsx("div",{className:"text-base font-semibold text-[var(--text)] tabular-nums",children:n})]}),e.jsxs("div",{children:[e.jsx("div",{className:"text-[10px] font-mono uppercase tracking-widest text-[var(--text-dim)]",children:"Heals"}),e.jsx("div",{className:"text-base font-semibold text-[var(--green)] tabular-nums",children:t})]})]})]}),e.jsxs("div",{className:"p-4",children:[a?e.jsx("div",{className:"h-32 flex items-center justify-center text-xs text-[var(--text-dim)]",children:"No sessions in the last 24 hours — activity will chart here."}):e.jsx("div",{className:"flex items-end gap-1 h-32",children:s.map((c,w)=>{const $=c.sessions/l*100,D=c.heals/l*100;return e.jsxs("div",{className:"group relative flex-1 h-full flex flex-col justify-end",children:[c.heals>0&&e.jsx("div",{className:"absolute bottom-0 left-0 right-0 rounded-sm bg-[var(--green)]/40",style:{height:`${D}%`},"aria-hidden":!0}),e.jsx("div",{className:"relative w-full rounded-sm bg-[var(--border-strong)] group-hover:bg-[var(--green)] transition-colors",style:{height:`${Math.max($,2)}%`},"aria-label":`${c.hour} — ${c.sessions} sessions, ${c.heals} heals`}),e.jsxs("div",{className:"pointer-events-none absolute -top-12 left-1/2 -translate-x-1/2 whitespace-nowrap rounded-md bg-[var(--surface-2)] border border-[var(--border-strong)] px-2 py-1 text-[10px] opacity-0 group-hover:opacity-100 transition-opacity z-10 shadow-lg",children:[e.jsx("div",{className:"font-mono text-[var(--text-dim)]",children:c.hour}),e.jsxs("div",{className:"text-[var(--text)]",children:[c.sessions," sessions · ",c.heals," heals"]})]})]},w)})}),e.jsxs("div",{className:"flex justify-between mt-2 text-[10px] font-mono text-[var(--text-dim)]",children:[e.jsx("span",{children:(d=s[0])==null?void 0:d.hour}),e.jsx("span",{children:(h=s[i])==null?void 0:h.hour}),e.jsx("span",{children:(v=s[u])==null?void 0:v.hour})]})]})]})};function O(s){const n=s.toLowerCase();return n.startsWith("tvos")?"bg-[var(--green)]":n.startsWith("ios")?"bg-[var(--blue)]":n.startsWith("android")?"bg-[var(--amber)]":n==="other"?"bg-[var(--border-strong)]":"bg-[var(--green-dim)]"}const pe=({rows:s})=>{const n=s.reduce((t,l)=>t+l.count,0);return e.jsxs("section",{className:"rounded-lg border border-[var(--border)] bg-[var(--surface)]",children:[e.jsxs("header",{className:"px-4 py-3 border-b border-[var(--border)]",children:[e.jsx("h2",{className:"text-sm font-semibold text-[var(--text)]",children:"Fleet composition"}),e.jsxs("div",{className:"text-xs text-[var(--text-dim)] mt-0.5",children:["By operating system · ",n," ",n===1?"device":"devices"]})]}),n===0?e.jsx("div",{className:"px-4 py-8 text-center text-xs text-[var(--text-dim)]",children:"No devices to break down."}):e.jsxs("div",{className:"p-4 space-y-3",children:[e.jsx("div",{className:"h-2 w-full rounded-full overflow-hidden flex bg-[var(--surface-2)]",children:s.map(t=>e.jsx("div",{className:`${O(t.label)} h-full`,style:{width:`${t.count/n*100}%`},title:`${t.label}: ${t.count}`},t.label))}),e.jsx("div",{className:"space-y-1.5",children:s.map(t=>e.jsxs("div",{className:"flex items-center justify-between text-xs",children:[e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:`h-2 w-2 rounded-sm ${O(t.label)}`}),e.jsx("span",{className:"font-mono text-[var(--text)]",children:t.label})]}),e.jsxs("div",{className:"flex items-center gap-3 font-mono text-[var(--text-dim)]",children:[e.jsx("span",{className:"tabular-nums",children:t.count}),e.jsxs("span",{className:"tabular-nums w-10 text-right",children:[Math.round(t.count/n*100),"%"]})]})]},t.label))})]})]})},B="—",M="Xenon",$e=()=>{const s=ie(),n=s.devices.length,t=s.devices.filter(v=>!v.offline).length,l=n?Math.round(t/n*100):null,u=n===0?"neutral":t===n?"healthy":"warn",i=s.activeSessions.length>0?"healthy":s.queuedSessions>0?"warn":"neutral",a=s.failures24h>0?"critical":"healthy",d=()=>window.dispatchEvent(new CustomEvent("xenon.open-command-palette")),h=new Date().getFullYear();return e.jsx("div",{className:"flex-1 min-w-0 overflow-y-auto",children:e.jsxs("div",{className:"max-w-7xl mx-auto px-6 py-6",children:[e.jsxs("div",{className:"flex items-start justify-between gap-4 mb-6",children:[e.jsxs("div",{children:[e.jsxs("div",{className:"flex items-center gap-2 text-[10px] font-mono uppercase tracking-widest text-[var(--text-dim)] mb-1.5",children:[e.jsx("span",{children:M}),e.jsx("span",{children:"/"}),e.jsx("span",{className:"text-[var(--text-muted)]",children:"Overview"})]}),e.jsx("h1",{className:"text-2xl font-semibold tracking-tight text-[var(--text)]",children:"Overview"}),e.jsx("p",{className:"text-sm text-[var(--text-muted)] mt-1",children:"Real-time fleet health and session activity."})]}),e.jsxs("button",{type:"button",onClick:d,className:"inline-flex items-center gap-1.5 h-9 px-3.5 rounded-md bg-[var(--green)] hover:bg-[var(--green-dim)] text-black text-sm font-medium transition-colors shadow-sm",children:[e.jsx(G,{className:"h-4 w-4"}),"New session"]})]}),e.jsxs("div",{className:"grid grid-cols-1 sm:grid-cols-2 lg:grid-cols-4 gap-3 mb-6",children:[e.jsx(k,{label:"Devices online",value:n===0?B:t,secondaryValue:n===0?void 0:n,subtitle:n===0?"No devices registered":l===100?"100% fleet uptime":`${l}% fleet uptime`,state:u}),e.jsx(k,{label:"Active sessions",value:s.activeSessions.length,subtitle:s.queuedSessions>0?`${s.queuedSessions} queued`:"No queue",state:i}),e.jsx(k,{label:"Heals today",value:s.healsToday===null?B:s.healsToday,subtitle:s.healsToday===null?"Loading…":s.healsToday===0?"No heals needed":`${s.healsToday} selector${s.healsToday===1?"":"s"} recovered`,state:s.healsToday&&s.healsToday>0?"warn":"neutral"}),e.jsx(k,{label:"Failures (24h)",value:s.failures24h,subtitle:s.failures24h===0?"No failures":`${s.failures24h} session${s.failures24h===1?"":"s"} failed`,state:a})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-2 gap-3 mb-3",children:[e.jsx(ue,{devices:s.devices}),e.jsx(ge,{events:s.activity,live:!0})]}),e.jsxs("div",{className:"grid grid-cols-1 lg:grid-cols-3 gap-3",children:[e.jsx("div",{className:"lg:col-span-2",children:e.jsx(be,{data:s.sessionTrend,totalSessions:s.totalSessions24h,totalHeals:s.healsToday??0})}),e.jsx(pe,{rows:s.osBreakdown})]}),e.jsxs("footer",{className:"mt-12 pt-6 pb-8 border-t border-[var(--border)] flex flex-col sm:flex-row items-center justify-between gap-4 text-xs text-[var(--text-dim)]",children:[e.jsxs("div",{className:"flex items-center gap-3",children:[e.jsxs("span",{className:"font-medium text-[var(--text)]",children:[M," Device Ops"]}),e.jsx("span",{className:"hidden sm:inline-block h-3 w-px bg-[var(--border)]"}),e.jsx("span",{className:"hidden sm:inline-block",children:"Intelligent Fleet Management"})]}),e.jsxs("div",{className:"flex items-center gap-6",children:[e.jsxs("div",{className:"flex items-center gap-1.5",children:[e.jsxs("span",{className:"relative flex h-2 w-2",children:[e.jsx("span",{className:"animate-ping absolute inline-flex h-full w-full rounded-full bg-[var(--green)] opacity-75"}),e.jsx("span",{className:"relative inline-flex rounded-full h-2 w-2 bg-[var(--green)]"})]}),e.jsx("span",{children:"Systems operational"})]}),e.jsxs("span",{className:"font-mono",children:["© ",h," ",M]})]})]})]})})};export{$e as default};
@@ -1 +0,0 @@
1
- .selector-health-page{display:flex;flex-direction:column;width:100%;min-height:100%;color:var(--text);background:var(--bg)}.sh-content{display:flex;flex-direction:column;gap:var(--space-5);padding:var(--space-5) var(--space-6);max-width:1440px;margin:0 auto;width:100%}.sh-kpi-strip{display:grid;grid-template-columns:1fr;gap:12px}@media (min-width: 768px){.sh-kpi-strip{grid-template-columns:repeat(2,minmax(0,1fr))}.sh-kpi--hero{grid-column:1 / -1}}@media (min-width: 1280px){.sh-kpi-strip{grid-template-columns:2fr repeat(5,minmax(0,1fr))}.sh-kpi--hero{grid-column:auto}}.sh-kpi{display:flex;flex-direction:column;gap:4px;padding:14px 16px;border-radius:var(--radius-md);background:var(--surface);border:1px solid var(--border-strong);transition:border-color .15s ease,background .15s ease}.sh-kpi:hover{border-color:var(--text-dim)}.sh-kpi--hero{background:var(--surface-2);border-color:var(--border-strong);padding:20px 22px;gap:6px}.sh-kpi--hero .sh-kpi__label{font-size:11px;color:var(--text)}.sh-kpi--hero .sh-kpi__value{font-size:2.75rem;line-height:1.05}.sh-kpi--hero .sh-kpi__foot{font-size:12px;margin-top:4px}.sh-kpi__info{display:inline-flex;align-items:center;margin-left:6px;color:var(--text-dim);cursor:help;vertical-align:middle}.sh-kpi__info:hover{color:var(--text)}.sh-kpi--warn{border-color:#f59e0b4d}.sh-kpi--critical{border-color:#ef444459}.sh-kpi__label{font-family:JetBrains Mono,monospace;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.1em;color:var(--text-dim)}.sh-kpi__value{font-size:1.75rem;font-weight:700;line-height:1.1;color:var(--text);font-family:Outfit,sans-serif}.sh-kpi__foot{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:11px;color:var(--text-muted);margin-top:2px}.sh-kpi__sub{color:var(--text-dim)}.sh-kpi__delta--with-icon{display:inline-flex;align-items:center;gap:4px}.sh-delta{display:inline-flex;align-items:center;gap:3px;padding:1px 6px;border-radius:4px;font-size:10px;font-weight:600;border:1px solid transparent}.sh-delta.good{background:#10b9811a;border-color:#10b9814d;color:var(--green)}.sh-delta.bad{background:#ef44441a;border-color:#ef44444d;color:var(--red, #ef4444)}.sh-delta.neutral{background:#ffffff0a;border-color:var(--border);color:var(--text-dim)}.sh-filter-bar{display:flex;flex-wrap:wrap;align-items:center;gap:14px 18px;padding:10px 14px;border-radius:var(--radius-md);background:var(--surface);border:1px solid var(--border-strong);position:sticky;top:0;z-index:5;-webkit-backdrop-filter:blur(6px);backdrop-filter:blur(6px);background-color:color-mix(in srgb,var(--surface) 92%,transparent)}.sh-filter-bar__lead{font-family:JetBrains Mono,monospace;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text-muted);margin-right:6px}.sh-filter-bar__group{display:flex;align-items:center;gap:8px}.sh-filter-bar__label{font-family:JetBrains Mono,monospace;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text-dim)}.sh-select{background:var(--bg);border:1px solid var(--border);border-radius:var(--radius-sm);color:var(--text);font-family:JetBrains Mono,monospace;font-size:11.5px;padding:4px 26px 4px 10px;-webkit-appearance:none;-moz-appearance:none;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 8px center;cursor:pointer;transition:border-color .15s ease}.sh-select:hover{border-color:var(--border-strong)}.sh-select:focus{outline:none;border-color:var(--green)}.sh-filter-bar__clear{display:inline-flex;align-items:center;gap:4px;background:transparent;border:1px dashed var(--border-strong);color:var(--text-dim);font-size:11px;padding:4px 10px;border-radius:var(--radius-sm);cursor:pointer;transition:all .15s ease}.sh-filter-bar__clear:hover{color:var(--text);border-color:var(--text-dim)}.sh-refresh-btn,.sh-back-btn{display:inline-flex;align-items:center;gap:6px;padding:6px 12px;border-radius:var(--radius-sm);font-size:12px;font-weight:500;background:var(--surface);border:1px solid var(--border-strong);color:var(--text);cursor:pointer;transition:all .15s ease}.sh-refresh-btn:hover,.sh-back-btn:hover{background:var(--surface-2);border-color:var(--green);color:var(--green)}.sh-refresh-btn:disabled{opacity:.6;cursor:not-allowed}.sh-ghost-btn{display:inline-flex;align-items:center;justify-content:center;width:32px;height:32px;background:transparent;border:1px solid var(--border-strong);color:var(--text-muted);border-radius:var(--radius-sm);cursor:pointer;transition:color .15s ease,border-color .15s ease,background .15s ease}.sh-ghost-btn:hover:not(:disabled){color:var(--text);border-color:var(--text-dim);background:var(--surface-2)}.sh-ghost-btn:disabled{opacity:.5;cursor:not-allowed}.sh-empty{display:flex;align-items:center;justify-content:center;gap:10px;padding:32px 24px;color:var(--text-dim);font-size:12px;border-radius:var(--radius-md);background:var(--surface);border:1px dashed var(--border)}.sh-empty-actions{display:inline-flex;gap:8px;flex-wrap:wrap;justify-content:center}.sh-ghost-btn--inline{width:auto;height:auto;padding:6px 10px;gap:6px;font-size:12px;text-decoration:none}.sh-empty--clean{flex-direction:row;gap:14px;text-align:left;color:var(--text)}.sh-empty__title{font-size:13px;font-weight:600;color:var(--text)}.sh-empty__subtitle{font-size:11.5px;color:var(--text-muted);margin-top:2px}.sh-table{display:flex;flex-direction:column;border-radius:var(--radius-md);background:var(--surface);border:1px solid var(--border);overflow:hidden}.sh-table__head,.sh-table__row{display:grid;grid-template-columns:36px minmax(220px,2fr) 70px 80px 100px 80px 90px minmax(220px,2fr) 70px;gap:12px;align-items:center;padding:10px 14px}.sh-table__head{background:var(--surface-2);border-bottom:1px solid var(--border)}.sh-th{font-family:JetBrains Mono,monospace;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text-dim)}.sh-th--rank,.sh-th--count{text-align:center}.sh-th--meta{text-align:left}.sh-table__row{border-bottom:1px solid var(--border);cursor:pointer;transition:background .15s ease}.sh-table__row:last-child{border-bottom:none}.sh-table__row:hover{background:var(--surface-2)}.sh-table__row:focus-visible{outline:2px solid var(--green);outline-offset:-2px}.sh-td{font-size:12px;color:var(--text);min-width:0}.sh-td--rank{text-align:center;font-family:JetBrains Mono,monospace;color:var(--text-dim);font-weight:700}.sh-td--selector code,.sh-td--rewrite code{font-family:JetBrains Mono,monospace;font-size:11.5px;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--text)}.sh-td--count{text-align:center}.sh-td--meta{font-size:11.5px;color:var(--text-muted);font-family:JetBrains Mono,monospace}.sh-td--rewrite{display:flex;align-items:center;gap:6px;min-width:0}.sh-td--actions{display:flex;gap:4px;justify-content:flex-end}.sh-rewrite-share{font-size:9.5px;font-weight:700;color:var(--green);background:#10b9811f;padding:1px 5px;border-radius:3px;white-space:nowrap;flex-shrink:0}.sh-rewrite-value{flex:1;min-width:0}.sh-rewrite-empty{color:var(--text-dim);font-family:JetBrains Mono,monospace;font-size:11px}.sh-count-badge{display:inline-flex;align-items:center;gap:3px;padding:2px 8px;border-radius:10px;font-size:11px;font-weight:700;border:1px solid transparent}.sh-count-badge.severe{background:#ef44441f;border-color:#ef444466;color:var(--red, #ef4444)}.sh-count-badge.warn{background:#f59e0b1f;border-color:#f59e0b66;color:var(--amber, #f59e0b)}.sh-count-badge.mild{background:#ffffff0a;border-color:var(--border);color:var(--text-muted)}.sh-tier-pill{display:inline-block;padding:1px 8px;border-radius:10px;font-size:10px;font-weight:600;letter-spacing:.04em;background:#10b9810f;border:1px solid rgba(16,185,129,.25);color:var(--green);white-space:nowrap}.sh-platform-pill,.sh-build-pill{display:inline-block;padding:1px 8px;border-radius:10px;font-size:10px;font-weight:600;background:var(--surface-2);border:1px solid var(--border);color:var(--text-muted);font-family:JetBrains Mono,monospace}.sh-icon-btn{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:4px;background:transparent;border:1px solid var(--border);color:var(--text-dim);cursor:pointer;transition:all .15s ease}.sh-icon-btn:hover{background:var(--surface-2);color:var(--text);border-color:var(--border-strong)}.sh-icon-btn.copied{background:var(--green);border-color:var(--green);color:#000}.sh-detail-title code{font-family:JetBrains Mono,monospace;font-size:.95rem;color:var(--text);display:inline-block;max-width:60ch;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;vertical-align:bottom}.sh-detail-stats{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}@media (min-width: 768px){.sh-detail-stats{grid-template-columns:repeat(4,minmax(0,1fr))}}.sh-detail-stat{display:flex;flex-direction:column;gap:2px;padding:12px 14px;border-radius:var(--radius-md);background:var(--surface);border:1px solid var(--border)}.sh-detail-stat__label{font-family:JetBrains Mono,monospace;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.1em;color:var(--text-dim)}.sh-detail-stat__value{font-size:1.4rem;font-weight:700;color:var(--text);font-family:Outfit,sans-serif}.sh-detail-grid{display:grid;grid-template-columns:1fr;gap:14px}@media (min-width: 1024px){.sh-detail-grid{grid-template-columns:1.4fr 1fr}}.sh-card{border-radius:var(--radius-md);background:var(--surface);border:1px solid var(--border);overflow:hidden}.sh-card__head{display:flex;align-items:center;gap:6px;padding:10px 14px;border-bottom:1px solid var(--border);background:var(--surface-2);font-family:JetBrains Mono,monospace;font-size:10px;font-weight:700;text-transform:uppercase;letter-spacing:.1em;color:var(--text)}.sh-card__hint{margin-left:auto;font-weight:500;letter-spacing:.04em;text-transform:none;color:var(--text-dim);font-size:10.5px}.sh-alternates{list-style:none;margin:0;padding:8px;display:flex;flex-direction:column;gap:6px}.sh-alternates__empty{padding:12px;font-size:11.5px;color:var(--text-dim)}.sh-alternate{display:flex;flex-direction:column;gap:4px;padding:10px;border-radius:var(--radius-sm);background:#00000040;border:1px solid var(--border)}.sh-alternate__top{display:flex;align-items:center;gap:8px;min-width:0}.sh-alternate__share{font-family:JetBrains Mono,monospace;font-size:11px;font-weight:700;color:var(--green);background:#10b9811a;padding:1px 6px;border-radius:4px;flex-shrink:0}.sh-alternate__value{flex:1;min-width:0;font-family:JetBrains Mono,monospace;font-size:11.5px;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sh-alternate__meta{display:flex;flex-wrap:wrap;gap:4px 6px;font-size:10.5px;color:var(--text-dim);font-family:JetBrains Mono,monospace}.sh-breakdown{display:flex;flex-direction:column;gap:12px;padding:14px}.sh-breakdown__group{display:flex;flex-direction:column;gap:4px}.sh-breakdown__label{font-family:JetBrains Mono,monospace;font-size:10px;font-weight:600;text-transform:uppercase;letter-spacing:.1em;color:var(--text-dim);margin-bottom:4px}.sh-breakdown__row{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:4px 0}.sh-breakdown__count{font-family:JetBrains Mono,monospace;font-size:11.5px;color:var(--text-muted)}.sh-breakdown__empty{font-size:11px;color:var(--text-dim)}.sh-timeline{display:flex;flex-direction:column;padding:4px 8px}.sh-timeline__row{display:grid;grid-template-columns:70px auto 110px 130px minmax(180px,1fr) 50px 22px;gap:10px;align-items:center;padding:8px 6px;border-bottom:1px solid var(--border);font-size:11.5px}.sh-timeline__row:last-child{border-bottom:none}.sh-timeline__when{font-family:JetBrains Mono,monospace;font-size:10.5px;color:var(--text-dim)}.sh-timeline__cmd,.sh-timeline__device{font-family:JetBrains Mono,monospace;color:var(--text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sh-timeline__healed{font-family:JetBrains Mono,monospace;color:var(--text);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sh-timeline__conf{font-family:JetBrains Mono,monospace;color:var(--green);font-size:11px;text-align:right}.sh-timeline__link{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:4px;background:transparent;border:1px solid var(--border);color:var(--text-dim);text-decoration:none;transition:all .15s ease}.sh-timeline__link:hover{color:var(--green);border-color:var(--green)}@media (max-width: 1024px){.sh-table__head,.sh-table__row{grid-template-columns:28px minmax(180px,1fr) 60px 60px 90px;grid-template-areas:"rank selector selector selector selector" "rank count sessions tier last" "rank rewrite rewrite rewrite actions"}.sh-th--meta:nth-of-type(4),.sh-th--actions{display:none}}.sh-tab-nav{display:flex;gap:var(--space-2);border-bottom:1px solid var(--border);margin:var(--space-4) 0 var(--space-5)}.sh-tab{background:transparent;border:0;padding:var(--space-3) var(--space-4);cursor:pointer;color:var(--text-muted);display:inline-flex;gap:var(--space-2);align-items:center;border-bottom:2px solid transparent;margin-bottom:-1px;font-size:.9rem;transition:color .15s ease,border-color .15s ease}.sh-tab:hover{color:var(--text)}.sh-tab--active{color:var(--text);border-bottom-color:var(--accent, #60a5fa);border-bottom-width:3px}.sh-tab__icon{font-size:.95rem;line-height:1}.sh-tab__count{background:var(--surface);border:1px solid var(--border);border-radius:999px;padding:0 .5rem;font-size:.75rem;min-width:1.5rem;text-align:center}.sh-strategy-badge{display:inline-flex;align-items:center;background:var(--surface);border:1px solid var(--border);color:var(--text-dim);border-radius:4px;padding:.05rem .4rem;font-size:.7rem;font-weight:500;text-transform:none;margin-right:.4rem;white-space:nowrap}.sh-strategy-badge--rewrite{color:var(--text)}.sh-action-btn{background:transparent;border:1px solid var(--border);color:var(--text-dim);border-radius:4px;padding:.25rem .55rem;font-size:.72rem;cursor:pointer;white-space:nowrap;transition:color .12s ease,border-color .12s ease,background .12s ease;margin-right:.3rem}.sh-action-btn:hover{color:var(--text);border-color:var(--text-dim)}.sh-action-btn--primary{color:var(--accent, #60a5fa);border-color:var(--accent, #60a5fa)}.sh-action-btn--primary:hover{background:var(--accent, #60a5fa);color:#fff}.sh-copy-group{display:inline-flex;align-items:stretch;margin-right:.3rem}.sh-copy-btn{display:inline-flex;align-items:center;gap:.25rem;border-top-right-radius:0;border-bottom-right-radius:0;margin-right:0;border-right-width:0}.sh-copy-btn__lang{font-size:.68rem;font-weight:500;letter-spacing:.02em}.sh-copy-btn--copied{color:var(--green, #4ade80);border-color:var(--green, #4ade80)}.sh-copy-chevron{border-top-left-radius:0;border-bottom-left-radius:0;padding:.25rem .35rem;margin-right:0}.sh-copy-modal__hint{color:var(--text-muted);margin:0 0 1rem;font-size:.85rem}.sh-copy-modal__lang-list{list-style:none;padding:0;margin:0 0 1rem}.sh-copy-modal__lang-row{display:flex;align-items:center;gap:.55rem;padding:.4rem 0;cursor:pointer;font-size:.9rem}.sh-copy-modal__preview-label{font-size:.72rem;color:var(--text-muted);margin-bottom:.3rem;text-transform:uppercase;letter-spacing:.05em}.sh-copy-modal__preview{background:var(--bg, #0a0a0a);border:1px solid var(--border);padding:.6rem .8rem;border-radius:4px;font-size:.78rem;overflow-x:auto;margin:0 0 1rem;white-space:pre-wrap;word-break:break-all}.sh-copy-modal__remember{display:flex;gap:.45rem;align-items:center;font-size:.85rem;color:var(--text-dim);cursor:pointer}.sh-pending-list{display:flex;flex-direction:column;gap:var(--space-3)}.sh-table__row--pending{display:block;padding:var(--space-4);cursor:pointer}.sh-pending-row__head{display:flex;align-items:center;gap:var(--space-2)}.sh-pending-row__icon{color:var(--accent, #60a5fa)}.sh-pending-row__selector{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sh-pending-row__meta{font-size:.8rem;color:var(--text-muted);margin:.4rem 0 .6rem}.sh-pending-progress{background:var(--surface);border:1px solid var(--border);border-radius:4px;padding:var(--space-3);margin-bottom:var(--space-3)}.sh-pending-progress__dots{display:flex;gap:.6rem;margin-bottom:.4rem}.sh-pending-progress__dot{width:14px;height:14px;border-radius:999px;border:2px solid var(--accent, #60a5fa);background:transparent}.sh-pending-progress__dot--filled{background:var(--accent, #60a5fa)}.sh-pending-progress__legend{font-size:.85rem;color:var(--text)}.sh-pending-progress__hint{font-size:.75rem;color:var(--text-muted);margin-top:.3rem}.sh-pending-row__actions{display:flex;gap:var(--space-2)}.sh-table__row--resolved{display:block;padding:var(--space-4);cursor:pointer}.sh-resolved-row__head{display:flex;align-items:center;gap:var(--space-2);flex-wrap:wrap}.sh-resolved-row__icon{color:var(--green, #4ade80)}.sh-resolved-row__selector{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sh-resolved-row__regression{display:inline-flex;align-items:center;gap:.25rem;background:#f1c40f1f;color:#f1c40f;padding:.1rem .5rem;border-radius:999px;font-size:.72rem}.sh-resolved-row__meta{font-size:.85rem;color:var(--text);margin:.4rem 0 .2rem}.sh-resolved-row__history{font-size:.78rem;color:var(--text-muted);margin-bottom:var(--space-3)}.sh-resolved-row__actions{display:flex;gap:var(--space-2)}.sh-muted-list{list-style:none;padding:0;margin:0;display:flex;flex-direction:column;gap:var(--space-2)}.sh-muted-list__item{background:var(--surface);border:1px solid var(--border);border-radius:4px;padding:var(--space-3) var(--space-4)}.sh-muted-list__head{display:flex;align-items:center;gap:var(--space-2)}.sh-muted-list__icon{color:var(--text-muted)}.sh-muted-list__selector{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.sh-muted-list__meta{font-size:.78rem;color:var(--text-muted);margin:.4rem 0 .6rem}.sh-muted-list__actions{display:flex;gap:var(--space-2)}.sh-regression-banner{display:flex;align-items:center;gap:var(--space-3);padding:var(--space-3) var(--space-4);background:#e74c3c14;border-left:4px solid #e74c3c;border-radius:4px;margin-bottom:var(--space-4);font-size:.88rem;color:var(--text)}.sh-regression-banner__icon{color:#e74c3c;flex-shrink:0}.sh-regression-banner__action{margin-left:auto;background:transparent;border:1px solid #e74c3c;color:#e74c3c;padding:.2rem .55rem;border-radius:4px;font-size:.76rem;cursor:pointer;white-space:nowrap}.sh-regression-banner__action:hover{background:#e74c3c26}.sh-regression-banner__close{background:transparent;border:0;color:var(--text-muted);cursor:pointer;padding:.15rem;display:inline-flex;align-items:center}.sh-regression-banner__close:hover{color:var(--text)}.sh-detail-strategy-line{display:flex;align-items:center;gap:var(--space-2);margin-bottom:var(--space-3);font-size:.9rem}.sh-detail-banner{background:#60a5fa0f;border-left:3px solid var(--accent, #60a5fa);padding:var(--space-3) var(--space-4);border-radius:4px;margin-bottom:var(--space-3);font-size:.85rem;color:var(--text-dim)}.sh-detail-state{background:var(--surface);border:1px solid var(--border);border-radius:6px;padding:var(--space-4);margin-bottom:var(--space-4)}.sh-detail-state--pending{border-left:4px solid var(--accent, #60a5fa)}.sh-detail-state--resolved{border-left:4px solid var(--green, #4ade80)}.sh-detail-state--muted{border-left:4px solid var(--text-muted);opacity:.85}.sh-detail-state--active{border-left:4px solid #e74c3c}.sh-detail-state__head{display:flex;align-items:center;justify-content:space-between;gap:var(--space-3);flex-wrap:wrap}.sh-detail-state__badge{font-size:1rem;font-weight:500;display:inline-flex;align-items:center;gap:.5rem}.sh-detail-state__actions{display:flex;gap:var(--space-2)}.sh-detail-state__meta{margin-top:var(--space-3);display:flex;gap:var(--space-4);flex-wrap:wrap;font-size:.8rem;color:var(--text-muted)}
@@ -1 +0,0 @@
1
- import{r as n,X as v,j as x}from"./index--TKsSVZp.js";import{u as y}from"./useSocket-COssbQIj.js";import{f as E}from"./time-B8FIgwPE.js";const _=3e3;function L(){const[e,t]=n.useState([]),[r,o]=n.useState([]),[i,u]=n.useState(null),[d,p]=n.useState(""),[b,S]=n.useState(!0),[h,m]=n.useState(null),c=n.useRef(!0),{on:l}=y(),a=n.useCallback(async()=>{try{const[s,f]=await Promise.all([v.getBuilds(),i?v.getSessions({buildId:i,query:d}):Promise.resolve([])]);if(!c.current)return;t(Array.isArray(s)?s:[]),o(Array.isArray(f)?f:[]),m(null)}catch(s){if(!c.current)return;m(s instanceof Error?s.message:String(s))}finally{c.current&&S(!1)}},[i,d]);return n.useEffect(()=>{c.current=!0,a();const s=setInterval(a,_);return()=>{c.current=!1,clearInterval(s)}},[a]),n.useEffect(()=>{const s=()=>a(),f=[l("session_started",s),l("session_stopped",s),l("device_added",s),l("device_removed",s)];return()=>{for(const g of f)g()}},[l,a]),{builds:e,selectedBuildId:i,sessions:r,loading:b,error:h,selectBuild:u,searchQuery:d,setSearchQuery:p,refresh:a}}function T(e){const t={all:e.length,passed:0,failed:0,running:0};for(const r of e)r.status==="ended"||r.status==="passed"?t.passed+=1:r.status==="failed"?t.failed+=1:r.status==="running"&&(t.running+=1);return t}function k(e){var r;const t=(r=e.device_name)==null?void 0:r.trim();return t&&t.length>0?t:"Unknown Device"}function w(e){const t=e.device_platform??"";if(!t)return"—";const r=t.toLowerCase();return r==="ios"?"iOS":r==="tvos"?"tvOS":r.charAt(0).toUpperCase()+r.slice(1)}function B(e){return e.device_version?`v${e.device_version}`:""}function F(e){return E(e)}function N(e){if(!e.startTime)return null;const t=Date.parse(e.startTime);if(!Number.isFinite(t))return null;const r=e.endTime?Date.parse(e.endTime):Date.now();return Number.isFinite(r)?Math.max(0,r-t):null}function C(e){if(e==null||!Number.isFinite(e)||e<0)return"—";const t=e/1e3,r=Math.floor(t/3600),o=Math.floor(t%3600/60),u=(t-r*3600-o*60).toFixed(1);return r>0?`${r}h ${o}m ${u}s`:o>0?`${o}m ${u}s`:`${u}s`}function M(e,t=10,r=4){return e?e.length<=t+r+1?e:`${e.slice(0,t)}…${e.slice(-r)}`:""}const $={ready:"border-[var(--green)]/40 text-[var(--green)]",passed:"border-[var(--green)]/40 text-[var(--green)]",running:"border-[var(--amber)]/40 text-[var(--amber)]",failed:"border-[var(--red)]/40 text-[var(--red)]",offline:"border-[var(--text-dim)]/40 text-[var(--text-dim)]"},R=({label:e,tone:t})=>x.jsx("span",{className:`inline-flex items-center justify-center h-6 px-2.5 rounded border text-[10px] font-mono font-semibold tracking-wider ${$[t]}`,children:e});export{R as S,N as a,T as b,k as d,F as f,C as h,B as o,w as p,M as s,L as u};