Standing soberly beside Donald Trump on Friday morning, as cameras recorded them preparing to enter Trump’s peach-colored Florida country club, Xi Jinping mustered only a Mona Lisa smile. It seemed to contain the question that unites more than a few around the world these days: How, in God’s name, did we get here—and where are we going?

The first face-to-face encounter between the American President and his Chinese counterpart was expected to follow a predictable arc—the plutocrat and the Communist, the blowhard and the sphinx, the weary protectionist and the reluctant globalist. But, just after eight o’clock on Thursday, as the two leaders were polishing off their New York strip and Dover sole, Trump informed Xi that he’d launched cruise missiles against Syrian armed forces. The strike was a response to the Syrian government’s use of sarin gas against civilians, and it drew applause from some in both the Democratic and Republican parties. It also reinjected American interests and treasure into a strategic swamp that has bedevilled Trump’s predecessors. Trump always promised to behave this way—“We’re so predictable. We’re like bad checker players,” he said during the campaign—but, for China, handling the new President just got more complicated.

There are many reasons for China to be unhappy. In terms of politics, the attack upstaged a carefully choreographed political pageant, intended for a Chinese audience, portraying Xi as the most important item on the American agenda this week. In terms of strategy, China gets hives whenever the U.S. unilaterally attacks another country—Beijing half-wonders if someday that country will be China—and, in this case, China has repeatedly rejected United Nations Security Council resolutions against Syria’s leader, Bashar al-Assad. Trump’s snap decision to attack will force Chinese officials to reappraise a figure whom they had come to see as clownish and manageable.

In the short term, the big question is whether Trump’s timing will encourage the Chinese to be more aggressive in pressuring North Korea to curb its nuclear program. “He just conducted the first ever US attack against Assad. I think he goes into [Friday’s] discussion with much greater credibility and leverage,” Paul Haenle, who advised both George W. Bush and Barack Obama on China, told the Guardian. If Trump is willing to attack Assad, the theory goes, what is he prepared to do to back up his threat that Pyongyang’s nuclear program “has to be stopped”? Ninety per cent of North Korean exports go to China, but it has resisted requests to cut off that market, for fear that economic pressure would destabilize the North Korean regime and cause a political and refugee crisis on China’s border.

In the medium and long term, China now has a larger concern: if the emerging Trump doctrine permits him to attack at will—even between the appetizer and dessert—putting some pressure on North Korea might be Beijing’s more desirable option. But it must now also prepare for four years of an American President whose strategy and doctrine can change from one week to the next. In the field of national security, unpredictability is usually the favored tactic of small powers, not large ones. “A superpower should want to convey reasonableness but implacability when your interests are crossed,” a Bush-era White House official told me. “Trump constantly emphasizes unpredictability. Well, unpredictability makes sense if you’re Kim Jong-un, because you’re so weak.”

In their meetings, Xi had been expected to offer Trump some symbolic red meat, to satisfy his campaign demands for better trade terms. Among the offerings discussed in advance were larger Chinese purchases of America’s liquid natural gas and agricultural exports, and, perhaps, a cut in China’s tariff on American automobiles. Beyond those good-will gestures, however, China did not expect to have to give up much more, in part because, after adopting a feverish anti-trade position during the campaign, Trump has recently moved toward traditional Republican positions more akin to those expressed by John Frisbie, the president of the U.S.-China Business Council, who warned, in an op-ed this week, that “the stakes are too high to play into protectionist fears.”

With Trump’s chief strategist, Steve Bannon, and his populist wing reportedly losing favor in the White House, it seems increasingly likely, as I’ve written before, that Trump’s anti-trade position during the campaign will prove to be for display only—especially if the White House becomes distracted by a complex new initiative in Syria. That would be welcome news in Beijing. As Richard Haass, the president of the Council on Foreign Relations, put it, “The trajectory of the next four years will hinge on whether China and the United States can avoid a trade war or any other kind of war.”

Late Thursday morning, a couple of hours after starting their talks, Trump and Xi ushered reporters into the White-and-Gold Room at Mar-a-Lago for a display of comity and good cheer. Trump offered no specifics, but said, “Lots of very potentially bad problems will be going away." That may well be true, but, as America embarks on its latest adventure in the Middle East, China will be watching closely.