Add a guided FTP test with retest reminders and progress tracking - #19
Open
HugoLeBoennec wants to merge 1 commit into
Open
Add a guided FTP test with retest reminders and progress tracking#19HugoLeBoennec wants to merge 1 commit into
HugoLeBoennec wants to merge 1 commit into
Conversation
The ramp and 20-minute protocols already existed as two rows in a list of fourteen bundled workouts, with no explanation of what FTP is, which test to pick, or when to retest. Beginners are the ones training against the 200 W default and the least likely to go looking, so this promotes FTP testing to a destination of its own. - New /ftp-test screen: explains FTP, recommends a protocol (ramp for the first two tests, then 20-minute — the ramp needs no pacing skill, which is what makes a first 20-minute effort misreport), lists preparation guidance, launches the test ride, and charts results over time. - Home dashboard card doubling as the reminder: badges START HERE for an untested rider and DUE once the interval elapses. - FtpTestPlanner decides retest timing. Six weeks by default, adjustable from four to sixteen in Settings — threshold adaptations take three to six weeks to show up as power, and a maximal test costs a day or two of quality training either side, so testing more often mostly buys noise. - FTP history now records whether a value was measured or typed (schema v6), so editing FTP in Settings no longer resets the retest clock and progress is measured test-to-test. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
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.
Why
The ramp and 20-minute protocols already existed — as two rows in a list of fourteen bundled workouts, with no explanation of what FTP is, which test to pick, or when to retest. FTP drives every workout target in the app, so a rider who never sets it trains against the 200 W default forever. Beginners are the ones most likely to be in that position and the least likely to go looking, so this promotes FTP testing to a destination of its own.
What the research says
Sources: Cycling Weekly · CTS/TrainRight · TrainerRoad · Roadman Cycling · Canadian Cycling Magazine
What's here
/ftp-testscreen (lib/presentation/screens/ftp_test_screen.dart) — FTP explainer, status card, protocol picker with the recommendation badged and pre-selected (override allowed), preparation checklist, and an FTP-over-time chart with a test-to-test history list.START HEREfor an untested rider,DUEonce the interval elapses.FtpTestPlanner(lib/core/application/services/ftp_test_planner.dart) — pure-Dart retest timing and protocol recommendation.Notable decisions
Schema migration (v6). FTP history stored only a date and a value, so "last changed" and "last tested" were indistinguishable — anyone nudging their FTP by hand in Settings would silently stop getting reminders. Added a nullable
sourcecolumn; pre-v6 rows read back asmanual, the conservative default. A test that confirms an unchanged FTP now still writes an entry, otherwise a rider whose fitness held steady would never reset the clock.Consolidated a duplicate enum.
FtpTestType(presentation) andFtpTestProtocol(domain) were the same thing — collapsed into the domain one across 5 call sites.Restored generated schema files. Regenerating the drift schema rewrote v2–v5 in a newer style that drops the insert helpers the migration tests use. Only the v6 addition is kept; v2–v5 are untouched. Worth knowing before the next regeneration.
Testing
flutter analyzeclean, all 835 tests pass.FtpTestPlanner(status boundaries, custom intervals, protocol graduation, progress across manual edits, future-dated entries).Three existing widget tests broke because the new card and tile pushed content below the 800×600 test viewport. Those tests were given a taller surface rather than having assertions adjusted — the content was correct, just unbuilt.
🤖 Generated with Claude Code