P0-3b/c: consensus grouped by player + ledger cards nest alt lines as a ladder

Completes P0-3 across all three surfaces:
- CONSENSUS VS MODEL (MarketBreadth): dedupe by player+market so Ben Williamson's
  alt-line variants show as ONE consensus row (no per-market cap — a consensus
  table just shouldn't repeat a player).
- LEDGER cards: group by player+market via groupIntoLadders — Alec Bohm's
  strikeout ladder (U1.6/U1.3/O1.5) is now ONE card with the rungs nested (each
  its own side/line + tier-colored grade), not three separate cards.
- playerGrouping reads player OR player_name (ledger rows use player_name) —
  regression-tested so the ledger doesn't silently empty.

The Alt Line Ladder shape is what /pricing already demos; the record now uses it.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
Kev
2026-07-17 01:07:28 -04:00
parent 55f5cdc57d
commit db61876b2f
4 changed files with 49 additions and 12 deletions
+5 -1
View File
@@ -16,6 +16,7 @@
import SectionHead from './SectionHead';
import { edgeColor } from '@/lib/colorContract';
import { dedupeLeaders } from '@/lib/playerGrouping';
export interface BreadthRow {
player?: string;
@@ -57,7 +58,10 @@ export default function MarketBreadth({
title?: string;
max?: number;
}) {
const rows = (Array.isArray(items) ? items : []).slice(0, Math.max(0, max));
// P0-3 — group by player+market so a player's alt-line ladder shows as ONE
// consensus row (the audit's Ben Williamson ×5). No per-market cap here — a
// consensus table isn't a ranked board, it just shouldn't repeat a player.
const rows = dedupeLeaders(Array.isArray(items) ? items : [], 0).slice(0, Math.max(0, max));
if (rows.length === 0) return null; // self-hide — no honest consensus to show
return (