The new leader must chart the party’s direction in the years ahead and quickly prepare for the mayoral race in November.