I think China is looking at everything from a long (like 30 years long) term perspective. What they are looking at is the continued development on all spheres (socially, economically, technologically, military). As long as this bottom line is being taken care / nurtured, they wouldn't mind playing "tai-chi" with any adversary. For the Chinese, taking 2 steps forward and then a half-step backwards, then 2 steps forward again is still very good.
I also think that the Chinese leadership is already getting the hang of Trump. No matter how "unpredictable" at the surface Trump is, he is still hampered by the way "democracy" is run in America, that is winning elections. The CCP should have already game out the scenarios, and frankly, the way I see it, it is the US that is losing party since the trade war began.
All the foundations, education, infrastructure, finance, economy, are nicely in place. The vast majority of its people are rallying around the leadership, and a can-do vibe is pulsing through the nation. Mind you, this isn't only about the Chinese in China, but the vast majority of the Chinese diaspora can already sense this, and are very proud of their ancestral homeland, and what they have and can achieve in the future.
In just a few more decades, Asia will once again truly regain it's independence and forge a new prosperous future. My brothers and sisters 加油 !