DesignCoder / eval /api_baselines_200 /pages /kimi-k2.6 /dashboard-014-developer-first-minimal.html
xingxm's picture
DesignCoder UI bench 200: 1400 cells, judge=deepseek-v4.1-flash-expires-on-0910
58ca566 verified
Raw History Blame Contribute Delete
44.6 kB
<!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device-width, initial-scale=1.0" /> <title>Mailrail Console — Deliverability</title> <script src="https://registry.npmmirror.com/echarts/5.5.1/files/dist/echarts.min.js"></script> <script src="https://registry.npmmirror.com/chart.js/4.4.7/files/dist/chart.umd.js"></script> <script src="https://registry.npmmirror.com/lucide/0.468.0/files/dist/umd/lucide.min.js"></script> <style> :root { --bg: #0B1020; --bg-elevated: #0F1629; --bg-surface: #141B33; --bg-card: #181F38; --border: #232A42; --border-subtle: #1A2035; --text-primary: #E8ECF4; --text-secondary: #8B93A7; --text-muted: #5A6278; --accent: #2DD4A7; --accent-dim: rgba(45, 212, 167, 0.08); --accent-border: rgba(45, 212, 167, 0.2); --danger: #EF4444; --danger-dim: rgba(239, 68, 68, 0.08); --danger-border: rgba(239, 68, 68, 0.2); --warning: #F59E0B; --warning-dim: rgba(245, 158, 11, 0.08); --success: #10B981; --info: #3B82F6; --info-dim: rgba(59, 130, 246, 0.08); --font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace; --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif; --radius-sm: 6px; --radius-md: 8px; --radius-lg: 10px; } *, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; } html { scrollbar-width: thin; scrollbar-color: #232A42 #0B1020; } body { font-family: var(--font-sans); background: var(--bg); color: var(--text-primary); min-height: 100vh; line-height: 1.45; -webkit-font-smoothing: antialiased; } ::-webkit-scrollbar { width: 8px; height: 8px; } ::-webkit-scrollbar-track { background: var(--bg); } ::-webkit-scrollbar-thumb { background: #232A42; border-radius: 4px; } ::-webkit-scrollbar-thumb:hover { background: #2E3650; } /* Focus ring */ :focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; } /* Layout */ .app { max-width: 1440px; margin: 0 auto; padding: 0 24px 48px; } /* Top bar */ .topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--border-subtle); margin-bottom: 20px; } .topbar-brand { display: flex; align-items: center; gap: 12px; } .topbar-brand .brand-icon { width: 32px; height: 32px; background: linear-gradient(135deg, var(--accent) 0%, #1E9E7E 100%); border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; } .topbar-brand .brand-icon svg { width: 18px; height: 18px; color: var(--bg); } .topbar-brand h1 { font-size: 15px; font-weight: 600; letter-spacing: -0.01em; color: var(--text-primary); } .topbar-brand .brand-sub { font-size: 11px; color: var(--text-muted); font-family: var(--font-mono); letter-spacing: 0.05em; text-transform: uppercase; } .topbar-meta { display: flex; align-items: center; gap: 16px; } .topbar-meta .pulse-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--success); box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); animation: pulse-dot 2.5s ease-in-out infinite; } @keyframes pulse-dot { 0%, 100% { opacity: 1; box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.15); } 50% { opacity: 0.7; box-shadow: 0 0 0 5px rgba(16, 185, 129, 0.08); } } @media (prefers-reduced-motion: reduce) { .pulse-dot { animation: none; } } .topbar-meta .time { font-family: var(--font-mono); font-size: 12px; color: var(--text-muted); } /* Global banner */ .banner { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-radius: var(--radius-md); margin-bottom: 20px; border: 1px solid var(--danger-border); background: var(--danger-dim); } .banner .banner-icon { width: 28px; height: 28px; border-radius: var(--radius-sm); background: var(--danger); display: flex; align-items: center; justify-content: center; flex-shrink: 0; } .banner .banner-icon svg { width: 14px; height: 14px; color: #fff; } .banner .banner-text { flex: 1; font-size: 13px; line-height: 1.5; } .banner .banner-text strong { color: var(--danger); font-weight: 600; } .banner .banner-action { padding: 6px 14px; border-radius: var(--radius-sm); font-size: 12px; font-weight: 600; cursor: pointer; border: 1px solid var(--danger-border); background: var(--danger); color: #fff; font-family: var(--font-sans); transition: opacity 0.15s; white-space: nowrap; } .banner .banner-action:hover { opacity: 0.9; } .banner .banner-action.retrying { opacity: 0.5; cursor: not-allowed; background: var(--danger-dim); color: var(--danger); } /* KPI row */ .kpi-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 20px; } .kpi-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); padding: 16px; transition: border-color 0.2s; } .kpi-card:hover { border-color: #2E3650; } .kpi-card .kpi-label { font-size: 11px; text-transform: uppercase; letter-spacing: 0.06em; color: var(--text-muted); font-weight: 600; margin-bottom: 8px; display: flex; align-items: center; gap: 6px; } .kpi-card .kpi-label svg { width: 12px; height: 12px; color: var(--text-muted); } .kpi-card .kpi-value-row { display: flex; align-items: baseline; gap: 10px; } .kpi-card .kpi-value { font-family: var(--font-mono); font-size: 26px; font-weight: 600; letter-spacing: -0.02em; color: var(--text-primary); line-height: 1; } .kpi-card .kpi-pill { font-family: var(--font-mono); font-size: 11px; font-weight: 600; padding: 2px 8px; border-radius: 4px; line-height: 1; } .kpi-pill.up { background: rgba(16, 185, 129, 0.1); color: var(--success); } .kpi-pill.down { background: rgba(239, 68, 68, 0.1); color: var(--danger); } .kpi-card .kpi-sub { font-size: 11px; color: var(--text-muted); margin-top: 6px; font-family: var(--font-mono); } /* Charts row */ .charts-row { display: grid; grid-template-columns: 1.4fr 1fr; gap: 12px; margin-bottom: 20px; } .chart-card { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; } .chart-card .chart-header { display: flex; align-items: center; justify-content: space-between; padding: 14px 16px 10px; } .chart-card .chart-header h3 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); } .chart-card .chart-header .chart-meta { font-family: var(--font-mono); font-size: 11px; color: var(--text-muted); } .chart-card .chart-body { padding: 0 12px 12px; } .chart-card .chart-area { width: 100%; height: 220px; } /* Time chips */ .chips { display: flex; align-items: center; gap: 2px; padding: 3px; background: var(--bg-surface); border-radius: var(--radius-sm); border: 1px solid var(--border); } .chip { padding: 4px 12px; border-radius: 4px; font-size: 11px; font-weight: 600; font-family: var(--font-mono); color: var(--text-muted); cursor: pointer; border: none; background: transparent; transition: all 0.15s; } .chip:hover { color: var(--text-secondary); } .chip.active { background: var(--bg-card); color: var(--text-primary); box-shadow: 0 1px 2px rgba(0,0,0,0.3); } /* Table section */ .table-section { background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); overflow: hidden; } .table-toolbar { display: flex; align-items: center; justify-content: space-between; padding: 12px 16px; border-bottom: 1px solid var(--border-subtle); gap: 12px; flex-wrap: wrap; } .table-toolbar .toolbar-left { display: flex; align-items: center; gap: 12px; } .table-toolbar .toolbar-left h2 { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.05em; color: var(--text-secondary); white-space: nowrap; } .search-wrap { position: relative; } .search-wrap input { width: 260px; padding: 7px 12px 7px 32px; border: 1px solid var(--border); border-radius: var(--radius-sm); background: var(--bg-surface); color: var(--text-primary); font-family: var(--font-mono); font-size: 12px; transition: border-color 0.2s, box-shadow 0.2s; } .search-wrap input::placeholder { color: var(--text-muted); } .search-wrap input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-dim); } .search-wrap .search-icon { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); color: var(--text-muted); pointer-events: none; } .search-wrap .search-icon svg { width: 13px; height: 13px; } /* Table */ .table-wrap { overflow-x: auto; } table { width: 100%; border-collapse: collapse; font-size: 12px; font-family: var(--font-mono); } thead { position: sticky; top: 0; z-index: 2; } thead tr { background: var(--bg-surface); } th { padding: 10px 16px; text-align: left; font-weight: 600; color: var(--text-muted); font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; border-bottom: 1px solid var(--border); white-space: nowrap; cursor: pointer; user-select: none; transition: color 0.15s; } th:hover { color: var(--text-secondary); } th .th-content { display: flex; align-items: center; gap: 6px; } th .sort-icon { opacity: 0.4; transition: opacity 0.15s; } th:hover .sort-icon { opacity: 0.8; } th .sort-icon svg { width: 10px; height: 10px; } td { padding: 10px 16px; border-bottom: 1px solid var(--border-subtle); color: var(--text-primary); white-space: nowrap; vertical-align: middle; } tbody tr { transition: background 0.15s; cursor: pointer; } tbody tr:hover { background: rgba(45, 212, 167, 0.04); } tbody tr.accent-inset:hover td:first-child { border-left: 2px solid var(--accent); padding-left: 14px; } tbody tr.accent-inset td:first-child { border-left: 2px solid transparent; padding-left: 14px; transition: border-left 0.15s, padding-left 0.15s; } /* Status dot */ .status-dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; } .status-dot.ok { background: var(--success); box-shadow: 0 0 0 2px rgba(16, 185, 129, 0.15); } .status-dot.warn { background: var(--warning); box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.15); } .status-dot.danger { background: var(--danger); box-shadow: 0 0 0 2px rgba(239, 68, 68, 0.15); } /* Auth badges */ .auth-badges { display: flex; gap: 4px; } .auth-badge { font-size: 9px; font-weight: 700; padding: 2px 5px; border-radius: 3px; text-transform: uppercase; letter-spacing: 0.05em; } .auth-badge.pass { background: rgba(16, 185, 129, 0.1); color: var(--success); } .auth-badge.fail { background: rgba(239, 68, 68, 0.1); color: var(--danger); } .auth-badge.warn { background: rgba(245, 158, 11, 0.1); color: var(--warning); } .auth-badge.neutral { background: rgba(90, 98, 120, 0.15); color: var(--text-muted); } /* Identicon */ .identicon { width: 22px; height: 22px; border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; font-size: 10px; font-weight: 700; color: #fff; flex-shrink: 0; } /* Volume bar */ .vol-bar-wrap { width: 80px; height: 4px; background: var(--bg-surface); border-radius: 2px; overflow: hidden; display: inline-block; vertical-align: middle; margin-right: 8px; } .vol-bar { height: 100%; border-radius: 2px; background: linear-gradient(90deg, var(--accent), #1E9E7E); } /* Domain name */ .domain-name { display: flex; align-items: center; gap: 8px; } .domain-name .domain-text { font-weight: 500; color: var(--text-primary); font-family: var(--font-mono); font-size: 12px; } .domain-name .domain-tag { font-size: 9px; padding: 1px 5px; border-radius: 3px; background: var(--bg-surface); color: var(--text-muted); border: 1px solid var(--border-subtle); } /* Retry banner */ .retry-banner { display: none; align-items: center; gap: 12px; padding: 10px 16px; background: var(--info-dim); border-top: 1px solid rgba(59, 130, 246, 0.15); font-size: 12px; font-family: var(--font-mono); color: var(--info); } .retry-banner.show { display: flex; } .retry-banner .spinner { width: 14px; height: 14px; border: 2px solid rgba(59, 130, 246, 0.2); border-top-color: var(--info); border-radius: 50%; animation: spin 0.8s linear infinite; } @keyframes spin { to { transform: rotate(360deg); } } @media (prefers-reduced-motion: reduce) { .retry-banner .spinner { animation: none; border-top-color: rgba(59,130,246,0.4); } } /* Empty state */ .empty-row td { text-align: center; padding: 32px 16px; color: var(--text-muted); font-family: var(--font-sans); font-size: 12px; } /* Detail panel */ .detail-panel { display: none; position: fixed; right: 0; top: 0; width: 420px; height: 100vh; background: var(--bg-card); border-left: 1px solid var(--border); z-index: 100; overflow-y: auto; box-shadow: -8px 0 40px rgba(0,0,0,0.5); } .detail-panel.open { display: block; } .detail-panel-header { padding: 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; } .detail-panel-header h3 { font-size: 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; } .detail-panel-close { background: none; border: none; color: var(--text-muted); cursor: pointer; padding: 4px; border-radius: var(--radius-sm); display: flex; align-items: center; justify-content: center; transition: color 0.15s, background 0.15s; } .detail-panel-close:hover { color: var(--text-primary); background: var(--bg-surface); } .detail-panel-close svg { width: 16px; height: 16px; } .detail-panel-body { padding: 20px; } .detail-section { margin-bottom: 24px; } .detail-section h4 { font-size: 10px; text-transform: uppercase; letter-spacing: 0.08em; color: var(--text-muted); margin-bottom: 12px; font-weight: 600; } .detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; } .detail-item { background: var(--bg-surface); border: 1px solid var(--border-subtle); border-radius: var(--radius-sm); padding: 12px; } .detail-item .detail-label { font-size: 10px; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.05em; margin-bottom: 4px; } .detail-item .detail-value { font-family: var(--font-mono); font-size: 14px; font-weight: 600; color: var(--text-primary); } .detail-item .detail-value.small { font-size: 12px; } .detail-actions { display: flex; gap: 8px; margin-top: 8px; } .detail-btn { flex: 1; padding: 8px 12px; border-radius: var(--radius-sm); font-size: 11px; font-weight: 600; cursor: pointer; border: 1px solid var(--border); background: var(--bg-surface); color: var(--text-primary); font-family: var(--font-sans); transition: all 0.15s; display: flex; align-items: center; justify-content: center; gap: 6px; } .detail-btn:hover { border-color: var(--accent-border); background: var(--accent-dim); color: var(--accent); } .detail-btn.danger { border-color: var(--danger-border); background: var(--danger-dim); color: var(--danger); } .detail-btn.danger:hover { background: var(--danger); color: #fff; } .detail-btn svg { width: 12px; height: 12px; } .overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 99; } .overlay.show { display: block; } @media (max-width: 1100px) { .charts-row { grid-template-columns: 1fr; } .kpi-grid { grid-template-columns: repeat(2, 1fr); } } @media (max-width: 768px) { .kpi-grid { grid-template-columns: 1fr; } .detail-panel { width: 100%; } } </style> </head> <body> <div class="app"> <!-- Top bar --> <div class="topbar"> <div class="topbar-brand"> <div class="brand-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M4 4h16c1.1 0 2 .9 2 2v12c0 1.1-.9 2-2 2H4c-1.1 0-2-.9-2-2V6c0-1.1.9-2 2-2z"/><polyline points="22,6 12,13 2,6"/></svg> </div> <div> <h1>Mailrail Console</h1> <div class="brand-sub">Deliverability Operations</div> </div> </div> <div class="topbar-meta"> <div class="pulse-dot" aria-label="System healthy"></div> <span class="time" id="clock">--:--:-- UTC</span> </div> </div> <!-- Banner --> <div class="banner" role="alert" aria-live="polite"> <div class="banner-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.5" stroke-linecap="round" stroke-linejoin="round"><path d="M10.29 3.86L1.82 18a2 2 0 0 0 1.71 3h16.94a2 2 0 0 0 1.71-3L13.71 3.86a2 2 0 0 0-3.42 0z"/><line x1="12" y1="9" x2="12" y2="13"/><line x1="12" y1="17" x2="12.01" y2="17"/></svg> </div> <div class="banner-text"> <strong>Gmail throttling detected</strong> — Inbox placement for <code>acme-campaigns.com</code> dropped from <strong>94.2%</strong> to <strong>71.8%</strong> over the last hour. Deferred queue has grown to 12.4K messages. </div> <button class="banner-action" id="retryBtn" onclick="triggerRetry()">Retry Now</button> </div> <!-- KPIs --> <div class="kpi-grid"> <div class="kpi-card"> <div class="kpi-label"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><polyline points="20 6 9 17 4 12"/></svg> Delivered % </div> <div class="kpi-value-row"> <span class="kpi-value">94.2%</span> <span class="kpi-pill down">-2.8pp</span> </div> <div class="kpi-sub">vs. 97.0% 24h avg</div> </div> <div class="kpi-card"> <div class="kpi-label"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><line x1="15" y1="9" x2="9" y2="15"/><line x1="9" y1="9" x2="15" y2="15"/></svg> Hard-Bounce % </div> <div class="kpi-value-row"> <span class="kpi-value">0.42%</span> <span class="kpi-pill up">+0.12pp</span> </div> <div class="kpi-sub">vs. 0.30% 24h avg</div> </div> <div class="kpi-card"> <div class="kpi-label"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="M21 15a2 2 0 0 1-2 2H7l-4 4V5a2 2 0 0 1 2-2h14a2 2 0 0 1 2 2z"/></svg> Complaint Rate </div> <div class="kpi-value-row"> <span class="kpi-value">0.08%</span> <span class="kpi-pill up">+0.03pp</span> </div> <div class="kpi-sub">vs. 0.05% 24h avg</div> </div> <div class="kpi-card"> <div class="kpi-label"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg> Queue Latency </div> <div class="kpi-value-row"> <span class="kpi-value">1,240ms</span> <span class="kpi-pill down">+840ms</span> </div> <div class="kpi-sub">vs. 400ms 24h avg</div> </div> </div> <!-- Charts --> <div class="charts-row"> <div class="chart-card"> <div class="chart-header"> <h3>Accepted vs. Deferred</h3> <span class="chart-meta">Threshold: 4,000 msg/min</span> </div> <div class="chart-body"> <div id="tsChart" class="chart-area"></div> </div> </div> <div class="chart-card"> <div class="chart-header"> <h3>Inbox Placement by Provider</h3> <span class="chart-meta">Last 24h</span> </div> <div class="chart-body"> <div class="chart-area" style="height:220px; padding: 0 8px;"> <canvas id="providerChart"></canvas> </div> </div> </div> </div> <!-- Table --> <div class="table-section"> <div class="table-toolbar"> <div class="toolbar-left"> <h2>Sending Domains</h2> <div class="chips" role="tablist" aria-label="Time range"> <button class="chip active" role="tab" aria-selected="true" data-range="1h" onclick="setRange(this)">1h</button> <button class="chip" role="tab" aria-selected="false" data-range="24h" onclick="setRange(this)">24h</button> <button class="chip" role="tab" aria-selected="false" data-range="7d" onclick="setRange(this)">7d</button> </div> </div> <div class="search-wrap"> <span class="search-icon"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="11" cy="11" r="8"/><line x1="21" y1="21" x2="16.65" y2="16.65"/></svg> </span> <input type="text" id="domainSearch" placeholder="/ search domains..." oninput="filterTable()" aria-label="Search domains" /> </div> </div> <div class="table-wrap"> <table id="domainTable" aria-label="Sending domains"> <thead> <tr> <th onclick="sortTable(0)"><span class="th-content">Domain <span class="sort-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m7 15 5 5 5-5M7 9l5-5 5 5"/></svg></span></span></th> <th>SPF</th> <th>DKIM</th> <th>DMARC</th> <th onclick="sortTable(4)"><span class="th-content">Volume <span class="sort-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m7 15 5 5 5-5M7 9l5-5 5 5"/></svg></span></span></th> <th onclick="sortTable(5)"><span class="th-content">Bounce % <span class="sort-icon"><svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><path d="m7 15 5 5 5-5M7 9l5-5 5 5"/></svg></span></span></th> <th>Owner</th> <th>Status</th> </tr> </thead> <tbody id="domainTableBody"> <!-- Populated by JS --> </tbody> </table> </div> <div class="retry-banner" id="retryBanner"> <div class="spinner"></div> <span>Retrying deferred queue for <strong>acme-campaigns.com</strong> — 8,421 / 12,400 messages resubmitted</span> </div> </div> </div> <!-- Detail Panel --> <div class="overlay" id="overlay" onclick="closePanel()"></div> <div class="detail-panel" id="detailPanel"> <div class="detail-panel-header"> <h3><span class="status-dot ok" id="panelStatusDot"></span> <span id="panelDomain">Domain</span></h3> <button class="detail-panel-close" onclick="closePanel()" aria-label="Close panel"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><line x1="18" y1="6" x2="6" y2="18"/><line x1="6" y1="6" x2="18" y2="18"/></svg> </button> </div> <div class="detail-panel-body"> <div class="detail-section"> <h4>Authentication</h4> <div class="detail-grid"> <div class="detail-item"> <div class="detail-label">SPF Record</div> <div class="detail-value small" id="panelSpf">v=spf1 include:_spf.google.com ~all</div> </div> <div class="detail-item"> <div class="detail-label">DKIM Selector</div> <div class="detail-value small" id="panelDkim">mailrail._domainkey</div> </div> <div class="detail-item"> <div class="detail-label">DMARC Policy</div> <div class="detail-value small" id="panelDmarc">quarantine (pct=100)</div> </div> <div class="detail-item"> <div class="detail-label">TLS Version</div> <div class="detail-value small">TLS 1.3</div> </div> </div> </div> <div class="detail-section"> <h4>Performance (1h)</h4> <div class="detail-grid"> <div class="detail-item"> <div class="detail-label">Delivered</div> <div class="detail-value" id="panelDelivered">94.2%</div> </div> <div class="detail-item"> <div class="detail-label">Deferred</div> <div class="detail-value" id="panelDeferred">3.1%</div> </div> <div class="detail-item"> <div class="detail-label">Bounced</div> <div class="detail-value" id="panelBounced">0.42%</div> </div> <div class="detail-item"> <div class="detail-label">Avg Latency</div> <div class="detail-value" id="panelLatency">1,240ms</div> </div> </div> </div> <div class="detail-section"> <h4>Provider Breakdown</h4> <div id="panelProviderChart" style="height: 160px;"></div> </div> <div class="detail-section"> <h4>Actions</h4> <div class="detail-actions"> <button class="detail-btn" onclick="closePanel()"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><circle cx="12" cy="12" r="10"/><polyline points="12 6 12 12 16 14"/></svg> View Logs </button> <button class="detail-btn danger" onclick="closePanel()"> <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"><rect x="3" y="11" width="18" height="11" rx="2" ry="2"/><path d="M7 11V7a5 5 0 0 1 10 0v4"/></svg> Throttle Sender </button> </div> </div> </div> </div> <script> // Clock function updateClock() { const now = new Date(); document.getElementById('clock').textContent = now.toISOString().slice(11, 19) + ' UTC'; } updateClock(); setInterval(updateClock, 1000); // Domain data const domains = [ { name: 'acme-campaigns.com', spf: 'pass', dkim: 'pass', dmarc: 'pass', volume: 284000, bounce: 0.42, owner: 'AC', ownerColor: '#2DD4A7', status: 'danger', tag: 'throttled', delivered: 71.8, deferred: 23.4, latency: 1240 }, { name: 'newsletter.brand.io', spf: 'pass', dkim: 'pass', dmarc: 'pass', volume: 156000, bounce: 0.18, owner: 'BR', ownerColor: '#3B82F6', status: 'ok', tag: '', delivered: 97.1, deferred: 1.2, latency: 320 }, { name: 'mail.supportdesk.app', spf: 'pass', dkim: 'warn', dmarc: 'pass', volume: 89200, bounce: 0.31, owner: 'SD', ownerColor: '#F59E0B', status: 'warn', tag: '', delivered: 94.5, deferred: 3.8, latency: 580 }, { name: 'transaction.payments.co', spf: 'pass', dkim: 'pass', dmarc: 'pass', volume: 412000, bounce: 0.09, owner: 'PY', ownerColor: '#10B981', status: 'ok', tag: '', delivered: 99.2, deferred: 0.4, latency: 180 }, { name: 'marketing.retail.biz', spf: 'fail', dkim: 'pass', dmarc: 'warn', volume: 67000, bounce: 1.24, owner: 'RT', ownerColor: '#EF4444', status: 'danger', tag: 'review', delivered: 82.3, deferred: 11.7, latency: 2100 }, { name: 'alerts.monitoring.dev', spf: 'pass', dkim: 'pass', dmarc: 'pass', volume: 234000, bounce: 0.05, owner: 'MN', ownerColor: '#8B5CF6', status: 'ok', tag: '', delivered: 98.9, deferred: 0.6, latency: 150 }, { name: 'digest.weekly.co', spf: 'pass', dkim: 'pass', dmarc: 'pass', volume: 45600, bounce: 0.22, owner: 'WK', ownerColor: '#EC4899', status: 'ok', tag: '', delivered: 96.8, deferred: 1.9, latency: 410 }, { name: 'receipts.ecommerce.io', spf: 'pass', dkim: 'pass', dmarc: 'pass', volume: 189000, bounce: 0.07, owner: 'EC', ownerColor: '#06B6D4', status: 'ok', tag: '', delivered: 99.1, deferred: 0.3, latency: 120 }, { name: 'notify.sassapp.com', spf: 'warn', dkim: 'pass', dmarc: 'pass', volume: 123000, bounce: 0.45, owner: 'SA', ownerColor: '#F97316', status: 'warn', tag: '', delivered: 93.2, deferred: 4.5, latency: 670 }, { name: 'updates.startup.xyz', spf: 'pass', dkim: 'fail', dmarc: 'pass', volume: 34000, bounce: 0.89, owner: 'ST', ownerColor: '#6366F1', status: 'danger', tag: 'review', delivered: 85.6, deferred: 9.2, latency: 1450 }, { name: 'billing.invoices.co', spf: 'pass', dkim: 'pass', dmarc: 'pass', volume: 267000, bounce: 0.04, owner: 'BI', ownerColor: '#14B8A6', status: 'ok', tag: '', delivered: 99.4, deferred: 0.2, latency: 95 }, { name: 'verify.auth.system', spf: 'pass', dkim: 'pass', dmarc: 'pass', volume: 198000, bounce: 0.06, owner: 'AU', ownerColor: '#A855F7', status: 'ok', tag: '', delivered: 98.7, deferred: 0.5, latency: 110 }, ]; const maxVol = Math.max(...domains.map(d => d.volume)); function getAuthBadge(status) { const cls = status === 'pass' ? 'pass' : status === 'fail' ? 'fail' : 'warn'; const text = status === 'pass' ? 'PASS' : status === 'fail' ? 'FAIL' : 'WARN'; return `<span class="auth-badge ${cls}">${text}</span>`; } function getStatusDot(status) { return `<span class="status-dot ${status}" aria-label="${status}"></span>`; } function getVolBar(vol) { const pct = (vol / maxVol * 100).toFixed(1); return `<span class="vol-bar-wrap"><span class="vol-bar" style="width:${pct}%"></span></span>`; } function renderTable(data) { const tbody = document.getElementById('domainTableBody'); if (data.length === 0) { tbody.innerHTML = `<tr class="empty-row"><td colspan="8">No domains match your search</td></tr>`; return; } tbody.innerHTML = data.map((d, i) => ` <tr class="accent-inset" onclick="openPanel(${i})" tabindex="0" onkeydown="if(event.key==='Enter')openPanel(${i})"> <td> <div class="domain-name"> <span class="identicon" style="background:${d.ownerColor}20;color:${d.ownerColor}">${d.owner}</span> <span class="domain-text">${d.name}</span> ${d.tag ? `<span class="domain-tag">${d.tag}</span>` : ''} </div> </td> <td>${getAuthBadge(d.spf)}</td> <td>${getAuthBadge(d.dkim)}</td> <td>${getAuthBadge(d.dmarc)}</td> <td>${getVolBar(d.volume)}${d.volume.toLocaleString()}</td> <td>${d.bounce.toFixed(2)}%</td> <td><span class="identicon" style="background:${d.ownerColor}">${d.owner}</span></td> <td>${getStatusDot(d.status)}</td> </tr> `).join(''); } renderTable(domains); // Search function filterTable() { const q = document.getElementById('domainSearch').value.toLowerCase(); const filtered = domains.filter(d => d.name.toLowerCase().includes(q)); renderTable(filtered); } // Sort let sortDir = {}; function sortTable(col) { const keys = ['name', null, null, null, 'volume', 'bounce']; const key = keys[col]; if (!key) return; sortDir[key] = !sortDir[key]; domains.sort((a, b) => sortDir[key] ? b[key] - a[key] : a[key] - b[key]); filterTable(); } // Range chips function setRange(btn) { document.querySelectorAll('.chip').forEach(c => { c.classList.remove('active'); c.setAttribute('aria-selected', 'false'); }); btn.classList.add('active'); btn.setAttribute('aria-selected', 'true'); // Simulate data refresh domains.forEach(d => { const factor = btn.dataset.range === '1h' ? 1 : btn.dataset.range === '24h' ? 1.15 : 1.4; d.volume = Math.round(d.volume * factor); }); filterTable(); } // Retry banner function triggerRetry() { const btn = document.getElementById('retryBtn'); const banner = document.getElementById('retryBanner'); btn.classList.add('retrying'); btn.textContent = 'Retrying...'; banner.classList.add('show'); setTimeout(() => { btn.classList.remove('retrying'); btn.textContent = 'Retry Now'; banner.classList.remove('show'); }, 5000); } // Detail panel let panelChart = null; function openPanel(index) { const d = domains[index]; document.getElementById('panelDomain').textContent = d.name; document.getElementById('panelStatusDot').className = `status-dot ${d.status}`; document.getElementById('panelSpf').textContent = d.spf === 'pass' ? 'v=spf1 include:_spf.google.com ~all' : d.spf === 'fail' ? 'No SPF record found' : 'Softfail (~all)'; document.getElementById('panelDkim').textContent = d.dkim === 'pass' ? 'mailrail._domainkey' : d.dkim === 'fail' ? 'Signature mismatch' : 'Key rotation pending'; document.getElementById('panelDmarc').textContent = d.dmarc === 'pass' ? 'quarantine (pct=100)' : d.dmarc === 'fail' ? 'No DMARC record' : 'p=none'; document.getElementById('panelDelivered').textContent = d.delivered + '%'; document.getElementById('panelDeferred').textContent = d.deferred + '%'; document.getElementById('panelBounced').textContent = d.bounce.toFixed(2) + '%'; document.getElementById('panelLatency').textContent = d.latency.toLocaleString() + 'ms'; document.getElementById('detailPanel').classList.add('open'); document.getElementById('overlay').classList.add('show'); // Provider mini chart if (panelChart) panelChart.dispose(); panelChart = echarts.init(document.getElementById('panelProviderChart')); panelChart.setOption({ backgroundColor: 'transparent', tooltip: { trigger: 'axis', backgroundColor: '#181F38', borderColor: '#232A42', textStyle: { color: '#E8ECF4', fontSize: 11, fontFamily: 'ui-monospace, SFMono-Regular, monospace' } }, grid: { left: 8, right: 8, top: 8, bottom: 20 }, xAxis: { type: 'category', data: ['Gmail', 'Outlook', 'Yahoo', 'Apple'], axisLine: { lineStyle: { color: '#232A42' } }, axisLabel: { color: '#5A6278', fontSize: 10, fontFamily: 'ui-monospace, SFMono-Regular, monospace' } }, yAxis: { type: 'value', max: 100, axisLine: { show: false }, splitLine: { lineStyle: { color: '#1A2035' } }, axisLabel: { color: '#5A6278', fontSize: 10, fontFamily: 'ui-monospace, SFMono-Regular, monospace', formatter: '{value}%' } }, series: [{ type: 'bar', data: [ { value: Math.max(0, d.delivered - Math.random()*15), itemStyle: { color: '#EF4444' } }, { value: Math.min(100, d.delivered + 2), itemStyle: { color: '#3B82F6' } }, { value: Math.min(100, d.delivered + 1), itemStyle: { color: '#7C3AED' } }, { value: Math.min(100, d.delivered + 3), itemStyle: { color: '#10B981' } } ], barWidth: 24, itemStyle: { borderRadius: [3, 3, 0, 0] } }] }); } function closePanel() { document.getElementById('detailPanel').classList.remove('open'); document.getElementById('overlay').classList.remove('show'); if (panelChart) { panelChart.dispose(); panelChart = null; } } // ECharts — Time Series const tsChart = echarts.init(document.getElementById('tsChart')); const hours = []; const accepted = []; const deferred = []; for (let i = 0; i < 24; i++) { hours.push(`${String(i).padStart(2,'0')}:00`); const base = 2800 + Math.sin(i/4)*800 + Math.random()*600; accepted.push(Math.round(base)); deferred.push(Math.round(base * (i > 18 ? 0.35 : 0.08) + Math.random()*200)); } tsChart.setOption({ backgroundColor: 'transparent', tooltip: { trigger: 'axis', backgroundColor: '#181F38', borderColor: '#232A42', textStyle: { color: '#E8ECF4', fontSize: 11, fontFamily: 'ui-monospace, SFMono-Regular, monospace' } }, legend: { data: ['Accepted', 'Deferred', 'Throttle threshold'], top: 0, right: 0, textStyle: { color: '#8B93A7', fontSize: 11, fontFamily: 'ui-monospace, SFMono-Regular, monospace' }, itemWidth: 12, itemHeight: 2 }, grid: { left: 48, right: 16, top: 32, bottom: 24 }, xAxis: { type: 'category', data: hours, boundaryGap: false, axisLine: { lineStyle: { color: '#232A42' } }, axisLabel: { color: '#5A6278', fontSize: 10, fontFamily: 'ui-monospace, SFMono-Regular, monospace' }, axisTick: { show: false } }, yAxis: { type: 'value', axisLine: { show: false }, splitLine: { lineStyle: { color: '#1A2035' } }, axisLabel: { color: '#5A6278', fontSize: 10, fontFamily: 'ui-monospace, SFMono-Regular, monospace' } }, series: [ { name: 'Accepted', type: 'line', data: accepted, smooth: true, symbol: 'none', lineStyle: { width: 2, color: '#2DD4A7' }, areaStyle: { color: { type: 'linear', x: 0, y: 0, x2: 0, y2: 1, colorStops: [ { offset: 0, color: 'rgba(45,212,167,0.15)' }, { offset: 1, color: 'rgba(45,212,167,0)' } ] } } }, { name: 'Deferred', type: 'line', data: deferred, smooth: true, symbol: 'none', lineStyle: { width: 2, color: '#F59E0B' }, areaStyle: { color: { type: 'linear', x: 0, y: 0, x2: 0, y2: 1, colorStops: [ { offset: 0, color: 'rgba(245,158,11,0.12)' }, { offset: 1, color: 'rgba(245,158,11,0)' } ] } } }, { name: 'Throttle threshold', type: 'line', data: Array(24).fill(4000), symbol: 'none', lineStyle: { width: 1.5, color: '#EF4444', type: [4, 4] }, silent: true } ] }); // Chart.js — Provider Bar Chart const ctx = document.getElementById('providerChart').getContext('2d'); new Chart(ctx, { type: 'bar', data: { labels: ['Gmail', 'Outlook', 'Yahoo', 'Apple Mail'], datasets: [{ label: 'Inbox Placement %', data: [71.8, 94.5, 89.2, 96.1], backgroundColor: [ 'rgba(239, 68, 68, 0.75)', 'rgba(59, 130, 246, 0.75)', 'rgba(124, 58, 237, 0.75)', 'rgba(16, 185, 129, 0.75)' ], borderColor: [ '#EF4444', '#3B82F6', '#7C3AED', '#10B981' ], borderWidth: 1, borderRadius: 4, barThickness: 40 }] }, options: { responsive: true, maintainAspectRatio: false, plugins: { legend: { display: false }, tooltip: { backgroundColor: '#181F38', titleColor: '#E8ECF4', bodyColor: '#E8ECF4', borderColor: '#232A42', borderWidth: 1, padding: 10, titleFont: { family: 'ui-monospace, SFMono-Regular, monospace', size: 11 }, bodyFont: { family: 'ui-monospace, SFMono-Regular, monospace', size: 11 }, callbacks: { label: (ctx) => `${ctx.parsed.y}% inbox placement` } } }, scales: { x: { grid: { display: false }, ticks: { color: '#8B93A7', font: { family: 'ui-monospace, SFMono-Regular, monospace', size: 11 } }, border: { color: '#232A42' } }, y: { beginAtZero: true, max: 100, grid: { color: '#1A2035' }, ticks: { color: '#5A6278', font: { family: 'ui-monospace, SFMono-Regular, monospace', size: 10 }, callback: (v) => v + '%' }, border: { color: '#232A42' } } } } }); // Responsive resize window.addEventListener('resize', () => { tsChart.resize(); if (panelChart) panelChart.resize(); }); // Keyboard shortcuts document.addEventListener('keydown', (e) => { if (e.key === 'Escape') closePanel(); if (e.key === '/' && document.activeElement !== document.getElementById('domainSearch')) { e.preventDefault(); document.getElementById('domainSearch').focus(); } }); // Lucide icons (render any remaining) if (window.lucide) lucide.createIcons(); </script> </body> </html>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Mailrail Console — Deliverability</title>
<script src="https://registry.npmmirror.com/echarts/5.5.1/files/dist/echarts.min.js"></script>
<script src="https://registry.npmmirror.com/chart.js/4.4.7/files/dist/chart.umd.js"></script>
<script src="https://registry.npmmirror.com/lucide/0.468.0/files/dist/umd/lucide.min.js"></script>
<style>
:root {
--bg: #0B1020;
--bg-elevated: #0F1629;
--bg-surface: #141B33;
--bg-card: #181F38;
--border: #232A42;
--border-subtle: #1A2035;
--text-primary: #E8ECF4;
--text-secondary: #8B93A7;
--text-muted: #5A6278;
--accent: #2DD4A7;
--accent-dim: rgba(45, 212, 167, 0.08);
--accent-border: rgba(45, 212, 167, 0.2);
--danger: #EF4444;
--danger-dim: rgba(239, 68, 68, 0.08);
--danger-border: rgba(239, 68, 68, 0.2);
--warning: #F59E0B;
--warning-dim: rgba(245, 158, 11, 0.08);
--success: #10B981;
--info: #3B82F6;
--info-dim: rgba(59, 130, 246, 0.08);
--font-mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
--font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
--radius-sm: 6px;
--radius-md: 8px;
--radius-lg: 10px;
}
*, *::before, *::after {
margin: 0;
padding: 0;
box-sizing: border-box;
}
html {
scrollbar-width: thin;
scrollbar-color: #232A42 #0B1020;
}
body {
font-family: var(--font-sans);
background: var(--bg);
color: var(--text-primary);
min-height: 100vh;
line-height: 1.45;
-webkit-font-smoothing: antialiased;
}
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--bg); }
::-webkit-scrollbar-thumb { background: #232A42; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #2E3650; }
/* Focus ring */
:focus-visible {
outline: 2px solid var(--accent);
outline-offset: 2px;
}
/* Layout */
.app {
max-width: 1440px;
margin: 0 auto;
padding: 0 24px 48px;
}
/* Top bar */
.topbar {
display: flex;
align-items: center;
justify-content: space-between;
padding: 14px 0;
border-bottom: 1px solid var(--border-subtle);
margin-bottom: 20px;
}
.topbar-brand {
display: flex;
align-items: center;
gap: 12px;
}
.topbar-brand .brand-icon {
width: 32px;
height: 32px;
background: linear-gradient(135deg, var(--accent) 0%, #1E9E7E 100%);
border-radius: var(--radius-sm);
display: flex;
align-items: center;
justify-content: center;
}
.topbar-brand .brand-icon svg {