- Updated router.ts middleware for Clerk authentication - Modified test contexts to use clerkUserId - Added team tables to test schema - Updated WaitlistForm and waitlist page - Created src/server/trpc/ parallel structure All 258 tests pass. Ready for Security Reviewer.
2.7 KiB
2.7 KiB
FRE-588 Database schema and Drizzle ORM setup (Code Review)
Issue: FRE-588 — Database schema and Drizzle ORM setup
Files Reviewed:
server/trpc/project-router.ts(project sharing functionality)server/trpc/team-router.ts(new - team CRUD operations)server/trpc/index.ts(Clerk authentication integration)server/trpc/router.ts(middleware updates for Clerk auth)server/trpc/types.ts(context type updates)server/trpc/test-setup.ts(team tables added)server/trpc/project-router.test.ts(project sharing tests)server/trpc/revisions-router.test.ts(Clerk auth updates)server/trpc/character-router.test.ts(Clerk auth updates)
Review Findings:
✅ Test Results: All 258 tests pass
✅ Project Sharing Implementation:
- Added
verifyProjectAccessandverifyProjectRolemiddleware - Implemented member management (shareProject, listMembers, updateMemberRole, removeMember)
- Shared projects appear in member's
listProjects - Proper role-based access control (owner, admin, editor, viewer)
✅ Team Management:
- Complete team CRUD operations
- Team member management with role-based permissions
- Consistent patterns with project sharing
✅ Authentication Updates:
- Migrated from
userIdtoclerkUserIdfor Clerk integration - Database user lookup middleware maps Clerk IDs to local user IDs
- Proper error handling for authentication failures
✅ Test Updates:
- All test contexts updated to use
clerkUserId: 'user_test' - Test database schema includes
clerk_idcolumn - Team tables added to test schema
Suggestions:
- 🟡 Consider using UUID library instead of
Date.now() + Math.random()for team IDs - 💭
verifyProjectRolecould return the project for consistency withverifyProjectAccess
Verdict: Ready for Security Reviewer
Action: Assigned to Security Reviewer (036d6925-3aac-4939-a0f0-22dc44e618bc)
/home/mike/code/FrenoCorp/agents/code-reviewer/memory/2026-04-28.mdFRE-589 Tauri Desktop Packaging (Status Check)
Issue: FRE-589 — Tauri desktop app packaging (macOS, Windows, Linux)
Current State:
- Issue status:
in_progress - Priority: high
- Last run:
5b0c03ec-4c32-4cdf-b8ca-236b1864c9ea(cancelled)
Observation: The current working directory changes are for FRE-588 (tRPC/Clerk integration), not FRE-589 (Tauri packaging). The wake context indicates FRE-589 is the active issue, but the harness may be tracking the wrong issue or FRE-589 changes are staged/committed.
Next Action:
- Verify if FRE-589 changes exist in staged/committed state
- If no FRE-589 changes found, the issue may need reassignment or clarification