Add visual progress indicator for AI assignment batches
- Add AssignmentJob model to track AI assignment progress - Create startAIAssignmentJob mutation for background processing - Add getAIAssignmentJobStatus query for polling progress - Update AI assignment service with progress callback support - Add progress bar UI showing batch/project processing status - Add toast notifications for job completion/failure - Add AI_SUGGESTIONS_READY notification type Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
@@ -374,6 +374,7 @@ model Round {
|
||||
filteringRules FilteringRule[]
|
||||
filteringResults FilteringResult[]
|
||||
filteringJobs FilteringJob[]
|
||||
assignmentJobs AssignmentJob[]
|
||||
|
||||
@@index([programId])
|
||||
@@index([status])
|
||||
@@ -1092,6 +1093,38 @@ enum FilteringJobStatus {
|
||||
FAILED
|
||||
}
|
||||
|
||||
// Tracks progress of long-running AI assignment jobs
|
||||
model AssignmentJob {
|
||||
id String @id @default(cuid())
|
||||
roundId String
|
||||
status AssignmentJobStatus @default(PENDING)
|
||||
totalProjects Int @default(0)
|
||||
totalBatches Int @default(0)
|
||||
currentBatch Int @default(0)
|
||||
processedCount Int @default(0)
|
||||
suggestionsCount Int @default(0)
|
||||
errorMessage String? @db.Text
|
||||
startedAt DateTime?
|
||||
completedAt DateTime?
|
||||
fallbackUsed Boolean @default(false)
|
||||
|
||||
createdAt DateTime @default(now())
|
||||
updatedAt DateTime @updatedAt
|
||||
|
||||
// Relations
|
||||
round Round @relation(fields: [roundId], references: [id], onDelete: Cascade)
|
||||
|
||||
@@index([roundId])
|
||||
@@index([status])
|
||||
}
|
||||
|
||||
enum AssignmentJobStatus {
|
||||
PENDING
|
||||
RUNNING
|
||||
COMPLETED
|
||||
FAILED
|
||||
}
|
||||
|
||||
// =============================================================================
|
||||
// SPECIAL AWARDS SYSTEM
|
||||
// =============================================================================
|
||||
|
||||
Reference in New Issue
Block a user