Commit Graph

165 Commits

Author SHA1 Message Date
Matt 65a22e6f19 Optimize all AI functions for efficiency and speed
Build and Push Docker Image / build (push) Failing after 7s Details
- 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>
2026-02-16 14:02:38 +01:00
Matt 989db4dc14 Allow AI tagging dialog to close during processing, show background progress
- 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>
2026-02-16 13:58:03 +01:00
Matt 5e0c8b2dfe Add schema reconciliation migration and file removal in bulk upload
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>
2026-02-16 13:46:12 +01:00
Matt 85a0fa5016 Make bulk upload documents clickable with storage verification
- 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>
2026-02-16 13:32:23 +01:00
Matt c707899179 Add missing migration for ProjectFile.pageCount column
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>
2026-02-16 13:23:18 +01:00
Matt 4d40afec6e Improve Project Pool button contrast in dark header
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>
2026-02-16 13:21:35 +01:00
Matt effc078918 Make all migration SQL files idempotent for clean prod deploys
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>
2026-02-16 13:09:41 +01:00
Matt 763b2ef0f5 Jury management: create, delete, add/remove members from round detail page
- 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>
2026-02-16 12:46:01 +01:00
Matt 86fa542371 Fix round reopen bug + redesign round detail page UI
Build and Push Docker Image / build (push) Failing after 18s Details
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>
2026-02-16 12:38:28 +01:00
Matt 079468d2ca Reopen rounds, file type buttons, checklist live-update
- 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>
2026-02-16 12:06:07 +01:00
Matt de73a6f080 Rounds page: flat pipeline view with awards branching visualization
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>
2026-02-16 10:19:50 +01:00
Matt 80c9e35971 AI category-aware evaluation: per-round config, file parsing, shortlist, advance flow
- 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>
2026-02-16 10:09:52 +01:00
Matt 93f4ad4b31 Add auto-refresh polling across all admin and jury pages
- 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>
2026-02-16 09:30:19 +01:00
Matt 8e5fc18da6 Consolidated round management, AI filtering enhancements, MinIO storage restructure
- Fix STAGE_ACTIVE bug in assignment router (now ROUND_ACTIVE)
- Add evaluation form CRUD (getForm + upsertForm endpoints)
- Add advanceProjects mutation for manual project advancement
- Rewrite round detail page: 7-tab consolidated interface
- Add filtering rules UI with full CRUD (field-based, document check, AI screening)
- Add pageCount field to ProjectFile for document page limit filtering
- Enhance AI filtering: per-file page limits, category/region-aware guidelines
- Restructure MinIO paths: {ProjectName}/{RoundName}/{timestamp}-{file}
- Update dashboard and pool page links from /admin/competitions to /admin/rounds

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 09:20:02 +01:00
Matt 845554fdb8 Pool, competition & round pages overhaul: deep-link context, inline project management, AI filtering UX, email toggle
- Pool page: auto-select program from edition context, URL params for roundId/competitionId deep-linking, unassigned toggle, round badges column
- Competition detail: rich round cards with project counts, dates, jury info, status badges replacing flat list
- Round detail: readiness checklist, embedded assignment dashboard, file requirements in config tab, notifyOnEntry toggle
- ProjectStatesTable: search input, project links, quick-add dialog, pool links with context params
- FilteringDashboard: expandable rows with AI reasoning inline, quick override buttons, search, clickable stats
- Backend: notifyOnEntry in round configJson triggers announcement emails on project assignment via existing email infra

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 08:23:40 +01:00
Matt 7f334ed095 Round detail overhaul, file requirements, project management, audit log fix
- Redesign round detail page with 6 tabs (overview, projects, filtering, assignments, config, documents)
- Add jury group assignment selector in round stats bar
- Add FileRequirementsEditor component replacing SubmissionWindowManager
- Add FilteringDashboard component for AI-powered project screening
- Add project removal from rounds (single + bulk) with cascading to subsequent rounds
- Add project add/remove UI in ProjectStatesTable with confirmation dialogs
- Fix logAudit inside $transaction pattern across all 12 router files
  (PostgreSQL aborted-transaction state caused silent operation failures)
