PageSourceSearch

https://deliverimates-production.up.railway.app/assets/OpsInbox-8wYih-Gi.js

js deliverimates-production.up.railway.app collected 2026-10-03 12:13:36 UTC 8,180 bytes, 1 lines download raw bytes

1import{u as L,r as d,j as e}from"./index-Db4qfLtJ.js";import{E as u,b as j,A as h}from"./overlays-DOpP7ZKe.js";import{O as V,S as $,P as B,T as G,a as H,b as p,U as m,c as R,d as S,Q as E,N as O,e as W,f as C,g as M}from"./states-Cpb6uvPo.js";import{O as Y}from"./OpsRowDialogs-X-7OwFV2.js";import{b as J}from"./use-ops-console-CokN9iVW.js";import{u as K}from"./use-server-environment-CPUIoBYS.js";import{f,a as F,b as X}from"./format-Dq8rYvSD.js";import"./OpsActionDialog-Bd4IVTRV.js";const k=[{band:"act_now",label:"Act now"},{band:"watch",label:"Watch"},{band:"note",label:"Note"}],A=12;function ie(){const r=L(),q=K(),{data:n,isPending:x,isError:g,error:P,refetch:c,isFetching:T}=J(),[i,y]=d.useState("all"),[D,_]=d.useState(null),[w,I]=d.useState(!1),v=d.useMemo(()=>(n?.rows??[]).filter(s=>i==="all"||s.band===i),[n?.rows,i]);function Q(s){const{action:l}=s;if(l.kind==="open_dsp"&&s.company_id){r(`/admin/ops/dsps/${s.company_id}${l.tab?`?tab=${l.tab}`:""}`);return}if(l.kind==="link"&&l.href){r(l.href);return}l.kind==="dialog"&&l.dialog&&_({name:l.dialog,row:s})}function U(s){if(s.action.kind==="open_dsp"&&s.company_id){r(`/admin/ops/dsps/${s.company_id}${s.action.tab?`?tab=${s.action.tab}`:""}`);return}s.action.kind==="link"&&s.action.href&&r(s.action.href)}const t=n?.totals??null,o=t?.channels??null,N=n?.recently_resolved?n.recently_resolved.rows.slice(0,w?n.recently_resolved.rows.length:A):[];return e.jsxs(e.Fragment,{children:[e.jsx(V,{title:"Inbox",scope:e.jsxs(e.Fragment,{children:["Everything that needs a human, ranked. Every row lands on the DSP it belongs to."," ",n?e.jsxs($,{children:[n.sources.length," sources ·"," ",n.sources.filter(s=>s.ok===!0).length,"/",n.sources.length," responded"," ",f(n.as_of)]}):e.jsx($,{children:"checking sources…"})]})}),g&&!n&&e.jsx(u,{reason:e.jsxs(e.Fragment,{children:["The inbox could not be read —"," ",e.jsx("span",{className:"font-ink-mono text-m2",children:P?.message||"request failed"}),". This is not an all-clear: nothing below has been checked."]}),onRetry:()=>c()}),g&&n&&e.jsx(u,{reason:e.jsxs(e.Fragment,{children:["Showing the board from"," ",e.jsx("span",{className:"font-ink-mono text-m2",children:f(n.as_of)})," — the refresh failed, so anything that changed since is not here."]}),onRetry:()=>c()}),n?.ok===!1&&e.jsx(u,{reason:e.jsxs(e.Fragment,{children:["The tenant list itself could not be read (",e.jsx("span",{className:"font-ink-mono text-m2",children:n.code}),"), so there is no honest queue to rank. An empty inbox and an unreadable one are different answers."]}),onRetry:()=>c()}),n?.ok!==!1&&e.jsx(B,{sources:n?.sources??[],onRetry:()=>c()}),x&&!n?e.jsx(G,{}):e.jsxs(H,{cols:4,children:[e.jsx(p,{label:"Act now",value:t?t.act_now:e.jsx(m,{}),tone:t&&t.act_now>0?"crit":"default",support:t?"ranked first below":"source did not answer"}),e.jsx(p,{label:"Onboarding in flight",value:t?.onboarding?t.onboarding.in_flight:e.jsx(m,{}),support:t?.onboarding?`${t.onboarding.stalled_over_7d} stalled > 7 days · of ${t.onboarding.enrolled} enrolled`:"needs accounts + schedules — one did not answer"}),e.jsx(p,{label:"Channels healthy",value:o?o.ok:e.jsx(m,{}),unit:o?`/ ${o.total}`:void 0,support:o?e.jsxs(e.Fragment,{children:[o.failing," failing · ",o.aging," aging · ",o.unknown," unknown",o.unknown>0&&e.jsxs(e.Fragment,{children:[" ",e.jsxs("span",{className:"font-ink-mono text-m3 uppercase text-faint",children:["(no success in ",o.window_hours,"h ≠ never)"]})]})]}):"schedules did not answer"}),e.jsx(p,{label:"Executor queue",value:t?.queue_now??e.jsx(m,{}),support:t?.queue_now==null?"queue read failed":"pending + retrying now"})]}),e.jsxs(R,{className:"mt-4",children:[e.jsx(S,{title:"Queue",right:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("div",{className:"flex gap-1",children:["all","act_now","watch","note"].map(s=>e.jsx("button",{type:"button",onClick:()=>y(s),"aria-pressed":i===s,className:i===s?"min-h-11 rounded-lg bg-sunk px-2.5 py-1 text-s5 font-semibold text-ink":"min-h-11 rounded-lg px-2.5 py-1 text-s5 font-medium text-subtle hover:text-ink",children:s==="all"?"All":k.find(l=>l.band===s)?.label},s))}),e.jsx("span",{className:"font-ink-mono text-m2 text-subtle",children:t?`showing ${v.length} of ${t.all} · ${t.suppressed>0?`${t.suppressed} below the cap of ${t.cap}`:"none suppressed"}`:"counting…"})]})}),x&&!n?e.jsx(E,{}):n?.ok===!1?null:n?v.length===0?i==="all"?e.jsx(j,{kind:"clear",title:"Nothing needs a human right now",detail
1:n?e.jsxs(e.Fragment,{children:[n.sources.filter(s=>s.ok===!0).length," of ",n.sources.length," ","sources answered at ",f(n.as_of),". Incidents, hosted accounts, the 24-hour queue, dispute deadlines and 7-day usage were all checked."]}):null}):e.jsx(j,{kind:"filtered",title:`Nothing in ${k.find(s=>s.band===i)?.label}`,detail:`${n?.totals?.all??0} rows exist in the other bands.`,action:e.jsx(h,{variant:"default",onClick:()=>y("all"),children:"Show all bands"})}):k.map(({band:s,label:l})=>{const b=v.filter(a=>a.band===s);return b.length===0?null:e.jsxs("div",{children:[e.jsxs(W,{children:[l," · ",b.length]}),b.map((a,z)=>e.jsx(C,{severity:a.severity,who:a.systemic?e.jsx("span",{className:"inline-flex rounded-[5px] bg-info-tint px-1.5 py-px font-ink-mono text-m3 font-medium text-info-deep",children:a.fleet_chip}):a.company_id?e.jsx("button",{type:"button",onClick:()=>r(`/admin/ops/dsps/${a.company_id}`),className:"max-w-full overflow-hidden text-ellipsis whitespace-nowrap text-left hover:underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ink",children:a.company_name??"Unnamed tenant"}):e.jsx("span",{className:"text-subtle",children:"—"}),title:a.title,evidence:a.deadline_at?`${a.evidence} · closes ${X(a.deadline_at)}`:a.evidence,age:a.age_ms==null?"—":F(a.age_ms),action:e.jsx(h,{variant:s==="act_now"&&z===0&&i==="all"?"accent":"default",size:"sm",onClick:()=>Q(a),children:a.action.label})},a.key))]},s)}):e.jsx(O,{}),n&&e.jsx(M,{sources:n.sources,asOf:f(n.as_of),children:T?"refreshing":"evidence lives on each DSP page, one click in"})]}),n?.ok!==!1&&(!g||n)&&e.jsxs(R,{className:"mt-4",children:[e.jsx(S,{title:"Recently cleared",right:e.jsxs("div",{className:"flex items-center gap-2",children:[e.jsx("span",{className:"font-ink-mono text-m2 text-subtle",children:n?.recently_resolved?`showing ${N.length} of ${n.recently_resolved.total}${n.recently_resolved.total>n.recently_resolved.cap?` · capped at ${n.recently_resolved.cap}`:""}${n.recently_resolved.complete?"":" · partial"}`:"checking receipts…"}),n?.recently_resolved&&n.recently_resolved.rows.length>A&&e.jsx(h,{variant:"default",size:"sm",onClick:()=>I(s=>!s),children:w?"Show latest":"Show all"})]})}),x&&!n?e.jsx(E,{}):n?.recently_resolved?!n.recently_resolved.complete&&n.recently_resolved.rows.length===0?e.jsx(u,{reason:"Recovery history is incomplete — at least one receipt source did not answer. This is not an all-clear.",onRetry:()=>c(),retryLabel:"Re-check receipts"}):n.recently_resolved.rows.length===0?e.jsx(j,{kind:"clear",title:"No recent recoveries",detail:"No incident, exhausted retry, or parser quarantine in the checked windows has cleared."}):N.map(s=>e.jsx(C,{severity:"info",who:s.company_id?e.jsx("button",{type:"button",onClick:()=>r(`/admin/ops/dsps/${s.company_id}`),className:"max-w-full overflow-hidden text-ellipsis whitespace-nowrap text-left hover:underline focus-visible:outline focus-visible:outline-2 focus-visible:outline-offset-1 focus-visible:outline-ink",children:s.company_name??"Unnamed tenant"}):e.jsx("span",{className:"font-ink-mono text-m3 font-medium text-info-deep",children:"FLEET"}),title:s.title,evidence:s.evidence,age:s.age_ms==null?"—":`${F(s.age_ms)} ago`,action:e.jsx(h,{variant:"default",size:"sm",onClick:()=>U(s),children:s.action.label})},s.key)):e.jsx(O,{}),n?.recently_resolved&&e.jsx("div",{className:"mt-1.5 border-t border-hairline-soft pt-2.5 font-ink-mono text-m2 text-subtle",children:"Resolved incidents 7d · recovered retries 24h (7d attempt lookback) · parser recoveries 30d"})]}),e.jsx(Y,{dialog:D,onClose:()=>_(null),environment:q})]})}export{ie as default};

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.