import { requireAdmin } from '@/lib/admin/auth'; import { taxonomyQueue } from '@/lib/admin/queries'; import { proposeTaxonomyNode, taxonomyDecision } from '@/lib/admin/actions'; import { AdminShell, ActionButton, StatusPill, fmtTs, n } from '@/components/admin/shell'; export default async function TaxonomyAdminPage() { await requireAdmin(); const { pending, decided, families } = await taxonomyQueue(); return (

Pending ({pending.length})

    {pending.length === 0 ?
  • Queue empty. The discovery worker files proposals here when it finds recurring product clusters outside the taxonomy.
  • : null} {pending.map((p) => (
  • {String(p.name)} {String(p.proposed_slug)}

    parent {String(p.parent_slug ?? '—')} · est. volume {n(p.volume_estimate)} · {fmtTs(p.created_at)}

    {JSON.stringify(p.evidence ?? {}, null, 1)}
  • ))}

Decided

    {decided.map((p) =>
  • {String(p.name)} {String(p.proposed_slug)}{fmtTs(p.decided_at)}
  • )}

Propose manually

); }