PageSourceSearch

https://fantasyhoff.com/assets/Deliverability-D64zo5fE.js

js fantasyhoff.com collected 2026-10-02 01:29:57 UTC 10,495 bytes, 1 lines download raw bytes

1import{j as e,a as b}from"./vendor-react-Ci8XvypC.js";import{u as v,b as f,a as g}from"./vendor-query-BWIl-I-M.js";import{S as N,a as l}from"./SettingsShell-DEprddGX.js";import{b as u,S as k}from"./index-CU3YYEgg.js";import{k as x}from"./index-Hx-p8ka4.js";import{adminTabs as S,StatTile as c,fmtDateTime as h,StatusPill as m}from"./AdminShared-BvRdp25b.js";import{a7 as A}from"./vendor-icons-CfgbQDMF.js";import"./vendor-react-dom-yPwZA2yX.js";import"./vendor-router-DC2shrY2.js";const E={gmail:"Gmail",yahoo:"Yahoo/AOL",apple:"Apple",other:"Other",microsoft:"Microsoft",all:"All"},D={active:"Active",lapsing:"Lapsing",new:"New",dormant:"Dormant",never_opened:"Never opened"};function o(i,t,s=1){return t?`${(i/t*100).toFixed(s)}%`:"—"}const r=i=>i.toLocaleString(),n=i=>E[i]??i,p=["active","lapsing","new","dormant","never_opened"],j=["gmail","yahoo","apple","other","microsoft"];function P(i){return i==="on"?e.jsx(m,{kind:"ok",children:"On"}):i==="shadow"?e.jsx(m,{kind:"warn",children:"Shadow"}):e.jsx(m,{kind:"idle",children:"Off"})}function L(i){return i==="complaint-rate"?"Complaint rate":i==="bounce-rate"?"Bounce rate":i==="open-rate-drop"?"Open rate drop":i}function R(i){const t=new Map;for(const s of i){const d=t.get(s.provider)??{};d[s.tier]=s.addresses,t.set(s.provider,d)}return j.filter(s=>t.has(s)).map(s=>({provider:s,tiers:t.get(s)}))}function T(){const[i,t]=b.useState(""),s=f(),d=g({mutationFn:a=>x.adminDeliverabilityLift(a),onSuccess:()=>void s.invalidateQueries({queryKey:["admin","deliverability"]})}),y=a=>{a.preventDefault(),i.trim()&&d.mutate(i.trim())};return e.jsxs("form",{onSubmit:y,className:"ui-field",children:[e.jsx("label",{htmlFor:"deliverability-lift",children:"Email address"}),e.jsx("input",{id:"deliverability-lift",className:"ui-input ui-input--sm",type:"email",value:i,onChange:a=>t(a.target.value),placeholder:"[email protected]"}),e.jsx("span",{className:"ui-actions",children:e.jsx("button",{className:u({size:"sm"}),type:"submit",disabled:d.isPending,children:"Lift sunset and holds"})}),d.isSuccess&&e.jsx("p",{className:"ui-empty",role:"status",children:d.data.lifted?"Lifted. They get the next issue.":"Nothing was holding that address."}),d.isError&&e.jsx("p",{className:"ui-error",role:"alert",children:"Couldn't lift it. Check the address and try again."})]})}function _(){const i=v({queryKey:["admin","deliverability"],queryFn:x.adminDeliverability,refetchInterval:3e5}),t=i.data;return e.jsx(N,{eyebrow:"Master admin",title:"Deliverability",description:"Newsletter mail by mailbox provider: what landed, who reads it, who is held back and why.",icon:e.jsx(A,{size:18}),tabs:S,children:i.isLoading?e.jsx("p",{className:"ui-empty",children:"Loading deliverability…"}):i.isError||!t?e.jsxs("p",{className:"ui-error",role:"alert",children:["Couldn't load deliverability."," ",e.jsx("button",{className:u({size:"sm"}),onClick:()=>void i.refetch(),children:"Retry"})]}):e.jsxs(e.Fragment,{children:[e.jsx(l,{title:"Status",description:"Tiers, sunset, ramp and Microsoft pacing follow NEWSLETTER_DELIVERABILITY_TIERS. Shadow computes everything and holds nobody.",children:e.jsxs(k,{children:[e.jsx(c,{label:"Tiers, sunset and ramp",value:P(t.mode),sub:t.lastRefreshAt?`Refreshed ${h(t.lastRefreshAt)}`:"Not refreshed yet"}),e.jsx(c,{label:"Last alarm",value:t.lastAlarmAt?h(t.lastAlarmAt):"None",sub:"Checked hourly on the worker"}),e.jsx(c,{label:"Microsoft pause",value:t.microsoftGate.enabled?r(t.microsoftGate.paused):"Off",sub:"Never-openers held by the gate"}),e.jsx(c,{label:"Asked to stay, last 7 days",value:r(t.rePermission.sentLast7Days),sub:`${r(t.rePermission.keptLast7Days)} kept it`})]})}),e.jsxs(l,{title:"By week and mailbox provider",description:"Newsletter emails by Toronto send week. Delayed: the provider deferred the message at least once (Resend retried it). Open and click rates are of delivered mail; bounces of sent mail. Apple opens are inflated by Mail Privacy Protection. A complaint also unsubscribes, so it shows in both columns.",children:[e.jsx("div",{className:"ui-table-scroll",children:e.jsxs("table",{className:"ui-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Week"}),e.jsx("th",{children:"Provider"}),e.jsx("th",{children:"Sent"}),e.jsx("th",{children:"Delivered"}),e.jsx("th",{children:"Delayed"}),e.jsx("th",{children:"Opened"}),e.jsx("th",{children:"Clicked"}),e.jsx("th",{children:"Bounced (perm. / trans. / ?)"}),e.jsx("th",{children:"Complaints"}),e.jsx("th",{children:"Unsubscribes"})]})}),e.jsx("tbody",{children:t.weeks.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:s.weekStart}),e.jsx("td",{children:n(s.provider)}),e.jsx("td",{children:r(s.sent)}),e.jsx("td",{children:r(s.delivered)}),e.jsx("td",{children:r(s.delayed)}),e.jsx("td",{children:o(s.opened,s.delivered)}),e.jsx("td",{children:o(s.clicked,s.delivered)}),e.jsxs("td",{children:[o(s.bouncedPermanent+s.bouncedTransient+s.bouncedUnclassified,s.sent,2)," ",e.jsxs("small",{className:"cell-sub",children:["(",r(s.bouncedPermanent)," / ",r(s.bouncedTransient)," / ",r(s.bouncedUnclassified),")"]})]}),e.jsxs("td",{children:[o(s.complained,s.delivered,2)," ",e.jsxs("small",{className:"cell-sub",children:["(",r(s.complained),")"]})]}),e.jsx("td",{children:r(s.unsubscribed)})]},`${s.weekStart}:${s.provider}`))})]})}),!t.weeks.length&&e.jsx("p",{className:"ui-empty",children:"No newsletter mail in the last 8 weeks."})]}),e.jsxs(l,{title:"Engagement tiers",description:`Addresses with an active newsletter subscription. Active: opened or clicked within the last ${t.policy.activeWithinSendDays} send days. Dormant: ${t.policy.dormantAfterSendDays} or more quiet send days.`,children:[e.jsx("div",{className:"ui-table-scroll",children:e.jsxs("table",{className:"ui-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Provider"}),p.map(s=>e.jsx("th",{children:D[s]},s))]})}),e.jsx("tbody",{children:R(t.tiers).map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:n(s.provider)}),p.map(d=>e.jsx("td",{children:r(s.tiers[d]??0)},d))]},s.provider))})]})}),!t.tiers.length&&e.jsx("p",{className:"ui-empty",children:"Not computed yet. The refresh runs hourly once the flag is shadow or on."})]}),e.jsxs(l,{title:"Held back now",description:"Sunset: asked once, did not answer, newsletter stopped until they open, click, keep or join a league. Ramp: new or cold addresses over this week's growth budget, released when the week ends. Holds only apply when the flag is on.",children:[t.holds.length||t.sunset.length?e.jsx("div",{className:"ui-table-scroll",children:e.jsxs("table",{className:"ui-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Provider"}),e.jsx("th",{children:"Kind"}),e.jsx("th",{children:"Addresses"})]})}),e.jsxs("tbody",{children:[t.holds.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:n(s.provider)}),e.jsx("td",{children:s.hold==="ramp"?"Ramp hold":"Sunset hold"}),e.jsx("td",{children:r(s.addresses)})]},`hold:${s.provider}:${s.hold}`)),t.sunset.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:n(s.provider)}),e.jsx("td",{children:s.state==="notified"?"Asked, waiting":"Sunset"}),e.jsx("td",{children:r(s.addresses)})]},`state:${s.provider}:${s.state}`))]})]})}):e.jsx("p",{className:"ui-empty",children:"Nobody is held back."}),e.jsx(T,{})]}),e.jsxs(l,{title:"Volume ramp",description:"Per provider and week: the most addresses the provider saw in the last three weeks, what this week may reach, and how many new or cold addresses got in. Active and lapsing readers are never capped.",children:[e.jsx("div",{className:"ui-table-scroll",children:e.jsxs("table",{className:"ui-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Week"}),e.jsx("th",{children:"Provider"}),e.jsx("th",{children:"Mode"}),e.jsx("th",{children:"Baseline"}),e.jsx("th",{children:"Allowed"}),e.jsx("th",{children:"Engaged"}),e.jsx("th",{children:"New or cold budget"}),e.jsx("th",{children:"Admitted"}),e.jsx("th",{children:"Held"})]})}),e.jsx("tbody",{children:t.ramp.map(s=>e.jsxs("tr",{children:[e.jsx("td",{children:s.weekStart}),e.jsx("td",{children:n(s.provider)}),e.jsx("td",{children:s.mode}),e.jsx("td",{children:r(s.baseline)}),e.jsx("td",{children:r(s.allowed)}),e.jsx("td",{children:r(s.uncappedExpected)}),e.jsx("td",{children:r(s.cappedBudget)}),e.jsx("td",{children:r(s.cappedAdmitted)}),e.jsx("td",{children:r(s.cappedHeld)})]},`${s.weekStart}:${s.provider}`))})]})}),!t.ramp.length&&e.jsx("p",{className:"ui-empty",children:"No ramp plan yet."})]}),e.jsx(l,{title:"Alarms",description:`Complaints over ${(t.policy.alarms.complaintRate*100).toFixed(1)}% of delivered, bounces over ${(t.policy.alarms.bounceRate*100).toFixed(0)}% of sent, or a provider's open rate down by a quarter and ${(t.policy.alarms.openDropPoints*100).toFixed(0)} points. Each fires once per provider and send week. What to do: docs/OPERATIONS.md section 4.7.`,children:t.alarms.length?e.jsx("ul",{children:t.alarms.map(s=>e.jsxs("li",{children:[h(s.firedAt),": ",L(s.kind)," at ",n(s.provider),","," ",(s.value*100).toFixed(2),"% (limit ",(s.threshold*100).toFixed(2),"%)"]},s.key))}):e.jsx("p",{className:"ui-empty",children:"No alarm has fired."})}),e.jsxs(l,{title:"Policy",description:"The thresholds in server/email/deliverability/policy.ts. Changing one is a code change.",children:[e.jsx("div",{className:"ui-table-scroll",children:e.jsxs("table",{className:"ui-table",children:[e.jsx("thead",{children:e.jsxs("tr",{children:[e.jsx("th",{children:"Provider"}),e.jsx("th",{children:"Sunset after (send days)"}),e.jsx("th",{children:"Weekly growth"}),e.jsx("th",{children:"Weekly floor"}),e.jsx("th",{children:"Per minute"}),e.jsx("th",{children:"Start delay"})]})}),e.jsx("tbody",{children:j.map(s=>{const d=t.policy.providers[s];
1return d?e.jsxs("tr",{children:[e.jsx("td",{children:n(s)}),e.jsx("td",{children:d.sunsetAfterSendDays}),e.jsxs("td",{children:[Math.round(d.rampWeeklyGrowth*100),"%"]}),e.jsx("td",{children:r(d.rampMinimumWeekly)}),e.jsx("td",{children:d.perMinute??"No limit"}),e.jsx("td",{children:d.startDelayHours?`${d.startDelayHours} h`:"None"})]},s):null})})]})}),e.jsxs("p",{className:"ui-empty",children:["Re-permission: one email, then ",t.policy.rePermissionGraceDays," days to answer. At most"," ",t.policy.rePermissionPerRun," an hour and ",t.policy.rePermissionPerDay," a day, never on the newsletter's send day."]})]})]})})}export{_ as AdminDeliverability};

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.