During a Taiwan National Day speech on October 10, Taiwanese president Lai Ching-te said that Taipei was determined to defend Taiwan's sovereignty against "annexation and encroachment", and emphasised that "China has no right to represent Taiwan".
China's response was swift. Less than a week after Lai's provocative speech, a record 153 Chinese war planes swarmed and surrounded Taiwan during a Chinese military exercise over 24 hours. Beijing's intention was simple: issue Taipei a "stern warning" for what China considers a "separatist act".
Beijing sees the island as a "sacred and inseparable part of China's territory" that must return to the fold. The Taiwanese president sees things differently. Currently, the self-governing island has a different political system, and few Taiwanese are in favour of reunification with China.
Though Washington doesn't have diplomatic relations with Taipei officially, it does have regular communication through back channels and a strong economic relationship. The island is a key US trading partner and is a major supplier of semiconductors which are critical to the production of computers and other technologies. It also sells arms to Taiwan, although this has reduced significantly under Joe Biden.
China has not ruled out taking Taiwan by force, and if it does, the US might come to the self-ruling island's defence as indicated by Washington in the past.
But Xi will be hoping the outcome of the 2024 US presidential election might bring a leader that would have a different attitude to Taiwan as well as helping China resolve its economic storm, which has resulted in a rising number of protests. So, between an outspoken Donald Trump and a seemingly even-tempered Kamala Harris, does Beijing have a favourite? And do either of them offer Xi anything new?
Taiwan and Xi's legitimacy
Aside from Mao Zedong, the founder of the People's Republic of China, Xi is the only sitting Chinese head of state without term limits and whose political ideology is enshrined in the Chinese constitution.
Xi could potentially prove his place in history by resolving China's economic crisis. However, Beijing's increasing isolation from the west due to its support of Russia's Ukraine conquest makes this doubly hard.
Like it or not, Xi might have to ramp up whatever agenda Beijing has for Taiwan. If he could make sufficient progress towards unification, he may be hailed as one of the greats of the Chinese Communist Party, which would consolidate his status within the party, and distract from the nation's economic woes.
Unlike Harris, who appears to take take alliances and partnerships seriously, Trump questions the benefits of many alliances forged by the US. In fact, the few times that he spoke about Taiwan centres on how the island state has taken America's semiconductor business, and should pay more to the US for its defence.
So, would Trump come to Taiwan's aid if China does invade Taiwan? Given the importance of semiconductors to electronics and AI, he just might. But Trump also has a reputation as a "dealmaker-in-chief", so he might just cut a deal with Beijing, which erodes Taiwan's independence. And that is likely to worry Taipei.
The Russia dilemma
As Russia's "partner of no limits", China has been supplying Russia with technology that fuels Russia's war machinery against Ukraine. But this has strained Sino-western relations and earned Beijing trade and import restrictions, which hampers China's economic recovery.
China could halt its aid to Russia to avoid western scrutiny, but that is not likely. Beijing needs a strong Russia to be a viable ally in its battle against a US-led world order, and to avoid being the focus of the west if Russia falters amid its conquest in Ukraine.
While Harris backs Kyiv and sees the war as a strategic and moral issue, Trump has criticised US aid to Ukraine. He also believes that Kyiv should provide concessions to Russia to end the war that Putin started in February 2022.
A future Trump administration might strengthen Russia by withdrawing support for Ukraine and lifting sanctions against Russia. And a more robust Russia is good news for Beijing.
US economic hostility
So, at first glance, Trump and Harris's approaches towards China are different. Trump's return to the White House could also intensify the trade war that he started in 2018, as tariffs on Chinese goods could go to as high as 60%. This might hasten the economic decoupling between the US and China.
Harris, on the other hand, wishes to "de-risk" China. This approach seeks to maintain US global interest while engaging with the east Asian economic behemoth. In such a scenario, Beijing might prefer a Harris presidency as it leaves room for negotiation.
However, Harris has relatively little foreign policy experience, and is expected to pick up where Joe Biden left off. This means the tariffs and technological restrictions that China faced under a Biden administration could stay under her presidency.
Another factor is Tesla founder Elon Musk, who is an ardent supporter of Trump, and may take a top job within a Trump administration.
How much influence the tech multi-billionaire actually has over Trump is uncertain. However, it's worth noting that Musk has substantial business dealings in China, and might seek to lean on Trump if the former president's policies harms Tesla's interests.
With many of these factors unclear at the moment, Beijing will be hoping for a US leader who is more interested in economic wins than protecting Taiwan, and one that Xi can negotiate with to warm up relations between the two countries.