Skip to content

feat: ride achievements & badges (phase 3)#155

Merged
drzeeb merged 2 commits into
mainfrom
feat/ride-analysis-phase3-achievements
Jun 29, 2026
Merged

feat: ride achievements & badges (phase 3)#155
drzeeb merged 2 commits into
mainfrom
feat/ride-analysis-phase3-achievements

Conversation

@drzeeb

@drzeeb drzeeb commented Jun 29, 2026

Copy link
Copy Markdown
Owner

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

  • Half-century / Century (50 / 100 km)
  • Hill climber / Summit seeker (500 / 1000 m of ascent)
  • King of the Mountain (a categorised climb — shows its HC / Cat 1-4 grade)
  • Speed demon (40 km/h), Endurance (2 h), Calorie crusher (1000 kcal)
  • Early bird / Night owl (start time)
    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:
  • Longest ride, Most climbing, Fastest pace, Top-speed record

Implementation

  • Pure, JVM-unit-tested engine evaluateAchievements in core.analysis (no Android), computed off the main thread in the ViewModel from the ride, its analysis and the full ride list.
  • AchievementsSection composable renders the badge chips (Material extended icons, per-type colours, gold border for PRs).
  • Mock rides earn nothing and are excluded from record comparisons.

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

  • 16 new strings localised across all eight supported languages.
    Next (optional): a shareable report card, and opt-in online data (weather / map-matching).

VeloSpot Dev 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.
@drzeeb drzeeb enabled auto-merge (squash) June 29, 2026 23:01
@drzeeb drzeeb merged commit d376e68 into main Jun 29, 2026
5 checks passed
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