What exactly is the difference in meaning between the questions
Do you want to join us?
and
Did you want to join us?
in the context of a group of people asking asking another person who happens to be in the same place (for example, friends having dinner in a restaurant and bumping into another friend).
I would use the first variant, because to me "did" implies that the person who is asked had made up his/her mind before the question was asked.