I'm a software developer with about 10 years experience, working as a consultant since end of last year, through an agency that put me with my first client where I've now been for half a year.
The team consists of a senior developer (20 years experience), me as a medior, and a junior (2 years experience). We have a team lead and a manager.
My speciality is front-end development even though I am full stack. This means I used to do all front-end tasks, and now split them with our junior as I've been mentoring them. Senior has done no front-end work since I started there.
The problem in the team is that senior developer in the worst cases dictates how to solve a front-end problem, and is not stopped by team lead from doing this. Senior has only basic knowledge of the front-end framework used, and no knowledge of the component library we purchased. He is the type that will answer a question before thinking about it (or do the thinking process out loud on the fly), and because he is the oldest, most experienced and has developed some of the core solutions of the business his words carry a lot of weight. He will look through the component documentation for two minutes, pick the first thing he finds, and tell me to do this. This leads to situations where I'm told how to fix a problem, knowing already it won't work, but because I'm not good at explaining (and I also could be wrong) I investigate it and explain what I tried and why it won't work, and always try to come up with an alternative solution. This leads to the problem being solved, but he will keep finding ways to attack the solution, and if the solution comes up later, he will tell me that his way was better. I've started documenting furiously in the last few months, but for past things I lack this, which leads to being told I remember things wrong. I'm not sure if that is gaslighting, so I'm building a trail.
However working like this is not healthy and I notice it taking a toll on me. I want to solve software problems, not people problems, and I don't want to have to document my every move to be believed. I've run into a problem now I was asked to solve by the team lead, but the solution he proposed (which is actually what senior proposed, after which he told team lead to make a call) is very much how you'd solve this in a desktop application, and also not technically possible with the components we use, which I've investigated and documented. I've asked team lead for a meeting next week to discuss this, without senior present, and I'd actually like to bring up how I'm feeling in this team. But I'm not sure how to proceed, and quite sure team lead will ask why I didn't want senior present. I've made brief mention of how senior acts to my manager, and while he agreed it was not ok, we decided to see how things would further go. He was understanding but I'd rather not bother him unless team lead doesn't help improve the situation. I don't want to breed ill will by escalating things, but I also don't want to be pushed around because nobody wants to address an issue.
What I'd like to achieve is a healthy team balance, where everyone can have input, but you don't tell someone how to do their job unless you have real proof that you are right. I possibly take things too personally, at least that is feedback I have received from the team. They could be right, but at the same time, it feels the power dynamic is off. I don't yet want to resort to telling the agency it isn't working out with the client, even though they'd have a new one for me in no time, it's an otherwise great workplace and I think everyone would benefit from a solution.
So my question is, how to I proceed on getting to a solution for a situation where a senior with less experience in a speciality dictates a medior (and a junior) how to do their job if what we do isn't to his liking?