As he raced across the country before the election, President Obama warned supporters about the stakes. “All the progress we’ve made over these last eight years,” he said, “goes out the window if we don’t win this election.”

Hillary Clinton, his anointed successor, did not win, and so now Mr. Obama will find out whether his prediction was just campaign hyperbole or if his legacy really has just gone out the window. Not only are specific initiatives like his health care and climate change programs at risk, but so, too, is the broader vision Mr. Obama articulated for America.

Suddenly, the progressive, post-racial, bridge-building society he promised has given way to an angry, jeering, us-against-them nation to be led by a new president who relishes reality-show name-calling with racial overtones. In none of Mr. Obama’s worst-case scenarios when he came to office was this the way he imagined leaving.

Since the electoral earthquake that made Donald J. Trump his designated successor, Mr. Obama has consoled his team — and himself — by telling them that they moved the country forward despite this obvious setback. Change does not follow a straight line, he told crying aides. Instead, it tends to zig and zag.