Replies: 1 comment
|
Branch: Renamed title to disambiguate from verification dots. This discussion is about data-completeness (1-4 dot ladder showing how much structured data an entity has). Verification dots (showing whether records are source-checked) are tracked separately in #3802. Per discussion review on 2026-04-08. |
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Coverage Dots Everywhere — Implementation Plan (v2)
TL;DR
Wiki entities have wildly varying data depth but users have no at-a-glance signal when browsing. We'll extend the existing
CoverageDotscomponent (1-4 dot ladder) from 4 directory tables to all applicable tables, entity detail headers, and eventually search results via pre-computeddataDepthscores indatabase.json. Phase 1a adds coverage dots to 6 simple directory tables in one session. Critical finding: the generic scorer produces uniform scores (all 4s) for benchmarks and policies — per-type scorers with calibrated thresholds are mandatory, not optional.Problem
Users browsing directory pages see no signal for content depth. The coverage dot system covers only 4 of 15+ directory tables and zero other surfaces. The wiki has ~3,800 entities with massive variation — some orgs have financial data, 10+ people, wiki pages, and verified facts; others have just a name. Without a visual indicator, users waste time clicking into stubs.
Current State
CoverageDotscomponentcoverage-score.ts(5 scorers)dataDepthin database.jsonComplete Directory Page Inventory
computeProjectCoveragecomputeBenchmarkCoveragecomputeGrantCoveragecomputeFundingProgramCoveragecomputeFundingRoundCoveragecomputeDivisionCoveragecomputePublicationCoveragecomputeResourceCoverageExternal Research: How Other Sites Handle This
Consensus across external research: Reader-facing quality indicators should be categorical (stub/comprehensive) rather than granular (1-4 scale). Full granularity belongs on internal dashboards. Wikipedia's stub notice is the strongest precedent — it surfaces only the low extreme, not a continuous scale.
UX Design Decision: Dots vs. Stub Badge
The red team's UX critic argued coverage is a "maintainer metric surfaced to readers." External research confirms this concern — no major knowledge platform shows granular completeness to readers.
Two viable approaches (user should decide):
Option A: 4-dot ladder on all surfaces (current plan)
Option B: Binary "stub" badge + internal dot dashboard
This plan implements Option A (4-dot ladder) per the user's request, but the scoring infrastructure supports either approach. Switching to Option B requires only changing the rendering layer, not the scoring functions.
Critical Finding: Score Distribution Validation
Real entity score analysis revealed the generic scorer produces uniform scores:
Root cause:
computeGenericCoveragecapsfilledFieldCountat 4 signals, but most structured entities have 5+ fields, pushing everything to score 4. The generic scorer is only appropriate for thin types (approaches, events) where the limited field set naturally produces variance.Fix: Per-type scorers with calibrated thresholds are mandatory for any type with 5+ structured fields. The generic scorer's
filledFieldCountcap should be reduced from 4 to 2.Architecture
Scoring Layer
Integration Patterns (4 table architectures)
Pattern 1 — Simple custom table (projects, benchmarks, approaches, events):
Pattern 2 — Table with SourceCheckDot (divisions, funding-programs, funding-rounds):
Pattern 3 — TanStack React Table (publications, resources):
Pattern 4 — Custom paginated (grants):
Visual Design
Implementation Phases
Phase 1a: Simple directory tables — S (1 session)
Goal: 6 more directory tables show coverage dots. Users browsing projects, benchmarks, grants, funding programs, funding rounds, and divisions see at-a-glance content depth.
new Set(scores).size >= 3across real entity samplescomputeGenericCoveragefilledFieldCount cap from 4 to 2hidden sm:table-cellQuality gates:
pnpm buildpassespnpm exec playwright test apps/web/e2e/directory-pages.spec.tsExit criteria: 10 of 15+ directory tables show coverage dots with meaningful variance.
Phase 1b: TanStack tables + thin types — S (1 session)
Goal: Complete directory table coverage.
columnHelper.display()patternExit criteria: All applicable directory tables show coverage dots or have documented exclusion rationale.
Phase 2: Entity detail page headers — S (1 session)
Goal: Entity detail pages show coverage in the header area.
CoverageDots size="md"inline with type badge on org detail page (~line 760 inorganizations/[slug]/page.tsx)Exit criteria: Org, person, legislation detail pages show coverage dots in header.
Phase 3: Build-time pre-computation — M (1-2 sessions)
Goal:
dataDepth(1-4) pre-computed for every entity indatabase.json, enabling search and wiki surfaces.dataDepthcomputation tobuild-data.mjs: iterate entities, call appropriate scorerqualityandimportance(existing pattern)data/entity-coverage.ts:getEntityDataDepth(entityId): number | nullExit criteria:
dataDepthindatabase.jsonfor all scored types.Phase 4: Search results — S (1 session)
Goal: Search results show coverage dots for entity results.
dataDepthfrom pre-computed dataCoverageDots size="sm"inResultRowbelow entity title, before descriptiondataDepthavailableExit criteria: Entity search results show coverage dots.
Phase 5: Dashboard + tooltip (optional) — M (1-2 sessions)
Goal: Maintainers see site-wide coverage distribution; power users see breakdown on hover.
CoverageBreakdownpopover (shadcn Popover) showing dimensional breakdownExit criteria: Dashboard live; popover shows per-dimension detail.
Parallelization Plan
The work fans out after a single-file bottleneck (
coverage-score.ts). Here's how to use multiple agent slots:Why this order
coverage-score.ts. Split across slots = merge conflicts.[slug]/page.tsx) vs build pipeline (build-data.mjs) — independent.search-client.tsx) vs dashboard (internal/entity-coverage/) — independent. Both depend on Wave 3b.Conflict-free slot file assignments
Each slot also touches its corresponding
page.tsx— all slot-exclusive, zero overlap.Timeline estimate
With parallelization: ~5 calendar days, ~9 slot-sessions.
Without parallelization: ~7-8 sessions sequential.
Scope Cuts
dataDepthis independent.Quality & Verification
Risks & Mitigations
dataDepth= ONE number per entity. <20 lines per scorer. No framework.Open Questions
4-dot ladder vs. stub badge for reader-facing surfaces? External research supports the badge approach. Current plan uses dots per user request. Decision should be revisited after Phase 1a ships and real user feedback is available.
Column naming: "Coverage" vs "Data"? Org table uses "Data". New tables use "Coverage". Should unify. "Coverage" is more descriptive but "Data" is shorter.
Entity types without directory pages in search (Phase 4)? Risks (450), concepts (108), capabilities (56) appear in search but have no scorer. Use generic with calibrated thresholds.
Rejected Approaches
dataDepthavoids this.Red Team Log
Round 1 — 17 issues (2 blocking, 8 significant, 7 minor)
Technical: (Blocking) Plan omitted 6+ directory pages → fixed with complete inventory. (Blocking) Search results lack entity data → reordered phases: build-time before search. (Significant) 8 scorers excessive → 7 specific + generic for thin types. (Significant) Phase 1 underscoped → split into 1a/1b. (Significant) No score distribution validation → added as quality gate.
UX: (Significant) Coverage is maintainer metric surfaced to readers → acknowledged, documented Option B as fallback. (Significant) Two dot systems confuse → visually distinct, separate columns. (Significant) Search bias → keep dots small. (Minor) Entity header utility low → kept Phase 2 but scoped to 3 types.
Scope: (Significant) Phase 4 risks entity matrix anti-pattern → constraint: ONE number, not matrix. (Significant) Dashboard redundant → made Phase 5 optional.
Round 2 — Revision + implementability
Reframing insight:
dataDepthas build-time metadata (likequality/importance) is the right end-state. Phases 1-2 compute inline; Phase 3 pre-computes for search.Round 3 — Deep-dive findings (5 targeted investigations)
External research: Wikipedia, Wikidata, LinkedIn, Crunchbase all avoid showing granular completeness to readers. Wikipedia shows only extremes (stub notice, FA star). Consensus: categorical signals > continuous scales for reader-facing UI.
Code patterns: 4 distinct table architectures documented with exact integration patterns and line numbers.
Score distribution (CRITICAL): Generic scorer produces ALL 4s for benchmarks and policies. Root cause: filledFieldCount cap too permissive. Fix: per-type scorers mandatory; reduce generic cap from 4 to 2.
UX validation: Coverage most useful for grantmakers (high) and researchers (moderate). Risky for students (may discourage exploring stubs). Recommendation: keep dots but be prepared to switch to stub badge if real usage data supports it.
All reactions