feat: Enhance session processing and metrics

- Updated session processing commands in documentation for clarity.
- Removed transcript content fetching from session processing, allowing on-demand retrieval.
- Improved session metrics calculations and added new metrics for dashboard.
- Refactored processing scheduler to handle sessions in parallel with concurrency limits.
- Added manual trigger API for processing unprocessed sessions with admin checks.
- Implemented scripts for fetching and parsing transcripts, checking transcript content, and testing processing status.
- Updated Prisma schema to enforce default values for processed sessions.
- Added error handling and logging improvements throughout the processing workflow.
This commit is contained in:
Max Kowalski
2025-06-26 17:12:42 +02:00
parent 8f3c1e0f7c
commit 8c43a35632
20 changed files with 851 additions and 229 deletions

View File

@ -26,11 +26,11 @@ export default function TopQuestionsChart({ data, title = "Top 5 Asked Questions
return (
<div className="bg-white p-6 rounded-lg shadow-sm border border-gray-200">
<h3 className="text-lg font-semibold text-gray-900 mb-4">{title}</h3>
<div className="space-y-4">
{data.map((question, index) => {
const percentage = maxCount > 0 ? (question.count / maxCount) * 100 : 0;
return (
<div key={index} className="relative">
{/* Question text */}
@ -42,7 +42,7 @@ export default function TopQuestionsChart({ data, title = "Top 5 Asked Questions
{question.count}
</span>
</div>
{/* Progress bar */}
<div className="w-full bg-gray-200 rounded-full h-2">
<div
@ -50,7 +50,7 @@ export default function TopQuestionsChart({ data, title = "Top 5 Asked Questions
style={{ width: `${percentage}%` }}
/>
</div>
{/* Rank indicator */}
<div className="absolute -left-2 top-0 w-6 h-6 bg-blue-600 text-white text-xs font-bold rounded-full flex items-center justify-center">
{index + 1}
@ -59,7 +59,7 @@ export default function TopQuestionsChart({ data, title = "Top 5 Asked Questions
);
})}
</div>
{/* Summary */}
<div className="mt-6 pt-4 border-t border-gray-200">
<div className="flex justify-between text-sm text-gray-600">