Athlete segments tab: link best time to activity; expandable effort list
- best_activity_id now included in segment_summary API response
- Best time is a direct link to the activity that produced it
- Clicking a row expands an inline effort list (lazy-loaded from
/api/segments/{id}/efforts): date linked to activity, time, Δ vs PR
- Clicking again collapses; ▲/▼ chevron shows state
This commit is contained in:
@@ -2699,8 +2699,9 @@ async def user_segment_summary(handle: str) -> JSONResponse:
|
||||
"sport": seg.sport,
|
||||
"distance_m": seg.distance_m,
|
||||
},
|
||||
"best_elapsed_s": best.elapsed_s,
|
||||
"effort_count": len(efforts),
|
||||
"best_elapsed_s": best.elapsed_s,
|
||||
"best_activity_id": best.activity_id,
|
||||
"effort_count": len(efforts),
|
||||
})
|
||||
result.sort(key=lambda x: x["segment"]["name"].lower())
|
||||
return JSONResponse(result)
|
||||
|
||||
Reference in New Issue
Block a user