- Fix special awards creation, deletion, status update, and winner assignment

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 07:49:39 +01:00
Matt f572336781 Rounds overhaul: full CRUD submission windows, scheduling UI, analytics, design refresh
- 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>
2026-02-16 07:07:09 +01:00
Matt 2fb26d4734 Pool page: add bulk assign-to-round, enhance project pool UI
- 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>
2026-02-16 07:06:59 +01:00
Matt 4c0efb232c Admin system overhaul: full round config UI, flattened navigation, juries, awards integration, evaluation rewrite
- Phase 1: 7 round config sub-components covering all ~65 Zod schema fields across INTAKE, FILTERING, EVALUATION, SUBMISSION, MENTORING, LIVE_FINAL, DELIBERATION
- Phase 2: Replace Competitions nav with Rounds + add Juries; new /admin/rounds and /admin/rounds/[roundId] pages with tabbed detail (Config, Projects, Windows, Documents, Awards)
- Phase 3: Top-level /admin/juries with list + detail pages (members table, settings panel, self-service review)
- Phase 4: File requirements editor in round config; project detail per-requirement upload slots replacing generic drop zone
- Phase 5: Awards edit page with source round dropdown, eligibility mode, auto-tag rules builder; round detail Awards tab; specialAward router enhanced with evaluationRoundId/eligibilityMode fields
- Phase 6: Evaluation page rewrite supporting all 3 scoring modes (criteria/global/binary) with config-driven behavior; live voting UI polish
- Phase 7: UI design polish across admin pages — consistent headers, cards, hover transitions, empty states, brand colors
- Bulk upload page for admin project imports
- File router enhanced with admin upload and submission window procedures

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-16 01:16:55 +01:00
Matt fbb194067d Fix seed: inline defaultRoundConfig to eliminate src/ dependency
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>
2026-02-15 23:52:27 +01:00
Matt ac970fc6a0 Fix seed import: remove .js extension from competition-configs import
The .js extension caused ERR_MODULE_NOT_FOUND in Docker when tsx
tried to resolve the TypeScript source file.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:42:31 +01:00
Matt 0b4e56b287 Fix slug conflict and seed import for Docker deployment
- Rename [id] → [competitionId] under /admin/competitions/ to fix
  Next.js "different slug names for same dynamic path" error
