Your W is unhappy. You can take that as a given. Now she she sees greener pastures elsewhere. Again normal. Anything she does is to seek her happiness. There is nothing wrong with that motivation. We all should strive for happiness. However during this crisis, she will do almost anything to seek her own happiness. That is the biggest problem as she will be blinded to others and the affects of her actions on them.
So why is the grass so pale on your side of the fence. That is something that you need to figure out. From your posts, you seem aware of some aspects that could have contributed. I would urge you to dig deeper and to see more. But take your time to assess this and put actions in place to change what needs to be changed. I say this because unfortunately I suspect you have along time ahead of you before she will truly see your changes. That does not mean you shouldn't change.
A good starting point is often her list of complaints or the things she blames you for. Where her issues are justified, you can take appropriate steps to improve. Where not justified, you can let them pass. A word of warning though, here we often read about a WAS complaining about ONE specific issue (or small group of issues) but once that is no longer the case, they state another as being THE MAIN reason for their unhappiness with you.
It is almost classic for her to have an affair and then say its not too late for you to make up for what YOU did! She feels justified because she feels she has been hard done by by you. This is her point of view. Whereas I find it reassuring that she says it isn't too late, I would be wary of her mindset. I don't believe she is ready to reconnect with you. BUT she has left the door open to that possibility. Time will tell how genuine that statement is, but for now use the words of CADET to guide you: Believe nothing she says and only half of what she does.
Actions speak louder than words. And she has filed for D. That in itself changes nothing for you, but does mean she is a little surer of what she wants than she said.
Normally I would advise to stay put in the house. But in this case it's her house with her mom, Plus she works from home. The two key elements to saving your M are to give her TIME and SPACE. Only you can decide the best way to give her those.
But if you do find somewhere for you and the boys, she will have more time to herself. Of course she may use that time to seek her happiness in ways you prefer her not to, but it is truly the best way to get through this. You cannot control what she will do, but you can remove yourself from the equation. Only when she can no longer blame you and still not achieve true happiness, will she have the opportunity to realise that it isn't about you at all.
I wish you luck and courage. As for her text, there is no need to reply. However I would seek legal advice. Best to be forewarned and forearmed.
Your stance needs to be that as long as there is a third person in the R, it is not possible for you to even consider a possible R with her. Don't be pulled in on the D. Don't oppose it or even say you are against it. Offer the path of least resistance, BUT do not do anything to help the D and do not let her walk over you. Hence the need for legal advice.
Best wishes
R 25 years M 14 years S11 & S13 Working on it alone since Oct 2014 M in trouble a lot earlier (~2 years) Feb 2016. 1st R chat in a yr. Next R chat Aug'17 Still together