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
This commit is contained in:
2026-09-04 16:26:51 -05:00
co-authored by Claude Sonnet 5
parent 17093e3d25
commit 83b6a2069d
2 changed files with 104 additions and 29 deletions
+10
View File
@@ -18,6 +18,16 @@
<p class="text-sm opacity-50 uppercase tracking-widest mt-1">Across the circuits Gateway Gamers follows</p>
</div>
<!-- Filters: toggle any combination off to narrow the list below -->
<div class="flex flex-wrap items-center gap-2 mb-8" id="filters">
<span class="text-xs uppercase tracking-widest opacity-50 mr-1">Format</span>
<button type="button" class="btn btn-sm btn-outline btn-active" data-filter-group="format" data-filter-value="Singles">Singles</button>
<button type="button" class="btn btn-sm btn-outline btn-active" data-filter-group="format" data-filter-value="Team Event">Team Event</button>
<span class="text-xs uppercase tracking-widest opacity-50 ml-3 mr-1">Scope</span>
<button type="button" class="btn btn-sm btn-outline btn-active" data-filter-group="scope" data-filter-value="RTT">RTT</button>
<button type="button" class="btn btn-sm btn-outline btn-active" data-filter-group="scope" data-filter-value="GT">GT</button>
</div>
<!-- Loading skeleton -->
<div class="space-y-8" id="loading">
<div class="space-y-3">