As a tournament admin, I want a Schedule tab to view round matchups #7

Closed
opened 2026-04-01 00:09:52 +00:00 by david · 2 comments
Owner

#7 As a tournament admin, I want a Schedule tab to view round matchups

Original Acceptance Criteria

  • Schedule tab added to tournament detail page
  • Displays round-robin schedule with round numbers
  • Shows bracket matchups for elimination tournaments
  • Allows re-scheduling matches (drag and drop or edit)
  • Matches are linkable to result entry

Expanded Scope (In Progress)

Additional Acceptance Criteria

  • Round-robin schedule generator creates TournamentRound and BracketMatchup records from existing teams
  • Generator handles even and odd team counts (bye rounds for odd)
  • Each team plays every other team exactly once across generated rounds
  • "Generate Schedule" button on schedule page (when no rounds exist)
  • Round status tracking: pending / in_progress / completed
  • Matchup status links to match result entry when a match has been played
  • Tab navigation on tournament detail page is functional (all tabs navigate to sub-pages)
  • API endpoint: GET /api/tournaments/[id]/schedule returns rounds with matchups
  • API endpoint: POST /api/tournaments/[id]/schedule generates schedule
  • Unit tests for round-robin generator algorithm
  • E2E tests for schedule generation and viewing

Technical Plan (Completed)

  • src/lib/schedule-generator.ts — pure round-robin algorithm
  • src/app/api/tournaments/[id]/schedule/route.ts — GET/POST API
  • src/app/admin/tournaments/[id]/schedule/page.tsx — schedule view
  • src/components/ScheduleGenerator.tsx — client component for generate button
  • Convert tab buttons to Links in src/app/admin/tournaments/[id]/page.tsx

Deferred (future work)

  • Drag-and-drop re-scheduling (needs TournamentRound generation first)
  • Single/double elimination bracket generation
  • Editing individual matchup table assignments

Related

  • Issue #22: Team configuration options (blocks this issue for variable teams)
# #7 As a tournament admin, I want a Schedule tab to view round matchups ## Original Acceptance Criteria - [ ] Schedule tab added to tournament detail page - [ ] Displays round-robin schedule with round numbers - [ ] Shows bracket matchups for elimination tournaments - [ ] Allows re-scheduling matches (drag and drop or edit) - [ ] Matches are linkable to result entry ## Expanded Scope (In Progress) ### Additional Acceptance Criteria - [x] Round-robin schedule generator creates TournamentRound and BracketMatchup records from existing teams - [x] Generator handles even and odd team counts (bye rounds for odd) - [x] Each team plays every other team exactly once across generated rounds - [x] "Generate Schedule" button on schedule page (when no rounds exist) - [x] Round status tracking: pending / in_progress / completed - [x] Matchup status links to match result entry when a match has been played - [x] Tab navigation on tournament detail page is functional (all tabs navigate to sub-pages) - [x] API endpoint: GET /api/tournaments/[id]/schedule returns rounds with matchups - [x] API endpoint: POST /api/tournaments/[id]/schedule generates schedule - [x] Unit tests for round-robin generator algorithm - [ ] E2E tests for schedule generation and viewing ### Technical Plan (Completed) - [x] src/lib/schedule-generator.ts — pure round-robin algorithm - [x] src/app/api/tournaments/[id]/schedule/route.ts — GET/POST API - [x] src/app/admin/tournaments/[id]/schedule/page.tsx — schedule view - [x] src/components/ScheduleGenerator.tsx — client component for generate button - [x] Convert tab buttons to Links in src/app/admin/tournaments/[id]/page.tsx ### Deferred (future work) - Drag-and-drop re-scheduling (needs TournamentRound generation first) - Single/double elimination bracket generation - Editing individual matchup table assignments ## Related - Issue #22: Team configuration options (blocks this issue for variable teams)
david added the epic:tournament-managementfeatureui labels 2026-04-01 00:10:49 +00:00
Author
Owner

Expanded Scope (working on this now)

Additional Acceptance Criteria

  • Round-robin schedule generator creates TournamentRound and BracketMatchup records from existing teams
  • Generator handles even and odd team counts (bye rounds for odd)
  • Each team plays every other team exactly once across generated rounds
  • "Generate Schedule" button on schedule page (when no rounds exist)
  • Round status tracking: pending / in_progress / completed
  • Matchup status links to match result entry when a match has been played
  • Tab navigation on tournament detail page is functional (all tabs navigate to sub-pages)
  • API endpoint: GET /api/tournaments/[id]/schedule returns rounds with matchups
  • API endpoint: POST /api/tournaments/[id]/schedule generates schedule
  • Unit tests for round-robin generator algorithm
  • E2E tests for schedule generation and viewing

Technical Plan

  • src/lib/schedule-generator.ts — pure round-robin algorithm
  • src/app/api/tournaments/[id]/schedule/route.ts — GET/POST API
  • src/app/admin/tournaments/[id]/schedule/page.tsx — schedule view
  • src/components/ScheduleGenerator.tsx — client component for generate button
  • Convert tab buttons to Links in src/app/admin/tournaments/[id]/page.tsx

