The past week amounted to watching President Trump steadily give ground until Friday when he conceded in full. He agreed with congressional leaders to reopen the federal government for three weeks while negotiations will continue on how best to enhance border security. As practically everyone knows, this is the deal the president rejected in December, choosing instead to launch the partial government shutdown.

At that time, the U.S. Senate, led by his fellow Republicans, unanimously approved the deal to keep the government operating. Mitch McConnell, the majority leader, long ago reached the conclusion that shutdowns are counterproductive. The past month, he and his caucus also have reminded just how attached they are to the president and the folly he often attempts. When will Rob Portman of Ohio and other Republican senators make clear in a more public way that they demand better from the White House?

When Democrats took charge of the House at the start of the year, Speaker Nancy Pelosi stressed they were eager to talk about border security but not until the government reopened. Weeks later, that is the agreement. What brought the president around? Perhaps it was the speaker standing firm, and appropriately so, on holding the State of the Union after the shutdown ended. Or federal officials on Friday restricting flights into and out of LaGuardia Airport in New York City due to a lack of staffing, air traffic controllers among the many federal employees working the past month without pay.

The reports of hardship and concern mounted, reinforcing the essential role the federal government plays in ordinary lives. Process tax refunds? The president understood that priority and ordered certain furloughed Internal Revenue Service employees back to work. According to reports, at least 14,000 did not show up, signaling their dismay about working without pay. At one point last week, the Coast Guard commandant and four former secretaries of homeland security, including John Kelly, until recently the president’s chief of staff, declared the shutdown must end to protect security.

In one way, the risk of harm remains. Those receiving food assistance were helped by the early issuance of February benefits, easing fear and anxiety. Yet benefits are released on a staggered basis, Ohio recipients receiving assistance in the middle of the month. That means needy recipients now could go 50 days or so before new benefits are issued.

All of the disruption was unnecessary and careless. Recall the president saying, “I will be the one to shut it down.” Republicans controlled the Congress for two years, and they did not give the president a border wall. The president did not request $5.7 billion in his own budget plan. What made him think newly empowered Democrats would be bullied into delivering the billions he now wanted?

In his remarks announcing the end of the shutdown, the president talked about having an “opportunity” for debate. That opportunity has been there.

There is much worthy of discussion, including the unintended consequences of the landmark 1965 immigration law, more people coming to this country than anticipated. What is needed is a debate grounded in the realities of security. On Friday, the president seemed to be moving in the right direction, echoing the words of Democrats and Republicans about “smart walls,” about having no need for “2,000 miles of concrete wall from sea to shining sea.” Then, he returned to the familiar exaggerations, falsehoods and plays to fear and prejudice.

Which invites concern about where things will stand in three weeks. The president alluded again to taking action on his own in some way. Will he learn from a shutdown that brought him absolutely nothing?