01 - Preheat the oven to 400°F. Line a baking sheet with parchment paper and set aside.
02 - Melt butter with olive oil in a large skillet over medium-low heat. Add sliced onions, salt, and sugar. Cook stirring frequently for 25–30 minutes until onions turn deep golden brown and develop sweet caramelized flavor. Stir in thyme and black pepper during final 5 minutes of cooking.
03 - While onions cook, unroll puff pastry onto lightly floured surface. Cut into 6 equal rectangles and transfer to prepared baking sheet. Using a sharp knife, score a 1/2-inch border around each rectangle without cutting completely through dough.
04 - Brush the scored edges of each pastry rectangle with beaten egg using a pastry brush. This creates golden, glossy finish during baking.
05 - Divide caramelized onions evenly among pastry rectangles, keeping within scored borders. Sprinkle crumbled goat cheese generously over onions.
06 - Bake for 15–18 minutes until pastry is puffed, golden brown, and crisp, and cheese has melted slightly.
07 - Remove from oven and sprinkle with fresh chives or parsley if desired. Serve warm or at room temperature as appetizer or elegant snack.