WASHINGTON — At the midpoint of one of the most tumultuous weeks in his presidency, President Trump on Wednesday dined on ravioli, hen and fruit compote with a celebrity lawyer he hardly knows, Alan Dershowitz, an iconoclastic legal scholar who has emerged as a prime Trump defender in cable TV’s court of public opinion.

“What I saw was an upbeat president having a nice dinner,” Dershowitz said.

The moment of calm stood in contrast to the days that bracketed it, as Trump cycled through assorted controversies, public rages, policy vacillations, tabloid scandals, diplomatic snafus and conflicting military strategies that each would have created a month’s worth of political fallout in another presidency.

Yet for Trump, the congenial dinner in the midst of crises, some self-inflicted, illustrated just how ordinary chaos is in his White House, and the degree to which Trump’s erratic behavior is the dominant feature of his presidency.

“The White House is no different than the 26th floor,” said Michael Steele, a former chairman of the Republican National Committee, referring to the floor of Trump Tower where Trump ran his business, presiding over a small group of loyalists and family members accustomed to indulging his whims.

What has changed lately is that Trump has seemed to grow more isolated by the departures of confidants, including some who date to the Trump Tower days. That has elicited fears among Republicans from the White House to Capitol Hill that he has abandoned whatever inclination he had to steer in a straight line.

Trump’s most trusted aide and sounding board, Hope Hicks, left the White House late last month. His “body man” and sometime fixer, Keith Schiller, departed last fall. Rob Porter, an aide who had become a trusted West Wing filter, was forced out in February amid allegations of spousal abuse. Daughter Ivanka and son-in-law Jared Kushner have seen their stature and access diminish.

“I think he is lonely,” one longtime confidant said. “The absence of Hope Hicks, the absence of Schiller … all those things make him lonely.”

At the week’s start, Trump’s sense of loss — and personal violation — seemed to boil over when the FBI raided the office, home and hotel room of his longtime personal attorney, Michael Cohen — a possible signal that the wide-ranging inquiry of Trump’s closest associates was edging closer to the president himself. Cohen is at the center of several controversies, including preelection payments to silence women who said they had affairs with Trump.

The loss of close aides coincided with the arrival of less familiar newcomers. Trump prepared an attack on Syria, in retaliation for a chemical weapons attack that killed dozens, just as his new national security advisor, John Bolton, showed up to work at the White House on Monday and began immediately reshuffling the team. His new chief economic advisor, Larry Kudlow, was a week into the job when Trump, at a meeting with Republican senators Thursday, floated a reversal on trade policy.

Neither man is a natural Trump ally. Bolton was a leading proponent of the Iraq war for President George W. Bush, a conflict that Trump has called “the single worst decision ever made.” Kudlow has spent much of his career pushing free trade proposals that Trump has lambasted for “raping” American workers.

“I don’t know if Trump’s ever found a group of people he’s quote ‘used to,’ ” said a former Bush administration official in regular contact with the White House, listing Cabinet officers who have come and gone in Trump’s first 15 months.

Some of those who have known Trump on a personal level say he is continuing to rely heavily on people outside the White House — New York business people, media moguls, old political hands, wealthy members of his private Mar-a-Lago club in Florida and those, like Dershowitz and Sean Hannity, whom he’s befriended for being supportive cable television personalities.

As Trump shifts among advisors, however, their confusion about him and about their place in his network grows.

“It’s very hard to understand in this atmosphere who he’s listening to,” one confidant said.

The response to the crisis over Syria was a prominent example of Trump’s shifting posture on a fundamental issue.

Late last month, he promised to withdraw troops from Syria “very soon” and “let the other people take care of it.” That prospect unnerved his national security advisors because the United States’ departure would leave Russia, Iran and the Syrian regime — three parties at odds with American policy — in charge without check.

Yet this week, the chemical attack allegedly by the Syrian government changed Trump’s calculus.

Trump was quick to denounce what he called a humanitarian atrocity and warned Moscow he’d launch a barrage of missiles in the face of Russia’s threats to shoot them down, an exchange that risked widening the conflict.

But soon after promising swift action in Syria, Trump pulled back again.

“Never said when an attack on Syria would take place,” he tweeted Thursday. “Could be very soon or not so soon at all!”

The attack finally came Friday night, with a prime-time announcement.

“We are prepared to sustain this response until the Syrian regime stops its use of prohibited chemical agents,” Trump said.

Trump surprised advisors on another core issue, trade. Trump’s opposition to trade deals was at the center of his campaign. Days after taking office, he withdrew the U.S.from the pending Trans-Pacific Partnership, a trade agreement with 11 nations that he often called a disaster, and boasted of fulfilling a promise to American workers.

Yet Trump on Thursday told a group of farm-state GOP senators who favor the deal that he would review his decision to withdraw. Hours later, he tweeted a message that cast doubt on any such possibility, reiterating his demands for better terms and endorsing bilateral pacts as alternatives.

In each case, Trump’s aides have been forced to adjust strategy and messaging.

Late Thursday night, Trump signed an executive order to review the finances of the U.S. Postal Service, following weeks of angry tweets falsely blaming Amazon for the agency’s shortfalls. Amazon is run by Jeff Bezos, owner of the Washington Post, whose coverage has angered Trump.

Amid the policy shifts, Trump engaged in public tirades — sparked by the Cohen raid — suggesting anew that he might fire Atty. Gen. Jeff Sessions, special counsel Robert S. Mueller III and Rod Rosenstein, the deputy attorney general who oversees the inquiry of election interference by Russia and possible Trump campaign complicity.

Trump called the raid an attack on democracy and the end of attorney-client privilege, assertions that were widely dismissed.

On Friday, Trump dropped another surprise, pardoning I. Lewis “Scooter” Libby, a former Bush administration official who was convicted of lying to the FBI and obstruction of justice. Bush had declined to pardon Libby, and Libby’s cause hardly seemed one for Trump to take up. Not only was Libby behind the Iraq war effort, but the investigation that led to his conviction centered around leaking classified information, which Trump has criticized others for.

Only hours before announcing the pardon, Trump had lashed out on Twitter against fired FBI Director James B. Comey. Comey has begun promoting a new memoir in which he criticizes Trump as an immoral liar.

Comey is to appear on ABC on Sunday night for an hourlong interview about the book — an event all but certain to mean another wild week for the Trump presidency.

noah.bierman@latimes.com