For all her save-the-world-awesome-super-poweredness, Miss Summers didn't really have a fully developed discretion muscle.
I can understand that people sometimes become spiteful after a break up and so telling Angel about Riley to aggravate him, while unkind, sot of makes sense. Why she would tell Riley about Angel beyond, 'I had a bad relationship with the last guy but his hair was better than yours.' always baffled me a bit 😀
Flawed characters are such a large part of why I like Joss' shows, though, that I am willing to give him a pass. On this one at least.