fix: query documents table for analytics instead of empty events table

The document_processing_events table was never populated. Analytics
endpoints now query the documents table directly using status and
timestamp columns. Also updated upload page labels to remove outdated
"Agentic RAG" references.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
admin
2026-02-25 12:05:25 -05:00
parent 8f9c225ebc
commit cbe7761558
3 changed files with 32 additions and 32 deletions

View File

@@ -226,7 +226,7 @@ const Analytics: React.FC = () => {
<h3 className="text-md font-medium text-gray-700">Average Processing Time</h3>
<div className="space-y-2">
<div className="flex justify-between">
<span className="text-sm text-gray-600">Document AI + Agentic RAG</span>
<span className="text-sm text-gray-600">Single-Pass + Quality Check</span>
<span className="text-sm font-medium">{formatTime(processingStats.averageProcessingTime?.documentAiAgenticRag ?? 0)}</span>
</div>
</div>
@@ -236,7 +236,7 @@ const Analytics: React.FC = () => {
<div className="space-y-2">
<div className="flex justify-between">
<span className="text-sm text-gray-600">Processing Method</span>
<span className="text-sm font-medium">Document AI + Agentic RAG</span>
<span className="text-sm font-medium">Single-Pass + Quality Check</span>
</div>
</div>
</div>

View File

@@ -325,7 +325,7 @@ const DocumentUpload: React.FC<DocumentUploadProps> = ({
case 'uploaded':
return 'Uploaded to Cloud Storage ✓';
case 'processing':
return 'Processing with Document AI + Optimized Agentic RAG...';
return 'Processing with AI-Powered CIM Analysis...';
case 'completed':
return 'Completed ✓ (PDF automatically deleted)';
case 'error':
@@ -344,10 +344,9 @@ const DocumentUpload: React.FC<DocumentUploadProps> = ({
<div className="flex items-center">
<CheckCircle className="h-5 w-5 text-blue-600 mr-2" />
<div>
<h3 className="text-sm font-medium text-blue-800">Document AI + Optimized Agentic RAG Processing</h3>
<h3 className="text-sm font-medium text-blue-800">AI-Powered CIM Analysis Processing</h3>
<p className="text-sm text-blue-700 mt-1">
All documents are automatically processed using Google Document AI for extraction and our advanced optimized agentic RAG system for analysis,
including intelligent chunking, vectorization, and multi-agent CIM review. PDFs are automatically deleted after processing.
All documents are automatically processed using AI-powered extraction and structured CIM review analysis. PDFs are automatically deleted after processing.
</p>
</div>
</div>
@@ -372,7 +371,7 @@ const DocumentUpload: React.FC<DocumentUploadProps> = ({
Drag and drop PDF files here, or click to browse
</p>
<p className="text-xs text-gray-500">
Maximum file size: 50MB Supported format: PDF Stored securely in Cloud Storage Automatic Document AI + Optimized Agentic RAG Processing PDFs deleted after processing
Maximum file size: 50MB Supported format: PDF Stored securely in Cloud Storage Automatic AI-Powered CIM Analysis Processing PDFs deleted after processing
</p>
</div>
@@ -401,7 +400,7 @@ const DocumentUpload: React.FC<DocumentUploadProps> = ({
<h4 className="text-sm font-medium text-success-800">Upload Complete</h4>
<p className="text-sm text-success-700 mt-1">
Files have been uploaded successfully! You can now navigate away from this page.
Processing will continue in the background using Document AI + Optimized Agentic RAG. This can take several minutes. PDFs will be automatically deleted after processing to save costs.
Processing will continue in the background using AI-Powered CIM Analysis. This can take several minutes. PDFs will be automatically deleted after processing to save costs.
</p>
</div>
</div>