Removes duplicate: the setting was in Config tab (General Settings) AND
inside Advanced Settings in the Filtering tab. Now it lives only in the
Filtering tab as a prominent standalone toggle, since it's directly
related to AI filtering behavior.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace auto-save with manual floating save bar that appears when config
has unsaved changes (Discard / Save Changes buttons). Fixes race condition
where server sync overwrote local state after toggling switches.
- Show file requirement name (e.g. "Pitch Deck", "Presentation") above each
document in the All Uploaded Files section on project detail page
- Pass requirement relation data through to FileViewer component
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add filtering results summary card on round Overview tab with pass/fail/flag
counts and color-coded progress bar (polls every 5s)
- Auto-delete previous filtering results when re-running so new ones stream in
- Rename BUSINESS_CONCEPT to "Concept" in filtering results to prevent overflow
- Fix config save race condition where toggling switches (aiParseFiles, advance
counts) would revert: pendingSaveRef cleared before refetch completed
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Part 1 - Bug Fixes:
- Fix toProjectWithRelations() stripping file fields needed by AI (detectedLang, textContent, etc.)
- Fix parseAIData() reading flat when aiScreeningJson is nested under rule ID
- Fix getAIConfidenceScore() with same nesting issue (always returned 0)
Part 2 - Special Award Track Integration:
- Add shortlistSize to SpecialAward, qualityScore/shortlisted/confirmed fields to AwardEligibility
- Add specialAwardId to Round for award-owned rounds
- Update AI eligibility service to return qualityScore (0-100) for ranking
- Update eligibility job with filteringRoundId scoping and auto-shortlist top N
- Add 8 new specialAward router procedures (listForRound, runEligibilityForRound,
listShortlist, toggleShortlisted, confirmShortlist, listRounds, createRound, deleteRound)
- Create award-shortlist.tsx component with ranked table, shortlist checkboxes, confirm dialog
- Add "Special Award Tracks" section to filtering dashboard
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add aiPreview mutation with full project/juror data (bios, descriptions,
documents, categories, ocean issues, countries, team sizes)
- Increase AI description limit from 300 to 2000 chars for richer context
- Update GPT system prompt to use all available data fields
- Add mode toggle (AI default / Algorithm fallback) in assignment preview
- Lift AI mutation to parent page for background generation persistence
- Show visual indicator on page while AI generates (spinner + progress card)
- Toast notification with "Review" action when AI completes
- Staggered reveal animation for assignment results (streaming feel)
- Fix assignment balance with dynamic penalty (25pts per existing assignment)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace bare summary stats with full interactive assignment preview:
- Assignments grouped by juror with collapsible cards
- Per-assignment detail: match score, tags, reasoning, policy warnings
- Remove individual assignments with hover X button
- Inline add projects per juror + global juror/project picker
- No cap enforcement on manual adds (admin override)
- Track manual additions and removals with badge indicators
- Include user details in round.getById jury group members query
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Voting check now uses round.status === ROUND_ACTIVE instead of requiring
windowOpenAt/windowCloseAt date range, fixing manual open/reopen scenarios.
Added requireDocumentUpload toggle (default off) to evaluation round config
so rounds reusing prior-round documents don't need file requirements.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add AutoRefresh client component that calls router.refresh() on an
interval. Pauses when tab is hidden and refreshes immediately when
tab becomes visible again. Jury dashboard now reflects round
activations within seconds.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When closing round N, any active rounds with lower sortOrder in the
same competition are automatically closed. Each cascade closure is
recorded in DecisionAuditLog with closedBy: 'cascade' reference.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix assignments page header overflow on mobile (flex-wrap)
- Hide 'Back to Dashboard' button on mobile (logo tap navigates home)
- Make logo/brand text clickable to navigate to role dashboard
- Snap windowOpenAt to now when manually activating a round early
- Gate Compare Projects cards behind jury_compare_enabled setting (defaults off)
- Expose jury_compare_enabled in getFeatureFlags tRPC procedure
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Switch COI dialog from Dialog to AlertDialog (non-dismissible)
- Replace number inputs with sliders + rating buttons for criteria/global scores
- Redesign jury dashboard stat cards: compact strip on mobile, editorial grid on desktop
- Remove ROUND_ACTIVE filter from myAssignments so all assignments show
- Block evaluate page when round is inactive or voting window is closed
- Gate evaluate button on project detail page based on voting window status
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix criteria not showing for jurors: fetch active form independently via
getStageForm query instead of relying on existing evaluation record
- Fix scoringMode default from 'global' to 'criteria' (matching schema)
- Parse scale string format ("1-10") into minScore/maxScore for criteria display
- Fix COI dialog dismissal: prevent outside click on evaluate page Dialog
- Fix requiredReviews hardcoded to 3: read from round configJson in 4 locations
- Add jury preferences banner for unconfirmed caps on jury dashboard
- Add updateJuryPreferences tRPC procedure for self-service cap/ratio
- Simplify onboarding: always show jury step, allow cap up to 50
- Add role/ratio/availability fields to jury member invite dialog
- Simplify jury group settings (keep only defaultMaxAssignments)
- Enforce deliberation showCollectiveRankings flag for non-admin users
- Redesign dashboard stat cards: editorial data strip on mobile,
clean grid layout on desktop (no more generic card pattern)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix onboarding card overflow (overflow-hidden → overflow-x-hidden) so
expertise step can scroll to submit button
- Reduce expertise category list height (max-h-64 → max-h-48)
- Add color dots to expertise tag options matching admin display
- Single-column layout for expertise tags (no truncation)
- Ocean background on onboarding (matches email template)
- Rewrite jury competitions page as assignment-centric grouped by round
- Conditionally show Awards nav item only when juror has award assignments
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Replace blue gradient with ocean.png background (matches email templates)
- Display expertise tags one per line with full names (no truncation)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Some PDFs contain \x00 null bytes in their text which PostgreSQL rejects
with "invalid byte sequence for encoding UTF8: 0x00". Sanitize extracted
text in both document-analyzer and file-content-extractor services.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Complete rewrite of the admin dashboard replacing the 1056-line monolith with
modular components. Key improvements:
- Competition pipeline: horizontal visualization of all rounds in pipeline order
(by sortOrder, not creation date) with type-specific icons and metrics
- Round-specific stats: stat cards dynamically change based on active round type
(INTAKE shows submissions/docs, FILTERING shows pass/fail/flagged, EVALUATION
shows assignments/completion, fallback shows generic project/jury stats)
- Smart actions: context-aware "Action Required" panel that only flags the next
draft round (not all), only flags unassigned projects for EVALUATION rounds,
includes deadline warnings with severity levels (critical/warning/info)
- Active round panel: detailed view with project state bar, type-specific content,
and deadline countdown
- Extracted components: project list, activity feed, category breakdown, skeleton
Backend enriched with 17 parallel queries building rich PipelineRound data
including per-round project states, eval stats, filtering stats, live session
status, and deliberation counts.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
pdf-parse v2 requires DOMMatrix (browser API) which fails in Node.js.
Replaced with unpdf (serverless PDF.js build) for PDFs and mammoth for
Word .docx files. Also fixed the same broken pdf-parse usage in
file-content-extractor.ts used by AI filtering.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Introduces a document analyzer service that extracts page count (via pdf-parse),
text preview, and detected language (via franc) from uploaded files. Analysis runs
automatically on upload (configurable via SystemSettings) and can be triggered
retroactively for existing files. Results are displayed as badges in the FileViewer
and fed to AI screening for language-based filtering criteria.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Wire batchCheckRequirementsAndTransition into round activation and reopen
so pre-existing projects that already have all required docs get auto-
passed. Also adds checkDocumentCompletion endpoint for manual sweeps on
already-active rounds.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The AI assignment path was receiving project tags as flat strings, losing
the confidence scores from AI tagging. Now both the GPT path and the
fallback algorithm weight tag matches by confidence — a 0.9 tag matters
more than a 0.5 one.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
For INTAKE, SUBMISSION, and MENTORING rounds, the Advance Projects dialog
now shows a simplified "Advance All" flow that auto-passes all pending
projects and advances them in one click. Backend accepts autoPassPending
flag to bulk-set PENDING→PASSED before advancing. Jury/evaluation rounds
keep the existing per-project selection workflow.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The jury selector card in the stats bar was still visible on round types
where juries don't apply. Now conditionally rendered based on hasJury,
with the grid adjusting from 4 to 3 columns accordingly.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add checkRequirementsAndTransition() to round-engine that checks if all
required FileRequirements for a round are satisfied by uploaded files.
When all are met and the project is PENDING/IN_PROGRESS, it auto-
transitions to PASSED. Also adds batchCheckRequirementsAndTransition()
for bulk operations.
Wired into:
- file.adminUploadForRoundRequirement (admin bulk upload)
- applicant.saveFileMetadata (applicant self-upload)
Non-fatal: failures in the check never break the upload itself.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove Document Windows tab (round dates + file requirements in
Config are sufficient, separate SubmissionWindow was redundant)
- Restrict Jury and Awards tabs to round types that use them
(EVALUATION, LIVE_FINAL, DELIBERATION only)
- Add Round Dates card in Config tab with DateTimePicker for
start/end dates (supports past and future dates)
- Make Advance Projects button always visible when projects exist
(dimmed with guidance when no projects are PASSED yet)
- Add Close & Advance combined quick action to streamline round
progression workflow
- Add target round selector to Advance Projects dialog so admin
can pick which round to advance projects into
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Add utils.user.list.invalidate() after mutations that change user
status to ensure member lists refresh without manual page reload:
- Member detail page: after update and send invitation
- User mobile actions: after send invitation
- Add member dialog: after send invitation in jury group flow
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1. Assignment dialog overhaul: replace raw UUID inputs with searchable
juror Combobox (shows name, email, capacity) and multi-select project
checklist with bulk assignment support
2. Query invalidation sweep: fix missing invalidations in
assignment-preview-sheet (roundAssignment.execute) and
filtering-dashboard (filtering.finalizeResults) so data refreshes
without page reload
3. Rename Submissions tab to Document Windows with descriptive
header explaining upload window configuration
4. Connect 6 disconnected settings: storage_provider, local_storage_path,
avatar_max_size_mb, allowed_image_types, whatsapp_enabled,
whatsapp_provider - all now accessible in Settings UI
5. Admin dashboard redesign: branded Editorial Command Center with
Dark Blue gradient header, colored border-l-4 stat cards, staggered
animations, 2-column layout, action-required panel, activity timeline
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add ai_provider setting: 'openai' (API key) or 'litellm' (ChatGPT subscription proxy)
- Auto-strip max_tokens/max_completion_tokens for chatgpt/ prefix models
(ChatGPT subscription backend rejects token limit fields)
- LiteLLM mode: dummy API key when none configured, base URL required
- isOpenAIConfigured() checks base URL instead of API key for LiteLLM
- listAvailableModels() returns manualEntry flag for LiteLLM (no models.list)
- Settings UI: conditional fields, info banner, manual model input with
chatgpt/ prefix examples when LiteLLM selected
- All 7 AI services work transparently via buildCompletionParams()
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Change AI tagging to use AI_MODELS.QUICK (gpt-4o-mini) instead of gpt-4o for
10-15x cost reduction on classification tasks
- Add openai_base_url system setting for OpenAI-compatible providers
(OpenRouter, Groq, Together AI, local models)
- Reset OpenAI client singleton when API key, base URL, or model changes
- Add base URL field to AI settings form with provider examples
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The project detail page called useQuery inside .map() to fetch file
requirements per round, violating React's rules of hooks. When
competitionRounds changed from [] to [round1, round2], the hook count
changed, causing React to crash with "Cannot read properties of
undefined (reading 'length')".
Fix: Add listRequirementsByRounds endpoint that accepts multiple
roundIds in one query, replacing the dynamic hook pattern with a
single stable useQuery call.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- AI Tagging: batch 10 projects per API call with 3 concurrent batches (~10x faster)
- New `tagProjectsBatch()` with `getAISuggestionsBatch()` for multi-project prompts
- Single DB query for all projects, single anonymization pass
- Compact JSON in prompts (no pretty-print) saves tokens
- AI Shortlist: run STARTUP and BUSINESS_CONCEPT categories in parallel (2x faster)
- AI Filtering: increase default parallel batches from 1 to 3 (3x faster)
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Remove blocking guard on dialog close when tagging is in progress
- Change Cancel button to "Run in Background" during processing
- Add amber border + spinner + progress % on AI Tags button when job runs in background
- Job already runs server-side and sends in-app notification on completion
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Migration:
- Add standalone hasConflict index on ConflictOfInterest
- Ensure roundId is nullable on ConflictOfInterest
- Drop stale composite roundId_hasConflict index
Bulk upload:
- Add trash icon button to remove uploaded files
- Uses existing file.delete endpoint with audit logging
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add bucket/objectKey to file select in listProjectsByRoundRequirements
- Add verifyFilesExist endpoint to bulk-check file existence in MinIO
- Make uploaded filenames clickable links that open presigned download URLs
- Verify files exist in storage on page load, show re-upload button if missing
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Column was in Prisma schema but had no migration file, causing
'column does not exist' errors on file uploads.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Give button a subtle bg-white/15 default background so it's visible
without hovering, and stronger hover state (bg-white/30).
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Added IF NOT EXISTS, IF EXISTS, and DO $$ EXCEPTION guards to all
migration files from 20260205 onwards so they survive partial application
and work correctly on both fresh databases and existing deployments.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Added Jury tab to round detail page with full jury management inline
- Create new jury groups (auto-assigns to current round)
- Delete jury groups with confirmation dialog
- Add/remove members with inline member list
- Assign/switch jury groups via dropdown selector
- Added delete endpoint to juryGroup router (unlinks rounds, deletes members)
- Removed CHAIR/OBSERVER role selectors from add-member dialog (all members)
- Removed role column from jury-members-table
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Round engine: moved logAudit() calls outside $transaction blocks to prevent
FK violations from poisoning PostgreSQL transactions and rolling back status changes.
Round detail page: redesigned with Editorial Command Center aesthetic -
dark blue gradient header, colored accent stat cards, underline tab bar,
SVG readiness ring, grouped quick actions, branded progress bars and animations.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add reopenRound() to round engine (CLOSED → ACTIVE) with auto-pause of subsequent active rounds
- Add reopen endpoint to roundEngine router and UI button on round detail page
- Replace free-text MIME type input with toggle-only badge buttons in file requirements editor
- Enable refetchOnWindowFocus and shorter polling intervals for readiness checklist queries
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Redesign the rounds page from a card-per-competition layout to a flat
pipeline/timeline view. Rounds display as compact rows connected by a
vertical track with status dots (pulsing green for active). Special
awards branch off to the right from their linked evaluation round with
connector lines and tooltip details. Competition settings moved to a
dialog behind a gear icon. Filter pills replace the dropdown selector.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Per-juror cap mode (HARD/SOFT/NONE) in add-member dialog and members table
- Jury invite flow: create user + add to group + send invitation from dialog
- Per-round config: notifyOnAdvance, aiParseFiles, startupAdvanceCount, conceptAdvanceCount
- Moved notify-on-advance from competition-level to per-round setting
- AI filtering: round-tagged files with newest-first sorting, optional file content extraction
- File content extractor service (pdf-parse for PDF, utf-8 for text files)
- AI shortlist runs independently per category (STARTUP / BUSINESS_CONCEPT)
- generateAIRecommendations tRPC endpoint with per-round config integration
- AI recommendations UI: trigger button, confirmation dialog, per-category results display
- Category-aware advance dialog: select/deselect projects by category with target caps
- STAGE_ACTIVE bug fix in assignment router
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Round detail page: 15s for live data (projects, assignments, scores, workload), 30s for config, 60s for static data
- Filtering dashboard: 15s for results/stats, 30s for rules (job status already 2s)
- Project states table: 15s polling
- Coverage report: 15s polling
- Jury round page: 30s for assignments and round data
- Deliberation session: 10s polling for live vote updates
- Admin dashboard: 30s for stats
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Fix special award FK crash: replace 4x raw auditLog.create with logAudit() helper
- Add updateSubmissionWindow + deleteSubmissionWindow mutations to round router
- Add per-round analytics (_count, juryGroup) to competition.getById
- Remove redundant acceptedCategories from intake config
- Rewrite submission window manager with full CRUD, all fields, date pickers
- Add round scheduling card (open/close dates) to round detail page
- Add project count, assignment count, jury group to round list cards
- Visual redesign: pipeline view, brand colors, progress bars, enhanced cards
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Add assignAllToRound mutation to project-pool router
- Rewrite pool page with round selector, bulk assignment, and better layout
- Add pool navigation link to admin projects page
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
The Docker production image only has compiled .next/ output — src/ TypeScript
files don't exist. The seed was importing from ../src/types/competition-configs
which fails in Docker regardless of file extension. Inlined the default config
map directly in the seed so it has zero external dependencies.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>