Commit Graph

138 Commits

Author SHA1 Message Date
Matt d6386be678 Add reopen button for closed rounds
Build and Push Docker Image / build (push) Successful in 9m43s Details
Allows admins to reopen a closed round. When reopened, the voting start
date will automatically update to now (if it was in the future).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 16:51:02 +01:00
Matt 13de30775e Add special awards management features and fix voting/assignment issues
Build and Push Docker Image / build (push) Successful in 10m4s Details
Special Awards:
- Add delete button with confirmation dialog to award detail page
- Add voting window dates (start/end) to award edit page
- Add manual project eligibility management (add/remove projects)
- Show eligibility method (Auto/Manual) in eligibility table
- Auto-set votingStartAt when opening voting if date is in future

Assignment Suggestions:
- Replace toggle with proper tabs UI (Algorithm vs AI Powered)
- Persist AI suggestions when navigating away (stored in database)
- Show suggestion counts on tab badges
- Independent refresh/start buttons per tab

Round Voting:
- Auto-update votingStartAt to now when activating round if date is in future
- Fixes issue where round was opened but voting dates were in future

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 16:29:36 +01:00
Matt e01d741f01 Fix GPT-5 nano empty response issue with token limits
Build and Push Docker Image / build (push) Successful in 9m36s Details
GPT-5 nano (and other GPT-5 models) use reasoning that consumes
the output token budget. When max_tokens is too low, all tokens
get used by internal reasoning, leaving nothing for the response.

- Add needsHigherTokenLimit() to detect models needing more tokens
- Add getMinTokenLimit() to ensure minimum 16k tokens for GPT-5
- Update buildCompletionParams to apply minimum token limits
- This fixes the No response from AI error with gpt-5-nano

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 15:02:22 +01:00
Matt bf187e4b9a Improve AI assignment error messages for invalid models
Build and Push Docker Image / build (push) Has been cancelled Details
- Add try-catch around OpenAI API call to catch model errors
- Provide clearer error messages when model name is invalid
- Handle empty response cases with helpful feedback
- Suggest checking AI Configuration settings when model fails

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 14:56:21 +01:00
Matt c82406abcf Hide All projects covered message while AI job is running
Build and Push Docker Image / build (push) Has been cancelled Details
The empty state message was incorrectly showing during AI processing.
Now it only shows when job is complete and there are no suggestions.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 14:53:45 +01:00
Matt 3abfccb22a Fix AI suggestions not displaying after job completion
Build and Push Docker Image / build (push) Successful in 9m26s Details
BREAKING CHANGE: AI assignment job now stores suggestions in database

- Add suggestionsJson column to AssignmentJob table
- Store enriched suggestions when job completes
- Update getAISuggestions to retrieve stored suggestions instead of regenerating
- Filter out already-assigned pairs from stored suggestions

Previously, the background job generated suggestions but discarded them,
and getAISuggestions tried to regenerate from scratch (causing infinite loading).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 14:38:43 +01:00
Matt e3e3fa9da4 Fix AI assignment errors and tag matching
Build and Push Docker Image / build (push) Successful in 9m7s Details
- Add missing updatedAt column to AssignmentJob table
- Fix algorithmic assignment to use AI-assigned projectTags instead of raw CSV tags
- Add case-insensitive tag matching for better expertise matching
- Scores should now properly reflect tag matches between judges and projects

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 14:14:19 +01:00
Matt fbb1173ea9 Add migration for User.country column
Build and Push Docker Image / build (push) Successful in 9m5s Details
The country field was in the schema but missing its migration.
This was causing user.get and user.me queries to fail.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:58:11 +01:00
Matt d7f0118940 Add user tag editing and improve member error display
Build and Push Docker Image / build (push) Successful in 9m4s Details
- Display actual error message in member detail page instead of generic Member not found
- Add debug logging to user.get query to help diagnose issues
- Add expertise tags editing for users in profile settings page
- Update user.updateProfile mutation to accept expertiseTags

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:45:34 +01:00
Matt f59cfd393b Display AI-assigned expertise tags on project detail page
Build and Push Docker Image / build (push) Successful in 8m56s Details
- Add projectTags relation to project.get query
- Show expertise tags with confidence percentages
- Tags displayed with their assigned colors

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:18:45 +01:00
Matt 4d8823e8e9 Show all errors in scrollable list instead of just first one
Build and Push Docker Image / build (push) Has been cancelled Details
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 13:13:25 +01:00
Matt 1b2311b4a3 Convert AI tagging to background job with progress tracking
Build and Push Docker Image / build (push) Successful in 9m40s Details
- Add TaggingJob model for tracking tagging progress
- Convert batch tagging to background job processing (prevents timeouts)
- Add real-time progress polling in UI with percentage/count display
- Add admin notifications when tagging job completes or fails
- Export getTaggingSettings and getAvailableTags functions

