The Sukhoi Superjet won over the Tupolev Tu-334 because back then the Russian government did not want to spend much money developing a regional aircraft. Back then Sukhoi had a lot of money from military aircraft exports and did not need significant government funding.Sukhoi Superjet is excellent aircraft but Putin mistake was not putting effort on Modernizing Tu-214 series for Civilian production. This Kazan, Samara, UFA etc is much larger industrial area to do aviation work.
The Superjet is much better than the Tu-334. It has a lower empty weight and is thus more fuel efficient.
The main issue with the Superjet is lack of 100% Russian engines until PD-8 becomes available. But the Tu-334 was not any better since it used a D-436 Ukrainian engine.
As for the Tu-214 and civilian production. Originally the Tu-204 was produced at Aviastar. But the airlines, especially Aeroflot, refused to buy it, preferring Western leased aircraft. Which had lower upfront acquisition cost despite costing like double the price brand new. The Tu-204SM was then produced with PS-90A2 modified engine made together with Pratt & Whitney, and with more automation meaning only 2 crew was required instead of 3. The program took forever, and the airlines still did not bite. So the Ministry of Industry and Trade basically did all they could to kill the Tu-204SM project. The only reason it was even made to the end and certified was Putin forcing it. The Aviastar production facilities at Ulyanovsk which made the Tu-204 were retrofitted to produce the Il-76 which used to be made at Tashkent in Uzbekistan. The Tu-214 was only produced at Kazan at the Tupolev factory in single units for government use.