aboutsummaryrefslogtreecommitdiff
path: root/web/rides.go
diff options
context:
space:
mode:
authorMartin Kagamino Lehoux <martin@lehoux.net>2026-09-13 21:55:59 +0200
committerMartin Kagamino Lehoux <martin@lehoux.net>2026-09-13 21:55:59 +0200
commite3d0beee5be3dd2854b0f4fc10905a4fcdc08f47 (patch)
treeec8234d3442c498ec170b6444bd2cfae5b29a476 /web/rides.go
parentdb4d2b40895db41ce188549f49a6f277ba95c890 (diff)
Persist official climb attempts with climbs pages
Record one attempt row per (ride, climb, occurrence) when a ride detail loads, snapshotting distance, elevation gain, slope, cotacol and attempt timestamps; a climbs-backfill CLI command seeds all existing rides. New /climbs list page aggregates attempts (medians computed in Go, best time as min duration) with sortable columns, and /climbs/{id} shows the median scalar stats, a median normalized elevation profile (50 steps over each attempt's own length), the full-precision recorded route of the median-distance attempt on an OSM map, and every attempt with time at second precision.
Diffstat (limited to 'web/rides.go')
-rw-r--r--web/rides.go1
1 files changed, 1 insertions, 0 deletions
diff --git a/web/rides.go b/web/rides.go
index 37340b8..10fbb75 100644
--- a/web/rides.go
+++ b/web/rides.go
@@ -87,6 +87,7 @@ func (s *Server) handleRide(w http.ResponseWriter, r *http.Request) {
slog.Warn("Failed to load official climbs for ride detail", "ride_id", id, "error", err)
}
matchPolicy := s.officialClimbMatchPolicy()
+ s.recordOfficialClimbAttempts(id, parsed, analysisFor(parsed, passes, officialClimbs, matchPolicy))
slog.Info("Loaded ride detail", "ride_id", id)
view := buildRideDetailView(buildRideView(item), parsed, passes, officialClimbs, matchPolicy)
view.Notice = rideDetailNotice(r)