feat(tba): P0 — TBA data foundation and webcast sync - #245
Merged
Conversation
…eams page Extend RBTournament with the enriched fields the RavenBrain backend now returns (webcastsFromTba, webcastsLastSync, webcastsStale, tbaEventKey) and surface them on the admin tournament-streams page. Each webcast URL gets a CB-safe source badge derived from webcastsFromTba membership: solid Tol-vibrant-cyan "From TBA" pill or outlined Tol-vibrant-grey "Manual override" pill. Text labels are the primary channel so users who cannot distinguish the two colours still see which source each URL comes from. When webcastsStale is true, an informational .banner-info appears above the streams list. Wording distinguishes between "last synced N ago" and "never synced — the TBA event key may be incorrect", so admins understand whether the problem is transient or a misconfiguration. TBA-sourced URLs have their Remove button disabled with a tooltip explaining the URL is served by TBA -- this prevents the no-op UX where Remove appeared to succeed but the URL reappeared on next render (backend DELETE only touches manual_webcasts). Adds .banner-info and the two badge styles to components.css with prefers-color-scheme: dark overrides so contrast stays readable on both light and dark themes.
Add a labelled input + Save/Clear buttons above the streams list on the
admin tournament-streams page so admins can correct the TBA event key
when FRC's auto-derived value ({year}{code}) doesn't match TBA --
common for district championships with divisional keys.
Client-side validation uses the same regex as the server
(/^20\d{2}[a-z][a-z0-9]{1,15}$/), lowercasing before compare so
"2026ONTO" is accepted and canonicalized to "2026onto". The Save
button mirrors the existing TournamentRow saving/msg pattern: disabled
during PUT, brief "Saved" fade on success, inline "Failed: reason" on
error (400 invalid format, 403 forbidden, 404 not found, or raw status
for anything else). A static hint below the input documents the
auto-derivation and override intent.
setTournamentTbaEventKey is added to rb.ts as the wrapper around the
new PUT /api/tournament/{id}/tba-event-key endpoint.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.