feat: ride achievements & badges (phase 3)#155
Merged
Conversation
added 2 commits
June 30, 2026 00:52
Adds an achievements/badges section to the detailed ride analysis screen: per-ride milestones (half-century/century, hill climber/summit seeker, King of the Mountain, speed demon, endurance, calorie crusher, early bird/night owl) and personal records (longest ride, most climbing, fastest pace, top-speed) flagged with a gold trophy. Pure, JVM-unit-tested engine evaluateAchievements in core.analysis (RideAchievementsTest); mock rides earn nothing. Localised in 8 languages.
…m the detail sheet Both charts now live on the dedicated detailed analysis screen (opened via the Open detailed analysis button), so the simple ride detail sheet stays focused on headline stats, calories and quick actions. Removes the SpeedChart composable and now-unused imports.
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.
Phase 3 of the detailed ride analysis screen: achievements & badges.
What's new
A new Achievements section (right under the map) celebrates what each ride accomplished, as a wrap-around row of coloured badge chips.
Per-ride milestones
Tiered ones award only the highest reached; each badge shows its achieved value.
Personal records (gold trophy + accent) when a ride beats every other recorded ride:
Implementation
evaluateAchievementsincore.analysis(no Android), computed off the main thread in the ViewModel from the ride, its analysis and the full ride list.AchievementsSectioncomposable renders the badge chips (Material extended icons, per-type colours, gold border for PRs).Tests
RideAchievementsTest: century vs half-century tiering, distance personal-record logic (and not awarded when not the longest / for the first-ever ride), mock exclusion. All green.i18n
Next (optional): a shareable report card, and opt-in online data (weather / map-matching).