After deployment, run: npx prisma migrate deploy

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 11:48:57 +01:00
Matt 0b86dc6477 Add detailed logging for AI tagging progress
Build and Push Docker Image / build (push) Successful in 9m41s Details
- Log each project being processed with timing
- Log progress every 10 projects with time estimates
- Log final completion stats

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 11:34:32 +01:00
Matt e37154d812 Make migrations idempotent and add missing tables
Build and Push Docker Image / build (push) Successful in 9m41s Details
- Make all pending migrations idempotent (safe to re-run)
- Disable decouple_projects_from_rounds migration (schema not changed)
- Add ProjectTag table for AI tagging
- Add AssignmentJob table for AI assignment progress

On server deployment, run: npx prisma migrate deploy

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 11:09:37 +01:00
Matt 05862f1e55 Redesign AI Tagging dialog and add edition-wide tagging
Build and Push Docker Image / build (push) Successful in 9m22s Details
- Redesign AI Tagging dialog with scope selection (Round vs Edition)
- Add visual progress indicator during AI processing
- Display result stats (tagged/skipped/failed) after completion
- Add batchTagProgramProjects endpoint for edition-wide tagging
- Fix getFilterOptions to include program.id for filtering
- Improve error handling with toast notifications

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 10:27:52 +01:00
Matt 7f95f681d6 Fix AI tagging issues and improve error messages
Build and Push Docker Image / build (push) Successful in 9m33s Details
- Fall back to ai_enabled setting if ai_tagging_enabled not set
- Check both tags array and projectTags relationship for untagged projects
- Add detailed logging for debugging
- Show errors in toast instead of just counts
- Handle "no projects to tag" case with appropriate message
- Add early checks for OpenAI config and available tags

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-05 09:24:44 +01:00
Matt 6f6d5ef501 Add visual progress indicator for AI assignment batches
Build and Push Docker Image / build (push) Successful in 9m13s Details
- 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>
2026-02-04 17:40:26 +01:00
Matt 148925cb95 Fix AI suggestions query running twice
Build and Push Docker Image / build (push) Successful in 9m8s Details
Disable automatic refetching for expensive AI assignment query:
- Set staleTime to Infinity (never auto-refetch)
- Disable refetchOnWindowFocus, refetchOnReconnect, refetchOnMount
- Only manual refresh via button will trigger new request

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 17:19:20 +01:00
Matt c45a428d8b Add AI Assignment toggle and Tags tab to settings
Build and Push Docker Image / build (push) Successful in 9m25s Details
- Add "Use AI" button to assignments page to switch between algorithmic and GPT-powered suggestions
- Normalize AI suggestions format to match algorithmic format for consistent UI
- Add Tags tab to Settings page with link to expertise tags management
- AI assignment mode shows GPT-analyzed suggestions with confidence scores

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 16:56:07 +01:00
Matt c0f318a867 Add country mapping support for imports and geographic map
Build and Push Docker Image / build (push) Successful in 9m7s Details
- Add normalizeCountryToCode utility to convert country names to ISO-2 codes
- Support English, French and common alternate spellings
- Update Typeform import to support country field mapping
- Update Notion import to support country field mapping
- Allow project.update to set/update country with automatic normalization
- Fix geographic distribution map showing empty when country data exists

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 16:13:40 +01:00
Matt 6d2537ec04 Add per-round assignment constraints (min/max per judge)
Build and Push Docker Image / build (push) Successful in 9m41s Details
- Add minAssignmentsPerJuror and maxAssignmentsPerJuror fields to Round model
- Update assignment router:
  - Calculate effective max from user override or round default
  - Add forceOverride parameter for manual assignment beyond limits
  - Update getSuggestions to use round constraints with min target bonus
  - Update getAISuggestions to pass constraints to AI service
