feat: complete comprehensive zero-state metrics across all dashboard pages for new accounts

This commit is contained in:
2026-09-13 22:17:40 +05:30
parent d9bd142e6a
commit afab06d33c
22 changed files with 771 additions and 299 deletions

View File

@@ -17,7 +17,19 @@ def calculate_readiness_score(user_id: UUID, session: Session) -> dict:
).all()
if not attempts:
return {"score": 0, "status": "Not enough data"}
return {
"score": 0,
"status": "Not enough data",
"prediction": "Start practice to calculate",
"target_type": "Unranked",
"breakdown": {
"accuracy": 0,
"speed": 0,
"consistency": 0,
"recovery": 0,
"coverage": 0,
}
}
# 1. Accuracy (40% Weight)
avg_accuracy = sum(a.accuracy for a in attempts) / len(attempts)