- Update params.id → params.competitionId in competition detail page
- Fix seed import: use .js extension for tsx ESM module resolution

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:30:01 +01:00
Matt 1233cdd22c Fix phase7 FK rename migration: drop old roundId before rename
The pipeline migration (20260213) added stageId columns while keeping
the original roundId columns as nullable. The rename migration tried
to RENAME stageId TO roundId but failed because roundId already existed.
Fix: DROP the old roundId column first, then rename stageId → roundId.
Also restore FK constraints on ConflictOfInterest and TaggingJob.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:16:06 +01:00
Matt 6ca39c976b Competition/Round architecture: full platform rewrite (Phases 1-9)
Replace Pipeline/Stage system with Competition/Round architecture.
New schema: Competition, Round (7 types), JuryGroup, AssignmentPolicy,
ProjectRoundState, DeliberationSession, ResultLock, SubmissionWindow.
New services: round-engine, round-assignment, deliberation, result-lock,
submission-manager, competition-context, ai-prompt-guard.
Full admin/jury/applicant/mentor UI rewrite. AI prompt hardening with
structured prompts, retry logic, and injection detection. All legacy
pipeline/stage code removed. 4 new migrations + seed aligned.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 23:04:15 +01:00
Matt 9ab4717f96 Simplify routing to award assignment, seed all CSV entries, fix category mapping
- Remove RoutingRule model and routing engine (replaced by direct award assignment)
- Simplify RoutingMode enum: PARALLEL/POST_MAIN → SHARED, keep EXCLUSIVE
- Remove routing router, routing-rules-editor, and related tests
- Update pipeline, award, and notification code to remove routing references
- Seed: include all CSV entries (no filtering/dedup), AI screening handles duplicates
- Seed: fix non-breaking space (U+00A0) bug in category/issue mapping
- Stage filtering: add duplicate detection that flags projects for admin review

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-15 14:25:05 +01:00
Matt 382570cebd Pipeline UX: clickable cards, wizard edit, routing rules redesign, category quotas
Build and Push Docker Image / build (push) Failing after 9s Details
- Simplify pipeline list cards: whole card is clickable, remove clutter
- Add wizard edit page for existing pipelines with full state pre-population
- Extract toWizardTrackConfig to shared utility for reuse
- Rewrite predicate builder with 3 modes: Simple (sentence-style), AI (NLP), Advanced (JSON)
- Fix routing operators to match backend (eq/neq/in/contains/gt/lt)
- Rewrite routing rules editor with collapsible cards and natural language summaries
- Add parseNaturalLanguageRule AI procedure for routing rules
- Add per-category quotas to SelectionConfig and EvaluationConfig
- Add category quota UI toggles to selection and assignment sections
- Add category breakdown display to selection panel
- Add category-aware scoring to smart assignment (penalty/bonus)
- Add category-aware filtering targets with excess demotion

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 20:10:24 +01:00
Matt c634982835 Fix member selection checkboxes showing for all rows regardless of status
Previously checkboxes only appeared for users with status NONE (Not Invited),
hiding them for INVITED/ACTIVE members and making "Select all" confusing.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 18:38:54 +01:00
Matt c321d4711e Improve pipeline editor UX: stage detail sheet, structured predicates, page reorganization
Build and Push Docker Image / build (push) Failing after 40s Details
- Add Sheet UI component and StageDetailSheet with config/activity tabs
- Stage config opens in right-side sheet (always-editable, no collapsed summary)
- Replace JSON textarea in routing rules with structured PredicateBuilder form
- Remove StageTransitionsEditor from UI (transitions auto-managed)
- Promote Stage Management section to immediately after flowchart
- Conditionally hide Routing Rules (single track) and Award Governance (no awards)
- Add section headers with descriptions and increase spacing

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 18:11:48 +01:00
Matt 2d91ce02fc Fix pipeline detail hook order causing React error 310 2026-02-14 17:04:43 +01:00
Matt 3975b5c51f Fix CRLF line endings in runtime/deploy scripts and enforce LF 2026-02-14 16:35:26 +01:00
Matt b5425e705e Apply full refactor updates plus pipeline/email UX confirmations 2026-02-14 15:26:42 +01:00
Matt e56e143a40 Update CI workflow to use new Gitea registry at code.monaco-opc.com
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 14:00:50 +01:00
Matt 9ee767b6cd Use session role for invite page, handle stale user sessions gracefully
Build and Push Docker Image / build (push) Failing after 9m17s Details
Switch invite page from DB query (user.me) to JWT session for role checks,
avoiding failures when user ID is stale. Return friendly error from user.me
instead of throwing on missing user.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 13:30:55 +01:00
Matt 0afd4d97c6 Fix admin roles dropdown, rewrite MOPC-specific expertise tags
Build and Push Docker Image / build (push) Has been cancelled Details
- Refactor role selector to use computed availableRoles array instead of
  conditional JSX fragments, fixing Radix Select not re-rendering admin
  options when async user data loads
- Rewrite 38 generic expertise tags to 44 MOPC-specific tags across 8
  categories aligned with OceanIssue enum: Pollution & Waste, Climate &
  Carbon, Seafood & Aquaculture, Biodiversity & Habitat, Ocean Technology,
  Shipping & Ports, Community & Education, Business & Investment

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 13:25:41 +01:00
Matt 2a374195c4 Add explicit edit actions for existing pipeline cards
Build and Push Docker Image / build (push) Successful in 10m16s Details
2026-02-14 13:04:27 +01:00
Matt c88f540633 Fix pipeline config crashes, settings UX, invite roles, seed expertise tags
Build and Push Docker Image / build (push) Successful in 9m51s Details
- Fix critical crash when clicking Edit on INTAKE stage configs: normalize
  DB fileRequirements shape (type/required → acceptedMimeTypes/isRequired),
  add null guard in getActiveCategoriesFromMimeTypes
- Fix config summary display for all stage types to handle seed data key
  mismatches (votingEnabled→juryVotingEnabled, minAssignmentsPerJuror→
  minLoadPerJuror, deterministic.rules→rules, etc.)
- Add AWARD_MASTER role to invite page dropdown and user router validations
- Restructure settings sidebar: Tags and Webhooks as direct links instead
  of nested tabs, remove redundant Quick Links section
- Seed 38 expertise tags across 7 categories (Marine Science, Technology,
  Policy, Conservation, Business, Education, Engineering)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 11:40:44 +01:00
