← Corpus / dididecks-ai / sitemap

DeckStatsPanel — the 4-tile quick-stats row above the matrix on landing pages (Variants · Slide Files · People · Companies)

Renders a 4-tile grid above `DeckMatrix` on consumer landings — Design Variants count (links to `/scroll/`), Slide Files count (links to the canonical variant scroll page), People count (links to `/data-assets/people`), Companies count (links to `/data-assets/companies`). All counts computed at build time from the same `import.meta.glob` patterns the `/data-assets/*` audit routes use, so the numbers always match what the audit pages render. Replaces the per-client AssetsDataPanel that calmstorm + chroma each had locally — lifted to the shell so consumer sites don't reinvent the count math or the tile chrome.

Path
sitemap/components/DeckStatsPanel.md
Authors
Michael Staton

DeckStatsPanel

Tile composition

TileCount sourceLinks to
Design VariantsDECKS[deckSlug].variants.length/scroll/
Slide FilesperSlideFileExists per (variant, slot)per-variant scroll page (or /play/{deck}/{variant}/ if any variant has play files)
People/data/**/{team,portfolio}/*.md filtered to role_class set/data-assets/people
Companies/data/**/portfolio/*.md filtered to role_class unset/data-assets/companies

Theming contract

Reads through --ddd-stats-* tokens with sensible fallback chain through consumer semantic tokens (--color-background, --color-surface, --color-text, --color-border, --radius). Consumer sites don’t need to declare --ddd-stats-* — defaults look correct against any normal theme.

Glob discipline (load-bearing)

Tile counts use the SAME globs the /data-assets/* audit routes use. This is by construction — tile numbers should always match what the audit pages render, with no opportunity for divergence. Don’t introduce a separate loadStatsCounts() helper that uses different globs.

Status

  • ✅ Shipped — embedded on chroma’s landing since rollout; humain wired this session
  • [[../routes/data-assets-people]] — destination of the People tile
  • [[../routes/data-assets-companies]] — destination of the Companies tile
  • [[DeckMatrix]] — the matrix that sits below DeckStatsPanel on landings
  • [[../../plans/Lift-Chroma-Decks-Generic-Code-into-Shared-Shell]] — the lift discipline that brought it into the shell