feat: complete comprehensive zero-state metrics across all dashboard pages for new accounts
This commit is contained in:
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user