Deferred (future work)

  • Drag-and-drop re-scheduling (needs TournamentRound generation first)
  • Single/double elimination bracket generation
  • Editing individual matchup table assignments
## Expanded Scope (working on this now) ### Additional Acceptance Criteria - [ ] Round-robin schedule generator creates `TournamentRound` and `BracketMatchup` records from existing teams - [ ] Generator handles even and odd team counts (bye rounds for odd) - [ ] Each team plays every other team exactly once across generated rounds - [ ] "Generate Schedule" button on schedule page (when no rounds exist) - [ ] Round status tracking: pending / in_progress / completed - [ ] Matchup status links to match result entry when a match has been played - [ ] Tab navigation on tournament detail page is functional (all tabs navigate to sub-pages) - [ ] API endpoint: `GET /api/tournaments/[id]/schedule` returns rounds with matchups - [ ] API endpoint: `POST /api/tournaments/[id]/schedule` generates schedule - [ ] Unit tests for round-robin generator algorithm - [ ] E2E tests for schedule generation and viewing ### Technical Plan - `src/lib/schedule-generator.ts` — pure round-robin algorithm - `src/app/api/tournaments/[id]/schedule/route.ts` — GET/POST API - `src/app/admin/tournaments/[id]/schedule/page.tsx` — schedule view - `src/components/ScheduleGenerator.tsx` — client component for generate button - Convert tab buttons to Links in `src/app/admin/tournaments/[id]/page.tsx` ### Deferred (future work) - Drag-and-drop re-scheduling (needs TournamentRound generation first) - Single/double elimination bracket generation - Editing individual matchup table assignments
Author
Owner

PR #27 Implementation Update

This issue was partially implemented in PR #27 (bb6be24).

What was completed:

  1. Schedule Tab Infrastructure

    • Added tab navigation to tournament detail page
    • Created schedule page at /admin/tournaments/[id]/schedule
    • Implemented "Generate Schedule" button UI
  2. Schedule Generator Logic (src/lib/schedule-generator.ts)

    • Round-robin algorithm for even and odd team counts
    • Bye round handling for odd number of teams
    • Creates TournamentRound and BracketMatchup records
  3. API Endpoints

    • GET /api/tournaments/[id]/schedule - returns rounds with matchups
    • POST /api/tournaments/[id]/schedule - generates schedule
  4. Database Schema Updates

    • Added fields for tournament configuration
    • Support for round-robin and bracket generation

⚠️ Partial Testing:

  • 1 active scenario: "Tournament admin views schedule page for tournament"
  • 3 scenarios marked @wip (work in progress):
    • Generate round-robin schedule
    • View schedule with bye rounds
    • Click matchup to enter results

📋 Remaining Work:

  • Full E2E test coverage for schedule generation
  • Elimination bracket generation (separate from round-robin)
  • Drag-and-drop re-scheduling
  • Matchup editing interface

Next Steps:

The basic schedule infrastructure is in place. The remaining work is primarily:

  1. Completing E2E tests for schedule generation
  2. Adding bracket visualization for elimination tournaments
  3. Implementing drag-and-drop for rescheduling

The core round-robin generation works, but needs more testing and the UI needs refinement for production use.

## PR #27 Implementation Update This issue was partially implemented in PR #27 (bb6be24). ### ✅ What was completed: 1. **Schedule Tab Infrastructure** - Added tab navigation to tournament detail page - Created schedule page at `/admin/tournaments/[id]/schedule` - Implemented "Generate Schedule" button UI 2. **Schedule Generator Logic** (`src/lib/schedule-generator.ts`) - Round-robin algorithm for even and odd team counts - Bye round handling for odd number of teams - Creates TournamentRound and BracketMatchup records 3. **API Endpoints** - `GET /api/tournaments/[id]/schedule` - returns rounds with matchups - `POST /api/tournaments/[id]/schedule` - generates schedule 4. **Database Schema Updates** - Added fields for tournament configuration - Support for round-robin and bracket generation ### ⚠️ Partial Testing: - 1 active scenario: "Tournament admin views schedule page for tournament" - 3 scenarios marked @wip (work in progress): - Generate round-robin schedule - View schedule with bye rounds - Click matchup to enter results ### 📋 Remaining Work: - [ ] Full E2E test coverage for schedule generation - [ ] Elimination bracket generation (separate from round-robin) - [ ] Drag-and-drop re-scheduling - [ ] Matchup editing interface ### Next Steps: The basic schedule infrastructure is in place. The remaining work is primarily: 1. Completing E2E tests for schedule generation 2. Adding bracket visualization for elimination tournaments 3. Implementing drag-and-drop for rescheduling The core round-robin generation works, but needs more testing and the UI needs refinement for production use.
david closed this issue 2026-05-02 01:26:15 +00:00
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: david/euchre_camp#7