DevEx Improvements - #8
Conversation
|
Caution Review failedThe pull request is closed. 📝 WalkthroughWalkthroughThis PR introduces a comprehensive permission-based access control system using WorkOS, containerizes services with multi-stage Docker builds, refactors AI evaluation to domain-scoped models, and updates frontend routes with authentication guards. Changes span infrastructure, API backend, database schema, and frontend application. Changes
Sequence Diagram(s)sequenceDiagram
participant User as User/Browser
participant Frontend as Frontend App
participant Auth as Auth Service<br/>(WorkOS)
participant Backend as Backend API
participant DB as Database
User->>Frontend: Navigate to /admin
Frontend->>Backend: Check auth status
Backend->>Auth: Verify session
Auth-->>Backend: User + Permissions
Backend-->>Frontend: {user, permissions}
Frontend->>Frontend: Check hasPermission<br/>SUBMISSION_PERMISSIONS.READ
alt Insufficient Permissions
Frontend-->>User: Redirect with error
else Has Permission
Frontend->>Backend: Fetch submissions
Backend->>DB: Query submissions
DB-->>Backend: Submission list
Backend-->>Frontend: Data + metadata
Frontend-->>User: Render admin dashboard
end
sequenceDiagram
participant User as User/Browser
participant Frontend as Frontend
participant Backend as Backend API
participant AI as AI Service
participant DB as Database
User->>Frontend: Click Rerun on failed<br/>evaluation
Frontend->>Backend: rerunEvaluation mutation
Backend->>DB: Get submission files<br/>(with stored content)
DB-->>Backend: File records + content
Backend->>Backend: Reconstruct file blobs<br/>from stored content
Backend->>AI: POST /api/v1/evaluations/submit<br/>(files + domain_ids)
AI->>AI: run_evaluation_agent
AI-->>Backend: Evaluation results
Backend->>DB: Store EvaluationReport
Backend-->>Frontend: {success, report}
Frontend-->>User: Show results +<br/>dismiss loading state
Estimated code review effort🎯 4 (Complex) | ⏱️ ~70 minutes Possibly related PRs
Poem
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Summary by CodeRabbit
New Features
Documentation
Infrastructure
Dependencies