Paginate and sport-tailor the simulator setup participant table #132

Merged
chrisp merged 2 commits from simulator-participant-pagination into main 2026-07-07 06:00:16 +00:00
Owner

What

The participant preview on the simulator setup page (admin/sports-seasons/:id/simulator) was capped at the first 20 rows by a hard-coded .slice(0, 20), so most of the field was invisible for seasons with up to ~300 participants (golf, tennis). All rows were already loaded — this was purely a UI limit.

Changes

  • Search + pagination — name search box (accent-insensitive via normalizeName) plus Prev/Next paging at 50/page, over the already-loaded rows. Page resets on filter change.
  • Sport-aware columns — columns are derived from each simulator's requiredInputs + optionalInputs (from the manifest), labeled, with required columns marked. So F1 shows odds, NBA shows Elo, NCAA shows rating, etc.
  • Missing-input filter — "Only show participants missing a required input" toggle (shown only when the simulator has required inputs) plus a per-row amber marker so gaps are visible at a glance.
  • Tennis/golf link-out — for sports whose inputs live on a dedicated page (surface Elo, golf skills), a note links there instead of implying they're edited on this page.

Notes

Column resolution is the only manifest runtime call, and it runs in the loader — this keeps the simulator manifest/registry out of the client bundle. Importing it into the client component pulled in every simulator and their transitive server-only modules (scoring-calculator.ts → qualifying-points-discord.server, cs2-major-stage.ts), which broke the Champions League setup page with a "server-only module referenced by client" error.

Verification

npm run typecheck, oxlint, and npm run build (client + server) all pass with no server-only-leak error.

🤖 Generated with Claude Code

## What The participant preview on the simulator setup page (`admin/sports-seasons/:id/simulator`) was capped at the first 20 rows by a hard-coded `.slice(0, 20)`, so most of the field was invisible for seasons with up to ~300 participants (golf, tennis). All rows were already loaded — this was purely a UI limit. ## Changes - **Search + pagination** — name search box (accent-insensitive via `normalizeName`) plus Prev/Next paging at 50/page, over the already-loaded rows. Page resets on filter change. - **Sport-aware columns** — columns are derived from each simulator's `requiredInputs` + `optionalInputs` (from the manifest), labeled, with required columns marked. So F1 shows odds, NBA shows Elo, NCAA shows rating, etc. - **Missing-input filter** — "Only show participants missing a required input" toggle (shown only when the simulator has required inputs) plus a per-row amber marker so gaps are visible at a glance. - **Tennis/golf link-out** — for sports whose inputs live on a dedicated page (surface Elo, golf skills), a note links there instead of implying they're edited on this page. ## Notes Column resolution is the only manifest **runtime** call, and it runs in the **loader** — this keeps the simulator manifest/registry out of the client bundle. Importing it into the client component pulled in every simulator and their transitive server-only modules (`scoring-calculator.ts → qualifying-points-discord.server`, `cs2-major-stage.ts`), which broke the Champions League setup page with a "server-only module referenced by client" error. ## Verification `npm run typecheck`, `oxlint`, and `npm run build` (client + server) all pass with no server-only-leak error. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
chrisp added 2 commits 2026-07-07 05:53:48 +00:00
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Paginate and sport-tailor the simulator setup participant table
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 3m51s
🚀 Deploy / ʦ🔍 Typecheck & Lint (pull_request) Successful in 1m23s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
b261d013d3
The participant preview capped at 20 rows via a hard-coded slice, hiding
most of the field for seasons with up to ~300 participants. Add a name
search box and client-side pagination (50/page) over the already-loaded
rows.

Make the columns sport-aware: derive them from each simulator's required
and optional inputs (manifest), label them, mark required ones, and add a
"missing a required input" filter plus a per-row amber marker. For sports
whose inputs live on a dedicated page (tennis surface Elo, golf skills),
show a note linking there instead of implying they are edited here.

Column resolution (the only manifest runtime call) happens in the loader
so the client bundle never imports the simulator manifest/registry, which
transitively pulls in server-only modules.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
chrisp merged commit 036411e9d8 into main 2026-07-07 06:00:16 +00:00
chrisp deleted branch simulator-participant-pagination 2026-07-07 06:00:16 +00:00
Sign in to join this conversation.
No description provided.