Repository navigation
Add activity selection metrics, heart-rate drift, and integration fixes - #16
Merged
Merged
Conversation
…ions The PR recalculated full-resolution segment metrics and heart-rate zones on every drag selection update, adding synchronous UI-thread work despite the chart's downsampled rendering. This caused noticeable drag-to-zoom lag and undermined the responsiveness that downsampling was introduced to keep. Use only the committed zoom domain for segment calculations, decoupling requests, and capped chart samples. During dragging, update the selection highlight; on mouse release, calculate accurate metrics from all records and resample the visible window. Memoize metric cards and the HR-zone chart so unchanged values do not rerender with each drag update. Add regression coverage for all three axes, release, cancellation, reset, and sensor readings omitted from plotted samples. Update the developer guide to document when segment metrics change. Validation: TypeScript typecheck, all 25 activity tests, and production build passed. Live UI frame rate has not been measured.
Enable connectNulls for all combined and split activity chart series so missing or filtered readings do not leave visual breaks, matching the preferred continuous chart appearance. This is a rendering change; full-resolution metrics, chart sample caps, and calculations after drag release are preserved. Validation: TypeScript typecheck and git diff --check passed.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Activity Detail now recalculates workout metrics for selected chart ranges and reports heart-rate drift and pace-HR decoupling for the whole workout or a selection. Segment metrics use full-resolution records, with calculations deferred until drag release. Missing distance readings no longer create false stops.
Incorporates the original work from #15 together with the reviewed integration fixes:
Contributors
Includes contributions from Will (@bitloop-dev) and @farrrunnner.
Validation
npm run checkpassed: version alignment, TypeScript typecheck, 25 activity tests, Rust check, 42 Rust tests, and Rust formatting.npm run buildpassed.git diff --check origin/main...HEADpassed.