drive.file scope only grants access to files the app itself creates —
it deliberately can't see a file it didn't create, even one the
signed-in user can otherwise view. Drive's API returns 404 (not 403)
for a file outside the token's grant, which is indistinguishable from
a bad file ID — that's what surfaced as "File not found:
1tSG1BxqLwmMtwFnaHozaLqVsKlmk_QsCXRorIxQBcMo" on the very first API
call (confirmed nothing was created in Drive yet, matching a rejected
initial copy rather than a later step).
Added drive.readonly alongside drive.file: readonly covers reading
the pre-existing template to copy it, drive.file continues to cover
the generated copies and everything written to them afterward.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01SBzcNkW7JcYipnAX6HfgmK
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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
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>
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>
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>
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>
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>
- 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>
- 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>
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>