Observer: fix round history, match admin project info, add AI rejection reason
All checks were successful
Build and Push Docker Image / build (push) Successful in 8m30s

- Round history infers rejection round when ProjectRoundState lacks explicit
  REJECTED state; shows red XCircle + badge, dims unreached rounds
- Project info section now matches admin: description, location, founded,
  submission links, expertise tags, internal notes, created/updated dates
- Fetch FilteringResult for rejected projects; display AI reasoning + confidence
- Remove cross-round comparison from reports, replace with scoring/criteria insights
- Remove unused AI synthesis placeholder

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-20 23:30:14 +01:00
parent 9f7b76b3cb
commit d717040f03
3 changed files with 443 additions and 159 deletions

View File

@@ -1317,6 +1317,21 @@ export const analyticsRouter = router({
select: { roundId: true, state: true, enteredAt: true, exitedAt: true },
})
// Get filtering result (AI screening) for rejected projects
const filteringResult = projectRaw.status === 'REJECTED'
? await ctx.prisma.filteringResult.findFirst({
where: { projectId: input.id },
select: {
outcome: true,
finalOutcome: true,
aiScreeningJson: true,
overrideReason: true,
round: { select: { id: true, name: true } },
},
orderBy: { createdAt: 'desc' },
})
: null
// Get file requirements for all rounds
let allRequirements: { id: string; roundId: string; name: string; description: string | null; isRequired: boolean; acceptedMimeTypes: string[]; maxSizeMB: number | null }[] = []
if (competitionRounds.length > 0) {
@@ -1360,6 +1375,7 @@ export const analyticsRouter = router({
competitionRounds,
projectRoundStates,
allRequirements,
filteringResult,
}
}),