The meaning is close to 1), but it is hard to find a good literal translation because the structure is idiomatic. The writer/speaker wants to express that the part before and after the und dabei contradict logically, but in a more subjective and snarky way than a factual/neutral "although" or "and yet". The underlying nuance basically spells out "This was not supposed to happen, in my opinion".
Er verbrachte 10 Minuten damit, den Regenschirm zu finden. Und dabei schien die Sonne.
=> I almost say that I think he is crazy and wasted everyone's time.
Team A gewann gegen Team B. Und dabei hatte Team A einen Spieler weniger.
=> I almost say that I think that Team B should have won by all means in these circumstances. Either Team A is surprisingly good, or Team B is surprisingly bad.
Die perfekte Ausrede für ein kleines Gelage, ruiniert dank Felix. Und dabei hatte ich gehofft, das mit ihm zusammen genießen zu können!
=> I almost say that I think that he could have had so much fun, and still destroyed it for himself .. and me. What an idiot.
As said, it's hard to find a good translation for that. My suggestion to catch the spirit of annoyance in this example is a simple "and":
The perfect excuse for a little feast, ruined thanks to Felix. And I
had hoped to enjoy it with him!