Skip to content

Stabilize live power chart updates - #35

Merged
ridecontrol merged 1 commit into
mainfrom
fix/stable-live-power-chart
Aug 1, 2026
Merged

Stabilize live power chart updates#35
ridecontrol merged 1 commit into
mainfrom
fix/stable-live-power-chart

Conversation

@ridecontrol

Copy link
Copy Markdown
Collaborator

What changed

  • replace global even chart sampling with a bounded fixed-bucket first/min/max/last envelope
  • retain extrema for every plotted metric, including short power spikes
  • keep completed buckets stable while the current live bucket receives new readings
  • use elapsed time as the durable chart datum identity
  • explicitly disable chart transition animation for live updates

Why

The prior sampler recalculated every plotted source index as a session grew. On longer rides, noisy power readings repeatedly entered and left the rendered set, making the power line and its scale jump even though the underlying ride history had not changed.

User impact

Live power remains responsive to new readings without rewriting the already-recorded portion of the chart. Power peaks remain visible and the chart keeps its bounded rendering cost.

Validation

  • bun run ci
  • 375 tests passed
  • TypeScript, Biome, Tailwind diagnostics, and production build passed

@ridecontrol
ridecontrol merged commit 086f123 into main Aug 1, 2026
2 checks passed
@ridecontrol
ridecontrol deleted the fix/stable-live-power-chart branch August 1, 2026 03:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant