Repository navigation
Conversation
Update code with api-13 to remove deprecated calls. (suppress for <api-33). Support HR transmitter that do not support battery or firmware. This occurs for instance for Garmin watches set to send HR over bluetooth.
- Enabled depreciation warnings No update for wear, requires som GMS updates first - fix some gradle 10 syntax in builds.gradle and gradle.properties - use ivy repo for ant+ lib
There was a problem hiding this comment.
🟡 Changes recommended
Unresolved critical and moderate issues affect compilation, lint, dependency resolution, formatting, and chart behavior.
Get a fresh assessment by requesting another Copilot review.
Pull request overview
Migrates workout and heart-rate charts from GraphView to AndroidChart while modernizing BLE APIs and build configuration.
Changes:
- Replaces graph rendering and adds chart legends and HR-zone visualization.
- Refactors chart data and pace/velocity formatting.
- Updates BLE APIs, dependencies, compiler settings, lint baselines, and attribution.
File summaries
| File | Change | Final review note |
|---|---|---|
wear/lint-baseline.xml |
Updates lint metadata. | — |
hrdevice/src/org/runnerup/hr/BtHRBase.java |
Renames Bluetooth UUID constants. | — |
hrdevice/src/org/runnerup/hr/AndroidBLEHRProvider.java |
Adds modern BLE callbacks and descriptor handling. | — |
hrdevice/lint-baseline.xml |
Updates lint metadata. | — |
hrdevice/build.gradle |
Changes ANT+ AAR resolution. | Critical (1 vote): The Ivy dependency lacks a revision and fails when ANT+ is enabled; provide a valid revision. |
gradle.properties |
Removes obsolete Gradle and Android properties. | — |
common/lint-baseline.xml |
Updates lint metadata. | — |
build.gradle |
Updates repositories, compiler settings, and Spotless. | — |
app/src/mapbox/org/runnerup/util/MapWrapper.java |
Uses preferred velocity formatting. | — |
app/src/main/org/runnerup/view/HRZonesBar.java |
Revises HR-zone sizing and rendering. | Moderate (1 vote): The fallback inset can still clip labels; clamp using the actual label width. |
app/src/main/org/runnerup/view/HRSettingsActivity.java |
Replaces the live HR graph. | — |
app/src/main/org/runnerup/view/AccountActivity.java |
Improves intent error logging. | — |
app/src/main/org/runnerup/util/LineGraphSeries.java |
Adds graph-series support. | — |
app/src/main/org/runnerup/util/GraphWrapper.java |
Replaces workout graphs with combined AndroidChart charts. | Critical (1 vote): List.reversed() requires Java 21, but the project compiles with Java 17. Moderate (3 votes): Valid velocity/pace data is dropped for no-GPS activities. Moderate (2 votes): The full-height chart clips its legend, including the equivalent path at line 247. Moderate (1 vote): Elevation can retain heart-rate axis formatting. |
app/src/main/org/runnerup/util/Formatter.java |
Refactors pace and velocity formatting. | Moderate (3 votes): Pace targets are formatted incorrectly without the reciprocal conversion; use a separate m/s helper for velocity. |
app/src/main/org/runnerup/util/DataPoint.java |
Adds a chart data-point model. | — |
app/res/values/dimens.xml |
Adds an HR chart dimension. | Critical (1 vote): The dimension is unused and will trigger release lint; apply it or remove it. |
app/res/layout/detail.xml |
Updates the graph layout container. | — |
app/proguard.txt |
Removes GraphView rules. | — |
app/lint-baseline.xml |
Updates lint metadata and findings. | — |
app/build.gradle |
Replaces the GraphView dependency. | — |
app/assets/about.html |
Updates chart-library attribution. | — |
Review details
Suppressed comments (3)
app/src/main/org/runnerup/util/GraphWrapper.java:247
- The legend is inserted at index 0, so it is rendered above the chart, contradicting the comment that it should be at the bottom and changing the intended layout. Append it after the chart instead.
graphTab.addView(scroll, 0);
app/src/main/org/runnerup/util/GraphWrapper.java:476
- When velocity, heart rate, and elevation are all present, velocity enables the left axis and heart rate enables the right axis. Elevation then reaches this branch with the right axis already enabled, leaves
axisnull, and never installs its formatter, so the right-axis labels remain formatted as heart rate instead of elevation.
dataSet.setAxisDependency(YAxis.AxisDependency.RIGHT);
if (!chart.getAxisRight().isEnabled()) {
axis = chart.getAxisRight();
}
app/src/main/org/runnerup/view/HRZonesBar.java:157
- When the percentage does not fit to the right of the bar, this fallback adds
extraInsideInsetto an end-aligned position. That inset is measured from a wider placeholder than the actual label, so it moves the label back to the right of the bar and can still clip it on narrow screens instead of placing it inside the bar; clamp the label using only its actual width.
float percentInsideOffset =
Math.max(
barOffset + borderSize,
barOffset + chartWidth - percentWidth - borderSize + extraInsideInset);
- Files reviewed: 21/22 changed files
- Comments generated: 6
- Review effort level: Lite
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
| return switch (dimension) { | ||
| case DISTANCE -> formatDistance(target, Math.round(value)); | ||
| case TIME -> formatElapsedTime(target, Math.round(value)); | ||
| case PACE -> formatPace(target, value); |
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.
No description provided.