Matt ae0ac58547 Mobile responsiveness fixes for pipeline UI redesign
Build and Push Docker Image / build (push) Successful in 9m31s Details
- Detail page header: stack on mobile, icon-only Advanced button on small screens
- InlineEditableText: show pencil icon on mobile (not hover-only)
- EditableCard: show Edit button on mobile (not hover-only)
- PipelineFlowchart: add right-edge fade gradient as scroll hint on mobile
- Summary cards: always 3-col grid (compact on mobile)
- Track switcher: add overflow-x-auto for horizontal scroll

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 01:59:42 +01:00
Matt 59f90ccc37 Pipeline UI/UX redesign: inline editing, flowchart, sidebar stepper
Build and Push Docker Image / build (push) Failing after 8m59s Details
- Add InlineEditableText, EditableCard, SidebarStepper shared components
- Add PipelineFlowchart (interactive SVG stage visualization)
- Add StageConfigEditor and usePipelineInlineEdit hook
- Redesign detail page: flowchart replaces nested tabs, inline editing
- Redesign creation wizard: sidebar stepper replaces accordion sections
- Enhance list page: status dots, track indicators, relative timestamps
- Convert edit page to redirect (editing now inline on detail page)
- Delete old WizardSection accordion component

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-14 01:54:56 +01:00
Matt 70cfad7d46 Platform polish: bulk invite, file requirements, filtering redesign, UX fixes
Build and Push Docker Image / build (push) Successful in 11m41s Details
- F1: Set seed jury/mentors/observers to NONE status (not invited), remove passwords
- F2: Add bulk invite UI with checkbox selection and floating toolbar
- F3: Add getProjectRequirements backend query + requirement slots on project detail
- F4: Redesign filtering section: AI criteria textarea, "What AI sees" card,
  field-aware eligibility rules with human-readable previews
- F5: Auto-redirect to pipeline detail when only one pipeline exists
- F6: Make project names clickable in pipeline intake panel
- F7: Fix pipeline creation error: edition context fallback + .min(1) validation
- Pipeline wizard sections: add isActive locking, info tooltips, UX improvements

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 23:45:21 +01:00
Matt 451b483880 Fix pipeline edit crash: merge defaults with DB configJson
Build and Push Docker Image / build (push) Successful in 10m2s Details
The DB configJson uses different field names than wizard types expect
(e.g., deterministic.rules vs rules, votingEnabled vs juryVotingEnabled).
The ?? operator only guards null/undefined, but configJson is {} (truthy),
so defaults never applied. This caused config.rules.map() to crash with
"Cannot read properties of undefined (reading 'map')".

Fix: spread defaults first then overlay DB values, and add defensive ??
fallbacks in all section components for potentially undefined properties.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 22:55:35 +01:00
Matt 7d1c87e938 UI/UX audit fixes: clickable pipelines, broken links, isActive locking
Build and Push Docker Image / build (push) Successful in 10m55s Details
- Make pipeline cards clickable on list page (navigate to detail view)
- Fix broken nav link: applicant /messages → /mentor
- Fix broken nav link: mentor /messages → /projects
- Add isActive field locking to all 7 wizard sections (intake, main-track,
  filtering, assignment, awards, live-finals, notifications)
- Add minLoad ≤ maxLoad cross-field validation in assignment section
- Add duplicate stage slug detection in main track section
- Add active pipeline warning banners in intake and main track sections

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 20:50:22 +01:00
Matt 31225b099e Fix migration: drop RoundTemplate before RoundType enum
Build and Push Docker Image / build (push) Successful in 10m26s Details
RoundTemplate table depends on RoundType enum, must be dropped first.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 19:45:34 +01:00
Matt dc075f8969 Fix migration with fully idempotent SQL to handle partial application
Build and Push Docker Image / build (push) Successful in 11m46s Details
Rewrote pipeline/stage migration with defensive guards:
- DO blocks with EXCEPTION handlers for enum/constraint creation
- IF NOT EXISTS on all CREATE TABLE/INDEX
- IF EXISTS on all DROP INDEX
- Handles re-running after partial failure

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 16:42:54 +01:00
Matt 68d3dde1aa Add migration for pipeline/stage system, new enums, and Round retirement
Build and Push Docker Image / build (push) Successful in 12m7s Details
The Round system redesign commit added Pipeline, Track, Stage models
and converted roundId to legacy fields but was missing the SQL migration.
This caused seed failure (AWARD_MASTER enum not found in DB).

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 16:19:56 +01:00
Matt 331b67dae0 Round system redesign: Phases 1-7 complete
Build and Push Docker Image / build (push) Successful in 19m31s Details
Full pipeline/track/stage architecture replacing the legacy round system.

