Fix World Cup group stage display and upcoming events #55

Merged
chrisp merged 2 commits from fix/world-cup-group-stage-display into main 2026-05-27 05:43:08 +00:00
Owner

Summary

  • Group stage match list: Removed MD 1/2/3 headings; matches now listed chronologically under date separators (e.g. "Jun 14"). Kick-off time appears below the team names instead of between them.
  • Sort order: `findMatchesByGroupIds` / `findMatchesByEventId` now order by `scheduledAt ASC NULLS LAST` so unscheduled matches always trail scheduled ones.
  • Groups/Bracket toggle: When both group stage and knockout bracket exist, a toggle appears (mirroring the NBA/AFL standings toggle). Sports with both regular-season standings and a group stage get all views available.
  • Upcoming events: `getUpcomingEventsForDraftedParticipants` now also queries `groupStageMatches`, so World Cup group fixtures appear on the home page calendar sorted by kick-off time with a label like "Group A — France vs Germany".
  • `isAllCompete` fix: `UpcomingEventsCard` and `UpcomingCalendarPanel` now treat `group_stage_match` as a bracket-style event, showing team badges instead of "N of your picks".

Fixes #53

Test plan

  • Navigate to a World Cup sports season page — groups should be listed chronologically under date headers with no MD labels; kick-off time should appear below each match row
  • Once the knockout bracket has matches, confirm the Groups/Bracket toggle appears and both views render correctly
  • On the home page, a user with drafted World Cup participants should see upcoming group fixtures in the calendar panel with individual team badges (not a participant count)
  • NBA/AFL/NHL pages unaffected — their standings/playoffs/finished toggle still works normally
  • `npm run typecheck` and `npm run test:run` pass
## Summary - **Group stage match list**: Removed MD 1/2/3 headings; matches now listed chronologically under date separators (e.g. "Jun 14"). Kick-off time appears below the team names instead of between them. - **Sort order**: \`findMatchesByGroupIds\` / \`findMatchesByEventId\` now order by \`scheduledAt ASC NULLS LAST\` so unscheduled matches always trail scheduled ones. - **Groups/Bracket toggle**: When both group stage and knockout bracket exist, a toggle appears (mirroring the NBA/AFL standings toggle). Sports with both regular-season standings and a group stage get all views available. - **Upcoming events**: \`getUpcomingEventsForDraftedParticipants\` now also queries \`groupStageMatches\`, so World Cup group fixtures appear on the home page calendar sorted by kick-off time with a label like "Group A — France vs Germany". - **\`isAllCompete\` fix**: \`UpcomingEventsCard\` and \`UpcomingCalendarPanel\` now treat \`group_stage_match\` as a bracket-style event, showing team badges instead of "N of your picks". Fixes #53 ## Test plan - [ ] Navigate to a World Cup sports season page — groups should be listed chronologically under date headers with no MD labels; kick-off time should appear below each match row - [ ] Once the knockout bracket has matches, confirm the Groups/Bracket toggle appears and both views render correctly - [ ] On the home page, a user with drafted World Cup participants should see upcoming group fixtures in the calendar panel with individual team badges (not a participant count) - [ ] NBA/AFL/NHL pages unaffected — their standings/playoffs/finished toggle still works normally - [ ] \`npm run typecheck\` and \`npm run test:run\` pass
chrisp added 1 commit 2026-05-27 05:26:31 +00:00
Fix World Cup group stage display and upcoming events
Some checks failed
🚀 Deploy / 🧪 Test (pull_request) Failing after 1m29s
🚀 Deploy / ʦ TypeScript (pull_request) Successful in 1m16s
🚀 Deploy / 🔍 Lint (pull_request) Successful in 49s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
cce1115a4d
- Remove MD 1/2/3 grouping from GroupStageStandings; list matches
  chronologically under date separators (Jun 14, Jun 18, etc.)
- Fix MatchResult layout: show kick-off time below team names instead
  of sandwiching the date between them
- Sort group stage matches by scheduledAt ASC NULLS LAST in the model
  so unscheduled matches always trail scheduled ones
- Add Groups/Bracket toggle to the sports season page when both a group
  stage and knockout bracket exist, mirroring the NBA/AFL standings toggle;
  sports with both standings and group stage now include all three views
- Include group stage matches in getUpcomingEventsForDraftedParticipants
  so World Cup fixtures appear on the home page calendar
- Fix isAllCompete check in UpcomingEventsCard and UpcomingCalendarPanel
  to treat group_stage_match as a bracket-style event (shows team badges,
  not "N of your picks")

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
chrisp added 1 commit 2026-05-27 05:35:45 +00:00
Fix test mocks for group stage upcoming events changes
All checks were successful
🚀 Deploy / 🧪 Test (pull_request) Successful in 1m29s
🚀 Deploy / ʦ TypeScript (pull_request) Successful in 1m19s
🚀 Deploy / 🔍 Lint (pull_request) Successful in 47s
🚀 Deploy / 🐳 Build (pull_request) Has been skipped
🚀 Deploy / 🚀 Deploy (pull_request) Has been skipped
e6f3c396ae
Add groupStageMatches, tournamentGroups, and seasonParticipants to
the schema mock, add db.select mock for the group stage query, and
wire default empty results into all bracket-path beforeEach hooks.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
chrisp merged commit a9d4954242 into main 2026-05-27 05:43:08 +00:00
Sign in to join this conversation.
No description provided.