docs: update TODO with Next.js 16 breaking change fixes and root cause analysis

This commit is contained in:
2026-03-31 01:01:16 -07:00
parent 1729dacdec
commit 5be7022382
+24
View File
@@ -63,3 +63,27 @@
- All 84 unit tests passing - All 84 unit tests passing
- Database migrations applied successfully - Database migrations applied successfully
- TypeScript compilation has pre-existing errors unrelated to our changes - TypeScript compilation has pre-existing errors unrelated to our changes
### Completed After Commit 1729dac
#### Next.js 16 Breaking Change Fixes
- [x] Fixed `params.id` usage in all page components (must use `await params`)
- [x] Fixed `params.id` usage in all API routes (must use `await params`)
- [x] Updated client components to use `Promise<{ id: string }>` type
- [x] Added regression tests for Next.js 16 params Promise handling
- [x] 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