- Update AI assignment service:
  - Add minAssignmentsPerJuror to constraints interface
  - Update fallback algorithm with under-min bonus scoring
  - New score weights: 50% expertise, 30% load, 20% under-min bonus
- Update round router:
  - Add new constraint fields to create/update schemas
  - Add validation for min <= max constraint
- Update admin UI:
  - Add min/max constraint fields to round edit page
  - Remove hardcoded maxPerJuror from assignments page
- Add migration files for production deployment:
  - User.bio field for judge/mentor profiles
  - Round assignment constraint fields

Constraint hierarchy:
1. User.maxAssignments (if set) overrides round default
2. Round.maxAssignmentsPerJuror is the default cap
3. Admin can force-override any limit with confirmation

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 16:01:18 +01:00
Matt ff26769ce1 Add bio field and enhance smart assignment with bio matching
Build and Push Docker Image / build (push) Successful in 9m13s Details
- Add bio field to User model for judge/mentor profile descriptions
- Add bio step to onboarding wizard (optional step with 500 char limit)
- Enhance smart assignment to match judge bio against project description
  - Uses keyword extraction and Jaccard-like similarity scoring
  - Only applies if judge has a bio (no penalty for empty bio)
  - Max 15 points for bio match on top of existing scoring
- Fix geographic distribution query to use round relation for programId
- Update score breakdown: tags (40), bio (15), workload (25), country (15)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 15:27:28 +01:00
Matt 3a7177c652 Rename Assignments to Judge Assignments for clarity
Build and Push Docker Image / build (push) Successful in 9m21s Details
Updates labels in admin round pages:
- "Assignments" → "Judge Assignments"
- "Manage Assignments" → "Manage Judge Assignments"
- "Current Assignments" → "Current Judge Assignments"
- Updated descriptions to reference judges instead of jury members

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 15:15:10 +01:00
Matt 5cbcad28ad Add AI Tags button to admin projects page
Build and Push Docker Image / build (push) Has been cancelled Details
Adds a new "AI Tags" button that opens a dialog to batch-generate
expertise tags using AI for all untagged projects in a selected round.

The feature uses the existing tag.batchTagProjects endpoint which:
- Only processes projects without existing tags
- Preserves any manually added tags
- Logs AI usage for cost tracking

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 15:08:46 +01:00
Matt d1f7f0361d Add migration for Round.sortOrder field
Build and Push Docker Image / build (push) Successful in 9m22s Details
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 14:32:52 +01:00
Matt 29827268b2 Remove dynamic form builder and complete RoundProject→roundId migration
Build and Push Docker Image / build (push) Successful in 14m3s Details
Major cleanup and schema migration:
- Remove unused dynamic form builder system (ApplicationForm, ApplicationFormField, etc.)
- Complete migration from RoundProject junction table to direct Project.roundId
- Add sortOrder and entryNotificationType fields to Round model
- Add country field to User model for mentor matching
- Enhance onboarding with profile photo and country selection steps
- Fix all TypeScript errors related to roundProjects references
- Remove unused libraries (@radix-ui/react-toast, embla-carousel-react, vaul)

