Fix AI suggestions not displaying after job completion
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>
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
-- Add suggestionsJson column to AssignmentJob to store AI-generated suggestions
|
||||
|
||||
DO $$
|
||||
BEGIN
|
||||
IF NOT EXISTS (
|
||||
SELECT 1 FROM information_schema.columns
|
||||
WHERE table_name = 'AssignmentJob' AND column_name = 'suggestionsJson'
|
||||
) THEN
|
||||
ALTER TABLE "AssignmentJob" ADD COLUMN "suggestionsJson" JSONB;
|
||||
END IF;
|
||||
END $$;
|
||||
Reference in New Issue
Block a user