Heat butter in a skillet over medium heat
Add onions and cook until soft
Add garlic and sauté 1 minute
Add mushrooms, thyme, salt, and pepper
Cook until mushrooms release moisture and it evaporates
Add wine/broth (optional) and cook down
Stir in flour and mix until absorbed
Add cream for richness (optional)
Remove from heat and let cool slightly
Preheat oven to 200°C (400°F)
Place puff pastry sheet on parchment paper
Spread the mushroom mixture down the center third
Top evenly with Gruyère cheese
Cut diagonal strips along both sides of the pastry
Fold strips alternately over the filling to create a braid
Brush with egg wash
Bake 25–30 minutes until golden, puffy, and crisp
Garnish with parsley and slice before serving warm
