Repository navigation
Add public competition pages and scouting analytics - #82
jackshim415 wants to merge 47 commits into
Conversation
|
🚅 Deployed to the lovat-pr-82 environment in lovat
|
Codex Review SummaryThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
There was a problem hiding this comment.
💡 Codex Review
Here are some automated review suggestions for this pull request.
Reviewed commit: fa0bd3550c
ℹ️ About Codex in GitHub
Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you
- Open a pull request for review
- Mark a draft as ready
- Comment "@codex review".
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
| if ( | ||
| existing && | ||
| ((existing.matchKey && existing.matchKey !== match.key) || | ||
| (existing.teamNumber !== teamNumber && | ||
| existing._count.scoutReports > 0)) |
There was a problem hiding this comment.
Retire the server's competing match writer
When a TBA station assignment changes after a report exists, this guard correctly rejects reassignment, but the still-active server path calls addTournamentMatches() from apps/server/src/handler/manager/getMatches.ts:48 and unconditionally overwrites the same TeamMatchData.teamNumber in addTournamentMatches.ts:176-191. Because that writer also uses a separate legacy ETag, deploying both services lets a request to the server bypass this reconciliation check and silently attach existing scouting reports to the replacement team; disable or update the server writer as part of this cross-app ingestion change.
AGENTS.md reference: AGENTS.md:L27-L28
Useful? React with 👍 / 👎.
| const ordered = [...matches].sort( | ||
| (a, b) => | ||
| levels[a.competitionLevel] - levels[b.competitionLevel] || | ||
| a.setNumber - b.setNumber || | ||
| a.matchNumber - b.matchNumber, |
There was a problem hiding this comment.
Order bracket games by their scheduled sequence
For historical playoff formats that alternate series—such as qf1m1, qf2m1, …, followed by qf1m2—sorting by setNumber before matchNumber instead groups every game from one series together. The resulting gap rows connect matches that were not adjacent in the event schedule and can classify ordinary intervening matches as long breaks; use the imported display/scheduled order or a format-specific canonical order instead.
Useful? React with 👍 / 👎.
Expose selected public competition data for 2026cancmp and display match results, inferred breaks, and a searchable team roster using Lovat styling.
Use local TBA avatars with sampled gradients and verified event award markers for the fixed 2026cancmp page. Align participants by station, name upper and lower bracket matches, and center alliance-colored scores in each match header.
Show the eight selected alliances and connect upper/lower bracket results using imported match data. Share the tournament loader between pages and use local Material SVGs for reliable award markers.
Switch tournament views inline so schedule, teams, and alliances keep the same URL and event header.
Import alliance selections, awards, season avatars, and regular-season weeks so public pages work with any imported event. Group district events by week and championship, add credited California town backgrounds, and load roster icons near the viewport.
Show disqualified team identities with a strikethrough and size alliance cards for every selected member and backup. Add a basic season page linking imported districts and non-district events through a public competition-only API.
Pass the role distribution into the path calculation so Svelte updates the slice shapes along with their labels.
# Conflicts: # apps/worker/README.md
What changed
Add public competition browsing and Lovat scouting analytics to the Website. Season and district pages organize events by week and nest championship divisions. Tournament pages share Schedule, Teams, and Alliances views; team pages show event records, awards, alliance details, robot photos, and configurable scoring/feeding graphs with role breakdowns. Match pages show official results, scouting metrics, adjacent matches, predictions, and video/resource links.
Search provides team/event suggestions and direct team-number navigation. Shared match cards display scores, DQs, role icons, and available predictions. Credited location photos and deterministic FRC fallbacks supply event backgrounds; Worlds uses broadcast-style symbols. The layout follows Dashboard/Magnolia styling and supports mobile screens.
Public Server routes select competition fields and approved scouting aggregates only. All-team public aggregate access was explicitly approved by the maintainer. Raw reports, notes, identities, source identities, and robot paths remain private. Signed-in predictions retain existing source filters and take precedence; unsupported seasons and unavailable values remain hidden. Scouting metrics currently support 2026.
Dependency and deployment
#83 is merged. This PR is now based on
main; its diff excludes all shared schema migrations, worker code, worker CI, and API import handoff. The prerequisite was merged with a merge commit, preserving ancestry and avoiding duplicate infrastructure changes.The existing
lovat-pr-82environment and populated database are retained. Its original sanitized backup remains untouched. A fresh snapshot was also made while splitting the PR. The schema/worker preview uses a separate copy; changes in either preview do not synchronize automatically.Website/API deploy after the schema and worker. Configure Website API/signing references and Auth0 callback, web-origin, and logout allowlists for the production domain. The maintainer has already allowlisted the #82 Website preview.
Verification