Files
euchre_camp/docs/TODO.md
T
david 1cd2cbd0a6
Pull Request / unit-tests (pull_request) Failing after 1m14s
Pull Request / acceptance-tests (pull_request) Has been skipped
Pull Request / analyze-bump-type (pull_request) Has been skipped
feat: update CI/CD to use Bun
- Update Dockerfile to use oven/bun:alpine image
- Update PR workflow to use Bun (oven/setup-bun action)
- Update Test workflow to use Bun
- Update Release workflow to use Bun
- Remove test.yml workflow (redundant with PR workflow)
- Update Docker build commands to use Bun
- Docker build verified working
2026-04-01 00:21:25 -07:00

5.5 KiB

EuchreCamp - Todo List

Current Tasks

Completed

  • Add site_admin role to database schema and permissions system
  • Add isCasual boolean field to Match model (already existed)
  • Update match upload API to support casual matches
  • Update match upload UI to include casual checkbox
  • Add tournament deletion API endpoint with delete/orphan options
  • Add delete tournament button and modal to tournament detail page
  • Run tests and verify implementation (84 tests passing)
  • Fix session issues with tournament admin access
  • Fix Elo recalculation error for player merge (delete elo snapshots before deleting players)
  • Add admin player management page
  • Add player name editing functionality in admin UI
  • Add admin panel links to navigation header
  • Add tournament update API endpoint (PUT /api/tournaments/[id])
  • Consolidate delete endpoint from admin API to main tournaments API
  • Update database schema to add variant scoring fields (targetScore, allowTies)
  • Fix tie handling logic in partnership stats (ties now correctly tracked)
  • Fix test files for normalizedName field in Player model
  • Fix auth.ts to include normalizedName in Player creation
  • Write TODO list to repository file
  • Auto-create tournament when uploading matches without selecting one

In Progress 🔄

  • Update API routes to handle new variant scoring fields
  • Update EditTournamentForm to add variant scoring controls
  • Update MatchEditor to use tournament-specific target score
  • Run tests and verify variant scoring implementation

Recently Completed

  • Update CI/CD workflows to use Bun (PR, release)
  • Update Dockerfile to use Bun Alpine image
  • Update PR workflow to use Bun
  • Update Release workflow to use Bun
  • Remove test.yml workflow (redundant)
  • Verify Docker build with Bun

Recently Completed

  • Fix Prisma build error in CI pipeline (Docker build failure due to missing DATABASE_URL validation)
  • Add defensive checks to src/lib/prisma.ts to prevent build failures
  • Migrate from npm to Bun package manager
  • Migrate unit tests (Vitest → Bun test runner)
  • Migrate component tests (Vitest → Bun test runner)
  • Configure Bun with DOM environment for React Testing Library
  • Keep Playwright for E2E tests (hybrid approach)

Recently Completed

  • Add OpenSkill rating system support (src/lib/openskill-utils.ts)
  • Add Glicko2 rating system support (src/lib/glicko2-utils.ts)
  • Reset database and run all migrations from scratch
  • Regenerate Prisma client with new rating models
  • Update match upload page to auto-create tournament if none selected
  • Update all admin scripts to use PrismaPg adapter and dotenv
  • Fix match diagram player positioning
  • Add CasaOS deployment configuration and documentation
  • Create migration to add rating system tables (elo_ratings, glicko2_ratings, open_skill_ratings)
  • Add tabbed rankings page to display Elo, OpenSkill, and Glicko2 ratings

Backlog 📋

  • Add UI controls for variant scoring in tournament creation/edit
  • Test variant tournament functionality end-to-end
  • Add validation for tie scores based on tournament configuration
  • Document variant tournament features

Recently Completed (Detailed)

Variant Euchre Scoring Support

  • Added targetScore and allowTies fields to Event model
  • Created database migration for new fields
  • Fixed partnership stats tie handling (ties now increment neither wins nor losses)
  • Updated Elo calculation functions to handle ties correctly (0.5 points for draw)

Tournament Deletion

  • Consolidated delete endpoint to /api/tournaments/[id]
  • Added options to delete matches or orphan them
  • Updated DeleteTournamentButton to use consolidated endpoint

Player Management

  • Added admin players page at /admin/players
  • Added player name editing functionality via PATCH endpoint
  • Added player merge functionality with automatic Elo recalculation
  • Fixed foreign key constraint issues with elo_snapshots

Permissions

  • Added site_admin role as highest privilege level
  • Updated all permission functions to include site_admin support
  • Fixed session cache issues by reading roles from database

Notes

  • All 84 unit tests passing
  • Database migrations applied successfully
  • TypeScript compilation has pre-existing errors unrelated to our changes

Completed After Commit 1729dac

Next.js 16 Breaking Change Fixes

  • Fixed params.id usage in all page components (must use await params)
  • Fixed params.id usage in all API routes (must use await params)
  • Updated client components to use Promise<{ id: string }> type
  • Added regression tests for Next.js 16 params Promise handling
  • Verified all 100 unit tests pass

Files Updated:

  • Player pages: profile.tsx, schedule.tsx
  • Tournament pages: page.tsx, results.tsx, edit.tsx, entry.tsx
  • API routes: admin/players/[id]/route.ts, users/[id]/route.ts, users/[id]/role/route.ts
  • Tournament API routes: [id]/route.ts, [id]/participants/route.ts, [id]/games/bulk/route.ts

Root Cause

Next.js 16 requires params to be awaited in both server components and API routes:

  • Before: const { id } = params
  • After: const { id } = await params

This was not caught by the unit test suite because:

  • Unit tests test individual functions in isolation
  • E2E tests (Playwright) would catch this but weren't run after the upgrade