Your understanding is generally correct. However, I would not say that you use "coming" or "going" depending on the speaker's mind. More often, it depends instead on the person being spoken to.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.