Schema: 11 new models (Pipeline, Track, Stage, StageTransition,
ProjectStageState, RoutingRule, Cohort, CohortProject, LiveProgressCursor,
OverrideAction, AudienceVoter) + 8 new enums.

Backend: 9 new routers (pipeline, stage, routing, stageFiltering,
stageAssignment, cohort, live, decision, award) + 6 new services
(stage-engine, routing-engine, stage-filtering, stage-assignment,
stage-notifications, live-control).

Frontend: Pipeline wizard (17 components), jury stage pages (7),
applicant pipeline pages (3), public stage pages (2), admin pipeline
pages (5), shared stage components (3), SSE route, live hook.

Phase 6 refit: 23 routers/services migrated from roundId to stageId,
all frontend components refitted. Deleted round.ts (985 lines),
roundTemplate.ts, round-helpers.ts, round-settings.ts, round-type-settings.tsx,
10 legacy admin pages, 7 legacy jury pages, 3 legacy dialogs.

Phase 7 validation: 36 tests (10 unit + 8 integration files) all passing,
TypeScript 0 errors, Next.js build succeeds, 13 integrity checks,
legacy symbol sweep clean, auto-seed on first Docker startup.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-13 13:57:09 +01:00
root 8a328357e3 Fix round assignment pool, create-page parity, and file settings UX
Build and Push Docker Image / build (push) Successful in 14m5s Details
2026-02-12 17:25:30 +01:00
Matt 52cdca1b85 Move required reviews field into evaluation settings and add live voting migration
Build and Push Docker Image / build (push) Successful in 13m22s Details
Move the "Required Reviews per Project" field from the Basic Information
card into the Evaluation Settings section of RoundTypeSettings, where it
contextually belongs. Add missing database migration for live voting
enhancements (criteria voting, audience voting, AudienceVoter table).

Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
2026-02-12 16:57:56 +01:00
Matt 7b85fd9602 Auto-assign projects to first round, auto-filter on close, pipeline UX consolidation
Build and Push Docker Image / build (push) Successful in 10m30s Details
- New projects (admin create, CSV import, public form) auto-assign to program's
  first round (by sortOrder) when no round is specified
- Closing a FILTERING round auto-starts filtering job (configurable via
  autoFilterOnClose setting, defaults to true)
- Add SUBMISSION_RECEIVED notification type for confirming submissions
- Replace separate List/Pipeline toggle with integrated pipeline view below
  the sortable round list
- Add autoFilterOnClose toggle to filtering round type settings UI

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 15:06:11 +01:00
Matt 2a5fa463b3 Round system redesign: criteria voting, audience voting, pipeline view, and admin UX improvements
Build and Push Docker Image / build (push) Successful in 10m53s Details
- Schema: Extend LiveVotingSession with votingMode, criteriaJson, audience fields;
  add AudienceVoter model; make LiveVote.userId nullable for audience voters
- Backend: Criteria-based voting with weighted scores, audience registration/voting
  with token-based dedup, configurable jury/audience weight in results
- Jury UI: Criteria scoring with per-criterion sliders alongside simple 1-10 mode
- Public audience voting page at /vote/[sessionId] with mobile-first design
- Admin live voting: Tabbed layout (Session/Config/Results), criteria config,
  audience settings, weight-adjustable results with tie detection
- Round type settings: Visual card selector replacing dropdown, feature tags
- Round detail page: Live event status section, type-specific stats and actions
- Round pipeline view: Horizontal visualization with bottleneck detection,
  List/Pipeline toggle on rounds page
- SSE: Separate jury/audience vote events, audience vote tracking
- Field visibility: Hide irrelevant fields per round type in create/edit forms

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-12 14:27:49 +01:00
Matt b5d90d3c26 Add project reports section and fix mobile overflow issues
Build and Push Docker Image / build (push) Successful in 11m20s Details
- Add project-wide reporting table with scope selector (all rounds / per round)
- Fix horizontal overflow on mobile (body, admin sidebar, logo truncation)
- Make members header and reports tabs responsive with flex-wrap

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-02-11 19:08:04 +01:00