Tai chi use to be China main martial arts but Tai chi nowadays is more of a work out this is due to the China government pushing martial arts to be more peaceful.
So my question is when did tai chi lose it edge.
While the slow-and-relaxed version of Taiji is a popular modern Chinese exercise, Taijiquan was never the main, or even a major, martial art in China.
First, the main martial arts in China, up to the end of the 19th century, were armed martial arts: archery, spearmanship, swordsmanship.
Second, even among the unarmed martial arts, Taijiquan was relatively small. The probable inventor was Chen Wangting, who (probably) developed the style in the mid-17th century, one of many martial arts styles that developed in the vicinity of Shaolin Temple, and one of the martial arts styles that claimed Daoist roots as opposed to Buddhist roots - anti-Manchu (i.e., anti-foreign) sentiment in safe disguise.
For Chen Wangting and his development of Taijiquan, see Meir Shahar, The Shaolin Monastery: History, Religion, and the Chinese Martial Arts, University of Hawai'j Press, 2008.
For a discussion of the Zhang Sanfeng foundation legend of Taijiquan, see Henning, Stanley (1994). "Ignorance, Legend and Taijiquan". Journal of the Chen Style Taijiquan Research Association of Hawaii. 2(3),1-7: http://www.nardis.com/~twchan/henning.html
Taiji remained confined to one village (Chenjiagou village) until about 1850, when one student, from outside the village who had gone there to learn Taijiquan, began to teach in Beijing. This student/teacher was Yang Luchan, the founder of Yang style Taijiquan (all of the major modern styles of Taijiquan other than Chen style descend from Yang and his students). To emphasise, Taijiquan was a single-village martial art until about 1850, and not even close to being a major unarmed martial art in China, let alone the major unarmed martial art in China.
Third, Taijiquan, taught as a martial art, continues as it has done for centuries. That it has spun-off a popular slow flowing exercise (its forms used as exercises routines) hasn't had any impact on the combat effectiveness of the martial art. The practitioners of Taiji-as-slow-exercise are, in most part, not people who would have studied Taijiquan as a martial art. The exercise-version doesn't steal students from the martial version. It has increased its popularity, by making it more visible. But yes, the exercise-version will not make somebody a great fighter.
Fourth, modern growth of exercise/sports versions of older martial arts is common. Exercise and sports attract people, and such new branches of many arts grew, until they dwarfed their traditional ancestral martial arts. For Chinese martial arts, this began in the late 19th century, and became a major movement in the early Republic. For this story, see Brian Kennedy and Elizabeth Guo, Jingwu: The School That Transformed Kung Fu, Blue Snake Books, 2010. The same thing happened in Japan, with the development of Kendo, Judo, and the transformation of Okinawan karate to Japanese karate taught as physical education to children.