Skip to main content

Review queue (retired)

Retired

This page has been retired. The Review Queue lives inside the ClickUp Audit "Automatic Checks" tab.

  • Route: /admin/review-queue
  • Guard: /admin/* layout (isAdminTier()); the review-queue API routes are admin-gated server-side.
  • Redirects to: /admin/clickup-audit?tab=checks — the screenshot below shows that destination (0 check results at capture time; Pass/Fail/Warn/Error/Pending chips all 0, filter rail present).

Admin: Review Queue redirect target

What this route is now​

src/app/admin/review-queue/page.tsx is an unconditional redirect to the "Automatic Checks" tab of the merged ClickUp Audit workspace, kept alive so old bookmarks do not 404.

The "Automatic Checks" tab (destination)​

Rendered by ReviewQueue.tsx inside ClickUpCoveragePanel — a cross-tenant creative QC status board:

  • Results list — reads GET /api/admin/review-queue with filters (client_id, status, check_type). Backing store is the Supabase ad_check_status table (migration 008_ad_check_status.sql) — the latest status per ad/check. Full analytical history lives in the companion ClickHouse table creative_check_results (clickhouse/migrations/008_creative_check_results.sql).
  • Status chips — clickable Pass / Fail / Warn / Error / Pending counters from GET /api/admin/review-queue/summary (CHECK_STATUSES in src/lib/checks-review-queue.ts); clicking a chip filters the list.
  • Filter rail — status select, check-type select, and an active-client dropdown (GET /api/admin/clients?status=active&purpose=ad-linking).
  • Live board polling — list and summary refetch every 15 s (matching the Inngest check-runner cycle) and pause while the browser tab is hidden.
  • Not-migrated state — if the ad_check_status table has not been migrated, the tab shows an explicit "not yet migrated" notice instead of a fake empty queue.

The five checks producing these rows​

Checks are registered in src/lib/checks/ (one file each, self-registering via registerCheck() at module load): field_presence, lander_congruency, caption, qc_score, compliance_v1. The Inngest runner src/inngest/creative-check.ts looks each up in the registry and persists results. This UI deliberately does NOT import from src/lib/checks/** — it only reads the persisted status rows via the API.

ClickUp write-back: intentionally not wired​

The write-back path (maybeWriteToClickup in creative-check.ts) is fully wired and runs for every check, but all five checks currently ship with clickUpField unset, so nothing is written to ClickUp: field_presence and lander_congruency because no sprint has wired them, caption and qc_score because no matching field exists in the ClickUp field registry yet (see the CL-6c GAP comment in src/lib/clickup/field-registry.ts for the exact TODO). Setting a field UUID on a check's CheckDef is all that is needed to activate write-back for it.

Key files​

File / endpointRole
src/app/admin/review-queue/page.tsxThe redirect (whole page)
src/components/admin/ReviewQueue.tsxAutomatic Checks tab UI
src/lib/checks-review-queue.tsCHECK_STATUSES / CHECK_TYPES literals shared with the API
src/lib/checks/ (registry.ts + 5 check files)Check definitions (decoupled from this UI)
src/inngest/creative-check.tsCheck runner + (dormant) ClickUp write-back
GET /api/admin/review-queueFilterable results list
GET /api/admin/review-queue/summaryPer-status counts for the chips
supabase/migrations/008_ad_check_status.sqlBacking table (latest status)
clickhouse/migrations/008_creative_check_results.sqlFull check history (analytics)