CodeIssuesDiscussionsWikiPull RequestsProjectsCommitsActionsReleasesContributorsPulse● GatesSecuritySettingsDeploymentsPipelineInsightsAgents✨ Explain✨ Ask AI✨ Workspace✨ Spec✨ Tests▓ Debt Map✨ NL Search🏛 Archaeology
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 | /**
* Public /status — human-readable platform health dashboard.
*
* Unlike /healthz (LB liveness JSON) and /readyz (DB readiness JSON),
* /status renders a full HTML page anyone can load. Shows DB reachability,
* autopilot state, totals (users/repos/gate runs), and the most recent
* autopilot tick's task breakdown.
*
* Accessible without auth. Uses softAuth so the nav bar renders correctly
* for logged-in visitors.
*
* 2026 polish: scoped `.status-` CSS, hero with eyebrow + gradient
* headline + aggregate uptime percentage, per-service health pills,
* recent incidents list with severity dots, and an empty-state orb
* for the autopilot tick card when no tick has run yet.
*/
import { Hono } from "hono";
import { sql } from "drizzle-orm";
import { db } from "../db";
import { users, repositories, gateRuns } from "../db/schema";
import { Layout } from "../views/layout";
import { softAuth } from "../middleware/auth";
import type { AuthEnv } from "../middleware/auth";
import { getLastTick, getTickCount } from "../lib/autopilot";
import { recentRedChecks } from "../lib/synthetic-monitor";
const status = new Hono<AuthEnv>();
status.use("*", softAuth);
const started = Date.now();
function fmtUptime(ms: number): string {
const s = Math.floor(ms / 1000);
const d = Math.floor(s / 86400);
const h = Math.floor((s % 86400) / 3600);
const m = Math.floor((s % 3600) / 60);
if (d > 0) return `${d}d ${h}h`;
if (h > 0) return `${h}h ${m}m`;
return `${m}m`;
}
status.get("/status", async (c) => {
const user = c.get("user");
let dbOk = false;
try {
await db.execute(sql`SELECT 1`);
dbOk = true;
} catch {
dbOk = false;
}
let userCount = 0;
let repoCount = 0;
let publicRepoCount = 0;
let gateRunCount = 0;
let greenRate: number | null = null;
try {
const [u] = await db.select({ n: sql<number>`count(*)::int` }).from(users);
userCount = Number(u?.n ?? 0);
const [r] = await db
.select({ n: sql<number>`count(*)::int` })
.from(repositories);
repoCount = Number(r?.n ?? 0);
const [pr] = await db
.select({ n: sql<number>`count(*)::int` })
.from(repositories)
.where(sql`${repositories.isPrivate} = false`);
publicRepoCount = Number(pr?.n ?? 0);
const [gr] = await db
.select({ n: sql<number>`count(*)::int` })
.from(gateRuns);
gateRunCount = Number(gr?.n ?? 0);
if (gateRunCount > 0) {
const [g] = await db
.select({ n: sql<number>`count(*)::int` })
.from(gateRuns)
.where(sql`${gateRuns.status} IN ('passed','repaired')`);
greenRate = (Number(g?.n ?? 0) / gateRunCount) * 100;
}
} catch {
// counts stay 0
}
const tick = getLastTick();
const ticks = getTickCount();
const autopilotDisabled = process.env.AUTOPILOT_DISABLED === "1";
const uptimeMs = Date.now() - started;
// BLOCK S4 — Show any red synthetic-monitor results from the last 24h
// on the public status page. Never blocks the render.
let recentIncidents: Awaited<ReturnType<typeof recentRedChecks>> = [];
try {
recentIncidents = await recentRedChecks(24, 10);
} catch {
recentIncidents = [];
}
const overallOk = dbOk && recentIncidents.length === 0;
// Aggregate uptime — process uptime over the last 24h window, capped
// at 100%. We don't track historical downtime in-process, so this is a
// best-effort number based on how long this Bun worker has been alive
// versus the rolling 24h window.
const WINDOW_MS = 24 * 60 * 60 * 1000;
const aggregatePct =
overallOk
? Math.min(100, (uptimeMs / WINDOW_MS) * 100)
: Math.max(0, 100 - (recentIncidents.length * 100) / 24);
const aggregateStr = aggregatePct >= 100 ? "100.0" : aggregatePct.toFixed(1);
// Per-service status descriptors — kept here so the JSX is just markup.
const services: Array<{
name: string;
sub: string;
state: "ok" | "down" | "idle";
label: string;
}> = [
{
name: "Database",
sub: "Neon PostgreSQL",
state: dbOk ? "ok" : "down",
label: dbOk ? "operational" : "down",
},
{
name: "Autopilot",
sub: "Periodic platform-maintenance loop",
state: autopilotDisabled ? "idle" : "ok",
label: autopilotDisabled ? "disabled" : "running",
},
{
name: "Git Smart HTTP",
sub: "Clone, fetch, push",
state: "ok",
label: "operational",
},
];
return c.html(
<Layout title="Status — gluecron" user={user}>
<style dangerouslySetInnerHTML={{ __html: statusStyles }} />
<div class="status-wrap">
{/* ─── Hero ─── */}
<section
class={"status-hero " + (overallOk ? "is-ok" : "is-degraded")}
>
<div class="status-hero-orb" aria-hidden="true" />
<div class="status-hero-inner">
<div class="status-eyebrow">
<span class="status-eyebrow-pill" aria-hidden="true">
<svg width="11" height="11" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2.2" stroke-linecap="round" stroke-linejoin="round">
<path d="M22 12h-4l-3 9L9 3l-3 9H2" />
</svg>
</span>
Platform status · live · reloads on refresh
</div>
<h1 class="status-title">
<span class="status-dot-big" aria-hidden="true" />
<span
class={
"status-title-text " +
(overallOk
? "status-title-grad"
: "status-title-grad status-title-grad-warn")
}
>
{overallOk
? "All systems operational"
: "Service degraded"}
</span>
</h1>
<p class="status-sub">
Live platform health for every Gluecron surface — database,
autopilot, git protocol, and the synthetic monitor.
</p>
<div class="status-hero-stats">
<div class="status-hero-stat">
<div class="status-hero-stat-num">{aggregateStr}%</div>
<div class="status-hero-stat-label">24h uptime</div>
</div>
<div class="status-hero-stat">
<div class="status-hero-stat-num">{fmtUptime(uptimeMs)}</div>
<div class="status-hero-stat-label">Process uptime</div>
</div>
<div class="status-hero-stat">
<div class="status-hero-stat-num">{recentIncidents.length}</div>
<div class="status-hero-stat-label">Incidents · 24h</div>
</div>
</div>
</div>
</section>
{/* ─── Components / health pills ─── */}
<section class="status-section" aria-labelledby="status-comp-h">
<header class="status-section-head">
<div>
<p class="status-section-eyebrow">Components</p>
<h2 class="status-section-title" id="status-comp-h">
Per-service health
</h2>
</div>
</header>
<ul class="status-svc-list">
{services.map((svc) => (
<li class="status-svc-row">
<div class="status-svc-main">
<p class="status-svc-name">{svc.name}</p>
<p class="status-svc-sub">{svc.sub}</p>
</div>
<span
class={"status-pill status-pill-" + svc.state}
title={svc.label}
>
<span class="status-pill-dot" aria-hidden="true" />
{svc.label}
</span>
</li>
))}
</ul>
</section>
{/* ─── Platform stats ─── */}
<section class="status-section" aria-labelledby="status-stats-h">
<header class="status-section-head">
<div>
<p class="status-section-eyebrow">Numbers</p>
<h2 class="status-section-title" id="status-stats-h">
Platform stats
</h2>
</div>
</header>
<div class="status-section-body">
<div class="status-stats-grid">
<div class="status-stat">
<div class="status-stat-num">{userCount.toLocaleString()}</div>
<div class="status-stat-label">Developers</div>
</div>
<div class="status-stat">
<div class="status-stat-num">{repoCount.toLocaleString()}</div>
<div class="status-stat-label">Repositories</div>
</div>
<div class="status-stat">
<div class="status-stat-num">
{publicRepoCount.toLocaleString()}
</div>
<div class="status-stat-label">Public repos</div>
</div>
<div class="status-stat">
<div class="status-stat-num">
{gateRunCount.toLocaleString()}
</div>
<div class="status-stat-label">Gate runs</div>
</div>
<div class="status-stat">
<div class="status-stat-num">
{greenRate === null ? "—" : `${greenRate.toFixed(1)}%`}
</div>
<div class="status-stat-label">Green rate</div>
</div>
<div class="status-stat">
<div class="status-stat-num">{fmtUptime(uptimeMs)}</div>
<div class="status-stat-label">Uptime</div>
</div>
</div>
</div>
</section>
{/* ─── Recent incidents ─── */}
<section class="status-section" aria-labelledby="status-inc-h">
<header class="status-section-head">
<div>
<p class="status-section-eyebrow">Last 24h</p>
<h2 class="status-section-title" id="status-inc-h">
Recent incidents
</h2>
<p class="status-section-sub">
Synthetic-monitor probes that returned a red result.
</p>
</div>
{recentIncidents.length > 0 ? (
<span class="status-count-pill is-warn">
{recentIncidents.length} red
</span>
) : (
<span class="status-count-pill is-ok">All green</span>
)}
</header>
<div class="status-section-body">
{recentIncidents.length === 0 ? (
<div class="status-empty">
<div class="status-empty-orb" aria-hidden="true" />
<div class="status-empty-inner">
<p class="status-empty-title">No incidents in the last 24h.</p>
<p class="status-empty-sub">
Every synthetic probe is green. We log every red here
with timestamps and error text.
</p>
</div>
</div>
) : (
<ul class="status-inc-list">
{recentIncidents.map((r) => (
<li class="status-inc-row">
<span class="status-inc-dot" aria-hidden="true" />
<div class="status-inc-main">
<p class="status-inc-name">
<code>{r.name}</code>
</p>
<p class="status-inc-err">
{r.error || "(no error message)"}
</p>
</div>
<time class="status-inc-time">
{r.checkedAt.toISOString()}
</time>
</li>
))}
</ul>
)}
</div>
</section>
{/* ─── Autopilot tick ─── */}
<section class="status-section" aria-labelledby="status-tick-h">
<header class="status-section-head">
<div>
<p class="status-section-eyebrow">Autopilot</p>
<h2 class="status-section-title" id="status-tick-h">
Latest tick
</h2>
<p class="status-section-sub">
Per-task results from the most recent autopilot sweep.
</p>
</div>
{tick ? (
<span class="status-count-pill">
{ticks} ticks this process
</span>
) : null}
</header>
<div class="status-section-body">
{tick ? (
<ul class="status-tick-list">
<li class="status-tick-row">
<span class="status-tick-name">Finished</span>
<code class="status-tick-val">{tick.finishedAt}</code>
</li>
<li class="status-tick-row">
<span class="status-tick-name">Total ticks this process</span>
<code class="status-tick-val">{ticks}</code>
</li>
{tick.tasks.map((t) => (
<li class="status-tick-row">
<code class="status-tick-name">{t.name}</code>
<span
class={"status-tick-val " + (t.ok ? "is-ok" : "is-err")}
>
{t.ok ? "ok" : `failed: ${t.error || "unknown"}`}
<span class="status-tick-ms">{t.durationMs}ms</span>
</span>
</li>
))}
</ul>
) : (
<div class="status-empty">
<div class="status-empty-orb" aria-hidden="true" />
<div class="status-empty-inner">
<p class="status-empty-title">
{autopilotDisabled
? "Autopilot is disabled."
: "No ticks yet."}
</p>
<p class="status-empty-sub">
{autopilotDisabled
? "Set AUTOPILOT_DISABLED=0 to re-enable the periodic platform-maintenance loop."
: "The first tick runs within 5 minutes of process start. Check back shortly."}
</p>
</div>
</div>
)}
</div>
</section>
<p class="status-foot">
Liveness: <a href="/healthz">/healthz</a> · Readiness:{" "}
<a href="/readyz">/readyz</a> · Metrics:{" "}
<a href="/metrics">/metrics</a> · Platform JSON:{" "}
<a href="/api/platform-status">/api/platform-status</a>
</p>
</div>
</Layout>
);
});
/**
* Shields-style status badge. Reads the latest autopilot tick + DB
* reachability and returns an SVG. Embed in READMEs with:
* 
*/
status.get("/status.svg", async (c) => {
let dbOk = false;
try {
await db.execute(sql`SELECT 1`);
dbOk = true;
} catch {
dbOk = false;
}
const tick = getLastTick();
const lastOk = tick ? tick.tasks.every((t) => t.ok) : true;
const overall = dbOk && lastOk;
const label = "gluecron";
const value = overall ? "operational" : "degraded";
const fill = overall ? "#2da44e" : "#cf222e";
const labelW = 70;
const valueW = overall ? 78 : 68;
const totalW = labelW + valueW;
const svg = `<svg xmlns="http://www.w3.org/2000/svg" width="${totalW}" height="20" role="img" aria-label="${label}: ${value}">
<linearGradient id="s" x2="0" y2="100%">
<stop offset="0" stop-color="#bbb" stop-opacity=".1"/>
<stop offset="1" stop-opacity=".1"/>
</linearGradient>
<rect width="${totalW}" height="20" rx="3" fill="#555"/>
<rect x="${labelW}" width="${valueW}" height="20" rx="3" fill="${fill}"/>
<rect width="${totalW}" height="20" rx="3" fill="url(#s)"/>
<g fill="#fff" text-anchor="middle" font-family="Verdana,Geneva,sans-serif" font-size="11">
<text x="${labelW / 2}" y="15">${label}</text>
<text x="${labelW + valueW / 2}" y="15">${value}</text>
</g>
</svg>`;
c.header("Content-Type", "image/svg+xml; charset=utf-8");
c.header("Cache-Control", "no-cache, max-age=0");
return c.body(svg);
});
/* ─────────────────────────────────────────────────────────────────────────
* Scoped CSS — every class prefixed `.status-` so this surface can't
* bleed into the admin status page or any other route.
* ───────────────────────────────────────────────────────────────────── */
const statusStyles = `
.status-wrap { max-width: 960px; margin: 0 auto; padding: var(--space-6) var(--space-4); }
/* ─── Hero ─── */
.status-hero {
position: relative;
margin-bottom: var(--space-5);
padding: var(--space-5) var(--space-6);
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: 16px;
overflow: hidden;
}
.status-hero::before {
content: '';
position: absolute;
top: 0; left: 0; right: 0;
height: 2px;
background: linear-gradient(90deg, transparent 0%, #34d399 30%, #36c5d6 70%, transparent 100%);
opacity: 0.75;
pointer-events: none;
}
.status-hero.is-degraded::before {
background: linear-gradient(90deg, transparent 0%, #f87171 30%, #fbbf24 70%, transparent 100%);
}
.status-hero-orb {
position: absolute;
inset: -20% -10% auto auto;
width: 380px; height: 380px;
background: radial-gradient(circle, rgba(52,211,153,0.20), rgba(54,197,214,0.10) 45%, transparent 70%);
filter: blur(80px);
opacity: 0.7;
pointer-events: none;
z-index: 0;
}
.status-hero.is-degraded .status-hero-orb {
background: radial-gradient(circle, rgba(248,113,113,0.22), rgba(251,191,36,0.10) 45%, transparent 70%);
}
.status-hero-inner { position: relative; z-index: 1; }
.status-eyebrow {
font-size: 12px;
color: var(--text-muted);
margin-bottom: var(--space-2);
letter-spacing: 0.02em;
display: inline-flex;
align-items: center;
gap: 8px;
}
.status-eyebrow-pill {
display: inline-flex;
align-items: center;
justify-content: center;
width: 18px; height: 18px;
border-radius: 6px;
background: rgba(52,211,153,0.14);
color: #6ee7b7;
box-shadow: inset 0 0 0 1px rgba(52,211,153,0.32);
}
.status-hero.is-degraded .status-eyebrow-pill {
background: rgba(248,113,113,0.14);
color: #fca5a5;
box-shadow: inset 0 0 0 1px rgba(248,113,113,0.30);
}
.status-title {
font-size: clamp(28px, 4vw, 40px);
font-family: var(--font-display);
font-weight: 800;
letter-spacing: -0.028em;
line-height: 1.05;
margin: 0 0 var(--space-2);
color: var(--text-strong);
display: flex;
align-items: center;
gap: 14px;
flex-wrap: wrap;
}
.status-dot-big {
display: inline-block;
width: 14px; height: 14px;
border-radius: 50%;
background: #34d399;
box-shadow: 0 0 0 5px rgba(52,211,153,0.18);
flex-shrink: 0;
}
.status-hero.is-degraded .status-dot-big {
background: #f87171;
box-shadow: 0 0 0 5px rgba(248,113,113,0.18);
}
.status-title-grad {
background-image: linear-gradient(135deg, #6ee7b7 0%, #34d399 50%, #36c5d6 100%);
-webkit-background-clip: text;
background-clip: text;
-webkit-text-fill-color: transparent;
color: transparent;
}
.status-title-grad-warn {
background-image: linear-gradient(135deg, #fca5a5 0%, #f87171 50%, #fbbf24 100%);
}
.status-sub {
font-size: 15px;
color: var(--text-muted);
margin: 0 0 var(--space-4);
line-height: 1.55;
max-width: 620px;
}
/* Hero stats strip */
.status-hero-stats {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: var(--space-3);
}
.status-hero-stat {
padding: 12px 14px;
background: rgba(255,255,255,0.025);
border: 1px solid var(--border-subtle);
border-radius: 10px;
}
.status-hero-stat-num {
font-family: var(--font-display);
font-size: 22px;
font-weight: 700;
color: var(--text-strong);
letter-spacing: -0.02em;
}
.status-hero-stat-label {
font-size: 11px;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.06em;
margin-top: 2px;
}
/* ─── Section cards ─── */
.status-section {
margin-bottom: var(--space-5);
background: var(--bg-elevated);
border: 1px solid var(--border);
border-radius: 14px;
overflow: hidden;
}
.status-section-head {
padding: var(--space-4) var(--space-5);
border-bottom: 1px solid var(--border);
display: flex;
align-items: flex-start;
justify-content: space-between;
gap: var(--space-3);
flex-wrap: wrap;
}
.status-section-eyebrow {
font-size: 11px;
font-weight: 600;
letter-spacing: 0.08em;
text-transform: uppercase;
color: var(--text-faint);
margin: 0 0 6px;
}
.status-section-title {
margin: 0;
font-family: var(--font-display);
font-size: 17px;
font-weight: 700;
letter-spacing: -0.018em;
color: var(--text-strong);
}
.status-section-sub {
margin: 6px 0 0;
font-size: 12.5px;
color: var(--text-muted);
line-height: 1.5;
}
.status-section-body { padding: var(--space-5); }
/* ─── Service pills ─── */
.status-svc-list { list-style: none; margin: 0; padding: 0; }
.status-svc-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: var(--space-3);
padding: var(--space-3) var(--space-5);
border-bottom: 1px solid var(--border);
}
.status-svc-row:last-child { border-bottom: 0; }
.status-svc-main { flex: 1; }
.status-svc-name {
margin: 0;
font-weight: 600;
color: var(--text-strong);
font-size: 14px;
}
.status-svc-sub {
margin: 2px 0 0;
font-size: 12px;
color: var(--text-muted);
}
.status-pill {
display: inline-flex;
align-items: center;
gap: 6px;
padding: 4px 10px;
border-radius: 9999px;
font-size: 11.5px;
font-weight: 600;
letter-spacing: 0.04em;
text-transform: lowercase;
}
.status-pill-dot {
width: 7px; height: 7px;
border-radius: 9999px;
background: currentColor;
flex-shrink: 0;
}
.status-pill-ok {
background: rgba(52,211,153,0.14);
color: #6ee7b7;
box-shadow: inset 0 0 0 1px rgba(52,211,153,0.32);
}
.status-pill-down {
background: rgba(248,113,113,0.14);
color: #fca5a5;
box-shadow: inset 0 0 0 1px rgba(248,113,113,0.32);
}
.status-pill-idle {
background: rgba(110,118,129,0.18);
color: #c9d1d9;
box-shadow: inset 0 0 0 1px rgba(110,118,129,0.40);
}
/* ─── Platform stats ─── */
.status-stats-grid {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
gap: var(--space-3);
}
.status-stat {
padding: var(--space-3) var(--space-4);
background: var(--bg-secondary);
border: 1px solid var(--border-subtle);
border-radius: 12px;
text-align: center;
transition: border-color 150ms ease;
}
.status-stat:hover { border-color: var(--border-strong); }
.status-stat-num {
font-family: var(--font-display);
font-size: 24px;
font-weight: 700;
color: var(--text-strong);
letter-spacing: -0.022em;
}
.status-stat-label {
font-size: 11px;
color: var(--text-muted);
text-transform: uppercase;
letter-spacing: 0.06em;
margin-top: 4px;
}
/* ─── Count pills ─── */
.status-count-pill {
display: inline-flex;
align-items: center;
padding: 4px 10px;
border-radius: 9999px;
font-family: var(--font-mono);
font-size: 11.5px;
font-weight: 600;
background: rgba(140,109,255,0.10);
color: #c5b3ff;
box-shadow: inset 0 0 0 1px rgba(140,109,255,0.28);
letter-spacing: 0.02em;
}
.status-count-pill.is-ok {
background: rgba(52,211,153,0.12);
color: #6ee7b7;
box-shadow: inset 0 0 0 1px rgba(52,211,153,0.32);
}
.status-count-pill.is-warn {
background: rgba(248,113,113,0.12);
color: #fca5a5;
box-shadow: inset 0 0 0 1px rgba(248,113,113,0.32);
}
/* ─── Incidents list ─── */
.status-inc-list { list-style: none; margin: 0; padding: 0; }
.status-inc-row {
display: flex;
align-items: flex-start;
gap: 12px;
padding: var(--space-3) 0;
border-bottom: 1px solid var(--border-subtle);
}
.status-inc-row:last-child { border-bottom: 0; }
.status-inc-row:first-child { padding-top: 0; }
.status-inc-dot {
width: 8px; height: 8px;
border-radius: 9999px;
background: #f87171;
box-shadow: 0 0 0 3px rgba(248,113,113,0.18);
margin-top: 6px;
flex-shrink: 0;
}
.status-inc-main { flex: 1; min-width: 0; }
.status-inc-name {
margin: 0;
font-size: 13.5px;
color: var(--text-strong);
}
.status-inc-name code {
font-family: var(--font-mono);
font-size: 12.5px;
background: var(--bg-tertiary);
padding: 1px 6px;
border-radius: 4px;
}
.status-inc-err {
margin: 4px 0 0;
font-size: 12.5px;
color: var(--text-muted);
line-height: 1.5;
}
.status-inc-time {
font-family: var(--font-mono);
font-size: 11.5px;
color: var(--text-faint);
white-space: nowrap;
flex-shrink: 0;
}
/* ─── Empty state ─── */
.status-empty {
position: relative;
padding: var(--space-6) var(--space-5);
border: 1px dashed var(--border-strong);
border-radius: 14px;
background: rgba(255,255,255,0.02);
text-align: center;
overflow: hidden;
}
.status-empty-orb {
position: absolute;
inset: -40% -10% auto auto;
width: 320px; height: 320px;
background: radial-gradient(circle, rgba(52,211,153,0.18), rgba(54,197,214,0.10) 45%, transparent 70%);
filter: blur(70px);
opacity: 0.55;
pointer-events: none;
z-index: 0;
}
.status-empty-inner { position: relative; z-index: 1; }
.status-empty-title {
margin: 0 0 6px;
font-family: var(--font-display);
font-size: 16px;
font-weight: 700;
color: var(--text-strong);
letter-spacing: -0.012em;
}
.status-empty-sub {
margin: 0 auto;
max-width: 460px;
font-size: 13px;
color: var(--text-muted);
line-height: 1.5;
}
/* ─── Autopilot tick list ─── */
.status-tick-list { list-style: none; margin: 0; padding: 0; }
.status-tick-row {
display: flex;
align-items: center;
justify-content: space-between;
gap: 12px;
padding: 10px 0;
border-bottom: 1px solid var(--border-subtle);
font-size: 13px;
}
.status-tick-row:last-child { border-bottom: 0; }
.status-tick-row:first-child { padding-top: 0; }
.status-tick-name {
color: var(--text);
font-size: 13px;
}
code.status-tick-name {
font-family: var(--font-mono);
font-size: 12.5px;
background: var(--bg-tertiary);
padding: 1px 6px;
border-radius: 4px;
color: var(--text-strong);
}
.status-tick-val {
display: inline-flex;
align-items: center;
gap: 10px;
font-family: var(--font-mono);
font-size: 12.5px;
color: var(--text-muted);
}
.status-tick-val.is-ok { color: #6ee7b7; }
.status-tick-val.is-err { color: #fca5a5; }
.status-tick-ms { color: var(--text-faint); font-size: 11.5px; }
/* ─── Footer links ─── */
.status-foot {
margin-top: var(--space-5);
padding-top: var(--space-4);
border-top: 1px solid var(--border);
color: var(--text-muted);
font-size: 12.5px;
text-align: center;
}
.status-foot a {
color: var(--accent, #8c6dff);
text-decoration: none;
}
.status-foot a:hover { text-decoration: underline; }
`;
export default status;
|