I find what's more immature is having a concrete rule of "cheating = breakup." No circumstance is the same. People are different and they change.
Sure, that's fine. I advise break up due to the following circumstance
They've been together 4 years
If they'd been together a few months, or maybe a year and she went for an ex? Ok, some lingering feelings.
But goddamn lingering feelings after 4 years with you? Seems to indicate she's getting tired of the relationship and after all these years still holds a flame for the ex. That makes me think that she is really considering going back with her ex.
Could I be wrong? Well of course, none of us are mind readers. But certain behaviors and actions can indicate a greater likelihood of certain outcomes and you need to weight how comfortable you are with these increased odds.
For instance. Let's say she'd never kissed her ex. Let's say she'd never remained in contact at all! From the OP's perspective, is it reasonable to ever think she'd randomly connect with her ex and kiss? No...not really. But keeping in contact, admitting to feelings for an ex 4 years into your relationship (which is what's really going on when you say you're still thinking about a guy/gal) and kissing them, which to many people is a major physical act...well suddenly it is not as unreasonable to believe anything can happen between those two. So the question is, how does one react?
Its perfectly reasonable to break things off.
I advocate breaking things off based on what has been communicated. IF SHE IS A KEEPER, and she truly loves the OP...then she'll take the ending of the relationship as a sign to win him back. If not, if she just goes back to the ex...then she wasn't worth it.