Repository navigation
Conversation
there was no rucking activity. a ruck had to be logged as a hike or a walk, and the one number that defines it, the weight carried, had nowhere to go. rucking is a route activity with gps, listed beside hiking and priced at the compendium backpacking rate (17010, 7.0 met). that rate is flat, so it reads the same for a light pack and a heavy one. no load-aware estimate is added here; that is a metric and belongs in analytics. the pack weight is asked for on the setup screen and stored on the session (sessions.load_kg, schema v63), because it changes from one outing to the next. the screen opens on the weight used last time, shown before start; someone who has never entered one sees a dash, and a dash stores null. the profile body weight the session started with is banked beside it (body_kg), so the share of body weight on the summary describes that day and not today's profile. the summary shows the pack weight where it can still be corrected, since a forgotten or wrong one is only noticed afterwards. putSession replaces the whole row, so stopWorkout carries both columns in the row it writes, whichever way the session was ended, and a retime carries them too. two things follow from adding the type. rucking joins the gait step types on hiking's footing: the same walk, arms free to swing. and a session that carried weight is left out of the per-session vo2max estimate: that estimate reads the split's speed as unloaded, so the same split under a pack would bank a lower figure than the person has. apple health and health connect have no rucking type, so a ruck is exported as a hike. a whoop "hiking/rucking" import still lands as hiking. the icon is a rucksack drawn for it on lucide's grid and stroke rules, since lucide's only backpack is a school bag. it ships as a one-glyph font (assets/fonts/EdgeIcons.ttf, built from the svg beside it by tool/gen_edge_icons.py), because an activity's icon is an IconData everywhere it is drawn, so no call site changes. the whoop freeze golden snapshots every sessions column, so its test drops the two new ones while they are null, the way it already drops day_result.imported. a value there would be one the derive made up, and it still fails. the goldens themselves are untouched. Authored by : BT
a ruck on a treadmill has no route. logged as rucking it arms gps indoors, where a fix wanders and the distance it adds up is not one anybody walked. this adds the indoor ruck as its own entry, the way treadmill sits beside running and indoor bike beside cycling: no gps, tracked by time and heart rate, and the same pack weight. the belt shows a distance and nothing in the app can measure one indoors, so the summary takes what the user reads off the machine. it is stored in its own column (sessions.entered_distance_m, schema v64) and carried on the result as its own field, never as the measured route distance: it does not feed the hero, the splits, the share card or the vo2max estimate. the card that shows it says where it came from, and prints the pace it gives over the session's clock. empty until typed; clearing it stores null. a retime carries the column. a treadmill ruck is exported to apple health and health connect as a walk, and counts steps on treadmill's footing. the whoop freeze golden test drops the new column while it is null, with the pack weight columns; the goldens are untouched. Authored by : BT
|
Important Draft PR not reviewedDraft PRs are not automatically reviewed by default.
To automatically review draft PRs, update your CodeRabbit configuration: reviews:
auto_review:
drafts: true
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. |
Reviewer's GuideSchema and migrationsAdd nullable session columns for carried load, banked body weight and user-entered treadmill distance, with their versioned migrations and open-time repair.
Data structuresKeep typed session values intact when rebuilding or retiming session rows, and exclude load-carrying outings from unloaded VO₂max estimates.
Define the activities’ tracking, load and entered-distance data, and extend step-counting and route-type classifications for the new activities.
APIExtend session results with carried-weight and machine-distance fields and expose typed-distance parsing and pack-weight display helpers.
Map rucking and treadmill rucking to the closest supported platform workout categories.
Uses of the APICarry pack and body weights through every workout-stop path by matching the live draft to the session, and preserve existing values on retries.
Populate result fields from live setup and past-session rows so summaries can display and edit the saved values.
ImplementationPersist edits to carried load and entered distance, render their summary cards, and calculate pace only from user-entered treadmill distance.
Add setup-screen pack-weight input and save the selected value into preferences and the live draft.
UIAdd localized activity names and the machine-distance provenance hint across the supported locales.
ConfigurationBundle the custom rucksack icon font and register it with Flutter.
Register and document the preference key that remembers the last ruck pack weight.
TestsVerify migrations, session preservation, lifecycle persistence, gait classification, result behavior, UI input and rendering, icon bundling, and VO₂max exclusions for the new activities.
Keep the new preference in the backup settings audit and relax tests that assumed the schema remained at version 62.
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
Why
A ruck on a treadmill has no route. Logged as Rucking it arms GPS indoors, where a fix wanders and the distance it adds up is not one anybody walked.
What
sessions.entered_distance_m, schema v63 → v64, nullableREAL, added with_addColumnIfMissingfrom the rung and from the open-time repair) and carried on the result as its own field, never as the measured route distance. It does not feed the hero, the splits, the share card or the VO2max estimate.NULL.The freeze golden test drops the new column while it is
NULL, with the pack weight columns from #1060; the goldens are untouched.No network calls, so nothing for
PRIVACY.md. No analytics output changes, so nokAlgoVersionbump.Before and after
Strings
One new key (
activityMachineDistanceHint) in all eightapp_<code>.arbfiles, plus aktreadmillruckcase in each translatedactivityCatalogueName. The non-English values are my best effort and have not been checked by native speakers.Tests
test/ui2_activity_test.dart: a treadmill ruck is a ruck with no route; a typed distance is its own figure, never the measured one; the distance field takes a distance, an empty field, and no more; a treadmill ruck offers its distance and pace appears with it.test/manual_workout_repo_test.dart: retiming keeps the distance typed off the treadmill.test/db_migration_ladder_test.dart: the v64 rung.test/gait_step_types_test.dart.flutter analyze: no issues.flutter test --concurrency=1: all passed underTZ=UTCon macOS (10,588 passed, 29 skipped). The freeze golden test andtest/adapters/miscale_test.dartalso pass underAsia/KolkataandAmerica/New_York.A build with this change has been on my own iPhone with a WHOOP band for several days. Not run on Android.
Summary by Sourcery
Add outdoor and treadmill rucking workouts, with optional pack-weight tracking and a separately recorded treadmill distance.
New Features:
Bug Fixes:
Enhancements:
Tests:
Chores: