Sir Keir Starmer took charge of Labour a year ago and has faced his first challenge at the polls.