feat(planner): collapsible elevation chart with summary bar

Docked-but-collapsible placement (the chosen direction):

- A collapse toggle (chevron) in the chart header; state persists to
  localStorage.
- Collapsed = a thin summary bar: a mini sage sparkline + distance and
  ascent/descent + an expand toggle. Reclaims map space on demand.
- Summary figures come from the same authoritative routeStats the
  sidebar uses (distance, elevationGain, elevationLoss), so the numbers
  match the sidebar exactly — not recomputed from the raw elevation
  points (which over-counted ascent ~2x from noise).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Ullrich Schäfer 2026-07-16 01:36:21 +02:00
parent 87c06ead2d
commit 8cbaceb356
No known key found for this signature in database
GPG key ID: A32FF691A0F752D9
4 changed files with 98 additions and 2 deletions

View file

@ -280,7 +280,7 @@ export function SessionView({ sessionId, hasJournalCallback, returnUrl, initialW
</div>
<Suspense fallback={null}>
<div className="relative">
<ElevationChart yjs={yjs} onHover={handleElevationHover} highlightDistance={highlightChartDistance} onClickPosition={handleChartClick} onDragSelect={handleChartDragSelect} days={days} />
<ElevationChart yjs={yjs} onHover={handleElevationHover} highlightDistance={highlightChartDistance} onClickPosition={handleChartClick} onDragSelect={handleChartDragSelect} days={days} routeStats={routeStats} />
{isZoomedByChart && (
<button
onClick={handleResetZoom}