You should change your idea when you (a) have new one you're convinced is better, and (b) it won't cost too much to switch to it (e.g. because it overlaps a lot with your current idea). Harder to say when to quit. I suppose you quit when you can't take it anymore. Which means deciding that depends less on the product than on you.
A good idea with low diversification costs
A great idea with high diversification costs
I say diversification costs, primarily time and focus, instead of switching costs because the first product will still be maintained and grown, not abandoned.