Skip to content

feat: add manually selectable skateboarding - #454

Closed
highdeftant wants to merge 1 commit into
OpenStrap:mainfrom
highdeftant:feat/453-skateboarding-activity
Closed

highdeftant wants to merge 1 commit into
OpenStrap:mainfrom
highdeftant:feat/453-skateboarding-activity

Conversation

@highdeftant

@highdeftant highdeftant commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Closes #453

Adds skateboarding as a manually selectable Outdoor activity, with GPS route capture and the 2011 Adult Compendium's 5.0 MET value for general moderate-effort skateboarding (code 15580). MET-based calories remain estimates; workout cardiovascular strain still comes from the existing HR path. No automatic skateboard detection is added.

The installed health 12.2.1 enum does not expose a skateboard-specific workout type, so exports use the existing cross-platform OTHER fallback while retaining the Skateboarding workout title.

Tests: fvm flutter test test/ui2_activity_test.dart test/workout_health_mapping_test.dart test/route_types_match_catalogue_test.dart; fvm dart analyze on the changed Dart files; git diff --check.

Summary by Sourcery

Add manually selectable skateboarding activity support with route capture and health export compatibility.

New Features:

  • Add manually selectable skateboarding as an outdoor, GPS-enabled distance activity using a 5.0 MET estimate.

Enhancements:

  • Preserve the Skateboarding workout title while exporting through the shared OTHER health workout type fallback.

Tests:

  • Add coverage for skateboarding catalogue settings, calorie estimation, route support, and health-platform mapping.

Summary by CodeRabbit

  • New Features
    • Added Skateboarding to the outdoor activity options, with distance tracking and GPS route recording.

@sourcery-ai

sourcery-ai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown

Reviewer's Guide

Introduces manually selectable Skateboarding as a GPS-enabled, distance-tracked outdoor activity using the 2011 Compendium’s 5.0 MET estimate, adds its route type, and preserves cross-platform health export compatibility through the OTHER fallback while retaining the Skateboarding title.

Flow diagram for manually selected skateboarding workout

flowchart LR
    User[User selects Skateboarding] --> Activity[Skateboarding activity]
    Activity --> GPS[GPS route capture]
    Activity --> Distance[Distance tracking]
    Activity --> Calories[Estimated calories from 5.0 MET]
    Activity --> HR[Cardiovascular strain from HR path]
    Activity --> Export[Health export]
    Export --> Other[OTHER workout type]
Loading

File-Level Changes

Change Details Files
Adds skateboarding to the manually selectable outdoor activity catalogue with distance tracking, GPS route capture, and MET-based calorie estimation.
  • Registers the skateboarding route type.
  • Defines the activity with a 5.0 MET value from the cited 2011 Adult Compendium.
  • Uses existing UI icon/color conventions and explicitly keeps the activity manual rather than auto-detected.
lib/gps/route_types.dart
lib/ui2/activity/catalogue.dart
Verifies health export compatibility while preserving the Skateboarding workout title.
  • Maps skateboarding to HealthWorkoutActivityType.OTHER on iOS and non-iOS platforms.
  • Confirms the exported/displayed title remains Skateboarding.
test/workout_health_mapping_test.dart
Adds regression coverage for activity selection, route behavior, and calorie estimation.
  • Checks the activity key, distance tracking, GPS enablement, 5.0 MET value, and calculated calories.
  • Validates the health fallback mapping and title.
test/ui2_activity_test.dart
test/workout_health_mapping_test.dart

Assessment against linked issues

Issue Objective Addressed Explanation
#453 Add Skateboarding to the manually selectable activity catalogue with an appropriate category, distance/GPS tracking mode, and a supported Compendium MET value. ✅
#453 Keep energy estimates distinct from cardiovascular strain by using the existing MET-based calorie calculation and HR-derived cardiovascular strain pipeline, without adding automatic skateboard detection. ✅
#453 Ensure Skateboarding sessions support route/type persistence and summary display, and map to the platform Health fallback when no skateboard-specific workout type exists, with focused tests. ✅

Possibly linked issues


Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

@coderabbitai

coderabbitai Bot commented Sep 24, 2026 •

Copy link
Copy Markdown
Contributor

Review in Change Stack →

Navigate logical layers of code changes, visualize relationships, and explore their blast radius.

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Repository: OpenStrap/edge/.coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: 445b4818-0881-4f94-a12b-69e1a331da04

📥 Commits

Reviewing files that changed from the base of the PR and between 9b4a102 and e982c12.

⛔ Files ignored due to path filters (2)
  • test/ui2_activity_test.dart is excluded by !test/**
  • test/workout_health_mapping_test.dart is excluded by !test/**
📒 Files selected for processing (2)
  • lib/gps/route_types.dart
  • lib/ui2/activity/catalogue.dart

Included review availability: Your plan provides up to 4 included reviews per hour; 3 remain after this review.


📝 Walkthrough

Walkthrough

The activity catalogue adds skateboarding as an Outdoor activity with distance tracking, a 5.0 MET value, and GPS enabled. The route-bearing activity keys now include skateboarding.

Changes

Skateboarding activity

Layer / File(s) Summary
Activity entry and GPS routing
lib/ui2/activity/catalogue.dart, lib/gps/route_types.dart
The Outdoor catalogue adds skateboarding with distance tracking, MET 5.0, and GPS enabled. The route-bearing activity keys include skateboarding.

Priority: ⬇️ Low

Estimated code review effort: 2 (Simple) | ~10 minutes

Change: Feature

Suggested reviewers: abdulsaheel

Merge Risk: ⚪ Minimal · up to e982c

Skateboarding can be selected, recorded with GPS when permitted, and exported with its title. The reviewed changes show no actionable merge-blocking risk.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 inconclusive)

Check name Status Explanation Resolution
Linked Issues check ❓ Inconclusive The reviewed changes support the core objectives in [#453]: they add Skateboarding to the Outdoor catalogue, use Track.distance, enable GPS route recording, and cite Compendium code 15580 with 5.0 M… Provide reviewable evidence that the catalogue, session-type persistence, summary display, and Health fallback have focused automated tests. The excluded test paths cannot be used to decide this requirement.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly identifies the main change: adding skateboarding as a manually selectable activity.
Out of Scope Changes check ✅ Passed The reviewed changes are limited to route eligibility and the Skateboarding catalogue entry. These changes directly support [#453]. The changes do not add automatic skateboard detection or an unrelate…
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff. Analyzed 0 functions across 0…
Full details: Linked Issues check

Explanation

The reviewed changes support the core objectives in [#453]: they add Skateboarding to the Outdoor catalogue, use Track.distance, enable GPS route recording, and cite Compendium code 15580 with 5.0 MET. The PR summary also states that the existing heart-rate pipeline remains the source of cardiovascular strain and that Health uses OTHER with the Skateboarding title. The required catalogue and focused UI/persistence tests cannot be verified. The relevant test files are excluded from review, and no independent test evidence is provided.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@sourcery-ai sourcery-ai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hey - I've reviewed your changes and they look great!

Sourcery assessment

Needs a human reviewer. If the new activity mapping or 5.0 MET estimate is wrong, users can create persisted skateboarding sessions and GPS routes with incorrect activity data. Reverting stops new records but does not remove those already stored, though the bounded records can be corrected or deleted.


Sourcery is free for open source - if you like our reviews please consider sharing them ✨

@highdeftant

Copy link
Copy Markdown
Contributor Author

Closing for now per author request; keeping the fork branch as a local prototype while we do the activity research and chart design work.

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.

Add skateboarding as a manually selectable activity

1 participant