"What just happened?" is a question that captures surprise or confusion about an unusual situation. In this context, the speaker is reacting to an unexpected event involving a close personal connection.
"Your father invited the former love of your life in for pie." indicates a surprising social scenario where a parent invites an ex-partner into their home, perhaps leading to mixed emotions or awkwardness. The exchange reflects the unexpected nature of this act and the underlying emotional complexity.