A teenager has been handed an indefinite sentence after shaking his partner’s baby to death, causing “catastrophic” brain injuries, when he was 16 years old.