workout generator audit: rules engine, structure rules, split patterns, injury UX, metadata cleanup
- Add rules_engine.py with quantitative rules for all 8 workout types - Add quality gate retry loop in generate_single_workout() - Expand calibrate_structure_rules to all 120 combinations (8 types × 5 goals × 3 sections) - Wire WeeklySplitPattern DB records into _pick_weekly_split() - Enforce movement patterns from WorkoutStructureRule in exercise selection - Add straight-set strength support (single main lift, 4-6 rounds) - Add modality consistency check for duration-dominant workout types - Add InjuryStep component to onboarding and preferences - Add sibling exercise exclusion in regenerate and preview_day endpoints - Display generator warnings on dashboard - Expand fix_rep_durations, fix_exercise_flags, fix_movement_pattern_typo - Add audit_exercise_data and check_rules_drift management commands - Add Next.js frontend with dashboard, onboarding, preferences, history pages - Add generator app with ML-powered workout generation pipeline - 96 new tests across 7 test modules Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
59
werkout-frontend/components/onboarding/DurationStep.tsx
Normal file
59
werkout-frontend/components/onboarding/DurationStep.tsx
Normal file
@@ -0,0 +1,59 @@
|
||||
"use client";
|
||||
|
||||
import { Slider } from "@/components/ui/Slider";
|
||||
|
||||
interface DurationStepProps {
|
||||
duration: number;
|
||||
onChange: (min: number) => void;
|
||||
}
|
||||
|
||||
export function DurationStep({ duration, onChange }: DurationStepProps) {
|
||||
return (
|
||||
<div>
|
||||
<h2 className="text-2xl font-bold text-zinc-100 mb-2">
|
||||
Workout Duration
|
||||
</h2>
|
||||
<p className="text-zinc-400 mb-10">
|
||||
How long do you want each workout to be? This is the total time
|
||||
including warm-up, working sets, and rest periods.
|
||||
</p>
|
||||
|
||||
{/* Big centered display */}
|
||||
<div className="flex flex-col items-center justify-center py-12">
|
||||
<div className="text-7xl font-bold text-accent tabular-nums mb-2">
|
||||
{duration}
|
||||
</div>
|
||||
<div className="text-lg text-zinc-400">minutes</div>
|
||||
</div>
|
||||
|
||||
{/* Slider */}
|
||||
<div className="max-w-md mx-auto">
|
||||
<Slider
|
||||
min={20}
|
||||
max={90}
|
||||
value={duration}
|
||||
onChange={onChange}
|
||||
step={5}
|
||||
label="Duration"
|
||||
unit="min"
|
||||
/>
|
||||
</div>
|
||||
|
||||
{/* Duration guide */}
|
||||
<div className="mt-10 grid grid-cols-3 gap-4 text-center">
|
||||
<div>
|
||||
<div className="text-sm font-medium text-zinc-300">Quick</div>
|
||||
<div className="text-xs text-zinc-500">20-30 min</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-sm font-medium text-zinc-300">Standard</div>
|
||||
<div className="text-xs text-zinc-500">40-60 min</div>
|
||||
</div>
|
||||
<div>
|
||||
<div className="text-sm font-medium text-zinc-300">Extended</div>
|
||||
<div className="text-xs text-zinc-500">70-90 min</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
Reference in New Issue
Block a user