Commit Graph
97 Commits
Author SHA1 Message Date
mandaloreandClaude Sonnet 5 06b0cf4418 Add Generate Matrix: auto-build the team scouting matchup matrix
Duplicates the team's Google Sheets matchup-matrix template once per
opposing team at a loaded event, pre-filled with names, factions,
career win% (all already computed by this page), and cleaned army
lists. New "Which team is yours?" selector + Generate Matrix button,
team-events only.

- Auth: Google Identity Services token client (drive.file +
  spreadsheets scopes) — the viewer signs in with their own Google
  account via a real OAuth popup, no backend, no client secret.
- Template layout is located at runtime by searching each tab for its
  own placeholder text ("Player N - Faction", "Opponent N") rather
  than hardcoded A1 ranges, so it survives the template changing later.
  Distinguishes the real input area from the template's own "mobile
  matrix" mirror and reference sections (which repeat the same
  placeholder text) by checking for literal typed values vs formulas —
  CSV export can't tell these apart, only the real Sheets API response
  can, which is how this was actually verified before writing this.
  Auto-picks between the template's 5-man/8-man tab variants by team
  size.
- List cleaning via a vendored copy of desjani's 40k-compactor
  (src/vendor/40k-compactor/, see NOTICE.md) — it isn't actually
  published to npm despite documenting `npm install 40k-compactor`
  (verified: 404 against the registry under every plausible name), so
  it can't be a normal dependency; vendored instead, MIT per direct
  confirmation from the maintainer. Verified against 40k-compactor's
  own sample list fixtures with real Node before committing.
- Generating a matrix needs the same BCP auth token already used for
  faction/disposition backfill (list text is a subscriber-gated
  endpoint) — reuses the existing token UI/storage as-is; missing
  lists are reported, not a hard failure.
- nginx CSP updated (script/connect/frame-src) for Google's identity
  script and the Drive/Sheets REST APIs.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 18:09:48 -05:00
mandaloreandClaude Sonnet 5 345f952970 Add a Circuit filter to the filter bar
Buttons are generated from CONFIG.circuits (not hand-written in
index.html), so adding a circuit to the config still only takes one
line — its filter button appears automatically. Uses accent color to
match the circuit badges on the cards, same active/dimmed styling as
Format/Scope. An event matches the circuit filter if it belongs to any
active circuit (OR within the group), not all of them, since an event
can legitimately carry more than one circuit tag.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 17:10:20 -05:00
mandaloreandClaude Sonnet 5 4bb5dc8ed8 Consolidate into one chronological list, tag each event by circuit
Replaces the one-section-per-circuit layout with a single flat,
deduped, date-sorted feed. Events belonging to more than one watched
circuit (real and not rare — verified 2 current events span both a
regional circuit and the national league) get one card carrying every
circuit badge that matched, rather than appearing once per section.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 17:08:11 -05:00
mandaloreandClaude Sonnet 5 463371d199 Make filter button active/inactive state clearer in dark mode
btn-outline + btn-active read too similarly to tell apart at a glance
in dark mode. Now: active buttons are solid-colored, matching the
badge they control (warning for Format, info for Scope, same colors
already used on the event cards), and inactive buttons are a dimmed
outline. Color alone now tells you what a button does; fill vs. outline
tells you whether it's on.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 16:38:21 -05:00
mandaloreandClaude Sonnet 5 a5a922d684 Shorten Warhammer Global Rankings radius to 250mi of St. Louis
Narrows it from 99 to 21 upcoming events.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 16:34:06 -05:00
mandaloreandClaude Sonnet 5 1ed31e1fbf Add Warhammer Global Rankings 2026 circuit, restricted to 500mi of St. Louis
This is the national ITC league, not a BCP "circuit" — verified it has
523 upcoming events nationwide, so without the distance restriction
this would swamp the page. Filtered to St. Louis + 500mi it's 99,
which matches the point of this page (events the team would actually
consider attending).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 16:32:15 -05:00
mandaloreandClaude Sonnet 5 9337a2a01c Add per-circuit distance radius support (near: {lat, lon, miles})
Prep for a new circuit that should only show events within 500 miles
of St. Louis, MO — the ID given (OlkMrRfxrN) 404s against the leagues
endpoint (every other circuit ID is 12 chars, this one is 10, so it's
likely missing characters from a copy/paste), so adding the actual
circuit entry once that's confirmed. This part is independent and
verified against known distances (Collinsville IL ~10mi, Ashland MO
~111mi, PA ~748mi from St. Louis) — a no-op for every existing circuit
since `near` is optional and withinRadius() passes everything through
when it's unset.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 16:30:58 -05:00
mandaloreandClaude Sonnet 5 83b6a2069d Add RTT/GT scope tag and a format/scope filter bar
BCP has no structured scope field (eventType/eventSubType are always
empty), and name-matching against RTT/GT/Major only covered ~55% of
events while systematically missing well-known majors that don't
literally say "GT" (ATC, 8TC, the Gateway Open...). Instead: RTT vs GT
is inferred from event duration (single day vs multi-day), Singles
events only, no Major tag — per team captain's call.

Duration has to be computed in each event's own timezone, not raw UTC
or the viewer's browser timezone: BCP end-times often land on the next
UTC calendar date purely from offset (a Chicago RTT running 9am-9pm
local reports as spanning two UTC dates). Verified against real RTT-
and GT-named events before shipping. The existing date-range display
had the same latent bug — fixed alongside this using the same
timezone-aware day comparison, so the badge and the displayed date
range can never visually contradict each other.

Also adds a filter bar (Format: Singles/Team Event, Scope: RTT/GT) —
toggling narrows the list per circuit without refetching, since the
already-fetched events are now kept around and just re-filtered.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 16:26:51 -05:00
mandaloreandClaude Sonnet 5 17093e3d25 Fix awkward multi-day event date formatting
Same-month ranges were rendering as e.g. "Sat, Oct 10, 2026 – 11" (full
start date, then a bare trailing day number for the end). Now:
single day "Sat, Oct 17, 2026", same-month range "Oct 10–11, 2026",
cross-month "Oct 30 – Nov 1, 2026", cross-year "Dec 30, 2026 – Jan 2, 2027".

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 16:19:00 -05:00
mandaloreandClaude Sonnet 5 40c41fad08 Flag each event as Singles or Team Event
Investigated BCP's API for a team-size field (5-man vs 8-man, etc.) —
there isn't one. The only candidate, totalPlayers / totalTeamPlayers,
tracks live registration progress rather than the event's configured
format, so it's unreliable for upcoming events with thin early signups
(verified: "TEO-8 - All in.", an event explicitly branded as an 8-man
format, currently shows 21/8 ≈ 2.6 via that ratio — would round to a
wrong "3-Man Teams"). Sticking to the one field BCP does report
reliably (teamEvent) rather than shipping a specific size that's
sometimes confidently wrong.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 16:04:42 -05:00
mandaloreandClaude Sonnet 5 efa3b7f6da Sync events.gateway-gamers.net.conf to match live production
DNS was pointed at gg1-roc-web1, so ran certbot --nginx to issue the
cert (same flow as the other 4 sites), then re-applied the security
headers/CSP/shared-asset alias blocks the same way as before. Site is
now live at https://events.gateway-gamers.net — verified header,
footer, images, and compiled CSS all resolve correctly.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 16:00:25 -05:00
mandaloreandClaude Sonnet 5 e4b314f418 Add missing package-lock.json for events site
npm ci requires a lockfile; I have no Node available in this sandbox
to generate one, so adapted scouting's (identical devDependencies
across every site in this repo) and renamed the two embedded package
names to match.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 15:56:20 -05:00
mandaloreandClaude Sonnet 5 58d930f289 Add events.gateway-gamers.net: upcoming events across BCP circuits
New 5th site in the monorepo, following the same shared header/footer/
images pattern as the others. Shows upcoming events for a configurable
list of BCP circuits (CONFIG.circuits in sites/events/src/main.js) —
adding a circuit is a one-line edit.

Data comes from the BCP API (`GET /v1/events?leagueId=<circuitId>`,
same auth-free headers the other sites already use) — "circuit" in
BCP's frontend URLs maps to `leagueId` in the API, confirmed via
/v1/leagues/<id> returning circuitLeague: true. Paginates newest-date-
first and stops once a full page has entirely concluded, so it doesn't
walk a circuit's whole history just to find the handful of upcoming
events. Verified against the live API for all 4 configured circuits
before writing this commit.

Nav cross-links with scouting only (per request), not the other 3
sites. nginx conf follows the same shared-asset-alias pattern as the
rest; TLS/DNS for the new subdomain still need to be provisioned
before it can go live (see follow-up).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 15:55:25 -05:00
mandaloreandClaude Sonnet 5 d0fee77bae Fix broken header styling: stop gitignoring generated header.html
Tailwind v4's automatic content detection skips gitignored files, and
public/header.html was gitignored (generated) — so every header-only
utility class (hero-carousel, navbar-center, swap-rotate,
menu-horizontal, drop-shadow-2xl, etc.) got purged from the compiled
CSS on the last deploy. The header markup was correct, just entirely
unstyled.

Fixed two ways for certainty: added an explicit @source in each
site's style.css (Tailwind's documented way to force-include a
gitignored path), and also stopped gitignoring public/header.html
so automatic detection picks it up regardless — matching how the
original per-site repos worked before this generated a real file.
predev/prebuild still regenerate it on every dev/build, so it can't
go stale.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 15:39:36 -05:00
mandaloreandClaude Sonnet 5 5db0fb4839 Fix refresh-elo cwd bug: use a subshell instead of && cd chain
If refresh_elo.py failed, the trailing '&& cd ../../..' never ran,
leaving the job's shell inside statcheck-elo-scraper/ for the
subsequent git commands — which then tried to add a doubly-nested,
nonexistent path and failed with a confusing pathspec error instead
of the real failure. A subshell scopes the cd regardless of the
script's exit status.

Found by manually triggering the new project's ELO-refresh schedule:
the underlying scraper is currently failing on its own (OneDrive
source URL now 404s) — that's a separate, pre-existing data-source
issue outside this repo, not something this commit addresses.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 15:35:38 -05:00
mandalore ababea0b1b chore: trigger pipeline to test runner association 2026-09-04 15:22:05 -05:00
mandaloreandClaude Sonnet 5 997e7dcd0b Sync nginx confs to match live production + add shared-asset aliases
The committed .conf files were stale pre-certbot templates that no
longer matched what's actually running on gg1-roc-web1 (certbot --nginx
had rewritten 40k-rankings/aos-rankings/kingmaker's structure, and in
the process 40k-rankings and aos-rankings lost their security headers
entirely). Replaced each with the true live config, plus the new
location /images/ and location = /footer.html alias blocks that were
applied directly on the server.

Also fixed on gg1-roc-web1 while there (not reflected in this repo,
just noting for the record):
- kingmaker's TLS cert had expired 2026-08-26; renewed.
- certbot-renew.timer was enabled but never started (box hasn't
  rebooted in 172 days), so nothing was auto-renewing; started it and
  ran a full certbot renew, which also caught 40k-rankings/aos-rankings
  sitting inside their renewal window.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 15:18:37 -05:00
