fix(finale): live-verification fixes — session sync on start, honest vote form, reveal panel polish
All checks were successful
Build and Push Docker Image / build (push) Successful in 10m43s
All checks were successful
Build and Push Docker Image / build (push) Successful in 10m43s
Found by driving the full ceremony end-to-end in the browser: - live.start + startPresentation sync LiveVotingSession (status/currentProjectId) — jury votes silently failed when the admin never used sendToScreens - LiveVotingForm no longer shows 'submitted' on a failed mutation; pages re-key on votedAt so async vote data renders the right state after refresh - reveal compose prefers DELIB_LOCKED deliberation results over jury score order (listSessions now includes results); Arm unlocks right after save - deliberation jury page review cards re-key on revision Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -320,6 +320,10 @@ export const deliberationRouter = router({
|
||||
participants: {
|
||||
select: { userId: true },
|
||||
},
|
||||
results: {
|
||||
select: { projectId: true, finalRank: true, isAdminOverridden: true },
|
||||
orderBy: { finalRank: 'asc' },
|
||||
},
|
||||
},
|
||||
orderBy: { createdAt: 'desc' },
|
||||
})
|
||||
|
||||
@@ -126,6 +126,13 @@ export const liveRouter = router({
|
||||
},
|
||||
})
|
||||
|
||||
// Keep the voting session in lockstep from the very start so jury
|
||||
// votes target the active project (a session may not exist yet).
|
||||
await tx.liveVotingSession.updateMany({
|
||||
where: { roundId: input.roundId },
|
||||
data: { currentProjectId: input.projectOrder[0], status: 'IN_PROGRESS' },
|
||||
})
|
||||
|
||||
return created
|
||||
})
|
||||
|
||||
@@ -485,6 +492,11 @@ export const liveRouter = router({
|
||||
: {}),
|
||||
},
|
||||
})
|
||||
// Sync the voting session even when the admin skips sendToScreens
|
||||
await ctx.prisma.liveVotingSession.updateMany({
|
||||
where: { roundId: input.roundId },
|
||||
data: { currentProjectId: cursor.activeProjectId, status: 'IN_PROGRESS' },
|
||||
})
|
||||
await logAudit({
|
||||
prisma: ctx.prisma,
|
||||
userId: ctx.user.id,
|
||||
|
||||
Reference in New Issue
Block a user