Well it wasn’t a dream we see that from the beginning, and we know she is going to die because there’s no way to survive that. So we know she’s going through some last minute coping to die somewhat happy, it’s not a cheap annoying trick in actuality. However, if you take it as cheap that’s fine too
In Gravity, George Clooney's character wasn't her husband and it was he who drifted away. But other than that, it's a pretty common interpretation that this is the same thing that happened to Sandra Bullock's character. That she died and the ending on Earth was her already being dead. This comic is basically a summary of the movie.
Wait, what? Bullock's character is actually dead in Gravity? I've been watching that movie way too literally. Kinda messes with her character's arc though, if she karks it halfway through.