mandaloreandClaude Sonnet 5 0ab611b6fc Consolidate gateway-gamers sites, dedupe shared header/footer/images
Merge the four independent gateway-gamers.net site repos (40k-rankings,
aos-rankings, kingmaker, scouting) into one monorepo under sites/,
preserving each site's full commit history via a manual subtree-style
merge (git-subtree isn't available in this environment).

- shared/: header.template.html (nav swapped in per site), footer.html,
  and images/ — previously byte-identical copies duplicated 4x (~100MB).
- Each site's public/footer.html and public/images are now symlinks into
  shared/; public/header.html is generated at predev/prebuild time from
  shared/header.template.html + the site's own nav.html, so nav bars stay
  individual while everything else about the header is shared.
- Single root .gitlab-ci.yml with path-scoped build/deploy jobs per site
  plus a deploy:shared job, replacing the 4 separate per-repo pipelines.
- nginx confs (kept per-site as reference, same as before) gain
  location /images/ and location = /footer.html alias blocks pointing at
  a shared webserver directory, so the deployed site no longer duplicates
  the images either — see README.md for the full layout and the runbook
  for applying this on the webserver.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
2026-09-04 14:59:06 -05:00
mandalore 60076ac885 Import scouting.gateway-gamers.net into monorepo 2026-09-04 14:55:10 -05:00
mandalore 3116ae3a1c Import kingmaker.gateway-gamers.net into monorepo 2026-09-04 14:55:10 -05:00
mandalore 0bd939a18e Import aos-rankings.gateway-gamers.net into monorepo 2026-09-04 14:55:10 -05:00
mandalore 3bb044da95 Import 40k-rankings.gateway-gamers.net into monorepo 2026-09-04 14:55:09 -05:00
GitLab CI c2401322e3 data: refresh stat-check ELO rankings 2026-08-19 02:03:16 +00:00
GitLab CI 5107799eea data: refresh stat-check ELO rankings 2026-08-12 02:03:22 +00:00
mandalore 420471942a feat: show career win% per player, drop unneeded Checked In column
Career record is fetched the same way the 40k-rankings site does:
sum wins/losses/ties across a player's full BCP placings history.
2026-08-06 18:23:57 -05:00
mandaloreandClaude Sonnet 5 820f434115 fix: default to first disposition when text lists two, e.g. "X (Y)"
Some sources list two dispositions together (a team template noting a
secondary/alternate, e.g. "Purge the Foe (Reconnaissance)"). Split on the
separators that join them and match segment-by-segment left to right, so
the first one listed wins instead of whichever scored closer across the
combined string.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-06 12:33:51 -05:00
mandaloreandClaude Sonnet 5 0d7da75d50 fix: match disposition abbreviations like "Recon" via prefix, not just typos
Levenshtein distance alone scored "Recon" too far from "Reconnaissance"
(9 edits) to pass the typo threshold, since it's a truncation rather than
a misspelling. Add a prefix check against each canonical name (and a
filler-word-stripped "core" form, so "Take Hold" matches "Take and Hold")
gated to 3+ characters to avoid collisions.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-06 12:30:05 -05:00
mandaloreandClaude Sonnet 5 6649f0e0da feat: fuzzy-match disposition names to the 5 canonical ITC dispositions
Hand-typed disposition text (submitted-list free text, BCP's own field)
often has small typos like "Priority Assests". Match it against the fixed
Purge the Foe / Take and Hold / Priority Assets / Disruption / Reconnaissance
list via Levenshtein distance so typo'd variants merge into the correct bar
instead of forking off as duplicates.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-06 12:26:00 -05:00
GitLab CI db9ee7a9cf data: refresh stat-check ELO rankings 2026-08-06 17:19:00 +00:00
mandaloreandClaude Sonnet 5 812e81e220 fix: allow inline styles in CSP so bar-chart widths actually apply
style-src 'self' (without unsafe-inline) silently blocks style="..."
attributes introduced via innerHTML — the CSS parses fine and the
attribute is present in the DOM, but the browser never applies it,
so every bar rendered at its track's full width regardless of its
real percentage. script-src stays locked down; this only loosens
CSS, and no untrusted external content is ever rendered into a
style attribute here.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-06 10:57:56 -05:00
mandaloreandClaude Sonnet 5 a077739e82 feat: initial BCP roster scouting tool
Paste a Best Coast Pairings event link to get roster-only stats:
faction/disposition distribution, per-team ITC rank rollups, and an
optional list-backfill for players missing faction/disposition data
(uses the viewer's own BCP auth token, stored client-side only).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-08-06 10:25:31 -05:00
mandalore 12f001d6f7 feat: add name blacklist to hide players from leaderboard
Adds a hidden player per request.
2026-08-02 17:53:30 -05:00
GitLab CI 755cffc405 data: refresh stat-check ELO rankings 2026-07-22 02:03:19 +00:00
GitLab CI 3e68394798 data: refresh stat-check ELO rankings 2026-07-15 02:03:17 +00:00
GitLab CI 9c64158578 data: refresh stat-check ELO rankings 2026-07-08 02:03:17 +00:00
mandaloreandClaude Sonnet 4.6 7fba5c7d44 fix: move lmcRankCell out of inner IIFE so it is in scope where used
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 09:40:58 -05:00
mandaloreandClaude Sonnet 4.6 f965334e57 feat: move LMC Rank column to sit next to ITC Rank
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 09:39:38 -05:00
mandaloreandClaude Sonnet 4.6 d9741062dc feat: add LMC Rank column alongside LMC Points
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 09:38:04 -05:00
mandaloreandClaude Sonnet 4.6 f33022fe92 feat: add LMC Points column fetched from BCP league cY0LeCAPfyiG
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-07-01 09:34:34 -05:00
GitLab CI 27b336f035 data: refresh stat-check ELO rankings 2026-07-01 02:03:19 +00:00
GitLab CI 24cf4a5872 data: refresh stat-check ELO rankings 2026-06-29 05:19:52 +00:00
mandaloreandClaude Sonnet 4.6 5f35c39caf ci: allow refresh-elo commit to trigger build and deploy
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 00:18:38 -05:00
GitLab CI f5fb3f78de data: refresh stat-check ELO rankings [skip ci] 2026-06-29 05:18:08 +00:00
mandaloreandClaude Sonnet 4.6 ae4a97e6b0 ci: exclude build and deploy from scheduled pipelines
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 00:16:59 -05:00
GitLab CI f642f8809c data: refresh stat-check ELO rankings [skip ci] 2026-06-29 05:14:35 +00:00
mandaloreandClaude Sonnet 4.6 c4e355dd63 feat: add ELO refresh job to GitLab CI and polish mobile display
- Add refresh-elo job to .gitlab-ci.yml triggered by schedules; runs
  the Python scraper and commits updated elo-data.json back to main
- Hide Stat-Check ELO column header on mobile (sm:hidden), fold ELO
  score as a subtitle under ITC Points on mobile instead

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 00:07:41 -05:00
mandaloreandClaude Sonnet 4.6 ea0c2f3a91 chore: remove lock file and ignore LibreOffice temp files
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 00:00:21 -05:00
mandaloreandClaude Sonnet 4.6 ac223a6909 feat: add Stat-Check ELO column with daily auto-refresh
- Scraper (statcheck-elo-scraper/refresh_elo.py) downloads the stat-check
  ELO workbook from OneDrive and builds public/elo-data.json
- GitHub Actions workflow (.github/workflows/refresh-elo.yml) runs daily
  at 06:00 UTC and commits updated ELO data
- Frontend fetches elo-data.json and matches players by name, using BCP
  career event history to disambiguate same-name candidates
- ELO score shown in new sortable Stat-Check ELO column, visible on all
  screen sizes; unmatched players show —

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-29 00:00:02 -05:00
mandaloreandClaude Sonnet 4.6 8687710d54 feat: add career W-L-T/Win% subtitles and mobile stat folding
Ports the career stats feature from the 40K rankings site: fetches
all-time W-L-T per player from BCP and shows it as a subtitle under
each season stat. Also folds W-L-T, ITC Rank, and Win% into the
Player and ITC Points cells on mobile so all stats are visible without
horizontal scrolling. Skeleton loader updated to match.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 23:48:50 -05:00
mandaloreandClaude Sonnet 4.6 7fcd721eee nav: add 40K Rankings link to header navigation
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-06-27 23:45:35 -05:00