Files removed:
- admin/forms/* pages and related components
- admin/onboarding/* pages
- applicationForm.ts and onboarding.ts routers
- Dynamic form builder Prisma models and enums

Schema changes:
- Removed ApplicationForm, ApplicationFormField, OnboardingStep, ApplicationFormSubmission, SubmissionFile models
- Removed FormFieldType and SpecialFieldType enums
- Added Round.sortOrder, Round.entryNotificationType
- Added User.country

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 14:15:06 +01:00
Matt 7bcd2ce6ca Remove red focus ring from command input
Build and Push Docker Image / build (push) Successful in 8m55s Details
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:54:37 +01:00
Matt 20db3e1e3a Add visual indicator for eliminated projects
Build and Push Docker Image / build (push) Has been cancelled Details
- Shows "Eliminated" badge next to round name for REJECTED projects
- Rows for eliminated projects have reduced opacity and red tint
- Works in both table and mobile card views

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:49:31 +01:00
Matt 68c0ed00e4 Add manual assignment feature to assignments page
- Added "Manual Assignment" button with dialog
- Select jury member and project from dropdowns
- Shows current assignment counts and prevents duplicates
- Disables full-capacity jurors and already-assigned combinations

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:45:32 +01:00
Matt 1b12aa8ccd Fix smart assignment suggestions to display juror/project names
Build and Push Docker Image / build (push) Successful in 8m57s Details
The suggestions table was showing truncated IDs instead of actual names.
Updated getSuggestions to include jurorName and projectTitle in response.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 09:36:33 +01:00
Matt 8cdf6c9e5e Add unified expertise tag system and round entry notifications
Build and Push Docker Image / build (push) Successful in 9m14s Details
- ExpertiseSelect now fetches tags from database with category grouping
- Tags set by admin during invitation are locked and cannot be removed
- Onboarding merges user-selected tags with admin-preset tags
- MENTOR role now goes through onboarding flow
- Added migration for Round.entryNotificationType column
- Added seed script with ~90 comprehensive expertise tags

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 01:15:21 +01:00
Matt 41a36f72b3 Add WhatsApp feature flag and improve onboarding
Build and Push Docker Image / build (push) Failing after 2m59s Details
- Add getFeatureFlags endpoint to check if WhatsApp is enabled
- Skip phone step in onboarding when WhatsApp is disabled
- Hide WhatsApp notification options when disabled
- Add ExpertiseSelect component with predefined ocean conservation tags
- Fix onboarding layout to fill viewport on desktop

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 00:58:22 +01:00
Matt 4f0531d2ee Add ExpertiseSelect component for onboarding
Replace database-backed TagInput with a cleaner ExpertiseSelect
component that has predefined ocean conservation expertise areas.
Features a checkbox grid UI that's more user-friendly for onboarding.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 00:56:03 +01:00
Matt 39f7bc207b Use PhoneInput component with country dropdown in onboarding
Replace plain text input with the existing PhoneInput component that
includes country code dropdown with flags and auto-formatting.
Default country is set to Monaco (MC).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 00:54:57 +01:00
Matt a3cc73e49d Fix redirect loop for users who need to set password
Build and Push Docker Image / build (push) Successful in 8m19s Details
The auth layout was redirecting logged-in users to their dashboard even
when they still needed to set their password. This caused a redirect
loop: auth layout redirects to /jury, middleware redirects back to
/set-password, repeat until crash.

Now the auth layout checks mustSetPassword before redirecting, allowing
users to complete the password setup flow.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 00:41:32 +01:00
Matt 0f956cf23f Fix invitation flow by allowing unauthenticated tRPC requests
Build and Push Docker Image / build (push) Successful in 8m28s Details
The middleware was blocking /api/trpc requests for unauthenticated users,
which prevented the accept-invite page from calling the public
validateInviteToken procedure. tRPC handles its own authentication
via procedure middleware, so the NextAuth middleware should allow
all tRPC requests through.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 00:26:05 +01:00
Matt b0189cad92 Add styled notification emails and round-attached notifications
Build and Push Docker Image / build (push) Successful in 8m18s Details
- Add 15+ styled email templates matching existing invite email design
- Wire up notification triggers in all routers (assignment, round, project, mentor, application, onboarding)
- Add test email button for each notification type in admin settings
- Add round-attached notifications: admins can configure which notification to send when projects enter a round
- Fall back to status-based notifications when round has no configured notification

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-04 00:10:51 +01:00
Matt 3be6a743ed Add multiple admin improvements and bug fixes
Build and Push Docker Image / build (push) Successful in 8m58s Details
- Email settings: Add separate sender display name field
- Rounds page: Drag-and-drop reordering with visible order numbers
- Round creation: Auto-assign projects to filtering rounds, auto-activate if voting started
- Round detail: Fix incorrect "voting period ended" message for draft rounds
- Projects page: Add delete option with confirmation dialog
- AI filtering: Add configurable batch size and parallel request settings
- Filtering results: Fix duplicate criteria display
- Add seed scripts for notification settings and MOPC onboarding form

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 23:19:45 +01:00
Matt 1d137ce93e Improve notification bell placement and change sender to MOPC Portal
Build and Push Docker Image / build (push) Successful in 8m14s Details
- Move notification bell to sidebar header next to logo (desktop)
- Keep bell in mobile header bar (already well-placed)
- Change email sender name from 'MOPC Platform' to 'MOPC Portal'

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:47:24 +01:00
Matt b663aae846 Fix invitation flow error by adding SessionProvider
Build and Push Docker Image / build (push) Has been cancelled Details
- Add SessionProvider to root Providers for NextAuth React hooks
- Add error handling to auth layout to prevent crashes on auth check failure
- Add MENTOR role redirect in auth layout

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:44:09 +01:00
Matt 03c031a8b6 Fix rounds management bugs and invitation flow
Build and Push Docker Image / build (push) Successful in 8m45s Details
- Fix rounds list showing 0 projects by adding _count to program.list query
- Fix round reordering by using correct cache invalidation params
- Fix finalizeResults to auto-advance passed projects to next round
- Fix member list not updating after add/remove by invalidating user.list
- Fix invitation link error page by correcting path from /auth-error to /error
- Add /apply, /verify, /error to public paths in auth config

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 22:15:22 +01:00
Matt 0277768ed7 Add notification bell system and MOPC onboarding form
Build and Push Docker Image / build (push) Successful in 8m59s Details
Notification System:
- Add InAppNotification and NotificationEmailSetting database models
- Create notification service with 60+ notification types for all user roles
- Add notification router with CRUD endpoints
- Build NotificationBell UI component with dropdown and unread count
- Integrate bell into admin, jury, mentor, and observer navs
- Add notification email settings admin UI in Settings > Notifications
- Add notification triggers to filtering router (complete/failed)
- Add sendNotificationEmail function to email library
- Add formatRelativeTime utility function

MOPC Onboarding Form:
- Create /apply landing page with auto-redirect for single form
- Create seed script for MOPC 2026 application form (6 steps)
- Create seed script for default notification email settings

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 21:30:25 +01:00
Matt e1968d45df Filter award juror selection to show only JURY_MEMBER role
Build and Push Docker Image / build (push) Successful in 8m57s Details
The dropdown was showing all users instead of only jury members.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 20:09:32 +01:00
Matt e2782b2b19 Add background filtering jobs, improved date picker, AI reasoning display
Build and Push Docker Image / build (push) Successful in 14m19s Details
- Implement background job system for AI filtering to avoid HTTP timeouts
- Add FilteringJob model to track progress of long-running filtering operations
- Add real-time progress polling for filtering operations on round details page
- Create custom DateTimePicker component with calendar popup (no year picker hassle)
- Fix round date persistence bug (refetchOnWindowFocus was resetting form state)
- Integrate filtering controls into round details page for filtering rounds
- Display AI reasoning for flagged/filtered projects in results table
- Add onboarding system scaffolding (schema, routes, basic UI)
- Allow setting round dates in the past for manual overrides

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 19:48:41 +01:00
Matt 8be740a4fb Fix multiple UI/UX issues and invite token migration
Build and Push Docker Image / build (push) Successful in 8m39s Details
Fixes:
- Round edit: Add cache invalidation for voting dates
- Criteria weights: Replace number input with visual slider
- Member invite: Per-member expertise tags with suggestions
  - Tags now added per member, not globally
  - Comma key support for quick tag entry
  - Suggested tags based on ocean/business expertise
- Accept-invite: Add Suspense boundary for useSearchParams
- Add missing inviteToken columns migration

The invite token columns were accidentally skipped in prototype1
migration. This adds them with IF NOT EXISTS checks.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 15:25:28 +01:00
Matt 3986da172f Fix GPT-5 API compatibility and add AIUsageLog migration
Build and Push Docker Image / build (push) Successful in 8m50s Details
- Add AIUsageLog table migration for token tracking
- Fix GPT-5 temperature parameter (not supported, like o-series)
- Add usesNewTokenParam() and supportsTemperature() functions
- Add GPT-5+ category to model selection UI
- Update model sorting to show GPT-5+ first

GPT-5 and newer models use max_completion_tokens and don't support
custom temperature values, similar to reasoning models.

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 15:04:16 +01:00
Matt c0ce6f9f1f Fix GPT-5 max_completion_tokens parameter detection
Build and Push Docker Image / build (push) Successful in 8m35s Details
GPT-5 and newer models require max_completion_tokens instead of max_tokens.
Added usesNewTokenParam() to detect GPT-5+ models separately from reasoning
model restrictions (temperature, json_object, system messages).

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 13:08:01 +01:00
Matt fd82a9b981 Expand GDPR documentation with comprehensive compliance details
Build and Push Docker Image / build (push) Successful in 8m39s Details
- Add complete definitions section (GDPR terms, AI-specific terms)
- Document Monaco Law 1.565 (Dec 2024) and new APDP authority
- List all joint controllers (IUM, Oceanographic Institute, etc.)
- Detail all personal data categories processed
- Document legal bases with Legitimate Interests Assessments
- Add complete data subject rights procedures
- Document server location (Austria, EU) and EU data residency for OpenAI
- Add security measures, encryption standards, backup procedures
- Include Data Protection Impact Assessments
- Add breach notification procedures with timelines
- Document OpenAI as subprocessor with DPA and ZDR details
- Add compliance checklists and audit procedures

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 12:22:15 +01:00
Matt 928b1c65dc Optimize AI system with batching, token tracking, and GDPR compliance
Build and Push Docker Image / build (push) Successful in 9m11s Details
- Add AIUsageLog model for persistent token/cost tracking
- Implement batched processing for all AI services:
  - Assignment: 15 projects/batch
  - Filtering: 20 projects/batch
  - Award eligibility: 20 projects/batch
  - Mentor matching: 15 projects/batch
- Create unified error classification (ai-errors.ts)
- Enhance anonymization with comprehensive project data
- Add AI usage dashboard to Settings page
- Add usage stats endpoints to settings router
- Create AI system documentation (5 files)
- Create GDPR compliance documentation (2 files)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 11:58:12 +01:00
Matt a72e815d3a Remove remaining Settings and Assignments links
Build and Push Docker Image / build (push) Successful in 8m43s Details
Fix stale links to deleted pages:
- Remove Settings link from programs list dropdown
- Remove Manage Assignments link from projects list dropdown

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2026-02-03 10:56:14 +01:00