Senate Majority Leader Mitch McConnell (R-Ky.) attends a news conference following a weekly policy luncheon on Capitol Hill in Washington, on Tuesday. (Al Drago/Bloomberg News)

CONGRESSIONAL NEGOTIATORS have reached a compromise on border security that delivers half a loaf or, as President Trump sees it, less than a quarter of a wall — just $1.375 billion of the $5.7 billion he wanted for construction of a barrier along the Southern border. It’s a modest deal that doesn’t address the most important immigration issues, such as the status of the “dreamers,” undocumented immigrants predominately brought to the United States as children. But with dysfunction having become the Washington norm, it is practically a triumph that GOP lawmakers summoned the will to break an impasse, forged an accord with Democrats knowing it would displease Mr. Trump and plan to send it along to him to sign or veto.

Barring last-minute snags, the president appears set to sign the measure to build 55 miles of new fencing and fund the Department of Homeland Security and other agencies, thereby averting another government shutdown. That would end a gratuitous standoff that could have been avoided in December had Mr. Trump supported legislation that provided more border security funding than he ended up securing after a five-week partial government closure. Pandering to his base, he opted for a fight, venomous tweets and paralysis.

Good for Congress, and good for the Senate majority leader, Republican Mitch McConnell of Kentucky, for schooling Mr. Trump on the art of the possible. Even better, though, if Mr. McConnell and other congressional leaders now take further steps to resolve immigration disputes wrongly deemed irresolvable by conventional wisdom.

They should start by defusing the time bomb ticking for the more than 1 million young dreamers, whose lives and livelihoods will be devastated if Mr. Trump’s decision to rescind their protections from deportation, and work permits, gets the green light from the Supreme Court. That’s possible, and should it happen, it will destroy families and communities in districts represented by Republicans and Democrats alike. (The Center for American Progress has published an online interactive map showing the number of dreamers in every congressional district.)

Mr. Trump signaled his willingness last month to negotiate over Deferred Action for Childhood Arrivals , albeit with a narrow proposal that would exclude many dreamers and extend others meager relief: just three years of work permits and deportation protections, with no pathway to legal status or citizenship. Congress would be wise to improve now on Mr. Trump’s blueprint with legislation that would provide permanent protections for young migrants who have been raised in this country and are Americans in outlook, allegiance and expectations.

Congress could also legislate relief for hundreds of thousands of people who have been living legally in this country with temporary protected status, in many cases for decades, having fled conflict and natural disasters in their home countries. The administration has ordered their protections withdrawn, as well. A proactive Congress would intervene to ensure that those migrants, often the parents of U.S. citizens, have a viable and secure future in communities where they are well integrated.

Problem-solving was once taken for granted in Congress. Regaining that muscle memory is a matter of embracing bipartisan compromise.