When, exactly, do we transition from physical, bodily resurrection after death, to a purely spiritual existence, with no body?
On the one hand, we are taught the following order of events: The Messiah comes, rebuilds the Temple, and gathers all living Jews in the Land of Israel. Forty years later, the dead are resurrected, by descending order of righteousness; first the dead of Israel, then the dead in the Diaspora.
The body will be rebuilt from the luz bone [Genesis R. 28:3], a tiny but very tough bone in the spine. (Read: DNA, Jurassic Park, etc.). You will come back exactly as you went. [Genesis R. 95:1; also Sanhedrin 91b]
On the other hand, Berakhot 17a tells us that our life after death will be purely spiritual. The Rambam summarizes:
There are no bodies and no bodily forms in the World to Come… There is no eating or drinking there, nor is there anything which the human body needs in this world. Nor does there occur there any of the events which occur to the human body in this world, such as sitting, standing, sleep, death, distress, laughter, and so forth. The ancient sages say: "In the World to Come, there is no eating or drinking or procreation, but the righteous sit with their crowns on their heads and bask in the radiance of the Divine Presence... There is no way for us in this world to know or comprehend the great goodness which the soul experiences in the world to come, for in this world we know only of material pleasures, and it is these we desire. [Rambam, Yad, Teshuvah 8]
So: What are the sources for when and how we will transition from having a physical body to having none?