From e3d0beee5be3dd2854b0f4fc10905a4fcdc08f47 Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Sun, 13 Sep 2026 21:55:59 +0200 Subject: 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. --- web/server.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'web/server.go') diff --git a/web/server.go b/web/server.go index c588696..fc0e526 100644 --- a/web/server.go +++ b/web/server.go @@ -50,8 +50,10 @@ func (s *Server) Handler() http.Handler { handleRoute(mux, "POST /preview/official-climbs", s.handlePreviewOfficialClimb) handleRoute(mux, "GET /rides/{id}", s.handleRide) handleRoute(mux, "GET /analytics", s.handleAnalytics) - handleRoute(mux, "POST /rides/{id}/official-climbs", s.handleCreateOfficialClimb) + handleRoute(mux, "GET /climbs", s.handleClimbs) + handleRoute(mux, "GET /climbs/{id}", s.handleClimb) handleRoute(mux, "POST /rides/{id}/categories", s.handleUpdateRideCategories) + handleRoute(mux, "POST /rides/{id}/official-climbs", s.handleCreateOfficialClimb) handleRoute(mux, "GET /data-quality", s.handleDataQuality) handleRoute(mux, "POST /data-quality/categories", s.handleBulkUpdateCategories) handleRoute(mux, "GET /sync", s.handleSyncForm) -- cgit v1.3