From 8a0032d08862dcf28c653bee3fd21052e967e35d Mon Sep 17 00:00:00 2001 From: Martin Kagamino Lehoux Date: Sun, 18 Oct 2026 21:19:36 +0200 Subject: Cut climb profile sections in the backend The chart steps are computed in Go and shipped as finished sections, next to the profile statistics the climb package already owns: climb.ProfileSections cuts a Route at its widest bends under a ProfilePolicy, and rideanalysis.MergeClimbProfile takes over the merge that lived in web/climbs.go, so web only loads the attempt rides and maps the DTOs. The payload carries sections instead of raw elevations, and the browser keeps what needs the canvas: slope bands, labels, distance ticks and colours. official-climb-profile-logic.ts and its tests are gone, replaced by climb/profile_test.go and a page test reading the embedded profile JSON. --- web/frontend/ride-detail.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'web/frontend/ride-detail.ts') diff --git a/web/frontend/ride-detail.ts b/web/frontend/ride-detail.ts index dcebbe4..2bd6622 100644 --- a/web/frontend/ride-detail.ts +++ b/web/frontend/ride-detail.ts @@ -75,7 +75,7 @@ export const mountRideDetail = (): void => { passes, colors: mapColors, }); - const officialProfileController = new OfficialClimbProfileController(points); + const officialProfileController = new OfficialClimbProfileController(profile); let boundaryController: RideBoundaryController | undefined; const profileCanvas = new RideProfileCanvas({ canvas: profileCanvasElement, -- cgit v1.3