import Link from 'next/link'; import { Section } from '@/components/ui/section'; import { Badge } from '@/components/ui/badge'; import { EmptyState } from '@/components/ui/empty-state'; import { listSnapshots } from '@/lib/queries/rankings'; import { fmtDateTime, fmtInt, scopeLabel } from '@/lib/format'; export default async function AdminRankingsPage() { const snaps = await listSnapshots(300); return (
Every snapshot ever generated (current and superseded). Run `pnpm cix rank` to compute.
| Id | Metric | Scope | Formula | Eligible | Rows | Current | Generated | Inputs hash |
|---|---|---|---|---|---|---|---|---|
| {s.id} | {s.metric_name} | {scopeLabel(s.scope_key)} | {s.formula_version} | {fmtInt(s.eligible_entities)} | {fmtInt(s.row_count)} | {s.is_current ? |
{fmtDateTime(s.generated_at)} | {s.inputs_hash} |