I can't see why China would want to try a military invasion of Taiwan. I can't see an upside for them. The destruction, and economic-damage, would be devastating, and a successful economy is the only thing that keeps the Chinese elite in power (and chaos at bay).
But then, I couldn't see any sense in Putin's Russia attacking Ukraine, so my predictions may not just be wrong, but downright jinxed. Maybe Xi is as insane as Putin? Just how many dangerous psychopaths are there in powerful positions in the world now?
Mostly true, the window for China to invade Taiwan closed a long time ago. That doesn't mean it's off the table completely, as a "red line" for China would be if Taiwan declared political independence. Although China's goal is reunification, the status quo is working fine for both sides. Politically, the biggest problem for China is that younger Taiwanese don't identify as "Chinese" anymore. So the chances of a political deal seem remote at best.
For a developed country, Taiwan's per capita GDP (nominal) is fairly modest. It's currently only double that of China, which still has a large population of peasant farmers. So for China, I think they see a long-term argument that once they become an advanced economy, an economic reunification becomes more palatable. I don't know what this would actually look like, because Taiwan sees the situation in Hong Kong SAR and they want none of that.
I'm no China expert, but my opinion is that Xi is not insane.