Skip to content

feat: rework Results tab with derived records + gauntlet view#173

Open
jhonnold wants to merge 1 commit into
mainfrom
claude/sad-cartwright-42517b
Open

feat: rework Results tab with derived records + gauntlet view#173
jhonnold wants to merge 1 commit into
mainfrom
claude/sad-cartwright-42517b

Conversation

@jhonnold

Copy link
Copy Markdown
Owner

Summary

Reworks the Results tab — "the heart of what the audience reads" — to surface the analytics already implicit in the CT crosstable instead of rendering the raw =/1/0/. matrix verbatim. Frontend-only: everything is derived from the ParsedResults already served at /:port/result-table/json (and the identical /archive/:slug/result-table/json), so live and archived tournaments share one code path with no parser/persisted-shape changes.

Implements idea B1 from the improvement-ideas backlog.

What changed

  • results/derive.ts (new, pure helpers): per-engine W-L-D, score %, and a pentanomial pair distribution reconstructed by splitting each head-to-head cell's ordered result string into back-to-back game pairs (++/+/=//−−). Plus a conservative gauntlet detector (engines that played far more opponents than the median; round-robins never trip it).
  • Gauntlet view: gauntlet broadcasts render a dedicated table — the gauntlet engine as the top row, then its record vs each opponent — replacing the sparse, mostly-. matrix.
  • Matrix view: round-robins render the enhanced crosstable (# · Engine · G · Record · Pts · Score · h2h…).
  • Record is shown as five colored counts (++ + = − −−), green→red left→right, zeros dimmed.
  • Sticky engine-name column on horizontal scroll + row hover highlight.
  • Five fixed pentanomial spectrum colors added to :root in _variables.scss (uniform across themes).

Verification

  • Frontend tsc (tsconfig.frontend), ESLint, and Prettier all clean. (Backend tsc has a pre-existing duplicate-@types/node conflict in this environment, unrelated to this change.)
  • Live Playwright walkthrough against two real broadcasts:
    • Gauntlet (Berserk Gauntlet): auto-opens the gauntlet view; Berserk as top row with overall 0 8 86 5 0 record, per-opponent breakdown, score % correct.
    • Round-robin (124th Amateur): matrix view; record numbers gradient green (REVOLVER 79.5%) → red (SOOMI 27.9%); sticky engine column holds on horizontal scroll.

🤖 Generated with Claude Code

Derive analytics from the CT crosstable data already served — no parser
or persisted-shape changes, so live and archived tournaments share one
code path.

- Pure helpers (results/derive.ts): per-engine W-L-D, score %, and a
  pentanomial pair distribution reconstructed by pairing each h2h cell's
  ordered result string; conservative gauntlet detection (engines that
  played far more opponents than the median).
- Gauntlet broadcasts render a dedicated view: the gauntlet engine as the
  top row, then its record vs each opponent. Round-robins render the
  enhanced crosstable matrix.
- Record shown as five colored counts (++ + = − −−), green→red.
- Sticky engine-name column on horizontal scroll; row hover highlight.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant