- Refactored step clamping logic to ensure it correctly handles edge cases when the timeline is empty or when the unit changes. - Updated useEffect to reset the step to 0 when the timeline is empty, enhancing user experience during training sessions.